summaryrefslogtreecommitdiff
path: root/src/koopatlas/player.cpp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-11-24 04:51:54 +0100
committerTreeki <treeki@gmail.com>2012-11-24 04:51:54 +0100
commite37a44245428c5809de867f20c6473c71c05b154 (patch)
tree9294c5ca026109a5dacdf772fd3ea5c23c4c2248 /src/koopatlas/player.cpp
parent29866fe6126d185f75002c3fd3c5f9214e72ddeb (diff)
downloadkamek-e37a44245428c5809de867f20c6473c71c05b154.tar.gz
kamek-e37a44245428c5809de867f20c6473c71c05b154.zip
removed 4P on map
Diffstat (limited to 'src/koopatlas/player.cpp')
-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;
}