[Scummvm-cvs-logs] scummvm master -> 3bfb412694c911c60fffb715fb9bbe82a456ebb0

digitall digitall at scummvm.org
Fri Dec 2 12:50:45 CET 2011


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:
3bfb412694 DREAMWEB: Whitespace fixes in dreamgen.*


Commit: 3bfb412694c911c60fffb715fb9bbe82a456ebb0
    https://github.com/scummvm/scummvm/commit/3bfb412694c911c60fffb715fb9bbe82a456ebb0
Author: D G Turner (digitall at scummvm.org)
Date: 2011-12-02T03:48:51-08:00

Commit Message:
DREAMWEB: Whitespace fixes in dreamgen.*

This improves readability slightly by removing extraneous whitespace
and correcting indents. Since this has been done in the tasm-recover
devtool, it will persist over dreamgen.* regeneration.

Changed paths:
    devtools/tasmrecover/tasm/cpp.py
    engines/dreamweb/dreamgen.cpp
    engines/dreamweb/dreamgen.h



diff --git a/devtools/tasmrecover/tasm/cpp.py b/devtools/tasmrecover/tasm/cpp.py
index 44df0a3..20ccd60 100644
--- a/devtools/tasmrecover/tasm/cpp.py
+++ b/devtools/tasmrecover/tasm/cpp.py
@@ -60,7 +60,6 @@ class cpp:
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  *
  */
-
 """
 		self.fd = open(fname, "wt")
 		self.hd = open(header, "wt")
@@ -68,9 +67,7 @@ class cpp:
 		self.hd.write("""#ifndef %s
 #define %s
 
-%s
-
-""" %(hid, hid, banner))
+%s""" %(hid, hid, banner))
 		self.context = context
 		self.data_seg = context.binary_data
 		self.procs = context.proc_list
@@ -89,7 +86,6 @@ class cpp:
 		self.used_data_offsets = set()
 		self.methods = []
 		self.fd.write("""%s
-
 #include \"%s\"
 
 namespace %s {
@@ -594,7 +590,7 @@ namespace %s {
 
 		self.fd.write("\n")
 		self.fd.write("\n".join(self.translated))
-		self.fd.write("\n\n")
+		self.fd.write("\n")
 		print "%d ok, %d failed of %d, %.02g%% translated" %(done, failed, done + failed, 100.0 * done / (done + failed))
 		print "\n".join(self.failed)
 		data_bin = self.data_seg
@@ -617,7 +613,9 @@ namespace %s {
 """\n#include "dreamweb/runtime.h"
 
 namespace %s {
+
 #include "structs.h"
+
 class %sContext : public Context {
 public:
 	void __start();
@@ -664,7 +662,7 @@ public:
 		self.hd.write("};\n}\n\n#endif\n")
 		self.hd.close()
 		
-		self.fd.write("\nvoid %sContext::__start() { %s%s(); \n}\n" %(self.namespace, data_impl, start))
+		self.fd.write("void %sContext::__start() { %s\t%s(); \n}\n" %(self.namespace, data_impl, start))
 		
 		if self.skip_dispatch_call == False:
 			self.fd.write("\nvoid %sContext::__dispatch_call(uint16 addr) {\n\tswitch(addr) {\n" %self.namespace)
@@ -674,5 +672,5 @@ public:
 			self.fd.write("\t\tdefault: ::error(\"invalid call to %04x dispatched\", (uint16)ax);")
 			self.fd.write("\n\t}\n}")
 		
-		self.fd.write("\n\n} /*namespace*/\n")
+		self.fd.write("\n} /*namespace*/\n")
 		self.fd.close()
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 6a888a0..1c2c4ce 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -22,8 +22,6 @@
  *
  */
 
-
-
 #include "dreamgen.h"
 
 namespace DreamGen {
@@ -12093,8 +12091,6 @@ void DreamGenContext::getRidOfTempsP() {
 	deallocateMem();
 }
 
-
-
 void DreamGenContext::__start() { 
 	static const uint8 src[] = {
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x13, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
@@ -13231,8 +13227,7 @@ void DreamGenContext::__start() {
 		//0x2350: .... .... .... ....
 		0x00, 0x00, 0x00, 0x00, 0x00, };
 	ds.assign(src, src + sizeof(src));
-dreamweb(); 
+	dreamweb(); 
 }
 
-
 } /*namespace*/
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 704dd16..f84b037 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -25,13 +25,12 @@
  *
  */
 
-
-
-
 #include "dreamweb/runtime.h"
 
 namespace DreamGen {
+
 #include "structs.h"
+
 class DreamGenContext : public Context {
 public:
 	void __start();






More information about the Scummvm-git-logs mailing list