From a157cd82a86390f1fcb1a2086f86af5187e85a69 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sat, 17 Oct 2009 13:46:41 -0400 Subject: Moved resources into subdirectory Because Highscore List rendering requires a font and the font has to be included with the executable to work, it will be loaded into the executable like the images are. To make sure that all resources are included, regardless of type, a folder was made for them. Refs #104 --- resources.h | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'resources.h') diff --git a/resources.h b/resources.h index dd18ffe..fc9229a 100644 --- a/resources.h +++ b/resources.h @@ -2,18 +2,19 @@ #define RESOURCES_H #ifdef WINDOWS -#define LOADIMAGE(var,title) SDL_RWops * title ## _rw = SDL_RWFromMem(&binary_ ## title ## _bmp_start, (int) &binary_ ## title ## _bmp_size); var = SDL_LoadBMP_RW( title ## _rw, 1); -#define DEFIMAGE(title) extern int* binary_ ## title ## _bmp_start; extern int* binary_ ## title ## _bmp_size; +#define RESNAME(title,part) binary_resources_ ## title ## _ ## part #else -#define LOADIMAGE(var,title) SDL_RWops * title ## _rw = SDL_RWFromMem(&_binary_ ## title ## _bmp_start, (int) &_binary_ ## title ## _bmp_size); var = SDL_LoadBMP_RW( title ## _rw, 1); -#define DEFIMAGE(title) extern int* _binary_ ## title ## _bmp_start; extern int* _binary_ ## title ## _bmp_size; +#define RESNAME(title,part) _binary_resources_ ## title ## _ ## part #endif -DEFIMAGE(icon) -DEFIMAGE(title) -DEFIMAGE(pointer) -DEFIMAGE(htp1) -DEFIMAGE(htp2) -DEFIMAGE(chl) +#define DEFRES(title) extern int* RESNAME(title,start); extern int* RESNAME(title,size); +#define LOADIMAGE(var,title) SDL_RWops * title ## _rw = SDL_RWFromMem(&RESNAME(title ## _bmp,start), (int) &RESNAME(title ## _bmp,size)); var = SDL_LoadBMP_RW( title ## _rw, 1); + +DEFRES(icon_bmp) +DEFRES(title_bmp) +DEFRES(pointer_bmp) +DEFRES(htp1_bmp) +DEFRES(htp2_bmp) +DEFRES(chl_bmp) #endif -- cgit 1.4.1