mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-12 12:09:15 +00:00
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.
This commit is contained in:
parent
92e6815ca3
commit
3bfb412694
@ -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()
|
||||
|
@ -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*/
|
||||
|
@ -25,13 +25,12 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#include "dreamweb/runtime.h"
|
||||
|
||||
namespace DreamGen {
|
||||
|
||||
#include "structs.h"
|
||||
|
||||
class DreamGenContext : public Context {
|
||||
public:
|
||||
void __start();
|
||||
|
Loading…
Reference in New Issue
Block a user