Greetings all,
Since as you have seen I have been MIA for quite some time from OPU and as you may have guessed I really have no time to devote to OP2 related development anymore. I have had quite a few requests for source code during this time.
As of today I am deciding to release the majority of my larger projects as open source (I've decided on a creative commons license to prevent people from taking the projects and running off with them without giving credit;
http://creativecommons.org/licenses/by-nc-sa/3.0/us/). I will be posting to this thread as I am able to take the time to clean up the projects and upload them.
Most of the code is C++ code written in MSVC6.0. The express edition of MS visual studio should be able to open these (potentially with some difficulties). I am making no guarantee whatsoever that these projects will compile, run, or do at all what they are supposed to (in other words if you build and run one of my projects and it somehow turns your computer into a great big steaming pile of fail, don't come whining to me).
I also am not making any guarantee that I can help you with getting them to compile. Some of the timestamps on the files are over 4 years old; I don't have a clue how the builds work for some of the projects. If you are having major issues getting them to build or work properly please post here (I do think a couple use some modified versions of dependencies; I've tried to include the deps with the project but again, no guarantee that it will work at all). If you are missing deps I will try to help you the best I can but I cannot devote any time to helping you understand how the code works or anything of that sort cause my RL schedule is just too busy.
Now with that out of the way, here are the projects I have released. All the files can be downloaded from
http://blackbox.outpost2.net/op2goodies/ -- I will now list off the names of each .rar file and what the project inside is supposed to be:
OP2App -- this one is just a bunch of header files containing the exported functions, data, etc. from Outpost2.exe that are not used for anything level related. These include stuff to deal with files, windows, other UI elements, etc. It's probably not useful to anyone except those who might be interested in trying to hack these pieces of OP2.
OP2Editor -- this is the editor backend for OP2Mapper v2. It handles all the tileset, map, and vol file management and exposes a COM interface for these things. (The GUI frontend is written in VB6 and references the COM objects to perform the actual task of modifying and writing the map files). It may be useful if you are trying to write programs that work with maps, tilesets, VOLs, or CLMs. Most of the credit goes to Hooman on this one; I've only made minor changes for the most part as far as I can remember.
It's required if you are going to try to compile OP2Mapper v2.
op2ext -- this is an extension library that we include with the OPU distribution of OP2 that has been hacked in so that it gets loaded by the game when it starts up. It implements features such as the mod loader, loading of extra/addon VOLs, the IP dropdown list for multiplayer, language.ini support, among other things.
This is probably out-of-date: I know Hooman has made some major changes to the way the mod loader works as he asked for this code a while ago. Useless to most unless you are going to try to extend Outpost2.exe through some means.
OP2LangReader -- this goes hand in hand with op2ext, it was a tool written to extract localized strings from different language versions of OP2 and generate language.ini for you. There are some example language files cooked up already; it's pretty useless unless you know the virtual address and size of the localized strings table in Outpost2.exe, so mainly put here for reference purposes. (On the other hand, if someone wants to have a shot at making multilanguage versions of OP2; I know there is a spanish version floating somewhere that will have to have its strings extracted).
virmasktools -- tools to manipulate virmask.raw (a file in maps.vol that holds some 1bpp bitmaps that are used to generate the edges on lighting from the buildings, as well as the blight edges). There are two tools: vmunpack, which extracts a 32x32 1bpp bitmap from virmask and saves it as a windows DIB .bmp; and vminject which takes a DIB bmp and inserts it into virmask.raw. If you have any desire at all to modify virmask.raw these tools should allow you to do it with some elbow grease.
VOLExplorer -- VOL extractor/editor, was supposed to be a WinRAR-esque program for manipulating VOL files but it looks pretty unfinished. (The extract functionality might work, again try at your own risk).
There are some more projects that I plan to release full source to once I clean them up, I will list them here and post again when I clean them up and upload the rar:
OP2Mapper v2 -- The mapper frontend; written in VB6 (probably going to be impossible to compile in VB.net cause I recall it using a bunch of nasty hacks and external libraries. We'll see).
OP2Mapper 3 -- An unfinished project that was meant to be a full reimplementation of the mapper in 100% C++. Last time I poked around with this and tried it on Windows 7, my computer froze and I had to reboot. It may or may not work.
op2remake -- An attempt at creating a crossplatform replacement for Outpost 2 itself (the project is a C++ codeblocks project and it uses SDL and a menagerie of other libraries for font rendering, script processing, GUI, etc). IIRC, it could render a map file (I had a converter that would convert the OP2 .map into a lua script which it could process) and let you scroll around it inside of the OP2 greyish frame.... not too useful but it's a possible start.
If there is any project of mine that you would like to see but that I have completely missed, let me know and I will try to dredge it up from the bowels of my hard drive. In addition if you have any questions about anything let me know and I will try to answer them time permitting.
I will post as I am able to clean up the mappers and the op2 remake project and upload them.
Thanks and good luck,
BlackBox