/***********************************************************
-* Rocks'n'Diamonds -- McDuffin Strikes Back! *
+* Artsoft Retro-Game Library *
*----------------------------------------------------------*
-* ©1995 Artsoft Development *
-* Holger Schemel *
-* 33659 Bielefeld-Senne *
-* Telefon: (0521) 493245 *
-* eMail: aeglos@valinor.owl.de *
-* aeglos@uni-paderborn.de *
-* q99492@pbhrzx.uni-paderborn.de *
+* (c) 1994-2000 Artsoft Entertainment *
+* Holger Schemel *
+* Detmolder Strasse 189 *
+* 33604 Bielefeld *
+* Germany *
+* e-mail: info@artsoft.org *
*----------------------------------------------------------*
-* sdl.c *
+* sdl.c *
***********************************************************/
-#include "libgame.h"
+#include "system.h"
+#include "misc.h"
-#ifdef TARGET_SDL
+
+#if defined(TARGET_SDL)
inline void SDLInitVideoDisplay(void)
{
{
/* switch display to fullscreen mode, if available */
DrawWindow window_old = *backbuffer;
- DrawWindow window_new;
+ DrawWindow window_new = CreateBitmapStruct();
- if ((window_new = SDL_SetVideoMode(video.width, video.height, video.depth,
- surface_flags)) == NULL)
+ if ((window_new->surface = SDL_SetVideoMode(video.width, video.height,
+ video.depth, surface_flags))
+ == NULL)
{
/* switching display to fullscreen mode failed */
Error(ERR_WARN, "SDL_SetVideoMode() failed: %s", SDL_GetError());
else
{
if (window_old)
- SDL_FreeSurface(window_old);
+ FreeBitmap(window_old);
*backbuffer = window_new;
video.fullscreen_enabled = TRUE;
{
/* switch display to window mode */
DrawWindow window_old = *backbuffer;
- DrawWindow window_new;
+ DrawWindow window_new = CreateBitmapStruct();
- if ((window_new = SDL_SetVideoMode(video.width, video.height, video.depth,
- surface_flags)) == NULL)
+ if ((window_new->surface = SDL_SetVideoMode(video.width, video.height,
+ video.depth, surface_flags))
+ == NULL)
{
/* switching display to window mode failed -- should not happen */
Error(ERR_WARN, "SDL_SetVideoMode() failed: %s", SDL_GetError());
else
{
if (window_old)
- SDL_FreeSurface(window_old);
+ FreeBitmap(window_old);
*backbuffer = window_new;
video.fullscreen_enabled = FALSE;