summaryrefslogtreecommitdiff
path: root/src/koopatlas/player.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/koopatlas/player.cpp162
1 files changed, 89 insertions, 73 deletions
diff --git a/src/koopatlas/player.cpp b/src/koopatlas/player.cpp
index d0ec607..32cc684 100644
--- a/src/koopatlas/player.cpp
+++ b/src/koopatlas/player.cpp
@@ -23,6 +23,7 @@ int daWMPlayer_c::onCreate() {
effectName = "";
soundName = 0;
timer = 0;
+ jumpOffset = 0.0;
return true;
}
@@ -53,84 +54,99 @@ int daWMPlayer_c::onExecute() {
if (timer > 12) { timer = 0; }
}
-
-
-// #ifdef MARIO_OPTIONS
-// // Before we leave, do the debug movement stuff
-// int heldButtons = Remocon_GetButtons(GetActiveRemocon());
-// int nowPressed = Remocon_GetPressed(GetActiveRemocon());
-// char buf[100];
-// bool updated = false;
-
-// if (nowPressed & WPAD_LEFT) {
-// current_param--;
-// updated = true;
-// }
-
-// if (nowPressed & WPAD_RIGHT) {
-// current_param++;
-// updated = true;
-// }
-
-// if (current_param < 0)
-// current_param = 8;
-
-// if (current_param > 8)
-// current_param = 0;
-
-// float pos_mod = 0.0f;
-// short rot_mod = 0.0f;
-// float scale_mod = 0.0f;
-// if (nowPressed & WPAD_ONE) {
-// pos_mod -= 5.0f;
-// rot_mod -= 0x1000;
-// scale_mod -= 0.1f;
-// updated = true;
-// } else if (nowPressed & WPAD_TWO) {
-// pos_mod += 5.0f;
-// rot_mod += 0x1000;
-// scale_mod += 0.1f;
-// updated = true;
-// }
-
-// if (!updated) return true;
-
-// if (current_param == 0) {
-// pos.x += pos_mod;
-// sprintf(buf, "X position: %f", pos.x);
-// } else if (current_param == 1) {
-// pos.y += pos_mod;
-// sprintf(buf, "Y position: %f", pos.y);
-// } else if (current_param == 2) {
-// pos.z += pos_mod;
-// sprintf(buf, "Z position: %f", pos.z);
-// } else if (current_param == 3) {
-// rot.x += rot_mod;
-// sprintf(buf, "X rotation: 0x%04x", rot.x);
-// } else if (current_param == 4) {
-// rot.y += rot_mod;
-// sprintf(buf, "Y rotation: 0x%04x", rot.y);
-// } else if (current_param == 5) {
-// rot.z += rot_mod;
-// sprintf(buf, "Z rotation: 0x%04x", rot.z);
-// } else if (current_param == 6) {
-// scale.x += scale_mod;
-// sprintf(buf, "X scale: %f", scale.x);
-// } else if (current_param == 7) {
-// scale.y += scale_mod;
-// sprintf(buf, "Y scale: %f", scale.y);
-// } else if (current_param == 8) {
-// scale.z += scale_mod;
-// sprintf(buf, "Z scale: %f", scale.z);
-// }
-
-// dScNewerWorldMap_c::instance->SetTitle(buf);
-// #endif
+ // #ifdef MARIO_OPTIONS
+ // // Before we leave, do the debug movement stuff
+ // int heldButtons = Remocon_GetButtons(GetActiveRemocon());
+ // int nowPressed = Remocon_GetPressed(GetActiveRemocon());
+ // char buf[100];
+ // bool updated = false;
+
+ // if (nowPressed & WPAD_LEFT) {
+ // current_param--;
+ // updated = true;
+ // }
+
+ // if (nowPressed & WPAD_RIGHT) {
+ // current_param++;
+ // updated = true;
+ // }
+
+ // if (current_param < 0)
+ // current_param = 8;
+
+ // if (current_param > 8)
+ // current_param = 0;
+
+ // float pos_mod = 0.0f;
+ // short rot_mod = 0.0f;
+ // float scale_mod = 0.0f;
+ // if (nowPressed & WPAD_ONE) {
+ // pos_mod -= 5.0f;
+ // rot_mod -= 0x1000;
+ // scale_mod -= 0.1f;
+ // updated = true;
+ // } else if (nowPressed & WPAD_TWO) {
+ // pos_mod += 5.0f;
+ // rot_mod += 0x1000;
+ // scale_mod += 0.1f;
+ // updated = true;
+ // }
+
+ // if (!updated) return true;
+
+ // if (current_param == 0) {
+ // pos.x += pos_mod;
+ // sprintf(buf, "X position: %f", pos.x);
+ // } else if (current_param == 1) {
+ // pos.y += pos_mod;
+ // sprintf(buf, "Y position: %f", pos.y);
+ // } else if (current_param == 2) {
+ // pos.z += pos_mod;
+ // sprintf(buf, "Z position: %f", pos.z);
+ // } else if (current_param == 3) {
+ // rot.x += rot_mod;
+ // sprintf(buf, "X rotation: 0x%04x", rot.x);
+ // } else if (current_param == 4) {
+ // rot.y += rot_mod;
+ // sprintf(buf, "Y rotation: 0x%04x", rot.y);
+ // } else if (current_param == 5) {
+ // rot.z += rot_mod;
+ // sprintf(buf, "Z rotation: 0x%04x", rot.z);
+ // } else if (current_param == 6) {
+ // scale.x += scale_mod;
+ // sprintf(buf, "X scale: %f", scale.x);
+ // } else if (current_param == 7) {
+ // scale.y += scale_mod;
+ // sprintf(buf, "Y scale: %f", scale.y);
+ // } else if (current_param == 8) {
+ // scale.z += scale_mod;
+ // sprintf(buf, "Z scale: %f", scale.z);
+ // }
+
+ // dScNewerWorldMap_c::instance->SetTitle(buf);
+ // #endif
return true;
}
int daWMPlayer_c::onDraw() {
+ matrix.translation(pos.x, pos.y + jumpOffset, pos.z);
+ matrix.applyRotationYXZ(&rot.x, &rot.y, &rot.z);
+
+
+
+
+
+ OSReport("someVector: %f", this->modelHandler->mdlClass->someVector.x);
+ this->modelHandler->mdlClass->someVector = (Vec){2.0,2.0,2.0};
+
+ OSReport("someVectorB: %f", this->modelHandler->mdlClass->someVectorB.x);
+ this->modelHandler->mdlClass->someVectorB = (Vec){2.0,2.0,2.0};
+
+ OSReport("headOffs: %f", this->modelHandler->mdlClass->headOffs.x);
+ this->modelHandler->mdlClass->headOffs = (Vec){2.0,2.0,2.0};
+
+ this->modelHandler->setMatrix(matrix);
this->modelHandler->draw();
return true;