projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-19981217-3
[rocksndiamonds.git]
/
src
/
events.c
diff --git
a/src/events.c
b/src/events.c
index 53b8171422ab97d250b7f66508d5944fff877726..e46b177553430e80ffb8fdac0ad6f0246d65921c 100644
(file)
--- a/
src/events.c
+++ b/
src/events.c
@@
-270,22
+270,24
@@
void HandleButton(int mx, int my, int button)
{
static int old_mx = 0, old_my = 0;
{
static int old_mx = 0, old_my = 0;
- if (
mx<0 || my<
0)
+ if (
button <
0)
{
mx = old_mx;
my = old_my;
{
mx = old_mx;
my = old_my;
+ button = -button;
}
else
{
old_mx = mx;
old_my = my;
}
else
{
old_mx = mx;
old_my = my;
- HandleGadgets(mx,my, button);
HandleVideoButtons(mx,my, button);
HandleSoundButtons(mx,my, button);
HandleGameButtons(mx,my, button);
}
HandleVideoButtons(mx,my, button);
HandleSoundButtons(mx,my, button);
HandleGameButtons(mx,my, button);
}
+ HandleGadgets(mx, my, button);
+
switch(game_status)
{
case MAINMENU:
switch(game_status)
{
case MAINMENU:
@@
-610,7
+612,7
@@
void HandleNoXEvent()
{
if (button_status && game_status != PLAYING)
{
{
if (button_status && game_status != PLAYING)
{
- HandleButton(
-1,-1,
button_status);
+ HandleButton(
0, 0, -
button_status);
return;
}
return;
}
@@
-676,7
+678,8
@@
void HandleJoystick()
{
static unsigned long joystickmove_delay = 0;
{
static unsigned long joystickmove_delay = 0;
- if (joystick && !button && !DelayReached(&joystickmove_delay, 150))
+ if (joystick && !button &&
+ !DelayReached(&joystickmove_delay, GADGET_FRAME_DELAY))
newbutton = dx = dy = 0;
if (game_status==MAINMENU)
newbutton = dx = dy = 0;
if (game_status==MAINMENU)