diff options
Diffstat (limited to 'src/ppusim/work.h')
-rw-r--r-- | src/ppusim/work.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ppusim/work.h b/src/ppusim/work.h index c1a5148..6f72357 100644 --- a/src/ppusim/work.h +++ b/src/ppusim/work.h @@ -4,14 +4,21 @@ #include "ppu/consts.h" +/** @brief logical core count, used for multithreading in `hh_ppusim_draw_frame` */ extern unsigned g_hh_ppusim_core_count; +/** @brief thread handles, used for multithreading in `hh_ppusim_draw_frame` */ extern pthread_t* g_hh_ppusim_threads; +/** @brief ppusim color (24-bit RGB) */ typedef uint8_t hh_s_ppusim_color[3]; +/** @brief ppusim screen scanline */ typedef hh_s_ppusim_color hh_s_ppusim_scanline[HH_PPU_SCREEN_WIDTH]; +/** @brief ppusim complete screen buffer */ typedef hh_s_ppusim_scanline hh_s_ppusim_screen[HH_PPU_SCREEN_HEIGHT]; -void* hh_ppusim_draw_thread(void*); +/** @brief draw `core`'s work portion to `hh_s_ppusim_screen` */ +void* hh_ppusim_draw_thread(void* core); +/** @brief spawn threads to draw frame, join threads and draw to `SDL_Renderer` */ void hh_ppusim_draw_frame(SDL_Renderer*); |