-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path3dframework.h
74 lines (62 loc) · 2.12 KB
/
3dframework.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
struct Vertice2d {
WORD X;
WORD Y;
};
struct Square {
struct Vertice2d Vertices[4];
int DotProduct;
WORD Clockwise;
WORD XPosMin;
WORD YPosMin;
WORD XLength;
WORD Height;
UWORD Color;
};
struct DirtyArea {
ULONG Address;
ULONG AddressRev;
UWORD BltSize;
UWORD BltMod;
};
struct ScreenBuffer {
UBYTE *BitPlane;
struct DirtyArea MyDirtyArea[4];
WORD maxytotal;
WORD minytotal;
};
struct Cube {
struct Square Squares[6];
};
static UWORD MintermMatrix[] = {
0xee,
0xbb,
0xee,
0xbb
};
static WORD ModSignMatrix[] = {
1,
-1,
-1,
1
};
extern volatile UWORD FrameCounter;
UBYTE *Clbuild() __attribute__((optimize("-O3")));
void ClearDirtyArea( ULONG target, WORD bltsize) __attribute__((optimize("-O3")));
void ClearDirtyAreaPrepare( WORD bltmod) __attribute__((optimize("-O3")));
void SetCl( UWORD minlastdrawline) __attribute__((optimize("-O3")));
void DrawCube3d( WORD *vectors, UWORD mirroring, UWORD cubecount) __attribute__((optimize("-O3")));
void DrawLetters( WORD *vectors, WORD *metadata, struct ScreenBuffer *buffer, UWORD numcubes, UWORD reversed) __attribute__((optimize("-O3")));
void DrawRect(struct Square *square) __attribute__((optimize("-O3")));
void DrawScreen() __attribute__((optimize("-O3")));
UWORD DrawDices( UWORD *cubenrreverse, WORD *lettermetadata,WORD *lettermetadatareversed, int nrofvertsletter, int nrofvertsletterreversed, int nrofcubes, int nrofcubesreversed, int clminendpos, int nrofframes) __attribute__((optimize("-O3")));
UWORD DrawDicesSpecial( UWORD *cubenrreverse, WORD *lettermetadata,WORD *lettermetadatareversed, int nrofvertsletter, int nrofvertsletterreversed, int nrofcubes, int nrofcubesreversed, int clminendpos, int nrofframes) __attribute__((optimize("-O3")));
void DrawSceneMercury1();
void DrawSceneMercury2();
void LoadVectors( WORD *source, BYTE *source2, WORD *target) __attribute__((optimize("-O3")));
int PrepareDisplay();
void PrepareLineBuffer( UBYTE *buffer);
void SetBplPointers();
void Utils_Lz4DepackAsm(UBYTE *src, UBYTE *dst, UWORD size) __attribute__((optimize("-O0")));
void SwapCl();
void CleanUp();
extern UWORD CubeFinished;