diff options
Diffstat (limited to '')
-rw-r--r-- | src/koopatlas/camera.cpp | 63 |
1 files changed, 33 insertions, 30 deletions
diff --git a/src/koopatlas/camera.cpp b/src/koopatlas/camera.cpp index bfcc674..9efbcd6 100644 --- a/src/koopatlas/camera.cpp +++ b/src/koopatlas/camera.cpp @@ -31,8 +31,8 @@ dWorldCamera_c::dWorldCamera_c() { projection2d.near = 1.0; projection2d.far = 20000.0; - currentX = 0; - currentY = 0; + currentX = 416; + currentY = -224; zoomLevel = 2.0f; } @@ -68,34 +68,37 @@ int dWorldCamera_c::onDelete() { int dWorldCamera_c::onExecute() { - int nowPressed = Remocon_GetPressed(GetActiveRemocon()); - bool change = false; - if (nowPressed & WPAD_LEFT) { - currentX -= 16; - change = true; - } - if (nowPressed & WPAD_RIGHT) { - currentX += 16; - change = true; - } - if (nowPressed & WPAD_UP) { - currentY += 16; - change = true; - } - if (nowPressed & WPAD_DOWN) { - currentY -= 16; - change = true; - } - if (nowPressed & WPAD_B) { - zoomLevel -= 0.02; - change = true; - } - if (nowPressed & WPAD_A) { - zoomLevel += 0.02; - change = true; - } - if (change) { - OSReport("%f, %f (%f)\n", currentX, currentY, zoomLevel); + int heldButtons = Remocon_GetButtons(GetActiveRemocon()); + if (heldButtons & WPAD_MINUS) { + int nowPressed = Remocon_GetPressed(GetActiveRemocon()); + bool change = false; + if (nowPressed & WPAD_LEFT) { + currentX -= 16; + change = true; + } + if (nowPressed & WPAD_RIGHT) { + currentX += 16; + change = true; + } + if (nowPressed & WPAD_UP) { + currentY += 16; + change = true; + } + if (nowPressed & WPAD_DOWN) { + currentY -= 16; + change = true; + } + if (nowPressed & WPAD_B) { + zoomLevel -= 0.02; + change = true; + } + if (nowPressed & WPAD_A) { + zoomLevel += 0.02; + change = true; + } + if (change) { + OSReport("%f, %f (%f)\n", currentX, currentY, zoomLevel); + } } calculateScreenGeometry(); doStuff(10000.0); |