me.fier.engine/README.txt

32 lines
1.4 KiB
Plaintext
Raw Normal View History

2023-05-14 12:35:43 +00:00
A software accelerated (CPU-only) game engine for older computers. It uses a layer of abstraction, so different implementations can be ported to it. It primarily uses SDL2. This can also be used to more easily port the engine to different consoles.
2023-05-14 15:26:21 +00:00
>>> FUNCTIONS
>> WINDOW
2023-05-14 15:48:31 +00:00
> 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)
2023-05-14 12:35:43 +00:00
2023-05-14 15:26:21 +00:00
>> TIME
> long long engine_time_get()
2023-05-14 15:48:31 +00:00
> void engine_time_sleep(long long ms)
2023-05-14 12:35:43 +00:00
2023-05-14 15:26:21 +00:00
>> LOGIC
2023-05-14 18:33:44 +00:00
> struct ENGINE_EVENT * engine_event_get()
2023-05-14 12:35:43 +00:00
2023-05-14 15:26:21 +00:00
>> TEXTURES
> struct ENGINE_TEXTURE * engine_texture_create(int width,int height)
2023-05-14 15:48:31 +00:00
> 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)
2023-05-14 15:26:33 +00:00
>>> 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{}