mirror of
https://git.coom.tech/drummyfish/small3dlib.git
synced 2024-11-23 20:59:58 +01:00
Add small adjustements
This commit is contained in:
parent
d4caf79e43
commit
e0467330e9
3 changed files with 26 additions and 2 deletions
5
make.sh
Executable file
5
make.sh
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
PROGRAM=testSDL
|
||||
|
||||
clear; clear; g++ -x c -g -fmax-errors=5 -pedantic -Wall -Wextra -o $PROGRAM $PROGRAM.c -lSDL2 2>&1 >/dev/null && ./$PROGRAM
|
19
s3l.h
19
s3l.h
|
@ -10,6 +10,25 @@
|
|||
|
||||
--------------------
|
||||
|
||||
This work's goal is to never be encumbered by any exclusive intellectual
|
||||
property rights. The work is therefore provided under CC0 1.0 + additional
|
||||
WAIVER OF ALL INTELLECTUAL PROPERTY RIGHTS that waives the rest of
|
||||
intellectual property rights not already waived by CC0 1.0. The WAIVER OF ALL
|
||||
INTELLECTUAL PROPERTY RGHTS is as follows:
|
||||
|
||||
Each contributor to this work agrees that they waive any exclusive rights,
|
||||
including but not limited to copyright, patents, trademark, trade dress,
|
||||
industrial design, plant varieties and trade secrets, to any and all ideas,
|
||||
concepts, processes, discoveries, improvements and inventions conceived,
|
||||
discovered, made, designed, researched or developed by the contributor either
|
||||
solely or jointly with others, which relate to this work or result from this
|
||||
work. Should any waiver of such right be judged legally invalid or
|
||||
ineffective under applicable law, the contributor hereby grants to each
|
||||
affected person a royalty-free, non transferable, non sublicensable, non
|
||||
exclusive, irrevocable and unconditional license to this right.
|
||||
|
||||
--------------------
|
||||
|
||||
CONVENTIONS:
|
||||
|
||||
Angles are in S3L_Units, a full angle (2 pi) is S3L_FRACTIONS_PER_UNITs.
|
||||
|
|
|
@ -78,7 +78,7 @@ conf.mode = S3L_MODE_TRIANGLES;
|
|||
int cent = (x0 + x1 + x2) / 3.0;
|
||||
x2 = cent + (x2 - cent) * sin(frame * 0.01) * 2;
|
||||
|
||||
S3L_drawTriangle(x0,y0,x1,y1,x2,y2,conf);
|
||||
S3L_drawTriangle(x0,y0,x1,y1,x2,y2,conf,0);
|
||||
|
||||
setPixel(x0,y0,255,0,0);
|
||||
setPixel(x1,y1,255,0,0);
|
||||
|
@ -95,7 +95,7 @@ int16_t rotY1 = 200 + cos((frame + 500) * 0.01) * 50;
|
|||
int16_t rotX2 = 200 + sin((frame + 300) * 0.01) * 50;
|
||||
int16_t rotY2 = 200 + cos((frame + 300) * 0.01) * 50;
|
||||
|
||||
S3L_drawTriangle(rotX0,rotY0,rotX1,rotY1,rotX2,rotY2,conf);
|
||||
S3L_drawTriangle(rotX0,rotY0,rotX1,rotY1,rotX2,rotY2,conf,0);
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue