AGI Base Logic Generator 2.0 Source Code ReadMe
For the Release Version of BLG Version 2.0
AGI Base Logic Generator written by Joel McCormick
Base Logic Generator © 1998-2002 Joel McCormick
Contents
- Programming Language
- Source code organization
- Conditions of Modificiation
Programming Language
The BLG is written in C++. It makes use of classes, default parameters,
C++ style casts (reinterpret_cast, static_cast), and other C++ features.
Source Code Organization
The source code is heavily modularized. The portions of the program that
have nothing to do with the user interface have been separated into their
own source files to make porting the BLG to other platforms a little easier.
With regard to the user interface files, for each window there are, when
applicable, three different source files: A main file which sets up the window
and displays it; an event handlers file that contains windows message handlers
(for example, WM_COMMAND); a UI file, which contains code for responding to the
actions of the user. Although it might seem like this modularization is a bit
excessive, I think it makes things easier to find once you get used to it, and
it keeps the source files for the windows from getting enormous.
For the code that I have written, the application entry point, WinMain,
is contained in the file AGIBLG.cpp. Definitions that are needed throughout
the BLG source code are defined in BLGDefs.h and BLGDefs.cpp. There are a
number of dialogs used in the BLG, and the source files related to these
dialogs is Windows-specific:
- About Box
- Define Name Dialog
- Edge Code Advanced Dialog
- Edit Define Name Dialog
- Entry and Looking Dialog
- First Room Control Dialog
- Main Dialog
- Message Boxes
- Options Dialog
- Position Control Dialog
The options dialog is a property sheet. Each page of the property sheet
is essentially a dialog box of its own. These include the following:
- Comments Property Page
- Compiled Code Property Page
- Quotes Property Page
- Source Code Property Page
The rest of the Windows-specific files are as follows:
- GeneralUI.cpp, GeneralUI.h
- resource.h
- AGIBLG.cpp
- AGIBLG.rc
- icon1.ico
The rest of the files can be used in a non-Windows port of the BLG,
although possibly not as-is:
- BLGDefs.cpp, BLGDefs.h
- BLGExceptions.h
- Clipboard.cpp, Clipboard.h
- DefineNameList.cpp, DefineNameList.h
- EgoPositionControlArray.cpp, EgoPositionControlArray.h
- LogicGeneration.cpp, LogicGeneration.h
- Persistence.cpp, Persistence.h
- SimpleStack.h
- SourceCodeGeneration.cpp, SourceCodeGeneration.h
The remainder of the files are Visual C++ files.
Conditions of Modification
You are permitted to make modifications to the BLG source code, to add
features or fix bugs or whatever. If you make modifications, however, there
are a few guidelines you should follow:
- add a comment with your name, signaling both the beginning and the end of
your modifications; if it is practical to avoid it, then avoid including
code that you did not write within these comments; if it cannot be avoided,
include a note indicating specifically which modifications you made
- comment your modifications; don't assume your code is readable
- you should maintain a coding style consistent with that already found in
the BLG source code, including comment style and the use of Hungarian notation
in variable names
- you may not remove ANYONE's name from the source code, even if you remove
their code entirely...just add a comment that explains why you chose to remove
the code
- you may not represent the Base Logic Generator as your own creation
- you MUST release the source code if you release a new version of the
BLG
- do not add non-portable code to files intended to be portable; if you
feel you must add non-portable code to those files to make the modifications
you want, then include the non-portable code inside conditional compilation directives
- if you release a Windows version of the BLG, you MUST update the about
box with the following information: version number, build date, your name (but
DO NOT remove anyone else's name)
- if you release a non-Windows version of the BLG, you MUST provide some
means for the user to obtain the information available in the about box of
the Windows version; the line "Base Logic Generator created by Joel McCormick" must appear along with this information
- You must include a copy of the ReadMe file that comes with the release
version of the BLG on my website (http://weremoose.tripod.com/agi/agiUtilities.html). The ReadMe file should be modified with notes
regarding your modifications to the program along with your name, e-mail,
and URL.