diff options
Diffstat (limited to 'src/koopatlas/player.cpp')
-rw-r--r-- | src/koopatlas/player.cpp | 93 |
1 files changed, 2 insertions, 91 deletions
diff --git a/src/koopatlas/player.cpp b/src/koopatlas/player.cpp index 32cc684..4a15f94 100644 --- a/src/koopatlas/player.cpp +++ b/src/koopatlas/player.cpp @@ -37,8 +37,8 @@ int daWMPlayer_c::onDelete() { int daWMPlayer_c::onExecute() { this->modelHandler->update(); - this->modelHandler->setSRT(this->pos, this->rot, this->scale); - + Vec modifiedPos = {pos.x, pos.y + jumpOffset, pos.z}; + this->modelHandler->setSRT(modifiedPos, this->rot, this->scale); if (hasEffect) { effect.spawn(effectName, 0, &pos, &rot, &scale); } @@ -54,99 +54,10 @@ 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 - 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; |