Paper Mario DX
Paper Mario (N64) modding
Loading...
Searching...
No Matches
actors.c
Go to the documentation of this file.
1
#include "common.h"
2
#include "
battle/battle.h
"
3
#include "sprite/player.h"
4
5
CelebrationAnimOptions
bPlayerCelebrations
= {
6
.
randomChance
= 10,
7
.hpBasedChance = 90,
8
.options = {
9
{
// 0: random celebration
10
{ 50,
ANIM_MarioB1_JumpForJoy
},
11
{ 50,
ANIM_Mario1_Chuckle
},
12
}, {
// 1: HP <= 25%
13
{ 50,
ANIM_Mario1_DustOff
},
14
{ 50,
ANIM_Mario1_DustOff
},
15
}, {
// 2: HP <= 50%
16
{ 50,
ANIM_Mario1_ThumbsUp
},
17
{ 50,
ANIM_Mario1_ThumbsUp
},
18
}, {
// 3: HP <= 75%
19
{ 50,
ANIM_MarioB1_FingerWag
},
20
{ 50,
ANIM_MarioB1_FingerWag
},
21
}, {
// 4: HP > 50%
22
{ 80,
ANIM_MarioB1_FingerWag
},
23
{ 20,
ANIM_MarioB1_JumpForJoy
},
24
}
25
}
26
};
27
28
#include "battle/actor_types.inc.c"
29
30
u32
bMarioIdleAnims
[] = {
31
STATUS_KEY_NORMAL
,
ANIM_Mario1_Walk
,
32
STATUS_KEY_DANGER
,
ANIM_Mario1_TiredIdle
,
33
STATUS_KEY_STONE
,
ANIM_MarioB3_Petrified
,
34
STATUS_KEY_SLEEP
,
ANIM_MarioB1_Sleep
,
35
STATUS_KEY_DIZZY
,
ANIM_MarioB1_Sick
,
36
STATUS_KEY_STOP
,
ANIM_Mario1_Still
,
37
STATUS_KEY_HUSTLE
,
ANIM_Mario1_Run
,
38
STATUS_KEY_BERSERK
,
ANIM_MarioB2_BerserkIdle
,
39
STATUS_KEY_PARALYZE
,
ANIM_MarioB1_Sleep
,
40
STATUS_KEY_FROZEN
,
ANIM_Mario1_Frozen
,
41
STATUS_KEY_TRANSPARENT
,
ANIM_Mario1_Idle
,
42
STATUS_KEY_INACTIVE
,
ANIM_Mario1_Still
,
43
STATUS_KEY_INACTIVE_BERSERK
,
ANIM_MarioB2_BerserkStill
,
44
STATUS_KEY_14
,
ANIM_MarioB2_Inert
,
45
STATUS_KEY_INACTIVE_SLEEP
,
ANIM_MarioB1_SleepStill
,
46
STATUS_KEY_INACTIVE_DIZZY
,
ANIM_MarioB1_SickStill
,
47
STATUS_KEY_INACTIVE_WEARY
,
ANIM_Mario1_TiredStill
,
48
STATUS_KEY_THINKING
,
ANIM_Mario1_Thinking
,
49
STATUS_KEY_WEARY
,
ANIM_Mario1_SpinLand
,
50
STATUS_END
51
};
52
53
s32
bMarioDefendAnims
[] = {
54
STATUS_KEY_NORMAL
,
ANIM_Mario1_Crouch
,
55
STATUS_KEY_DANGER
,
ANIM_Mario1_TiredIdle
,
56
STATUS_KEY_STONE
,
ANIM_MarioB3_Petrified
,
57
STATUS_KEY_SLEEP
,
ANIM_MarioB1_Sleep
,
58
STATUS_KEY_DIZZY
,
ANIM_MarioB1_Sick
,
59
STATUS_KEY_STOP
,
ANIM_Mario1_Still
,
60
STATUS_KEY_HUSTLE
,
ANIM_Mario1_Crouch
,
61
STATUS_KEY_BERSERK
,
ANIM_Mario1_Crouch
,
62
STATUS_KEY_PARALYZE
,
ANIM_MarioB1_Sleep
,
63
STATUS_KEY_FROZEN
,
ANIM_Mario1_Frozen
,
64
STATUS_KEY_TRANSPARENT
,
ANIM_Mario1_Idle
,
65
STATUS_KEY_INACTIVE
,
ANIM_Mario1_Still
,
66
STATUS_KEY_INACTIVE_BERSERK
,
ANIM_MarioB2_BerserkStill
,
67
STATUS_KEY_14
,
ANIM_MarioB2_Inert
,
68
STATUS_KEY_INACTIVE_SLEEP
,
ANIM_MarioB1_SleepStill
,
69
STATUS_KEY_INACTIVE_DIZZY
,
ANIM_MarioB1_SickStill
,
70
STATUS_KEY_INACTIVE_WEARY
,
ANIM_Mario1_TiredStill
,
71
STATUS_KEY_THINKING
,
ANIM_Mario1_Thinking
,
72
STATUS_KEY_WEARY
,
ANIM_Mario1_SpinLand
,
73
STATUS_END
74
};
75
76
s32
bMarioHideAnims
[] = {
77
STATUS_KEY_NORMAL
,
ANIM_Mario1_Crouch
,
78
STATUS_KEY_DANGER
,
ANIM_Mario1_TiredIdle
,
79
STATUS_KEY_STONE
,
ANIM_MarioB3_Petrified
,
80
STATUS_KEY_SLEEP
,
ANIM_MarioB1_Sleep
,
81
STATUS_KEY_DIZZY
,
ANIM_MarioB1_Sick
,
82
STATUS_KEY_STOP
,
ANIM_Mario1_Still
,
83
STATUS_KEY_HUSTLE
,
ANIM_MarioW2_RideLaki
,
84
STATUS_KEY_BERSERK
,
ANIM_MarioW2_RideLaki
,
85
STATUS_KEY_PARALYZE
,
ANIM_MarioB1_Sleep
,
86
STATUS_KEY_FROZEN
,
ANIM_Mario1_Frozen
,
87
STATUS_KEY_TRANSPARENT
,
ANIM_Mario1_Idle
,
88
STATUS_KEY_INACTIVE
,
ANIM_Mario1_Crouch
,
89
STATUS_KEY_INACTIVE_BERSERK
,
ANIM_MarioB2_BerserkStill
,
90
STATUS_KEY_14
,
ANIM_MarioB2_Inert
,
91
STATUS_KEY_INACTIVE_SLEEP
,
ANIM_MarioB1_SleepStill
,
92
STATUS_KEY_INACTIVE_DIZZY
,
ANIM_MarioB1_SickStill
,
93
STATUS_KEY_INACTIVE_WEARY
,
ANIM_Mario1_TiredStill
,
94
STATUS_KEY_THINKING
,
ANIM_Mario1_Thinking
,
95
STATUS_KEY_WEARY
,
ANIM_Mario1_SpinLand
,
96
STATUS_END
97
};
98
99
s32
bPeachIdleAnims
[] = {
100
STATUS_KEY_NORMAL
,
ANIM_Peach1_Walk
,
101
STATUS_KEY_INACTIVE
,
ANIM_Peach2_Inert
,
102
STATUS_END
103
};
104
105
s32
bMarioDefenseTable
[] = {
106
ELEMENT_NORMAL
, 0,
107
ELEMENT_END
108
};
109
110
s32
bPlayerStatusTable
[] = {
111
STATUS_KEY_NORMAL
, 100,
112
STATUS_KEY_DEFAULT
, 100,
113
STATUS_KEY_SLEEP
, 100,
114
STATUS_KEY_POISON
, 100,
115
STATUS_KEY_FROZEN
, 100,
116
STATUS_KEY_DIZZY
, 100,
117
STATUS_KEY_UNUSED
, 100,
118
STATUS_KEY_STATIC
, 100,
119
STATUS_KEY_PARALYZE
, 100,
120
STATUS_KEY_SHRINK
, 100,
121
STATUS_KEY_STOP
, 100,
122
STATUS_TURN_MOD_DEFAULT
, 0,
123
STATUS_TURN_MOD_SLEEP
, 0,
124
STATUS_TURN_MOD_POISON
, 0,
125
STATUS_TURN_MOD_FROZEN
, 0,
126
STATUS_TURN_MOD_DIZZY
, 0,
127
STATUS_TURN_MOD_UNUSED
, 0,
128
STATUS_TURN_MOD_STATIC
, 0,
129
STATUS_TURN_MOD_PARALYZE
, 0,
130
STATUS_TURN_MOD_SHRINK
, 0,
131
STATUS_TURN_MOD_STOP
, 0,
132
STATUS_END
133
};
134
135
ActorBlueprint
bPlayerActorBlueprint
= {
136
.
type
=
ACTOR_TYPE_PLAYER
,
137
.maxHP = 99,
138
.statusTable =
bPlayerStatusTable
,
139
140
.escapeChance = 0,
141
.airLiftChance = 0,
142
.hurricaneChance = 0,
143
.spookChance = 0,
144
.upAndAwayChance = 0,
145
.spinSmashReq = 4,
146
.powerBounceChance = 80,
147
148
.size = { 33, 43 },
149
.healthBarOffset = { 0, 0 },
150
.statusIconOffset = { -10, 30 },
151
.statusTextOffset = { 10, 30 },
152
};
153
154
ActorPartBlueprint
bMarioParts
[] = {
155
{
156
.
index
= 1,
157
.posOffset = { 0, 0, 0 },
158
.targetOffset = { 0, 32 },
159
.opacity = 255,
160
.idleAnimations =
bMarioIdleAnims
,
161
.defenseTable =
bMarioDefenseTable
,
162
},
163
};
164
165
Vec3s
StandardActorHomePositions
[] = {
166
[
BTL_POS_GROUND_A
] { 5, 0, -20 },
167
[
BTL_POS_GROUND_B
] { 45, 0, -5 },
168
[
BTL_POS_GROUND_C
] { 85, 0, 10 },
169
[
BTL_POS_GROUND_D
] { 125, 0, 25 },
170
[
BTL_POS_AIR_A
] { 10, 50, -20 },
171
[
BTL_POS_AIR_B
] { 50, 45, -5 },
172
[
BTL_POS_AIR_C
] { 90, 50, 10 },
173
[
BTL_POS_AIR_D
] { 130, 55, 25 },
174
[
BTL_POS_HIGH_A
] { 15, 85, -20 },
175
[
BTL_POS_HIGH_B
] { 55, 80, -5 },
176
[
BTL_POS_HIGH_C
] { 95, 85, 10 },
177
[
BTL_POS_HIGH_D
] { 135, 90, 25 },
178
[
BTL_POS_TOP_A
] { 15, 125, -20 },
179
[
BTL_POS_TOP_B
] { 55, 120, -5 },
180
[
BTL_POS_TOP_C
] { 95, 125, 10 },
181
[
BTL_POS_TOP_D
] { 135, 130, 25 },
182
[
BTL_POS_CENTER
] { 105, 0, 0 },
183
};
PopupMenu_SelectedIndex
BSS s32 PopupMenu_SelectedIndex
Definition
8a860_len_3f30.c:84
bMarioHideAnims
s32 bMarioHideAnims[]
Definition
actors.c:76
bPeachIdleAnims
s32 bPeachIdleAnims[]
Definition
actors.c:99
bMarioDefendAnims
s32 bMarioDefendAnims[]
Definition
actors.c:53
bMarioDefenseTable
s32 bMarioDefenseTable[]
Definition
actors.c:105
bMarioIdleAnims
u32 bMarioIdleAnims[]
Definition
actors.c:30
bMarioParts
ActorPartBlueprint bMarioParts[]
Definition
actors.c:154
bPlayerActorBlueprint
ActorBlueprint bPlayerActorBlueprint
Definition
actors.c:135
StandardActorHomePositions
Vec3s StandardActorHomePositions[]
Definition
actors.c:165
bPlayerStatusTable
s32 bPlayerStatusTable[]
Definition
actors.c:110
bPlayerCelebrations
CelebrationAnimOptions bPlayerCelebrations
Definition
actors.c:5
ActorPartBlueprint::index
s8 index
Definition
common_structs.h:1553
ActorPartBlueprint
Definition
common_structs.h:1551
Vec3s
Definition
common_structs.h:70
ELEMENT_END
@ ELEMENT_END
Definition
enums.h:2147
ELEMENT_NORMAL
@ ELEMENT_NORMAL
Definition
enums.h:2148
STATUS_KEY_INACTIVE_DIZZY
@ STATUS_KEY_INACTIVE_DIZZY
Definition
enums.h:2825
STATUS_KEY_THINKING
@ STATUS_KEY_THINKING
Definition
enums.h:2829
STATUS_KEY_WEARY
@ STATUS_KEY_WEARY
Definition
enums.h:2830
STATUS_KEY_PARALYZE
@ STATUS_KEY_PARALYZE
Definition
enums.h:2806
STATUS_TURN_MOD_DEFAULT
@ STATUS_TURN_MOD_DEFAULT
Definition
enums.h:2832
STATUS_TURN_MOD_PARALYZE
@ STATUS_TURN_MOD_PARALYZE
Definition
enums.h:2839
STATUS_KEY_INACTIVE_SLEEP
@ STATUS_KEY_INACTIVE_SLEEP
Definition
enums.h:2822
STATUS_KEY_FROZEN
@ STATUS_KEY_FROZEN
Definition
enums.h:2808
STATUS_TURN_MOD_SLEEP
@ STATUS_TURN_MOD_SLEEP
Definition
enums.h:2833
STATUS_TURN_MOD_DIZZY
@ STATUS_TURN_MOD_DIZZY
Definition
enums.h:2837
STATUS_TURN_MOD_UNUSED
@ STATUS_TURN_MOD_UNUSED
Definition
enums.h:2836
STATUS_KEY_INACTIVE_WEARY
@ STATUS_KEY_INACTIVE_WEARY
Definition
enums.h:2823
STATUS_KEY_TRANSPARENT
@ STATUS_KEY_TRANSPARENT
Definition
enums.h:2815
STATUS_KEY_INACTIVE_BERSERK
@ STATUS_KEY_INACTIVE_BERSERK
Definition
enums.h:2820
STATUS_KEY_STATIC
@ STATUS_KEY_STATIC
Definition
enums.h:2812
STATUS_END
@ STATUS_END
Definition
enums.h:2801
STATUS_KEY_DANGER
@ STATUS_KEY_DANGER
Definition
enums.h:2827
STATUS_TURN_MOD_POISON
@ STATUS_TURN_MOD_POISON
Definition
enums.h:2838
STATUS_TURN_MOD_STOP
@ STATUS_TURN_MOD_STOP
Definition
enums.h:2842
STATUS_KEY_SLEEP
@ STATUS_KEY_SLEEP
Definition
enums.h:2807
STATUS_KEY_UNUSED
@ STATUS_KEY_UNUSED
Definition
enums.h:2804
STATUS_KEY_STONE
@ STATUS_KEY_STONE
Definition
enums.h:2813
STATUS_KEY_STOP
@ STATUS_KEY_STOP
Definition
enums.h:2809
STATUS_KEY_INACTIVE
@ STATUS_KEY_INACTIVE
Definition
enums.h:2819
STATUS_KEY_HUSTLE
@ STATUS_KEY_HUSTLE
Definition
enums.h:2826
STATUS_TURN_MOD_FROZEN
@ STATUS_TURN_MOD_FROZEN
Definition
enums.h:2835
STATUS_KEY_SHRINK
@ STATUS_KEY_SHRINK
Definition
enums.h:2811
STATUS_KEY_DIZZY
@ STATUS_KEY_DIZZY
Definition
enums.h:2805
STATUS_KEY_POISON
@ STATUS_KEY_POISON
Definition
enums.h:2810
STATUS_TURN_MOD_STATIC
@ STATUS_TURN_MOD_STATIC
Definition
enums.h:2834
STATUS_KEY_14
@ STATUS_KEY_14
Definition
enums.h:2821
STATUS_KEY_BERSERK
@ STATUS_KEY_BERSERK
Definition
enums.h:2817
STATUS_KEY_NORMAL
@ STATUS_KEY_NORMAL
Definition
enums.h:2802
STATUS_TURN_MOD_SHRINK
@ STATUS_TURN_MOD_SHRINK
Definition
enums.h:2840
STATUS_KEY_DEFAULT
@ STATUS_KEY_DEFAULT
Definition
enums.h:2803
battle.h
CelebrationAnimOptions::randomChance
s16 randomChance
Definition
battle.h:257
ActorBlueprint::type
u8 type
Definition
battle.h:133
BTL_POS_GROUND_B
@ BTL_POS_GROUND_B
Definition
battle.h:62
BTL_POS_AIR_B
@ BTL_POS_AIR_B
Definition
battle.h:66
BTL_POS_GROUND_D
@ BTL_POS_GROUND_D
Definition
battle.h:64
BTL_POS_CENTER
@ BTL_POS_CENTER
Definition
battle.h:77
BTL_POS_AIR_D
@ BTL_POS_AIR_D
Definition
battle.h:68
BTL_POS_AIR_A
@ BTL_POS_AIR_A
Definition
battle.h:65
BTL_POS_AIR_C
@ BTL_POS_AIR_C
Definition
battle.h:67
BTL_POS_GROUND_A
@ BTL_POS_GROUND_A
Definition
battle.h:61
BTL_POS_HIGH_D
@ BTL_POS_HIGH_D
Definition
battle.h:72
BTL_POS_GROUND_C
@ BTL_POS_GROUND_C
Definition
battle.h:63
BTL_POS_TOP_A
@ BTL_POS_TOP_A
Definition
battle.h:73
BTL_POS_TOP_D
@ BTL_POS_TOP_D
Definition
battle.h:76
BTL_POS_HIGH_A
@ BTL_POS_HIGH_A
Definition
battle.h:69
BTL_POS_TOP_C
@ BTL_POS_TOP_C
Definition
battle.h:75
BTL_POS_HIGH_C
@ BTL_POS_HIGH_C
Definition
battle.h:71
BTL_POS_HIGH_B
@ BTL_POS_HIGH_B
Definition
battle.h:70
BTL_POS_TOP_B
@ BTL_POS_TOP_B
Definition
battle.h:74
ActorBlueprint
Definition
battle.h:130
CelebrationAnimOptions
Definition
battle.h:256
src
battle
actors.c
Generated by
1.10.0