Page 2 of 2
Posted: 14 May 2007, 17:14
by zwzsg
I got it working by compiling under Borland2006 instead of Borland6. Althought I WTF'ed at 'call to undefined function memcpy', by adding #include <string.h> before, and not after, every other include, I got it to eventually compile to the end. Now it requires devil.dll, probably because my dll->lib doesn't really convert the whole dll but just its index, but I gave that mapconv some bmp and it produced smf + smt.
So now I can start (trying to) make the actual changes.
Posted: 14 May 2007, 18:10
by AF
I'd create an std::map<int,float> to hold the rotations where the integer is the ID used in the red channel, and the float is the rotation.
Then in the small loop that loads the fs.txt contents it will instead read the line in and seperate it into 2 values, the featurename and a rotation defaulting to zero, seperated by a space or soemthing else.
Then when feature objects are being created the value 0 will be replaced with a call to the map<> container to retrieve the angle of rotation.
A further improvement would be the ability to define a TDF file OTA style referencing feature positions, to allow map makers to remove the 256 feature types limit.
As a bonus, the featurename of geothermal vents is 'GeoVent' thus you can now compile maps with geothermals anywhere by placing a GeoVent feature.
Posted: 14 May 2007, 20:00
by FLOZi
AF wrote:You have an issue with borland not the c++. Ditch borland, uninstall it, consign it to the trash can, you wont get any use out of it.
btw devc++ == outdated mingw32
Your better getting codeblocks then copying over the uptodate mingw32 as devc++ wont compile AIs or spring correctly.
However netbeans 5.5 is better for a lot as it doesnt have hacky UI glitches and issues, such as not being able to copy paste with rightclick on codeblocks, and a much nicer interface.
My DevCPP MingW compiles Spring and all SVN AIs just fine, thanks.
Posted: 14 May 2007, 22:41
by AF
Ah so youve downloaded and replaced the outdated build of mingw32 that comes with devc++?
Eitherway you cant release an AI with a devc++ compiler unless you replace the mingw32 devc++ uses with a modern version.
Posted: 14 May 2007, 23:21
by FLOZi
You can download gcc/mingw updates with the webupdate package manager. I don't remember doing that, mind.
Posted: 15 May 2007, 00:02
by rattle
Last time I tried to update mingw stuff through devcpp's packet manager it kept crashing. I think some server was down. In the end I ended up grabbing the files manually from the mingw site.
If I remember correctly then the "updates" in the packet list were outdated as well.