Right, I looked at the code and managed to add in a debug option, but my compiled launcher is about 400k bigger than Hammers, so I'll leave it to him.
I added the following code to "procedure TfrmLauncher.btnLaunchClick(Sender: TObject);" in uLCLaunch.pas.
Under the 'vars' section:
| EnableDebug: boolean;|
And just above the " (* Disable moving objects *)":
| if EnableDebug then|
SubVal := 0;
if GTAMemory.GTAVersion = verGTAVC_11_AUS then
SubVal := $8;
BufStr := 'DBUG';
GTAMemory.WriteAddr($6886AC - SubVal, @(BufStr), 4);
GTAMemory.WriteAddr($6D736D - SubVal, @(BufStr), 4);
Note: this code assumes the MAIN.SCM is the standard code and DBUG.SCM is the debug code (if you can't figure out how to change that there's something wrong).
It may infact be easier to set the variable to 1 in the SCM but that would require setting it BEFORE the other code is executed and therefore BEFORE the debug var is set, therefore you would need to alter that EXACT point in memory, which would be hard as it would change with every SCM update.
I also added a checkbox in the launcher config but for some reason that doesn't show up.
Note also that Im not sure of the Australian offset difference, this will work on EU/US EXEs.
Edit: missed a bit, you need:
| // Read -debug from command line|
EnableDebug := SameText(ParamStr(1), '-debug') or
Ini.ReadBool('Misc', 'Debug', False);
IsRussian := Ini.ReadBool('Exe', 'LangRus', False);
that line, sorry (also note the presence of an ini thing there - thats for the GUI and so you can add Debug=1 to the ini and it will run in debug.
Edited by Y_Less, 21 December 2005 - 04:25 AM.