diff options
Diffstat (limited to '')
| -rwxr-xr-x | include/game.h | 2 | ||||
| -rwxr-xr-x | include/stage.h | 6 | ||||
| -rw-r--r-- | kamek_pal.x | 1 | ||||
| -rw-r--r-- | src/koopatlas/pathmanager.cpp | 38 | ||||
| -rw-r--r-- | src/koopatlas/pathmanager.h | 3 | 
5 files changed, 46 insertions, 4 deletions
diff --git a/include/game.h b/include/game.h index c4a9238..bb64d4e 100755 --- a/include/game.h +++ b/include/game.h @@ -2514,7 +2514,7 @@ public:  	virtual void getModelMatrix(u32 unk, MtxPtr dest);	// 800D5820
  	virtual int _vf54();						// 80318D0C
  	virtual bool _vf58(int type, char *buf, bool unk); // 800D6930
 -	virtual void startAnimation(int id, float frame, float unk, float updateRate);	// 800D5EC0
 +	virtual void startAnimation(int id, float updateRate, float unk, float frame);	// 800D5EC0
  	virtual int _vf60();						// 800D6920
  	virtual void _vf64(int id, float unk1, float unk2, float unk3); // 800D62F0
  	virtual void _vf68(int id, float unk);		// 800D63E0
 diff --git a/include/stage.h b/include/stage.h index 39d1349..8a97dab 100755 --- a/include/stage.h +++ b/include/stage.h @@ -83,8 +83,8 @@ enum SceneParameters {  enum PowerupStoreTypes {  	BEAT_LEVEL = 0, // Keeps powerups -	EXIT_LEVEL = 1, // Loses powerups, resets to previous state -	LOSE_LEVEL = 2  // Loses everything +	LOSE_LEVEL = 1, // Loses everything +	EXIT_LEVEL = 2  // Loses powerups, resets to previous state  }; @@ -101,6 +101,8 @@ enum Wipes {  void ExitStage(int scene, int sceneParams, int powerupStoreType, int wipe); +extern PowerupStoreTypes LastPowerupStoreType; + diff --git a/kamek_pal.x b/kamek_pal.x index 0332692..24e1348 100644 --- a/kamek_pal.x +++ b/kamek_pal.x @@ -211,6 +211,7 @@ SECTIONS {  	instance2__17SoundPlayingClass = 0x8042A040;  	ExitStage__Fiiii = 0x80102370; +	LastPowerupStoreType = 0x8042931C;  	zero__4mMtxFv = 0x8016F290; diff --git a/src/koopatlas/pathmanager.cpp b/src/koopatlas/pathmanager.cpp index 5d301df..bb610e3 100644 --- a/src/koopatlas/pathmanager.cpp +++ b/src/koopatlas/pathmanager.cpp @@ -3,6 +3,7 @@  #include "koopatlas/hud.h"  #include "koopatlas/player.h"  #include <sfx.h> +#include <stage.h>  extern "C" void PlaySoundWithFunctionB4(void *spc, nw4r::snd::SoundHandle *handle, int id, int unk); @@ -27,6 +28,19 @@ void dWMPathManager_c::setup() {  	isEnteringLevel = false;  	levelStartWait = -1;  	unlockPaths(); + +	if (!countdownToFadeIn) +		waitAtStart = 50; +	else +		waitAtStart = -1; + +	waitForAfterDeathAnim = -1; +	mustPlayAfterDeathAnim = false; +	if (LastPowerupStoreType == LOSE_LEVEL) { +		mustPlayAfterDeathAnim = true; +		daWMPlayer_c::instance->visible = false; +	} +  	SpammyReport("done\n");  	// Figure out what path node to start at @@ -383,6 +397,28 @@ void dWMPathManager_c::execute() {  		return;  	} +	if (waitAtStart > 0) { +		waitAtStart--; +		if (waitAtStart == 0) { +			if (mustPlayAfterDeathAnim) { +				daWMPlayer_c::instance->visible = true; +				daWMPlayer_c::instance->startAnimation(ending_wait, 1.0f, 0.0f, 0.0f); +				waitForAfterDeathAnim = 60; + +				nw4r::snd::SoundHandle something; +				PlaySoundWithFunctionB4(SoundRelatedClass, &something, SE_VOC_MA_CS_COURSE_MISS, 1); +			} +		} +		return; +	} + +	if (waitForAfterDeathAnim > 0) { +		waitForAfterDeathAnim--; +		if (waitForAfterDeathAnim == 0) +			daWMPlayer_c::instance->startAnimation(wait_select, 1.0f, 0.0f, 0.0f); +		return; +	} +  	if (shouldRequestSave) {  		dScKoopatlas_c::instance->showSaveWindow();  		shouldRequestSave = false; @@ -771,7 +807,7 @@ void dWMPathManager_c::activatePoint() {  		nw4r::snd::SoundHandle something2;  		PlaySoundWithFunctionB4(SoundRelatedClass, &something2, (Player_Powerup[0] == 3) ? SE_VOC_MA_PLAYER_DECIDE_MAME: SE_VOC_MA_CS_COURSE_IN, 1); -		daWMPlayer_c::instance->startAnimation(170, 1.2, 10.0, 0.0); +		daWMPlayer_c::instance->startAnimation(course_in, 1.2, 10.0, 0.0);  		daWMPlayer_c::instance->rot.y = 0;  		isEnteringLevel = true; diff --git a/src/koopatlas/pathmanager.h b/src/koopatlas/pathmanager.h index 98a68d6..cd1d7ba 100644 --- a/src/koopatlas/pathmanager.h +++ b/src/koopatlas/pathmanager.h @@ -68,6 +68,9 @@ class dWMPathManager_c {  		bool calledEnteredNode;  		int levelStartWait; +		int waitAtStart; +		bool mustPlayAfterDeathAnim; +		int waitForAfterDeathAnim;  		dLevelInfo_c::entry_s *enteredLevel;  };  | 
