1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
|
.include "constants/gba_constants.inc"
.include "include/macros.inc"
.syntax unified
.text
@ current
thumb_func_start sub_80D648C
sub_80D648C: @ 80D648C
push {r4-r6,lr}
adds r4, r0, 0
movs r1, 0x1
bl sub_80787B0
ldr r5, _080D6500 @ =gBattleAnimArgs
ldrh r0, [r5, 0x6]
strh r0, [r4, 0x2E]
ldrh r0, [r4, 0x20]
strh r0, [r4, 0x30]
ldr r6, _080D6504 @ =gAnimBankTarget
ldrb r0, [r6]
movs r1, 0x2
bl GetBankPosition
lsls r0, 24
lsrs r0, 24
strh r0, [r4, 0x32]
ldrh r0, [r4, 0x22]
strh r0, [r4, 0x34]
ldrb r0, [r6]
movs r1, 0x3
bl GetBankPosition
lsls r0, 24
lsrs r0, 24
strh r0, [r4, 0x36]
adds r0, r4, 0
bl obj_translate_based_on_private_1_2_3_4
ldrh r0, [r5, 0x4]
strh r0, [r4, 0x38]
ldrh r0, [r5, 0xA]
strh r0, [r4, 0x3A]
ldrh r0, [r5, 0x8]
strh r0, [r4, 0x3C]
ldrh r2, [r4, 0x4]
lsls r1, r2, 22
lsrs r1, 22
movs r3, 0xC
ldrsh r0, [r5, r3]
lsls r0, 2
adds r1, r0
ldr r3, _080D6508 @ =0x000003ff
adds r0, r3, 0
ands r1, r0
ldr r0, _080D650C @ =0xfffffc00
ands r0, r2
orrs r0, r1
strh r0, [r4, 0x4]
ldr r1, _080D6510 @ =sub_80D6514
str r1, [r4, 0x1C]
adds r0, r4, 0
bl _call_via_r1
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_080D6500: .4byte gBattleAnimArgs
_080D6504: .4byte gAnimBankTarget
_080D6508: .4byte 0x000003ff
_080D650C: .4byte 0xfffffc00
_080D6510: .4byte sub_80D6514
thumb_func_end sub_80D648C
thumb_func_start sub_80D6514
sub_80D6514: @ 80D6514
push {r4,lr}
adds r4, r0, 0
bl sub_8078B5C
lsls r0, 24
cmp r0, 0
bne _080D657E
movs r1, 0x3C
ldrsh r0, [r4, r1]
movs r2, 0x38
ldrsh r1, [r4, r2]
bl Sin
ldrh r1, [r4, 0x24]
adds r0, r1
strh r0, [r4, 0x24]
movs r2, 0x3C
ldrsh r0, [r4, r2]
movs r2, 0x38
ldrsh r1, [r4, r2]
bl Cos
ldrh r1, [r4, 0x26]
adds r0, r1
strh r0, [r4, 0x26]
ldrh r0, [r4, 0x3A]
ldrh r2, [r4, 0x3C]
adds r0, r2
movs r1, 0xFF
ands r0, r1
strh r0, [r4, 0x3C]
movs r1, 0x3C
ldrsh r0, [r4, r1]
movs r1, 0x3
bl __modsi3
lsls r0, 16
cmp r0, 0
bne _080D6584
adds r3, r4, 0
adds r3, 0x3E
ldrb r2, [r3]
lsls r0, r2, 29
lsrs r0, 31
movs r1, 0x1
eors r1, r0
lsls r1, 2
movs r0, 0x5
negs r0, r0
ands r0, r2
orrs r0, r1
strb r0, [r3]
b _080D6584
_080D657E:
adds r0, r4, 0
bl DestroyAnimSprite
_080D6584:
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_80D6514
thumb_func_start sub_80D658C
sub_80D658C: @ 80D658C
push {lr}
adds r3, r0, 0
ldrh r0, [r3, 0x38]
subs r0, 0x1
strh r0, [r3, 0x38]
lsls r0, 16
asrs r0, 16
movs r1, 0x1
negs r1, r1
cmp r0, r1
bne _080D65C4
movs r0, 0x3E
adds r0, r3
mov r12, r0
ldrb r2, [r0]
lsls r0, r2, 29
lsrs r0, 31
movs r1, 0x1
eors r1, r0
lsls r1, 2
movs r0, 0x5
negs r0, r0
ands r0, r2
orrs r0, r1
mov r1, r12
strb r0, [r1]
ldrh r0, [r3, 0x36]
strh r0, [r3, 0x38]
_080D65C4:
ldrh r0, [r3, 0x34]
subs r1, r0, 0x1
strh r1, [r3, 0x34]
lsls r0, 16
cmp r0, 0
bgt _080D65D6
adds r0, r3, 0
bl DestroyAnimSprite
_080D65D6:
pop {r0}
bx r0
thumb_func_end sub_80D658C
thumb_func_start sub_80D65DC
sub_80D65DC: @ 80D65DC
push {r4-r6,lr}
adds r6, r0, 0
ldr r0, _080D6644 @ =gMain
ldr r1, _080D6648 @ =0x0000043d
adds r0, r1
ldrb r1, [r0]
movs r0, 0x2
ands r0, r1
cmp r0, 0
beq _080D65FE
ldr r0, _080D664C @ =gAnimBankTarget
ldrb r0, [r0]
bl GetBankSide
lsls r0, 24
cmp r0, 0
bne _080D6606
_080D65FE:
ldr r1, _080D6650 @ =gBattleAnimArgs
ldrh r0, [r1, 0x2]
negs r0, r0
strh r0, [r1, 0x2]
_080D6606:
ldr r5, _080D664C @ =gAnimBankTarget
ldrb r0, [r5]
movs r1, 0x2
bl GetBankPosition
lsls r0, 24
ldr r4, _080D6650 @ =gBattleAnimArgs
lsrs r0, 24
ldrh r1, [r4, 0x2]
adds r0, r1
strh r0, [r6, 0x20]
ldrb r0, [r5]
movs r1, 0x3
bl GetBankPosition
lsls r0, 24
lsrs r0, 24
ldrh r1, [r4, 0x4]
adds r0, r1
strh r0, [r6, 0x22]
ldrh r0, [r4]
strh r0, [r6, 0x34]
ldrh r0, [r4, 0x6]
strh r0, [r6, 0x36]
strh r0, [r6, 0x38]
ldr r0, _080D6654 @ =sub_80D658C
str r0, [r6, 0x1C]
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_080D6644: .4byte gMain
_080D6648: .4byte 0x0000043d
_080D664C: .4byte gAnimBankTarget
_080D6650: .4byte gBattleAnimArgs
_080D6654: .4byte sub_80D658C
thumb_func_end sub_80D65DC
thumb_func_start sub_80D6658
sub_80D6658: @ 80D6658
push {r4-r6,lr}
adds r5, r0, 0
ldr r1, _080D6674 @ =gBattleAnimArgs
ldrh r0, [r1, 0x6]
strh r0, [r5, 0x2E]
movs r2, 0xE
ldrsh r0, [r1, r2]
movs r1, 0x80
lsls r1, 8
ands r0, r1
cmp r0, 0
beq _080D667C
ldr r0, _080D6678 @ =gAnimBankTarget
b _080D667E
.align 2, 0
_080D6674: .4byte gBattleAnimArgs
_080D6678: .4byte gAnimBankTarget
_080D667C:
ldr r0, _080D670C @ =gAnimBankAttacker
_080D667E:
ldrb r6, [r0]
ldr r0, _080D6710 @ =gMain
ldr r3, _080D6714 @ =0x0000043d
adds r0, r3
ldrb r1, [r0]
movs r0, 0x2
ands r0, r1
cmp r0, 0
beq _080D669C
adds r0, r6, 0
bl GetBankSide
lsls r0, 24
cmp r0, 0
bne _080D66A4
_080D669C:
ldr r1, _080D6718 @ =gBattleAnimArgs
ldrh r0, [r1]
negs r0, r0
strh r0, [r1]
_080D66A4:
adds r0, r6, 0
movs r1, 0x2
bl GetBankPosition
lsls r0, 24
ldr r4, _080D6718 @ =gBattleAnimArgs
lsrs r0, 24
ldrh r1, [r4]
adds r0, r1
strh r0, [r5, 0x20]
adds r0, r6, 0
movs r1, 0x3
bl GetBankPosition
lsls r0, 24
lsrs r0, 24
ldrh r2, [r4, 0x2]
adds r0, r2
strh r0, [r5, 0x22]
ldrh r1, [r4, 0xE]
ldr r0, _080D671C @ =0x00007fff
ands r0, r1
strh r0, [r5, 0x36]
ldrh r0, [r4, 0x4]
strh r0, [r5, 0x38]
ldrh r0, [r4, 0xA]
strh r0, [r5, 0x3A]
ldrh r0, [r4, 0x8]
strh r0, [r5, 0x3C]
ldrh r2, [r5, 0x4]
lsls r1, r2, 22
lsrs r1, 22
movs r3, 0xC
ldrsh r0, [r4, r3]
lsls r0, 2
adds r1, r0
ldr r3, _080D6720 @ =0x000003ff
adds r0, r3, 0
ands r1, r0
ldr r0, _080D6724 @ =0xfffffc00
ands r0, r2
orrs r0, r1
strh r0, [r5, 0x4]
ldr r1, _080D6728 @ =sub_80D672C
str r1, [r5, 0x1C]
adds r0, r5, 0
bl _call_via_r1
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_080D670C: .4byte gAnimBankAttacker
_080D6710: .4byte gMain
_080D6714: .4byte 0x0000043d
_080D6718: .4byte gBattleAnimArgs
_080D671C: .4byte 0x00007fff
_080D6720: .4byte 0x000003ff
_080D6724: .4byte 0xfffffc00
_080D6728: .4byte sub_80D672C
thumb_func_end sub_80D6658
thumb_func_start sub_80D672C
sub_80D672C: @ 80D672C
push {r4,lr}
adds r4, r0, 0
movs r1, 0x3C
ldrsh r0, [r4, r1]
movs r2, 0x38
ldrsh r1, [r4, r2]
bl Sin
strh r0, [r4, 0x24]
movs r1, 0x3C
ldrsh r0, [r4, r1]
movs r2, 0x38
ldrsh r1, [r4, r2]
bl Cos
strh r0, [r4, 0x26]
ldrh r0, [r4, 0x3A]
ldrh r1, [r4, 0x3C]
adds r0, r1
movs r1, 0xFF
ands r0, r1
strh r0, [r4, 0x3C]
movs r2, 0x3C
ldrsh r0, [r4, r2]
movs r2, 0x36
ldrsh r1, [r4, r2]
bl __modsi3
cmp r0, 0
bne _080D6782
adds r3, r4, 0
adds r3, 0x3E
ldrb r2, [r3]
lsls r0, r2, 29
lsrs r0, 31
movs r1, 0x1
eors r1, r0
lsls r1, 2
movs r0, 0x5
negs r0, r0
ands r0, r2
orrs r0, r1
strb r0, [r3]
_080D6782:
ldrh r0, [r4, 0x2E]
subs r1, r0, 0x1
strh r1, [r4, 0x2E]
lsls r0, 16
cmp r0, 0
bgt _080D6794
adds r0, r4, 0
bl DestroyAnimSprite
_080D6794:
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_80D672C
thumb_func_start sub_80D679C
sub_80D679C: @ 80D679C
push {r4,r5,lr}
adds r4, r0, 0
movs r1, 0
bl sub_8078764
ldrh r2, [r4, 0x4]
lsls r1, r2, 22
lsrs r1, 22
ldr r3, _080D67D8 @ =gBattleAnimArgs
movs r5, 0x6
ldrsh r0, [r3, r5]
lsls r0, 2
adds r1, r0
ldr r5, _080D67DC @ =0x000003ff
adds r0, r5, 0
ands r1, r0
ldr r0, _080D67E0 @ =0xfffffc00
ands r0, r2
orrs r0, r1
strh r0, [r4, 0x4]
movs r1, 0x6
ldrsh r0, [r3, r1]
cmp r0, 0x1
bne _080D67E4
ldrb r0, [r4, 0x3]
movs r1, 0x3F
negs r1, r1
ands r1, r0
movs r0, 0x10
b _080D67F2
.align 2, 0
_080D67D8: .4byte gBattleAnimArgs
_080D67DC: .4byte 0x000003ff
_080D67E0: .4byte 0xfffffc00
_080D67E4:
cmp r0, 0x2
bne _080D67F6
ldrb r0, [r4, 0x3]
movs r1, 0x3F
negs r1, r1
ands r1, r0
movs r0, 0x20
_080D67F2:
orrs r1, r0
strb r1, [r4, 0x3]
_080D67F6:
ldr r0, _080D6810 @ =gBattleAnimArgs
ldrh r0, [r0, 0x4]
strh r0, [r4, 0x2E]
ldr r0, _080D6814 @ =sub_80782D8
str r0, [r4, 0x1C]
ldr r1, _080D6818 @ =DestroyAnimSprite
adds r0, r4, 0
bl StoreSpriteCallbackInData
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_080D6810: .4byte gBattleAnimArgs
_080D6814: .4byte sub_80782D8
_080D6818: .4byte DestroyAnimSprite
thumb_func_end sub_80D679C
thumb_func_start sub_80D681C
sub_80D681C: @ 80D681C
push {r4-r6,lr}
adds r5, r0, 0
lsls r5, 24
lsrs r5, 24
ldr r6, _080D6864 @ =gAnimBankTarget
ldrb r0, [r6]
movs r1, 0
bl GetBankPosition
ldr r1, _080D6868 @ =gTasks
lsls r4, r5, 2
adds r4, r5
lsls r4, 3
adds r4, r1
lsls r0, 24
ldr r5, _080D686C @ =gBattleAnimArgs
lsrs r0, 24
ldrh r1, [r5]
adds r0, r1
strh r0, [r4, 0x8]
ldrb r0, [r6]
movs r1, 0x1
bl GetBankPosition
lsls r0, 24
lsrs r0, 24
ldrh r1, [r5, 0x2]
adds r0, r1
strh r0, [r4, 0xA]
ldrh r0, [r5, 0x4]
strh r0, [r4, 0xC]
ldr r0, _080D6870 @ =sub_80D6874
str r0, [r4]
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_080D6864: .4byte gAnimBankTarget
_080D6868: .4byte gTasks
_080D686C: .4byte gBattleAnimArgs
_080D6870: .4byte sub_80D6874
thumb_func_end sub_80D681C
thumb_func_start sub_80D6874
sub_80D6874: @ 80D6874
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x4
lsls r0, 24
lsrs r0, 24
mov r9, r0
movs r5, 0
movs r7, 0
ldr r1, _080D68B4 @ =gTasks
lsls r0, 2
add r0, r9
lsls r0, 3
adds r0, r1
ldrb r2, [r0, 0xC]
str r2, [sp]
ldrh r4, [r0, 0x8]
ldrh r6, [r0, 0xA]
movs r3, 0xC
ldrsh r0, [r0, r3]
mov r10, r1
cmp r0, 0
bne _080D68B8
movs r0, 0
mov r8, r0
movs r2, 0x1
movs r1, 0x10
mov r12, r1
b _080D68C2
.align 2, 0
_080D68B4: .4byte gTasks
_080D68B8:
movs r2, 0x10
mov r12, r2
movs r3, 0x8
mov r8, r3
movs r2, 0x4
_080D68C2:
mov r0, r9
lsls r1, r0, 2
adds r0, r1, r0
lsls r0, 3
add r0, r10
movs r3, 0x1C
ldrsh r0, [r0, r3]
mov r10, r1
cmp r0, 0xA
bhi _080D69B8
lsls r0, 2
ldr r1, _080D68E0 @ =_080D68E4
adds r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_080D68E0: .4byte _080D68E4
.align 2, 0
_080D68E4:
.4byte _080D6910
.4byte _080D69B8
.4byte _080D6924
.4byte _080D69B8
.4byte _080D6944
.4byte _080D69B8
.4byte _080D695A
.4byte _080D69B8
.4byte _080D697C
.4byte _080D69B8
.4byte _080D69B0
_080D6910:
ldr r0, _080D6920 @ =gSpriteTemplate_83D9938
lsls r1, r4, 16
asrs r1, 16
lsls r2, r6, 16
asrs r2, 16
mov r4, r12
lsls r3, r4, 16
b _080D6992
.align 2, 0
_080D6920: .4byte gSpriteTemplate_83D9938
_080D6924:
mov r0, r12
lsls r3, r0, 17
mov r1, r8
adds r0, r1, r2
lsls r0, 16
lsrs r0, 16
mov r8, r0
ldr r0, _080D6940 @ =gSpriteTemplate_83D9938
lsls r1, r4, 16
asrs r1, 16
lsls r2, r6, 16
asrs r2, 16
b _080D6992
.align 2, 0
_080D6940: .4byte gSpriteTemplate_83D9938
_080D6944:
mov r3, r12
lsls r0, r3, 16
asrs r0, 16
lsls r3, r0, 1
adds r3, r0
lsls r0, r2, 1
add r0, r8
lsls r0, 16
lsrs r0, 16
mov r8, r0
b _080D6986
_080D695A:
mov r0, r12
lsls r3, r0, 18
lsls r0, r2, 1
adds r0, r2
add r0, r8
lsls r0, 16
lsrs r0, 16
mov r8, r0
ldr r0, _080D6978 @ =gSpriteTemplate_83D9938
lsls r1, r4, 16
asrs r1, 16
lsls r2, r6, 16
asrs r2, 16
b _080D6992
.align 2, 0
_080D6978: .4byte gSpriteTemplate_83D9938
_080D697C:
mov r1, r12
lsls r0, r1, 16
asrs r0, 16
lsls r3, r0, 2
adds r3, r0
_080D6986:
ldr r0, _080D69AC @ =gSpriteTemplate_83D9938
lsls r1, r4, 16
asrs r1, 16
lsls r2, r6, 16
asrs r2, 16
lsls r3, 16
_080D6992:
asrs r3, 16
adds r2, r3
lsls r2, 16
asrs r2, 16
movs r3, 0x2
bl CreateSprite
lsls r0, 24
lsrs r5, r0, 24
adds r0, r7, 0x1
lsls r0, 24
lsrs r7, r0, 24
b _080D69B8
.align 2, 0
_080D69AC: .4byte gSpriteTemplate_83D9938
_080D69B0:
mov r0, r9
bl DestroyAnimVisualTask
b _080D69FC
_080D69B8:
cmp r7, 0
beq _080D69EC
ldr r4, _080D6A0C @ =gSprites
lsls r3, r5, 4
adds r3, r5
lsls r3, 2
adds r0, r3, r4
ldrh r5, [r0, 0x4]
lsls r2, r5, 22
lsrs r2, 22
add r2, r8
ldr r6, _080D6A10 @ =0x000003ff
adds r1, r6, 0
ands r2, r1
ldr r1, _080D6A14 @ =0xfffffc00
ands r1, r5
orrs r1, r2
strh r1, [r0, 0x4]
mov r1, sp
ldrh r1, [r1]
strh r1, [r0, 0x2E]
adds r4, 0x1C
adds r3, r4
ldr r1, [r3]
bl _call_via_r1
_080D69EC:
ldr r0, _080D6A18 @ =gTasks
mov r1, r10
add r1, r9
lsls r1, 3
adds r1, r0
ldrh r0, [r1, 0x1C]
adds r0, 0x1
strh r0, [r1, 0x1C]
_080D69FC:
add sp, 0x4
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080D6A0C: .4byte gSprites
_080D6A10: .4byte 0x000003ff
_080D6A14: .4byte 0xfffffc00
_080D6A18: .4byte gTasks
thumb_func_end sub_80D6874
thumb_func_start sub_80D6A1C
sub_80D6A1C: @ 80D6A1C
push {lr}
adds r3, r0, 0
movs r1, 0x2E
ldrsh r0, [r3, r1]
cmp r0, 0
bne _080D6A3E
ldrb r1, [r3, 0x1]
movs r2, 0x3F
adds r0, r2, 0
ands r0, r1
movs r1, 0x80
orrs r0, r1
strb r0, [r3, 0x1]
ldrb r0, [r3, 0x3]
ands r2, r0
strb r2, [r3, 0x3]
b _080D6A52
_080D6A3E:
ldrb r2, [r3, 0x1]
movs r1, 0x3F
adds r0, r1, 0
ands r0, r2
strb r0, [r3, 0x1]
ldrb r0, [r3, 0x3]
ands r1, r0
movs r0, 0x40
orrs r1, r0
strb r1, [r3, 0x3]
_080D6A52:
ldrh r0, [r3, 0x30]
adds r0, 0x1
strh r0, [r3, 0x30]
lsls r0, 16
asrs r0, 16
cmp r0, 0xF
bne _080D6A66
adds r0, r3, 0
bl DestroySprite
_080D6A66:
pop {r0}
bx r0
thumb_func_end sub_80D6A1C
thumb_func_start sub_80D6A6C
sub_80D6A6C: @ 80D6A6C
push {r4-r7,lr}
adds r4, r0, 0
ldr r0, _080D6AD4 @ =gBattleAnimArgs
ldrh r1, [r0]
ldrh r2, [r4, 0x20]
adds r1, r2
strh r1, [r4, 0x20]
ldrh r0, [r0, 0x2]
ldrh r3, [r4, 0x22]
adds r0, r3
strh r0, [r4, 0x22]
ldr r0, _080D6AD8 @ =gBattleAnimSpriteTemplate_83D9950
adds r1, 0x20
lsls r1, 16
asrs r1, 16
movs r7, 0x22
ldrsh r2, [r4, r7]
adds r3, r4, 0
adds r3, 0x43
ldrb r3, [r3]
bl CreateSprite
lsls r0, 24
lsrs r0, 24
ldr r3, _080D6ADC @ =gSprites
lsls r2, r0, 4
adds r2, r0
lsls r2, 2
adds r6, r2, r3
ldrh r5, [r6, 0x4]
lsls r1, r5, 22
lsrs r1, 22
adds r1, 0x8
ldr r7, _080D6AE0 @ =0x000003ff
adds r0, r7, 0
ands r1, r0
ldr r0, _080D6AE4 @ =0xfffffc00
ands r0, r5
orrs r0, r1
strh r0, [r6, 0x4]
ldr r1, _080D6AE8 @ =gAnimVisualTaskCount
ldrb r0, [r1]
adds r0, 0x1
strb r0, [r1]
adds r3, 0x1C
adds r2, r3
ldr r0, _080D6AEC @ =sub_80D6AF0
str r0, [r2]
str r0, [r4, 0x1C]
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080D6AD4: .4byte gBattleAnimArgs
_080D6AD8: .4byte gBattleAnimSpriteTemplate_83D9950
_080D6ADC: .4byte gSprites
_080D6AE0: .4byte 0x000003ff
_080D6AE4: .4byte 0xfffffc00
_080D6AE8: .4byte gAnimVisualTaskCount
_080D6AEC: .4byte sub_80D6AF0
thumb_func_end sub_80D6A6C
thumb_func_start sub_80D6AF0
sub_80D6AF0: @ 80D6AF0
push {lr}
adds r3, r0, 0
ldrh r0, [r3, 0x2E]
adds r0, 0x1
strh r0, [r3, 0x2E]
lsls r0, 16
asrs r0, 16
cmp r0, 0x3
bne _080D6B24
movs r0, 0
strh r0, [r3, 0x2E]
movs r0, 0x3E
adds r0, r3
mov r12, r0
ldrb r2, [r0]
lsls r0, r2, 29
lsrs r0, 31
movs r1, 0x1
eors r1, r0
lsls r1, 2
movs r0, 0x5
negs r0, r0
ands r0, r2
orrs r0, r1
mov r1, r12
strb r0, [r1]
_080D6B24:
ldrh r0, [r3, 0x30]
adds r0, 0x1
strh r0, [r3, 0x30]
lsls r0, 16
asrs r0, 16
cmp r0, 0x33
bne _080D6B38
adds r0, r3, 0
bl DestroyAnimSprite
_080D6B38:
pop {r0}
bx r0
thumb_func_end sub_80D6AF0
thumb_func_start sub_80D6B3C
sub_80D6B3C: @ 80D6B3C
push {r4,r5,lr}
lsls r0, 24
lsrs r0, 24
lsls r1, r0, 2
adds r1, r0
lsls r1, 3
ldr r0, _080D6B5C @ =gTasks
adds r5, r1, r0
ldr r0, _080D6B60 @ =gBattleAnimArgs
movs r1, 0
ldrsh r0, [r0, r1]
cmp r0, 0
bne _080D6B68
ldr r4, _080D6B64 @ =gAnimBankAttacker
b _080D6B6A
.align 2, 0
_080D6B5C: .4byte gTasks
_080D6B60: .4byte gBattleAnimArgs
_080D6B64: .4byte gAnimBankAttacker
_080D6B68:
ldr r4, _080D6BAC @ =gAnimBankTarget
_080D6B6A:
ldrb r0, [r4]
movs r1, 0x2
bl GetBankPosition
lsls r0, 24
lsrs r0, 24
strh r0, [r5, 0x24]
ldrb r0, [r4]
movs r1, 0x3
bl GetBankPosition
lsls r0, 24
lsrs r0, 24
strh r0, [r5, 0x26]
ldr r2, _080D6BB0 @ =gBattleAnimArgs
ldrh r0, [r2, 0x2]
movs r1, 0
strh r0, [r5, 0x14]
strh r1, [r5, 0x16]
strh r1, [r5, 0x18]
strh r1, [r5, 0x1A]
strh r1, [r5, 0x1C]
ldrh r0, [r2, 0x6]
strh r0, [r5, 0x1E]
strh r1, [r5, 0x20]
ldrh r0, [r2, 0x4]
strh r0, [r5, 0x22]
ldr r0, _080D6BB4 @ =sub_80D6BB8
str r0, [r5]
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_080D6BAC: .4byte gAnimBankTarget
_080D6BB0: .4byte gBattleAnimArgs
_080D6BB4: .4byte sub_80D6BB8
thumb_func_end sub_80D6B3C
thumb_func_start sub_80D6BB8
sub_80D6BB8: @ 80D6BB8
push {r4-r7,lr}
lsls r0, 24
lsrs r6, r0, 24
adds r2, r6, 0
lsls r0, r6, 2
adds r0, r6
lsls r0, 3
ldr r1, _080D6CA0 @ =gTasks
adds r5, r0, r1
movs r1, 0x14
ldrsh r0, [r5, r1]
cmp r0, 0
beq _080D6CB8
ldrh r0, [r5, 0x20]
adds r0, 0x1
movs r7, 0
strh r0, [r5, 0x20]
lsls r0, 16
asrs r0, 16
movs r2, 0x22
ldrsh r1, [r5, r2]
cmp r0, r1
ble _080D6CC6
strh r7, [r5, 0x20]
ldr r0, _080D6CA4 @ =gSpriteTemplate_83D99B8
movs r3, 0x24
ldrsh r1, [r5, r3]
movs r3, 0x26
ldrsh r2, [r5, r3]
movs r3, 0x2
bl CreateSprite
lsls r0, 24
lsrs r0, 24
cmp r0, 0x40
beq _080D6CC6
lsls r4, r0, 4
adds r4, r0
lsls r4, 2
ldr r0, _080D6CA8 @ =gSprites
adds r4, r0
ldr r1, _080D6CAC @ =gUnknown_083D9968
movs r2, 0x1A
ldrsh r0, [r5, r2]
lsls r0, 1
adds r0, r1
movs r3, 0
ldrsb r3, [r0, r3]
ldrh r0, [r4, 0x20]
adds r3, r0
strh r3, [r4, 0x20]
movs r2, 0x1A
ldrsh r0, [r5, r2]
lsls r0, 1
adds r1, 0x1
adds r0, r1
movs r2, 0
ldrsb r2, [r0, r2]
ldrh r0, [r4, 0x22]
adds r2, r0
strh r2, [r4, 0x22]
movs r1, 0x18
ldrsh r0, [r5, r1]
lsls r1, r0, 2
adds r1, r0
movs r0, 0x28
subs r0, r1
strh r0, [r4, 0x2E]
strh r3, [r4, 0x30]
ldrh r0, [r5, 0x24]
strh r0, [r4, 0x32]
strh r2, [r4, 0x34]
ldrh r0, [r5, 0x26]
strh r0, [r4, 0x36]
strh r6, [r4, 0x38]
adds r0, r4, 0
bl obj_translate_based_on_private_1_2_3_4
ldr r1, _080D6CB0 @ =sub_80D6D00
adds r0, r4, 0
bl StoreSpriteCallbackInData
ldr r0, _080D6CB4 @ =sub_8078600
str r0, [r4, 0x1C]
ldrh r0, [r5, 0x1A]
adds r0, 0x1
strh r0, [r5, 0x1A]
lsls r0, 16
asrs r0, 16
cmp r0, 0xF
ble _080D6C70
strh r7, [r5, 0x1A]
_080D6C70:
ldrh r0, [r5, 0x1C]
adds r0, 0x1
strh r0, [r5, 0x1C]
lsls r0, 16
asrs r0, 16
movs r2, 0x1E
ldrsh r1, [r5, r2]
cmp r0, r1
blt _080D6C92
strh r7, [r5, 0x1C]
ldrh r1, [r5, 0x18]
movs r3, 0x18
ldrsh r0, [r5, r3]
cmp r0, 0x5
bgt _080D6C92
adds r0, r1, 0x1
strh r0, [r5, 0x18]
_080D6C92:
ldrh r0, [r5, 0x16]
adds r0, 0x1
strh r0, [r5, 0x16]
ldrh r0, [r5, 0x14]
subs r0, 0x1
strh r0, [r5, 0x14]
b _080D6CC6
.align 2, 0
_080D6CA0: .4byte gTasks
_080D6CA4: .4byte gSpriteTemplate_83D99B8
_080D6CA8: .4byte gSprites
_080D6CAC: .4byte gUnknown_083D9968
_080D6CB0: .4byte sub_80D6D00
_080D6CB4: .4byte sub_8078600
_080D6CB8:
movs r1, 0x16
ldrsh r0, [r5, r1]
cmp r0, 0
bne _080D6CC6
adds r0, r2, 0
bl DestroyAnimVisualTask
_080D6CC6:
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_80D6BB8
thumb_func_start sub_80D6CCC
sub_80D6CCC: @ 80D6CCC
push {r4,lr}
adds r4, r0, 0
bl sub_8078B5C
lsls r0, 24
cmp r0, 0
beq _080D6CF4
ldr r2, _080D6CFC @ =gTasks
movs r0, 0x38
ldrsh r1, [r4, r0]
lsls r0, r1, 2
adds r0, r1
lsls r0, 3
adds r0, r2
ldrh r1, [r0, 0x16]
subs r1, 0x1
strh r1, [r0, 0x16]
adds r0, r4, 0
bl DestroySprite
_080D6CF4:
pop {r4}
pop {r0}
bx r0
.align 2, 0
_080D6CFC: .4byte gTasks
thumb_func_end sub_80D6CCC
thumb_func_start sub_80D6D00
sub_80D6D00: @ 80D6D00
push {r4,lr}
adds r4, r0, 0
movs r1, 0x1
bl StartSpriteAnim
ldr r0, _080D6D14 @ =sub_80D6CCC
str r0, [r4, 0x1C]
pop {r4}
pop {r0}
bx r0
.align 2, 0
_080D6D14: .4byte sub_80D6CCC
thumb_func_end sub_80D6D00
thumb_func_start sub_80D6D18
sub_80D6D18: @ 80D6D18
push {r4,r5,lr}
adds r5, r0, 0
ldr r0, _080D6D2C @ =gBattleAnimArgs
movs r1, 0
ldrsh r0, [r0, r1]
cmp r0, 0
bne _080D6D34
ldr r4, _080D6D30 @ =gAnimBankAttacker
b _080D6D36
.align 2, 0
_080D6D2C: .4byte gBattleAnimArgs
_080D6D30: .4byte gAnimBankAttacker
_080D6D34:
ldr r4, _080D6D64 @ =gAnimBankTarget
_080D6D36:
ldrb r0, [r4]
movs r1, 0x2
bl GetBankPosition
lsls r0, 24
lsrs r0, 24
strh r0, [r5, 0x20]
ldrb r0, [r4]
movs r1, 0x3
bl GetBankPosition
lsls r0, 24
lsrs r0, 24
strh r0, [r5, 0x22]
ldr r1, _080D6D68 @ =move_anim_8074EE0
adds r0, r5, 0
bl StoreSpriteCallbackInData
ldr r0, _080D6D6C @ =sub_80785E4
str r0, [r5, 0x1C]
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_080D6D64: .4byte gAnimBankTarget
_080D6D68: .4byte move_anim_8074EE0
_080D6D6C: .4byte sub_80785E4
thumb_func_end sub_80D6D18
thumb_func_start sub_80D6D70
sub_80D6D70: @ 80D6D70
push {r4,r5,lr}
adds r5, r0, 0
ldr r0, _080D6D84 @ =gBattleAnimArgs
movs r1, 0
ldrsh r0, [r0, r1]
cmp r0, 0
bne _080D6D8C
ldr r4, _080D6D88 @ =gAnimBankAttacker
b _080D6D8E
.align 2, 0
_080D6D84: .4byte gBattleAnimArgs
_080D6D88: .4byte gAnimBankAttacker
_080D6D8C:
ldr r4, _080D6DC8 @ =gAnimBankTarget
_080D6D8E:
ldrb r0, [r4]
movs r1, 0x2
bl GetBankPosition
lsls r0, 24
lsrs r0, 24
strh r0, [r5, 0x20]
ldrb r0, [r4]
movs r1, 0x3
bl GetBankPosition
lsls r0, 24
lsrs r0, 24
strh r0, [r5, 0x22]
ldr r1, _080D6DCC @ =gBattleAnimArgs
ldrh r0, [r1, 0x2]
strh r0, [r5, 0x24]
ldrh r0, [r1, 0x4]
strh r0, [r5, 0x26]
ldr r1, _080D6DD0 @ =DestroyAnimSprite
adds r0, r5, 0
bl StoreSpriteCallbackInData
ldr r0, _080D6DD4 @ =sub_8078600
str r0, [r5, 0x1C]
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_080D6DC8: .4byte gAnimBankTarget
_080D6DCC: .4byte gBattleAnimArgs
_080D6DD0: .4byte DestroyAnimSprite
_080D6DD4: .4byte sub_8078600
thumb_func_end sub_80D6D70
thumb_func_start sub_80D6DD8
sub_80D6DD8: @ 80D6DD8
push {r4,r5,lr}
adds r5, r0, 0
movs r1, 0x1
bl StartSpriteAffineAnim
ldr r4, _080D6E30 @ =gAnimBankAttacker
ldrb r0, [r4]
movs r1, 0x2
bl GetBankPosition
lsls r0, 24
lsrs r0, 24
strh r0, [r5, 0x20]
ldrb r0, [r4]
movs r1, 0x3
bl GetBankPosition
lsls r0, 24
lsrs r0, 24
strh r0, [r5, 0x22]
movs r0, 0
bl GetAnimBankSpriteId
lsls r0, 24
lsrs r0, 24
strh r0, [r5, 0x3A]
movs r0, 0x10
strh r0, [r5, 0x3C]
ldrb r0, [r4]
bl GetBankSide
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _080D6E26
movs r1, 0x3C
ldrsh r0, [r5, r1]
negs r0, r0
strh r0, [r5, 0x3C]
_080D6E26:
ldr r0, _080D6E34 @ =sub_80D6E38
str r0, [r5, 0x1C]
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_080D6E30: .4byte gAnimBankAttacker
_080D6E34: .4byte sub_80D6E38
thumb_func_end sub_80D6DD8
thumb_func_start sub_80D6E38
sub_80D6E38: @ 80D6E38
push {r4,lr}
adds r4, r0, 0
movs r1, 0x2E
ldrsh r0, [r4, r1]
cmp r0, 0
beq _080D6E4A
cmp r0, 0x1
beq _080D6E60
b _080D6E90
_080D6E4A:
ldrh r0, [r4, 0x30]
adds r0, 0x1
strh r0, [r4, 0x30]
lsls r0, 16
asrs r0, 16
cmp r0, 0x28
ble _080D6E90
ldrh r0, [r4, 0x2E]
adds r0, 0x1
strh r0, [r4, 0x2E]
b _080D6E90
_080D6E60:
ldrh r2, [r4, 0x3C]
ldrh r1, [r4, 0x20]
adds r0, r2, r1
strh r0, [r4, 0x20]
ldr r3, _080D6E98 @ =gSprites
movs r0, 0x3A
ldrsh r1, [r4, r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r3
ldrh r1, [r0, 0x24]
adds r2, r1
strh r2, [r0, 0x24]
ldrh r0, [r4, 0x20]
adds r0, 0x50
lsls r0, 16
movs r1, 0xC8
lsls r1, 17
cmp r0, r1
bls _080D6E90
adds r0, r4, 0
bl move_anim_8074EE0
_080D6E90:
pop {r4}
pop {r0}
bx r0
.align 2, 0
_080D6E98: .4byte gSprites
thumb_func_end sub_80D6E38
thumb_func_start sub_80D6E9C
sub_80D6E9C: @ 80D6E9C
push {r4-r6,lr}
lsls r0, 24
lsrs r3, r0, 24
lsls r0, r3, 2
adds r0, r3
lsls r0, 3
ldr r1, _080D6EC0 @ =gTasks
adds r5, r0, r1
movs r1, 0x8
ldrsh r0, [r5, r1]
cmp r0, 0x1
beq _080D6F30
cmp r0, 0x1
bgt _080D6EC4
cmp r0, 0
beq _080D6ED0
b _080D7000
.align 2, 0
_080D6EC0: .4byte gTasks
_080D6EC4:
cmp r0, 0x2
beq _080D6F8C
cmp r0, 0x3
bne _080D6ECE
b _080D6FE0
_080D6ECE:
b _080D7000
_080D6ED0:
movs r0, 0
bl GetAnimBankSpriteId
lsls r0, 24
lsrs r0, 24
movs r6, 0
strh r0, [r5, 0x26]
ldr r4, _080D6F04 @ =gAnimBankAttacker
ldrb r0, [r4]
movs r1, 0x2
bl GetBankPosition
lsls r0, 24
lsrs r0, 24
strh r0, [r5, 0x24]
ldrb r0, [r4]
bl GetBankSide
lsls r0, 24
cmp r0, 0
bne _080D6F0C
ldr r0, _080D6F08 @ =0x0000ffe0
strh r0, [r5, 0x24]
movs r0, 0x2
b _080D6F12
.align 2, 0
_080D6F04: .4byte gAnimBankAttacker
_080D6F08: .4byte 0x0000ffe0
_080D6F0C:
movs r0, 0x20
strh r0, [r5, 0x24]
ldr r0, _080D6F28 @ =0x0000fffe
_080D6F12:
strh r0, [r5, 0x22]
ldr r2, _080D6F2C @ =gSprites
movs r0, 0x26
ldrsh r1, [r5, r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r2
ldrh r1, [r5, 0x24]
strh r1, [r0, 0x24]
b _080D6FD2
.align 2, 0
_080D6F28: .4byte 0x0000fffe
_080D6F2C: .4byte gSprites
_080D6F30:
ldrh r0, [r5, 0xA]
adds r0, 0x1
strh r0, [r5, 0xA]
lsls r0, 16
asrs r0, 16
cmp r0, 0x1
ble _080D7000
movs r0, 0
strh r0, [r5, 0xA]
ldr r4, _080D6F88 @ =gSprites
movs r1, 0x26
ldrsh r0, [r5, r1]
lsls r2, r0, 4
adds r2, r0
lsls r2, 2
adds r2, r4
adds r2, 0x3E
ldrb r3, [r2]
lsls r0, r3, 29
lsrs r0, 31
movs r1, 0x1
eors r1, r0
lsls r1, 2
movs r0, 0x5
negs r0, r0
ands r0, r3
orrs r0, r1
strb r0, [r2]
ldrh r1, [r5, 0x24]
movs r2, 0x24
ldrsh r0, [r5, r2]
cmp r0, 0
beq _080D6FD2
ldrh r2, [r5, 0x22]
adds r2, r1, r2
strh r2, [r5, 0x24]
movs r0, 0x26
ldrsh r1, [r5, r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r4
strh r2, [r0, 0x24]
b _080D7000
.align 2, 0
_080D6F88: .4byte gSprites
_080D6F8C:
ldrh r0, [r5, 0xA]
adds r0, 0x1
strh r0, [r5, 0xA]
lsls r0, 16
asrs r0, 16
cmp r0, 0x1
ble _080D7000
movs r0, 0
strh r0, [r5, 0xA]
ldr r1, _080D6FDC @ =gSprites
movs r2, 0x26
ldrsh r0, [r5, r2]
lsls r2, r0, 4
adds r2, r0
lsls r2, 2
adds r2, r1
adds r2, 0x3E
ldrb r3, [r2]
lsls r0, r3, 29
lsrs r0, 31
movs r1, 0x1
eors r1, r0
lsls r1, 2
movs r0, 0x5
negs r0, r0
ands r0, r3
orrs r0, r1
strb r0, [r2]
ldrh r0, [r5, 0xC]
adds r0, 0x1
strh r0, [r5, 0xC]
lsls r0, 16
asrs r0, 16
cmp r0, 0x8
bne _080D7000
_080D6FD2:
ldrh r0, [r5, 0x8]
adds r0, 0x1
strh r0, [r5, 0x8]
b _080D7000
.align 2, 0
_080D6FDC: .4byte gSprites
_080D6FE0:
ldr r2, _080D7008 @ =gSprites
movs r0, 0x26
ldrsh r1, [r5, r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r2
adds r0, 0x3E
ldrb r2, [r0]
movs r1, 0x5
negs r1, r1
ands r1, r2
strb r1, [r0]
adds r0, r3, 0
bl DestroyAnimVisualTask
_080D7000:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_080D7008: .4byte gSprites
thumb_func_end sub_80D6E9C
thumb_func_start sub_80D700C
sub_80D700C: @ 80D700C
push {r4-r6,lr}
lsls r0, 24
lsrs r4, r0, 24
lsls r0, r4, 2
adds r0, r4
lsls r0, 3
ldr r1, _080D7030 @ =gTasks
adds r5, r0, r1
movs r1, 0x8
ldrsh r0, [r5, r1]
cmp r0, 0x1
bne _080D7026
b _080D714C
_080D7026:
cmp r0, 0x1
bgt _080D7034
cmp r0, 0
beq _080D703C
b _080D718E
.align 2, 0
_080D7030: .4byte gTasks
_080D7034:
cmp r0, 0x2
bne _080D703A
b _080D7180
_080D703A:
b _080D718E
_080D703C:
ldr r4, _080D707C @ =gAnimBankAttacker
ldrb r0, [r4]
bl GetBankSide
lsls r0, 24
movs r2, 0x1
negs r2, r2
adds r1, r2, 0
cmp r0, 0
bne _080D7052
movs r1, 0x1
_080D7052:
movs r6, 0
strh r1, [r5, 0xA]
ldr r0, _080D7080 @ =gBattleAnimArgs
movs r1, 0
ldrsh r2, [r0, r1]
adds r3, r0, 0
cmp r2, 0
beq _080D7088
cmp r2, 0x4
beq _080D70B0
ldrh r1, [r3]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _080D70E8
movs r0, 0x80
lsls r0, 1
strh r0, [r5, 0xE]
ldr r0, _080D7084 @ =0x0000fff0
b _080D70F0
.align 2, 0
_080D707C: .4byte gAnimBankAttacker
_080D7080: .4byte gBattleAnimArgs
_080D7084: .4byte 0x0000fff0
_080D7088:
ldrb r0, [r4]
movs r1, 0x2
bl GetBankPosition
lsls r0, 24
lsrs r0, 24
strh r0, [r5, 0xE]
ldrb r0, [r4]
movs r1, 0x3
bl GetBankPosition
lsls r0, 24
lsrs r0, 24
strh r0, [r5, 0x12]
movs r2, 0xA
ldrsh r0, [r5, r2]
lsls r0, 7
adds r0, 0x78
strh r0, [r5, 0x10]
b _080D7126
_080D70B0:
movs r0, 0xA
ldrsh r1, [r5, r0]
lsls r1, 7
movs r0, 0x78
subs r0, r1
strh r0, [r5, 0xE]
ldr r4, _080D70E4 @ =gAnimBankTarget
ldrb r0, [r4]
movs r1, 0x3
bl GetBankPosition
lsls r0, 24
lsrs r0, 24
strh r0, [r5, 0x12]
ldrb r0, [r4]
movs r1, 0x2
bl GetBankPosition
lsls r0, 24
lsrs r0, 24
movs r2, 0xA
ldrsh r1, [r5, r2]
lsls r1, 5
subs r0, r1
strh r0, [r5, 0x10]
b _080D7126
.align 2, 0
_080D70E4: .4byte gAnimBankTarget
_080D70E8:
ldr r0, _080D710C @ =0x0000fff0
strh r0, [r5, 0xE]
movs r0, 0x80
lsls r0, 1
_080D70F0:
strh r0, [r5, 0x10]
movs r1, 0xA
ldrsh r0, [r5, r1]
cmp r0, 0x1
bne _080D7110
movs r2, 0
ldrsh r0, [r3, r2]
lsls r1, r0, 2
adds r1, r0
lsls r1, 1
movs r0, 0x50
subs r0, r1
strh r0, [r5, 0x12]
b _080D7126
.align 2, 0
_080D710C: .4byte 0x0000fff0
_080D7110:
movs r0, 0
ldrsh r1, [r3, r0]
lsls r0, r1, 2
adds r0, r1
lsls r0, 1
adds r0, 0x28
strh r0, [r5, 0x12]
ldrh r1, [r5, 0xE]
ldrh r0, [r5, 0x10]
strh r0, [r5, 0xE]
strh r1, [r5, 0x10]
_080D7126:
movs r2, 0xE
ldrsh r1, [r5, r2]
movs r2, 0x10
ldrsh r0, [r5, r2]
cmp r1, r0
bge _080D713C
movs r1, 0
movs r0, 0x1
strh r0, [r5, 0xA]
strh r1, [r5, 0x14]
b _080D7178
_080D713C:
ldr r0, _080D7148 @ =0x0000ffff
strh r0, [r5, 0xA]
movs r0, 0x3
strh r0, [r5, 0x14]
b _080D7178
.align 2, 0
_080D7148: .4byte 0x0000ffff
_080D714C:
ldrh r0, [r5, 0xC]
adds r0, 0x1
strh r0, [r5, 0xC]
lsls r0, 16
cmp r0, 0
ble _080D718E
movs r0, 0
strh r0, [r5, 0xC]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80D7194
lsls r0, 24
cmp r0, 0
bne _080D7178
adds r0, r5, 0
adds r1, r4, 0
bl sub_80D7194
lsls r0, 24
cmp r0, 0
beq _080D718E
_080D7178:
ldrh r0, [r5, 0x8]
adds r0, 0x1
strh r0, [r5, 0x8]
b _080D718E
_080D7180:
movs r1, 0x16
ldrsh r0, [r5, r1]
cmp r0, 0
bne _080D718E
adds r0, r4, 0
bl DestroyAnimVisualTask
_080D718E:
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_80D700C
thumb_func_start sub_80D7194
sub_80D7194: @ 80D7194
push {r4,r5,lr}
adds r4, r0, 0
lsls r1, 24
lsrs r5, r1, 24
ldr r0, _080D7220 @ =gSpriteTemplate_83D9B10
movs r2, 0xE
ldrsh r1, [r4, r2]
movs r3, 0x12
ldrsh r2, [r4, r3]
movs r3, 0x23
bl CreateSprite
lsls r0, 24
lsrs r2, r0, 24
cmp r2, 0x40
beq _080D71CA
ldr r1, _080D7224 @ =gSprites
lsls r0, r2, 4
adds r0, r2
lsls r0, 2
adds r0, r1
strh r5, [r0, 0x3A]
movs r1, 0x7
strh r1, [r0, 0x3C]
ldrh r0, [r4, 0x16]
adds r0, 0x1
strh r0, [r4, 0x16]
_080D71CA:
ldrh r1, [r4, 0xA]
ldrh r5, [r4, 0x14]
adds r0, r1, r5
strh r0, [r4, 0x14]
lsls r0, 16
cmp r0, 0
bge _080D71DC
movs r0, 0x3
strh r0, [r4, 0x14]
_080D71DC:
movs r2, 0x14
ldrsh r0, [r4, r2]
cmp r0, 0x3
ble _080D71E8
movs r0, 0
strh r0, [r4, 0x14]
_080D71E8:
movs r3, 0xA
ldrsh r0, [r4, r3]
lsls r0, 4
ldrh r5, [r4, 0xE]
adds r2, r0, r5
strh r2, [r4, 0xE]
lsls r0, r1, 16
asrs r3, r0, 16
cmp r3, 0x1
bne _080D7208
lsls r0, r2, 16
asrs r0, 16
movs r5, 0x10
ldrsh r1, [r4, r5]
cmp r0, r1
bge _080D721C
_080D7208:
movs r0, 0x1
negs r0, r0
cmp r3, r0
bne _080D7228
lsls r0, r2, 16
asrs r0, 16
movs r2, 0x10
ldrsh r1, [r4, r2]
cmp r0, r1
bgt _080D7228
_080D721C:
movs r0, 0x1
b _080D722A
.align 2, 0
_080D7220: .4byte gSpriteTemplate_83D9B10
_080D7224: .4byte gSprites
_080D7228:
movs r0, 0
_080D722A:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_80D7194
thumb_func_start sub_80D7230
sub_80D7230: @ 80D7230
push {r4,lr}
adds r4, r0, 0
ldrh r0, [r4, 0x2E]
adds r0, 0x1
strh r0, [r4, 0x2E]
lsls r0, 16
asrs r0, 16
cmp r0, 0xC
ble _080D7270
ldr r3, _080D7278 @ =gTasks
movs r0, 0x3C
ldrsh r1, [r4, r0]
lsls r1, 1
movs r0, 0x3A
ldrsh r2, [r4, r0]
lsls r0, r2, 2
adds r0, r2
lsls r0, 3
adds r1, r0
adds r3, 0x8
adds r1, r3
ldrh r0, [r1]
subs r0, 0x1
strh r0, [r1]
ldrb r0, [r4, 0x3]
lsls r0, 26
lsrs r0, 27
bl FreeOamMatrix
adds r0, r4, 0
bl DestroySprite
_080D7270:
pop {r4}
pop {r0}
bx r0
.align 2, 0
_080D7278: .4byte gTasks
thumb_func_end sub_80D7230
thumb_func_start sub_80D727C
sub_80D727C: @ 80D727C
push {r4,r5,lr}
adds r5, r0, 0
movs r1, 0x2E
ldrsh r0, [r5, r1]
cmp r0, 0
beq _080D728E
cmp r0, 0x1
beq _080D72C0
b _080D72D4
_080D728E:
ldr r4, _080D72BC @ =gAnimBankAttacker
ldrb r0, [r4]
movs r1, 0x2
bl GetBankPosition
lsls r0, 24
lsrs r0, 24
strh r0, [r5, 0x20]
ldrb r0, [r4]
movs r1, 0x3
bl GetBankPosition
lsls r0, 24
lsrs r0, 24
strh r0, [r5, 0x22]
adds r0, r5, 0
movs r1, 0x2
bl StartSpriteAffineAnim
ldrh r0, [r5, 0x2E]
adds r0, 0x1
strh r0, [r5, 0x2E]
b _080D72D4
.align 2, 0
_080D72BC: .4byte gAnimBankAttacker
_080D72C0:
adds r0, r5, 0
adds r0, 0x3F
ldrb r1, [r0]
movs r0, 0x20
ands r0, r1
cmp r0, 0
beq _080D72D4
adds r0, r5, 0
bl move_anim_8074EE0
_080D72D4:
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_80D727C
thumb_func_start sub_80D72DC
sub_80D72DC: @ 80D72DC
push {r4,r5,lr}
lsls r0, 24
lsrs r2, r0, 24
lsls r0, r2, 2
adds r0, r2
lsls r0, 3
ldr r1, _080D7300 @ =gTasks
adds r5, r0, r1
movs r1, 0x8
ldrsh r0, [r5, r1]
cmp r0, 0x4
bls _080D72F6
b _080D7468
_080D72F6:
lsls r0, 2
ldr r1, _080D7304 @ =_080D7308
adds r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_080D7300: .4byte gTasks
_080D7304: .4byte _080D7308
.align 2, 0
_080D7308:
.4byte _080D731C
.4byte _080D73AC
.4byte _080D73E8
.4byte _080D7444
.4byte _080D7454
_080D731C:
ldr r4, _080D73A0 @ =gAnimBankAttacker
ldrb r0, [r4]
movs r1, 0x2
bl GetBankPosition
lsls r0, 24
lsrs r0, 24
strh r0, [r5, 0x14]
ldrb r0, [r4]
movs r1, 0x3
bl GetBankPosition
lsls r0, 24
lsrs r0, 24
strh r0, [r5, 0x16]
movs r0, 0x4
strh r0, [r5, 0x18]
ldr r0, _080D73A4 @ =gAnimBankTarget
ldrb r0, [r0]
movs r1, 0x2
bl GetBankPosition
lsls r0, 24
lsrs r0, 24
strh r0, [r5, 0x1C]
movs r2, 0x1C
ldrsh r0, [r5, r2]
movs r2, 0x14
ldrsh r1, [r5, r2]
subs r0, r1
movs r1, 0x5
bl __divsi3
strh r0, [r5, 0x1A]
movs r0, 0x7
strh r0, [r5, 0x10]
ldr r0, _080D73A8 @ =0x0000ffff
strh r0, [r5, 0x12]
movs r0, 0xC
strh r0, [r5, 0x1E]
subs r0, 0x4C
bl BattleAnimAdjustPanning
lsls r0, 24
asrs r0, 24
strh r0, [r5, 0x20]
movs r0, 0x3F
bl BattleAnimAdjustPanning
lsls r0, 24
asrs r0, 24
strh r0, [r5, 0x22]
ldrh r0, [r5, 0x20]
strh r0, [r5, 0x24]
movs r1, 0x22
ldrsh r0, [r5, r1]
movs r2, 0x20
ldrsh r1, [r5, r2]
subs r0, r1
movs r1, 0x3
bl __divsi3
strh r0, [r5, 0x26]
ldrh r0, [r5, 0x8]
adds r0, 0x1
b _080D7466
.align 2, 0
_080D73A0: .4byte gAnimBankAttacker
_080D73A4: .4byte gAnimBankTarget
_080D73A8: .4byte 0x0000ffff
_080D73AC:
ldrh r0, [r5, 0xA]
adds r0, 0x1
strh r0, [r5, 0xA]
lsls r0, 16
cmp r0, 0
ble _080D73DC
movs r0, 0
strh r0, [r5, 0xA]
adds r0, r5, 0
adds r1, r2, 0
bl sub_80D7470
lsls r0, 24
cmp r0, 0
beq _080D73DC
movs r1, 0xC
ldrsh r0, [r5, r1]
cmp r0, 0x5
bne _080D73D6
movs r0, 0x3
b _080D73DA
_080D73D6:
ldrh r0, [r5, 0x8]
adds r0, 0x1
_080D73DA:
strh r0, [r5, 0x8]
_080D73DC:
ldrh r1, [r5, 0x1E]
movs r2, 0x1E
ldrsh r0, [r5, r2]
cmp r0, 0
beq _080D7468
b _080D745E
_080D73E8:
ldrh r1, [r5, 0x1E]
movs r2, 0x1E
ldrsh r0, [r5, r2]
cmp r0, 0
beq _080D73F6
subs r0, r1, 0x1
strh r0, [r5, 0x1E]
_080D73F6:
ldrh r0, [r5, 0xA]
adds r0, 0x1
movs r3, 0
strh r0, [r5, 0xA]
lsls r0, 16
asrs r0, 16
cmp r0, 0x4
ble _080D7468
strh r3, [r5, 0xA]
ldrh r1, [r5, 0xC]
movs r2, 0x1
adds r0, r2, 0
ands r0, r1
cmp r0, 0
beq _080D7422
movs r0, 0x4
strh r0, [r5, 0x16]
movs r0, 0x44
strh r0, [r5, 0x18]
strh r3, [r5, 0x10]
strh r2, [r5, 0x12]
b _080D7432
_080D7422:
movs r0, 0x44
strh r0, [r5, 0x16]
movs r0, 0x4
strh r0, [r5, 0x18]
movs r0, 0x7
strh r0, [r5, 0x10]
ldr r0, _080D7440 @ =0x0000ffff
strh r0, [r5, 0x12]
_080D7432:
movs r1, 0x1E
ldrsh r0, [r5, r1]
cmp r0, 0
beq _080D7464
movs r0, 0x4
b _080D7466
.align 2, 0
_080D7440: .4byte 0x0000ffff
_080D7444:
movs r1, 0xE
ldrsh r0, [r5, r1]
cmp r0, 0
bne _080D7468
adds r0, r2, 0
bl DestroyAnimVisualTask
b _080D7468
_080D7454:
ldrh r1, [r5, 0x1E]
movs r2, 0x1E
ldrsh r0, [r5, r2]
cmp r0, 0
beq _080D7464
_080D745E:
subs r0, r1, 0x1
strh r0, [r5, 0x1E]
b _080D7468
_080D7464:
movs r0, 0x1
_080D7466:
strh r0, [r5, 0x8]
_080D7468:
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_80D72DC
thumb_func_start sub_80D7470
sub_80D7470: @ 80D7470
push {r4-r6,lr}
adds r4, r0, 0
lsls r1, 24
lsrs r5, r1, 24
ldr r0, _080D7538 @ =gSpriteTemplate_83D9B40
movs r2, 0x14
ldrsh r1, [r4, r2]
movs r3, 0x16
ldrsh r2, [r4, r3]
movs r3, 0x23
bl CreateSprite
lsls r0, 24
lsrs r2, r0, 24
cmp r2, 0x40
beq _080D74DC
ldr r1, _080D753C @ =gSprites
lsls r0, r2, 4
adds r0, r2
lsls r0, 2
adds r3, r0, r1
ldrh r2, [r3, 0x4]
lsls r1, r2, 22
lsrs r1, 22
ldrh r6, [r4, 0x10]
adds r1, r6
ldr r6, _080D7540 @ =0x000003ff
adds r0, r6, 0
ands r1, r0
ldr r0, _080D7544 @ =0xfffffc00
ands r0, r2
orrs r0, r1
strh r0, [r3, 0x4]
ldrh r0, [r4, 0x12]
ldrh r1, [r4, 0x10]
adds r0, r1
strh r0, [r4, 0x10]
lsls r0, 16
cmp r0, 0
bge _080D74C4
movs r0, 0x7
strh r0, [r4, 0x10]
_080D74C4:
movs r2, 0x10
ldrsh r0, [r4, r2]
cmp r0, 0x7
ble _080D74D0
movs r0, 0
strh r0, [r4, 0x10]
_080D74D0:
strh r5, [r3, 0x3A]
movs r0, 0x3
strh r0, [r3, 0x3C]
ldrh r0, [r4, 0xE]
adds r0, 0x1
strh r0, [r4, 0xE]
_080D74DC:
movs r3, 0x10
ldrsh r0, [r4, r3]
cmp r0, 0
bne _080D74FE
movs r5, 0x12
ldrsh r0, [r4, r5]
cmp r0, 0
ble _080D74FE
ldrh r1, [r4, 0x26]
ldrh r6, [r4, 0x24]
adds r1, r6
strh r1, [r4, 0x24]
lsls r1, 24
asrs r1, 24
movs r0, 0x76
bl PlaySE12WithPanning
_080D74FE:
movs r0, 0x12
ldrsh r3, [r4, r0]
ldrh r2, [r4, 0x16]
cmp r3, 0
bge _080D7514
lsls r0, r2, 16
asrs r0, 16
movs r5, 0x18
ldrsh r1, [r4, r5]
cmp r0, r1
ble _080D7524
_080D7514:
cmp r3, 0
ble _080D7548
lsls r0, r2, 16
asrs r0, 16
movs r6, 0x18
ldrsh r1, [r4, r6]
cmp r0, r1
blt _080D7548
_080D7524:
ldrh r0, [r4, 0xC]
adds r0, 0x1
strh r0, [r4, 0xC]
ldrh r0, [r4, 0x1A]
ldrh r1, [r4, 0x14]
adds r0, r1
strh r0, [r4, 0x14]
movs r0, 0x1
b _080D7554
.align 2, 0
_080D7538: .4byte gSpriteTemplate_83D9B40
_080D753C: .4byte gSprites
_080D7540: .4byte 0x000003ff
_080D7544: .4byte 0xfffffc00
_080D7548:
movs r3, 0x12
ldrsh r0, [r4, r3]
lsls r0, 3
adds r0, r2, r0
strh r0, [r4, 0x16]
movs r0, 0
_080D7554:
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_80D7470
thumb_func_start sub_80D755C
sub_80D755C: @ 80D755C
push {r4,lr}
adds r4, r0, 0
ldrh r0, [r4, 0x2E]
adds r0, 0x1
strh r0, [r4, 0x2E]
lsls r0, 16
asrs r0, 16
cmp r0, 0xC
ble _080D7592
ldr r3, _080D7598 @ =gTasks
movs r0, 0x3C
ldrsh r1, [r4, r0]
lsls r1, 1
movs r0, 0x3A
ldrsh r2, [r4, r0]
lsls r0, r2, 2
adds r0, r2
lsls r0, 3
adds r1, r0
adds r3, 0x8
adds r1, r3
ldrh r0, [r1]
subs r0, 0x1
strh r0, [r1]
adds r0, r4, 0
bl DestroySprite
_080D7592:
pop {r4}
pop {r0}
bx r0
.align 2, 0
_080D7598: .4byte gTasks
thumb_func_end sub_80D755C
thumb_func_start sub_80D759C
sub_80D759C: @ 80D759C
push {r4,r5,lr}
lsls r0, 24
lsrs r2, r0, 24
lsls r0, r2, 2
adds r0, r2
lsls r0, 3
ldr r1, _080D75C0 @ =gTasks
adds r5, r0, r1
movs r1, 0x8
ldrsh r0, [r5, r1]
cmp r0, 0x1
beq _080D7618
cmp r0, 0x1
bgt _080D75C4
cmp r0, 0
beq _080D75CA
b _080D764E
.align 2, 0
_080D75C0: .4byte gTasks
_080D75C4:
cmp r0, 0x2
beq _080D7640
b _080D764E
_080D75CA:
ldr r0, _080D7614 @ =gAnimBankTarget
ldrb r0, [r0]
movs r1, 0x1
bl GetBankPosition
lsls r0, 24
lsrs r0, 24
adds r0, 0x20
strh r0, [r5, 0x26]
strh r0, [r5, 0x24]
cmp r0, 0x10
ble _080D75F4
adds r2, r0, 0
_080D75E4:
adds r1, r2, 0
subs r1, 0x20
adds r2, r1, 0
lsls r0, r1, 16
asrs r0, 16
cmp r0, 0x10
bgt _080D75E4
strh r1, [r5, 0x24]
_080D75F4:
ldr r4, _080D7614 @ =gAnimBankTarget
ldrb r0, [r4]
movs r1, 0x2
bl GetBankPosition
lsls r0, 24
lsrs r0, 24
strh r0, [r5, 0x22]
ldrb r0, [r4]
bl sub_8079E90
lsls r0, 24
lsrs r0, 24
subs r0, 0x2
strh r0, [r5, 0x20]
b _080D7638
.align 2, 0
_080D7614: .4byte gAnimBankTarget
_080D7618:
ldrh r0, [r5, 0xA]
adds r0, 0x1
strh r0, [r5, 0xA]
lsls r0, 16
asrs r0, 16
cmp r0, 0x1
ble _080D764E
movs r0, 0
strh r0, [r5, 0xA]
adds r0, r5, 0
adds r1, r2, 0
bl sub_80D7654
lsls r0, 24
cmp r0, 0
beq _080D764E
_080D7638:
ldrh r0, [r5, 0x8]
adds r0, 0x1
strh r0, [r5, 0x8]
b _080D764E
_080D7640:
movs r1, 0x1C
ldrsh r0, [r5, r1]
cmp r0, 0
bne _080D764E
adds r0, r2, 0
bl DestroyAnimVisualTask
_080D764E:
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_80D759C
thumb_func_start sub_80D7654
sub_80D7654: @ 80D7654
push {r4,r5,lr}
adds r4, r0, 0
lsls r1, 24
lsrs r5, r1, 24
ldr r0, _080D76B0 @ =gBattleAnimSpriteTemplate_83D97D0
movs r2, 0x22
ldrsh r1, [r4, r2]
movs r3, 0x24
ldrsh r2, [r4, r3]
ldrh r3, [r4, 0x20]
lsls r3, 24
lsrs r3, 24
bl CreateSprite
lsls r0, 24
lsrs r1, r0, 24
cmp r1, 0x40
beq _080D7698
ldr r3, _080D76B4 @ =gSprites
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r1, r3, 0
adds r1, 0x1C
adds r1, r0, r1
ldr r2, _080D76B8 @ =sub_80D76C4
str r2, [r1]
adds r0, r3
strh r5, [r0, 0x3A]
movs r1, 0xA
strh r1, [r0, 0x3C]
ldrh r0, [r4, 0x1C]
adds r0, 0x1
strh r0, [r4, 0x1C]
_080D7698:
ldrh r2, [r4, 0x24]
movs r0, 0x24
ldrsh r1, [r4, r0]
movs r3, 0x26
ldrsh r0, [r4, r3]
cmp r1, r0
bge _080D76BC
adds r0, r2, 0
adds r0, 0x20
strh r0, [r4, 0x24]
movs r0, 0
b _080D76BE
.align 2, 0
_080D76B0: .4byte gBattleAnimSpriteTemplate_83D97D0
_080D76B4: .4byte gSprites
_080D76B8: .4byte sub_80D76C4
_080D76BC:
movs r0, 0x1
_080D76BE:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_80D7654
.align 2, 0 @ Don't pad with nop.
|