Remove antialias option and show free memory on HUD

This commit is contained in:
Ryan Dwyer 2022-11-04 17:06:29 +10:00
parent d89fef7ea9
commit 6f1ac34fc4
3 changed files with 8 additions and 31 deletions

View File

@ -87,6 +87,8 @@
#include "lib/lib_06440.h"
#include "lib/lib_317f0.h"
#include "lib/main.h"
#include "lib/mema.h"
#include "lib/memp.h"
#include "lib/mtx.h"
#include "lib/music.h"
#include "lib/rng.h"
@ -951,7 +953,6 @@ void lvFindThreats(void)
}
u8 g_LvShowRates = 0;
u8 g_LvAntialias = 1;
u8 g_LvRateIndex = 59;
u8 g_LvFrameRates[60];
@ -1065,7 +1066,10 @@ Gfx *lvPrintRateText(Gfx *gdl)
}
x = 10;
sprintf(buffer, "Antialias %s\n", g_LvAntialias ? "on" : "off");
sprintf(buffer, "mema free %d KB\n", memaGetLongestFree() / 1024);
gdl = textRender(gdl, &x, &y, buffer, g_CharsHandelGothicXs, g_FontHandelGothicXs, 0x00ff00a0, 0x000000a0, viGetWidth(), viGetHeight(), 0, 0);
sprintf(buffer, "memp free %d KB\n", mempGetStageFree() / 1024);
gdl = textRender(gdl, &x, &y, buffer, g_CharsHandelGothicXs, g_FontHandelGothicXs, 0x00ff00a0, 0x000000a0, viGetWidth(), viGetHeight(), 0, 0);
}
@ -1078,11 +1082,6 @@ Gfx *lvPrint(Gfx *gdl)
g_LvShowRates = 1 - g_LvShowRates;
}
if (joyGetButtonsPressedThisFrame(0, U_JPAD)) {
g_LvAntialias = 1 - g_LvAntialias;
viUpdateMode();
}
lvRecordRate();
if (g_LvShowRates) {

View File

@ -594,8 +594,6 @@ OSScTask *__scTaskReady(OSScTask *t)
return 0;
}
extern u8 g_LvAntialias;
/*
* __scTaskComplete checks to see if the task is complete (all RCP
* operations have been performed) and sends the done message to the
@ -622,7 +620,6 @@ s32 __scTaskComplete(OSSched *sc, OSScTask *t)
|| var8008dd60[1 - var8005ce74]->fldRegs[0].origin != var8008dcc0[1 - var8005ce74].fldRegs[0].origin
|| var8008dd60[1 - var8005ce74]->fldRegs[1].origin != var8008dcc0[1 - var8005ce74].fldRegs[1].origin) {
s32 mask = osSetIntMask(0x80401);
u32 features;
*var8008dd60[1 - var8005ce74] = var8008dcc0[1 - var8005ce74];
@ -633,15 +630,7 @@ s32 __scTaskComplete(OSSched *sc, OSScTask *t)
osViSetXScale(g_ViXScalesBySlot[1 - var8005ce74]);
osViSetYScale(g_ViYScalesBySlot[1 - var8005ce74]);
features = OS_VI_GAMMA_OFF;
if (g_LvAntialias) {
features |= OS_VI_DITHER_FILTER_ON;
} else {
features |= OS_VI_DITHER_FILTER_OFF;
}
osViSetSpecialFeatures(features);
osViSetSpecialFeatures(OS_VI_GAMMA_OFF | OS_VI_DITHER_FILTER_ON);
}
g_SchedViModesPending[1 - var8005ce74] = false;

View File

@ -257,14 +257,11 @@ void viBlack(bool black)
g_ViUnblackTimer = black;
}
extern u8 g_LvAntialias;
void vi00009ed4(void)
{
s32 prevmask;
s32 offset;
s32 reg;
u32 features;
if (g_ViShakeTimer != 0) {
g_ViShakeTimer--;
@ -296,15 +293,7 @@ void vi00009ed4(void)
osViSetXScale(g_ViXScalesBySlot[1 - var8005ce74]);
osViSetYScale(g_ViYScalesBySlot[1 - var8005ce74]);
features = OS_VI_GAMMA_OFF;
if (g_LvAntialias) {
features |= OS_VI_DITHER_FILTER_ON;
} else {
features |= OS_VI_DITHER_FILTER_OFF;
}
osViSetSpecialFeatures(features);
osViSetSpecialFeatures(OS_VI_GAMMA_OFF | OS_VI_DITHER_FILTER_ON);
}
#if MATCHING