[Scummvm-cvs-logs] scummvm master -> 2644d084480d537388cc7f585338ff2bf0490b38

bluegr bluegr at gmail.com
Thu Dec 11 12:27:40 CET 2014


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

Summary:
c98e9fa6f7 ZVISION: Add a comment in the music code
2644d08448 ZVISION: Add functionality to show the current location. Some cleanup


Commit: c98e9fa6f7702b81fa15667e58854de95cb4a5f6
    https://github.com/scummvm/scummvm/commit/c98e9fa6f7702b81fa15667e58854de95cb4a5f6
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2014-12-11T13:26:27+02:00

Commit Message:
ZVISION: Add a comment in the music code

Changed paths:
    engines/zvision/scripting/sidefx/music_node.cpp



diff --git a/engines/zvision/scripting/sidefx/music_node.cpp b/engines/zvision/scripting/sidefx/music_node.cpp
index a76d3b4..8316c1a 100644
--- a/engines/zvision/scripting/sidefx/music_node.cpp
+++ b/engines/zvision/scripting/sidefx/music_node.cpp
@@ -71,6 +71,7 @@ MusicNode::MusicNode(ZVision *engine, uint32 key, Common::String &filename, bool
 	if (_key != StateKey_NotSet)
 		_engine->getScriptManager()->setStateValue(_key, 1);
 
+	// Change filename.raw into filename.sub
 	Common::String subname = filename;
 	subname.setChar('s', subname.size() - 3);
 	subname.setChar('u', subname.size() - 2);


Commit: 2644d084480d537388cc7f585338ff2bf0490b38
    https://github.com/scummvm/scummvm/commit/2644d084480d537388cc7f585338ff2bf0490b38
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2014-12-11T13:26:27+02:00

Commit Message:
ZVISION: Add functionality to show the current location. Some cleanup

Changed paths:
    engines/zvision/core/console.cpp
    engines/zvision/core/console.h



diff --git a/engines/zvision/core/console.cpp b/engines/zvision/core/console.cpp
index e641783..0f6cbfc 100644
--- a/engines/zvision/core/console.cpp
+++ b/engines/zvision/core/console.cpp
@@ -51,14 +51,13 @@ Console::Console(ZVision *engine) : GUI::Debugger(), _engine(engine) {
 	registerCmd("generaterendertable", WRAP_METHOD(Console, cmdGenerateRenderTable));
 	registerCmd("setpanoramafov", WRAP_METHOD(Console, cmdSetPanoramaFoV));
 	registerCmd("setpanoramascale", WRAP_METHOD(Console, cmdSetPanoramaScale));
-	registerCmd("changelocation", WRAP_METHOD(Console, cmdChangeLocation));
+	registerCmd("location", WRAP_METHOD(Console, cmdLocation));
 	registerCmd("dumpfile", WRAP_METHOD(Console, cmdDumpFile));
-	registerCmd("parseallscrfiles", WRAP_METHOD(Console, cmdParseAllScrFiles));
 }
 
 bool Console::cmdLoadVideo(int argc, const char **argv) {
 	if (argc != 2) {
-		debugPrintf("Use loadvideo <fileName> to load a video to the screen\n");
+		debugPrintf("Use %s <fileName> to load a video to the screen\n", argv[0]);
 		return true;
 	}
 
@@ -91,7 +90,7 @@ bool Console::cmdLoadSound(int argc, const char **argv) {
 		Audio::SoundHandle handle;
 		_engine->_mixer->playStream(Audio::Mixer::kPlainSoundType, &handle, soundStream, -1, 100, 0, DisposeAfterUse::YES, false, false);
 	} else {
-		debugPrintf("Use loadsound <fileName> [<rate> <isStereo: 1 or 0>] to load a sound\n");
+		debugPrintf("Use %s <fileName> [<rate> <isStereo: 1 or 0>] to load a sound\n", argv[0]);
 		return true;
 	}
 
@@ -100,7 +99,7 @@ bool Console::cmdLoadSound(int argc, const char **argv) {
 
 bool Console::cmdRawToWav(int argc, const char **argv) {
 	if (argc != 3) {
-		debugPrintf("Use raw2wav <rawFilePath> <wavFileName> to dump a .RAW file to .WAV\n");
+		debugPrintf("Use %s <rawFilePath> <wavFileName> to dump a .RAW file to .WAV\n", argv[0]);
 		return true;
 	}
 
@@ -145,7 +144,7 @@ bool Console::cmdRawToWav(int argc, const char **argv) {
 
 bool Console::cmdSetRenderState(int argc, const char **argv) {
 	if (argc != 2) {
-		debugPrintf("Use setrenderstate <RenderState: panorama, tilt, flat> to change the current render state\n");
+		debugPrintf("Use %s <RenderState: panorama, tilt, flat> to change the current render state\n", argv[0]);
 		return true;
 	}
 
@@ -158,7 +157,7 @@ bool Console::cmdSetRenderState(int argc, const char **argv) {
 	else if (renderState.matchString("flat", true))
 		_engine->getRenderManager()->getRenderTable()->setRenderState(RenderTable::FLAT);
 	else
-		debugPrintf("Use setrenderstate <RenderState: panorama, tilt, flat> to change the current render state\n");
+		debugPrintf("Use %s <RenderState: panorama, tilt, flat> to change the current render state\n", argv[0]);
 
 	return true;
 }
@@ -171,7 +170,7 @@ bool Console::cmdGenerateRenderTable(int argc, const char **argv) {
 
 bool Console::cmdSetPanoramaFoV(int argc, const char **argv) {
 	if (argc != 2) {
-		debugPrintf("Use setpanoramafov <fieldOfView> to change the current panorama field of view\n");
+		debugPrintf("Use %s <fieldOfView> to change the current panorama field of view\n", argv[0]);
 		return true;
 	}
 
@@ -182,7 +181,7 @@ bool Console::cmdSetPanoramaFoV(int argc, const char **argv) {
 
 bool Console::cmdSetPanoramaScale(int argc, const char **argv) {
 	if (argc != 2) {
-		debugPrintf("Use setpanoramascale <scale> to change the current panorama scale\n");
+		debugPrintf("Use %s <scale> to change the current panorama scale\n", argv[0]);
 		return true;
 	}
 
@@ -191,9 +190,14 @@ bool Console::cmdSetPanoramaScale(int argc, const char **argv) {
 	return true;
 }
 
-bool Console::cmdChangeLocation(int argc, const char **argv) {
+bool Console::cmdLocation(int argc, const char **argv) {
+	Location curLocation = _engine->getScriptManager()->getCurrentLocation();
+	Common::String scrFile = Common::String::format("%c%c%c%c.scr", curLocation.world, curLocation.room, curLocation.node, curLocation.view);
+	debugPrintf("Current location: world '%c', room '%c', node '%c', view '%c', offset %d, script %s\n",
+				curLocation.world, curLocation.room, curLocation.node, curLocation.view, curLocation.offset, scrFile.c_str());
+	
 	if (argc != 6) {
-		debugPrintf("Use changelocation <char: world> <char: room> <char:node> <char:view> <int: x position> to change your location\n");
+		debugPrintf("Use %s <char: world> <char: room> <char:node> <char:view> <int: x offset> to change your location\n", argv[0]);
 		return true;
 	}
 
@@ -204,7 +208,7 @@ bool Console::cmdChangeLocation(int argc, const char **argv) {
 
 bool Console::cmdDumpFile(int argc, const char **argv) {
 	if (argc != 2) {
-		debugPrintf("Use dumpfile <fileName> to dump a file\n");
+		debugPrintf("Use %s <fileName> to dump a file\n", argv[0]);
 		return true;
 	}
 
@@ -229,14 +233,4 @@ bool Console::cmdDumpFile(int argc, const char **argv) {
 	return true;
 }
 
-bool Console::cmdParseAllScrFiles(int argc, const char **argv) {
-	Common::ArchiveMemberList list;
-	SearchMan.listMatchingMembers(list, "*.scr");
-
-	for (Common::ArchiveMemberList::iterator iter = list.begin(); iter != list.end(); ++iter) {
-	}
-
-	return true;
-}
-
 } // End of namespace ZVision
diff --git a/engines/zvision/core/console.h b/engines/zvision/core/console.h
index 994e05b..299bd61 100644
--- a/engines/zvision/core/console.h
+++ b/engines/zvision/core/console.h
@@ -44,9 +44,8 @@ private:
 	bool cmdGenerateRenderTable(int argc, const char **argv);
 	bool cmdSetPanoramaFoV(int argc, const char **argv);
 	bool cmdSetPanoramaScale(int argc, const char **argv);
-	bool cmdChangeLocation(int argc, const char **argv);
+	bool cmdLocation(int argc, const char **argv);
 	bool cmdDumpFile(int argc, const char **argv);
-	bool cmdParseAllScrFiles(int argc, const char **argv);
 };
 
 } // End of namespace ZVision






More information about the Scummvm-git-logs mailing list