Fix minimap karts

This commit is contained in:
MegaMech
2025-01-04 20:30:09 -07:00
parent 4e64c40ef8
commit 528871010a
3 changed files with 48 additions and 6 deletions
+16 -1
View File
@@ -722,7 +722,22 @@ void func_80042330_default(s32 x, s32 y, u16 angle, f32 scale) {
Mat4 matrix;
//printf("panel %d %d %d\n", x, (s32)OTRGetDimensionFromLeftEdge(x), (s32)OTRGetDimensionFromLeftEdge(0));
printf("X %d Y %d\n", x, y);
mtxf_translation_x_y_rotate_z_scale_x_y(matrix, x, y, angle, scale);
// convert_to_fixed_point_matrix(&gGfxPool->mtxHud[gMatrixHudCount], matrix);
// gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxHud[gMatrixHudCount++]),
// G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
AddHudMatrix(matrix, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
}
// Centers in an area of the screen for 3P mode
void func_80042330_3P(s32 x, s32 y, u16 angle, f32 scale) {
Mat4 matrix;
s32 offset = ((OTRGetDimensionFromRightEdge(SCREEN_WIDTH) - SCREEN_WIDTH) / 2);
// + 5 is just an alignment guess.
x += offset + 5;
mtxf_translation_x_y_rotate_z_scale_x_y(matrix, x, y, angle, scale);
// convert_to_fixed_point_matrix(&gGfxPool->mtxHud[gMatrixHudCount], matrix);
// gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxHud[gMatrixHudCount++]),
+1
View File
@@ -71,6 +71,7 @@ void func_80041D34(void);
void set_matrix_hud_screen(void);
void func_80042330(s32, s32, u16, f32);
void func_80042330_default(s32 x, s32 y, u16 angle, f32 scale);
void func_80042330_3P(s32 x, s32 y, u16 angle, f32 scale);
void func_80042330_portrait(s32, s32, u16, f32, s16);
void func_80042330_wide(s32, s32, u16, f32);
void mtxf_set_matrix_transformation(Mat4, Vec3f, Vec3su, f32);
+31 -5
View File
@@ -510,14 +510,43 @@ void func_800462A8(u8* texture, Vtx* arg1, s32 width, s32 arg3, s32 height) {
void func_800463B0(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture, Vtx* arg5, s32 arg6, s32 arg7, UNUSED s32 arg8,
s32 arg9) {
func_80042330(arg0, arg1, arg2, arg3);
switch(gScreenModeSelection) {
case SCREEN_MODE_1P:
case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL:
case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL:
func_80042330(arg0, arg1, arg2, arg3);
break;
case SCREEN_MODE_3P_4P_SPLITSCREEN:
if (gPlayerCount == 3) {
func_80042330_3P(arg0, arg1, arg2, arg3);
} else {
func_80042330_default(arg0, arg1, arg2, arg3);
}
break;
}
gSPDisplayList(gDisplayListHead++, D_0D007928);
func_80045D0C(texture, arg5, arg6, arg7, arg9);
}
void func_80046424(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture, Vtx* arg5, s32 arg6, s32 arg7, UNUSED s32 arg8,
s32 arg9) {
func_80042330(arg0, arg1, arg2, arg3);
switch(gScreenModeSelection) {
case SCREEN_MODE_1P:
case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL:
case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL:
func_80042330(arg0, arg1, arg2, arg3);
break;
case SCREEN_MODE_3P_4P_SPLITSCREEN:
if (gPlayerCount == 3) {
func_80042330_3P(arg0, arg1, arg2, arg3);
} else {
func_80042330_default(arg0, arg1, arg2, arg3);
}
break;
}
gSPDisplayList(gDisplayListHead++, D_0D007968);
func_8004B614(D_801656C0, D_801656D0, D_801656E0, 128, 128, 128, 255);
func_80045D0C(texture, arg5, arg6, arg7, arg9);
@@ -1611,9 +1640,6 @@ void render_texture_rectangle_wide(s32 x, s32 y, s32 width, s32 height, s32 arg4
gSPTextureRectangle(gDisplayListHead++, xl << 2, yl, xh << 2, yh2, G_TX_RENDERTILE, arg4 << 5, (arg5 << 5), 1 << 10,
1 << 10);
break;
case 999:
gSPTextureRectangle(gDisplayListHead++, xl << 2, yl, xh << 2, yh2, G_TX_RENDERTILE, arg4 << 5, (arg5 << 5), 1 << 10,
1 << 10);
break;
}
//OTRGetDimensionFromLeftEdge