static struct GadgetInfo *screen_gadget[NUM_SCREEN_GADGETS];
static int setup_mode = SETUP_MODE_MAIN;
+#define mSX (SX + (game_status >= GAME_MODE_MAIN && \
+ game_status <= GAME_MODE_SETUP ? \
+ menu.draw_xoffset[game_status] : menu.draw_xoffset_default))
+#define mSY (SY + (game_status >= GAME_MODE_MAIN && \
+ game_status <= GAME_MODE_SETUP ? \
+ menu.draw_yoffset[game_status] : menu.draw_yoffset_default))
+
+#define NUM_MENU_ENTRIES_ON_SCREEN (menu.list_size[game_status] > 2 ? \
+ menu.list_size[game_status] : \
+ MAX_MENU_ENTRIES_ON_SCREEN)
+
#if defined(TARGET_X11_NATIVE_PERFORMANCE_WORKAROUND)
#define NUM_SCROLLBAR_BITMAPS 2
static Bitmap *scrollbar_bitmap[NUM_SCROLLBAR_BITMAPS];
ypos += MENU_SCREEN_START_YPOS;
- DrawBackground(SX + xpos * 32, SY + ypos * 32, TILEX, TILEY);
- DrawGraphicThruMask(xpos, ypos, graphic, 0);
+ DrawBackground(mSX + xpos * TILEX, mSY + ypos * TILEY, TILEX, TILEY);
+ DrawGraphicThruMaskExt(drawto, mSX + xpos * TILEX, mSY + ypos * TILEY,
+ graphic, 0);
}
static void initCursor(int ypos, int graphic)
drawCursorExt(xpos, ypos, -1, graphic);
}
+static void drawChooseTreeCursor(int ypos, int color)
+{
+ int last_game_status = game_status; /* save current game status */
+
+ /* force LEVELS draw offset on artwork setup screen */
+ game_status = GAME_MODE_LEVELS;
+
+ drawCursorExt(0, ypos, color, 0);
+
+ game_status = last_game_status; /* restore current game status */
+}
+
static void PlaySound_Menu_Start(int sound)
{
if (sound_info[sound].loop)
PlaySoundLoop(sound);
}
-void DrawTextStatic(int x, int y, char *text, int font_nr)
-{
- if (game_status == MAINMENU && gfx.menu_main_hide_static_text)
- return;
-
- DrawText(x, y, text, font_nr);
-}
-
void DrawHeadline()
{
- int font1_xsize = getFontWidth(FONT_TITLE_1);
- int font2_xsize = getFontWidth(FONT_TITLE_2);
- int x1 = SX + (SXSIZE - strlen(PROGRAM_TITLE_STRING) * font1_xsize) / 2;
- int x2 = SX + (SXSIZE - strlen(WINDOW_SUBTITLE_STRING) * font2_xsize) / 2;
+ int text1_width = getTextWidth(PROGRAM_TITLE_STRING, FONT_TITLE_1);
+ int text2_width = getTextWidth(WINDOW_SUBTITLE_STRING, FONT_TITLE_2);
+ int x1 = SX + (SXSIZE - text1_width) / 2;
+ int x2 = SX + (SXSIZE - text2_width) / 2;
- DrawTextStatic(x1, SY + 8, PROGRAM_TITLE_STRING, FONT_TITLE_1);
- DrawTextStatic(x2, SY + 46, WINDOW_SUBTITLE_STRING, FONT_TITLE_2);
+ DrawText(x1, SY + 8, PROGRAM_TITLE_STRING, FONT_TITLE_1);
+ DrawText(x2, SY + 46, WINDOW_SUBTITLE_STRING, FONT_TITLE_2);
}
static void ToggleFullscreenIfNeeded()
{
static LevelDirTree *leveldir_last_valid = NULL;
char *name_text = (!options.network && setup.team_mode ? "Team:" : "Name:");
- int name_width = getFontWidth(FONT_MENU_1) * strlen("Name:");
+ int name_width = getTextWidth("Name:", FONT_MENU_1);
+ int level_width = getTextWidth("Level:", FONT_MENU_1);
int i;
UnmapAllGadgets();
/* needed if last screen was the playing screen, invoked from level editor */
if (level_editor_test_game)
{
- game_status = LEVELED;
+ game_status = GAME_MODE_EDITOR;
DrawLevelEd();
return;
}
/* needed if last screen was the setup screen and fullscreen state changed */
ToggleFullscreenIfNeeded();
+ /* leveldir_current may be invalid (level group, parent link) */
+ if (!validLevelSeries(leveldir_current))
+ leveldir_current = getFirstValidTreeInfoEntry(leveldir_last_valid);
+
+ /* store valid level series information */
+ leveldir_last_valid = leveldir_current;
+
/* needed if last screen (level choice) changed graphics, sounds or music */
ReloadCustomArtwork();
/* map gadgets for main menu screen */
MapTapeButtons();
- /* leveldir_current may be invalid (level group, parent link) */
- if (!validLevelSeries(leveldir_current))
- leveldir_current = getFirstValidTreeInfoEntry(leveldir_last_valid);
-
- /* store valid level series information */
- leveldir_last_valid = leveldir_current;
-
/* level_nr may have been set to value over handicap with level editor */
if (setup.handicap && level_nr > leveldir_current->handicap_level)
level_nr = leveldir_current->handicap_level;
DrawHeadline();
- DrawTextStatic(SX + 32, SY + 2*32, name_text, FONT_MENU_1);
- DrawText(SX + 32 + name_width, SY + 2*32, setup.player_name, FONT_INPUT);
- DrawTextStatic(SX + 32, SY + 3*32, "Level:", FONT_MENU_1);
- DrawText(SX + 11 * 32, SY + 3*32, int2str(level_nr,3), FONT_VALUE_1);
- DrawTextStatic(SX + 32, SY + 4*32, "Hall Of Fame", FONT_MENU_1);
- DrawTextStatic(SX + 32, SY + 5*32, "Level Creator", FONT_MENU_1);
- DrawTextStatic(SY + 32, SY + 6*32, "Info Screen", FONT_MENU_1);
- DrawTextStatic(SX + 32, SY + 7*32, "Start Game", FONT_MENU_1);
- DrawTextStatic(SX + 32, SY + 8*32, "Setup", FONT_MENU_1);
- DrawTextStatic(SX + 32, SY + 9*32, "Quit", FONT_MENU_1);
+ DrawText(mSX + 32, mSY + 2*32, name_text, FONT_MENU_1);
+ DrawText(mSX + 32, mSY + 3*32, "Level:", FONT_MENU_1);
+ DrawText(mSX + 32, mSY + 4*32, "Hall Of Fame", FONT_MENU_1);
+ DrawText(mSX + 32, mSY + 5*32, "Level Creator", FONT_MENU_1);
+ DrawText(mSX + 32, mSY + 6*32, "Info Screen", FONT_MENU_1);
+ DrawText(mSX + 32, mSY + 7*32, "Start Game", FONT_MENU_1);
+ DrawText(mSX + 32, mSY + 8*32, "Setup", FONT_MENU_1);
+ DrawText(mSX + 32, mSY + 9*32, "Quit", FONT_MENU_1);
+
+ DrawText(mSX + 32 + name_width, mSY + 2*32, setup.player_name, FONT_INPUT_1);
+ DrawText(mSX + level_width + 5 * 32, mSY + 3*32, int2str(level_nr,3),
+ FONT_VALUE_1);
DrawMicroLevel(MICROLEV_XPOS, MICROLEV_YPOS, TRUE);
- DrawTextF(7*32 + 6, 3*32 + 9, FONT_TEXT_3, "%d-%d",
- leveldir_current->first_level,
- leveldir_current->last_level);
+ DrawTextF(mSX + 32 + level_width - 2, mSY + 3*32 + 1, FONT_TEXT_3, "%d-%d",
+ leveldir_current->first_level, leveldir_current->last_level);
if (leveldir_current->readonly)
{
- DrawTextF(15*32 + 6, 3*32 + 9 - 7, FONT_TEXT_3, "READ");
- DrawTextF(15*32 + 6, 3*32 + 9 + 7, FONT_TEXT_3, "ONLY");
+ DrawTextF(mSX + level_width + 9 * 32 - 2,
+ mSY + 3 * 32 + 1 - 7, FONT_TEXT_3, "READ");
+ DrawTextF(mSX + level_width + 9 * 32 - 2,
+ mSY + 3 * 32 + 1 + 7, FONT_TEXT_3, "ONLY");
}
for(i=0; i<8; i++)
initCursor(i, (i == 1 || i == 6 ? IMG_MENU_BUTTON_RIGHT :IMG_MENU_BUTTON));
-#if 0
- DrawGraphic(10, 3, IMG_MENU_BUTTON_LEFT, 0);
- DrawGraphic(14, 3, IMG_MENU_BUTTON_RIGHT, 0);
-#else
- drawCursorXY(10, 1, IMG_MENU_BUTTON_LEFT);
- drawCursorXY(14, 1, IMG_MENU_BUTTON_RIGHT);
-#endif
+ drawCursorXY(level_width/32 + 4, 1, IMG_MENU_BUTTON_LEFT);
+ drawCursorXY(level_width/32 + 8, 1, IMG_MENU_BUTTON_RIGHT);
- DrawTextStatic(SX + 56, SY + 326, "A Game by Artsoft Entertainment",
- FONT_TEXT_3);
+ DrawText(SX + 56, SY + 326, "A Game by Artsoft Entertainment", FONT_TITLE_2);
FadeToFront();
InitAnimation();
int num_page_entries;
int cl_first, cl_cursor;
- if (num_leveldirs <= MAX_MENU_ENTRIES_ON_SCREEN)
+ if (num_leveldirs <= NUM_MENU_ENTRIES_ON_SCREEN)
num_page_entries = num_leveldirs;
else
- num_page_entries = MAX_MENU_ENTRIES_ON_SCREEN - 1;
+ num_page_entries = NUM_MENU_ENTRIES_ON_SCREEN;
cl_first = MAX(0, leveldir_pos - num_page_entries + 1);
cl_cursor = leveldir_pos - cl_first;
if (mx || my) /* mouse input */
{
- x = (mx - SX) / 32;
- y = (my - SY) / 32 - MENU_SCREEN_START_YPOS;
+ x = (mx - mSX) / 32;
+ y = (my - mSY) / 32 - MENU_SCREEN_START_YPOS;
}
else if (dx || dy) /* keyboard input */
{
level_nr = new_level_nr;
- DrawText(SX + 11 * 32, SY + 3 * 32, int2str(level_nr, 3), FONT_VALUE_1);
+ DrawText(mSX + 11 * 32, mSY + 3 * 32, int2str(level_nr, 3), FONT_VALUE_1);
LoadLevel(level_nr);
DrawMicroLevel(MICROLEV_XPOS, MICROLEV_YPOS, TRUE);
{
if (y == 0)
{
- game_status = TYPENAME;
+ game_status = GAME_MODE_PSEUDO_TYPENAME;
HandleTypeName(strlen(setup.player_name), 0);
}
else if (y == 1)
{
if (leveldir_first)
{
- game_status = CHOOSELEVEL;
+ game_status = GAME_MODE_LEVELS;
SaveLevelSetup_LastSeries();
SaveLevelSetup_SeriesInfo();
}
else if (y == 2)
{
- game_status = HALLOFFAME;
+ game_status = GAME_MODE_SCORES;
DrawHallOfFame(-1);
}
else if (y == 3)
if (leveldir_current->readonly &&
strcmp(setup.player_name, "Artsoft") != 0)
Request("This level is read only !", REQ_CONFIRM);
- game_status = LEVELED;
+ game_status = GAME_MODE_EDITOR;
DrawLevelEd();
}
else if (y == 4)
{
- game_status = HELPSCREEN;
+ game_status = GAME_MODE_INFO;
DrawHelpScreen();
}
else if (y == 5)
else
#endif
{
- game_status = PLAYING;
+ game_status = GAME_MODE_PLAYING;
StopAnimation();
InitGame();
}
}
else if (y == 6)
{
- game_status = SETUP;
+ game_status = GAME_MODE_SETUP;
setup_mode = SETUP_MODE_MAIN;
DrawSetupScreen();
}
SaveLevelSetup_LastSeries();
SaveLevelSetup_SeriesInfo();
if (Request("Do you really want to quit ?", REQ_ASK | REQ_STAY_CLOSED))
- game_status = EXITGAME;
+ game_status = GAME_MODE_QUIT;
}
}
}
out:
- if (game_status == MAINMENU)
+ if (game_status == GAME_MODE_MAIN)
{
DrawMicroLevel(MICROLEV_XPOS, MICROLEV_YPOS, FALSE);
DoAnimation();
static long helpscreen_state;
static int helpscreen_step[MAX_HELPSCREEN_ELS];
static int helpscreen_frame[MAX_HELPSCREEN_ELS];
-#if 0
-static int OLD_helpscreen_action[] =
-{
- GFX_SPIELER1_DOWN,4,2,
- GFX_SPIELER1_UP,4,2,
- GFX_SPIELER1_LEFT,4,2,
- GFX_SPIELER1_RIGHT,4,2,
- GFX_SPIELER1_PUSH_LEFT,4,2,
- GFX_SPIELER1_PUSH_RIGHT,4,2, HA_NEXT,
- GFX_ERDREICH,1,100, HA_NEXT,
- GFX_LEERRAUM,1,100, HA_NEXT,
- GFX_MORAST_LEER,1,100, HA_NEXT,
- GFX_BETON,1,100, HA_NEXT,
- GFX_MAUERWERK,1,100, HA_NEXT,
- GFX_MAUER_L1, 3,4, GFX_MAUERWERK,1,20, GFX_LEERRAUM,1,10,
- GFX_MAUER_R1, 3,4, GFX_MAUERWERK,1,20, GFX_LEERRAUM,1,10,
- GFX_MAUER_UP, 3,4, GFX_MAUERWERK,1,20, GFX_LEERRAUM,1,10,
- GFX_MAUER_DOWN,3,4, GFX_MAUERWERK,1,20, GFX_LEERRAUM,1,10, HA_NEXT,
- GFX_UNSICHTBAR,1,100, HA_NEXT,
- GFX_FELSBODEN,1,100, HA_NEXT,
- GFX_CHAR_A,30,4, GFX_CHAR_AUSRUF,32,4, HA_NEXT,
- GFX_EDELSTEIN,2,5, HA_NEXT,
- GFX_DIAMANT,2,5, HA_NEXT,
- GFX_EDELSTEIN_BD,2,5, HA_NEXT,
- GFX_EDELSTEIN_GELB,2,5, GFX_EDELSTEIN_ROT,2,5,
- GFX_EDELSTEIN_LILA,2,5, HA_NEXT,
- GFX_FELSBROCKEN,4,5, HA_NEXT,
- GFX_BOMBE,1,50, GFX_EXPLOSION,8,1, GFX_LEERRAUM,1,10, HA_NEXT,
- GFX_KOKOSNUSS,1,50, GFX_CRACKINGNUT,3,1, GFX_EDELSTEIN,1,10, HA_NEXT,
- GFX_ERZ_EDEL,1,50, GFX_EXPLOSION,8,1, GFX_EDELSTEIN,1,10, HA_NEXT,
- GFX_ERZ_DIAM,1,50, GFX_EXPLOSION,8,1, GFX_DIAMANT,1,10, HA_NEXT,
- GFX_ERZ_EDEL_BD,1,50, GFX_EXPLOSION,8,1,GFX_EDELSTEIN_BD,1,10,HA_NEXT,
- GFX_ERZ_EDEL_GELB,1,50, GFX_EXPLOSION,8,1,
- GFX_EDELSTEIN_GELB,1,10, GFX_ERZ_EDEL_ROT,1,50,
- GFX_EXPLOSION,8,1, GFX_EDELSTEIN_ROT,1,10,
- GFX_ERZ_EDEL_LILA,1,50, GFX_EXPLOSION,8,1,
- GFX_EDELSTEIN_LILA,1,10, HA_NEXT,
- GFX_GEBLUBBER,4,4, HA_NEXT,
- GFX_SCHLUESSEL1,4,25, HA_NEXT,
- GFX_PFORTE1,4,25, HA_NEXT,
- GFX_PFORTE1X,4,25, HA_NEXT,
- GFX_DYNAMIT_AUS,1,100, HA_NEXT,
- GFX_DYNAMIT,7,6, GFX_EXPLOSION,8,1, GFX_LEERRAUM,1,10, HA_NEXT,
- GFX_DYNABOMB+0,4,3, GFX_DYNABOMB+3,1,3, GFX_DYNABOMB+2,1,3,
- GFX_DYNABOMB+1,1,3, GFX_DYNABOMB+0,1,3, GFX_EXPLOSION,8,1,
- GFX_LEERRAUM,1,10, HA_NEXT,
- GFX_DYNABOMB_NR,1,100, HA_NEXT,
- GFX_DYNABOMB_SZ,1,100, HA_NEXT,
- GFX_FLIEGER+4,1,3, GFX_FLIEGER+0,1,3, GFX_FLIEGER+4,1,3,
- GFX_FLIEGER+5,1,3, GFX_FLIEGER+1,1,3, GFX_FLIEGER+5,1,3,
- GFX_FLIEGER+6,1,3, GFX_FLIEGER+2,1,3, GFX_FLIEGER+6,1,3,
- GFX_FLIEGER+7,1,3, GFX_FLIEGER+3,1,3, GFX_FLIEGER+7,1,3, HA_NEXT,
- GFX_KAEFER+4,1,1, GFX_KAEFER+0,1,1, GFX_KAEFER+4,1,1,
- GFX_KAEFER+5,1,1, GFX_KAEFER+1,1,1, GFX_KAEFER+5,1,1,
- GFX_KAEFER+6,1,1, GFX_KAEFER+2,1,1, GFX_KAEFER+6,1,1,
- GFX_KAEFER+7,1,1, GFX_KAEFER+3,1,1, GFX_KAEFER+7,1,1, HA_NEXT,
- GFX_BUTTERFLY,2,2, HA_NEXT,
- GFX_FIREFLY,2,2, HA_NEXT,
- GFX_PACMAN+0,1,3, GFX_PACMAN+4,1,2, GFX_PACMAN+0,1,3,
- GFX_PACMAN+1,1,3, GFX_PACMAN+5,1,2, GFX_PACMAN+1,1,3,
- GFX_PACMAN+2,1,3, GFX_PACMAN+6,1,2, GFX_PACMAN+2,1,3,
- GFX_PACMAN+3,1,3, GFX_PACMAN+7,1,2, GFX_PACMAN+3,1,3, HA_NEXT,
- GFX_MAMPFER+0,4,1, GFX_MAMPFER+3,1,1, GFX_MAMPFER+2,1,1,
- GFX_MAMPFER+1,1,1, GFX_MAMPFER+0,1,1, HA_NEXT,
- GFX_MAMPFER2+0,4,1, GFX_MAMPFER2+3,1,1, GFX_MAMPFER2+2,1,1,
- GFX_MAMPFER2+1,1,1, GFX_MAMPFER2+0,1,1, HA_NEXT,
- GFX_ROBOT+0,4,1, GFX_ROBOT+3,1,1, GFX_ROBOT+2,1,1,
- GFX_ROBOT+1,1,1, GFX_ROBOT+0,1,1, HA_NEXT,
- GFX_MOLE_DOWN,4,2,
- GFX_MOLE_UP,4,2,
- GFX_MOLE_LEFT,4,2,
- GFX_MOLE_RIGHT,4,2, HA_NEXT,
- GFX_PINGUIN_DOWN,4,2,
- GFX_PINGUIN_UP,4,2,
- GFX_PINGUIN_LEFT,4,2,
- GFX_PINGUIN_RIGHT,4,2, HA_NEXT,
- GFX_SCHWEIN_DOWN,4,2,
- GFX_SCHWEIN_UP,4,2,
- GFX_SCHWEIN_LEFT,4,2,
- GFX_SCHWEIN_RIGHT,4,2, HA_NEXT,
- GFX_DRACHE_DOWN,4,2,
- GFX_DRACHE_UP,4,2,
- GFX_DRACHE_LEFT,4,2,
- GFX_DRACHE_RIGHT,4,2, HA_NEXT,
- GFX_SONDE_START,8,1, HA_NEXT,
- GFX_ABLENK,4,1, HA_NEXT,
- GFX_BIRNE_AUS,1,25, GFX_BIRNE_EIN,1,25, HA_NEXT,
- GFX_ZEIT_VOLL,1,25, GFX_ZEIT_LEER,1,25, HA_NEXT,
- GFX_TROPFEN,1,25, GFX_AMOEBING,4,1, GFX_AMOEBE_LEBT,1,10, HA_NEXT,
- GFX_AMOEBE_TOT+2,2,50, GFX_AMOEBE_TOT,2,50, HA_NEXT,
- GFX_AMOEBE_LEBT,4,40, HA_NEXT,
- GFX_AMOEBE_LEBT,1,10, GFX_AMOEBING,4,2, HA_NEXT,
- GFX_AMOEBE_LEBT,1,25, GFX_AMOEBE_TOT,1,25, GFX_EXPLOSION,8,1,
- GFX_DIAMANT,1,10, HA_NEXT,
- GFX_LIFE,1,100, HA_NEXT,
- GFX_LIFE_ASYNC,1,100, HA_NEXT,
- GFX_MAGIC_WALL_OFF,4,2, HA_NEXT,
- GFX_MAGIC_WALL_BD_OFF,4,2, HA_NEXT,
- GFX_AUSGANG_ZU,1,100, GFX_AUSGANG_ACT,4,2,
- GFX_AUSGANG_AUF+0,4,2, GFX_AUSGANG_AUF+3,1,2,
- GFX_AUSGANG_AUF+2,1,2, GFX_AUSGANG_AUF+1,1,2, HA_NEXT,
- GFX_AUSGANG_AUF+0,4,2, GFX_AUSGANG_AUF+3,1,2,
- GFX_AUSGANG_AUF+2,1,2, GFX_AUSGANG_AUF+1,1,2, HA_NEXT,
- GFX_SOKOBAN_OBJEKT,1,100, HA_NEXT,
- GFX_SOKOBAN_FELD_LEER,1,100, HA_NEXT,
- GFX_SOKOBAN_FELD_VOLL,1,100, HA_NEXT,
- GFX_SPEED_PILL,1,100, HA_NEXT,
- HA_END
-};
-#endif
static int helpscreen_action[] =
{
- IMG_PLAYER1_MOVING_DOWN, 16,
- IMG_PLAYER1_MOVING_UP, 16,
- IMG_PLAYER1_MOVING_LEFT, 16,
- IMG_PLAYER1_MOVING_RIGHT, 16,
- IMG_PLAYER1_PUSHING_LEFT, 16,
- IMG_PLAYER1_PUSHING_RIGHT, 16, HA_NEXT,
+ IMG_PLAYER_1_MOVING_DOWN, 16,
+ IMG_PLAYER_1_MOVING_UP, 16,
+ IMG_PLAYER_1_MOVING_LEFT, 16,
+ IMG_PLAYER_1_MOVING_RIGHT, 16,
+ IMG_PLAYER_1_PUSHING_LEFT, 16,
+ IMG_PLAYER_1_PUSHING_RIGHT, 16, HA_NEXT,
IMG_SAND, -1, HA_NEXT,
IMG_WALL, -1, HA_NEXT,
- IMG_WALL_GROWING_ACTIVE_LEFT, 20,
+ IMG_EXPANDABLE_WALL_GROWING_LEFT, 20,
IMG_WALL, 50,
IMG_EMPTY_SPACE, 20,
- IMG_WALL_GROWING_ACTIVE_RIGHT, 20,
+ IMG_EXPANDABLE_WALL_GROWING_RIGHT, 20,
IMG_WALL, 50,
IMG_EMPTY_SPACE, 20,
- IMG_WALL_GROWING_ACTIVE_UP, 20,
+ IMG_EXPANDABLE_WALL_GROWING_UP, 20,
IMG_WALL, 50,
IMG_EMPTY_SPACE, 20,
- IMG_WALL_GROWING_ACTIVE_DOWN, 20,
+ IMG_EXPANDABLE_WALL_GROWING_DOWN, 20,
IMG_WALL, 50,
IMG_EMPTY_SPACE, 20, HA_NEXT,
IMG_INVISIBLE_WALL, -1, HA_NEXT,
- IMG_WALL_CRUMBLED, -1, HA_NEXT,
+ IMG_WALL_SLIPPERY, -1, HA_NEXT,
- IMG_INFO_FONT_EM_1, 160,
- IMG_INFO_FONT_EM_2, 160,
- IMG_INFO_FONT_EM_3, 160,
- IMG_INFO_FONT_EM_4, 160,
- IMG_INFO_FONT_EM_5, 40, HA_NEXT,
+ IMG_FONT_GAME_INFO, -1, HA_NEXT,
IMG_EMERALD, -1, HA_NEXT,
IMG_EMPTY_SPACE, 10, HA_NEXT,
IMG_NUT, 100,
- IMG_NUT_CRACKING, 6,
+ IMG_NUT_BREAKING, 6,
IMG_EMERALD, 20, HA_NEXT,
IMG_WALL_EMERALD, 100,
IMG_ACID, -1, HA_NEXT,
- IMG_KEY1, 50,
- IMG_KEY2, 50,
- IMG_KEY3, 50,
- IMG_KEY4, 50, HA_NEXT,
+ IMG_KEY_1, 50,
+ IMG_KEY_2, 50,
+ IMG_KEY_3, 50,
+ IMG_KEY_4, 50, HA_NEXT,
- IMG_GATE1, 50,
- IMG_GATE2, 50,
- IMG_GATE3, 50,
- IMG_GATE4, 50, HA_NEXT,
+ IMG_GATE_1, 50,
+ IMG_GATE_2, 50,
+ IMG_GATE_3, 50,
+ IMG_GATE_4, 50, HA_NEXT,
- IMG_GATE1_GRAY, 50,
- IMG_GATE2_GRAY, 50,
- IMG_GATE3_GRAY, 50,
- IMG_GATE4_GRAY, 50, HA_NEXT,
+ IMG_GATE_1_GRAY, 50,
+ IMG_GATE_2_GRAY, 50,
+ IMG_GATE_3_GRAY, 50,
+ IMG_GATE_4_GRAY, 50, HA_NEXT,
IMG_DYNAMITE, -1, HA_NEXT,
IMG_EXPLOSION, 16,
IMG_EMPTY_SPACE, 20, HA_NEXT,
- IMG_DYNABOMB_NR, -1, HA_NEXT,
+ IMG_DYNABOMB_INCREASE_NUMBER, -1, HA_NEXT,
- IMG_DYNABOMB_SZ, -1, HA_NEXT,
+ IMG_DYNABOMB_INCREASE_SIZE, -1, HA_NEXT,
+
+ IMG_DYNABOMB_INCREASE_POWER, -1, HA_NEXT,
IMG_SPACESHIP_RIGHT, 16,
IMG_SPACESHIP_UP, 16,
IMG_TIME_ORB_EMPTY, 50, HA_NEXT,
IMG_AMOEBA_DROP, 50,
- IMG_AMOEBA_CREATING, 6,
+ IMG_AMOEBA_GROWING, 6,
IMG_AMOEBA_WET, 20, HA_NEXT,
IMG_AMOEBA_DEAD, -1, HA_NEXT,
IMG_AMOEBA_WET, -1, HA_NEXT,
IMG_AMOEBA_WET, 100,
- IMG_AMOEBA_CREATING, 6, HA_NEXT,
+ IMG_AMOEBA_GROWING, 6, HA_NEXT,
IMG_AMOEBA_FULL, 50,
IMG_AMOEBA_DEAD, 50,
IMG_EXPLOSION, 16,
IMG_DIAMOND, 20, HA_NEXT,
- IMG_GAMEOFLIFE, -1, HA_NEXT,
+ IMG_GAME_OF_LIFE, -1, HA_NEXT,
IMG_BIOMAZE, -1, HA_NEXT,
{"Dyna Bomb: Explodes in 4 directions","with variable explosion size"},
{"Dyna Bomb: Increases the number of", "dyna bombs available at a time"},
{"Dyna Bomb: Increases the size of", "explosion of dyna bombs"},
+ {"Dyna Bomb: Increases the power of", "explosion of dyna bombs"},
{"Spaceship: Moves at the left side", "of walls; don't touch it!"},
{"Bug: Moves at the right side", "of walls; don't touch it!"},
{"Butterfly: Moves at the right side", "of walls; don't touch it!"},
void DrawHelpScreenElAction(int start)
{
int i = 0, j = 0;
- int xstart = SX + 16;
- int ystart = SY + 64 + 2 * 32;
+ int xstart = mSX + 16;
+ int ystart = mSY + 64 + 2 * 32;
int ystep = TILEY + 4;
int graphic;
int frame_count;
int sync_frame;
- int frame;
while (helpscreen_action[j] != HA_END)
{
}
j++;
+#if 1
+ ClearRectangleOnBackground(drawto, xstart, ystart + (i - start) * ystep,
+ TILEX, TILEY);
+ DrawGraphicAnimationExt(drawto, xstart, ystart + (i - start) * ystep,
+ graphic, sync_frame, USE_MASKING);
+#else
frame = getGraphicAnimationFrame(graphic, sync_frame);
DrawGraphicExt(drawto, xstart, ystart + (i-start) * ystep,
graphic, frame);
+#endif
i++;
}
+#if 1
+ redraw_mask |= REDRAW_FIELD;
+#else
for(i=2; i<16; i++)
{
MarkTileDirty(0, i);
MarkTileDirty(1, i);
}
+#endif
FrameCounter++;
}
void DrawHelpScreenElText(int start)
{
int i;
- int xstart = SX + 56, ystart = SY + 65 + 2 * 32, ystep = TILEY + 4;
+ int xstart = mSX + 56, ystart = mSY + 65 + 2 * 32, ystep = TILEY + 4;
int ybottom = SYSIZE - 20;
SetMainBackgroundImage(IMG_BACKGROUND_INFO);
InitAnimation();
#if 0
- PlaySoundLoop(SND_MENU_INFO_SCREEN);
+ PlaySoundLoop(SND_BACKGROUND_INFO);
#else
- PlaySound_Menu_Start(SND_MENU_INFO_SCREEN);
+ PlaySound_Menu_Start(SND_BACKGROUND_INFO);
#endif
}
else
{
FadeSounds();
+
+ game_status = GAME_MODE_MAIN;
DrawMainMenu();
- game_status = MAINMENU;
}
}
else
must therefore periodically be reactivated with the current sound
engine !!! */
#if 0
- PlaySoundLoop(SND_MENU_INFO_SCREEN);
+ PlaySoundLoop(SND_BACKGROUND_INFO);
#else
- PlaySound_Menu_Continue(SND_MENU_INFO_SCREEN);
+ PlaySound_Menu_Continue(SND_BACKGROUND_INFO);
#endif
DoAnimation();
void HandleTypeName(int newxpos, Key key)
{
static int xpos = 0, ypos = 2;
- int font_width = getFontWidth(FONT_INPUT_ACTIVE);
+ int font_width = getFontWidth(FONT_INPUT_1_ACTIVE);
int name_width = getFontWidth(FONT_MENU_1) * strlen("Name:");
- int startx = SX + 32 + name_width;
- int starty = SY + ypos * 32;
+ int startx = mSX + 32 + name_width;
+ int starty = mSY + ypos * 32;
if (newxpos)
{
xpos = newxpos;
- DrawText(startx, starty, setup.player_name, FONT_INPUT_ACTIVE);
- DrawText(startx + xpos * font_width, starty, "_", FONT_INPUT_ACTIVE);
+ DrawText(startx, starty, setup.player_name, FONT_INPUT_1_ACTIVE);
+ DrawText(startx + xpos * font_width, starty, "_", FONT_INPUT_1_ACTIVE);
return;
}
setup.player_name[xpos + 1] = 0;
xpos++;
- DrawText(startx, starty, setup.player_name, FONT_INPUT_ACTIVE);
- DrawText(startx + xpos * font_width, starty, "_", FONT_INPUT_ACTIVE);
+ DrawText(startx, starty, setup.player_name, FONT_INPUT_1_ACTIVE);
+ DrawText(startx + xpos * font_width, starty, "_", FONT_INPUT_1_ACTIVE);
}
else if ((key == KSYM_Delete || key == KSYM_BackSpace) && xpos > 0)
{
xpos--;
setup.player_name[xpos] = 0;
- DrawText(startx + xpos * font_width, starty, "_ ", FONT_INPUT_ACTIVE);
+ DrawText(startx + xpos * font_width, starty, "_ ", FONT_INPUT_1_ACTIVE);
}
else if (key == KSYM_Return && xpos > 0)
{
- DrawText(startx, starty, setup.player_name, FONT_INPUT);
- DrawText(startx + xpos * font_width, starty, " ", FONT_INPUT_ACTIVE);
+ DrawText(startx, starty, setup.player_name, FONT_INPUT_1);
+ DrawText(startx + xpos * font_width, starty, " ", FONT_INPUT_1_ACTIVE);
SaveSetup();
- game_status = MAINMENU;
+ game_status = GAME_MODE_MAIN;
}
BackToFront();
static void DrawChooseTree(TreeInfo **ti_ptr)
{
UnmapAllGadgets();
+
+ FreeScreenGadgets();
+ CreateScreenGadgets();
+
CloseDoor(DOOR_CLOSE_2);
ClearWindow();
int items_max, items_visible, item_position;
items_max = numTreeInfoInGroup(ti);
- items_visible = MAX_MENU_ENTRIES_ON_SCREEN - 1;
+ items_visible = NUM_MENU_ENTRIES_ON_SCREEN;
item_position = first_entry;
if (item_position > items_max - items_visible)
item_position = items_max - items_visible;
ModifyGadget(gi, GDI_SCROLLBAR_ITEMS_MAX, items_max,
+ GDI_SCROLLBAR_ITEMS_VISIBLE, items_visible,
GDI_SCROLLBAR_ITEM_POSITION, item_position, GDI_END);
}
int i;
char buffer[SCR_FIELDX * 2];
int max_buffer_len = (SCR_FIELDX - 2) * 2;
- int num_entries = numTreeInfoInGroup(ti);
char *title_string = NULL;
- int offset = (ti->type == TREE_TYPE_LEVEL_DIR ? 0 : 16);
+ int xoffset_setup = 16;
+ int yoffset_setup = 16;
+ int xoffset = (ti->type == TREE_TYPE_LEVEL_DIR ? 0 : xoffset_setup);
+ int yoffset = (ti->type == TREE_TYPE_LEVEL_DIR ? 0 : yoffset_setup);
int last_game_status = game_status; /* save current game status */
+#if 1
+ DrawBackground(mSX, mSY, SXSIZE - 32 + menu.scrollbar_xoffset, SYSIZE);
+#else
DrawBackground(SX, SY, SXSIZE - 32, SYSIZE);
- redraw_mask |= REDRAW_FIELD;
+#endif
title_string =
(ti->type == TREE_TYPE_LEVEL_DIR ? "Level Directories" :
ti->type == TREE_TYPE_SOUNDS_DIR ? "Custom Sounds" :
ti->type == TREE_TYPE_MUSIC_DIR ? "Custom Music" : "");
- DrawText(SX + offset, SY + offset, title_string, FONT_TITLE_1);
+ DrawText(SX + xoffset, SY + yoffset, title_string, FONT_TITLE_1);
- game_status = CHOOSELEVEL; /* force LEVELS font on artwork setup screen */
+ /* force LEVELS font on artwork setup screen */
+ game_status = GAME_MODE_LEVELS;
for(i=0; i<num_page_entries; i++)
{
strncpy(buffer, node->name , max_buffer_len);
buffer[max_buffer_len] = '\0';
- DrawText(SX + 32, SY + ypos * 32, buffer, FONT_TEXT_1 + node->color);
+ DrawText(mSX + 32, mSY + ypos * 32, buffer, FONT_TEXT_1 + node->color);
if (node->parent_link)
initCursor(i, IMG_MENU_BUTTON_LEFT);
initCursor(i, IMG_MENU_BUTTON);
}
- if (first_entry > 0)
- {
- int ypos = 1;
-
- DrawBackground(SX, SY + ypos * 32, TILEX, TILEY);
- DrawGraphicThruMask(0, ypos, IMG_MENU_BUTTON_UP, 0);
- }
-
- if (first_entry + num_page_entries < num_entries)
- {
- int ypos = MAX_MENU_ENTRIES_ON_SCREEN + 1;
-
- DrawBackground(SX, SY + ypos * 32, TILEX, TILEY);
- DrawGraphicThruMask(0, ypos, IMG_MENU_BUTTON_DOWN, 0);
- }
-
game_status = last_game_status; /* restore current game status */
+
+ redraw_mask |= REDRAW_FIELD;
}
static void drawChooseTreeInfo(int entry_pos, TreeInfo *ti)
static void HandleChooseTree(int mx, int my, int dx, int dy, int button,
TreeInfo **ti_ptr)
{
- static unsigned long choose_delay = 0;
TreeInfo *ti = *ti_ptr;
int x = 0;
int y = ti->cl_cursor;
int step = (button == 1 ? 1 : button == 2 ? 5 : 10);
int num_entries = numTreeInfoInGroup(ti);
int num_page_entries;
+ int last_game_status = game_status; /* save current game status */
+
+ /* force LEVELS draw offset on choose level and artwork setup screen */
+ game_status = GAME_MODE_LEVELS;
- if (num_entries <= MAX_MENU_ENTRIES_ON_SCREEN)
+ if (num_entries <= NUM_MENU_ENTRIES_ON_SCREEN)
num_page_entries = num_entries;
else
- num_page_entries = MAX_MENU_ENTRIES_ON_SCREEN - 1;
+ num_page_entries = NUM_MENU_ENTRIES_ON_SCREEN;
+
+ game_status = last_game_status; /* restore current game status */
if (button == MB_MENU_INITIALIZE)
{
+ int num_entries = numTreeInfoInGroup(ti);
int entry_pos = posTreeInfo(ti);
if (ti->cl_first == -1)
{
+ /* only on initialization */
ti->cl_first = MAX(0, entry_pos - num_page_entries + 1);
- ti->cl_cursor =
- entry_pos - ti->cl_first;
+ ti->cl_cursor = entry_pos - ti->cl_first;
+ }
+ else if (ti->cl_cursor >= num_page_entries ||
+ (num_entries > num_page_entries &&
+ num_entries - ti->cl_first < num_page_entries))
+ {
+ /* only after change of list size (by custom graphic configuration) */
+ ti->cl_first = MAX(0, entry_pos - num_page_entries + 1);
+ ti->cl_cursor = entry_pos - ti->cl_first;
}
if (dx == 999) /* first entry is set by scrollbar position */
drawChooseTreeList(ti->cl_first, num_page_entries, ti);
drawChooseTreeInfo(ti->cl_first + ti->cl_cursor, ti);
- drawCursor(ti->cl_cursor, FC_RED);
+ drawChooseTreeCursor(ti->cl_cursor, FC_RED);
+
return;
}
else if (button == MB_MENU_LEAVE)
*ti_ptr = ti->node_parent;
DrawChooseTree(ti_ptr);
}
- else if (game_status == SETUP)
+ else if (game_status == GAME_MODE_SETUP)
{
execSetupArtwork();
}
else
{
- game_status = MAINMENU;
+ game_status = GAME_MODE_MAIN;
DrawMainMenu();
}
if (mx || my) /* mouse input */
{
- x = (mx - SX) / 32;
- y = (my - SY) / 32 - MENU_SCREEN_START_YPOS;
- }
- else if (dx || dy) /* keyboard input */
- {
- if (dy)
- y = ti->cl_cursor + dy;
+ int last_game_status = game_status; /* save current game status */
- if (ABS(dy) == SCR_FIELDY) /* handle KSYM_Page_Up, KSYM_Page_Down */
- {
- dy = SIGN(dy);
- step = num_page_entries - 1;
- y = (dy < 0 ? -1 : num_page_entries);
- }
- }
+ /* force LEVELS draw offset on artwork setup screen */
+ game_status = GAME_MODE_LEVELS;
- if (x == 0 && y == -1)
- {
- if (ti->cl_first > 0 &&
- (dy || DelayReached(&choose_delay, GADGET_FRAME_DELAY)))
- {
- ti->cl_first -= step;
- if (ti->cl_first < 0)
- ti->cl_first = 0;
+ x = (mx - mSX) / 32;
+ y = (my - mSY) / 32 - MENU_SCREEN_START_YPOS;
- drawChooseTreeList(ti->cl_first, num_page_entries, ti);
- drawChooseTreeInfo(ti->cl_first + ti->cl_cursor, ti);
- drawCursor(ti->cl_cursor, FC_RED);
- AdjustChooseTreeScrollbar(SCREEN_CTRL_ID_SCROLL_VERTICAL,
- ti->cl_first, ti);
- return;
- }
+ game_status = last_game_status; /* restore current game status */
}
- else if (x == 0 && y > num_page_entries - 1)
+ else if (dx || dy) /* keyboard or scrollbar/scrollbutton input */
{
- if (ti->cl_first + num_page_entries < num_entries &&
- (dy || DelayReached(&choose_delay, GADGET_FRAME_DELAY)))
+ /* move cursor instead of scrolling when already at start/end of list */
+ if (dy == -1 * SCROLL_LINE && ti->cl_first == 0)
+ dy = -1;
+ else if (dy == +1 * SCROLL_LINE &&
+ ti->cl_first + num_page_entries == num_entries)
+ dy = 1;
+
+ /* handle scrolling screen one line or page */
+ if (ti->cl_cursor + dy < 0 ||
+ ti->cl_cursor + dy > num_page_entries - 1)
{
- ti->cl_first += step;
- if (ti->cl_first + num_page_entries > num_entries)
- ti->cl_first = MAX(0, num_entries - num_page_entries);
+ if (ABS(dy) == SCROLL_PAGE)
+ step = num_page_entries - 1;
+
+ if (dy < 0 && ti->cl_first > 0)
+ {
+ /* scroll page/line up */
+
+ ti->cl_first -= step;
+ if (ti->cl_first < 0)
+ ti->cl_first = 0;
+
+ drawChooseTreeList(ti->cl_first, num_page_entries, ti);
+ drawChooseTreeInfo(ti->cl_first + ti->cl_cursor, ti);
+ drawChooseTreeCursor(ti->cl_cursor, FC_RED);
+ AdjustChooseTreeScrollbar(SCREEN_CTRL_ID_SCROLL_VERTICAL,
+ ti->cl_first, ti);
+ }
+ else if (dy > 0 && ti->cl_first + num_page_entries < num_entries)
+ {
+ /* scroll page/line down */
+
+ ti->cl_first += step;
+ if (ti->cl_first + num_page_entries > num_entries)
+ ti->cl_first = MAX(0, num_entries - num_page_entries);
+
+ drawChooseTreeList(ti->cl_first, num_page_entries, ti);
+ drawChooseTreeInfo(ti->cl_first + ti->cl_cursor, ti);
+ drawChooseTreeCursor(ti->cl_cursor, FC_RED);
+ AdjustChooseTreeScrollbar(SCREEN_CTRL_ID_SCROLL_VERTICAL,
+ ti->cl_first, ti);
+ }
- drawChooseTreeList(ti->cl_first, num_page_entries, ti);
- drawChooseTreeInfo(ti->cl_first + ti->cl_cursor, ti);
- drawCursor(ti->cl_cursor, FC_RED);
- AdjustChooseTreeScrollbar(SCREEN_CTRL_ID_SCROLL_VERTICAL,
- ti->cl_first, ti);
return;
}
+
+ /* handle moving cursor one line */
+ y = ti->cl_cursor + dy;
}
if (dx == 1)
node_cursor->cl_cursor = ti->cl_cursor;
*ti_ptr = node_cursor->node_group;
DrawChooseTree(ti_ptr);
+
return;
}
}
{
*ti_ptr = ti->node_parent;
DrawChooseTree(ti_ptr);
+
return;
}
{
if (y != ti->cl_cursor)
{
- drawCursor(y, FC_RED);
- drawCursor(ti->cl_cursor, FC_BLUE);
+ drawChooseTreeCursor(y, FC_RED);
+ drawChooseTreeCursor(ti->cl_cursor, FC_BLUE);
drawChooseTreeInfo(ti->cl_first + y, ti);
ti->cl_cursor = y;
}
TapeErase();
}
- if (game_status == SETUP)
+ if (game_status == GAME_MODE_SETUP)
{
execSetupArtwork();
}
else
{
- game_status = MAINMENU;
+ game_status = GAME_MODE_MAIN;
DrawMainMenu();
}
}
BackToFront();
- if (game_status == CHOOSELEVEL || game_status == SETUP)
+ if (game_status == GAME_MODE_LEVELS || game_status == GAME_MODE_SETUP)
DoAnimation();
}
HandleHallOfFame(highlight_position,0, 0,0, MB_MENU_INITIALIZE);
#if 0
- PlaySound(SND_MENU_HALL_OF_FAME);
+ PlaySound(SND_BACKGROUND_SCORES);
#else
- PlaySound_Menu_Start(SND_MENU_HALL_OF_FAME);
+ PlaySound_Menu_Start(SND_BACKGROUND_SCORES);
#endif
}
SetMainBackgroundImage(IMG_BACKGROUND_SCORES);
ClearWindow();
- DrawText(SX + 80, SY + 8, "Hall Of Fame", FONT_TITLE_1);
+ DrawText(mSX + 80, mSY + 8, "Hall Of Fame", FONT_TITLE_1);
DrawTextFCentered(46, FONT_TITLE_2, "HighScores of Level %d", level_nr);
- for(i=0; i<MAX_MENU_ENTRIES_ON_SCREEN; i++)
+ for(i=0; i<NUM_MENU_ENTRIES_ON_SCREEN; i++)
{
int entry = first_entry + i;
+ boolean active = (entry == highlight_position);
+ int font_nr1 = (active ? FONT_TEXT_1_ACTIVE : FONT_TEXT_1);
+ int font_nr2 = (active ? FONT_TEXT_2_ACTIVE : FONT_TEXT_2);
+ int font_nr3 = (active ? FONT_TEXT_3_ACTIVE : FONT_TEXT_3);
+ int font_nr4 = (active ? FONT_TEXT_4_ACTIVE : FONT_TEXT_4);
+ int dx1 = 3 * getFontWidth(font_nr1);
+ int dx2 = dx1 + getFontWidth(font_nr1);
+ int dx3 = dx2 + 25 * getFontWidth(font_nr3);
+ int sy = mSY + 64 + i * 32;
- DrawText(SX, SY + 64 + i * 32, "..................................",
- (entry == highlight_position ? FONT_TEXT_4 : FONT_TEXT_2));
- DrawText(SX, SY + 64 + i * 32, int2str(entry + 1, 3),
- (entry == highlight_position ? FONT_TEXT_4 : FONT_TEXT_2));
- DrawText(SX + 64, SY + 64 + i * 32, highscore[entry].Name,
- (entry == highlight_position ? FONT_TEXT_3 : FONT_TEXT_1));
- DrawText(SX + 14 * 32 + 16, SY + 64 + i * 32,
- int2str(highscore[entry].Score, 5),
- (entry == highlight_position ? FONT_TEXT_4 : FONT_TEXT_2));
+ DrawText(mSX, sy, int2str(entry + 1, 3), font_nr1);
+ DrawText(mSX + dx1, sy, ".", font_nr1);
+ DrawText(mSX + dx2, sy, ".........................", font_nr3);
+ if (strcmp(highscore[entry].Name, EMPTY_PLAYER_NAME) != 0)
+ DrawText(mSX + dx2, sy, highscore[entry].Name, font_nr2);
+ DrawText(mSX + dx3, sy, int2str(highscore[entry].Score, 5), font_nr4);
}
}
first_entry = 0;
highlight_position = mx;
drawHallOfFameList(first_entry, highlight_position);
+
return;
}
- if (ABS(dy) == SCR_FIELDY) /* handle KSYM_Page_Up, KSYM_Page_Down */
- step = MAX_MENU_ENTRIES_ON_SCREEN - 1;
+ if (ABS(dy) == SCROLL_PAGE) /* handle scrolling one page */
+ step = NUM_MENU_ENTRIES_ON_SCREEN - 1;
if (dy < 0)
{
first_entry = 0;
drawHallOfFameList(first_entry, highlight_position);
+
return;
}
}
else if (dy > 0)
{
- if (first_entry + MAX_MENU_ENTRIES_ON_SCREEN < MAX_SCORE_ENTRIES)
+ if (first_entry + NUM_MENU_ENTRIES_ON_SCREEN < MAX_SCORE_ENTRIES)
{
first_entry += step;
- if (first_entry + MAX_MENU_ENTRIES_ON_SCREEN > MAX_SCORE_ENTRIES)
- first_entry = MAX(0, MAX_SCORE_ENTRIES - MAX_MENU_ENTRIES_ON_SCREEN);
+ if (first_entry + NUM_MENU_ENTRIES_ON_SCREEN > MAX_SCORE_ENTRIES)
+ first_entry = MAX(0, MAX_SCORE_ENTRIES - NUM_MENU_ENTRIES_ON_SCREEN);
drawHallOfFameList(first_entry, highlight_position);
+
return;
}
}
if (button_released)
{
- FadeSound(SND_MENU_HALL_OF_FAME);
- game_status = MAINMENU;
+ FadeSound(SND_BACKGROUND_SCORES);
+ game_status = GAME_MODE_MAIN;
DrawMainMenu();
}
BackToFront();
- if (game_status == HALLOFFAME)
+ if (game_status == GAME_MODE_SCORES)
{
DoAnimation();
#if 1
- PlaySound_Menu_Continue(SND_MENU_HALL_OF_FAME);
+ PlaySound_Menu_Continue(SND_BACKGROUND_SCORES);
#endif
}
}
static void execSetupArtwork()
{
- /* needed if last screen (setup choice) changed graphics, sounds or music */
- ReloadCustomArtwork();
-
setup.graphics_set = artwork.gfx_current->identifier;
setup.sounds_set = artwork.snd_current->identifier;
setup.music_set = artwork.mus_current->identifier;
+ /* needed if last screen (setup choice) changed graphics, sounds or music */
+ ReloadCustomArtwork();
+
/* needed for displaying artwork name instead of artwork identifier */
graphics_set_name = artwork.gfx_current->name;
sounds_set_name = artwork.snd_current->name;
static void execExitSetup()
{
- game_status = MAINMENU;
+ game_status = GAME_MODE_MAIN;
DrawMainMenu();
}
{ TYPE_SWITCH, &setup.editor.el_dx_boulderdash,"DX Boulderd.:" },
{ TYPE_SWITCH, &setup.editor.el_chars, "Characters:" },
{ TYPE_SWITCH, &setup.editor.el_custom, "Custom:" },
+ { TYPE_SWITCH, &setup.editor.el_custom_more, "More Custom:" },
{ TYPE_EMPTY, NULL, "" },
{ TYPE_LEAVE_MENU, execSetupMain, "Back" },
{ 0, NULL, NULL }
static struct TokenInfo setup_info_sound[] =
{
- { TYPE_SWITCH, &setup.sound, "Sound:", },
- { TYPE_EMPTY, NULL, "" },
{ TYPE_SWITCH, &setup.sound_simple, "Simple Sound:" },
{ TYPE_SWITCH, &setup.sound_loops, "Sound Loops:" },
{ TYPE_SWITCH, &setup.sound_music, "Game Music:" },
if (setup_info[pos].type & TYPE_QUERY)
{
value_string = "<press key>";
- font_nr = FONT_INPUT_ACTIVE;
+ font_nr = FONT_INPUT_1_ACTIVE;
}
}
else if (setup_info[pos].type & TYPE_STRING)
if (strlen(value_string) > max_value_len)
value_string[max_value_len] = '\0';
}
- else if (setup_info[pos].type & TYPE_BOOLEAN_STYLE &&
- !*(boolean *)(setup_info[pos].value))
- font_nr = FONT_OPTION_OFF;
+ else if (setup_info[pos].type & TYPE_BOOLEAN_STYLE)
+ {
+ font_nr = (*(boolean *)(setup_info[pos].value) ? FONT_OPTION_ON :
+ FONT_OPTION_OFF);
+ }
- DrawText(SX + xpos * 32, SY + ypos * 32,
+ DrawText(mSX + xpos * 32, mSY + ypos * 32,
(xpos == 3 ? " " : " "), font_nr);
- DrawText(SX + xpos * 32, SY + ypos * 32, value_string, font_nr);
+ DrawText(mSX + xpos * 32, mSY + ypos * 32, value_string, font_nr);
}
static void changeSetupValue(int pos)
title_string = "Setup Shortcuts";
}
- DrawText(SX + 16, SY + 16, title_string, FONT_TITLE_1);
+ DrawText(mSX + 16, mSY + 16, title_string, FONT_TITLE_1);
num_setup_info = 0;
- for(i=0; setup_info[i].type != 0 && i < MAX_MENU_ENTRIES_ON_SCREEN; i++)
+ for(i=0; setup_info[i].type != 0 && i < NUM_MENU_ENTRIES_ON_SCREEN; i++)
{
void *value_ptr = setup_info[i].value;
int ypos = MENU_SCREEN_START_YPOS + i;
int font_nr = FONT_MENU_1;
/* set some entries to "unchangeable" according to other variables */
- if ((value_ptr == &setup.sound && !audio.sound_available) ||
- (value_ptr == &setup.sound_loops && !audio.loops_available) ||
- (value_ptr == &setup.sound_music && !audio.music_available) ||
- (value_ptr == &setup.fullscreen && !video.fullscreen_available))
+ if ((value_ptr == &setup.sound_simple && !audio.sound_available) ||
+ (value_ptr == &setup.sound_loops && !audio.loops_available) ||
+ (value_ptr == &setup.sound_music && !audio.music_available) ||
+ (value_ptr == &setup.fullscreen && !video.fullscreen_available))
setup_info[i].type |= TYPE_GHOSTED;
if (setup_info[i].type & TYPE_STRING)
font_nr = FONT_MENU_2;
- DrawText(SX + 32, SY + ypos * 32, setup_info[i].text, font_nr);
+ DrawText(mSX + 32, mSY + ypos * 32, setup_info[i].text, font_nr);
if (setup_info[i].type & TYPE_ENTER_MENU)
initCursor(i, IMG_MENU_BUTTON_RIGHT);
if (mx || my) /* mouse input */
{
- x = (mx - SX) / 32;
- y = (my - SY) / 32 - MENU_SCREEN_START_YPOS;
+ x = (mx - mSX) / 32;
+ y = (my - mSY) / 32 - MENU_SCREEN_START_YPOS;
}
else if (dx || dy) /* keyboard input */
{
BackToFront();
- if (game_status == SETUP)
+ if (game_status == GAME_MODE_SETUP)
DoAnimation();
}
{
ClearWindow();
- DrawText(SX+16, SY+16, "Setup Input", FONT_TITLE_1);
+ DrawText(mSX+16, mSY+16, "Setup Input", FONT_TITLE_1);
initCursor(0, IMG_MENU_BUTTON);
initCursor(1, IMG_MENU_BUTTON);
drawCursorXY(10, 0, IMG_MENU_BUTTON_LEFT);
drawCursorXY(12, 0, IMG_MENU_BUTTON_RIGHT);
- DrawText(SX+32, SY+2*32, "Player:", FONT_MENU_1);
- DrawText(SX+32, SY+3*32, "Device:", FONT_MENU_1);
- DrawText(SX+32, SY+15*32, "Back", FONT_MENU_1);
+ DrawText(mSX+32, mSY+2*32, "Player:", FONT_MENU_1);
+ DrawText(mSX+32, mSY+3*32, "Device:", FONT_MENU_1);
+ DrawText(mSX+32, mSY+15*32, "Back", FONT_MENU_1);
#if 0
DeactivateJoystickForCalibration();
custom_key = setup.input[player_nr].key;
- DrawText(SX+11*32, SY+2*32, int2str(player_nr + 1, 1), FONT_INPUT_ACTIVE);
- DrawGraphicThruMask(8, 2, PLAYER_NR_GFX(IMG_PLAYER1, player_nr), 0);
+ DrawText(mSX+11*32, mSY+2*32, int2str(player_nr +1, 1), FONT_INPUT_1_ACTIVE);
+#if 1
+ DrawGraphicThruMaskExt(drawto, mSX + 8 * TILEX, mSY + 2 * TILEY,
+ PLAYER_NR_GFX(IMG_PLAYER_1, player_nr), 0);
+#else
+ DrawGraphicThruMask(8, 2, PLAYER_NR_GFX(IMG_PLAYER_1, player_nr), 0);
+#endif
if (setup.input[player_nr].use_joystick)
{
char *device_name = setup.input[player_nr].joy.device_name;
- DrawText(SX+8*32, SY+3*32,
+ DrawText(mSX+8*32, mSY+3*32,
joystick_name[getJoystickNrFromDeviceName(device_name)],
FONT_VALUE_1);
- DrawText(SX+32, SY+4*32, "Calibrate", FONT_MENU_1);
+ DrawText(mSX+32, mSY+4*32, "Calibrate", FONT_MENU_1);
}
else
{
- DrawText(SX+8*32, SY+3*32, "Keyboard ", FONT_VALUE_1);
- DrawText(SX+32, SY+4*32, "Customize", FONT_MENU_1);
+ DrawText(mSX+8*32, mSY+3*32, "Keyboard ", FONT_VALUE_1);
+ DrawText(mSX+32, mSY+4*32, "Customize", FONT_MENU_1);
}
- DrawText(SX+32, SY+5*32, "Actual Settings:", FONT_MENU_1);
+ DrawText(mSX+32, mSY+5*32, "Actual Settings:", FONT_MENU_1);
drawCursorXY(1, 4, IMG_MENU_BUTTON_LEFT);
drawCursorXY(1, 5, IMG_MENU_BUTTON_RIGHT);
drawCursorXY(1, 6, IMG_MENU_BUTTON_UP);
drawCursorXY(1, 7, IMG_MENU_BUTTON_DOWN);
- DrawText(SX+2*32, SY+6*32, ":", FONT_VALUE_OLD);
- DrawText(SX+2*32, SY+7*32, ":", FONT_VALUE_OLD);
- DrawText(SX+2*32, SY+8*32, ":", FONT_VALUE_OLD);
- DrawText(SX+2*32, SY+9*32, ":", FONT_VALUE_OLD);
- DrawText(SX+32, SY+10*32, "Snap Field:", FONT_VALUE_OLD);
- DrawText(SX+32, SY+12*32, "Place Bomb:", FONT_VALUE_OLD);
+ DrawText(mSX+2*32, mSY+6*32, ":", FONT_VALUE_OLD);
+ DrawText(mSX+2*32, mSY+7*32, ":", FONT_VALUE_OLD);
+ DrawText(mSX+2*32, mSY+8*32, ":", FONT_VALUE_OLD);
+ DrawText(mSX+2*32, mSY+9*32, ":", FONT_VALUE_OLD);
+ DrawText(mSX+32, mSY+10*32, "Snap Field:", FONT_VALUE_OLD);
+ DrawText(mSX+32, mSY+12*32, "Place Bomb:", FONT_VALUE_OLD);
for (i=0; i<6; i++)
{
int ypos = 6 + i + (i > 3 ? i-3 : 0);
- DrawText(SX + 3*32, SY + ypos*32,
+ DrawText(mSX + 3*32, mSY + ypos*32,
" ", FONT_VALUE_1);
- DrawText(SX + 3*32, SY + ypos*32,
+ DrawText(mSX + 3*32, mSY + ypos*32,
(setup.input[player_nr].use_joystick ?
custom[i].text :
getKeyNameFromKey(*custom[i].key)), FONT_VALUE_1);
if (mx || my) /* mouse input */
{
- x = (mx - SX) / 32;
- y = (my - SY) / 32 - MENU_SCREEN_START_YPOS;
+ x = (mx - mSX) / 32;
+ y = (my - mSY) / 32 - MENU_SCREEN_START_YPOS;
}
else if (dx || dy) /* keyboard input */
{
out:
- if (game_status == SETUP)
+ if (game_status == GAME_MODE_SETUP)
DoAnimation();
}
custom_key = setup.input[player_nr].key;
ClearWindow();
- DrawText(SX + 16, SY + 16, "Keyboard Input", FONT_TITLE_1);
+ DrawText(mSX + 16, mSY + 16, "Keyboard Input", FONT_TITLE_1);
BackToFront();
InitAnimation();
step_nr = 0;
- DrawText(SX, SY + (2+2*step_nr)*32,
- customize_step[step_nr].text, FONT_INPUT_ACTIVE);
- DrawText(SX, SY + (2+2*step_nr+1)*32,
- "Key:", FONT_INPUT_ACTIVE);
- DrawText(SX + 4*32, SY + (2+2*step_nr+1)*32,
+ DrawText(mSX, mSY + (2+2*step_nr)*32,
+ customize_step[step_nr].text, FONT_INPUT_1_ACTIVE);
+ DrawText(mSX, mSY + (2+2*step_nr+1)*32,
+ "Key:", FONT_INPUT_1_ACTIVE);
+ DrawText(mSX + 4*32, mSY + (2+2*step_nr+1)*32,
getKeyNameFromKey(*customize_step[step_nr].key), FONT_VALUE_OLD);
while(!finished)
/* got new key binding */
*customize_step[step_nr].key = key;
- DrawText(SX + 4*32, SY + (2+2*step_nr+1)*32,
+ DrawText(mSX + 4*32, mSY + (2+2*step_nr+1)*32,
" ", FONT_VALUE_1);
- DrawText(SX + 4*32, SY + (2+2*step_nr+1)*32,
+ DrawText(mSX + 4*32, mSY + (2+2*step_nr+1)*32,
getKeyNameFromKey(key), FONT_VALUE_1);
step_nr++;
/* un-highlight last query */
- DrawText(SX, SY+(2+2*(step_nr-1))*32,
+ DrawText(mSX, mSY+(2+2*(step_nr-1))*32,
customize_step[step_nr-1].text, FONT_MENU_1);
- DrawText(SX, SY+(2+2*(step_nr-1)+1)*32,
+ DrawText(mSX, mSY+(2+2*(step_nr-1)+1)*32,
"Key:", FONT_MENU_1);
/* press 'Enter' to leave */
if (step_nr == 6)
{
- DrawText(SX + 16, SY + 15*32+16,
+ DrawText(mSX + 16, mSY + 15*32+16,
"Press Enter", FONT_TITLE_1);
break;
}
/* query next key binding */
- DrawText(SX, SY+(2+2*step_nr)*32,
- customize_step[step_nr].text, FONT_INPUT_ACTIVE);
- DrawText(SX, SY+(2+2*step_nr+1)*32,
- "Key:", FONT_INPUT_ACTIVE);
- DrawText(SX + 4*32, SY+(2+2*step_nr+1)*32,
+ DrawText(mSX, mSY+(2+2*step_nr)*32,
+ customize_step[step_nr].text, FONT_INPUT_1_ACTIVE);
+ DrawText(mSX, mSY+(2+2*step_nr+1)*32,
+ "Key:", FONT_INPUT_1_ACTIVE);
+ DrawText(mSX + 4*32, mSY+(2+2*step_nr+1)*32,
getKeyNameFromKey(*customize_step[step_nr].key),
FONT_VALUE_OLD);
}
}
}
- DrawText(SX, SY + 6 * 32, " ROTATE JOYSTICK ", FONT_TITLE_1);
- DrawText(SX, SY + 7 * 32, "IN ALL DIRECTIONS", FONT_TITLE_1);
- DrawText(SX + 16, SY + 9 * 32, " IF ALL BALLS ", FONT_TITLE_1);
- DrawText(SX, SY + 10 * 32, " ARE YELLOW, ", FONT_TITLE_1);
- DrawText(SX, SY + 11 * 32, " CENTER JOYSTICK ", FONT_TITLE_1);
- DrawText(SX, SY + 12 * 32, " AND ", FONT_TITLE_1);
- DrawText(SX, SY + 13 * 32, "PRESS ANY BUTTON!", FONT_TITLE_1);
+ DrawText(mSX, mSY + 6 * 32, " ROTATE JOYSTICK ", FONT_TITLE_1);
+ DrawText(mSX, mSY + 7 * 32, "IN ALL DIRECTIONS", FONT_TITLE_1);
+ DrawText(mSX + 16, mSY + 9 * 32, " IF ALL BALLS ", FONT_TITLE_1);
+ DrawText(mSX, mSY + 10 * 32, " ARE YELLOW, ", FONT_TITLE_1);
+ DrawText(mSX, mSY + 11 * 32, " CENTER JOYSTICK ", FONT_TITLE_1);
+ DrawText(mSX, mSY + 12 * 32, " AND ", FONT_TITLE_1);
+ DrawText(mSX, mSY + 13 * 32, "PRESS ANY BUTTON!", FONT_TITLE_1);
joy_value = Joystick(player_nr);
last_x = (joy_value & JOY_LEFT ? -1 : joy_value & JOY_RIGHT ? +1 : 0);
{
ClearWindow();
- DrawText(SX + 16, SY + 6*32, " JOYSTICK NOT ", FONT_TITLE_1);
- DrawText(SX, SY + 7*32, " AVAILABLE ", FONT_TITLE_1);
+ DrawText(mSX + 16, mSY + 6*32, " JOYSTICK NOT ", FONT_TITLE_1);
+ DrawText(mSX, mSY + 7*32, " AVAILABLE ", FONT_TITLE_1);
BackToFront();
Delay(2000); /* show error message for two seconds */
}
void HandleGameActions()
{
- if (game_status != PLAYING)
+ if (game_status != GAME_MODE_PLAYING)
return;
if (local_player->LevelSolved)
GameActions();
BackToFront();
+
+#if 1
+ if (tape.auto_play && !tape.playing)
+ AutoPlayTape(); /* continue automatically playing next tape */
+#endif
}
/* ---------- new screen button stuff -------------------------------------- */
/* graphic position and size values for buttons and scrollbars */
-#define SC_SCROLLBUTTON_XSIZE 32
-#define SC_SCROLLBUTTON_YSIZE 32
+#define SC_SCROLLBUTTON_XSIZE TILEX
+#define SC_SCROLLBUTTON_YSIZE TILEY
+#define SC_SCROLL_VERTICAL_XSIZE SC_SCROLLBUTTON_XSIZE
+#define SC_SCROLL_VERTICAL_YSIZE ((MAX_MENU_ENTRIES_ON_SCREEN - 2) * \
+ SC_SCROLLBUTTON_YSIZE)
#define SC_SCROLL_UP_XPOS (SXSIZE - SC_SCROLLBUTTON_XSIZE)
-#define SC_SCROLL_UP_YPOS SC_SCROLLBUTTON_YSIZE
-#define SC_SCROLL_DOWN_XPOS SC_SCROLL_UP_XPOS
-#define SC_SCROLL_DOWN_YPOS (SYSIZE - SC_SCROLLBUTTON_YSIZE)
+#define SC_SCROLL_UP_YPOS (2 * SC_SCROLLBUTTON_YSIZE)
#define SC_SCROLL_VERTICAL_XPOS SC_SCROLL_UP_XPOS
-#define SC_SCROLL_VERTICAL_YPOS (SC_SCROLL_UP_YPOS + SC_SCROLLBUTTON_YSIZE)
-#define SC_SCROLL_VERTICAL_XSIZE SC_SCROLLBUTTON_XSIZE
-#define SC_SCROLL_VERTICAL_YSIZE (SYSIZE - 3 * SC_SCROLLBUTTON_YSIZE)
+#define SC_SCROLL_VERTICAL_YPOS (SC_SCROLL_UP_YPOS + \
+ SC_SCROLLBUTTON_YSIZE)
+#define SC_SCROLL_DOWN_XPOS SC_SCROLL_UP_XPOS
+#define SC_SCROLL_DOWN_YPOS (SC_SCROLL_VERTICAL_YPOS + \
+ SC_SCROLL_VERTICAL_YSIZE)
#define SC_BORDER_SIZE 14
#else
IMG_MENU_SCROLLBAR, IMG_MENU_SCROLLBAR_ACTIVE,
#endif
- SX + SC_SCROLL_VERTICAL_XPOS, SY + SC_SCROLL_VERTICAL_YPOS,
+ SC_SCROLL_VERTICAL_XPOS, SC_SCROLL_VERTICAL_YPOS,
SC_SCROLL_VERTICAL_XSIZE, SC_SCROLL_VERTICAL_YSIZE,
GD_TYPE_SCROLLBAR_VERTICAL,
SCREEN_CTRL_ID_SCROLL_VERTICAL,
int gd_x1, gd_x2, gd_y1, gd_y2;
int id = scrollbutton_info[i].gadget_id;
- x = scrollbutton_info[i].x;
- y = scrollbutton_info[i].y;
-
event_mask = GD_EVENT_PRESSED | GD_EVENT_REPEATED;
- x += SX;
- y += SY;
+ x = mSX + scrollbutton_info[i].x + menu.scrollbar_xoffset;
+ y = mSY + scrollbutton_info[i].y;
width = SC_SCROLLBUTTON_XSIZE;
height = SC_SCROLLBUTTON_YSIZE;
+ if (id == SCREEN_CTRL_ID_SCROLL_DOWN)
+ y = mSY + (SC_SCROLL_VERTICAL_YPOS +
+ (NUM_MENU_ENTRIES_ON_SCREEN - 2) * SC_SCROLLBUTTON_YSIZE);
+
gfx_unpressed = scrollbutton_info[i].gfx_unpressed;
gfx_pressed = scrollbutton_info[i].gfx_pressed;
gd_bitmap_unpressed = graphic_info[gfx_unpressed].bitmap;
#if !defined(TARGET_X11_NATIVE_PERFORMANCE_WORKAROUND)
int gfx_unpressed, gfx_pressed;
#endif
+ int x, y, width, height;
int gd_x1, gd_x2, gd_y1, gd_y2;
struct GadgetInfo *gi;
int items_max, items_visible, item_position;
unsigned long event_mask;
- int num_page_entries = MAX_MENU_ENTRIES_ON_SCREEN - 1;
+ int num_page_entries = NUM_MENU_ENTRIES_ON_SCREEN;
int id = scrollbar_info[i].gadget_id;
+ event_mask = GD_EVENT_MOVING | GD_EVENT_OFF_BORDERS;
+
+ x = mSX + scrollbar_info[i].x + menu.scrollbar_xoffset;
+ y = mSY + scrollbar_info[i].y;
+ width = scrollbar_info[i].width;
+ height = scrollbar_info[i].height;
+
+ if (id == SCREEN_CTRL_ID_SCROLL_VERTICAL)
+ height = (NUM_MENU_ENTRIES_ON_SCREEN - 2) * SC_SCROLLBUTTON_YSIZE;
+
items_max = num_page_entries;
items_visible = num_page_entries;
item_position = 0;
- event_mask = GD_EVENT_MOVING | GD_EVENT_OFF_BORDERS;
-
#if defined(TARGET_X11_NATIVE_PERFORMANCE_WORKAROUND)
gd_bitmap_unpressed = *scrollbar_info[i].gfx_unpressed;
gd_bitmap_pressed = *scrollbar_info[i].gfx_pressed;
gi = CreateGadget(GDI_CUSTOM_ID, id,
GDI_CUSTOM_TYPE_ID, i,
GDI_INFO_TEXT, scrollbar_info[i].infotext,
- GDI_X, scrollbar_info[i].x,
- GDI_Y, scrollbar_info[i].y,
- GDI_WIDTH, scrollbar_info[i].width,
- GDI_HEIGHT, scrollbar_info[i].height,
+ GDI_X, x,
+ GDI_Y, y,
+ GDI_WIDTH, width,
+ GDI_HEIGHT, height,
GDI_TYPE, scrollbar_info[i].type,
GDI_SCROLLBAR_ITEMS_MAX, items_max,
GDI_SCROLLBAR_ITEMS_VISIBLE, items_visible,
GDI_STATE, GD_BUTTON_UNPRESSED,
GDI_DESIGN_UNPRESSED, gd_bitmap_unpressed, gd_x1, gd_y1,
GDI_DESIGN_PRESSED, gd_bitmap_pressed, gd_x2, gd_y2,
- GDI_BORDER_SIZE, SC_BORDER_SIZE,
+ GDI_BORDER_SIZE, SC_BORDER_SIZE, SC_BORDER_SIZE,
GDI_EVENT_MASK, event_mask,
GDI_CALLBACK_ACTION, HandleScreenGadgets,
GDI_END);
void CreateScreenGadgets()
{
+ int last_game_status = game_status; /* save current game status */
+
#if defined(TARGET_X11_NATIVE_PERFORMANCE_WORKAROUND)
int i;
}
#endif
+ /* force LEVELS draw offset for scrollbar / scrollbutton gadgets */
+ game_status = GAME_MODE_LEVELS;
+
CreateScreenScrollbuttons();
CreateScreenScrollbars();
+
+ game_status = last_game_status; /* restore current game status */
}
void FreeScreenGadgets()
int num_entries = numTreeInfoInGroup(ti);
int i;
- if (num_entries <= MAX_MENU_ENTRIES_ON_SCREEN)
+ if (num_entries <= NUM_MENU_ENTRIES_ON_SCREEN)
return;
for (i=0; i<NUM_SCREEN_GADGETS; i++)
{
int id = gi->custom_id;
- if (game_status != CHOOSELEVEL && game_status != SETUP)
+ if (game_status != GAME_MODE_LEVELS && game_status != GAME_MODE_SETUP)
return;
switch (id)
{
case SCREEN_CTRL_ID_SCROLL_UP:
- if (game_status == CHOOSELEVEL)
- HandleChooseLevel(SX,SY + 32, 0,0, MB_MENU_MARK);
- else if (game_status == SETUP)
- HandleSetupScreen(SX,SY + 32, 0,0, MB_MENU_MARK);
+ if (game_status == GAME_MODE_LEVELS)
+ HandleChooseLevel(0,0, 0, -1 * SCROLL_LINE, MB_MENU_MARK);
+ else if (game_status == GAME_MODE_SETUP)
+ HandleSetupScreen(0,0, 0, -1 * SCROLL_LINE, MB_MENU_MARK);
break;
case SCREEN_CTRL_ID_SCROLL_DOWN:
- if (game_status == CHOOSELEVEL)
- HandleChooseLevel(SX,SY + SYSIZE - 32, 0,0, MB_MENU_MARK);
- else if (game_status == SETUP)
- HandleSetupScreen(SX,SY + SYSIZE - 32, 0,0, MB_MENU_MARK);
+ if (game_status == GAME_MODE_LEVELS)
+ HandleChooseLevel(0,0, 0, +1 * SCROLL_LINE, MB_MENU_MARK);
+ else if (game_status == GAME_MODE_SETUP)
+ HandleSetupScreen(0,0, 0, +1 * SCROLL_LINE, MB_MENU_MARK);
break;
case SCREEN_CTRL_ID_SCROLL_VERTICAL:
- if (game_status == CHOOSELEVEL)
+ if (game_status == GAME_MODE_LEVELS)
HandleChooseLevel(0,0, 999,gi->event.item_position,MB_MENU_INITIALIZE);
- else if (game_status == SETUP)
+ else if (game_status == GAME_MODE_SETUP)
HandleSetupScreen(0,0, 999,gi->event.item_position,MB_MENU_INITIALIZE);
break;