From: Rusty B. <ho...@sb...> - 2003-07-10 16:05:11
|
Sorry for the massive checkin... that's not normally the way I like to work, but my interest sort of wandered all over the place, breaking everything, and it took me a long time to get back around to the stuff I originally broke. So there are several only-slightly- overlapping sets of changes checked in. Here are the main changes: - (this is the most boring one, but I'm glad it's done.) Non-terrain features like elevation, ownership, & other custom stuff are now handled differently, so that existing HexPainters can be used to paint paint non-terrain features which weren't known at compile time. (Before, the test Great Battles of Alexander stuff had a custom hex subclass which knew about elevation, but in order to *display* that elevation, it also had to provide a custom painter which knew how to examine its custom hex subclass. Now existing painters can be used for custom non-terrain stuff which the base libraries don't know about, because the code for examining the hexes has been moved out of HexPainter into HexPainterGroup.) - In loubetomy, the different types of non-terrain features are now in separate QToolBars (one per HexPainterGroup), and the View menu lets you turn them on & off. Turning off terrain or elevation isn't so useful, but toggling the display of hex ownership or scenario deployment areas is kind of neat! (The whole map gets repainted when this happens, which is slow, but that can be fixed.) To see this, use the gev-raster.palette or gev-raster2.palette in loubetomy. (The deployment area toolbar might be turned off at first; see the View menu to turn it on.) - Some new or updated test GameBoxes, palettes, & maps have been added for GEV, Great Battles of Alexander, Centurion, Heavy Gear, Barbarossa/25, Revolt on Antares, Samurai, Necromancer, & World of Greyhawk. (Many of those are little more than placeholders, and all of the test palettes are horribly ugly, but you *can* make useful maps for most of those games.) - "Some" code for modeling game rules has been added: Game, Phase, Side, Player, Unit, UnitClass, TerrainEffect, etc., plus a little bit of game-specific test stuff for GEV and Axis & Allies. (It's defintely not usable for anything yet, but there's a testGame program which can load up a serialized game and run through the sequence of play defined in the GameBox. The test GEV stuff includes custom Phases which roll to un-disable the active player's units which were disabled because of terrain on the previous turn, and un-disable units which were disabled by fire on the turn before that, etc. But it's not interactive yet, so you can't actually play.) - I didn't finish the separate little utility for fiddling with it, but there is some (kind of dumb) map-patching code (which works!).=20 One place where this is used is, the test GEV scenario says, "use the GEV map, but replace all town with rubble, remove all bridges, and mark these hexes as the Paneuropean deployment area", and only the diffs are in the saved game.) It should be possible to use the map diff stuff for undo/redo support in loubetomy, but I haven't looked at this yet. To see the patched map, "(cd lib/unit/test && ./testGame gev.9.021.game -s ./gev.so -p Bozo1 -p Bozo2 -mo /usr/tmp/bogo.map)" and then open /usr/tmp/bogo.map in loubetomy with gev-raster.palette or gev-raster2.palette. The serialized patch (just a series of operations to perform on the map) is in lib/unit/test/gev.9.021.game, the test saved game. - OtherSimpleCLParser. Maybe not Better... but a little Different. Examples of its use are in lib/unit/test/testGame.cpp and lib/ogl/test/testGL.cpp. - the 3D stuff is checked in. The code is messy & awful & not particularly useful, but if the build succeeds (ha ha) you can "(cd lib/ogl/test && make test-gev)" to see the GEV map displayed with 3D trees, buildings, stream hexsides, & water. (That's the same GEV map saved by loubetomy! so you can edit the map in loubetomy & reopen it in the GL test program to see your changes in 3D.) CAVEATS - tool entries in loubetomy are broken/gone, so you can't erase terrain once you put it down. (this is at the top of my list to fix.) - There are still some palette editing operations which have to be done by hand in the serialized file: adding new groups of painters, adding new painters to existing groups, "etc." - the quality of some of the changes is questionable. ("and the quality of the rest of the changes is very low," ha ha.) - It's certainly possible that I broke the build; I didn't do a complete build from a clean tree before checking in, as that would have taken another three days to finish. (Well, it *feels* like that long.) Let me know if you see any problems! --Rusty |