WL_MENU.H (4620B)
1 // 2 // WL_MENU.H 3 // 4 #ifdef SPEAR 5 6 #define BORDCOLOR 0x99 7 #define BORD2COLOR 0x93 8 #define DEACTIVE 0x9b 9 #define BKGDCOLOR 0x9d 10 //#define STRIPE 0x9c 11 12 #define MenuFadeOut() VL_FadeOut(0,255,0,0,51,10) 13 14 #else 15 16 #define BORDCOLOR 0x29 17 #define BORD2COLOR 0x23 18 #define DEACTIVE 0x2b 19 #define BKGDCOLOR 0x2d 20 #define STRIPE 0x2c 21 22 #define MenuFadeOut() VL_FadeOut(0,255,43,0,0,10) 23 24 #endif 25 26 #define READCOLOR 0x4a 27 #define READHCOLOR 0x47 28 #define VIEWCOLOR 0x7f 29 #define TEXTCOLOR 0x17 30 #define HIGHLIGHT 0x13 31 #define MenuFadeIn() VL_FadeIn(0,255,&gamepal,10) 32 33 34 #define MENUSONG WONDERIN_MUS 35 36 #ifndef SPEAR 37 #define INTROSONG NAZI_NOR_MUS 38 #else 39 #define INTROSONG XTOWER2_MUS 40 #endif 41 42 #define SENSITIVE 60 43 #define CENTER SENSITIVE*2 44 45 #define MENU_X 76 46 #define MENU_Y 55 47 #define MENU_W 178 48 #ifndef SPEAR 49 #define MENU_H 13*10+6 50 #else 51 #define MENU_H 13*9+6 52 #endif 53 54 #define SM_X 48 55 #define SM_W 250 56 57 #define SM_Y1 20 58 #define SM_H1 4*13-7 59 #define SM_Y2 SM_Y1+5*13 60 #define SM_H2 4*13-7 61 #define SM_Y3 SM_Y2+5*13 62 #define SM_H3 3*13-7 63 64 #define CTL_X 24 65 #define CTL_Y 70 66 #define CTL_W 284 67 #define CTL_H 13*7-7 68 69 #define LSM_X 85 70 #define LSM_Y 55 71 #define LSM_W 175 72 #define LSM_H 10*13+10 73 74 #define NM_X 50 75 #define NM_Y 100 76 #define NM_W 225 77 #define NM_H 13*4+15 78 79 #define NE_X 10 80 #define NE_Y 23 81 #define NE_W 320-NE_X*2 82 #define NE_H 200-NE_Y*2 83 84 #define CST_X 20 85 #define CST_Y 48 86 #define CST_START 60 87 #define CST_SPC 60 88 89 90 // 91 // TYPEDEFS 92 // 93 typedef struct { 94 int x,y,amount,curpos,indent; 95 } CP_iteminfo; 96 97 typedef struct { 98 int active; 99 char string[36]; 100 void (* routine)(int temp1); 101 } CP_itemtype; 102 103 typedef struct { 104 int allowed[4]; 105 } CustomCtrls; 106 107 extern CP_itemtype far MainMenu[],far NewEMenu[]; 108 extern CP_iteminfo MainItems; 109 110 // 111 // FUNCTION PROTOTYPES 112 // 113 void SetupControlPanel(void); 114 void CleanupControlPanel(void); 115 116 void DrawMenu(CP_iteminfo *item_i,CP_itemtype far *items); 117 int HandleMenu(CP_iteminfo *item_i, 118 CP_itemtype far *items, 119 void (*routine)(int w)); 120 void ClearMScreen(void); 121 void DrawWindow(int x,int y,int w,int h,int wcolor); 122 void DrawOutline(int x,int y,int w,int h,int color1,int color2); 123 void WaitKeyUp(void); 124 void ReadAnyControl(ControlInfo *ci); 125 void TicDelay(int count); 126 void CacheLump(int lumpstart,int lumpend); 127 void UnCacheLump(int lumpstart,int lumpend); 128 void StartCPMusic(int song); 129 int Confirm(char far *string); 130 void Message(char far *string); 131 void CheckPause(void); 132 void ShootSnd(void); 133 void CheckSecretMissions(void); 134 void BossKey(void); 135 136 void DrawGun(CP_iteminfo *item_i,CP_itemtype far *items,int x,int *y,int which,int basey,void (*routine)(int w)); 137 void DrawHalfStep(int x,int y); 138 void EraseGun(CP_iteminfo *item_i,CP_itemtype far *items,int x,int y,int which); 139 void SetTextColor(CP_itemtype far *items,int hlight); 140 void DrawMenuGun(CP_iteminfo *iteminfo); 141 void DrawStripes(int y); 142 143 void DefineMouseBtns(void); 144 void DefineJoyBtns(void); 145 void DefineKeyBtns(void); 146 void DefineKeyMove(void); 147 void EnterCtrlData(int index,CustomCtrls *cust,void (*DrawRtn)(int),void (*PrintRtn)(int),int type); 148 149 void DrawMainMenu(void); 150 void DrawSoundMenu(void); 151 void DrawLoadSaveScreen(int loadsave); 152 void DrawNewEpisode(void); 153 void DrawNewGame(void); 154 void DrawChangeView(int view); 155 void DrawMouseSens(void); 156 void DrawCtlScreen(void); 157 void DrawCustomScreen(void); 158 void DrawLSAction(int which); 159 void DrawCustMouse(int hilight); 160 void DrawCustJoy(int hilight); 161 void DrawCustKeybd(int hilight); 162 void DrawCustKeys(int hilight); 163 void PrintCustMouse(int i); 164 void PrintCustJoy(int i); 165 void PrintCustKeybd(int i); 166 void PrintCustKeys(int i); 167 168 void PrintLSEntry(int w,int color); 169 void TrackWhichGame(int w); 170 void DrawNewGameDiff(int w); 171 void FixupCustom(int w); 172 173 void CP_NewGame(void); 174 void CP_Sound(void); 175 int CP_LoadGame(int quick); 176 int CP_SaveGame(int quick); 177 void CP_Control(void); 178 void CP_ChangeView(void); 179 void CP_ExitOptions(void); 180 void CP_Quit(void); 181 void CP_ViewScores(void); 182 int CP_EndGame(void); 183 int CP_CheckQuick(unsigned scancode); 184 void CustomControls(void); 185 void MouseSensitivity(void); 186 187 void CheckForEpisodes(void); 188 189 // 190 // VARIABLES 191 // 192 extern int SaveGamesAvail[10],StartGame,SoundStatus; 193 extern char SaveGameNames[10][32],SaveName[13]; 194 195 enum {MOUSE,JOYSTICK,KEYBOARDBTNS,KEYBOARDMOVE}; // FOR INPUT TYPES 196 197 enum 198 { 199 newgame, 200 soundmenu, 201 control, 202 loadgame, 203 savegame, 204 changeview, 205 206 #ifndef GOODTIMES 207 #ifndef SPEAR 208 readthis, 209 #endif 210 #endif 211 212 viewscores, 213 backtodemo, 214 quit 215 } menuitems; 216 217 // 218 // WL_INTER 219 // 220 typedef struct { 221 int kill,secret,treasure; 222 long time; 223 } LRstruct; 224 225 extern LRstruct LevelRatios[]; 226 227 void Write (int x,int y,char *string); 228 void NonShareware(void); 229 int GetYorN(int x,int y,int pic); 230 231