diff options
Diffstat (limited to '')
| -rw-r--r-- | src/bonusRoom.cpp | 31 | 
1 files changed, 29 insertions, 2 deletions
diff --git a/src/bonusRoom.cpp b/src/bonusRoom.cpp index 8242d43..2b0144d 100644 --- a/src/bonusRoom.cpp +++ b/src/bonusRoom.cpp @@ -432,6 +432,8 @@ public:  	int isGlowing;  	int glowTimer;  	int isDead; +	int standAlone; +	int item;  	void calledWhenUpMoveExecutes();  	void calledWhenDownMoveExecutes(); @@ -917,7 +919,9 @@ dSongBlock *dSongBlock::build() {  int dSongBlock::onCreate() {  	// Settings -	this->note = this->settings; +	this->note = this->settings & 0xF; +	this->standAlone = (this->settings >> 4) & 0xF; +	this->item = (this->settings >> 16) & 0xFF;  	// Model creation	  	allocator.link(-1, GameHeaps[0], 0, 0x20); @@ -1067,7 +1071,30 @@ void dSongBlock::blockWasHit(bool isDown) {  	SpawnEffect("Wm_en_vshit_ring", 0, &(Vec){pos.x, pos.y+8.0, pos.z-100.0}, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0});  	SpawnEffect("Wm_ob_keyget02_lighit", 0, &(Vec){pos.x, pos.y+8.0, pos.z-100.0}, &(S16Vec){0,0,0}, &(Vec){0.5, 0.5, 0.5}); -	dSingAlong::instance->RegisterNote(this->note); +	if (item > 0) { +		create(EN_ITEM, item, &(Vec){pos.x, pos.y, pos.z}, &rot, 0); +	} + +	if (standAlone) { + +		int play; +		// C, C#, D, D#, E, F, F#, G, G#, A, A#, B + +		if 		(note == 0) { play = 12; } +		else if (note == 1) { play = 12; } +		else if (note == 2) { play = 14; } +		else if (note == 3) { play = 16; } +		else if (note == 4) { play = 17; } +		else if (note == 5) { play = 19; } +		else if (note == 6) { play = 21; } +		else if (note == 7) { play = 23; } +		else if (note == 8) { play = 0; } + +		PlaySoundAsync(this, Notes[play]); +	} +	else { +		dSingAlong::instance->RegisterNote(this->note); +	}  	physics.setup(this, &physicsInfo, 3, currentLayerID);  	physics.addToList();  | 
