From 8367d9bc3194879c2cff72a33169a26d6f2cb828 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Sat, 5 Nov 2022 11:40:15 +1000 Subject: [PATCH] Remove cutscene code --- src/game/bondgun.c | 107 ++++++------- src/game/bondmove.c | 4 - src/game/chr.c | 16 +- src/game/dlights.c | 14 +- src/game/hudmsg.c | 242 ++--------------------------- src/game/lv.c | 145 +++-------------- src/game/menu.c | 3 - src/game/menutick.c | 2 +- src/game/music.c | 6 +- src/game/pak.c | 29 +--- src/game/player.c | 333 +--------------------------------------- src/game/playerreset.c | 8 - src/game/propobj.c | 16 +- src/game/sky.c | 2 +- src/include/constants.h | 4 - src/include/data.h | 1 - 16 files changed, 87 insertions(+), 845 deletions(-) diff --git a/src/game/bondgun.c b/src/game/bondgun.c index 937376924..c63ad70c1 100644 --- a/src/game/bondgun.c +++ b/src/game/bondgun.c @@ -5497,24 +5497,17 @@ s32 bgunGetSwitchToWeapon(s32 handnum) void bgunSwitchToPrevious(void) { - if (g_Vars.tickmode != TICKMODE_CUTSCENE) { - struct player *player = g_Vars.currentplayer; - s32 dualweaponnum; + struct player *player = g_Vars.currentplayer; + s32 dualweaponnum; -#if VERSION >= VERSION_NTSC_1_0 - if (invHasSingleWeaponIncAllGuns(player->gunctrl.prevweaponnum)) { - bgunEquipWeapon2(HAND_RIGHT, player->gunctrl.prevweaponnum); - - dualweaponnum = invHasDoubleWeaponIncAllGuns(player->gunctrl.prevweaponnum, player->gunctrl.prevweaponnum) - * player->gunctrl.prevweaponnum * player->gunctrl.unk1583_01; - bgunEquipWeapon2(HAND_LEFT, dualweaponnum); - } else { - bgunAutoSwitchWeapon(); - } -#else + if (invHasSingleWeaponIncAllGuns(player->gunctrl.prevweaponnum)) { bgunEquipWeapon2(HAND_RIGHT, player->gunctrl.prevweaponnum); - bgunEquipWeapon2(HAND_LEFT, player->gunctrl.prevweaponnum * player->gunctrl.unk1583_01); -#endif + + dualweaponnum = invHasDoubleWeaponIncAllGuns(player->gunctrl.prevweaponnum, player->gunctrl.prevweaponnum) + * player->gunctrl.prevweaponnum * player->gunctrl.unk1583_01; + bgunEquipWeapon2(HAND_LEFT, dualweaponnum); + } else { + bgunAutoSwitchWeapon(); } } @@ -5524,25 +5517,23 @@ void bgunCycleForward(void) s32 weaponnum2; struct player *player = g_Vars.currentplayer; - if (g_Vars.tickmode != TICKMODE_CUTSCENE) { - weaponnum1 = bgunGetSwitchToWeapon(HAND_RIGHT); - weaponnum2 = bgunGetSwitchToWeapon(HAND_LEFT); + weaponnum1 = bgunGetSwitchToWeapon(HAND_RIGHT); + weaponnum2 = bgunGetSwitchToWeapon(HAND_LEFT); - if (weaponnum1 > WEAPON_PSYCHOSISGUN || weaponnum2 > WEAPON_PSYCHOSISGUN) { - weaponnum1 = player->gunctrl.prevweaponnum; - weaponnum2 = player->gunctrl.prevweaponnum * player->gunctrl.unk1583_01; - } else { - invChooseCycleForwardWeapon(&weaponnum1, &weaponnum2, false); - } - - if (weaponnum2 != weaponnum1) { - player->gunctrl.dualwielding = false; - } else { - player->gunctrl.dualwielding = true; - } - - bgunEquipWeapon(weaponnum1); + if (weaponnum1 > WEAPON_PSYCHOSISGUN || weaponnum2 > WEAPON_PSYCHOSISGUN) { + weaponnum1 = player->gunctrl.prevweaponnum; + weaponnum2 = player->gunctrl.prevweaponnum * player->gunctrl.unk1583_01; + } else { + invChooseCycleForwardWeapon(&weaponnum1, &weaponnum2, false); } + + if (weaponnum2 != weaponnum1) { + player->gunctrl.dualwielding = false; + } else { + player->gunctrl.dualwielding = true; + } + + bgunEquipWeapon(weaponnum1); } void bgunCycleBack(void) @@ -5551,29 +5542,27 @@ void bgunCycleBack(void) s32 weaponnum2; struct player *player = g_Vars.currentplayer; - if (g_Vars.tickmode != TICKMODE_CUTSCENE) { - weaponnum1 = bgunGetSwitchToWeapon(HAND_RIGHT); - weaponnum2 = bgunGetSwitchToWeapon(HAND_LEFT); + weaponnum1 = bgunGetSwitchToWeapon(HAND_RIGHT); + weaponnum2 = bgunGetSwitchToWeapon(HAND_LEFT); - if (weaponnum2 == WEAPON_REMOTEMINE) { - weaponnum2 = WEAPON_NONE; - } - - if (weaponnum1 > WEAPON_PSYCHOSISGUN || weaponnum2 > WEAPON_PSYCHOSISGUN) { - weaponnum1 = player->gunctrl.prevweaponnum; - weaponnum2 = player->gunctrl.prevweaponnum * player->gunctrl.unk1583_01; - } else { - invChooseCycleBackWeapon(&weaponnum1, &weaponnum2, false); - } - - if (weaponnum2 == WEAPON_NONE) { - player->gunctrl.dualwielding = false; - } else { - player->gunctrl.dualwielding = true; - } - - bgunEquipWeapon(weaponnum1); + if (weaponnum2 == WEAPON_REMOTEMINE) { + weaponnum2 = WEAPON_NONE; } + + if (weaponnum1 > WEAPON_PSYCHOSISGUN || weaponnum2 > WEAPON_PSYCHOSISGUN) { + weaponnum1 = player->gunctrl.prevweaponnum; + weaponnum2 = player->gunctrl.prevweaponnum * player->gunctrl.unk1583_01; + } else { + invChooseCycleBackWeapon(&weaponnum1, &weaponnum2, false); + } + + if (weaponnum2 == WEAPON_NONE) { + player->gunctrl.dualwielding = false; + } else { + player->gunctrl.dualwielding = true; + } + + bgunEquipWeapon(weaponnum1); } /** @@ -5706,10 +5695,6 @@ void bgunAutoSwitchWeapon(void) s32 curweaponnum = g_Vars.currentplayer->gunctrl.weaponnum; bool wantammo = false; - if (g_Vars.tickmode == TICKMODE_CUTSCENE) { - return; - } - // Loop through g_AutoSwitchWeaponsPrimary, checking which weapons the // player has which are usable. Stop when both a usable weapon is found // and when the player's current weapon is found. Note the first and last @@ -11620,12 +11605,6 @@ void bgunTickGameplay(bool triggeron) } } - if (g_Vars.tickmode == TICKMODE_CUTSCENE) { - triggeron = false; - g_Vars.currentplayer->hands[HAND_LEFT].firing = false; - g_Vars.currentplayer->hands[HAND_RIGHT].firing = false; - } - player->playertriggerprev = player->playertriggeron; player->playertriggeron = triggeron; diff --git a/src/game/bondmove.c b/src/game/bondmove.c index c0318f298..6c14feb4c 100644 --- a/src/game/bondmove.c +++ b/src/game/bondmove.c @@ -1684,10 +1684,6 @@ void bmoveProcessInput(bool allowc1x, bool allowc1y, bool allowc1buttons, bool i cancycleweapons = true; - if (g_Vars.tickmode == TICKMODE_CUTSCENE) { - cancycleweapons = false; - } - if (g_Vars.lvframenum < 10) { cancycleweapons = false; } diff --git a/src/game/chr.c b/src/game/chr.c index d2c3c85a9..368b5d1fb 100644 --- a/src/game/chr.c +++ b/src/game/chr.c @@ -1648,7 +1648,6 @@ void chrHandleJointPositioned(s32 joint, Mtxf *mtx) // Apply head bobbing when dizzy if (g_CurModelChr->blurdrugamount > TICKS(1000) - && g_Vars.tickmode != TICKMODE_CUTSCENE && g_CurModelChr->actiontype != ACT_DEAD && g_CurModelChr->actiontype != ACT_DIE) { zrot = g_CurModelChr->drugheadsway / 360.0f * M_BADTAU; @@ -1818,19 +1817,6 @@ void chr0f0220ec(struct chrdata *chr, s32 arg1, s32 arg2) { struct model *model = chr->model; - if (g_Vars.tickmode == TICKMODE_CUTSCENE) { - if (chr->prop->type == PROPTYPE_PLAYER) { - chr->hidden &= ~CHRHFLAG_00000800; - } - - if (model->anim - && (g_Anims[model->anim->animnum].flags & ANIMFLAG_02) - && arg1 > 0 - && g_Vars.cutsceneskip60ths > 0) { - arg1 += g_Vars.cutsceneskip60ths * 4; - } - } - if (chr->chrflags & CHRCFLAG_20000000) { chr->chrflags &= ~CHRCFLAG_20000000; } else if (arg2) { @@ -2517,7 +2503,7 @@ s32 chrTick(struct prop *prop) g_ModelJointPositionedFunc = &chrHandleJointPositioned; g_CurModelChr = chr; - if (CHRRACE(chr) == RACE_DRCAROLL && g_Vars.tickmode != TICKMODE_CUTSCENE) { + if (CHRRACE(chr) == RACE_DRCAROLL) { angle = chrGetInverseTheta(chr); sp190.x = sinf(angle) * 19; diff --git a/src/game/dlights.c b/src/game/dlights.c index 6d5c9fcae..aa5475747 100644 --- a/src/game/dlights.c +++ b/src/game/dlights.c @@ -1771,9 +1771,7 @@ void func0f0035c0(void) void func0f00372c(void) { if (g_Vars.tickmode != var80061458) { - if (TICKMODE_CUTSCENE == g_Vars.tickmode && TICKMODE_CUTSCENE != var80061458) { - func0f003444(); - } else if (TICKMODE_NORMAL == g_Vars.tickmode && TICKMODE_NORMAL != var80061458) { + if (TICKMODE_NORMAL == g_Vars.tickmode && TICKMODE_NORMAL != var80061458) { func0f0035c0(); } @@ -1800,16 +1798,6 @@ void func0f0037ac(void) f32 average; u32 stack; - static s32 prevtickmode = 0; - - if (prevtickmode != g_Vars.tickmode) { - if (prevtickmode == TICKMODE_CUTSCENE && g_Vars.tickmode == TICKMODE_NORMAL) { - g_IsSwitchingGoggles = 2; - } - - prevtickmode = g_Vars.tickmode; - } - if (var80061420 == NULL) { return; } diff --git a/src/game/hudmsg.c b/src/game/hudmsg.c index 5fce9fc90..41845bba1 100644 --- a/src/game/hudmsg.c +++ b/src/game/hudmsg.c @@ -344,9 +344,7 @@ s32 hudmsg0f0ddb1c(s32 *arg0, s32 arg1) *arg0 = 24; - if (PLAYERCOUNT() == 2 - && optionsGetScreenSplit() == SCREENSPLIT_VERTICAL - && (!g_InCutscene || g_MainIsEndscreen)) { + if (PLAYERCOUNT() == 2 && optionsGetScreenSplit() == SCREENSPLIT_VERTICAL) { result -= *arg0 * 2 / 3; if (g_Vars.currentplayernum == 0) { @@ -358,7 +356,7 @@ s32 hudmsg0f0ddb1c(s32 *arg0, s32 arg1) result = result + viewwidth - *arg0 - arg1 - 11; - if (PLAYERCOUNT() == 1 || (PLAYERCOUNT() == 2 && g_InCutscene && !g_MainIsEndscreen)) { + if (PLAYERCOUNT() == 1) { result -= 16; #if VERSION < VERSION_JPN_FINAL @@ -715,13 +713,7 @@ void hudmsgCreateAsSubtitle(char *srctext, s32 type, u8 colourindex, s32 audioch audioduration60 = propsndGetDuration60(audiochannelnum); if (type == HUDMSGTYPE_INGAMESUBTITLE) { - if (g_Vars.tickmode == TICKMODE_CUTSCENE) { - if (!optionsGetCutsceneSubtitles()) { - return; - } - - type = HUDMSGTYPE_CUTSCENESUBTITLE; - } else if (!optionsGetInGameSubtitles()) { + if (!optionsGetInGameSubtitles()) { return; } } @@ -729,200 +721,9 @@ void hudmsgCreateAsSubtitle(char *srctext, s32 type, u8 colourindex, s32 audioch config = &g_HudmsgTypes[type]; config->colour = g_HudmsgColours[colourindex]; - if (g_Vars.tickmode == TICKMODE_CUTSCENE && audioduration60 >= 0) { - char puncchars[] = { '.', ';', '!', '?', ',' }; - u16 srclen; - s32 sp4a8; - s32 wrapwidth; - char accum[250]; - char prewrap[250]; - char postwrap[250]; - char msg[250]; - s32 msglen; - bool split; - s32 accumlen; - s32 linecount; - f32 time60perchar; - s32 i; - s32 j; - bool append; - bool foundpunctuation; - - srclen = strlen(srctext); - wrapwidth = hudmsg0f0ddb1c(&sp4a8, config->unk16); - - accumlen = 0; - i = 0; - time60perchar = (f32)audioduration60 / srclen; - - // These two loops both work with the i iterator. - // The inner loop increments i and is looking for places to split the - // text, while the outer loop iterates once per split until the srctext - // has been completely scanned. - while (srctext[i] != '\0') { - msglen = 0; - foundpunctuation = false; - split = false; - - while (srctext[i] != '\0' && (!foundpunctuation || !split || i > srclen - 10)) { - // Check if the current char is punctuation - for (j = 0; j < ARRAYCOUNT(puncchars); j++) { - if (puncchars[j] == srctext[i]) { - foundpunctuation = true; - } - } - - // Avoid splitting in the middle of trailing dots, - // and also avoid splitting after "Dr." or "Mr." - if (foundpunctuation && srctext[i] == '.') { - if (srctext[i + 1] == '.') { - foundpunctuation = false; - } - - if (i >= 2) { - if ((srctext[i - 2] == 'D' || srctext[i - 2] == 'd') - && (srctext[i - 1] == 'r' || srctext[i - 1] == 'R')) { - foundpunctuation = false; - } - - if ((srctext[i - 2] == 'M' || srctext[i - 2] == 'm') - && (srctext[i - 1] == 'r' || srctext[i - 1] == 'R')) { - foundpunctuation = false; - } - } - } - - // Copy the character from srctext to msg, except: - // - if it's a space at the start of the string - // - if it's a consecutive space - // - if it's a line break (sometimes copy a space instead) - if (msglen < 249) { - bool ignore = false; - - if (srctext[i] == ' ') { - if (msglen == 0) { - ignore = true; - } else if (msg[msglen - 1] == ' ') { - ignore = true; - } - } - - if (srctext[i] == '\n') { - ignore = true; - - if (msglen != 0 && msg[msglen - 1] != ' ' && srctext[i + 1] != ' ') { - msg[msglen] = ' '; - msglen++; - } - } - - if (foundpunctuation && srctext[i] == ' ') { - split = true; - } - - if (!ignore) { - msg[msglen] = srctext[i]; - msglen++; - } - } - - if (1); - - i++; - } // end of inner loop - - // At this point the string in msg is a single sentence, - // free of line breaks. It still needs to be wrapped. - - // Make sure msg ends in a space - if (msglen > 0 && msg[msglen - 1] != ' ') { - msg[msglen] = ' '; - msglen++; - } - - // Rebuild prewrap by concatenating the accumulator and msg. - // prewrap will be everything that's been read so far and has yet to - // be queued. - for (j = 0; j < accumlen; j++) { - prewrap[j] = accum[j]; - } - - for (j = 0; j < msglen; j++) { - prewrap[j + accumlen] = msg[j]; - } - - prewrap[accumlen + msglen] = '\n'; - prewrap[accumlen + msglen + 1] = '\0'; - - // Apply text wrapping to prewrap - textWrap(wrapwidth, prewrap, postwrap, g_CharsHandelGothicSm, g_FontHandelGothicSm); - - // Next, count the number of lines in the wrapped message. - // If it's more than two, send the accumulator out as a hudmsg and - // then put msg in the accumulator. Otherwise, just append msg to - // the accumulator. - - // Note that these strings always end in a line break, so counting - // the line breaks is the same as counting visual lines - linecount = 0; - - for (j = 0; postwrap[j] != '\0'; j++) { - if (postwrap[j] == '\n') { - linecount++; - } - } - - append = true; - - if (linecount >= 3) { - if (accumlen == 0) { - // Nothing is in the accumulator, so just queue the message - msg[msglen] = '\n'; - msglen++; - - msg[msglen] = '\0'; - - hudmsgCreateWithDuration(msg, type, config, msglen * time60perchar); - append = false; - } else { - // Queue the accumulator and then clear it. - // The current message will be copied into the accumulator - // for the next iteration. - accum[accumlen] = '\n'; - accumlen++; - - accum[accumlen] = '\0'; - - hudmsgCreateWithDuration(accum, type, config, accumlen * time60perchar); - accumlen = 0; - } - } - - if (append) { - for (j = 0; j < msglen; j++) { - accum[accumlen + j] = msg[j]; - } - - accumlen += msglen; - } - - msg[msglen] = '\0'; - } // end of outer loop - - // If there's anything remaining in the accumulator, queue it - if (accumlen != 0) { - accum[accumlen] = '\n'; - accumlen++; - - accum[accumlen] = '\0'; - - hudmsgCreateWithDuration(accum, type, config, accumlen * time60perchar); - } - } else { - hudmsgCreateFromArgs(srctext, type, config->unk00, config->unk01, config->unk02, - config->unk04, config->unk08, config->colour, config->unk10, config->alignh, - config->unk16, config->alignv, config->unk18, audiochannelnum, 0); - } + hudmsgCreateFromArgs(srctext, type, config->unk00, config->unk01, config->unk02, + config->unk04, config->unk08, config->colour, config->unk10, config->alignh, + config->unk16, config->alignv, config->unk18, audiochannelnum, 0); } #endif @@ -965,15 +766,10 @@ void hudmsgCalculatePosition(struct hudmessage *msg) } if (PLAYERCOUNT() == 2 && (optionsGetScreenSplit() == SCREENSPLIT_VERTICAL || IS4MB())) { -#if VERSION >= VERSION_PAL_FINAL - if (!g_InCutscene || g_MainIsEndscreen) -#endif - { - viewwidth -= offset; + viewwidth -= offset; - if (g_Vars.currentplayernum == 0) { - viewleft += offset; - } + if (g_Vars.currentplayernum == 0) { + viewleft += offset; } } #endif @@ -983,13 +779,11 @@ void hudmsgCalculatePosition(struct hudmessage *msg) x = msg->xmargin; break; case HUDMSGALIGN_LEFT: - v0 = (g_InCutscene && !g_MainIsEndscreen) ? 24 : msg->xmarginextra; + v0 = msg->xmarginextra; x = viewleft + v0 + msg->xmargin + 3; - if (PLAYERCOUNT() == 2 - && (optionsGetScreenSplit() == SCREENSPLIT_VERTICAL || IS4MB()) - && (!g_InCutscene || g_MainIsEndscreen)) { + if (PLAYERCOUNT() == 2 && (optionsGetScreenSplit() == SCREENSPLIT_VERTICAL || IS4MB())) { if (IS4MB()) { if (msg->playernum == 0) { x--; @@ -1032,7 +826,7 @@ void hudmsgCalculatePosition(struct hudmessage *msg) case HUDMSGALIGN_BOTTOM: y = viewtop + viewheight - msg->height - msg->ymargin - 14; - if (PLAYERCOUNT() == 2 && (g_InCutscene == 0 || g_MainIsEndscreen)) { + if (PLAYERCOUNT() == 2) { if (IS4MB() || (optionsGetScreenSplit() != SCREENSPLIT_VERTICAL && msg->playernum == 0)) { y += 8; } else { @@ -1248,16 +1042,6 @@ void hudmsgsTick(void) for (k = 0; k < g_NumHudMessages; k++) { if (g_HudMessages[k].state != HUDMSGSTATE_FREE) { - if (g_Vars.tickmode == TICKMODE_CUTSCENE) { - for (j = 0; j < g_NumHudMessages; j++) { - if (k != j - && g_HudMessages[j].state != HUDMSGSTATE_FREE - && g_HudMessages[j].hash == g_HudMessages[k].hash) { - g_HudMessages[j].state = HUDMSGSTATE_FREE; - } - } - } - setCurrentPlayerNum(g_HudMessages[k].playernum); hudmsgCalculatePosition(&g_HudMessages[k]); } @@ -1289,7 +1073,7 @@ void hudmsgsTick(void) msg->opacity = 0xff; } - if (msg->type == HUDMSGTYPE_CUTSCENESUBTITLE && g_Vars.tickmode != TICKMODE_CUTSCENE) { + if (msg->type == HUDMSGTYPE_CUTSCENESUBTITLE) { msg->state = HUDMSGSTATE_FREE; msg->timer = 0; } diff --git a/src/game/lv.c b/src/game/lv.c index 31cdae910..883dd56e3 100644 --- a/src/game/lv.c +++ b/src/game/lv.c @@ -1134,29 +1134,27 @@ Gfx *lvRender(Gfx *gdl) } // Calculate bluramount - this will be used later - if (g_Vars.tickmode != TICKMODE_CUTSCENE) { - player = g_Vars.currentplayer; - chr = player->prop->chr; + player = g_Vars.currentplayer; + chr = player->prop->chr; - if (chr->blurdrugamount > 0 - && !g_Vars.currentplayer->invincible - && !g_Vars.currentplayer->training) { - bluramount = (chr->blurdrugamount * 130) / TICKS(5000) + 100; + if (chr->blurdrugamount > 0 + && !g_Vars.currentplayer->invincible + && !g_Vars.currentplayer->training) { + bluramount = (chr->blurdrugamount * 130) / TICKS(5000) + 100; - if (bluramount > 230) { - bluramount = 230; - } + if (bluramount > 230) { + bluramount = 230; + } - if (chr->blurdrugamount > TICKS(5000)) { - chr->blurdrugamount = TICKS(5000); - } + if (chr->blurdrugamount > TICKS(5000)) { + chr->blurdrugamount = TICKS(5000); + } - chr->blurdrugamount -= g_Vars.lvupdate60 * (chr->blurnumtimesdied + 1); + chr->blurdrugamount -= g_Vars.lvupdate60 * (chr->blurnumtimesdied + 1); - if (chr->blurdrugamount < 1) { - chr->blurdrugamount = 0; - chr->blurnumtimesdied = 0; - } + if (chr->blurdrugamount < 1) { + chr->blurdrugamount = 0; + chr->blurnumtimesdied = 0; } } @@ -1175,16 +1173,7 @@ Gfx *lvRender(Gfx *gdl) gdl = vi0000b1d0(gdl); gdl = currentPlayerScissorToViewport(gdl); - if ((g_Vars.stagenum != STAGE_CITRAINING || (var80087260 <= 0 && g_MenuData.root != MENUROOT_MPSETUP)) - && g_Vars.lvframenum <= 5 - && !g_Vars.normmplayerisrunning - && g_Vars.tickmode != TICKMODE_CUTSCENE) { - if (var80084050 < 6) { - g_Vars.lockscreen = 1; - } - - var80084050++; - } else if (g_Vars.currentplayer->gunctrl.unk1583_06 + if (g_Vars.currentplayer->gunctrl.unk1583_06 && g_Vars.currentplayer->cameramode != CAMERAMODE_THIRDPERSON && var8009dfc0 == 0) { g_Vars.currentplayer->gunctrl.unk1583_06 = bgun0f09eae4(); @@ -1285,67 +1274,10 @@ Gfx *lvRender(Gfx *gdl) gdl = playerRenderHud(gdl); { - static struct sndstate *g_CutsceneStaticAudioHandle = NULL; - static s32 g_CutsceneStaticTimer = 100; - static u8 g_CutsceneStaticActive = false; - bool cutscenehasstatic = false; u32 alpha; - if (g_Vars.tickmode == TICKMODE_CUTSCENE) { - // Handle visual effects in cutscenes - switch (g_CutsceneAnimNum) { - case ANIM_CUT_LUE_INTRO_CAM_01: - case ANIM_CUT_LUE_INTRO_CAM_02: - case ANIM_CUT_LUE_INTRO_CAM_03: - { - // Show static randomly in Infiltration intro - s32 cutscenestatic = 0; - cutscenehasstatic = true; - - if (g_CutsceneStaticAudioHandle == NULL) { - sndStart(var80095200, SFX_INFIL_STATIC_LONG, &g_CutsceneStaticAudioHandle, -1, -1, -1, -1, -1); - } - - g_CutsceneStaticTimer -= g_Vars.diffframe60; - - if (g_CutsceneStaticTimer < 0) { - g_CutsceneStaticTimer = random() % TICKS(200) + TICKS(40); - g_CutsceneStaticActive = false; - } - - gdl = bviewDrawFilmInterlace(gdl, 0xffffffff, 0xffffffff); - - if (g_CutsceneStaticTimer < TICKS(15)) { - if (g_CutsceneStaticActive == false) { - g_CutsceneStaticActive = true; - sndStart(var80095200, SFX_INFIL_STATIC_MEDIUM, NULL, -1, -1, -1, -1, -1); - } - - cutscenestatic = 225 - g_CutsceneStaticTimer * PALUP(10); - } - - // Consider a single frame of static, separate - // to the main static above - if (random() % 60 == 1) { - cutscenestatic = 255; - sndStart(var80095200, SFX_INFIL_STATIC_SHORT, NULL, -1, -1, -1, -1, -1); - } - - if (cutscenestatic) { - gdl = bviewDrawStatic(gdl, 0xffffffff, cutscenestatic); - } - } - break; - } - } - - if (g_CutsceneStaticAudioHandle && !cutscenehasstatic) { - audioStop(g_CutsceneStaticAudioHandle); - } - // Slayer rocket shows static when flying out of bounds - if (g_Vars.currentplayer->visionmode == VISIONMODE_SLAYERROCKET - && g_Vars.tickmode != TICKMODE_CUTSCENE) { + if (g_Vars.currentplayer->visionmode == VISIONMODE_SLAYERROCKET) { gdl = bviewDrawSlayerRocketInterlace(gdl, 0xffffffff, 0xffffffff); if (g_Vars.currentplayer->badrockettime > 0) { @@ -1366,8 +1298,7 @@ Gfx *lvRender(Gfx *gdl) } #endif - if (g_Vars.currentplayer->visionmode == VISIONMODE_XRAY - && g_Vars.tickmode != TICKMODE_CUTSCENE) { + if (g_Vars.currentplayer->visionmode == VISIONMODE_XRAY) { s32 xraything = 99; if (g_Vars.currentplayer->erasertime < TICKS(200)) { @@ -1431,31 +1362,6 @@ Gfx *lvRender(Gfx *gdl) gdl = bviewDrawMotionBlur(gdl, 0xffffffff, bluramount); } - // Handle blur effect in cutscenes (Extraction intro?) - if (g_Vars.tickmode == TICKMODE_CUTSCENE) { - f32 cutsceneblurfrac = playerGetCutsceneBlurFrac(); - - if (cutsceneblurfrac > 0) { -#if VERSION < VERSION_PAL_BETA - u32 stack; -#endif - gdl = bviewDrawMotionBlur(gdl, 0xffffff00, cutsceneblurfrac * 255); - } - } - -#if VERSION >= VERSION_PAL_FINAL - if (bluramount); - if (bluramount); - if (bluramount); -#elif VERSION >= VERSION_NTSC_1_0 - if (bluramount); - if (bluramount); -#else - if (bluramount); - if (bluramount); - if (bluramount); -#endif - // Render white when teleporting if (g_Vars.currentplayer->teleportstate > TELEPORTSTATE_INACTIVE) { alpha = 0; @@ -1550,8 +1456,6 @@ Gfx *lvRender(Gfx *gdl) const char var7f1b7730[] = "fr: %d\n"; -u32 g_CutsceneTime240_60 = 0; - #if VERSION >= VERSION_NTSC_1_0 u32 var800840a8 = 0; u32 var800840ac = 0; @@ -1608,16 +1512,6 @@ s32 sub54321(s32 value) } #endif -void lvUpdateCutsceneTime(void) -{ - if (g_Vars.in_cutscene) { - g_CutsceneTime240_60 += g_Vars.lvupdate60; - return; - } - - g_CutsceneTime240_60 = 0; -} - s32 lvGetSlowMotionType(void) { #if PIRACYCHECKS @@ -1925,7 +1819,6 @@ void lvTick(void) langTick(); pakExecuteDebugOperations(); } else { - lvUpdateCutsceneTime(); vtxstoreTick(); lvUpdateSoloHandicaps(); roomsTick(); diff --git a/src/game/menu.c b/src/game/menu.c index 660ab860e..e01eef9c1 100644 --- a/src/game/menu.c +++ b/src/game/menu.c @@ -7157,9 +7157,6 @@ void menuProcessInput(void) } break; case MENUROOT_MPPAUSE: - if (g_InCutscene) { - func0f0f8120(); - } g_Menus[g_MpPlayerNum].openinhibit = 10; // fall-through case MENUROOT_ENDSCREEN: diff --git a/src/game/menutick.c b/src/game/menutick.c index b9b249b07..253037035 100644 --- a/src/game/menutick.c +++ b/src/game/menutick.c @@ -262,7 +262,7 @@ void menuTick(void) if (g_FileState == FILESTATE_UNSELECTED && g_Vars.stagenum == STAGE_CITRAINING) { g_PlayersWithControl[0] = false; - if (g_Vars.lvframenum > 30 && g_Vars.tickmode != TICKMODE_CUTSCENE) { + if (g_Vars.lvframenum > 30) { g_Menus[0].openinhibit = 0; g_Menus[1].openinhibit = 0; g_Menus[2].openinhibit = 0; diff --git a/src/game/music.c b/src/game/music.c index 4446f16fc..819e665cc 100644 --- a/src/game/music.c +++ b/src/game/music.c @@ -293,7 +293,7 @@ void musicStartAmbient(f32 arg0) if (g_TemporaryAmbientTrack != -1) { pass = true; } else if (musicIsAnyPlayerInAmbientRoom()) { - if (g_Vars.tickmode != TICKMODE_CUTSCENE && AMBIENTTRACK() != stageGetAmbientTrack(g_MusicStageNum)) { + if (AMBIENTTRACK() != stageGetAmbientTrack(g_MusicStageNum)) { musicQueueStopEvent(TRACKTYPE_AMBIENT); musicStartTemporaryAmbient(stageGetAmbientTrack(g_MusicStageNum)); return; @@ -420,10 +420,6 @@ bool musicIsAnyPlayerInAmbientRoom(void) { s32 i; - if (g_Vars.tickmode == TICKMODE_CUTSCENE) { - return false; - } - if (lvIsPaused()) { return false; } diff --git a/src/game/pak.c b/src/game/pak.c index 055fe5f60..7380db640 100644 --- a/src/game/pak.c +++ b/src/game/pak.c @@ -4819,8 +4819,7 @@ const char var7f1ae9ccnb[] = "Pak -> osGbpakReadId - Failed"; void pak0f11ca30(void) { -#if VERSION >= VERSION_NTSC_1_0 - if (g_Vars.tickmode != TICKMODE_CUTSCENE || g_MenuData.count > 0) { + if (g_MenuData.count > 0) { u8 oldvalue = var80075d10; u8 newvalue = var80075d10; u8 thing = 0xff; @@ -4849,32 +4848,6 @@ void pak0f11ca30(void) var80075d10 = newvalue; } } -#else - if (g_Vars.tickmode != TICKMODE_CUTSCENE) { - u32 thing = joy00013980(); - u8 oldvalue = var80075d10; - u8 newvalue = var80075d10; - s32 i; - - for (i = 0; i < 5; i++) { - u32 thisbit = 1 << i; - - if ((g_Vars.paksconnected2 | g_Vars.paksconnected) & thisbit) { - if ((thing & thisbit) != (oldvalue & thisbit)) { - if (thing & thisbit) { - g_Paks[i].unk010 = PAK010_02; - newvalue |= thisbit; - } else { - g_Paks[i].unk010 = PAK010_01; - newvalue &= ~thisbit; - } - } - } - } - - var80075d10 = newvalue; - } -#endif } void gbpakHandleError(u32 err) diff --git a/src/game/player.c b/src/game/player.c index 56baa139e..73dd43a30 100644 --- a/src/game/player.c +++ b/src/game/player.c @@ -81,29 +81,8 @@ f32 g_WarpType3MoreHeight; u32 g_WarpType3Pad; s32 g_WarpType2HasDirection; u32 g_WarpType2Arg2; -s32 g_CutsceneCurAnimFrame60; -#if VERSION == VERSION_JPN_FINAL -s32 g_CutsceneCurAnimFrame240; -s32 g_CutsceneFrameOverrun240; -s16 g_CutsceneAnimNum; -f32 g_CutsceneBlurFrac; -#elif PAL -f32 g_CutsceneCurAnimFrame240; -f32 var8009e388pf; -s16 g_CutsceneAnimNum; -f32 g_CutsceneBlurFrac; -#else -s32 g_CutsceneCurAnimFrame240; -s16 g_CutsceneAnimNum; -f32 g_CutsceneBlurFrac; -s32 g_CutsceneFrameOverrun240; -#endif - -bool g_CutsceneSkipRequested; -f32 g_CutsceneCurTotalFrame60f; s32 var8009de2c; -f32 g_CutsceneBarFrac; // 0 when bars across the top and bottom, 1 when fullscreen u32 var8009de34; s16 g_SpawnPoints[MAX_SPAWNPOINTS]; s32 g_NumSpawnPoints; @@ -180,7 +159,6 @@ bool g_PlayersWithControl[] = { }; bool g_PlayerInvincible = false; -s32 g_InCutscene = 0x00000000; s16 g_DeathAnimations[] = { ANIM_DEATH_001A, @@ -933,10 +911,6 @@ void playerTickChrBody(void) g_Vars.currentplayer->haschrbody = true; playerChooseBodyAndHead(&bodynum, &headnum, &sp60); - if (g_Vars.tickmode == TICKMODE_CUTSCENE) { - weaponnum = g_DefaultWeapons[0]; - } - weaponmodelnum = playermgrGetModelOfWeapon(weaponnum); if (IS4MB()) { @@ -1381,250 +1355,6 @@ void playerExecutePreparedWarp(void) player0f0c1ba4(&pos, &up, &look, &memcampos, room); } -void playerStartCutscene2(void) -{ - playerSetTickMode(TICKMODE_CUTSCENE); - g_PlayerTriggerGeFadeIn = false; - bmoveSetModeForAllPlayers(MOVEMODE_CUTSCENE); - playersClearMemCamRoom(); - -#if PAL - g_CutsceneCurAnimFrame240 = var8009e388pf; - g_CutsceneCurAnimFrame60 = floorf(g_CutsceneCurAnimFrame240 + 0.01f); -#else - g_CutsceneCurAnimFrame240 = g_CutsceneFrameOverrun240; - g_CutsceneCurAnimFrame60 = g_CutsceneFrameOverrun240 >> 2; -#endif - - g_CutsceneBlurFrac = 0; - var8009de2c = -1; - g_InCutscene = 1; - - paksStop(true); - g_Vars.in_cutscene = g_Vars.tickmode == TICKMODE_CUTSCENE && g_CutsceneCurAnimFrame60 < animGetNumFrames(g_CutsceneAnimNum) - 1; - g_Vars.cutsceneskip60ths = 0; -} - -void playerStartCutscene(s16 animnum) -{ - if (!g_Vars.autocutplaying || !g_Vars.in_cutscene || !g_CutsceneSkipRequested) { - joyDisableTemporarily(); - - if (g_Vars.tickmode != TICKMODE_CUTSCENE) { - g_CutsceneSkipRequested = false; - g_CutsceneCurTotalFrame60f = 0; - } - - if (g_Vars.tickmode != TICKMODE_CUTSCENE) { - playersTickAllChrBodies(); - } - - g_CutsceneAnimNum = animnum; - - if (g_Vars.currentplayer->haschrbody) { - playerStartCutscene2(); - } - } -} - -void playerReorientForCutsceneStop(u32 arg0) -{ - struct coord sp94; - struct coord sp88; - struct coord sp7c; - u8 sp7f; - Mtxf sp38; - s32 lastframe; - f32 theta; - u32 stack; - - var8009de2c = arg0; - lastframe = animGetNumFrames(g_CutsceneAnimNum) - 1; - anim00023d38(g_CutsceneAnimNum); - sp7f = anim00023ab0(g_CutsceneAnimNum, lastframe); - anim00023d0c(); - anim00024050(0, 0, &g_Skel20, g_CutsceneAnimNum, sp7f, &sp94, &sp88, &sp7c); - mtx4LoadRotation(&sp94, &sp38); - - theta = atan2f(-sp38.m[2][0], -sp38.m[2][2]); - theta = (M_BADTAU - theta) * 57.304901123047f; - g_Vars.bond->vv_theta = theta; - - chrSetLookAngle(g_Vars.bond->prop->chr, (360 - theta) * 0.017450513318181f); -} - -void playerTickCutscene(bool arg0) -{ - struct coord pos; - struct coord up; - struct coord look; - struct coord sp178; - struct coord sp16c; - struct coord sp160; - u8 sp15f; - Mtxf sp11c; - f32 sp118 = func0f15c888(); - f32 fovy; - s32 endframe; - s8 contpadnum = optionsGetContpadNum1(g_Vars.currentplayerstats->mpindex); - u16 buttons; -#if PAL - u8 stack3[0x2c]; -#endif - f32 barfrac; - f32 sp104; - Mtxf spc4; - Mtxf sp84; - f32 sp74[4]; - f32 sp64[4]; - f32 sp54[4]; - - if (arg0) { - buttons = joyGetButtons(contpadnum, 0xffff); - } else { - buttons = 0; - } - - anim00023d38(g_CutsceneAnimNum); - - endframe = animGetNumFrames(g_CutsceneAnimNum) - 1; - - if (g_Vars.currentplayerindex == 0) { - g_Vars.cutsceneskip60ths = 0; - - if (g_CutsceneCurAnimFrame60 < endframe) { -#if PAL - g_CutsceneCurAnimFrame240 += g_Vars.lvupdate60freal; - g_CutsceneCurAnimFrame60 = floorf(g_CutsceneCurAnimFrame240 + 0.01f); -#else - g_CutsceneCurAnimFrame240 += g_Vars.lvupdate240; - g_CutsceneCurAnimFrame60 = g_CutsceneCurAnimFrame240 >> 2; -#endif - - if (g_Anims[g_CutsceneAnimNum].flags & ANIMFLAG_08) { - while (g_CutsceneCurAnimFrame60 < endframe && anim000239e0(g_CutsceneAnimNum, g_CutsceneCurAnimFrame60)) { -#if PAL - g_CutsceneCurAnimFrame240 += 1.2f; - g_CutsceneCurAnimFrame60 = floorf(g_CutsceneCurAnimFrame240 + 0.01f); -#else - g_CutsceneCurAnimFrame60++; - g_CutsceneCurAnimFrame240 += 4; -#endif - - g_Vars.cutsceneskip60ths++; - } - } - - if (g_CutsceneCurAnimFrame60 >= endframe) { -#if PAL - var8009e388pf = g_CutsceneCurAnimFrame240 - endframe; -#else - g_CutsceneFrameOverrun240 = g_CutsceneCurAnimFrame240 - endframe * 4; -#endif - } - - if (g_CutsceneCurAnimFrame60 > endframe) { - g_CutsceneCurAnimFrame60 = endframe; - } - } - } - - g_Vars.in_cutscene = (g_Vars.tickmode == TICKMODE_CUTSCENE && g_CutsceneCurAnimFrame60 < endframe); - sp15f = anim00023ab0(g_CutsceneAnimNum, g_CutsceneCurAnimFrame60); - anim00023d0c(); - anim00024050(0, 0, &g_Skel20, g_CutsceneAnimNum, sp15f, &sp178, &sp16c, &sp160); - - pos.x = sp16c.x * sp118; - pos.y = sp16c.y * sp118; - pos.z = sp16c.z * sp118; - - mtx4LoadRotation(&sp178, &sp11c); - - up.x = sp11c.m[1][0]; - up.y = sp11c.m[1][1]; - up.z = sp11c.m[1][2]; - - look.x = -sp11c.m[2][0]; - look.y = -sp11c.m[2][1]; - look.z = -sp11c.m[2][2]; - - fovy = anim00024c14(1, g_CutsceneAnimNum, sp15f); - g_CutsceneBlurFrac = anim00024c14(2, g_CutsceneAnimNum, sp15f); - g_CutsceneBarFrac = 0; - - if (var8009de2c > 0 && var8009de2c >= endframe - g_CutsceneCurAnimFrame60) { - barfrac = 1 - (f32)(endframe - g_CutsceneCurAnimFrame60) / (f32)var8009de2c; - - g_CutsceneBarFrac = barfrac; - sp104 = 1 - cosf(1.5705462694168f * barfrac); - - bmoveSetMode(MOVEMODE_WALK); - - pos.x += sp104 * (g_Vars.bond->bond2.unk10.x - pos.x); - pos.y += sp104 * (g_Vars.bond->bond2.unk10.y - pos.y); - pos.z += sp104 * (g_Vars.bond->bond2.unk10.z - pos.z); - - mtx00016d58(&spc4, 0, 0, 0, -look.x, -look.y, -look.z, up.x, up.y, up.z); - mtx00016d58(&sp84, 0, 0, 0, - -g_Vars.bond->bond2.unk1c.x, -g_Vars.bond->bond2.unk1c.y, -g_Vars.bond->bond2.unk1c.z, - g_Vars.bond->bond2.unk28.x, g_Vars.bond->bond2.unk28.y, g_Vars.bond->bond2.unk28.z); - quaternion0f097044(&spc4, sp74); - quaternion0f097044(&sp84, sp64); - quaternion0f0976c0(sp64, sp74); - quaternionSlerp(sp74, sp64, sp104, sp54); - quaternionToMtx(sp54, &sp11c); - - up.x = sp11c.m[1][0]; - up.y = sp11c.m[1][1]; - up.z = sp11c.m[1][2]; - - look.x = sp11c.m[2][0]; - look.y = sp11c.m[2][1]; - look.z = sp11c.m[2][2]; - - g_CutsceneBlurFrac += barfrac * (0 - g_CutsceneBlurFrac); - fovy += barfrac * (60 - fovy); - } - - playerSetCameraMode(CAMERAMODE_THIRDPERSON); - player0f0c1bd8(&pos, &up, &look); - playermgrSetFovY(fovy); - viSetFovY(fovy); - - if (g_Vars.currentplayerindex == 0) { - g_CutsceneCurTotalFrame60f += g_Vars.lvupdate60freal; - } - -#if VERSION >= VERSION_NTSC_1_0 - if (g_CutsceneCurTotalFrame60f > 30 && (buttons & 0xffff)) { - g_CutsceneSkipRequested = true; - - if (g_Vars.autocutplaying) { - if (buttons & (B_BUTTON | START_BUTTON)) { - g_Vars.autocutgroupskip = true; - } else { - g_Vars.autocutfinished = true; - } - } - } -#else - if (g_CutsceneCurTotalFrame60f > 30) { - if (buttons & 0xffff) { - g_CutsceneSkipRequested = true; - } - - if ((buttons & (B_BUTTON | START_BUTTON)) && g_Vars.autocutplaying) { - g_Vars.autocutgroupskip = true; - } - } -#endif -} - -f32 playerGetCutsceneBlurFrac(void) -{ - return g_CutsceneBlurFrac; -} - void playerSetZoomFovY(f32 fovy, f32 timemax) { g_Vars.currentplayer->zoomintime = 0; @@ -2436,16 +2166,6 @@ s16 playerGetViewportHeight(void) height = g_ViModes[g_ViRes].wideheight; } else if (optionsGetEffectiveScreenSize() == SCREENSIZE_CINEMA) { height = g_ViModes[g_ViRes].cinemaheight; - } else if (g_InCutscene && !var8009dfc0) { - if (var8009de2c >= 1) { - f32 a = g_ViModes[g_ViRes].wideheight; - f32 b = g_ViModes[g_ViRes].fullheight; - a = a * (1.0f - g_CutsceneBarFrac); - b = b * g_CutsceneBarFrac; - height = a + b; - } else { - height = g_ViModes[g_ViRes].wideheight; - } } else { height = g_ViModes[g_ViRes].fullheight; } @@ -2476,36 +2196,11 @@ s16 playerGetViewportTop(void) } } else { if (optionsGetEffectiveScreenSize() == SCREENSIZE_WIDE) { - if (g_InCutscene && optionsGetCutsceneSubtitles() && g_Vars.stagenum != STAGE_CITRAINING) { - if (var8009de2c >= 1) { - f32 a = g_ViModes[g_ViRes].fulltop; - f32 b = g_ViModes[g_ViRes].widetop; - a = a * (1.0f - g_CutsceneBarFrac); - b = b * g_CutsceneBarFrac; - top = a + b; - } else { - top = g_ViModes[g_ViRes].fulltop; - } - } else { - top = g_ViModes[g_ViRes].widetop; - } + top = g_ViModes[g_ViRes].widetop; } else if (optionsGetEffectiveScreenSize() == SCREENSIZE_CINEMA) { top = g_ViModes[g_ViRes].cinematop; } else { - if (g_InCutscene && !var8009dfc0 - && (!optionsGetCutsceneSubtitles() || g_Vars.stagenum == STAGE_CITRAINING)) { - if (var8009de2c >= 1) { - f32 a = g_ViModes[g_ViRes].widetop; - f32 b = g_ViModes[g_ViRes].fulltop; - a = a * (1.0f - g_CutsceneBarFrac); - b = b * g_CutsceneBarFrac; - top = a + b; - } else { - top = g_ViModes[g_ViRes].widetop; - } - } else { - return g_ViModes[g_ViRes].fulltop; - } + top = g_ViModes[g_ViRes].fulltop; } } @@ -3057,7 +2752,7 @@ void playerTick(bool arg0) bgunSetGunAmmoVisible(GUNAMMOREASON_OPTION, optionsGetAmmoOnScreen(g_Vars.currentplayerstats->mpindex)); bgunSetSightVisible(GUNSIGHTREASON_1, true); - if ((g_Vars.tickmode == TICKMODE_GE_FADEIN || g_Vars.tickmode == TICKMODE_NORMAL) && !g_InCutscene && !g_MainIsEndscreen) { + if ((g_Vars.tickmode == TICKMODE_GE_FADEIN || g_Vars.tickmode == TICKMODE_NORMAL) && !g_MainIsEndscreen) { g_Vars.currentplayer->bondviewlevtime60 += g_Vars.lvupdate60; } @@ -3087,27 +2782,7 @@ void playerTick(bool arg0) } } - if (g_Vars.tickmode != TICKMODE_CUTSCENE) { - g_InCutscene = false; - } - - if (g_Vars.tickmode == (u32)TICKMODE_CUTSCENE) { - // In a cutscene - s32 i; - - playerTickChrBody(); - - if (g_Vars.currentplayer->haschrbody) { - g_Vars.currentplayer->invdowntime = TICKS(-40); - bmoveTick(0, 0, 0, 1); - playerTickCutscene(arg0); - g_Vars.currentplayer->invdowntime = TICKS(-40); - } - - for (i = 0; i < PLAYERCOUNT(); i++) { - g_Vars.players[i]->joybutinhibit = 0xffffffff; - } - } else if (g_Vars.currentplayer->teleportstate == TELEPORTSTATE_WHITE) { + if (g_Vars.currentplayer->teleportstate == TELEPORTSTATE_WHITE) { // Deep Sea teleport playerTickChrBody(); g_WarpType1Pad = g_Vars.currentplayer->teleportcamerapad; diff --git a/src/game/playerreset.c b/src/game/playerreset.c index da1b582a8..6f0b1d3a1 100644 --- a/src/game/playerreset.c +++ b/src/game/playerreset.c @@ -49,14 +49,6 @@ void playerReset(void) playerResetLoResIf4Mb(); func0f18e558(); - g_InCutscene = false; - -#if PAL - var8009e388pf = 0; -#else - g_CutsceneFrameOverrun240 = 0; -#endif - var8007072c = 1; var80070738 = 0; var8007073c = 0; diff --git a/src/game/propobj.c b/src/game/propobj.c index 741145ee5..ce030848a 100644 --- a/src/game/propobj.c +++ b/src/game/propobj.c @@ -11334,8 +11334,7 @@ s32 objTickPlayer(struct prop *prop) if (model->anim) { if (g_Anims[model->anim->animnum].flags & 0x02) { - if (g_Vars.tickmode != TICKMODE_CUTSCENE - && modelGetCurAnimFrame(model) >= modelGetNumAnimFrames(model) - 1) { + if (modelGetCurAnimFrame(model) >= modelGetNumAnimFrames(model) - 1) { modelmgrFreeAnim(model->anim); model->anim = NULL; } else { @@ -11347,13 +11346,7 @@ s32 objTickPlayer(struct prop *prop) struct hov *hov = NULL; if (fulltick) { - s32 iVar10 = g_Vars.lvupdate240; - - if (g_Vars.tickmode == TICKMODE_CUTSCENE && iVar10 > 0 && g_Vars.cutsceneskip60ths > 0) { - iVar10 += g_Vars.cutsceneskip60ths * 4; - } - - model0001ee18(model, iVar10, true); + model0001ee18(model, g_Vars.lvupdate240, true); } anim00023d38(model->anim->animnum); @@ -14965,11 +14958,6 @@ void objCheckDestroyed(struct defaultobj *obj, struct coord *pos, s32 playernum) s16 exptype = g_PropExplosionTypes[8 + obj->modelnum]; s16 rooms[8]; - // If in Deep Sea outro - if (g_Vars.tickmode == TICKMODE_CUTSCENE && g_CutsceneAnimNum == ANIM_CUT_PAM_OUTRO_CAM) { - exptype = EXPLOSIONTYPE_24; - } - while (rootprop->parent) { rootprop = rootprop->parent; } diff --git a/src/game/sky.c b/src/game/sky.c index 0617704e1..df8400451 100644 --- a/src/game/sky.c +++ b/src/game/sky.c @@ -2397,7 +2397,7 @@ Gfx *sky0f1274d8(Gfx *gdl) ? g_Vars.currentplayer->unk1c2c : g_Vars.currentplayer->unk1c30; - if (!g_InCutscene && value > 0) { + if (value > 0) { f32 r = g_Vars.currentplayer->unk1c28 * (255.0f / value); f32 g = g_Vars.currentplayer->unk1c2c * (255.0f / value); f32 b = g_Vars.currentplayer->unk1c30 * (255.0f / value); diff --git a/src/include/constants.h b/src/include/constants.h index d378233bc..0e84f7f83 100644 --- a/src/include/constants.h +++ b/src/include/constants.h @@ -44,10 +44,6 @@ #define VALIDWEAPON() (g_Vars.currentplayer->gunctrl.weaponnum >= WEAPON_UNARMED && g_Vars.currentplayer->gunctrl.weaponnum <= WEAPON_COMBATBOOST) #define FUNCISSEC() (VALIDWEAPON() && (g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].gunfuncs[(g_Vars.currentplayer->gunctrl.weaponnum - 1) >> 3] & (1 << ((g_Vars.currentplayer->gunctrl.weaponnum - 1) & 7)))) -#define USINGDEVICE(device) (!g_Vars.currentplayer->isdead \ - && !g_InCutscene \ - && (g_Vars.currentplayer->devicesactive & ~g_Vars.currentplayer->devicesinhibit & (device))) - #if VERSION >= VERSION_PAL_BETA #define LVUPDATE60FREAL() g_Vars.lvupdate60freal #else diff --git a/src/include/data.h b/src/include/data.h index 5f97b36e8..964dd1ccc 100644 --- a/src/include/data.h +++ b/src/include/data.h @@ -260,7 +260,6 @@ extern u32 var80070748; extern u32 var8007074c; extern bool g_PlayersWithControl[]; extern bool g_PlayerInvincible; -extern s32 g_InCutscene; extern s16 g_DeathAnimations[]; extern s32 g_NumDeathAnimations; extern s32 g_ScissorX1;