Removed artifcat, fix cam (#193)

This commit is contained in:
Emerald Lockdown 2022-09-18 20:16:58 -05:00 committed by GitHub
parent f726fb5d74
commit 686d819993
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 18 deletions

View File

@ -124,18 +124,17 @@ extern bool gDjuiInMainMenu;
///This is called at every level initialisation.
void newcam_init(struct Camera *c, u8 dv) {
newcam_tilt = 1500;
newcam_distance_target = newcam_distance_values[dv];
newcam_yaw = -c->yaw+0x4000; //Mario and the camera's yaw have this offset between them.
newcam_mode = NC_MODE_NORMAL;
///This here will dictate what modes the camera will start in at the beginning of a level. Below are some examples.
switch (gCurrLevelNum) {
case LEVEL_BITDW: newcam_yaw = 0x4000; /*newcam_mode = NC_MODE_8D;*/ newcam_tilt = 4000; newcam_distance_target = newcam_distance_values[2]; break;
case LEVEL_BITFS: newcam_yaw = 0x4000; /*newcam_mode = NC_MODE_8D;*/ newcam_tilt = 4000; newcam_distance_target = newcam_distance_values[2]; break;
case LEVEL_BITS: newcam_yaw = 0x4000; /*newcam_mode = NC_MODE_8D;*/ newcam_tilt = 4000; newcam_distance_target = newcam_distance_values[2]; break;
case LEVEL_WF: newcam_yaw = 0x4000; newcam_tilt = 2000; newcam_distance_target = newcam_distance_values[1]; break;
case LEVEL_RR: newcam_yaw = 0x6000; newcam_tilt = 2000; newcam_distance_target = newcam_distance_values[2]; break;
case LEVEL_CCM: if (gCurrAreaIndex == 1) {newcam_yaw = -0x4000; newcam_tilt = 2000; newcam_distance_target = newcam_distance_values[1];} else newcam_mode = NC_MODE_SLIDE; break;
case LEVEL_WDW: newcam_yaw = 0x2000; newcam_tilt = 3000; newcam_distance_target = newcam_distance_values[1]; break;
case LEVEL_BITDW: newcam_yaw = 0x4000; /*newcam_mode = NC_MODE_8D;*/ newcam_tilt = 4000; break;
case LEVEL_BITFS: newcam_yaw = 0x4000; /*newcam_mode = NC_MODE_8D;*/ newcam_tilt = 4000; break;
case LEVEL_BITS: newcam_yaw = 0x4000; /*newcam_mode = NC_MODE_8D;*/ newcam_tilt = 4000; break;
case LEVEL_WF: newcam_yaw = 0x4000; newcam_tilt = 2000; break;
case LEVEL_RR: newcam_yaw = 0x6000; newcam_tilt = 2000; break;
case LEVEL_CCM: if (gCurrAreaIndex == 1) {newcam_yaw = -0x4000; newcam_tilt = 2000; } else newcam_mode = NC_MODE_SLIDE; break;
case LEVEL_WDW: newcam_yaw = 0x2000; newcam_tilt = 3000; break;
case 27: newcam_mode = NC_MODE_SLIDE; break;
case LEVEL_TTM: if (gCurrAreaIndex == 2) newcam_mode = NC_MODE_SLIDE; break;
}

View File

@ -61,7 +61,7 @@ static struct PowerMeterHUD sPowerMeterHUD = {
// when the power meter is hidden.
s32 sPowerMeterVisibleTimer = 0;
static struct UnusedHUDStruct sUnusedHUDValues = { 0x00, 0x0A, 0x00 };
UNUSED static struct UnusedHUDStruct sUnusedHUDValues = { 0x00, 0x0A, 0x00 };
static struct CameraHUD sCameraHUD = { CAM_STATUS_NONE };
@ -309,15 +309,6 @@ void render_hud_mario_lives(void) {
char* displayHead = (gMarioStates[0].character) ? &gMarioStates[0].character->hudHead : ",";
#endif
print_text(GFX_DIMENSIONS_RECT_FROM_LEFT_EDGE(22), HUD_TOP_Y, displayHead); // 'Mario Head' glyph
if (gHudDisplay.lives == -1) {
gSPDisplayList(gDisplayListHead++, dl_ia_text_begin);
u8 a = ((gGlobalTimer % 24) >= 12) ? 200 : 170;
gDPSetEnvColor(gDisplayListHead++, 0, 0, 0, a);
print_generic_ascii_string(100, 10, "no lives remaining");
gSPDisplayList(gDisplayListHead++, dl_ia_text_end);
return;
}
print_text(GFX_DIMENSIONS_RECT_FROM_LEFT_EDGE(38), HUD_TOP_Y, "*"); // 'X' glyph
print_text_fmt_int(GFX_DIMENSIONS_RECT_FROM_LEFT_EDGE(54), HUD_TOP_Y, "%d", gHudDisplay.lives);
}