Finally, I've managed to modify game rendering. Here is the first step of implementing canals:
The following things were changed, rewritten or added
- Canals and Bridges images are loaded along with other PCX resources. It's stored in Patch Framework memory, not in the game original's one.
- The function, responsible for loading map images (class_Map_Renderer::m72_Load_Tile_Images) is fully rewritten. It includes now new subfunction, which loads canals and bridges images
- The function, responsible for rendering tile buildings (such as mines, outposts, and so on) is fully rewritten. It includes now new subfunction, which renders canals
- I added new tile overlay flag (0x200) which defines a canal.
The followings things are to do:
- Rewrite function (class_Unit::Can_Pass_Tile) responsible for unit's movement abilities.
- Add new worker job (first step is to provide hard coded job, second step is to modify Civ3ConquestsEdit to make it provide new job)
- Add new unit action button (requires new button image, new shortcut, rewriting functions, responsible for initializing Main GUI Form's controls and procesing of Control Click Event)
- Add bridges over canals
- Modify trade net logic to forbid land unit moves over canals without bridged
- Forbid roads and railroads over canals
- Make the Trade Net thinking that bridge over a canal is like a land tile with roads/railroads depending on neighbour tiles.
- Add canals over land bottlenecks. Requires combination of canal and bridge images.
- Add navigatable rivers (first of all it requires corresponding images).
I attached some files to test the new possibility
1) Render_1.zip contains:
- Game EXE and Patch Framework DLL files to be unpacked into %Conquests% directory
- PCX images in Art\Terrain folder to be unpacked into %Conquest%\Art\Terrain directory
2) Save files with canals applied.
Above screenshot was made during that saved game.