static Bitmap *getBitmapFromGraphicOrDefault(int graphic, int default_graphic)
{
+ if (graphic == IMG_UNDEFINED)
+ return NULL;
+
boolean redefined = getImageListEntryFromImageID(graphic)->redefined;
- return (graphic == IMG_UNDEFINED ? NULL :
- graphic_info[graphic].bitmap != NULL || redefined ?
+ return (graphic_info[graphic].bitmap != NULL || redefined ?
graphic_info[graphic].bitmap :
graphic_info[default_graphic].bitmap);
}
}
}
-static void DrawPreviewPlayers(void)
+void DrawPreviewPlayers(void)
{
if (game_status != GAME_MODE_MAIN)
return;
- if (!network.enabled && !setup.team_mode)
- return;
-
boolean player_found[MAX_PLAYERS];
int num_players = 0;
int i, x, y;
ClearRectangleOnBackground(drawto, max_xpos, max_ypos,
max_players_width, max_players_height);
+ if (!network.enabled && !setup.team_mode)
+ return;
+
// only draw players if level is suited for team mode
if (num_players < 2)
return;
{
// printf("::: init_video_buffer\n");
+ FreeAllImageTextures(); // needs old renderer to free the textures
+
InitVideoBuffer(WIN_XSIZE, WIN_YSIZE, DEFAULT_DEPTH, setup.fullscreen);
InitImageTextures();
}