blob: 9f1ec036f80429adcb54fd1b5e9096a4e711649d (
plain) (
blame)
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
|
#ifndef GFX_H
#define GFX_H
#include <psxgpu.h>
#include <stdbool.h>
#ifdef __cplusplus
extern "C"
{
#endif
#define SPRITE_INDEX_INVALID (size_t)(0xFFFFFFFF)
#define MAX_SIZE_FOR_GSSPRITE ((short)256)
enum
{
GFX_TPAGE_WIDTH = 64,
GFX_TPAGE_WIDTH_BITSHIFT = __builtin_ctz(GFX_TPAGE_WIDTH)
};
/* *************************************
* Public types definition
* *************************************/
enum
{
X_SCREEN_RESOLUTION = 368,
Y_SCREEN_RESOLUTION = 240
};
/* *************************************
* Public variables declaration
* *************************************/
/* *************************************
* Public functions declaration
* *************************************/
void GfxInit(void);
bool GfxSpriteFromFile(const char* path, GsSprite *spr);
void GfxSortSprite(GsSprite *spr);
bool GfxIsInsideScreenArea(short x, short y, short w, short h);
bool GfxIsSpriteInsideScreenArea(const GsSprite *spr);
void GfxDrawScene(void);
void GfxClear(void);
int GfxToDegrees(int rotate);
int GfxFromDegrees(int degrees);
bool GfxIsBusy(void);
void GfxDrawRectangle(GsRectangle *rect);
void GfxSaveDisplayData(GsSprite *const spr);
/** \} */
#ifdef __cplusplus
}
#endif
#endif /* GFX_H */
|