- case EL_LEERRAUM: return(-1);
- case EL_ERDREICH: return(GFX_ERDREICH);
- case EL_MAUERWERK: return(GFX_MAUERWERK);
- case EL_FELSBODEN: return(GFX_FELSBODEN);
- case EL_FELSBROCKEN: return(GFX_FELSBROCKEN);
- case EL_SCHLUESSEL: return(GFX_SCHLUESSEL);
- case EL_EDELSTEIN: return(GFX_EDELSTEIN);
- case EL_AUSGANG_ZU: return(GFX_AUSGANG_ZU);
- case EL_AUSGANG_ACT: return(GFX_AUSGANG_ACT);
- case EL_AUSGANG_AUF: return(GFX_AUSGANG_AUF);
- case EL_SPIELFIGUR: return(GFX_SPIELFIGUR);
- case EL_SPIELER1: return(GFX_SPIELER1);
- case EL_SPIELER2: return(GFX_SPIELER2);
- case EL_SPIELER3: return(GFX_SPIELER3);
- case EL_SPIELER4: return(GFX_SPIELER4);
- case EL_KAEFER: return(GFX_KAEFER);
- case EL_KAEFER_R: return(GFX_KAEFER_R);
- case EL_KAEFER_O: return(GFX_KAEFER_O);
- case EL_KAEFER_L: return(GFX_KAEFER_L);
- case EL_KAEFER_U: return(GFX_KAEFER_U);
- case EL_FLIEGER: return(GFX_FLIEGER);
- case EL_FLIEGER_R: return(GFX_FLIEGER_R);
- case EL_FLIEGER_O: return(GFX_FLIEGER_O);
- case EL_FLIEGER_L: return(GFX_FLIEGER_L);
- case EL_FLIEGER_U: return(GFX_FLIEGER_U);
- case EL_BUTTERFLY: return(GFX_BUTTERFLY);
- case EL_BUTTERFLY_R: return(GFX_BUTTERFLY_R);
- case EL_BUTTERFLY_O: return(GFX_BUTTERFLY_O);
- case EL_BUTTERFLY_L: return(GFX_BUTTERFLY_L);
- case EL_BUTTERFLY_U: return(GFX_BUTTERFLY_U);
- case EL_FIREFLY: return(GFX_FIREFLY);
- case EL_FIREFLY_R: return(GFX_FIREFLY_R);
- case EL_FIREFLY_O: return(GFX_FIREFLY_O);
- case EL_FIREFLY_L: return(GFX_FIREFLY_L);
- case EL_FIREFLY_U: return(GFX_FIREFLY_U);
- case EL_MAMPFER: return(GFX_MAMPFER);
- case EL_ROBOT: return(GFX_ROBOT);
- case EL_BETON: return(GFX_BETON);
- case EL_DIAMANT: return(GFX_DIAMANT);
- case EL_MORAST_LEER: return(GFX_MORAST_LEER);
- case EL_MORAST_VOLL: return(GFX_MORAST_VOLL);
- case EL_TROPFEN: return(GFX_TROPFEN);
- case EL_BOMBE: return(GFX_BOMBE);
- case EL_SIEB_LEER: return(GFX_SIEB_LEER);
- case EL_SIEB_VOLL: return(GFX_SIEB_VOLL);
- case EL_SIEB_TOT: return(GFX_SIEB_TOT);
- case EL_SALZSAEURE: return(GFX_SALZSAEURE);
- case EL_AMOEBE_TOT: return(GFX_AMOEBE_TOT);
- case EL_AMOEBE_NASS: return(GFX_AMOEBE_NASS);
- case EL_AMOEBE_NORM: return(GFX_AMOEBE_NORM);
- case EL_AMOEBE_VOLL: return(GFX_AMOEBE_VOLL);
- case EL_AMOEBE_BD: return(GFX_AMOEBE_BD);
- case EL_AMOEBA2DIAM: return(GFX_AMOEBA2DIAM);
- case EL_KOKOSNUSS: return(GFX_KOKOSNUSS);
- case EL_LIFE: return(GFX_LIFE);
- case EL_LIFE_ASYNC: return(GFX_LIFE_ASYNC);
- case EL_DYNAMIT: return(GFX_DYNAMIT);
- case EL_BADEWANNE: return(GFX_BADEWANNE);
- case EL_BADEWANNE1: return(GFX_BADEWANNE1);
- case EL_BADEWANNE2: return(GFX_BADEWANNE2);
- case EL_BADEWANNE3: return(GFX_BADEWANNE3);
- case EL_BADEWANNE4: return(GFX_BADEWANNE4);
- case EL_BADEWANNE5: return(GFX_BADEWANNE5);
- case EL_ABLENK_AUS: return(GFX_ABLENK_AUS);
- case EL_ABLENK_EIN: return(GFX_ABLENK_EIN);
- case EL_SCHLUESSEL1: return(GFX_SCHLUESSEL1);
- case EL_SCHLUESSEL2: return(GFX_SCHLUESSEL2);
- case EL_SCHLUESSEL3: return(GFX_SCHLUESSEL3);
- case EL_SCHLUESSEL4: return(GFX_SCHLUESSEL4);
- case EL_PFORTE1: return(GFX_PFORTE1);
- case EL_PFORTE2: return(GFX_PFORTE2);
- case EL_PFORTE3: return(GFX_PFORTE3);
- case EL_PFORTE4: return(GFX_PFORTE4);
- case EL_PFORTE1X: return(GFX_PFORTE1X);
- case EL_PFORTE2X: return(GFX_PFORTE2X);
- case EL_PFORTE3X: return(GFX_PFORTE3X);
- case EL_PFORTE4X: return(GFX_PFORTE4X);
- case EL_DYNAMIT_AUS: return(GFX_DYNAMIT_AUS);
- case EL_PACMAN: return(GFX_PACMAN);
- case EL_PACMAN_R: return(GFX_PACMAN_R);
- case EL_PACMAN_O: return(GFX_PACMAN_O);
- case EL_PACMAN_L: return(GFX_PACMAN_L);
- case EL_PACMAN_U: return(GFX_PACMAN_U);
- case EL_UNSICHTBAR: return(GFX_UNSICHTBAR);
- case EL_ERZ_EDEL: return(GFX_ERZ_EDEL);
- case EL_ERZ_DIAM: return(GFX_ERZ_DIAM);
- case EL_BIRNE_AUS: return(GFX_BIRNE_AUS);
- case EL_BIRNE_EIN: return(GFX_BIRNE_EIN);
- case EL_ZEIT_VOLL: return(GFX_ZEIT_VOLL);
- case EL_ZEIT_LEER: return(GFX_ZEIT_LEER);
- case EL_MAUER_LEBT: return(GFX_MAUER_LEBT);
- case EL_EDELSTEIN_BD: return(GFX_EDELSTEIN_BD);
- case EL_EDELSTEIN_GELB: return(GFX_EDELSTEIN_GELB);
- case EL_EDELSTEIN_ROT: return(GFX_EDELSTEIN_ROT);
- case EL_EDELSTEIN_LILA: return(GFX_EDELSTEIN_LILA);
- case EL_ERZ_EDEL_BD: return(GFX_ERZ_EDEL_BD);
- case EL_ERZ_EDEL_GELB: return(GFX_ERZ_EDEL_GELB);
- case EL_ERZ_EDEL_ROT: return(GFX_ERZ_EDEL_ROT);
- case EL_ERZ_EDEL_LILA: return(GFX_ERZ_EDEL_LILA);
- case EL_MAMPFER2: return(GFX_MAMPFER2);
- case EL_SIEB2_LEER: return(GFX_SIEB2_LEER);
- case EL_SIEB2_VOLL: return(GFX_SIEB2_VOLL);
- case EL_SIEB2_TOT: return(GFX_SIEB2_TOT);
- case EL_DYNABOMB: return(GFX_DYNABOMB);
- case EL_DYNABOMB_NR: return(GFX_DYNABOMB_NR);
- case EL_DYNABOMB_SZ: return(GFX_DYNABOMB_SZ);
- case EL_DYNABOMB_XL: return(GFX_DYNABOMB_XL);
- case EL_SOKOBAN_OBJEKT: return(GFX_SOKOBAN_OBJEKT);
- case EL_SOKOBAN_FELD_LEER: return(GFX_SOKOBAN_FELD_LEER);
- case EL_SOKOBAN_FELD_VOLL: return(GFX_SOKOBAN_FELD_VOLL);
- case EL_MAULWURF: return(GFX_MAULWURF);
- case EL_PINGUIN: return(GFX_PINGUIN);
- case EL_SCHWEIN: return(GFX_SCHWEIN);
- case EL_DRACHE: return(GFX_DRACHE);
- case EL_SONDE: return(GFX_SONDE);
- case EL_PFEIL_L: return(GFX_PFEIL_L);
- case EL_PFEIL_R: return(GFX_PFEIL_R);
- case EL_PFEIL_O: return(GFX_PFEIL_O);
- case EL_PFEIL_U: return(GFX_PFEIL_U);
- default:
+ TOOL_BUTTON_CONFIRM_XPOS, TOOL_BUTTON_CONFIRM_GFX_YPOS,
+ TOOL_BUTTON_CONFIRM_XPOS, TOOL_BUTTON_CONFIRM_YPOS,
+ TOOL_BUTTON_CONFIRM_XSIZE, TOOL_BUTTON_CONFIRM_YSIZE,
+ TOOL_CTRL_ID_CONFIRM,
+ "confirm"
+ },
+ {
+ TOOL_BUTTON_PLAYER_GFX_XPOS,TOOL_BUTTON_PLAYER_GFX_YPOS,
+ TOOL_BUTTON_PLAYER1_XPOS, TOOL_BUTTON_PLAYER1_YPOS,
+ TOOL_BUTTON_PLAYER_XSIZE, TOOL_BUTTON_PLAYER_YSIZE,
+ TOOL_CTRL_ID_PLAYER_1,
+ "player 1"
+ },
+ {
+ TOOL_BUTTON_PLAYER_GFX_XPOS,TOOL_BUTTON_PLAYER_GFX_YPOS,
+ TOOL_BUTTON_PLAYER2_XPOS, TOOL_BUTTON_PLAYER2_YPOS,
+ TOOL_BUTTON_PLAYER_XSIZE, TOOL_BUTTON_PLAYER_YSIZE,
+ TOOL_CTRL_ID_PLAYER_2,
+ "player 2"
+ },
+ {
+ TOOL_BUTTON_PLAYER_GFX_XPOS,TOOL_BUTTON_PLAYER_GFX_YPOS,
+ TOOL_BUTTON_PLAYER3_XPOS, TOOL_BUTTON_PLAYER3_YPOS,
+ TOOL_BUTTON_PLAYER_XSIZE, TOOL_BUTTON_PLAYER_YSIZE,
+ TOOL_CTRL_ID_PLAYER_3,
+ "player 3"
+ },
+ {
+ TOOL_BUTTON_PLAYER_GFX_XPOS,TOOL_BUTTON_PLAYER_GFX_YPOS,
+ TOOL_BUTTON_PLAYER4_XPOS, TOOL_BUTTON_PLAYER4_YPOS,
+ TOOL_BUTTON_PLAYER_XSIZE, TOOL_BUTTON_PLAYER_YSIZE,
+ TOOL_CTRL_ID_PLAYER_4,
+ "player 4"
+ }
+};
+
+void CreateToolButtons()
+{
+ int i;
+
+ for (i=0; i<NUM_TOOL_BUTTONS; i++)
+ {
+ Bitmap *gd_bitmap = graphic_info[IMG_GLOBAL_DOOR].bitmap;
+ Bitmap *deco_bitmap = None;
+ int deco_x = 0, deco_y = 0, deco_xpos = 0, deco_ypos = 0;
+ struct GadgetInfo *gi;
+ unsigned long event_mask;
+ int gd_xoffset, gd_yoffset;
+ int gd_x1, gd_x2, gd_y;
+ int id = i;
+
+ event_mask = GD_EVENT_RELEASED;
+
+ gd_xoffset = toolbutton_info[i].xpos;
+ gd_yoffset = toolbutton_info[i].ypos;
+ gd_x1 = DOOR_GFX_PAGEX4 + gd_xoffset;
+ gd_x2 = DOOR_GFX_PAGEX3 + gd_xoffset;
+ gd_y = DOOR_GFX_PAGEY1 + gd_yoffset;
+
+ if (id >= TOOL_CTRL_ID_PLAYER_1 && id <= TOOL_CTRL_ID_PLAYER_4)