diff options
Diffstat (limited to '')
-rw-r--r-- | src/koopatlas/pathmanager.cpp | 12 | ||||
-rw-r--r-- | src/koopatlas/player.cpp | 12 |
2 files changed, 9 insertions, 15 deletions
diff --git a/src/koopatlas/pathmanager.cpp b/src/koopatlas/pathmanager.cpp index acaee42..5cf029c 100644 --- a/src/koopatlas/pathmanager.cpp +++ b/src/koopatlas/pathmanager.cpp @@ -391,12 +391,6 @@ 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 { @@ -519,10 +513,6 @@ void dWMPathManager_c::startMovementTo(dKPPath_s *path) { 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; @@ -753,8 +743,6 @@ 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; diff --git a/src/koopatlas/player.cpp b/src/koopatlas/player.cpp index 97b4d8d..a3e484a 100644 --- a/src/koopatlas/player.cpp +++ b/src/koopatlas/player.cpp @@ -14,7 +14,7 @@ int daWMPlayer_c::onCreate() { hammerSuit.setup(this->modelHandler); pos = (Vec){0.0f,0.0f,3000.0f}; - rot = (S16Vec){-0x1800,0,0}; + rot = (S16Vec){0x1800,0,0}; scale = (Vec){1.6f,1.6f,1.6f}; current_param = 0; @@ -44,8 +44,14 @@ int daWMPlayer_c::onExecute() { dScKoopatlas_c::instance->pathManager.execute(); this->modelHandler->update(); - Vec modifiedPos = {pos.x, pos.y + jumpOffset, pos.z}; - this->modelHandler->setSRT(modifiedPos, this->rot, this->scale); + + mMtx myMatrix; + myMatrix.scale(scale.x, scale.y, scale.z); + myMatrix.applyTranslation(pos.x, pos.y + jumpOffset, pos.z); + myMatrix.applyRotationX(&rot.x); + myMatrix.applyRotationY(&rot.y); + // Z is unused for now + modelHandler->setMatrix(myMatrix); if (hasEffect) { Vec effPos = {pos.x, pos.y, 3300.0f}; |