"level where Jaffar's death stops the time"

Prince of Persia related subjects that do not have their own boards.
Post Reply
User avatar
robert
Sultan
Sultan
Posts: 194
Joined: August 27th, 2011, 7:16 pm
Location: Argentina

"level where Jaffar's death stops the time"

Post by robert »

I've seen that this hack "level where Jaffar's death stops the time" and this "Time is stopped on all further levels as well." are only available for version 1.0...

Is there a way to make them function in version 1.3?
Image
This will be my face if you can't win any of my mods
David
The Prince of Persia
The Prince of Persia
Posts: 2877
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: "level where Jaffar's death stops the time"

Post by David »

Level where Jaffar's death stops the time (1.3)

Code: Select all

0000C7D0:i833EB0100D                     cmp (w)   [+10B0],+0D
0000C7D5:i7F5F                           jg        file:0000C836
0000C7D7:i7507                           jne       file:0000C7E0
Search: 83 3E B0 10 0D 7F 5F, replace 0D with the level number.

~~~~
This highlights one of the biggest problems with EXE hacking: Sometimes, in different versions, you need to search for different hex codes.
(This problem also popped up here: viewtopic.php?p=14658#p14658 )
When I added new hacks to CusPoP, I only searched for the codes that are in 1.0, because that's the only version that I disassembled.
The difference in the codes is caused by the fact that this part of the code (and many others) uses global variables. ([+10B0] in this example.)
Addresses of global variables are different in each version.
For example the current level is stored at [+0F9E] in 1.0, but [+10B0] in 1.3, and [+10AA] in 1.4.

By the way, it seems to me that unavailable options are not grayed out in CusPoP.
Post Reply