port: partially unfuck menus

This commit is contained in:
fgsfds committed 2023-08-04 01:11:19 +02:00
1 parent 952d23de08
commit 05889b54cb
4 files changed
+30 -5

No files matched your search

+4 -3
View File
@@ -58,7 +58,7 @@ using namespace std;
#define MAX_BUFFERED 256 #define MAX_BUFFERED 256
// #define MAX_LIGHTS 2 // #define MAX_LIGHTS 2
#define MAX_LIGHTS 32 #define MAX_LIGHTS 32
#define MAX_VERTICES 250 #define MAX_VERTICES 240
#define MAX_VERTEX_COLORS 64 #define MAX_VERTEX_COLORS 64
#define TEXTURE_CACHE_MAX_SIZE 1024 #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); // SUPPORT_CHECK(full_image_line_size_bytes == line_size_bytes);
for (uint32_t i = 0; i < size_bytes; i++) { 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 + 0] = intensity;
tex_upload_buffer[4 * i + 1] = intensity; tex_upload_buffer[4 * i + 1] = intensity;
tex_upload_buffer[4 * i + 2] = 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) { } else if (siz == G_IM_SIZ_32b) {
import_texture_rgba32(tile, importReplacement); import_texture_rgba32(tile, importReplacement);
} else { } 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) { } else if (fmt == G_IM_FMT_IA) {
if (siz == G_IM_SIZ_4b) { if (siz == G_IM_SIZ_4b) {
+20 -1
View File
@@ -266,11 +266,19 @@ void schedEndFrame(OSSched *sc)
} }
inputUpdate(); inputUpdate();
joysHandleRetrace();
joyStartReadData(&g_PiMesgQueue);
joyReadData();
joy00014238();
sndHandleRetrace(); sndHandleRetrace();
schedRenderCrashPeriodically(sc->frameCount); schedRenderCrashPeriodically(sc->frameCount);
videoEndFrame(); videoEndFrame();
if (g_MainIsBooting == 0) {
schedConsiderScreenshot();
}
// check for vid mode changes // check for vid mode changes
__scUpdateViMode(); __scUpdateViMode();
} }
@@ -374,5 +382,16 @@ void schedUpdatePendingArtifacts(void)
void schedConsiderScreenshot(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--;
}
} }
+2
View File
@@ -466,12 +466,14 @@ char *menuResolveText(uintptr_t thing, void *dialogoritem)
return langGet((u32)thing); return langGet((u32)thing);
} }
#ifdef PLATFORM_N64 // unreliable otherwise, the above check should be enough?
if (thing > (uintptr_t)func0f1a78b0) { if (thing > (uintptr_t)func0f1a78b0) {
#if VERSION < VERSION_NTSC_1_0 #if VERSION < VERSION_NTSC_1_0
CRASH(); CRASH();
#endif #endif
return NULL; return NULL;
} }
#endif
// Function pointer // Function pointer
if (handler) { if (handler) {
+4 -1
View File
@@ -124,7 +124,10 @@ Gfx *menugfxRenderBgBlur(Gfx *gdl, u32 colour, s16 arg2, s16 arg3)
s32 height; s32 height;
#endif #endif
if (IS4MB()) { #ifdef PLATFORM_N64 // TODO
if (IS4MB())
#endif
{
return menugfxRenderGradient(gdl, 0, 0, viGetWidth(), viGetHeight(), 0xff, 0xff, 0xff); return menugfxRenderGradient(gdl, 0, 0, viGetWidth(), viGetHeight(), 0xff, 0xff, 0xff);
} }