2023-05-14 19:43:34 +00:00
|
|
|
# MEMORY
|
|
|
|
[engine_malloc]
|
|
|
|
type = "void *"
|
2023-05-15 08:01:08 +00:00
|
|
|
arguments = ["void *","size_t"]
|
|
|
|
argNames = ["ptr", "size"]
|
2023-05-14 19:59:24 +00:00
|
|
|
description = "Allocate memory, equivalent to C's realloc(), with the difference that it quits on failure."
|
2023-05-14 19:43:34 +00:00
|
|
|
|
|
|
|
[engine_free]
|
|
|
|
type = "void"
|
2023-05-15 08:01:08 +00:00
|
|
|
arguments = ["void *"]
|
|
|
|
argNames = ["ptr"]
|
2023-05-14 19:59:24 +00:00
|
|
|
description = "Allocate memory, equivalent to C's free()."
|
2023-05-14 19:43:34 +00:00
|
|
|
|
2023-05-14 18:40:19 +00:00
|
|
|
# WINDOW
|
|
|
|
[engine_window_init]
|
|
|
|
type = "void"
|
2023-05-15 08:01:08 +00:00
|
|
|
arguments = ["int", "int", "char *"]
|
|
|
|
argNames = ["width","height","title"]
|
2023-05-14 19:59:24 +00:00
|
|
|
description = "Creates a window."
|
2023-05-14 18:40:19 +00:00
|
|
|
|
|
|
|
[engine_window_present]
|
|
|
|
type = "void"
|
2023-05-15 08:01:08 +00:00
|
|
|
arguments = []
|
|
|
|
argNames = []
|
2023-05-14 19:59:24 +00:00
|
|
|
description = "Updates the window's surface."
|
2023-05-14 18:40:19 +00:00
|
|
|
|
|
|
|
# SURFACE
|
|
|
|
[engine_surface_color_set]
|
|
|
|
type = "void"
|
2023-05-15 08:01:08 +00:00
|
|
|
arguments = ["char","char","char","char"]
|
|
|
|
argNames = ["r", "g", "b", "a"]
|
2023-05-14 19:59:24 +00:00
|
|
|
description = "Set the color that will be drawn to the window surface."
|
2023-05-14 18:40:19 +00:00
|
|
|
|
|
|
|
[engine_surface_draw_pixel]
|
|
|
|
type = "void"
|
2023-05-15 08:01:08 +00:00
|
|
|
arguments = ["int","int"]
|
|
|
|
argNames = ["x", "y"]
|
2023-05-14 19:59:24 +00:00
|
|
|
description = "Draw a pixel to the window surface."
|
2023-05-14 18:40:19 +00:00
|
|
|
|
|
|
|
# TIME
|
|
|
|
[engine_time_get]
|
|
|
|
type = "long long"
|
2023-05-15 08:01:08 +00:00
|
|
|
arguments = []
|
|
|
|
argNames = []
|
2023-05-14 19:59:24 +00:00
|
|
|
description = "Get the time passed since program start in milliseconds."
|
2023-05-14 18:40:19 +00:00
|
|
|
|
|
|
|
[engine_time_sleep]
|
|
|
|
type = "void"
|
2023-05-15 08:01:08 +00:00
|
|
|
arguments = ["long long"]
|
|
|
|
argNames = ["ms"]
|
2023-05-14 19:59:24 +00:00
|
|
|
description = "Halt the program for some amount of time."
|
2023-05-14 18:40:19 +00:00
|
|
|
|
|
|
|
# LOGIC
|
2023-05-14 19:41:46 +00:00
|
|
|
[engine_event_get]
|
|
|
|
type = "struct ENGINE_EVENT *"
|
2023-05-15 08:01:08 +00:00
|
|
|
arguments = []
|
|
|
|
argNames = []
|
2023-05-14 20:01:04 +00:00
|
|
|
description = "Get an event. If the type is ENGINE_EVENT_TYPE_NONE, there are no more events. Needs to be freed with engine_free()."
|
2023-05-14 18:40:19 +00:00
|
|
|
|
2023-05-15 13:28:58 +00:00
|
|
|
[engine_event_free]
|
|
|
|
type = "void"
|
|
|
|
arguments = ["struct ENGINE_EVENT *"]
|
|
|
|
argNames = ["event"]
|
|
|
|
description = "Free the event instance from memory."
|
|
|
|
|
2023-05-14 18:40:19 +00:00
|
|
|
# TEXTURES
|
|
|
|
[engine_texture_create]
|
|
|
|
type = "struct ENGINE_TEXTURE *"
|
2023-05-15 08:01:08 +00:00
|
|
|
arguments = ["int", "int"]
|
|
|
|
argNames = ["width","height"]
|
2023-05-14 19:59:24 +00:00
|
|
|
description = "Creates a texture. Needs to be freed when no longer needed with engine_texture_destroy()."
|
2023-05-14 18:40:19 +00:00
|
|
|
|
|
|
|
[engine_texture_color_set]
|
|
|
|
type = "void"
|
2023-05-15 08:01:08 +00:00
|
|
|
arguments = ["char","char","char","char"]
|
|
|
|
argNames = ["r", "g", "b", "a"]
|
2023-05-14 19:59:24 +00:00
|
|
|
description = "Set the color that will be drawn to the texture."
|
2023-05-14 18:40:19 +00:00
|
|
|
|
|
|
|
[engine_texture_draw_pixel]
|
|
|
|
type = "void"
|
2023-05-15 08:01:08 +00:00
|
|
|
arguments = ["struct ENGINE_TEXTURE *","int","int"]
|
|
|
|
argNames = ["texture", "x", "y"]
|
2023-05-14 19:59:24 +00:00
|
|
|
description = "Draw a pixel to the texture."
|
2023-05-14 18:40:19 +00:00
|
|
|
|
|
|
|
[engine_texture_destroy]
|
|
|
|
type = "void"
|
2023-05-15 08:01:08 +00:00
|
|
|
arguments = ["struct ENGINE_TEXTURE *"]
|
|
|
|
argNames = ["texture"]
|
2023-05-14 19:59:24 +00:00
|
|
|
description = "Destroy a texture, freeing up memory."
|
2023-05-14 18:40:19 +00:00
|
|
|
|
|
|
|
[engine_texture_render_2d]
|
|
|
|
type = "void"
|
2023-05-15 08:01:08 +00:00
|
|
|
arguments = ["struct ENGINE_TEXTURE *","int","int"]
|
|
|
|
argNames = ["texture", "sx", "sy"]
|
2023-05-14 19:59:24 +00:00
|
|
|
description = "Render texture to the window surface."
|
2023-05-14 18:40:19 +00:00
|
|
|
|
|
|
|
[engine_texture_from_file]
|
|
|
|
type = "void"
|
2023-05-15 08:01:08 +00:00
|
|
|
arguments = ["struct ENGINE_TEXTURE *","char *"]
|
|
|
|
argNames = ["texture", "fpath"]
|
2023-05-14 19:59:24 +00:00
|
|
|
description = "Read a raw RGBA image file into a texture."
|