27 #ifndef ICB_ICONMENU_H_INCLUDED 28 #define ICB_ICONMENU_H_INCLUDED 31 #include "engines/icb/common/px_string.h" 32 #include "engines/icb/common/px_common.h" 33 #include "engines/icb/common/px_bitmap.h" 34 #include "engines/icb/player.h" 35 #include "engines/icb/icon_list.h" 36 #include "engines/icb/icon_menu_pc.h" 41 extern const char *global_nothing_selected;
43 #define ICON_MENU_LOG "icon_menu_log.txt" 46 #define ICON_MENU_MAX_ICONS 15 // NB: CHECK PADDING IMPLICATIONS FOR PSX BEFORE CHANGING THIS! 49 #define ICON_FRAME_COUNT 2 52 #define ICON_MENU_HIGHLIGHT_SPEED 5 55 #define ICON_MENU_ADDED_FLASHRATE 4 58 #define ICON_MENU_EMAIL_FLASHRATE 24 61 #define ICON_MENU_OFF_SCREEN_LEFT "left_arrow" 62 #define ICON_MENU_OFF_SCREEN_RIGHT "right_arrow" 65 #define ARMS_GUN_NAME "gun" 66 #define ARMS_AMMO_NAME "ammo" 67 #define ARMS_HEALTH_NAME "health_pack" 68 #define EMAIL_ARRIVED_NAME "mail" 71 #define ICON_MENU_SCROLL_NONE 0 72 #define ICON_MENU_SCROLL_LEFT 1 73 #define ICON_MENU_SCROLL_RIGHT 2 80 uint8 s_pnItemCounts[ICON_MENU_MAX_ICONS];
95 bool8 CycleIconMenu(
const _input &sKeyboardState);
98 void DrawArmedMenu(
const int32 nBullets,
const int32 maxBullets,
const int32 nClips,
const int32 maxClips);
104 void CloseDownIconMenu();
113 bool8 IsActive()
const {
return ((m_eIconMenuGameState == ACTIVE) ? TRUE8 : FALSE8); }
116 bool8 IsHolding()
const {
return (m_bValidSelection); }
119 void CycleHoldingLogic();
122 void SetAddingClipsCount(uint32 nNumClips);
123 void SetAddingMedipacksCount(uint32 nNumMedipacks);
124 bool8 IsAdding()
const;
125 void CycleAddingLogic();
129 void SetEmailArrived();
130 void ClearEmailArrived() { m_bEmailArrived = FALSE8; }
133 const char *GetLastSelection();
134 uint32 GetLastSelectionHash()
const;
137 void ClearSelection() { m_bValidSelection = FALSE8; }
139 uint32 GetTransparencyKey()
const {
return (m_nTransparentKey); }
140 void SetTransparencyColourKey();
143 void PreloadIcon(
const char *pcIconPath,
const char *pcIconName);
146 int32 GetScrollingPosition(
const int32 nInputX, uint32 &nIconIndex);
148 enum IconMenuGameState { INACTIVE = 0, ACTIVE };
150 IconMenuGameState m_eIconMenuGameState;
152 uint32 m_nLastSelection;
153 uint32 m_nSelectedIcon;
154 uint32 m_nHighlightCounter;
155 const char *m_pcSelectedIconName;
156 uint32 m_nSelectedIconHash;
157 uint32 m_nIconClusterHash;
159 uint32 m_nGlobalClusterHash;
161 uint32 m_pnIconSurfaceIDs[ICON_MENU_MAX_ICONS];
162 uint32 m_pnHiLiteSurfaceIDs[ICON_MENU_MAX_ICONS];
163 uint32 m_nLeftArrowID;
164 uint32 m_nRightArrowID;
165 uint32 m_nLeftArrowHiLiteID;
166 uint32 m_nRightArrowHiLiteID;
167 uint32 m_nAddedClipsSurface;
168 uint32 m_nAddedMedipacksSurface;
169 uint32 m_nEmailArrivedSurface;
171 uint32 m_nTransparentKey;
172 char m_pcGlobalClusterFile[MAXLEN_CLUSTER_URL];
173 char m_pcIconCluster[MAXLEN_CLUSTER_URL];
175 bool8 m_bValidSelection;
177 bool8 m_bHighlightVisible;
178 bool8 m_bAllowEscape;
180 bool8 m_bWiderThanScreen;
181 uint8 m_nScrollCycles;
182 uint8 m_nLastIconIndex;
183 uint8 m_nScrollDirection;
185 uint8 m_nAddedMedipacks;
187 uint8 m_nAddedSymbol;
188 uint8 m_nAddedFlashCount;
190 bool8 m_bEmailArrived;
191 uint8 m_nMaxIconsDisplayed;
201 void CloseDownIconMenuDisplay();
203 void SetUpOffScreenArrows();
204 void SetupAdding(
const char *pcIconName, uint32 &nSurfaceID);
205 void CloseDownAdding();
211 #endif // #if !defined( ICONMENU_H_INCLUDED )
Definition: icon_list.h:65