/***********************************************************
-* Rocks'n'Diamonds -- McDuffin Strikes Back! *
+* Rocks'n'Diamonds -- McDuffin Strikes Back! *
*----------------------------------------------------------*
-* (c) 1995-98 Artsoft Entertainment *
-* Holger Schemel *
-* Oststrasse 11a *
-* 33604 Bielefeld *
-* phone: ++49 +521 290471 *
-* email: aeglos@valinor.owl.de *
+* (c) 1995-2000 Artsoft Entertainment *
+* Holger Schemel *
+* Detmolder Strasse 189 *
+* 33604 Bielefeld *
+* Germany *
+* e-mail: info@artsoft.org *
*----------------------------------------------------------*
-* screens.c *
+* screens.c *
***********************************************************/
#include "libgame/libgame.h"
DrawTextFCentered(46, FC_RED, WINDOW_SUBTITLE_STRING);
}
+static void ToggleFullscreenIfNeeded()
+{
+ if (setup.fullscreen != video.fullscreen_enabled)
+ {
+ /* save old door content */
+ BlitBitmap(backbuffer, pix[PIX_DB_DOOR],
+ DX, DY, DXSIZE, DYSIZE, DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY1);
+
+ /* toggle fullscreen */
+ ChangeVideoModeIfNeeded(setup.fullscreen);
+ setup.fullscreen = video.fullscreen_enabled;
+
+ /* redraw background to newly created backbuffer */
+ BlitBitmap(pix[PIX_BACK], backbuffer, 0,0, WIN_XSIZE,WIN_YSIZE, 0,0);
+
+ /* restore old door content */
+ BlitBitmap(pix[PIX_DB_DOOR], backbuffer,
+ DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY1, DXSIZE, DYSIZE, DX, DY);
+
+ redraw_mask = REDRAW_ALL;
+ }
+}
+
void DrawMainMenu()
{
static struct LevelDirInfo *leveldir_last_valid = NULL;
UndrawSpecialEditorDoor();
/* needed if last screen was the setup screen and fullscreen state changed */
- setup.fullscreen = ChangeVideoModeIfNeeded(setup.fullscreen);
+ ToggleFullscreenIfNeeded();
+
#ifdef TARGET_SDL
SetDrawtoField(DRAW_BACKBUFFER);
#endif
level_nr = new_level_nr;
- DrawTextExt(drawto, gc, SX + 11 * 32, SY + 3 * 32,
+ DrawTextExt(drawto, SX + 11 * 32, SY + 3 * 32,
int2str(level_nr, 3), FS_BIG, font_color);
- DrawTextExt(window, gc, SX + 11 * 32, SY + 3 * 32,
+ DrawTextExt(window, SX + 11 * 32, SY + 3 * 32,
int2str(level_nr, 3), FS_BIG, font_color);
LoadLevel(level_nr);
{ "Voyager", "The Alan Parsons Project","Pyramid" },
{ "Twilight Painter", "Tangerine Dream", "Heartbreakers" }
};
+static int num_helpscreen_music = 7;
static int helpscreen_musicpos;
void DrawHelpScreenElAction(int start)
}
j++;
- DrawGraphicExt(drawto, gc, xstart, ystart+(i-start)*ystep, graphic+frame);
+ DrawGraphicExt(drawto, xstart, ystart+(i-start)*ystep, graphic+frame);
i++;
}
DrawTextFCentered(ybottom, FC_BLUE, "Press any key or button for next page");
+#if 0
PlaySoundLoop(background_loop[num]);
+#endif
}
void DrawHelpScreenCreditsText()
DrawHelpScreenElText(helpscreen_state*MAX_HELPSCREEN_ELS);
DrawHelpScreenElAction(helpscreen_state*MAX_HELPSCREEN_ELS);
}
- else if (helpscreen_state < num_helpscreen_els_pages + num_bg_loops - 1)
+ else if (helpscreen_state <
+ num_helpscreen_els_pages + num_helpscreen_music - 1)
{
helpscreen_state++;
DrawHelpScreenMusicText(helpscreen_state - num_helpscreen_els_pages);
}
- else if (helpscreen_state == num_helpscreen_els_pages + num_bg_loops - 1)
+ else if (helpscreen_state ==
+ num_helpscreen_els_pages + num_helpscreen_music - 1)
{
helpscreen_state++;
DrawHelpScreenCreditsText();
}
- else if (helpscreen_state == num_helpscreen_els_pages + num_bg_loops)
+ else if (helpscreen_state ==
+ num_helpscreen_els_pages + num_helpscreen_music)
{
helpscreen_state++;
DrawHelpScreenContactText();
setup.player_name[xpos] = ascii;
setup.player_name[xpos + 1] = 0;
xpos++;
- DrawTextExt(drawto, gc, SX + 6*32, SY + ypos*32,
+ DrawTextExt(drawto, SX + 6*32, SY + ypos*32,
setup.player_name, FS_BIG, FC_YELLOW);
- DrawTextExt(window, gc, SX + 6*32, SY + ypos*32,
+ DrawTextExt(window, SX + 6*32, SY + ypos*32,
setup.player_name, FS_BIG, FC_YELLOW);
DrawGraphic(xpos + 6, ypos, GFX_KUGEL_ROT);
}
static void CreateScreenScrollbuttons()
{
- Bitmap gd_bitmap = pix[PIX_MORE];
+ Bitmap *gd_bitmap = pix[PIX_MORE];
struct GadgetInfo *gi;
unsigned long event_mask;
int i;
for (i=0; i<NUM_SCREEN_SCROLLBARS; i++)
{
int id = scrollbar_info[i].gadget_id;
- Bitmap gd_bitmap = pix[PIX_MORE];
+ Bitmap *gd_bitmap = pix[PIX_MORE];
int gd_x1, gd_x2, gd_y1, gd_y2;
struct GadgetInfo *gi;
int items_max, items_visible, item_position;