summaryrefslogtreecommitdiff
path: root/src/koopatlas/pathmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/koopatlas/pathmanager.cpp')
-rw-r--r--src/koopatlas/pathmanager.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/koopatlas/pathmanager.cpp b/src/koopatlas/pathmanager.cpp
index 6134dc6..8a05ea4 100644
--- a/src/koopatlas/pathmanager.cpp
+++ b/src/koopatlas/pathmanager.cpp
@@ -352,6 +352,12 @@ void dWMPathManager_c::execute() {
activatePoint();
if (pressedDir >= 0) {
+ static u16 xangles[] = {-0,0,0x1800,-0x1800};
+ daWMPlayer_c::instance->rot.x = xangles[pressedDir];
+
+ static u16 zangles[] = {-0x1800,0x1800,0,0};
+ daWMPlayer_c::instance->rot.z = zangles[pressedDir];
+
if (canUseExit(currentNode->exits[pressedDir])) {
startMovementTo(currentNode->exits[pressedDir]);
} else {
@@ -473,6 +479,12 @@ void dWMPathManager_c::startMovementTo(dKPPath_s *path) {
player->startAnimation(Animations[id].anim, Animations[id].animParam1, Animations[id].animParam2, 0.0f);
player->rot.y = (Animations[id].forceRotation != -1) ? Animations[id].forceRotation : direction;
+
+ OSReport("Rot.y = %08x", player->rot.y);
+ player->rot.x = (player->rot.y < 0) ? -((player->rot.y + 0x4000) * 0x1800 / 0x8000 * 2) : (player->rot.y - 0x4000) * 0x1800 / 0x8000 * 2;
+ player->rot.z = (player->rot.y < 0) ? -((player->rot.y + 0x8000) * 0x1800 / 0x8000 * 2) : (player->rot.y ) * 0x1800 / 0x8000 * 2;
+
+
moveSpeed = (Animations[id].forceSpeed >= 0.0f) ? Animations[id].forceSpeed : 3.0f;
if (Animations[id].repeatEffect) {
@@ -673,7 +685,7 @@ void dWMPathManager_c::activatePoint() {
int w = currentNode->levelNumber[0] - 1;
int l = currentNode->levelNumber[1] - 1;
- if (l == 40) {
+ if (l == 98) {
dWMShop_c::instance->LoadShopForWorld(w);
dScKoopatlas_c::instance->state.setState(&dScKoopatlas_c::instance->StateID_ShopWait);
return;
@@ -693,6 +705,8 @@ void dWMPathManager_c::activatePoint() {
MapSoundPlayer(SoundRelatedClass, SE_SYS_GAME_START, 1);
daWMPlayer_c::instance->startAnimation(170, 1.2, 10.0, 0.0);
daWMPlayer_c::instance->rot.y = 0;
+ daWMPlayer_c::instance->rot.x = -0x1800;
+ daWMPlayer_c::instance->rot.z = 0;
isEnteringLevel = true;
levelStartWait = 40;