git @ Cat's Eye Technologies linapple / c6016ac
Define locations of resource files in one place, a header file. Chris Pressey 4 years ago
4 changed file(s) with 13 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
2929
3030 /* And KREZ */
3131
32 #include "Resources.h"
3233 #include "stdafx.h"
3334 //#pragma hdrstop
3435 #include "MouseInterface.h"
12091210 SDL_WM_SetIcon(apple_icon, NULL);
12101211 printf("Icon was set! Width=%d, height=%d\n", apple_icon->w, apple_icon->h);*/
12111212
1212 apple_icon = SDL_LoadBMP("icon.bmp");
1213 apple_icon = SDL_LoadBMP(RESOURCE_ICON_BMP);
12131214 if(apple_icon != NULL) {
12141215 Uint32 colorkey = SDL_MapRGB(apple_icon->format, 0, 0, 0);
12151216 SDL_SetColorKey(apple_icon, SDL_SRCCOLORKEY, colorkey);
0 #define RESOURCE_ICON_BMP "icon.bmp"
1 #define RESOURCE_SPLASH_BMP "splash.bmp"
2 #define RESOURCE_CHARSET40_BMP "charset40.bmp"
3 #define RESOURCE_FONT_BMP "font.bmp"
2727
2828 /* Adaptation for SDL and POSIX (l) by beom beotiger, Nov-Dec 2007 */
2929
30 #include "Resources.h"
3031 #include "stdafx.h"
3132 #include "wwrapper.h"
3233 //#include "stretch.c" // for SDL_SoftStretch thanx to Sam Lantinga and Tomasz Cejner
18881889 ZeroMemory(vidlastmem,0x10000);
18891890
18901891 // LOAD THE splash screen
1891 tmp_surface = SDL_LoadBMP("splash.bmp");
1892 tmp_surface = SDL_LoadBMP(RESOURCE_SPLASH_BMP);
18921893 if (tmp_surface != NULL) g_hLogoBitmap = SDL_DisplayFormat(tmp_surface);
1893 else fprintf(stderr, "Video: splash.bmp was not loaded\n");
1894 else fprintf(stderr, "Video: " RESOURCE_SPLASH_BMP " was not loaded\n");
18941895 SDL_FreeSurface(tmp_surface);
18951896
18961897 // LOAD APPLE CHARSET40
1897 tmp_surface = SDL_LoadBMP("charset40.bmp");
1898 tmp_surface = SDL_LoadBMP(RESOURCE_CHARSET40_BMP);
18981899 if(tmp_surface != NULL) charset40 = SDL_DisplayFormat(tmp_surface);
1899 else fprintf(stderr, "Video: Apple text is not unavailable: charset40.bmp was not loaded\n");
1900 else fprintf(stderr, "Video: Apple text is not unavailable: " RESOURCE_CHARSET40_BMP " was not loaded\n");
19001901 SDL_FreeSurface(tmp_surface);
19011902
19021903 // CREATE AN IDENTITY PALETTE AND FILL IN THE CORRESPONDING COLORS IN
3333
3434 //static unsigned char copy_row[4096];
3535
36 #include "Resources.h"
3637 #include "stdafx.h"
3738
3839
453454 bool fonts_initialization(void)
454455 {
455456 SDL_Surface *temp_surface;
456 temp_surface = SDL_LoadBMP("font.bmp");
457 temp_surface = SDL_LoadBMP(RESOURCE_FONT_BMP);
457458 if(!temp_surface) return false;
458459 font_sfc = SDL_DisplayFormat(temp_surface);
459460