22.04.2005, 18:08:14
I have just spent some time talking to PaD, he gave me lots of reverse engineering notes and stuff.
I gave him lots of usefull tidbits on MS Runtime Type Information.
And on COM/OLE classes.
And on DynamicVectorClass and VectorClass (basicly, a way to store stuff that is used by both Renegade and RA2 and also Generals and such)
A few notable things came out of the reverse engineering work we did tonight (my time), the most usefull of which is that we finally found out why the game doesnt recognize more than 3 BaseUnits for the purposes of ShortGame=.
The reason is because that bit of code only cheks the first 3 entries in the BaseUnits list.
There is also other code that is similarly limited not to check the entire list.
Now that we found the various relavent pieces of code, it should be possible for PaD to rewrite it as a loop to check the entire array instead of just the first elements.
Other news is that we both looked at IsSensor (i.e. Sensor Array) and the concensus is that the code that actually makes it "sense" simply was removed from RA2 (makes sense, they knew they werent going to be using sensor array logic in RA2 so why have "dead" code in there. Although we couold be wrong
Also, I have taken a look at Ice1Set, Ice2Set, IceShoreSet and TrainBridgeSet.
The game doesnt read them at all.
No clue about the Ice stuff but I am sure that if the bridge logic was reverse engineered, it would be possible to have not just one but multiple extra bridge types per tileset. Although one would need to add a new overlay too which is where things get kinda tricky... (last I looked adding a new overlay to RA2 wasnt something that you could actually do)
Anyhow, this is a start and depending on how much time I have etc, I hope this wont be the last you hear from me as far as reverse engineering RA2 goes.
Let me know what I should have a look into next.
Note that I wont actually be doing any patching or coding (thats PaDs job), just studying stuff to find out how it works
I gave him lots of usefull tidbits on MS Runtime Type Information.
And on COM/OLE classes.
And on DynamicVectorClass and VectorClass (basicly, a way to store stuff that is used by both Renegade and RA2 and also Generals and such)
A few notable things came out of the reverse engineering work we did tonight (my time), the most usefull of which is that we finally found out why the game doesnt recognize more than 3 BaseUnits for the purposes of ShortGame=.
The reason is because that bit of code only cheks the first 3 entries in the BaseUnits list.
There is also other code that is similarly limited not to check the entire list.
Now that we found the various relavent pieces of code, it should be possible for PaD to rewrite it as a loop to check the entire array instead of just the first elements.
Other news is that we both looked at IsSensor (i.e. Sensor Array) and the concensus is that the code that actually makes it "sense" simply was removed from RA2 (makes sense, they knew they werent going to be using sensor array logic in RA2 so why have "dead" code in there. Although we couold be wrong
Also, I have taken a look at Ice1Set, Ice2Set, IceShoreSet and TrainBridgeSet.
The game doesnt read them at all.
No clue about the Ice stuff but I am sure that if the bridge logic was reverse engineered, it would be possible to have not just one but multiple extra bridge types per tileset. Although one would need to add a new overlay too which is where things get kinda tricky... (last I looked adding a new overlay to RA2 wasnt something that you could actually do)
Anyhow, this is a start and depending on how much time I have etc, I hope this wont be the last you hear from me as far as reverse engineering RA2 goes.
Let me know what I should have a look into next.
Note that I wont actually be doing any patching or coding (thats PaDs job), just studying stuff to find out how it works