[Scummvm-cvs-logs] scummvm master -> 42c9b405f1d7a6e4e3a117579a126f290c6d895a

Littleboy littleboy22 at gmail.com
Sat Jul 28 05:25:48 CEST 2012


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

Summary:
e91001a164 LASTEXPRESS: Remove templated resetCurrentParameters() function
94e2ea10cd LASTEXPRESS: Add menu-related warnings and turn some warnings into errors
d8acba294d LASTEXPRESS: Add IgnoreSubtype option to AnimFrame
839ad1303f LASTEXPRESS: Fix some formatting issues
7084f6a464 CONFIGURE: Add MSCV11 handling to ideprojects target
42c9b405f1 LASTEXPRESS: Untemplatize setup functions


Commit: e91001a1642ee8ba8b834f1908247c12d194e0b2
    https://github.com/scummvm/scummvm/commit/e91001a1642ee8ba8b834f1908247c12d194e0b2
Author: Littleboy (littleboy at scummvm.org)
Date: 2012-07-27T10:36:21-07:00

Commit Message:
LASTEXPRESS: Remove templated resetCurrentParameters() function

Changed paths:
    engines/lastexpress/entities/entity.cpp
    engines/lastexpress/entities/entity.h



diff --git a/engines/lastexpress/entities/entity.cpp b/engines/lastexpress/entities/entity.cpp
index 0842a7a..aff9445 100644
--- a/engines/lastexpress/entities/entity.cpp
+++ b/engines/lastexpress/entities/entity.cpp
@@ -598,7 +598,7 @@ void Entity::setup(const char *name, uint index) {
 
 	_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
 	_data->setCurrentCallback(index);
-	_data->resetCurrentParameters<EntityData::EntityParametersIIII>();
+	RESET_PARAMS(_data, EntityData::EntityParametersIIII);
 
 	_engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault);
 }
@@ -608,7 +608,7 @@ void Entity::setupS(const char *name, uint index, const char *seq1) {
 
 	_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
 	_data->setCurrentCallback(index);
-	_data->resetCurrentParameters<EntityData::EntityParametersSIIS>();
+	RESET_PARAMS(_data, EntityData::EntityParametersSIIS);
 
 	EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters();
 	strncpy((char *)&params->seq1, seq1, 12);
@@ -621,7 +621,7 @@ void Entity::setupSS(const char *name, uint index, const char *seq1, const char
 
 	_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
 	_data->setCurrentCallback(index);
-	_data->resetCurrentParameters<EntityData::EntityParametersSSII>();
+	RESET_PARAMS(_data, EntityData::EntityParametersSSII);
 
 	EntityData::EntityParametersSSII *params = (EntityData::EntityParametersSSII*)_data->getCurrentParameters();
 	strncpy((char *)&params->seq1, seq1, 12);
diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h
index e890bba..e2514a6 100644
--- a/engines/lastexpress/entities/entity.h
+++ b/engines/lastexpress/entities/entity.h
@@ -122,6 +122,13 @@ struct SavePoint;
 	if (!params) \
 		error("[EXPOSE_PARAMS] Trying to call an entity function with invalid parameters"); \
 
+#define RESET_PARAMS(data, type) do { \
+	EntityData::EntityCallParameters *callParameters = data->getCurrentCallParameters(); \
+	callParameters->clear(); \
+	for (int i = 0; i < 4; i++) \
+		callParameters->parameters[i] = new type(); \
+} while (false)
+
 // function signature without setup (we keep the index for consistency but never use it)
 #define IMPLEMENT_FUNCTION_NOSETUP(index, class, name) \
 	void class::name(const SavePoint &savepoint) { \
@@ -835,29 +842,21 @@ public:
 
 	EntityData() {}
 
-	template<class T>
-	void resetCurrentParameters() {
-		EntityCallParameters *params = &_parameters[_data.currentCall];
-		params->clear();
-
-		for (int i = 0; i < 4; i++)
-			params->parameters[i] = new T();
-	}
-
-	EntityCallData 	  *getCallData() { return &_data; }
+	EntityCallData       *getCallData() { return &_data; }
 
-	EntityParameters  *getParameters(uint callback, byte index) const;
-	EntityParameters  *getCurrentParameters(byte index = 0) { return getParameters(_data.currentCall, index); }
+	EntityParameters     *getParameters(uint callback, byte index) const;
+	EntityParameters     *getCurrentParameters(byte index = 0) { return getParameters(_data.currentCall, index); }
+	EntityCallParameters *getCurrentCallParameters() { return &_parameters[_data.currentCall]; }
 
-	int                getCallback(uint callback) const;
-	int                getCurrentCallback() { return getCallback(_data.currentCall); }
-	void               setCallback(uint callback, byte index);
-	void               setCurrentCallback(uint index) { setCallback(_data.currentCall, index); }
+	int                   getCallback(uint callback) const;
+	int                   getCurrentCallback() { return getCallback(_data.currentCall); }
+	void                  setCallback(uint callback, byte index);
+	void                  setCurrentCallback(uint index) { setCallback(_data.currentCall, index); }
 
-	void               updateParameters(uint32 index) const;
+	void                  updateParameters(uint32 index) const;
 
 	// Serializable
-	void               saveLoadWithSerializer(Common::Serializer &ser);
+	void                  saveLoadWithSerializer(Common::Serializer &ser);
 
 private:
 
@@ -1078,7 +1077,7 @@ protected:
 
 		_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
 		_data->setCurrentCallback(index);
-		_data->resetCurrentParameters<EntityData::EntityParametersIIII>();
+		RESET_PARAMS(_data, EntityData::EntityParametersIIII);
 
 		EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII*)_data->getCurrentParameters();
 		params->param1 = (unsigned int)param1;
@@ -1092,7 +1091,7 @@ protected:
 
 		_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
 		_data->setCurrentCallback(index);
-		_data->resetCurrentParameters<EntityData::EntityParametersIIII>();
+		RESET_PARAMS(_data, EntityData::EntityParametersIIII);
 
 		EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII*)_data->getCurrentParameters();
 		params->param1 = param1;
@@ -1107,7 +1106,7 @@ protected:
 
 		_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
 		_data->setCurrentCallback(index);
-		_data->resetCurrentParameters<EntityData::EntityParametersIIII>();
+		RESET_PARAMS(_data, EntityData::EntityParametersIIII);
 
 		EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII*)_data->getCurrentParameters();
 		params->param1 = param1;
@@ -1123,7 +1122,7 @@ protected:
 
 		_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
 		_data->setCurrentCallback(index);
-		_data->resetCurrentParameters<EntityData::EntityParametersSIIS>();
+		RESET_PARAMS(_data, EntityData::EntityParametersSIIS);
 
 		EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters();
 		strncpy((char *)&params->seq1, seq1, 12);
@@ -1138,7 +1137,7 @@ protected:
 
 		_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
 		_data->setCurrentCallback(index);
-		_data->resetCurrentParameters<EntityData::EntityParametersSIIS>();
+		RESET_PARAMS(_data, EntityData::EntityParametersSIIS);
 
 		EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters();
 		strncpy((char *)&params->seq1, seq1, 12);
@@ -1154,7 +1153,7 @@ protected:
 
 		_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
 		_data->setCurrentCallback(index);
-		_data->resetCurrentParameters<EntityData::EntityParametersSIII>();
+		RESET_PARAMS(_data, EntityData::EntityParametersSIII);
 
 		EntityData::EntityParametersSIII *params = (EntityData::EntityParametersSIII*)_data->getCurrentParameters();
 		strncpy((char *)&params->seq, seq, 12);
@@ -1171,7 +1170,7 @@ protected:
 
 		_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
 		_data->setCurrentCallback(index);
-		_data->resetCurrentParameters<EntityData::EntityParametersSIIS>();
+		RESET_PARAMS(_data, EntityData::EntityParametersSIIS);
 
 		EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters();
 		strncpy((char *)&params->seq1, seq1, 12);
@@ -1188,7 +1187,7 @@ protected:
 
 		_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
 		_data->setCurrentCallback(index);
-		_data->resetCurrentParameters<EntityData::EntityParametersSSII>();
+		RESET_PARAMS(_data, EntityData::EntityParametersSSII);
 
 		EntityData::EntityParametersSSII *params = (EntityData::EntityParametersSSII*)_data->getCurrentParameters();
 		strncpy((char *)&params->seq1, seq1, 12);
@@ -1204,7 +1203,7 @@ protected:
 
 		_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
 		_data->setCurrentCallback(index);
-		_data->resetCurrentParameters<EntityData::EntityParametersISII>();
+		RESET_PARAMS(_data, EntityData::EntityParametersISII);
 
 		EntityData::EntityParametersISII *params = (EntityData::EntityParametersISII*)_data->getCurrentParameters();
 		params->param1 = (unsigned int)param1;
@@ -1219,7 +1218,7 @@ protected:
 
 		_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
 		_data->setCurrentCallback(index);
-		_data->resetCurrentParameters<EntityData::EntityParametersISSI>();
+		RESET_PARAMS(_data, EntityData::EntityParametersISSI);
 
 		EntityData::EntityParametersISSI *params = (EntityData::EntityParametersISSI*)_data->getCurrentParameters();
 		params->param1 = param1;
@@ -1235,7 +1234,7 @@ protected:
 
 		_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
 		_data->setCurrentCallback(index);
-		_data->resetCurrentParameters<EntityData::EntityParametersIISI>();
+		RESET_PARAMS(_data, EntityData::EntityParametersIISI);
 
 		EntityData::EntityParametersIISI *params = (EntityData::EntityParametersIISI*)_data->getCurrentParameters();
 		params->param1 = param1;
@@ -1251,7 +1250,7 @@ protected:
 
 		_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
 		_data->setCurrentCallback(index);
-		_data->resetCurrentParameters<EntityData::EntityParametersIISS>();
+		RESET_PARAMS(_data, EntityData::EntityParametersIISS);
 
 		EntityData::EntityParametersIISS *params = (EntityData::EntityParametersIISS*)_data->getCurrentParameters();
 		params->param1 = param1;


Commit: 94e2ea10cd9f5caf7a560b7f1def0f23da9046a5
    https://github.com/scummvm/scummvm/commit/94e2ea10cd9f5caf7a560b7f1def0f23da9046a5
Author: Littleboy (littleboy at scummvm.org)
Date: 2012-07-27T10:42:06-07:00

Commit Message:
LASTEXPRESS: Add menu-related warnings and turn some warnings into errors

Changed paths:
    engines/lastexpress/game/action.cpp
    engines/lastexpress/game/savegame.cpp
    engines/lastexpress/menu/menu.cpp
    engines/lastexpress/sound/entry.cpp



diff --git a/engines/lastexpress/game/action.cpp b/engines/lastexpress/game/action.cpp
index 1e5bc0f..4d1c786 100644
--- a/engines/lastexpress/game/action.cpp
+++ b/engines/lastexpress/game/action.cpp
@@ -404,7 +404,7 @@ SceneIndex Action::processHotspot(const SceneHotspot &hotspot) {
 //////////////////////////////////////////////////////////////////////////
 // Action 0
 IMPLEMENT_ACTION(dummy)
-	warning("[Action::action_dummy] Dummy action function called (hotspot action: %d)", hotspot.action);
+	error("[Action::action_dummy] Dummy action function called (hotspot action: %d)", hotspot.action);
 
 	return kSceneInvalid;
 }
diff --git a/engines/lastexpress/game/savegame.cpp b/engines/lastexpress/game/savegame.cpp
index 4c268d8..a8fb5c5 100644
--- a/engines/lastexpress/game/savegame.cpp
+++ b/engines/lastexpress/game/savegame.cpp
@@ -257,7 +257,7 @@ void SaveLoad::saveGame(SavegameType type, EntityIndex entity, uint32 value) {
 		entry.saveLoadWithSerializer(ser);
 
 		if (!entry.isValid()) {
-			warning("[SaveLoad::saveGame] Invalid entry. This savegame might be corrupted");
+			error("[SaveLoad::saveGame] Invalid entry. This savegame might be corrupted");
 			_savegame->seek(header.offset);
 		} else if (getState()->time < entry.time || (type == kSavegameTypeTickInterval && getState()->time == entry.time)) {
 			// Not ready to save a game, skipping!
diff --git a/engines/lastexpress/menu/menu.cpp b/engines/lastexpress/menu/menu.cpp
index 7095389..6a453ae 100644
--- a/engines/lastexpress/menu/menu.cpp
+++ b/engines/lastexpress/menu/menu.cpp
@@ -864,7 +864,7 @@ void Menu::init(bool doSavegame, SavegameType type, uint32 value) {
 
 		doSavegame = false;
 	} else {
-		// TODO rename saves?
+		warning("[Menu::initGame] Renaming saves not implemented");
 	}
 
 	// Create a new savegame if needed
@@ -875,7 +875,7 @@ void Menu::init(bool doSavegame, SavegameType type, uint32 value) {
 		getSaveLoad()->saveGame(kSavegameTypeEvent2, kEntityPlayer, kEventNone);
 
 	if (!getGlobalTimer()) {
-		// TODO: remove existing savegame temp file
+		warning("[Menu::initGame] Removing temporary saves not implemented");
 	}
 
 	// Init savegame & menu values
diff --git a/engines/lastexpress/sound/entry.cpp b/engines/lastexpress/sound/entry.cpp
index d689447..f2a063e 100644
--- a/engines/lastexpress/sound/entry.cpp
+++ b/engines/lastexpress/sound/entry.cpp
@@ -117,7 +117,7 @@ void SoundEntry::close() {
 
 void SoundEntry::play() {
 	if (!_stream) {
-		warning("[SoundEntry::play] stream has been disposed");
+		error("[SoundEntry::play] stream has been disposed");
 		return;
 	}
 


Commit: d8acba294d7898ffff70ea679579cd8ae5eab0a7
    https://github.com/scummvm/scummvm/commit/d8acba294d7898ffff70ea679579cd8ae5eab0a7
Author: Littleboy (littleboy at scummvm.org)
Date: 2012-07-27T13:09:35-07:00

Commit Message:
LASTEXPRESS: Add IgnoreSubtype option to AnimFrame

Changed paths:
    engines/lastexpress/data/animation.cpp
    engines/lastexpress/data/sequence.cpp
    engines/lastexpress/data/sequence.h



diff --git a/engines/lastexpress/data/animation.cpp b/engines/lastexpress/data/animation.cpp
index ce42acb..7618259 100644
--- a/engines/lastexpress/data/animation.cpp
+++ b/engines/lastexpress/data/animation.cpp
@@ -230,7 +230,7 @@ AnimFrame *Animation::processChunkFrame(Common::SeekableReadStream *in, const Ch
 	i.read(str, false);
 
 	// Decode the frame
-	AnimFrame *f = new AnimFrame(str, i);
+	AnimFrame *f = new AnimFrame(str, i, true);
 
 	// Delete the temporary chunk buffer
 	delete str;
diff --git a/engines/lastexpress/data/sequence.cpp b/engines/lastexpress/data/sequence.cpp
index e1e0d9b..a5bcba8 100644
--- a/engines/lastexpress/data/sequence.cpp
+++ b/engines/lastexpress/data/sequence.cpp
@@ -76,7 +76,7 @@ void FrameInfo::read(Common::SeekableReadStream *in, bool isSequence) {
 
 // AnimFrame
 
-AnimFrame::AnimFrame(Common::SeekableReadStream *in, const FrameInfo &f) : _palette(NULL) {
+AnimFrame::AnimFrame(Common::SeekableReadStream *in, const FrameInfo &f, bool ignoreSubtype) : _palette(NULL), _ignoreSubtype(ignoreSubtype) {
 	_palSize = 1;
 	// TODO: use just the needed rectangle
 	_image.create(640, 480, Graphics::PixelFormat::createFormatCLUT8());
diff --git a/engines/lastexpress/data/sequence.h b/engines/lastexpress/data/sequence.h
index 9987eae..610a55c 100644
--- a/engines/lastexpress/data/sequence.h
+++ b/engines/lastexpress/data/sequence.h
@@ -49,8 +49,9 @@
 	    byte {1}      - Compression type
 	    byte {1}      - Subtype (determines which set of decompression functions will be called) => 0, 1, 2, 3
 	    byte {1}      - Unknown
+	    byte {1}      - Keep previous frame while drawing
+	    byte {1}      - Unknown
 	    byte {1}      - Unknown
-		uint16 {2}    - Unknown
 	    byte {1}      - Sound action
 	    byte {1}      - Unknown
 	    uint32 {4}    - positionId
@@ -129,7 +130,7 @@ struct FrameInfo {
 
 class AnimFrame : public Drawable {
 public:
-	AnimFrame(Common::SeekableReadStream *in, const FrameInfo &f);
+	AnimFrame(Common::SeekableReadStream *in, const FrameInfo &f, bool ignoreSubtype = false);
 	~AnimFrame();
 	Common::Rect draw(Graphics::Surface *s);
 
@@ -146,6 +147,7 @@ private:
 	uint16 _palSize;
 	uint16 *_palette;
 	Common::Rect _rect;
+	bool _ignoreSubtype;
 };
 
 class Sequence {


Commit: 839ad1303f67b83f4383fb448463363e1e9f64fc
    https://github.com/scummvm/scummvm/commit/839ad1303f67b83f4383fb448463363e1e9f64fc
Author: Littleboy (littleboy at scummvm.org)
Date: 2012-07-27T17:07:03-07:00

Commit Message:
LASTEXPRESS: Fix some formatting issues

Changed paths:
    engines/lastexpress/entities/entity.h
    engines/lastexpress/game/entities.cpp
    engines/lastexpress/game/scenes.cpp
    engines/lastexpress/sound/sound.cpp



diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h
index e2514a6..0b1db13 100644
--- a/engines/lastexpress/entities/entity.h
+++ b/engines/lastexpress/entities/entity.h
@@ -275,7 +275,7 @@ struct SavePoint;
 class EntityData : Common::Serializable {
 public:
 
-	struct EntityParameters : Common::Serializable{
+	struct EntityParameters : Common::Serializable {
 		virtual ~EntityParameters() {}
 		virtual Common::String toString() = 0;
 
@@ -1079,7 +1079,7 @@ protected:
 		_data->setCurrentCallback(index);
 		RESET_PARAMS(_data, EntityData::EntityParametersIIII);
 
-		EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII*)_data->getCurrentParameters();
+		EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII *)_data->getCurrentParameters();
 		params->param1 = (unsigned int)param1;
 
 		_engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault);
@@ -1093,7 +1093,7 @@ protected:
 		_data->setCurrentCallback(index);
 		RESET_PARAMS(_data, EntityData::EntityParametersIIII);
 
-		EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII*)_data->getCurrentParameters();
+		EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII *)_data->getCurrentParameters();
 		params->param1 = param1;
 		params->param2 = param2;
 
@@ -1108,7 +1108,7 @@ protected:
 		_data->setCurrentCallback(index);
 		RESET_PARAMS(_data, EntityData::EntityParametersIIII);
 
-		EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII*)_data->getCurrentParameters();
+		EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII *)_data->getCurrentParameters();
 		params->param1 = param1;
 		params->param2 = param2;
 		params->param3 = param3;
@@ -1124,7 +1124,7 @@ protected:
 		_data->setCurrentCallback(index);
 		RESET_PARAMS(_data, EntityData::EntityParametersSIIS);
 
-		EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters();
+		EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS *)_data->getCurrentParameters();
 		strncpy((char *)&params->seq1, seq1, 12);
 		params->param4 = param4;
 
@@ -1139,7 +1139,7 @@ protected:
 		_data->setCurrentCallback(index);
 		RESET_PARAMS(_data, EntityData::EntityParametersSIIS);
 
-		EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters();
+		EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS *)_data->getCurrentParameters();
 		strncpy((char *)&params->seq1, seq1, 12);
 		params->param4 = param4;
 		params->param5 = param5;
@@ -1155,7 +1155,7 @@ protected:
 		_data->setCurrentCallback(index);
 		RESET_PARAMS(_data, EntityData::EntityParametersSIII);
 
-		EntityData::EntityParametersSIII *params = (EntityData::EntityParametersSIII*)_data->getCurrentParameters();
+		EntityData::EntityParametersSIII *params = (EntityData::EntityParametersSIII *)_data->getCurrentParameters();
 		strncpy((char *)&params->seq, seq, 12);
 		params->param4 = param4;
 		params->param5 = param5;
@@ -1172,7 +1172,7 @@ protected:
 		_data->setCurrentCallback(index);
 		RESET_PARAMS(_data, EntityData::EntityParametersSIIS);
 
-		EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters();
+		EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS *)_data->getCurrentParameters();
 		strncpy((char *)&params->seq1, seq1, 12);
 		params->param4 = param4;
 		params->param5 = param5;
@@ -1189,7 +1189,7 @@ protected:
 		_data->setCurrentCallback(index);
 		RESET_PARAMS(_data, EntityData::EntityParametersSSII);
 
-		EntityData::EntityParametersSSII *params = (EntityData::EntityParametersSSII*)_data->getCurrentParameters();
+		EntityData::EntityParametersSSII *params = (EntityData::EntityParametersSSII *)_data->getCurrentParameters();
 		strncpy((char *)&params->seq1, seq1, 12);
 		strncpy((char *)&params->seq2, seq2, 12);
 		params->param7 = param7;
@@ -1205,7 +1205,7 @@ protected:
 		_data->setCurrentCallback(index);
 		RESET_PARAMS(_data, EntityData::EntityParametersISII);
 
-		EntityData::EntityParametersISII *params = (EntityData::EntityParametersISII*)_data->getCurrentParameters();
+		EntityData::EntityParametersISII *params = (EntityData::EntityParametersISII *)_data->getCurrentParameters();
 		params->param1 = (unsigned int)param1;
 		strncpy((char *)&params->seq, seq, 12);
 
@@ -1220,7 +1220,7 @@ protected:
 		_data->setCurrentCallback(index);
 		RESET_PARAMS(_data, EntityData::EntityParametersISSI);
 
-		EntityData::EntityParametersISSI *params = (EntityData::EntityParametersISSI*)_data->getCurrentParameters();
+		EntityData::EntityParametersISSI *params = (EntityData::EntityParametersISSI *)_data->getCurrentParameters();
 		params->param1 = param1;
 		strncpy((char *)&params->seq1, seq1, 12);
 		strncpy((char *)&params->seq2, seq2, 12);
@@ -1236,7 +1236,7 @@ protected:
 		_data->setCurrentCallback(index);
 		RESET_PARAMS(_data, EntityData::EntityParametersIISI);
 
-		EntityData::EntityParametersIISI *params = (EntityData::EntityParametersIISI*)_data->getCurrentParameters();
+		EntityData::EntityParametersIISI *params = (EntityData::EntityParametersIISI *)_data->getCurrentParameters();
 		params->param1 = param1;
 		params->param2 = param2;
 		strncpy((char *)&params->seq, seq, 12);
@@ -1252,7 +1252,7 @@ protected:
 		_data->setCurrentCallback(index);
 		RESET_PARAMS(_data, EntityData::EntityParametersIISS);
 
-		EntityData::EntityParametersIISS *params = (EntityData::EntityParametersIISS*)_data->getCurrentParameters();
+		EntityData::EntityParametersIISS *params = (EntityData::EntityParametersIISS *)_data->getCurrentParameters();
 		params->param1 = param1;
 		params->param2 = param2;
 		strncpy((char *)&params->seq1, seq1, 12);
diff --git a/engines/lastexpress/game/entities.cpp b/engines/lastexpress/game/entities.cpp
index 29cc7d8..51db635 100644
--- a/engines/lastexpress/game/entities.cpp
+++ b/engines/lastexpress/game/entities.cpp
@@ -2278,7 +2278,7 @@ label_process_entity:
 
 							if (getScenes()->checkPosition(kSceneNone, SceneManager::kCheckPositionLookingUp)) {
 								 getSavePoints()->push(kEntityPlayer, entity, kActionExcuseMeCath);
-							} else if (getScenes()->checkPosition(kSceneNone, SceneManager::kCheckPositionLookingDown) || getScenes()->checkCurrentPosition(false)){
+							} else if (getScenes()->checkPosition(kSceneNone, SceneManager::kCheckPositionLookingDown) || getScenes()->checkCurrentPosition(false)) {
 								 getSavePoints()->push(kEntityPlayer, entity, kActionExcuseMe);
 
 								 if (getScenes()->checkCurrentPosition(false))
diff --git a/engines/lastexpress/game/scenes.cpp b/engines/lastexpress/game/scenes.cpp
index 447e871..3cda900 100644
--- a/engines/lastexpress/game/scenes.cpp
+++ b/engines/lastexpress/game/scenes.cpp
@@ -489,7 +489,7 @@ bool SceneManager::checkCurrentPosition(bool doCheckOtherCars) const {
 	if (position == 99)
 		return true;
 
-	switch (car){
+	switch (car) {
 	default:
 		break;
 
diff --git a/engines/lastexpress/sound/sound.cpp b/engines/lastexpress/sound/sound.cpp
index 4f6a7b8..319f7cd 100644
--- a/engines/lastexpress/sound/sound.cpp
+++ b/engines/lastexpress/sound/sound.cpp
@@ -674,7 +674,7 @@ const char *SoundManager::getDialogName(EntityIndex entity) const {
 //////////////////////////////////////////////////////////////////////////
 // Letters & Messages
 //////////////////////////////////////////////////////////////////////////
-void SoundManager::readText(int id){
+void SoundManager::readText(int id) {
 	if (!_queue->isBuffered(kEntityTables4))
 		return;
 


Commit: 7084f6a46498cb81d0960fe46d44ae17f2784476
    https://github.com/scummvm/scummvm/commit/7084f6a46498cb81d0960fe46d44ae17f2784476
Author: Littleboy (littleboy at scummvm.org)
Date: 2012-07-27T17:07:18-07:00

Commit Message:
CONFIGURE: Add MSCV11 handling to ideprojects target

Changed paths:
    ports.mk



diff --git a/ports.mk b/ports.mk
index 357a7e2..9a20331 100644
--- a/ports.mk
+++ b/ports.mk
@@ -293,6 +293,8 @@ endif
 	@cd $(srcdir)/dists/msvc9 && ../../devtools/create_project/create_project ../.. --msvc --msvc-version 9 >/dev/null && git add -f *.sln *.vcproj *.vsprops
 	@echo Creating MSVC10 project files...
 	@cd $(srcdir)/dists/msvc10 && ../../devtools/create_project/create_project ../.. --msvc --msvc-version 10 >/dev/null && git add -f *.sln *.vcxproj *.vcxproj.filters *.props
+	@echo Creating MSVC11 project files...
+	@cd $(srcdir)/dists/msvc11 && ../../devtools/create_project/create_project ../.. --msvc --msvc-version 11 >/dev/null && git add -f *.sln *.vcxproj *.vcxproj.filters *.props
 	@echo
 	@echo All is done.
 	@echo Now run


Commit: 42c9b405f1d7a6e4e3a117579a126f290c6d895a
    https://github.com/scummvm/scummvm/commit/42c9b405f1d7a6e4e3a117579a126f290c6d895a
Author: Littleboy (littleboy at scummvm.org)
Date: 2012-07-27T20:23:17-07:00

Commit Message:
LASTEXPRESS: Untemplatize setup functions

Changed paths:
    engines/lastexpress/entities/entity.cpp
    engines/lastexpress/entities/entity.h



diff --git a/engines/lastexpress/entities/entity.cpp b/engines/lastexpress/entities/entity.cpp
index aff9445..4b1fda9 100644
--- a/engines/lastexpress/entities/entity.cpp
+++ b/engines/lastexpress/entities/entity.cpp
@@ -598,7 +598,49 @@ void Entity::setup(const char *name, uint index) {
 
 	_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
 	_data->setCurrentCallback(index);
-	RESET_PARAMS(_data, EntityData::EntityParametersIIII);
+	_data->resetCurrentParameters<EntityData::EntityParametersIIII>();
+
+	_engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault);
+}
+
+void Entity::setupI(const char *name, uint index, uint param1) {
+	debugC(6, kLastExpressDebugLogic, "Entity: %s(%u)", name, param1);
+
+	_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
+	_data->setCurrentCallback(index);
+	_data->resetCurrentParameters<EntityData::EntityParametersIIII>();
+
+	EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII *)_data->getCurrentParameters();
+	params->param1 = (unsigned int)param1;
+
+	_engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault);
+}
+
+void Entity::setupII(const char *name, uint index, uint param1, uint param2) {
+	debugC(6, kLastExpressDebugLogic, "Entity: %s(%u, %u)", name, param1, param2);
+
+	_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
+	_data->setCurrentCallback(index);
+	_data->resetCurrentParameters<EntityData::EntityParametersIIII>();
+
+	EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII *)_data->getCurrentParameters();
+	params->param1 = param1;
+	params->param2 = param2;
+
+	_engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault);
+}
+
+void Entity::setupIII(const char *name, uint index, uint param1, uint param2, uint param3) {
+	debugC(6, kLastExpressDebugLogic, "Entity: %s(%u, %u, %u)", name, param1, param2, param3);
+
+	_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
+	_data->setCurrentCallback(index);
+	_data->resetCurrentParameters<EntityData::EntityParametersIIII>();
+
+	EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII *)_data->getCurrentParameters();
+	params->param1 = param1;
+	params->param2 = param2;
+	params->param3 = param3;
 
 	_engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault);
 }
@@ -608,10 +650,10 @@ void Entity::setupS(const char *name, uint index, const char *seq1) {
 
 	_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
 	_data->setCurrentCallback(index);
-	RESET_PARAMS(_data, EntityData::EntityParametersSIIS);
+	_data->resetCurrentParameters<EntityData::EntityParametersSIIS>();
 
 	EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters();
-	strncpy((char *)&params->seq1, seq1, 12);
+	strncpy(params->seq1, seq1, 12);
 
 	_engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault);
 }
@@ -621,11 +663,147 @@ void Entity::setupSS(const char *name, uint index, const char *seq1, const char
 
 	_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
 	_data->setCurrentCallback(index);
-	RESET_PARAMS(_data, EntityData::EntityParametersSSII);
+	_data->resetCurrentParameters<EntityData::EntityParametersSSII>();
 
 	EntityData::EntityParametersSSII *params = (EntityData::EntityParametersSSII*)_data->getCurrentParameters();
-	strncpy((char *)&params->seq1, seq1, 12);
-	strncpy((char *)&params->seq2, seq2, 12);
+	strncpy(params->seq1, seq1, 12);
+	strncpy(params->seq2, seq2, 12);
+
+	_engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault);
+}
+
+void Entity::setupSI(const char *name, uint index, const char *seq1, uint param4) {
+	debugC(6, kLastExpressDebugLogic, "Entity: %s(%s, %u)", name, seq1, param4);
+
+	_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
+	_data->setCurrentCallback(index);
+	_data->resetCurrentParameters<EntityData::EntityParametersSIIS>();
+
+	EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS *)_data->getCurrentParameters();
+	strncpy(params->seq1, seq1, 12);
+	params->param4 = param4;
+
+	_engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault);
+}
+
+void Entity::setupSII(const char *name, uint index, const char *seq1, uint param4, uint param5) {
+	debugC(6, kLastExpressDebugLogic, "Entity: %s(%s, %u, %u)", name, seq1, param4, param5);
+
+	_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
+	_data->setCurrentCallback(index);
+	_data->resetCurrentParameters<EntityData::EntityParametersSIIS>();
+
+	EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS *)_data->getCurrentParameters();
+	strncpy(params->seq1, seq1, 12);
+	params->param4 = param4;
+	params->param5 = param5;
+
+	_engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault);
+}
+
+void Entity::setupSIII(const char *name, uint index, const char *seq, uint param4, uint param5, uint param6) {
+	debugC(6, kLastExpressDebugLogic, "Entity: %s(%s, %u, %u, %u)", name, seq, param4, param5, param6);
+
+	_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
+	_data->setCurrentCallback(index);
+	_data->resetCurrentParameters<EntityData::EntityParametersSIII>();
+
+	EntityData::EntityParametersSIII *params = (EntityData::EntityParametersSIII *)_data->getCurrentParameters();
+	strncpy(params->seq, seq, 12);
+	params->param4 = param4;
+	params->param5 = param5;
+	params->param6 = param6;
+
+	_engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault);
+}
+
+void Entity::setupSIIS(const char *name, uint index, const char *seq1, uint param4, uint param5, const char *seq2) {
+	debugC(6, kLastExpressDebugLogic, "Entity: %s(%s, %u, %u, %s)", name, seq1, param4, param5, seq2);
+
+	_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
+	_data->setCurrentCallback(index);
+	_data->resetCurrentParameters<EntityData::EntityParametersSIIS>();
+
+	EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS *)_data->getCurrentParameters();
+	strncpy(params->seq1, seq1, 12);
+	params->param4 = param4;
+	params->param5 = param5;
+	strncpy(params->seq2, seq2, 12);
+
+	_engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault);
+}
+
+void Entity::setupSSI(const char *name, uint index, const char *seq1, const char *seq2, uint param7) {
+	debugC(6, kLastExpressDebugLogic, "Entity: %s(%s, %s, %u)", name, seq1, seq2, param7);
+
+	_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
+	_data->setCurrentCallback(index);
+	_data->resetCurrentParameters<EntityData::EntityParametersSSII>();
+
+	EntityData::EntityParametersSSII *params = (EntityData::EntityParametersSSII *)_data->getCurrentParameters();
+	strncpy(params->seq1, seq1, 12);
+	strncpy(params->seq2, seq2, 12);
+	params->param7 = param7;
+
+	_engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault);
+}
+
+void Entity::setupIS(const char *name, uint index, uint param1, const char *seq) {
+	debugC(6, kLastExpressDebugLogic, "Entity: %s(%u, %s)", name, param1, seq);
+
+	_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
+	_data->setCurrentCallback(index);
+	_data->resetCurrentParameters<EntityData::EntityParametersISII>();
+
+	EntityData::EntityParametersISII *params = (EntityData::EntityParametersISII *)_data->getCurrentParameters();
+	params->param1 = (unsigned int)param1;
+	strncpy(params->seq, seq, 12);
+
+	_engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault);
+}
+
+void Entity::setupISS(const char *name, uint index, uint param1, const char *seq1, const char *seq2) {
+	debugC(6, kLastExpressDebugLogic, "Entity: %s(%u, %s, %s)", name, param1, seq1, seq2);
+
+	_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
+	_data->setCurrentCallback(index);
+	_data->resetCurrentParameters<EntityData::EntityParametersISSI>();
+
+	EntityData::EntityParametersISSI *params = (EntityData::EntityParametersISSI *)_data->getCurrentParameters();
+	params->param1 = param1;
+	strncpy(params->seq1, seq1, 12);
+	strncpy(params->seq2, seq2, 12);
+
+	_engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault);
+}
+
+void Entity::setupIIS(const char *name, uint index, uint param1, uint param2, const char *seq) {
+	debugC(6, kLastExpressDebugLogic, "Entity: %s(%u, %u, %s)", name, param1, param2, seq);
+
+	_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
+	_data->setCurrentCallback(index);
+	_data->resetCurrentParameters<EntityData::EntityParametersIISI>();
+
+	EntityData::EntityParametersIISI *params = (EntityData::EntityParametersIISI *)_data->getCurrentParameters();
+	params->param1 = param1;
+	params->param2 = param2;
+	strncpy(params->seq, seq, 12);
+
+	_engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault);
+}
+
+void Entity::setupIISS(const char *name, uint index, uint param1, uint param2, const char *seq1, const char *seq2) {
+	debugC(6, kLastExpressDebugLogic, "Entity: %s(%u, %u, %s, %s)", name, param1, param2, seq1, seq2);
+
+	_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
+	_data->setCurrentCallback(index);
+	_data->resetCurrentParameters<EntityData::EntityParametersIISS>();
+
+	EntityData::EntityParametersIISS *params = (EntityData::EntityParametersIISS *)_data->getCurrentParameters();
+	params->param1 = param1;
+	params->param2 = param2;
+	strncpy(params->seq1, seq1, 12);
+	strncpy(params->seq2, seq2, 12);
 
 	_engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault);
 }
diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h
index 0b1db13..3601f34 100644
--- a/engines/lastexpress/entities/entity.h
+++ b/engines/lastexpress/entities/entity.h
@@ -122,13 +122,6 @@ struct SavePoint;
 	if (!params) \
 		error("[EXPOSE_PARAMS] Trying to call an entity function with invalid parameters"); \
 
-#define RESET_PARAMS(data, type) do { \
-	EntityData::EntityCallParameters *callParameters = data->getCurrentCallParameters(); \
-	callParameters->clear(); \
-	for (int i = 0; i < 4; i++) \
-		callParameters->parameters[i] = new type(); \
-} while (false)
-
 // function signature without setup (we keep the index for consistency but never use it)
 #define IMPLEMENT_FUNCTION_NOSETUP(index, class, name) \
 	void class::name(const SavePoint &savepoint) { \
@@ -154,7 +147,7 @@ struct SavePoint;
 // setup with one uint parameter
 #define IMPLEMENT_FUNCTION_I(index, class, name, paramType) \
 	void class::setup_##name(paramType param1) { \
-		Entity::setupI<paramType>(#class "::setup_" #name, index, param1); \
+		Entity::setupI(#class "::setup_" #name, index, param1); \
 	} \
 	void class::name(const SavePoint &savepoint) { \
 		EXPOSE_PARAMS(EntityData::EntityParametersIIII) \
@@ -163,7 +156,7 @@ struct SavePoint;
 // setup with two uint parameters
 #define IMPLEMENT_FUNCTION_II(index, class, name, paramType1, paramType2) \
 	void class::setup_##name(paramType1 param1, paramType2 param2) { \
-		Entity::setupII<paramType1, paramType2>(#class "::setup_" #name, index, param1, param2); \
+		Entity::setupII(#class "::setup_" #name, index, param1, param2); \
 	} \
 	void class::name(const SavePoint &savepoint) { \
 		EXPOSE_PARAMS(EntityData::EntityParametersIIII) \
@@ -172,7 +165,7 @@ struct SavePoint;
 // setup with three uint parameters
 #define IMPLEMENT_FUNCTION_III(index, class, name, paramType1, paramType2, paramType3) \
 	void class::setup_##name(paramType1 param1, paramType2 param2, paramType3 param3) { \
-		Entity::setupIII<paramType1, paramType2, paramType3>(#class "::setup_" #name, index, param1, param2, param3); \
+		Entity::setupIII(#class "::setup_" #name, index, param1, param2, param3); \
 	} \
 	void class::name(const SavePoint &savepoint) { \
 		EXPOSE_PARAMS(EntityData::EntityParametersIIII) \
@@ -190,7 +183,7 @@ struct SavePoint;
 // setup with one char *parameter and one uint
 #define IMPLEMENT_FUNCTION_SI(index, class, name, paramType2) \
 	void class::setup_##name(const char *seq1, paramType2 param4) { \
-		Entity::setupSI<paramType2>(#class "::setup_" #name, index, seq1, param4); \
+		Entity::setupSI(#class "::setup_" #name, index, seq1, param4); \
 	} \
 	void class::name(const SavePoint &savepoint) { \
 		EXPOSE_PARAMS(EntityData::EntityParametersSIIS) \
@@ -199,7 +192,7 @@ struct SavePoint;
 // setup with one char *parameter and two uints
 #define IMPLEMENT_FUNCTION_SII(index, class, name, paramType2, paramType3) \
 	void class::setup_##name(const char *seq1, paramType2 param4, paramType3 param5) { \
-		Entity::setupSII<paramType2, paramType3>(#class "::setup_" #name, index, seq1, param4, param5); \
+		Entity::setupSII(#class "::setup_" #name, index, seq1, param4, param5); \
 	} \
 	void class::name(const SavePoint &savepoint) { \
 		EXPOSE_PARAMS(EntityData::EntityParametersSIIS) \
@@ -208,7 +201,7 @@ struct SavePoint;
 // setup with one char *parameter and three uints
 #define IMPLEMENT_FUNCTION_SIII(index, class, name, paramType2, paramType3, paramType4) \
 	void class::setup_##name(const char *seq, paramType2 param4, paramType3 param5, paramType4 param6) { \
-		Entity::setupSIII<paramType2, paramType3, paramType4>(#class "::setup_" #name, index, seq, param4, param5, param6); \
+		Entity::setupSIII(#class "::setup_" #name, index, seq, param4, param5, param6); \
 	} \
 	void class::name(const SavePoint &savepoint) { \
 		EXPOSE_PARAMS(EntityData::EntityParametersSIII) \
@@ -216,7 +209,7 @@ struct SavePoint;
 
 #define IMPLEMENT_FUNCTION_SIIS(index, class, name, paramType2, paramType3) \
 	void class::setup_##name(const char *seq1, paramType2 param4, paramType3 param5, const char *seq2) { \
-		Entity::setupSIIS<paramType2, paramType3>(#class "::setup_" #name, index, seq1, param4, param5, seq2); \
+		Entity::setupSIIS(#class "::setup_" #name, index, seq1, param4, param5, seq2); \
 	} \
 	void class::name(const SavePoint &savepoint) { \
 		EXPOSE_PARAMS(EntityData::EntityParametersSIIS) \
@@ -232,7 +225,7 @@ struct SavePoint;
 
 #define IMPLEMENT_FUNCTION_SSI(index, class, name, paramType3) \
 	void class::setup_##name(const char *seq1, const char *seq2, paramType3 param7) { \
-		Entity::setupSSI<paramType3>(#class "::setup_" #name, index, seq1, seq2, param7); \
+		Entity::setupSSI(#class "::setup_" #name, index, seq1, seq2, param7); \
 	} \
 	void class::name(const SavePoint &savepoint) { \
 		EXPOSE_PARAMS(EntityData::EntityParametersSSII) \
@@ -240,7 +233,7 @@ struct SavePoint;
 
 #define IMPLEMENT_FUNCTION_IS(index, class, name, paramType) \
 	void class::setup_##name(paramType param1, const char *seq) { \
-		Entity::setupIS<paramType>(#class "::setup_" #name, index, param1, seq); \
+		Entity::setupIS(#class "::setup_" #name, index, param1, seq); \
 	} \
 	void class::name(const SavePoint &savepoint) { \
 		EXPOSE_PARAMS(EntityData::EntityParametersISII) \
@@ -248,7 +241,7 @@ struct SavePoint;
 
 #define IMPLEMENT_FUNCTION_ISS(index, class, name, paramType) \
 	void class::setup_##name(paramType param1, const char *seq1, const char *seq2) { \
-		Entity::setupISS<paramType>(#class "::setup_" #name, index, param1, seq1, seq2); \
+		Entity::setupISS(#class "::setup_" #name, index, param1, seq1, seq2); \
 	} \
 	void class::name(const SavePoint &savepoint) { \
 		EXPOSE_PARAMS(EntityData::EntityParametersISSI) \
@@ -256,7 +249,7 @@ struct SavePoint;
 
 #define IMPLEMENT_FUNCTION_IIS(index, class, name, paramType1, paramType2) \
 	void class::setup_##name(paramType1 param1, paramType2 param2, const char *seq) { \
-		Entity::setupIIS<paramType1, paramType2>(#class "::setup_" #name, index, param1, param2, seq); \
+		Entity::setupIIS(#class "::setup_" #name, index, param1, param2, seq); \
 	} \
 	void class::name(const SavePoint &savepoint) { \
 		EXPOSE_PARAMS(EntityData::EntityParametersIISI) \
@@ -264,7 +257,7 @@ struct SavePoint;
 
 #define IMPLEMENT_FUNCTION_IISS(index, class, name, paramType1, paramType2) \
 	void class::setup_##name(paramType1 param1, paramType2 param2, const char *seq1, const char *seq2) { \
-		Entity::setupIISS<paramType1, paramType2>(#class "::setup_" #name, index, param1, param2, seq1, seq2); \
+		Entity::setupIISS(#class "::setup_" #name, index, param1, param2, seq1, seq2); \
 	} \
 	void class::name(const SavePoint &savepoint) { \
 		EXPOSE_PARAMS(EntityData::EntityParametersIISS) \
@@ -842,6 +835,15 @@ public:
 
 	EntityData() {}
 
+	template<class T>
+	void resetCurrentParameters() {
+		EntityCallParameters *params = &_parameters[_data.currentCall];
+		params->clear();
+
+		for (int i = 0; i < 4; i++)
+			params->parameters[i] = new T();
+	}
+
 	EntityCallData       *getCallData() { return &_data; }
 
 	EntityParameters     *getParameters(uint callback, byte index) const;
@@ -1068,198 +1070,20 @@ protected:
 	// Setup functions
 	//////////////////////////////////////////////////////////////////////////
 	void setup(const char *name, uint index);
+	void setupI(const char *name, uint index, uint param1);
+	void setupII(const char *name, uint index, uint param1, uint param2);
+	void setupIII(const char *name, uint index, uint param1, uint param2, uint param3);
 	void setupS(const char *name, uint index, const char *seq1);
 	void setupSS(const char *name, uint index, const char *seq1, const char *seq2);
-
-	template<typename T>
-	void setupI(const char *name, uint index, T param1) {
-		debugC(6, kLastExpressDebugLogic, "Entity: %s(%d)", name, param1);
-
-		_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
-		_data->setCurrentCallback(index);
-		RESET_PARAMS(_data, EntityData::EntityParametersIIII);
-
-		EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII *)_data->getCurrentParameters();
-		params->param1 = (unsigned int)param1;
-
-		_engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault);
-	}
-
-	template<typename T1, typename T2>
-	void setupII(const char *name, uint index, T1 param1, T2 param2) {
-		debugC(6, kLastExpressDebugLogic, "Entity: %s(%d, %d)", name, param1, param2);
-
-		_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
-		_data->setCurrentCallback(index);
-		RESET_PARAMS(_data, EntityData::EntityParametersIIII);
-
-		EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII *)_data->getCurrentParameters();
-		params->param1 = param1;
-		params->param2 = param2;
-
-		_engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault);
-	}
-
-	template<typename T1, typename T2, typename T3>
-	void setupIII(const char *name, uint index, T1 param1, T2 param2, T3 param3) {
-		debugC(6, kLastExpressDebugLogic, "Entity: %s(%d, %d, %d)", name, param1, param2, param3);
-
-		_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
-		_data->setCurrentCallback(index);
-		RESET_PARAMS(_data, EntityData::EntityParametersIIII);
-
-		EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII *)_data->getCurrentParameters();
-		params->param1 = param1;
-		params->param2 = param2;
-		params->param3 = param3;
-
-		_engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault);
-	}
-
-	template<typename T>
-	void setupSI(const char *name, uint index, const char *seq1, T param4) {
-		debugC(6, kLastExpressDebugLogic, "Entity: %s(%s, %d)", name, seq1, param4);
-
-		_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
-		_data->setCurrentCallback(index);
-		RESET_PARAMS(_data, EntityData::EntityParametersSIIS);
-
-		EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS *)_data->getCurrentParameters();
-		strncpy((char *)&params->seq1, seq1, 12);
-		params->param4 = param4;
-
-		_engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault);
-	}
-
-	template<typename T1, typename T2>
-	void setupSII(const char *name, uint index, const char *seq1, T1 param4, T2 param5) {
-		debugC(6, kLastExpressDebugLogic, "Entity: %s(%s, %d, %d)", name, seq1, param4, param5);
-
-		_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
-		_data->setCurrentCallback(index);
-		RESET_PARAMS(_data, EntityData::EntityParametersSIIS);
-
-		EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS *)_data->getCurrentParameters();
-		strncpy((char *)&params->seq1, seq1, 12);
-		params->param4 = param4;
-		params->param5 = param5;
-
-		_engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault);
-	}
-
-	template<typename T1, typename T2, typename T3>
-	void setupSIII(const char *name, uint index, const char *seq, T1 param4, T2 param5, T3 param6) {
-		debugC(6, kLastExpressDebugLogic, "Entity: %s(%s, %d, %d, %d)", name, seq, param4, param5, param6);
-
-		_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
-		_data->setCurrentCallback(index);
-		RESET_PARAMS(_data, EntityData::EntityParametersSIII);
-
-		EntityData::EntityParametersSIII *params = (EntityData::EntityParametersSIII *)_data->getCurrentParameters();
-		strncpy((char *)&params->seq, seq, 12);
-		params->param4 = param4;
-		params->param5 = param5;
-		params->param6 = param6;
-
-		_engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault);
-	}
-
-	template<typename T1, typename T2>
-	void setupSIIS(const char *name, uint index, const char *seq1, T1 param4, T2 param5, const char *seq2) {
-		debugC(6, kLastExpressDebugLogic, "Entity: %s(%s, %d, %d, %s)", name, seq1, param4, param5, seq2);
-
-		_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
-		_data->setCurrentCallback(index);
-		RESET_PARAMS(_data, EntityData::EntityParametersSIIS);
-
-		EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS *)_data->getCurrentParameters();
-		strncpy((char *)&params->seq1, seq1, 12);
-		params->param4 = param4;
-		params->param5 = param5;
-		strncpy((char *)&params->seq2, seq2, 12);
-
-		_engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault);
-	}
-
-	template<typename T>
-	void setupSSI(const char *name, uint index, const char *seq1, const char *seq2, T param7) {
-		debugC(6, kLastExpressDebugLogic, "Entity: %s(%s, %s, %d)", name, seq1, seq2, param7);
-
-		_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
-		_data->setCurrentCallback(index);
-		RESET_PARAMS(_data, EntityData::EntityParametersSSII);
-
-		EntityData::EntityParametersSSII *params = (EntityData::EntityParametersSSII *)_data->getCurrentParameters();
-		strncpy((char *)&params->seq1, seq1, 12);
-		strncpy((char *)&params->seq2, seq2, 12);
-		params->param7 = param7;
-
-		_engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault);
-	}
-
-	template<typename T>
-	void setupIS(const char *name, uint index, T param1, const char *seq) {
-		debugC(6, kLastExpressDebugLogic, "Entity: %s(%d, %s)", name, param1, seq);
-
-		_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
-		_data->setCurrentCallback(index);
-		RESET_PARAMS(_data, EntityData::EntityParametersISII);
-
-		EntityData::EntityParametersISII *params = (EntityData::EntityParametersISII *)_data->getCurrentParameters();
-		params->param1 = (unsigned int)param1;
-		strncpy((char *)&params->seq, seq, 12);
-
-		_engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault);
-	}
-
-	template<typename T>
-	void setupISS(const char *name, uint index, T param1, const char *seq1, const char *seq2) {
-		debugC(6, kLastExpressDebugLogic, "Entity: %s(%d, %s, %s)", name, param1, seq1, seq2);
-
-		_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
-		_data->setCurrentCallback(index);
-		RESET_PARAMS(_data, EntityData::EntityParametersISSI);
-
-		EntityData::EntityParametersISSI *params = (EntityData::EntityParametersISSI *)_data->getCurrentParameters();
-		params->param1 = param1;
-		strncpy((char *)&params->seq1, seq1, 12);
-		strncpy((char *)&params->seq2, seq2, 12);
-
-		_engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault);
-	}
-
-	template<typename T1, typename T2>
-	void setupIIS(const char *name, uint index, T1 param1, T2 param2, const char *seq) {
-		debugC(6, kLastExpressDebugLogic, "Entity: %s(%d, %d, %s)", name, param1, param2, seq);
-
-		_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
-		_data->setCurrentCallback(index);
-		RESET_PARAMS(_data, EntityData::EntityParametersIISI);
-
-		EntityData::EntityParametersIISI *params = (EntityData::EntityParametersIISI *)_data->getCurrentParameters();
-		params->param1 = param1;
-		params->param2 = param2;
-		strncpy((char *)&params->seq, seq, 12);
-
-		_engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault);
-	}
-
-	template<typename T1, typename T2>
-	void setupIISS(const char *name, uint index, T1 param1, T2 param2, const char *seq1, const char *seq2) {
-		debugC(6, kLastExpressDebugLogic, "Entity: %s(%d, %d, %s, %s)", name, param1, param2, seq1, seq2);
-
-		_engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]);
-		_data->setCurrentCallback(index);
-		RESET_PARAMS(_data, EntityData::EntityParametersIISS);
-
-		EntityData::EntityParametersIISS *params = (EntityData::EntityParametersIISS *)_data->getCurrentParameters();
-		params->param1 = param1;
-		params->param2 = param2;
-		strncpy((char *)&params->seq1, seq1, 12);
-		strncpy((char *)&params->seq2, seq2, 12);
-
-		_engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault);
-	}
+	void setupSI(const char *name, uint index, const char *seq1, uint param4);
+	void setupSII(const char *name, uint index, const char *seq1, uint param4, uint param5);
+	void setupSIII(const char *name, uint index, const char *seq, uint param4, uint param5, uint param6);
+	void setupSIIS(const char *name, uint index, const char *seq1, uint param4, uint param5, const char *seq2);
+	void setupSSI(const char *name, uint index, const char *seq1, const char *seq2, uint param7);
+	void setupIS(const char *name, uint index, uint param1, const char *seq);
+	void setupISS(const char *name, uint index, uint param1, const char *seq1, const char *seq2);
+	void setupIIS(const char *name, uint index, uint param1, uint param2, const char *seq);
+	void setupIISS(const char *name, uint index, uint param1, uint param2, const char *seq1, const char *seq2);
 
 	//////////////////////////////////////////////////////////////////////////
 	// Helper functions






More information about the Scummvm-git-logs mailing list