game_status = last_game_status; /* restore current game status */
}
-static void PlaySound_Menu_Start(int sound)
+static void PlayMenuSound()
{
+ int sound = menu.sound[game_status];
+
+ if (sound == SND_UNDEFINED)
+ return;
+
if (sound_info[sound].loop)
PlaySoundLoop(sound);
else
PlaySound(sound);
}
-static void PlaySound_Menu_Continue(int sound)
+static void PlayMenuSoundIfLoop()
{
+ int sound = menu.sound[game_status];
+
+ if (sound == SND_UNDEFINED)
+ return;
+
if (sound_info[sound].loop)
PlaySoundLoop(sound);
}
+static void PlayMenuMusic()
+{
+ int music = menu.music[game_status];
+
+ if (music == MUS_UNDEFINED)
+ return;
+
+ PlayMusic(music);
+}
+
void DrawHeadline()
{
- int text1_width = getTextWidth(PROGRAM_TITLE_STRING, FONT_TITLE_1);
- int text2_width = getTextWidth(WINDOW_SUBTITLE_STRING, FONT_TITLE_2);
+ int text1_width = getTextWidth(PROGRAM_TITLE_STRING, FONT_TITLE_1);
+ int text2_width = getTextWidth(PROGRAM_COPYRIGHT_STRING, FONT_TITLE_2);
int x1 = SX + (SXSIZE - text1_width) / 2;
int x2 = SX + (SXSIZE - text2_width) / 2;
- DrawText(x1, SY + 8, PROGRAM_TITLE_STRING, FONT_TITLE_1);
- DrawText(x2, SY + 46, WINDOW_SUBTITLE_STRING, FONT_TITLE_2);
+ DrawText(x1, SY + 8, PROGRAM_TITLE_STRING, FONT_TITLE_1);
+ DrawText(x2, SY + 46, PROGRAM_COPYRIGHT_STRING, FONT_TITLE_2);
}
static void ToggleFullscreenIfNeeded()
int i;
UnmapAllGadgets();
- FadeSounds();
+ FadeSoundsAndMusic();
KeyboardAutoRepeatOn();
ActivateJoystick();
{
game_status = GAME_MODE_EDITOR;
DrawLevelEd();
+
return;
}
if (leveldir_current->readonly)
{
- DrawTextF(mSX + level_width + 9 * 32 - 2,
+ DrawTextS(mSX + level_width + 9 * 32 - 2,
mSY + 3 * 32 + 1 - 7, FONT_TEXT_3, "READ");
- DrawTextF(mSX + level_width + 9 * 32 - 2,
+ DrawTextS(mSX + level_width + 9 * 32 - 2,
mSY + 3 * 32 + 1 + 7, FONT_TEXT_3, "ONLY");
}
LoadTape(level_nr);
DrawCompleteVideoDisplay();
+ PlayMenuSound();
+ PlayMenuMusic();
+
OpenDoor(DOOR_CLOSE_1 | DOOR_OPEN_2);
#if 0
void HandleMainMenu(int mx, int my, int dx, int dy, int button)
{
- static int choice = 0;
+ static int choice = 5;
int x = 0;
int y = choice;
}
}
- BackToFront();
-
out:
if (game_status == GAME_MODE_MAIN)
DrawMicroLevel(MICROLEV_XPOS, MICROLEV_YPOS, FALSE);
DoAnimation();
}
+
+ BackToFront();
}
static int helpscreen_step[MAX_HELPSCREEN_ELS];
static int helpscreen_frame[MAX_HELPSCREEN_ELS];
+#if 0
static int helpscreen_action[] =
{
IMG_PLAYER_1_MOVING_DOWN, 16,
HA_END
};
+#endif
+
static char *helpscreen_eltext[][2] =
{
{"THE HERO:", "(Is _this_ guy good old Rockford?)"},
};
static int num_helpscreen_els = sizeof(helpscreen_eltext) / (2*sizeof(char *));
+#if 0
static char *helpscreen_music[][3] =
{
{ "Alchemy", "Ian Boddy", "Drive" },
{ "Voyager", "The Alan Parsons Project","Pyramid" },
{ "Twilight Painter", "Tangerine Dream", "Heartbreakers" }
};
+#endif
+
static int num_helpscreen_music = 7;
static int helpscreen_musicpos;
-#if 0
-void OLD_DrawHelpScreenElAction(int start)
+#if 1
+void DrawHelpScreenElAction(int start)
{
int i = 0, j = 0;
- int frame, graphic;
- int xstart = SX+16, ystart = SY+64+2*32, ystep = TILEY+4;
+ int xstart = mSX + 16;
+ int ystart = mSY + 64 + 2 * 32;
+ int ystep = TILEY + 4;
+ int element, action, direction;
+ int graphic;
+ int delay;
+ int sync_frame;
- while(helpscreen_action[j] != HA_END)
+ while (info_animation_info[j].element != -999)
{
- if (i>=start+MAX_HELPSCREEN_ELS || i>=num_helpscreen_els)
+ if (i >= start + MAX_HELPSCREEN_ELS || i >= num_helpscreen_els)
break;
- else if (i<start || helpscreen_delay[i-start])
+ else if (i < start)
{
- if (i>=start && helpscreen_delay[i-start])
- helpscreen_delay[i-start]--;
-
- while(helpscreen_action[j] != HA_NEXT)
+ while (info_animation_info[j].element != -1)
j++;
+
j++;
i++;
+
continue;
}
- j += 3*helpscreen_step[i-start];
- graphic = helpscreen_action[j++];
+ j += helpscreen_step[i - start];
+
+ element = info_animation_info[j].element;
+ action = info_animation_info[j].action;
+ direction = info_animation_info[j].direction;
+
+ if (action != -1 && direction != -1)
+ graphic = el_act_dir2img(element, action, direction);
+ else if (action != -1)
+ graphic = el_act2img(element, action);
+ else if (direction != -1)
+ graphic = el_act2img(element, direction);
+ else
+ graphic = el2img(element);
+
+ delay = info_animation_info[j++].delay;
- if (helpscreen_frame[i-start])
+ if (delay == -1)
+ delay = 1000000;
+
+ if (helpscreen_frame[i - start] == 0)
{
- frame = helpscreen_action[j++] - helpscreen_frame[i-start];
- helpscreen_frame[i-start]--;
+ sync_frame = 0;
+ helpscreen_frame[i - start] = delay - 1;
}
else
{
- frame = 0;
- helpscreen_frame[i-start] = helpscreen_action[j++]-1;
+ sync_frame = delay - helpscreen_frame[i - start];
+ helpscreen_frame[i - start]--;
}
- helpscreen_delay[i-start] = helpscreen_action[j++] - 1;
-
- if (helpscreen_action[j] == HA_NEXT)
+ if (info_animation_info[j].element == -1)
{
- if (!helpscreen_frame[i-start])
- helpscreen_step[i-start] = 0;
+ if (!helpscreen_frame[i - start])
+ helpscreen_step[i - start] = 0;
}
else
{
- if (!helpscreen_frame[i-start])
- helpscreen_step[i-start]++;
- while(helpscreen_action[j] != HA_NEXT)
+ if (!helpscreen_frame[i - start])
+ helpscreen_step[i - start]++;
+ while(info_animation_info[j].element != -1)
j++;
}
+
j++;
- DrawOldGraphicExt(drawto, xstart, ystart+(i-start)*ystep, graphic+frame);
+ ClearRectangleOnBackground(drawto, xstart, ystart + (i - start) * ystep,
+ TILEX, TILEY);
+ DrawGraphicAnimationExt(drawto, xstart, ystart + (i - start) * ystep,
+ graphic, sync_frame, USE_MASKING);
+
i++;
}
- for(i=2;i<16;i++)
- {
- MarkTileDirty(0,i);
- MarkTileDirty(1,i);
- }
+ redraw_mask |= REDRAW_FIELD;
+
+ FrameCounter++;
}
-#endif
+
+#else
void DrawHelpScreenElAction(int start)
{
FrameCounter++;
}
+#endif
void DrawHelpScreenElText(int start)
{
ClearWindow();
DrawHeadline();
- DrawTextFCentered(100, FONT_TEXT_1, "The game elements:");
+ DrawTextSCentered(100, FONT_TEXT_1, "The game elements:");
for(i=start; i < start + MAX_HELPSCREEN_ELS && i < num_helpscreen_els; i++)
{
helpscreen_eltext[i][1], FONT_TEXT_2);
}
- DrawTextFCentered(ybottom, FONT_TEXT_4,
+ DrawTextSCentered(ybottom, FONT_TEXT_4,
"Press any key or button for next page");
}
void DrawHelpScreenMusicText(int num)
{
+ struct MusicFileInfo *list = music_file_info;
int ystart = 150, ystep = 30;
int ybottom = SYSIZE - 20;
+ int i;
+
+ for (i=0; i < num && list; i++)
+ list = list->next;
- FadeSounds();
+ FadeSoundsAndMusic();
ClearWindow();
DrawHeadline();
- DrawTextFCentered(100, FONT_TEXT_1, "The game background music loops:");
+ DrawTextSCentered(100, FONT_TEXT_1, "The game background music loops:");
- DrawTextFCentered(ystart + 0 * ystep, FONT_TEXT_2, "Excerpt from");
+#if 1
+ DrawTextSCentered(ystart + 0 * ystep, FONT_TEXT_2, "Excerpt from");
+ DrawTextFCentered(ystart + 1 * ystep, FONT_TEXT_3, "\"%s\"", list->title);
+ DrawTextSCentered(ystart + 2 * ystep, FONT_TEXT_2, "by");
+ DrawTextFCentered(ystart + 3 * ystep, FONT_TEXT_3, "%s", list->artist);
+ DrawTextSCentered(ystart + 4 * ystep, FONT_TEXT_2, "from the album");
+ DrawTextFCentered(ystart + 5 * ystep, FONT_TEXT_3, "\"%s\"", list->album);
+#else
+ DrawTextSCentered(ystart + 0 * ystep, FONT_TEXT_2, "Excerpt from");
DrawTextFCentered(ystart + 1 * ystep, FONT_TEXT_3,
"\"%s\"", helpscreen_music[num][0]);
- DrawTextFCentered(ystart + 2 * ystep, FONT_TEXT_2, "by");
+ DrawTextSCentered(ystart + 2 * ystep, FONT_TEXT_2, "by");
DrawTextFCentered(ystart + 3 * ystep, FONT_TEXT_3,
"%s", helpscreen_music[num][1]);
- DrawTextFCentered(ystart + 4 * ystep, FONT_TEXT_2, "from the album");
+ DrawTextSCentered(ystart + 4 * ystep, FONT_TEXT_2, "from the album");
DrawTextFCentered(ystart + 5 * ystep, FONT_TEXT_3,
"\"%s\"", helpscreen_music[num][2]);
+#endif
- DrawTextFCentered(ybottom, FONT_TEXT_4,
+ DrawTextSCentered(ybottom, FONT_TEXT_4,
"Press any key or button for next page");
#if 0
int ystart = 150, ystep = 30;
int ybottom = SYSIZE - 20;
- FadeSounds();
+ FadeSoundsAndMusic();
ClearWindow();
DrawHeadline();
- DrawTextFCentered(100, FONT_TEXT_1, "Credits:");
- DrawTextFCentered(ystart + 0 * ystep, FONT_TEXT_2, "DOS port of the game:");
- DrawTextFCentered(ystart + 1 * ystep, FONT_TEXT_3, "Guido Schulz");
- DrawTextFCentered(ystart + 2 * ystep, FONT_TEXT_2, "Additional toons:");
- DrawTextFCentered(ystart + 3 * ystep, FONT_TEXT_3, "Karl Hörnell");
- DrawTextFCentered(ystart + 5 * ystep, FONT_TEXT_2,
+ DrawTextSCentered(100, FONT_TEXT_1, "Credits:");
+ DrawTextSCentered(ystart + 0 * ystep, FONT_TEXT_2, "DOS port of the game:");
+ DrawTextSCentered(ystart + 1 * ystep, FONT_TEXT_3, "Guido Schulz");
+ DrawTextSCentered(ystart + 2 * ystep, FONT_TEXT_2, "Additional toons:");
+ DrawTextSCentered(ystart + 3 * ystep, FONT_TEXT_3, "Karl Hörnell");
+ DrawTextSCentered(ystart + 5 * ystep, FONT_TEXT_2,
"...and many thanks to all contributors");
- DrawTextFCentered(ystart + 6 * ystep, FONT_TEXT_2, "of new levels!");
+ DrawTextSCentered(ystart + 6 * ystep, FONT_TEXT_2, "of new levels!");
- DrawTextFCentered(ybottom, FONT_TEXT_4,
+ DrawTextSCentered(ybottom, FONT_TEXT_4,
"Press any key or button for next page");
}
ClearWindow();
DrawHeadline();
- DrawTextFCentered(100, FONT_TEXT_1, "Program information:");
+ DrawTextSCentered(100, FONT_TEXT_1, "Program information:");
- DrawTextFCentered(ystart + 0 * ystep, FONT_TEXT_2,
+ DrawTextSCentered(ystart + 0 * ystep, FONT_TEXT_2,
"This game is Freeware!");
- DrawTextFCentered(ystart + 1 * ystep, FONT_TEXT_2,
+ DrawTextSCentered(ystart + 1 * ystep, FONT_TEXT_2,
"If you like it, send e-mail to:");
- DrawTextFCentered(ystart + 2 * ystep, FONT_TEXT_3,
+ DrawTextSCentered(ystart + 2 * ystep, FONT_TEXT_3,
"info@artsoft.org");
- DrawTextFCentered(ystart + 3 * ystep, FONT_TEXT_2,
+ DrawTextSCentered(ystart + 3 * ystep, FONT_TEXT_2,
"or SnailMail to:");
- DrawTextFCentered(ystart + 4 * ystep + 0, FONT_TEXT_3,
+ DrawTextSCentered(ystart + 4 * ystep + 0, FONT_TEXT_3,
"Holger Schemel");
- DrawTextFCentered(ystart + 4 * ystep + 20, FONT_TEXT_3,
+ DrawTextSCentered(ystart + 4 * ystep + 20, FONT_TEXT_3,
"Detmolder Strasse 189");
- DrawTextFCentered(ystart + 4 * ystep + 40, FONT_TEXT_3,
+ DrawTextSCentered(ystart + 4 * ystep + 40, FONT_TEXT_3,
"33604 Bielefeld");
- DrawTextFCentered(ystart + 4 * ystep + 60, FONT_TEXT_3,
+ DrawTextSCentered(ystart + 4 * ystep + 60, FONT_TEXT_3,
"Germany");
- DrawTextFCentered(ystart + 7 * ystep, FONT_TEXT_2,
+ DrawTextSCentered(ystart + 7 * ystep, FONT_TEXT_2,
"If you have created new levels,");
- DrawTextFCentered(ystart + 8 * ystep, FONT_TEXT_2,
+ DrawTextSCentered(ystart + 8 * ystep, FONT_TEXT_2,
"send them to me to include them!");
- DrawTextFCentered(ystart + 9 * ystep, FONT_TEXT_2,
+ DrawTextSCentered(ystart + 9 * ystep, FONT_TEXT_2,
":-)");
- DrawTextFCentered(ybottom, FONT_TEXT_4,
+ DrawTextSCentered(ybottom, FONT_TEXT_4,
"Press any key or button for main menu");
}
void DrawHelpScreen()
{
+ struct MusicFileInfo *list;
int i;
UnmapAllGadgets();
helpscreen_musicpos = 0;
helpscreen_state = 0;
+ LoadInfoAnimations();
+ LoadMusicInfo();
+
+ num_helpscreen_els = 0;
+ for (i=0; info_animation_info[i].element != -999; i++)
+ if (info_animation_info[i].element == -1)
+ num_helpscreen_els++;
+
+ num_helpscreen_music = 0;
+ for (list = music_file_info; list != NULL; list = list->next)
+ num_helpscreen_music++;
+
DrawHelpScreenElText(0);
DrawHelpScreenElAction(0);
FadeToFront();
InitAnimation();
-#if 0
- PlaySoundLoop(SND_BACKGROUND_INFO);
-#else
- PlaySound_Menu_Start(SND_BACKGROUND_INFO);
-#endif
+ PlayMenuSound();
+ PlayMenuMusic();
}
void HandleHelpScreen(int button)
}
else
{
- FadeSounds();
+ FadeSoundsAndMusic();
game_status = GAME_MODE_MAIN;
DrawMainMenu();
DrawHelpScreenElAction(helpscreen_state * MAX_HELPSCREEN_ELS);
}
- /* !!! workaround for playing "music" that is really a sound loop (and
- must therefore periodically be reactivated with the current sound
- engine !!! */
-#if 0
- PlaySoundLoop(SND_BACKGROUND_INFO);
-#else
- PlaySound_Menu_Continue(SND_BACKGROUND_INFO);
-#endif
-
- DoAnimation();
+ PlayMenuSoundIfLoop();
}
+ DoAnimation();
BackToFront();
}
int yoffset = (ti->type == TREE_TYPE_LEVEL_DIR ? 0 : yoffset_setup);
int last_game_status = game_status; /* save current game status */
- DrawBackground(SX, SY, SXSIZE - 32, SYSIZE);
- redraw_mask |= REDRAW_FIELD;
-
title_string =
(ti->type == TREE_TYPE_LEVEL_DIR ? "Level Directories" :
ti->type == TREE_TYPE_GRAPHICS_DIR ? "Custom Graphics" :
/* force LEVELS font on artwork setup screen */
game_status = GAME_MODE_LEVELS;
+ /* clear tree list area, but not title or scrollbar */
+ DrawBackground(mSX, mSY + MENU_SCREEN_START_YPOS * 32,
+ SXSIZE - 32 + menu.scrollbar_xoffset,
+ MAX_MENU_ENTRIES_ON_SCREEN * 32);
+
for(i=0; i<num_page_entries; i++)
{
TreeInfo *node, *node_first;
}
game_status = last_game_status; /* restore current game status */
+
+ redraw_mask |= REDRAW_FIELD;
}
static void drawChooseTreeInfo(int entry_pos, TreeInfo *ti)
}
}
- BackToFront();
-
+#if 0
if (game_status == GAME_MODE_LEVELS || game_status == GAME_MODE_SETUP)
DoAnimation();
+
+ BackToFront();
+#endif
}
void DrawChooseLevel()
SetMainBackgroundImage(IMG_BACKGROUND_LEVELS);
DrawChooseTree(&leveldir_current);
+
+ PlayMenuSound();
+ PlayMenuMusic();
}
void HandleChooseLevel(int mx, int my, int dx, int dy, int button)
{
HandleChooseTree(mx, my, dx, dy, button, &leveldir_current);
+
+ DoAnimation();
+ BackToFront();
}
void DrawHallOfFame(int highlight_position)
{
UnmapAllGadgets();
- FadeSounds();
+ FadeSoundsAndMusic();
CloseDoor(DOOR_CLOSE_2);
if (highlight_position < 0)
HandleHallOfFame(highlight_position,0, 0,0, MB_MENU_INITIALIZE);
-#if 0
- PlaySound(SND_BACKGROUND_SCORES);
-#else
- PlaySound_Menu_Start(SND_BACKGROUND_SCORES);
-#endif
+ PlayMenuSound();
+ PlayMenuMusic();
}
static void drawHallOfFameList(int first_entry, int highlight_position)
DrawText(mSX + dx2, sy, highscore[entry].Name, font_nr2);
DrawText(mSX + dx3, sy, int2str(highscore[entry].Score, 5), font_nr4);
}
+
+ redraw_mask |= REDRAW_FIELD;
}
void HandleHallOfFame(int mx, int my, int dx, int dy, int button)
first_entry = 0;
drawHallOfFameList(first_entry, highlight_position);
-
- return;
}
}
else if (dy > 0)
first_entry = MAX(0, MAX_SCORE_ENTRIES - NUM_MENU_ENTRIES_ON_SCREEN);
drawHallOfFameList(first_entry, highlight_position);
-
- return;
}
}
-
- if (button_released)
+ else if (button_released)
{
FadeSound(SND_BACKGROUND_SCORES);
game_status = GAME_MODE_MAIN;
DrawMainMenu();
}
- BackToFront();
-
if (game_status == GAME_MODE_SCORES)
- {
- DoAnimation();
-#if 1
- PlaySound_Menu_Continue(SND_BACKGROUND_SCORES);
-#endif
- }
+ PlayMenuSoundIfLoop();
+
+ DoAnimation();
+ BackToFront();
}
{ 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_SWITCH, &setup.editor.el_headlines, "Headlines:" },
+ { TYPE_SWITCH, &setup.editor.el_user_defined, "User defined:" },
{ 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:" },
}
}
- BackToFront();
DoAnimation();
+ BackToFront();
/* don't eat all CPU time */
Delay(10);
int xpos = MENU_SCREEN_VALUE_XPOS;
int ypos = MENU_SCREEN_START_YPOS + pos;
int font_nr = FONT_VALUE_1;
- char *value_string = getSetupValue(setup_info[pos].type & ~TYPE_GHOSTED,
- setup_info[pos].value);
+ int type = setup_info[pos].type;
+ void *value = setup_info[pos].value;
+ char *value_string = (!(type & TYPE_GHOSTED) ? getSetupValue(type, value) :
+ "n/a");
if (value_string == NULL)
return;
- if (setup_info[pos].type & TYPE_KEY)
+ if (type & TYPE_KEY)
{
xpos = 3;
- if (setup_info[pos].type & TYPE_QUERY)
+ if (type & TYPE_QUERY)
{
value_string = "<press key>";
font_nr = FONT_INPUT_1_ACTIVE;
}
}
- else if (setup_info[pos].type & TYPE_STRING)
+ else if (type & TYPE_STRING)
{
int max_value_len = (SCR_FIELDX - 2) * 2;
if (strlen(value_string) > max_value_len)
value_string[max_value_len] = '\0';
}
- else if (setup_info[pos].type & TYPE_BOOLEAN_STYLE)
+ else if (type & TYPE_BOOLEAN_STYLE)
{
- font_nr = (*(boolean *)(setup_info[pos].value) ? FONT_OPTION_ON :
- FONT_OPTION_OFF);
+ font_nr = (*(boolean *)value ? FONT_OPTION_ON : FONT_OPTION_OFF);
}
DrawText(mSX + xpos * 32, mSY + ypos * 32,
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)
}
}
+#if 0
BackToFront();
if (game_status == GAME_MODE_SETUP)
DoAnimation();
+#endif
}
void DrawSetupScreen_Input()
#if 0
DeactivateJoystickForCalibration();
- DrawTextFCentered(SYSIZE - 20, FONT_TEXT_4,
+ DrawTextSCentered(SYSIZE - 20, FONT_TEXT_4,
"Joysticks deactivated on this screen");
#endif
static unsigned long delay = 0;
if (!DelayReached(&delay, GADGET_FRAME_DELAY))
+#if 1
+ return;
+#else
goto out;
+#endif
player_nr = (player_nr + (x == 10 ? -1 : +1) + MAX_PLAYERS) % MAX_PLAYERS;
}
}
+#if 0
BackToFront();
out:
if (game_status == GAME_MODE_SETUP)
DoAnimation();
+#endif
}
void CustomizeKeyboard(int player_nr)
}
}
- BackToFront();
DoAnimation();
+ BackToFront();
/* don't eat all CPU time */
Delay(10);
}
- BackToFront();
DoAnimation();
+ BackToFront();
/* don't eat all CPU time */
Delay(10);
DrawChooseTree(&artwork.mus_current);
else
DrawSetupScreen_Generic();
+
+ PlayMenuSound();
+ PlayMenuMusic();
}
void HandleSetupScreen(int mx, int my, int dx, int dy, int button)
HandleChooseTree(mx, my, dx, dy, button, &artwork.mus_current);
else
HandleSetupScreen_Generic(mx, my, dx, dy, button);
+
+ DoAnimation();
+ BackToFront();
}
void HandleGameActions()
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_DIRECT_DRAW, FALSE,
GDI_EVENT_MASK, event_mask,
GDI_CALLBACK_ACTION, HandleScreenGadgets,
GDI_END);
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, SC_BORDER_SIZE,
+ GDI_DIRECT_DRAW, FALSE,
GDI_EVENT_MASK, event_mask,
GDI_CALLBACK_ACTION, HandleScreenGadgets,
GDI_END);