diff options
| -rw-r--r-- | engines/agos/agos.cpp | 2 | ||||
| -rw-r--r-- | engines/agos/agos.h | 92 | ||||
| -rw-r--r-- | engines/agos/draw.cpp | 2 | ||||
| -rw-r--r-- | engines/agos/event.cpp | 2 | ||||
| -rw-r--r-- | engines/agos/res.cpp | 4 | ||||
| -rw-r--r-- | engines/agos/res_snd.cpp | 14 | ||||
| -rw-r--r-- | engines/agos/rooms.cpp | 2 | ||||
| -rw-r--r-- | engines/agos/script.cpp | 12 | ||||
| -rw-r--r-- | engines/agos/script_ff.cpp | 22 | ||||
| -rw-r--r-- | engines/agos/script_s1.cpp | 2 | ||||
| -rw-r--r-- | engines/agos/string.cpp | 6 | ||||
| -rw-r--r-- | engines/agos/subroutine.cpp | 10 | ||||
| -rw-r--r-- | engines/agos/vga.cpp | 20 | ||||
| -rw-r--r-- | engines/agos/vga_e2.cpp | 8 | ||||
| -rw-r--r-- | engines/agos/window.cpp | 6 | ||||
| -rw-r--r-- | engines/agos/zones.cpp | 2 | 
16 files changed, 99 insertions, 107 deletions
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp index d44176bea5..c77e937947 100644 --- a/engines/agos/agos.cpp +++ b/engines/agos/agos.cpp @@ -202,11 +202,9 @@ AGOSEngine::AGOSEngine(OSystem *syst)  	_litBoxFlag = 0;  	_mortalFlag = 0;  	_displayScreen = false; -	_updateScreen = false;  	_syncFlag2 = 0;  	_inCallBack = 0;  	_cepeFlag = 0; -	_copyPartialMode = 0;  	_fastMode = 0;  	_backFlag = 0; diff --git a/engines/agos/agos.h b/engines/agos/agos.h index 8cbde9856f..e487c38cc7 100644 --- a/engines/agos/agos.h +++ b/engines/agos/agos.h @@ -171,7 +171,7 @@ public:  	void setupVgaOpcodes();  	VgaOpcodeProc _vga_opcode_table[100]; -	uint _numVideoOpcodes; +	uint8 _numVideoOpcodes;  	virtual void setupVideoOpcodes(VgaOpcodeProc *op); @@ -189,7 +189,7 @@ public:  	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,20 +197,22 @@ protected:  	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; @@ -259,9 +261,9 @@ protected:  	Subroutine *_subroutineList;  	uint _subroutine; -	uint _dxSurfacePitch; +	uint16 _dxSurfacePitch; -	uint _recursionDepth; +	uint8 _recursionDepth;  	uint32 _lastVgaTick; @@ -277,14 +279,10 @@ protected:  	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 @@ protected:  	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 @@ protected:  	int16 _baseY;  	float _scale;  	Common::Rect _feebleRect; -	int _scaleX, _scaleY, _scaleWidth, _scaleHeight; +	int16 _scaleX, _scaleY, _scaleWidth, _scaleHeight;  	VgaTimerEntry *_nextVgaTimerToProcess; @@ -505,9 +503,9 @@ protected:  	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 @@ protected:  	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 @@ protected:  	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 @@ protected:  	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 @@ protected:  	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 @@ protected:  	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 @@ protected:  	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 @@ protected:  	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 @@ protected:  	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 @@ protected:  	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 @@ protected:  	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);  }; diff --git a/engines/agos/draw.cpp b/engines/agos/draw.cpp index c11d864648..bb28da73b5 100644 --- a/engines/agos/draw.cpp +++ b/engines/agos/draw.cpp @@ -36,7 +36,7 @@ namespace AGOS {  byte *AGOSEngine::getBackBuf() {  	_dxSurfacePitch = _screenWidth; -	return _useBackGround ? _backGroundBuf : _backBuf; +	return _backBuf;  }  byte *AGOSEngine::getBackGround() { diff --git a/engines/agos/event.cpp b/engines/agos/event.cpp index 4c0f2c1eb6..6a9b7596e2 100644 --- a/engines/agos/event.cpp +++ b/engines/agos/event.cpp @@ -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; diff --git a/engines/agos/res.cpp b/engines/agos/res.cpp index 977e8b1578..394c4956ae 100644 --- a/engines/agos/res.cpp +++ b/engines/agos/res.cpp @@ -644,7 +644,7 @@ bool AGOSEngine::decrunchFile(byte *src, byte *dst, uint32 size) {  #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::loadVGABeardFile(uint id) {  	}  } -void AGOSEngine::loadVGAVideoFile(uint id, uint type) { +void AGOSEngine::loadVGAVideoFile(uint16 id, uint8 type) {  	File in;  	char filename[15];  	byte *dst; diff --git a/engines/agos/res_snd.cpp b/engines/agos/res_snd.cpp index a764756224..779ed67e58 100644 --- a/engines/agos/res_snd.cpp +++ b/engines/agos/res_snd.cpp @@ -120,7 +120,7 @@ void AGOSEngine::skipSpeech() {  	}  } -void AGOSEngine::loadMusic(uint music) { +void AGOSEngine::loadMusic(uint16 music) {  	char buf[4];  	stopMusic(); @@ -139,7 +139,7 @@ void AGOSEngine::loadMusic(uint music) {  	_nextMusicToPlay = -1;  } -void AGOSEngine::playModule(uint music) { +void AGOSEngine::playModule(uint16 music) {  	char filename[15];  	File f; @@ -265,7 +265,7 @@ void AGOSEngine::stopMusic() {  	_mixer->stopHandle(_modHandle);  } -void AGOSEngine::playSting(uint a) { +void AGOSEngine::playSting(uint16 soundId) {  	if (!_midi._enable_sfx)  		return; @@ -279,13 +279,13 @@ void AGOSEngine::playSting(uint a) {  	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 @@ static const byte elvira1_soundTable[100] = {  	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; diff --git a/engines/agos/rooms.cpp b/engines/agos/rooms.cpp index f7c0254c4f..af1bd0fe93 100644 --- a/engines/agos/rooms.cpp +++ b/engines/agos/rooms.cpp @@ -351,7 +351,7 @@ void AGOSEngine_Elvira2::setSRExit(Item *i, int n, int d, uint16 s) {  }  // Waxworks specific -bool AGOSEngine::loadRoomItems(uint item) { +bool AGOSEngine::loadRoomItems(uint16 item) {  	byte *p;  	uint i, min_num, max_num;  	char filename[30]; diff --git a/engines/agos/script.cpp b/engines/agos/script.cpp index d083e0251b..c5cf6c5872 100644 --- a/engines/agos/script.cpp +++ b/engines/agos/script.cpp @@ -156,7 +156,7 @@ void AGOSEngine::o_gtf() {  void AGOSEngine::o_chance() {  	// 23: chance -	uint a = getVarOrWord(); +	int16 a = getVarOrWord();  	if (a == 0) {  		setScriptCondition(false); @@ -173,7 +173,7 @@ void AGOSEngine::o_chance() {  	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_process() {  void AGOSEngine::o_when() {  	// 76: add timeout -	uint timeout = getVarOrWord(); +	uint16 timeout = getVarOrWord();  	addTimeEvent(timeout, getVarOrWord());  } @@ -894,7 +894,7 @@ uint AGOSEngine::getNextVarContents() {  	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 @@ void AGOSEngine::writeNextVarContents(uint16 contents) {  	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::stopAnimate(uint16 a) {  }  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) { diff --git a/engines/agos/script_ff.cpp b/engines/agos/script_ff.cpp index db36d6f736..c3e6dc5192 100644 --- a/engines/agos/script_ff.cpp +++ b/engines/agos/script_ff.cpp @@ -303,7 +303,7 @@ void AGOSEngine_Feeble::executeOpcode(int opcode) {  void AGOSEngine_Feeble::off_chance() {  	// 23 -	uint a = getVarOrWord(); +	uint16 a = getVarOrWord();  	if (a == 0) {  		setScriptCondition(false); @@ -315,7 +315,7 @@ void AGOSEngine_Feeble::off_chance() {  		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_listSaveGames() {  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_restartClock() {  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_setColour() {  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);  } diff --git a/engines/agos/script_s1.cpp b/engines/agos/script_s1.cpp index 98b31d5c58..93b907e688 100644 --- a/engines/agos/script_s1.cpp +++ b/engines/agos/script_s1.cpp @@ -406,7 +406,7 @@ void AGOSEngine_Simon1::os1_screenTextMsg() {  void AGOSEngine_Simon1::os1_playEffect() {  	// 163: play sound -	uint soundId = getVarOrWord(); +	uint16 soundId = getVarOrWord();  	if (getGameId() == GID_SIMON1DOS)  		playSting(soundId); diff --git a/engines/agos/string.cpp b/engines/agos/string.cpp index 9a84876a6e..483f101889 100644 --- a/engines/agos/string.cpp +++ b/engines/agos/string.cpp @@ -32,7 +32,7 @@ using Common::File;  namespace AGOS { -const byte *AGOSEngine::getStringPtrByID(uint stringId) { +const byte *AGOSEngine::getStringPtrByID(uint16 stringId) {  	const byte *string_ptr;  	byte *dst; @@ -49,7 +49,7 @@ const byte *AGOSEngine::getStringPtrByID(uint stringId) {  	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 @@ uint AGOSEngine::loadTextFile_gme(const char *filename, byte *dst) {  	return size;  } -void AGOSEngine::loadTextIntoMem(uint stringId) { +void AGOSEngine::loadTextIntoMem(uint16 stringId) {  	byte *p;  	char filename[30];  	int i; diff --git a/engines/agos/subroutine.cpp b/engines/agos/subroutine.cpp index a92f01db2b..f4a6ba3266 100644 --- a/engines/agos/subroutine.cpp +++ b/engines/agos/subroutine.cpp @@ -288,7 +288,7 @@ File *AGOSEngine::openTablesFile_gme(const char *filename) {  	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 @@ bool AGOSEngine::loadTablesIntoMem(uint subr_id) {  	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 @@ bool AGOSEngine_Waxworks::loadTablesIntoMem(uint subr_id) {  	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 @@ void AGOSEngine::closeTablesFile(File *in) {  	}  } -Subroutine *AGOSEngine::createSubroutine(uint id) { +Subroutine *AGOSEngine::createSubroutine(uint16 id) {  	Subroutine *sub;  	alignTableMem(); @@ -681,7 +681,7 @@ void AGOSEngine::readSubroutineLine(Common::SeekableReadStream *in, SubroutineLi  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; diff --git a/engines/agos/vga.cpp b/engines/agos/vga.cpp index b5c4b1edbf..2b8f6d3a09 100644 --- a/engines/agos/vga.cpp +++ b/engines/agos/vga.cpp @@ -1123,9 +1123,7 @@ void AGOSEngine::vc34_setMouseOff() {  	_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::clearVideoBackGround(uint num, uint color) {  	}  } -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 @@ void AGOSEngine::clearVideoWindow(uint num, uint color) {  			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 @@ void AGOSEngine::clearVideoWindow(uint num, uint color) {  			 _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]); diff --git a/engines/agos/vga_e2.cpp b/engines/agos/vga_e2.cpp index a3f335c4b9..ca5ed3ec3b 100644 --- a/engines/agos/vga_e2.cpp +++ b/engines/agos/vga_e2.cpp @@ -111,7 +111,7 @@ void AGOSEngine::vc45_setWindowPalette() {  	}  } -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::setPaletteSlot(uint srcOffs, uint dstOffs) {  }  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);  } diff --git a/engines/agos/window.cpp b/engines/agos/window.cpp index 9aaa6a6896..d4eb7ba3fc 100644 --- a/engines/agos/window.cpp +++ b/engines/agos/window.cpp @@ -203,8 +203,8 @@ void AGOSEngine::restoreWindow(WindowBlock *window) {  	} 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 @@ void AGOSEngine::restoreWindow(WindowBlock *window) {  	_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; diff --git a/engines/agos/zones.cpp b/engines/agos/zones.cpp index 05643a6e89..a1de03e66c 100644 --- a/engines/agos/zones.cpp +++ b/engines/agos/zones.cpp @@ -44,7 +44,7 @@ void AGOSEngine::unfreezeBottom() {  	_vgaFrozenBase = _vgaRealBase;  } -void AGOSEngine::loadZone(uint zoneNum) { +void AGOSEngine::loadZone(uint16 zoneNum) {  	VgaPointersEntry *vpe;  	CHECK_BOUNDS(zoneNum, _vgaBufferPointers);  | 
