fraggle
Super Moderator

Posts: 6000
Registered: 07-00 |
shadow1013 said:
Well I had to do it all in one move otherwise the thing wouldn't compile. And I have noversion control :(
All hope might not be lost, but if I were in your position I'd seriously consider starting over. Keep a copy of what you've done so far, as you will probably find a lot of your changes are still useful.
I'd think about how you can divide this project up into stages. As I see it, the big hurdles are: 1) eliminating the assembly code (porting to C), 2) getting it working with a 32-bit compiler, 3) porting to modern operating systems.
Start with a clean copy of the original 16-bit code and set up version control as the VERY FIRST THING YOU DO. Systems like Subversion are trivial to set up (you don't even need to run a server), and not very difficult to learn. It's worth the effort, not just because you can roll back to earlier versions, but also because it makes you think about your changes in a more careful and methodical way.
Try and get the original 16-bit code to compile with its original compiler. I don't know what compiler Wolf3D used but it shouldn't be too difficult to figure out. It's possible you might need to make some minor changes just to get it to compile but hopefully it should mostly work out of the box. Once you've done that, and you have the game running, set about converting all the assembler to C, so that you have a pure C codebase. If you've already converted parts of the code to C you can reuse that work. Don't convert it all at once - convert small chunks, maybe a function at a time, and test it out as you go.
Once you have a pure C codebase it shouldn't be *too* difficult to convert to a 32-bit DOS compiler like DJGPP. There will be some obvious things you'll have to work around - it's probably best to replace all instances of 'int' with 'short', for example. Code that calls interrupts to interact with hardware will probably need changing. Once you're done you should have a codebase that will pretty much work with modern compilers. Then rip out anything DOS specific, replace with SDL and get a modern source port up and running!
|