You can set the file to read as the config file via the command line, like
this, assuming the program supports it:
prog -config=file.cfg
You can also override indevidual key-value pairs in the config system
using this syntax:
prog -Ckey=value
Both commands can be used together, and you can override multiple
key-value pairs at once. To use this feature of the ConfigUtility, it must
receive argc and argv as parameters to the Load() method.
I started encapsulating ClientData, and I added the internals for the
heartbeat ssytem. However, when I took a look inside UDPNetworkUtility, I
realized that I didn't have to pass the IPaddresses by reference anymore.
Therefore, I've changed it to accept the addresses by value, and I'm
committing that change right away before I finish the heartbeat system.
This engine is really shaping up, I think.
I've also adjusted the TODO file, which really shouldn't be committed.
Still, it's there now, so it stays. I don't think the logger is going to
be possible any time soon, so I'll probably look into the disconnection
handler.
If you have "config.next" set, the config system will load that as another
config file. Higher config files have a higher precedence over subfiles
when conflicting keys are encountered.
* Added singleton.hpp, containing Singleton<T>
* ConfigUtility now inherits from Singleton
* Tweaked timer.*pp layouts
Project compiles and runs, multiplayer works, but the map is not visible
There are a number of major changes to the map system, beth directly from the
jam branch and from the splicing process. The changes that are listed here have
been noted as they were added to the index for committing.
* tile_sheet.*pp moved from 'common/graphics/' to 'common/map/'
* Minor method and member name changes to TileSheet
* TileSheet has a lua API, but it isn't used anywhere
NOTE: Nothing uses both lua and graphics, but a theoretical editor might
* Region API's glue functions have been changed from triggers to simple dummy
methods. These should simply be over written.
* RegionPagerBase::GetRegion(int x, int y) now snaps it's parameters
Presicely why is unknown, but I do remember there was a bug without it
* RegionPagerLua has been rewritten to use the Region API's methods, rather
than the triggers.
* RegionPagerLua no longer stores the map's save directory, or passes it to the
the Region API's methods.
* RegionPagerLua::luaState renamed to RegionPagerLua::lua
conforms to changes elsewhere
* Removed the directory glue functions from the RegionPager API
* region_pager_api.hpp preprocessor guard changed
* Adjusted makefiles to account for TileSheet's movement
The APIs have access to the solid data, and I fixed a bug: Basically, the
template parameter for std::bitset expects an integer representing the
number of bits to hold, but I initially misread it as the number of bytes.
This has been corrected.
I've also added a sandy beach to the generated island. I'm tempted to
start working on some simple generators soon.
region_api.cpp had a bug, where a glue function's name was used twice. It
was an easy catch, but there was an issue in the new script, where I was
counting from 0 instead of 1. As a result, I was chasing a segfault for 5
hours.
I've changed some naming concentions in the lua APIs. I've also made a few
other tweaks, like region_pager_api.cpp delegating to the passed
RegionPager object. This won't explicitly run, becuase there's still a few
more changes needed.
The changes were fairly easy, and I was actually able to find and fix an
out-of-sequence bug: The destructors for the AccountManager and the
CharacterManager were using SQL code after the call to SQLite3_close_v2(),
so I added and called UnloadAll() for both of them.
This required that I switch from using a char array for the packet buffers
to using malloc() and free(). They make more sense anyway, and I've
learned (or relearned) something about casting.