ORIGINAL: amwild
ORIGINAL: Shannon V. OKeets
I just finished this week my first ever complete print out of the source code for MWIF. I have the 250 modules separted into 15 binders, as listed in the summary below, and each module has its own little separation tab. The numbers are the lines of code in each module (or binder).
=========================
Table of Contents for MWIF Printed Program Modules
(as December 23, 2006)
Summary
Main Module (11,100)
MWIF Control (13,250)
Loading MWIF & Saved Games (8950)
Beginning Processing Sequence (19,500)
Beginning & End of Turn (9400)
Game Record Logs (23,600)
Maps, Resources, Factories, Production, & Trade (22,850)
Movement & Combat (23,500)
NetPlay & PBEM (1100)
Player Interface, Information Forms, Messages, Tutorials & Filters (20,250)
Units (28,150)
Variables & Strings (3650)
WIFCustom (3850)
WIFCustom External Procedures (6300)
Tools (15,050)
Total = 210,500
...
I am suspicious! There are too many trailing zeroes in these numbers! They can't be accurate! [:'(]
Seriously, though, this is a lot of code. Now, can you tell us just how much of it you have written/edited? Do you even want to tell us...? [;)]
Most of this code is in Delphi, Borland's oblect oriented Pascal, with some freqently used routines (written by Chris Marinacci) in assembler for speed. Numbers were rounded to 50 lines of code. All the additions were either done in my head or by hand, so there may be inaccuracies.
--
I have gone through all of this code (except the Tools modules) and added comments and "pretty printing".
Some sections are new by me (all of Tutorials and Game Record Log, and almost all of Loading MWIF & Saved Games).
Others I have completely revamped (WIF Custom, WIFCustom External Procedues, Maps, Beginning Processing Sequence).
Many I heva extracted from larger modules and separated into new smaller ones. For instance, all the Variables & Strings files but 1 are new; Scrap and all the Setup modules had been 1 file; Main had been 23,000 lines without any comments; Mouse Commands is a new module; all the modules with the word Control in them are new.
The numbers above do not properly reflect the code associated with the forms, since most the parameter values and 'event' processing is embedded in the Delphi files that store form data (DFM). At last count there were 105 forms which define what components are shown on the screen, their positioning on the form, and much of the processing in response to the player's action. I have revised all of the forms for the new Theme Engine design, deleting some obsolete ones, compressing several into the new Start (... new game) form, and adding a few (e.g., Tutorials, Map Views, Screen Layouts.).
Obviously I have done extensive revisions to the Maps and Units files to support the new graphics for the units and maps.
Areas still to be fully reviewed and revised are: Beginning and End of Turn, Production & Trade, Movement & Combat, and more work on Units related to legality of moves.
I have left Tools and the Filter code virtually untouched and I have no plans to ever even look at them since they do their job well behind the scenes.
The NetPlay and PBEM sections need to written and so does the AIO code.
Not included in the above listings are the documentation I have created for each of them which are part of each binder. I also have the various graphics/flowcharts and other odd pieces of documentation I have created bound into the appropriate binder. Instead of folders and pieces of paper floating around, everything related to the project is in the binders on a shelf and I take down the one or two I need for whatever I am currently working on. This is a much improved organization for my desktop workspace.
There are limits to my obsessiveness: I have never printed out any of the weekly or monthly status reports and I rarely print out my task lists and the bug reports.