aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorD G Turner2011-12-02 11:48:51 +0000
committerD G Turner2011-12-02 11:48:51 +0000
commit3bfb412694c911c60fffb715fb9bbe82a456ebb0 (patch)
treefd8b9cab5ea2c2b4ce35d872a1c621c6cb3832e6
parent92e6815ca3a3179c13c803ed88bf0acfc8e13930 (diff)
downloadscummvm-rg350-3bfb412694c911c60fffb715fb9bbe82a456ebb0.tar.gz
scummvm-rg350-3bfb412694c911c60fffb715fb9bbe82a456ebb0.tar.bz2
scummvm-rg350-3bfb412694c911c60fffb715fb9bbe82a456ebb0.zip
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.
-rw-r--r--devtools/tasmrecover/tasm/cpp.py14
-rw-r--r--engines/dreamweb/dreamgen.cpp7
-rw-r--r--engines/dreamweb/dreamgen.h5
3 files changed, 9 insertions, 17 deletions
diff --git a/devtools/tasmrecover/tasm/cpp.py b/devtools/tasmrecover/tasm/cpp.py
index 44df0a381c..20ccd608f6 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 6a888a0b89..1c2c4ce038 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 704dd164e9..f84b037a64 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();