Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  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 CENTERX         ((int) screenWidth / 2)
  44. #define CENTERY         ((int) screenHeight / 2)
  45.  
  46. #define MENU_X  76
  47. #define MENU_Y  55
  48. #define MENU_W  178
  49. #ifndef SPEAR
  50. #ifndef GOODTIMES
  51. #define MENU_H  13*10+6
  52. #else
  53. #define MENU_H  13*9+6
  54. #endif
  55. #else
  56. #define MENU_H  13*9+6
  57. #endif
  58.  
  59. #define SM_X    48
  60. #define SM_W    250
  61.  
  62. #define SM_Y1   20
  63. #define SM_H1   4*13-7
  64. #define SM_Y2   SM_Y1+5*13
  65. #define SM_H2   4*13-7
  66. #define SM_Y3   SM_Y2+5*13
  67. #define SM_H3   3*13-7
  68.  
  69. #define CTL_X   24
  70. #ifdef JAPAN
  71. #define CTL_Y   70
  72. #else
  73. #define CTL_Y   86
  74. #endif
  75. #define CTL_W   284
  76. #define CTL_H   60
  77.  
  78. #define LSM_X   85
  79. #define LSM_Y   55
  80. #define LSM_W   175
  81. #define LSM_H   10*13+10
  82.  
  83. #define NM_X    50
  84. #define NM_Y    100
  85. #define NM_W    225
  86. #define NM_H    13*4+15
  87.  
  88. #define NE_X    10
  89. #define NE_Y    23
  90. #define NE_W    320-NE_X*2
  91. #define NE_H    200-NE_Y*2
  92.  
  93. #define CST_X           20
  94. #define CST_Y           48
  95. #define CST_START       60
  96. #define CST_SPC 60
  97.  
  98.  
  99. //
  100. // TYPEDEFS
  101. //
  102. typedef struct {
  103.                 short x,y,amount,curpos,indent;
  104.                 } CP_iteminfo;
  105.  
  106. typedef struct {
  107.                 short active;
  108.                 char string[36];
  109.                 int (* routine)(int temp1);
  110.                 } CP_itemtype;
  111.  
  112. typedef struct {
  113.                 short allowed[4];
  114.                 } CustomCtrls;
  115.  
  116. extern CP_itemtype MainMenu[];
  117. extern CP_iteminfo MainItems;
  118.  
  119. //
  120. // FUNCTION PROTOTYPES
  121. //
  122.  
  123. void US_ControlPanel(ScanCode);
  124.  
  125. void EnableEndGameMenuItem();
  126.  
  127. void SetupControlPanel(void);
  128. void SetupSaveGames();
  129. void CleanupControlPanel(void);
  130.  
  131. void DrawMenu(CP_iteminfo *item_i,CP_itemtype *items);
  132. int  HandleMenu(CP_iteminfo *item_i,
  133.                 CP_itemtype *items,
  134.                 void (*routine)(int w));
  135. void ClearMScreen(void);
  136. void DrawWindow(int x,int y,int w,int h,int wcolor);
  137. void DrawOutline(int x,int y,int w,int h,int color1,int color2);
  138. void WaitKeyUp(void);
  139. void ReadAnyControl(ControlInfo *ci);
  140. void TicDelay(int count);
  141. void CacheLump(int lumpstart,int lumpend);
  142. void UnCacheLump(int lumpstart,int lumpend);
  143. int StartCPMusic(int song);
  144. int  Confirm(const char *string);
  145. void Message(const char *string);
  146. void CheckPause(void);
  147. void ShootSnd(void);
  148. void CheckSecretMissions(void);
  149. void BossKey(void);
  150.  
  151. void DrawGun(CP_iteminfo *item_i,CP_itemtype *items,int x,int *y,int which,int basey,void (*routine)(int w));
  152. void DrawHalfStep(int x,int y);
  153. void EraseGun(CP_iteminfo *item_i,CP_itemtype *items,int x,int y,int which);
  154. void SetTextColor(CP_itemtype *items,int hlight);
  155. void DrawMenuGun(CP_iteminfo *iteminfo);
  156. void DrawStripes(int y);
  157.  
  158. void DefineMouseBtns(void);
  159. void DefineJoyBtns(void);
  160. void DefineKeyBtns(void);
  161. void DefineKeyMove(void);
  162. void EnterCtrlData(int index,CustomCtrls *cust,void (*DrawRtn)(int),void (*PrintRtn)(int),int type);
  163.  
  164. void DrawMainMenu(void);
  165. void DrawSoundMenu(void);
  166. void DrawLoadSaveScreen(int loadsave);
  167. void DrawNewEpisode(void);
  168. void DrawNewGame(void);
  169. void DrawChangeView(int view);
  170. void DrawMouseSens(void);
  171. void DrawCtlScreen(void);
  172. void DrawCustomScreen(void);
  173. void DrawLSAction(int which);
  174. void DrawCustMouse(int hilight);
  175. void DrawCustJoy(int hilight);
  176. void DrawCustKeybd(int hilight);
  177. void DrawCustKeys(int hilight);
  178. void PrintCustMouse(int i);
  179. void PrintCustJoy(int i);
  180. void PrintCustKeybd(int i);
  181. void PrintCustKeys(int i);
  182.  
  183. void PrintLSEntry(int w,int color);
  184. void TrackWhichGame(int w);
  185. void DrawNewGameDiff(int w);
  186. void FixupCustom(int w);
  187.  
  188. int CP_NewGame(int);
  189. int CP_Sound(int);
  190. int  CP_LoadGame(int quick);
  191. int  CP_SaveGame(int quick);
  192. int CP_Control(int);
  193. int CP_ChangeView(int);
  194. int CP_ExitOptions(int);
  195. int CP_Quit(int);
  196. int CP_ViewScores(int);
  197. int  CP_EndGame(int);
  198. int  CP_CheckQuick(ScanCode scancode);
  199. int CustomControls(int);
  200. int MouseSensitivity(int);
  201.  
  202. void CheckForEpisodes(void);
  203.  
  204. void FreeMusic(void);
  205.  
  206.  
  207. enum {MOUSE,JOYSTICK,KEYBOARDBTNS,KEYBOARDMOVE};        // FOR INPUT TYPES
  208.  
  209. enum menuitems
  210. {
  211.         newgame,
  212.         soundmenu,
  213.         control,
  214.         loadgame,
  215.         savegame,
  216.         changeview,
  217.  
  218. #ifndef GOODTIMES
  219. #ifndef SPEAR
  220.         readthis,
  221. #endif
  222. #endif
  223.  
  224.         viewscores,
  225.         backtodemo,
  226.         quit
  227. };
  228.  
  229. //
  230. // WL_INTER
  231. //
  232. typedef struct {
  233.                 int kill,secret,treasure;
  234.                 int32_t time;
  235.                 } LRstruct;
  236.  
  237. extern LRstruct LevelRatios[];
  238.  
  239. void Write (int x,int y,const char *string);
  240. void NonShareware(void);
  241. int GetYorN(int x,int y,int pic);
  242.