00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef GENERAL_H
00018 # define GENERAL_H
00019
00020 using namespace std;
00021
00022 # include <string>
00023 # include <SDL.h>
00024 # include <SDL_ttf.h>
00025 # include <SDL_image.h>
00026
00029
00030 # ifndef MAX
00031 # define MAX(a,b) (((a) > (b)) ? (a) : (b))
00032 # endif
00033
00034 # ifndef TBTHOME
00035 # define TBTHOME ".."
00036 # endif
00037
00038 # define TEAM_PATH TBTHOME "/data/team/"
00039 # define SAVES_PATH TBTHOME "/saves/"
00040 # define VIDEOS_PATH TBTHOME "/data/video/"
00041 # define SOUNDS_PATH TBTHOME "/data/sound/"
00042 # define I18N_PATH TBTHOME "/data/i18n/"
00043 # define FORMATIONS_PATH TBTHOME "/data/formations/"
00044
00045 # define CONFIG_FILE TBTHOME "/config.xml"
00046
00047 # define ADD_IMG_PATH(x) IMG_PATH x
00048 # define ADD_TEAM_PATH(x) TEAM_PATH x
00049 # define ADD_SAVES_PATH(x) SAVES_PATH x
00050 # define ADD_VIDEOS_PATH(x) VIDEOS_PATH x
00051 # define ADD_SOUNDS_PATH(x) SOUNDS_PATH x
00052 # define ADD_I18N_PATH(x) I18N_PATH x
00053 # define ADD_FORMATIONS_PATH(x) FORMATIONS_PATH x
00054 # define ADD_FONTS_PATH(x) FONTS_PATH x
00055
00056 # define DIALOG_ALPHA 234
00057
00058
00059 # define YES 1
00060 # define NO 2
00061 # define CLOSE 3
00062
00063
00064 # define OK 6
00065 # define EXIT 8
00066 # define BACK 10
00067 # define NETWORK 11
00068 # define STANDALONE 12
00069 # define SERVER 13
00070 # define OPTIONS 14
00071
00072
00073 # undef DialogBox
00074 # undef LoadImage
00075
00076
00077 typedef unsigned uint;
00078 typedef unsigned short ushort;
00079
00081
00093 void PrintStrings( SDL_Surface *sDest, TTF_Font *fnt, std::string str,
00094 SDL_Rect &rc, SDL_Color clrFg);
00095
00096 #endif