No Description

dyn_npc_hooks.s 577B

1234567891011121314151617181920212223242526272829303132333435
  1. .align 2
  2. .thumb
  3. .text
  4. .global obj_delete_and_free_tiles_hook
  5. obj_delete_and_free_tiles_hook:
  6. push {r4-r7,lr}
  7. mov r5, r0
  8. ldr r0, [r5, #0x14] @template
  9. ldr r1, =0x8231D00 @ template for empty OBJ
  10. cmp r0, r1
  11. beq no_entry_remove
  12. ldrb r0, [r5,#5]
  13. ldr r1, [r5, #0x14]
  14. ldrh r1, [r1,#2] @tag
  15. lsr r0, #4
  16. bl npc_dynamic_remove_entry
  17. no_entry_remove:
  18. mov r0, r5
  19. add r0, #0x3E
  20. ldrb r1, [r0]
  21. ldr r0, =0x8007288+1
  22. bx r0
  23. .global obj_delete_all_hook
  24. obj_delete_all_hook:
  25. ldr r1, =obj_delete
  26. bl bxr1
  27. bl npc_dynamic_reset
  28. pop {r4-r5}
  29. pop {r0}
  30. bx r0
  31. bxr1:
  32. bx r1