diff options
author | Nipun Garg | 2019-07-02 03:34:59 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:06 +0200 |
commit | 988ac1f25bf40e53ab2a606a548b1f8aab5271ca (patch) | |
tree | 7669282ce2e017c68db5211165602cbeb4c6dc96 | |
parent | d93e0a2d615f233e5a004723f3195ce86e0345ad (diff) | |
download | scummvm-rg350-988ac1f25bf40e53ab2a606a548b1f8aab5271ca.tar.gz scummvm-rg350-988ac1f25bf40e53ab2a606a548b1f8aab5271ca.tar.bz2 scummvm-rg350-988ac1f25bf40e53ab2a606a548b1f8aab5271ca.zip |
HDB: Add _dialogChoiceInfo
-rw-r--r-- | engines/hdb/window.cpp | 1 | ||||
-rw-r--r-- | engines/hdb/window.h | 33 |
2 files changed, 33 insertions, 1 deletions
diff --git a/engines/hdb/window.cpp b/engines/hdb/window.cpp index d71e16b065..d353c8f28e 100644 --- a/engines/hdb/window.cpp +++ b/engines/hdb/window.cpp @@ -91,6 +91,7 @@ bool Window::init() { void Window::restartSystem() { _dialogInfo.active = false; + _dialogChoiceInfo.active = false; _invWinInfo.active = false; _dialogDelay = _invWinInfo.selection = 0; _gemGfx = g_hdb->_drawMan->loadTile("ent_gem_white_sit01"); diff --git a/engines/hdb/window.h b/engines/hdb/window.h index 9a248e7e97..542f26d02d 100644 --- a/engines/hdb/window.h +++ b/engines/hdb/window.h @@ -28,6 +28,8 @@ namespace HDB { enum { kDialogTextLeft = 64, kDialogTextRight = (kDialogTextLeft + kTileWidth * 9), + kOpenDialogTextLeft = kDialogTextLeft, + kOpenDialogTextRight = (kDialogTextRight + kTileWidth * 2), kWeaponX = (480 - 34), kWeaponY = 2, kInvItemSpaceX = 48, @@ -56,7 +58,34 @@ struct DialogInfo { int el, er, et, eb; // saves the text edges char luaMore[64]; // the name of the function to call after clicking the MORE button - DialogInfo() : title(""), tileIndex(0), string(""), active(false), x(0), y(0), width(0), height(0), titleWidth(0), gfx(NULL), more(0), el(0), er(0), et(0), eb(0), luaMore("") {} + DialogInfo() : title(""), tileIndex(0), string(""), active(false), x(0), y(0), + width(0), height(0), titleWidth(0), gfx(NULL), more(0), el(0), er(0), et(0), + eb(0), luaMore("") {} +}; + +struct DialogChoiceInfo { + char title[64]; // TITLE string + char text[160]; // actual text in the dialog + char func[64]; // function to call with result + + bool active; // is it drawing or not? + int x, y; // where to draw dialog + int width, height; // size of the dialog itself + int textHeight; // height of everything above choices + int titleWidth; + int el, er, et, eb; // saves the text edges + uint32 timeout; // timeout value! + + int selection; // which choice we've made + int numChoices; // how many choices possible + char choices[10][64]; // ptrs to choice text + + DialogChoiceInfo() : title(""), text(""), func(""), active(false), x(0), y(0), + width(0), height(0), textHeight(0), titleWidth(0), el(0), er(0), et(0), + eb(0), timeout(0), selection(0), numChoices(0) { + for (int i = 0; i < 10; i++) + strcpy(choices[i], ""); + } }; struct InvWinInfo { @@ -152,6 +181,8 @@ private: DialogInfo _dialogInfo; uint32 _dialogDelay; // Used for Cinematics + DialogChoiceInfo _dialogChoiceInfo; + InvWinInfo _invWinInfo; Common::Array<TOut *> _textOutList; DlvsInfo _dlvsInfo; |