diff --git a/port/fast3d/gfx_pc.cpp b/port/fast3d/gfx_pc.cpp index e0e5a65bd..455910b4f 100644 --- a/port/fast3d/gfx_pc.cpp +++ b/port/fast3d/gfx_pc.cpp @@ -58,7 +58,7 @@ using namespace std; #define MAX_BUFFERED 256 // #define MAX_LIGHTS 2 #define MAX_LIGHTS 32 -#define MAX_VERTICES 250 +#define MAX_VERTICES 240 #define MAX_VERTEX_COLORS 64 #define TEXTURE_CACHE_MAX_SIZE 1024 @@ -730,7 +730,7 @@ static void import_texture_i8(int tile, bool importReplacement) { // SUPPORT_CHECK(full_image_line_size_bytes == line_size_bytes); for (uint32_t i = 0; i < size_bytes; i++) { - uint8_t intensity = addr[i]; + const uint8_t intensity = addr[i]; tex_upload_buffer[4 * i + 0] = intensity; tex_upload_buffer[4 * i + 1] = intensity; tex_upload_buffer[4 * i + 2] = intensity; @@ -861,7 +861,8 @@ static void import_texture(int i, int tile, bool importReplacement) { } else if (siz == G_IM_SIZ_32b) { import_texture_rgba32(tile, importReplacement); } else { - abort(); + // abort(); // OTRTODO: Sometimes, seemingly randomly, we end up here. Could be a bad dlist, could be + // something F3D does not have supported. Further investigation is needed. } } else if (fmt == G_IM_FMT_IA) { if (siz == G_IM_SIZ_4b) { diff --git a/port/src/pdsched.c b/port/src/pdsched.c index 7fc696cb4..d8a9e49f9 100644 --- a/port/src/pdsched.c +++ b/port/src/pdsched.c @@ -266,11 +266,19 @@ void schedEndFrame(OSSched *sc) } inputUpdate(); - joysHandleRetrace(); + + joyStartReadData(&g_PiMesgQueue); + joyReadData(); + joy00014238(); + sndHandleRetrace(); schedRenderCrashPeriodically(sc->frameCount); videoEndFrame(); + if (g_MainIsBooting == 0) { + schedConsiderScreenshot(); + } + // check for vid mode changes __scUpdateViMode(); } @@ -374,5 +382,16 @@ void schedUpdatePendingArtifacts(void) void schedConsiderScreenshot(void) { + if (g_MenuData.screenshottimer == 1) { + // TODO + // if (IS8MB()) { + // menugfxCreateBlur(); + // } + g_MenuData.screenshottimer = 0; + } + + if (g_MenuData.screenshottimer >= 2) { + g_MenuData.screenshottimer--; + } } diff --git a/src/game/menu.c b/src/game/menu.c index e01eb8403..b94555c3a 100644 --- a/src/game/menu.c +++ b/src/game/menu.c @@ -466,12 +466,14 @@ char *menuResolveText(uintptr_t thing, void *dialogoritem) return langGet((u32)thing); } +#ifdef PLATFORM_N64 // unreliable otherwise, the above check should be enough? if (thing > (uintptr_t)func0f1a78b0) { #if VERSION < VERSION_NTSC_1_0 CRASH(); #endif return NULL; } +#endif // Function pointer if (handler) { diff --git a/src/game/menugfx.c b/src/game/menugfx.c index a0e4b1bd4..07a261cb8 100644 --- a/src/game/menugfx.c +++ b/src/game/menugfx.c @@ -124,7 +124,10 @@ Gfx *menugfxRenderBgBlur(Gfx *gdl, u32 colour, s16 arg2, s16 arg3) s32 height; #endif - if (IS4MB()) { +#ifdef PLATFORM_N64 // TODO + if (IS4MB()) +#endif + { return menugfxRenderGradient(gdl, 0, 0, viGetWidth(), viGetHeight(), 0xff, 0xff, 0xff); }