[Scummvm-cvs-logs] SF.net SVN: scummvm: [27580] scummvm/trunk/engines/agos

Kirben at users.sourceforge.net Kirben at users.sourceforge.net
Thu Jun 21 08:37:04 CEST 2007


Revision: 27580
          http://scummvm.svn.sourceforge.net/scummvm/?rev=27580&view=rev
Author:   Kirben
Date:     2007-06-20 23:37:00 -0700 (Wed, 20 Jun 2007)

Log Message:
-----------
Minor cleanup.

Modified Paths:
--------------
    scummvm/trunk/engines/agos/agos.cpp
    scummvm/trunk/engines/agos/agos.h
    scummvm/trunk/engines/agos/draw.cpp
    scummvm/trunk/engines/agos/event.cpp
    scummvm/trunk/engines/agos/res.cpp
    scummvm/trunk/engines/agos/res_snd.cpp
    scummvm/trunk/engines/agos/rooms.cpp
    scummvm/trunk/engines/agos/script.cpp
    scummvm/trunk/engines/agos/script_ff.cpp
    scummvm/trunk/engines/agos/script_s1.cpp
    scummvm/trunk/engines/agos/string.cpp
    scummvm/trunk/engines/agos/subroutine.cpp
    scummvm/trunk/engines/agos/vga.cpp
    scummvm/trunk/engines/agos/vga_e2.cpp
    scummvm/trunk/engines/agos/window.cpp
    scummvm/trunk/engines/agos/zones.cpp

Modified: scummvm/trunk/engines/agos/agos.cpp
===================================================================
--- scummvm/trunk/engines/agos/agos.cpp	2007-06-21 05:26:47 UTC (rev 27579)
+++ scummvm/trunk/engines/agos/agos.cpp	2007-06-21 06:37:00 UTC (rev 27580)
@@ -202,11 +202,9 @@
 	_litBoxFlag = 0;
 	_mortalFlag = 0;
 	_displayScreen = false;
-	_updateScreen = false;
 	_syncFlag2 = 0;
 	_inCallBack = 0;
 	_cepeFlag = 0;
-	_copyPartialMode = 0;
 	_fastMode = 0;
 	
 	_backFlag = 0;

Modified: scummvm/trunk/engines/agos/agos.h
===================================================================
--- scummvm/trunk/engines/agos/agos.h	2007-06-21 05:26:47 UTC (rev 27579)
+++ scummvm/trunk/engines/agos/agos.h	2007-06-21 06:37:00 UTC (rev 27580)
@@ -171,7 +171,7 @@
 
 	void setupVgaOpcodes();
 	VgaOpcodeProc _vga_opcode_table[100];
-	uint _numVideoOpcodes;
+	uint8 _numVideoOpcodes;
 
 	virtual void setupVideoOpcodes(VgaOpcodeProc *op);
 
@@ -189,7 +189,7 @@
 	const char *getFileName(int type) const;
 
 protected:
-	void playSting(uint a);
+	void playSting(uint16 a);
 
 	const byte *_vcPtr;								/* video code ptr */
 	uint16 _vc_get_out_of_code;
@@ -197,21 +197,23 @@
 
 	uint32 *_gameOffsetsPtr;
 
-	uint _numMusic, _numSFX, _numSpeech;
-	uint _numBitArray1, _numBitArray2, _numBitArray3;
-	uint _numItemStore, _numVars;
-	uint _vgaBaseDelay;
-	uint _vgaPeriod;
+	uint8 _numMusic, _numSFX;
+	uint16 _numSpeech;
 
-	uint _musicIndexBase;
-	uint _soundIndexBase;
-	uint _tableIndexBase;
-	uint _textIndexBase;
+	uint8 _numBitArray1, _numBitArray2, _numBitArray3, _numItemStore;
+	uint16 _numVars;
 
-	uint _itemMemSize;
-	uint _tableMemSize;
-	uint _vgaMemSize;
+	uint8 _vgaBaseDelay, _vgaPeriod;
 
+	uint16 _musicIndexBase;
+	uint16 _soundIndexBase;
+	uint16 _tableIndexBase;
+	uint16 _textIndexBase;
+
+	uint32 _itemMemSize;
+	uint32 _tableMemSize;
+	uint32 _vgaMemSize;
+
 	const GameSpecificSettings *gss;
 
 	byte _keyPressed;
@@ -259,9 +261,9 @@
 	Subroutine *_subroutineList;
 	uint _subroutine;
 
-	uint _dxSurfacePitch;
+	uint16 _dxSurfacePitch;
 
-	uint _recursionDepth;
+	uint8 _recursionDepth;
 
 	uint32 _lastVgaTick;
 
@@ -277,14 +279,10 @@
 	bool _litBoxFlag;
 	bool _mortalFlag;
 	bool _displayScreen;
-	bool _updateScreen;
 	bool _syncFlag2;
 	bool _inCallBack;
 	bool _cepeFlag;
-	byte _copyPartialMode;
 	bool _fastMode;
-	bool _useBackGround;
-
 	bool _backFlag;
 
 	uint16 _debugMode;
@@ -323,8 +321,8 @@
 
 	int _agosMenu;
 	byte _textMenu[10];
-	uint _currentRoom, _superRoomNumber;
-	uint _wallOn;
+	uint16 _currentRoom, _superRoomNumber;
+	uint8 _wallOn;
 
 	uint16 _hyperLink, _newLines;
  	uint16 _oracleMaxScrollY, _noOracleScroll;
@@ -445,7 +443,7 @@
 	int16 _baseY;
 	float _scale;
 	Common::Rect _feebleRect;
-	int _scaleX, _scaleY, _scaleWidth, _scaleHeight;
+	int16 _scaleX, _scaleY, _scaleWidth, _scaleHeight;
 
 	VgaTimerEntry *_nextVgaTimerToProcess;
 
@@ -505,9 +503,9 @@
 	byte _videoBuf1[32000];
 	uint16 _videoWindows[128];
 
-	uint16 _window3Flag;
-	uint16 _window4Flag;
-	uint16 _window6Flag;
+	uint8 _window3Flag;
+	uint8 _window4Flag;
+	uint8 _window6Flag;
 	byte *_window4BackScn;
 	byte *_window6BackScn;
 
@@ -603,7 +601,7 @@
 	void allocItemHeap();
 	void allocTablesHeap();
 
-	Subroutine *createSubroutine(uint a);
+	Subroutine *createSubroutine(uint16 a);
 	void readSubroutine(Common::SeekableReadStream *in, Subroutine *sub);
 	SubroutineLine *createSubroutineLine(Subroutine *sub, int a);
 	void readSubroutineLine(Common::SeekableReadStream *in, SubroutineLine *new_table, Subroutine *sub);
@@ -634,9 +632,9 @@
 	uint getVarWrapper();
 	uint getVarOrWord();
 	uint getVarOrByte();
-	uint readVariable(uint variable);
+	uint readVariable(uint16 variable);
 	void writeNextVarContents(uint16 contents);
-	void writeVariable(uint variable, uint16 contents);
+	void writeVariable(uint16 variable, uint16 contents);
 
 	Item *derefItem(uint item);
 	Item *getNextItemPtr();
@@ -647,11 +645,11 @@
 	Item *actor();
 
 	void showMessageFormat(const char *s, ...);
-	const byte *getStringPtrByID(uint stringId);
-	const byte *getLocalStringByID(uint stringId);
+	const byte *getStringPtrByID(uint16 stringId);
+	const byte *getLocalStringByID(uint16 stringId);
 	uint getNextStringID();
 
-	void addTimeEvent(uint timeout, uint subroutine_id);
+	void addTimeEvent(uint16 timeout, uint16 subroutine_id);
 	void delTimeEvent(TimeEvent *te);
 
 	Item *findInByClass(Item *i, int16 m);
@@ -735,11 +733,11 @@
 	void mouseOff();
 	void mouseOn();
 
-	bool loadRoomItems(uint item);
+	bool loadRoomItems(uint16 item);
 
-	virtual bool loadTablesIntoMem(uint subr_id);
-	bool loadXTablesIntoMem(uint subr_id);
-	void loadTextIntoMem(uint stringId);
+	virtual bool loadTablesIntoMem(uint16 subr_id);
+	bool loadXTablesIntoMem(uint16 subr_id);
+	void loadTextIntoMem(uint16 stringId);
 
 	uint loadTextFile(const char *filename, byte *dst);
 	Common::File *openTablesFile(const char *filename);
@@ -808,7 +806,7 @@
 	void justifyStart();
 	void justifyOutPut(byte chr);
 
-	void loadZone(uint zoneNum);
+	void loadZone(uint16 zoneNum);
 
 	void animate(uint16 windowNum, uint16 zoneNum, uint16 vgaSpriteId, int16 x, int16 y, uint16 palette, bool vgaScript = false);
 	void setImage(uint16 vga_res_id, bool vgaScript = false);
@@ -1089,10 +1087,10 @@
 	void checkScrollY(int16 y, int16 ypos);
 	void centreScroll();
 
-	void clearVideoWindow(uint windowNum, uint color);
-	void clearVideoBackGround(uint windowNum, uint color);
+	void clearVideoWindow(uint16 windowNum, uint16 color);
+	void clearVideoBackGround(uint16 windowNum, uint16 color);
 
-	void setPaletteSlot(uint srcOffs, uint dstOffs);
+	void setPaletteSlot(uint16 srcOffs, uint8 dstOffs);
 	void checkWaitEndTable();
 
 	void startOverlayAnims();
@@ -1127,7 +1125,7 @@
 	void colorBlock(WindowBlock *window, uint16 x, uint16 y, uint16 w, uint16 h);
 
 	void restoreWindow(WindowBlock *window);
-	void restoreBlock(uint h, uint w, uint y, uint x);
+	void restoreBlock(uint16 h, uint16 w, uint16 y, uint16 x);
 
 	byte *getBackBuf();
 	byte *getBackGround();
@@ -1136,9 +1134,9 @@
 	byte *convertImage(VC10_state *state, bool compressed);
 
 	bool decrunchFile(byte *src, byte *dst, uint32 size);
-	void loadVGABeardFile(uint id);
-	void loadVGAVideoFile(uint id, uint type);
-	bool loadVGASoundFile(uint id, uint type);
+	void loadVGABeardFile(uint16 id);
+	void loadVGAVideoFile(uint16 id, uint8 type);
+	bool loadVGASoundFile(uint16 id, uint8 type);
 
 	int init();
 	int go();
@@ -1195,8 +1193,8 @@
 	void windowScroll(WindowBlock *window);
 	void windowDrawChar(WindowBlock *window, uint x, uint y, byte chr);
 
-	void loadMusic(uint track);
-	void playModule(uint music);
+	void loadMusic(uint16 track);
+	void playModule(uint16 music);
 	virtual void playMusic(uint16 music, uint16 track);
 	void stopMusic();
 
@@ -1437,7 +1435,7 @@
 	virtual void addArrows(WindowBlock *window, uint8 num);
 	virtual uint setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *item_ptr);
 
-	virtual bool loadTablesIntoMem(uint subr_id);
+	virtual bool loadTablesIntoMem(uint16 subr_id);
 
 	virtual void moveDirn(Item *i, uint x);
 };

Modified: scummvm/trunk/engines/agos/draw.cpp
===================================================================
--- scummvm/trunk/engines/agos/draw.cpp	2007-06-21 05:26:47 UTC (rev 27579)
+++ scummvm/trunk/engines/agos/draw.cpp	2007-06-21 06:37:00 UTC (rev 27580)
@@ -36,7 +36,7 @@
 
 byte *AGOSEngine::getBackBuf() {
 	_dxSurfacePitch = _screenWidth;
-	return _useBackGround ? _backGroundBuf : _backBuf;
+	return _backBuf;
 }
 
 byte *AGOSEngine::getBackGround() {

Modified: scummvm/trunk/engines/agos/event.cpp
===================================================================
--- scummvm/trunk/engines/agos/event.cpp	2007-06-21 05:26:47 UTC (rev 27579)
+++ scummvm/trunk/engines/agos/event.cpp	2007-06-21 06:37:00 UTC (rev 27580)
@@ -40,7 +40,7 @@
 
 namespace AGOS {
 
-void AGOSEngine::addTimeEvent(uint timeout, uint subroutine_id) {
+void AGOSEngine::addTimeEvent(uint16 timeout, uint16 subroutine_id) {
 	TimeEvent *te = (TimeEvent *)malloc(sizeof(TimeEvent)), *first, *last = NULL;
 	time_t cur_time;
 

Modified: scummvm/trunk/engines/agos/res.cpp
===================================================================
--- scummvm/trunk/engines/agos/res.cpp	2007-06-21 05:26:47 UTC (rev 27579)
+++ scummvm/trunk/engines/agos/res.cpp	2007-06-21 06:37:00 UTC (rev 27580)
@@ -644,7 +644,7 @@
 #undef SD_TYPE_LITERAL
 #undef SD_TYPE_MATCH
 
-void AGOSEngine::loadVGABeardFile(uint id) {
+void AGOSEngine::loadVGABeardFile(uint16 id) {
 	uint32 offs, size;
 
 	if (getFeatures() & GF_OLD_BUNDLE) {
@@ -688,7 +688,7 @@
 	}
 }
 
-void AGOSEngine::loadVGAVideoFile(uint id, uint type) {
+void AGOSEngine::loadVGAVideoFile(uint16 id, uint8 type) {
 	File in;
 	char filename[15];
 	byte *dst;

Modified: scummvm/trunk/engines/agos/res_snd.cpp
===================================================================
--- scummvm/trunk/engines/agos/res_snd.cpp	2007-06-21 05:26:47 UTC (rev 27579)
+++ scummvm/trunk/engines/agos/res_snd.cpp	2007-06-21 06:37:00 UTC (rev 27580)
@@ -120,7 +120,7 @@
 	}
 }
 
-void AGOSEngine::loadMusic(uint music) {
+void AGOSEngine::loadMusic(uint16 music) {
 	char buf[4];
 
 	stopMusic();
@@ -139,7 +139,7 @@
 	_nextMusicToPlay = -1;
 }
 
-void AGOSEngine::playModule(uint music) {
+void AGOSEngine::playModule(uint16 music) {
 	char filename[15];
 	File f;
 
@@ -265,7 +265,7 @@
 	_mixer->stopHandle(_modHandle);
 }
 
-void AGOSEngine::playSting(uint a) {
+void AGOSEngine::playSting(uint16 soundId) {
 	if (!_midi._enable_sfx)
 		return;
 
@@ -279,13 +279,13 @@
 	if (!mus_file.isOpen())
 		error("playSting: Can't load sound effect from '%s'", filename);
 
-	mus_file.seek(a * 2, SEEK_SET);
+	mus_file.seek(soundId * 2, SEEK_SET);
 	mus_offset = mus_file.readUint16LE();
 	if (mus_file.ioFailed())
-		error("playSting: Can't read sting %d offset", a);
+		error("playSting: Can't read sting %d offset", soundId);
 
 	mus_file.seek(mus_offset, SEEK_SET);
-	_midi.loadSMF(&mus_file, a, true);
+	_midi.loadSMF(&mus_file, soundId, true);
 	_midi.startTrack(0);
 }
 
@@ -301,7 +301,7 @@
 	0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 };
 
-bool AGOSEngine::loadVGASoundFile(uint id, uint type) {
+bool AGOSEngine::loadVGASoundFile(uint16 id, uint8 type) {
 	File in;
 	char filename[15];
 	byte *dst;

Modified: scummvm/trunk/engines/agos/rooms.cpp
===================================================================
--- scummvm/trunk/engines/agos/rooms.cpp	2007-06-21 05:26:47 UTC (rev 27579)
+++ scummvm/trunk/engines/agos/rooms.cpp	2007-06-21 06:37:00 UTC (rev 27580)
@@ -351,7 +351,7 @@
 }
 
 // Waxworks specific
-bool AGOSEngine::loadRoomItems(uint item) {
+bool AGOSEngine::loadRoomItems(uint16 item) {
 	byte *p;
 	uint i, min_num, max_num;
 	char filename[30];

Modified: scummvm/trunk/engines/agos/script.cpp
===================================================================
--- scummvm/trunk/engines/agos/script.cpp	2007-06-21 05:26:47 UTC (rev 27579)
+++ scummvm/trunk/engines/agos/script.cpp	2007-06-21 06:37:00 UTC (rev 27580)
@@ -156,7 +156,7 @@
 
 void AGOSEngine::o_chance() {
 	// 23: chance
-	uint a = getVarOrWord();
+	int16 a = getVarOrWord();
 
 	if (a == 0) {
 		setScriptCondition(false);
@@ -173,7 +173,7 @@
 	if (a <= 0) {
 		_chanceModifier = 0;
 		setScriptCondition(false);
-	} else if ((uint)_rnd.getRandomNumber(99) < a) {
+	} else if ((int16)_rnd.getRandomNumber(99) < a) {
 		if (_chanceModifier <= 0)
 			_chanceModifier -= 5;
 		else
@@ -410,7 +410,7 @@
 
 void AGOSEngine::o_when() {
 	// 76: add timeout
-	uint timeout = getVarOrWord();
+	uint16 timeout = getVarOrWord();
 	addTimeEvent(timeout, getVarOrWord());
 }
 
@@ -894,7 +894,7 @@
 	return (uint16)readVariable(getVarWrapper());
 }
 
-uint AGOSEngine::readVariable(uint variable) {
+uint AGOSEngine::readVariable(uint16 variable) {
 	if (variable >= _numVars)
 		error("readVariable: Variable %d out of range", variable);
 
@@ -914,7 +914,7 @@
 	writeVariable(getVarWrapper(), contents);
 }
 
-void AGOSEngine::writeVariable(uint variable, uint16 contents) {
+void AGOSEngine::writeVariable(uint16 variable, uint16 contents) {
 	if (variable >= _numVars)
 		error("writeVariable: Variable %d out of range", variable);
 
@@ -1009,7 +1009,7 @@
 }
 
 void AGOSEngine::waitForSync(uint a) {
-	const uint maxCount = (getGameType() == GType_SIMON1) ? 500 : 1000;
+	const uint maxCount = (getGameType() == GType_SIMON1) ? 1000 : 2500;
 
 	if (getGameType() == GType_SIMON1 && (getFeatures() & GF_TALKIE)) {
 		if (a != 200) {

Modified: scummvm/trunk/engines/agos/script_ff.cpp
===================================================================
--- scummvm/trunk/engines/agos/script_ff.cpp	2007-06-21 05:26:47 UTC (rev 27579)
+++ scummvm/trunk/engines/agos/script_ff.cpp	2007-06-21 06:37:00 UTC (rev 27580)
@@ -303,7 +303,7 @@
 
 void AGOSEngine_Feeble::off_chance() {
 	// 23
-	uint a = getVarOrWord();
+	uint16 a = getVarOrWord();
 
 	if (a == 0) {
 		setScriptCondition(false);
@@ -315,7 +315,7 @@
 		return;
 	}
 
-	if ((uint)_rnd.getRandomNumber(99) < a)
+	if (_rnd.getRandomNumber(99) < a)
 		setScriptCondition(true);
 	else
 		setScriptCondition(false);
@@ -439,7 +439,7 @@
 
 void AGOSEngine_Feeble::off_checkCD() {
 	// 135: switch CD
-	uint disc = readVariable(97);
+	uint16 disc = readVariable(97);
 
 	if (!strcmp(getExtra(), "4CD")) {
 		_sound->switchVoiceFile(gss, disc);
@@ -624,10 +624,10 @@
 
 void AGOSEngine_Feeble::off_setColour() {
 	// 195: set palette colour
-	uint c = getVarOrByte() * 4;
-	uint r = getVarOrByte();
-	uint g = getVarOrByte();
-	uint b = getVarOrByte();
+	uint16 c = getVarOrByte() * 4;
+	uint8 r = getVarOrByte();
+	uint8 g = getVarOrByte();
+	uint8 b = getVarOrByte();
 
 	_displayPalette[c + 0] = r;
 	_displayPalette[c + 1] = g;
@@ -638,25 +638,25 @@
 
 void AGOSEngine_Feeble::off_b3Set() {
 	// 196: set bit3
-	uint bit = getVarOrByte();
+	uint8 bit = getVarOrByte();
 	_bitArrayThree[bit / 16] |= (1 << (bit & 15));
 }
 
 void AGOSEngine_Feeble::off_b3Clear() {
 	// 197: clear bit3
-	uint bit = getVarOrByte();
+	uint8 bit = getVarOrByte();
 	_bitArrayThree[bit / 16] &= ~(1 << (bit & 15));
 }
 
 void AGOSEngine_Feeble::off_b3Zero() {
 	// 198: is bit3 clear
-	uint bit = getVarOrByte();
+	uint8 bit = getVarOrByte();
 	setScriptCondition((_bitArrayThree[bit / 16] & (1 << (bit & 15))) == 0);
 }
 
 void AGOSEngine_Feeble::off_b3NotZero() {
 	// 199: is bit3 set
-	uint bit = getVarOrByte();
+	uint8 bit = getVarOrByte();
 	setScriptCondition((_bitArrayThree[bit / 16] & (1 << (bit & 15))) != 0);
 }
 

Modified: scummvm/trunk/engines/agos/script_s1.cpp
===================================================================
--- scummvm/trunk/engines/agos/script_s1.cpp	2007-06-21 05:26:47 UTC (rev 27579)
+++ scummvm/trunk/engines/agos/script_s1.cpp	2007-06-21 06:37:00 UTC (rev 27580)
@@ -406,7 +406,7 @@
 
 void AGOSEngine_Simon1::os1_playEffect() {
 	// 163: play sound
-	uint soundId = getVarOrWord();
+	uint16 soundId = getVarOrWord();
 
 	if (getGameId() == GID_SIMON1DOS)
 		playSting(soundId);

Modified: scummvm/trunk/engines/agos/string.cpp
===================================================================
--- scummvm/trunk/engines/agos/string.cpp	2007-06-21 05:26:47 UTC (rev 27579)
+++ scummvm/trunk/engines/agos/string.cpp	2007-06-21 06:37:00 UTC (rev 27580)
@@ -32,7 +32,7 @@
 
 namespace AGOS {
 
-const byte *AGOSEngine::getStringPtrByID(uint stringId) {
+const byte *AGOSEngine::getStringPtrByID(uint16 stringId) {
 	const byte *string_ptr;
 	byte *dst;
 
@@ -49,7 +49,7 @@
 	return dst;
 }
 
-const byte *AGOSEngine::getLocalStringByID(uint stringId) {
+const byte *AGOSEngine::getLocalStringByID(uint16 stringId) {
 	if (stringId < _stringIdLocalMin || stringId >= _stringIdLocalMax) {
 		loadTextIntoMem(stringId);
 	}
@@ -140,7 +140,7 @@
 	return size;
 }
 
-void AGOSEngine::loadTextIntoMem(uint stringId) {
+void AGOSEngine::loadTextIntoMem(uint16 stringId) {
 	byte *p;
 	char filename[30];
 	int i;

Modified: scummvm/trunk/engines/agos/subroutine.cpp
===================================================================
--- scummvm/trunk/engines/agos/subroutine.cpp	2007-06-21 05:26:47 UTC (rev 27579)
+++ scummvm/trunk/engines/agos/subroutine.cpp	2007-06-21 06:37:00 UTC (rev 27580)
@@ -288,7 +288,7 @@
 	return _gameFile;
 }
 
-bool AGOSEngine::loadTablesIntoMem(uint subr_id) {
+bool AGOSEngine::loadTablesIntoMem(uint16 subr_id) {
 	byte *p;
 	uint16 min_num, max_num, file_num;
 	File *in;
@@ -337,7 +337,7 @@
 	return 0;
 }
 
-bool AGOSEngine_Waxworks::loadTablesIntoMem(uint subr_id) {
+bool AGOSEngine_Waxworks::loadTablesIntoMem(uint16 subr_id) {
 	byte *p;
 	int i;
 	uint min_num, max_num;
@@ -399,7 +399,7 @@
 	return 0;
 }
 
-bool AGOSEngine::loadXTablesIntoMem(uint subr_id) {
+bool AGOSEngine::loadXTablesIntoMem(uint16 subr_id) {
 	byte *p;
 	int i;
 	uint min_num, max_num;
@@ -461,7 +461,7 @@
 	}
 }
 
-Subroutine *AGOSEngine::createSubroutine(uint id) {
+Subroutine *AGOSEngine::createSubroutine(uint16 id) {
 	Subroutine *sub;
 
 	alignTableMem();
@@ -681,7 +681,7 @@
 byte *AGOSEngine::readSingleOpcode(Common::SeekableReadStream *in, byte *ptr) {
 	int i, l;
 	const char *string_ptr;
-	uint opcode, val;
+	uint16 opcode, val;
 
 	const char *const *table;
 

Modified: scummvm/trunk/engines/agos/vga.cpp
===================================================================
--- scummvm/trunk/engines/agos/vga.cpp	2007-06-21 05:26:47 UTC (rev 27579)
+++ scummvm/trunk/engines/agos/vga.cpp	2007-06-21 06:37:00 UTC (rev 27580)
@@ -1123,9 +1123,7 @@
 	_leftButtonDown = 0;
 }
 
-void AGOSEngine::clearVideoBackGround(uint num, uint color) {
-	debug(0, "clearVideoBackGround: num %d color %d", num, color);
-
+void AGOSEngine::clearVideoBackGround(uint16 num, uint16 color) {
 	const uint16 *vlut = &_videoWindows[num * 4];
 	byte *dst = getBackGround() + vlut[0] * 16 + (vlut[1] * (vlut[2] * 16));
 
@@ -1135,7 +1133,7 @@
 	}
 }
 
-void AGOSEngine::clearVideoWindow(uint num, uint color) {
+void AGOSEngine::clearVideoWindow(uint16 num, uint16 color) {
 	if (getGameType() == GType_ELVIRA1) {
 		if (num == 2 || num == 6)
 			return;
@@ -1147,13 +1145,11 @@
 			return;
 	}
 
-	debug(0, "clearVideoWindow: num %d color %d", num, color);
-
 	if (getGameType() == GType_SIMON2) {
 		const uint16 *vlut = &_videoWindows[num * 4];
-		uint xoffs = vlut[0] * 16;
-		uint yoffs = vlut[1];
-		uint dstWidth = _videoWindows[18] * 16;
+		uint16 xoffs = vlut[0] * 16;
+		uint16 yoffs = vlut[1];
+		uint16 dstWidth = _videoWindows[18] * 16;
 		byte *dst =  _window4BackScn + xoffs + yoffs * dstWidth;
 
 		setMoveRect(0, 0, vlut[2] * 16, vlut[3]);
@@ -1171,9 +1167,9 @@
 			 _system->unlockScreen();
 		} else if (num == 4) {
 			const uint16 *vlut = &_videoWindows[num * 4];
-			uint xoffs = (vlut[0] - _videoWindows[16]) * 16;
-			uint yoffs = (vlut[1] - _videoWindows[17]);
-			uint dstWidth = _videoWindows[18] * 16;
+			uint16 xoffs = (vlut[0] - _videoWindows[16]) * 16;
+			uint16 yoffs = (vlut[1] - _videoWindows[17]);
+			uint16 dstWidth = _videoWindows[18] * 16;
 			byte *dst =  _window4BackScn + xoffs + yoffs * dstWidth;
 
 			setMoveRect(0, 0, vlut[2] * 16, vlut[3]);

Modified: scummvm/trunk/engines/agos/vga_e2.cpp
===================================================================
--- scummvm/trunk/engines/agos/vga_e2.cpp	2007-06-21 05:26:47 UTC (rev 27579)
+++ scummvm/trunk/engines/agos/vga_e2.cpp	2007-06-21 06:37:00 UTC (rev 27580)
@@ -111,7 +111,7 @@
 	}
 }
 
-void AGOSEngine::setPaletteSlot(uint srcOffs, uint dstOffs) {
+void AGOSEngine::setPaletteSlot(uint16 srcOffs, uint8 dstOffs) {
 	byte *offs, *palptr, *src;
 	uint16 num;
 
@@ -135,17 +135,17 @@
 }
 
 void AGOSEngine::vc46_setPaletteSlot1() {
-	uint srcOffs = vcReadNextWord();
+	uint16 srcOffs = vcReadNextWord();
 	setPaletteSlot(srcOffs, 1);
 }
 
 void AGOSEngine::vc47_setPaletteSlot2() {
-	uint srcOffs = vcReadNextWord();
+	uint16 srcOffs = vcReadNextWord();
 	setPaletteSlot(srcOffs, 2);
 }
 
 void AGOSEngine::vc48_setPaletteSlot3() {
-	uint srcOffs = vcReadNextWord();
+	uint16 srcOffs = vcReadNextWord();
 	setPaletteSlot(srcOffs, 3);
 }
 

Modified: scummvm/trunk/engines/agos/window.cpp
===================================================================
--- scummvm/trunk/engines/agos/window.cpp	2007-06-21 05:26:47 UTC (rev 27579)
+++ scummvm/trunk/engines/agos/window.cpp	2007-06-21 06:37:00 UTC (rev 27580)
@@ -203,8 +203,8 @@
 	} else if (getGameType() == GType_SIMON1) {
 		restoreBlock(window->y + window->height * 8 + ((window == _windowArray[2]) ? 1 : 0), (window->x + window->width) * 8, window->y, window->x * 8);
 	} else {
-		uint x = window->x;
-		uint w = window->width;
+		uint16 x = window->x;
+		uint16 w = window->width;
 
 		if (getGameType() == GType_ELVIRA1) {
 			// Adjustments to remove inventory arrows
@@ -223,7 +223,7 @@
 	_lockWord &= ~0x8000;
 }
 
-void AGOSEngine::restoreBlock(uint h, uint w, uint y, uint x) {
+void AGOSEngine::restoreBlock(uint16 h, uint16 w, uint16 y, uint16 x) {
 	byte *dst, *src;
 	uint i;
 

Modified: scummvm/trunk/engines/agos/zones.cpp
===================================================================
--- scummvm/trunk/engines/agos/zones.cpp	2007-06-21 05:26:47 UTC (rev 27579)
+++ scummvm/trunk/engines/agos/zones.cpp	2007-06-21 06:37:00 UTC (rev 27580)
@@ -44,7 +44,7 @@
 	_vgaFrozenBase = _vgaRealBase;
 }
 
-void AGOSEngine::loadZone(uint zoneNum) {
+void AGOSEngine::loadZone(uint16 zoneNum) {
 	VgaPointersEntry *vpe;
 
 	CHECK_BOUNDS(zoneNum, _vgaBufferPointers);


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