Disable filtering on hud and implemented gbi_floats

This commit is contained in:
KiritoDv
2023-10-05 17:21:00 -06:00
parent d53605c4c7
commit d9d140fd52
6 changed files with 17 additions and 1 deletions
+1
View File
@@ -48,6 +48,7 @@ set(VERSION us)
add_compile_definitions(
VERSION_US=1
F3DEX_GBI_2=1
GBI_FLOATS=1
_LANGUAGE_C
_USE_MATH_DEFINES
CIMGUI_DEFINE_ENUMS_AND_STRUCTS
+2
View File
@@ -1319,6 +1319,7 @@ const Gfx dl_ia_text_end[] = {
#elif defined(VERSION_US)
const Gfx dl_ia_text_begin[] = {
gsDPPipeSync(),
gsSPDisableFiltering(1),
gsSPClearGeometryMode(G_LIGHTING),
gsDPSetCombineMode(G_CC_FADEA, G_CC_FADEA),
gsDPSetEnvColor(255, 255, 255, 255),
@@ -1386,6 +1387,7 @@ const Gfx dl_ia_text_end[] = {
gsSPSetGeometryMode(G_LIGHTING | G_SHADING_SMOOTH),
gsDPSetRenderMode(G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2),
gsDPSetTextureFilter(G_TF_BILERP),
gsSPDisableFiltering(0),
gsSPEndDisplayList(),
};
#endif
+4
View File
@@ -430,6 +430,8 @@ void render_hud(void) {
create_dl_ortho_matrix();
#endif
gSPDisableFiltering(gDisplayListHead++, TRUE);
if (gCurrentArea != NULL && gCurrentArea->camera->mode == CAMERA_MODE_INSIDE_CANNON) {
render_hud_cannon_reticle();
}
@@ -458,5 +460,7 @@ void render_hud(void) {
if (hudDisplayFlags & HUD_DISPLAY_FLAG_TIMER) {
render_hud_timer();
}
gSPDisableFiltering(gDisplayListHead++, FALSE);
}
}
+7
View File
@@ -383,6 +383,7 @@ void print_generic_string(s16 x, s16 y, const u8 *str) {
#ifndef VERSION_EU
create_dl_translation_matrix(MENU_MTX_PUSH, x, y, 0.0f);
gSPDisableFiltering(gDisplayListHead++, TRUE);
#endif
while (str[strPos] != DIALOG_CHAR_TERMINATOR) {
@@ -513,6 +514,7 @@ void print_generic_string(s16 x, s16 y, const u8 *str) {
#ifndef VERSION_EU
gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW);
gSPDisableFiltering(gDisplayListHead++, FALSE);
#endif
}
@@ -541,6 +543,7 @@ void print_hud_lut_string(s8 hudLUT, s16 x, s16 y, const u8 *str) {
u32 curX = x;
u32 curY = y;
gSPDisableFiltering(gDisplayListHead++, TRUE);
u32 xStride; // X separation
if (hudLUT == HUD_LUT_JPMENU) {
@@ -599,6 +602,7 @@ void print_hud_lut_string(s8 hudLUT, s16 x, s16 y, const u8 *str) {
#endif
strPos++;
}
gSPDisableFiltering(gDisplayListHead++, FALSE);
}
#ifdef VERSION_EU
@@ -623,6 +627,7 @@ void print_menu_generic_string(s16 x, s16 y, const u8 *str) {
u32 curX = x;
u32 curY = y;
void **fontLUT = segmented_to_virtual(menu_font_lut);
gSPDisableFiltering(gDisplayListHead++, TRUE);
while (str[strPos] != DIALOG_CHAR_TERMINATOR) {
switch (str[strPos]) {
@@ -676,6 +681,8 @@ void print_menu_generic_string(s16 x, s16 y, const u8 *str) {
}
strPos++;
}
gSPDisableFiltering(gDisplayListHead++, FALSE);
}
void print_credits_string(s16 x, s16 y, const u8 *str) {
+2
View File
@@ -398,6 +398,7 @@ void render_text_labels(void) {
gSPPerspNormalize((Gfx *) (gDisplayListHead++), 0xFFFF);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(mtx), G_MTX_PROJECTION | G_MTX_LOAD | G_MTX_NOPUSH);
gSPDisplayList(gDisplayListHead++, dl_hud_img_begin);
gSPDisableFiltering(gDisplayListHead++, TRUE);
for (i = 0; i < sTextLabelsCount; i++) {
for (j = 0; j < sTextLabels[i]->length; j++) {
@@ -427,6 +428,7 @@ void render_text_labels(void) {
mem_pool_free(gEffectsMemoryPool, sTextLabels[i]);
}
gSPDisableFiltering(gDisplayListHead++, FALSE);
gSPDisplayList(gDisplayListHead++, dl_hud_img_end);
sTextLabelsCount = 0;