aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2016-01-15 21:01:30 +0100
committerEugene Sandulenko2016-02-14 17:12:46 +0100
commit43df45d610aa2014f07d1f0307365627fc61ef8e (patch)
tree4481da4c0e50d2c607d00641d94251e831a7aba9
parentc3824f40bac45571032652be2b18a34d9633530a (diff)
downloadscummvm-rg350-43df45d610aa2014f07d1f0307365627fc61ef8e.tar.gz
scummvm-rg350-43df45d610aa2014f07d1f0307365627fc61ef8e.tar.bz2
scummvm-rg350-43df45d610aa2014f07d1f0307365627fc61ef8e.zip
WAGE: Implement handleRestCommand
-rw-r--r--engines/wage/entities.cpp3
-rw-r--r--engines/wage/entities.h1
-rw-r--r--engines/wage/script.cpp8
-rw-r--r--engines/wage/wage.h5
4 files changed, 13 insertions, 4 deletions
diff --git a/engines/wage/entities.cpp b/engines/wage/entities.cpp
index 8472e7844b..e229daf2fb 100644
--- a/engines/wage/entities.cpp
+++ b/engines/wage/entities.cpp
@@ -439,5 +439,8 @@ const char *Chr::getDefiniteArticle(bool capitalize) {
return "";
}
+void Chr::printPlayerCondition() {
+ warning("STUB: printPlayerCondition()");
+}
} // End of namespace Wage
diff --git a/engines/wage/entities.h b/engines/wage/entities.h
index 6a97abf39e..0a3fa28e9f 100644
--- a/engines/wage/entities.h
+++ b/engines/wage/entities.h
@@ -222,6 +222,7 @@ public:
WeaponArray *getWeapons(bool includeMagic);
ObjArray *getMagicalObjects();
const char *getDefiniteArticle(bool capitalize);
+ void printPlayerCondition();
public:
bool hasNativeWeapon1() {
diff --git a/engines/wage/script.cpp b/engines/wage/script.cpp
index 48e01c029f..0b38f37579 100644
--- a/engines/wage/script.cpp
+++ b/engines/wage/script.cpp
@@ -1034,7 +1034,13 @@ void Script::handleStatusCommand() {
}
void Script::handleRestCommand() {
- warning("STUB: handleRestCommand");
+ if (_callbacks->getMonster() != NULL) {
+ appendText("This is no time to rest!");
+ _callbacks->_commandWasQuick = true;
+ } else {
+ _callbacks->regen();
+ _world->_player->printPlayerCondition();
+ }
}
void Script::handleAcceptCommand() {
diff --git a/engines/wage/wage.h b/engines/wage/wage.h
index 2eb9803695..10541b3c12 100644
--- a/engines/wage/wage.h
+++ b/engines/wage/wage.h
@@ -120,13 +120,13 @@ public:
const char *getGameFile() const;
void processTurn(Common::String *textInput, Designed *clickInput);
+ void regen();
private:
bool loadWorld(Common::MacResManager *resMan);
void performInitialSetup();
void wearObjs(Chr *chr);
void processTurnInternal(Common::String *textInput, Designed *clickInput);
- void regen();
void performCombatAction(Chr *npc, Chr *player);
int getValidMoveDirections(Chr *npc);
void performAttack(Chr *attacker, Chr *victim, Weapon *weapon);
@@ -150,6 +150,7 @@ public:
int _aim;
bool _temporarilyHidden;
bool _isGameOver;
+ bool _commandWasQuick;
Common::String _inputText;
@@ -172,8 +173,6 @@ private:
Common::MacResManager *_resManager;
- bool _commandWasQuick;
-
bool _shouldQuit;
};