dressupgeekout / lunapurpura

Reimplementation of Purple Moon's games from the 1990s (WIP) - NOTE: ScummVM port in progress
https://dressupgeekout.github.io/lunapurpura/
BSD 2-Clause "Simplified" License
8 stars 1 forks source link

Fix the "internal ID" in PRXes #20

Closed dressupgeekout closed 4 years ago

dressupgeekout commented 4 years ago

Notice how the last PRX member is always listed as -1. This is because it's actually stored as zero, but I subtract one because we purposefully ignore the zeroeth "dummy" member. It's weird.

$ ../../build/src/prx/prx -t ../../data/tricky/IDBackPk.PRX  | tail
215   ROC_packtake_v7   Aif   45087   43572   
216   ROC_sidepock_v3   Aif   45088   26932   
217   ROC_mainpock_v3   Aif   45089   45822   
218   ROC_ZipOpen_t1    Aif   45090   22182   
219   ROC_ZipClose_t1   Aif   45091   25838   
220   ROC_Camera_t1     Aif   45092   18320   
221   ROC_PDAforward_   Aif   45093   42934   
222   ROC_PDAmessage_   Aif   45094   20206   
223   ROC_PDArewind_t   Aif   45095   48396   
-1    ROC_PDAstart_t1   Aif   45096   15962   

To be clear, this bug is about: making sure the last member's "internal ID" is actually NOT zero.