No Description

overworld_hooks.s 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. .align 2
  2. .thumb
  3. .text
  4. .global overworld_h_one
  5. overworld_h_one:
  6. ldr r1, =npc_states
  7. add r5, r0, r1
  8. ldrb r0, [r5, #5] @image number
  9. ldrb r1, [r5, #0x1A] @table index
  10. lsl r1, #8
  11. orr r0, r1
  12. bl npc_get_type
  13. ldr r1, =0x0805E5DD
  14. bx r1
  15. .global overworld_h_two
  16. overworld_h_two:
  17. push {r4, lr}
  18. sub sp, #8
  19. add r4, r0, #0
  20. ldrb r0, [r4, #5] @image number
  21. ldrb r1, [r4, #0x1A] @table index
  22. lsl r1, #8
  23. orr r0, r1
  24. bl npc_get_type
  25. ldr r1, =0x0805e51D
  26. bx r1
  27. .global overworld_h_three
  28. overworld_h_three:
  29. add r4, r0, #0x0
  30. add r5, r1, #0x0
  31. add r3, r2, #0x0
  32. ldrb r0, [r4, #0x1]
  33. lsl r0, r0, #0x18
  34. lsr r0, r0, #0x18
  35. ldrb r1, [r4, #0x3]
  36. lsl r1, r1, #0x18
  37. lsr r1, r1, #0x10
  38. orr r0, r0, r1
  39. ldrb r1, [r4, #0x9]
  40. add r2, r5, #0x0
  41. ldr r4, =0x0805e96f
  42. bx r4
  43. .global overworld_h_four
  44. overworld_h_four:
  45. ldr r6, =npc_states
  46. add r6, r0
  47. mov r0, #0
  48. str r0, [sp, #0x20]
  49. ldrb r0, [r6, #5]
  50. ldrb r1, [r6, #0x1A]
  51. lsl r1, #8
  52. orr r0, r1
  53. bl npc_get_type
  54. add r5, r0, #0x0
  55. ldrh r2, [r5, #0x6]
  56. add r4, SP, #0x18
  57. ldr r0, [r4, #0x4]
  58. lsr r0, r0, #0x10
  59. lsl r0, r0, #0x10
  60. orr r0, r2
  61. str r0, [r4, #0x4]
  62. ldrb r0, [r6, #0x5]
  63. ldrb r1, [r6, #0x1a]
  64. lsl r1, r1, #0x8
  65. orr r0, r1
  66. ldr r1, =0x0805eea3
  67. bx r1
  68. .global overworld_h_five
  69. overworld_h_five:
  70. add r5, r0, #0
  71. add r4, r1, #0
  72. ldrb r1, [r5, #1]
  73. mov r0, #0x41
  74. neg r0, r0
  75. and r0, r1
  76. strb r0, [r5,#1]
  77. ldrb r0, [r5, #0x5]
  78. ldrb r1, [r5, #0x1a]
  79. lsl r1, r1, #0x8
  80. orr r0, r1
  81. bl npc_get_type
  82. ldr r1, =0x08067A27
  83. bx r1
  84. .global overworld_h_six
  85. overworld_h_six:
  86. add r5, r0, #0x0
  87. mov r4, #0x0
  88. ldrb r0, [r5, #0x5]
  89. ldrb r1, [r5, #0x1a]
  90. lsl r1, r1, #0x8
  91. orr r0, r1
  92. bl npc_get_type
  93. ldr r1, =0x08067f9d
  94. bx r1