24.04.2005, 05:42:52
ok, here is my first patch to contribute, its a patch to enable taunts for all countries
First number is the address in a disk file, second one is the old number at that spot (basing off the current patch) and third one is the new number to put there.
Its untested at the moment because I cant play online nor do I have new countries available to mess with.
00352BAC: B3 E4
00352C94: 90 E9
00352C95: 90 67
00352C96: 90 D3
00352C97: 90 44
00352C98: 90 00
004A4000: 90 51
004A4001: 90 0F
004A4002: 90 BE
004A4003: 90 C0
004A4004: 90 50
004A4005: 90 68
004A4006: 90 20
004A4007: 90 00
004A4008: 90 BA
004A4009: 90 00
004A400A: 90 E9
004A400B: 90 32
004A400C: 90 2C
004A400D: 90 BB
004A400E: 90 FF
004A4020: 90 74
004A4021: 90 61
004A4022: 90 75
004A4023: 90 6E
004A4024: 90 74
004A4025: 90 73
004A4026: 90 5C
004A4027: 90 74
004A4028: 90 61
004A4029: 90 75
004A402A: 90 25
004A402B: 90 30
004A402C: 90 32
004A402D: 90 69
004A402E: 90 25
004A402F: 90 30
004A4030: 90 32
004A4031: 90 69
004A4032: 90 2E
004A4033: 90 77
004A4034: 90 61
004A4035: 90 76
004A4036: 90 00
The existing countries keep the same taunt filenames, the new ones use taunts\tau##^^.wav (I have to keep the filename the same length as the old filename due to the size of the memory buffer used to hold the final filename)
## is the 2 digits of the country number
^^ is the 2 digits of the taunt number
This works for all countries including GDI, Nod, Neutral and Special
what it does is as follows
1.Changes the ja instruction at 00752BAA to jump to 00752C94 instead of 00752C63 (00752C94 is in the "empty space" just after the function)
2.Puts a jump at 00752C94 to jump to BA0000 (start of my new code)
3.Puts new code at 00BA0000 to do this:
push ecx ; push the country number
movsx eax, al ; grab the taunt number
push eax ; push the taunt number
push offset <string> ; push the string "taunts\tau%02i%02i.wav"
jmp 752C41 ; jump back to the origonal code
At 752C41 is then code that pushes the memory address to store the completed string into then calls sprintf to create the final filename which is then passed on to the sound playing code.
If you make the above changes on a copy of gamemd.exe with the most recent patch from PaD applied, it should work (back it up first obviously
. Can someone with the setup to do so test this to see if it works?
This is the first patch from me for RA2 but I assure you it wont be the last
First number is the address in a disk file, second one is the old number at that spot (basing off the current patch) and third one is the new number to put there.
Its untested at the moment because I cant play online nor do I have new countries available to mess with.
00352BAC: B3 E4
00352C94: 90 E9
00352C95: 90 67
00352C96: 90 D3
00352C97: 90 44
00352C98: 90 00
004A4000: 90 51
004A4001: 90 0F
004A4002: 90 BE
004A4003: 90 C0
004A4004: 90 50
004A4005: 90 68
004A4006: 90 20
004A4007: 90 00
004A4008: 90 BA
004A4009: 90 00
004A400A: 90 E9
004A400B: 90 32
004A400C: 90 2C
004A400D: 90 BB
004A400E: 90 FF
004A4020: 90 74
004A4021: 90 61
004A4022: 90 75
004A4023: 90 6E
004A4024: 90 74
004A4025: 90 73
004A4026: 90 5C
004A4027: 90 74
004A4028: 90 61
004A4029: 90 75
004A402A: 90 25
004A402B: 90 30
004A402C: 90 32
004A402D: 90 69
004A402E: 90 25
004A402F: 90 30
004A4030: 90 32
004A4031: 90 69
004A4032: 90 2E
004A4033: 90 77
004A4034: 90 61
004A4035: 90 76
004A4036: 90 00
The existing countries keep the same taunt filenames, the new ones use taunts\tau##^^.wav (I have to keep the filename the same length as the old filename due to the size of the memory buffer used to hold the final filename)
## is the 2 digits of the country number
^^ is the 2 digits of the taunt number
This works for all countries including GDI, Nod, Neutral and Special
what it does is as follows
1.Changes the ja instruction at 00752BAA to jump to 00752C94 instead of 00752C63 (00752C94 is in the "empty space" just after the function)
2.Puts a jump at 00752C94 to jump to BA0000 (start of my new code)
3.Puts new code at 00BA0000 to do this:
push ecx ; push the country number
movsx eax, al ; grab the taunt number
push eax ; push the taunt number
push offset <string> ; push the string "taunts\tau%02i%02i.wav"
jmp 752C41 ; jump back to the origonal code
At 752C41 is then code that pushes the memory address to store the completed string into then calls sprintf to create the final filename which is then passed on to the sound playing code.
If you make the above changes on a copy of gamemd.exe with the most recent patch from PaD applied, it should work (back it up first obviously

This is the first patch from me for RA2 but I assure you it wont be the last
