aboutsummaryrefslogtreecommitdiff
path: root/src/ppusim/work.h
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2023-02-25 16:48:01 +0100
committerlonkaars <loek@pipeframe.xyz>2023-02-25 16:48:01 +0100
commit779ad2408cf97687878f816ddff2b04f22f5172d (patch)
treee9adbec3e7082e22a272e9fac250b00393a06746 /src/ppusim/work.h
parentf7da5b7dde8b9c342c805edd65e66febf705ed48 (diff)
add developer documentation to ppusim/ppu interface
Diffstat (limited to 'src/ppusim/work.h')
-rw-r--r--src/ppusim/work.h9
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*);