-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbasics.h
75 lines (63 loc) · 1.54 KB
/
basics.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
75
/*
* basics.h
*
* Created on: Dec 19, 2020
* Author: NDR008
* Strong based on work of:
* Author: Wituz
* fixed the include crap
*/
#pragma once
#include <sys/types.h>
#include <libgpu.h>
#include <libgs.h>
#define OT_LENGTH 1
#define PACKETMAX 300
#define __ramsize 0x00200000
#define __stacksize 0x00004000
#define TYPE_LINE 0
#define TYPE_BOX 1
#define SCREEN_MODE_PAL 0
#define SCREEN_MODE_NTSC 1
#define DEBUG 1
typedef struct Color {
int r;
int g;
int b;
} Color;
typedef struct Line {
LINE_F2 line;
int type;
} Line;
typedef struct Box {
Line line[4];
int type;
} Box;
typedef struct {
RECT rect;
RECT crect;
GsIMAGE tim_data;
GsSPRITE sprite;
} Image;
Image createImage(unsigned char imageData[]);
Image moveImage(Image image, int x, int y);
void drawImage(Image image);
Image scaleImage(Image img, int xScale, int yScale);
Image rotImage(Image img, int rotation);
Color createColor(int r, int g, int b);
Line createLine(Color color, int x1, int y1, int x2, int y2);
Box createBox(Color color, int x1, int y1, int x2, int y2);
Line moveLine(Line line, int x1, int y1, int x2, int y2);
Box moveBox(Box box, int x1, int y1);
Box transposeBox(Box box, int x1, int y1);
void drawLine(Line line);
void drawBox(Box box);
void drawImage(Image image);
void setScreenMode(int mode);
void setBackgroundColor(Color color);
void initializeScreen();
void initializeDebugFont();
void initializeOrderingTable();
void display();
void clearDisplay();
void clearVRAM();