Advertisement
luckytyphlosion

sub_801C6EE

Sep 16th, 2022
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.90 KB | None | 0 0
  1. thumb_local_start
  2. sub_801C6EE:
  3. push {r4-r7,lr}
  4. mov r0, #0
  5. push {r0}
  6. push {r0}
  7. push {r0}
  8. push {r0}
  9. push {r0}
  10. push {r0}
  11. push {r0}
  12. push {r0}
  13. push {r0}
  14. push {r0}
  15. push {r0}
  16. push {r0}
  17. mov r0, #0
  18. mov r1, #0x12
  19. mov r2, #3
  20. mov r3, #0
  21. mov r4, #0x11
  22. mov r5, #2
  23. bl call_sub_3005EBA
  24. ldr r0, off_801C83C // =eStruct2035280
  25. ldr r0, [r0,#0x48] // (dword_20352C8 - 0x2035280)
  26. bl sub_800ED90
  27. cmp r3, #0
  28. beq loc_801C818
  29. str r0, [sp]
  30. str r1, [sp,#4]
  31. str r2, [sp,#8]
  32. bl sub_8027D10
  33. ldr r2, off_801C81C // =byte_203EBA0
  34. ldr r3, dword_801C820 // =0x600cb00
  35. mov r4, #8
  36. mov r5, #1
  37. ldr r6, off_801C824 // =dword_86B7AE0
  38. mov r7, #0
  39. bl renderTextGfx_8045F8C
  40. mov r7, r0
  41. mov r4, r0
  42. mov r0, #0
  43. mov r1, #0x12
  44. mov r2, #3
  45. ldr r3, off_801C828 // =byte_801D944
  46. bl sub_80018E0
  47. mov r0, #0
  48. mov r1, #0x13
  49. mov r2, #3
  50. ldr r3, off_801C82C // =byte_801D954
  51. mov r4, r7
  52. bl sub_80018E0
  53. // idx
  54. ldr r0, [sp]
  55. bl getChip8021DA8 // (int chip_idx) -> ChipData*
  56. ldrb r1, [r0,#9]
  57. mov r2, #2
  58. tst r1, r2
  59. beq loc_801C818
  60. ldr r0, [sp,#4]
  61. bl sub_8000C00
  62. mov r4, r0
  63. bl sub_8000C5C
  64. mov r3, r0
  65. mov r6, r3
  66. add r2, sp, #0xc
  67. lsl r0, r0, #1
  68. add r2, r2, r0
  69. sub r2, #2
  70. ldr r1, dword_801C830 // =0xd1b8
  71. loc_801C786:
  72. mov r0, #0xf
  73. and r0, r4
  74. lsl r0, r0, #1
  75. add r0, r0, r1
  76. strh r0, [r2]
  77. add r0, #1
  78. strh r0, [r2,#0x12]
  79. sub r2, #2
  80. lsr r4, r4, #4
  81. sub r3, #1
  82. bne loc_801C786
  83. ldr r0, [sp,#8]
  84. cmp r0, #0
  85. beq loc_801C7DE
  86. bl sub_8000C00
  87. mov r4, r0
  88. bl sub_8000C5C
  89. mov r3, r0
  90. mov r2, r6
  91. lsl r2, r2, #1
  92. add r2, #0xc
  93. add r2, sp
  94. ldr r1, dword_801C834 // =0xd1ce
  95. strh r1, [r2]
  96. add r1, #1
  97. strh r1, [r2,#0x12]
  98. lsl r0, r0, #1
  99. add r2, r2, r0
  100. add r6, r6, r3
  101. add r6, #1
  102. ldr r1, dword_801C830 // =0xd1b8
  103. loc_801C7C8:
  104. mov r0, #0xf
  105. and r0, r4
  106. lsl r0, r0, #1
  107. add r0, r0, r1
  108. strh r0, [r2]
  109. add r0, #1
  110. strh r0, [r2,#0x12]
  111. sub r2, #2
  112. lsr r4, r4, #4
  113. sub r3, #1
  114. bne loc_801C7C8
  115. loc_801C7DE:
  116. ldr r0, off_801C83C // =eStruct2035280
  117. ldr r0, [r0,#0x48] // (dword_20352C8 - 0x2035280)
  118. ldr r1, [sp]
  119. mov r3, #0
  120. bl sub_8012A38
  121. tst r1, r1
  122. beq loc_801C806
  123. mov r2, r6
  124. lsl r2, r2, #1
  125. add r2, #0xc
  126. add r2, sp
  127. ldr r1, dword_801C838 // =0xd1d2
  128. strh r1, [r2]
  129. add r1, #1
  130. strh r1, [r2,#0x12]
  131. add r1, #1
  132. strh r1, [r2,#2]
  133. add r1, #1
  134. strh r1, [r2,#0x14]
  135. loc_801C806:
  136. mov r0, r7
  137. // j
  138. add r0, #0
  139. // i
  140. mov r1, #0x12
  141. // tileBlock32x32
  142. mov r2, #3
  143. // tileIds
  144. add r3, sp, #0xc
  145. mov r4, #9
  146. mov r5, #2
  147. bl CopyBackgroundTiles
  148. loc_801C818:
  149. add sp, sp, #0x30
  150. pop {r4-r7,pc}
  151. .balign 4, 0
  152. off_801C81C: .word byte_203EBA0
  153. dword_801C820: .word 0x600CB00
  154. off_801C824: .word dword_86B7AE0
  155. off_801C828: .word byte_801D944
  156. off_801C82C: .word byte_801D954
  157. dword_801C830: .word 0xD1B8
  158. dword_801C834: .word 0xD1CE
  159. dword_801C838: .word 0xD1D2
  160. off_801C83C: .word eStruct2035280
  161. thumb_func_end sub_801C6EE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement