summaryrefslogtreecommitdiff
path: root/src/creditsMgr.cpp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2013-04-09 22:29:27 +0200
committerTreeki <treeki@gmail.com>2013-04-09 22:29:27 +0200
commit84825d9314ddffccd65c387604ed51f529fa5cab (patch)
tree4e5d1d7ef9a1706377cf553299bdc9f8f9a9a147 /src/creditsMgr.cpp
parentf6d7c23a5643b637fc172bd0a40fb62e6abbb853 (diff)
downloadkamek-84825d9314ddffccd65c387604ed51f529fa5cab.tar.gz
kamek-84825d9314ddffccd65c387604ed51f529fa5cab.zip
credits sequence final fixes
Diffstat (limited to 'src/creditsMgr.cpp')
-rw-r--r--src/creditsMgr.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/creditsMgr.cpp b/src/creditsMgr.cpp
index e4dafda..0d7b5e7 100644
--- a/src/creditsMgr.cpp
+++ b/src/creditsMgr.cpp
@@ -27,6 +27,9 @@ void EGG__Heap__free(void *ptr, void *heap);
extern char CameraLockEnabled;
extern VEC2 CameraLockPosition;
+extern char isLockPlayerRotation;
+extern s16 lockedPlayerRotation;
+
mTexture_c efbTexture;
bool getNextEFB = false;
int thing = 0;
@@ -164,6 +167,8 @@ int dCreditsMgr_c::onCreate() {
}
int dCreditsMgr_c::onDelete() {
+ isLockPlayerRotation = false;
+
scriptLoader.unload();
return layout.free() && titleLayout.free();
}
@@ -214,6 +219,9 @@ int dCreditsMgr_c::onExecute() {
VEC3 efPos = {10208.0f + xOffs, -304.0f - yOffs, pos.z + 200.0f};
SpawnEffect(fw[fwID], 0, &efPos, 0, 0);
+
+ nw4r::snd::SoundHandle handle;
+ PlaySoundWithFunctionB4(SoundRelatedClass, &handle, SE_OBJ_GOAL_FIREWORKS, 1);
}
}
@@ -461,6 +469,18 @@ void dCreditsMgr_c::doAutoscroll(int pathID) {
fauxScrollY = -firstNode->yPos;
CameraLockEnabled = 1;
+
+ // set directions
+ isLockPlayerRotation = true;
+ lockedPlayerRotation = endingMode ? 0 : 0x3000;
+
+ for (int i = 0; i < 4; i++) {
+ dAcPy_c *player;
+ if ((player = dAcPy_c::findByID(i))) {
+ player->direction = 0;
+ player->rot.y = 0x3000;
+ }
+ }
}
void dCreditsMgr_c::animComplete() {