mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-22 03:55:11 +00:00
Adjust main menu cutscene and camera
This commit is contained in:
parent
354146e3ac
commit
8984ec3ba8
8 changed files with 38 additions and 5 deletions
|
@ -193,7 +193,11 @@ void newcam_init_settings(void) {
|
|||
newcam_analogue = (s16)configCameraAnalog;
|
||||
newcam_degrade = (f32)configCameraDegrade;
|
||||
|
||||
newcam_toggle(configEnableCamera);
|
||||
// setup main menu camera
|
||||
extern bool gDjuiInMainMenu;
|
||||
if (gDjuiInMainMenu) { newcam_tilt = 5; }
|
||||
|
||||
newcam_toggle(configEnableCamera || gDjuiInMainMenu);
|
||||
}
|
||||
|
||||
/** Mathematic calculations. This stuffs so basic even *I* understand it lol
|
||||
|
|
|
@ -776,4 +776,6 @@ void obj_rotate_towards_point(struct Object *o, Vec3f point, s16 pitchOff, s16 y
|
|||
|
||||
Gfx *geo_camera_fov(s32 callContext, struct GraphNode *g, UNUSED void *context);
|
||||
|
||||
s32 set_camera_mode_fixed(struct Camera* c, s16 x, s16 y, s16 z);
|
||||
|
||||
#endif // CAMERA_H
|
||||
|
|
|
@ -1300,7 +1300,9 @@ s32 init_level(void) {
|
|||
} else if (gDebugLevelSelect == 0) {
|
||||
if (gMarioState->action != ACT_UNINITIALIZED) {
|
||||
bool skipIntro = (gNetworkType == NT_NONE);
|
||||
if (save_file_exists(gCurrSaveFileNum - 1) || skipIntro) {
|
||||
if (gDjuiInMainMenu) {
|
||||
set_mario_action(gMarioState, ACT_INTRO_CUTSCENE, 7);
|
||||
} else if (save_file_exists(gCurrSaveFileNum - 1) || skipIntro) {
|
||||
set_mario_action(gMarioState, ACT_IDLE, 0);
|
||||
} else if (gCLIOpts.SkipIntro == 0 && configSkipIntro == 0 && gServerSettings.skipIntro == 0) {
|
||||
set_mario_action(gMarioState, ACT_INTRO_CUTSCENE, 0);
|
||||
|
|
|
@ -1782,7 +1782,7 @@ void mario_update_hitbox_and_cap_model(struct MarioState *m) {
|
|||
}
|
||||
|
||||
struct NetworkPlayer* np = &gNetworkPlayers[gMarioState->playerIndex];
|
||||
u8 teleportFade = (m->flags & MARIO_TELEPORTING) || (np->type != NPT_LOCAL && np->fadeOpacity < 32);
|
||||
u8 teleportFade = (m->flags & MARIO_TELEPORTING) || (gMarioState->playerIndex != 0 && np->fadeOpacity < 32);
|
||||
if (teleportFade && (m->fadeWarpOpacity != 0xFF)) {
|
||||
bodyState->modelState &= ~0xFF;
|
||||
bodyState->modelState |= (0x100 | m->fadeWarpOpacity);
|
||||
|
|
|
@ -1830,7 +1830,7 @@ static void intro_cutscene_peach_lakitu_scene(struct MarioState *m) {
|
|||
#define TIMER_RAISE_PIPE 38
|
||||
#endif
|
||||
|
||||
static void intro_cutscene_raise_pipe(struct MarioState *m) {
|
||||
static void intro_cutscene_raise_pipe(struct MarioState* m) {
|
||||
u8 globalIndex = gNetworkPlayers[m->playerIndex].globalIndex;
|
||||
if (globalIndex == UNKNOWN_GLOBAL_INDEX) { globalIndex = 0; }
|
||||
sIntroWarpPipeObj[globalIndex]->oPosY = camera_approach_f32_symmetric(sIntroWarpPipeObj[globalIndex]->oPosY, 260.0f, 10.0f);
|
||||
|
@ -1844,6 +1844,24 @@ static void intro_cutscene_raise_pipe(struct MarioState *m) {
|
|||
advance_cutscene_step(m);
|
||||
}
|
||||
}
|
||||
|
||||
static void intro_cutscene_raise_pipe_main_menu(struct MarioState* m) {
|
||||
u8 globalIndex = gNetworkPlayers[m->playerIndex].globalIndex;
|
||||
if (globalIndex == UNKNOWN_GLOBAL_INDEX) { globalIndex = 0; }
|
||||
if (sIntroWarpPipeObj[globalIndex] == NULL) {
|
||||
sIntroWarpPipeObj[globalIndex] =
|
||||
spawn_object_abs_with_rot(gCurrentObject, 0, MODEL_CASTLE_GROUNDS_WARP_PIPE,
|
||||
bhvStaticObject, m->pos[0], 260, m->pos[2], 0, 180, 0);
|
||||
}
|
||||
|
||||
if (m->actionTimer++ > 1) {
|
||||
m->vel[1] = 60.0f;
|
||||
m->faceAngle[1] = m->area->camera->yaw;
|
||||
advance_cutscene_step(m);
|
||||
m->actionArg = 3;
|
||||
m->actionTimer = 110;
|
||||
}
|
||||
}
|
||||
#undef TIMER_RAISE_PIPE
|
||||
|
||||
static void intro_cutscene_jump_out_of_pipe(struct MarioState *m) {
|
||||
|
@ -1931,7 +1949,8 @@ enum {
|
|||
INTRO_CUTSCENE_JUMP_OUT_OF_PIPE,
|
||||
INTRO_CUTSCENE_LAND_OUTSIDE_PIPE,
|
||||
INTRO_CUTSCENE_LOWER_PIPE,
|
||||
INTRO_CUTSCENE_SET_MARIO_TO_IDLE
|
||||
INTRO_CUTSCENE_SET_MARIO_TO_IDLE,
|
||||
INTRO_CUTSCENE_RAISE_PIPE_MAIN_MENU
|
||||
};
|
||||
|
||||
static s32 act_intro_cutscene(struct MarioState *m) {
|
||||
|
@ -1957,6 +1976,9 @@ static s32 act_intro_cutscene(struct MarioState *m) {
|
|||
case INTRO_CUTSCENE_SET_MARIO_TO_IDLE:
|
||||
intro_cutscene_set_mario_to_idle(m);
|
||||
break;
|
||||
case INTRO_CUTSCENE_RAISE_PIPE_MAIN_MENU:
|
||||
intro_cutscene_raise_pipe_main_menu(m);
|
||||
break;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ static Gfx* sSavedDisplayListHead = NULL;
|
|||
|
||||
struct DjuiRoot* gDjuiRoot = NULL;
|
||||
static struct DjuiText* sDjuiPauseOptions = NULL;
|
||||
bool gDjuiInMainMenu = true;
|
||||
|
||||
void djui_init(void) {
|
||||
gDjuiRoot = djui_root_create();
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
#include "djui_panel_cheats.h"
|
||||
|
||||
extern struct DjuiRoot* gDjuiRoot;
|
||||
extern bool gDjuiInMainMenu;
|
||||
|
||||
void djui_init(void);
|
||||
void djui_connect_menu_open(void);
|
||||
|
|
|
@ -145,6 +145,7 @@ void djui_panel_shutdown(void) {
|
|||
sPanelList = NULL;
|
||||
sPanelRemoving = NULL;
|
||||
sMoveAmount = 0;
|
||||
gDjuiInMainMenu = false;
|
||||
gInteractableOverridePad = false;
|
||||
gDjuiPanelJoinMessageVisible = false;
|
||||
gDjuiPanelMainCreated = false;
|
||||
|
|
Loading…
Reference in a new issue