[Scummvm-cvs-logs] SF.net SVN: scummvm: [32176] scummvm/trunk/engines/kyra

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Sun May 18 23:11:20 CEST 2008


Revision: 32176
          http://scummvm.svn.sourceforge.net/scummvm/?rev=32176&view=rev
Author:   lordhoto
Date:     2008-05-18 14:11:19 -0700 (Sun, 18 May 2008)

Log Message:
-----------
Cleanup.

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/kyra_lok.h
    scummvm/trunk/engines/kyra/kyra_mr.cpp
    scummvm/trunk/engines/kyra/kyra_v1.h
    scummvm/trunk/engines/kyra/kyra_v2.cpp
    scummvm/trunk/engines/kyra/kyra_v2.h
    scummvm/trunk/engines/kyra/scene_lok.cpp
    scummvm/trunk/engines/kyra/staticres.cpp

Modified: scummvm/trunk/engines/kyra/kyra_lok.h
===================================================================
--- scummvm/trunk/engines/kyra/kyra_lok.h	2008-05-18 20:14:28 UTC (rev 32175)
+++ scummvm/trunk/engines/kyra/kyra_lok.h	2008-05-18 21:11:19 UTC (rev 32176)
@@ -628,9 +628,6 @@
 	int _cdaTrackTableSize;
 	const AudioDataStruct * _soundData;
 
-	static const int8 _charXPosTable[];
-	static const int8 _charYPosTable[];
-
 	// positions of the inventory
 	static const uint16 _itemPosX[];
 	static const uint8 _itemPosY[];

Modified: scummvm/trunk/engines/kyra/kyra_mr.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra_mr.cpp	2008-05-18 20:14:28 UTC (rev 32175)
+++ scummvm/trunk/engines/kyra/kyra_mr.cpp	2008-05-18 21:11:19 UTC (rev 32176)
@@ -411,8 +411,6 @@
 void KyraEngine_MR::snd_playWanderScoreViaMap(int track, int force) {
 	debugC(9, kDebugLevelMain, "KyraEngine_MR::snd_playWanderScoreViaMap(%d, %d)", track, force);
 
-	// XXX byte_3C87C compare
-
 	if (_musicSoundChannel != -1 && !_soundDigital->isPlaying(_musicSoundChannel))
 		force = 1;
 	else if (_musicSoundChannel == -1)

Modified: scummvm/trunk/engines/kyra/kyra_v1.h
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v1.h	2008-05-18 20:14:28 UTC (rev 32175)
+++ scummvm/trunk/engines/kyra/kyra_v1.h	2008-05-18 21:11:19 UTC (rev 32176)
@@ -263,6 +263,11 @@
 	static const int8 _addXPosTable[];
 	static const int8 _addYPosTable[];
 
+	// Character
+	
+	static const int8 _charAddXPosTable[];
+	static const int8 _charAddYPosTable[];
+
 	// save/load
 	int _gameToLoad;
 

Modified: scummvm/trunk/engines/kyra/kyra_v2.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v2.cpp	2008-05-18 20:14:28 UTC (rev 32175)
+++ scummvm/trunk/engines/kyra/kyra_v2.cpp	2008-05-18 21:11:19 UTC (rev 32176)
@@ -326,8 +326,8 @@
 	debugC(9, kDebugLevelMain, "KyraEngine_v2::updateCharPos(%p, %d)", (const void*)table, force);
 	if (_updateCharPosNextUpdate > _system->getMillis() && !force)
 		return 0;
-	_mainCharacter.x1 += _updateCharPosXTable[_mainCharacter.facing];
-	_mainCharacter.y1 += _updateCharPosYTable[_mainCharacter.facing];
+	_mainCharacter.x1 += _charAddXPosTable[_mainCharacter.facing];
+	_mainCharacter.y1 += _charAddYPosTable[_mainCharacter.facing];
 	updateCharAnimFrame(0, table);
 	_updateCharPosNextUpdate = _system->getMillis() + getCharacterWalkspeed() * _tickLength;
 	return 1;

Modified: scummvm/trunk/engines/kyra/kyra_v2.h
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v2.h	2008-05-18 20:14:28 UTC (rev 32175)
+++ scummvm/trunk/engines/kyra/kyra_v2.h	2008-05-18 21:11:19 UTC (rev 32176)
@@ -355,8 +355,6 @@
 	void updateCharPosWithUpdate();
 
 	uint32 _updateCharPosNextUpdate;
-	static const int8 _updateCharPosXTable[];
-	static const int8 _updateCharPosYTable[];
 
 	virtual int getCharacterWalkspeed() const = 0;
 	virtual void updateCharAnimFrame(int num, int *table) = 0;

Modified: scummvm/trunk/engines/kyra/scene_lok.cpp
===================================================================
--- scummvm/trunk/engines/kyra/scene_lok.cpp	2008-05-18 20:14:28 UTC (rev 32175)
+++ scummvm/trunk/engines/kyra/scene_lok.cpp	2008-05-18 21:11:19 UTC (rev 32176)
@@ -295,13 +295,13 @@
 	debugC(9, kDebugLevelMain, "KyraEngine_LoK::setCharacterPosition(%d, %p)", character, (const void *)facingTable);
 
 	if (character == 0) {
-		_currentCharacter->x1 += _charXPosTable[_currentCharacter->facing];
-		_currentCharacter->y1 += _charYPosTable[_currentCharacter->facing];
+		_currentCharacter->x1 += _charAddXPosTable[_currentCharacter->facing];
+		_currentCharacter->y1 += _charAddYPosTable[_currentCharacter->facing];
 		setCharacterPositionHelper(0, facingTable);
 		return 1;
 	} else {
-		_characterList[character].x1 += _charXPosTable[_characterList[character].facing];
-		_characterList[character].y1 += _charYPosTable[_characterList[character].facing];
+		_characterList[character].x1 += _charAddXPosTable[_characterList[character].facing];
+		_characterList[character].y1 += _charAddYPosTable[_characterList[character].facing];
 		if (_characterList[character].sceneId == _currentCharacter->sceneId)
 			setCharacterPositionHelper(character, 0);
 	}
@@ -1009,8 +1009,8 @@
 			return 0;
 	}
 
-	int xpos = _charXPosTable[facing] + _currentCharacter->x1;
-	int ypos = _charYPosTable[facing] + _currentCharacter->y1;
+	int xpos = _charAddXPosTable[facing] + _currentCharacter->x1;
+	int ypos = _charAddYPosTable[facing] + _currentCharacter->y1;
 
 	if (xpos >= 12 && xpos <= 308) {
 		if (!lineIsPassable(xpos, ypos))

Modified: scummvm/trunk/engines/kyra/staticres.cpp
===================================================================
--- scummvm/trunk/engines/kyra/staticres.cpp	2008-05-18 20:14:28 UTC (rev 32175)
+++ scummvm/trunk/engines/kyra/staticres.cpp	2008-05-18 21:11:19 UTC (rev 32176)
@@ -1281,7 +1281,7 @@
 		&KyraEngine_HoF::seq_introLibrary2, &KyraEngine_HoF::seq_introLibrary2,
 		&KyraEngine_HoF::seq_introMarco, &KyraEngine_HoF::seq_introHand1a,
 		&KyraEngine_HoF::seq_introHand1b, &KyraEngine_HoF::seq_introHand1c,
-		&KyraEngine_HoF::seq_introHand2,	&KyraEngine_HoF::seq_introHand3, 0
+		&KyraEngine_HoF::seq_introHand2, &KyraEngine_HoF::seq_introHand3, 0
 	};
 
 	static const SeqProc hofDemoSequenceCallbacks[] = {
@@ -1363,11 +1363,11 @@
 	 0, -2, -2, -2,  0,  2,  2,  2
 };
 
-const int8 KyraEngine_LoK::_charXPosTable[] = {
+const int8 KyraEngine_v1::_charAddXPosTable[] = {
 	 0,  4,  4,  4,  0, -4, -4, -4
 };
 
-const int8 KyraEngine_LoK::_charYPosTable[] = {
+const int8 KyraEngine_v1::_charAddYPosTable[] = {
 	-2, -2,  0,  2,  2,  2,  0, -2
 };
 
@@ -1534,14 +1534,6 @@
 
 // kyra engine v2 static data
 
-const int8 KyraEngine_v2::_updateCharPosXTable[] = {
-	0, 4, 4, 4, 0, -4, -4, -4
-};
-
-const int8 KyraEngine_v2::_updateCharPosYTable[] = {
-	-2, -2, 0, 2, 2, 2, 0, -2
-};
-
 const int GUI_v2::_sliderBarsPosition[] = {
 	0x92, 0x1F, 0x92, 0x30, 0x92, 0x41, 0x92, 0x52
 };


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list