18 color_t t = { .pixel2 = luaL_checkinteger(L, 1) };
30 color_t t = { .pixel2 = luaL_checkinteger(L, 1) };
46 uint8_t mode = luaL_checkinteger(L, 1);
47 int32_t posx = luaL_checknumber(L, 2);
48 int32_t posy = luaL_checknumber(L, 3);
49 int32_t width = luaL_checknumber(L, 4);
50 int32_t height = luaL_checknumber(L, 5);
54 draw_queue_push(50, (uint8_t) posx, (uint8_t) posy, (uint8_t) width, (uint8_t) height);
69 int32_t x1 = luaL_checknumber(L, 1);
70 int32_t y1 = luaL_checknumber(L, 2);
71 int32_t x2 = luaL_checknumber(L, 3);
72 int32_t y2 = luaL_checknumber(L, 4);
75 draw_queue_push(51, (uint8_t) x1, (uint8_t) y1, (uint8_t) x2, (uint8_t) y2);
89 uint8_t x = luaL_checknumber(L, 2);
90 uint8_t y = luaL_checknumber(L, 3);
100 lua_rawgeti(L, LUA_REGISTRYINDEX, callback);
101 lua_pcall(L, 0, 0, 0);
107 static const luaL_Reg lib[] = {
117 while(i <
sizeof(lib)/
sizeof(luaL_Reg)) {
118 lua_pushcfunction(L, lib[i].func);
119 lua_setglobal(L, lib[i].name);
124 lua_pushstring(L,
"repeats");
126 lua_pushboolean(L, 1);
128 lua_pushboolean(L, 1);
131 lua_pushstring(L,
"line");
134 lua_setglobal(L,
"native_dict_poly");
void draw_library_install(lua_State *L)
void draw_callback_update(lua_State *L, int callback)
static int native_draw_flush(lua_State *L)
static int native_draw_start(lua_State *L)
static int native_draw_rect(lua_State *L)
static int native_draw_image(lua_State *L)
static int native_draw_color(lua_State *L)
static int native_draw_clear(lua_State *L)
static int native_draw_line(lua_State *L)
void draw_queue_push(uint8_t cmd, uint8_t a, uint8_t b, uint8_t c, uint8_t d)
uint8_t geoclip_rect(int32_t *posx, int32_t *posy, int32_t *width, int32_t *height)
adjusts a rectangle within the screen
uint8_t geoclip_line(int32_t *x1, int32_t *y1, int32_t *x2, int32_t *y2)
adjusts a line within the screen