summaryrefslogtreecommitdiff
path: root/asm/thunder.s
blob: df97608f9a2a0d2673b8ba38082824214b8f6975 (plain)
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
	.include "constants/gba_constants.inc"
	.include "asm/macros.inc"

	.syntax unified

	.text

	@ thunder

	thumb_func_start sub_80D61C8
sub_80D61C8: @ 80D61C8
	push {r4,lr}
	adds r4, r0, 0
	ldr r0, _080D61E8 @ =gBattleAnimBankAttacker
	ldrb r0, [r0]
	bl GetBankSide
	lsls r0, 24
	cmp r0, 0
	beq _080D61F0
	ldr r0, _080D61EC @ =gBattleAnimArgs
	ldrh r1, [r4, 0x20]
	ldrh r2, [r0]
	subs r1, r2
	strh r1, [r4, 0x20]
	b _080D61FC
	.align 2, 0
_080D61E8: .4byte gBattleAnimBankAttacker
_080D61EC: .4byte gBattleAnimArgs
_080D61F0:
	ldr r1, _080D6210 @ =gBattleAnimArgs
	ldrh r0, [r1]
	ldrh r2, [r4, 0x20]
	adds r0, r2
	strh r0, [r4, 0x20]
	adds r0, r1, 0
_080D61FC:
	ldrh r0, [r0, 0x2]
	ldrh r1, [r4, 0x22]
	adds r0, r1
	strh r0, [r4, 0x22]
	ldr r0, _080D6214 @ =sub_80D6218
	str r0, [r4, 0x1C]
	pop {r4}
	pop {r0}
	bx r0
	.align 2, 0
_080D6210: .4byte gBattleAnimArgs
_080D6214: .4byte sub_80D6218
	thumb_func_end sub_80D61C8

	thumb_func_start sub_80D6218
sub_80D6218: @ 80D6218
	push {lr}
	adds r2, r0, 0
	adds r0, 0x3F
	ldrb r1, [r0]
	movs r0, 0x10
	ands r0, r1
	cmp r0, 0
	beq _080D622E
	adds r0, r2, 0
	bl move_anim_8072740
_080D622E:
	pop {r0}
	bx r0
	thumb_func_end sub_80D6218
	
	.align 2, 0 @ Don't pad with nop.