[Scummvm-git-logs] scummvm master -> 534603a080177dc1f204b95f5d80056e1e619e9d

dreammaster paulfgilbert at gmail.com
Sun Feb 23 22:13:04 UTC 2020


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
534603a080 ULTIMA8: Fixing naming of locals and method parameters


Commit: 534603a080177dc1f204b95f5d80056e1e619e9d
    https://github.com/scummvm/scummvm/commit/534603a080177dc1f204b95f5d80056e1e619e9d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-02-23T14:12:54-08:00

Commit Message:
ULTIMA8: Fixing naming of locals and method parameters

Changed paths:
    engines/ultima/ultima8/audio/audio_process.cpp
    engines/ultima/ultima8/audio/audio_process.h
    engines/ultima/ultima8/audio/music_flex.cpp
    engines/ultima/ultima8/convert/convert_shape.cpp
    engines/ultima/ultima8/games/game_data.cpp
    engines/ultima/ultima8/graphics/anim_dat.cpp
    engines/ultima/ultima8/gumps/message_box_gump.cpp
    engines/ultima/ultima8/gumps/message_box_gump.h
    engines/ultima/ultima8/misc/debugger.cpp
    engines/ultima/ultima8/ultima8.cpp
    engines/ultima/ultima8/world/actors/pathfinder.cpp
    engines/ultima/ultima8/world/actors/quick_avatar_mover_process.cpp
    engines/ultima/ultima8/world/current_map.cpp
    engines/ultima/ultima8/world/item.cpp
    engines/ultima/ultima8/world/item_sorter.cpp
    engines/ultima/ultima8/world/sprite_process.cpp


diff --git a/engines/ultima/ultima8/audio/audio_process.cpp b/engines/ultima/ultima8/audio/audio_process.cpp
index 29ab8db..d13f57b 100644
--- a/engines/ultima/ultima8/audio/audio_process.cpp
+++ b/engines/ultima/ultima8/audio/audio_process.cpp
@@ -53,8 +53,8 @@ AudioProcess::~AudioProcess(void) {
 	_theAudioProcess = 0;
 }
 
-bool AudioProcess::calculateSoundVolume(ObjId _objId, int16 &_lVol, int16 &_rVol) const {
-	Item *item = getItem(_objId);
+bool AudioProcess::calculateSoundVolume(ObjId objId, int16 &lVol, int16 &rVol) const {
+	Item *item = getItem(objId);
 	if (!item) return false;
 
 	// Need to get items relative coords from avatar
@@ -92,8 +92,8 @@ bool AudioProcess::calculateSoundVolume(ObjId _objId, int16 &_lVol, int16 &_rVol
 		else lbal = 160 - x;
 	}
 
-	_lVol = (dist * lbal) / 160;
-	_rVol = (dist * rbal) / 160;
+	lVol = (dist * lbal) / 160;
+	rVol = (dist * rbal) / 160;
 
 	return true;
 }
@@ -148,11 +148,11 @@ bool AudioProcess::continueSpeech(SampleInfo &si) {
 
 	// hack to prevent playSample from deleting 'si'
 	si._channel = -1;
-	int _channel = playSample(sample, 200, 0);
-	if (_channel == -1)
+	int channel = playSample(sample, 200, 0);
+	if (channel == -1)
 		return false;
 
-	si._channel = _channel;
+	si._channel = channel;
 	return true;
 }
 
@@ -184,21 +184,21 @@ bool AudioProcess::loadData(IDataSource *ids, uint32 version) {
 	uint32 count = ids->read1();
 
 	while (count--) {
-		int16 _sfxNum = ids->read2();
-		int16 _priority = ids->read2();
-		int16 _objId = ids->read2();
-		int16 _loops = ids->read2();
-		uint32 _pitchShift = ids->read4();
-		uint16 _volume = ids->read2();
-
-		if (_sfxNum != -1) { // SFX
-			int16 _lVol = 0;
-			int16 _rVol = 0;
-			if (_objId != 0) {
-				_lVol = 256;
-				_rVol = 256;
+		int16 sfxNum = ids->read2();
+		int16 priority = ids->read2();
+		int16 objId = ids->read2();
+		int16 loops = ids->read2();
+		uint32 pitchShift = ids->read4();
+		uint16 volume = ids->read2();
+
+		if (sfxNum != -1) { // SFX
+			int16 lVol = 0;
+			int16 rVol = 0;
+			if (objId != 0) {
+				lVol = 256;
+				rVol = 256;
 			}
-			playSFX(_sfxNum, _priority, _objId, _loops, false, _pitchShift, _volume, _lVol, _rVol);
+			playSFX(sfxNum, priority, objId, loops, false, pitchShift, volume, lVol, rVol);
 		} else {                // Speech
 			uint32 slen = ids->read4();
 
@@ -208,35 +208,35 @@ bool AudioProcess::loadData(IDataSource *ids, uint32 version) {
 			Std::string text = buf;
 			delete[] buf;
 
-			playSpeech(text, _priority, _objId, _pitchShift, _volume);
+			playSpeech(text, priority, objId, pitchShift, volume);
 		}
 	}
 
 	return true;
 }
 
-int AudioProcess::playSample(AudioSample *sample, int _priority, int _loops, uint32 _pitchShift, int16 _lVol, int16 _rVol) {
+int AudioProcess::playSample(AudioSample *sample, int priority, int loops, uint32 pitchShift, int16 lVol, int16 rVol) {
 	AudioMixer *mixer = AudioMixer::get_instance();
-	int _channel = mixer->playSample(sample, _loops, _priority, false, _pitchShift, _lVol, _rVol);
+	int channel = mixer->playSample(sample, loops, priority, false, pitchShift, lVol, rVol);
 
-	if (_channel == -1) return _channel;
+	if (channel == -1) return channel;
 
-	// Erase old sample using _channel (if any)
+	// Erase old sample using channel (if any)
 	Std::list<SampleInfo>::iterator it;
 	for (it = _sampleInfo.begin(); it != _sampleInfo.end();) {
-		if (it->_channel == _channel) {
+		if (it->_channel == channel) {
 			it = _sampleInfo.erase(it);
 		} else {
 			++it;
 		}
 	}
 
-	return _channel;
+	return channel;
 }
 
-void AudioProcess::playSFX(int _sfxNum, int _priority, ObjId _objId, int _loops,
-                           bool no_duplicates, uint32 _pitchShift, uint16 _volume,
-                           int16 _lVol, int16 _rVol) {
+void AudioProcess::playSFX(int sfxNum, int priority, ObjId objId, int loops,
+                           bool no_duplicates, uint32 pitchShift, uint16 volume,
+                           int16 lVol, int16 rVol) {
 
 	SoundFlex *soundflx = GameData::get_instance()->getSoundFlex();
 
@@ -245,11 +245,11 @@ void AudioProcess::playSFX(int _sfxNum, int _priority, ObjId _objId, int _loops,
 	if (no_duplicates) {
 		Std::list<SampleInfo>::iterator it;
 		for (it = _sampleInfo.begin(); it != _sampleInfo.end();) {
-			if (it->_sfxNum == _sfxNum && it->_objId == _objId &&
-			        it->_loops == _loops) {
+			if (it->_sfxNum == sfxNum && it->_objId == objId &&
+			        it->_loops == loops) {
 
 				// Exactly the same (and playing) so just return
-				//if (it->_priority == _priority)
+				//if (it->priority == priority)
 				if (mixer->isPlaying(it->_channel)) {
 					pout << "Sound already playing" << Std::endl;
 					return;
@@ -263,28 +263,28 @@ void AudioProcess::playSFX(int _sfxNum, int _priority, ObjId _objId, int _loops,
 		}
 	}
 
-	AudioSample *sample = soundflx->getSample(_sfxNum);
+	AudioSample *sample = soundflx->getSample(sfxNum);
 	if (!sample) return;
 
-	if (_lVol == -1 || _rVol == -1) {
-		_lVol = 256;
-		_rVol = 256;
-		if (_objId) calculateSoundVolume(_objId, _lVol, _rVol);
+	if (lVol == -1 || rVol == -1) {
+		lVol = 256;
+		rVol = 256;
+		if (objId) calculateSoundVolume(objId, lVol, rVol);
 	}
 
-	int _channel = playSample(sample, _priority, _loops, _pitchShift, (_lVol * _volume) / 256, (_rVol * _volume) / 256);
-	if (_channel == -1) return;
+	int channel = playSample(sample, priority, loops, pitchShift, (lVol * volume) / 256, (rVol * volume) / 256);
+	if (channel == -1) return;
 
 	// Update list
-	_sampleInfo.push_back(SampleInfo(_sfxNum, _priority, _objId, _loops, _channel, _pitchShift, _volume, _lVol, _rVol));
+	_sampleInfo.push_back(SampleInfo(sfxNum, priority, objId, loops, channel, pitchShift, volume, lVol, rVol));
 }
 
-void AudioProcess::stopSFX(int _sfxNum, ObjId _objId) {
+void AudioProcess::stopSFX(int sfxNum, ObjId objId) {
 	AudioMixer *mixer = AudioMixer::get_instance();
 
 	Std::list<SampleInfo>::iterator it;
 	for (it = _sampleInfo.begin(); it != _sampleInfo.end();) {
-		if (it->_sfxNum == _sfxNum && it->_objId == _objId) {
+		if (it->_sfxNum == sfxNum && it->_objId == objId) {
 			if (mixer->isPlaying(it->_channel)) mixer->stopSample(it->_channel);
 			it = _sampleInfo.erase(it);
 		} else {
@@ -293,27 +293,27 @@ void AudioProcess::stopSFX(int _sfxNum, ObjId _objId) {
 	}
 }
 
-bool AudioProcess::isSFXPlaying(int _sfxNum) {
+bool AudioProcess::isSFXPlaying(int sfxNum) {
 	Std::list<SampleInfo>::iterator it;
 	for (it = _sampleInfo.begin(); it != _sampleInfo.end(); ++it) {
-		if (it->_sfxNum == _sfxNum)
+		if (it->_sfxNum == sfxNum)
 			return true;
 	}
 
 	return false;
 }
 
-void AudioProcess::setVolumeSFX(int _sfxNum, uint8 _volume) {
+void AudioProcess::setVolumeSFX(int sfxNum, uint8 volume) {
 	AudioMixer *mixer = AudioMixer::get_instance();
 
 	Std::list<SampleInfo>::iterator it;
 	for (it = _sampleInfo.begin(); it != _sampleInfo.end(); ++it) {
-		if (it->_sfxNum == _sfxNum && it->_sfxNum != -1) {
-			it->_volume = _volume;
+		if (it->_sfxNum == sfxNum && it->_sfxNum != -1) {
+			it->_volume = volume;
 
-			int _lVol = 256, _rVol = 256;
+			int lVol = 256, _rVol = 256;
 			if (it->_objId) calculateSoundVolume(it->_objId, it->_lVol, it->_rVol);
-			mixer->setVolume(it->_channel, (_lVol * it->_volume) / 256, (_rVol * it->_volume) / 256);
+			mixer->setVolume(it->_channel, (lVol * it->_volume) / 256, (_rVol * it->_volume) / 256);
 		}
 	}
 }
@@ -322,8 +322,8 @@ void AudioProcess::setVolumeSFX(int _sfxNum, uint8 _volume) {
 // Speech
 //
 
-bool AudioProcess::playSpeech(Std::string &_barked, int shapenum, ObjId _objId, uint32 _pitchShift, uint16 _volume) {
-	SpeechFlex *speechflex = GameData::get_instance()->getSpeechFlex(shapenum);
+bool AudioProcess::playSpeech(Std::string &barked, int shapeNum, ObjId objId, uint32 pitchShift, uint16 volume) {
+	SpeechFlex *speechflex = GameData::get_instance()->getSpeechFlex(shapeNum);
 
 	if (!speechflex) return false;
 
@@ -332,8 +332,8 @@ bool AudioProcess::playSpeech(Std::string &_barked, int shapenum, ObjId _objId,
 	Std::list<SampleInfo>::iterator it;
 	for (it = _sampleInfo.begin(); it != _sampleInfo.end();) {
 
-		if (it->_sfxNum == -1 && it->_barked == _barked &&
-		        it->_priority == shapenum && it->_objId == _objId) {
+		if (it->_sfxNum == -1 && it->_barked == barked &&
+		        it->_priority == shapeNum && it->_objId == objId) {
 
 			if (mixer->isPlaying(it->_channel)) {
 				pout << "Speech already playing" << Std::endl;
@@ -349,38 +349,38 @@ bool AudioProcess::playSpeech(Std::string &_barked, int shapenum, ObjId _objId,
 
 	uint32 speech_start = 0;
 	uint32 speech_end;
-	int index = speechflex->getIndexForPhrase(_barked, speech_start, speech_end);
+	int index = speechflex->getIndexForPhrase(barked, speech_start, speech_end);
 	if (!index) return false;
 
 	AudioSample *sample = speechflex->getSample(index);
 	if (!sample) return false;
 
-	int _channel = playSample(sample, 200, 0, _pitchShift, _volume, _volume);
+	int channel = playSample(sample, 200, 0, pitchShift, volume, volume);
 
-	if (_channel == -1) return false;
+	if (channel == -1) return false;
 
 	// Update list
-	_sampleInfo.push_back(SampleInfo(_barked, shapenum, _objId, _channel,
-	                                 speech_start, speech_end, _pitchShift, _volume, 256, 256));
+	_sampleInfo.push_back(SampleInfo(barked, shapeNum, objId, channel,
+	                                 speech_start, speech_end, pitchShift, volume, 256, 256));
 
 	return true;
 }
 
-uint32 AudioProcess::getSpeechLength(Std::string &_barked, int shapenum) const {
+uint32 AudioProcess::getSpeechLength(Std::string &barked, int shapenum) const {
 	SpeechFlex *speechflex = GameData::get_instance()->getSpeechFlex(shapenum);
 	if (!speechflex) return 0;
 
-	return speechflex->getSpeechLength(_barked);
+	return speechflex->getSpeechLength(barked);
 }
 
 
-void AudioProcess::stopSpeech(Std::string &_barked, int shapenum, ObjId _objId) {
+void AudioProcess::stopSpeech(Std::string &barked, int shapenum, ObjId objId) {
 	AudioMixer *mixer = AudioMixer::get_instance();
 
 	Std::list<SampleInfo>::iterator it;
 	for (it = _sampleInfo.begin(); it != _sampleInfo.end();) {
 		if (it->_sfxNum == -1 && it->_priority == shapenum &&
-		        it->_objId == _objId && it->_barked == _barked) {
+		        it->_objId == objId && it->_barked == barked) {
 			if (mixer->isPlaying(it->_channel)) mixer->stopSample(it->_channel);
 			it = _sampleInfo.erase(it);
 		} else {
@@ -389,11 +389,11 @@ void AudioProcess::stopSpeech(Std::string &_barked, int shapenum, ObjId _objId)
 	}
 }
 
-bool AudioProcess::isSpeechPlaying(Std::string &_barked, int shapenum) {
+bool AudioProcess::isSpeechPlaying(Std::string &barked, int shapeNum) {
 	Std::list<SampleInfo>::iterator it;
 	for (it = _sampleInfo.begin(); it != _sampleInfo.end(); ++it) {
-		if (it->_sfxNum == -1 && it->_priority == shapenum &&
-		        it->_barked == _barked) {
+		if (it->_sfxNum == -1 && it->_priority == shapeNum &&
+		        it->_barked == barked) {
 			return true;
 		}
 	}
@@ -466,14 +466,14 @@ uint32 AudioProcess::I_playSFX(const uint8 *args, unsigned int argsize) {
 		_priority = priority_;
 	}
 
-	ObjId _objId = 0;
+	ObjId objId = 0;
 	if (argsize == 6) {
-		ARG_OBJID(objid_);
-		_objId = objid_;
+		ARG_OBJID(objectId);
+		objId = objectId;
 	}
 
 	AudioProcess *ap = AudioProcess::get_instance();
-	if (ap) ap->playSFX(_sfxNum, _priority, _objId, 0);
+	if (ap) ap->playSFX(_sfxNum, _priority, objId, 0);
 	else perr << "Error: No AudioProcess" << Std::endl;
 
 	return 0;
@@ -488,14 +488,14 @@ uint32 AudioProcess::I_playAmbientSFX(const uint8 *args, unsigned int argsize) {
 		_priority = priority_;
 	}
 
-	ObjId _objId = 0;
+	ObjId objId = 0;
 	if (argsize == 6) {
-		ARG_OBJID(objid_);
-		_objId = objid_;
+		ARG_OBJID(objectId);
+		objId = objectId;
 	}
 
 	AudioProcess *ap = AudioProcess::get_instance();
-	if (ap) ap->playSFX(_sfxNum, _priority, _objId, -1, true);
+	if (ap) ap->playSFX(_sfxNum, _priority, objId, -1, true);
 	else perr << "Error: No AudioProcess" << Std::endl;
 
 	return 0;
@@ -525,14 +525,14 @@ uint32 AudioProcess::I_setVolumeSFX(const uint8 *args, unsigned int /*argsize*/)
 uint32 AudioProcess::I_stopSFX(const uint8 *args, unsigned int argsize) {
 	ARG_SINT16(_sfxNum);
 
-	ObjId _objId = 0;
+	ObjId objId = 0;
 	if (argsize == 4) {
-		ARG_OBJID(objid_);
-		_objId = objid_;
+		ARG_OBJID(objectId);
+		objId = objectId;
 	}
 
 	AudioProcess *ap = AudioProcess::get_instance();
-	if (ap) ap->stopSFX(_sfxNum, _objId);
+	if (ap) ap->stopSFX(_sfxNum, objId);
 	else perr << "Error: No AudioProcess" << Std::endl;
 
 	return 0;
diff --git a/engines/ultima/ultima8/audio/audio_process.h b/engines/ultima/ultima8/audio/audio_process.h
index b326ee1..7923d07 100644
--- a/engines/ultima/ultima8/audio/audio_process.h
+++ b/engines/ultima/ultima8/audio/audio_process.h
@@ -81,32 +81,32 @@ public:
 
 	void run() override;
 
-	void playSFX(int _sfxNum, int _priority, ObjId _objId, int _loops,
-	             bool no_duplicates, uint32 _pitchShift,
-	             uint16 _volume, int16 _lVol, int16 _rVol);
-
-	void playSFX(int _sfxNum, int _priority, ObjId _objId, int _loops,
-	             bool no_duplicates = false, uint32 _pitchShift = 0x10000,
-	             uint16 _volume = 0x80) {
-		playSFX(_sfxNum, _priority, _objId, _loops, no_duplicates, _pitchShift, _volume, -1, -1);
+	void playSFX(int sfxNum, int priority, ObjId objId, int loops,
+	             bool no_duplicates, uint32 pitchShift,
+	             uint16 volume, int16 lVol, int16 rVol);
+
+	void playSFX(int sfxNum, int priority, ObjId objId, int loops,
+	             bool no_duplicates = false, uint32 pitchShift = 0x10000,
+	             uint16 volume = 0x80) {
+		playSFX(sfxNum, priority, objId, loops, no_duplicates, pitchShift, volume, -1, -1);
 	}
 
-	void stopSFX(int _sfxNum, ObjId _objId);
-	bool isSFXPlaying(int _sfxNum);
-	void setVolumeSFX(int _sfxNum, uint8 _volume);
+	void stopSFX(int sfxNum, ObjId objId);
+	bool isSFXPlaying(int sfxNum);
+	void setVolumeSFX(int sfxNum, uint8 volume);
 
-	bool playSpeech(Std::string &_barked, int shapenum, ObjId _objId,
-	                uint32 _pitchShift = 0x10000, uint16 _volume = 256);
-	void stopSpeech(Std::string &_barked, int shapenum, ObjId _objId);
-	bool isSpeechPlaying(Std::string &_barked, int shapenum);
+	bool playSpeech(Std::string &barked, int shapenum, ObjId objId,
+	                uint32 pitchShift = 0x10000, uint16 volume = 256);
+	void stopSpeech(Std::string &barked, int shapenum, ObjId objId);
+	bool isSpeechPlaying(Std::string &barked, int shapenum);
 
 	//! get length (in milliseconds) of speech
-	uint32 getSpeechLength(Std::string &_barked, int shapenum) const;
+	uint32 getSpeechLength(Std::string &barked, int shapenum) const;
 
 	//! play a sample (without storing a SampleInfo)
-	//! returns _channel sample is played on, or -1
-	int playSample(AudioSample *sample, int _priority, int _loops,
-	               uint32 _pitchShift = 0x10000, int16 _lVol = 256, int16 _rVol = 256);
+	//! returns channel sample is played on, or -1
+	int playSample(AudioSample *sample, int priority, int loops,
+		uint32 pitchShift = 0x10000, int16 lVol = 256, int16 rVol = 256);
 
 	//! pause all currently playing samples
 	void pauseAllSamples();
@@ -127,7 +127,7 @@ private:
 	//! returns true if there was speech left to play, or false if finished
 	bool continueSpeech(SampleInfo &si);
 
-	bool calculateSoundVolume(ObjId _objId, int16 &_lVol, int16 &_rVol) const;
+	bool calculateSoundVolume(ObjId objId, int16 &lVol, int16 &rVol) const;
 
 	static AudioProcess *_theAudioProcess;
 };
diff --git a/engines/ultima/ultima8/audio/music_flex.cpp b/engines/ultima/ultima8/audio/music_flex.cpp
index 9acddee..1511f70 100644
--- a/engines/ultima/ultima8/audio/music_flex.cpp
+++ b/engines/ultima/ultima8/audio/music_flex.cpp
@@ -118,7 +118,7 @@ void MusicFlex::loadSongInfo() {
 		// Now finally _loopJump
 		begIdx = line.findFirstNotOf(' ', endIdx);
 		endIdx = line.findFirstOf(' ', begIdx);
-		int _loopJump = Std::atoi(line.substr(begIdx, endIdx - begIdx).c_str());
+		int loopJump = Std::atoi(line.substr(begIdx, endIdx - begIdx).c_str());
 
 		// Uh oh
 		if (num < 0 || num > 127)
@@ -131,7 +131,7 @@ void MusicFlex::loadSongInfo() {
 
 		Std::strncpy(_info[num]->_filename, name.c_str(), 16);
 		_info[num]->_numMeasures = measures;
-		_info[num]->_loopJump = _loopJump;
+		_info[num]->_loopJump = loopJump;
 	};
 
 	// Read 'Section2', or more like skip it, since it's only trans.xmi
diff --git a/engines/ultima/ultima8/convert/convert_shape.cpp b/engines/ultima/ultima8/convert/convert_shape.cpp
index 7275c58..5352305 100644
--- a/engines/ultima/ultima8/convert/convert_shape.cpp
+++ b/engines/ultima/ultima8/convert/convert_shape.cpp
@@ -442,16 +442,16 @@ bool ConvertShape::Check(IDataSource *source, const ConvertShapeFormat *csf, uin
 	if (csf->_bytes_header_unk) source->skip(csf->_bytes_header_unk);
 
 	// Now read _num_frames
-	int _num_frames = 1;
-	if (csf->_bytes_num_frames) _num_frames = source->readX(csf->_bytes_num_frames);
-	if (_num_frames == 0) _num_frames = CalcNumFrames(source,csf,real_len,start_pos);
+	int numFrames = 1;
+	if (csf->_bytes_num_frames) numFrames = source->readX(csf->_bytes_num_frames);
+	if (numFrames == 0) numFrames = CalcNumFrames(source,csf,real_len,start_pos);
 
 	// Create _frames array
 	ConvertShapeFrame oneframe;
 	Std::memset (&oneframe, 0, sizeof(ConvertShapeFrame));
 
 	// Now read the _frames
-	for (int f = 0; f < _num_frames; f++) 
+	for (int f = 0; f < numFrames; f++) 
 	{
 		ConvertShapeFrame *frame = &oneframe;
 
@@ -590,9 +590,8 @@ bool ConvertShape::Check(IDataSource *source, const ConvertShapeFormat *csf, uin
 		}
 	}
 
-	// Free _frames
+	// Free frames
 	oneframe.Free();
-	_num_frames = 0;
 
 	// Return to start position
 	source->seek(start_pos);
@@ -632,16 +631,16 @@ bool ConvertShape::CheckUnsafe(IDataSource *source, const ConvertShapeFormat *cs
 	if (csf->_bytes_header_unk) source->skip(csf->_bytes_header_unk);
 
 	// Now read _num_frames
-	int _num_frames = 1;
-	if (csf->_bytes_num_frames) _num_frames = source->readX(csf->_bytes_num_frames);
-	if (_num_frames == 0) _num_frames = CalcNumFrames(source,csf,real_len,start_pos);
+	int numFrames = 1;
+	if (csf->_bytes_num_frames) numFrames = source->readX(csf->_bytes_num_frames);
+	if (numFrames == 0) numFrames = CalcNumFrames(source,csf,real_len,start_pos);
 
 	// Create _frames array
 	ConvertShapeFrame oneframe;
 	Std::memset (&oneframe, 0, sizeof(ConvertShapeFrame));
 
 	// Now read the _frames
-	for (int f = 0; f < _num_frames; f++) 
+	for (int f = 0; f < numFrames; f++) 
 	{
 		ConvertShapeFrame *frame = &oneframe;
 
@@ -706,7 +705,6 @@ bool ConvertShape::CheckUnsafe(IDataSource *source, const ConvertShapeFormat *cs
 
 	// Free _frames
 	oneframe.Free();
-	_num_frames = 0;
 
 	// Return to start position
 	source->seek(start_pos);
diff --git a/engines/ultima/ultima8/games/game_data.cpp b/engines/ultima/ultima8/games/game_data.cpp
index 327b0b1..7eaa986 100644
--- a/engines/ultima/ultima8/games/game_data.cpp
+++ b/engines/ultima/ultima8/games/game_data.cpp
@@ -310,7 +310,7 @@ void GameData::loadU8Data() {
 	}
 	delete globflex;
 
-	// Load _fonts
+	// Load fonts
 	IDataSource *fds = filesystem->ReadFile("@game/static/u8fonts.flx");
 	if (!fds)
 		error("Unable to load static/u8fonts.flx");
@@ -319,7 +319,7 @@ void GameData::loadU8Data() {
 	                             PaletteManager::get_instance()->getPalette(PaletteManager::Pal_Game));
 	_fonts->setHVLeads();
 
-	// Load _mouse
+	// Load \mouse
 	IDataSource *msds = filesystem->ReadFile("@game/static/u8mouse.shp");
 	if (!msds)
 		error("Unable to load static/u8mouse.shp");
@@ -435,10 +435,10 @@ void GameData::setupTTFOverrides(const char *configkey, bool SJIS) {
 	}
 }
 
-SpeechFlex *GameData::getSpeechFlex(uint32 _shapeNum) {
-	if (_shapeNum >= _speech.size()) return 0;
+SpeechFlex *GameData::getSpeechFlex(uint32 shapeNum) {
+	if (shapeNum >= _speech.size()) return 0;
 
-	SpeechFlex **s = _speech[_shapeNum];
+	SpeechFlex **s = _speech[shapeNum];
 	if (s) return *s;
 
 	s = new SpeechFlex*;
@@ -448,7 +448,7 @@ SpeechFlex *GameData::getSpeechFlex(uint32 _shapeNum) {
 
 	Std::string u8_sound_ = "@game/sound/";
 	char num_flx [32];
-	snprintf(num_flx , 32, "%i.flx", _shapeNum);
+	snprintf(num_flx , 32, "%i.flx", shapeNum);
 
 	char langletter = _gameInfo->getLanguageFileLetter();
 	if (!langletter) {
@@ -461,7 +461,7 @@ SpeechFlex *GameData::getSpeechFlex(uint32 _shapeNum) {
 		*s = new SpeechFlex(sflx);
 	}
 
-	_speech[_shapeNum] = s;
+	_speech[shapeNum] = s;
 
 	return *s;
 }
@@ -537,7 +537,7 @@ void GameData::loadRemorseData() {
 	_weaponOverlay->load(overlayflex);
 	delete overlayflex;
 
-	// Load _globs
+	// Load globs
 	IDataSource *gds = filesystem->ReadFile("@game/static/glob.flx");
 	if (!gds)
 		error("Unable to load static/glob.flx");
@@ -559,7 +559,7 @@ void GameData::loadRemorseData() {
 	}
 	delete globflex;
 
-	// Load _fonts
+	// Load fonts
 	IDataSource *fds = filesystem->ReadFile("@game/static/_fonts.flx");
 	if (!fds)
 		error("Unable to load static/_fonts.flx");
@@ -568,7 +568,7 @@ void GameData::loadRemorseData() {
 	                             PaletteManager::get_instance()->getPalette(PaletteManager::Pal_Game));
 	_fonts->setHVLeads();
 
-	// Load _mouse
+	// Load mouse
 	IDataSource *msds = filesystem->ReadFile("@game/static/_mouse.shp");
 	if (!msds)
 		error("Unable to load static/_mouse.shp");
diff --git a/engines/ultima/ultima8/graphics/anim_dat.cpp b/engines/ultima/ultima8/graphics/anim_dat.cpp
index 8e8c63b..de018cb 100644
--- a/engines/ultima/ultima8/graphics/anim_dat.cpp
+++ b/engines/ultima/ultima8/graphics/anim_dat.cpp
@@ -101,14 +101,14 @@ void AnimDat::load(IDataSource *ds) {
 			a->_actions[action]->_frameRepeat = ds->read1();
 			a->_actions[action]->_flags |= ds->read1() << 8;
 
-			unsigned int _dirCount = 8;
+			unsigned int dirCount = 8;
 			if (GAME_IS_CRUSADER &&
 			        (a->_actions[action]->_flags & AnimAction::AAF_CRUS_16DIRS)) {
-				_dirCount = 16;
+				dirCount = 16;
 			}
-			a->_actions[action]->_dirCount = _dirCount;
+			a->_actions[action]->_dirCount = dirCount;
 
-			for (unsigned int dir = 0; dir < _dirCount; dir++) {
+			for (unsigned int dir = 0; dir < dirCount; dir++) {
 				a->_actions[action]->frames[dir].clear();
 
 				for (unsigned int j = 0; j < actionsize; j++) {
diff --git a/engines/ultima/ultima8/gumps/message_box_gump.cpp b/engines/ultima/ultima8/gumps/message_box_gump.cpp
index feca619..166f520 100644
--- a/engines/ultima/ultima8/gumps/message_box_gump.cpp
+++ b/engines/ultima/ultima8/gumps/message_box_gump.cpp
@@ -159,8 +159,8 @@ void MessageBoxGump::ChildNotify(Gump *child, uint32 msg) {
 	}
 }
 
-ProcId MessageBoxGump::Show(Std::string _title, Std::string _message, uint32 _titleColour, Std::vector<Std::string> *_buttons) {
-	Gump *gump = new MessageBoxGump(_title, _message, _titleColour, _buttons);
+ProcId MessageBoxGump::Show(Std::string _title, Std::string _message, uint32 titleColour, Std::vector<Std::string> *_buttons) {
+	Gump *gump = new MessageBoxGump(_title, _message, titleColour, _buttons);
 	gump->InitGump(0);
 	gump->setRelativePosition(CENTER);
 	gump->CreateNotifier();
diff --git a/engines/ultima/ultima8/gumps/message_box_gump.h b/engines/ultima/ultima8/gumps/message_box_gump.h
index 10c911c..09a176b 100644
--- a/engines/ultima/ultima8/gumps/message_box_gump.h
+++ b/engines/ultima/ultima8/gumps/message_box_gump.h
@@ -55,10 +55,10 @@ public:
 	//! Create a Message Box
 	//! \param title Title of the message box
 	//! \param message Message to be displayed in box
-	//! \param title_colour The colour to be displayed behind the title bar
+	//! \param titleColour The colour to be displayed behind the title bar
 	//! \param buttons Array of button names to be displayed. Default is "Ok"
 	//! \return Pid of process that will have the result when finished
-	static ProcId Show(Std::string title, Std::string message, uint32 title_colour = 0xFF30308F, Std::vector<Std::string> *buttons = 0);
+	static ProcId Show(Std::string title, Std::string message, uint32 titleColour = 0xFF30308F, Std::vector<Std::string> *buttons = 0);
 	static ProcId Show(Std::string title, Std::string message, Std::vector<Std::string> *buttons) {
 		return Show(title, message, 0xFF30308F, buttons);
 	}
diff --git a/engines/ultima/ultima8/misc/debugger.cpp b/engines/ultima/ultima8/misc/debugger.cpp
index 585ce3b..84dbff2 100644
--- a/engines/ultima/ultima8/misc/debugger.cpp
+++ b/engines/ultima/ultima8/misc/debugger.cpp
@@ -422,10 +422,10 @@ bool Debugger::cmdStopSFX(int argc, const char **argv) {
 		debugPrintf("usage: stopSFX <_sfxNum> [<_objId>]\n");
 		return true;
 	} else {
-		int _sfxNum = static_cast<int>(strtol(argv[1], 0, 0));
-		ObjId _objId = (argc >= 3) ? static_cast<ObjId>(strtol(argv[2], 0, 0)) : 0;
+		int sfxNum = static_cast<int>(strtol(argv[1], 0, 0));
+		ObjId objId = (argc >= 3) ? static_cast<ObjId>(strtol(argv[2], 0, 0)) : 0;
 
-		ap->stopSFX(_sfxNum, _objId);
+		ap->stopSFX(sfxNum, objId);
 		return false;
 	}
 }
@@ -439,8 +439,8 @@ bool Debugger::cmdPlaySFX(int argc, const char **argv) {
 		debugPrintf("usage: playSFX <_sfxNum>\n");
 		return true;
 	} else {
-		int _sfxNum = static_cast<int>(strtol(argv[1], 0, 0));
-		ap->playSFX(_sfxNum, 0x60, 0, 0);
+		int sfxNum = static_cast<int>(strtol(argv[1], 0, 0));
+		ap->playSFX(sfxNum, 0x60, 0, 0);
 		return false;
 	}
 }
diff --git a/engines/ultima/ultima8/ultima8.cpp b/engines/ultima/ultima8/ultima8.cpp
index 504f17d..dde5398 100644
--- a/engines/ultima/ultima8/ultima8.cpp
+++ b/engines/ultima/ultima8/ultima8.cpp
@@ -326,14 +326,14 @@ void Ultima8Engine::startupGame() {
 	_settingMan->setDefault("ttf", false);
 	_settingMan->get("ttf", _ttfOverrides);
 
-	_settingMan->setDefault("_frameSkip", false);
-	_settingMan->get("_frameSkip", _frameSkip);
+	_settingMan->setDefault("frameSkip", false);
+	_settingMan->get("frameSkip", _frameSkip);
 
-	_settingMan->setDefault("_frameLimit", true);
-	_settingMan->get("_frameLimit", _frameLimit);
+	_settingMan->setDefault("frameLimit", true);
+	_settingMan->get("frameLimit", _frameLimit);
 
-	_settingMan->setDefault("_interpolate", true);
-	_settingMan->get("_interpolate", _interpolate);
+	_settingMan->setDefault("interpolate", true);
+	_settingMan->get("interpolate", _interpolate);
 
 	_settingMan->setDefault("cheat", false);
 	_settingMan->get("cheat", _cheatsEnabled);
diff --git a/engines/ultima/ultima8/world/actors/pathfinder.cpp b/engines/ultima/ultima8/world/actors/pathfinder.cpp
index 3346711..2e06199 100644
--- a/engines/ultima/ultima8/world/actors/pathfinder.cpp
+++ b/engines/ultima/ultima8/world/actors/pathfinder.cpp
@@ -141,10 +141,10 @@ void Pathfinder::init(Actor *actor_, PathfindingState *state) {
 		_start.load(_actor);
 }
 
-void Pathfinder::setTarget(int32 _x, int32 _y, int32 _z) {
-	_targetX = _x;
-	_targetY = _y;
-	_targetZ = _z;
+void Pathfinder::setTarget(int32 x, int32 y, int32 z) {
+	_targetX = x;
+	_targetY = y;
+	_targetZ = z;
 	_targetItem = 0;
 	_hitMode = false;
 }
@@ -172,13 +172,13 @@ bool Pathfinder::canReach() {
 	return pathfind(path);
 }
 
-bool Pathfinder::alreadyVisited(int32 _x, int32 _y, int32 _z) {
+bool Pathfinder::alreadyVisited(int32 x, int32 y, int32 z) {
 	//! this may need optimization
 
 	Std::list<PathfindingState>::iterator iter;
 
 	for (iter = _visited.begin(); iter != _visited.end(); ++iter)
-		if (iter->checkPoint(_x, _y, _z, 8))
+		if (iter->checkPoint(x, y, z, 8))
 			return true;
 
 	return false;
@@ -283,7 +283,7 @@ static void drawbox(Item *item) {
 	screen->DrawLine32(0xFF00FF00, x0, y0, x3, y3);
 }
 
-static void drawdot(int32 _x, int32 _y, int32 _z, int size, uint32 rgb) {
+static void drawdot(int32 x, int32 y, int32 Z, int size, uint32 rgb) {
 	RenderSurface *screen = Ultima8Engine::get_instance()->getRenderScreen();
 	int32 cx, cy, cz;
 
@@ -291,12 +291,12 @@ static void drawdot(int32 _x, int32 _y, int32 _z, int size, uint32 rgb) {
 
 	Rect d;
 	screen->GetSurfaceDims(d);
-	_x -= cx;
-	_y -= cy;
-	_z -= cz;
+	x -= cx;
+	y -= cy;
+	Z -= cz;
 	int32 x0, y0;
-	x0 = (d.w / 2) + (_x - _y) / 2;
-	y0 = (d.h / 2) + (_x + _y) / 4 - _z * 2;
+	x0 = (d.w / 2) + (x - y) / 2;
+	y0 = (d.h / 2) + (x + y) / 4 - Z * 2;
 	screen->Fill32(rgb, x0 - size, y0 - size, 2 * size + 1, 2 * size + 1);
 }
 
diff --git a/engines/ultima/ultima8/world/actors/quick_avatar_mover_process.cpp b/engines/ultima/ultima8/world/actors/quick_avatar_mover_process.cpp
index 655bbec..eae590e 100644
--- a/engines/ultima/ultima8/world/actors/quick_avatar_mover_process.cpp
+++ b/engines/ultima/ultima8/world/actors/quick_avatar_mover_process.cpp
@@ -136,22 +136,22 @@ void QuickAvatarMoverProcess::terminate() {
 	amp[_dir] = 0;
 }
 
-void QuickAvatarMoverProcess::terminateMover(int _dir) {
-	assert(_dir < 6);
+void QuickAvatarMoverProcess::terminateMover(int dir) {
+	assert(dir < 6);
 
 	Kernel *kernel = Kernel::get_instance();
 
 	QuickAvatarMoverProcess *p =
-	    p_dynamic_cast<QuickAvatarMoverProcess *>(kernel->getProcess(amp[_dir]));
+	    p_dynamic_cast<QuickAvatarMoverProcess *>(kernel->getProcess(amp[dir]));
 
 	if (p && !p->is_terminated())
 		p->terminate();
 }
 
-void QuickAvatarMoverProcess::startMover(int x, int y, int z, int _dir) {
+void QuickAvatarMoverProcess::startMover(int x, int y, int z, int dir) {
 	Ultima8Engine *g = Ultima8Engine::get_instance();
 	if (! g->isAvatarInStasis()) {
-		Process *p = new QuickAvatarMoverProcess(x, y, z, _dir);
+		Process *p = new QuickAvatarMoverProcess(x, y, z, dir);
 		Kernel::get_instance()->addProcess(p);
 	} else {
 		pout << "Can't: avatarInStasis" << Std::endl;
diff --git a/engines/ultima/ultima8/world/current_map.cpp b/engines/ultima/ultima8/world/current_map.cpp
index 9fb9395..214d6e5 100644
--- a/engines/ultima/ultima8/world/current_map.cpp
+++ b/engines/ultima/ultima8/world/current_map.cpp
@@ -316,14 +316,14 @@ void CurrentMap::removeItemFromList(Item *item, int32 oldx, int32 oldy) {
 }
 
 // Check to see if the chunk is on the screen
-static inline bool ChunkOnScreen(int32 cx, int32 cy, int32 sleft, int32 stop, int32 sright, int32 sbot, int _mapChunkSize) {
-	int32 scx = (cx * _mapChunkSize - cy * _mapChunkSize) / 4;
-	int32 scy = ((cx * _mapChunkSize + cy * _mapChunkSize) / 8);
+static inline bool ChunkOnScreen(int32 cx, int32 cy, int32 sleft, int32 stop, int32 sright, int32 sbot, int mapChunkSize) {
+	int32 scx = (cx * mapChunkSize - cy * mapChunkSize) / 4;
+	int32 scy = ((cx * mapChunkSize + cy * mapChunkSize) / 8);
 
 	// Screenspace bounding box left extent    (LNT x coord)
-	int32 cxleft = scx - _mapChunkSize / 4;
+	int32 cxleft = scx - mapChunkSize / 4;
 	// Screenspace bounding box right extent   (RFT x coord)
-	int32 cxright = scx + _mapChunkSize / 4;
+	int32 cxright = scx + mapChunkSize / 4;
 
 	// Screenspace bounding box top extent     (LFT y coord)
 	int32 cytop = scy - 256;
diff --git a/engines/ultima/ultima8/world/item.cpp b/engines/ultima/ultima8/world/item.cpp
index 379c0f7..b1a6428 100644
--- a/engines/ultima/ultima8/world/item.cpp
+++ b/engines/ultima/ultima8/world/item.cpp
@@ -1820,63 +1820,63 @@ uint32 Item::I_getX(const uint8 *args, unsigned int /*argsize*/) {
 	ARG_ITEM_FROM_PTR(item);
 	if (!item) return 0;
 
-	int32 _x, _y, _z;
-	item->getLocationAbsolute(_x, _y, _z);
-	return _x;
+	int32 x, y, z;
+	item->getLocationAbsolute(x, y, z);
+	return x;
 }
 
 uint32 Item::I_getY(const uint8 *args, unsigned int /*argsize*/) {
 	ARG_ITEM_FROM_PTR(item);
 	if (!item) return 0;
 
-	int32 _x, _y, _z;
-	item->getLocationAbsolute(_x, _y, _z);
-	return _y;
+	int32 x, y, z;
+	item->getLocationAbsolute(x, y, z);
+	return y;
 }
 
 uint32 Item::I_getZ(const uint8 *args, unsigned int /*argsize*/) {
 	ARG_ITEM_FROM_PTR(item);
 	if (!item) return 0;
 
-	int32 _x, _y, _z;
-	item->getLocationAbsolute(_x, _y, _z);
-	return _z;
+	int32 x, y, z;
+	item->getLocationAbsolute(x, y, z);
+	return z;
 }
 
 uint32 Item::I_getCX(const uint8 *args, unsigned int /*argsize*/) {
 	ARG_ITEM_FROM_PTR(item);
 	if (!item) return 0;
 
-	int32 _x, _y, _z;
-	item->getLocationAbsolute(_x, _y, _z);
+	int32 x, y, z;
+	item->getLocationAbsolute(x, y, z);
 
 	if (item->_flags & FLG_FLIPPED)
-		return _x - item->getShapeInfo()->_y * 16;
+		return x - item->getShapeInfo()->_y * 16;
 	else
-		return _x - item->getShapeInfo()->_x * 16;
+		return x - item->getShapeInfo()->_x * 16;
 }
 
 uint32 Item::I_getCY(const uint8 *args, unsigned int /*argsize*/) {
 	ARG_ITEM_FROM_PTR(item);
 	if (!item) return 0;
 
-	int32 _x, _y, _z;
-	item->getLocationAbsolute(_x, _y, _z);
+	int32 x, y, z;
+	item->getLocationAbsolute(x, y, z);
 
 	if (item->_flags & FLG_FLIPPED)
-		return _y - item->getShapeInfo()->_x * 16;
+		return y - item->getShapeInfo()->_x * 16;
 	else
-		return _y - item->getShapeInfo()->_y * 16;
+		return y - item->getShapeInfo()->_y * 16;
 }
 
 uint32 Item::I_getCZ(const uint8 *args, unsigned int /*argsize*/) {
 	ARG_ITEM_FROM_PTR(item);
 	if (!item) return 0;
 
-	int32 _x, _y, _z;
-	item->getLocationAbsolute(_x, _y, _z);
+	int32 x, y, z;
+	item->getLocationAbsolute(x, y, z);
 
-	return _z + item->getShapeInfo()->_z * 4;
+	return z + item->getShapeInfo()->_z * 4;
 }
 
 uint32 Item::I_getPoint(const uint8 *args, unsigned int /*argsize*/) {
@@ -1884,13 +1884,13 @@ uint32 Item::I_getPoint(const uint8 *args, unsigned int /*argsize*/) {
 	ARG_UC_PTR(ptr);
 	if (!item) return 0;
 
-	int32 _x, _y, _z;
-	item->getLocationAbsolute(_x, _y, _z);
+	int32 x, y, z;
+	item->getLocationAbsolute(x, y, z);
 
 	WorldPoint point;
-	point.setX(_x);
-	point.setY(_y);
-	point.setZ(_z);
+	point.setX(x);
+	point.setY(y);
+	point.setZ(z);
 
 	UCMachine::get_instance()->assignPointer(ptr, point._buf, 5);
 
@@ -2334,19 +2334,19 @@ uint32 Item::I_getFootpadData(const uint8 *args, unsigned int /*argsize*/) {
 	if (!item) return 0;
 
 	uint8 buf[2];
-	int32 _x, _y, _z;
-	item->getFootpadData(_x, _y, _z);
+	int32 x, y, z;
+	item->getFootpadData(x, y, z);
 
-	buf[0] = static_cast<uint8>(_x);
-	buf[1] = static_cast<uint8>(_x >> 8);
+	buf[0] = static_cast<uint8>(x);
+	buf[1] = static_cast<uint8>(x >> 8);
 	UCMachine::get_instance()->assignPointer(xptr, buf, 2);
 
-	buf[0] = static_cast<uint8>(_y);
-	buf[1] = static_cast<uint8>(_y >> 8);
+	buf[0] = static_cast<uint8>(y);
+	buf[1] = static_cast<uint8>(y >> 8);
 	UCMachine::get_instance()->assignPointer(yptr, buf, 2);
 
-	buf[0] = static_cast<uint8>(_z);
-	buf[1] = static_cast<uint8>(_z >> 8);
+	buf[0] = static_cast<uint8>(z);
+	buf[1] = static_cast<uint8>(z >> 8);
 	UCMachine::get_instance()->assignPointer(zptr, buf, 2);
 
 	return 0;
diff --git a/engines/ultima/ultima8/world/item_sorter.cpp b/engines/ultima/ultima8/world/item_sorter.cpp
index f44c033..67d8c80 100644
--- a/engines/ultima/ultima8/world/item_sorter.cpp
+++ b/engines/ultima/ultima8/world/item_sorter.cpp
@@ -640,7 +640,7 @@ void ItemSorter::BeginDisplayList(RenderSurface *rs,
 	_camSy = (camx + camy) / 8 - camz;
 }
 
-void ItemSorter::AddItem(int32 x, int32 y, int32 z, uint32 _shapeNum, uint32 frame_num, uint32 flags, uint32 ext_flags, uint16 _itemNum) {
+void ItemSorter::AddItem(int32 x, int32 y, int32 z, uint32 shapeNum, uint32 frame_num, uint32 flags, uint32 ext_flags, uint16 itemNum) {
 	//if (z > skip_lift) return;
 	//if (Application::tgwds && _shape == 538) return;
 
@@ -648,9 +648,9 @@ void ItemSorter::AddItem(int32 x, int32 y, int32 z, uint32 _shapeNum, uint32 fra
 	if (!_itemsUnused) _itemsUnused = new SortItem(0);
 	SortItem *si = _itemsUnused;
 
-	si->_itemNum = _itemNum;
-	si->_shape = _shapes->getShape(_shapeNum);
-	si->_shapeNum = _shapeNum;
+	si->_itemNum = itemNum;
+	si->_shape = _shapes->getShape(shapeNum);
+	si->_shapeNum = shapeNum;
 	si->_frame = frame_num;
 	ShapeFrame *_frame = si->_shape->getFrame(si->_frame);
 	if (!_frame) {
@@ -659,7 +659,7 @@ void ItemSorter::AddItem(int32 x, int32 y, int32 z, uint32 _shapeNum, uint32 fra
 		return;
 	}
 
-	ShapeInfo *info = _shapes->getShapeInfo(_shapeNum);
+	ShapeInfo *info = _shapes->getShapeInfo(shapeNum);
 
 	//if (info->is_editor && !show_editor_items) return;
 	//if (info->z > shape_max_height) return;
diff --git a/engines/ultima/ultima8/world/sprite_process.cpp b/engines/ultima/ultima8/world/sprite_process.cpp
index 4fd46d2..fc1c122 100644
--- a/engines/ultima/ultima8/world/sprite_process.cpp
+++ b/engines/ultima/ultima8/world/sprite_process.cpp
@@ -92,7 +92,7 @@ void SpriteProcess::run() {
 // createSprite(_shape, _frame, end,               _delay, _x, _y, _z);
 // createSprite(_shape, _frame, end, unk, _repeats, _delay, _x, _y, _z);
 uint32 SpriteProcess::I_createSprite(const uint8 *args, unsigned int argsize) {
-	int _repeats = 1;
+	int repeats = 1;
 	ARG_SINT16(_shape);
 	ARG_SINT16(_frame);
 	ARG_SINT16(_lastFrame);
@@ -100,14 +100,14 @@ uint32 SpriteProcess::I_createSprite(const uint8 *args, unsigned int argsize) {
 	if (argsize == 18) {
 		ARG_SINT16(unknown);
 		ARG_SINT16(repeats_count);
-		_repeats = repeats_count;
+		repeats = repeats_count;
 	}
 
 	ARG_SINT16(_delay);
 	ARG_UINT16(_x);
 	ARG_UINT16(_y);
 	ARG_UINT8(_z);
-	Process *p = new SpriteProcess(_shape, _frame, _lastFrame, _repeats, _delay, _x, _y, _z);
+	Process *p = new SpriteProcess(_shape, _frame, _lastFrame, repeats, _delay, _x, _y, _z);
 	return Kernel::get_instance()->addProcess(p);
 }
 




More information about the Scummvm-git-logs mailing list