Posted 22 October 2008 - 07:58 PM
I'm a fan of Ares (I bought it ages ago, it was great fun), and I know some C (but I'm by no means a programmer).
This code *LOOKS* like its the code that handled drawing things on the screen from the data files. Which means it is (somewhere) pulling data out of the resource files. Which means it SHOULD be possible to make it "run" and read all the sprite resources and dump them to a "screen" which is in fact a bitmap grid, which can then be saved as a file, and converted to a png [the bmp -> png should be trivial].
I've got no idea how OS9 handled multiple resources by IDs or whatever in a single file. For all I know the code that I think is picking which sprite to load is in fact directly accessing a memory mapped mirror of the game's sprite data.
As it is, I have no idea what the vast majority of the code does, its literally completely void of useful comments (ok, that's a line, there's a line here and there), given much of it I can take a wild guess based on the function names, and not be too far off--but that's hardly helpful for getting it to work. There's alot of other stuff there, and code pulled in from includes, and at lease one large block of assembly that may/may not be remotely meaningful to a non-ppc chip.
I don't have a machine that can run OS9 (ok, that's a lie, I have several, most of them are broken or missing too many pieces to turn on--or they're running linux). I don't know if its possible, but it *MIGHT* be useful to somehow get gdb to run on the ares game itself and attempt to see if we can track how things are being called. Though, the only time I've had that work was on very simple things, and only in a capacity to verify something I already suspected.
Someone might want to look a bit harder at how the code is displaying stuff to screen (if it is) it is most certainly accessing positioning and scaling graphics, I strongly doubt nathan would have given us code that didn't at LEAST read/decode the stuff we're after.
For starters, I assume that IF the sprites are stored (however SMIV stores them) in a grid like EV's PICTs; which actually I think they have to be, because I think some of the carriers had sprites that weren't exactly top down--unless they're 3dmodels, which they aren't, then it would likely be most productive to figure out how to get a SINGLE position [IE like the straight-up index position zero in EV in the upper left corner] non-animated image out of ANY SINGLE sprite into SOME other image format, I think BMPs would work well for this, and worry about generating pngs/masks/whatever afterwards.
From being able to pull out a single image, it should be (far less complicated) to procedurally pull out every other and reconstruct whatever we want from them.
At any rate, until someone (that isn't me--not that I wouldn't try, but I don't have time these days) can figure out how to access resources in an OS9-type program file, everything else is speculation.
Somebody should also figure out what the compile environment on OS9 is/was like, IE, what headers belong to the compiler, what/where they are/comefrom/do. I personally have no idea.
Sorry this is so long-winded circular and probably ~51% wrong, I also think I repeated myself numerous times, oh well--Like I said, its a guess based on a first pass go-over of the code, no prior knolage of what it does.
I should also say *NOW* that I'm not currently able to commit to helping on anything in a serious capacity. In the kind of capacity where I can jump in do something and vanish without warning I'll gladly help when/where I can.
-TLTMAA
"Whatever can go wrong, will go wrong, and whatever can't go wrong, will go wrong anyway."