- Format format(16, 0x007C00, 0x00003E0, 0x0000001F);
- surface = new Surface(tom_width, tom_height, format);
- console.close();
+ SDL_FreeSurface(surface);
+ surface = SDL_CreateRGBSurface(SDL_SWSURFACE, tom_width, tom_height,
+ 16, 0x7C00, 0x03E0, 0x001F, 0);
+ if (surface == NULL)
+ {
+ WriteLog("TOM: Could not create primary SDL surface: %s", SDL_GetError());
+ exit(1);
+ }
+