HDB: Add inventory drawing data

This commit is contained in:
Nipun Garg 2019-06-25 10:59:27 +05:30 committed by Eugene Sandulenko
parent 2a3ee7e2ef
commit f45904ca30
2 changed files with 20 additions and 2 deletions

View File

@ -81,7 +81,9 @@ bool Window::init() {
void Window::restartSystem() {
_dialogInfo.active = false;
_dialogDelay = 0;
_invWinInfo.active = false;
_dialogDelay = _invWinInfo.selection = 0;
_gemGfx = g_hdb->_drawMan->loadTile("ent_gem_white_sit01");
_infobarDimmed = 0;
}

View File

@ -27,7 +27,12 @@ namespace HDB {
enum {
kDialogTextLeft = 64,
kDialogTextRight = (kDialogTextLeft + kTileWidth * 9)
kDialogTextRight = (kDialogTextLeft + kTileWidth * 9),
kWeaponX = (480 - 34),
kWeaponY = 2,
kInvItemSpaceX = 48,
kInvItemSpaceY = 40,
kInvItemPerLine = 3
};
struct DialogInfo {
@ -47,6 +52,13 @@ struct DialogInfo {
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 InvWinInfo {
int x, y;
int width, height;
int selection;
bool active;
};
class Window {
public:
@ -74,6 +86,8 @@ private:
DialogInfo _dialogInfo;
uint32 _dialogDelay; // Used for Cinematics
InvWinInfo _invWinInfo;
// Windows GFX
Picture *_gfxTL, *_gfxTM, *_gfxTR;
Picture *_gfxL, *_gfxM, *_gfxR;
@ -88,6 +102,8 @@ private:
Picture *_gfxTry, *_gfxAgain, *_gfxInvSelect;
Tile *_gfxMonkeystone;
Picture *_gfxLevelRestart, *_gfxPausePlaque;
Tile *_gemGfx;
Picture *_mstoneGfx;
// Info Bar
Picture *_gfxInfobar, *_gfxDarken;