diff --git a/macros/GTE.Macs.s b/macros/GTE.Macs.s index e1cfcaa..4313f90 100644 --- a/macros/GTE.Macs.s +++ b/macros/GTE.Macs.s @@ -146,6 +146,7 @@ PAD_KEY_DOWN equ $0400 ENGINE_MODE_TWO_LAYER equ $0001 ENGINE_MODE_DYN_TILES equ $0002 ENGINE_MODE_BNK0_BUFF equ $0004 +ENGINE_MODE_USER_TOOL equ $8000 ; Communicate if GTE is loaded as a system tool, or a user tool ; Render flags RENDER_ALT_BG1 equ $0001 diff --git a/src/Defs.s b/src/Defs.s index 48f8d37..9457df8 100644 --- a/src/Defs.s +++ b/src/Defs.s @@ -166,6 +166,7 @@ SPRITE_VBUFF_PTR equ 224 ; 32 bytes of adjusted pointers to VBuf ENGINE_MODE_TWO_LAYER equ $0001 ENGINE_MODE_DYN_TILES equ $0002 ENGINE_MODE_BNK0_BUFF equ $0004 +ENGINE_MODE_USER_TOOL equ $8000 ; Communicate if GTE is loaded as a system tool, or a user tool ; Render flags RENDER_ALT_BG1 equ $0001 diff --git a/src/Tool.s b/src/Tool.s index 760331e..dae5db3 100644 --- a/src/Tool.s +++ b/src/Tool.s @@ -156,7 +156,9 @@ zpToUse = userId+4 ; SetWAP(userOrSystem, tsNum, waptPtr) - pea #$8000 ; $8000 = user tool set + lda EngineMode ; $0000 = system tool, $8000 = user tool set + and #$8000 + pha pei ToolNum ; Push the tool number from the direct page pea $0000 ; High word of WAP is zero (bank 0) phd ; Low word of WAP is the direct page