mirror of
https://github.com/zeldaret/mm.git
synced 2026-08-13 20:14:54 -04:00
z_player_lib: Dawn of the final PR (#1142)
* Player_GetMask and Player_RemoveMask * some comments * Player_ActionToBottle and Player_GetBottleHeld * Player_DrawGetItemImpl and Player_DrawGetItem * func_80123420 OK * Decompile a few more functions * Decompile a few more functions * func_80122760 * func_80122868, func_801229A0 and func_801229EC * func_80122F28 * func_8012301C * func_801242B4 * func_801242DC * func_80124420 nonmatching * func_80126440 * func_801240C8 and func_801240DC * func_8012405C and func_80124088 * func_80124020 * Player_IsBurningStickInRange * func_8012754C * func_80125318 and func_80125CE0 * func_801229FC * func_80127B64 * func_80127488 * func_80122D44 * func_80122BA4 * func_80122C20 attempt * func_80122EEC * func_80122F9C * func_80122FCC and func_8012300C * func_80123448 * func_801234D4 * func_801235DC * func_80123960 * func_80123BD4 * func_80123AA4 * func_801239AC * func_801241B4 * func_80123C58 and func_80123C90 * func_80123D50 and func_80123DA4 * func_80123DC0, func_80123E90 and func_80123F14 * func_80124110 and func_80124148 * func_80124168 and func_80124190 * func_80124278 * func_80124F18 non_equivalent * func_80125340 and func_8012536C * func_801263FC * func_801265C8 * func_8012669C * func_80128B74 * func_80123140 * func_801246F4 * func_801253A4 NON_MATCHING * func_801262C8 * func_80126AB4 * func_80126B8C * func_80127438 * func_801278F8 NON_MATCHING * Fix data split * cleanup externs * func_80128BD0 compiles... * Rename Player_SetEquipmentData * fix merge issues * Fix types * Improvement? Worse? I don't know at this point * func_80128640 attempt * func_80127BE8 * func_80127A60 * func_80127594 attempt * func_801271B0 * func_8012364C NON_MATCHING * func_80124618 * func_80124CC4 non matching * func_801251C4 * func_80125580 non equivalent * func_80128388 * cleanup * remove some hardcoded pointers * object symbol cleanup * func_80124870 NON_EQUIVALENT * name overridlimbdraw arguments * func_80125D4C NON_EQUIVALENT * func_80126BD0 NON_MATCHING * Match func_80126BD0 thanks to anon58 * func_80127DA4 NON_EQUIVALENT * fix merge issues * some stealing from OoT * small rename pass and cleanup * Improve some * CLAMP and fix warnings * func_80125580 matched by mzx * cleanup func_80128BD0 a bit * import data * func_80124CC4 * Rename objectFileTable to gObjectTable * Improve func_80124FF0 thanks to maide * fix renames * Match func_80124FF0 thanks to Maide * cleanup * More cleaning up * import bss * Add PLAYER_STATE macros * a bit more of cleanup * run formatter * func_80128BD0 a bit more deecent * Add player limb enum * Use limb enum * cleanup and format * Use symbols for player dlists groups * A bunch more of pointers * more object pointers * Change the remaining object pointers * Add a few missing dlist in link_child * Small rename * whoops * Work on NON_MATCHINGs * Cleanup * Steal OoT renames from "sword" to "meleeWeapon" * Fix some symbols * Match func_80127594 and format * Match func_80127DA4 * Matched func_801284A0 * Annotate D_801F59AC * Matched func_80128640 * Some cleanup * format * stuffs * some cleanups * import stuff from pr * swords and shields * fixes * bss * cleanup Player_OverrideLimbDrawGameplayCommon * progress on func_80125D4C * PlayerMeleeWeapon enum * Player_BButtonSwordFromAP * GET_B_SWORD_FROM_AP * GET_MELEE_WEAPON_FROM_AP * PlayerBottle * PlayerExplosive and PlayerSword * misc fixes * Various changes fromplayer_actor * z64player.h stuff from player_actor * Fixes * skelanime stuff * placeholders on z64item.h, save macros and ther cleanups * <= PLAYER_AP_MINUS1 * Player_UpdateBunnyEarsKinematics Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> * cleanup * bodyPartsPos * comment * sizeof(u16) * typo * merge fixes * fix * fixes * format * fix merge * fix merge * func_80125D4C Co-authored-by: engineer124 <engineer124engineer124@gmail.com> * func_80128BD0 improvement * minor renames * format * whoops * small cleanup * Update src/code/z_player_lib.c Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> * review Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> * format * _B_ * review Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> * review Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * format * remove gap * whoops * clanups * remove stuff from permuter_settings * steal some OoT docs * some other docs vscode didn't add to the last commit * format * data as infunction-static data * OoT docs stealing * Improvements on Player_PostLimbDrawGameplay * More improvement * Match Player_PostLimbDrawGameplay Co-authored-by: engineer124 <engineer124engineer124@gmail.com> * cleanups * Convert unk_AF0 into an union and some other cleanups * bss * headLimbRot and upperLimbRot * fix naming * cleanups * bss * bss * Update src/code/z_player_lib.c Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * pr review Co-authored-by: engineer124 <engineer124engineer124@gmail.com> * bss * gesture * namefixer * gestureInfo * IA_MIN and BOTTLE_EMPTY * review Co-authored-by: engineer124 <engineer124engineer124@gmail.com> * review * D_801F59B0_LEN * Remove LevelOfDetail enum * bss * review * review * gLinkDekuClosedFlowerDL gLinkDekuOpenFlowerDL * _B_ * Player_DrawStrayFairyParticles * fix build --------- Co-authored-by: kyleburnette <kyle@kyleburnette.com> Co-authored-by: Kelebek1 <eeeedddccc@hotmail.co.uk> Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> Co-authored-by: engineer124 <engineer124engineer124@gmail.com> Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
This commit is contained in:
+16
-16
@@ -1616,34 +1616,34 @@ s32 Player_HasMirrorShieldEquipped(PlayState* play);
|
||||
s32 Player_IsHoldingMirrorShield(PlayState* play);
|
||||
s32 Player_IsHoldingHookshot(Player* player);
|
||||
s32 func_801240DC(Player* player);
|
||||
s32 func_80124110(Player* player, PlayerItemAction itemAction);
|
||||
s32 func_80124148(Player* player);
|
||||
s32 Player_ActionToMeleeWeapon(PlayerItemAction itemAction);
|
||||
s32 Player_GetMeleeWeaponHeld(Player* player);
|
||||
PlayerBButtonSword Player_BButtonSwordFromIA(Player* player, PlayerItemAction itemAction);
|
||||
PlayerBButtonSword Player_GetHeldBButtonSword(Player* player);
|
||||
PlayerMeleeWeapon Player_MeleeWeaponFromIA(PlayerItemAction itemAction);
|
||||
PlayerMeleeWeapon Player_GetMeleeWeaponHeld(Player* player);
|
||||
s32 Player_IsHoldingTwoHandedWeapon(Player* player);
|
||||
s32 Player_ActionToBottle(Player* player, PlayerItemAction itemAction);
|
||||
s32 Player_GetBottleHeld(Player* Player);
|
||||
s32 Player_ActionToExplosive(Player* player, PlayerItemAction itemAction);
|
||||
s32 Player_GetExplosiveHeld(Player* player);
|
||||
s32 Player_ActionToSword(Actor* actor, PlayerItemAction itemAction);
|
||||
PlayerBottle Player_BottleFromIA(Player* player, PlayerItemAction itemAction);
|
||||
PlayerBottle Player_GetBottleHeld(Player* Player);
|
||||
PlayerExplosive Player_ExplosiveFromIA(Player* player, PlayerItemAction itemAction);
|
||||
PlayerExplosive Player_GetExplosiveHeld(Player* player);
|
||||
PlayerSword Player_SwordFromIA(Player* player, PlayerItemAction itemAction);
|
||||
s32 func_801242B4(Player* player);
|
||||
s32 Player_GetEnvironmentalHazard(PlayState* play);
|
||||
void func_80124420(Player* player);
|
||||
void Player_UpdateBunnyEars(Player* player);
|
||||
void func_80124618(struct_80124618 arg0[], f32 curFrame, Vec3f* arg2);
|
||||
void Player_DrawImpl(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dListCount, s32 lod, PlayerTransformation playerForm, s32 boots, s32 face, OverrideLimbDrawFlex overrideLimbDraw, PostLimbDrawFlex postLimbDraw, Actor* actor);
|
||||
void func_80125318(Vec3f* arg0, Vec3s* arg1);
|
||||
void Player_DrawZoraShield(PlayState* play, Player* player);
|
||||
void func_80125500(PlayState* play, Player* player, s32 limbIndex, Vec3f* pos, Vec3s* rot);
|
||||
s32 func_80125D4C(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* actor);
|
||||
s32 func_801262C8(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* actor);
|
||||
s32 func_801263FC(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx);
|
||||
s32 func_80126440(PlayState* play, ColliderQuad* collider, WeaponInfo* weaponInfo, Vec3f* arg3, Vec3f* arg4);
|
||||
s32 Player_OverrideLimbDrawGameplayDefault(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* actor);
|
||||
s32 Player_OverrideLimbDrawGameplayFirstPerson(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* actor);
|
||||
s32 Player_OverrideLimbDrawGameplayCrawling(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx);
|
||||
s32 func_80126440(PlayState* play, ColliderQuad* collider, WeaponInfo* weaponInfo, Vec3f* newTip, Vec3f* newBase);
|
||||
void Player_DrawGetItem(PlayState* play, Player* player);
|
||||
void func_80126B8C(PlayState* play, Player* player);
|
||||
s32 func_80127438(PlayState* play, Player* player, s32 currentMask);
|
||||
s32 func_80128640(PlayState* play, Player* player, Gfx* dlist);
|
||||
void func_80128B74(PlayState* play, Player* player, s32 limbIndex);
|
||||
void func_80128BD0(PlayState* play, s32 limbIndex, Gfx** dList1, Gfx** dList2, Vec3s* rot, Actor* actor);
|
||||
void Player_SetFeetPos(PlayState* play, Player* player, s32 limbIndex);
|
||||
void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList1, Gfx** dList2, Vec3s* rot, Actor* actor);
|
||||
|
||||
Gfx* Gfx_SetFog(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 n, s32 f);
|
||||
Gfx* Gfx_SetFogWithSync(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 n, s32 f);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef _ULTRA64_MESSAGE_H_
|
||||
#define _ULTRA64_MESSAGE_H_
|
||||
#ifndef ULTRA64_MESSAGE_H
|
||||
#define ULTRA64_MESSAGE_H
|
||||
|
||||
#include "ultra64/thread.h"
|
||||
|
||||
|
||||
+2
-2
@@ -646,14 +646,14 @@ typedef struct PlayState {
|
||||
/* 0x1878C */ void (*unk_1878C)(struct PlayState* play);
|
||||
/* 0x18790 */ void (*unk_18790)(struct PlayState* play, s16 arg1);
|
||||
/* 0x18794 */ PlayerItemAction (*unk_18794)(struct PlayState* play, Player* player, ItemId itemId);
|
||||
/* 0x18798 */ s32 (*setPlayerTalkAnim)(struct PlayState* play, PlayerAnimationHeader* talkAnim, s32 animMode);
|
||||
/* 0x18798 */ s32 (*setPlayerTalkAnim)(struct PlayState* play, PlayerAnimationHeader* talkAnim, AnimationMode animMode);
|
||||
/* 0x1879C */ s16 playerActorCsIds[10];
|
||||
/* 0x187B0 */ MtxF viewProjectionMtxF;
|
||||
/* 0x187F0 */ Vec3f projectionMtxFDiagonal;
|
||||
/* 0x187FC */ MtxF billboardMtxF;
|
||||
/* 0x1883C */ Mtx* billboardMtx;
|
||||
/* 0x18840 */ u32 gameplayFrames;
|
||||
/* 0x18844 */ u8 unk_18844;
|
||||
/* 0x18844 */ u8 unk_18844; // bool
|
||||
/* 0x18845 */ u8 haltAllActors;
|
||||
/* 0x18846 */ s16 numSetupActors;
|
||||
/* 0x18848 */ u8 numRooms;
|
||||
|
||||
@@ -27,9 +27,9 @@ typedef enum AnimationMode {
|
||||
/* 5 */ ANIMMODE_LOOP_PARTIAL_INTERP
|
||||
} AnimationMode;
|
||||
|
||||
typedef enum {
|
||||
typedef enum {
|
||||
/* -1 */ ANIMTAPER_DECEL = -1,
|
||||
/* 0 */ ANIMTAPER_NONE,
|
||||
/* 0 */ ANIMTAPER_NONE,
|
||||
/* 1 */ ANIMTAPER_ACCEL
|
||||
} AnimationTapers;
|
||||
|
||||
|
||||
+132
-39
@@ -22,7 +22,8 @@ typedef enum PlayerBoots {
|
||||
/* 4 */ PLAYER_BOOTS_ZORA_LAND,
|
||||
/* 5 */ PLAYER_BOOTS_ZORA_UNDERWATER,
|
||||
/* 6 */ PLAYER_BOOTS_GORON,
|
||||
/* 7 */ PLAYER_BOOTS_MAX
|
||||
/* 7 */ PLAYER_BOOTS_7,
|
||||
/* 8 */ PLAYER_BOOTS_MAX
|
||||
} PlayerBoots;
|
||||
|
||||
typedef enum PlayerStrength {
|
||||
@@ -84,7 +85,8 @@ typedef enum PlayerItemAction {
|
||||
/* 0x00 */ PLAYER_IA_NONE,
|
||||
/* 0x01 */ PLAYER_IA_LAST_USED,
|
||||
/* 0x02 */ PLAYER_IA_FISHING_ROD,
|
||||
/* 0x03 */ PLAYER_IA_SWORD_KOKIRI,
|
||||
/* 0x03 */ PLAYER_IA_SWORD_MIN,
|
||||
/* 0x03 */ PLAYER_IA_SWORD_KOKIRI = PLAYER_IA_SWORD_MIN,
|
||||
/* 0x04 */ PLAYER_IA_SWORD_RAZOR,
|
||||
/* 0x05 */ PLAYER_IA_SWORD_GILDED,
|
||||
/* 0x06 */ PLAYER_IA_SWORD_GREAT_FAIRY,
|
||||
@@ -95,14 +97,16 @@ typedef enum PlayerItemAction {
|
||||
/* 0x0B */ PLAYER_IA_BOW_ICE,
|
||||
/* 0x0C */ PLAYER_IA_BOW_LIGHT,
|
||||
/* 0x0D */ PLAYER_IA_HOOKSHOT,
|
||||
/* 0x0E */ PLAYER_IA_BOMB,
|
||||
/* 0x0E */ PLAYER_IA_EXPLOSIVE_MIN,
|
||||
/* 0x0E */ PLAYER_IA_BOMB = PLAYER_IA_EXPLOSIVE_MIN,
|
||||
/* 0x0F */ PLAYER_IA_POWDER_KEG,
|
||||
/* 0x10 */ PLAYER_IA_BOMBCHU,
|
||||
/* 0x11 */ PLAYER_IA_11,
|
||||
/* 0x12 */ PLAYER_IA_NUT,
|
||||
/* 0x13 */ PLAYER_IA_PICTO_BOX,
|
||||
/* 0x14 */ PLAYER_IA_OCARINA,
|
||||
/* 0x15 */ PLAYER_IA_BOTTLE,
|
||||
/* 0x15 */ PLAYER_IA_BOTTLE_MIN,
|
||||
/* 0x15 */ PLAYER_IA_BOTTLE_EMPTY = PLAYER_IA_BOTTLE_MIN,
|
||||
/* 0x16 */ PLAYER_IA_BOTTLE_FISH,
|
||||
/* 0x17 */ PLAYER_IA_BOTTLE_SPRING_WATER,
|
||||
/* 0x18 */ PLAYER_IA_BOTTLE_HOT_SPRING_WATER,
|
||||
@@ -167,6 +171,83 @@ typedef enum PlayerItemAction {
|
||||
/* 0x53 */ PLAYER_IA_MAX
|
||||
} PlayerItemAction;
|
||||
|
||||
// Relies on B swords related item actions to be contiguous
|
||||
#define GET_B_SWORD_FROM_IA(itemAction) ((itemAction) - PLAYER_IA_SWORD_MIN + 1)
|
||||
|
||||
typedef enum PlayerBButtonSword {
|
||||
/* 0 */ PLAYER_B_SWORD_NONE,
|
||||
/* 1 */ PLAYER_B_SWORD_KOKIRI = GET_B_SWORD_FROM_IA(PLAYER_IA_SWORD_KOKIRI),
|
||||
/* 2 */ PLAYER_B_SWORD_RAZOR = GET_B_SWORD_FROM_IA(PLAYER_IA_SWORD_RAZOR),
|
||||
/* 3 */ PLAYER_B_SWORD_GILDED = GET_B_SWORD_FROM_IA(PLAYER_IA_SWORD_GILDED),
|
||||
/* 4 */ PLAYER_B_SWORD_MAX
|
||||
} PlayerBButtonSword;
|
||||
|
||||
// Relies on melee weapon related item actions to be contiguous
|
||||
#define GET_MELEE_WEAPON_FROM_IA(itemAction) ((itemAction) - PLAYER_IA_SWORD_MIN + 1)
|
||||
|
||||
typedef enum PlayerMeleeWeapon {
|
||||
/* 0 */ PLAYER_MELEEWEAPON_NONE,
|
||||
/* 1 */ PLAYER_MELEEWEAPON_SWORD_KOKIRI = GET_MELEE_WEAPON_FROM_IA(PLAYER_IA_SWORD_KOKIRI),
|
||||
/* 2 */ PLAYER_MELEEWEAPON_SWORD_RAZOR = GET_MELEE_WEAPON_FROM_IA(PLAYER_IA_SWORD_RAZOR),
|
||||
/* 3 */ PLAYER_MELEEWEAPON_SWORD_GILDED = GET_MELEE_WEAPON_FROM_IA(PLAYER_IA_SWORD_GILDED),
|
||||
/* 4 */ PLAYER_MELEEWEAPON_SWORD_GREAT_FAIRY = GET_MELEE_WEAPON_FROM_IA(PLAYER_IA_SWORD_GREAT_FAIRY),
|
||||
/* 5 */ PLAYER_MELEEWEAPON_STICK = GET_MELEE_WEAPON_FROM_IA(PLAYER_IA_STICK),
|
||||
/* 6 */ PLAYER_MELEEWEAPON_ZORA_FINS = GET_MELEE_WEAPON_FROM_IA(PLAYER_IA_ZORA_FINS),
|
||||
/* 7 */ PLAYER_MELEEWEAPON_MAX
|
||||
} PlayerMeleeWeapon;
|
||||
|
||||
// Relies on bottle-related item actions to be contiguous
|
||||
#define GET_BOTTLE_FROM_IA(itemAction) ((itemAction) - PLAYER_IA_BOTTLE_MIN)
|
||||
|
||||
typedef enum PlayerBottle {
|
||||
/* -1 */ PLAYER_BOTTLE_NONE = -1,
|
||||
/* 0 */ PLAYER_BOTTLE_EMPTY = GET_BOTTLE_FROM_IA(PLAYER_IA_BOTTLE_EMPTY),
|
||||
/* 1 */ PLAYER_BOTTLE_FISH = GET_BOTTLE_FROM_IA(PLAYER_IA_BOTTLE_FISH),
|
||||
/* 2 */ PLAYER_BOTTLE_SPRING_WATER = GET_BOTTLE_FROM_IA(PLAYER_IA_BOTTLE_SPRING_WATER),
|
||||
/* 3 */ PLAYER_BOTTLE_HOT_SPRING_WATER = GET_BOTTLE_FROM_IA(PLAYER_IA_BOTTLE_HOT_SPRING_WATER),
|
||||
/* 4 */ PLAYER_BOTTLE_ZORA_EGG = GET_BOTTLE_FROM_IA(PLAYER_IA_BOTTLE_ZORA_EGG),
|
||||
/* 5 */ PLAYER_BOTTLE_DEKU_PRINCESS = GET_BOTTLE_FROM_IA(PLAYER_IA_BOTTLE_DEKU_PRINCESS),
|
||||
/* 6 */ PLAYER_BOTTLE_GOLD_DUST = GET_BOTTLE_FROM_IA(PLAYER_IA_BOTTLE_GOLD_DUST),
|
||||
/* 7 */ PLAYER_BOTTLE_1C = GET_BOTTLE_FROM_IA(PLAYER_IA_BOTTLE_1C),
|
||||
/* 8 */ PLAYER_BOTTLE_SEAHORSE = GET_BOTTLE_FROM_IA(PLAYER_IA_BOTTLE_SEAHORSE),
|
||||
/* 9 */ PLAYER_BOTTLE_MUSHROOM = GET_BOTTLE_FROM_IA(PLAYER_IA_BOTTLE_MUSHROOM),
|
||||
/* 10 */ PLAYER_BOTTLE_HYLIAN_LOACH = GET_BOTTLE_FROM_IA(PLAYER_IA_BOTTLE_HYLIAN_LOACH),
|
||||
/* 11 */ PLAYER_BOTTLE_BUG = GET_BOTTLE_FROM_IA(PLAYER_IA_BOTTLE_BUG),
|
||||
/* 12 */ PLAYER_BOTTLE_POE = GET_BOTTLE_FROM_IA(PLAYER_IA_BOTTLE_POE),
|
||||
/* 13 */ PLAYER_BOTTLE_BIG_POE = GET_BOTTLE_FROM_IA(PLAYER_IA_BOTTLE_BIG_POE),
|
||||
/* 14 */ PLAYER_BOTTLE_POTION_RED = GET_BOTTLE_FROM_IA(PLAYER_IA_BOTTLE_POTION_RED),
|
||||
/* 15 */ PLAYER_BOTTLE_POTION_BLUE = GET_BOTTLE_FROM_IA(PLAYER_IA_BOTTLE_POTION_BLUE),
|
||||
/* 16 */ PLAYER_BOTTLE_POTION_GREEN = GET_BOTTLE_FROM_IA(PLAYER_IA_BOTTLE_POTION_GREEN),
|
||||
/* 17 */ PLAYER_BOTTLE_MILK = GET_BOTTLE_FROM_IA(PLAYER_IA_BOTTLE_MILK),
|
||||
/* 18 */ PLAYER_BOTTLE_MILK_HALF = GET_BOTTLE_FROM_IA(PLAYER_IA_BOTTLE_MILK_HALF),
|
||||
/* 19 */ PLAYER_BOTTLE_CHATEAU = GET_BOTTLE_FROM_IA(PLAYER_IA_BOTTLE_CHATEAU),
|
||||
/* 20 */ PLAYER_BOTTLE_FAIRY = GET_BOTTLE_FROM_IA(PLAYER_IA_BOTTLE_FAIRY),
|
||||
/* 21 */ PLAYER_BOTTLE_MAX
|
||||
} PlayerBottle;
|
||||
|
||||
// Relies on explosive-related item actions to be contiguous
|
||||
#define GET_EXPLOSIVE_FROM_IA(itemAction) ((itemAction) - PLAYER_IA_EXPLOSIVE_MIN)
|
||||
|
||||
typedef enum PlayerExplosive {
|
||||
/* -1 */ PLAYER_EXPLOSIVE_NONE = -1,
|
||||
/* 0 */ PLAYER_EXPLOSIVE_BOMB = GET_EXPLOSIVE_FROM_IA(PLAYER_IA_BOMB),
|
||||
/* 1 */ PLAYER_EXPLOSIVE_POWDER_KEG = GET_EXPLOSIVE_FROM_IA(PLAYER_IA_POWDER_KEG),
|
||||
/* 2 */ PLAYER_EXPLOSIVE_BOMBCHU = GET_EXPLOSIVE_FROM_IA(PLAYER_IA_BOMBCHU),
|
||||
/* 3 */ PLAYER_EXPLOSIVE_MAX
|
||||
} PlayerExplosive;
|
||||
|
||||
// Relies on sword item actions to be contiguous
|
||||
#define GET_SWORD_FROM_IA(itemAction) ((itemAction) - PLAYER_IA_SWORD_MIN)
|
||||
|
||||
typedef enum PlayerSword {
|
||||
/* -1 */ PLAYER_SWORD_NONE = -1,
|
||||
/* 0 */ PLAYER_SWORD_KOKIRI = GET_SWORD_FROM_IA(PLAYER_IA_SWORD_KOKIRI),
|
||||
/* 1 */ PLAYER_SWORD_RAZOR = GET_SWORD_FROM_IA(PLAYER_IA_SWORD_RAZOR),
|
||||
/* 2 */ PLAYER_SWORD_GILDED = GET_SWORD_FROM_IA(PLAYER_IA_SWORD_GILDED),
|
||||
/* 3 */ PLAYER_SWORD_GREAT_FAIRY = GET_SWORD_FROM_IA(PLAYER_IA_SWORD_GREAT_FAIRY),
|
||||
/* 4 */ PLAYER_SWORD_MAX
|
||||
} PlayerSword;
|
||||
|
||||
typedef enum PlayerMeleeWeaponAnimation {
|
||||
/* 0 */ PLAYER_MWA_FORWARD_SLASH_1H, // Vertical one-handed slash
|
||||
/* 1 */ PLAYER_MWA_FORWARD_SLASH_2H, // Vertical two-handed slash
|
||||
@@ -217,10 +298,10 @@ typedef enum PlayerDoorType {
|
||||
} PlayerDoorType;
|
||||
|
||||
typedef enum PlayerAnimType {
|
||||
/* 0 */ PLAYER_ANIMTYPE_0,
|
||||
/* 0 */ PLAYER_ANIMTYPE_DEFAULT, // DEFAULT
|
||||
/* 1 */ PLAYER_ANIMTYPE_1,
|
||||
/* 2 */ PLAYER_ANIMTYPE_2,
|
||||
/* 3 */ PLAYER_ANIMTYPE_3,
|
||||
/* 3 */ PLAYER_ANIMTYPE_3, // Two hand weapon
|
||||
/* 4 */ PLAYER_ANIMTYPE_4,
|
||||
/* 5 */ PLAYER_ANIMTYPE_5,
|
||||
/* 6 */ PLAYER_ANIMTYPE_MAX
|
||||
@@ -228,28 +309,29 @@ typedef enum PlayerAnimType {
|
||||
|
||||
typedef enum PlayerModelType {
|
||||
// left hand
|
||||
/* 0 */ PLAYER_MODELTYPE_LH_OPEN,
|
||||
/* 1 */ PLAYER_MODELTYPE_LH_CLOSED,
|
||||
/* 2 */ PLAYER_MODELTYPE_LH_ONE_HAND_SWORD,
|
||||
/* 3 */ PLAYER_MODELTYPE_LH_TWO_HAND_SWORD,
|
||||
/* 4 */ PLAYER_MODELTYPE_LH_4,
|
||||
/* 5 */ PLAYER_MODELTYPE_LH_BOTTLE,
|
||||
/* 0 */ PLAYER_MODELTYPE_LH_OPEN,
|
||||
/* 1 */ PLAYER_MODELTYPE_LH_CLOSED,
|
||||
/* 2 */ PLAYER_MODELTYPE_LH_ONE_HAND_SWORD,
|
||||
/* 3 */ PLAYER_MODELTYPE_LH_TWO_HAND_SWORD,
|
||||
/* 4 */ PLAYER_MODELTYPE_LH_4,
|
||||
/* 5 */ PLAYER_MODELTYPE_LH_BOTTLE,
|
||||
// right hand
|
||||
/* 6 */ PLAYER_MODELTYPE_RH_OPEN,
|
||||
/* 7 */ PLAYER_MODELTYPE_RH_CLOSED,
|
||||
/* 8 */ PLAYER_MODELTYPE_RH_SHIELD,
|
||||
/* 9 */ PLAYER_MODELTYPE_RH_BOW,
|
||||
/* 10 */ PLAYER_MODELTYPE_RH_INSTRUMENT,
|
||||
/* 11 */ PLAYER_MODELTYPE_RH_HOOKSHOT,
|
||||
/* 6 */ PLAYER_MODELTYPE_RH_OPEN,
|
||||
/* 7 */ PLAYER_MODELTYPE_RH_CLOSED,
|
||||
/* 8 */ PLAYER_MODELTYPE_RH_SHIELD,
|
||||
/* 9 */ PLAYER_MODELTYPE_RH_BOW,
|
||||
/* 10 */ PLAYER_MODELTYPE_RH_INSTRUMENT,
|
||||
/* 11 */ PLAYER_MODELTYPE_RH_HOOKSHOT,
|
||||
// sheath
|
||||
/* 12 */ PLAYER_MODELTYPE_SHEATH_12,
|
||||
/* 13 */ PLAYER_MODELTYPE_SHEATH_13,
|
||||
/* 14 */ PLAYER_MODELTYPE_SHEATH_14,
|
||||
/* 15 */ PLAYER_MODELTYPE_SHEATH_15,
|
||||
/* 12 */ PLAYER_MODELTYPE_SHEATH_12,
|
||||
/* 13 */ PLAYER_MODELTYPE_SHEATH_13,
|
||||
/* 14 */ PLAYER_MODELTYPE_SHEATH_14,
|
||||
/* 15 */ PLAYER_MODELTYPE_SHEATH_15,
|
||||
// waist
|
||||
/* 16 */ PLAYER_MODELTYPE_WAIST,
|
||||
/* 17 */ PLAYER_MODELTYPE_17, // NULL?
|
||||
/* 18 */ PLAYER_MODELTYPE_MAX
|
||||
/* 16 */ PLAYER_MODELTYPE_WAIST,
|
||||
/* 17 */ PLAYER_MODELTYPE_17, // NULL?
|
||||
/* 18 */ PLAYER_MODELTYPE_MAX,
|
||||
/* 255 */ PLAYER_MODELTYPE_RH_FF = 0xFF // disable shield collider, cutscene-specific
|
||||
} PlayerModelType;
|
||||
|
||||
typedef struct PlayerModelIndices {
|
||||
@@ -368,25 +450,33 @@ typedef enum PlayerBodyPart {
|
||||
|
||||
typedef struct PlayerAnimationFrame {
|
||||
/* 0x000 */ Vec3s frameTable[PLAYER_LIMB_MAX];
|
||||
/* 0x108 */ s16 faceInfo;
|
||||
/* 0x108 */ s16 appearanceInfo; // bitpack containing the face and hands info
|
||||
} PlayerAnimationFrame; // size = 0x10A
|
||||
|
||||
#define PLAYER_LIMB_BUF_SIZE (ALIGN16(sizeof(PlayerAnimationFrame)) + 0xF)
|
||||
|
||||
#define GET_APPEARANCE_FROM_JOINT_TABLE(jointTable) (((PlayerAnimationFrame *)(jointTable))->appearanceInfo)
|
||||
#define GET_EYE_INDEX_FROM_JOINT_TABLE(jointTable) ((GET_APPEARANCE_FROM_JOINT_TABLE(jointTable) & 0xF) - 1)
|
||||
#define GET_MOUTH_INDEX_FROM_JOINT_TABLE(jointTable) (((GET_APPEARANCE_FROM_JOINT_TABLE(jointTable) >> 4) & 0xF) - 1)
|
||||
|
||||
// Note the returned value from this macro needs to be shifted
|
||||
#define GET_LEFT_HAND_INDEX_FROM_JOINT_TABLE(jointTable) (GET_APPEARANCE_FROM_JOINT_TABLE(jointTable) & 0xF000)
|
||||
#define GET_RIGHT_HAND_INDEX_FROM_JOINT_TABLE(jointTable) (GET_APPEARANCE_FROM_JOINT_TABLE(jointTable) & 0x0F00)
|
||||
|
||||
typedef struct PlayerAgeProperties {
|
||||
/* 0x00 */ f32 unk_00; // ceilingCheckHeight?
|
||||
/* 0x04 */ f32 shadowScale;
|
||||
/* 0x08 */ f32 unk_08;
|
||||
/* 0x0C */ f32 unk_0C;
|
||||
/* 0x10 */ f32 unk_10;
|
||||
/* 0x14 */ f32 unk_14;
|
||||
/* 0x18 */ f32 unk_18;
|
||||
/* 0x1C */ f32 unk_1C;
|
||||
/* 0x20 */ f32 unk_20;
|
||||
/* 0x24 */ f32 unk_24;
|
||||
/* 0x28 */ f32 unk_28;
|
||||
/* 0x2C */ f32 unk_2C;
|
||||
/* 0x30 */ f32 unk_30;
|
||||
/* 0x14 */ f32 unk_14; // compared to wallHeight
|
||||
/* 0x18 */ f32 unk_18; // compared to wallHeight
|
||||
/* 0x1C */ f32 unk_1C; // compared to wallHeight
|
||||
/* 0x20 */ f32 unk_20; // unused?
|
||||
/* 0x24 */ f32 unk_24; // water stuff // depthInWater
|
||||
/* 0x28 */ f32 unk_28; // water stuff // depthInWater
|
||||
/* 0x2C */ f32 unk_2C; // water stuff // depthInWater
|
||||
/* 0x30 */ f32 unk_30; // water stuff // depthInWater
|
||||
/* 0x34 */ f32 unk_34;
|
||||
/* 0x38 */ f32 unk_38; // wallCheckHeight?
|
||||
/* 0x3C */ f32 unk_3C;
|
||||
@@ -942,8 +1032,8 @@ typedef struct Player {
|
||||
/* 0xAA6 */ u16 unk_AA6; // flags of some kind
|
||||
/* 0xAA8 */ s16 unk_AA8;
|
||||
/* 0xAAA */ s16 unk_AAA;
|
||||
/* 0xAAC */ Vec3s unk_AAC;
|
||||
/* 0xAB2 */ Vec3s unk_AB2;
|
||||
/* 0xAAC */ Vec3s headLimbRot;
|
||||
/* 0xAB2 */ Vec3s upperLimbRot;
|
||||
/* 0xAB8 */ f32 unk_AB8;
|
||||
/* 0xABC */ f32 unk_ABC;
|
||||
/* 0xAC0 */ f32 unk_AC0;
|
||||
@@ -966,11 +1056,14 @@ typedef struct Player {
|
||||
/* 0xAE7 */ s8 unk_AE7; // a timer
|
||||
/* 0xAE8 */ s16 unk_AE8; // multipurpose timer
|
||||
/* 0xAEC */ f32 unk_AEC;
|
||||
/* 0xAF0 */ Vec3f unk_AF0[2];
|
||||
/* 0xAF0 */ union { // TODO: this may be an union of two structs
|
||||
Vec3f unk_AF0[2];
|
||||
f32 arr_AF0[6];
|
||||
};
|
||||
/* 0xB08 */ f32 unk_B08[2]; // TODO: Investigate if this member actually is an array
|
||||
/* 0xB10 */ f32 unk_B10[6];
|
||||
/* 0xB28 */ s16 unk_B28; //Burning stick timer?
|
||||
/* 0xB2A */ s8 getItemDrawId;
|
||||
/* 0xB2A */ s8 getItemDrawIdPlusOne;
|
||||
/* 0xB2B */ s8 unk_B2B;
|
||||
/* 0xB2C */ f32 windSpeed;
|
||||
/* 0xB30 */ s16 windAngleX;
|
||||
@@ -1022,7 +1115,7 @@ typedef struct Player {
|
||||
/* 0xCC4 */ MtxF mf_CC4;
|
||||
/* 0xD04 */ MtxF shieldMf;
|
||||
/* 0xD44 */ u8 isBurning;
|
||||
/* 0xD45 */ u8 flameTimers[PLAYER_BODYPART_MAX];
|
||||
/* 0xD45 */ u8 flameTimers[PLAYER_BODYPART_MAX]; // one flame per body part
|
||||
/* 0xD57 */ u8 unk_D57;
|
||||
/* 0xD58 */ PlayerFuncD58 unk_D58;
|
||||
/* 0xD5C */ s8 invincibilityTimer; // prevents damage when nonzero (positive = visible, counts towards zero each frame)
|
||||
|
||||
Reference in New Issue
Block a user