rewrite client function compiler
This commit is contained in:
+65
-7
@@ -1,16 +1,76 @@
|
||||
.meta visibility="all"
|
||||
.meta name="Kill count fix"
|
||||
.meta description="Fixes client-side\nkill counts when\nmultiple enemies are\nkilled on the same\nframe"
|
||||
|
||||
.versions 59NJ 59NL
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksBB
|
||||
.include WriteCodeBlocks
|
||||
|
||||
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.label TItemWeapon_SealedJSword_count_kill_loc, <VERS 0x8012D2D4 0x8012D518 0x8012D550 0x8012D4B0 0x8012D578 0x8012D578 0x8012D4C0 0x8012D698>
|
||||
.data TItemWeapon_SealedJSword_count_kill_loc
|
||||
.deltaof TItemWeapon_SealedJSword_count_kill, TItemWeapon_SealedJSword_count_kill_end
|
||||
.address TItemWeapon_SealedJSword_count_kill_loc
|
||||
TItemWeapon_SealedJSword_count_kill: # [std](TItemWeapon_SealedJSword* this @ r3) -> void
|
||||
lwz r4, [r3 + 0xF0] # r4 = this->owner_player
|
||||
lha r5, [r4 + 0x11A] # r5 = this->owner_player->num_kills_since_map_load
|
||||
lha r6, [r3 + 0x1F8] # r6 = this->last_owner_player_kill_count
|
||||
lhz r7, [r3 + 0xE8] # r7 = this->kill_count
|
||||
cmp r6, r5
|
||||
bge TItemWeapon_SealedJSword_count_kill_skip_update
|
||||
lwz r8, [r3 + 0xDC]
|
||||
andi. r8, r8, 0x100
|
||||
beq TItemWeapon_SealedJSword_count_kill_skip_incr # if (!(flags & 0x100)) don't incr kill count
|
||||
sub r8, r5, r6
|
||||
add r7, r7, r8
|
||||
sth [r3 + 0xE8], r7
|
||||
TItemWeapon_SealedJSword_count_kill_skip_incr:
|
||||
sth [r3 + 0x1F8], r5
|
||||
TItemWeapon_SealedJSword_count_kill_skip_update:
|
||||
cmplwi r7, 23000
|
||||
blt TItemWeapon_SealedJSword_count_kill_skip_set_flag
|
||||
lwz r8, [r3 + 0xDC]
|
||||
ori r8, r8, 0x200
|
||||
stw [r3 + 0xDC], r8
|
||||
TItemWeapon_SealedJSword_count_kill_skip_set_flag:
|
||||
blr
|
||||
TItemWeapon_SealedJSword_count_kill_end:
|
||||
|
||||
|
||||
|
||||
.versions 4OJB 4OJD 4OJU 4OED 4OEU 4OPD 4OPU
|
||||
|
||||
.data <VERS 0x00197610 0x001977A0 0x00197920 0x00197880 0x00197810 0x001978A0 0x00197840>
|
||||
.deltaof TItemWeapon_SealedJSword_count_kill, TItemWeapon_SealedJSword_count_kill_end
|
||||
.address <VERS 0x00197610 0x001977A0 0x00197920 0x00197880 0x00197810 0x001978A0 0x00197840>
|
||||
TItemWeapon_SealedJSword_count_kill:
|
||||
mov eax, [ecx + 0xF0]
|
||||
movsx eax, word [eax + 0x11A]
|
||||
movsx edx, word [ecx + 0x1F8]
|
||||
sub edx, eax
|
||||
jge TItemWeapon_SealedJSword_count_kill_skip_update
|
||||
test dword [ecx + 0xDC], 0x100
|
||||
jz TItemWeapon_SealedJSword_count_kill_skip_incr
|
||||
sub [ecx + 0xE8], dx
|
||||
TItemWeapon_SealedJSword_count_kill_skip_incr:
|
||||
mov [ecx + 0x1F8], ax
|
||||
TItemWeapon_SealedJSword_count_kill_skip_update:
|
||||
cmp word [ecx + 0xE8], 23000
|
||||
jb TItemWeapon_SealedJSword_count_kill_skip_set_flag
|
||||
or dword [ecx + 0xDC], 0x200
|
||||
TItemWeapon_SealedJSword_count_kill_skip_set_flag:
|
||||
ret
|
||||
TItemWeapon_SealedJSword_count_kill_end:
|
||||
|
||||
|
||||
|
||||
.versions 59NJ 59NL
|
||||
|
||||
.data <VERS 0x005E32A4 0x005E32C8>
|
||||
.deltaof TItemUnitUnsealable_count_kill, TItemUnitUnsealable_count_kill_end
|
||||
.address <VERS 0x005E32A4 0x005E32C8>
|
||||
@@ -34,8 +94,6 @@ TItemUnitUnsealable_count_kill_skip_update:
|
||||
jmp <VERS 0x005E2C10 0x005E2C34>
|
||||
TItemUnitUnsealable_count_kill_end:
|
||||
|
||||
|
||||
|
||||
.data <VERS 0x005F3E94 0x005F3EFC>
|
||||
.deltaof TItemWeapon_LameDArgent_count_kill, TItemWeapon_LameDArgent_count_kill_end
|
||||
.address <VERS 0x005F3E94 0x005F3EFC>
|
||||
@@ -59,8 +117,6 @@ TItemWeapon_LameDArgent_count_kill_skip_update:
|
||||
ret
|
||||
TItemWeapon_LameDArgent_count_kill_end:
|
||||
|
||||
|
||||
|
||||
.data <VERS 0x005FC95C 0x005FCA74>
|
||||
.deltaof TItemWeapon_SealedJSword_count_kill, TItemWeapon_SealedJSword_count_kill_end
|
||||
.address <VERS 0x005FC95C 0x005FCA74>
|
||||
@@ -86,5 +142,7 @@ TItemWeapon_SealedJSword_count_kill_end:
|
||||
|
||||
|
||||
|
||||
.all_versions
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -1,42 +0,0 @@
|
||||
.meta name="Kill count fix"
|
||||
.meta description="Fixes client-side\nkill counts when\nmultiple enemies are\nkilled on the same\nframe"
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksGC
|
||||
|
||||
.label TItemWeapon_SealedJSword_count_kill_loc, <VERS 0x8012D2D4 0x8012D518 0x8012D550 0x8012D4B0 0x8012D578 0x8012D578 0x8012D4C0 0x8012D698>
|
||||
.data TItemWeapon_SealedJSword_count_kill_loc
|
||||
.deltaof TItemWeapon_SealedJSword_count_kill, TItemWeapon_SealedJSword_count_kill_end
|
||||
.address TItemWeapon_SealedJSword_count_kill_loc
|
||||
TItemWeapon_SealedJSword_count_kill: # [std](TItemWeapon_SealedJSword* this @ r3) -> void
|
||||
lwz r4, [r3 + 0xF0] # r4 = this->owner_player
|
||||
lha r5, [r4 + 0x11A] # r5 = this->owner_player->num_kills_since_map_load
|
||||
lha r6, [r3 + 0x1F8] # r6 = this->last_owner_player_kill_count
|
||||
lhz r7, [r3 + 0xE8] # r7 = this->kill_count
|
||||
cmp r6, r5
|
||||
bge TItemWeapon_SealedJSword_count_kill_skip_update
|
||||
lwz r8, [r3 + 0xDC]
|
||||
andi. r8, r8, 0x100
|
||||
beq TItemWeapon_SealedJSword_count_kill_skip_incr # if (!(flags & 0x100)) don't incr kill count
|
||||
sub r8, r5, r6
|
||||
add r7, r7, r8
|
||||
sth [r3 + 0xE8], r7
|
||||
TItemWeapon_SealedJSword_count_kill_skip_incr:
|
||||
sth [r3 + 0x1F8], r5
|
||||
TItemWeapon_SealedJSword_count_kill_skip_update:
|
||||
cmplwi r7, 23000
|
||||
blt TItemWeapon_SealedJSword_count_kill_skip_set_flag
|
||||
lwz r8, [r3 + 0xDC]
|
||||
ori r8, r8, 0x200
|
||||
stw [r3 + 0xDC], r8
|
||||
TItemWeapon_SealedJSword_count_kill_skip_set_flag:
|
||||
blr
|
||||
TItemWeapon_SealedJSword_count_kill_end:
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -1,35 +0,0 @@
|
||||
.meta name="Kill count fix"
|
||||
.meta description="Fixes client-side\nkill counts when\nmultiple enemies are\nkilled on the same\nframe"
|
||||
|
||||
.versions 4OJB 4OJD 4OJU 4OED 4OEU 4OPD 4OPU
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksXB
|
||||
|
||||
.data <VERS 0x00197610 0x001977A0 0x00197920 0x00197880 0x00197810 0x001978A0 0x00197840>
|
||||
.deltaof TItemWeapon_SealedJSword_count_kill, TItemWeapon_SealedJSword_count_kill_end
|
||||
.address <VERS 0x00197610 0x001977A0 0x00197920 0x00197880 0x00197810 0x001978A0 0x00197840>
|
||||
TItemWeapon_SealedJSword_count_kill:
|
||||
mov eax, [ecx + 0xF0]
|
||||
movsx eax, word [eax + 0x11A]
|
||||
movsx edx, word [ecx + 0x1F8]
|
||||
sub edx, eax
|
||||
jge TItemWeapon_SealedJSword_count_kill_skip_update
|
||||
test dword [ecx + 0xDC], 0x100
|
||||
jz TItemWeapon_SealedJSword_count_kill_skip_incr
|
||||
sub [ecx + 0xE8], dx
|
||||
TItemWeapon_SealedJSword_count_kill_skip_incr:
|
||||
mov [ecx + 0x1F8], ax
|
||||
TItemWeapon_SealedJSword_count_kill_skip_update:
|
||||
cmp word [ecx + 0xE8], 23000
|
||||
jb TItemWeapon_SealedJSword_count_kill_skip_set_flag
|
||||
or dword [ecx + 0xDC], 0x200
|
||||
TItemWeapon_SealedJSword_count_kill_skip_set_flag:
|
||||
ret
|
||||
TItemWeapon_SealedJSword_count_kill_end:
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
+8
-12
@@ -1,18 +1,14 @@
|
||||
# This patch changes the amount of items and Meseta that can be stored in the
|
||||
# bank. If the bank item limit is increased beyond 200, this patch requires
|
||||
# server support for extended bank data stored outside of the player's data.
|
||||
# newserv has support for this, but you must set the BBBankItemLimit and
|
||||
# BBBankMesetaLimit values in config.json to match the values used here.
|
||||
# This patch changes the amount of items and Meseta that can be stored in the bank. If the bank item limit is increased
|
||||
# beyond 200, this patch requires server support for extended bank data stored outside of the player's data. newserv
|
||||
# has support for this, but you must set the BBBankItemLimit and BBBankMesetaLimit values in config.json to match the
|
||||
# values used here.
|
||||
|
||||
# As written, this changes the meseta limit to 2000000000 and the item limit to
|
||||
# 1000. The meseta limit can be any value up to 2147483647, and the item limit
|
||||
# can be any value up to 1321. To use different values than the defaults, first
|
||||
# compute the data size as ((slot count * 0x18) + 8), then replace each value
|
||||
# below appropriately.
|
||||
# As written, this changes the meseta limit to 2000000000 and the item limit to 1000. The meseta limit can be any value
|
||||
# up to 2147483647, and the item limit can be any value up to 1321. To use different values than the defaults, first
|
||||
# compute the data size as ((slot count * 0x18) + 8), then replace each value below appropriately.
|
||||
|
||||
.meta name="More bank slots"
|
||||
.meta description=""
|
||||
.meta hide_from_patches_menu
|
||||
|
||||
.versions 59NJ 59NL
|
||||
|
||||
@@ -21,7 +17,7 @@ reloc0:
|
||||
.offsetof start
|
||||
|
||||
start:
|
||||
.include WriteCodeBlocksBB
|
||||
.include WriteCodeBlocks
|
||||
|
||||
.data <VERS 0x006C8C53 0x006C8C0F>
|
||||
.data 4
|
||||
+5
-8
@@ -1,14 +1,11 @@
|
||||
# This patch disables the logic that causes all unlockable areas to be open by
|
||||
# default for all players, instead restoring the logic that checks quest flags
|
||||
# to open areas (as previous PSO versions used).
|
||||
# This patch disables the logic that causes all unlockable areas to be open by default for all players, instead
|
||||
# restoring the logic that checks quest flags to open areas (as previous PSO versions used).
|
||||
|
||||
# This patch is intended to be used in the BBRequiredPatches field in
|
||||
# config.json if you want the classic behavior, hence the presence of the
|
||||
# hide_from_patches_menu directive here.
|
||||
# This patch is intended to be used in the BBRequiredPatches field in config.json if you want the classic behavior,
|
||||
# hence the visibility setting here.
|
||||
|
||||
.meta name="Classic main warp behavior"
|
||||
.meta description=""
|
||||
.meta hide_from_patches_menu
|
||||
|
||||
.versions 59NJ 59NL
|
||||
|
||||
@@ -16,7 +13,7 @@ entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksBB
|
||||
.include WriteCodeBlocks
|
||||
.data <VERS 0x0064A642 0x0064A5DE> # Episode 1
|
||||
.data 1
|
||||
.binary 01
|
||||
+4
-7
@@ -1,14 +1,11 @@
|
||||
# It would be a bad idea to remove `.meta hide_from_patches_menu` to make this
|
||||
# patch an option for players to be able to select; either all players on the
|
||||
# server should have this patch, or none should have it.
|
||||
# It would be a bad idea to change this function's visibility; either all players on the server should have this patch,
|
||||
# or none should have it.
|
||||
|
||||
# This patch clears the list of unreleased items on the client, so the client
|
||||
# never creates buggy items when the server generates an item that wasn't
|
||||
# released on the official servers.
|
||||
# This patch clears the list of unreleased items on the client, so the client never creates buggy items when the server
|
||||
# generates an item that wasn't released on the official servers.
|
||||
|
||||
.meta name="Clear unreleased item list"
|
||||
.meta description=""
|
||||
.meta hide_from_patches_menu
|
||||
|
||||
.versions 59NJ 59NL
|
||||
|
||||
+2
-1
@@ -1,3 +1,4 @@
|
||||
.meta visibility="all"
|
||||
.meta name="Item exch. fix"
|
||||
.meta description="Fixes some quest item\nexchange opcodes"
|
||||
|
||||
@@ -7,7 +8,7 @@ entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksBB
|
||||
.include WriteCodeBlocks
|
||||
|
||||
|
||||
|
||||
@@ -1,624 +0,0 @@
|
||||
# This patch changes the number of BB character save slots from 4 to any number
|
||||
# up to 127.
|
||||
|
||||
# This patch is for documentation purposes only; it works when used as a server
|
||||
# patch via newserv, but is decidedly inconvenient to use via this method. This
|
||||
# is because it affects logic that runs before any patches can be sent by the
|
||||
# server, so the player has to connect once to get the patch, then disconnect
|
||||
# and connect again to use the additional slots.
|
||||
|
||||
# As written, this patch changes the slot count from 4 to 12. To use a
|
||||
# different slot count, first compute the following values:
|
||||
# slot count = your desired number of player slots (must be >= 4, <= 127)
|
||||
# total file size = (slot count * 0x2EA4) + 0x14
|
||||
# bgm_test_songs_unlocked offset = total file size - 0x10
|
||||
# save_count offset = total file size - 8
|
||||
# round2_seed offset = total file size - 4
|
||||
# Then, for each of the above, search for the string to the left of the = sign
|
||||
# and change the values used in all of the matching lines.
|
||||
|
||||
.meta name="More save slots"
|
||||
.meta description=""
|
||||
.meta hide_from_patches_menu
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
|
||||
# Include a few functions first
|
||||
write_call_to_code:
|
||||
.include WriteCallToCode-59NJ
|
||||
memcpy:
|
||||
.include CopyData
|
||||
ret
|
||||
|
||||
|
||||
|
||||
start:
|
||||
# Apply all necessary patches
|
||||
call apply_enable_scroll_patch
|
||||
call apply_fix_scroll_patch1
|
||||
call apply_fix_scroll_patch2
|
||||
call apply_fix_file_index
|
||||
call apply_preview_window_fix
|
||||
call apply_static_patches
|
||||
# Rewrite the existing char file regions to have the appropriate size; this
|
||||
# must be done after the patches are applied because we call the checksum
|
||||
# function, which is patched by one of the above calls
|
||||
call update_existing_char_file_list
|
||||
jmp update_existing_char_file_list_memcard
|
||||
|
||||
|
||||
|
||||
apply_enable_scroll_patch:
|
||||
# This patch enables scrolling behavior within the character list
|
||||
push -5 # Jump size (negative = jmp instead of call)
|
||||
push 0x00413B77 # Jump address
|
||||
call get_code_size_for_enable_scroll
|
||||
.deltaof enable_scroll_start, enable_scroll_end
|
||||
get_code_size_for_enable_scroll:
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call enable_scroll_end
|
||||
enable_scroll_start:
|
||||
mov eax, dword ptr [edi + 0x28] # cursor = char_select_menu->cursor_obj (TAdSelectCurGC*)
|
||||
or dword [eax + 0x01F8], 3 # cursor->flags |= 3 # Enable scrolling
|
||||
mov eax, [0x00A38BD0] # scroll_bar = TAdScrollBarXb_objs[0]
|
||||
mov ecx, [eax + 0xEC] # ecx = scroll_bar->client_id
|
||||
imul ecx, ecx, 0x24
|
||||
# Set up scroll bar graphics (in struct at scroll_bar + 0x1C)
|
||||
mov dword [eax + ecx + 0x1C], 0x439D0000
|
||||
mov dword [eax + ecx + 0x20], 0x43360000
|
||||
mov dword [eax + ecx + 0x24], 0x439D0000
|
||||
mov dword [eax + ecx + 0x28], 0x4392AB85
|
||||
mov dword [eax + ecx + 0x2C], 0x40400000
|
||||
mov dword [eax + ecx + 0x30], 0x425EA3D7
|
||||
mov dword [eax + ecx + 0x34], 0x00000008
|
||||
mov dword [eax + ecx + 0x38], 0x00000000
|
||||
mov dword [eax + ecx + 0x3C], 0x00000000
|
||||
or dword [eax + 0xF0], 1 # scroll_bar->flags |= 1
|
||||
mov ecx, [eax + 0xEC]
|
||||
shl ecx, 4
|
||||
mov dword [eax + ecx + 0xAC], 0 # scroll_bar->selection_state[client_id].scroll_offset = 0
|
||||
mov dword [eax + ecx + 0xB0], 0 # scroll_bar->selection_state[client_id].selected_index = 0
|
||||
mov dword [eax + ecx + 0xB4], 4 # scroll_bar->selection_state[client_id].num_items_in_view = 4
|
||||
mov dword [eax + ecx + 0xB8], 0x0B # scroll_bar->selection_state[client_id].last_item_index = (slot count - 1)
|
||||
pop edi
|
||||
ret
|
||||
enable_scroll_end:
|
||||
call write_call_to_code
|
||||
ret
|
||||
|
||||
|
||||
|
||||
apply_fix_scroll_patch1:
|
||||
# This patch fixes character selection cursor object so it will take the
|
||||
# scroll offset into account
|
||||
push 6 # Call size
|
||||
push 0x00413C30 # Call address
|
||||
call get_code_size_for_fix_scroll_patch1
|
||||
.deltaof fix_scroll_patch1_start, fix_scroll_patch1_end
|
||||
get_code_size_for_fix_scroll_patch1:
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call fix_scroll_patch1_end
|
||||
fix_scroll_patch1_start:
|
||||
mov edx, [edi + 0x28] # cursor = this->ad_select_cur_obj (TAdSelectCurGC*)
|
||||
mov ebp, [edx + 0x44] # ebp = cursor->selected_index_within_view
|
||||
mov eax, [0x00A38BD0] # scroll_bar = TAdScrollBarXb_objs[0]
|
||||
add ebp, [eax + 0xAC] # ebp += scroll_bar->selection_state[0].scroll_offset
|
||||
ret
|
||||
fix_scroll_patch1_end:
|
||||
call write_call_to_code
|
||||
ret
|
||||
|
||||
|
||||
|
||||
apply_fix_scroll_patch2:
|
||||
# This patch changes the TAdSinglePlyChrSelectGC::selected_index_within_view
|
||||
# to be the selected character's absolute index (including scroll_offset),
|
||||
# not the index only within the displayed four characters
|
||||
push 6 # Call size
|
||||
push 0x00413CD0 # Call address
|
||||
call get_code_size_for_fix_scroll_patch2
|
||||
.deltaof fix_scroll_patch2_start, fix_scroll_patch2_end
|
||||
get_code_size_for_fix_scroll_patch2:
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call fix_scroll_patch2_end
|
||||
fix_scroll_patch2_start:
|
||||
mov eax, [0x00A38BD0] # scroll_bar = TAdScrollBarXb_objs[0]
|
||||
mov eax, [eax + 0xAC] # eax = scroll_bar->selection_state[0].scroll_offset
|
||||
mov edx, [edi + 0x28] # cursor = this->ad_select_cur_obj (TAdSelectCurGC*)
|
||||
add eax, [edx + 0x44] # eax += cursor->selected_index_within_view
|
||||
ret
|
||||
fix_scroll_patch2_end:
|
||||
call write_call_to_code
|
||||
ret
|
||||
|
||||
|
||||
|
||||
apply_fix_file_index:
|
||||
# This patch fixes the character file indexing so it will account for the
|
||||
# scroll position
|
||||
push 5 # Call size
|
||||
push 0x00413CE8 # Call address
|
||||
call get_code_size_for_selection_index_fix2
|
||||
.deltaof selection_index_fix2_start, selection_index_fix2_end
|
||||
get_code_size_for_selection_index_fix2:
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call selection_index_fix2_end
|
||||
selection_index_fix2_start:
|
||||
mov eax, [0x00A38BD0]
|
||||
mov eax, [eax + 0xAC] # eax = TAdScrollBarXb_objs[0]->selection_state[0].scroll_offset
|
||||
add ebp, eax # arg0 += eax
|
||||
mov [esp + 4], ebp
|
||||
mov eax, 0x006C1ABC
|
||||
jmp eax # set_current_char_slot
|
||||
selection_index_fix2_end:
|
||||
call write_call_to_code
|
||||
ret
|
||||
|
||||
|
||||
|
||||
apply_preview_window_fix:
|
||||
# This patch fixes the preview display so it will show the correct section
|
||||
# ID, level, etc.
|
||||
push 5 # Call size
|
||||
push 0x0040216C # Call address
|
||||
call get_code_size_for_preview_window_fix
|
||||
.deltaof preview_window_fix_start, preview_window_fix_end
|
||||
get_code_size_for_preview_window_fix:
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call preview_window_fix_end
|
||||
preview_window_fix_start:
|
||||
mov eax, [0x00A38BD0] # scroll_bar = TAdScrollBarXb_objs[0]
|
||||
mov eax, [eax + 0xAC] # eax = scroll_bar->selection_state[0].scroll_offset
|
||||
add [esp + 4], eax
|
||||
mov eax, 0x006C4514 # get_player_preview_info
|
||||
jmp eax
|
||||
preview_window_fix_end:
|
||||
# This patch applies in two places, so push the second set of args now, then
|
||||
# apply it twice
|
||||
push 5 # Call size
|
||||
push 0x00401842 # Call address
|
||||
push dword [esp + 0x10] # Code size
|
||||
push dword [esp + 0x10] # Code address
|
||||
call write_call_to_code
|
||||
call write_call_to_code
|
||||
ret
|
||||
|
||||
|
||||
|
||||
apply_static_patches:
|
||||
.include WriteCodeBlocksBB
|
||||
# These patches change various places where the character data size and slot
|
||||
# count are referenced
|
||||
.data 0x00475294
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count; TDataProtocol::handle_E5
|
||||
.data 0x0047534B
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count; import_player_preview
|
||||
.data 0x004786D1
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count; TDataProtocol::handle_E4
|
||||
.data 0x00482559
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C17FB
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C1D07
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C1D3A
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C1D58
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C1E13
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C226A
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C22A9
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C22CA
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C22DA
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C2517
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C267F
|
||||
.data 0x00000004
|
||||
.data 0x00022FBC # save_count offset
|
||||
.data 0x006C2689
|
||||
.data 0x00000004
|
||||
.data 0x00022FBC # save_count offset
|
||||
.data 0x006C272B
|
||||
.data 0x00000004
|
||||
.data 0x00022FBC # save_count offset
|
||||
.data 0x006C2741
|
||||
.data 0x00000004
|
||||
.data 0x00022FC0 # round2_seed offset
|
||||
.data 0x006C27CF
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C28A8
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C314F
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C357B
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C35BA
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C35E6
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C35F3
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C360E
|
||||
.data 0x00000004
|
||||
.data 0x00022FBC # save_count offset
|
||||
.data 0x006C3617
|
||||
.data 0x00000004
|
||||
.data 0x00022FBC # save_count offset
|
||||
.data 0x006C371C
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C3B5A
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C424D
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C4833
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C486A
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C49A6
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C49DD
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C4AC5
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C4AFE
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C4CDE
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C4D15
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C4DFD
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C4E36
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C4F9C
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C4FD7
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C51C5
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C5201
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C5376
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C53B0
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C5545
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C5581
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C56F6
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C5730
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C58B6
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C58F0
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C5A85
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C5AC1
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C5BB2
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C5BEC
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C5D72
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C5DAC
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C5F32
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C5F6C
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C60F2
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C612C
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C6346
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C6381
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C6505
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C6541
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C6632
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C666C
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C67F2
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C682C
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C69B2
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C69EC
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C6B87
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C6BB8
|
||||
.data 0x00000004
|
||||
.data 0x0000005D # memcard block count
|
||||
.data 0x006C6C3A
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C6C74
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C6E82
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C6EBC
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C70B9
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C70F3
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C7A46
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C7D66
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C7D7C
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C7DC0
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x0077CC72
|
||||
.data 0x00000004
|
||||
.data 0x00022FB4 # bgm_test_songs_unlocked offset
|
||||
|
||||
# Signature check on all save files (rewritten as loop)
|
||||
.data 0x006C1C69
|
||||
.deltaof sig_check_begin, sig_check_end
|
||||
sig_check_begin:
|
||||
mov edx, 0xC87ED5B1 # Expected signature value
|
||||
add eax, 0x04E8 # &char_file_list->chars[0].part2.signature
|
||||
mov ecx, 0x0C # slot count
|
||||
again:
|
||||
cmp dword [eax], 0 # signature == 0 (no char in slot)
|
||||
je sig_ok
|
||||
cmp dword [eax], edx # signature == expected value
|
||||
jne sig_bad
|
||||
sig_ok:
|
||||
add eax, 0x2EA4 # Advance to next slot
|
||||
dec ecx
|
||||
jnz again
|
||||
xor eax, eax # All signatures OK (eax = 0)
|
||||
jmp sig_check_end
|
||||
sig_bad:
|
||||
xor eax, eax # Bad signature (eax = 1)
|
||||
inc eax
|
||||
jmp sig_check_end
|
||||
.binary CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
|
||||
sig_check_end: # 006C1CB2
|
||||
|
||||
# Send slot count in E3 command
|
||||
.data 0x0046EC10 # TDataProtocol::send_E3_for_index
|
||||
.deltaof send_slot_count_in_E3_begin, send_slot_count_in_E3_end
|
||||
send_slot_count_in_E3_begin:
|
||||
# ecx = this (TDataProtocol*)
|
||||
# [esp + 4] = slot_index
|
||||
push 0
|
||||
push dword [esp + 8] # slot_index
|
||||
push 0x0C # slot count
|
||||
push 0x00E30010
|
||||
mov eax, esp
|
||||
push 0x10
|
||||
push eax
|
||||
mov eax, [ecx]
|
||||
call [eax + 0x20] # this->send_command(&cmd, 0x10) // ret 8
|
||||
add esp, 8
|
||||
mov eax, 0x006C1ABC
|
||||
call eax # set_current_char_slot(slot_index) // ret 0
|
||||
add esp, 8
|
||||
ret 4
|
||||
send_slot_count_in_E3_end:
|
||||
|
||||
# Show slot number in each menu item
|
||||
.data 0x00401D57
|
||||
.deltaof show_slot_number_begin, show_slot_number_end
|
||||
show_slot_number_begin:
|
||||
# Original call (sprintf(line_buf, "LV%d", preview_info->visual.disp.level + 1))
|
||||
lea edx, [esp + 0x02C4]
|
||||
mov ebx, [ebx + 8]
|
||||
inc ebx
|
||||
push ebx
|
||||
mov ecx, esi
|
||||
push edx
|
||||
mov eax, 0x00402604
|
||||
call eax
|
||||
# Find the end of the string
|
||||
lea eax, [esp + 0x02C4]
|
||||
show_slot_number_strend_again:
|
||||
cmp word [eax], 0
|
||||
je show_slot_number_strend_done
|
||||
add eax, 2
|
||||
jmp show_slot_number_strend_again
|
||||
show_slot_number_strend_done:
|
||||
# Format the slot number and append it to the string
|
||||
mov ecx, [0x00A38BD0] # scroll_bar = TAdScrollBarXb_objs[0]
|
||||
mov ecx, [ecx + 0xAC] # ecx = scroll_bar->selection_state[0].scroll_offset
|
||||
lea ecx, [ecx + ebp + 1]
|
||||
push ecx # Slot number (scroll_offset + z)
|
||||
call get_show_slot_number_suffix_fmt
|
||||
.binary 20002800230025006400290020000000 # L" (#%d) "
|
||||
get_show_slot_number_suffix_fmt:
|
||||
push eax # Destination buffer
|
||||
mov eax, 0x00835578 # _swprintf
|
||||
call eax
|
||||
add esp, 0x0C
|
||||
jmp show_slot_number_end
|
||||
.zero 0x96
|
||||
show_slot_number_end: # 00401E4D
|
||||
|
||||
# End static patches
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
|
||||
|
||||
|
||||
update_existing_char_file_list:
|
||||
# Replace the existing character list with an appropriately-longer one. This
|
||||
# part does not need to be done if the patch is applied statically to the
|
||||
# executable; this is only necessary when used as a server patch because the
|
||||
# character list is already allocated at the time the patch is applied.
|
||||
push 0x00022FC4 # total file size
|
||||
mov eax, 0x00835915 # operator_new
|
||||
call eax
|
||||
add esp, 4
|
||||
mov edx, [0x00A939C4] # edx = old char_file_list
|
||||
mov [0x00A939C4], eax
|
||||
mov ecx, [edx + 0xBA94] # Copy bgm_test_songs_unlocked_high to new file
|
||||
mov [eax + 0x00022FB4], ecx
|
||||
mov ecx, [edx + 0xBA98] # Copy bgm_test_songs_unlocked_low to new file
|
||||
mov [eax + 0x00022FB8], ecx
|
||||
mov ecx, [edx + 0xBA9C] # Copy save_count to new file
|
||||
mov [eax + 0x00022FBC], ecx
|
||||
mov ecx, [edx + 0xBAA0] # Copy round2_seed to new file
|
||||
mov [eax + 0x00022FC0], ecx
|
||||
add eax, 4
|
||||
add edx, 4
|
||||
mov ecx, 0xBA90
|
||||
call memcpy # Copy the existing 4 characters over
|
||||
mov eax, [0x00A939C4]
|
||||
add eax, 0xBA94
|
||||
mov ecx, 4
|
||||
clear_next_char:
|
||||
cmp ecx, 0x0C # slot count
|
||||
jge clear_next_char_done
|
||||
lea edx, [eax + 0x2EA4] # edx = ptr to next char (or footer)
|
||||
clear_next_char_write_again:
|
||||
mov dword [eax], 0
|
||||
add eax, 4
|
||||
cmp eax, edx
|
||||
jl clear_next_char_write_again
|
||||
clear_next_char_done:
|
||||
|
||||
# Call eh_vector_constructor_iterator(
|
||||
# &char_file_list.chars[4],
|
||||
# sizeof(char_file_list.chars[0]),
|
||||
# countof(char_file_list.chars) - 4,
|
||||
# PSOCharacterFile::init,
|
||||
# PSOCharacterFile::destroy)
|
||||
push 0x006C197C # PSOCharacterFile::destroy
|
||||
push 0x006C182C # PSOCharacterFile::init
|
||||
push 0x08 # slot count - 4
|
||||
push 0x2EA4 # sizeof(PSOCharacterFile)
|
||||
mov eax, [0x00A939C4]
|
||||
add eax, 0xBA94
|
||||
push eax
|
||||
mov eax, 0x00835E86
|
||||
call eax
|
||||
|
||||
# Fix the file's checksum
|
||||
mov eax, [0x00A939C4]
|
||||
mov ecx, 0x006C2738
|
||||
jmp ecx # PSOBBCharacterFileList::checksum(char_file_list)
|
||||
|
||||
|
||||
|
||||
update_existing_char_file_list_memcard:
|
||||
# Allocate a new memory card file area and copy the data there too. It seems
|
||||
# Sega didn't fully strip out the local saving code from PSOBB; instead, they
|
||||
# just made it write to a heap-allocated buffer. Since the file is much
|
||||
# bigger now, we also have to make that heap-allocated buffer larger. We add
|
||||
# a few "blocks" on the end, since the original code in the game does that
|
||||
# too, but it's probably not strictly necessary.
|
||||
# Like the above, this part is not necessary if this patch is statically
|
||||
# applied to the executable.
|
||||
mov eax, 0x00022FC4 # total file size
|
||||
add eax, 0x0000FFFF
|
||||
and eax, 0xFFFFC000
|
||||
push eax
|
||||
mov eax, 0x0084F258
|
||||
call eax # malloc10(total file size)
|
||||
add esp, 4
|
||||
mov [0x00A939AC], eax
|
||||
mov edx, [0x00A939C4]
|
||||
mov ecx, 0x00022FC4 # total file size
|
||||
jmp memcpy
|
||||
+142
-152
@@ -1,25 +1,24 @@
|
||||
# This patch changes the number of BB character save slots from 4 to any number
|
||||
# up to 127.
|
||||
# This patch changes the number of BB character save slots from 4 to any number up to 127.
|
||||
|
||||
# This patch is for documentation purposes only; it works when used as a server
|
||||
# patch via newserv, but is decidedly inconvenient to use via this method. This
|
||||
# is because it affects logic that runs before any patches can be sent by the
|
||||
# server, so the player has to connect once to get the patch, then disconnect
|
||||
# and connect again to use the additional slots.
|
||||
# This patch is for documentation purposes only; it works when used as a server patch via newserv, but is decidedly
|
||||
# inconvenient to use via this method. This is because it affects logic that runs before any patches can be sent by the
|
||||
# server, so the player has to connect once to get the patch, then disconnect and connect again to use the additional
|
||||
# slots.
|
||||
|
||||
# As written, this patch changes the slot count from 4 to 12. To use a
|
||||
# different slot count, first compute the following values:
|
||||
# As written, this patch changes the slot count from 4 to 12. To use a different slot count, first compute the
|
||||
# following values:
|
||||
# slot count = your desired number of player slots (must be >= 4, <= 127)
|
||||
# total file size = (slot count * 0x2EA4) + 0x14
|
||||
# bgm_test_songs_unlocked offset = total file size - 0x10
|
||||
# save_count offset = total file size - 8
|
||||
# round2_seed offset = total file size - 4
|
||||
# Then, for each of the above, search for the string to the left of the = sign
|
||||
# and change the values used in all of the matching lines.
|
||||
# Then, for each of the above, search for the string to the left of the = sign and change the values used in all of the
|
||||
# matching lines.
|
||||
|
||||
.meta name="More save slots"
|
||||
.meta description=""
|
||||
.meta hide_from_patches_menu
|
||||
|
||||
.versions 59NJ 59NL
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
@@ -27,7 +26,7 @@ reloc0:
|
||||
|
||||
# Include a few functions first
|
||||
write_call_to_code:
|
||||
.include WriteCallToCode-59NL
|
||||
.include WriteCallToCode
|
||||
memcpy:
|
||||
.include CopyData
|
||||
ret
|
||||
@@ -53,7 +52,7 @@ start:
|
||||
apply_enable_scroll_patch:
|
||||
# This patch enables scrolling behavior within the character list
|
||||
push -5 # Jump size (negative = jmp instead of call)
|
||||
push 0x00413B7F # Jump address
|
||||
push <VERS 0x00413B77 0x00413B7F> # Jump address
|
||||
call get_code_size_for_enable_scroll
|
||||
.deltaof enable_scroll_start, enable_scroll_end
|
||||
get_code_size_for_enable_scroll:
|
||||
@@ -63,7 +62,7 @@ get_code_size_for_enable_scroll:
|
||||
enable_scroll_start:
|
||||
mov eax, dword ptr [edi + 0x28] # cursor = char_select_menu->cursor_obj (TAdSelectCurGC*)
|
||||
or dword [eax + 0x01F8], 3 # cursor->flags |= 3 # Enable scrolling
|
||||
mov eax, [0x00A3B050] # scroll_bar = TAdScrollBarXb_objs[0]
|
||||
mov eax, [<VERS 0x00A38BD0 0x00A3B050>] # scroll_bar = TAdScrollBarXb_objs[0]
|
||||
mov ecx, [eax + 0xEC] # ecx = scroll_bar->client_id
|
||||
imul ecx, ecx, 0x24
|
||||
# Set up scroll bar graphics (in struct at scroll_bar + 0x1C)
|
||||
@@ -92,10 +91,9 @@ enable_scroll_end:
|
||||
|
||||
|
||||
apply_fix_scroll_patch1:
|
||||
# This patch fixes character selection cursor object so it will take the
|
||||
# scroll offset into account
|
||||
# This patch fixes character selection cursor object so it will take the scroll offset into account
|
||||
push 6 # Call size
|
||||
push 0x00413C38 # Call address
|
||||
push <VERS 0x00413C30 0x00413C38> # Call address
|
||||
call get_code_size_for_fix_scroll_patch1
|
||||
.deltaof fix_scroll_patch1_start, fix_scroll_patch1_end
|
||||
get_code_size_for_fix_scroll_patch1:
|
||||
@@ -105,7 +103,7 @@ get_code_size_for_fix_scroll_patch1:
|
||||
fix_scroll_patch1_start:
|
||||
mov edx, [edi + 0x28] # cursor = this->ad_select_cur_obj (TAdSelectCurGC*)
|
||||
mov ebp, [edx + 0x44] # ebp = cursor->selected_index_within_view
|
||||
mov eax, [0x00A3B050] # scroll_bar = TAdScrollBarXb_objs[0]
|
||||
mov eax, [<VERS 0x00A38BD0 0x00A3B050>] # scroll_bar = TAdScrollBarXb_objs[0]
|
||||
add ebp, [eax + 0xAC] # ebp += scroll_bar->selection_state[0].scroll_offset
|
||||
ret
|
||||
fix_scroll_patch1_end:
|
||||
@@ -115,11 +113,10 @@ fix_scroll_patch1_end:
|
||||
|
||||
|
||||
apply_fix_scroll_patch2:
|
||||
# This patch changes the TAdSinglePlyChrSelectGC::selected_index_within_view
|
||||
# to be the selected character's absolute index (including scroll_offset),
|
||||
# not the index only within the displayed four characters
|
||||
# This patch changes the TAdSinglePlyChrSelectGC::selected_index_within_view to be the selected character's absolute
|
||||
# index (including scroll_offset), not the index only within the displayed four characters
|
||||
push 6 # Call size
|
||||
push 0x00413CD8 # Call address
|
||||
push <VERS 0x00413CD0 0x00413CD8> # Call address
|
||||
call get_code_size_for_fix_scroll_patch2
|
||||
.deltaof fix_scroll_patch2_start, fix_scroll_patch2_end
|
||||
get_code_size_for_fix_scroll_patch2:
|
||||
@@ -127,7 +124,7 @@ get_code_size_for_fix_scroll_patch2:
|
||||
push dword [eax]
|
||||
call fix_scroll_patch2_end
|
||||
fix_scroll_patch2_start:
|
||||
mov eax, [0x00A3B050] # scroll_bar = TAdScrollBarXb_objs[0]
|
||||
mov eax, [<VERS 0x00A38BD0 0x00A3B050>] # scroll_bar = TAdScrollBarXb_objs[0]
|
||||
mov eax, [eax + 0xAC] # eax = scroll_bar->selection_state[0].scroll_offset
|
||||
mov edx, [edi + 0x28] # cursor = this->ad_select_cur_obj (TAdSelectCurGC*)
|
||||
add eax, [edx + 0x44] # eax += cursor->selected_index_within_view
|
||||
@@ -139,10 +136,9 @@ fix_scroll_patch2_end:
|
||||
|
||||
|
||||
apply_fix_file_index:
|
||||
# This patch fixes the character file indexing so it will account for the
|
||||
# scroll position
|
||||
# This patch fixes the character file indexing so it will account for the scroll position
|
||||
push 5 # Call size
|
||||
push 0x00413CF0 # Call address
|
||||
push <VERS 0x00413CE8 0x00413CF0> # Call address
|
||||
call get_code_size_for_selection_index_fix2
|
||||
.deltaof selection_index_fix2_start, selection_index_fix2_end
|
||||
get_code_size_for_selection_index_fix2:
|
||||
@@ -150,11 +146,11 @@ get_code_size_for_selection_index_fix2:
|
||||
push dword [eax]
|
||||
call selection_index_fix2_end
|
||||
selection_index_fix2_start:
|
||||
mov eax, [0x00A3B050]
|
||||
mov eax, [<VERS 0x00A38BD0 0x00A3B050>]
|
||||
mov eax, [eax + 0xAC] # eax = TAdScrollBarXb_objs[0]->selection_state[0].scroll_offset
|
||||
add ebp, eax # arg0 += eax
|
||||
mov [esp + 4], ebp
|
||||
mov eax, 0x006C1A80
|
||||
mov eax, <VERS 0x006C1ABC 0x006C1A80>
|
||||
jmp eax # set_current_char_slot
|
||||
selection_index_fix2_end:
|
||||
call write_call_to_code
|
||||
@@ -163,10 +159,9 @@ selection_index_fix2_end:
|
||||
|
||||
|
||||
apply_preview_window_fix:
|
||||
# This patch fixes the preview display so it will show the correct section
|
||||
# ID, level, etc.
|
||||
# This patch fixes the preview display so it will show the correct section ID, level, etc.
|
||||
push 5 # Call size
|
||||
push 0x0040216C # Call address
|
||||
push 0x0040216C
|
||||
call get_code_size_for_preview_window_fix
|
||||
.deltaof preview_window_fix_start, preview_window_fix_end
|
||||
get_code_size_for_preview_window_fix:
|
||||
@@ -174,10 +169,10 @@ get_code_size_for_preview_window_fix:
|
||||
push dword [eax]
|
||||
call preview_window_fix_end
|
||||
preview_window_fix_start:
|
||||
mov eax, [0x00A3B050] # scroll_bar = TAdScrollBarXb_objs[0]
|
||||
mov eax, [<VERS 0x00A38BD0 0x00A3B050>] # scroll_bar = TAdScrollBarXb_objs[0]
|
||||
mov eax, [eax + 0xAC] # eax = scroll_bar->selection_state[0].scroll_offset
|
||||
add [esp + 4], eax
|
||||
mov eax, 0x006C44D0 # get_player_preview_info
|
||||
mov eax, <VERS 0x006C4514 0x006C44D0> # get_player_preview_info
|
||||
jmp eax
|
||||
preview_window_fix_end:
|
||||
# This patch applies in two places, so push the second set of args now, then
|
||||
@@ -193,267 +188,266 @@ preview_window_fix_end:
|
||||
|
||||
|
||||
apply_static_patches:
|
||||
.include WriteCodeBlocksBB
|
||||
# These patches change various places where the character data size and slot
|
||||
# count are referenced
|
||||
.data 0x004751A4
|
||||
.include WriteCodeBlocks
|
||||
# These patches change various places where the character data size and slot count are referenced
|
||||
.data <VERS 0x00475294 0x004751A4>
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count; TDataProtocol::handle_E5
|
||||
.data 0x0047525B
|
||||
.data <VERS 0x0047534B 0x0047525B>
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count; import_player_preview
|
||||
.data 0x004785E1
|
||||
.data <VERS 0x004786D1 0x004785E1>
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count; TDataProtocol::handle_E4
|
||||
.data 0x0048242D
|
||||
.data <VERS 0x00482559 0x0048242D>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C17BF
|
||||
.data <VERS 0x006C17FB 0x006C17BF>
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C1CCB
|
||||
.data <VERS 0x006C1D07 0x006C1CCB>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C1CFE
|
||||
.data <VERS 0x006C1D3A 0x006C1CFE>
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C1D1C
|
||||
.data <VERS 0x006C1D58 0x006C1D1C>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C1DD7
|
||||
.data <VERS 0x006C1E13 0x006C1DD7>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C222E
|
||||
.data <VERS 0x006C226A 0x006C222E>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C226D
|
||||
.data <VERS 0x006C22A9 0x006C226D>
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C228E
|
||||
.data <VERS 0x006C22CA 0x006C228E>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C229E
|
||||
.data <VERS 0x006C22DA 0x006C229E>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C24DB
|
||||
.data <VERS 0x006C2517 0x006C24DB>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C2643
|
||||
.data <VERS 0x006C267F 0x006C2643>
|
||||
.data 0x00000004
|
||||
.data 0x00022FBC # save_count offset
|
||||
.data 0x006C264D
|
||||
.data <VERS 0x006C2689 0x006C264D>
|
||||
.data 0x00000004
|
||||
.data 0x00022FBC # save_count offset
|
||||
.data 0x006C26EF
|
||||
.data <VERS 0x006C272B 0x006C26EF>
|
||||
.data 0x00000004
|
||||
.data 0x00022FBC # save_count offset
|
||||
.data 0x006C2705
|
||||
.data <VERS 0x006C2741 0x006C2705>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC0 # round2_seed offset
|
||||
.data 0x006C2793
|
||||
.data <VERS 0x006C27CF 0x006C2793>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C286C
|
||||
.data <VERS 0x006C28A8 0x006C286C>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C3113
|
||||
.data <VERS 0x006C314F 0x006C3113>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C353F
|
||||
.data <VERS 0x006C357B 0x006C353F>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C357E
|
||||
.data <VERS 0x006C35BA 0x006C357E>
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C35AA
|
||||
.data <VERS 0x006C35E6 0x006C35AA>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C35B7
|
||||
.data <VERS 0x006C35F3 0x006C35B7>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C35D2
|
||||
.data <VERS 0x006C360E 0x006C35D2>
|
||||
.data 0x00000004
|
||||
.data 0x00022FBC # save_count offset
|
||||
.data 0x006C35DB
|
||||
.data <VERS 0x006C3617 0x006C35DB>
|
||||
.data 0x00000004
|
||||
.data 0x00022FBC # save_count offset
|
||||
.data 0x006C36E0
|
||||
.data <VERS 0x006C371C 0x006C36E0>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C3B1E
|
||||
.data <VERS 0x006C3B5A 0x006C3B1E>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C4209
|
||||
.data <VERS 0x006C424D 0x006C4209>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C47EF
|
||||
.data <VERS 0x006C4833 0x006C47EF>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C4826
|
||||
.data <VERS 0x006C486A 0x006C4826>
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C4962
|
||||
.data <VERS 0x006C49A6 0x006C4962>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C4999
|
||||
.data <VERS 0x006C49DD 0x006C4999>
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C4A81
|
||||
.data <VERS 0x006C4AC5 0x006C4A81>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C4ABA
|
||||
.data <VERS 0x006C4AFE 0x006C4ABA>
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C4C9A
|
||||
.data <VERS 0x006C4CDE 0x006C4C9A>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C4CD1
|
||||
.data <VERS 0x006C4D15 0x006C4CD1>
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C4DB9
|
||||
.data <VERS 0x006C4DFD 0x006C4DB9>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C4DF2
|
||||
.data <VERS 0x006C4E36 0x006C4DF2>
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C4F58
|
||||
.data <VERS 0x006C4F9C 0x006C4F58>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C4F94
|
||||
.data <VERS 0x006C4FD7 0x006C4F94>
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C5181
|
||||
.data <VERS 0x006C51C5 0x006C5181>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C51BD
|
||||
.data <VERS 0x006C5201 0x006C51BD>
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C5332
|
||||
.data <VERS 0x006C5376 0x006C5332>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C536C
|
||||
.data <VERS 0x006C53B0 0x006C536C>
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C5501
|
||||
.data <VERS 0x006C5545 0x006C5501>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C553D
|
||||
.data <VERS 0x006C5581 0x006C553D>
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C56B2
|
||||
.data <VERS 0x006C56F6 0x006C56B2>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C56EC
|
||||
.data <VERS 0x006C5730 0x006C56EC>
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C5872
|
||||
.data <VERS 0x006C58B6 0x006C5872>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C58AC
|
||||
.data <VERS 0x006C58F0 0x006C58AC>
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C5A41
|
||||
.data <VERS 0x006C5A85 0x006C5A41>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C5A7D
|
||||
.data <VERS 0x006C5AC1 0x006C5A7D>
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C5B6E
|
||||
.data <VERS 0x006C5BB2 0x006C5B6E>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C5BA8
|
||||
.data <VERS 0x006C5BEC 0x006C5BA8>
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C5D2E
|
||||
.data <VERS 0x006C5D72 0x006C5D2E>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C5D68
|
||||
.data <VERS 0x006C5DAC 0x006C5D68>
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C5EEE
|
||||
.data <VERS 0x006C5F32 0x006C5EEE>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C5F28
|
||||
.data <VERS 0x006C5F6C 0x006C5F28>
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C60AE
|
||||
.data <VERS 0x006C60F2 0x006C60AE>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C60E8
|
||||
.data <VERS 0x006C612C 0x006C60E8>
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C6303
|
||||
.data <VERS 0x006C6346 0x006C6303>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C633D
|
||||
.data <VERS 0x006C6381 0x006C633D>
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C64C1
|
||||
.data <VERS 0x006C6505 0x006C64C1>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C64FD
|
||||
.data <VERS 0x006C6541 0x006C64FD>
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C65EE
|
||||
.data <VERS 0x006C6632 0x006C65EE>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C6628
|
||||
.data <VERS 0x006C666C 0x006C6628>
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C67AE
|
||||
.data <VERS 0x006C67F2 0x006C67AE>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C67E8
|
||||
.data <VERS 0x006C682C 0x006C67E8>
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C696E
|
||||
.data <VERS 0x006C69B2 0x006C696E>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C69A8
|
||||
.data <VERS 0x006C69EC 0x006C69A8>
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C6B43
|
||||
.data <VERS 0x006C6B87 0x006C6B43>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C6B74
|
||||
.data <VERS 0x006C6BB8 0x006C6B74>
|
||||
.data 0x00000004
|
||||
.data 0x0000005D # memcard block count
|
||||
.data 0x006C6BF6
|
||||
.data <VERS 0x006C6C3A 0x006C6BF6>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C6C30
|
||||
.data <VERS 0x006C6C74 0x006C6C30>
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C6E3E
|
||||
.data <VERS 0x006C6E82 0x006C6E3E>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C6E78
|
||||
.data <VERS 0x006C6EBC 0x006C6E78>
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C7075
|
||||
.data <VERS 0x006C70B9 0x006C7075>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C70AF
|
||||
.data <VERS 0x006C70F3 0x006C70AF>
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C7A02
|
||||
.data <VERS 0x006C7A46 0x006C7A02>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C7D22
|
||||
.data <VERS 0x006C7D66 0x006C7D22>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x006C7D5E
|
||||
.data <VERS 0x006C7D7C 0x006C7D5E>
|
||||
.data 0x00000001
|
||||
.binary 0C # slot count
|
||||
.data 0x006C7D7C
|
||||
.data <VERS 0x006C7DC0 0x006C7D7C>
|
||||
.data 0x00000004
|
||||
.data 0x00022FC4 # total file size
|
||||
.data 0x0077BE92
|
||||
.data <VERS 0x0077CC72 0x0077BE92>
|
||||
.data 0x00000004
|
||||
.data 0x00022FB4 # bgm_test_songs_unlocked offset
|
||||
|
||||
# Signature check on all save files (rewritten as loop)
|
||||
.data 0x006C1C2D
|
||||
.data <VERS 0x006C1C69 0x006C1C2D>
|
||||
.deltaof sig_check_begin, sig_check_end
|
||||
sig_check_begin:
|
||||
mov edx, 0xC87ED5B1 # Expected signature value
|
||||
@@ -475,10 +469,10 @@ sig_bad:
|
||||
inc eax
|
||||
jmp sig_check_end
|
||||
.binary CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
|
||||
sig_check_end: # 006C1C76
|
||||
sig_check_end: # <VERS 006C1CB2 006C1C76>
|
||||
|
||||
# Send slot count in E3 command
|
||||
.data 0x0046EB20 # TDataProtocol::send_E3_for_index
|
||||
.data <VERS 0x0046EC10 0x0046EB20> # TDataProtocol::send_E3_for_index
|
||||
.deltaof send_slot_count_in_E3_begin, send_slot_count_in_E3_end
|
||||
send_slot_count_in_E3_begin:
|
||||
# ecx = this (TDataProtocol*)
|
||||
@@ -493,7 +487,7 @@ send_slot_count_in_E3_begin:
|
||||
mov eax, [ecx]
|
||||
call [eax + 0x20] # this->send_command(&cmd, 0x10) // ret 8
|
||||
add esp, 8
|
||||
mov eax, 0x006C1A80
|
||||
mov eax, <VERS 0x006C1ABC 0x006C1A80>
|
||||
call eax # set_current_char_slot(slot_index) // ret 0
|
||||
add esp, 8
|
||||
ret 4
|
||||
@@ -521,7 +515,7 @@ show_slot_number_strend_again:
|
||||
jmp show_slot_number_strend_again
|
||||
show_slot_number_strend_done:
|
||||
# Format the slot number and append it to the string
|
||||
mov ecx, [0x00A3B050] # scroll_bar = TAdScrollBarXb_objs[0]
|
||||
mov ecx, [<VERS 0x00A38BD0 0x00A3B050>] # scroll_bar = TAdScrollBarXb_objs[0]
|
||||
mov ecx, [ecx + 0xAC] # ecx = scroll_bar->selection_state[0].scroll_offset
|
||||
lea ecx, [ecx + ebp + 1]
|
||||
push ecx # Slot number (scroll_offset + z)
|
||||
@@ -529,7 +523,7 @@ show_slot_number_strend_done:
|
||||
.binary 20002800230025006400290020000000 # L" (#%d) "
|
||||
get_show_slot_number_suffix_fmt:
|
||||
push eax # Destination buffer
|
||||
mov eax, 0x00857E29 # _swprintf
|
||||
mov eax, <VERS 0x00835578 0x00857E29> # _swprintf
|
||||
call eax
|
||||
add esp, 0x0C
|
||||
jmp show_slot_number_end
|
||||
@@ -543,16 +537,15 @@ show_slot_number_end: # 00401E4D
|
||||
|
||||
|
||||
update_existing_char_file_list:
|
||||
# Replace the existing character list with an appropriately-longer one. This
|
||||
# part does not need to be done if the patch is applied statically to the
|
||||
# executable; this is only necessary when used as a server patch because the
|
||||
# Replace the existing character list with an appropriately-longer one. This part does not need to be done if the
|
||||
# patch is applied statically to the executable; this is only necessary when used as a server patch because the
|
||||
# character list is already allocated at the time the patch is applied.
|
||||
push 0x00022FC4 # total file size
|
||||
mov eax, 0x008581C5 # operator_new
|
||||
mov eax, <VERS 0x00835915 0x008581C5> # operator_new
|
||||
call eax
|
||||
add esp, 4
|
||||
mov edx, [0x00A95E44] # edx = old char_file_list
|
||||
mov [0x00A95E44], eax
|
||||
mov edx, [<VERS 0x00A939C4 0x00A95E44>] # edx = old char_file_list
|
||||
mov [<VERS 0x00A939C4 0x00A95E44>], eax
|
||||
mov ecx, [edx + 0xBA94] # Copy bgm_test_songs_unlocked_high to new file
|
||||
mov [eax + 0x00022FB4], ecx
|
||||
mov ecx, [edx + 0xBA98] # Copy bgm_test_songs_unlocked_low to new file
|
||||
@@ -565,7 +558,7 @@ update_existing_char_file_list:
|
||||
add edx, 4
|
||||
mov ecx, 0xBA90
|
||||
call memcpy # Copy the existing 4 characters over
|
||||
mov eax, [0x00A95E44]
|
||||
mov eax, [<VERS 0x00A939C4 0x00A95E44>]
|
||||
add eax, 0xBA94
|
||||
mov ecx, 4
|
||||
clear_next_char:
|
||||
@@ -585,40 +578,37 @@ clear_next_char_done:
|
||||
# countof(char_file_list.chars) - 4,
|
||||
# PSOCharacterFile::init,
|
||||
# PSOCharacterFile::destroy)
|
||||
push 0x006C1940 # PSOCharacterFile::destroy
|
||||
push 0x006C17F0 # PSOCharacterFile::init
|
||||
push <VERS 0x006C197C 0x006C1940> # PSOCharacterFile::destroy
|
||||
push <VERS 0x006C182C 0x006C17F0> # PSOCharacterFile::init
|
||||
push 0x08 # slot count - 4
|
||||
push 0x2EA4 # sizeof(PSOCharacterFile)
|
||||
mov eax, [0x00A95E44]
|
||||
mov eax, [<VERS 0x00A939C4 0x00A95E44>]
|
||||
add eax, 0xBA94
|
||||
push eax
|
||||
mov eax, 0x00858736
|
||||
mov eax, <VERS 0x00835E86 0x00858736>
|
||||
call eax
|
||||
|
||||
# Fix the file's checksum
|
||||
mov eax, [0x00A95E44]
|
||||
mov ecx, 0x006C26FC
|
||||
mov eax, [<VERS 0x00A939C4 0x00A95E44>]
|
||||
mov ecx, <VERS 0x006C2738 0x006C26FC>
|
||||
jmp ecx # PSOBBCharacterFileList::checksum(char_file_list)
|
||||
|
||||
|
||||
|
||||
update_existing_char_file_list_memcard:
|
||||
# Allocate a new memory card file area and copy the data there too. It seems
|
||||
# Sega didn't fully strip out the local saving code from PSOBB; instead, they
|
||||
# just made it write to a heap-allocated buffer. Since the file is much
|
||||
# bigger now, we also have to make that heap-allocated buffer larger. We add
|
||||
# a few "blocks" on the end, since the original code in the game does that
|
||||
# too, but it's probably not strictly necessary.
|
||||
# Like the above, this part is not necessary if this patch is statically
|
||||
# applied to the executable.
|
||||
# Allocate a new memory card file area and copy the data there too. It seems Sega didn't fully strip out the local
|
||||
# saving code from PSOBB; instead, they just made it write to a heap-allocated buffer. Since the file is much bigger
|
||||
# now, we also have to make that heap-allocated buffer larger. We add a few "blocks" on the end, since the original
|
||||
# code in the game does that too, but it's probably not strictly necessary. Like the above, this part is not
|
||||
# necessary if this patch is statically applied to the executable.
|
||||
mov eax, 0x00022FC4 # total file size
|
||||
add eax, 0x0000FFFF
|
||||
and eax, 0xFFFFC000
|
||||
push eax
|
||||
mov eax, 0x0082E940
|
||||
mov eax, <VERS 0x0084F258 0x0082E940>
|
||||
call eax # malloc10(total file size)
|
||||
add esp, 4
|
||||
mov [0x00A95E2C], eax
|
||||
mov edx, [0x00A95E44]
|
||||
mov [<VERS 0x00A939AC 0x00A95E2C>], eax
|
||||
mov edx, [<VERS 0x00A939C4 0x00A95E44>]
|
||||
mov ecx, 0x00022FC4 # total file size
|
||||
jmp memcpy
|
||||
@@ -1,103 +0,0 @@
|
||||
# This patch causes the client not to generate its own EXP text and instead use
|
||||
# the EXP values generated by the server when showing the purple text for enemy
|
||||
# deaths. This makes EXP gained via EXP share visible, as well as makes
|
||||
# fractional EXP multiplers (in config.json) display properly.
|
||||
|
||||
.meta name="Server EXP display"
|
||||
.meta description=""
|
||||
.meta hide_from_patches_menu
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
call install_hook
|
||||
call apply_static_patches
|
||||
ret
|
||||
|
||||
|
||||
|
||||
install_hook:
|
||||
pop ecx
|
||||
push 0 # Write address instead of a call/jmp opcode
|
||||
push 0x00A0DC54
|
||||
call get_code_size
|
||||
.deltaof handle_6xBF_start, handle_6xBF_end
|
||||
get_code_size:
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call handle_6xBF_end
|
||||
handle_6xBF_start: # [std](G_6xBF* cmd @ [esp + 4]) -> void
|
||||
mov edx, [esp + 4]
|
||||
|
||||
mov ecx, [0x00A9A074] # local_client_id
|
||||
cmp [edx + 2], cx
|
||||
jne skip_text
|
||||
|
||||
cmp byte [edx + 1], 3
|
||||
jl skip_text
|
||||
movzx eax, word [edx + 8] # cmd.from_enemy_id
|
||||
cmp eax, 0x1000
|
||||
jl skip_text
|
||||
cmp eax, 0x1B50
|
||||
jge skip_text
|
||||
call get_enemy_entity
|
||||
|
||||
test eax, eax
|
||||
jnz enemy_entity_ok
|
||||
|
||||
# Use player entity if enemy entity is already gone
|
||||
mov eax, 0x0068D618
|
||||
xchg eax, ecx
|
||||
call ecx # eax = TObjPlayer::for_client_id(local_client_id); conveniently, this function preserves all regs except eax
|
||||
|
||||
enemy_entity_ok:
|
||||
push 0x0000FFFF # entity_id; ignored by TFontSmallTask if not a player
|
||||
push dword [edx + 4] # amount = cmd.amount
|
||||
push 0x00976380 # prefix = L"EXP"
|
||||
push 0x14
|
||||
push 0x14
|
||||
push 0xFFFF00FF # color (ARGB)
|
||||
add eax, 0x300
|
||||
push eax # position
|
||||
mov eax, 0x0078B8E8
|
||||
call eax # TFontSmallTask___new__(...)
|
||||
add esp, 0x1C
|
||||
|
||||
skip_text:
|
||||
mov eax, 0x0069292C # Original handle_6xBF
|
||||
jmp eax # original_handle_6xBF(cmd)
|
||||
|
||||
get_enemy_entity:
|
||||
.include GetEnemyEntity-59NJ
|
||||
ret
|
||||
|
||||
handle_6xBF_end:
|
||||
push ecx
|
||||
.include WriteCallToCode-59NJ
|
||||
|
||||
|
||||
|
||||
apply_static_patches:
|
||||
.include WriteCodeBlocksBB
|
||||
|
||||
.data 0x0078827D
|
||||
.deltaof disable_kill_enemy_callsite_start, disable_kill_enemy_callsite_end
|
||||
disable_kill_enemy_callsite_start:
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
disable_kill_enemy_callsite_end:
|
||||
|
||||
.data 0x00777381
|
||||
.deltaof disable_exp_steal_callsite_start, disable_exp_steal_callsite_end
|
||||
disable_exp_steal_callsite_start:
|
||||
add esp, 0x0C # Original function has `ret 0x0C`
|
||||
nop
|
||||
nop
|
||||
disable_exp_steal_callsite_end:
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
+15
-15
@@ -1,11 +1,11 @@
|
||||
# This patch causes the client not to generate its own EXP text and instead use
|
||||
# the EXP values generated by the server when showing the purple text for enemy
|
||||
# deaths. This makes EXP gained via EXP share visible, as well as makes
|
||||
# This patch causes the client not to generate its own EXP text and instead use the EXP values generated by the server
|
||||
# when showing the purple text for enemy deaths. This makes EXP gained via EXP share visible, as well as makes
|
||||
# fractional EXP multiplers (in config.json) display properly.
|
||||
|
||||
.meta name="Server EXP display"
|
||||
.meta description=""
|
||||
.meta hide_from_patches_menu
|
||||
|
||||
.versions 59NJ 59NL
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
@@ -20,7 +20,7 @@ start:
|
||||
install_hook:
|
||||
pop ecx
|
||||
push 0 # Write address instead of a call/jmp opcode
|
||||
push 0x00A0FC54
|
||||
push <VERS 0x00A0DC54 0x00A0FC54>
|
||||
call get_code_size
|
||||
.deltaof handle_6xBF_start, handle_6xBF_end
|
||||
get_code_size:
|
||||
@@ -30,7 +30,7 @@ get_code_size:
|
||||
handle_6xBF_start: # [std](G_6xBF* cmd @ [esp + 4]) -> void
|
||||
mov edx, [esp + 4]
|
||||
|
||||
mov ecx, [0x00A9C4F4] # local_client_id
|
||||
mov ecx, [<VERS 0x00A9A074 0x00A9C4F4>] # local_client_id
|
||||
cmp [edx + 2], cx
|
||||
jne skip_text
|
||||
|
||||
@@ -47,41 +47,41 @@ handle_6xBF_start: # [std](G_6xBF* cmd @ [esp + 4]) -> void
|
||||
jnz enemy_entity_ok
|
||||
|
||||
# Use player entity if enemy entity is already gone
|
||||
mov eax, 0x0068D5AC
|
||||
mov eax, <VERS 0x0068D618 0x0068D5AC>
|
||||
xchg eax, ecx
|
||||
call ecx # eax = TObjPlayer::for_client_id(local_client_id); conveniently, this function preserves all regs except eax
|
||||
|
||||
enemy_entity_ok:
|
||||
push 0x0000FFFF # entity_id; ignored by TFontSmallTask if not a player
|
||||
push dword [edx + 4] # amount = cmd.amount
|
||||
push 0x009783A0 # prefix = L"EXP"
|
||||
push <VERS 0x00976380 0x009783A0> # prefix = L"EXP"
|
||||
push 0x14
|
||||
push 0x14
|
||||
push 0xFFFF00FF # color (ARGB)
|
||||
add eax, 0x300
|
||||
push eax # position
|
||||
mov eax, 0x0078AABC
|
||||
mov eax, <VERS 0x0078B8E8 0x0078AABC>
|
||||
call eax # TFontSmallTask___new__(...)
|
||||
add esp, 0x1C
|
||||
|
||||
skip_text:
|
||||
mov eax, 0x006928C0 # Original handle_6xBF
|
||||
mov eax, <VERS 0x0069292C 0x006928C0> # Original handle_6xBF
|
||||
jmp eax # original_handle_6xBF(cmd)
|
||||
|
||||
get_enemy_entity:
|
||||
.include GetEnemyEntity-59NL
|
||||
.include GetEnemyEntity
|
||||
ret
|
||||
|
||||
handle_6xBF_end:
|
||||
push ecx
|
||||
.include WriteCallToCode-59NL
|
||||
.include WriteCallToCode
|
||||
|
||||
|
||||
|
||||
apply_static_patches:
|
||||
.include WriteCodeBlocksBB
|
||||
.include WriteCodeBlocks
|
||||
|
||||
.data 0x0078749D
|
||||
.data <VERS 0x0078827D 0x0078749D>
|
||||
.deltaof disable_kill_enemy_callsite_start, disable_kill_enemy_callsite_end
|
||||
disable_kill_enemy_callsite_start:
|
||||
nop
|
||||
@@ -91,7 +91,7 @@ disable_kill_enemy_callsite_start:
|
||||
nop
|
||||
disable_kill_enemy_callsite_end:
|
||||
|
||||
.data 0x007765A5
|
||||
.data <VERS 0x00777381 0x007765A5>
|
||||
.deltaof disable_exp_steal_callsite_start, disable_exp_steal_callsite_end
|
||||
disable_exp_steal_callsite_start:
|
||||
add esp, 0x0C # Original function has `ret 0x0C`
|
||||
+7
-12
@@ -1,14 +1,11 @@
|
||||
# It would be a bad idea to remove `.meta hide_from_patches_menu` to make this
|
||||
# patch an option for players to be able to select; either all players on the
|
||||
# server should have this patch, or none should have it.
|
||||
# It would be a bad idea to change this function's visibility; either all players on the server should have this patch,
|
||||
# or none should have it.
|
||||
|
||||
# If you change the stack limits in config.json away from the defaults, you
|
||||
# should change the limits array below to match config.json and add this patch
|
||||
# to the BBRequiredPatches list.
|
||||
# If you change the stack limits in config.json away from the defaults, you should change the limits array below to
|
||||
# match config.json and add this patch to the BBRequiredPatches list.
|
||||
|
||||
.meta name="Item stacks"
|
||||
.meta description=""
|
||||
.meta hide_from_patches_menu
|
||||
|
||||
.versions 59NJ 59NL
|
||||
|
||||
@@ -16,7 +13,7 @@ entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksBB
|
||||
.include WriteCodeBlocks
|
||||
|
||||
# Patch 1: rewrite item_is_stackable
|
||||
.data <VERS 0x005C5020 0x005C502C>
|
||||
@@ -63,10 +60,8 @@ max_stack_size_for_tool_start:
|
||||
|
||||
# declare return values array
|
||||
call data_end
|
||||
# This array specifies the stack limits for each tool class. The array index
|
||||
# is the second byte of the item data (see names-v4.json for the values; for
|
||||
# e.g. tech disks this would be 02). For classes beyond 15, the value for 15
|
||||
# is used.
|
||||
# This array specifies the stack limits for each tool class. The array index is the second byte of the item data (see
|
||||
# names-v4.json for the values; for e.g. tech disks this is 02). For classes beyond 15, the value for 15 is used.
|
||||
# Index: 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15
|
||||
.binary 0A 0A 01 0A 0A 0A 0A 0A 0A 01 01 01 01 01 01 01 63 01 01 01 01 01
|
||||
data_end:
|
||||
+237
-18
@@ -1,21 +1,27 @@
|
||||
.meta name="Bug fixes"
|
||||
.meta description="Fixes many minor\ngameplay, sound,\nand graphical bugs"
|
||||
# Most original codes by Ralf @ GC-Forever and Aleron Ives, except where noted
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
# Xbox ports by fuzziqersoftware
|
||||
# TODO: Port the rest of the GC patches to Xbox
|
||||
|
||||
.meta visibility="all"
|
||||
.meta name="Bug fixes"
|
||||
.meta description="Fixes many minor\ngameplay, sound,\nand graphical bugs"
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksGC
|
||||
.include WriteCodeBlocks
|
||||
|
||||
|
||||
|
||||
|
||||
# Olga Flow Barta Bug Fix (makes barta work on ice weakness Olga Flow instead of damaging player)
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.label g1_hook_call, <VERS 0x802BB4B0 0x802BC3E0 0x802BD528 0x802BD2C0 0x802BBEF4 0x802BBF38 0x802BD474 0x802BCC08>
|
||||
.label g1_hook_loc, 0x8000D980
|
||||
.data g1_hook_loc
|
||||
@@ -34,10 +40,34 @@ g1_hook_end:
|
||||
.address g1_hook_call
|
||||
bl g1_hook_loc
|
||||
|
||||
.versions 4OJB 4OJD 4OJU 4OED 4OEU 4OPD 4OPU
|
||||
|
||||
.label g1_hook_call, <VERS 0x000970E0 0x000973F0 0x00097460 0x00097140 0x000970E0 0x00097160 0x00096FE0>
|
||||
.label g1_hook_loc, <VERS 0x00097124 0x00097434 0x000974A4 0x00097184 0x00097124 0x000971A4 0x00097024>
|
||||
.data g1_hook_call
|
||||
.data 6
|
||||
.address g1_hook_call
|
||||
mov eax, esi
|
||||
cmp al, 19
|
||||
jmp g1_hook_loc
|
||||
g1_hook_call_end:
|
||||
.data g1_hook_loc
|
||||
.deltaof g1_hook_start, g1_hook_end
|
||||
.address g1_hook_loc
|
||||
g1_hook_start:
|
||||
jne g1_hook_skip_replace_value
|
||||
mov al, 2
|
||||
g1_hook_skip_replace_value:
|
||||
cmp eax, [ebx + 0x440] // Original opcode
|
||||
jmp g1_hook_call_end
|
||||
g1_hook_end:
|
||||
|
||||
|
||||
|
||||
# Morfos Frozen Player Bug Fix (stops Morfos Laser multi-hitting when player is frozen)
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.label g2_hook_call, <VERS 0x80335060 0x803360CC 0x803375E8 0x8033739C 0x80335A50 0x80335A94 0x80337570 0x803369B4>
|
||||
.label g2_hook_loc, 0x8000D9A0
|
||||
.data g2_hook_loc
|
||||
@@ -57,18 +87,62 @@ g2_hook_end:
|
||||
.address g2_hook_call
|
||||
bl g2_hook_loc
|
||||
|
||||
.versions 4OJB 4OJD 4OJU 4OED 4OEU 4OPD 4OPU
|
||||
|
||||
.label g2_hook_call, <VERS 0x0012E257 0x0012E387 0x0012E4E7 0x0012E537 0x0012E567 0x0012E557 0x0012E5A7>
|
||||
.label g2_hook_loc1, <VERS 0x0012E5F4 0x0012E724 0x0012E884 0x0012E8D4 0x0012E904 0x0012E8F4 0x0012E944>
|
||||
.label g2_hook_loc2, <VERS 0x0012E622 0x0012E752 0x0012E8B2 0x0012E902 0x0012E932 0x0012E922 0x0012E972>
|
||||
.data g2_hook_call
|
||||
.data 6
|
||||
.address g2_hook_call
|
||||
call g2_hook_loc1
|
||||
nop
|
||||
.data g2_hook_loc1
|
||||
.deltaof g2_hook_start1, g2_hook_end1
|
||||
.address g2_hook_loc1
|
||||
g2_hook_start1:
|
||||
fld1 st0 // st = [1.0, speed]
|
||||
fld1 st0 // st = [1.0, 1.0, speed]
|
||||
fadd st0, st1 // st = [2.0, 1.0, speed]
|
||||
fdivp st1, st0 // st = [0.5, speed]
|
||||
jmp g2_hook_loc2
|
||||
g2_hook_end1:
|
||||
|
||||
.data g2_hook_loc2
|
||||
.deltaof g2_hook_start2, g2_hook_end2
|
||||
.address g2_hook_loc2
|
||||
g2_hook_start2:
|
||||
test byte [esi + 0x30], 0x20 // If not set, use 1.5; if set, use 0.5
|
||||
jnz g2_hook_entity_is_frozen
|
||||
fld1 st0 // st = [1, 0.5, speed]
|
||||
faddp st1, st0 // st = [1.5, speed]
|
||||
g2_hook_entity_is_frozen:
|
||||
fmulp st1, st0 // st = [((game_flags & 0x20) ? 0.5 : 1.5) * speed]
|
||||
ret
|
||||
g2_hook_end2:
|
||||
|
||||
|
||||
|
||||
# Tiny Grass Assassins Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x800BC750 0x800BCA58 0x800BCBD0 0x800BCB80 0x800BC9E8 0x800BC9E8 0x800BCB90 0x800BCB58>
|
||||
.data 4
|
||||
b +0x10
|
||||
|
||||
.versions 4OJB 4OJD 4OJU 4OED 4OEU 4OPD 4OPU
|
||||
|
||||
.data <VERS 0x0016227A 0x0016238A 0x0016232A 0x0016240A 0x0016229A 0x0016242A 0x0016225A>
|
||||
.data 0x00000002
|
||||
.binary EB0E
|
||||
|
||||
|
||||
|
||||
# Bulclaw HP Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x80091528 0x80091814 0x8009198C 0x8009193C 0x800917B4 0x800917B4 0x8009194C 0x80091914>
|
||||
.data 8
|
||||
bl +0x024C
|
||||
@@ -78,6 +152,8 @@ g2_hook_end:
|
||||
|
||||
# Control Tower: Delbiter Death SFX Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.label g3_patch_loc, <VERS 0x80301600 0x803025CC 0x80303A1C 0x803037D0 0x80301F58 0x80301F9C 0x8030398C 0x80302D64>
|
||||
.data g3_patch_loc
|
||||
.deltaof g3_code_start, g3_code_end
|
||||
@@ -101,6 +177,8 @@ g3_code_end:
|
||||
|
||||
# Weapon Attributes Patch (allows attributes to work on minibosses and Olga Flow)
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.label g4_hook_call1, <VERS 0x800142DC 0x8001430C 0x800146A4 0x800142BC 0x800142F4 0x800142F4 0x800142BC 0x80014334>
|
||||
.label g4_hook_call2, <VERS 0x80015D04 0x80015D34 0x80016174 0x80015CE4 0x80015D1C 0x80015D1C 0x80015CE4 0x80015D5C>
|
||||
.label g4_hook_loc, 0x8000C8C0
|
||||
@@ -129,6 +207,8 @@ g4_hook_end:
|
||||
|
||||
# Ruins Laser Fence SFX Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x80166324 0x801666D8 0x80166848 0x8016679C 0x801666E0 0x801666E0 0x80166800 0x80166CC4>
|
||||
.data 8
|
||||
lis r3, 0x4005
|
||||
@@ -142,6 +222,8 @@ g4_hook_end:
|
||||
|
||||
# SFX Cancellation Distance Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x805CB608 0x805D5C08 0x805DD0A8 0x805DCE48 0x805CBF10 0x805D2F30 0x805DC750 0x805D8990>
|
||||
.data 4
|
||||
.float 22500
|
||||
@@ -154,6 +236,8 @@ g4_hook_end:
|
||||
|
||||
# Foie SFX Pitch Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x8022E2A8 0x8022EC44 0x8022FB30 0x8022F8E4 0x8022EB64 0x8022EB64 0x8022FC18 0x8022F4B0>
|
||||
.data 4
|
||||
li r4, 0xFFFFFF00
|
||||
@@ -170,6 +254,8 @@ g4_hook_end:
|
||||
|
||||
# Gifoie SFX Pitch Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x802300B8 0x80230A54 0x80231940 0x802316F4 0x80230974 0x80230974 0x80231A28 0x802312C0>
|
||||
.data 4
|
||||
li r4, 0xFFFFFF00
|
||||
@@ -186,6 +272,8 @@ g4_hook_end:
|
||||
|
||||
# Rafoie SFX Pitch Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x802365AC 0x80236F68 0x80237E54 0x80237C08 0x80236E88 0x80236E88 0x80237F3C 0x802377D4>
|
||||
.data 4
|
||||
li r4, 0xFFFFFF00
|
||||
@@ -214,6 +302,8 @@ g4_hook_end:
|
||||
|
||||
# Barta SFX Pitch Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x80229B54 0x8022A4F0 0x8022B3E0 0x8022B190 0x8022A410 0x8022A410 0x8022B4C4 0x8022AD5C>
|
||||
.data 4
|
||||
li r4, 0xFFFFFF00
|
||||
@@ -230,6 +320,8 @@ g4_hook_end:
|
||||
|
||||
# Gibarta SFX Pitch Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x8022EAB4 0x8022F450 0x80230340 0x802300F0 0x8022F370 0x8022F370 0x80230424 0x8022FCBC>
|
||||
.data 4
|
||||
li r4, 0xFFFFFF00
|
||||
@@ -246,6 +338,8 @@ g4_hook_end:
|
||||
|
||||
# Rabarta SFX Pitch Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x80235DD4 0x80236790 0x8023767C 0x80237430 0x802366B0 0x802366B0 0x80237764 0x80236FFC>
|
||||
.data 4
|
||||
li r4, 0xFFFFFF00
|
||||
@@ -262,6 +356,8 @@ g4_hook_end:
|
||||
|
||||
# Zonde SFX Pitch Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x8023B2C8 0x8023BC84 0x8023CB70 0x8023C924 0x8023BBA4 0x8023BBA4 0x8023CC58 0x8023C4F0>
|
||||
.data 4
|
||||
li r4, 0xFFFFFF00
|
||||
@@ -278,6 +374,8 @@ g4_hook_end:
|
||||
|
||||
# Gizonde SFX Pitch Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x80230E08 0x802317C4 0x802326B0 0x80232464 0x802316E4 0x802316E4 0x80232798 0x80232030>
|
||||
.data 4
|
||||
li r4, 0xFFFFFF00
|
||||
@@ -294,6 +392,8 @@ g4_hook_end:
|
||||
|
||||
# Razonde SFX Pitch Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x80237998 0x80238354 0x80239240 0x80238FF4 0x80238274 0x80238274 0x80239328 0x80238BC0>
|
||||
.data 4
|
||||
li r4, 0xFFFFFF00
|
||||
@@ -310,6 +410,8 @@ g4_hook_end:
|
||||
|
||||
# Grants SFX Pitch Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x802316FC 0x802320B8 0x80232FA4 0x80232D58 0x80231FD8 0x80231FD8 0x8023308C 0x80232924>
|
||||
.data 4
|
||||
li r4, 0xFFFFFF00
|
||||
@@ -326,6 +428,8 @@ g4_hook_end:
|
||||
|
||||
# Megid SFX Pitch Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x802337A8 0x80234164 0x80235050 0x80234E04 0x80234084 0x80234084 0x80235138 0x802349D0>
|
||||
.data 4
|
||||
li r4, 0xFFFFFF00
|
||||
@@ -342,6 +446,8 @@ g4_hook_end:
|
||||
|
||||
# Anti SFX Pitch Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x80229354 0x80229CF0 0x8022ABDC 0x8022A990 0x80229C10 0x80229C10 0x8022ACC4 0x8022A55C>
|
||||
.data 4
|
||||
cmpwi r0, 1
|
||||
@@ -350,26 +456,46 @@ g4_hook_end:
|
||||
|
||||
# Shield DFP/EVP Bug Fix (allows shields to reach true max DFP/EVP values)
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x801185B0 0x801187CC 0x8011885C 0x80118764 0x80118854 0x80118854 0x80118774 0x8011894C>
|
||||
.data 4
|
||||
lbz r0, [r4 + 0x0016]
|
||||
|
||||
.data <VERS 0x801185BC 0x801187D8 0x80118868 0x80118770 0x80118860 0x80118860 0x80118780 0x80118958>
|
||||
.data 4
|
||||
lbz r0, [r4 + 0x0017]
|
||||
|
||||
.versions 4OJB 4OJD 4OJU 4OED 4OEU 4OPD 4OPU
|
||||
|
||||
.data <VERS 0x00185D8E 0x00185F4E 0x0018600E 0x00185F0E 0x00185F6E 0x00185F2E 0x00185F2E>
|
||||
.data 0x00000001
|
||||
.binary 16
|
||||
.data <VERS 0x00185D97 0x00185F57 0x00186017 0x00185F17 0x00185F77 0x00185F37 0x00185F37>
|
||||
.data 0x00000001
|
||||
.binary 17
|
||||
|
||||
|
||||
|
||||
# VR Spaceship Item Drop Bug Fix (allows items to drop from enemies above a certain Y position)
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x805C996C 0x805D3F6C 0x805DB40C 0x805DB1AC 0x805CA274 0x805D1294 0x805DAAB4 0x805D6CF4>
|
||||
.data 4
|
||||
.float 220
|
||||
|
||||
.versions 4OJB 4OJD 4OJU 4OED 4OEU 4OPD 4OPU
|
||||
|
||||
.data <VERS 0x00175D75 0x00175E55 0x00175F35 0x00175EC5 0x00175ED5 0x00175EE5 0x00175E95>
|
||||
.data 0x00000002
|
||||
.data 0x435C0000
|
||||
|
||||
|
||||
|
||||
# Invalid Items Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x8011CA90 0x8011CCD4 0x8011CD0C 0x8011CC6C 0x8011CD34 0x8011CD34 0x8011CC7C 0x8011CE54>
|
||||
.data 0x0C
|
||||
mr r3, r0
|
||||
@@ -392,6 +518,8 @@ g4_hook_end:
|
||||
|
||||
# Item Removal Maxed Stats Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.label g5_hook1_call, <VERS 0x801B9A88 0x801B9EF4 0x801BCF6C 0x801B9FC0 0x801B9E74 0x801B9E74 0x801BA024 0x801BA4E0>
|
||||
.label g5_hook1_ret, <VERS 0x801B9A8C 0x801B9EF8 0x801BCF70 0x801B9FC4 0x801B9E78 0x801B9E78 0x801BA028 0x801BA4E4>
|
||||
.label g5_hook2_call, <VERS 0x8010B970 0x8010BB70 0x8010BC04 0x8010BAF0 0x8010BC14 0x8010BC14 0x8010BB00 0x8010BCF0>
|
||||
@@ -498,6 +626,8 @@ g5_hook4_end:
|
||||
|
||||
# Unit Present Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.label g6_hook_loc, 0x8000C640
|
||||
.label g6_hook_call, <VERS 0x80118CE0 0x80118EFC 0x80118FD8 0x80118E94 0x80118F84 0x80118F84 0x80118EA4 0x8011907C>
|
||||
.data g6_hook_loc
|
||||
@@ -521,6 +651,8 @@ g6_hook_end:
|
||||
|
||||
# Bank Item Stacking Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.label g7_hook1_loc, 0x8000C6D0
|
||||
.label g7_hook1_call, <VERS 0x8021D098 0x8021D9FC 0x8021E8E8 0x8021E69C 0x8021D91C 0x8021D91C 0x8021E9D0 0x8021E268>
|
||||
.label g7_hook2_call, <VERS 0x80220528 0x80220EBC 0x80221DA8 0x80221B5C 0x80220DDC 0x80220DDC 0x80221E90 0x80221728>
|
||||
@@ -553,14 +685,27 @@ g7_hooks_end:
|
||||
|
||||
# Dropped Mag Color Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x80114378 0x8011458C 0x80114634 0x80114524 0x8011461C 0x8011461C 0x80114534 0x8011470C>
|
||||
.data 4
|
||||
li r0, 0x12
|
||||
|
||||
.versions 4OJB
|
||||
|
||||
.data 0x001759E6
|
||||
.data 1
|
||||
.binary 12
|
||||
.data 0x00180898
|
||||
.data 1
|
||||
.binary 12
|
||||
|
||||
|
||||
|
||||
# Meseta Drop System Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x80107478 0x80107654 0x80107708 0x801075D4 0x8010771C 0x8010771C 0x801075E4 0x801077D4>
|
||||
.data 4
|
||||
b +0x0C
|
||||
@@ -573,16 +718,18 @@ g7_hooks_end:
|
||||
|
||||
# Present Color Bug Fix
|
||||
|
||||
.only_versions 3OJ2 3OE0 3OE1
|
||||
.versions 3OJ2 3OE0 3OE1
|
||||
|
||||
.data <VERS 0x80101C14 0x80101EB8 0x80101EB8>
|
||||
.data 4
|
||||
nop
|
||||
.all_versions
|
||||
|
||||
|
||||
|
||||
# Offline Quests Drop Table Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x80104B48 0x80104D24 0x80104DE0 0x80104CA4 0x80104DEC 0x80104DEC 0x80104CB4 0x80104EA4>
|
||||
.data 4
|
||||
beq +0x0C
|
||||
@@ -591,6 +738,8 @@ g7_hooks_end:
|
||||
|
||||
# Mag Revival Priority Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.label g8_hook_loc, 0x8000C8A0
|
||||
.label g8_hook_call, <VERS 0x80112664 0x80112864 0x80112A3C 0x801127F0 0x80112908 0x80112908 0x80112800 0x801129E4>
|
||||
.data g8_hook_loc
|
||||
@@ -613,6 +762,8 @@ g8_hook_end:
|
||||
|
||||
# Mag Revival Challenge & Quest Mode Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x801CA1F4 0x801CA6E0 0x801CB5EC 0x801CA7AC 0x801CA610 0x801CA610 0x801CA810 0x801CACCC>
|
||||
.data 4
|
||||
b +0x10
|
||||
@@ -621,6 +772,8 @@ g8_hook_end:
|
||||
|
||||
# Chat Bubble Window TAB Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x80250264 0x80250CB0 0x80251CA4 0x802519A4 0x80250AEC 0x80250AEC 0x80251C68 0x802514B0>
|
||||
.data 4
|
||||
nop
|
||||
@@ -629,6 +782,8 @@ g8_hook_end:
|
||||
|
||||
# Chat Log Window LF/Tab Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x80267DDC 0x80268A88 0x80269AE4 0x80269898 0x80268788 0x80268788 0x80269B5C 0x802693A4>
|
||||
.data 4
|
||||
nop
|
||||
@@ -637,6 +792,8 @@ g8_hook_end:
|
||||
|
||||
# Dark/Hell Special GFX Bug Fix (makes Dark/Hell display graphic on success like in PSO BB)
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.label g9_hook_loc, 0x8000E1E0
|
||||
.label g9_hook_call1, <VERS 0x80355984 0x80356D88 0x803582E4 0x80358098 0x80356838 0x8035687C 0x80358464 0x80357858>
|
||||
.label g9_hook_call2, <VERS 0x80355A04 0x80356E08 0x80358364 0x80358118 0x803568B8 0x803568FC 0x803584E4 0x803578D8>
|
||||
@@ -675,14 +832,24 @@ g9_hook_end:
|
||||
|
||||
# Gol Dragon Camera Bug Fix (makes the camera after Gol Dragon display "normally")
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x802FB99C 0x802FC968 0x802FDE60 0x802FDB6C 0x802FC2F4 0x802FC338 0x802FDD28 0x802FD100>
|
||||
.data 4
|
||||
cmpwi r3, 1
|
||||
|
||||
.versions 4OJB 4OJD 4OJU 4OED 4OEU 4OPD 4OPU
|
||||
|
||||
.data <VERS 0x000A8AE1 0x000A8C51 0x000A8BD1 0x000A89C1 0x000A8961 0x000A89E1 0x000A8921>
|
||||
.data 0x00000002
|
||||
.binary 01
|
||||
|
||||
|
||||
|
||||
# Box/Fence Fadeout Bug Fix (stops boxes and other environmental objects fading in and out as you approach)
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x80189A54 0x80189E2C 0x80189F90 0x80189EF0 0x80189E20 0x80189E20 0x80189F54 0x8018A418>
|
||||
.data 4
|
||||
nop
|
||||
@@ -691,30 +858,62 @@ g9_hook_end:
|
||||
.data 4
|
||||
nop
|
||||
|
||||
.versions 4OJB 4OJD 4OJU 4OED 4OEU 4OPD 4OPU
|
||||
|
||||
.data <VERS 0x001D229B 0x001D244B 0x001D295B 0x001D241B 0x001D26AB 0x001D243B 0x001D26DB>
|
||||
.data 2
|
||||
nop
|
||||
nop
|
||||
|
||||
.data <VERS 0x001DF7C4 0x001DF924 0x001DFD94 0x001DF964 0x001DFB04 0x001DF984 0x001DFA74>
|
||||
.data 6
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
|
||||
|
||||
|
||||
# TP Bar Color Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x8026DA74 0x8026E738 0x8026F794 0x8026F548 0x8026E2D4 0x8026E2D4 0x8026F6FC 0x8026EF44>
|
||||
.data 4
|
||||
subi r4, r4, 0x5506
|
||||
|
||||
.data <VERS 0x8026DB88 0x8026E84C 0x8026F8A8 0x8026F65C 0x8026E3E8 0x8026E3E8 0x8026F810 0x8026F058>
|
||||
.data 4
|
||||
subi r3, r3, 0x5506
|
||||
|
||||
.data <VERS 0x8026DC10 0x8026E8D4 0x8026F930 0x8026F6E4 0x8026E470 0x8026E470 0x8026F898 0x8026F0E0>
|
||||
.data 4
|
||||
subi r4, r3, 0x5506
|
||||
|
||||
.data <VERS 0x804CBB40 0x804CF290 0x804D17E0 0x804D1580 0x804CC310 0x804CC7F0 0x804D0E58 0x804D1248>
|
||||
.data 4
|
||||
.data 0xFF0074EE
|
||||
|
||||
.versions 4OJB 4OJD 4OJU 4OED 4OEU 4OPD 4OPU
|
||||
|
||||
.data <VERS 0x002779CE 0x00277C7E 0x0027808E 0x00277DAE 0x00277ECE 0x00277DCE 0x00277F9E>
|
||||
.data 0x00000004
|
||||
.data 0xFF00AAFA
|
||||
.data <VERS 0x002779DE 0x00277C8E 0x0027809E 0x00277DBE 0x00277EDE 0x00277DDE 0x00277FAE>
|
||||
.data 0x00000004
|
||||
.data 0xFF00AAFA
|
||||
.data <VERS 0x00277A24 0x00277CD4 0x002780E4 0x00277E04 0x00277F24 0x00277E24 0x00277FF4>
|
||||
.data 0x00000004
|
||||
.data 0xFF00AAFA
|
||||
.data <VERS 0x0054543C 0x00545ACC 0x0054D5B4 0x0054AA34 0x0054A2D4 0x0054AA34 0x0054ADD4>
|
||||
.data 0x00000004
|
||||
.data 0xFF0074EE
|
||||
|
||||
|
||||
|
||||
# Devil's and Demon's Special Damage Display Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x8001306C 0x8001309C 0x80013364 0x8001304C 0x80013084 0x80013084 0x8001304C 0x800130C4>
|
||||
.data 4
|
||||
b -0x0340
|
||||
@@ -723,6 +922,8 @@ g9_hook_end:
|
||||
|
||||
# Christmas Trees Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.label g10_hook_loc, 0x8000B5C8
|
||||
.label g10_hook_call, <VERS 0x80183E94 0x8018425C 0x801843C0 0x80184320 0x80184250 0x80184250 0x80184384 0x80184848>
|
||||
.label g10_hook_ret, <VERS 0x80183E98 0x80184260 0x801843C4 0x80184324 0x80184254 0x80184254 0x80184388 0x8018484C>
|
||||
@@ -750,15 +951,25 @@ g10_hook_end:
|
||||
|
||||
# Rain Drops Color Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x804B3738 0x804B6E58 0x804B92F8 0x804B90B8 0x804B3EF0 0x804B43D0 0x804B8990 0x804B8E10>
|
||||
.data 8
|
||||
.data 0x70808080
|
||||
.data 0x60707070
|
||||
|
||||
.versions 4OJB 4OJD 4OJU 4OED 4OEU 4OPD 4OPU
|
||||
|
||||
.data <VERS 0x0054D670 0x0054DD00 0x005557E8 0x00552C68 0x00552508 0x00552C68 0x00553008>
|
||||
.data 0x00000008
|
||||
.binary 7080808060707070
|
||||
|
||||
|
||||
|
||||
# Reverser Target Lock Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x801C5EA4 0x801C6360 0x801C6604 0x801C642C 0x801C62C0 0x801C62C0 0x801C6490 0x801C694C>
|
||||
.data 4
|
||||
addi r4, r31, 0x02FC
|
||||
@@ -767,11 +978,13 @@ g10_hook_end:
|
||||
|
||||
# Deband/Shifta/Resta Target Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x8022CF84 0x8022D920 0x8022E85C 0x8022E5C0 0x8022D840 0x8022D840 0x8022E8F4 0x8022E18C>
|
||||
.data 4
|
||||
bgt +0x0630
|
||||
|
||||
.only_versions 3OJ2 3OE0 3OE1
|
||||
.versions 3OJ2 3OE0 3OE1
|
||||
.data <VERS 0x8022D278 0x8022DB34 0x8022DB34>
|
||||
.data 4
|
||||
bgt +0x033C
|
||||
@@ -779,12 +992,13 @@ g10_hook_end:
|
||||
.data <VERS 0x8022D36C 0x8022DC28 0x8022DC28>
|
||||
.data 4
|
||||
bgt +0x0248
|
||||
.all_versions
|
||||
|
||||
|
||||
|
||||
# Tech Auto Targeting Bug Fix
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x8022C850 0x8022D1EC 0x8022E128 0x8022DE8C 0x8022D10C 0x8022D10C 0x8022E1C0 0x8022DA58>
|
||||
.data 4
|
||||
nop
|
||||
@@ -817,6 +1031,8 @@ g10_hook_end:
|
||||
|
||||
# Enable Trap Animations
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.label g11_hook_loc, 0x8000BBD0
|
||||
.label g11_hook_call, <VERS 0x80170C54 0x80171008 0x80171260 0x801710CC 0x80171010 0x80171010 0x80171130 0x801715F4>
|
||||
.data g11_hook_loc
|
||||
@@ -846,7 +1062,8 @@ g11_hook_end:
|
||||
|
||||
# Belra arm bug fix (this part by fuzziqersoftware)
|
||||
|
||||
.only_versions 3OJ2 3OE0 3OE1
|
||||
.versions 3OJ2 3OE0 3OE1
|
||||
|
||||
.label g12_hook1_call, <VERS 0x80095724 0x800959B0 0x800959B0>
|
||||
.label g12_hook2_call, <VERS 0x80095734 0x800959C0 0x800959C0>
|
||||
.label g12_hook_loc, 0x8000B06C
|
||||
@@ -874,12 +1091,12 @@ g12_hook_end:
|
||||
.address g12_hook2_call
|
||||
bl g12_hook2_start
|
||||
|
||||
.all_versions
|
||||
|
||||
|
||||
|
||||
# Tsumikiri J-Sword special attack + rapid weapon switch bug fix (this part by fuzziqersoftware)
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.label tjs_switch_fix_hook_call, <VERS 0x8034CFA8 0x8034E3AC 0x8034F908 0x8034F6BC 0x8034DE5C 0x8034DEA0 0x8034FA88 0x8034EE7C>
|
||||
.label tjs_switch_fix_hook_loc, 0x8000B050
|
||||
.data tjs_switch_fix_hook_loc
|
||||
@@ -905,7 +1122,8 @@ tjs_switch_fix_hook_end:
|
||||
|
||||
# Battle param reload bug fix (this part by fuzziqersoftware)
|
||||
|
||||
.only_versions 3OJ2 3OE0 3OE1
|
||||
.versions 3OJ2 3OE0 3OE1
|
||||
|
||||
.label end_loading_screen, <VERS 0x8001C6D0 0x8001C8F0 0x8001C8F0>
|
||||
.label load_battle_params, <VERS 0x8001DA48 0x8001DC68 0x8001DC68>
|
||||
.label bp_reload_hook_loc, 0x8000E1BC
|
||||
@@ -928,9 +1146,10 @@ bp_reload_hook_end:
|
||||
.data 4
|
||||
.address bp_reload_hook_call
|
||||
bl bp_reload_hook_start
|
||||
|
||||
|
||||
|
||||
.all_versions
|
||||
|
||||
|
||||
|
||||
.data 0
|
||||
.data 0
|
||||
@@ -1,213 +0,0 @@
|
||||
.meta name="Bug fixes"
|
||||
.meta description="Fixes many minor\ngameplay, sound,\nand graphical bugs"
|
||||
# Original code by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
# Xbox port by fuzziqersoftware
|
||||
|
||||
# This patch is a collection of many smaller patches, most of which are not yet ported.
|
||||
|
||||
.versions 4OJB 4OJD 4OJU 4OED 4OEU 4OPD 4OPU
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksXB
|
||||
|
||||
|
||||
|
||||
# Tiny Grass Assassins Bug Fix
|
||||
|
||||
.data <VERS 0x0016227A 0x0016238A 0x0016232A 0x0016240A 0x0016229A 0x0016242A 0x0016225A>
|
||||
.data 0x00000002
|
||||
.binary EB0E
|
||||
|
||||
|
||||
|
||||
# Shield DFP/EVP Bug Fix (allows shields to reach true max DFP/EVP values)
|
||||
|
||||
.data <VERS 0x00185D8E 0x00185F4E 0x0018600E 0x00185F0E 0x00185F6E 0x00185F2E 0x00185F2E>
|
||||
.data 0x00000001
|
||||
.binary 16
|
||||
.data <VERS 0x00185D97 0x00185F57 0x00186017 0x00185F17 0x00185F77 0x00185F37 0x00185F37>
|
||||
.data 0x00000001
|
||||
.binary 17
|
||||
|
||||
|
||||
|
||||
# VR Spaceship Item Drop Bug Fix (allows items to drop from enemies above a certain Y position)
|
||||
|
||||
.data <VERS 0x00175D75 0x00175E55 0x00175F35 0x00175EC5 0x00175ED5 0x00175EE5 0x00175E95>
|
||||
.data 0x00000002
|
||||
.data 0x435C0000
|
||||
|
||||
|
||||
|
||||
# Gol Dragon Camera Bug Fix (makes the camera after Gol Dragon display "normally")
|
||||
|
||||
.data <VERS 0x000A8AE1 0x000A8C51 0x000A8BD1 0x000A89C1 0x000A8961 0x000A89E1 0x000A8921>
|
||||
.data 0x00000002
|
||||
.binary 01
|
||||
|
||||
|
||||
|
||||
# Rain Drops Color Bug Fix
|
||||
|
||||
.data <VERS 0x0054D670 0x0054DD00 0x005557E8 0x00552C68 0x00552508 0x00552C68 0x00553008>
|
||||
.data 0x00000008
|
||||
.binary 7080808060707070
|
||||
|
||||
|
||||
|
||||
# TP Bar Color Bug Fix
|
||||
|
||||
.data <VERS 0x002779CE 0x00277C7E 0x0027808E 0x00277DAE 0x00277ECE 0x00277DCE 0x00277F9E>
|
||||
.data 0x00000004
|
||||
.data 0xFF00AAFA
|
||||
.data <VERS 0x002779DE 0x00277C8E 0x0027809E 0x00277DBE 0x00277EDE 0x00277DDE 0x00277FAE>
|
||||
.data 0x00000004
|
||||
.data 0xFF00AAFA
|
||||
.data <VERS 0x00277A24 0x00277CD4 0x002780E4 0x00277E04 0x00277F24 0x00277E24 0x00277FF4>
|
||||
.data 0x00000004
|
||||
.data 0xFF00AAFA
|
||||
.data <VERS 0x0054543C 0x00545ACC 0x0054D5B4 0x0054AA34 0x0054A2D4 0x0054AA34 0x0054ADD4>
|
||||
.data 0x00000004
|
||||
.data 0xFF0074EE
|
||||
|
||||
|
||||
|
||||
# Olga Flow Barta Bug Fix
|
||||
|
||||
.label g1_hook_call, <VERS 0x000970E0 0x000973F0 0x00097460 0x00097140 0x000970E0 0x00097160 0x00096FE0>
|
||||
.label g1_hook_loc, <VERS 0x00097124 0x00097434 0x000974A4 0x00097184 0x00097124 0x000971A4 0x00097024>
|
||||
.data g1_hook_call
|
||||
.data 6
|
||||
.address g1_hook_call
|
||||
mov eax, esi
|
||||
cmp al, 19
|
||||
jmp g1_hook_loc
|
||||
g1_hook_call_end:
|
||||
.data g1_hook_loc
|
||||
.deltaof g1_hook_start, g1_hook_end
|
||||
.address g1_hook_loc
|
||||
g1_hook_start:
|
||||
jne g1_hook_skip_replace_value
|
||||
mov al, 2
|
||||
g1_hook_skip_replace_value:
|
||||
cmp eax, [ebx + 0x440] // Original opcode
|
||||
jmp g1_hook_call_end
|
||||
g1_hook_end:
|
||||
|
||||
|
||||
|
||||
# Morfos Frozen Player Bug Fix
|
||||
|
||||
.label g2_hook_call, <VERS 0x0012E257 0x0012E387 0x0012E4E7 0x0012E537 0x0012E567 0x0012E557 0x0012E5A7>
|
||||
.label g2_hook_loc1, <VERS 0x0012E5F4 0x0012E724 0x0012E884 0x0012E8D4 0x0012E904 0x0012E8F4 0x0012E944>
|
||||
.label g2_hook_loc2, <VERS 0x0012E622 0x0012E752 0x0012E8B2 0x0012E902 0x0012E932 0x0012E922 0x0012E972>
|
||||
.data g2_hook_call
|
||||
.data 6
|
||||
.address g2_hook_call
|
||||
call g2_hook_loc1
|
||||
nop
|
||||
.data g2_hook_loc1
|
||||
.deltaof g2_hook_start1, g2_hook_end1
|
||||
.address g2_hook_loc1
|
||||
g2_hook_start1:
|
||||
fld1 st0 // st = [1.0, speed]
|
||||
fld1 st0 // st = [1.0, 1.0, speed]
|
||||
fadd st0, st1 // st = [2.0, 1.0, speed]
|
||||
fdivp st1, st0 // st = [0.5, speed]
|
||||
jmp g2_hook_loc2
|
||||
g2_hook_end1:
|
||||
|
||||
.data g2_hook_loc2
|
||||
.deltaof g2_hook_start2, g2_hook_end2
|
||||
.address g2_hook_loc2
|
||||
g2_hook_start2:
|
||||
test byte [esi + 0x30], 0x20 // If not set, use 1.5; if set, use 0.5
|
||||
jnz g2_hook_entity_is_frozen
|
||||
fld1 st0 // st = [1, 0.5, speed]
|
||||
faddp st1, st0 // st = [1.5, speed]
|
||||
g2_hook_entity_is_frozen:
|
||||
fmulp st1, st0 // st = [((game_flags & 0x20) ? 0.5 : 1.5) * speed]
|
||||
ret
|
||||
g2_hook_end2:
|
||||
|
||||
|
||||
|
||||
# Dropped Mag Color Bug Fix (only needed on beta version)
|
||||
|
||||
.only_versions 4OJB
|
||||
.data 0x001759E6
|
||||
.data 1
|
||||
.binary 12
|
||||
.data 0x00180898
|
||||
.data 1
|
||||
.binary 12
|
||||
.all_versions
|
||||
|
||||
|
||||
|
||||
# Box/Fence Fadeout Bug Fix
|
||||
|
||||
.data <VERS 0x001D229B 0x001D244B 0x001D295B 0x001D241B 0x001D26AB 0x001D243B 0x001D26DB>
|
||||
.data 2
|
||||
nop
|
||||
nop
|
||||
|
||||
.data <VERS 0x001DF7C4 0x001DF924 0x001DFD94 0x001DF964 0x001DFB04 0x001DF984 0x001DFA74>
|
||||
.data 6
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
|
||||
|
||||
|
||||
# TODO: Port the rest of the patches in the GC version of BugFixes:
|
||||
|
||||
# Bulclaw HP Bug Fix
|
||||
# Weapon Attributes Patch
|
||||
# Invalid Items Bug Fix
|
||||
# Item Removal Maxed Stats Bug Fix
|
||||
# Unit Present Bug Fix
|
||||
# Bank Item Stacking Bug Fix
|
||||
# Meseta Drop System Bug Fix
|
||||
# Offline Quests Drop Table Bug Fix
|
||||
# Mag Revival Priority Bug Fix
|
||||
# Mag Revival Challenge & Quest Mode Bug Fix
|
||||
# Reverser Target Lock Bug Fix
|
||||
# Deband/Shifta/Resta Target Bug Fix
|
||||
# Tech Auto Targeting Bug Fix
|
||||
# Enable Trap Animations
|
||||
# Tsumikiri J-Sword special attack + rapid weapon switch bug fix
|
||||
|
||||
# Control Tower: Delbiter Death SFX Bug Fix
|
||||
# Ruins Laser Fence SFX Bug Fix
|
||||
# SFX Cancellation Distance Bug Fix
|
||||
# Foie SFX Pitch Bug Fix
|
||||
# Gifoie SFX Pitch Bug Fix
|
||||
# Rafoie SFX Pitch Bug Fix
|
||||
# Barta SFX Pitch Bug Fix
|
||||
# Gibarta SFX Pitch Bug Fix
|
||||
# Rabarta SFX Pitch Bug Fix
|
||||
# Zonde SFX Pitch Bug Fix
|
||||
# Gizonde SFX Pitch Bug Fix
|
||||
# Razonde SFX Pitch Bug Fix
|
||||
# Grants SFX Pitch Bug Fix
|
||||
# Megid SFX Pitch Bug Fix
|
||||
# Anti SFX Pitch Bug Fix
|
||||
# Present Color Bug Fix
|
||||
# Chat Bubble Window TAB Bug Fix
|
||||
# Chat Log Window LF/Tab Bug Fix
|
||||
# Dark/Hell Special GFX Bug Fix
|
||||
# Devil's and Demon's Special Damage Display Bug Fix
|
||||
# Christmas Trees Bug Fix
|
||||
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -0,0 +1,115 @@
|
||||
.meta name="CallProtectedHandler"
|
||||
.meta description=""
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
|
||||
|
||||
|
||||
.versions 3OJT 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
start:
|
||||
stwu [r1 - 0x10], r1
|
||||
mflr r0
|
||||
stw [r1 + 0x14], r0
|
||||
stw [r1 + 0x08], r31
|
||||
stw [r1 + 0x0C], r30
|
||||
|
||||
b get_data_addr
|
||||
resume:
|
||||
mflr r31
|
||||
|
||||
lwz r30, [r31]
|
||||
li r0, 1
|
||||
stw [r30], r0
|
||||
|
||||
addi r3, r31, 0x0C
|
||||
lwz r4, [r31 + 8]
|
||||
lwz r0, [r31 + 4]
|
||||
mtctr r0
|
||||
bctrl
|
||||
|
||||
li r0, 0
|
||||
stw [r30], r0
|
||||
|
||||
lwz r30, [r1 + 0x0C]
|
||||
lwz r31, [r1 + 0x08]
|
||||
lwz r0, [r1 + 0x14]
|
||||
mtlr r0
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
|
||||
get_data_addr:
|
||||
bl resume
|
||||
# allow_local_client_commands
|
||||
.data <VERS 0x8065F458 0x805C4D58 0x805CF320 0x805D67A0 0x805D6540 0x805C5650 0x805CC630 0x805D5E50 0x805D2090>
|
||||
# RcvPsoData2
|
||||
.data <VERS 0x80236F24 0x801E3B38 0x801E40BC 0x801E4290 0x801E4008 0x801E3F9C 0x801E3F9C 0x801E405C 0x801E4698>
|
||||
|
||||
|
||||
|
||||
.versions 4OJB 4OJD 4OJU 4OED 4OEU 4OPD 4OPU
|
||||
|
||||
start:
|
||||
jmp get_data_addr
|
||||
resume:
|
||||
xchg ebx, [esp]
|
||||
|
||||
mov edx, [ebx]
|
||||
mov dword [edx], 1
|
||||
|
||||
mov edx, [ebx + 4]
|
||||
lea ecx, [ebx + 0x0C]
|
||||
mov eax, [ebx + 8]
|
||||
call edx
|
||||
|
||||
mov edx, [ebx]
|
||||
mov dword [edx], 0
|
||||
|
||||
pop ebx
|
||||
ret
|
||||
|
||||
get_data_addr:
|
||||
call resume
|
||||
.data <VERS 0x0071E8C8 0x0071EF28 0x00726A68 0x00723F68 0x007237E8 0x00723F68 0x007242E8>
|
||||
.data <VERS 0x002DBBA0 0x002DC720 0x002DDFE0 0x002DDB00 0x002DE000 0x002DDB30 0x002DE030>
|
||||
|
||||
|
||||
|
||||
.versions 59NJ 59NL
|
||||
|
||||
start:
|
||||
jmp get_data_addr
|
||||
resume:
|
||||
xchg ebx, [esp]
|
||||
|
||||
mov edx, [ebx]
|
||||
mov dword [edx], 1
|
||||
|
||||
mov edx, [ebx + 4]
|
||||
push dword [ebx + 8]
|
||||
lea ecx, [ebx + 0x0C]
|
||||
push ecx
|
||||
call edx # RcvPsoData2(data, size)
|
||||
add esp, 8
|
||||
|
||||
mov edx, [ebx]
|
||||
mov dword [edx], 0
|
||||
|
||||
pop ebx
|
||||
ret
|
||||
|
||||
get_data_addr:
|
||||
call resume
|
||||
|
||||
.data <VERS 0x00AAC870 0x00AAECF0> # should_allow_protected_commands
|
||||
.data <VERS 0x008015D0 0x00800860> # RcvPsoData2[std](void* data @ [esp + 4], uint32_t size @ [esp + 8])
|
||||
|
||||
|
||||
|
||||
.all_versions
|
||||
|
||||
size:
|
||||
.data 0x00000000
|
||||
data:
|
||||
@@ -1,50 +0,0 @@
|
||||
.meta hide_from_patches_menu
|
||||
.meta name="CallProtectedHandler"
|
||||
.meta description=""
|
||||
|
||||
.versions 3OJT 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
stwu [r1 - 0x10], r1
|
||||
mflr r0
|
||||
stw [r1 + 0x14], r0
|
||||
stw [r1 + 0x08], r31
|
||||
stw [r1 + 0x0C], r30
|
||||
|
||||
b get_data_addr
|
||||
resume:
|
||||
mflr r31
|
||||
|
||||
lwz r30, [r31]
|
||||
li r0, 1
|
||||
stw [r30], r0
|
||||
|
||||
addi r3, r31, 0x0C
|
||||
lwz r4, [r31 + 8]
|
||||
lwz r0, [r31 + 4]
|
||||
mtctr r0
|
||||
bctrl
|
||||
|
||||
li r0, 0
|
||||
stw [r30], r0
|
||||
|
||||
lwz r30, [r1 + 0x0C]
|
||||
lwz r31, [r1 + 0x08]
|
||||
lwz r0, [r1 + 0x14]
|
||||
mtlr r0
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
|
||||
get_data_addr:
|
||||
bl resume
|
||||
# allow_local_client_commands
|
||||
.data <VERS 0x8065F458 0x805C4D58 0x805CF320 0x805D67A0 0x805D6540 0x805C5650 0x805CC630 0x805D5E50 0x805D2090>
|
||||
# RcvPsoData2
|
||||
.data <VERS 0x80236F24 0x801E3B38 0x801E40BC 0x801E4290 0x801E4008 0x801E3F9C 0x801E3F9C 0x801E405C 0x801E4698>
|
||||
|
||||
size:
|
||||
.data 0x00000000
|
||||
data:
|
||||
@@ -1,36 +0,0 @@
|
||||
.meta hide_from_patches_menu
|
||||
.meta name="CallProtectedHandler"
|
||||
.meta description=""
|
||||
|
||||
.versions 4OJB 4OJD 4OJU 4OED 4OEU 4OPD 4OPU
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
jmp get_data_addr
|
||||
resume:
|
||||
xchg ebx, [esp]
|
||||
|
||||
mov edx, [ebx]
|
||||
mov dword [edx], 1
|
||||
|
||||
mov edx, [ebx + 4]
|
||||
lea ecx, [ebx + 0x0C]
|
||||
mov eax, [ebx + 8]
|
||||
call edx
|
||||
|
||||
mov edx, [ebx]
|
||||
mov dword [edx], 0
|
||||
|
||||
pop ebx
|
||||
ret
|
||||
|
||||
get_data_addr:
|
||||
call resume
|
||||
.data <VERS 0x0071E8C8 0x0071EF28 0x00726A68 0x00723F68 0x007237E8 0x00723F68 0x007242E8>
|
||||
.data <VERS 0x002DBBA0 0x002DC720 0x002DDFE0 0x002DDB00 0x002DE000 0x002DDB30 0x002DE030>
|
||||
|
||||
size:
|
||||
.data 0x00000000
|
||||
data:
|
||||
@@ -1,38 +0,0 @@
|
||||
.meta hide_from_patches_menu
|
||||
.meta name="CallProtectedHandler"
|
||||
.meta description=""
|
||||
|
||||
.versions 59NJ 59NL
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
jmp get_data_addr
|
||||
resume:
|
||||
xchg ebx, [esp]
|
||||
|
||||
mov edx, [ebx]
|
||||
mov dword [edx], 1
|
||||
|
||||
mov edx, [ebx + 4]
|
||||
push dword [ebx + 8]
|
||||
lea ecx, [ebx + 0x0C]
|
||||
push ecx
|
||||
call edx # RcvPsoData2(data, size)
|
||||
add esp, 8
|
||||
|
||||
mov edx, [ebx]
|
||||
mov dword [edx], 0
|
||||
|
||||
pop ebx
|
||||
ret
|
||||
|
||||
get_data_addr:
|
||||
call resume
|
||||
|
||||
.data <VERS 0x00AAC870 0x00AAECF0> # should_allow_protected_commands
|
||||
.data <VERS 0x008015D0 0x00800860> # RcvPsoData2[std](void* data @ [esp + 4], uint32_t size @ [esp + 8])
|
||||
size:
|
||||
.data 0x00000000
|
||||
data:
|
||||
+5
-3
@@ -1,16 +1,18 @@
|
||||
.meta name="Chat"
|
||||
.meta description="Enables extended\nWord Select and\nstops the Log\nWindow from\nscrolling with L+R"
|
||||
# Original codes by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
|
||||
.meta visibility="all"
|
||||
.meta name="Chat"
|
||||
.meta description="Enables extended\nWord Select and\nstops the Log\nWindow from\nscrolling with L+R"
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0 3SJT 3SJ0 3SE0 3SP0
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksGC
|
||||
.include WriteCodeBlocks
|
||||
|
||||
# Extended Word Select Menu (PSO PCv2 Style)
|
||||
.data <VERS 0x8034445C 0x803457AC 0x80346CCC 0x80346A80 0x8034525C 0x803452A0 0x80346E4C 0x8034627C 0x801D9B30 0x801C7CFC 0x801C7D88 0x801C83FC>
|
||||
+5
-3
@@ -1,16 +1,18 @@
|
||||
.meta name="Common bank"
|
||||
.meta description="Hold L and open\nthe bank to use a\ncommon bank stored\nin temp character\n3's data"
|
||||
# Original code by Ralf @ GC-Forever ("Common Bank (Hold L And Open Bank)")
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
|
||||
.meta visibility="all"
|
||||
.meta name="Common bank"
|
||||
.meta description="Hold L and open\nthe bank to use a\ncommon bank stored\nin temp character\n3's data"
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksGC
|
||||
.include WriteCodeBlocks
|
||||
|
||||
.data 0x8000BAB4
|
||||
.deltaof hook1, hooks_end
|
||||
+56
-4
@@ -1,16 +1,21 @@
|
||||
.meta name="DC targets"
|
||||
.meta description="Changes the target\nreticle colors to\nthose used on the\nDreamcast"
|
||||
# Original code by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
.meta visibility="all"
|
||||
.meta name="DC targets"
|
||||
.meta description="Changes the target\nreticle colors to\nthose used on the\nDreamcast"
|
||||
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksGC
|
||||
.include WriteCodeBlocks
|
||||
|
||||
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x802AB3FC 0x802AC2A4 0x802AD3D0 0x802AD184 0x802ABDB8 0x802ABDFC 0x802AD338 0x802ACACC>
|
||||
.data 0x00000004
|
||||
@@ -54,5 +59,52 @@ start:
|
||||
.float 0.1
|
||||
.float 0.1
|
||||
|
||||
|
||||
|
||||
.versions 4OED 4OEU 4OJB 4OJD 4OJU 4OPD 4OPU
|
||||
|
||||
.data <VERS 0x0025BD09 0x0025BE29 0x0025B889 0x0025BC39 0x0025BFB9 0x0025BD29 0x0025BE59>
|
||||
.data 0x00000004
|
||||
.data 0x00FF0000
|
||||
|
||||
.data <VERS 0x0025BD17 0x0025BE37 0x0025B897 0x0025BC47 0x0025BFC7 0x0025BD37 0x0025BE67>
|
||||
.data 0x00000004
|
||||
.data 0x000000FF
|
||||
|
||||
.data <VERS 0x0025BD25 0x0025BE45 0x0025B8A5 0x0025BC55 0x0025BFD5 0x0025BD45 0x0025BE75>
|
||||
.data 0x00000004
|
||||
.data 0x00FFFF00
|
||||
|
||||
.data <VERS 0x005427A0 0x00542040 0x0053D788 0x0053DE00 0x00545320 0x005427A0 0x00542B40>
|
||||
.data 0x00000060
|
||||
.data 0x3F800000
|
||||
.data 0x3F800000
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
.data 0x3F800000
|
||||
.data 0x3F800000
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
.data 0x3F800000
|
||||
.data 0x3F800000
|
||||
.data 0x3F800000
|
||||
.data 0x00000000
|
||||
.data 0x3F800000
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
.data 0x3F800000
|
||||
.data 0x3F800000
|
||||
.data 0x3ECCCCCD
|
||||
.data 0x3DCCCCCD
|
||||
.data 0x3DCCCCCD
|
||||
.data 0x3F800000
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
|
||||
|
||||
|
||||
.all_versions
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -1,52 +0,0 @@
|
||||
.meta hide_from_patches_menu
|
||||
.meta name="CreateObject"
|
||||
.meta description=""
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
mflr r0
|
||||
b get_data
|
||||
get_data_ret:
|
||||
mflr r3
|
||||
mtlr r0
|
||||
lwz r0, [r3]
|
||||
mtctr r0
|
||||
addi r3, r3, 4
|
||||
bctr
|
||||
|
||||
get_data:
|
||||
bl get_data_ret
|
||||
.data 0x8020C158 # construct_dat_object_from_args
|
||||
base_type_high:
|
||||
.data 0xFFFF0000 # base_type, set_flags
|
||||
floor_low:
|
||||
.data 0x0000FFFF # index, floor
|
||||
.data 0x00000000 # entity_id, group
|
||||
.data 0x00000000 # room, unknown_a3
|
||||
pos_x:
|
||||
.float 0.0 # pos.x
|
||||
pos_y:
|
||||
.float 0.0 # pos.y
|
||||
pos_z:
|
||||
.float 0.0 # pos.z
|
||||
angle_x:
|
||||
.data 0x00000000 # angle.x
|
||||
angle_y:
|
||||
.data 0x00000000 # angle.y
|
||||
angle_z:
|
||||
.data 0x00000000 # angle.z
|
||||
param1:
|
||||
.float 0.0 # param1
|
||||
param2:
|
||||
.float 0.0 # param2
|
||||
param3:
|
||||
.float 0.0 # param3
|
||||
param4:
|
||||
.data 0 # param4
|
||||
param5:
|
||||
.data 0 # param5
|
||||
param6:
|
||||
.data 0 # param6
|
||||
.data 0 # unused_obj_ptr
|
||||
+3
-2
@@ -1,7 +1,8 @@
|
||||
.meta hide_from_patches_menu
|
||||
.meta name="CreateObject"
|
||||
.meta description=""
|
||||
|
||||
.versions 3OE1 3SE0
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
@@ -18,7 +19,7 @@ get_data_ret:
|
||||
|
||||
get_data:
|
||||
bl get_data_ret
|
||||
.data 0x80056D6C # construct_dat_object_from_args
|
||||
.data <VERS 0x8020C158 0x80056D6C> # construct_dat_object_from_args
|
||||
base_type_high:
|
||||
.data 0xFFFF0000 # base_type, set_flags
|
||||
floor_low:
|
||||
+3
-2
@@ -1,12 +1,13 @@
|
||||
.meta hide_from_patches_menu
|
||||
.meta name="Player flags"
|
||||
.meta description=""
|
||||
|
||||
.versions 3OE1
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksGC
|
||||
.include WriteCodeBlocks
|
||||
|
||||
.label check_controller_button, 0x801A6C68 # [std](ControllerState* st, uint32_t flags) -> bool
|
||||
.label TFogCtrl_change_fog, 0x800FB10C # [std](TFogCtrl* this, uint32_t fog_num, uint32_t instant_transition) -> void
|
||||
+2
-1
@@ -1,8 +1,9 @@
|
||||
.meta hide_from_patches_menu
|
||||
.meta name="MovementDebug"
|
||||
.meta description=""
|
||||
.meta show_return_value
|
||||
|
||||
.versions 3OE1
|
||||
|
||||
# Usage examples:
|
||||
# Read movement data 09 fparam1:
|
||||
# $patch MovementDebug e=0x09 f=1 r=1
|
||||
+3
-2
@@ -1,12 +1,13 @@
|
||||
.meta hide_from_patches_menu
|
||||
.meta name="Player flags"
|
||||
.meta description=""
|
||||
|
||||
.versions 3OE1
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksGC
|
||||
.include WriteCodeBlocks
|
||||
|
||||
.label TObjPlayer_for_client_id, 0x801BA59C # [std](uint32_t client_id)
|
||||
.label render_debug_printf, 0x803D4E3C # [std](uint32_t coords, const char* fmt, ...);
|
||||
+61
-5
@@ -1,17 +1,69 @@
|
||||
.meta name="Decoction"
|
||||
.meta description="Makes the Decoction\nitem reset your\nmaterial usage"
|
||||
# Original code by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
# Xbox port by fuzziqersoftware
|
||||
|
||||
.versions 4OJB 4OJD 4OJU 4OED 4OEU 4OPD 4OPU
|
||||
.meta visibility="all"
|
||||
.meta name="Decoction"
|
||||
.meta description="Makes the Decoction\nitem reset your\nmaterial usage"
|
||||
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksXB
|
||||
.include WriteCodeBlocks
|
||||
|
||||
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x80350740 0x80351B44 0x803530A0 0x80352E54 0x803515F4 0x80351638 0x80353220 0x80352614>
|
||||
.data 0x00000098
|
||||
.address <VERS 0x80350740 0x80351B44 0x803530A0 0x80352E54 0x803515F4 0x80351638 0x80353220 0x80352614>
|
||||
lbz r0, [r3 + 0xEE]
|
||||
cmplwi r0, 11
|
||||
bne +0x144
|
||||
lwz r31, [r3 + 0xF0]
|
||||
li r0, 0
|
||||
nop
|
||||
li r4, 0x0374
|
||||
li r5, 0x0D38
|
||||
bl +0x58
|
||||
li r5, 0x0D3A
|
||||
bl +0x50
|
||||
li r5, 0x0D3C
|
||||
bl +0x48
|
||||
li r5, 0x0D40
|
||||
bl +0x40
|
||||
li r5, 0x0D44
|
||||
bl +0x38
|
||||
mr r3, r31
|
||||
.data <VERS 0x4BE656A1 0x4BE646F1 0x4BE654CD 0x4BE634AD 0x4BE64BD9 0x4BE64B95 0x4BE63145 0x4BE6420D>
|
||||
lhz r0, [r31 + 0x032C]
|
||||
lhz r3, [r31 + 0x02B8]
|
||||
cmpl r0, r3
|
||||
ble +0x08
|
||||
sth [r31 + 0x032C], r3
|
||||
lhz r0, [r31 + 0x032E]
|
||||
lhz r3, [r31 + 0x02BA]
|
||||
cmpl r0, r3
|
||||
ble +0x08
|
||||
sth [r31 + 0x032E], r3
|
||||
b +0xD8
|
||||
lbzx r6, [r31 + r4]
|
||||
lhzx r7, [r31 + r5]
|
||||
rlwinm r6, r6, 1, 0, 30
|
||||
subf r7, r6, r7
|
||||
sthx [r31 + r5], r7
|
||||
stbx [r31 + r4], r0
|
||||
addi r4, r4, 0x0001
|
||||
blr
|
||||
|
||||
|
||||
|
||||
.versions 4OJB 4OJD 4OJU 4OED 4OEU 4OPD 4OPU
|
||||
|
||||
.data <VERS 0x00184160 0x00184350 0x00184400 0x00184340 0x00184310 0x00184360 0x001842D0>
|
||||
.deltaof code_start, code_end
|
||||
.address <VERS 0x00184160 0x00184350 0x00184400 0x00184340 0x00184310 0x00184360 0x001842D0>
|
||||
@@ -63,7 +115,11 @@ next_stat:
|
||||
pop esi
|
||||
skip_all:
|
||||
ret
|
||||
|
||||
code_end:
|
||||
|
||||
|
||||
|
||||
.all_versions
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -1,58 +0,0 @@
|
||||
.meta name="Decoction"
|
||||
.meta description="Makes the Decoction\nitem reset your\nmaterial usage"
|
||||
# Original code by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksGC
|
||||
|
||||
.data <VERS 0x80350740 0x80351B44 0x803530A0 0x80352E54 0x803515F4 0x80351638 0x80353220 0x80352614>
|
||||
.data 0x00000098
|
||||
.address <VERS 0x80350740 0x80351B44 0x803530A0 0x80352E54 0x803515F4 0x80351638 0x80353220 0x80352614>
|
||||
lbz r0, [r3 + 0xEE]
|
||||
cmplwi r0, 11
|
||||
bne +0x144
|
||||
lwz r31, [r3 + 0xF0]
|
||||
li r0, 0
|
||||
nop
|
||||
li r4, 0x0374
|
||||
li r5, 0x0D38
|
||||
bl +0x58
|
||||
li r5, 0x0D3A
|
||||
bl +0x50
|
||||
li r5, 0x0D3C
|
||||
bl +0x48
|
||||
li r5, 0x0D40
|
||||
bl +0x40
|
||||
li r5, 0x0D44
|
||||
bl +0x38
|
||||
mr r3, r31
|
||||
.data <VERS 0x4BE656A1 0x4BE646F1 0x4BE654CD 0x4BE634AD 0x4BE64BD9 0x4BE64B95 0x4BE63145 0x4BE6420D>
|
||||
lhz r0, [r31 + 0x032C]
|
||||
lhz r3, [r31 + 0x02B8]
|
||||
cmpl r0, r3
|
||||
ble +0x08
|
||||
sth [r31 + 0x032C], r3
|
||||
lhz r0, [r31 + 0x032E]
|
||||
lhz r3, [r31 + 0x02BA]
|
||||
cmpl r0, r3
|
||||
ble +0x08
|
||||
sth [r31 + 0x032E], r3
|
||||
b +0xD8
|
||||
lbzx r6, [r31 + r4]
|
||||
lhzx r7, [r31 + r5]
|
||||
rlwinm r6, r6, 1, 0, 30
|
||||
subf r7, r6, r7
|
||||
sthx [r31 + r5], r7
|
||||
stbx [r31 + r4], r0
|
||||
addi r4, r4, 0x0001
|
||||
blr
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -0,0 +1,47 @@
|
||||
.meta visibility="all"
|
||||
.meta name="Disable idle DC"
|
||||
.meta description="Disables the idle\ndisconnect timeout"
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocks
|
||||
|
||||
|
||||
|
||||
.versions 1OJ3 1OJ4 1OJF 1OEF 1OPF 2OJ4 2OJ5 2OJF 2OEF 2OPF
|
||||
.align 4
|
||||
.data <VERS 0x8C01A454 0x8C01A6D0 0x8C01A414 0x8C01A6C8 0x8C01A6DC 0x8C01B6A4 0x8C01B6A4 0x8C01B684 0x8C01B6A4 0x8C01B6A8>
|
||||
.data 0x00000002
|
||||
mov r0, 0
|
||||
.align 4
|
||||
|
||||
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0 3SJT 3SJ0 3SE0 3SP0
|
||||
.data <VERS 0x80134D3C 0x80134FA0 0x80135108 0x80135040 0x80134FE0 0x80134FE0 0x80135050 0x801352D0 0x80092C78 0x8009242C 0x80092380 0x80092588>
|
||||
.data 0x00000004
|
||||
li r3, 0
|
||||
|
||||
|
||||
|
||||
.versions 4OJB 4OJD 4OJU 4OED 4OEU 4OPD 4OPU
|
||||
.data <VERS 0x002C0AEE 0x002C167E 0x002C2BEE 0x002C272E 0x002C291E 0x002C275E 0x002C2A7E>
|
||||
.data 0x00000004
|
||||
xor ecx, ecx
|
||||
jmp +3
|
||||
|
||||
|
||||
|
||||
.versions 59NJ 59NL
|
||||
.data <VERS 0x007A1233 0x007A03F7>
|
||||
.data 0x00000005
|
||||
mov eax, 0
|
||||
|
||||
|
||||
|
||||
.all_versions
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -1,19 +0,0 @@
|
||||
.meta name="Disable idle DC"
|
||||
.meta description="Disables the idle\ndisconnect timeout"
|
||||
|
||||
.versions 1OJ3 1OJ4 1OJF 1OEF 1OPF 2OJ4 2OJ5 2OJF 2OEF 2OPF
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksDC
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C01A454 0x8C01A6D0 0x8C01A414 0x8C01A6C8 0x8C01A6DC 0x8C01B6A4 0x8C01B6A4 0x8C01B684 0x8C01B6A4 0x8C01B6A8>
|
||||
.data 0x00000002
|
||||
mov r0, 0
|
||||
|
||||
.align 4
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -1,17 +0,0 @@
|
||||
.meta name="Disable idle DC"
|
||||
.meta description="Disables the idle\ndisconnect timeout"
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0 3SJT 3SJ0 3SE0 3SP0
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksGC
|
||||
|
||||
.data <VERS 0x80134D3C 0x80134FA0 0x80135108 0x80135040 0x80134FE0 0x80134FE0 0x80135050 0x801352D0 0x80092C78 0x8009242C 0x80092380 0x80092588>
|
||||
.data 0x00000004
|
||||
li r3, 0
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -1,18 +0,0 @@
|
||||
.meta name="Disable idle DC"
|
||||
.meta description="Disables the idle\ndisconnect timeout"
|
||||
|
||||
.versions 4OJB 4OJD 4OJU 4OED 4OEU 4OPD 4OPU
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksXB
|
||||
|
||||
.data <VERS 0x002C0AEE 0x002C167E 0x002C2BEE 0x002C272E 0x002C291E 0x002C275E 0x002C2A7E>
|
||||
.data 0x00000004
|
||||
xor ecx, ecx
|
||||
jmp +3
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -1,17 +0,0 @@
|
||||
.meta name="Disable idle DC"
|
||||
.meta description="Disables the idle\ndisconnect timeout"
|
||||
|
||||
.versions 59NJ 59NL
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksBB
|
||||
|
||||
.data <VERS 0x007A1233 0x007A03F7>
|
||||
.data 0x00000005
|
||||
mov eax, 0
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -0,0 +1,367 @@
|
||||
# Original code by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
# Xbox port by fuzziqersoftware
|
||||
|
||||
# BB notes:
|
||||
# Currently beta quality, map objects that fade like boxes, and Pioneer's background billboards and elevators still
|
||||
# have regular draw distance.
|
||||
# TODO: 90% of stuff is included, bring home the last 10%.
|
||||
|
||||
.meta visibility="all"
|
||||
.meta name="Draw Distance"
|
||||
.meta description="Extends the draw\ndistance of many\nobjects"
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
|
||||
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
start:
|
||||
.include WriteCodeBlocks
|
||||
|
||||
.data 0x8000DFA0
|
||||
.deltaof hook_start, hook_end
|
||||
.address 0x8000DFA0
|
||||
hook_start:
|
||||
hook1:
|
||||
lfs f30, [r2 - <VERS 0x3E08 0x3E08 0x3E08 0x3E08 0x3E00 0x3E00 0x3E00 0x3E00>]
|
||||
fmuls f30, f30, f1
|
||||
blr
|
||||
hook2:
|
||||
lfs f2, [r2 - <VERS 0x3E08 0x3E08 0x3E08 0x3E08 0x3E00 0x3E00 0x3E00 0x3E00>]
|
||||
lfs f0, [r30 + 0x001C]
|
||||
fmuls f0, f0, f2
|
||||
blr
|
||||
hook3:
|
||||
lfs f28, [r2 - <VERS 0x3E08 0x3E08 0x3E08 0x3E08 0x3E00 0x3E00 0x3E00 0x3E00>]
|
||||
fmuls f28, f28, f2
|
||||
blr
|
||||
hook4:
|
||||
lfs f0, [r2 - <VERS 0x3E08 0x3E08 0x3E08 0x3E08 0x3E00 0x3E00 0x3E00 0x3E00>]
|
||||
lfs f1, [r3 + 0x000C]
|
||||
fmuls f0, f0, f1
|
||||
stfs [r3 + 0x000C], f0
|
||||
lis r3, <VERS 0x804C 0x804C 0x804D 0x804D 0x804C 0x804C 0x804D 0x804D>
|
||||
blr
|
||||
hook_end:
|
||||
|
||||
.data <VERS 0x801008E8 0x80100AD0 0x80100B74 0x80100A50 0x80100B8C 0x80100B8C 0x80100A60 0x80100C50>
|
||||
.data 0x00000004
|
||||
.address <VERS 0x801008E8 0x80100AD0 0x80100B74 0x80100A50 0x80100B8C 0x80100B8C 0x80100A60 0x80100C50>
|
||||
bl hook1
|
||||
|
||||
.data <VERS 0x8015671C 0x80156AD0 0x80156C34 0x80156B94 0x80156AD8 0x80156AD8 0x80156BF8 0x801570BC>
|
||||
.data 0x00000004
|
||||
.address <VERS 0x8015671C 0x80156AD0 0x80156C34 0x80156B94 0x80156AD8 0x80156AD8 0x80156BF8 0x801570BC>
|
||||
bl hook2
|
||||
|
||||
.data <VERS 0x801A1C64 0x801A203C 0x801A21A0 0x801A2100 0x801A2040 0x801A2040 0x801A2164 0x801A2628>
|
||||
.data 0x00000004
|
||||
.address <VERS 0x801A1C64 0x801A203C 0x801A21A0 0x801A2100 0x801A2040 0x801A2040 0x801A2164 0x801A2628>
|
||||
bl hook3
|
||||
|
||||
.data <VERS 0x801A1E64 0x801A223C 0x801A23A0 0x801A2300 0x801A2240 0x801A2240 0x801A2364 0x801A2828>
|
||||
.data 0x00000004
|
||||
.address <VERS 0x801A1E64 0x801A223C 0x801A23A0 0x801A2300 0x801A2240 0x801A2240 0x801A2364 0x801A2828>
|
||||
bl hook1
|
||||
|
||||
.data <VERS 0x80205044 0x802058B8 0x80206640 0x802063F4 0x80205840 0x80205840 0x80206728 0x80206124>
|
||||
.data 0x00000004
|
||||
.address <VERS 0x80205044 0x802058B8 0x80206640 0x802063F4 0x80205840 0x80205840 0x80206728 0x80206124>
|
||||
bl hook4
|
||||
|
||||
.data <VERS 0x802057E8 0x8020605C 0x80206DE4 0x80206B98 0x80205FE4 0x80205FE4 0x80206ECC 0x802068C8>
|
||||
.data 0x00000004
|
||||
.address <VERS 0x802057E8 0x8020605C 0x80206DE4 0x80206B98 0x80205FE4 0x80205FE4 0x80206ECC 0x802068C8>
|
||||
bl hook4
|
||||
|
||||
.data <VERS 0x805C83A8 0x805D29A8 0x805D9E48 0x805D9BE8 0x805C8CB0 0x805CFCD0 0x805D94F0 0x805D5730>
|
||||
.data 0x00000004
|
||||
.float 90000
|
||||
|
||||
.data <VERS 0x805C9254 0x805D3854 0x805DACF4 0x805DAA94 0x805C9B5C 0x805D0B7C 0x805DA39C 0x805D65DC>
|
||||
.data 0x00000004
|
||||
.float 62500
|
||||
|
||||
.data <VERS 0x805C987C 0x805D3E7C 0x805DB31C 0x805DB0BC 0x805CA184 0x805D11A4 0x805DA9C4 0x805D6C04>
|
||||
.data 0x00000004
|
||||
.float 640000
|
||||
|
||||
.data <VERS 0x805CA708 0x805D4D08 0x805DC1A8 0x805DBF48 0x805CB010 0x805D2030 0x805DB850 0x805D7A90>
|
||||
.data 0x00000004
|
||||
.float 90000
|
||||
|
||||
.data <VERS 0x805CAC98 0x805D5298 0x805DC738 0x805DC4D8 0x805CB5A0 0x805D25C0 0x805DBDE0 0x805D8020>
|
||||
.data 0x00000004
|
||||
.float 1400
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
|
||||
|
||||
|
||||
.versions 4OED 4OEU 4OJB 4OJD 4OJU 4OPD 4OPU
|
||||
|
||||
start:
|
||||
.include WriteCodeBlocks
|
||||
|
||||
.data <VERS 0x001737C2 0x001737D2 0x00173692 0x00173782 0x00173862 0x001737E2 0x00173792> # From 3OE1:80100B8C
|
||||
.deltaof p1_1s, p1_1e
|
||||
.address <VERS 0x001737C2 0x001737D2 0x00173692 0x00173782 0x00173862 0x001737E2 0x00173792> # From 3OE1:80100B8C
|
||||
p1_1s:
|
||||
call p1_2s
|
||||
nop
|
||||
p1_1e:
|
||||
.data <VERS 0x00173A42 0x00173A52 0x00173912 0x00173A02 0x00173AE2 0x00173A62 0x00173A12>
|
||||
.deltaof p1_2s, p1_2e
|
||||
.address <VERS 0x00173A42 0x00173A52 0x00173912 0x00173A02 0x00173AE2 0x00173A62 0x00173A12>
|
||||
p1_2s:
|
||||
fld st0, dword [esp + 0x1C]
|
||||
fadd st0, st0
|
||||
fchs st0
|
||||
ret
|
||||
p1_2e:
|
||||
|
||||
.data <VERS 0x001A3DEF 0x001A3EEF 0x001A3BBF 0x001A3DBF 0x001A3FDF 0x001A3E0F 0x001A3ECF> # From 3OE1:80156AD8
|
||||
.deltaof p2_1s, p2_1e
|
||||
.address <VERS 0x001A3DEF 0x001A3EEF 0x001A3BBF 0x001A3DBF 0x001A3FDF 0x001A3E0F 0x001A3ECF> # From 3OE1:80156AD8
|
||||
p2_1s:
|
||||
call p2_2s
|
||||
p2_1e:
|
||||
.data <VERS 0x001A3E38 0x001A3F38 0x001A3C08 0x001A3E08 0x001A4028 0x001A3E58 0x001A3F18>
|
||||
.deltaof p2_2s, p2_2e
|
||||
.address <VERS 0x001A3E38 0x001A3F38 0x001A3C08 0x001A3E08 0x001A4028 0x001A3E58 0x001A3F18>
|
||||
p2_2s:
|
||||
fld st0, dword [ecx + 0x1C]
|
||||
fadd st0, st0
|
||||
fld st0, st1
|
||||
ret
|
||||
p2_2e:
|
||||
|
||||
.data <VERS 0x002D2DC8 0x002D3148 0x002D0E68 0x002D1A28 0x002D32F8 0x002D2DF8 0x002D31C8> # From 3OE1:801A2040
|
||||
.deltaof p3_1s, p3_1e
|
||||
.address <VERS 0x002D2DC8 0x002D3148 0x002D0E68 0x002D1A28 0x002D32F8 0x002D2DF8 0x002D31C8> # From 3OE1:801A2040
|
||||
p3_1s:
|
||||
call p3_2s
|
||||
nop
|
||||
p3_1e:
|
||||
.data <VERS 0x002D2EA7 0x002D3227 0x002D0F47 0x002D1B07 0x002D33D7 0x002D2ED7 0x002D32A7>
|
||||
.deltaof p3_2s, p3_2e
|
||||
.address <VERS 0x002D2EA7 0x002D3227 0x002D0F47 0x002D1B07 0x002D33D7 0x002D2ED7 0x002D32A7>
|
||||
p3_2s:
|
||||
fld st0, dword [esp + 0x24]
|
||||
fadd st0, st0
|
||||
fchs st0
|
||||
ret
|
||||
p3_2e:
|
||||
|
||||
.data <VERS 0x00156AC8 0x002D32A8 0x001569E8 0x00156A78 0x00156AB8 0x00156AE8 0x002D3328> # From 3OE1:801A2240
|
||||
.deltaof p4_1s, p4_1e
|
||||
.address <VERS 0x00156AC8 0x002D32A8 0x001569E8 0x00156A78 0x00156AB8 0x00156AE8 0x002D3328> # From 3OE1:801A2240
|
||||
p4_1s:
|
||||
call p4_2s
|
||||
nop
|
||||
p4_1e:
|
||||
.data <VERS 0x00156C44 0x002D33B4 0x00156B64 0x00156BF4 0x00156C34 0x00156C64 0x002D3434>
|
||||
.deltaof p4_2s, p4_2e
|
||||
.address <VERS 0x00156C44 0x002D33B4 0x00156B64 0x00156BF4 0x00156C34 0x00156C64 0x002D3434>
|
||||
p4_2s:
|
||||
fld st0, dword [esp + 0x28]
|
||||
fadd st0, st0
|
||||
fchs st0
|
||||
ret
|
||||
p4_2e:
|
||||
|
||||
.data <VERS 0x002E2B93 0x002E2E8C 0x002E0C33 0x002E17B3 0x002E2E6C 0x002E2BC3 0x002E2EBC> # From 3OE1:80205840
|
||||
.deltaof p5_1s, p5_1e
|
||||
.address <VERS 0x002E2B93 0x002E2E8C 0x002E0C33 0x002E17B3 0x002E2E6C 0x002E2BC3 0x002E2EBC> # From 3OE1:80205840
|
||||
p5_1s:
|
||||
call p5_3s
|
||||
p5_1e:
|
||||
.data <VERS 0x002E1FD1 0x002E2404 0x002E0071 0x002E0BF1 0x002E23E4 0x002E2001 0x002E2434> # From 3OE1:80205FE4
|
||||
.deltaof p5_2s, p5_2e
|
||||
.address <VERS 0x002E1FD1 0x002E2404 0x002E0071 0x002E0BF1 0x002E23E4 0x002E2001 0x002E2434> # From 3OE1:80205FE4
|
||||
p5_2s:
|
||||
call p5_3s
|
||||
p5_2e:
|
||||
.data <VERS 0x002E2C82 0x002E2FD1 0x002E0D22 0x002E18A2 0x002E2FB1 0x002E2CB2 0x002E3001>
|
||||
.deltaof p5_3s, p5_3e
|
||||
.address <VERS 0x002E2C82 0x002E2FD1 0x002E0D22 0x002E18A2 0x002E2FB1 0x002E2CB2 0x002E3001>
|
||||
p5_3s:
|
||||
fld st0, dword [eax + 0x0C]
|
||||
fadd st0, st0
|
||||
fstp dword [eax + 0x0C], st0
|
||||
mov eax, [<VERS 0x0053A9CC 0x0053A26C 0x00535BAC 0x0053622C 0x0053D54C 0x0053A9CC 0x0053AD6C>]
|
||||
ret
|
||||
p5_3e:
|
||||
|
||||
.data <VERS 0x004920A0 0x00491940 0x0048D4F0 0x0048DC88 0x00494C30 0x004920A8 0x00492440> # From 3OE1:805CFCD0
|
||||
.data 0x00000004
|
||||
.data 0x47AFC800
|
||||
|
||||
.data <VERS 0x0042D0A0 0x0042C940 0x00428DC0 0x00429130 0x0042C940 0x0042D0C0 0x0042D450> # From 3OE1:805D0B7C
|
||||
.data 0x00000004
|
||||
.data 0x437A0000
|
||||
|
||||
.data <VERS 0x0049222C 0x00491ACC 0x0048D67C 0x0048DE14 0x00494DBC 0x00492234 0x004925CC> # From 3OE1:805D11A4
|
||||
.data 0x00000004
|
||||
.data 0x491C4000
|
||||
|
||||
.data <VERS 0x0042B838 0x0042B0D8 0x00427558 0x004278C8 0x0042B0D8 0x0042B858 0x0042BBE8> # From 3OE1:805D2030
|
||||
.data 0x00000004
|
||||
.data 0x47AFC800
|
||||
|
||||
.data <VERS 0x001D9736 0x001D9936 0x001D95F6 0x001D9746 0x001D9BC6 0x001D9756 0x001D98A6> # From 3OE1:805D25C0
|
||||
.data 0x00000004
|
||||
.data 0x44AF0000
|
||||
|
||||
.data <VERS 0x001D9748 0x001D9948 0x001D9608 0x001D9758 0x001D9BD8 0x001D9768 0x001D98B8> # From 3OE1:805D25C0
|
||||
.data 0x00000004
|
||||
.data 0x44AF0000
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
|
||||
|
||||
|
||||
.versions 59NJ 59NL
|
||||
|
||||
write_call_func:
|
||||
.include WriteCallToCode
|
||||
|
||||
start:
|
||||
mov eax, 0x41800000 # Environment clip distance mod 16.0f
|
||||
mov [<VERS 0x0097D198 0x0097F1B8>], eax # This affects mostly static map objects
|
||||
mov [<VERS 0x0097D19C 0x0097F1BC>], eax
|
||||
mov [<VERS 0x0097D1A0 0x0097F1C0>], eax
|
||||
|
||||
mov ax, 0x9090
|
||||
mov [<VERS 0x00689BC7 0x00689B5B>], ax # Players draw distance 10000.0f always
|
||||
mov eax, 0x41000000 # Use newly acquired skipped branch room
|
||||
mov [<VERS 0x00689BD1 0x00689B65>], eax # to store our float multiplier
|
||||
|
||||
call patch_func_1 # Floor items
|
||||
call patch_func_2 # Whole bunch of stuff, including NPCs
|
||||
call patch_func_3 # Duplicate function from above, reuse same hook
|
||||
call patch_func_4 # TODO: Which objects this affects?
|
||||
call patch_func_5 # TODO: This one too?
|
||||
call patch_func_6 # TODO: And this one?
|
||||
ret
|
||||
|
||||
# Floor items
|
||||
patch_func_1:
|
||||
pop ecx
|
||||
push 8
|
||||
push <VERS 0x005C525B 0x005C5267>
|
||||
call get_code_size1
|
||||
.deltaof patch_code1, patch_code_end1
|
||||
get_code_size1:
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call patch_code_end1
|
||||
patch_code1:
|
||||
mov edx, [esp + 0x18]
|
||||
fld st0, dword [<VERS 0x00689BD1 0x00689B65>]
|
||||
fld st0, dword [esp + 0x14]
|
||||
fmulp st1, st0
|
||||
ret
|
||||
patch_code_end1:
|
||||
push ecx
|
||||
jmp write_call_func
|
||||
|
||||
# Whole bunch of stuff, including NPCs
|
||||
patch_func_2:
|
||||
pop ecx
|
||||
push 9
|
||||
push <VERS 0x007BB21E 0x007BA472>
|
||||
call get_code_size2
|
||||
.deltaof patch_code2, patch_code_end2
|
||||
get_code_size2:
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call patch_code_end2
|
||||
patch_code2:
|
||||
test eax, 0x400
|
||||
fld st0, dword [<VERS 0x00689BD1 0x00689B65>]
|
||||
fld st0, dword [esp + 0x2C]
|
||||
fmulp st1, st0
|
||||
ret
|
||||
patch_code_end2:
|
||||
push ecx
|
||||
jmp write_call_func
|
||||
|
||||
# Duplicate function from above, reuse same hook
|
||||
patch_func_3:
|
||||
mov eax, dword [<VERS 0x007BB21F 0x007BA473>]
|
||||
add eax, 0x002A1C74
|
||||
mov dword [<VERS 0x00518843 0x005187FF>], eax
|
||||
mov byte [<VERS 0x00518842 0x005187FE>], 0xE8
|
||||
mov dword [<VERS 0x00518847 0x00518803>], 0x90909090
|
||||
ret
|
||||
|
||||
# TOComputerMachine01
|
||||
patch_func_4:
|
||||
pop ecx
|
||||
push 7
|
||||
push <VERS 0x00616FF4 0x00616FFC>
|
||||
call get_code_size4
|
||||
.deltaof patch_code4, patch_code_end4
|
||||
get_code_size4:
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call patch_code_end4
|
||||
patch_code4:
|
||||
lea edx, [edi + 0x38]
|
||||
fld st0, dword [<VERS 0x00689BD1 0x00689B65>]
|
||||
fld st0, dword [esp + 0x14]
|
||||
fmulp st1, st0
|
||||
ret
|
||||
patch_code_end4:
|
||||
push ecx
|
||||
jmp write_call_func
|
||||
|
||||
# TObjCamera
|
||||
patch_func_5:
|
||||
pop ecx
|
||||
push 6
|
||||
push <VERS 0x006439A8 0x0064394C>
|
||||
call get_code_size5
|
||||
.deltaof patch_code5, patch_code_end5
|
||||
get_code_size5:
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call patch_code_end5
|
||||
patch_code5:
|
||||
fld st0, dword [<VERS 0x00689BD1 0x00689B65>]
|
||||
fld st0, dword [esp + 0x28]
|
||||
fmulp st1, st0
|
||||
fchs st0
|
||||
ret
|
||||
patch_code_end5:
|
||||
push ecx
|
||||
jmp write_call_func
|
||||
|
||||
# TODO: And this one?
|
||||
patch_func_6:
|
||||
pop ecx
|
||||
push 6
|
||||
push <VERS 0x0065B959 0x0065B985>
|
||||
call get_code_size6
|
||||
.deltaof patch_code6, patch_code_end6
|
||||
get_code_size6:
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call patch_code_end6
|
||||
patch_code6:
|
||||
mov ebp, ecx
|
||||
fld st0, dword [<VERS 0x00689BD1 0x00689B65>]
|
||||
fld st0, dword [esp + 0x30]
|
||||
fmulp st1, st0
|
||||
ret
|
||||
patch_code_end6:
|
||||
push ecx
|
||||
jmp write_call_func
|
||||
@@ -1,92 +0,0 @@
|
||||
.meta name="Draw Distance"
|
||||
.meta description="Extends the draw\ndistance of many\nobjects"
|
||||
# Original code by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksGC
|
||||
|
||||
.data 0x8000DFA0
|
||||
.deltaof hook_start, hook_end
|
||||
.address 0x8000DFA0
|
||||
hook_start:
|
||||
hook1:
|
||||
lfs f30, [r2 - <VERS 0x3E08 0x3E08 0x3E08 0x3E08 0x3E00 0x3E00 0x3E00 0x3E00>]
|
||||
fmuls f30, f30, f1
|
||||
blr
|
||||
hook2:
|
||||
lfs f2, [r2 - <VERS 0x3E08 0x3E08 0x3E08 0x3E08 0x3E00 0x3E00 0x3E00 0x3E00>]
|
||||
lfs f0, [r30 + 0x001C]
|
||||
fmuls f0, f0, f2
|
||||
blr
|
||||
hook3:
|
||||
lfs f28, [r2 - <VERS 0x3E08 0x3E08 0x3E08 0x3E08 0x3E00 0x3E00 0x3E00 0x3E00>]
|
||||
fmuls f28, f28, f2
|
||||
blr
|
||||
hook4:
|
||||
lfs f0, [r2 - <VERS 0x3E08 0x3E08 0x3E08 0x3E08 0x3E00 0x3E00 0x3E00 0x3E00>]
|
||||
lfs f1, [r3 + 0x000C]
|
||||
fmuls f0, f0, f1
|
||||
stfs [r3 + 0x000C], f0
|
||||
lis r3, <VERS 0x804C 0x804C 0x804D 0x804D 0x804C 0x804C 0x804D 0x804D>
|
||||
blr
|
||||
hook_end:
|
||||
|
||||
.data <VERS 0x801008E8 0x80100AD0 0x80100B74 0x80100A50 0x80100B8C 0x80100B8C 0x80100A60 0x80100C50>
|
||||
.data 0x00000004
|
||||
.address <VERS 0x801008E8 0x80100AD0 0x80100B74 0x80100A50 0x80100B8C 0x80100B8C 0x80100A60 0x80100C50>
|
||||
bl hook1
|
||||
|
||||
.data <VERS 0x8015671C 0x80156AD0 0x80156C34 0x80156B94 0x80156AD8 0x80156AD8 0x80156BF8 0x801570BC>
|
||||
.data 0x00000004
|
||||
.address <VERS 0x8015671C 0x80156AD0 0x80156C34 0x80156B94 0x80156AD8 0x80156AD8 0x80156BF8 0x801570BC>
|
||||
bl hook2
|
||||
|
||||
.data <VERS 0x801A1C64 0x801A203C 0x801A21A0 0x801A2100 0x801A2040 0x801A2040 0x801A2164 0x801A2628>
|
||||
.data 0x00000004
|
||||
.address <VERS 0x801A1C64 0x801A203C 0x801A21A0 0x801A2100 0x801A2040 0x801A2040 0x801A2164 0x801A2628>
|
||||
bl hook3
|
||||
|
||||
.data <VERS 0x801A1E64 0x801A223C 0x801A23A0 0x801A2300 0x801A2240 0x801A2240 0x801A2364 0x801A2828>
|
||||
.data 0x00000004
|
||||
.address <VERS 0x801A1E64 0x801A223C 0x801A23A0 0x801A2300 0x801A2240 0x801A2240 0x801A2364 0x801A2828>
|
||||
bl hook1
|
||||
|
||||
.data <VERS 0x80205044 0x802058B8 0x80206640 0x802063F4 0x80205840 0x80205840 0x80206728 0x80206124>
|
||||
.data 0x00000004
|
||||
.address <VERS 0x80205044 0x802058B8 0x80206640 0x802063F4 0x80205840 0x80205840 0x80206728 0x80206124>
|
||||
bl hook4
|
||||
|
||||
.data <VERS 0x802057E8 0x8020605C 0x80206DE4 0x80206B98 0x80205FE4 0x80205FE4 0x80206ECC 0x802068C8>
|
||||
.data 0x00000004
|
||||
.address <VERS 0x802057E8 0x8020605C 0x80206DE4 0x80206B98 0x80205FE4 0x80205FE4 0x80206ECC 0x802068C8>
|
||||
bl hook4
|
||||
|
||||
.data <VERS 0x805C83A8 0x805D29A8 0x805D9E48 0x805D9BE8 0x805C8CB0 0x805CFCD0 0x805D94F0 0x805D5730>
|
||||
.data 0x00000004
|
||||
.float 90000
|
||||
|
||||
.data <VERS 0x805C9254 0x805D3854 0x805DACF4 0x805DAA94 0x805C9B5C 0x805D0B7C 0x805DA39C 0x805D65DC>
|
||||
.data 0x00000004
|
||||
.float 62500
|
||||
|
||||
.data <VERS 0x805C987C 0x805D3E7C 0x805DB31C 0x805DB0BC 0x805CA184 0x805D11A4 0x805DA9C4 0x805D6C04>
|
||||
.data 0x00000004
|
||||
.float 640000
|
||||
|
||||
.data <VERS 0x805CA708 0x805D4D08 0x805DC1A8 0x805DBF48 0x805CB010 0x805D2030 0x805DB850 0x805D7A90>
|
||||
.data 0x00000004
|
||||
.float 90000
|
||||
|
||||
.data <VERS 0x805CAC98 0x805D5298 0x805DC738 0x805DC4D8 0x805CB5A0 0x805D25C0 0x805DBDE0 0x805D8020>
|
||||
.data 0x00000004
|
||||
.float 1400
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -1,131 +0,0 @@
|
||||
.meta name="Draw Distance"
|
||||
.meta description="Extends the draw\ndistance of many\nobjects"
|
||||
# Original code by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
# Xbox port by fuzziqersoftware
|
||||
|
||||
.versions 4OED 4OEU 4OJB 4OJD 4OJU 4OPD 4OPU
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksXB
|
||||
|
||||
.data <VERS 0x001737C2 0x001737D2 0x00173692 0x00173782 0x00173862 0x001737E2 0x00173792> # From 3OE1:80100B8C
|
||||
.deltaof p1_1s, p1_1e
|
||||
.address <VERS 0x001737C2 0x001737D2 0x00173692 0x00173782 0x00173862 0x001737E2 0x00173792> # From 3OE1:80100B8C
|
||||
p1_1s:
|
||||
call p1_2s
|
||||
nop
|
||||
p1_1e:
|
||||
.data <VERS 0x00173A42 0x00173A52 0x00173912 0x00173A02 0x00173AE2 0x00173A62 0x00173A12>
|
||||
.deltaof p1_2s, p1_2e
|
||||
.address <VERS 0x00173A42 0x00173A52 0x00173912 0x00173A02 0x00173AE2 0x00173A62 0x00173A12>
|
||||
p1_2s:
|
||||
fld st0, dword [esp + 0x1C]
|
||||
fadd st0, st0
|
||||
fchs st0
|
||||
ret
|
||||
p1_2e:
|
||||
|
||||
.data <VERS 0x001A3DEF 0x001A3EEF 0x001A3BBF 0x001A3DBF 0x001A3FDF 0x001A3E0F 0x001A3ECF> # From 3OE1:80156AD8
|
||||
.deltaof p2_1s, p2_1e
|
||||
.address <VERS 0x001A3DEF 0x001A3EEF 0x001A3BBF 0x001A3DBF 0x001A3FDF 0x001A3E0F 0x001A3ECF> # From 3OE1:80156AD8
|
||||
p2_1s:
|
||||
call p2_2s
|
||||
p2_1e:
|
||||
.data <VERS 0x001A3E38 0x001A3F38 0x001A3C08 0x001A3E08 0x001A4028 0x001A3E58 0x001A3F18>
|
||||
.deltaof p2_2s, p2_2e
|
||||
.address <VERS 0x001A3E38 0x001A3F38 0x001A3C08 0x001A3E08 0x001A4028 0x001A3E58 0x001A3F18>
|
||||
p2_2s:
|
||||
fld st0, dword [ecx + 0x1C]
|
||||
fadd st0, st0
|
||||
fld st0, st1
|
||||
ret
|
||||
p2_2e:
|
||||
|
||||
.data <VERS 0x002D2DC8 0x002D3148 0x002D0E68 0x002D1A28 0x002D32F8 0x002D2DF8 0x002D31C8> # From 3OE1:801A2040
|
||||
.deltaof p3_1s, p3_1e
|
||||
.address <VERS 0x002D2DC8 0x002D3148 0x002D0E68 0x002D1A28 0x002D32F8 0x002D2DF8 0x002D31C8> # From 3OE1:801A2040
|
||||
p3_1s:
|
||||
call p3_2s
|
||||
nop
|
||||
p3_1e:
|
||||
.data <VERS 0x002D2EA7 0x002D3227 0x002D0F47 0x002D1B07 0x002D33D7 0x002D2ED7 0x002D32A7>
|
||||
.deltaof p3_2s, p3_2e
|
||||
.address <VERS 0x002D2EA7 0x002D3227 0x002D0F47 0x002D1B07 0x002D33D7 0x002D2ED7 0x002D32A7>
|
||||
p3_2s:
|
||||
fld st0, dword [esp + 0x24]
|
||||
fadd st0, st0
|
||||
fchs st0
|
||||
ret
|
||||
p3_2e:
|
||||
|
||||
.data <VERS 0x00156AC8 0x002D32A8 0x001569E8 0x00156A78 0x00156AB8 0x00156AE8 0x002D3328> # From 3OE1:801A2240
|
||||
.deltaof p4_1s, p4_1e
|
||||
.address <VERS 0x00156AC8 0x002D32A8 0x001569E8 0x00156A78 0x00156AB8 0x00156AE8 0x002D3328> # From 3OE1:801A2240
|
||||
p4_1s:
|
||||
call p4_2s
|
||||
nop
|
||||
p4_1e:
|
||||
.data <VERS 0x00156C44 0x002D33B4 0x00156B64 0x00156BF4 0x00156C34 0x00156C64 0x002D3434>
|
||||
.deltaof p4_2s, p4_2e
|
||||
.address <VERS 0x00156C44 0x002D33B4 0x00156B64 0x00156BF4 0x00156C34 0x00156C64 0x002D3434>
|
||||
p4_2s:
|
||||
fld st0, dword [esp + 0x28]
|
||||
fadd st0, st0
|
||||
fchs st0
|
||||
ret
|
||||
p4_2e:
|
||||
|
||||
.data <VERS 0x002E2B93 0x002E2E8C 0x002E0C33 0x002E17B3 0x002E2E6C 0x002E2BC3 0x002E2EBC> # From 3OE1:80205840
|
||||
.deltaof p5_1s, p5_1e
|
||||
.address <VERS 0x002E2B93 0x002E2E8C 0x002E0C33 0x002E17B3 0x002E2E6C 0x002E2BC3 0x002E2EBC> # From 3OE1:80205840
|
||||
p5_1s:
|
||||
call p5_3s
|
||||
p5_1e:
|
||||
.data <VERS 0x002E1FD1 0x002E2404 0x002E0071 0x002E0BF1 0x002E23E4 0x002E2001 0x002E2434> # From 3OE1:80205FE4
|
||||
.deltaof p5_2s, p5_2e
|
||||
.address <VERS 0x002E1FD1 0x002E2404 0x002E0071 0x002E0BF1 0x002E23E4 0x002E2001 0x002E2434> # From 3OE1:80205FE4
|
||||
p5_2s:
|
||||
call p5_3s
|
||||
p5_2e:
|
||||
.data <VERS 0x002E2C82 0x002E2FD1 0x002E0D22 0x002E18A2 0x002E2FB1 0x002E2CB2 0x002E3001>
|
||||
.deltaof p5_3s, p5_3e
|
||||
.address <VERS 0x002E2C82 0x002E2FD1 0x002E0D22 0x002E18A2 0x002E2FB1 0x002E2CB2 0x002E3001>
|
||||
p5_3s:
|
||||
fld st0, dword [eax + 0x0C]
|
||||
fadd st0, st0
|
||||
fstp dword [eax + 0x0C], st0
|
||||
mov eax, [<VERS 0x0053A9CC 0x0053A26C 0x00535BAC 0x0053622C 0x0053D54C 0x0053A9CC 0x0053AD6C>]
|
||||
ret
|
||||
p5_3e:
|
||||
|
||||
.data <VERS 0x004920A0 0x00491940 0x0048D4F0 0x0048DC88 0x00494C30 0x004920A8 0x00492440> # From 3OE1:805CFCD0
|
||||
.data 0x00000004
|
||||
.data 0x47AFC800
|
||||
|
||||
.data <VERS 0x0042D0A0 0x0042C940 0x00428DC0 0x00429130 0x0042C940 0x0042D0C0 0x0042D450> # From 3OE1:805D0B7C
|
||||
.data 0x00000004
|
||||
.data 0x437A0000
|
||||
|
||||
.data <VERS 0x0049222C 0x00491ACC 0x0048D67C 0x0048DE14 0x00494DBC 0x00492234 0x004925CC> # From 3OE1:805D11A4
|
||||
.data 0x00000004
|
||||
.data 0x491C4000
|
||||
|
||||
.data <VERS 0x0042B838 0x0042B0D8 0x00427558 0x004278C8 0x0042B0D8 0x0042B858 0x0042BBE8> # From 3OE1:805D2030
|
||||
.data 0x00000004
|
||||
.data 0x47AFC800
|
||||
|
||||
.data <VERS 0x001D9736 0x001D9936 0x001D95F6 0x001D9746 0x001D9BC6 0x001D9756 0x001D98A6> # From 3OE1:805D25C0
|
||||
.data 0x00000004
|
||||
.data 0x44AF0000
|
||||
|
||||
.data <VERS 0x001D9748 0x001D9948 0x001D9608 0x001D9758 0x001D9BD8 0x001D9768 0x001D98B8> # From 3OE1:805D25C0
|
||||
.data 0x00000004
|
||||
.data 0x44AF0000
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -1,146 +0,0 @@
|
||||
# Currently beta quality, map objects that fade like boxes, and Pioneer's
|
||||
# background billboards and elevators still have regular draw distance.
|
||||
# TODO: 90% of stuff is included, bring home the last 10%.
|
||||
|
||||
.meta name="Draw Distance"
|
||||
.meta description="Extends the draw\ndistance of many\nobjects"
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
|
||||
write_call_func:
|
||||
.include WriteCallToCode-59NJ
|
||||
|
||||
start:
|
||||
mov eax, 0x41800000 # Environment clip distance mod 16.0f
|
||||
mov [0x0097D198], eax # This affects mostly static map objects
|
||||
mov [0x0097D19C], eax
|
||||
mov [0x00097D1A0], eax
|
||||
|
||||
mov ax, 0x9090
|
||||
mov [0x00689BC7], ax # Players draw distance 10000.0f always
|
||||
mov eax, 0x41000000 # Use newly acquired skipped branch room
|
||||
mov [0x00689BD1], eax # to store our float multiplier
|
||||
|
||||
call patch_func_1 # Floor items
|
||||
call patch_func_2 # Whole bunch of stuff, including NPCs
|
||||
call patch_func_3 # Duplicate function from above, reuse same hook
|
||||
call patch_func_4 # TODO: Which objects this affects?
|
||||
call patch_func_5 # TODO: This one too?
|
||||
call patch_func_6 # TODO: And this one?
|
||||
ret
|
||||
|
||||
# Floor items
|
||||
patch_func_1:
|
||||
pop ecx
|
||||
push 8
|
||||
push 0x005C525B
|
||||
call get_code_size1
|
||||
.deltaof patch_code1, patch_code_end1
|
||||
get_code_size1:
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call patch_code_end1
|
||||
patch_code1:
|
||||
mov edx, [esp + 0x18]
|
||||
fld st0, dword [0x00689BD1]
|
||||
fld st0, dword [esp + 0x14]
|
||||
fmulp st1, st0
|
||||
ret
|
||||
patch_code_end1:
|
||||
push ecx
|
||||
jmp write_call_func
|
||||
|
||||
# Whole bunch of stuff, including NPCs
|
||||
patch_func_2:
|
||||
pop ecx
|
||||
push 9
|
||||
push 0x007BB21E
|
||||
call get_code_size2
|
||||
.deltaof patch_code2, patch_code_end2
|
||||
get_code_size2:
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call patch_code_end2
|
||||
patch_code2:
|
||||
test eax, 0x400
|
||||
fld st0, dword [0x00689BD1]
|
||||
fld st0, dword [esp + 0x2C]
|
||||
fmulp st1, st0
|
||||
ret
|
||||
patch_code_end2:
|
||||
push ecx
|
||||
jmp write_call_func
|
||||
|
||||
# Duplicate function from above, reuse same hook
|
||||
patch_func_3:
|
||||
mov eax, dword [0x007BB21F]
|
||||
add eax, 0x002A1C74
|
||||
mov dword [0x00518843], eax
|
||||
mov byte [0x00518842], 0xE8
|
||||
mov dword [0x00518847], 0x90909090
|
||||
ret
|
||||
|
||||
# TOComputerMachine01
|
||||
patch_func_4:
|
||||
pop ecx
|
||||
push 7
|
||||
push 0x00616FF4
|
||||
call get_code_size4
|
||||
.deltaof patch_code4, patch_code_end4
|
||||
get_code_size4:
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call patch_code_end4
|
||||
patch_code4:
|
||||
lea edx, [edi + 0x38]
|
||||
fld st0, dword [0x00689BD1]
|
||||
fld st0, dword [esp + 0x14]
|
||||
fmulp st1, st0
|
||||
ret
|
||||
patch_code_end4:
|
||||
push ecx
|
||||
jmp write_call_func
|
||||
|
||||
# TObjCamera
|
||||
patch_func_5:
|
||||
pop ecx
|
||||
push 6
|
||||
push 0x006439A8
|
||||
call get_code_size5
|
||||
.deltaof patch_code5, patch_code_end5
|
||||
get_code_size5:
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call patch_code_end5
|
||||
patch_code5:
|
||||
fld st0, dword [0x00689BD1]
|
||||
fld st0, dword [esp + 0x28]
|
||||
fmulp st1, st0
|
||||
fchs st0
|
||||
ret
|
||||
patch_code_end5:
|
||||
push ecx
|
||||
jmp write_call_func
|
||||
|
||||
# TODO: And this one?
|
||||
patch_func_6:
|
||||
pop ecx
|
||||
push 6
|
||||
push 0x0065B959
|
||||
call get_code_size6
|
||||
.deltaof patch_code6, patch_code_end6
|
||||
get_code_size6:
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call patch_code_end6
|
||||
patch_code6:
|
||||
mov ebp, ecx
|
||||
fld st0, dword [0x00689BD1]
|
||||
fld st0, dword [esp + 0x30]
|
||||
fmulp st1, st0
|
||||
ret
|
||||
patch_code_end6:
|
||||
push ecx
|
||||
jmp write_call_func
|
||||
@@ -1,146 +0,0 @@
|
||||
# Currently beta quality, map objects that fade like boxes, and Pioneer's
|
||||
# background billboards and elevators still have regular draw distance.
|
||||
# TODO: 90% of stuff is included, bring home the last 10%.
|
||||
|
||||
.meta name="Draw Distance"
|
||||
.meta description="Extends the draw\ndistance of many\nobjects"
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
|
||||
write_call_func:
|
||||
.include WriteCallToCode-59NL
|
||||
|
||||
start:
|
||||
mov eax, 0x41800000 # Environment clip distance mod 16.0f
|
||||
mov [0x0097F1B8], eax # This affects mostly static map objects
|
||||
mov [0x0097F1BC], eax
|
||||
mov [0x0097F1C0], eax
|
||||
|
||||
mov ax, 0x9090
|
||||
mov [0x00689B5B], ax # Players draw distance 10000.0f always
|
||||
mov eax, 0x41000000 # Use newly acquired skipped branch room
|
||||
mov [0x00689B65], eax # to store our float multiplier
|
||||
|
||||
call patch_func_1 # Floor items
|
||||
call patch_func_2 # Whole bunch of stuff, including NPCs
|
||||
call patch_func_3 # Duplicate function from above, reuse same hook
|
||||
call patch_func_4 # TODO: Which objects this affects?
|
||||
call patch_func_5 # TODO: This one too?
|
||||
call patch_func_6 # TODO: And this one?
|
||||
ret
|
||||
|
||||
# Floor items
|
||||
patch_func_1:
|
||||
pop ecx
|
||||
push 8
|
||||
push 0x005C5267
|
||||
call get_code_size1
|
||||
.deltaof patch_code1, patch_code_end1
|
||||
get_code_size1:
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call patch_code_end1
|
||||
patch_code1:
|
||||
mov edx, [esp + 0x18]
|
||||
fld st0, dword [0x00689B65]
|
||||
fld st0, dword [esp + 0x14]
|
||||
fmulp st1, st0
|
||||
ret
|
||||
patch_code_end1:
|
||||
push ecx
|
||||
jmp write_call_func
|
||||
|
||||
# Whole bunch of stuff, including NPCs
|
||||
patch_func_2:
|
||||
pop ecx
|
||||
push 9
|
||||
push 0x007BA472
|
||||
call get_code_size2
|
||||
.deltaof patch_code2, patch_code_end2
|
||||
get_code_size2:
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call patch_code_end2
|
||||
patch_code2:
|
||||
test eax, 0x400
|
||||
fld st0, dword [0x00689B65]
|
||||
fld st0, dword [esp + 0x2C]
|
||||
fmulp st1, st0
|
||||
ret
|
||||
patch_code_end2:
|
||||
push ecx
|
||||
jmp write_call_func
|
||||
|
||||
# Duplicate function from above, reuse same hook
|
||||
patch_func_3:
|
||||
mov eax, dword [0x007BA473]
|
||||
add eax, 0x002A1C74
|
||||
mov dword [0x005187FF], eax
|
||||
mov byte [0x005187FE], 0xE8
|
||||
mov dword [0x00518803], 0x90909090
|
||||
ret
|
||||
|
||||
# TOComputerMachine01
|
||||
patch_func_4:
|
||||
pop ecx
|
||||
push 7
|
||||
push 0x00616FFC
|
||||
call get_code_size4
|
||||
.deltaof patch_code4, patch_code_end4
|
||||
get_code_size4:
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call patch_code_end4
|
||||
patch_code4:
|
||||
lea edx, [edi + 0x38]
|
||||
fld st0, dword [0x00689B65]
|
||||
fld st0, dword [esp + 0x14]
|
||||
fmulp st1, st0
|
||||
ret
|
||||
patch_code_end4:
|
||||
push ecx
|
||||
jmp write_call_func
|
||||
|
||||
# TObjCamera
|
||||
patch_func_5:
|
||||
pop ecx
|
||||
push 6
|
||||
push 0x0064394C
|
||||
call get_code_size5
|
||||
.deltaof patch_code5, patch_code_end5
|
||||
get_code_size5:
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call patch_code_end5
|
||||
patch_code5:
|
||||
fld st0, dword [0x00689B65]
|
||||
fld st0, dword [esp + 0x28]
|
||||
fmulp st1, st0
|
||||
fchs st0
|
||||
ret
|
||||
patch_code_end5:
|
||||
push ecx
|
||||
jmp write_call_func
|
||||
|
||||
# TODO: And this one?
|
||||
patch_func_6:
|
||||
pop ecx
|
||||
push 6
|
||||
push 0x0065B985
|
||||
call get_code_size6
|
||||
.deltaof patch_code6, patch_code_end6
|
||||
get_code_size6:
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call patch_code_end6
|
||||
patch_code6:
|
||||
mov ebp, ecx
|
||||
fld st0, dword [0x00689B65]
|
||||
fld st0, dword [esp + 0x30]
|
||||
fmulp st1, st0
|
||||
ret
|
||||
patch_code_end6:
|
||||
push ecx
|
||||
jmp write_call_func
|
||||
@@ -1,258 +0,0 @@
|
||||
.meta name="DMC"
|
||||
.meta description="Mitigates effects\nof enemy health\ndesync"
|
||||
.meta client_flag="0x0000001000000000"
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
|
||||
write_call_to_code_multi:
|
||||
.include WriteCallToCodeMulti-59NJ
|
||||
write_address_of_code:
|
||||
.include WriteAddressOfCode-59NJ
|
||||
|
||||
start:
|
||||
|
||||
# Replace 6x09 with 6xE4 in subcommand handler table
|
||||
mov dword [0x00A0DC30], 0x000600E4 # subcommand=0xE4, flags=6
|
||||
push 0x00A0DC34
|
||||
call +4
|
||||
.deltaof handle_6xE4_start, handle_6xE4_end
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call handle_6xE4_end
|
||||
|
||||
handle_6xE4_start: # (G_6xE4* cmd @ [esp + 4]) -> void
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
|
||||
test byte [0x00AA8DFC], 0x80
|
||||
jz handle_6xE4_return
|
||||
mov ebx, [esp + 0x10] # cmd
|
||||
movzx eax, word [ebx + 2]
|
||||
cmp eax, 0x1000
|
||||
jl handle_6xE4_return
|
||||
cmp eax, 0x1B50
|
||||
jge handle_6xE4_return
|
||||
|
||||
movzx eax, word [ebx + 2]
|
||||
.include GetEnemyEntity-59NJ # auto* ene = get_enemy_entity(cmd->header.entity_id);
|
||||
push eax
|
||||
|
||||
movzx eax, word [ebx + 2]
|
||||
and eax, 0x0FFF
|
||||
imul eax, eax, 0x0C
|
||||
add eax, [0x00AADE38] # eax = state_for_enemy(cmd->header.entity_id)
|
||||
|
||||
cmp dword [ebx + 0x0C], 0
|
||||
jl handle_6xE4_not_proportional
|
||||
mov cx, [ebx + 0x0A] # cmd->max_hp
|
||||
sub cx, [eax + 0x06] # st.total_damage
|
||||
movzx ecx, cx
|
||||
xor edx, edx
|
||||
cmp ecx, edx
|
||||
cmovl ecx, edx
|
||||
push ecx
|
||||
fild st0, dword [esp] # current_hp = static_cast<float>(max<int32_t>(cmd->max_hp - st.total_damage, 0))
|
||||
fld st0, dword [ebx + 0x0C]
|
||||
fmulp st1, st0
|
||||
fistp dword [esp], st0
|
||||
mov ecx, dword [esp] # adjusted_hit_amount = static_cast<int16_t>(current_hp * cmd->factor)
|
||||
add esp, 4
|
||||
xor edx, edx
|
||||
inc edx
|
||||
cmp ecx, edx
|
||||
cmovl ecx, edx
|
||||
mov [ebx + 0x04], cx # cmd->hit_amount = min<int32_t>(1, adjusted_hit_amount)
|
||||
handle_6xE4_not_proportional:
|
||||
|
||||
movzx edx, word [eax + 0x06] # st.total_damage
|
||||
movsx esi, word [ebx + 0x04] # cmd->hit_amount
|
||||
movzx edi, word [ebx + 0x0A] # cmd->max_hp
|
||||
add edx, esi # st.total_damage + cmd->hit_amount
|
||||
cmp edx, edi
|
||||
jl handle_6xE4_damage_less_than_max_hp
|
||||
mov [eax + 0x06], di # st.total_damage = cmd->max_hp;
|
||||
mov edx, [eax]
|
||||
test edx, 0x800
|
||||
jnz handle_6xE4_return_pop_ene
|
||||
or edx, 0x800
|
||||
mov [eax], edx
|
||||
cmp dword [esp], 0
|
||||
je handle_6xE4_return_pop_ene
|
||||
push edx # out_cmd.flags
|
||||
sub esp, 8
|
||||
mov word [esp], 0x030A # out_cmd.header.{subcommand,size}
|
||||
mov si, [ebx + 2]
|
||||
mov [esp + 2], si # out_cmd.header.entity_id
|
||||
and si, 0x0FFF
|
||||
mov [esp + 4], si # out_cmd.entity_index
|
||||
mov [esp + 6], di # out_cmd.total_damage
|
||||
mov ecx, esp
|
||||
mov edx, 0x00801150
|
||||
call edx # send_and_handle_60(&out_cmd);
|
||||
add esp, 0x10
|
||||
jmp handle_6xE4_return
|
||||
|
||||
handle_6xE4_damage_less_than_max_hp:
|
||||
xor edi, edi
|
||||
cmp edx, edx
|
||||
cmovl edx, edi
|
||||
mov [eax + 0x06], dx # st.total_damage = std::max<int16_t>(st.total_damage + cmd->hit_amount, 0);
|
||||
|
||||
mov edx, eax # edx = ene_st
|
||||
mov eax, [esp] # eax = ene
|
||||
test eax, eax
|
||||
jz handle_6xE4_return_pop_ene
|
||||
mov ecx, eax
|
||||
push edx
|
||||
mov edx, [ecx]
|
||||
call [edx + 0x148] # ene->vtable[0x52](ene, &st);
|
||||
|
||||
handle_6xE4_return_pop_ene:
|
||||
add esp, 4
|
||||
handle_6xE4_return:
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
|
||||
handle_6xE4_end:
|
||||
call write_address_of_code
|
||||
|
||||
|
||||
|
||||
# Write TObjectV00b421c0::incr_hp_with_sync
|
||||
push 5
|
||||
push 0x00775224 # TObjectV00b421c0::v18_accept_hit (presumably Resta) - this is add_hp, not subtract_hp!
|
||||
push 5
|
||||
push 0x00778063 # TObjectV00b421c0::subtract_hp_if_not_in_state_2
|
||||
push 5
|
||||
push 0x00777AB2 # TObjectV00b421c0::v19_handle_hit_special_effects
|
||||
push 5
|
||||
push 0x00777B2B # TObjectV00b421c0::v19_handle_hit_special_effects
|
||||
push 5
|
||||
push 0x00777BFC # TObjectV00b421c0::v19_handle_hit_special_effects
|
||||
push 5
|
||||
push 0x00777C75 # TObjectV00b421c0::v19_handle_hit_special_effects
|
||||
push 5
|
||||
push 0x00776D2D # TObjectV00b421c0::v19_handle_hit_special_effects
|
||||
push 5
|
||||
push 0x007769C2 # TObjectV00b421c0::v19_handle_hit_special_effects
|
||||
push 5
|
||||
push 0x0077683C # TObjectV00b421c0::v19_handle_hit_special_effects
|
||||
push 5
|
||||
push 0x00776502 # TObjectV00b421c0::v19_handle_hit_special_effects (Devil's/Demon's)
|
||||
push 5
|
||||
push 0x00775B57 # TObjectV00b421c0::v18_accept_hit
|
||||
push 5
|
||||
push 0x00775A23 # TObjectV00b421c0::v18_accept_hit
|
||||
push 5
|
||||
push 0x007757F0 # TObjectV00b421c0::v18_accept_hit
|
||||
push 5
|
||||
push 0x00775606 # TObjectV00b421c0::v18_accept_hit
|
||||
push 5
|
||||
push 0x007754BC # TObjectV00b421c0::v18_accept_hit
|
||||
push 5
|
||||
push 0x00774E3D # TObjectV00b421c0::v18_accept_hit
|
||||
push 5
|
||||
push 0x00774CD6 # TObjectV00b421c0::v18_accept_hit
|
||||
push 5
|
||||
push 0x00774713 # TObjectV00b421c0::v17
|
||||
push 18
|
||||
call +4
|
||||
.deltaof on_add_or_subtract_hp_start, on_add_or_subtract_hp_end
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call on_add_or_subtract_hp_end
|
||||
|
||||
on_add_or_subtract_hp_start: # (TObjectV00b421c0* this @ ecx, int16_t amount @ [esp + 4]) -> bool @ eax
|
||||
test byte [0x00AA8DFC], 0x80
|
||||
jz on_add_or_subtract_hp_skip_send
|
||||
movzx eax, word [ecx + 0x1C] # ene->entity_id
|
||||
cmp eax, 0x1000
|
||||
jl on_add_or_subtract_hp_skip_send
|
||||
cmp eax, 0x1B50
|
||||
jge on_add_or_subtract_hp_skip_send
|
||||
|
||||
and eax, 0x0FFF
|
||||
imul eax, eax, 0x0C
|
||||
add eax, [0x00AADE38] # eax = state_for_enemy(cmd->header.entity_id)
|
||||
|
||||
sub esp, 0x10
|
||||
mov word [esp], 0x04E4
|
||||
mov dx, [ecx + 0x1C]
|
||||
mov [esp + 0x02], dx # cmd.entity_id
|
||||
mov dx, [esp + 0x14]
|
||||
cmp dword [esp + 0x10], 0x00775229 # Check if callsite is add_hp
|
||||
jne on_add_or_subtract_hp_skip_negate_amount
|
||||
neg dx
|
||||
on_add_or_subtract_hp_skip_negate_amount:
|
||||
mov [esp + 0x04], dx # cmd.hit_amount
|
||||
mov dx, [eax + 6]
|
||||
mov [esp + 0x06], dx # cmd.total_damage_before_hit
|
||||
mov dx, [ecx + 0x0334]
|
||||
mov [esp + 0x08], dx # cmd.current_hp
|
||||
mov dx, [ecx + 0x02BC]
|
||||
mov [esp + 0x0A], dx # cmd.max_hp
|
||||
mov dword [esp + 0x0C], 0xBF800000 # cmd.factor
|
||||
|
||||
cmp dword [esp + 0x10], 0x00776507 # Check if callsite is Devil's/Demon's
|
||||
jne on_add_or_subtract_hp_not_proportional
|
||||
# esp is 0x18 down from where it is in caller's context
|
||||
mov edx, 100
|
||||
sub edx, [esp + 0x24] # edx = (100 - special_amount)
|
||||
push edx
|
||||
fild st0, dword [esp] # current_hp_factor = static_cast<float>(100 - special_amount)
|
||||
fmul st0, dword [esp + 0x54] # *= weapon_reduction_factor
|
||||
mov dword [esp], 0x42C80000 # 100.0f
|
||||
fdiv st0, dword [esp]
|
||||
add esp, 4
|
||||
fstp dword [esp + 0x0C], st0 # cmd.factor = ((100 - special_amount) * weapon_reduction_factor) / 100
|
||||
on_add_or_subtract_hp_not_proportional:
|
||||
|
||||
mov edx, esp
|
||||
push ecx
|
||||
push 0x10
|
||||
push edx
|
||||
mov ecx, [0x00AA8E04]
|
||||
mov edx, 0x007D4CBC
|
||||
call edx # send_60(root_protocol, &cmd, sizeof(cmd));
|
||||
pop ecx
|
||||
add esp, 0x10
|
||||
|
||||
on_add_or_subtract_hp_skip_send:
|
||||
mov eax, 0x007781F0 # subtract_hp
|
||||
mov edx, 0x007781B0 # add_hp
|
||||
cmp dword [esp], 0x00775229 # Check if callsite is add_hp
|
||||
cmove eax, edx
|
||||
jmp eax
|
||||
|
||||
on_add_or_subtract_hp_end:
|
||||
call write_call_to_code_multi
|
||||
|
||||
|
||||
|
||||
push 5
|
||||
push 0x0078864B
|
||||
push 1
|
||||
call +4
|
||||
.deltaof on_6x0A_patch_start, on_6x0A_patch_end
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call on_6x0A_patch_end
|
||||
|
||||
on_6x0A_patch_start: # (TObjectV00b421c0* this @ ecx, int16_t amount @ [esp + 4]) -> bool @ eax
|
||||
test byte [0x00AA8DFC], 0x80
|
||||
jz on_6x0A_patch_skip_write
|
||||
mov [esp + 0x0A], cx
|
||||
on_6x0A_patch_skip_write:
|
||||
ret
|
||||
|
||||
on_6x0A_patch_end:
|
||||
call write_call_to_code_multi
|
||||
|
||||
|
||||
|
||||
ret
|
||||
+42
-37
@@ -1,21 +1,25 @@
|
||||
.meta visibility="all"
|
||||
.meta key="EnemyDamageSync"
|
||||
.meta name="DMC"
|
||||
.meta description="Mitigates effects\nof enemy health\ndesync"
|
||||
.meta client_flag="0x0000001000000000"
|
||||
|
||||
.versions 59NJ 59NL
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
|
||||
write_call_to_code_multi:
|
||||
.include WriteCallToCodeMulti-59NL
|
||||
.include WriteCallToCodeMulti
|
||||
write_address_of_code:
|
||||
.include WriteAddressOfCode-59NL
|
||||
.include WriteAddressOfCode
|
||||
|
||||
start:
|
||||
|
||||
# Replace 6x09 with 6xE4 in subcommand handler table
|
||||
mov dword [0x00A0FC30], 0x000600E4 # subcommand=0xE4, flags=6
|
||||
push 0x00A0FC34
|
||||
mov dword [<VERS 0x00A0DC30 0x00A0FC30>], 0x000600E4 # subcommand=0xE4, flags=6
|
||||
push <VERS 0x00A0DC34 0x00A0FC34>
|
||||
call +4
|
||||
.deltaof handle_6xE4_start, handle_6xE4_end
|
||||
pop eax
|
||||
@@ -27,7 +31,7 @@ handle_6xE4_start: # (G_6xE4* cmd @ [esp + 4]) -> void
|
||||
push esi
|
||||
push edi
|
||||
|
||||
test byte [0x00AAB27C], 0x80
|
||||
test byte [<VERS 0x00AA8DFC 0x00AAB27C>], 0x80
|
||||
jz handle_6xE4_return
|
||||
mov ebx, [esp + 0x10] # cmd
|
||||
movzx eax, word [ebx + 2]
|
||||
@@ -37,13 +41,13 @@ handle_6xE4_start: # (G_6xE4* cmd @ [esp + 4]) -> void
|
||||
jge handle_6xE4_return
|
||||
|
||||
movzx eax, word [ebx + 2]
|
||||
.include GetEnemyEntity-59NL # auto* ene = get_enemy_entity(cmd->header.entity_id);
|
||||
.include GetEnemyEntity # auto* ene = get_enemy_entity(cmd->header.entity_id);
|
||||
push eax
|
||||
|
||||
movzx eax, word [ebx + 2]
|
||||
and eax, 0x0FFF
|
||||
imul eax, eax, 0x0C
|
||||
add eax, [0x00AB02B8] # eax = state_for_enemy(cmd->header.entity_id)
|
||||
add eax, [<VERS 0x00AADE38 0x00AB02B8>] # eax = state_for_enemy(cmd->header.entity_id)
|
||||
|
||||
cmp dword [ebx + 0x0C], 0
|
||||
jl handle_6xE4_not_proportional
|
||||
@@ -90,7 +94,7 @@ handle_6xE4_not_proportional:
|
||||
mov [esp + 4], si # out_cmd.entity_index
|
||||
mov [esp + 6], di # out_cmd.total_damage
|
||||
mov ecx, esp
|
||||
mov edx, 0x008003E0
|
||||
mov edx, <VERS 0x00801150 0x008003E0>
|
||||
call edx # send_and_handle_60(&out_cmd);
|
||||
add esp, 0x10
|
||||
jmp handle_6xE4_return
|
||||
@@ -123,43 +127,44 @@ handle_6xE4_end:
|
||||
|
||||
|
||||
|
||||
# Note: in 59NJ this object is TObjectV00b421c0 (it's the same as 3OE1's TObjectV8047c128)
|
||||
# Write TObjectV00b441c0::incr_hp_with_sync
|
||||
push 5
|
||||
push 0x00774448 # TObjectV00b441c0::v18_accept_hit (presumably Resta) - this is add_hp, not subtract_hp!
|
||||
push <VERS 0x00775224 0x00774448> # TObjectV00b441c0::v18_accept_hit (presumably Resta) - this is add_hp, not subtract_hp!
|
||||
push 5
|
||||
push 0x00777287 # TObjectV00b441c0::subtract_hp_if_not_in_state_2
|
||||
push <VERS 0x00778063 0x00777287> # TObjectV00b441c0::subtract_hp_if_not_in_state_2
|
||||
push 5
|
||||
push 0x00776CD6 # TObjectV00b441c0::v19_handle_hit_special_effects
|
||||
push <VERS 0x00777AB2 0x00776CD6> # TObjectV00b441c0::v19_handle_hit_special_effects
|
||||
push 5
|
||||
push 0x00776D4F # TObjectV00b441c0::v19_handle_hit_special_effects
|
||||
push <VERS 0x00777B2B 0x00776D4F> # TObjectV00b441c0::v19_handle_hit_special_effects
|
||||
push 5
|
||||
push 0x00776E20 # TObjectV00b441c0::v19_handle_hit_special_effects
|
||||
push <VERS 0x00777BFC 0x00776E20> # TObjectV00b441c0::v19_handle_hit_special_effects
|
||||
push 5
|
||||
push 0x00776E99 # TObjectV00b441c0::v19_handle_hit_special_effects
|
||||
push <VERS 0x00777C75 0x00776E99> # TObjectV00b441c0::v19_handle_hit_special_effects
|
||||
push 5
|
||||
push 0x00775F51 # TObjectV00b441c0::v19_handle_hit_special_effects
|
||||
push <VERS 0x00776D2D 0x00775F51> # TObjectV00b441c0::v19_handle_hit_special_effects
|
||||
push 5
|
||||
push 0x00775BE6 # TObjectV00b441c0::v19_handle_hit_special_effects
|
||||
push <VERS 0x007769C2 0x00775BE6> # TObjectV00b441c0::v19_handle_hit_special_effects
|
||||
push 5
|
||||
push 0x00775A60 # TObjectV00b441c0::v19_handle_hit_special_effects
|
||||
push <VERS 0x0077683C 0x00775A60> # TObjectV00b441c0::v19_handle_hit_special_effects
|
||||
push 5
|
||||
push 0x00775726 # TObjectV00b441c0::v19_handle_hit_special_effects (Devil's/Demon's)
|
||||
push <VERS 0x00776502 0x00775726> # TObjectV00b441c0::v19_handle_hit_special_effects (Devil's/Demon's)
|
||||
push 5
|
||||
push 0x00774D7B # TObjectV00b441c0::v18_accept_hit
|
||||
push <VERS 0x00775B57 0x00774D7B> # TObjectV00b441c0::v18_accept_hit
|
||||
push 5
|
||||
push 0x00774C47 # TObjectV00b441c0::v18_accept_hit
|
||||
push <VERS 0x00775A23 0x00774C47> # TObjectV00b441c0::v18_accept_hit
|
||||
push 5
|
||||
push 0x00774A14 # TObjectV00b441c0::v18_accept_hit
|
||||
push <VERS 0x007757F0 0x00774A14> # TObjectV00b441c0::v18_accept_hit
|
||||
push 5
|
||||
push 0x0077482A # TObjectV00b441c0::v18_accept_hit
|
||||
push <VERS 0x00775606 0x0077482A> # TObjectV00b441c0::v18_accept_hit
|
||||
push 5
|
||||
push 0x007746E0 # TObjectV00b441c0::v18_accept_hit
|
||||
push <VERS 0x007754BC 0x007746E0> # TObjectV00b441c0::v18_accept_hit
|
||||
push 5
|
||||
push 0x00774061 # TObjectV00b441c0::v18_accept_hit
|
||||
push <VERS 0x00774E3D 0x00774061> # TObjectV00b441c0::v18_accept_hit
|
||||
push 5
|
||||
push 0x00773EFA # TObjectV00b441c0::v18_accept_hit
|
||||
push <VERS 0x00774CD6 0x00773EFA> # TObjectV00b441c0::v18_accept_hit
|
||||
push 5
|
||||
push 0x00773937 # TObjectV00b441c0::v17
|
||||
push <VERS 0x00774713 0x00773937> # TObjectV00b441c0::v17
|
||||
push 18
|
||||
call +4
|
||||
.deltaof on_add_or_subtract_hp_start, on_add_or_subtract_hp_end
|
||||
@@ -168,7 +173,7 @@ handle_6xE4_end:
|
||||
call on_add_or_subtract_hp_end
|
||||
|
||||
on_add_or_subtract_hp_start: # (TObjectV00b441c0* this @ ecx, int16_t amount @ [esp + 4]) -> bool @ eax
|
||||
test byte [0x00AAB27C], 0x80
|
||||
test byte [<VERS 0x00AA8DFC 0x00AAB27C>], 0x80
|
||||
jz on_add_or_subtract_hp_skip_send
|
||||
movzx eax, word [ecx + 0x1C] # ene->entity_id
|
||||
cmp eax, 0x1000
|
||||
@@ -178,14 +183,14 @@ on_add_or_subtract_hp_start: # (TObjectV00b441c0* this @ ecx, int16_t amount @
|
||||
|
||||
and eax, 0x0FFF
|
||||
imul eax, eax, 0x0C
|
||||
add eax, [0x00AB02B8] # eax = state_for_enemy(cmd->header.entity_id)
|
||||
add eax, [<VERS 0x00AADE38 0x00AB02B8>] # eax = state_for_enemy(cmd->header.entity_id)
|
||||
|
||||
sub esp, 0x10
|
||||
mov word [esp], 0x04E4
|
||||
mov dx, [ecx + 0x1C]
|
||||
mov [esp + 0x02], dx # cmd.entity_id
|
||||
mov dx, [esp + 0x14]
|
||||
cmp dword [esp + 0x10], 0x0077444D # Check if callsite is add_hp
|
||||
cmp dword [esp + 0x10], <VERS 0x00775229 0x0077444D> # Check if callsite is add_hp
|
||||
jne on_add_or_subtract_hp_skip_negate_amount
|
||||
neg dx
|
||||
on_add_or_subtract_hp_skip_negate_amount:
|
||||
@@ -198,7 +203,7 @@ on_add_or_subtract_hp_skip_negate_amount:
|
||||
mov [esp + 0x0A], dx # cmd.max_hp
|
||||
mov dword [esp + 0x0C], 0xBF800000 # cmd.factor
|
||||
|
||||
cmp dword [esp + 0x10], 0x0077572B # Check if callsite is Devil's/Demon's
|
||||
cmp dword [esp + 0x10], <VERS 0x00776507 0x0077572B> # Check if callsite is Devil's/Demon's
|
||||
jne on_add_or_subtract_hp_not_proportional
|
||||
# esp is 0x18 down from where it is in caller's context
|
||||
mov edx, 100
|
||||
@@ -216,16 +221,16 @@ on_add_or_subtract_hp_not_proportional:
|
||||
push ecx
|
||||
push 0x10
|
||||
push edx
|
||||
mov ecx, [0x00AAB284]
|
||||
mov edx, 0x007D3F38
|
||||
mov ecx, [<VERS 0x00AA8E04 0x00AAB284>]
|
||||
mov edx, <VERS 0x007D4CBC 0x007D3F38>
|
||||
call edx # send_60(root_protocol, &cmd, sizeof(cmd));
|
||||
pop ecx
|
||||
add esp, 0x10
|
||||
|
||||
on_add_or_subtract_hp_skip_send:
|
||||
mov eax, 0x00777414 # subtract_hp
|
||||
mov edx, 0x007773D4 # add_hp
|
||||
cmp dword [esp], 0x0077444D # Check if callsite is add_hp
|
||||
mov eax, <VERS 0x007781F0 0x00777414> # subtract_hp
|
||||
mov edx, <VERS 0x007781B0 0x007773D4> # add_hp
|
||||
cmp dword [esp], <VERS 0x00775229 0x0077444D> # Check if callsite is add_hp
|
||||
cmove eax, edx
|
||||
jmp eax
|
||||
|
||||
@@ -235,7 +240,7 @@ on_add_or_subtract_hp_end:
|
||||
|
||||
|
||||
push 5
|
||||
push 0x0078781F
|
||||
push <VERS 0x0078864B 0x0078781F>
|
||||
push 1
|
||||
call +4
|
||||
.deltaof on_6x0A_patch_start, on_6x0A_patch_end
|
||||
@@ -244,7 +249,7 @@ on_add_or_subtract_hp_end:
|
||||
call on_6x0A_patch_end
|
||||
|
||||
on_6x0A_patch_start: # (TObjectV00b441c0* this @ ecx, int16_t amount @ [esp + 4]) -> bool @ eax
|
||||
test byte [0x00AAB27C], 0x80
|
||||
test byte [<VERS 0x00AA8DFC 0x00AAB27C>], 0x80
|
||||
jz on_6x0A_patch_skip_write
|
||||
mov [esp + 0x0A], cx
|
||||
on_6x0A_patch_skip_write:
|
||||
+3
-1
@@ -1,3 +1,5 @@
|
||||
.meta visibility="all"
|
||||
.meta key="EnemyDamageSync"
|
||||
.meta name="DMC"
|
||||
.meta description="Mitigates effects\nof enemy health\ndesync"
|
||||
.meta client_flag="0x0000001000000000"
|
||||
@@ -8,7 +10,7 @@ entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksGC
|
||||
.include WriteCodeBlocks
|
||||
|
||||
.label TObjectV8047c128_add_hp, <VERS 0x8001143C 0x8001145C 0x800116EC 0x8001140C 0x80011454 0x80011454 0x8001140C 0x80011484>
|
||||
.label TObjectV8047c128_subtract_hp, <VERS 0x8001147C 0x8001149C 0x8001172C 0x8001144C 0x80011494 0x80011494 0x8001144C 0x800114C4>
|
||||
+7
-6
@@ -1,3 +1,5 @@
|
||||
.meta visibility="all"
|
||||
.meta key="EnemyDamageSync"
|
||||
.meta name="DMC"
|
||||
.meta description="Mitigates effects\nof enemy health\ndesync"
|
||||
.meta client_flag="0x0000001000000000"
|
||||
@@ -9,7 +11,7 @@ reloc0:
|
||||
.offsetof start
|
||||
|
||||
write_call_to_code_multi:
|
||||
.include WriteCallToCodeMultiXB
|
||||
.include WriteCallToCodeMulti
|
||||
|
||||
|
||||
|
||||
@@ -284,7 +286,7 @@ on_add_or_subtract_hp_end:
|
||||
|
||||
|
||||
write_static_patches:
|
||||
.include WriteCodeBlocksXB
|
||||
.include WriteCodeBlocks
|
||||
|
||||
|
||||
|
||||
@@ -326,10 +328,9 @@ on_subtract_hp_if_not_in_state_2_end:
|
||||
.deltaof v17_subtract_hp_inlined_callsite_start, v17_subtract_hp_inlined_callsite_end
|
||||
.address <VERS 0x002A60CA 0x002A6BAA 0x002A807A 0x002A7B0A 0x002A7CEA 0x002A7B2A 0x002A7DAA>
|
||||
v17_subtract_hp_inlined_callsite_start:
|
||||
# This must assemble to exactly 0x1A bytes. There is a vfn call shortly after
|
||||
# this, and fortunately it appears eax, ecx, and edx are not used before
|
||||
# then, so we don't have to save any registers here; we just have to move the
|
||||
# args into the right places.
|
||||
# This must assemble to exactly 0x1A bytes. There is a vfn call shortly after this, and fortunately it appears eax,
|
||||
# ecx, and edx are not used before then, so we don't have to save any registers here; we just have to move the args
|
||||
# into the right places.
|
||||
mov cx, ax
|
||||
mov eax, edi
|
||||
call -1 # Overwritten by write_call_to_code_multi later
|
||||
+3
-1
@@ -1,3 +1,5 @@
|
||||
.meta visibility="all"
|
||||
.meta key="EnemyHPBars"
|
||||
.meta name="Enemy HP bars"
|
||||
.meta description="Shows HP bars in\nenemy info windows"
|
||||
|
||||
@@ -7,7 +9,7 @@ entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksBB
|
||||
.include WriteCodeBlocks
|
||||
.data <VERS 0x0073197D 0x007318DD>
|
||||
.data 6
|
||||
.binary 81E2FDFFFFFF
|
||||
+6
-3
@@ -1,16 +1,19 @@
|
||||
.meta name="Enemy HP bars"
|
||||
.meta description="Shows HP bars in\nenemy info windows"
|
||||
# Original code by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
|
||||
.meta visibility="all"
|
||||
.meta key="EnemyHPBars"
|
||||
.meta name="Enemy HP bars"
|
||||
.meta description="Shows HP bars in\nenemy info windows"
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksGC
|
||||
.include WriteCodeBlocks
|
||||
|
||||
.label hook_addr, 0x8000B650
|
||||
.label sprintf, <VERS 0x80395EFC 0x80398904 0x8039A7A4 0x8039A554 0x803971CC 0x80397224 0x8039A924 0x80399414>
|
||||
+8
-5
@@ -1,17 +1,20 @@
|
||||
.meta name="Enemy HP bars"
|
||||
.meta description="Shows HP bars in\nenemy info windows"
|
||||
# Original code by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
# Xbox port by fuzziqersoftware
|
||||
|
||||
.meta visibility="all"
|
||||
.meta key="EnemyHPBars"
|
||||
.meta name="Enemy HP bars"
|
||||
.meta description="Shows HP bars in\nenemy info windows"
|
||||
|
||||
.versions 4OED 4OEU 4OJB 4OJD 4OJU 4OPD 4OPU
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksXB
|
||||
.include WriteCodeBlocks
|
||||
.data <VERS 0x0026B063 0x0026B193 0x0026ABA3 0x0026AF13 0x0026B2F3 0x0026B083 0x0026B193>
|
||||
.data 0x00000001
|
||||
.binary C0
|
||||
@@ -51,8 +54,8 @@ str_data_start:
|
||||
.data 0x00000000
|
||||
str_data_end:
|
||||
|
||||
# WARNING: FlickeringStatusIcons patch starts immediately after this segment;
|
||||
# if the size of this is changed, that patch will have to be changed too
|
||||
# WARNING: FlickeringStatusIcons patch starts immediately after this segment; if the size of this is changed, that
|
||||
# patch will have to be changed too
|
||||
.data <VERS 0x002DB050 0x002DB550 0x002D90E0 0x002D9CB0 0x002DB580 0x002DB080 0x002DB5D0>
|
||||
.deltaof new_code_start, new_code_end
|
||||
new_code_start:
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
# This patch gives you the maximum number of each card. It only works if used
|
||||
# in-game, which means it must be used by running `$patch AllCards`.
|
||||
# This patch gives you the maximum number of each card. It only works if used in-game, which means it must be used by
|
||||
# running `$patch AllCards`.
|
||||
|
||||
.meta hide_from_patches_menu
|
||||
.meta visibility="cheat"
|
||||
.meta name="All cards"
|
||||
.meta description="Gives you the\nmaximum number of\neach card."
|
||||
|
||||
+54
-75
@@ -1,18 +1,16 @@
|
||||
# This patch enables the debug menus in PSO Episode 3 USA. Specifically, it
|
||||
# causes them all to load, but only activates one (selected by uncommenting a
|
||||
# line below). See the comments for more information. Most of these editors are
|
||||
# present in PSO PC and PSO Xbox as well, but not in GC Episodes 1 & 2. There
|
||||
# are notes in the below comments that may help get these editors working on
|
||||
# PSO PC.
|
||||
# This patch enables the debug menus in PSO Episode 3 USA. Specifically, it causes them all to load, but only activates
|
||||
# one (selected by uncommenting a line below). See the comments for more information. Most of these editors are present
|
||||
# in PSO PC and PSO Xbox as well, but not in GC Episodes 1 & 2. There are notes in the below comments that may help get
|
||||
# these editors working on PSO PC.
|
||||
|
||||
# This patch must not be run from the Patches menu - it should only be run with
|
||||
# the $patch command, since the client will likely crash if the player is not
|
||||
# in a game or lobby when the patch runs.
|
||||
# This patch must not be run from the Patches menu - it should only be run with the $patch command, since the client
|
||||
# will likely crash if the player is not in a game or lobby when the patch runs.
|
||||
|
||||
.meta hide_from_patches_menu
|
||||
.meta name="Editors"
|
||||
.meta description="Enables the various\ndebug menus"
|
||||
|
||||
.versions 3SE0
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
@@ -25,8 +23,7 @@ start:
|
||||
stw [r1 + 0x0C], r30
|
||||
stw [r1 + 0x08], r29
|
||||
|
||||
# Write a short hook that updates our editors table when TEditor_destroy() is
|
||||
# called
|
||||
# Write a short hook that updates our editors table when TEditor_destroy() is called
|
||||
bl get_TEditor_destroy_hook_addr
|
||||
mr r4, r3
|
||||
bl get_TEditor_destroy_hook_end
|
||||
@@ -48,10 +45,9 @@ start:
|
||||
ori r29, r29, 0x17C4
|
||||
|
||||
construct_editors:
|
||||
# Call the constructors for all the editors and save the object pointers. If
|
||||
# an editor already exists, set its disable flags. (This behavior allows this
|
||||
# patch to run again to switch to a different editor without changing rooms.)
|
||||
# Note: In PSO PC (the version I have, at least) this table is at 00691FA8.
|
||||
# Call the constructors for all the editors and save the object pointers. If an editor already exists, set its
|
||||
# disable flags. (This behavior allows this patch to run again to switch to a different editor without changing
|
||||
# rooms.) In PSO PC (2OJW) this table is at 00691FA8.
|
||||
lis r30, 0x8043
|
||||
ori r30, r30, 0x3760
|
||||
addi r31, r30, 0xB4 # 15 entries * 12 bytes per entry
|
||||
@@ -76,13 +72,11 @@ editor_construction_failed:
|
||||
blt again
|
||||
|
||||
activate_chosen_editor:
|
||||
# All of the editors have flags set at construction time that effectively
|
||||
# disable them (by disabling both the update and render functions). At the
|
||||
# time this code is executed, the flags are already set (and we set them again
|
||||
# in the above loop anyway), so we can unset the flags for whichever editor we
|
||||
# want to run by uncommenting the appropriate lwz opcode below.
|
||||
# Most of these tools expect input from the controller in port 3; the comments
|
||||
# below all refer to inputs from that port.
|
||||
# All of the editors have flags set at construction time that effectively disable them (by disabling both the update
|
||||
# and render functions). At the time this code is executed, the flags are already set (and we set them again in the
|
||||
# above loop anyway), so we can unset the flags for whichever editor we want to run by uncommenting the appropriate
|
||||
# lwz opcode below. Most of these tools expect input from the controller in port 3; the comments below all refer to
|
||||
# inputs from that port.
|
||||
|
||||
li r4, 0
|
||||
lis r29, 0x8000
|
||||
@@ -92,91 +86,76 @@ activate_chosen_editor:
|
||||
# This editor is very similar to TGroupEnemySetEditor (see below).
|
||||
|
||||
# lwz r4, [r29 + 0x04] # TGroupEnemySetEditor
|
||||
# This editor only works in a game; it crashes if loaded in the lobby.
|
||||
# Use the D-pad to choose a value; hold X and use the D-pad to modify the
|
||||
# selected value. Hold R to use the menu on the right.
|
||||
# This editor only works in a game; it crashes if loaded in the lobby. Use the D-pad to choose a value; hold X and
|
||||
# use the D-pad to modify the selected value. Hold R to use the menu on the right.
|
||||
|
||||
# lwz r4, [r29 + 0x08] # TCameraEditor
|
||||
# This editor displays a floating-point value at the bottom of the screen,
|
||||
# which you can modify with C-left and C-right. It's not apparent what this
|
||||
# value represents, though.
|
||||
# This editor displays a floating-point value at the bottom of the screen, which you can modify with C-left and
|
||||
# C-right. It's not apparent what this value represents, though.
|
||||
|
||||
# lwz r4, [r29 + 0x0C] # TParticleEditor
|
||||
# This editor has two modes. Hold A and press X to switch modes. In "MAIN
|
||||
# MODE", use D-left/D-right to pick an effect. Hold L to make the effect
|
||||
# picker manageable (instead of insanely fast). In "ELEMENT MODE", it seems
|
||||
# that any of the displayed values can be modified, but the selector is very
|
||||
# hard to see (the selected section is rendered in FFFFFF, while the others
|
||||
# are rendered in F0F0F0 - very similar colors!). Hold A, Y, or X and use
|
||||
# the D-pad to change a value in the selected section (each of A/Y/X
|
||||
# corresponds to a specific field in the current section).
|
||||
# This editor has two modes. Hold A and press X to switch modes. In "MAIN MODE", use D-left/D-right to pick an
|
||||
# effect. Hold L to make the effect picker manageable (instead of insanely fast). In "ELEMENT MODE", it seems that
|
||||
# any of the displayed values can be modified, but the selector is very hard to see (the selected section is
|
||||
# rendered in FFFFFF, while the others are rendered in F0F0F0 - very similar colors!). Hold A, Y, or X and use the
|
||||
# D-pad to change a value in the selected section (each of A/Y/X corresponds to a specific field in the current
|
||||
# section).
|
||||
|
||||
# lwz r4, [r29 + 0x10] # TFreeCamera
|
||||
# This editor does nothing. Probably it was never implemented or the code
|
||||
# was intentionally deleted (though if it was, it's not clear why only this
|
||||
# editor's code was deleted).
|
||||
# This editor does nothing. Probably it was never implemented or the code was intentionally deleted (though if it
|
||||
# was, it's not clear why only this editor's code was deleted).
|
||||
|
||||
# lwz r4, [r29 + 0x14] # TFogEditor
|
||||
# Use L/R to pick a line, and the D-pad to modify the values. NO specifies
|
||||
# which fog entry you're editing (0-127).
|
||||
# Use L/R to pick a line, and the D-pad to modify the values. NO specifies which fog entry you're editing (0-127).
|
||||
|
||||
# lwz r4, [r29 + 0x18] # TLightEditor
|
||||
# Used for testing character lighting. Use L to select a section and the
|
||||
# D-pad to choose and modify values within that section. COLOR and DIR
|
||||
# specify the properties of the highlight; AMBIENT specifies the color of
|
||||
# the non-highlight lighting. It's not clear what the last section does.
|
||||
# Used for testing character lighting. Use L to select a section and the D-pad to choose and modify values within
|
||||
# that section. COLOR and DIR specify the properties of the highlight; AMBIENT specifies the color of the non-
|
||||
# highlight lighting. It's not clear what the last section does.
|
||||
|
||||
# lwz r4, [r29 + 0x1C] # nothing (type table entry is blank)
|
||||
|
||||
# lwz r4, [r29 + 0x20] # TSeqVarsEdit
|
||||
# Use L/R to change pages, use the D-pad to pick a flag, and use A to toggle
|
||||
# it. There are 8192 flags in total (0x400 bytes).
|
||||
# Use L/R to change pages, use the D-pad to pick a flag, and use A to toggle it. There are 8192 flags in total
|
||||
# (0x400 bytes).
|
||||
|
||||
# lwz r4, [r29 + 0x24] # TSetEvtScriptTest
|
||||
# Use D-left/D-right to change the label value and D-up/D-down to move the
|
||||
# menu selection. Two of the menu items appear to do nothing, and the last
|
||||
# crashes. Maybe it works better on Episodes 1&2.
|
||||
# Use D-left/D-right to change the label value and D-up/D-down to move the menu selection. Two of the menu items
|
||||
# appear to do nothing, and the last crashes. Maybe it works better on Episodes 1&2.
|
||||
|
||||
# lwz r4, [r29 + 0x28] # nothing (type table entry is blank)
|
||||
|
||||
# lwz r4, [r29 + 0x2C] # TQuestScriptChecker (quest debugger)
|
||||
# Use L to change functions, and the D-pad to navigate within each function.
|
||||
# If you set EVENT NO to a very high value, the editor can appear messed up;
|
||||
# what actually happens is the value is shifted one decimal place to the
|
||||
# right, but the cursor remains in the same position with incorrect
|
||||
# highlighting. The value appears to be a signed 32-bit integer. On the
|
||||
# registers page, use D-left/D-right to see more registers; hold X and use
|
||||
# the D-pad to modify a register's value. Similarly, hold X and use the
|
||||
# D-pad on the breakpoints page to change values.
|
||||
# Use L to change functions, and the D-pad to navigate within each function. If you set EVENT NO to a very high
|
||||
# value, the editor can appear messed up; what actually happens is the value is shifted one decimal place to the
|
||||
# right, but the cursor remains in the same position with incorrect highlighting. The value appears to be a signed
|
||||
# 32-bit integer. On the registers page, use D-left/D-right to see more registers; hold X and use the D-pad to
|
||||
# modify a register's value. Similarly, hold X and use the D-pad on the breakpoints page to change values.
|
||||
|
||||
# lwz r4, [r29 + 0x30] # TPlyPKEditor (battle mode options)
|
||||
# Use the D-pad to move the cursor and set options. In Episode 3, it appears
|
||||
# this debugger doesn't do anything. It's likely more functional in Episodes
|
||||
# 1 & 2.
|
||||
# Use the D-pad to move the cursor and set options. In Episode 3, it appears this debugger doesn't do anything.
|
||||
# It's likely more functional in Episodes 1 & 2.
|
||||
|
||||
# lwz r4, [r29 + 0x34] # TEffIndirectEditor
|
||||
# li r0, 1
|
||||
# stw [r4 + 0x38], r0
|
||||
# This editor is missing in PSO PC, but is present in PSOX. It appears to be
|
||||
# used for testing texture overlay effects, but it doesn't work properly in
|
||||
# Episode 3 - none of the effects appear to do anything. All three lines
|
||||
# This editor is missing in PSO PC, but is present in PSOX. It appears to be used for testing texture overlay
|
||||
# effects, but it doesn't work properly in Episode 3 - none of the effects appear to do anything. All three lines
|
||||
# above must be uncommented for it to load.
|
||||
|
||||
# lwz r4, [r29 + 0x38] # TCCScenarioDebug (movie/cutscene tests)
|
||||
# This editor exists only in Episode 3 - it is neither in PSOPC nor PSOX.
|
||||
# Nothing appears immediately after activating this debugger because the
|
||||
# default page is blank. Use C-left and C-right to change major pages; use
|
||||
# L/R to change minor pages (sets of 50 flags within each major page). Use
|
||||
# the D-pad to pick a flag and A to toggle it. On the "STAFFROLL" page, use
|
||||
# the D-pad to pick a movie, and R+A to play it. If you watch the movie to
|
||||
# the end, you'll return to your game and things will work as normal, but
|
||||
# the textures will likely have been overwritten with garbage data.
|
||||
# This editor exists only in Episode 3 - it is neither in PSOPC nor PSOX. Nothing appears immediately after
|
||||
# activating this debugger because the default page is blank. Use C-left and C-right to change major pages; use L/R
|
||||
# to change minor pages (sets of 50 flags within each major page). Use the D-pad to pick a flag and A to toggle it.
|
||||
# On the "STAFFROLL" page, use the D-pad to pick a movie, and R+A to play it. If you watch the movie to the end,
|
||||
# you'll return to your game and things will work as normal, but the textures will likely have been overwritten
|
||||
# with garbage data.
|
||||
|
||||
li r3, 0
|
||||
mr. r0, r4
|
||||
beq skip_enable_editor
|
||||
# Note: The PSO PC TObject structure is a bit different; the flags field is at
|
||||
# +8 instead of +4 (but it is still a 16-bit integer).
|
||||
# Note: The PSO PC TObject structure is a bit different; the flags field is at +8 instead of +4 (but it is still a
|
||||
# 16-bit integer).
|
||||
sth [r4 + 4], r3
|
||||
skip_enable_editor:
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
# Original patch by Gigobooma
|
||||
# https://docs.google.com/document/d/1zG73l9joEqp_zB-xNgK9g8pXL0RSpmXfxPFQcdAvess/edit
|
||||
|
||||
.meta visibility="all"
|
||||
.meta name="Episode 3 Plus"
|
||||
.meta description="Enables Episode 3\nPlus features.\nDoes not include\ntext fixes.\n\nOriginally created\nby Gigobooma"
|
||||
|
||||
@@ -11,7 +12,7 @@ reloc0:
|
||||
.offsetof start
|
||||
|
||||
start:
|
||||
.include WriteCodeBlocksGC
|
||||
.include WriteCodeBlocks
|
||||
|
||||
# Disable curse word filter
|
||||
.data <VERS 0x8012FAD0 0x8012FA4C 0x8012FED8>
|
||||
+4
-3
@@ -1,11 +1,12 @@
|
||||
# This patch replaces the prices and contents of Pinz's Shop.
|
||||
# Each entry is structured as follows:
|
||||
# This patch replaces the prices and contents of Pinz's Shop. Each entry is structured as follows:
|
||||
# uint16_t card_id;
|
||||
# int16_t min_clv; // -1 = limit doesn't apply
|
||||
# int16_t max_clv; // -1 = limit doesn't apply
|
||||
# uint16_t relative_chance;
|
||||
# The values in the patch data below are the defaults.
|
||||
# Uncomment the .meta visibility line to make this appear in the Patches menu.
|
||||
|
||||
# .meta visibility="all"
|
||||
.meta name="New Pinz cards"
|
||||
.meta description="Replaces the cards\navailable in Pinz's\nShop"
|
||||
|
||||
@@ -16,7 +17,7 @@ reloc0:
|
||||
.offsetof start
|
||||
|
||||
start:
|
||||
.include WriteCodeBlocksGC
|
||||
.include WriteCodeBlocks
|
||||
|
||||
# Meseta prices
|
||||
.data <VERS 0x80487140 0x80487E80 0x8048A260>
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
.meta visibility="cheat"
|
||||
.meta name="VIP card"
|
||||
.meta description="Gives you a VIP card"
|
||||
.meta hide_from_patches_menu
|
||||
|
||||
.versions 3SJT 3SJ0 3SE0 3SP0
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
# This function implements $exit in a game when no quest is loaded.
|
||||
|
||||
.meta name="Exit anywhere"
|
||||
.meta description=""
|
||||
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
|
||||
|
||||
|
||||
.versions 2OJ5 2OJF 2OEF 2OPF
|
||||
start:
|
||||
mov r2, 0
|
||||
mova r0, [addrs]
|
||||
mov.l r1, [r0]
|
||||
mov.l [r1], r2
|
||||
mov.l r1, [r0 + 4]
|
||||
mov.l [r1], r2
|
||||
mov r2, 1
|
||||
mov.l r1, [r0 + 8]
|
||||
rets
|
||||
mov.w [r1], r2
|
||||
.align 4
|
||||
addrs:
|
||||
.data <VERS 0x8C4ED300 0x8C4E6DA0 0x8C4ED300 0x8C4DC800>
|
||||
.data <VERS 0x8C4ED344 0x8C4E6DE4 0x8C4ED344 0x8C4DC844>
|
||||
.data <VERS 0x8C4E8D88 0x8C4E2828 0x8C4E8D88 0x8C4D8288>
|
||||
|
||||
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
start:
|
||||
li r0, 0
|
||||
stw [r13 - <VERS 0x4760 0x4758 0x4738 0x4738 0x4748 0x4748 0x4728 0x46E8>], r0
|
||||
stw [r13 - <VERS 0x475C 0x4754 0x4734 0x4734 0x4744 0x4744 0x4724 0x46E4>], r0
|
||||
li r0, 1
|
||||
sth [r13 - <VERS 0x4950 0x4948 0x4928 0x4928 0x4938 0x4938 0x4918 0x48D8>], r0
|
||||
blr
|
||||
|
||||
|
||||
|
||||
.versions 4OJB 4OJD 4OJU 4OED 4OEU 4OPD 4OPU
|
||||
start:
|
||||
xor eax, eax
|
||||
mov [<VERS 0x0062D374 0x0062D914 0x0063544C 0x00632934 0x006321CC 0x00632934 0x00632CCC>], eax # is_in_quest = false
|
||||
mov [<VERS 0x0062D370 0x0062D910 0x00635448 0x00632930 0x006321C8 0x00632930 0x00632CC8>], eax # dat_source_type = NONE
|
||||
inc eax
|
||||
mov [<VERS 0x0071E8E8 0x0071EF48 0x00726A88 0x00723F88 0x00723808 0x00723F88 0x00724308>], ax # should_leave_game = true
|
||||
ret
|
||||
|
||||
|
||||
|
||||
.versions 59NJ 59NL
|
||||
start:
|
||||
xor eax, eax
|
||||
mov [<VERS 0x00A931A4 0x00A95624>], eax # is_in_quest = false
|
||||
mov [<VERS 0x00A93160 0x00A955E0>], eax # dat_source_type = NONE
|
||||
inc eax
|
||||
mov [<VERS 0x00AAC254 0x00AAE6D4>], ax # should_leave_game = true
|
||||
ret
|
||||
@@ -1,28 +0,0 @@
|
||||
# This function implements $exit in a game when no quest is loaded.
|
||||
|
||||
.meta name="Exit anywhere"
|
||||
.meta description=""
|
||||
.meta hide_from_patches_menu
|
||||
|
||||
.versions 2OJ5 2OJF 2OEF 2OPF
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
|
||||
start:
|
||||
mov r2, 0
|
||||
mova r0, [addrs]
|
||||
mov.l r1, [r0]
|
||||
mov.l [r1], r2
|
||||
mov.l r1, [r0 + 4]
|
||||
mov.l [r1], r2
|
||||
mov r2, 1
|
||||
mov.l r1, [r0 + 8]
|
||||
rets
|
||||
mov.w [r1], r2
|
||||
.align 4
|
||||
addrs:
|
||||
.data <VERS 0x8C4ED300 0x8C4E6DA0 0x8C4ED300 0x8C4DC800>
|
||||
.data <VERS 0x8C4ED344 0x8C4E6DE4 0x8C4ED344 0x8C4DC844>
|
||||
.data <VERS 0x8C4E8D88 0x8C4E2828 0x8C4E8D88 0x8C4D8288>
|
||||
@@ -1,19 +0,0 @@
|
||||
# This function implements $exit in a game when no quest is loaded.
|
||||
|
||||
.meta name="Exit anywhere"
|
||||
.meta description=""
|
||||
.meta hide_from_patches_menu
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
|
||||
start:
|
||||
li r0, 0
|
||||
stw [r13 - <VERS 0x4760 0x4758 0x4738 0x4738 0x4748 0x4748 0x4728 0x46E8>], r0
|
||||
stw [r13 - <VERS 0x475C 0x4754 0x4734 0x4734 0x4744 0x4744 0x4724 0x46E4>], r0
|
||||
li r0, 1
|
||||
sth [r13 - <VERS 0x4950 0x4948 0x4928 0x4928 0x4938 0x4938 0x4918 0x48D8>], r0
|
||||
blr
|
||||
@@ -1,19 +0,0 @@
|
||||
# This function implements $exit in a game when no quest is loaded.
|
||||
|
||||
.meta name="Exit anywhere"
|
||||
.meta description=""
|
||||
.meta hide_from_patches_menu
|
||||
|
||||
.versions 4OJB 4OJD 4OJU 4OED 4OEU 4OPD 4OPU
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
|
||||
start:
|
||||
xor eax, eax
|
||||
mov [<VERS 0x0062D374 0x0062D914 0x0063544C 0x00632934 0x006321CC 0x00632934 0x00632CCC>], eax # is_in_quest = false
|
||||
mov [<VERS 0x0062D370 0x0062D910 0x00635448 0x00632930 0x006321C8 0x00632930 0x00632CC8>], eax # dat_source_type = NONE
|
||||
inc eax
|
||||
mov [<VERS 0x0071E8E8 0x0071EF48 0x00726A88 0x00723F88 0x00723808 0x00723F88 0x00724308>], ax # should_leave_game = true
|
||||
ret
|
||||
@@ -1,19 +0,0 @@
|
||||
# This function implements $exit in a game when no quest is loaded.
|
||||
|
||||
.meta name="Exit anywhere"
|
||||
.meta description=""
|
||||
.meta hide_from_patches_menu
|
||||
|
||||
.versions 59NJ 59NL
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
|
||||
start:
|
||||
xor eax, eax
|
||||
mov [<VERS 0x00A931A4 0x00A95624>], eax # is_in_quest = false
|
||||
mov [<VERS 0x00A93160 0x00A955E0>], eax # dat_source_type = NONE
|
||||
inc eax
|
||||
mov [<VERS 0x00AAC254 0x00AAE6D4>], ax # should_leave_game = true
|
||||
ret
|
||||
+4
-5
@@ -1,3 +1,4 @@
|
||||
.meta visibility="all"
|
||||
.meta name="Ext item info"
|
||||
.meta description="Shows more info\nbefore picking up\nan item"
|
||||
|
||||
@@ -7,7 +8,7 @@ entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksGC
|
||||
.include WriteCodeBlocks
|
||||
|
||||
.data <VERS 0x804CA3D8 0x804CDB28 0x804D0078 0x804CFE18 0x804CABA8 0x804CB088 0x804CF6F0 0x804CFAE0>
|
||||
.data 0x00000004
|
||||
@@ -132,8 +133,7 @@ set_window_state: # (TItem* item: r3) -> void
|
||||
cmplwi r3, 0
|
||||
beq window_should_not_exist
|
||||
|
||||
# Only show the window for weapons, armors, shields, and mags (not for
|
||||
# units, tools, or meseta)
|
||||
# Only show the window for weapons, armors, shields, and mags (not for units, tools, or meseta)
|
||||
lhz r4, [r3 + 0xEC] # data[0] and data[1]
|
||||
cmplwi r4, 0x0103
|
||||
beq window_should_not_exist
|
||||
@@ -145,8 +145,7 @@ set_window_state: # (TItem* item: r3) -> void
|
||||
cmplwi r3, 0
|
||||
bne window_should_not_exist
|
||||
|
||||
# If the TWindowMainMenu1P exists and is visible, the TWindowHelpItem should
|
||||
# not be visible
|
||||
# If the TWindowMainMenu1P exists and is visible, the TWindowHelpItem should not be visible
|
||||
lis r3, 0x8000
|
||||
lwz r3, [r3 + 0x4004]
|
||||
cmplwi r3, 0
|
||||
@@ -0,0 +1,96 @@
|
||||
.meta visibility="all"
|
||||
.meta name="Fast tekker"
|
||||
.meta description="Skips wind-up sound\nat tekker window"
|
||||
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocks
|
||||
|
||||
|
||||
|
||||
.versions 1OJ1 1OJ2 1OJ3 1OJ4 1OJF 1OEF 1OPF 2OJ4 2OJ5 2OJF 2OEF 2OPF
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C15B0CA 0x8C162302 0x8C175E66 0x8C1780AE 0x8C17600E 0x8C17863E 0x8C1783FA 0x8C19BD4A 0x8C19BD4A 0x8C19ADB6 0x8C19BD4A 0x8C19B7E2>
|
||||
.data 0x00000002
|
||||
mov r1, 1
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C15B0E6 0x8C16231E 0x8C175E82 0x8C1780CA 0x8C17602A 0x8C17865A 0x8C178416 0x8C19BD66 0x8C19BD66 0x8C19ADD2 0x8C19BD66 0x8C19B7FE>
|
||||
.data 0x00000002
|
||||
nop
|
||||
|
||||
.align 4
|
||||
|
||||
|
||||
|
||||
.versions 3OJT 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x8026FAE8 0x8021F8CC 0x80220250 0x80221154 0x80220EF0 0x80220170 0x80220170 0x80221224 0x80220ABC>
|
||||
.data 4
|
||||
li r0, 1
|
||||
|
||||
.data <VERS 0x8026FB10 0x8021F8F4 0x80220278 0x8022117C 0x80220F18 0x80220198 0x80220198 0x8022124C 0x80220AE4>
|
||||
.data 4
|
||||
nop
|
||||
|
||||
|
||||
|
||||
.versions 4OJB 4OJD 4OJU 4OED 4OEU 4OPD 4OPU
|
||||
|
||||
.data <VERS 0x0023EC5C 0x0023EEAC 0x0023F21C 0x0023EF3C 0x0023F0BC 0x0023EF5C 0x0023F14C>
|
||||
.deltaof patch1_start, patch1_end
|
||||
patch1_start:
|
||||
mov dword [ebp + 0x14C], 1
|
||||
patch1_end:
|
||||
|
||||
.data <VERS 0x0023EC77 0x0023EEC7 0x0023F237 0x0023EF57 0x0023F0D7 0x0023EF77 0x0023F167>
|
||||
.deltaof patch2_start, patch2_end
|
||||
patch2_start:
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
patch2_end:
|
||||
|
||||
|
||||
|
||||
.versions 59NJ 59NL
|
||||
|
||||
.data <VERS 0x006DA14B 0x006DA113>
|
||||
.deltaof patch1_start, patch1_end
|
||||
patch1_start:
|
||||
mov dword [edi + 0x14C], 1
|
||||
patch1_end:
|
||||
|
||||
.data <VERS 0x006DA168 0x006DA130>
|
||||
.deltaof patch2_start, patch2_end
|
||||
patch2_start:
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
patch2_end:
|
||||
|
||||
|
||||
|
||||
.all_versions
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -1,24 +0,0 @@
|
||||
.meta name="Fast tekker"
|
||||
.meta description="Skips wind-up sound\nat tekker window"
|
||||
|
||||
.versions 1OJ1 1OJ2 1OJ3 1OJ4 1OJF 1OEF 1OPF 2OJ4 2OJ5 2OJF 2OEF 2OPF
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksDC
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C15B0CA 0x8C162302 0x8C175E66 0x8C1780AE 0x8C17600E 0x8C17863E 0x8C1783FA 0x8C19BD4A 0x8C19BD4A 0x8C19ADB6 0x8C19BD4A 0x8C19B7E2>
|
||||
.data 0x00000002
|
||||
mov r1, 1
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C15B0E6 0x8C16231E 0x8C175E82 0x8C1780CA 0x8C17602A 0x8C17865A 0x8C178416 0x8C19BD66 0x8C19BD66 0x8C19ADD2 0x8C19BD66 0x8C19B7FE>
|
||||
.data 0x00000002
|
||||
nop
|
||||
|
||||
.align 4
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -1,21 +0,0 @@
|
||||
.meta name="Fast tekker"
|
||||
.meta description="Skips wind-up sound\nat tekker window"
|
||||
|
||||
.versions 3OJT 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksGC
|
||||
|
||||
.data <VERS 0x8026FAE8 0x8021F8CC 0x80220250 0x80221154 0x80220EF0 0x80220170 0x80220170 0x80221224 0x80220ABC>
|
||||
.data 4
|
||||
li r0, 1
|
||||
|
||||
.data <VERS 0x8026FB10 0x8021F8F4 0x80220278 0x8022117C 0x80220F18 0x80220198 0x80220198 0x8022124C 0x80220AE4>
|
||||
.data 4
|
||||
nop
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -1,34 +0,0 @@
|
||||
.meta name="Fast tekker"
|
||||
.meta description="Skips wind-up sound\nat tekker window"
|
||||
|
||||
.versions 4OJB 4OJD 4OJU 4OED 4OEU 4OPD 4OPU
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksXB
|
||||
|
||||
.data <VERS 0x0023EC5C 0x0023EEAC 0x0023F21C 0x0023EF3C 0x0023F0BC 0x0023EF5C 0x0023F14C>
|
||||
.deltaof patch1_start, patch1_end
|
||||
patch1_start:
|
||||
mov dword [ebp + 0x14C], 1
|
||||
patch1_end:
|
||||
|
||||
.data <VERS 0x0023EC77 0x0023EEC7 0x0023F237 0x0023EF57 0x0023F0D7 0x0023EF77 0x0023F167>
|
||||
.deltaof patch2_start, patch2_end
|
||||
patch2_start:
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
patch2_end:
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -1,35 +0,0 @@
|
||||
.meta name="Fast tekker"
|
||||
.meta description="Skips wind-up sound\nat tekker window"
|
||||
|
||||
.versions 59NJ 59NL
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksBB
|
||||
|
||||
.data <VERS 0x006DA14B 0x006DA113>
|
||||
.deltaof patch1_start, patch1_end
|
||||
patch1_start:
|
||||
mov dword [edi + 0x14C], 1
|
||||
patch1_end:
|
||||
|
||||
.data <VERS 0x006DA168 0x006DA130>
|
||||
.deltaof patch2_start, patch2_end
|
||||
patch2_start:
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
patch2_end:
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
+51
-5
@@ -1,17 +1,59 @@
|
||||
.meta name="Blinking SD"
|
||||
.meta description="Makes the Shifta\nand Deband status\nicons flicker when\nthey are about\nto run out"
|
||||
# Original code by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
# Xbox port by fuzziqersoftware
|
||||
|
||||
.versions 4OJB 4OJD 4OJU 4OED 4OEU 4OPD 4OPU
|
||||
.meta visibility="all"
|
||||
.meta name="Blinking SD"
|
||||
.meta description="Makes the Shifta\nand Deband status\nicons flicker when\nthey are about\nto run out"
|
||||
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksXB
|
||||
.include WriteCodeBlocks
|
||||
|
||||
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data 0x8000B86C
|
||||
.data 0x00000054
|
||||
.address 0x8000B86C
|
||||
code_start:
|
||||
mr r3, r0
|
||||
andi. r0, r31, 2
|
||||
beqlr
|
||||
lwz r4, [r3 + 0x0028]
|
||||
cmplwi r4, 0
|
||||
beqlr
|
||||
lwz r4, [r4]
|
||||
cmplwi r4, 0
|
||||
beqlr
|
||||
mulli r0, r31, 12
|
||||
add r5, r29, r0
|
||||
lwz r6, [r5 + 0x025C]
|
||||
cmplwi r6, 450
|
||||
bge full_intensity
|
||||
lbz r6, [r4 + 0x002C]
|
||||
subi r6, r6, 0x0008
|
||||
cmpwi r6, 0
|
||||
bge not_full_intensity
|
||||
full_intensity:
|
||||
li r6, 0x00FF
|
||||
not_full_intensity:
|
||||
stb [r4 + 0x002C], r6
|
||||
blr
|
||||
code_end:
|
||||
|
||||
.data <VERS 0x8026DF94 0x8026EC58 0x8026FCB4 0x8026FA68 0x8026E7F4 0x8026E7F4 0x8026FC1C 0x8026F464>
|
||||
.data 4
|
||||
.address <VERS 0x8026DF94 0x8026EC58 0x8026FCB4 0x8026FA68 0x8026E7F4 0x8026E7F4 0x8026FC1C 0x8026F464>
|
||||
bl code_start
|
||||
|
||||
|
||||
|
||||
.versions 4OJB 4OJD 4OJU 4OED 4OEU 4OPD 4OPU
|
||||
|
||||
.data <VERS 0x0027782A 0x00277ADA 0x00277EEA 0x00277C0A 0x00277D2A 0x00277C2A 0x00277DFA>
|
||||
.data 5
|
||||
@@ -58,5 +100,9 @@ skip:
|
||||
jmp edx
|
||||
code_end:
|
||||
|
||||
|
||||
|
||||
.all_versions
|
||||
|
||||
.data 0
|
||||
.data 0
|
||||
@@ -1,50 +0,0 @@
|
||||
.meta name="Blinking SD"
|
||||
.meta description="Makes the Shifta\nand Deband status\nicons flicker when\nthey are about\nto run out"
|
||||
# Original code by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksGC
|
||||
|
||||
.data 0x8000B86C
|
||||
.data 0x00000054
|
||||
.address 0x8000B86C
|
||||
code_start:
|
||||
mr r3, r0
|
||||
andi. r0, r31, 2
|
||||
beqlr
|
||||
lwz r4, [r3 + 0x0028]
|
||||
cmplwi r4, 0
|
||||
beqlr
|
||||
lwz r4, [r4]
|
||||
cmplwi r4, 0
|
||||
beqlr
|
||||
mulli r0, r31, 12
|
||||
add r5, r29, r0
|
||||
lwz r6, [r5 + 0x025C]
|
||||
cmplwi r6, 450
|
||||
bge full_intensity
|
||||
lbz r6, [r4 + 0x002C]
|
||||
subi r6, r6, 0x0008
|
||||
cmpwi r6, 0
|
||||
bge not_full_intensity
|
||||
full_intensity:
|
||||
li r6, 0x00FF
|
||||
not_full_intensity:
|
||||
stb [r4 + 0x002C], r6
|
||||
blr
|
||||
code_end:
|
||||
|
||||
.data <VERS 0x8026DF94 0x8026EC58 0x8026FCB4 0x8026FA68 0x8026E7F4 0x8026E7F4 0x8026FC1C 0x8026F464>
|
||||
.data 4
|
||||
.address <VERS 0x8026DF94 0x8026EC58 0x8026FCB4 0x8026FA68 0x8026E7F4 0x8026E7F4 0x8026FC1C 0x8026F464>
|
||||
bl code_start
|
||||
|
||||
.data 0
|
||||
.data 0
|
||||
+5
-3
@@ -1,16 +1,18 @@
|
||||
.meta name="GC targets"
|
||||
.meta description="Changes the target\nreticle colors to\nthose used on the\nGameCube"
|
||||
# Original code by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
|
||||
.meta visibility="all"
|
||||
.meta name="GC targets"
|
||||
.meta description="Changes the target\nreticle colors to\nthose used on the\nGameCube"
|
||||
|
||||
.versions 4OED 4OEU 4OJB 4OJD 4OJU 4OPD 4OPU
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksXB
|
||||
.include WriteCodeBlocks
|
||||
|
||||
.data <VERS 0x0025BD09 0x0025BE29 0x0025B889 0x0025BC39 0x0025BFB9 0x0025BD29 0x0025BE59>
|
||||
.data 0x00000004
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
.meta hide_from_patches_menu
|
||||
.meta name="GetExtendedPlayerInfo"
|
||||
.meta key="GetExtendedPlayerInfo"
|
||||
.meta name="Get extended player info"
|
||||
.meta description=""
|
||||
|
||||
.versions 2OJ5 2OJF 2OEF 2OPF
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
.meta hide_from_patches_menu
|
||||
.meta name="GetExtendedPlayerInfo"
|
||||
.meta key="GetExtendedPlayerInfo"
|
||||
.meta name="Get extended player info"
|
||||
.meta description=""
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0 3SJT 3SJ0 3SE0 3SP0
|
||||
+4
-2
@@ -1,7 +1,9 @@
|
||||
.meta hide_from_patches_menu
|
||||
.meta name="GetExtendedPlayerInfo"
|
||||
.meta key="GetExtendedPlayerInfo"
|
||||
.meta name="Get extended player info"
|
||||
.meta description=""
|
||||
|
||||
.versions 3OJT
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
.meta hide_from_patches_menu
|
||||
.meta name="GetExtendedPlayerInfo"
|
||||
.meta key="GetExtendedPlayerInfo"
|
||||
.meta name="Get extended player info"
|
||||
.meta description=""
|
||||
|
||||
.versions 4OJB 4OJD 4OJU 4OED 4OEU 4OPD 4OPU
|
||||
+75
-4
@@ -1,17 +1,55 @@
|
||||
.meta name="MAG alert"
|
||||
.meta description="Plays a sound when\nyour MAG is hungry"
|
||||
# Original code by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
# Xbox port by fuzziqersoftware
|
||||
|
||||
.versions 4OJB 4OJD 4OJU 4OED 4OEU 4OPD 4OPU
|
||||
.meta visibility="all"
|
||||
.meta name="Mag alert"
|
||||
.meta description="Plays a sound when\nyour Mag is hungry"
|
||||
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
|
||||
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.label play_sound, <VERS 0x800336AC 0x800336DC 0x800336F8 0x8003368C 0x800338CC 0x800338CC 0x80033894 0x8003390C>
|
||||
|
||||
start:
|
||||
.include WriteCodeBlocksXB
|
||||
.include WriteCodeBlocks
|
||||
|
||||
.data 0x8000BF30
|
||||
.deltaof code_start, code_end
|
||||
.address 0x8000BF30
|
||||
code_start: # [std] (TItemMag* this @ r3) -> void
|
||||
lwz r4, [r3 + 0xF0]
|
||||
lhz r4, [r4 + 0x1C] # r4 = this->owner_player->entity_id
|
||||
lwz r5, [r13 - <VERS 0x5298 0x5290 0x5270 0x5270 0x5280 0x5280 0x5260 0x5220>] # local_client_id
|
||||
cmpl r4, r5
|
||||
bnelr
|
||||
lis r3, 0x0002
|
||||
ori r3, r3, 0x2825
|
||||
li r4, 0
|
||||
b play_sound
|
||||
code_end:
|
||||
|
||||
.data <VERS 0x80110D94 0x80110F94 0x80111080 0x80110F20 0x80111038 0x80111038 0x80110F30 0x80111114>
|
||||
.data 0x00000004
|
||||
.address <VERS 0x80110D94 0x80110F94 0x80111080 0x80110F20 0x80111038 0x80111038 0x80110F30 0x80111114>
|
||||
b code_start
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
|
||||
|
||||
|
||||
.versions 4OJB 4OJD 4OJU 4OED 4OEU 4OPD 4OPU
|
||||
|
||||
start:
|
||||
.include WriteCodeBlocks
|
||||
|
||||
.data <VERS 0x00180EF5 0x00181075 0x00181125 0x00181065 0x00181095 0x00181085 0x00181055>
|
||||
.data 0x0A
|
||||
@@ -81,3 +119,36 @@ hook6_end:
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
|
||||
|
||||
|
||||
.versions 59NJ 59NL
|
||||
|
||||
start:
|
||||
pop ecx
|
||||
push 6
|
||||
push <VERS 0x005D91BE 0x005D91E2>
|
||||
call get_code_size
|
||||
.deltaof patch_code, patch_code_end
|
||||
get_code_size:
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call patch_code_end
|
||||
patch_code: # [eax] (TItemMag* this @ ecx) -> void
|
||||
mov dword [ecx + 0x01B8], eax
|
||||
mov eax, [ecx + 0x00F8]
|
||||
movzx eax, word [eax + 0x001C] # eax = this->owner_player->entity_id
|
||||
cmp [<VERS 0x00A9A074 0x00A9C4F4>], eax
|
||||
jne patch_code_skip_sound
|
||||
push 0
|
||||
push 0
|
||||
push 0
|
||||
push 0xAC
|
||||
mov eax, <VERS 0x00815020 0x00814298>
|
||||
call eax
|
||||
add esp, 0x10
|
||||
patch_code_skip_sound:
|
||||
ret
|
||||
patch_code_end:
|
||||
push ecx
|
||||
.include WriteCallToCode
|
||||
@@ -1,38 +0,0 @@
|
||||
.meta name="Mag alert"
|
||||
.meta description="Plays a sound when\nyour Mag is hungry"
|
||||
# Original code by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksGC
|
||||
|
||||
.label play_sound, <VERS 0x800336AC 0x800336DC 0x800336F8 0x8003368C 0x800338CC 0x800338CC 0x80033894 0x8003390C>
|
||||
|
||||
.data 0x8000BF30
|
||||
.deltaof code_start, code_end
|
||||
.address 0x8000BF30
|
||||
code_start: # [std] (TItemMag* this @ r3) -> void
|
||||
lwz r4, [r3 + 0xF0]
|
||||
lhz r4, [r4 + 0x1C] # r4 = this->owner_player->entity_id
|
||||
lwz r5, [r13 - <VERS 0x5298 0x5290 0x5270 0x5270 0x5280 0x5280 0x5260 0x5220>] # local_client_id
|
||||
cmpl r4, r5
|
||||
bnelr
|
||||
lis r3, 0x0002
|
||||
ori r3, r3, 0x2825
|
||||
li r4, 0
|
||||
b play_sound
|
||||
code_end:
|
||||
|
||||
.data <VERS 0x80110D94 0x80110F94 0x80111080 0x80110F20 0x80111038 0x80111038 0x80110F30 0x80111114>
|
||||
.data 0x00000004
|
||||
.address <VERS 0x80110D94 0x80110F94 0x80111080 0x80110F20 0x80111038 0x80111038 0x80110F30 0x80111114>
|
||||
b code_start
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -1,34 +0,0 @@
|
||||
.meta name="MAG alert"
|
||||
.meta description="Plays a sound when\nyour MAG is hungry"
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
pop ecx
|
||||
push 6
|
||||
push 0x005D91BE
|
||||
call get_code_size
|
||||
.deltaof patch_code, patch_code_end
|
||||
get_code_size:
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call patch_code_end
|
||||
patch_code: # [eax] (TItemMag* this @ ecx) -> void
|
||||
mov dword [ecx + 0x01B8], eax
|
||||
mov eax, [ecx + 0x00F8]
|
||||
movzx eax, word [eax + 0x001C] # eax = this->owner_player->entity_id
|
||||
cmp [0x00A9A074], eax
|
||||
jne patch_code_skip_sound
|
||||
push 0
|
||||
push 0
|
||||
push 0
|
||||
push 0xAC
|
||||
mov eax, 0x00815020
|
||||
call eax
|
||||
add esp, 0x10
|
||||
patch_code_skip_sound:
|
||||
ret
|
||||
patch_code_end:
|
||||
push ecx
|
||||
.include WriteCallToCode-59NJ
|
||||
@@ -1,34 +0,0 @@
|
||||
.meta name="MAG alert"
|
||||
.meta description="Plays a sound when\nyour MAG is hungry"
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
pop ecx
|
||||
push 6
|
||||
push 0x005D91E2
|
||||
call get_code_size
|
||||
.deltaof patch_code, patch_code_end
|
||||
get_code_size:
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call patch_code_end
|
||||
patch_code: # [eax] (TItemMag* this @ ecx) -> void
|
||||
mov dword [ecx + 0x01B8], eax
|
||||
mov eax, [ecx + 0x00F8]
|
||||
movzx eax, word [eax + 0x001C] # eax = this->owner_player->entity_id
|
||||
cmp [0x00A9C4F4], eax
|
||||
jne patch_code_skip_sound
|
||||
push 0
|
||||
push 0
|
||||
push 0
|
||||
push 0xAC
|
||||
mov eax, 0x00814298
|
||||
call eax
|
||||
add esp, 0x10
|
||||
patch_code_skip_sound:
|
||||
ret
|
||||
patch_code_end:
|
||||
push ecx
|
||||
.include WriteCallToCode-59NL
|
||||
@@ -0,0 +1,45 @@
|
||||
# Original code by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
# DC and Xbox ports by fuzziqersoftware
|
||||
|
||||
.meta visibility="all"
|
||||
.meta name="Invisible MAG"
|
||||
.meta description="Makes MAGs invisible"
|
||||
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocks
|
||||
|
||||
|
||||
|
||||
.versions 1OJ2 1OJ3 1OJ4 1OJF 1OEF 1OPF 2OJ4 2OJ5 2OJF 2OEF 2OPF
|
||||
.align 4
|
||||
.data <VERS 0x8C1AADD8 0x8C1C7408 0x8C1C9E9C 0x8C1C75B4 0x8C1CA49C 0x8C1CA240 0x8C1F27E8 0x8C1F27E8 0x8C1F17F0 0x8C1F27E8 0x8C1F2354>
|
||||
.data 0x00000004
|
||||
rets
|
||||
nop
|
||||
.align 4
|
||||
|
||||
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
.data <VERS 0x80114F04 0x80115118 0x8011521C 0x801150B0 0x801151A8 0x801151A8 0x801150C0 0x80115298>
|
||||
.data 0x00000004
|
||||
.data 0x480000D4
|
||||
|
||||
|
||||
|
||||
.versions 4OJB 4OJD 4OJU 4OED 4OEU 4OPD 4OPU
|
||||
.data <VERS 0x001837C1 0x00183951 0x00183A01 0x00183941 0x00183971 0x00183961 0x00183931>
|
||||
.data 0x00000002
|
||||
.binary 90E9
|
||||
|
||||
|
||||
|
||||
.all_versions
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -1,24 +0,0 @@
|
||||
.meta name="Invisible MAG"
|
||||
.meta description="Makes MAGs invisible"
|
||||
# Original code by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
# DC port by fuzziqersoftware
|
||||
|
||||
.versions 1OJ2 1OJ3 1OJ4 1OJF 1OEF 1OPF 2OJ4 2OJ5 2OJF 2OEF 2OPF
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksDC
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C1AADD8 0x8C1C7408 0x8C1C9E9C 0x8C1C75B4 0x8C1CA49C 0x8C1CA240 0x8C1F27E8 0x8C1F27E8 0x8C1F17F0 0x8C1F27E8 0x8C1F2354>
|
||||
.data 0x00000004
|
||||
rets
|
||||
nop
|
||||
|
||||
.align 4
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -1,20 +0,0 @@
|
||||
.meta name="Invisible MAG"
|
||||
.meta description="Makes MAGs invisible"
|
||||
# Original code by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksGC
|
||||
|
||||
.data <VERS 0x80114F04 0x80115118 0x8011521C 0x801150B0 0x801151A8 0x801151A8 0x801150C0 0x80115298>
|
||||
.data 0x00000004
|
||||
.data 0x480000D4
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -1,19 +0,0 @@
|
||||
.meta name="Invisible MAG"
|
||||
.meta description="Makes MAGs invisible"
|
||||
# Original code by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
# Xbox port by fuzziqersoftware
|
||||
|
||||
.versions 4OJB 4OJD 4OJU 4OED 4OEU 4OPD 4OPU
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksXB
|
||||
.data <VERS 0x001837C1 0x00183951 0x00183A01 0x00183941 0x00183971 0x00183961 0x00183931>
|
||||
.data 0x00000002
|
||||
.binary 90E9
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -0,0 +1,240 @@
|
||||
.meta visibility="all"
|
||||
.meta name="No item loss"
|
||||
.meta description="Disables logic that\ndeletes items if\nyou don't log off\nnormally"
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocks
|
||||
|
||||
|
||||
|
||||
.versions 1OJ4 1OEF 1OPF
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C0254B2 0x8C0254BE 0x8C0254D2>
|
||||
.data 4
|
||||
bs +0x38
|
||||
nop
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C150B2C 0x8C150F9C 0x8C150D58>
|
||||
.data 2
|
||||
sett
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C15F346 0x8C15F856 0x8C15F612>
|
||||
.data 2
|
||||
and r0, 0xFE
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C16053A 0x8C160A4A 0x8C160806>
|
||||
.data 2
|
||||
and r0, 0xFE
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C1617DA 0x8C161D6A 0x8C161B26>
|
||||
.data 2
|
||||
and r0, 0xFE
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C15F3BA 0x8C15F8CA 0x8C15F686>
|
||||
.data 2
|
||||
nop
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C1605A6 0x8C160AB6 0x8C160872>
|
||||
.data 2
|
||||
nop
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C161808 0x8C161D98 0x8C161B54>
|
||||
.data 2
|
||||
nop
|
||||
|
||||
.align 4
|
||||
|
||||
|
||||
|
||||
.versions 1OJ2
|
||||
|
||||
.align 4
|
||||
.data 0x8C14C71A
|
||||
.data 2
|
||||
nop
|
||||
.align 4
|
||||
|
||||
|
||||
|
||||
.versions 2OJ4 2OJ5 2OJF 2OEF 2OPF
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C0280AA 0x8C0280AA 0x8C028276 0x8C0280AA 0x8C0280AA>
|
||||
.data 6
|
||||
nop
|
||||
bs +0x2C
|
||||
nop
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C16BDFE 0x8C16BDFE 0x8C16B50A 0x8C16BDFE 0x8C16BA22>
|
||||
.data 2
|
||||
sett
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C17F1DC 0x8C17F1DC 0x8C17E738 0x8C17F1DC 0x8C17EC74>
|
||||
.data 2
|
||||
and r0, 0xFE
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C17F2BA 0x8C17F2BA 0x8C17E816 0x8C17F2BA 0x8C17ED52>
|
||||
.data 2
|
||||
nop
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C180D0A 0x8C180D0A 0x8C18005A 0x8C180D0A 0x8C1807A2>
|
||||
.data 2
|
||||
and r0, 0xFE
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C180DB0 0x8C180DB0 0x8C180100 0x8C180DB0 0x8C180848>
|
||||
.data 2
|
||||
nop
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C181BC4 0x8C181BC4 0x8C180EC8 0x8C181BC4 0x8C18165C>
|
||||
.data 2
|
||||
and r0, 0xFE
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C181C92 0x8C181C92 0x8C180F96 0x8C181C92 0x8C18172A>
|
||||
.data 2
|
||||
nop
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C182BC6 0x8C182BC6 0x8C181DBE 0x8C182BC6 0x8C18265E>
|
||||
.data 2
|
||||
and r0, 0xFE
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C182BF4 0x8C182BF4 0x8C181DEC 0x8C182BF4 0x8C18268C>
|
||||
.data 2
|
||||
nop
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C1834D0 0x8C1834D0 0x8C1825F0 0x8C1834D0 0x8C182F68>
|
||||
.data 2
|
||||
and r0, 0xFE
|
||||
|
||||
.align 4
|
||||
|
||||
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x801D33E4 0x801D38EC 0x801D3CC4 0x801D39B8 0x801D381C 0x801D381C 0x801D3A1C 0x801D3ED8>
|
||||
.data 0x00000004
|
||||
b +0x4C
|
||||
|
||||
.data <VERS 0x801FE900 0x801FF174 0x8020010C 0x801FF710 0x801FF0FC 0x801FF0FC 0x801FFA44 0x801FF9E0>
|
||||
.data 0x00000004
|
||||
nop
|
||||
|
||||
.data <VERS 0x801FFE5C 0x802006D0 0x802016CC 0x80200C9C 0x80200658 0x80200658 0x80200FD0 0x80200F3C>
|
||||
.data 0x00000004
|
||||
nop
|
||||
|
||||
.data <VERS 0x802019C8 0x8020223C 0x801FD944 0x80202860 0x802021C4 0x802021C4 0x80202B94 0x80202AA8>
|
||||
.data 0x00000004
|
||||
li r0, 0
|
||||
|
||||
.data <VERS 0x802C2060 0x802C2F98 0x802C42E4 0x802C3E78 0x802C2A40 0x802C2A84 0x802C402C 0x802C37C0>
|
||||
.data 0x00000004
|
||||
b +0x4C
|
||||
|
||||
.data <VERS 0x802D0AA0 0x802D1A58 0x802D2C10 0x802D2938 0x802D1480 0x802D14C4 0x802D2AEC 0x802D2280>
|
||||
.data 0x00000004
|
||||
b +0x20
|
||||
|
||||
|
||||
|
||||
.versions 4OED 4OEU 4OJB 4OJD 4OJU 4OPD 4OPU
|
||||
|
||||
.data <VERS 0x000D1B85 0x000D1BD5 0x000D1A35 0x000D1B05 0x000D1AF5 0x000D1BA5 0x000D1BD5>
|
||||
.data 0x00000001
|
||||
.binary 00
|
||||
|
||||
.data <VERS 0x000D1BFC 0x000D1C4C 0x000D1AAC 0x000D1B7C 0x000D1B6C 0x000D1C1C 0x000D1C4C>
|
||||
.data 0x00000002
|
||||
.binary EB08
|
||||
|
||||
.data <VERS 0x0020E805 0x0020E805 0x0020E5D5 0x0020E755 0x0020E9D5 0x0020E825 0x0020E895>
|
||||
.data 0x00000001
|
||||
.binary EB
|
||||
|
||||
.data <VERS 0x002119CA 0x00211A2A 0x0021170A 0x0021197A 0x00211BFA 0x002119EA 0x00211ABA>
|
||||
.data 0x00000002
|
||||
.binary EB74
|
||||
|
||||
.data <VERS 0x002291B5 0x00229255 0x00228F15 0x00229125 0x00229415 0x002291D5 0x002292E5>
|
||||
.data 0x00000002
|
||||
.binary 9090
|
||||
|
||||
.data <VERS 0x00229237 0x002292D7 0x00228F97 0x002291A7 0x00229497 0x00229257 0x00229367>
|
||||
.data 0x00000002
|
||||
.binary EB08
|
||||
|
||||
.data <VERS 0x0022A222 0x0022A2C2 0x00229F82 0x0022A192 0x0022A482 0x0022A242 0x0022A352>
|
||||
.data 0x00000002
|
||||
.binary 9090
|
||||
|
||||
.data <VERS 0x0022A29B 0x0022A33B 0x00229FFB 0x0022A20B 0x0022A4FB 0x0022A2BB 0x0022A3CB>
|
||||
.data 0x00000002
|
||||
.binary EB08
|
||||
|
||||
.data <VERS 0x0022BF35 0x0022BFD5 0x0022BC95 0x0022BEA5 0x0022C195 0x0022BF55 0x0022C065>
|
||||
.data 0x00000001
|
||||
.binary 00
|
||||
|
||||
.data <VERS 0x0022BF6E 0x0022C00E 0x0022BCCE 0x0022BEDE 0x0022C1CE 0x0022BF8E 0x0022C09E>
|
||||
.data 0x00000002
|
||||
.binary EB08
|
||||
|
||||
.data <VERS 0x0022C2E6 0x0022C386 0x0022C046 0x0022C256 0x0022C546 0x0022C306 0x0022C416>
|
||||
.data 0x00000001
|
||||
.binary 00
|
||||
|
||||
.data <VERS 0x002418E8 0x00241A78 0x00241608 0x00241858 0x00241BD8 0x00241908 0x00241B08>
|
||||
.data 0x00000001
|
||||
.binary 00
|
||||
|
||||
.data <VERS 0x0024195C 0x00241AEC 0x0024167C 0x002418CC 0x00241C4C 0x0024197C 0x00241B7C>
|
||||
.data 0x00000002
|
||||
.binary EB08
|
||||
|
||||
.data <VERS 0x002A2904 0x002A2B34 0x002A0FA4 0x002A19F4 0x002A2EC4 0x002A2924 0x002A2BF4>
|
||||
.data 0x00000001
|
||||
.binary 00
|
||||
|
||||
.data <VERS 0x002A297C 0x002A2BAC 0x002A101C 0x002A1A6C 0x002A2F3C 0x002A299C 0x002A2C6C>
|
||||
.data 0x00000002
|
||||
.binary EB08
|
||||
|
||||
.data <VERS 0x002D677A 0x002D6C8A 0x002D481A 0x002D53DA 0x002D6CBA 0x002D67AA 0x002D6D0A>
|
||||
.data 0x00000001
|
||||
.binary 00
|
||||
|
||||
.data <VERS 0x002D67ED 0x002D6CFD 0x002D488D 0x002D544D 0x002D6D2D 0x002D681D 0x002D6D7D>
|
||||
.data 0x00000002
|
||||
.binary EB08
|
||||
|
||||
.data <VERS 0x002F0E1E 0x002F0FCE 0x002EEEBE 0x002EF9CE 0x002F0FCE 0x002F0E4E 0x002F103E>
|
||||
.data 0x00000001
|
||||
.binary EB
|
||||
|
||||
|
||||
|
||||
.all_versions
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -1,17 +0,0 @@
|
||||
.meta name="No item loss"
|
||||
.meta description="Disables logic that\ndeletes items if\nyou don't log off\nnormally"
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksDC
|
||||
|
||||
.align 4
|
||||
.data 0x8C14C71A
|
||||
.data 2
|
||||
nop
|
||||
|
||||
.align 4
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -1,55 +0,0 @@
|
||||
.meta name="No item loss"
|
||||
.meta description="Disables logic that\ndeletes items if\nyou don't log off\nnormally"
|
||||
|
||||
.versions 1OJ4 1OEF 1OPF
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksDC
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C0254B2 0x8C0254BE 0x8C0254D2>
|
||||
.data 4
|
||||
bs +0x38
|
||||
nop
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C150B2C 0x8C150F9C 0x8C150D58>
|
||||
.data 2
|
||||
sett
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C15F346 0x8C15F856 0x8C15F612>
|
||||
.data 2
|
||||
and r0, 0xFE
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C16053A 0x8C160A4A 0x8C160806>
|
||||
.data 2
|
||||
and r0, 0xFE
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C1617DA 0x8C161D6A 0x8C161B26>
|
||||
.data 2
|
||||
and r0, 0xFE
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C15F3BA 0x8C15F8CA 0x8C15F686>
|
||||
.data 2
|
||||
nop
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C1605A6 0x8C160AB6 0x8C160872>
|
||||
.data 2
|
||||
nop
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C161808 0x8C161D98 0x8C161B54>
|
||||
.data 2
|
||||
nop
|
||||
|
||||
.align 4
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -1,75 +0,0 @@
|
||||
.meta name="No item loss"
|
||||
.meta description="Disables logic that\ndeletes items if\nyou don't log off\nnormally"
|
||||
# Original code by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
# DCv2 port by fuzziqersoftware
|
||||
|
||||
.versions 2OJ4 2OJ5 2OJF 2OEF 2OPF
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksDC
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C0280AA 0x8C0280AA 0x8C028276 0x8C0280AA 0x8C0280AA>
|
||||
.data 6
|
||||
nop
|
||||
bs +0x2C
|
||||
nop
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C16BDFE 0x8C16BDFE 0x8C16B50A 0x8C16BDFE 0x8C16BA22>
|
||||
.data 2
|
||||
sett
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C17F1DC 0x8C17F1DC 0x8C17E738 0x8C17F1DC 0x8C17EC74>
|
||||
.data 2
|
||||
and r0, 0xFE
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C17F2BA 0x8C17F2BA 0x8C17E816 0x8C17F2BA 0x8C17ED52>
|
||||
.data 2
|
||||
nop
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C180D0A 0x8C180D0A 0x8C18005A 0x8C180D0A 0x8C1807A2>
|
||||
.data 2
|
||||
and r0, 0xFE
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C180DB0 0x8C180DB0 0x8C180100 0x8C180DB0 0x8C180848>
|
||||
.data 2
|
||||
nop
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C181BC4 0x8C181BC4 0x8C180EC8 0x8C181BC4 0x8C18165C>
|
||||
.data 2
|
||||
and r0, 0xFE
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C181C92 0x8C181C92 0x8C180F96 0x8C181C92 0x8C18172A>
|
||||
.data 2
|
||||
nop
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C182BC6 0x8C182BC6 0x8C181DBE 0x8C182BC6 0x8C18265E>
|
||||
.data 2
|
||||
and r0, 0xFE
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C182BF4 0x8C182BF4 0x8C181DEC 0x8C182BF4 0x8C18268C>
|
||||
.data 2
|
||||
nop
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C1834D0 0x8C1834D0 0x8C1825F0 0x8C1834D0 0x8C182F68>
|
||||
.data 2
|
||||
and r0, 0xFE
|
||||
|
||||
.align 4
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -1,40 +0,0 @@
|
||||
.meta name="No item loss"
|
||||
.meta description="Disables logic that\ndeletes items if\nyou don't log off\nnormally"
|
||||
# Original code by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksGC
|
||||
|
||||
.data <VERS 0x801D33E4 0x801D38EC 0x801D3CC4 0x801D39B8 0x801D381C 0x801D381C 0x801D3A1C 0x801D3ED8>
|
||||
.data 0x00000004
|
||||
b +0x4C
|
||||
|
||||
.data <VERS 0x801FE900 0x801FF174 0x8020010C 0x801FF710 0x801FF0FC 0x801FF0FC 0x801FFA44 0x801FF9E0>
|
||||
.data 0x00000004
|
||||
nop
|
||||
|
||||
.data <VERS 0x801FFE5C 0x802006D0 0x802016CC 0x80200C9C 0x80200658 0x80200658 0x80200FD0 0x80200F3C>
|
||||
.data 0x00000004
|
||||
nop
|
||||
|
||||
.data <VERS 0x802019C8 0x8020223C 0x801FD944 0x80202860 0x802021C4 0x802021C4 0x80202B94 0x80202AA8>
|
||||
.data 0x00000004
|
||||
li r0, 0
|
||||
|
||||
.data <VERS 0x802C2060 0x802C2F98 0x802C42E4 0x802C3E78 0x802C2A40 0x802C2A84 0x802C402C 0x802C37C0>
|
||||
.data 0x00000004
|
||||
b +0x4C
|
||||
|
||||
.data <VERS 0x802D0AA0 0x802D1A58 0x802D2C10 0x802D2938 0x802D1480 0x802D14C4 0x802D2AEC 0x802D2280>
|
||||
.data 0x00000004
|
||||
b +0x20
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -1,70 +0,0 @@
|
||||
.meta name="No item loss"
|
||||
.meta description="Disables logic that\ndeletes items if\nyou don't log off\nnormally"
|
||||
# Original code by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
# Xbox port by fuzziqersoftware
|
||||
|
||||
.versions 4OED 4OEU 4OJB 4OJD 4OJU 4OPD 4OPU
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksXB
|
||||
.data <VERS 0x000D1B85 0x000D1BD5 0x000D1A35 0x000D1B05 0x000D1AF5 0x000D1BA5 0x000D1BD5>
|
||||
.data 0x00000001
|
||||
.binary 00
|
||||
.data <VERS 0x000D1BFC 0x000D1C4C 0x000D1AAC 0x000D1B7C 0x000D1B6C 0x000D1C1C 0x000D1C4C>
|
||||
.data 0x00000002
|
||||
.binary EB08
|
||||
.data <VERS 0x0020E805 0x0020E805 0x0020E5D5 0x0020E755 0x0020E9D5 0x0020E825 0x0020E895>
|
||||
.data 0x00000001
|
||||
.binary EB
|
||||
.data <VERS 0x002119CA 0x00211A2A 0x0021170A 0x0021197A 0x00211BFA 0x002119EA 0x00211ABA>
|
||||
.data 0x00000002
|
||||
.binary EB74
|
||||
.data <VERS 0x002291B5 0x00229255 0x00228F15 0x00229125 0x00229415 0x002291D5 0x002292E5>
|
||||
.data 0x00000002
|
||||
.binary 9090
|
||||
.data <VERS 0x00229237 0x002292D7 0x00228F97 0x002291A7 0x00229497 0x00229257 0x00229367>
|
||||
.data 0x00000002
|
||||
.binary EB08
|
||||
.data <VERS 0x0022A222 0x0022A2C2 0x00229F82 0x0022A192 0x0022A482 0x0022A242 0x0022A352>
|
||||
.data 0x00000002
|
||||
.binary 9090
|
||||
.data <VERS 0x0022A29B 0x0022A33B 0x00229FFB 0x0022A20B 0x0022A4FB 0x0022A2BB 0x0022A3CB>
|
||||
.data 0x00000002
|
||||
.binary EB08
|
||||
.data <VERS 0x0022BF35 0x0022BFD5 0x0022BC95 0x0022BEA5 0x0022C195 0x0022BF55 0x0022C065>
|
||||
.data 0x00000001
|
||||
.binary 00
|
||||
.data <VERS 0x0022BF6E 0x0022C00E 0x0022BCCE 0x0022BEDE 0x0022C1CE 0x0022BF8E 0x0022C09E>
|
||||
.data 0x00000002
|
||||
.binary EB08
|
||||
.data <VERS 0x0022C2E6 0x0022C386 0x0022C046 0x0022C256 0x0022C546 0x0022C306 0x0022C416>
|
||||
.data 0x00000001
|
||||
.binary 00
|
||||
.data <VERS 0x002418E8 0x00241A78 0x00241608 0x00241858 0x00241BD8 0x00241908 0x00241B08>
|
||||
.data 0x00000001
|
||||
.binary 00
|
||||
.data <VERS 0x0024195C 0x00241AEC 0x0024167C 0x002418CC 0x00241C4C 0x0024197C 0x00241B7C>
|
||||
.data 0x00000002
|
||||
.binary EB08
|
||||
.data <VERS 0x002A2904 0x002A2B34 0x002A0FA4 0x002A19F4 0x002A2EC4 0x002A2924 0x002A2BF4>
|
||||
.data 0x00000001
|
||||
.binary 00
|
||||
.data <VERS 0x002A297C 0x002A2BAC 0x002A101C 0x002A1A6C 0x002A2F3C 0x002A299C 0x002A2C6C>
|
||||
.data 0x00000002
|
||||
.binary EB08
|
||||
.data <VERS 0x002D677A 0x002D6C8A 0x002D481A 0x002D53DA 0x002D6CBA 0x002D67AA 0x002D6D0A>
|
||||
.data 0x00000001
|
||||
.binary 00
|
||||
.data <VERS 0x002D67ED 0x002D6CFD 0x002D488D 0x002D544D 0x002D6D2D 0x002D681D 0x002D6D7D>
|
||||
.data 0x00000002
|
||||
.binary EB08
|
||||
.data <VERS 0x002F0E1E 0x002F0FCE 0x002EEEBE 0x002EF9CE 0x002F0FCE 0x002F0E4E 0x002F103E>
|
||||
.data 0x00000001
|
||||
.binary EB
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
+38
-4
@@ -1,16 +1,22 @@
|
||||
.meta name="Item pickup"
|
||||
.meta description="Prevents picking\nup items unless you\nhold the Z button"
|
||||
# Original code by Ralf @ GC-Forever
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
# Xbox port by fuzziqersoftware
|
||||
|
||||
.meta visibility="all"
|
||||
.meta name="Item pickup"
|
||||
.meta description="Prevents picking\nup items unless you\nhold the Z button"
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksGC
|
||||
.include WriteCodeBlocks
|
||||
|
||||
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.label hook_loc, 0x8000B938
|
||||
.data hook_loc
|
||||
@@ -38,5 +44,33 @@ hook_end:
|
||||
.data 0x00000004
|
||||
li r4, 8
|
||||
|
||||
|
||||
|
||||
.versions 4OED 4OEU 4OJB 4OJD 4OJU 4OPD 4OPU
|
||||
|
||||
.data <VERS 0x001FDC99 0x001FDC99 0x001FDA89 0x001FDBE9 0x001FDE69 0x001FDCB9 0x001FDD29>
|
||||
.data 0x07
|
||||
.binary E8880100009090
|
||||
|
||||
.data <VERS 0x001FDE26 0x001FDE26 0x001FDC16 0x001FDD76 0x001FDFF6 0x001FDE46 0x001FDEB6>
|
||||
.data 0x0A
|
||||
.binary 8B866C05000085C0EB46
|
||||
|
||||
.data <VERS 0x001FDE76 0x001FDE76 0x001FDC66 0x001FDDC6 0x001FE046 0x001FDE96 0x001FDF06>
|
||||
.data 0x09
|
||||
.binary 74038A40013408EB46
|
||||
|
||||
.data <VERS 0x001FDEC5 0x001FDEC5 0x001FDCB5 0x001FDE15 0x001FE095 0x001FDEE5 0x001FDF55>
|
||||
.data 0x0A
|
||||
.binary 7507F68624030000E0C3
|
||||
|
||||
.data <VERS 0x0025ADAD 0x0025AEED 0x0025A94D 0x0025ACCD 0x0025B07D 0x0025ADCD 0x0025AF1D>
|
||||
.data 0x01
|
||||
.binary 00
|
||||
|
||||
|
||||
|
||||
.all_versions
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -1,31 +0,0 @@
|
||||
.meta name="Item pickup"
|
||||
.meta description="Prevents picking\nup items unless you\nhold the white or\nblack button"
|
||||
# Original code by Ralf @ GC-Forever
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
# Xbox port by fuzziqersoftware
|
||||
|
||||
.versions 4OED 4OEU 4OJB 4OJD 4OJU 4OPD 4OPU
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksXB
|
||||
.data <VERS 0x001FDC99 0x001FDC99 0x001FDA89 0x001FDBE9 0x001FDE69 0x001FDCB9 0x001FDD29>
|
||||
.data 0x07
|
||||
.binary E8880100009090
|
||||
.data <VERS 0x001FDE26 0x001FDE26 0x001FDC16 0x001FDD76 0x001FDFF6 0x001FDE46 0x001FDEB6>
|
||||
.data 0x0A
|
||||
.binary 8B866C05000085C0EB46
|
||||
.data <VERS 0x001FDE76 0x001FDE76 0x001FDC66 0x001FDDC6 0x001FE046 0x001FDE96 0x001FDF06>
|
||||
.data 0x09
|
||||
.binary 74038A40013408EB46
|
||||
.data <VERS 0x001FDEC5 0x001FDEC5 0x001FDCB5 0x001FDE15 0x001FE095 0x001FDEE5 0x001FDF55>
|
||||
.data 0x0A
|
||||
.binary 7507F68624030000E0C3
|
||||
.data <VERS 0x0025ADAD 0x0025AEED 0x0025A94D 0x0025ACCD 0x0025B07D 0x0025ADCD 0x0025AF1D>
|
||||
.data 0x01
|
||||
.binary 00
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
+29
-4
@@ -1,13 +1,33 @@
|
||||
.meta name="Movement"
|
||||
.meta description="Fixes movement dead\nzone thresholds"
|
||||
# Original code by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
|
||||
.meta visibility="all"
|
||||
.meta name="Movement"
|
||||
.meta description="Allow backsteps and\nmovement when\nenemies are nearby"
|
||||
|
||||
.versions 4OED 4OEU 4OJB 4OJD 4OJU 4OPD 4OPU
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksXB
|
||||
.include WriteCodeBlocks
|
||||
|
||||
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.data <VERS 0x801CE7AC 0x801CECC0 0x801D0D10 0x801CED8C 0x801CEBF0 0x801CEBF0 0x801CEDF0 0x801CF2AC>
|
||||
.data 0x00000004
|
||||
b +0x0C
|
||||
|
||||
.data <VERS 0x801CF69C 0x801CFBB0 0x801D1CEC 0x801CFC7C 0x801CFAE0 0x801CFAE0 0x801CFCE0 0x801D019C>
|
||||
.data 0x00000004
|
||||
b +0x14
|
||||
|
||||
|
||||
|
||||
.versions 4OED 4OEU 4OJB 4OJD 4OJU 4OPD 4OPU
|
||||
|
||||
.data <VERS 0x00308E88 0x00308F08 0x003067D8 0x003073D8 0x00308F08 0x00308EB8 0x00309078>
|
||||
.deltaof code_start, code_end
|
||||
@@ -50,5 +70,10 @@ process_stick_value:
|
||||
|
||||
.zero 0x56
|
||||
code_end:
|
||||
|
||||
|
||||
|
||||
.all_versions
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -1,24 +0,0 @@
|
||||
.meta name="Movement"
|
||||
.meta description="Allow backsteps and\nmovement when\nenemies are nearby"
|
||||
# Original code by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksGC
|
||||
|
||||
.data <VERS 0x801CE7AC 0x801CECC0 0x801D0D10 0x801CED8C 0x801CEBF0 0x801CEBF0 0x801CEDF0 0x801CF2AC>
|
||||
.data 0x00000004
|
||||
b +0x0C
|
||||
|
||||
.data <VERS 0x801CF69C 0x801CFBB0 0x801D1CEC 0x801CFC7C 0x801CFAE0 0x801CFAE0 0x801CFCE0 0x801D019C>
|
||||
.data 0x00000004
|
||||
b +0x14
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -0,0 +1,123 @@
|
||||
# Original patch by Soly, in Blue Burst Patch Project
|
||||
# https://github.com/Solybum/Blue-Burst-Patch-Project
|
||||
# GC and Xbox ports by fuzziqersoftware
|
||||
|
||||
.meta visibility="all"
|
||||
.meta name="No rare selling"
|
||||
.meta description="Stops you from\naccidentally\nselling rares\nto shops"
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
|
||||
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
start:
|
||||
.include WriteCodeBlocks
|
||||
|
||||
# See comments in the 59NL version of this patch for details on how it works.
|
||||
|
||||
.data <VERS 0x8010DE70 0x8010E070 0x8010E1BC 0x8010DFFC 0x8010E114 0x8010E114 0x8010E00C 0x8010E1F0>
|
||||
.data 0x00000004
|
||||
li r29, 0
|
||||
|
||||
.data <VERS 0x8010DE5C 0x8010E05C 0x8010E1A8 0x8010DFE8 0x8010E100 0x8010E100 0x8010DFF8 0x8010E1DC>
|
||||
.data 0x00000004
|
||||
li r29, 0
|
||||
|
||||
.data <VERS 0x8010DFA4 0x8010E1A4 0x8010E2F0 0x8010E130 0x8010E248 0x8010E248 0x8010E140 0x8010E324>
|
||||
.data 0x00000004
|
||||
li r29, 0
|
||||
|
||||
.label tool_check_hook_loc, 0x800041A0
|
||||
.data tool_check_hook_loc
|
||||
.deltaof tool_check_hook_start, tool_check_hook_end
|
||||
.address tool_check_hook_loc
|
||||
tool_check_hook_start:
|
||||
lwz r29, [r3 + 0x10] # Flags
|
||||
xori r29, r29, 0x0080
|
||||
andi. r29, r29, 0x0080
|
||||
bnelr # Not rare; r29 (returned price) is zero already
|
||||
lwz r29, [r3 + 0x0C] # Cost
|
||||
blr
|
||||
tool_check_hook_end:
|
||||
|
||||
.label tool_check_hook_call, <VERS 0x8010E118 0x8010E318 0x8010E464 0x8010E2A4 0x8010E3BC 0x8010E3BC 0x8010E2B4 0x8010E498>
|
||||
.data tool_check_hook_call
|
||||
.data 0x00000004
|
||||
.address tool_check_hook_call
|
||||
bl tool_check_hook_start
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
|
||||
|
||||
|
||||
.versions 4OED 4OEU 4OJB 4OJD 4OJU 4OPD 4OPU
|
||||
|
||||
start:
|
||||
.include WriteCodeBlocks
|
||||
|
||||
# See comments in the 59NL version of this patch for details on how it works.
|
||||
|
||||
.data <VERS 0x0017DEA6 0x0017DED6 0x0017DD36 0x0017DEB6 0x0017DF66 0x0017DEC6 0x0017DE96>
|
||||
.data 0x00000004
|
||||
.data 0x00000000
|
||||
|
||||
.data <VERS 0x0017DE8C 0x0017DEBC 0x0017DD1C 0x0017DE9C 0x0017DF4C 0x0017DEAC 0x0017DE7C>
|
||||
.data 0x00000004
|
||||
.data 0x00000000
|
||||
|
||||
.data <VERS 0x0017E04E 0x0017E07E 0x0017DEDE 0x0017E05E 0x0017E10E 0x0017E06E 0x0017E03E>
|
||||
.data 0x00000005
|
||||
.binary E98E0C0000
|
||||
|
||||
.data <VERS 0x0017ECE1 0x0017ED11 0x0017EB71 0x0017ECF1 0x0017EDA1 0x0017ED01 0x0017ECD1>
|
||||
.deltaof tool_check_start, tool_check_end
|
||||
tool_check_start:
|
||||
xor edi, edi
|
||||
test byte [eax + 0x10], 0x80
|
||||
cmovz edi, [eax + 0x0C]
|
||||
.binary E995F3FFFF
|
||||
tool_check_end:
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
|
||||
|
||||
|
||||
.versions 59NJ 59NL
|
||||
|
||||
start:
|
||||
# This works by setting the item price to zero if it's rare, which causes the game to prevent you from selling the
|
||||
# item. For armors and weapons, this is easy because there are easily-patchable opcodes within branches that return a
|
||||
# constant price for rare items.
|
||||
xor eax, eax
|
||||
mov [<VERS 0x005D258F 0x005D25AF>], eax # Rare armors
|
||||
mov [<VERS 0x005D26D1 0x005D26F1>], eax # Unidentified weapons
|
||||
mov [<VERS 0x005D26E6 0x005D2706>], eax # Rare weapons
|
||||
|
||||
# For tools, it's harder to implement this, because the price comes from the ItemPMT tools table and there is no
|
||||
# branch for rares. Still, we can add a branch to a stub to handle tools.
|
||||
pop ecx
|
||||
push 5
|
||||
push <VERS 0x005D2508 0x005D2528>
|
||||
call get_code_size
|
||||
.deltaof patch_code, patch_code_end
|
||||
get_code_size:
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call patch_code_end
|
||||
patch_code:
|
||||
# TODO: It'd be nice to have something like WriteJumpToAndFromCode, since this hook is supposed to return to a
|
||||
# different place than where it was called, hence this mov [esp].
|
||||
mov dword [esp], <VERS 0x005D2556 0x005D2576>
|
||||
xor edi, edi
|
||||
test byte [eax + 0x14], 0x80 # flags & 0x80 = is rare
|
||||
cmovz edi, [eax + 0x10] # Use price from table if not rare
|
||||
ret
|
||||
patch_code_end:
|
||||
push ecx
|
||||
.include WriteCallToCode
|
||||
@@ -1,50 +0,0 @@
|
||||
# Original patch by Soly, in Blue Burst Patch Project
|
||||
# https://github.com/Solybum/Blue-Burst-Patch-Project
|
||||
# GC port by fuzziqersoftware
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
.meta name="No rare selling"
|
||||
.meta description="Stops you from\naccidentally\nselling rares\nto shops"
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksGC
|
||||
|
||||
# See comments in the 59NL version of this patch for details on how it works.
|
||||
|
||||
.data <VERS 0x8010DE70 0x8010E070 0x8010E1BC 0x8010DFFC 0x8010E114 0x8010E114 0x8010E00C 0x8010E1F0>
|
||||
.data 0x00000004
|
||||
li r29, 0
|
||||
|
||||
.data <VERS 0x8010DE5C 0x8010E05C 0x8010E1A8 0x8010DFE8 0x8010E100 0x8010E100 0x8010DFF8 0x8010E1DC>
|
||||
.data 0x00000004
|
||||
li r29, 0
|
||||
|
||||
.data <VERS 0x8010DFA4 0x8010E1A4 0x8010E2F0 0x8010E130 0x8010E248 0x8010E248 0x8010E140 0x8010E324>
|
||||
.data 0x00000004
|
||||
li r29, 0
|
||||
|
||||
.label tool_check_hook_loc, 0x800041A0
|
||||
.data tool_check_hook_loc
|
||||
.deltaof tool_check_hook_start, tool_check_hook_end
|
||||
.address tool_check_hook_loc
|
||||
tool_check_hook_start:
|
||||
lwz r29, [r3 + 0x10] # Flags
|
||||
xori r29, r29, 0x0080
|
||||
andi. r29, r29, 0x0080
|
||||
bnelr # Not rare; r29 (returned price) is zero already
|
||||
lwz r29, [r3 + 0x0C] # Cost
|
||||
blr
|
||||
tool_check_hook_end:
|
||||
|
||||
.label tool_check_hook_call, <VERS 0x8010E118 0x8010E318 0x8010E464 0x8010E2A4 0x8010E3BC 0x8010E3BC 0x8010E2B4 0x8010E498>
|
||||
.data tool_check_hook_call
|
||||
.data 0x00000004
|
||||
.address tool_check_hook_call
|
||||
bl tool_check_hook_start
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -1,40 +0,0 @@
|
||||
# Original patch by Soly, in Blue Burst Patch Project
|
||||
# https://github.com/Solybum/Blue-Burst-Patch-Project
|
||||
# Xbox port by fuzziqersoftware
|
||||
|
||||
.versions 4OED 4OEU 4OJB 4OJD 4OJU 4OPD 4OPU
|
||||
|
||||
.meta name="No rare selling"
|
||||
.meta description="Stops you from\naccidentally\nselling rares\nto shops"
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksXB
|
||||
|
||||
# See comments in the 59NL version of this patch for details on how it works.
|
||||
|
||||
.data <VERS 0x0017DEA6 0x0017DED6 0x0017DD36 0x0017DEB6 0x0017DF66 0x0017DEC6 0x0017DE96>
|
||||
.data 0x00000004
|
||||
.data 0x00000000
|
||||
|
||||
.data <VERS 0x0017DE8C 0x0017DEBC 0x0017DD1C 0x0017DE9C 0x0017DF4C 0x0017DEAC 0x0017DE7C>
|
||||
.data 0x00000004
|
||||
.data 0x00000000
|
||||
|
||||
.data <VERS 0x0017E04E 0x0017E07E 0x0017DEDE 0x0017E05E 0x0017E10E 0x0017E06E 0x0017E03E>
|
||||
.data 0x00000005
|
||||
.binary E98E0C0000
|
||||
|
||||
.data <VERS 0x0017ECE1 0x0017ED11 0x0017EB71 0x0017ECF1 0x0017EDA1 0x0017ED01 0x0017ECD1>
|
||||
.deltaof tool_check_start, tool_check_end
|
||||
tool_check_start:
|
||||
xor edi, edi
|
||||
test byte [eax + 0x10], 0x80
|
||||
cmovz edi, [eax + 0x0C]
|
||||
.binary E995F3FFFF
|
||||
tool_check_end:
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -1,43 +0,0 @@
|
||||
# Original patch by Soly, in Blue Burst Patch Project
|
||||
# https://github.com/Solybum/Blue-Burst-Patch-Project
|
||||
|
||||
.meta name="No rare selling"
|
||||
.meta description="Stops you from accidentally\nselling rares to vendors"
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
# This works by setting the item price to zero if it's rare, which causes
|
||||
# the game to prevent you from selling the item. For armors and weapons, this
|
||||
# is easy because there are easily-patchable opcodes within branches that
|
||||
# return a constant price for rare items.
|
||||
xor eax, eax
|
||||
mov [0x005D258F], eax # Rare armors
|
||||
mov [0x005D26D1], eax # Unidentified weapons
|
||||
mov [0x005D26E6], eax # Rare weapons
|
||||
|
||||
# For tools, it's harder to implement this, because the price comes from the
|
||||
# ItemPMT tools table and there is no branch for rares. Still, we can add a
|
||||
# branch to a stub to handle tools.
|
||||
pop ecx
|
||||
push 5
|
||||
push 0x005D2508
|
||||
call get_code_size
|
||||
.deltaof patch_code, patch_code_end
|
||||
get_code_size:
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call patch_code_end
|
||||
patch_code:
|
||||
# TODO: It'd be nice to have something like WriteJumpToAndFromCode, since
|
||||
# this hook is supposed to return to a different place than where it was
|
||||
# called, hence this mov [esp].
|
||||
mov dword [esp], 0x005D2556
|
||||
xor edi, edi
|
||||
test byte [eax + 0x14], 0x80 # flags & 0x80 = is rare
|
||||
cmovz edi, [eax + 0x10] # Use price from table if not rare
|
||||
ret
|
||||
patch_code_end:
|
||||
push ecx
|
||||
.include WriteCallToCode-59NJ
|
||||
@@ -1,43 +0,0 @@
|
||||
# Original patch by Soly, in Blue Burst Patch Project
|
||||
# https://github.com/Solybum/Blue-Burst-Patch-Project
|
||||
|
||||
.meta name="No rare selling"
|
||||
.meta description="Stops you from accidentally\nselling rares to vendors"
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
# This works by setting the item price to zero if it's rare, which causes
|
||||
# the game to prevent you from selling the item. For armors and weapons, this
|
||||
# is easy because there are easily-patchable opcodes within branches that
|
||||
# return a constant price for rare items.
|
||||
xor eax, eax
|
||||
mov [0x005D25AF], eax # Rare armors
|
||||
mov [0x005D26F1], eax # Unidentified weapons
|
||||
mov [0x005D2706], eax # Rare weapons
|
||||
|
||||
# For tools, it's harder to implement this, because the price comes from the
|
||||
# ItemPMT tools table and there is no branch for rares. Still, we can add a
|
||||
# branch to a stub to handle tools.
|
||||
pop ecx
|
||||
push 5
|
||||
push 0x005D2528
|
||||
call get_code_size
|
||||
.deltaof patch_code, patch_code_end
|
||||
get_code_size:
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call patch_code_end
|
||||
patch_code:
|
||||
# TODO: It'd be nice to have something like WriteJumpToAndFromCode, since
|
||||
# this hook is supposed to return to a different place than where it was
|
||||
# called, hence this mov [esp].
|
||||
mov dword [esp], 0x005D2576
|
||||
xor edi, edi
|
||||
test byte [eax + 0x14], 0x80 # flags & 0x80 = is rare
|
||||
cmovz edi, [eax + 0x10] # Use price from table if not rare
|
||||
ret
|
||||
patch_code_end:
|
||||
push ecx
|
||||
.include WriteCallToCode-59NL
|
||||
@@ -1,230 +0,0 @@
|
||||
# Original patch by Soly, in Blue Burst Patch Project
|
||||
# https://github.com/Solybum/Blue-Burst-Patch-Project
|
||||
|
||||
.meta name="Palette"
|
||||
.meta description="Enables the alternate action\npalette for number keys"
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
|
||||
write_call_func:
|
||||
.include WriteCallToCode-59NL
|
||||
|
||||
start:
|
||||
mov al, 0xEB
|
||||
mov [0x0068A739], al # SecondaryPaletteAttack1
|
||||
xor al, al
|
||||
mov [0x006A114F], al # SecondaryPaletteAttack2
|
||||
mov [0x006A0C4F], al # SecondaryPaletteAttack3
|
||||
|
||||
call patch_func_1 # GetCurrentPalette
|
||||
call patch_func_2 # CheckHotkey1_1
|
||||
call patch_func_3 # CheckHotkey1_2
|
||||
call patch_func_4 # CheckHotkey2_1
|
||||
call patch_func_5 # CheckHotkey2_2
|
||||
call patch_func_6 # CheckHotkey3_1
|
||||
call patch_func_7 # CheckHotkey3_2
|
||||
jmp write_code_blocks # UnsetHotkey1, UnsetHotkey2, SetHotkey
|
||||
|
||||
# GetCurrentPalette
|
||||
patch_func_1:
|
||||
pop ecx
|
||||
push 8
|
||||
push 0x00748944
|
||||
call get_code_size1
|
||||
.deltaof patch_code1, patch_code_end1
|
||||
get_code_size1:
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call patch_code_end1
|
||||
patch_code1:
|
||||
mov edx, [ebp - 0x14]
|
||||
mov edx, [edx + 0x2C]
|
||||
movzx edx, byte [edx + 0x62]
|
||||
test edx, edx
|
||||
setnz byte [0x00748ACF]
|
||||
mov edx, edi
|
||||
and edx, 0xFF
|
||||
ret
|
||||
patch_code_end1:
|
||||
push ecx
|
||||
jmp write_call_func
|
||||
|
||||
# CheckHotkey1_1
|
||||
patch_func_2:
|
||||
pop ecx
|
||||
push 5
|
||||
push 0x00748992
|
||||
call get_code_size2
|
||||
.deltaof patch_code2, patch_code_end2
|
||||
get_code_size2:
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call patch_code_end2
|
||||
patch_code2:
|
||||
cmp byte [0x00748ACF], 0
|
||||
jnz +0x06
|
||||
movzx edx, byte [eax + esi * 4 + 0x04] # main palette
|
||||
ret
|
||||
movzx edx, byte [eax + esi * 4 + 0x3C] # alt palette
|
||||
ret
|
||||
patch_code_end2:
|
||||
push ecx
|
||||
jmp write_call_func
|
||||
|
||||
# CheckHotkey1_2
|
||||
patch_func_3:
|
||||
pop ecx
|
||||
push 5
|
||||
push 0x007489A1
|
||||
call get_code_size3
|
||||
.deltaof patch_code3, patch_code_end3
|
||||
get_code_size3:
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call patch_code_end3
|
||||
patch_code3:
|
||||
cmp byte [0x00748ACF], 0
|
||||
jnz +0x06
|
||||
movzx ecx, byte [eax + ecx * 2 + 0x05] # main palette
|
||||
ret
|
||||
movzx ecx, byte [eax + ecx * 2 + 0x3D] # alt palette
|
||||
ret
|
||||
patch_code_end3:
|
||||
push ecx
|
||||
jmp write_call_func
|
||||
|
||||
# CheckHotkey2_1
|
||||
patch_func_4:
|
||||
pop ecx
|
||||
push 5
|
||||
push 0x00748A3C
|
||||
call get_code_size4
|
||||
.deltaof patch_code4, patch_code_end4
|
||||
get_code_size4:
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call patch_code_end4
|
||||
patch_code4:
|
||||
cmp byte [0x00748ACF], 0
|
||||
jnz +0x06
|
||||
movzx edx, byte [edx + ebx * 4 + 0x04] # main palette
|
||||
ret
|
||||
movzx edx, byte [edx + ebx * 4 + 0x3C] # alt palette
|
||||
ret
|
||||
patch_code_end4:
|
||||
push ecx
|
||||
jmp write_call_func
|
||||
|
||||
# CheckHotkey2_2
|
||||
patch_func_5:
|
||||
pop ecx
|
||||
push 5
|
||||
push 0x00748A4B
|
||||
call get_code_size5
|
||||
.deltaof patch_code5, patch_code_end5
|
||||
get_code_size5:
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call patch_code_end5
|
||||
patch_code5:
|
||||
cmp byte [0x00748ACF], 0
|
||||
jnz +0x06
|
||||
movzx ecx, byte [edx + eax * 2 + 0x05] # main palette
|
||||
ret
|
||||
movzx ecx, byte [edx + eax * 2 + 0x3D] # alt palette
|
||||
ret
|
||||
patch_code_end5:
|
||||
push ecx
|
||||
jmp write_call_func
|
||||
|
||||
# CheckHotkey3_1
|
||||
patch_func_6:
|
||||
pop ecx
|
||||
push 5
|
||||
push 0x007103B7
|
||||
call get_code_size6
|
||||
.deltaof patch_code6, patch_code_end6
|
||||
get_code_size6:
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call patch_code_end6
|
||||
patch_code6:
|
||||
cmp byte [0x00748ACF], 0
|
||||
jnz +0x06
|
||||
movzx ecx, byte [eax + edx * 4 + 0x04] # main palette
|
||||
ret
|
||||
movzx ecx, byte [eax + edx * 4 + 0x3C] # alt palette
|
||||
ret
|
||||
patch_code_end6:
|
||||
push ecx
|
||||
jmp write_call_func
|
||||
|
||||
# CheckHotkey3_2
|
||||
patch_func_7:
|
||||
pop ecx
|
||||
push 5
|
||||
push 0x007103C0
|
||||
call get_code_size7
|
||||
.deltaof patch_code7, patch_code_end7
|
||||
get_code_size7:
|
||||
pop eax
|
||||
push dword [eax]
|
||||
call patch_code_end7
|
||||
patch_code7:
|
||||
cmp byte [0x00748ACF], 0
|
||||
jnz +0x06
|
||||
movzx ecx, byte [eax + edx * 4 + 0x05] # main palette
|
||||
ret
|
||||
movzx ecx, byte [eax + edx * 4 + 0x3D] # alt palette
|
||||
ret
|
||||
patch_code_end7:
|
||||
push ecx
|
||||
jmp write_call_func
|
||||
|
||||
write_code_blocks:
|
||||
.include WriteCodeBlocksBB
|
||||
|
||||
.data 0x007489B9
|
||||
.deltaof code_block1_start, code_block1_end
|
||||
|
||||
# UnsetHotkey1
|
||||
code_block1_start:
|
||||
push dword [0x00748ACF]
|
||||
push eax
|
||||
mov eax, 0x0068CDE0 # SetPaletteHotkey
|
||||
call eax
|
||||
.binary 909090909090909090
|
||||
code_block1_end:
|
||||
.data 0x00748A5F
|
||||
.deltaof code_block2_start, code_block2_end
|
||||
|
||||
# UnsetHotkey2
|
||||
code_block2_start:
|
||||
push dword [0x00748ACF]
|
||||
push eax
|
||||
mov eax, 0x0068CDE0 # SetPaletteHotkey
|
||||
call eax
|
||||
.binary 909090909090909090
|
||||
code_block2_end:
|
||||
.data 0x00748ABE
|
||||
.deltaof code_block3_start, code_block3_end
|
||||
|
||||
# SetHotkey
|
||||
code_block3_start:
|
||||
mov eax, [ebp - 0x24]
|
||||
mov ecx, [ebp - 0x28]
|
||||
movzx ebx, word [eax]
|
||||
movzx edx, word [eax + 0x02]
|
||||
push edx
|
||||
push ebx
|
||||
push esi
|
||||
.binary 6800000000 # tmpCurrentPalette = 0x00748ACF
|
||||
push 0
|
||||
mov eax, 0x0068CDE0 # SetPaletteHotkey
|
||||
call eax
|
||||
.binary 90909090909090909090909090909090
|
||||
code_block3_end:
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
+32
-28
@@ -1,22 +1,26 @@
|
||||
# Original patch by Soly, in Blue Burst Patch Project
|
||||
# https://github.com/Solybum/Blue-Burst-Patch-Project
|
||||
|
||||
.meta visibility="all"
|
||||
.meta key="Palette"
|
||||
.meta name="Palette"
|
||||
.meta description="Enables the alternate action\npalette for number keys"
|
||||
|
||||
.versions 59NJ 59NL
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
|
||||
write_call_func:
|
||||
.include WriteCallToCode-59NJ
|
||||
.include WriteCallToCode
|
||||
|
||||
start:
|
||||
mov al, 0xEB
|
||||
mov [0x0068A7A5], al # SecondaryPaletteAttack1
|
||||
mov [<VERS 0x0068A7A5 0x0068A739>], al # SecondaryPaletteAttack1
|
||||
xor al, al
|
||||
mov [0x006A11B7], al # SecondaryPaletteAttack2
|
||||
mov [0x006A0CB7], al # SecondaryPaletteAttack3
|
||||
mov [<VERS 0x006A11B7 0x006A114F>], al # SecondaryPaletteAttack2
|
||||
mov [<VERS 0x006A0CB7 0x006A0C4F>], al # SecondaryPaletteAttack3
|
||||
|
||||
call patch_func_1 # GetCurrentPalette
|
||||
call patch_func_2 # CheckHotkey1_1
|
||||
@@ -31,7 +35,7 @@ start:
|
||||
patch_func_1:
|
||||
pop ecx
|
||||
push 8
|
||||
push 0x00748990
|
||||
push <VERS 0x00748990 0x00748944>
|
||||
call get_code_size1
|
||||
.deltaof patch_code1, patch_code_end1
|
||||
get_code_size1:
|
||||
@@ -43,7 +47,7 @@ patch_code1:
|
||||
mov edx, [edx + 0x2C]
|
||||
movzx edx, byte [edx + 0x62]
|
||||
test edx, edx
|
||||
setnz byte [0x00748B1B]
|
||||
setnz byte [<VERS 0x00748B1B 0x00748ACF>]
|
||||
mov edx, edi
|
||||
and edx, 0xFF
|
||||
ret
|
||||
@@ -55,7 +59,7 @@ patch_code_end1:
|
||||
patch_func_2:
|
||||
pop ecx
|
||||
push 5
|
||||
push 0x007489DE
|
||||
push <VERS 0x007489DE 0x00748992>
|
||||
call get_code_size2
|
||||
.deltaof patch_code2, patch_code_end2
|
||||
get_code_size2:
|
||||
@@ -63,7 +67,7 @@ get_code_size2:
|
||||
push dword [eax]
|
||||
call patch_code_end2
|
||||
patch_code2:
|
||||
cmp byte [0x00748B1B], 0
|
||||
cmp byte [<VERS 0x00748B1B 0x00748ACF>], 0
|
||||
jnz +0x06
|
||||
movzx edx, byte [eax + esi * 4 + 0x04] # main palette
|
||||
ret
|
||||
@@ -77,7 +81,7 @@ patch_code_end2:
|
||||
patch_func_3:
|
||||
pop ecx
|
||||
push 5
|
||||
push 0x007489ED
|
||||
push <VERS 0x007489ED 0x007489A1>
|
||||
call get_code_size3
|
||||
.deltaof patch_code3, patch_code_end3
|
||||
get_code_size3:
|
||||
@@ -85,7 +89,7 @@ get_code_size3:
|
||||
push dword [eax]
|
||||
call patch_code_end3
|
||||
patch_code3:
|
||||
cmp byte [0x00748B1B], 0
|
||||
cmp byte [<VERS 0x00748B1B 0x00748ACF>], 0
|
||||
jnz +0x06
|
||||
movzx ecx, byte [eax + ecx * 2 + 0x05] # main palette
|
||||
ret
|
||||
@@ -99,7 +103,7 @@ patch_code_end3:
|
||||
patch_func_4:
|
||||
pop ecx
|
||||
push 5
|
||||
push 0x00748A88
|
||||
push <VERS 0x00748A88 0x00748A3C>
|
||||
call get_code_size4
|
||||
.deltaof patch_code4, patch_code_end4
|
||||
get_code_size4:
|
||||
@@ -107,7 +111,7 @@ get_code_size4:
|
||||
push dword [eax]
|
||||
call patch_code_end4
|
||||
patch_code4:
|
||||
cmp byte [0x00748B1B], 0
|
||||
cmp byte [<VERS 0x00748B1B 0x00748ACF>], 0
|
||||
jnz +0x06
|
||||
movzx edx, byte [edx + ebx * 4 + 0x04] # main palette
|
||||
ret
|
||||
@@ -121,7 +125,7 @@ patch_code_end4:
|
||||
patch_func_5:
|
||||
pop ecx
|
||||
push 5
|
||||
push 0x00748A97
|
||||
push <VERS 0x00748A97 0x00748A4B>
|
||||
call get_code_size5
|
||||
.deltaof patch_code5, patch_code_end5
|
||||
get_code_size5:
|
||||
@@ -129,7 +133,7 @@ get_code_size5:
|
||||
push dword [eax]
|
||||
call patch_code_end5
|
||||
patch_code5:
|
||||
cmp byte [0x00748B1B], 0
|
||||
cmp byte [<VERS 0x00748B1B 0x00748ACF>], 0
|
||||
jnz +0x06
|
||||
movzx ecx, byte [edx + eax * 2 + 0x05] # main palette
|
||||
ret
|
||||
@@ -143,7 +147,7 @@ patch_code_end5:
|
||||
patch_func_6:
|
||||
pop ecx
|
||||
push 5
|
||||
push 0x007103D3
|
||||
push <VERS 0x007103D3 0x007103B7>
|
||||
call get_code_size6
|
||||
.deltaof patch_code6, patch_code_end6
|
||||
get_code_size6:
|
||||
@@ -151,7 +155,7 @@ get_code_size6:
|
||||
push dword [eax]
|
||||
call patch_code_end6
|
||||
patch_code6:
|
||||
cmp byte [0x00748B1B], 0
|
||||
cmp byte [<VERS 0x00748B1B 0x00748ACF>], 0
|
||||
jnz +0x06
|
||||
movzx ecx, byte [eax + edx * 4 + 0x04] # main palette
|
||||
ret
|
||||
@@ -165,7 +169,7 @@ patch_code_end6:
|
||||
patch_func_7:
|
||||
pop ecx
|
||||
push 5
|
||||
push 0x007103DC
|
||||
push <VERS 0x007103DC 0x007103C0>
|
||||
call get_code_size7
|
||||
.deltaof patch_code7, patch_code_end7
|
||||
get_code_size7:
|
||||
@@ -173,7 +177,7 @@ get_code_size7:
|
||||
push dword [eax]
|
||||
call patch_code_end7
|
||||
patch_code7:
|
||||
cmp byte [0x00748B1B], 0
|
||||
cmp byte [<VERS 0x00748B1B 0x00748ACF>], 0
|
||||
jnz +0x06
|
||||
movzx ecx, byte [eax + edx * 4 + 0x05] # main palette
|
||||
ret
|
||||
@@ -184,31 +188,31 @@ patch_code_end7:
|
||||
jmp write_call_func
|
||||
|
||||
write_code_blocks:
|
||||
.include WriteCodeBlocksBB
|
||||
.include WriteCodeBlocks
|
||||
|
||||
.data 0x00748A05
|
||||
.data <VERS 0x00748A05 0x007489B9>
|
||||
.deltaof code_block1_start, code_block1_end
|
||||
|
||||
# UnsetHotkey1
|
||||
code_block1_start:
|
||||
push dword [0x00748B1B]
|
||||
push dword [<VERS 0x00748B1B 0x00748ACF>]
|
||||
push eax
|
||||
mov eax, 0x0068CE4C # SetPaletteHotkey
|
||||
mov eax, <VERS 0x0068CE4C 0x0068CDE0> # SetPaletteHotkey
|
||||
call eax
|
||||
.binary 909090909090909090
|
||||
code_block1_end:
|
||||
.data 0x00748AAB
|
||||
.data <VERS 0x00748AAB 0x00748A5F>
|
||||
.deltaof code_block2_start, code_block2_end
|
||||
|
||||
# UnsetHotkey2
|
||||
code_block2_start:
|
||||
push dword [0x00748B1B]
|
||||
push dword [<VERS 0x00748B1B 0x00748ACF>]
|
||||
push eax
|
||||
mov eax, 0x0068CE4C # SetPaletteHotkey
|
||||
mov eax, <VERS 0x0068CE4C 0x0068CDE0> # SetPaletteHotkey
|
||||
call eax
|
||||
.binary 909090909090909090
|
||||
code_block2_end:
|
||||
.data 0x00748B0A
|
||||
.data <VERS 0x00748B0A 0x00748ABE>
|
||||
.deltaof code_block3_start, code_block3_end
|
||||
|
||||
# SetHotkey
|
||||
@@ -220,9 +224,9 @@ code_block3_start:
|
||||
push edx
|
||||
push ebx
|
||||
push esi
|
||||
.binary 6800000000 # tmpCurrentPalette = 0x00748B1B
|
||||
.binary 6800000000 # tmpCurrentPalette = <VERS 0x00748B1B 0x00748ACF>
|
||||
push 0
|
||||
mov eax, 0x0068CE4C # SetPaletteHotkey
|
||||
mov eax, <VERS 0x0068CE4C 0x0068CDE0> # SetPaletteHotkey
|
||||
call eax
|
||||
.binary 90909090909090909090909090909090
|
||||
code_block3_end:
|
||||
+6
-3
@@ -1,9 +1,12 @@
|
||||
.meta name="Palette"
|
||||
.meta description="Use C stick to\nuse 4 customize\nconfigurations\ninstead of just one"
|
||||
# Original codes by Ralf @ GC-Forever
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
|
||||
.meta visibility="all"
|
||||
.meta key="Palette"
|
||||
.meta name="Palette"
|
||||
.meta description="Use C stick to\nuse 4 customize\nconfigurations\ninstead of just one"
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
# This code will let you have up to four different palettes of action buttons.
|
||||
@@ -27,7 +30,7 @@ entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksGC
|
||||
.include WriteCodeBlocks
|
||||
|
||||
.label memcpy, 0x8000E41C
|
||||
.label memset, 0x8000E334
|
||||
+14
-17
@@ -1,31 +1,33 @@
|
||||
.meta name="Rare alerts"
|
||||
.meta description="Show rare items on\nthe map and play a\nsound when a rare\nitem drops"
|
||||
# Inspired by and adapted from the original patch for Ep1&2 made by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
|
||||
.meta visibility="all"
|
||||
.meta key="RareDropNotifications"
|
||||
.meta name="Rare alerts"
|
||||
.meta description="Show rare items on\nthe map and play a\nsound when a rare\nitem drops"
|
||||
|
||||
.versions 2OJF 2OJ5 2OEF 2OPF
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksDC
|
||||
.include WriteCodeBlocks
|
||||
|
||||
|
||||
#replace function call from command 6x5f to call to custom code for sound
|
||||
# Replace function call from command 6x5F to call to custom code for sound
|
||||
.align 4
|
||||
.data <VERS 0x8C1944E4 0x8C195478 0x8C195478 0x8C194F10>
|
||||
.data 4
|
||||
.data <VERS 0x8C02DD1C 0x8C02DB60 0x8C02DB60 0x8C02DB60>
|
||||
|
||||
#replace function call from TItem::update in the case when the item is on the ground
|
||||
|
||||
# Replace function call from TItem::update in the case when the item is on the ground
|
||||
.align 4
|
||||
.data <VERS 0x8C0734A0 0x8C0739B0 0x8C0739B0 0x8C073654>
|
||||
.data 4
|
||||
.data <VERS 0x8C02E19C 0x8C02DFD8 0x8C02DFD8 0x8C02DFD8>
|
||||
|
||||
#custom code that goes to check if item is rare and in the area the player is in and plays sound if it is
|
||||
# Custom code that goes to check if item is rare and in the area the player is in and plays sound if it is
|
||||
.align 4
|
||||
.data <VERS 0x8C02DD1C 0x8C02DB60 0x8C02DB60 0x8C02DB60>
|
||||
.data 72
|
||||
@@ -47,11 +49,8 @@ start:
|
||||
.data <VERS 0x8C02E14C 0x8C02DF90 0x8C02DF90 0x8C02DF90>
|
||||
.data 0x00050013
|
||||
.data <VERS 0x8C05FA44 0x8C05FF54 0x8C05FF54 0x8C05FBF8>
|
||||
|
||||
|
||||
|
||||
|
||||
#custom code for checking if an item is rare or not (from r5)
|
||||
|
||||
# Custom code for checking if an item is rare or not (from r5)
|
||||
.align 4
|
||||
.data <VERS 0x8C02E14C 0x8C02DF90 0x8C02DF90 0x8C02DF90>
|
||||
.data 68
|
||||
@@ -72,9 +71,8 @@ start:
|
||||
.data 0x89013066
|
||||
.data 0xE000000B
|
||||
.data 0xE001000B
|
||||
|
||||
|
||||
#custom code for checking if item is rare, then showing a dot on the map with color FF0000 if it is
|
||||
|
||||
# Custom code for checking if item is rare, then showing a dot on the map with color FF0000 if it is
|
||||
.align 4
|
||||
.data <VERS 0x8C02E19C 0x8C02DFD8 0x8C02DFD8 0x8C02DFD8>
|
||||
.data 88
|
||||
@@ -101,7 +99,6 @@ start:
|
||||
.data 0xFFFF0000
|
||||
.data <VERS 0x8C073688 0x8C073B98 0x8C073B98 0x8C07383C>
|
||||
|
||||
|
||||
.align 4
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
+6
-3
@@ -1,16 +1,19 @@
|
||||
.meta name="Rare alerts"
|
||||
.meta description="Shows rare items on\nthe map and plays a\nsound when a rare\nitem drops"
|
||||
# Original code by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
|
||||
.meta visibility="all"
|
||||
.meta key="RareDropNotifications"
|
||||
.meta name="Rare alerts"
|
||||
.meta description="Shows rare items on\nthe map and plays a\nsound when a rare\nitem drops"
|
||||
|
||||
.versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksGC
|
||||
.include WriteCodeBlocks
|
||||
|
||||
.label hook_code, 0x8000C660
|
||||
|
||||
+6
-3
@@ -1,17 +1,20 @@
|
||||
.meta name="Rare alerts"
|
||||
.meta description="Shows rare items on\nthe map and plays a\nsound when a rare\nitem drops"
|
||||
# Original code by Ralf @ GC-Forever and Aleron Ives
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
|
||||
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
|
||||
# Xbox port by fuzziqersoftware
|
||||
|
||||
.meta visibility="all"
|
||||
.meta key="RareDropNotifications"
|
||||
.meta name="Rare alerts"
|
||||
.meta description="Shows rare items on\nthe map and plays a\nsound when a rare\nitem drops"
|
||||
|
||||
.versions 4OED 4OEU 4OJB 4OJD 4OJU 4OPD 4OPU
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksXB
|
||||
.include WriteCodeBlocks
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
.meta visibility="all"
|
||||
.meta name="Rares in quests"
|
||||
.meta description="Disables logic that\nprevents items\nabove 8 stars and\nrares from dropping\nin quests."
|
||||
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocks
|
||||
|
||||
|
||||
|
||||
.versions 1OEF 1OJ3 1OJ4 1OJF 1OPF
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C1F1210 0x8C1EE044 0x8C1F0C10 0x8C1EE1F0 0x8C1F0FB4>
|
||||
.data 2
|
||||
mov r0, 0
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C1F1182 0x8C1EDFB6 0x8C1F0B82 0x8C1EE162 0x8C1F0F26>
|
||||
.data 2
|
||||
mov r0, 0
|
||||
|
||||
.align 4
|
||||
|
||||
|
||||
|
||||
.versions 2OJ4 2OJ5 2OJF 2OEF 2OPF
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C21A28C 0x8C21A28C 0x8C2192C8 0x8C21A28C 0x8C219E6C>
|
||||
.data 2
|
||||
nop
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C21A300 0x8C21A300 0x8C219254 0x8C21A300 0x8C219DF8>
|
||||
.data 2
|
||||
nop
|
||||
|
||||
.align 4
|
||||
|
||||
|
||||
|
||||
.versions 2OJW
|
||||
|
||||
.data 0x004DFC9A
|
||||
.data 2
|
||||
nop
|
||||
nop
|
||||
|
||||
.data 0x004E03F4
|
||||
.data 2
|
||||
nop
|
||||
nop
|
||||
|
||||
|
||||
|
||||
.all_versions
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -1,24 +0,0 @@
|
||||
.meta name="Rares in quests"
|
||||
.meta description="Disables logic that\nprevents items\nabove 8 stars and\nrares from dropping\nin quests."
|
||||
|
||||
.versions 1OEF 1OJ3 1OJ4 1OJF 1OPF
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksDC
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C1F1210 0x8C1EE044 0x8C1F0C10 0x8C1EE1F0 0x8C1F0FB4>
|
||||
.data 2
|
||||
mov r0, 0
|
||||
|
||||
.align 4
|
||||
.data <VERS 0x8C1F1182 0x8C1EDFB6 0x8C1F0B82 0x8C1EE162 0x8C1F0F26>
|
||||
.data 2
|
||||
mov r0, 0
|
||||
|
||||
.align 4
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
@@ -1,21 +0,0 @@
|
||||
.meta name="Rares in quests"
|
||||
.meta description="Disables logic that\nprevents items\nabove 8 stars and\nrares from dropping\nin quests."
|
||||
|
||||
entry_ptr:
|
||||
reloc0:
|
||||
.offsetof start
|
||||
start:
|
||||
.include WriteCodeBlocksBB
|
||||
|
||||
.data 0x004DFC9A
|
||||
.data 2
|
||||
nop
|
||||
nop
|
||||
|
||||
.data 0x004E03F4
|
||||
.data 2
|
||||
nop
|
||||
nop
|
||||
|
||||
.data 0x00000000
|
||||
.data 0x00000000
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user