make $exit work without a quest loaded on most versions

This commit is contained in:
Martin Michelsen
2025-04-24 18:58:20 -07:00
parent ebef2f2bd1
commit 1ad2c47444
21 changed files with 405 additions and 12 deletions
@@ -0,0 +1,17 @@
# This function implements $exit in a game when no quest is loaded.
.meta name="Exit anywhere"
.meta description=""
.meta hide_from_patches_menu
entry_ptr:
reloc0:
.offsetof start
start:
xor eax, eax
mov [0x0062D374], eax # is_in_quest = false
mov [0x0062D370], eax # dat_source_type = NONE
inc eax
mov [0x0071E8E8], ax # should_leave_game = true
ret