Skip to content

Commit

Permalink
debug opcodes renumbered to unoccupied ids
Browse files Browse the repository at this point in the history
  • Loading branch information
MiranDMC committed Oct 31, 2023
1 parent 1d34952 commit 0d41627
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
- new [DebugUtils](https://github.com/cleolibrary/CLEO5/tree/master/cleo_plugins/DebugUtils) plugin
- new opcode **00C3 ([debug_on](https://library.sannybuilder.com/#/sa/debug/00C3))**
- new opcode **00C4 ([debug_off](https://library.sannybuilder.com/#/sa/debug/00C4))**
- new opcode **00CC ([breakpoint](https://library.sannybuilder.com/#/sa/debug/00CC))**
- new opcode **00CD ([trace](https://library.sannybuilder.com/#/sa/debug/00CD))**
- new opcode **00CE ([log_to_file](https://library.sannybuilder.com/#/sa/debug/00CE))**
- new opcode **2100 ([breakpoint](https://library.sannybuilder.com/#/sa/debug/2100))**
- new opcode **2101 ([trace](https://library.sannybuilder.com/#/sa/debug/2101))**
- new opcode **2102 ([log_to_file](https://library.sannybuilder.com/#/sa/debug/2102))**
- implemented support of opcodes **0662**, **0663** and **0664** (original Rockstar's script debugging opcodes. See DebugUtils.ini)
- new and updated opcodes
- **0DD5 ([get_game_platform](https://library.sannybuilder.com/#/sa/CLEO/0DD5))**
Expand Down
12 changes: 6 additions & 6 deletions cleo_plugins/DebugUtils/DebugUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ class DebugUtils
// register opcodes
CLEO_RegisterOpcode(0x00C3, Opcode_DebugOn);
CLEO_RegisterOpcode(0x00C4, Opcode_DebugOff);
CLEO_RegisterOpcode(0x00CC, Opcode_Breakpoint);
CLEO_RegisterOpcode(0x00CD, Opcode_Trace);
CLEO_RegisterOpcode(0x00CE, Opcode_LogToFile);
CLEO_RegisterOpcode(0x2100, Opcode_Breakpoint);
CLEO_RegisterOpcode(0x2101, Opcode_Trace);
CLEO_RegisterOpcode(0x2102, Opcode_LogToFile);

// original Rockstar's script debugging opcodes
if(GetPrivateProfileInt("General", "LegacyDebugOpcodes", 0, config.c_str()) != 0)
Expand Down Expand Up @@ -185,7 +185,7 @@ class DebugUtils
return OR_CONTINUE;
}

// 00CC=-1, breakpoint ...
// 2100=-1, breakpoint ...
static OpcodeResult WINAPI Opcode_Breakpoint(CScriptThread* thread)
{
if (!CLEO_GetScriptDebugMode(thread))
Expand Down Expand Up @@ -232,7 +232,7 @@ class DebugUtils
return OR_INTERRUPT;
}

// 00CD=-1, trace %1s% ...
// 2101=-1, trace %1s% ...
static OpcodeResult WINAPI Opcode_Trace(CScriptThread* thread)
{
if (!CLEO_GetScriptDebugMode(thread))
Expand All @@ -248,7 +248,7 @@ class DebugUtils
return OR_CONTINUE;
}

// 00CE=-1, log_to_file %1s% timestamp %2d% text %3s% ...
// 2102=-1, log_to_file %1s% timestamp %2d% text %3s% ...
static OpcodeResult WINAPI Opcode_LogToFile(CScriptThread* thread)
{
auto filestr = CLEO_ReadStringOpcodeParam(thread);
Expand Down

0 comments on commit 0d41627

Please sign in to comment.