[Scummvm-cvs-logs] CVS: scummvm/queen logic.cpp,1.85,1.86 logic.h,1.62,1.63 structs.h,1.20,1.21 talk.cpp,1.34,1.35 talk.h,1.19,1.20 xref.txt,1.34,1.35

David Eriksson twogood at users.sourceforge.net
Sun Nov 9 06:17:20 CET 2003


Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1:/tmp/cvs-serv17675/queen

Modified Files:
	logic.cpp logic.h structs.h talk.cpp talk.h xref.txt 
Log Message:
Moved _talkSelected to Logic.


Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/logic.cpp,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -d -r1.85 -r1.86
--- logic.cpp	8 Nov 2003 23:45:45 -0000	1.85
+++ logic.cpp	9 Nov 2003 14:16:46 -0000	1.86
@@ -184,6 +184,7 @@
 	_walk = new Walk(this, _graphics);
 	_cmd = new Command(this, _graphics, _input, _walk);
 	memset(_gameState, 0, sizeof(_gameState));
+	memset(_talkSelected, 0, sizeof(_talkSelected));
 	initialise();
 }
 

Index: logic.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/logic.h,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- logic.h	8 Nov 2003 23:45:45 -0000	1.62
+++ logic.h	9 Nov 2003 14:16:46 -0000	1.63
@@ -184,6 +184,8 @@
 	int16 gameState(int index);
 	void gameState(int index, int16 newValue);
 
+	TalkSelected *talkSelected(int index) { return _talkSelected + index; }
+
 	const char *roomName(uint16 roomNum) const { 
 		if (roomNum >= 1 && roomNum <= _numRooms)
 			return _roomName[roomNum];
@@ -299,7 +301,8 @@
 		MAX_AREAS_NUMBER   = 11,
 		JOE_RESPONSE_MAX   = 40,
 		DEFAULT_TALK_SPEED = 7,
-		GAME_STATE_COUNT   = 211
+		GAME_STATE_COUNT   = 211,
+		TALK_SELECTED_COUNT = 86
 	};
 
 	static Common::RandomSource randomizer;
@@ -400,6 +403,8 @@
 	} _joe;
 	
 	int16 _gameState[GAME_STATE_COUNT];
+
+	TalkSelected _talkSelected[TALK_SELECTED_COUNT];
 	
 	//! Number of animated furniture in current room (FMAXA)
 	uint16 _numFurnitureAnimated;

Index: structs.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/structs.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- structs.h	7 Nov 2003 10:57:21 -0000	1.20
+++ structs.h	9 Nov 2003 14:16:46 -0000	1.21
@@ -509,6 +509,11 @@
 };
 
 
+struct TalkSelected {
+	int16 hasTalkedTo;
+	int16 values[4];
+};
+
 
 } // End of namespace Queen
 

Index: talk.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/talk.cpp,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- talk.cpp	8 Nov 2003 23:45:45 -0000	1.34
+++ talk.cpp	9 Nov 2003 14:16:46 -0000	1.35
@@ -77,9 +77,6 @@
 	_graphics(graphics), _input(input), _logic(logic), _resource(resource), 
 	_sound(sound), _fileData(NULL) {
 
-	//! TODO Move this to the Logic class later!
-	memset(_talkSelected, 0, sizeof(_talkSelected));
-
 	_input->talkQuitReset();
 }
 
@@ -1167,8 +1164,8 @@
 	return ptr;
 }
 
-Talk::TalkSelected *Talk::talkSelected() {
-	return _talkSelected + _uniqueKey;
+TalkSelected *Talk::talkSelected() {
+	return _logic->talkSelected(_uniqueKey);
 }
 
 int Talk::splitOption(const char *str, char optionText[5][MAX_STRING_SIZE]) {

Index: talk.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/talk.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- talk.h	8 Nov 2003 23:45:45 -0000	1.19
+++ talk.h	9 Nov 2003 14:16:46 -0000	1.20
@@ -68,7 +68,6 @@
 	  MAX_STRING_SIZE = (MAX_STRING_LENGTH + 1),
 	  MAX_TEXT_WIDTH = (320-18),
 	  PUSHUP = 4,
-	  TALK_SELECTED_COUNT = 86,
 	  ARROW_BOB_UP = 62,
 	  ARROW_BOB_DOWN = 63,
 	  ARROW_ZONE_UP   = 5,
@@ -89,12 +88,6 @@
 		SPEAK_NONE         = -9
 	};
 
-	//! TODO Move this to struct.h later!
-	struct TalkSelected {
-		int16 hasTalkedTo;
-		int16 values[4];
-	};
-
 	struct DialogueNode {
 		int16 head;
 		int16 dialogueNodeValue1;
@@ -157,9 +150,6 @@
 
 	//! IDs for sentences
 	DialogueNode _dialogueTree[18][6];
-
-	//! TODO Move this to the Logic class later!
-	TalkSelected _talkSelected[TALK_SELECTED_COUNT];
 
 	//! Greeting from person Joe has talked to before
 	char _person2String[MAX_STRING_SIZE];

Index: xref.txt
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/xref.txt,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- xref.txt	8 Nov 2003 11:32:32 -0000	1.34
+++ xref.txt	9 Nov 2003 14:16:46 -0000	1.35
@@ -372,7 +372,7 @@
 TALKHEAD
 TALKQUIT
 TALKstr
-TALK_SELECTED
+TALK_SELECTED				Logic::_talkSelected
 
 
 TEXTS





More information about the Scummvm-git-logs mailing list