Update README.txt

This commit is contained in:
Fierelier 2023-09-04 15:32:38 +02:00
parent 66ff845f81
commit c033bb684f
1 changed files with 3 additions and 30 deletions

View File

@ -3,7 +3,7 @@ A software accelerated (CPU-only) game engine for older computers. It uses a lay
Can be compiled for Linux, OpenBSD and Windows.
> Prerequisites, Debian/Ubuntu:
sudo apt install gcc libsdl2-dev liblua5.3-dev
sudo apt install gcc lua5.3 libsdl2-dev liblua5.3-dev
> Prerequisites, OpenBSD:
* Enable ports: https://www.openbsd.org/faq/ports/ports.html
@ -14,32 +14,5 @@ cd /usr/ports/lang/lua/5.3
doas make
doas make install
>>> FUNCTIONS
>> WINDOW
> void engine_window_init(int width,int height,char * title)
> void engine_window_present()
>> SURFACE
> void engine_surface_color_set(char r,char g,char b,char a)
> void engine_surface_draw_pixel(int x,int y)
>> TIME
> long long engine_time_get()
> void engine_time_sleep(long long ms)
>> LOGIC
> struct ENGINE_EVENT * engine_event_get()
>> TEXTURES
> struct ENGINE_TEXTURE * engine_texture_create(int width,int height)
> void engine_texture_color_set(char r,char g,char b,char a)
> void engine_texture_draw_pixel(struct ENGINE_TEXTURE * texture,int x,int y)
> void engine_texture_destroy(struct ENGINE_TEXTURE * texture)
> void engine_texture_render_2d(struct ENGINE_TEXTURE * texture,int sx,int sy)
> void engine_texture_from_file(struct ENGINE_TEXTURE * texture,char * fpath)
>>> EVENTS
ENGINE_EVENT contains a char denoting the type (ENGINE_EVENT_TYPE_*), and a void * containing the content of the event data, which should be cast to one of the ENGINE_EVENT_* structs:
> ENGINE_EVENT_TYPE_UNKNOWN: ENGINE_EVENT_UNKNOWN{}
> ENGINE_EVENT_TYPE_NONE: ENGINE_EVENT_NONE{}
> ENGINE_EVENT_TYPE_EXIT: ENGINE_EVENT_EXIT{}
>>> FUNCTIONS / VALUES
Semi human-readable files are in src/values/