[Scummvm-cvs-logs] SF.net SVN: scummvm:[38700] scummvm/trunk/engines/sci

aquadran at users.sourceforge.net aquadran at users.sourceforge.net
Sat Feb 21 16:30:47 CET 2009


Revision: 38700
          http://scummvm.svn.sourceforge.net/scummvm/?rev=38700&view=rev
Author:   aquadran
Date:     2009-02-21 15:30:47 +0000 (Sat, 21 Feb 2009)

Log Message:
-----------
formating

Modified Paths:
--------------
    scummvm/trunk/engines/sci/console.cpp
    scummvm/trunk/engines/sci/console.h
    scummvm/trunk/engines/sci/exereader.cpp
    scummvm/trunk/engines/sci/sci.cpp
    scummvm/trunk/engines/sci/sci.h

Modified: scummvm/trunk/engines/sci/console.cpp
===================================================================
--- scummvm/trunk/engines/sci/console.cpp	2009-02-21 15:25:37 UTC (rev 38699)
+++ scummvm/trunk/engines/sci/console.cpp	2009-02-21 15:30:47 UTC (rev 38700)
@@ -42,10 +42,7 @@
 
 bool Console::cmdGetVersion(int argc, const char **argv) {
 	int ver = _vm->getVersion();
-	DebugPrintf("SCI version: %d.%03d.%03d\n",
-	       SCI_VERSION_MAJOR(ver),
-	       SCI_VERSION_MINOR(ver),
-	       SCI_VERSION_PATCHLEVEL(ver));
+	DebugPrintf("SCI version: %d.%03d.%03d\n", SCI_VERSION_MAJOR(ver), SCI_VERSION_MINOR(ver), SCI_VERSION_PATCHLEVEL(ver));
 
 	return true;
 }

Modified: scummvm/trunk/engines/sci/console.h
===================================================================
--- scummvm/trunk/engines/sci/console.h	2009-02-21 15:25:37 UTC (rev 38699)
+++ scummvm/trunk/engines/sci/console.h	2009-02-21 15:30:47 UTC (rev 38700)
@@ -37,7 +37,7 @@
 class Console : public GUI::Debugger {
 public:
 	Console(SciEngine *vm);
-	virtual ~Console(void);
+	virtual ~Console();
 
 private:
 	bool cmdGetVersion(int argc, const char **argv);

Modified: scummvm/trunk/engines/sci/exereader.cpp
===================================================================
--- scummvm/trunk/engines/sci/exereader.cpp	2009-02-21 15:25:37 UTC (rev 38699)
+++ scummvm/trunk/engines/sci/exereader.cpp	2009-02-21 15:30:47 UTC (rev 38700)
@@ -160,7 +160,7 @@
 		_bits = input->readByte();
 		_bits |= input->readByte() << 8;
 
-		if (_bitCount == -1) { /* special case for first bit word */
+		if (_bitCount == -1) { // special case for first bit word
 			bit = _bits & 1;
 			_bits >>= 1;
 		}
@@ -268,12 +268,9 @@
 		accept = 0;
 
 		if (isalnum(ch)) {
-			accept = (state != 1
-			          && state != 5
-			          && state != 9);
+			accept = (state != 1 && state != 5 && state != 9);
 		} else if (ch == '.') {
-			accept = (state == 1
-			          || state == 5);
+			accept = (state == 1 || state == 5);
 		} else if (state == 9) {
 			// Terminate string
 			currentString[9] = 0;

Modified: scummvm/trunk/engines/sci/sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sci.cpp	2009-02-21 15:25:37 UTC (rev 38699)
+++ scummvm/trunk/engines/sci/sci.cpp	2009-02-21 15:30:47 UTC (rev 38700)
@@ -36,23 +36,20 @@
 
 extern gfx_driver_t gfx_driver_scummvm;
 
-int
-c_quit(EngineState *s) {
-	script_abort_flag = 1; /* Terminate VM */
+int c_quit(EngineState *s) {
+	script_abort_flag = 1; // Terminate VM
 	_debugstate_valid = 0;
 	_debug_seeking = 0;
 	_debug_step_running = 0;
 	return 0;
 }
 
-int
-c_die(EngineState *s) {
-	exit(0); /* Die */
-	return 0; /* ;-P (fixes warning) */
+int c_die(EngineState *s) {
+	exit(0); //
+	return 0;
 }
 
-static void
-init_console() {
+static void init_console() {
 #ifdef WANT_CONSOLE
 	con_gfx_init();
 #endif
@@ -78,14 +75,13 @@
 	con_hook_int(&sci01_priority_table_flags, "sci01_priority_table_flags",
 	             "SCI01 priority table debugging flags: 1:Disable, 2:Print on change\n");
 
-	con_passthrough = 1; /* enables all sciprintf data to be sent to stdout */
+	con_passthrough = 1; // enables all sciprintf data to be sent to stdout
 }
 
-static int
-init_gamestate(EngineState *gamestate, sci_version_t version) {
+static int init_gamestate(EngineState *gamestate, sci_version_t version) {
 	int errc;
 
-	if ((errc = script_init_engine(gamestate, version))) { /* Initialize game state */
+	if ((errc = script_init_engine(gamestate, version))) { // Initialize game state
 		int recovered = 0;
 
 		if (errc == SCI_ERROR_INVALID_SCRIPT_VERSION) {
@@ -216,7 +212,7 @@
 	version = getVersion();
 
 	char resource_dir[MAXPATHLEN+1] = "";
-	getcwd(resource_dir, MAXPATHLEN); /* Store resource directory */
+	getcwd(resource_dir, MAXPATHLEN); // Store resource directory
 
 	resmgr = new ResourceManager(res_version, 256 * 1024);
 
@@ -251,7 +247,7 @@
 		return Common::kUnknownError;
 	}
 
-	/* Set the savegame dir */
+	// Set the savegame dir
 	script_set_gamestate_save_dir(gamestate, ConfMan.get("savepath").c_str());
 
 	// Originally, work_dir tried to be ~/.freesci/game_name
@@ -268,7 +264,7 @@
 	gfx_state.version = resmgr->sci_version;
 	gamestate->gfx_state = &gfx_state;
 
-	/**** Default config: */
+	// Default config:
 	gfx_options_t gfx_options;
 	gfx_options.workarounds = 0;
 	gfx_options.buffer_pics_nr = 0;
@@ -289,14 +285,14 @@
 		gfx_options.res_conf.assign[i] = NULL;
 		gfx_options.res_conf.mod[i] = NULL;
 	}
-	/**** Default config ends */
+	// Default config ends
 
 	if (gfxop_init_default(&gfx_state, &gfx_options, resmgr)) {
 		fprintf(stderr, "Graphics initialization failed. Aborting...\n");
 		return Common::kUnknownError;
 	}
 
-	if (game_init_graphics(gamestate)) { /* Init interpreter graphics */
+	if (game_init_graphics(gamestate)) { // Init interpreter graphics
 		fprintf(stderr, "Game initialization failed: Error in GFX subsystem. Aborting...\n");
 		return Common::kUnknownError;
 	}
@@ -311,10 +307,10 @@
 	       SCI_VERSION_MINOR(gamestate->version),
 	       SCI_VERSION_PATCHLEVEL(gamestate->version));
 
-	game_run(&gamestate); /* Run the game */
+	game_run(&gamestate); // Run the game
 
 	game_exit(gamestate);
-	script_free_engine(gamestate); /* Uninitialize game state */
+	script_free_engine(gamestate); // Uninitialize game state
 	script_free_breakpoints(gamestate);
 	free(gamestate->work_dir);
 	free(gamestate);

Modified: scummvm/trunk/engines/sci/sci.h
===================================================================
--- scummvm/trunk/engines/sci/sci.h	2009-02-21 15:25:37 UTC (rev 38699)
+++ scummvm/trunk/engines/sci/sci.h	2009-02-21 15:30:47 UTC (rev 38700)
@@ -74,8 +74,8 @@
 	SciEngine(OSystem *syst, const SciGameDescription *desc);
 	~SciEngine();
 
-	virtual Common::Error init(void);
-	virtual Common::Error go(void);
+	virtual Common::Error init();
+	virtual Common::Error go();
 
 	GUI::Debugger *getDebugger() { return _console; }
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list