ui_shared.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536
  1. #ifndef __UI_SHARED_H
  2. #define __UI_SHARED_H
  3. #define MAX_TOKENLENGTH 1024
  4. #define MAX_OPEN_MENUS 16
  5. #define MAX_TEXTSCROLL_LINES 256
  6. #define MAX_EDITFIELD 256
  7. #ifndef TT_STRING
  8. //token types
  9. #define TT_STRING 1 // string
  10. #define TT_LITERAL 2 // literal
  11. #define TT_NUMBER 3 // number
  12. #define TT_NAME 4 // name
  13. #define TT_PUNCTUATION 5 // punctuation
  14. #endif
  15. #define SLIDER_WIDTH 128.0
  16. #define SLIDER_HEIGHT 16.0
  17. #define SLIDER_THUMB_WIDTH 12.0
  18. #define SLIDER_THUMB_HEIGHT 16.0
  19. #define SCROLLBAR_SIZE 16.0
  20. typedef struct pc_token_s
  21. {
  22. int type;
  23. int subtype;
  24. int intvalue;
  25. float floatvalue;
  26. char string[MAX_TOKENLENGTH];
  27. } pc_token_t;
  28. // FIXME: combine flags into bitfields to save space
  29. // FIXME: consolidate all of the common stuff in one structure for menus and items
  30. // THINKABOUTME: is there any compelling reason not to have items contain items
  31. // and do away with a menu per say.. major issue is not being able to dynamically allocate
  32. // and destroy stuff.. Another point to consider is adding an alloc free call for vm's and have
  33. // the engine just allocate the pool for it based on a cvar
  34. // many of the vars are re-used for different item types, as such they are not always named appropriately
  35. // the benefits of c++ in DOOM will greatly help crap like this
  36. // FIXME: need to put a type ptr that points to specific type info per type
  37. //
  38. #define MAX_LB_COLUMNS 16
  39. typedef struct columnInfo_s {
  40. int pos;
  41. int width;
  42. int maxChars;
  43. } columnInfo_t;
  44. typedef struct listBoxDef_s {
  45. int startPos;
  46. int endPos;
  47. int drawPadding;
  48. int cursorPos;
  49. float elementWidth;
  50. float elementHeight;
  51. int elementStyle;
  52. int numColumns;
  53. columnInfo_t columnInfo[MAX_LB_COLUMNS];
  54. const char *doubleClick;
  55. qboolean notselectable;
  56. //JLF MPMOVED
  57. qboolean scrollhidden;
  58. qhandle_t selectionShader;
  59. } listBoxDef_t;
  60. typedef struct editFieldDef_s {
  61. float minVal; // edit field limits
  62. float maxVal; //
  63. float defVal; //
  64. float range; //
  65. int maxChars; // for edit fields
  66. int maxPaintChars; // for edit fields
  67. int paintOffset; //
  68. } editFieldDef_t;
  69. #define MAX_MULTI_CVARS 64//32
  70. typedef struct multiDef_s {
  71. const char *cvarList[MAX_MULTI_CVARS];
  72. const char *cvarStr[MAX_MULTI_CVARS];
  73. float cvarValue[MAX_MULTI_CVARS];
  74. int count;
  75. qboolean strDef;
  76. } multiDef_t;
  77. #define CVAR_ENABLE 0x00000001
  78. #define CVAR_DISABLE 0x00000002
  79. #define CVAR_SHOW 0x00000004
  80. #define CVAR_HIDE 0x00000008
  81. #define CVAR_SUBSTRING 0x00000010 //when using enable or disable, just check for strstr instead of ==
  82. #ifdef _XBOX
  83. // Super small - doesn't need to be bigger yet, helps us get into 64 MB
  84. //#define STRING_POOL_SIZE 16*1024
  85. #define STRING_POOL_SIZE 128*1024
  86. #else
  87. #ifdef CGAME
  88. #define STRING_POOL_SIZE 128*1024
  89. #else
  90. #define STRING_POOL_SIZE 384*1024
  91. #endif
  92. #endif
  93. //#define NUM_CROSSHAIRS 9
  94. #define NUM_CROSSHAIRS 1
  95. typedef struct {
  96. qhandle_t qhMediumFont;
  97. qhandle_t cursor;
  98. qhandle_t gradientBar;
  99. qhandle_t scrollBarArrowUp;
  100. qhandle_t scrollBarArrowDown;
  101. qhandle_t scrollBarArrowLeft;
  102. qhandle_t scrollBarArrowRight;
  103. qhandle_t scrollBar;
  104. qhandle_t scrollBarThumb;
  105. qhandle_t buttonMiddle;
  106. qhandle_t buttonInside;
  107. qhandle_t solidBox;
  108. qhandle_t sliderBar;
  109. // qhandle_t sliderThumb;
  110. sfxHandle_t menuEnterSound;
  111. sfxHandle_t menuExitSound;
  112. sfxHandle_t menuBuzzSound;
  113. sfxHandle_t itemFocusSound;
  114. sfxHandle_t forceChosenSound;
  115. sfxHandle_t forceUnchosenSound;
  116. sfxHandle_t datapadmoveRollSound;
  117. sfxHandle_t datapadmoveJumpSound;
  118. sfxHandle_t datapadmoveSaberSound1;
  119. sfxHandle_t datapadmoveSaberSound2;
  120. sfxHandle_t datapadmoveSaberSound3;
  121. sfxHandle_t datapadmoveSaberSound4;
  122. sfxHandle_t datapadmoveSaberSound5;
  123. sfxHandle_t datapadmoveSaberSound6;
  124. sfxHandle_t nullSound;
  125. #ifdef _IMMERSION
  126. ffHandle_t menuEnterForce;
  127. ffHandle_t menuExitForce;
  128. ffHandle_t menuBuzzForce;
  129. ffHandle_t itemFocusForce;
  130. #endif // _IMMERSION
  131. float fadeClamp;
  132. int fadeCycle;
  133. float fadeAmount;
  134. float shadowX;
  135. float shadowY;
  136. vec4_t shadowColor;
  137. float shadowFadeClamp;
  138. qboolean fontRegistered;
  139. // player settings
  140. // qhandle_t fxBasePic;
  141. // qhandle_t fxPic[7];
  142. qhandle_t crosshairShader[NUM_CROSSHAIRS];
  143. } cachedAssets_t;
  144. struct itemDef_s;
  145. typedef struct {
  146. void (*addRefEntityToScene) (const refEntity_t *re );
  147. void (*clearScene) ();
  148. void (*drawHandlePic) (float x, float y, float w, float h, qhandle_t asset);
  149. void (*drawRect) ( float x, float y, float w, float h, float size, const vec4_t color);
  150. void (*drawSides) (float x, float y, float w, float h, float size);
  151. void (*drawText) (float x, float y, float scale, vec4_t color, const char *text, int iMaxPixelWidth, int style, int iFontIndex );
  152. void (*drawTextWithCursor)(float x, float y, float scale, vec4_t color, const char *text, int cursorPos, char cursor, int iMaxPixelWidth, int style, int iFontIndex);
  153. void (*drawTopBottom) (float x, float y, float w, float h, float size);
  154. void (*executeText)(int exec_when, const char *text );
  155. int (*feederCount)(float feederID);
  156. void (*feederSelection)(float feederID, int index, struct itemDef_s *item);
  157. void (*fillRect) ( float x, float y, float w, float h, const vec4_t color);
  158. void (*getBindingBuf)( int keynum, char *buf, int buflen );
  159. void (*getCVarString)(const char *cvar, char *buffer, int bufsize);
  160. float (*getCVarValue)(const char *cvar);
  161. qboolean (*getOverstrikeMode)();
  162. float (*getValue) (int ownerDraw);
  163. void (*keynumToStringBuf)( int keynum, char *buf, int buflen );
  164. void (*modelBounds) (qhandle_t model, vec3_t min, vec3_t max);
  165. qboolean (*ownerDrawHandleKey)(int ownerDraw, int flags, float *special, int key);
  166. void (*ownerDrawItem) (float x, float y, float w, float h, float text_x, float text_y, int ownerDraw, int ownerDrawFlags, int align, float special, float scale, vec4_t color, qhandle_t shader, int textStyle, int iFontIndex);
  167. qboolean (*ownerDrawVisible) (int flags);
  168. int (*ownerDrawWidth)(int ownerDraw, float scale);
  169. void (*Pause)(qboolean b);
  170. void (*Print)(const char *msg, ...);
  171. int (*registerFont) (const char *pFontname);
  172. qhandle_t (*registerModel) (const char *p);
  173. qhandle_t (*registerShaderNoMip) (const char *p);
  174. sfxHandle_t (*registerSound)(const char *name, qboolean compressed);
  175. void (*renderScene) ( const refdef_t *fd );
  176. qboolean (*runScript)(const char **p);
  177. qboolean (*deferScript)(const char **p);
  178. void (*setBinding)( int keynum, const char *binding );
  179. void (*setColor) (const vec4_t v);
  180. void (*setCVar)(const char *cvar, const char *value);
  181. void (*setOverstrikeMode)(qboolean b);
  182. void (*startLocalSound)( sfxHandle_t sfx, int channelNum );
  183. void (*stopCinematic)(int handle);
  184. int (*textHeight) (const char *text, float scale, int iFontIndex);
  185. int (*textWidth) (const char *text, float scale, int iFontIndex);
  186. qhandle_t (*feederItemImage) (float feederID, int index);
  187. const char *(*feederItemText) (float feederID, int index, int column, qhandle_t *handle);
  188. qhandle_t (*registerSkin)( const char *name );
  189. //rww - ghoul2 stuff. Add whatever you need here, remember to set it in _UI_Init or it will crash when you try to use it.
  190. #ifdef _XBOX // No default arguments on function pointers
  191. qboolean g2_SetSkin(CGhoul2Info *ghlInfo, qhandle_t customSkin, qhandle_t renderSkin = 0)
  192. {
  193. return G2API_SetSkin(ghlInfo, customSkin, renderSkin);
  194. }
  195. qboolean g2_SetBoneAnim(CGhoul2Info *ghlInfo, const char *boneName, const int startFrame, const int endFrame,
  196. const int flags, const float animSpeed, const int currentTime, const float setFrame = -1, const int blendTime = -1)
  197. {
  198. return G2API_SetBoneAnim(ghlInfo, boneName, startFrame, endFrame, flags, animSpeed, currentTime, setFrame, blendTime);
  199. }
  200. #else
  201. qboolean (*g2_SetSkin)(CGhoul2Info *ghlInfo, qhandle_t customSkin, qhandle_t renderSkin = 0);
  202. qboolean (*g2_SetBoneAnim)(CGhoul2Info *ghlInfo, const char *boneName, const int startFrame, const int endFrame,
  203. const int flags, const float animSpeed, const int currentTime, const float setFrame = -1, const int blendTime = -1);
  204. #endif
  205. qboolean (*g2_RemoveGhoul2Model)(CGhoul2Info_v &ghlInfo, const int modelIndex);
  206. int (*g2_InitGhoul2Model)(CGhoul2Info_v &ghoul2, const char *fileName, int, qhandle_t customSkin, qhandle_t customShader, int modelFlags, int lodBias);
  207. void (*g2_CleanGhoul2Models)(CGhoul2Info_v &ghoul2);
  208. int (*g2_AddBolt)(CGhoul2Info *ghlInfo, const char *boneName);
  209. qboolean (*g2_GetBoltMatrix)(CGhoul2Info_v &ghoul2, const int modelIndex, const int boltIndex, mdxaBone_t *matrix,
  210. const vec3_t angles, const vec3_t position, const int frameNum, qhandle_t *modelList, const vec3_t scale);
  211. void (*g2_GiveMeVectorFromMatrix)(mdxaBone_t &boltMatrix, Eorientations flags, vec3_t &vec);
  212. //Utility functions that don't immediately redirect to ghoul2 functions
  213. int (*g2hilev_SetAnim)(CGhoul2Info *ghlInfo, const char *boneName, int animNum, const qboolean freeze);
  214. #ifdef _IMMERSION
  215. ffHandle_t (*registerForce)(const char *name, int channel=FF_CHANNEL_MENU);
  216. void (*startForce)(ffHandle_t ff);
  217. #endif // _IMMERSION
  218. float yscale;
  219. float xscale;
  220. float bias;
  221. int realTime;
  222. int frameTime;
  223. qboolean cursorShow;
  224. int cursorx;
  225. int cursory;
  226. qboolean debug;
  227. cachedAssets_t Assets;
  228. glconfig_t glconfig;
  229. qhandle_t whiteShader;
  230. qhandle_t gradientImage;
  231. float FPS;
  232. } displayContextDef_t;
  233. void UI_InitMemory( void );
  234. #define MAX_COLOR_RANGES 10
  235. #define MAX_MENUITEMS 200
  236. #define MAX_MENUS 64
  237. #define WINDOW_MOUSEOVER 0x00000001 // mouse is over it, non exclusive
  238. #define WINDOW_HASFOCUS 0x00000002 // has cursor focus, exclusive
  239. #define WINDOW_VISIBLE 0x00000004 // is visible
  240. #define WINDOW_INACTIVE 0x00000008 // is visible but grey ( non-active )
  241. #define WINDOW_DECORATION 0x00000010 // for decoration only, no mouse, keyboard, etc..
  242. #define WINDOW_FADINGOUT 0x00000020 // fading out, non-active
  243. #define WINDOW_FADINGIN 0x00000040 // fading in
  244. #define WINDOW_MOUSEOVERTEXT 0x00000080 // mouse is over it, non exclusive
  245. #define WINDOW_INTRANSITION 0x00000100 // window is in transition
  246. #define WINDOW_FORECOLORSET 0x00000200 // forecolor was explicitly set ( used to color alpha images or not )
  247. #define WINDOW_HORIZONTAL 0x00000400 // for list boxes and sliders, vertical is default this is set of horizontal
  248. #define WINDOW_LB_LEFTARROW 0x00000800 // mouse is over left/up arrow
  249. #define WINDOW_LB_RIGHTARROW 0x00001000 // mouse is over right/down arrow
  250. #define WINDOW_LB_THUMB 0x00002000 // mouse is over thumb
  251. #define WINDOW_LB_PGUP 0x00004000 // mouse is over page up
  252. #define WINDOW_LB_PGDN 0x00008000 // mouse is over page down
  253. #define WINDOW_ORBITING 0x00010000 // item is in orbit
  254. #define WINDOW_OOB_CLICK 0x00020000 // close on out of bounds click
  255. #define WINDOW_WRAPPED 0x00040000 // manually wrap text
  256. #define WINDOW_AUTOWRAPPED 0x00080000 // auto wrap text
  257. #define WINDOW_FORCED 0x00100000 // forced open
  258. #define WINDOW_POPUP 0x00200000 // popup
  259. #define WINDOW_BACKCOLORSET 0x00400000 // backcolor was explicitly set
  260. #define WINDOW_TIMEDVISIBLE 0x00800000 // visibility timing ( NOT implemented )
  261. #define WINDOW_PLAYERCOLOR 0x01000000 // hack the forecolor to match ui_char_color_*
  262. #define WINDOW_SCRIPTWAITING 0x02000000 // delayed script waiting to run
  263. //JLF MPMOVED
  264. #define WINDOW_INTRANSITIONMODEL 0x04000000 // delayed script waiting to run
  265. #define WINDOW_IGNORE_ESCAPE 0x08000000 // ignore normal closeall menus escape functionality
  266. typedef struct {
  267. float x; // horiz position
  268. float y; // vert position
  269. float w; // width
  270. float h; // height;
  271. } rectDef_t;
  272. typedef rectDef_t UIRectangle;
  273. // FIXME: do something to separate text vs window stuff
  274. typedef struct {
  275. UIRectangle rect; // client coord rectangle
  276. UIRectangle rectClient; // screen coord rectangle
  277. char *name; //
  278. char *group; // if it belongs to a group
  279. // const char *cinematicName; // cinematic name
  280. // int cinematic; // cinematic handle
  281. int style; //
  282. int border; //
  283. int ownerDraw; // ownerDraw style
  284. int ownerDrawFlags; // show flags for ownerdraw items
  285. float borderSize; //
  286. int flags; // visible, focus, mouseover, cursor
  287. UIRectangle rectEffects; // for various effects
  288. UIRectangle rectEffects2; // for various effects
  289. int offsetTime; // time based value for various effects
  290. int nextTime; // time next effect should cycle
  291. int delayTime; // time when delay expires
  292. char *delayedScript; // points into another script's text while delaying
  293. vec4_t foreColor; // text color
  294. vec4_t backColor; // border color
  295. vec4_t borderColor; // border color
  296. // vec4_t outlineColor; // border color
  297. qhandle_t background; // background asset
  298. } windowDef_t;
  299. typedef windowDef_t Window;
  300. typedef struct {
  301. vec4_t color; //
  302. float low; //
  303. float high; //
  304. } colorRangeDef_t;
  305. typedef struct modelDef_s {
  306. int angle;
  307. vec3_t origin;
  308. float fov_x;
  309. float fov_y;
  310. int rotationSpeed;
  311. vec3_t g2mins; //required
  312. vec3_t g2maxs; //required
  313. int g2skin; //optional
  314. int g2anim; //optional
  315. //JLF MPMOVED
  316. //Transition extras
  317. vec3_t g2mins2, g2maxs2, g2minsEffect, g2maxsEffect;
  318. float fov_x2, fov_y2, fov_Effectx, fov_Effecty;
  319. } modelDef_t;
  320. #define ITF_G2VALID 0x0001 // indicates whether or not g2 instance is valid.
  321. #define ITF_ISCHARACTER 0x0002 // a character item, uses customRGBA
  322. #define ITF_ISSABER 0x0004 // first saber item, draws blade
  323. #define ITF_ISSABER2 0x0008 // second saber item, draws blade
  324. #define ITF_ISANYSABER (ITF_ISSABER|ITF_ISSABER2) //either saber
  325. typedef struct itemDef_s {
  326. Window window; // common positional, border, style, layout info
  327. UIRectangle textRect; // rectangle the text ( if any ) consumes
  328. int type; // text, button, radiobutton, checkbox, textfield, listbox, combo
  329. int alignment; // left center right
  330. int textalignment; // ( optional ) alignment for text within rect based on text width
  331. float textalignx; // ( optional ) text alignment x coord
  332. float textaligny; // ( optional ) text alignment y coord
  333. // float text2alignx; // ( optional ) text2 alignment x coord
  334. // float text2aligny; // ( optional ) text2 alignment y coord
  335. float textscale; // scale percentage from 72pts
  336. int textStyle; // ( optional ) style, normal and shadowed are it for now
  337. char *text; // display text
  338. // char *text2; // display text2
  339. // char *descText; // Description text
  340. void *parent; // menu owner
  341. qhandle_t asset; // handle to asset
  342. CGhoul2Info_v ghoul2; // ghoul2 instance if available instead of a model.
  343. int flags; // flags like g2valid, character, saber, saber2, etc.
  344. // const char *mouseEnterText; // mouse enter script
  345. // const char *mouseExitText; // mouse exit script
  346. // const char *mouseEnter; // mouse enter script
  347. // const char *mouseExit; // mouse exit script
  348. const char *action; // select script
  349. //JLFACCEPT MPMOVED
  350. // const char *accept;
  351. //JLFDPADSCRIPT MPMOVED
  352. const char * selectionNext;
  353. const char * selectionPrev;
  354. const char *onFocus; // select script
  355. const char *leaveFocus; // select script
  356. const char *cvar; // associated cvar
  357. const char *cvarTest; // associated cvar for enable actions
  358. const char *enableCvar; // enable, disable, show, or hide based on value, this can contain a list
  359. int cvarFlags; // what type of action to take on cvarenables
  360. sfxHandle_t focusSound; //
  361. #ifdef _IMMERSION
  362. ffHandle_t focusForce;
  363. #endif // _IMMERSION
  364. // int numColors; // number of color ranges
  365. // colorRangeDef_t colorRanges[MAX_COLOR_RANGES];
  366. float special; // used for feeder id's etc.. diff per type
  367. int cursorPos; // cursor position in characters
  368. void *typeData; // type specific data ptr's
  369. // int appearanceSlot; // order of appearance
  370. int value; // used by ITEM_TYPE_MULTI that aren't linked to a particular cvar.
  371. int font; // FONT_SMALL,FONT_MEDIUM,FONT_LARGE
  372. // int invertYesNo;
  373. int xoffset;
  374. } itemDef_t;
  375. typedef struct {
  376. Window window;
  377. const char *font; // font
  378. qboolean fullScreen; // covers entire screen
  379. int itemCount; // number of items;
  380. int fontIndex; //
  381. int cursorItem; // which item as the cursor
  382. int fadeCycle; //
  383. float fadeClamp; //
  384. float fadeAmount; //
  385. const char *onOpen; // run when the menu is first opened
  386. const char *onClose; // run when the menu is closed
  387. //JLFACCEPT MPMOVED
  388. const char *onAccept; // run when menu is closed with acceptance
  389. const char *onESC; // run when the menu is closed
  390. const char *xScript; // run when X button is pressed
  391. const char *yScript; // run when Y button is pressed
  392. const char *whiteScript; // run when White button is pressed
  393. const char *soundName; // background loop sound for menu
  394. vec4_t focusColor; // focus color for items
  395. vec4_t disableColor; // focus color for items
  396. itemDef_t *items[MAX_MENUITEMS]; // items this menu contains
  397. float appearanceTime; // when next item should appear
  398. int appearanceCnt; // current item displayed
  399. float appearanceIncrement; //
  400. int descX; // X position of description
  401. int descY; // X position of description
  402. vec4_t descColor; // description text color for items
  403. int descAlignment; // Description of alignment
  404. float descScale; // Description scale
  405. int descTextStyle; // ( optional ) style, normal and shadowed are it for now
  406. } menuDef_t;
  407. typedef struct textScrollDef_s
  408. {
  409. int startPos;
  410. int endPos;
  411. float lineHeight;
  412. int maxLineChars;
  413. int drawPadding;
  414. // changed spelling to make them fall out during compile while I made them asian-aware -Ste
  415. //
  416. int iLineCount;
  417. const char* pLines[MAX_TEXTSCROLL_LINES]; // can contain NULL ptrs that you should skip over during paint.
  418. } textScrollDef_t;
  419. typedef struct
  420. {
  421. const char *name;
  422. qboolean (*handler) (itemDef_t *item, const char** args);
  423. } commandDef_t;
  424. menuDef_t *Menu_GetFocused(void);
  425. void Controls_GetConfig( void );
  426. void Controls_SetConfig(qboolean restart);
  427. qboolean Display_KeyBindPending(void);
  428. qboolean Display_MouseMove(void *p, int x, int y);
  429. int Display_VisibleMenuCount(void);
  430. qboolean Int_Parse(const char **p, int *i);
  431. void Init_Display(displayContextDef_t *dc);
  432. void Menus_Activate(menuDef_t *menu);
  433. menuDef_t *Menus_ActivateByName(const char *p);
  434. qboolean Menus_AnyFullScreenVisible(void);
  435. void Menus_CloseAll(void);
  436. int Menu_Count(void);
  437. itemDef_t *Menu_FindItemByName(menuDef_t *menu, const char *p);
  438. void Menu_HandleKey(menuDef_t *menu, int key, qboolean down);
  439. void Menu_New(char *buffer);
  440. void Menus_OpenByName(const char *p);
  441. void Menu_PaintAll(void);
  442. void Menu_Reset(void);
  443. void PC_EndParseSession(char *buffer);
  444. qboolean PC_Float_Parse(int handle, float *f);
  445. qboolean PC_ParseString(const char **tempStr);
  446. qboolean PC_ParseStringMem(const char **out);
  447. void PC_ParseWarning(const char *message);
  448. qboolean PC_String_Parse(int handle, const char **out);
  449. #ifdef _XBOX
  450. int PC_StartParseSession(const char *fileName,char **buffer, bool nested = false);
  451. #else
  452. int PC_StartParseSession(const char *fileName,char **buffer);
  453. #endif
  454. char *PC_ParseExt(void);
  455. qboolean PC_ParseInt(int *number);
  456. qboolean PC_ParseFloat(float *number);
  457. qboolean PC_ParseColor(vec4_t *c);
  458. void PC_SkipBracedSection( void );
  459. const char *String_Alloc(const char *p);
  460. void String_Init(void);
  461. qboolean String_Parse(const char **p, const char **out);
  462. void String_Report(void);
  463. void UI_Cursor_Show(qboolean flag);
  464. itemDef_t *Menu_GetMatchingItemByNumber(menuDef_t *menu, int index, const char *name);
  465. extern displayContextDef_t *DC;
  466. #endif