API Reference
This page provides a structured overview of the ratr0-engine API.
Core Lifecycle
These functions manage the global state of the engine.
-
Ratr0Engine *ratr0_engine_startup(struct Ratr0MemoryConfig *memory_config, int argc, char **argv)
Startup the engine and all its subsystems.
- Parameters:
memory_config – memory configuration
argc – number of command line arguments
argv – command line arguments
- Returns:
pointer to the initialized engine system
Memory Management
The memory subsystem handles internal pools and chip memory allocations.
-
struct Ratr0MemoryConfig
Pre-allocate memory at the start of the game. This ensures we never explicitly allocate or deallocate memory outside of the engine.
Data Structures
-
struct Ratr0Surface
Information about the current display in this object. We can use this for both playfield hardware setup and blitter setup. In the future we can use this for backbuffer and/or dual playfield information.
Graphics & Display
(Add your other functions here as you develop them)
-
void ratr0_display_init_buffers(UINT16 vp_width, UINT16 vp_height, UINT16 num_playfields, struct Ratr0PlayfieldInfo pf_infos[])
Initializes the display using the information in the init struct. If the information is not equal to the existing one, the current display buffer will be discarded and a new one will be built. This will build a bunch of playfield buffer structures in a batch. num_playfields can be a value from 1 to n
- Parameters:
vp_width – viewport width
vp_height – viewport height
num_playfields – size of the pf_infos array (1..)
pf_infos – array of playfield information
Search Index
Looking for a specific symbol?