{ "gfx.game.button.panel_sound_loops", UNDEFINED_FILENAME },
{ "gfx.game.button.panel_sound_simple", UNDEFINED_FILENAME },
+ { "gfx.game.button.touch_stop", "RocksTouch.png" },
+ { "gfx.game.button.touch_stop.x", "210" },
+ { "gfx.game.button.touch_stop.y", "120" },
+ { "gfx.game.button.touch_stop.width", "60" },
+ { "gfx.game.button.touch_stop.height", "60" },
+ { "gfx.game.button.touch_stop.pressed_xoffset", "-200" },
+ { "gfx.game.button.touch_pause", "RocksTouch.png" },
+ { "gfx.game.button.touch_pause.x", "270" },
+ { "gfx.game.button.touch_pause.y", "120" },
+ { "gfx.game.button.touch_pause.width", "60" },
+ { "gfx.game.button.touch_pause.height", "60" },
+ { "gfx.game.button.touch_pause.pressed_xoffset", "-200" },
+ { "gfx.game.button.touch_pause.active_yoffset", "60" },
+
{ "gfx.tape.button.eject", "RocksDoor.png" },
{ "gfx.tape.button.eject.x", "305" },
{ "gfx.tape.button.eject.y", "357" },
{ "game.button.panel_sound_simple.x", "-1" },
{ "game.button.panel_sound_simple.y", "-1" },
+ { "game.button.touch_stop.x", "0" },
+ { "game.button.touch_stop.y", "0" },
+ { "game.button.touch_pause.x", "-60" },
+ { "game.button.touch_pause.y", "0" },
+
{ "tape.button.eject.x", "5" },
{ "tape.button.eject.y", "77" },
{ "tape.button.stop.x", "23" },
#define GAME_CTRL_ID_PANEL_STOP 8
#define GAME_CTRL_ID_PANEL_PAUSE 9
#define GAME_CTRL_ID_PANEL_PLAY 10
-#define SOUND_CTRL_ID_MUSIC 11
-#define SOUND_CTRL_ID_LOOPS 12
-#define SOUND_CTRL_ID_SIMPLE 13
-#define SOUND_CTRL_ID_PANEL_MUSIC 14
-#define SOUND_CTRL_ID_PANEL_LOOPS 15
-#define SOUND_CTRL_ID_PANEL_SIMPLE 16
+#define GAME_CTRL_ID_TOUCH_STOP 11
+#define GAME_CTRL_ID_TOUCH_PAUSE 12
+#define SOUND_CTRL_ID_MUSIC 13
+#define SOUND_CTRL_ID_LOOPS 14
+#define SOUND_CTRL_ID_SIMPLE 15
+#define SOUND_CTRL_ID_PANEL_MUSIC 16
+#define SOUND_CTRL_ID_PANEL_LOOPS 17
+#define SOUND_CTRL_ID_PANEL_SIMPLE 18
-#define NUM_GAME_BUTTONS 17
+#define NUM_GAME_BUTTONS 19
// forward declaration for internal use
int gadget_id;
boolean *setup_value;
boolean allowed_on_tape;
+ boolean is_touch_button;
char *infotext;
} gamebutton_info[NUM_GAME_BUTTONS] =
{
{
IMG_GFX_GAME_BUTTON_STOP, &game.button.stop,
GAME_CTRL_ID_STOP, NULL,
- TRUE, "stop game"
+ TRUE, FALSE, "stop game"
},
{
IMG_GFX_GAME_BUTTON_PAUSE, &game.button.pause,
GAME_CTRL_ID_PAUSE, NULL,
- TRUE, "pause game"
+ TRUE, FALSE, "pause game"
},
{
IMG_GFX_GAME_BUTTON_PLAY, &game.button.play,
GAME_CTRL_ID_PLAY, NULL,
- TRUE, "play game"
+ TRUE, FALSE, "play game"
},
{
IMG_GFX_GAME_BUTTON_UNDO, &game.button.undo,
GAME_CTRL_ID_UNDO, NULL,
- TRUE, "undo step"
+ TRUE, FALSE, "undo step"
},
{
IMG_GFX_GAME_BUTTON_REDO, &game.button.redo,
GAME_CTRL_ID_REDO, NULL,
- TRUE, "redo step"
+ TRUE, FALSE, "redo step"
},
{
IMG_GFX_GAME_BUTTON_SAVE, &game.button.save,
GAME_CTRL_ID_SAVE, NULL,
- TRUE, "save game"
+ TRUE, FALSE, "save game"
},
{
IMG_GFX_GAME_BUTTON_PAUSE2, &game.button.pause2,
GAME_CTRL_ID_PAUSE2, NULL,
- TRUE, "pause game"
+ TRUE, FALSE, "pause game"
},
{
IMG_GFX_GAME_BUTTON_LOAD, &game.button.load,
GAME_CTRL_ID_LOAD, NULL,
- TRUE, "load game"
+ TRUE, FALSE, "load game"
},
{
IMG_GFX_GAME_BUTTON_PANEL_STOP, &game.button.panel_stop,
GAME_CTRL_ID_PANEL_STOP, NULL,
- FALSE, "stop game"
+ FALSE, FALSE, "stop game"
},
{
IMG_GFX_GAME_BUTTON_PANEL_PAUSE, &game.button.panel_pause,
GAME_CTRL_ID_PANEL_PAUSE, NULL,
- FALSE, "pause game"
+ FALSE, FALSE, "pause game"
},
{
IMG_GFX_GAME_BUTTON_PANEL_PLAY, &game.button.panel_play,
GAME_CTRL_ID_PANEL_PLAY, NULL,
- FALSE, "play game"
+ FALSE, FALSE, "play game"
+ },
+ {
+ IMG_GFX_GAME_BUTTON_TOUCH_STOP, &game.button.touch_stop,
+ GAME_CTRL_ID_TOUCH_STOP, NULL,
+ FALSE, TRUE, "stop game"
+ },
+ {
+ IMG_GFX_GAME_BUTTON_TOUCH_PAUSE, &game.button.touch_pause,
+ GAME_CTRL_ID_TOUCH_PAUSE, NULL,
+ FALSE, TRUE, "pause game"
},
{
IMG_GFX_GAME_BUTTON_SOUND_MUSIC, &game.button.sound_music,
SOUND_CTRL_ID_MUSIC, &setup.sound_music,
- TRUE, "background music on/off"
+ TRUE, FALSE, "background music on/off"
},
{
IMG_GFX_GAME_BUTTON_SOUND_LOOPS, &game.button.sound_loops,
SOUND_CTRL_ID_LOOPS, &setup.sound_loops,
- TRUE, "sound loops on/off"
+ TRUE, FALSE, "sound loops on/off"
},
{
IMG_GFX_GAME_BUTTON_SOUND_SIMPLE, &game.button.sound_simple,
SOUND_CTRL_ID_SIMPLE, &setup.sound_simple,
- TRUE, "normal sounds on/off"
+ TRUE, FALSE, "normal sounds on/off"
},
{
IMG_GFX_GAME_BUTTON_PANEL_SOUND_MUSIC, &game.button.panel_sound_music,
SOUND_CTRL_ID_PANEL_MUSIC, &setup.sound_music,
- FALSE, "background music on/off"
+ FALSE, FALSE, "background music on/off"
},
{
IMG_GFX_GAME_BUTTON_PANEL_SOUND_LOOPS, &game.button.panel_sound_loops,
SOUND_CTRL_ID_PANEL_LOOPS, &setup.sound_loops,
- FALSE, "sound loops on/off"
+ FALSE, FALSE, "sound loops on/off"
},
{
IMG_GFX_GAME_BUTTON_PANEL_SOUND_SIMPLE, &game.button.panel_sound_simple,
SOUND_CTRL_ID_PANEL_SIMPLE, &setup.sound_simple,
- FALSE, "normal sounds on/off"
+ FALSE, FALSE, "normal sounds on/off"
}
};
int button_type;
boolean checked;
unsigned int event_mask;
+ boolean is_touch_button = gamebutton_info[i].is_touch_button;
boolean allowed_on_tape = gamebutton_info[i].allowed_on_tape;
boolean on_tape = (tape.show_game_buttons && allowed_on_tape);
- int base_x = (on_tape ? VX : DX);
- int base_y = (on_tape ? VY : DY);
+ int base_x = (is_touch_button ? 0 : on_tape ? VX : DX);
+ int base_y = (is_touch_button ? 0 : on_tape ? VY : DY);
int gd_x = gfx->src_x;
int gd_y = gfx->src_y;
int gd_xp = gfx->src_x + gfx->pressed_xoffset;
int gd_ya = gfx->src_y + gfx->active_yoffset;
int gd_xap = gfx->src_x + gfx->active_xoffset + gfx->pressed_xoffset;
int gd_yap = gfx->src_y + gfx->active_yoffset + gfx->pressed_yoffset;
+ int x = (is_touch_button ? pos->x : GDI_ACTIVE_POS(pos->x));
+ int y = (is_touch_button ? pos->y : GDI_ACTIVE_POS(pos->y));
int id = i;
if (gfx->bitmap == NULL)
if (id == GAME_CTRL_ID_STOP ||
id == GAME_CTRL_ID_PANEL_STOP ||
+ id == GAME_CTRL_ID_TOUCH_STOP ||
id == GAME_CTRL_ID_PLAY ||
id == GAME_CTRL_ID_PANEL_PLAY ||
id == GAME_CTRL_ID_SAVE ||
gi = CreateGadget(GDI_CUSTOM_ID, id,
GDI_IMAGE_ID, graphic,
GDI_INFO_TEXT, gamebutton_info[i].infotext,
- GDI_X, base_x + GDI_ACTIVE_POS(pos->x),
- GDI_Y, base_y + GDI_ACTIVE_POS(pos->y),
+ GDI_X, base_x + x,
+ GDI_Y, base_y + y,
GDI_WIDTH, gfx->width,
GDI_HEIGHT, gfx->height,
GDI_TYPE, button_type,
GDI_ALT_DESIGN_UNPRESSED, gfx->bitmap, gd_xa, gd_ya,
GDI_ALT_DESIGN_PRESSED, gfx->bitmap, gd_xap, gd_yap,
GDI_DIRECT_DRAW, FALSE,
+ GDI_OVERLAY_TOUCH_BUTTON, is_touch_button,
GDI_EVENT_MASK, event_mask,
GDI_CALLBACK_ACTION, HandleGameButtons,
GDI_END);
GAME_CTRL_ID_PAUSE,
GAME_CTRL_ID_PAUSE2,
GAME_CTRL_ID_PANEL_PAUSE,
+ GAME_CTRL_ID_TOUCH_PAUSE,
-1
};
int i;
{
case GAME_CTRL_ID_STOP:
case GAME_CTRL_ID_PANEL_STOP:
+ case GAME_CTRL_ID_TOUCH_STOP:
if (game_status == GAME_MODE_MAIN)
break;
case GAME_CTRL_ID_PAUSE:
case GAME_CTRL_ID_PAUSE2:
case GAME_CTRL_ID_PANEL_PAUSE:
+ case GAME_CTRL_ID_TOUCH_PAUSE:
if (network.enabled && game_status == GAME_MODE_PLAYING)
{
if (tape.pausing)