@@ -187,9 +187,9 @@ void DirkSimple_videoformat(const char *gametitle, uint32_t width, uint32_t heig
187187 if (!GWindow ) {
188188 sdlpanic ("Failed to create window" );
189189 }
190-
190+ #ifndef __DREAMCAST__
191191 load_icon (GWindow );
192-
192+ #endif
193193 GRenderer = SDL_CreateRenderer (GWindow , NULL );
194194 if (!GRenderer ) {
195195 sdlpanic ("Failed to create renderer" );
@@ -283,7 +283,11 @@ void DirkSimple_drawsprite(DirkSimple_Sprite *sprite, int sx, int sy, int sw, in
283283 }
284284
285285 if (texture == NULL ) {
286+ #ifdef __DREAMCAST__
287+ texture = SDL_CreateTexture (GRenderer , SDL_PIXELFORMAT_ARGB1555 , SDL_TEXTUREACCESS_STATIC , sprite -> width , sprite -> height );
288+ #else
286289 texture = SDL_CreateTexture (GRenderer , SDL_PIXELFORMAT_RGBA8888 , SDL_TEXTUREACCESS_STATIC , sprite -> width , sprite -> height );
290+ #endif
287291 if (!texture ) {
288292 char what [128 ];
289293 SDL_snprintf (what , sizeof (what ), "Failed to create texture for sprite '%s'" , sprite -> name );
@@ -538,6 +542,12 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
538542
539543#ifdef DIRKSIMPLE_FORCE_BASE_DIR // let Linux distros hardcode this to something under /usr/share, or whatever.
540544 basedir = DIRKSIMPLE_FORCE_BASE_DIR ;
545+ #ifdef __DREAMCAST__
546+ gamepath = strdup ("data/games/lair" ); // Relative to basedir
547+ gamename = strdup ("lair" );
548+ GWantFullscreen = true;
549+
550+ #endif
541551#else
542552 basedir = SDL_GetBasePath ();
543553#endif
@@ -548,7 +558,7 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
548558 SDL_ShowSimpleMessageBox (SDL_MESSAGEBOX_ERROR , "Failed to determine base dir" , errstr , NULL ); // in case this works.
549559 return SDL_APP_FAILURE ;
550560 }
551-
561+ #ifndef __DREAMCAST__
552562 for (i = 1 ; i < argc ; i ++ ) {
553563 const char * arg = argv [i ];
554564 if (* arg == '-' ) {
@@ -576,13 +586,12 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
576586 SDL_EnumerateDirectory (basedir , find_movie_files , & foundpath );
577587 gamepath = foundpath ;
578588 }
579-
589+ #endif
580590 if (!gamepath ) {
581591 SDL_ShowSimpleMessageBox (SDL_MESSAGEBOX_ERROR , "Can't find a movie file!" , "Include an .ogv file with the build or put it on the command line." , NULL );
582592 SDL_Quit ();
583593 return SDL_APP_FAILURE ;
584594 }
585-
586595 DirkSimple_startup (basedir , gamepath , gamename , DIRKSIMPLE_PIXFMT_IYUV );
587596
588597 SDL_free (foundpath );
0 commit comments