Offset and separate player intro pipes
This commit is contained in:
parent
d8bf1c8ef1
commit
2f1e0473c2
|
@ -138,6 +138,7 @@ void bhv_intro_lakitu_loop(void) {
|
||||||
case 3:
|
case 3:
|
||||||
cur_obj_play_sound_1(SOUND_AIR_LAKITU_FLY_HIGHPRIO);
|
cur_obj_play_sound_1(SOUND_AIR_LAKITU_FLY_HIGHPRIO);
|
||||||
vec3f_set(sp58, -1128.f, 560.f, 4664.f);
|
vec3f_set(sp58, -1128.f, 560.f, 4664.f);
|
||||||
|
sp58[0] -= gNetworkPlayers[0].globalIndex * 350.f;
|
||||||
gCurrentObject->oMoveAngleYaw += 0x200;
|
gCurrentObject->oMoveAngleYaw += 0x200;
|
||||||
gCurrentObject->oIntroLakituUnk100 =
|
gCurrentObject->oIntroLakituUnk100 =
|
||||||
approach_f32_asymptotic(gCurrentObject->oIntroLakituUnk100, 100.f, 0.03f);
|
approach_f32_asymptotic(gCurrentObject->oIntroLakituUnk100, 100.f, 0.03f);
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#include "engine/graph_node.h"
|
#include "engine/graph_node.h"
|
||||||
#include "level_table.h"
|
#include "level_table.h"
|
||||||
#include "pc/configfile.h"
|
#include "pc/configfile.h"
|
||||||
|
#include "pc/network/network.h"
|
||||||
|
|
||||||
#define CBUTTON_MASK (U_CBUTTONS | D_CBUTTONS | L_CBUTTONS | R_CBUTTONS)
|
#define CBUTTON_MASK (U_CBUTTONS | D_CBUTTONS | L_CBUTTONS | R_CBUTTONS)
|
||||||
|
|
||||||
|
@ -9598,6 +9599,8 @@ s32 intro_peach_move_camera_start_to_pipe(struct Camera *c, struct CutsceneSplin
|
||||||
*/
|
*/
|
||||||
posReturn = move_point_along_spline(c->pos, positionSpline, &sCutsceneSplineSegment, &sCutsceneSplineSegmentProgress);
|
posReturn = move_point_along_spline(c->pos, positionSpline, &sCutsceneSplineSegment, &sCutsceneSplineSegmentProgress);
|
||||||
focusReturn = move_point_along_spline(c->focus, focusSpline, &sCutsceneSplineSegment, &sCutsceneSplineSegmentProgress);
|
focusReturn = move_point_along_spline(c->focus, focusSpline, &sCutsceneSplineSegment, &sCutsceneSplineSegmentProgress);
|
||||||
|
c->pos[0] += gNetworkPlayers[0].globalIndex * 350.f;
|
||||||
|
c->focus[0] += gNetworkPlayers[0].globalIndex * 350.f;
|
||||||
|
|
||||||
// The two splines used by this function are reflected in the horizontal plane for some reason,
|
// The two splines used by this function are reflected in the horizontal plane for some reason,
|
||||||
// so they are rotated every frame. Why do this, Nintendo?
|
// so they are rotated every frame. Why do this, Nintendo?
|
||||||
|
@ -9652,6 +9655,8 @@ BAD_RETURN(s32) cutscene_intro_peach_dialog(struct Camera *c) {
|
||||||
BAD_RETURN(s32) cutscene_intro_peach_follow_pipe_spline(struct Camera *c) {
|
BAD_RETURN(s32) cutscene_intro_peach_follow_pipe_spline(struct Camera *c) {
|
||||||
move_point_along_spline(c->pos, sIntroPipeToDialogPosition, &sCutsceneSplineSegment, &sCutsceneSplineSegmentProgress);
|
move_point_along_spline(c->pos, sIntroPipeToDialogPosition, &sCutsceneSplineSegment, &sCutsceneSplineSegmentProgress);
|
||||||
move_point_along_spline(c->focus, sIntroPipeToDialogFocus, &sCutsceneSplineSegment, &sCutsceneSplineSegmentProgress);
|
move_point_along_spline(c->focus, sIntroPipeToDialogFocus, &sCutsceneSplineSegment, &sCutsceneSplineSegmentProgress);
|
||||||
|
c->pos[0] -= gNetworkPlayers[0].globalIndex * 350.f;
|
||||||
|
c->focus[0] -= gNetworkPlayers[0].globalIndex * 350.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
BAD_RETURN(s32) cutscene_intro_peach_clear_cutscene_status(UNUSED struct Camera *c) {
|
BAD_RETURN(s32) cutscene_intro_peach_clear_cutscene_status(UNUSED struct Camera *c) {
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
// TODO: put this elsewhere
|
// TODO: put this elsewhere
|
||||||
enum SaveOption { SAVE_OPT_SAVE_AND_CONTINUE = 1, /*SAVE_OPT_SAVE_AND_QUIT, SAVE_OPT_SAVE_EXIT_GAME,*/ SAVE_OPT_CONTINUE_DONT_SAVE };
|
enum SaveOption { SAVE_OPT_SAVE_AND_CONTINUE = 1, /*SAVE_OPT_SAVE_AND_QUIT, SAVE_OPT_SAVE_EXIT_GAME,*/ SAVE_OPT_CONTINUE_DONT_SAVE };
|
||||||
|
|
||||||
static struct Object *sIntroWarpPipeObj;
|
static struct Object* sIntroWarpPipeObj[MAX_PLAYERS] = { 0 };
|
||||||
static struct Object *sEndPeachObj;
|
static struct Object *sEndPeachObj;
|
||||||
static struct Object *sEndRightToadObj;
|
static struct Object *sEndRightToadObj;
|
||||||
static struct Object *sEndLeftToadObj;
|
static struct Object *sEndLeftToadObj;
|
||||||
|
@ -1809,9 +1809,11 @@ static void intro_cutscene_hide_hud_and_mario(struct MarioState *m) {
|
||||||
static void intro_cutscene_peach_lakitu_scene(struct MarioState *m) {
|
static void intro_cutscene_peach_lakitu_scene(struct MarioState *m) {
|
||||||
if ((s16) m->statusForCamera->cameraEvent != CAM_EVENT_START_INTRO) {
|
if ((s16) m->statusForCamera->cameraEvent != CAM_EVENT_START_INTRO) {
|
||||||
if (m->actionTimer++ == TIMER_SPAWN_PIPE) {
|
if (m->actionTimer++ == TIMER_SPAWN_PIPE) {
|
||||||
sIntroWarpPipeObj =
|
u8 globalIndex = gNetworkPlayers[m->playerIndex].globalIndex;
|
||||||
|
if (globalIndex == UNKNOWN_GLOBAL_INDEX) { globalIndex = 0; }
|
||||||
|
sIntroWarpPipeObj[globalIndex] =
|
||||||
spawn_object_abs_with_rot(gCurrentObject, 0, MODEL_CASTLE_GROUNDS_WARP_PIPE,
|
spawn_object_abs_with_rot(gCurrentObject, 0, MODEL_CASTLE_GROUNDS_WARP_PIPE,
|
||||||
bhvStaticObject, -1328, 60, 4664, 0, 180, 0);
|
bhvStaticObject, -1328 - (350 * globalIndex), 60, 4664, 0, 180, 0);
|
||||||
advance_cutscene_step(m);
|
advance_cutscene_step(m);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1825,10 +1827,12 @@ static void intro_cutscene_peach_lakitu_scene(struct MarioState *m) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void intro_cutscene_raise_pipe(struct MarioState *m) {
|
static void intro_cutscene_raise_pipe(struct MarioState *m) {
|
||||||
sIntroWarpPipeObj->oPosY = camera_approach_f32_symmetric(sIntroWarpPipeObj->oPosY, 260.0f, 10.0f);
|
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);
|
||||||
|
|
||||||
if (m->actionTimer == 0) {
|
if (m->actionTimer == 0) {
|
||||||
play_sound(SOUND_MENU_EXIT_PIPE, sIntroWarpPipeObj->header.gfx.cameraToObject);
|
play_sound(SOUND_MENU_EXIT_PIPE, sIntroWarpPipeObj[globalIndex]->header.gfx.cameraToObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m->actionTimer++ == TIMER_RAISE_PIPE) {
|
if (m->actionTimer++ == TIMER_RAISE_PIPE) {
|
||||||
|
@ -1839,6 +1843,14 @@ static void intro_cutscene_raise_pipe(struct MarioState *m) {
|
||||||
#undef TIMER_RAISE_PIPE
|
#undef TIMER_RAISE_PIPE
|
||||||
|
|
||||||
static void intro_cutscene_jump_out_of_pipe(struct MarioState *m) {
|
static void intro_cutscene_jump_out_of_pipe(struct MarioState *m) {
|
||||||
|
if (m->actionTimer <= 1) {
|
||||||
|
u8 globalIndex = gNetworkPlayers[m->playerIndex].globalIndex;
|
||||||
|
if (globalIndex == UNKNOWN_GLOBAL_INDEX) { globalIndex = 0; }
|
||||||
|
m->pos[0] = sIntroWarpPipeObj[globalIndex]->oPosX;
|
||||||
|
m->pos[1] = sIntroWarpPipeObj[globalIndex]->oPosY;
|
||||||
|
m->pos[2] = sIntroWarpPipeObj[globalIndex]->oPosZ;
|
||||||
|
}
|
||||||
|
|
||||||
if (m->actionTimer == 25) {
|
if (m->actionTimer == 25) {
|
||||||
gHudDisplay.flags = HUD_DISPLAY_DEFAULT;
|
gHudDisplay.flags = HUD_DISPLAY_DEFAULT;
|
||||||
}
|
}
|
||||||
|
@ -1881,14 +1893,16 @@ static void intro_cutscene_land_outside_pipe(struct MarioState *m) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void intro_cutscene_lower_pipe(struct MarioState *m) {
|
static void intro_cutscene_lower_pipe(struct MarioState *m) {
|
||||||
|
u8 globalIndex = gNetworkPlayers[m->playerIndex].globalIndex;
|
||||||
|
if (globalIndex == UNKNOWN_GLOBAL_INDEX) { globalIndex = 0; }
|
||||||
if (m->actionTimer++ == 0) {
|
if (m->actionTimer++ == 0) {
|
||||||
play_sound(SOUND_MENU_ENTER_PIPE, sIntroWarpPipeObj->header.gfx.cameraToObject);
|
play_sound(SOUND_MENU_ENTER_PIPE, sIntroWarpPipeObj[globalIndex]->header.gfx.cameraToObject);
|
||||||
set_mario_animation(m, MARIO_ANIM_FIRST_PERSON);
|
set_mario_animation(m, MARIO_ANIM_FIRST_PERSON);
|
||||||
}
|
}
|
||||||
|
|
||||||
sIntroWarpPipeObj->oPosY -= 5.0f;
|
sIntroWarpPipeObj[globalIndex]->oPosY -= 5.0f;
|
||||||
if (sIntroWarpPipeObj->oPosY <= 50.0f) {
|
if (sIntroWarpPipeObj[globalIndex]->oPosY <= 50.0f) {
|
||||||
obj_mark_for_deletion(sIntroWarpPipeObj);
|
obj_mark_for_deletion(sIntroWarpPipeObj[globalIndex]);
|
||||||
advance_cutscene_step(m);
|
advance_cutscene_step(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue