refactor, libc made optional
This commit is contained in:
+4
-4
@@ -6,14 +6,14 @@
|
||||
#if COM_DEF_TARGET == COM_DEF_TARGET_WASM
|
||||
uint8_t plr_draw_buffer[640 * 480 * 4];
|
||||
|
||||
__attribute__((export_name("plr_draw_get_pixel_buffer"))) uint8_t *
|
||||
plr_draw_get_pixel_buffer(void) {
|
||||
com_def_export_sym(
|
||||
"plr_draw_get_pixel_buffer") uint8_t *plr_draw_get_pixel_buffer(void) {
|
||||
return plr_draw_buffer;
|
||||
}
|
||||
#endif
|
||||
|
||||
__attribute__((export_name("plr_draw_screen"))) void
|
||||
plr_draw_screen(uint8_t *pixel_buffer) {
|
||||
com_def_export_sym("plr_draw_screen") void plr_draw_screen(
|
||||
uint8_t *pixel_buffer) {
|
||||
for (int y = 0; y < 480; y++) {
|
||||
for (int x = 0; x < 640; x++) {
|
||||
int pixel_index = (y * 640 + x) * 4;
|
||||
|
||||
Reference in New Issue
Block a user