|
maug
Quick and dirty C mini-augmentation library.
|
Global singleton containing state for the current platform. More...
#include <retroflt.h>

Data Fields | |
| size_t | sz |
| size_t | offset_pal |
| size_t | offset_tex_pal |
| void * | loop_data |
| MERROR_RETVAL | retval |
| uint8_t | retroflat_flags |
| maug_retroflt_flags indicating current system status. | |
| maug_path | config_path |
| maug_path | assets_path |
| maug_path | saves_path |
| int | screen_scale |
| Off-screen buffer bitmap. | |
| struct RETROFLAT_BITMAP * | vdp_buffer |
| A buffer assembled and passed to the RetroFlat VDP API for it to modify, or NULL if no VDP is loaded. | |
| void * | vdp_exe |
| A handle for the loaded RetroFlat VDP API module. | |
| void * | vdp_data |
| Pointer to data defined by the RetroFlat VDP API for its use. | |
| char | vdp_args [RETROFLAT_VDP_ARGS_SZ_MAX] |
| CLI args passed with -vdp to the RetroFlat VDP API. | |
| uint8_t | vdp_flags |
| Flags set by the RetroFlat VDP API. | |
| struct RETROFLAT_VIEWPORT | viewport |
| size_t | screen_v_w |
| The screen width as seen by our program, before scaling. | |
| size_t | screen_v_h |
| The screen height as seen by our program, before scaling. | |
| size_t | screen_w |
| The screen width as seen by the system, after scaling. | |
| size_t | screen_h |
| The screen height as seen by the system, after scaling. | |
| size_t | screen_colors |
| The number of colors the screen is capable of displaying. | |
| retroflat_ms_t | heartbeat_next |
| uint16_t | heartbeat_len |
| Number of ms to stay on current value of RETROFLAT_STATE::heartbeat_frame before incrementing. Modify with retroflat_heartbeat_set(). | |
| uint8_t | heartbeat_frame |
| Simple iteration loop that can be used to time e.g. perpetual sprite animations. Modify parameters with retroflat_heartbeat_set(). | |
| uint8_t | heartbeat_max |
| When RETROFLAT_STATE::heartbeat_frame reaches this value, it will reset to 0. | |
| retroflat_proc_resize_t | on_resize |
| Should be set with retroflat_set_proc_resize(). | |
| void * | on_resize_data |
| retroflat_proc_focus_t | on_focus |
| Should be set with retroflat_set_proc_focus(). | |
| void * | on_focus_data |
| uint8_t | last_focus_flags |
| Used internally to track whether to call on_focus(). | |
| retroflat_proc_quit_t | on_quit |
| Should be set with retroflat_set_proc_focus(). | |
| void * | on_quit_data |
| RETROFLAT_COLOR_DEF | palette [RETROFLAT_COLORS_CT_MAX] |
| Index of available colors, initialized on platform init. | |
| retroflat_loop_iter | loop_iter |
| retroflat_loop_iter | frame_iter |
| struct RETROFLAT_PLATFORM | platform |
| struct RETROFLAT_INPUT_STATE | input |
| retroflat_timer_cb_t | timers_cb [RETROFLAT_TIMER_CT_MAX] |
| List of installable timers that should be tended every frame with retroflat_handle_timers(). | |
| retroflat_ms_t | timers_at [RETROFLAT_TIMER_CT_MAX] |
| void * | timers_data [RETROFLAT_TIMER_CT_MAX] |
| size_t | timers_ct |
| struct RETROFLAT_SOUND_STATE | sound |
Related Symbols | |
(Note that these are not member symbols.) | |
| #define | RETROFLAT_FLAGS_RUNNING 0x01 |
| Flag indicating that retroflat_loop() should continue executing. | |
| #define | RETROFLAT_FLAGS_UNLOCK_FPS 0x02 |
| Flag indicating FPS should not be capped. | |
| #define | RETROFLAT_FLAGS_KEY_REPEAT 0x04 |
| Flag indicating keyboard repeat is enabled. | |
| #define | RETROFLAT_FLAGS_SCREENSAVER 0x08 |
| Flag indicating the current application is running as a screensaver. | |
| #define | RETROFLAT_FLAGS_WAIT_FOR_FPS 0x20 |
| Do not execute any more inter-frame loops until next frame. | |
| #define | RETROFLAT_FLAGS_USE_GXC 0x40 |
| Assume all ::RETROGXC_CACHABLE are cache indexes and not handles. | |
| #define | RETROFLAT_FLAGS_QUIT_REQUESTED 0x80 |
| Window closing has requested an orderly quit. | |
| #define | retroflat_heartbeat_set(len, max) |
| Set parameters for the RETROFLAT_STATE::heartbeat_frame. | |
| #define | retroflat_heartbeat() |
| Get current value of RETROFLAT_STATE::heartbeat_frame. | |
| #define | retroflat_heartbeat_update() |
| Check and update RETROFLAT_STATE::heartbeat_frame. | |
Global singleton containing state for the current platform.
The first few members are size and offset info that the VDP can use to work with STATE structs from different kinds of binaries without crashing.
| size_t RETROFLAT_STATE::screen_v_h |
The screen height as seen by our program, before scaling.
This is the scale of the buffer, which the platform-specific code should then scale to match screen_v_w on blit.
| size_t RETROFLAT_STATE::screen_v_w |
The screen width as seen by our program, before scaling.
This is the scale of the buffer, which the platform-specific code should then scale to match screen_v_h on blit.