Code: Select all
const int max_base_pointers = 6000;
const int max_base_pointers_size = max_base_pointers*sizeof(uint16_t);
The demo version "wildemo.scr" starts at a different offset, so I patched it (removing a lot of zero bytes) in order to make it start at 0x2EE0, which is the offset the decompiler works with. I managed to decompile it partially, but some variables were missing and it generated some garbage code at the end, since the decompiler seems don't knowing the actual final pointer. I didn't managed to decompile demo missions since their pointers aren't matching with base script wildemo.scr.
Doing a first look, I guess that the 6 minutes timer in demo version is much likely performed by gta2.exe, since I cannot see any timer being set in wildemo.scr (besides the kill frenzy ones).
The PSX offset is 0x1770, which is exactly the half of 0x2EE0, so I managed to decompile PSX scripts as well (without garbage code):
Their strings (.mis names, zone names, gang names etc.) also are on different offset, so I changed on decompiler too. Due this, the .scr are completely decompiled. I managed to recompile PSX Downtown for example, although the recompiled one cannot be used on PSX because the official compiler we have is for PC (PSX will expect different offsets, so it will probably crash). With luck, maybe it's possible to change something in miss2.exe to make it compile scripts in PSX mode instead of PC, so we will unlock PSX modding (besides patching .scr). (EDIT: I did it. See my third post on this thread)
EDIT: I've fixed an error in PSX version of bil_zh2.mis, where a undefined gang (islagang) was used although this gang don't exist in PSX version.
Also, I've decompiled the Dreamcast scripts: