[Scummvm-cvs-logs] scummvm master -> f2c03e575156ab815d9e2f3c2e0c55f42c0d91c3
urukgit
urukgit at users.noreply.github.com
Sat Mar 1 22:38:59 CET 2014
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
f2c03e5751 AVALANCHE: Implement shooting in ShootEmUp::readKbd().
Commit: f2c03e575156ab815d9e2f3c2e0c55f42c0d91c3
https://github.com/scummvm/scummvm/commit/f2c03e575156ab815d9e2f3c2e0c55f42c0d91c3
Author: uruk (koppirnyo at gmail.com)
Date: 2014-03-01T13:38:25-08:00
Commit Message:
AVALANCHE: Implement shooting in ShootEmUp::readKbd().
Changed paths:
engines/avalanche/shootemup.cpp
diff --git a/engines/avalanche/shootemup.cpp b/engines/avalanche/shootemup.cpp
index bf041b5..88de958 100644
--- a/engines/avalanche/shootemup.cpp
+++ b/engines/avalanche/shootemup.cpp
@@ -67,7 +67,7 @@ ShootEmUp::ShootEmUp(AvalancheEngine *vm) {
_avvyAnim = 1;
_avvyFacing = kFacingLeft;
_altWasPressedBefore = false;
- _throwNext = 74;
+ _throwNext = 73;
_firing = false;
for (int i = 0; i < 4; i++) {
_running[i]._x = kFlag;
@@ -420,6 +420,35 @@ void ShootEmUp::moveAvvy() {
}
void ShootEmUp::readKbd() {
+ Common::Event event;
+ _vm->getEvent(event);
+
+ if (_firing)
+ return;
+
+ if (event.type == Common::EVENT_KEYDOWN) {
+ if ((event.kbd.keycode == Common::KEYCODE_LALT) || (event.kbd.keycode == Common::KEYCODE_RALT)) {
+ if (_altWasPressedBefore || (_count321 != 0))
+ return;
+
+ _altWasPressedBefore = true;
+ _firing = true;
+ define(_avvyPos + 27, kAvvyY + 5, _throwNext, 0, -2, 53, true, true);
+ _throwNext++;
+ if (_throwNext == 79)
+ _throwNext = 73;
+ _avvyAnim = 0;
+ _wasFacing = _avvyFacing;
+ _avvyFacing = kAvvyShoots;
+ return;
+ }
+ }
+
+ if ((event.type == Common::EVENT_KEYUP) && ((event.kbd.keycode == Common::KEYCODE_LALT) || (event.kbd.keycode == Common::KEYCODE_RALT))) {
+ _altWasPressedBefore = false;
+ return;
+ }
+
warning("STUB: ShootEmUp::readKbd()");
}
More information about the Scummvm-git-logs
mailing list