Devilution
Diablo devolved - magic behind the 1996 computer game
Macros | Functions | Variables
control.h File Reference

Go to the source code of this file.

Macros

#define ADD_PlrStringXY(x, y, width, pszStr, col)   MY_PlrStringXY(x, y, width, pszStr, col, 1)
 

Functions

void DrawSpellCel (int xp, int yp, BYTE *Trans, int nCel, int w)
 Draw spell cell onto the back buffer. More...
 
void SetSpellTrans (char t)
 
void DrawSpell ()
 Sets the spell frame to draw and its position then draws it. More...
 
void DrawSpellList ()
 
void SetSpell ()
 
void SetSpeedSpell (int slot)
 
void ToggleSpell (int slot)
 
void PrintChar (int sx, int sy, int nCel, char col)
 Print letter to the back buffer. More...
 
void AddPanelString (char *str, BOOL just)
 
void ClearPanel ()
 
void DrawPanelBox (int x, int y, int w, int h, int sx, int sy)
 
void InitPanelStr ()
 
void SetFlaskHeight (BYTE *pCelBuff, int min, int max, int sx, int sy)
 Draws a section of the empty flask cel on top of the panel to create the illusion of the flask getting empty. More...
 
void DrawFlask (BYTE *pCelBuff, int w, int nSrcOff, BYTE *pBuff, int nDstOff, int h)
 Draws the dome of the flask that protrudes above the panel top line. More...
 
void DrawLifeFlask ()
 Draws the top dome of the life flask (that part that protrudes out of the control panel). More...
 
void UpdateLifeFlask ()
 Controls the drawing of the area of the life flask within the control panel. More...
 
void DrawManaFlask ()
 
void control_update_life_mana ()
 
void UpdateManaFlask ()
 Controls the drawing of the area of the life flask within the control panel. More...
 
void InitControlPan ()
 
void DrawCtrlPan ()
 
void DrawCtrlBtns ()
 Draws the control panel buttons in their current state. More...
 
void DoSpeedBook ()
 Draws the "Speed Book": the rows of known spells for quick-setting a spell that show up when you click the spell slot at the control panel. More...
 
void DoPanBtn ()
 Checks if the mouse cursor is within any of the panel buttons and flag it if so. More...
 
void control_set_button_down (int btn_id)
 
void control_check_btn_press ()
 
void DoAutoMap ()
 
void CheckPanelInfo ()
 Checks the mouse cursor position within the control panel and sets information strings if needed. More...
 
void CheckBtnUp ()
 Check if the mouse is within a control panel button that's flagged. More...
 
void FreeControlPan ()
 
BOOL control_WriteStringToBuffer (BYTE *str)
 
void DrawInfoBox ()
 Sets a string to be drawn in the info box and then draws it. More...
 
void PrintInfo ()
 
void CPrintString (int y, char *str, BOOL center, int lines)
 
void PrintGameStr (int x, int y, const char *str, int color)
 
void DrawChr ()
 
void MY_PlrStringXY (int x, int y, int width, char *pszStr, char col, int base)
 Render text string to back buffer. More...
 
void CheckLvlBtn ()
 
void ReleaseLvlBtn ()
 
void DrawLevelUpIcon ()
 
void CheckChrBtns ()
 
void ReleaseChrBtns ()
 
void DrawDurIcon ()
 
int DrawDurIcon4Item (ItemStruct *pItem, int x, int c)
 
void RedBack ()
 
char GetSBookTrans (int ii, BOOL townok)
 
void DrawSpellBook ()
 
void PrintSBookStr (int x, int y, BOOL cjustflag, char *pszStr, char col)
 
void CheckSBook ()
 
char * get_pieces_str (int nGold)
 
void DrawGoldSplit (int amount)
 
void control_drop_gold (char vkey)
 
void control_remove_gold (int pnum, int gold_index)
 
void control_set_gold_curs (int pnum)
 
void DrawTalkPan ()
 
char * control_print_talk_msg (char *msg, int *x, int y, int just)
 
BOOL control_check_talk_btn ()
 
void control_release_talk_btn ()
 
void control_reset_talk_msg ()
 
void control_type_message ()
 
void control_reset_talk ()
 
BOOL control_talk_last_key (int vkey)
 
BOOL control_presskeys (int vkey)
 
void control_press_enter ()
 
void control_up_down (int v)
 

Variables

BYTE * pDurIcons
 
BYTE * pChrButtons
 
BOOL drawhpflag
 
BOOL dropGoldFlag
 
BOOL panbtn [8]
 
BOOL chrbtn [4]
 
BYTE * pMultiBtns
 
BYTE * pPanelButtons
 
BYTE * pChrPanel
 
BOOL lvlbtndown
 
int dropGoldValue
 
BOOL drawmanaflag
 
BOOL chrbtnactive
 
BYTE * pPanelText
 
BYTE * pLifeBuff
 
BYTE * pBtmBuff
 
BYTE * pTalkBtns
 
int pstrjust [4]
 
int pnumlines
 
BOOL pinfoflag
 
BOOL talkbtndown [3]
 
int pSpell
 
BYTE * pManaBuff
 
char infoclr
 
BYTE * pGBoxBuff
 
BYTE * pSBkBtnCel
 
char tempstr [256]
 
BOOLEAN whisper [MAX_PLRS]
 
int sbooktab
 
int pSplType
 
int initialDropGoldIndex
 
BOOL talkflag
 
BYTE * pSBkIconCels
 
BOOL sbookflag
 
BOOL chrflag
 
BOOL drawbtnflag
 
BYTE * pSpellBkCel
 
char infostr [256]
 
int numpanbtns
 
BYTE * pStatusPanel
 
char panelstr [4][64]
 
BOOL panelflag
 
BYTE SplTransTbl [256]
 
int initialDropGoldValue
 
BYTE * pSpellCels
 
BOOL panbtndown
 
BYTE * pTalkPanel
 
BOOL spselflag
 
const BYTE fontframe [128]
 Maps from font index to smaltext.cel frame number. More...
 
const BYTE fontkern [68]
 Maps from smaltext.cel frame number to character width. More...
 
const int lineOffsets [5][5]
 Line start position for info box text when displaying 1, 2, 3, 4 and 5 lines respectivly. More...
 
const BYTE gbFontTransTbl [256]
 Maps ASCII character code to font index, as used by the small, medium and large sized fonts; which corresponds to smaltext.cel, medtexts.cel and bigtgold.cel respectively. More...
 
char SpellITbl [MAX_SPELLS]
 Maps from spell_id to spelicon.cel frame number. More...
 
int PanBtnPos [8][5]
 Maps from panel_button_id to the position and dimensions of a panel button. More...
 
char * PanBtnHotKey [8]
 Maps from panel_button_id to hotkey name. More...
 
char * PanBtnStr [8]
 Maps from panel_button_id to panel button description. More...
 
RECT32 ChrBtnsRect [4]
 Maps from attribute_id to the rectangle on screen used for attribute increment buttons. More...
 
int SpellPages [6][7]
 Maps from spellbook page number and position to spell_id. More...
 

Detailed Description

Interface of the character and main control panels

Definition in file control.h.