aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Kiehl2003-05-26 13:28:43 +0000
committerOliver Kiehl2003-05-26 13:28:43 +0000
commita93917e4c5eaa8dbf849710f239e15b793a6f197 (patch)
treed0fa35402d038271cdcb2cfd7f9c4ea46ffee662
parent8eec984eb7aecf0afeff116e82acaefcdd377d3b (diff)
downloadscummvm-rg350-a93917e4c5eaa8dbf849710f239e15b793a6f197.tar.gz
scummvm-rg350-a93917e4c5eaa8dbf849710f239e15b793a6f197.tar.bz2
scummvm-rg350-a93917e4c5eaa8dbf849710f239e15b793a6f197.zip
some random additions
svn-id: r8003
-rw-r--r--sky/logic.cpp38
-rw-r--r--sky/text.h2
2 files changed, 34 insertions, 6 deletions
diff --git a/sky/logic.cpp b/sky/logic.cpp
index 54430b6651..3009f63288 100644
--- a/sky/logic.cpp
+++ b/sky/logic.cpp
@@ -416,11 +416,38 @@ void SkyLogic::listen() {
}
void SkyLogic::stopped() {
- error("Stub: SkyLogic::stopped");
+ // waiting for another mega to move or give-up trying
+
+ // this mode will always be set up from a special script
+ // that will be one level higher than the script we
+ // would wish to restart from
+
+ Compact *cpt = SkyState::fetchCompact(_compact->extCompact->waitingFor);
+
+ if (!cpt->mood && collide(cpt))
+ return;
+
+ // we are free, continue processing the script
+
+ // restart script one level below
+ *(uint16 *)SkyCompact::getCompactElem(_compact, C_BASE_SUB + _compact->mode - 2) = 0;
+ _compact->extCompact->waitingFor = 0xffff;
+
+ _compact->logic = L_SCRIPT;
+ logicScript();
}
void SkyLogic::choose() {
- error("Stub: SkyLogic::choose");
+ // Remain in this mode until player selects some text
+ if (!_scriptVariables[THE_CHOSEN_ONE])
+ return;
+
+ fnNoHuman(0, 0, 0); // kill mouse again
+
+ // system_flags &= ~(1 << SF_CHOOSING); // restore save/restore
+
+ _compact->logic = L_SCRIPT; // and continue script
+ logicScript();
}
void SkyLogic::frames() {
@@ -1289,7 +1316,7 @@ uint32 SkyLogic::fnNoHuman(uint32 a, uint32 b, uint32 c) {
if (!_scriptVariables[MOUSE_STOP]) {
_scriptVariables[MOUSE_STOP] &= 1;
runGetOff();
- fnBlankMouse(a, b, c);
+ fnBlankMouse(0, 0, 0);
}
return 1;
}
@@ -1859,8 +1886,9 @@ uint32 SkyLogic::fnTextKill2(uint32 a, uint32 b, uint32 c) {
return 1;
}
-uint32 SkyLogic::fnSetFont(uint32 a, uint32 b, uint32 c) {
- error("Stub: fnSetFont");
+uint32 SkyLogic::fnSetFont(uint32 font, uint32 b, uint32 c) {
+ _skyText->fnSetFont(font);
+ return 1;
}
uint32 SkyLogic::fnStartFx(uint32 a, uint32 b, uint32 c) {
diff --git a/sky/text.h b/sky/text.h
index 672bfeb331..bdd959b9b2 100644
--- a/sky/text.h
+++ b/sky/text.h
@@ -39,10 +39,10 @@ public:
struct displayText_t displayText(char *textPtr, uint8 *dest, bool centre, uint16 pixelWidth, uint8 color);
void makeGameCharacter(char textChar, uint8 *charSetPtr, uint8 *&data, uint8 color);
struct lowTextManager_t lowTextManager(uint32 textNum, uint16 width, uint16 logicNum, uint8 color, bool centre);
+ void fnSetFont(uint32 fontNr);
protected:
bool getTBit();
- void fnSetFont(uint32 fontNr);
void initHuffTree();
char getTextChar();