Add ability id's
This commit is contained in:
parent
c23ca9b2f8
commit
8e32f5e211
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include <ultra64.h>
|
||||
|
||||
#include "ability_id.h"
|
||||
#include "assert.h"
|
||||
#include "element.h"
|
||||
#include "equipment_id.h"
|
||||
|
|
@ -27,9 +28,10 @@ ASSERT_SIZE(AbilityData, 0x10);
|
|||
|
||||
extern AbilityData obAbilityData[];
|
||||
|
||||
extern char *obAbilityGetName(u8 index);
|
||||
extern u8 ability_get_field_0x4(u8 index);
|
||||
extern Element obAbilityGetElement(u8 index, EquipmentId arg1, EquipmentId arg2,
|
||||
EquipmentId arg3, EquipmentId arg4);
|
||||
extern char *obAbilityGetName(AbilityId index);
|
||||
extern u8 ability_get_field_0x4(AbilityId index);
|
||||
extern Element obAbilityGetElement(AbilityId index, EquipmentId arg1,
|
||||
EquipmentId arg2, EquipmentId arg3,
|
||||
EquipmentId arg4);
|
||||
|
||||
#endif // __ABILITY_H__
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
#ifndef __ABILITY_ID_H__
|
||||
#define __ABILITY_ID_H__
|
||||
|
||||
#include <ultratypes.h>
|
||||
|
||||
typedef u8 AbilityId;
|
||||
|
||||
#define ABILITY_ID_THRUST 1
|
||||
#define ABILITY_ID_PECK 2
|
||||
#define ABILITY_ID_PIERCE 3
|
||||
#define ABILITY_ID_SLASH 4
|
||||
#define ABILITY_ID_CLEAVE 5
|
||||
#define ABILITY_ID_REND 6
|
||||
#define ABILITY_ID_CLAW 7
|
||||
#define ABILITY_ID_BITE 8
|
||||
#define ABILITY_ID_STRIKE 9
|
||||
#define ABILITY_ID_CRUSH 10
|
||||
#define ABILITY_ID_SMASH 11
|
||||
#define ABILITY_ID_LASH 12
|
||||
#define ABILITY_ID_PULL_STRINGS 13
|
||||
#define ABILITY_ID_SHOOT 14
|
||||
#define ABILITY_ID_TAKE_A_PEEK 15
|
||||
#define ABILITY_ID_FLIP_OVER 16
|
||||
#define ABILITY_ID_SONIC_BOOM 17
|
||||
#define ABILITY_ID_WIND_SHOT 17
|
||||
|
||||
#endif // __ABILITY_ID_H__
|
||||
|
|
@ -196,15 +196,15 @@ EquipmentId obClassGetItemLowerRight(u8 portrait, ClassId class) {
|
|||
|
||||
/* 43FD8 8016E0D8 */
|
||||
char* obClassGetAbilityFrontName(u8 portrait, ClassId class) {
|
||||
u8 var_v0;
|
||||
AbilityId ability;
|
||||
|
||||
if (obClassData[portrait].field_0x45 == class) {
|
||||
var_v0 = obClassData[portrait].ability_front;
|
||||
ability = obClassData[portrait].ability_front;
|
||||
} else {
|
||||
var_v0 = obClassData[class].ability_front;
|
||||
ability = obClassData[class].ability_front;
|
||||
}
|
||||
|
||||
return obAbilityGetName(var_v0);
|
||||
return obAbilityGetName(ability);
|
||||
}
|
||||
|
||||
/* 44040 8016E140 */
|
||||
|
|
@ -218,15 +218,15 @@ char* obClassGetAbilityMiddleName(u8 portrait, ClassId class) {
|
|||
|
||||
/* 44074 8016E174 */
|
||||
char* obClassGetAbilityBackName(u8 portrait, ClassId class) {
|
||||
u8 var_v0;
|
||||
AbilityId ability;
|
||||
|
||||
if (obClassData[portrait].field_0x45 == class) {
|
||||
var_v0 = obClassData[portrait].ability_back;
|
||||
ability = obClassData[portrait].ability_back;
|
||||
} else {
|
||||
var_v0 = obClassData[class].ability_back;
|
||||
ability = obClassData[class].ability_back;
|
||||
}
|
||||
|
||||
return obAbilityGetName(var_v0);
|
||||
return obAbilityGetName(ability);
|
||||
}
|
||||
|
||||
/* 440DC 8016E1DC */
|
||||
|
|
@ -267,17 +267,17 @@ u8 obClassGetAbilityHits(u8 portrait, ClassId class, u8 row) {
|
|||
}
|
||||
|
||||
/* 44340 8016E440 */
|
||||
char* obAbilityGetName(u8 index) {
|
||||
char* obAbilityGetName(AbilityId index) {
|
||||
return obAbilityData[index].name;
|
||||
}
|
||||
|
||||
/* 44358 8016E458 */
|
||||
u8 ability_get_field_0x4(u8 index) {
|
||||
u8 ability_get_field_0x4(AbilityId index) {
|
||||
return obAbilityData[index].field_0x4;
|
||||
}
|
||||
|
||||
/* 44370 8016E470 */
|
||||
Element obAbilityGetElement(u8 index, EquipmentId arg1, EquipmentId arg2, EquipmentId arg3, EquipmentId arg4) {
|
||||
Element obAbilityGetElement(AbilityId index, EquipmentId arg1, EquipmentId arg2, EquipmentId arg3, EquipmentId arg4) {
|
||||
u16 item_index;
|
||||
|
||||
if (obAbilityData[index].element != ELEMENT_INVALID && obAbilityData[index].element != 0xF)
|
||||
|
|
|
|||
Loading…
Reference in New Issue