[Scummvm-devel] Dreamweb engine inclusion.
Max Horn
max at quendi.de
Thu Jun 16 13:24:48 CEST 2011
Hi again!
I am glad to see that some of my suggestions were already implemented, and very quickly, too. I hope I'll also get replies to my questions then :). And a fix for the implicit conversion warnings like
engines/dreamweb/dreamgen.cpp: In function ‘void dreamgen::soldier1(dreamgen::Context&)’:
engines/dreamweb/dreamgen.cpp:812: warning: negative integer implicitly converted to unsigned type
Next, he engine needs to be added to devtools/credits.pl (and then "make credits" should be run and all modifications checked in).
I've been wondering whether the code wouldn't be at least a little bit more readable, if you added a "DreamContext" subclass of Context, and then made all functions that get a context, like
void checkbasemem(Context &context)
members of this new class
void DreamContext::checkbasemem()
This way, you could get rid of all 20306 occurrences of "context." in dreamgen.cpp", shrinking the file from 647k to 488k. And since we can then change calls like
getunderzoom(context);
to
getunderzoom();
we loose another 30k or so.
There are still various code formatting issues. E.g.:
while(context.cx--) context._stosw();
This should be two line:
while(context.cx--)
context._stosw();
Similar for
if (!flags.z()) goto ismorereel;
Cheers,
Max
More information about the Scummvm-devel
mailing list