From 9640a0b9ea3e031c86187f10e53553a8cc9b5213 Mon Sep 17 00:00:00 2001
From: Treeki <treeki@gmail.com>
Date: Thu, 18 Oct 2012 23:35:18 +0200
Subject: sound shit on map

---
 src/koopatlas/pathmanager.cpp | 30 ++++++++++++++++++++++++------
 1 file changed, 24 insertions(+), 6 deletions(-)

(limited to 'src/koopatlas')

diff --git a/src/koopatlas/pathmanager.cpp b/src/koopatlas/pathmanager.cpp
index 70f3fab..bb6cc52 100644
--- a/src/koopatlas/pathmanager.cpp
+++ b/src/koopatlas/pathmanager.cpp
@@ -4,6 +4,8 @@
 #include "koopatlas/player.h"
 #include <sfx.h>
 
+extern "C" void PlaySoundWithFunctionB4(void *spc, void *handle, int id, int unk);
+
 static u8 MaybeFinishingLevel[2] = {0xFF,0xFF};
 
 void dWMPathManager_c::setup() {
@@ -329,7 +331,9 @@ void dWMPathManager_c::execute() {
 		countdownToFadeIn--;
 		if (countdownToFadeIn <= 0) {
 			unlockingAlpha = 0;
-			MapSoundPlayer(SoundRelatedClass, SE_SYS_NEW_POINT, 1);
+
+			u32 something = 0;
+			PlaySoundWithFunctionB4(SoundRelatedClass, &something, SE_OBJ_GEN_LOAD, 1);
 		} else {
 			return;
 		}
@@ -355,7 +359,8 @@ void dWMPathManager_c::execute() {
 		if (unlockingAlpha == 255) {
 			// we've reached the end
 			unlockingAlpha = -1;
-			MapSoundPlayer(SoundRelatedClass, SE_SYS_NEW_POINT_END, 1);
+			u32 something = 0;
+			PlaySoundWithFunctionB4(SoundRelatedClass, &something, SE_OBJ_GEN_NEW_COURSE, 1);
 			waitAfterUnlock = 15;
 
 			for (int i = 0; i < pathLayer->nodeCount; i++) {
@@ -539,8 +544,15 @@ void dWMPathManager_c::startMovementTo(dKPPath_s *path) {
 
 	if (Animations[id].initialEffect)
 		SpawnEffect(Animations[id].initialEffect, 0, &player->pos, 0, &player->scale);
-	if (Animations[id].initialSound != SE_NULL)
-		MapSoundPlayer(SoundRelatedClass, Animations[id].initialSound, 1);
+	if (Animations[id].initialSound != SE_NULL) {
+		u32 something = 0;
+		PlaySoundWithFunctionB4(SoundRelatedClass, &something, Animations[id].initialSound, 1);
+
+		if (Animations[id].initialSound == SE_PLY_JUMP) {
+			u32 something2 = 0;
+			PlaySoundWithFunctionB4(SoundRelatedClass, &something2, SE_VOC_MA_CS_JUMP, 1);
+		}
+	}
 }
 
 void dWMPathManager_c::moveThroughPath() {
@@ -743,11 +755,17 @@ void dWMPathManager_c::activatePoint() {
 			SpammyReport("Toad House Flags: %x", conds);
 			if (conds & 0xFF0) { 
 
-				MapSoundPlayer(SoundRelatedClass, SE_SYS_INVALID, 1);
+				u32 something = 0;
+				PlaySoundWithFunctionB4(SoundRelatedClass, &something, SE_SYS_INVALID, 1);
 				return; }
 		}
 
-		MapSoundPlayer(SoundRelatedClass, SE_SYS_GAME_START, 1);
+		u32 something = 0;
+		PlaySoundWithFunctionB4(SoundRelatedClass, &something, SE_SYS_GAME_START, 1);
+
+		u32 something2 = 0;
+		PlaySoundWithFunctionB4(SoundRelatedClass, &something2, SE_VOC_MA_CS_COURSE_IN_HARD, 1);
+
 		daWMPlayer_c::instance->startAnimation(170, 1.2, 10.0, 0.0);
 		daWMPlayer_c::instance->rot.y = 0;
 
-- 
cgit v1.2.3