summaryrefslogtreecommitdiff
path: root/src/koopatlas/player.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/koopatlas/player.cpp69
1 files changed, 0 insertions, 69 deletions
diff --git a/src/koopatlas/player.cpp b/src/koopatlas/player.cpp
index 3a736b4..abfb329 100644
--- a/src/koopatlas/player.cpp
+++ b/src/koopatlas/player.cpp
@@ -1,5 +1,4 @@
#include "koopatlas/player.h"
-#include "koopatlas/subplayer.h"
daWMPlayer_c *daWMPlayer_c::instance;
@@ -42,38 +41,6 @@ int daWMPlayer_c::onExecute() {
dScKoopatlas_c::instance->pathManager.execute();
- // work out the Z positions first of all
- struct ySortThing_s {
- float y; int id;
- };
- ySortThing_s sorts[4];
- sorts[0].y = pos.y;
- sorts[0].id = 0;
- for (int i = 1; i < 4; i++) {
- sorts[i].y = stateHistory[i * SUBPLAYER_DISTANCE].pos.y;
- sorts[i].id = i;
- }
-
- // bubble sort it with an algorithm from wikipedia
- bool swapped;
- do {
- swapped = false;
- for (int i = 1; i < 4; i++) {
- if (sorts[i-1].y > sorts[i].y) {
- ySortThing_s forSwap = sorts[i-1];
- sorts[i-1] = sorts[i];
- sorts[i] = forSwap;
- swapped = true;
- }
- }
- } while (swapped);
-
- // then put together the positions
- float chosenZPositions[4];
- for (int i = 0; i < 4; i++)
- chosenZPositions[sorts[i].id] = 3100.0f - (i * 25.0f);
- pos.z = chosenZPositions[0];
-
this->modelHandler->update();
mMtx myMatrix;
@@ -101,42 +68,6 @@ int daWMPlayer_c::onExecute() {
if (timer > 12) { timer = 0; }
}
- if (stateHistoryBuilt) {
- for (int i = STATE_COUNT - 1; i >= 1; i--)
- stateHistory[i] = stateHistory[i - 1];
- }
-
- state_s *st = &stateHistory[0];
- st->pos = pos;
- st->scale = scale;
- st->rot = rot;
- st->repeatedEffect = (hasEffect ? effectName : 0);
- st->nowEffect = nextNowEffect;
- st->repeatedSound = (hasSound ? soundName : 0);
- st->nowSound = nextNowSound;
- st->jumpOffset = jumpOffset;
- st->anim = currentAnim;
- st->animFrame = currentFrame;
- st->animUnk = currentUnk;
- st->animUpdateRate = currentUpdateRate;
-
- if (!stateHistoryBuilt) {
- for (int i = 1; i < STATE_COUNT; i++)
- stateHistory[i] = stateHistory[0];
- stateHistoryBuilt = true;
- }
-
- nextNowEffect = 0;
- nextNowSound = 0;
-
- for (int i = 0; i < 3; i++) {
- daWMSubPlayer_c *sp = dScKoopatlas_c::instance->subPlayer[i];
-
- state_s *st = &stateHistory[(i+1) * SUBPLAYER_DISTANCE];
- st->pos.z = chosenZPositions[i+1];
- sp->update(st);
- }
-
return true;
}