Wargamer Developer's Guide

This document outlines how the Wargamer project is laid out. What modules do what and how they rely on each other

Project Folder Structure

I have tidied this up a bit from how it was in the original version. Notably by moving all the makefile includes into a config folder, and moving the source code modules into a src folder. This keeps the root folder fairly clean

Rough Outline

+--config
+--src
|  +--<moduleName>
|  |  \--o
|  |     \--debug
|  |     \--final
+--lib
|  \--debug
|  \--final
+--utils
+--doc
+--res
|  \--nap1813
+--o
|  \--debug
|  \--debug
\--exe
   \--nap1813

The Top Level of the tree contains:

config
Common Makefile includes go in here
src
The Source code is in here. Described later
lib
.lib files needed to use the compiled DLLs end up here. There are 2 sufolders, Debug and Final
utils
Various Batch Files and utilities to help in the build process. You should add this to your PATH when working on Wargamer.
doc
Documentation
res
Resources, such as Icons and Cursors. This should probably be moved into the src folder
o
Object files generated when compiling resources
exe
Executables are put in here. Debug versions have DB appended to the name, e.g. systemDB.dll is the debug version of the System library

The root also contains various makefile for building the project. There are different makefiles for building just the battle game, campaign game or the combination, as well as campaign editor, battle editor, and various utility and test programs.

The only other stuff left in the root are things such as README, the Gnu Licence, INSTALL, etc

src Folder

The src folder contains a seperate subfolder for each module, as well as a few utility and test projects. (which should probably be moved into a utils folder. Each module contains .cpp and .hpp files all mingled together. A few of the utility projects seperate out the C and H files into subfolders. Currently there is no distinction between public includes and module includes, so if one module uses another, the module folder is included in the INCLUDE path during compilation.

Object Files are stored in subfolders within the module's folder. Either debug or final depending on whether you are compiling a debug or release version.

Modules

campwind
batdata
batdisp
batedit
batgame
batlogic
battle
batwind
c
camp_ai
campdata
campedit
campgame
batai
h
gamesup
gwind
frontend
system
splash
ob
mapwind