Core Native GBA 0.0.17
create your own game-engine with just lua for nitendo game boy advance console.
Loading...
Searching...
No Matches
zeebo.h
Go to the documentation of this file.
1#include "lua/lua.h"
2#include "lua/lualib.h"
3#include "lua/lauxlib.h"
4
5#define COLOR_ERASE 0
6#define COLOR_TINT 1
7
8typedef void (*cmd_t)(uint8_t, uint8_t, uint8_t, uint8_t);
9
10typedef union {
11 uint16_t pixel;
12 uint32_t pixel2;
13 uint16_t arr[2];
14 struct {
15 struct {
16 uint16_t r: 5;
17 uint16_t g: 5;
18 uint16_t b: 5;
19 uint16_t a: 1;
20 } color;
21 } c16;
22 struct {
23 struct {
24 uint8_t a;
25 uint8_t b;
26 uint8_t g;
27 uint8_t r;
28 } color;
29 } c32;
30} color_t;
31
32extern uint8_t draw_mode;
33extern color_t draw_color;
34
35void draw_logo();
36
37void draw_cmd_mode(uint8_t, uint8_t, uint8_t, uint8_t);
38void draw_cmd_color(uint8_t, uint8_t, uint8_t, uint8_t);
39void draw_cmd_rect(uint8_t, uint8_t, uint8_t, uint8_t);
40void draw_cmd_line(uint8_t, uint8_t, uint8_t, uint8_t);
41void draw_queue_burn(uint8_t page);
42void draw_queue_page(uint8_t page);
43void draw_queue_push(uint8_t cmd, uint8_t a, uint8_t b, uint8_t c, uint8_t d);
44cmd_t draw_queue_clojure(uint8_t cmd);
45
46uint8_t geoclip_line(int32_t *, int32_t *, int32_t *, int32_t *);
47uint8_t geoclip_rect(int32_t *, int32_t *, int32_t *, int32_t *);
48
49void text_library_install(lua_State* L);
50void draw_library_install(lua_State* L);
51void draw_callback_update(lua_State* L, int);
52void keys_callback_update(lua_State *L, int);
53void loop_callback_update(lua_State* L, int, uint8_t dt);
54
55void runtime(lua_State* L);
void draw_queue_burn(uint8_t page)
Definition draw_queue.c:50
uint8_t draw_mode
Definition draw_color.c:8
void draw_cmd_line(uint8_t, uint8_t, uint8_t, uint8_t)
Definition draw_line.c:3
void draw_cmd_color(uint8_t, uint8_t, uint8_t, uint8_t)
Definition draw_color.c:10
cmd_t draw_queue_clojure(uint8_t cmd)
Definition draw_queue.c:19
void draw_cmd_mode(uint8_t, uint8_t, uint8_t, uint8_t)
Definition draw_color.c:40
void text_library_install(lua_State *L)
Definition text.c:62
void draw_library_install(lua_State *L)
Definition draw.c:104
void draw_queue_page(uint8_t page)
Definition draw_queue.c:36
void draw_cmd_rect(uint8_t, uint8_t, uint8_t, uint8_t)
Definition draw_rect.c:3
void keys_callback_update(lua_State *L, int)
Definition keys.c:31
color_t draw_color
Definition draw_color.c:7
uint8_t geoclip_line(int32_t *, int32_t *, int32_t *, int32_t *)
adjusts a line within the screen
Definition geoclip.c:51
void draw_logo()
Definition draw_logo.c:12
void draw_callback_update(lua_State *L, int)
Definition draw.c:98
void runtime(lua_State *L)
Definition runtime.c:29
uint8_t geoclip_rect(int32_t *, int32_t *, int32_t *, int32_t *)
adjusts a rectangle within the screen
Definition geoclip.c:11
void(* cmd_t)(uint8_t, uint8_t, uint8_t, uint8_t)
Definition zeebo.h:8
void draw_queue_push(uint8_t cmd, uint8_t a, uint8_t b, uint8_t c, uint8_t d)
Definition draw_queue.c:25
uint16_t pixel
Definition zeebo.h:11
uint32_t pixel2
Definition zeebo.h:12
void loop_callback_update(lua_State *L, int, uint8_t dt)
Definition loop.c:3