-
Notifications
You must be signed in to change notification settings - Fork 24
/
ui.h
53 lines (41 loc) · 1.82 KB
/
ui.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
/*
* Copyright (c) 2021 MechaResearch
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gsKit.h>
#include <dmaKit.h>
#include <malloc.h>
#include <stdint.h>
#define White GS_SETREG_RGBAQ(0xFF, 0xFF, 0xFF, 0x00, 0x00)
#define Black GS_SETREG_RGBAQ(0x00, 0x00, 0x00, 0x00, 0x00)
#define Red GS_SETREG_RGBAQ(0xFF, 0x00, 0x00, 0x00, 0x00)
#define Green GS_SETREG_RGBAQ(0x00, 0xFF, 0x00, 0x00, 0x00)
#define Blue GS_SETREG_RGBAQ(0x00, 0x00, 0xFF, 0x00, 0x00)
#define BlueTrans GS_SETREG_RGBAQ(0x00, 0x00, 0xFF, 0x40, 0x00)
#define RedTrans GS_SETREG_RGBAQ(0xFF, 0x00, 0x00, 0x60, 0x00)
#define GreenTrans GS_SETREG_RGBAQ(0x00, 0xFF, 0x00, 0x50, 0x00)
#define WhiteTrans GS_SETREG_RGBAQ(0xFF, 0xFF, 0xFF, 0x50, 0x00)
struct GSTEXTURE_holder
{
GSTEXTURE curr;
struct GSTEXTURE_holder *next;
};
extern GSGLOBAL *gsGlobal;
struct GSTEXTURE_holder *drawImage(int x, int y, int width, int height, const u8 *texture);
void getTextSize(int size, const char *text, int *x, int *y);
struct GSTEXTURE_holder *draw_text(int x, int y, int size, u32 color, const char *text);
struct GSTEXTURE_holder *ui_printf(int x, int y, int size, u32 color, const char *format, ...);
void freeGSTEXTURE_holder(struct GSTEXTURE_holder *Textures);
void drawFrame();
void init_ui();