Core Native GBA 0.0.7
create your own game-engine with just lua for nitendo game boy advance console.
Loading...
Searching...
No Matches
draw.c File Reference
#include "core_native_gba.h"
Include dependency graph for draw.c:

Functions

void erase_screen ()
 
void draw_color (lua_State *L, union color_u *)
 
void text_font_size (lua_State *L)
 
void draw_queue_push (lua_State *L, uint8_t)
 
void text_queue_push (lua_State *L, uint8_t)
 
void text_queue_clear ()
 
static int native_draw_start (lua_State *L)
 
static int native_draw_flush (lua_State *L)
 
static int native_draw_clear (lua_State *L)
 std.draw.clear
 
static int native_draw_color (lua_State *L)
 std.draw.color
 
static int native_draw_rect (lua_State *L)
 std.draw.rect
 
static int native_draw_line (lua_State *L)
 std.draw.line
 
static int native_draw_font (lua_State *L)
 std.draw.font
 
static int native_draw_text (lua_State *L)
 std.draw.text
 
void native_draw_install (lua_State *L)
 

Variables

union color_u color_tint = {0xFF}
 
union color_u color_erase = {0x0FF0}
 
union color_u color_current = {0x00FF}
 

Function Documentation

◆ draw_color()

void draw_color ( lua_State * L,
union color_u * colorptr )
extern

◆ draw_queue_push()

void draw_queue_push ( lua_State * L,
uint8_t func )
extern

◆ erase_screen()

void erase_screen ( )
extern

◆ native_draw_clear()

static int native_draw_clear ( lua_State * L)
static

std.draw.clear

Parameters
[in]colorint
Warning
Changing the color that is clearing the screen is expensive, it will take 2 to 3 frames, so avoid changing the color constantly.
Here is the call graph for this function:

◆ native_draw_color()

static int native_draw_color ( lua_State * L)
static

std.draw.color

Parameters
[in]colorint
Here is the call graph for this function:

◆ native_draw_flush()

static int native_draw_flush ( lua_State * L)
static

◆ native_draw_font()

static int native_draw_font ( lua_State * L)
static

std.draw.font

Parameters
[in]fontstring
[in]sizedouble
Warning
long texts are currently expensive and impact vertical synchronization, if you happen to experience flickering, change FPS_MODE to 3 or focus on smaller texts and at the bottom of the screen.
Here is the call graph for this function:

◆ native_draw_install()

void native_draw_install ( lua_State * L)
Here is the call graph for this function:

◆ native_draw_line()

static int native_draw_line ( lua_State * L)
static

std.draw.line

Parameters
[in]x1double
[in]y1double
[in]x2double
[in]y2double
Here is the call graph for this function:

◆ native_draw_rect()

static int native_draw_rect ( lua_State * L)
static

std.draw.rect

Parameters
[in]modeint 0 fill, 1 frame
[in]xdouble pos X
[in]ydouble pos Y
[in]wdouble width
[in]hdouble height
Here is the call graph for this function:

◆ native_draw_start()

static int native_draw_start ( lua_State * L)
static
Here is the call graph for this function:

◆ native_draw_text()

static int native_draw_text ( lua_State * L)
static

std.draw.text

Parameters
[in]xdouble
[in]ydouble
[in]textstring
Here is the call graph for this function:

◆ text_font_size()

void text_font_size ( lua_State * L)
extern

◆ text_queue_clear()

void text_queue_clear ( )
extern

◆ text_queue_push()

void text_queue_push ( lua_State * L,
uint8_t func )
extern

Variable Documentation

◆ color_current

union color_u color_current = {0x00FF}

◆ color_erase

union color_u color_erase = {0x0FF0}

◆ color_tint

union color_u color_tint = {0xFF}