openbsd-ports/games/kobodeluxe/patches/patch-gamectl_cpp
2007-12-05 10:49:24 +00:00

39 lines
939 B
Plaintext

$OpenBSD: patch-gamectl_cpp,v 1.2 2007/12/05 10:49:24 ajacoutot Exp $
--- gamectl.cpp.orig Sun Oct 28 02:28:04 2007
+++ gamectl.cpp Wed Dec 5 11:23:44 2007
@@ -38,7 +38,7 @@ int gamecontrol_t::dl;
int gamecontrol_t::dr;
int gamecontrol_t::ul;
int gamecontrol_t::ur;
-int gamecontrol_t::shot;
+int gamecontrol_t::shot = 1;
int gamecontrol_t::direction = 1;
int gamecontrol_t::new_direction = 0;
int gamecontrol_t::latch_timer = 0;
@@ -52,7 +52,7 @@ void gamecontrol_t::init(int always_fire)
right = 0;
up = 0;
down = 0;
- shot = 0;
+ shot = 1;
movekey_pressed = 0;
SDL_EnableKeyRepeat(r_delay, r_interval);
}
@@ -213,7 +213,7 @@ void gamecontrol_t::press(int k)
dr = 1;
break;
case BTN_FIRE:
- shot = 1;
+ shot = !shot;
break;
}
gamecontrol_t::change();
@@ -248,7 +248,6 @@ void gamecontrol_t::release(int k)
dr = 0;
break;
case BTN_FIRE:
- shot = 0;
break;
}
gamecontrol_t::change();