diff options
| author | David Eriksson | 2003-11-09 14:16:46 +0000 | 
|---|---|---|
| committer | David Eriksson | 2003-11-09 14:16:46 +0000 | 
| commit | 79f84425dd3abc7239531b1c9ef1ccc155703a8b (patch) | |
| tree | f900107bc4b571d8f089d35a5163df227a1386ab | |
| parent | 1d3d581879eefc6cd7de7044e62988212a003a40 (diff) | |
| download | scummvm-rg350-79f84425dd3abc7239531b1c9ef1ccc155703a8b.tar.gz scummvm-rg350-79f84425dd3abc7239531b1c9ef1ccc155703a8b.tar.bz2 scummvm-rg350-79f84425dd3abc7239531b1c9ef1ccc155703a8b.zip  | |
Moved _talkSelected to Logic.
svn-id: r11226
| -rw-r--r-- | queen/logic.cpp | 1 | ||||
| -rw-r--r-- | queen/logic.h | 7 | ||||
| -rw-r--r-- | queen/structs.h | 5 | ||||
| -rw-r--r-- | queen/talk.cpp | 7 | ||||
| -rw-r--r-- | queen/talk.h | 10 | ||||
| -rw-r--r-- | queen/xref.txt | 2 | 
6 files changed, 15 insertions, 17 deletions
diff --git a/queen/logic.cpp b/queen/logic.cpp index 3ee9c85cea..761766fff1 100644 --- a/queen/logic.cpp +++ b/queen/logic.cpp @@ -184,6 +184,7 @@ Logic::Logic(Resource *resource, Graphics *graphics, Display *theDisplay, Input  	_walk = new Walk(this, _graphics);  	_cmd = new Command(this, _graphics, _input, _walk);  	memset(_gameState, 0, sizeof(_gameState)); +	memset(_talkSelected, 0, sizeof(_talkSelected));  	initialise();  } diff --git a/queen/logic.h b/queen/logic.h index b5758a52de..e97a8782a5 100644 --- a/queen/logic.h +++ b/queen/logic.h @@ -184,6 +184,8 @@ public:  	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 @@ public:  		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 @@ protected:  	} _joe;  	int16 _gameState[GAME_STATE_COUNT]; + +	TalkSelected _talkSelected[TALK_SELECTED_COUNT];  	//! Number of animated furniture in current room (FMAXA)  	uint16 _numFurnitureAnimated; diff --git a/queen/structs.h b/queen/structs.h index 08f7bfcf55..289ad7874e 100644 --- a/queen/structs.h +++ b/queen/structs.h @@ -509,6 +509,11 @@ struct Person {  }; +struct TalkSelected { +	int16 hasTalkedTo; +	int16 values[4]; +}; +  } // End of namespace Queen diff --git a/queen/talk.cpp b/queen/talk.cpp index 15e6306df8..8357245f26 100644 --- a/queen/talk.cpp +++ b/queen/talk.cpp @@ -77,9 +77,6 @@ Talk::Talk(  	_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 @@ byte *Talk::getString(byte *ptr, char *str, int maxLength, int align) {  	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]) { diff --git a/queen/talk.h b/queen/talk.h index 9946751ff7..b70446df5d 100644 --- a/queen/talk.h +++ b/queen/talk.h @@ -68,7 +68,6 @@ private:  	  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 @@ private:  		SPEAK_NONE         = -9  	}; -	//! TODO Move this to struct.h later! -	struct TalkSelected { -		int16 hasTalkedTo; -		int16 values[4]; -	}; -  	struct DialogueNode {  		int16 head;  		int16 dialogueNodeValue1; @@ -158,9 +151,6 @@ private:  	//! 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]; diff --git a/queen/xref.txt b/queen/xref.txt index da46b202d0..005ee4997d 100644 --- a/queen/xref.txt +++ b/queen/xref.txt @@ -372,7 +372,7 @@ PKEYstr  TALKHEAD  TALKQUIT  TALKstr -TALK_SELECTED +TALK_SELECTED				Logic::_talkSelected  TEXTS  | 
