[Scummvm-cvs-logs] CVS: scummvm/sky logic.cpp,1.42,1.43 text.h,1.14,1.15

Oliver Kiehl olki at users.sourceforge.net
Mon May 26 06:29:05 CEST 2003


Update of /cvsroot/scummvm/scummvm/sky
In directory sc8-pr-cvs1:/tmp/cvs-serv20859

Modified Files:
	logic.cpp text.h 
Log Message:
some random additions


Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/logic.cpp,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- logic.cpp	25 May 2003 22:19:00 -0000	1.42
+++ logic.cpp	26 May 2003 13:28:42 -0000	1.43
@@ -416,11 +416,38 @@
 }
 
 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 @@
 	if (!_scriptVariables[MOUSE_STOP]) {
 		_scriptVariables[MOUSE_STOP] &= 1;
 		runGetOff();
-		fnBlankMouse(a, b, c);
+		fnBlankMouse(0, 0, 0);
 	}
 	return 1;
 }
@@ -1859,8 +1886,9 @@
 	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) {

Index: text.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/text.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- text.h	17 May 2003 20:04:05 -0000	1.14
+++ text.h	26 May 2003 13:28:43 -0000	1.15
@@ -39,10 +39,10 @@
 	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();
 





More information about the Scummvm-git-logs mailing list