2007-05-30 21:56:52 +00:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
2004-04-12 21:40:49 +00:00
|
|
|
*
|
2007-05-30 21:56:52 +00:00
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
2004-04-12 21:40:49 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2008-01-05 12:45:14 +00:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2004-04-12 21:40:49 +00:00
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2005-10-18 01:30:26 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2004-04-12 21:40:49 +00:00
|
|
|
*
|
2006-02-11 12:44:16 +00:00
|
|
|
* $URL$
|
|
|
|
* $Id$
|
2004-04-12 21:40:49 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2004-05-01 09:37:24 +00:00
|
|
|
// Game interface module private header file
|
2004-04-12 21:40:49 +00:00
|
|
|
|
2006-07-23 15:16:50 +00:00
|
|
|
#ifndef SAGA_INTERFACE_H
|
|
|
|
#define SAGA_INTERFACE_H
|
2004-04-12 21:40:49 +00:00
|
|
|
|
2007-09-11 09:19:23 +00:00
|
|
|
#include "common/keyboard.h"
|
2005-05-23 18:53:36 +00:00
|
|
|
#include "common/savefile.h"
|
2005-05-12 17:00:08 +00:00
|
|
|
|
2007-04-27 23:11:12 +00:00
|
|
|
#include "saga/displayinfo.h"
|
2004-08-06 01:39:17 +00:00
|
|
|
#include "saga/sprite.h"
|
2004-08-12 23:57:45 +00:00
|
|
|
#include "saga/script.h"
|
2004-08-06 01:39:17 +00:00
|
|
|
|
2004-04-12 21:40:49 +00:00
|
|
|
namespace Saga {
|
|
|
|
|
2005-01-15 23:46:43 +00:00
|
|
|
enum InterfaceUpdateFlags {
|
2004-08-06 01:39:17 +00:00
|
|
|
UPDATE_MOUSEMOVE = 1,
|
2005-01-15 23:46:43 +00:00
|
|
|
UPDATE_LEFTBUTTONCLICK = 2,
|
|
|
|
UPDATE_RIGHTBUTTONCLICK = 4,
|
2005-06-19 23:41:40 +00:00
|
|
|
UPDATE_MOUSECLICK = UPDATE_LEFTBUTTONCLICK | UPDATE_RIGHTBUTTONCLICK,
|
|
|
|
UPDATE_WHEELUP = 8,
|
|
|
|
UPDATE_WHEELDOWN = 16
|
2004-08-22 18:28:42 +00:00
|
|
|
};
|
2004-08-06 01:39:17 +00:00
|
|
|
|
2007-11-27 23:10:32 +00:00
|
|
|
#define CONVERSE_MAX_TEXTS 64
|
|
|
|
#define CONVERSE_MAX_WORK_STRING 256
|
2005-08-10 18:27:18 +00:00
|
|
|
|
2004-11-07 14:15:41 +00:00
|
|
|
#define ITE_INVENTORY_SIZE 24
|
|
|
|
|
2004-10-27 21:32:28 +00:00
|
|
|
#define VERB_STRLIMIT 32
|
2004-04-12 21:40:49 +00:00
|
|
|
|
2004-10-27 21:32:28 +00:00
|
|
|
#define STATUS_TEXT_LEN 128
|
2005-06-19 14:06:20 +00:00
|
|
|
#define STATUS_TEXT_INPUT_MAX 256
|
2004-04-12 21:40:49 +00:00
|
|
|
|
2008-05-26 11:10:46 +00:00
|
|
|
#define RID_IHNM_BOSS_SCREEN 19 // not in demo
|
|
|
|
#define RID_ITE_TYCHO_MAP 1686
|
|
|
|
#define RID_ITE_SPR_CROSSHAIR (73 + 9)
|
2008-09-24 22:44:01 +00:00
|
|
|
#define TIMETOSAVE (1000000 * 60 * 30) // 30 minutes
|
|
|
|
#define TIMETOBLINK_ITE (1000000 * 1)
|
|
|
|
#define TIMETOBLINK_IHNM (1000000 / 10)
|
2008-05-26 11:10:46 +00:00
|
|
|
|
2005-01-10 22:51:01 +00:00
|
|
|
// Converse-specific stuff
|
|
|
|
|
2005-01-13 22:42:49 +00:00
|
|
|
enum PanelModes {
|
2005-01-02 20:29:27 +00:00
|
|
|
kPanelNull,
|
|
|
|
kPanelMain,
|
|
|
|
kPanelOption,
|
2005-05-29 15:39:35 +00:00
|
|
|
kPanelSave, //ex- kPanelTextBox,
|
2005-01-02 20:29:27 +00:00
|
|
|
kPanelQuit,
|
|
|
|
kPanelError,
|
|
|
|
kPanelLoad,
|
|
|
|
kPanelConverse,
|
|
|
|
kPanelProtect,
|
|
|
|
kPanelPlacard,
|
2005-07-29 16:37:06 +00:00
|
|
|
kPanelMap,
|
2005-08-05 23:14:11 +00:00
|
|
|
kPanelSceneSubstitute,
|
2005-10-06 15:56:06 +00:00
|
|
|
kPanelChapterSelection,
|
2005-10-07 15:36:28 +00:00
|
|
|
kPanelCutaway,
|
2005-10-09 03:35:45 +00:00
|
|
|
kPanelVideo,
|
|
|
|
kPanelBoss
|
2005-06-04 15:50:23 +00:00
|
|
|
// kPanelInventory
|
2005-06-04 15:02:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum FadeModes {
|
|
|
|
kNoFade = 0,
|
|
|
|
kFadeIn,
|
|
|
|
kFadeOut
|
2004-08-22 18:28:42 +00:00
|
|
|
};
|
2004-04-12 21:40:49 +00:00
|
|
|
|
2005-01-09 23:41:22 +00:00
|
|
|
struct InterfacePanel {
|
2004-04-12 21:40:49 +00:00
|
|
|
int x;
|
|
|
|
int y;
|
2010-10-23 21:56:16 +00:00
|
|
|
ByteArray image;
|
2005-01-13 22:42:49 +00:00
|
|
|
int imageWidth;
|
|
|
|
int imageHeight;
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2005-01-13 22:42:49 +00:00
|
|
|
PanelButton *currentButton;
|
|
|
|
int buttonsCount;
|
|
|
|
PanelButton *buttons;
|
2005-01-09 15:07:49 +00:00
|
|
|
SpriteList sprites;
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2005-05-29 15:39:35 +00:00
|
|
|
InterfacePanel() {
|
|
|
|
x = y = 0;
|
|
|
|
imageWidth = imageHeight = 0;
|
|
|
|
currentButton = NULL;
|
|
|
|
buttonsCount = 0;
|
|
|
|
buttons = NULL;
|
|
|
|
}
|
|
|
|
|
2005-04-22 14:11:04 +00:00
|
|
|
PanelButton *getButton(int index) {
|
|
|
|
if ((index >= 0) && (index < buttonsCount)) {
|
|
|
|
return &buttons[index];
|
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2005-05-29 15:39:35 +00:00
|
|
|
void getRect(Rect &rect) {
|
|
|
|
rect.left = x;
|
|
|
|
rect.top = y;
|
2005-07-09 16:23:45 +00:00
|
|
|
rect.setWidth(imageWidth);
|
|
|
|
rect.setHeight(imageHeight);
|
2005-05-29 15:39:35 +00:00
|
|
|
}
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2005-04-18 20:03:14 +00:00
|
|
|
void calcPanelButtonRect(const PanelButton* panelButton, Rect &rect) {
|
|
|
|
rect.left = x + panelButton->xOffset;
|
|
|
|
rect.right = rect.left + panelButton->width;
|
|
|
|
rect.top = y + panelButton->yOffset;
|
|
|
|
rect.bottom = rect.top + panelButton->height;
|
|
|
|
}
|
2005-04-22 14:11:04 +00:00
|
|
|
|
|
|
|
PanelButton *hitTest(const Point& mousePoint, int buttonType) {
|
|
|
|
PanelButton *panelButton;
|
|
|
|
Rect rect;
|
|
|
|
int i;
|
|
|
|
for (i = 0; i < buttonsCount; i++) {
|
|
|
|
panelButton = &buttons[i];
|
|
|
|
if (panelButton != NULL) {
|
|
|
|
if ((panelButton->type & buttonType) > 0) {
|
|
|
|
calcPanelButtonRect(panelButton, rect);
|
|
|
|
if (rect.contains(mousePoint)) {
|
|
|
|
return panelButton;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2005-05-29 15:39:35 +00:00
|
|
|
void zeroAllButtonState() {
|
|
|
|
int i;
|
|
|
|
for (i = 0; i < buttonsCount; i++) {
|
|
|
|
buttons[i].state = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-04-25 14:42:14 +00:00
|
|
|
};
|
2004-04-12 21:40:49 +00:00
|
|
|
|
2005-01-10 22:51:01 +00:00
|
|
|
struct Converse {
|
2010-10-22 23:13:17 +00:00
|
|
|
Common::Array<char> text;
|
2007-06-10 00:36:01 +00:00
|
|
|
int strId;
|
2005-01-10 22:51:01 +00:00
|
|
|
int stringNum;
|
|
|
|
int textNum;
|
|
|
|
int replyId;
|
|
|
|
int replyFlags;
|
|
|
|
int replyBit;
|
|
|
|
};
|
|
|
|
|
2005-01-19 11:29:29 +00:00
|
|
|
|
2005-06-19 14:06:20 +00:00
|
|
|
enum StatusTextInputState {
|
|
|
|
kStatusTextInputFirstRun,
|
|
|
|
kStatusTextInputEntered,
|
|
|
|
kStatusTextInputAborted
|
|
|
|
};
|
2005-01-19 11:29:29 +00:00
|
|
|
|
2004-08-06 01:39:17 +00:00
|
|
|
class Interface {
|
2004-11-07 14:15:41 +00:00
|
|
|
public:
|
2004-08-06 01:39:17 +00:00
|
|
|
Interface(SagaEngine *vm);
|
2009-11-02 21:54:57 +00:00
|
|
|
~Interface();
|
2004-08-06 01:39:17 +00:00
|
|
|
|
|
|
|
int activate();
|
|
|
|
int deactivate();
|
2005-05-22 11:59:22 +00:00
|
|
|
void setSaveReminderState(int state) {
|
|
|
|
_saveReminderState = state;
|
|
|
|
draw();
|
|
|
|
}
|
2005-08-11 16:13:10 +00:00
|
|
|
int getSaveReminderState() {
|
|
|
|
return _saveReminderState;
|
|
|
|
}
|
2005-01-15 20:12:49 +00:00
|
|
|
bool isActive() { return _active; }
|
2005-06-04 15:02:17 +00:00
|
|
|
void setMode(int mode);
|
2009-11-02 21:54:57 +00:00
|
|
|
int getMode() const { return _panelMode; }
|
2005-06-04 15:02:17 +00:00
|
|
|
void setFadeMode(int fadeMode) {
|
|
|
|
_fadeMode = fadeMode;
|
|
|
|
draw();
|
|
|
|
}
|
|
|
|
int getFadeMode() const {
|
|
|
|
return _fadeMode;
|
|
|
|
}
|
2005-01-07 00:57:43 +00:00
|
|
|
void rememberMode();
|
2007-06-17 01:00:06 +00:00
|
|
|
void restoreMode(bool draw_ = true);
|
2005-01-06 14:02:53 +00:00
|
|
|
bool isInMainMode() { return _inMainMode; }
|
2005-04-18 20:03:14 +00:00
|
|
|
void setStatusText(const char *text, int statusColor = -1);
|
2005-07-19 19:05:52 +00:00
|
|
|
void loadScenePortraits(int resourceId);
|
2005-05-22 11:59:22 +00:00
|
|
|
void setLeftPortrait(int portrait) {
|
|
|
|
_leftPortrait = portrait;
|
|
|
|
draw();
|
|
|
|
}
|
|
|
|
void setRightPortrait(int portrait) {
|
|
|
|
_rightPortrait = portrait;
|
|
|
|
draw();
|
|
|
|
}
|
2005-10-04 18:19:14 +00:00
|
|
|
void setPortraitBgColor(int red, int green, int blue) {
|
|
|
|
_portraitBgColor.red = red;
|
|
|
|
_portraitBgColor.green = green;
|
|
|
|
_portraitBgColor.blue = blue;
|
|
|
|
}
|
2005-10-04 23:38:19 +00:00
|
|
|
|
2005-05-22 11:59:22 +00:00
|
|
|
void draw();
|
|
|
|
void drawOption();
|
2005-05-29 15:39:35 +00:00
|
|
|
void drawQuit();
|
|
|
|
void drawLoad();
|
|
|
|
void drawSave();
|
2005-10-17 03:28:21 +00:00
|
|
|
void drawProtect();
|
2005-05-22 11:59:22 +00:00
|
|
|
void update(const Point& mousePoint, int updateFlag);
|
2005-04-18 20:03:14 +00:00
|
|
|
void drawStatusBar();
|
2005-04-22 14:11:04 +00:00
|
|
|
void setVerbState(int verb, int state);
|
2004-08-06 01:39:17 +00:00
|
|
|
|
2007-09-11 09:19:23 +00:00
|
|
|
bool processAscii(Common::KeyState keystate);
|
2005-05-29 20:57:45 +00:00
|
|
|
|
2005-10-09 03:35:45 +00:00
|
|
|
void keyBoss();
|
|
|
|
void keyBossExit();
|
|
|
|
|
2005-10-04 23:38:19 +00:00
|
|
|
void disableAbortSpeeches(bool d) { _disableAbortSpeeches = d; }
|
|
|
|
|
2008-06-03 21:20:55 +00:00
|
|
|
static void saveReminderCallback(void *refCon);
|
|
|
|
void updateSaveReminder();
|
|
|
|
|
2005-05-31 23:41:27 +00:00
|
|
|
bool _textInput;
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2005-06-19 14:06:20 +00:00
|
|
|
bool _statusTextInput;
|
|
|
|
StatusTextInputState _statusTextInputState;
|
|
|
|
char _statusTextInputString[STATUS_TEXT_INPUT_MAX];
|
|
|
|
void enterStatusString() {
|
|
|
|
_statusTextInput = true;
|
|
|
|
_statusTextInputPos = 0;
|
|
|
|
_statusTextInputString[0] = 0;
|
|
|
|
setStatusText(_statusTextInputString);
|
|
|
|
}
|
2005-10-04 18:19:14 +00:00
|
|
|
|
2005-04-24 15:17:38 +00:00
|
|
|
private:
|
2008-12-06 14:24:40 +00:00
|
|
|
void drawInventory();
|
2005-04-24 15:17:38 +00:00
|
|
|
void updateInventory(int pos);
|
2005-04-22 14:11:04 +00:00
|
|
|
void inventoryChangePos(int chg);
|
|
|
|
void inventorySetPos(int key);
|
2005-04-24 15:17:38 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
void refreshInventory() {
|
|
|
|
updateInventory(_inventoryCount);
|
|
|
|
draw();
|
|
|
|
}
|
2005-05-12 15:11:32 +00:00
|
|
|
void addToInventory(int objectId);
|
2005-04-23 12:34:35 +00:00
|
|
|
void removeFromInventory(int objectId);
|
2005-04-21 01:30:07 +00:00
|
|
|
void clearInventory();
|
2005-04-23 12:34:35 +00:00
|
|
|
int inventoryItemPosition(int objectId);
|
2005-04-22 14:11:04 +00:00
|
|
|
int getInventoryContentByPanelButton(PanelButton * panelButton) {
|
|
|
|
int cell = _inventoryStart + panelButton->id;
|
|
|
|
if (cell >= _inventoryCount) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
return _inventory[cell];
|
|
|
|
}
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2005-04-22 14:11:04 +00:00
|
|
|
PanelButton *inventoryHitTest(const Point& mousePoint) {
|
|
|
|
return _mainPanel.hitTest(mousePoint, kPanelButtonInventory);
|
|
|
|
}
|
2005-05-22 11:59:22 +00:00
|
|
|
PanelButton *verbHitTest(const Point& mousePoint){
|
|
|
|
return _mainPanel.hitTest(mousePoint, kPanelButtonVerb);
|
|
|
|
}
|
2005-05-23 18:53:36 +00:00
|
|
|
void saveState(Common::OutSaveFile *out);
|
|
|
|
void loadState(Common::InSaveFile *in);
|
2005-05-31 23:41:27 +00:00
|
|
|
|
2005-07-03 20:02:56 +00:00
|
|
|
void mapPanelDrawCrossHair();
|
|
|
|
|
2005-10-17 03:28:21 +00:00
|
|
|
int32 getProtectHash() { return _protectHash; }
|
|
|
|
|
2004-11-07 14:15:41 +00:00
|
|
|
private:
|
2005-05-22 11:59:22 +00:00
|
|
|
void handleMainUpdate(const Point& mousePoint); // main panel update
|
|
|
|
void handleMainClick(const Point& mousePoint); // main panel click
|
|
|
|
|
2005-04-22 14:11:04 +00:00
|
|
|
PanelButton *converseHitTest(const Point& mousePoint) {
|
|
|
|
return _conversePanel.hitTest(mousePoint, kPanelAllButtons);
|
|
|
|
}
|
2005-05-22 11:59:22 +00:00
|
|
|
void handleConverseUpdate(const Point& mousePoint); // converse panel update
|
|
|
|
void handleConverseClick(const Point& mousePoint); // converse panel click
|
|
|
|
|
|
|
|
PanelButton *optionHitTest(const Point& mousePoint) {
|
2005-05-28 11:06:55 +00:00
|
|
|
return _optionPanel.hitTest(mousePoint, kPanelButtonOptionSaveFiles | kPanelButtonOption | kPanelButtonOptionSlider);
|
2005-05-22 11:59:22 +00:00
|
|
|
}
|
|
|
|
void handleOptionUpdate(const Point& mousePoint); // option panel update
|
|
|
|
void handleOptionClick(const Point& mousePoint); // option panel click
|
|
|
|
|
2005-05-29 15:39:35 +00:00
|
|
|
PanelButton *quitHitTest(const Point& mousePoint) {
|
|
|
|
return _quitPanel.hitTest(mousePoint, kPanelAllButtons);
|
|
|
|
}
|
|
|
|
void handleQuitUpdate(const Point& mousePoint); // quit panel update
|
|
|
|
void handleQuitClick(const Point& mousePoint); // quit panel click
|
|
|
|
|
|
|
|
PanelButton *loadHitTest(const Point& mousePoint) {
|
|
|
|
return _loadPanel.hitTest(mousePoint, kPanelAllButtons);
|
|
|
|
}
|
|
|
|
void handleLoadUpdate(const Point& mousePoint); // load panel update
|
|
|
|
void handleLoadClick(const Point& mousePoint); // load panel click
|
|
|
|
|
|
|
|
PanelButton *saveHitTest(const Point& mousePoint) {
|
|
|
|
return _savePanel.hitTest(mousePoint, kPanelAllButtons);
|
|
|
|
}
|
|
|
|
void handleSaveUpdate(const Point& mousePoint); // save panel update
|
|
|
|
void handleSaveClick(const Point& mousePoint); // save panel click
|
|
|
|
|
2005-08-10 13:56:51 +00:00
|
|
|
void handleChapterSelectionUpdate(const Point& mousePoint);
|
|
|
|
void handleChapterSelectionClick(const Point& mousePoint);
|
|
|
|
|
2005-07-03 20:02:56 +00:00
|
|
|
void mapPanelShow();
|
|
|
|
void mapPanelClean();
|
|
|
|
|
2005-01-15 20:12:49 +00:00
|
|
|
void lockMode() { _lockedMode = _panelMode; }
|
|
|
|
void unlockMode() { _panelMode = _lockedMode; }
|
|
|
|
|
2005-05-22 11:59:22 +00:00
|
|
|
void setOption(PanelButton *panelButton);
|
2005-05-29 15:39:35 +00:00
|
|
|
void setQuit(PanelButton *panelButton);
|
|
|
|
void setLoad(PanelButton *panelButton);
|
|
|
|
void setSave(PanelButton *panelButton);
|
|
|
|
|
2008-12-06 14:24:40 +00:00
|
|
|
void drawTextInput(InterfacePanel *panel, PanelButton *panelButton);
|
|
|
|
void drawPanelText(InterfacePanel *panel, PanelButton *panelButton);
|
|
|
|
void drawPanelButtonText(InterfacePanel *panel, PanelButton *panelButton, int spritenum = 0);
|
2005-05-29 15:39:35 +00:00
|
|
|
enum ButtonKind {
|
|
|
|
kButton,
|
|
|
|
kSlider,
|
|
|
|
kEdit
|
|
|
|
};
|
2008-12-06 14:24:40 +00:00
|
|
|
void drawButtonBox(const Rect &rect, ButtonKind kind, bool down);
|
|
|
|
void drawPanelButtonArrow(InterfacePanel *panel, PanelButton *panelButton);
|
|
|
|
void drawVerbPanelText(PanelButton *panelButton, KnownColor textKnownColor, KnownColor textShadowKnownColor);
|
|
|
|
void drawVerbPanel(PanelButton* panelButton);
|
2005-05-28 11:06:55 +00:00
|
|
|
void calcOptionSaveSlider();
|
2007-09-11 09:19:23 +00:00
|
|
|
bool processTextInput(Common::KeyState keystate);
|
|
|
|
void processStatusTextInput(Common::KeyState keystate);
|
2005-05-29 20:57:45 +00:00
|
|
|
|
2005-01-10 22:51:01 +00:00
|
|
|
public:
|
2009-11-02 21:54:57 +00:00
|
|
|
void converseClear();
|
2007-06-10 00:36:01 +00:00
|
|
|
bool converseAddText(const char *text, int strId, int replyId, byte replyFlags, int replyBit);
|
2005-04-18 20:03:14 +00:00
|
|
|
void converseDisplayText();
|
|
|
|
void converseSetTextLines(int row);
|
2005-01-10 22:51:01 +00:00
|
|
|
void converseChangePos(int chg);
|
2005-01-17 20:17:06 +00:00
|
|
|
void converseSetPos(int key);
|
2005-01-10 22:51:01 +00:00
|
|
|
|
|
|
|
private:
|
2008-12-06 14:24:40 +00:00
|
|
|
void converseDisplayTextLines();
|
2005-01-13 22:42:49 +00:00
|
|
|
PanelButton *getPanelButtonByVerbType(int verb) {
|
2006-01-13 20:20:01 +00:00
|
|
|
if ((verb < 0) || (verb >= kVerbTypeIdsMax)) {
|
2005-01-13 22:42:49 +00:00
|
|
|
error("Interface::getPanelButtonByVerbType wrong verb");
|
|
|
|
}
|
|
|
|
return _verbTypeToPanelButton[verb];
|
|
|
|
}
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2005-05-31 20:08:46 +00:00
|
|
|
void validateOptionButtons() {
|
|
|
|
if (!_vm->isSaveListFull() && (_optionSaveFileTitleNumber == 0) && (_optionPanel.currentButton != NULL)) {
|
|
|
|
if (_optionPanel.currentButton->id == kTextLoad) {
|
|
|
|
_optionPanel.currentButton = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
void validateSaveButtons() {
|
|
|
|
if ((_textInputStringLength == 0) && (_savePanel.currentButton != NULL)) {
|
|
|
|
if (_savePanel.currentButton->id == kTextSave) {
|
|
|
|
_savePanel.currentButton = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-08-07 00:00:43 +00:00
|
|
|
public:
|
|
|
|
SpriteList _defPortraits;
|
2007-08-17 06:08:18 +00:00
|
|
|
PalEntry _portraitBgColor;
|
2005-08-07 00:00:43 +00:00
|
|
|
|
2004-11-07 14:15:41 +00:00
|
|
|
private:
|
2004-08-06 01:39:17 +00:00
|
|
|
SagaEngine *_vm;
|
|
|
|
|
2005-07-19 19:05:52 +00:00
|
|
|
ResourceContext *_interfaceContext;
|
2005-01-13 22:42:49 +00:00
|
|
|
InterfacePanel _mainPanel;
|
2005-04-22 14:11:04 +00:00
|
|
|
PanelButton *_inventoryUpButton;
|
|
|
|
PanelButton *_inventoryDownButton;
|
2005-01-13 22:42:49 +00:00
|
|
|
InterfacePanel _conversePanel;
|
2005-04-22 14:11:04 +00:00
|
|
|
PanelButton *_converseUpButton;
|
|
|
|
PanelButton *_converseDownButton;
|
2005-01-13 22:42:49 +00:00
|
|
|
SpriteList _scenePortraits;
|
2006-01-13 20:20:01 +00:00
|
|
|
PanelButton *_verbTypeToPanelButton[kVerbTypeIdsMax];
|
2005-05-22 11:59:22 +00:00
|
|
|
InterfacePanel _optionPanel;
|
2005-05-28 11:06:55 +00:00
|
|
|
PanelButton * _optionSaveFileSlider;
|
|
|
|
PanelButton * _optionSaveFilePanel;
|
2005-05-29 15:39:35 +00:00
|
|
|
InterfacePanel _quitPanel;
|
|
|
|
InterfacePanel _loadPanel;
|
|
|
|
InterfacePanel _savePanel;
|
|
|
|
PanelButton * _saveEdit;
|
2005-10-17 03:28:21 +00:00
|
|
|
InterfacePanel _protectPanel;
|
|
|
|
PanelButton * _protectEdit;
|
2005-01-13 22:42:49 +00:00
|
|
|
|
2005-10-04 23:38:19 +00:00
|
|
|
bool _disableAbortSpeeches;
|
|
|
|
|
2005-05-22 11:59:22 +00:00
|
|
|
int _saveReminderState;
|
2005-01-13 22:42:49 +00:00
|
|
|
bool _active;
|
2005-06-04 15:02:17 +00:00
|
|
|
int _fadeMode;
|
2004-10-27 02:27:54 +00:00
|
|
|
int _panelMode;
|
2005-01-02 20:29:27 +00:00
|
|
|
int _savedMode;
|
2005-01-06 14:02:53 +00:00
|
|
|
int _lockedMode;
|
2005-10-09 03:35:45 +00:00
|
|
|
int _bossMode;
|
2005-01-06 14:02:53 +00:00
|
|
|
bool _inMainMode;
|
2004-10-27 21:32:28 +00:00
|
|
|
char _statusText[STATUS_TEXT_LEN];
|
2005-01-19 11:29:29 +00:00
|
|
|
int _statusOnceColor;
|
2004-10-21 06:49:11 +00:00
|
|
|
int _leftPortrait;
|
|
|
|
int _rightPortrait;
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2005-01-15 20:12:49 +00:00
|
|
|
Point _lastMousePoint;
|
|
|
|
|
2010-10-24 20:22:21 +00:00
|
|
|
Common::Array<uint16> _inventory;
|
2005-04-22 14:11:04 +00:00
|
|
|
int _inventoryStart;
|
|
|
|
int _inventoryEnd;
|
|
|
|
int _inventoryPos;
|
|
|
|
int _inventoryBox;
|
|
|
|
int _inventoryCount;
|
2005-01-10 22:51:01 +00:00
|
|
|
|
2005-04-18 20:03:14 +00:00
|
|
|
char _converseWorkString[CONVERSE_MAX_WORK_STRING];
|
2005-01-10 22:51:01 +00:00
|
|
|
Converse _converseText[CONVERSE_MAX_TEXTS];
|
|
|
|
int _converseTextCount;
|
|
|
|
int _converseStrCount;
|
|
|
|
int _converseStartPos;
|
|
|
|
int _converseEndPos;
|
|
|
|
int _conversePos;
|
2005-05-28 11:06:55 +00:00
|
|
|
|
|
|
|
uint _optionSaveFileTop;
|
|
|
|
uint _optionSaveFileTitleNumber;
|
|
|
|
int16 _optionSaveFileMouseOff;
|
|
|
|
Rect _optionSaveRectTop;
|
|
|
|
Rect _optionSaveRectSlider;
|
|
|
|
Rect _optionSaveRectBottom;
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2005-05-29 15:39:35 +00:00
|
|
|
char _textInputString[SAVE_TITLE_SIZE];
|
|
|
|
uint _textInputStringLength;
|
|
|
|
uint _textInputPos;
|
|
|
|
uint _textInputMaxWidth;
|
2005-05-29 20:57:45 +00:00
|
|
|
|
2005-06-19 14:06:20 +00:00
|
|
|
uint _statusTextInputPos;
|
|
|
|
|
2005-07-09 16:23:45 +00:00
|
|
|
PalEntry _mapSavedPal[PAL_ENTRIES];
|
2005-07-03 20:02:56 +00:00
|
|
|
bool _mapPanelCrossHairState;
|
2005-10-17 03:28:21 +00:00
|
|
|
|
|
|
|
int32 _protectHash;
|
2004-08-06 01:39:17 +00:00
|
|
|
};
|
2004-04-12 21:40:49 +00:00
|
|
|
|
|
|
|
} // End of namespace Saga
|
|
|
|
|
2006-07-23 15:16:50 +00:00
|
|
|
#endif
|