summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-10-18 23:35:18 +0200
committerTreeki <treeki@gmail.com>2012-10-18 23:35:18 +0200
commit9640a0b9ea3e031c86187f10e53553a8cc9b5213 (patch)
treecf1f306c6574a4fa54210af437de3505bb3231a5
parent9cf8cf3ac24149320f8c7adcd432fcf2654e5743 (diff)
downloadkamek-9640a0b9ea3e031c86187f10e53553a8cc9b5213.tar.gz
kamek-9640a0b9ea3e031c86187f10e53553a8cc9b5213.zip
sound shit on map
-rw-r--r--kamek_pal.x1
-rw-r--r--src/koopatlas/pathmanager.cpp30
2 files changed, 25 insertions, 6 deletions
diff --git a/kamek_pal.x b/kamek_pal.x
index 00fe7f5..885f3ad 100644
--- a/kamek_pal.x
+++ b/kamek_pal.x
@@ -200,6 +200,7 @@ SECTIONS {
SoundRelatedClass = 0x8042A768;
MapSoundPlayer = 0x801954C0;
+ PlaySoundWithFunctionB4 = 0x801951D0;
ConvertStagePositionToScreenPosition__FP7Point2dP7Point3d = 0x8006A4B0;
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;