Doc player drawing (#1098)

* Introduce and use more enums and defines for equips and data involved in player drawing

* `EQUIP_TYPE_`, `EQUIP_INV_`, `EQUIP_VALUE_`

* Improve doc on ItemEquips/Inventory's `equipment` field

* Run formatter

* Add `PLAYER_MODELGROUPENTRY_*` for second index of `gPlayerModelTypes`

* Name `PLAYER_MODELGROUPENTRY_*` from existing documentation

* Partial doc on `PLAYER_MODELTYPE_*`

* Some doc on `PLAYER_MODELGROUP_*`

* Run formatter

* Name and some doc/cleanup on the various player draw functions

* Name symbols used for player position in pause menu

* Name player override/post limb draw callbacks

* `BOOTS_NORMAL` -> `BOOTS_KOKIRI`

* `EQUIP_INV_SWORD_GIANTKNIFE` -> `EQUIP_INV_SWORD_BROKENGIANTKNIFE`

* `currentSword` -> `currentSwordItem` to avoid confusion with `PlayerSword` enum

* Make one constant more explicit

* Document severe bug (not an issue by luck)

* Some doc on `PLAYER_MODELTYPE_RH_FF`

* Actually name most of `PlayerModelType`

* Actually name most of `PlayerModelGroup` and improve comments

* Make equipment in debug save data use equip enums

* Name symbol for computing player's `bodyPartsPos` and fix struct access

* Name right/left `HandType` symbols

* Add `PlayerBodyPart` enum

* Run formatter

* Introduce defines for pause player render dimensions and cleanup viewport usage in pause drawing

* Document `playerSegment` related usage

* Run formatter

* Revert player bodypart changes

* Revert equips doc changes

* Revert player model and anim data changes

* Revert drawing-unrelated changes

* Move `sTunicColors` tunic comments to after data
This commit is contained in:
Dragorn421
2022-03-13 01:06:43 +01:00
committed by GitHub
parent a160fb96c8
commit 054bac7583
9 changed files with 112 additions and 85 deletions
+14 -9
View File
@@ -1090,19 +1090,24 @@ s32 Player_ActionToExplosive(Player* player, s32 actionParam);
s32 Player_GetExplosiveHeld(Player* player);
s32 func_8008F2BC(Player* player, s32 actionParam);
s32 func_8008F2F8(GlobalContext* globalCtx);
void func_8008F470(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount, s32 lod, s32 tunic,
s32 boots, s32 face, OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, void* this);
s32 func_8008FCC8(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* data);
s32 func_80090014(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* data);
s32 func_800902F0(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* data);
s32 func_80090440(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* data);
void Player_DrawImpl(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount, s32 lod, s32 tunic,
s32 boots, s32 face, OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw,
void* data);
s32 Player_OverrideLimbDrawGameplayCommon(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
void* data);
s32 Player_OverrideLimbDrawGameplayDefault(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
void* data);
s32 Player_OverrideLimbDrawGameplayFirstPerson(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos,
Vec3s* rot, void* data);
s32 Player_OverrideLimbDrawGameplay_80090440(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos,
Vec3s* rot, void* data);
u8 func_80090480(GlobalContext* globalCtx, ColliderQuad* collider, WeaponInfo* weaponDim, Vec3f* newTip,
Vec3f* newBase);
void Player_DrawGetItem(GlobalContext* globalCtx, Player* player);
void func_80090D20(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* data);
void Player_PostLimbDrawGameplay(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* data);
u32 func_80091738(GlobalContext* globalCtx, u8* segment, SkelAnime* skelAnime);
void func_8009214C(GlobalContext* globalCtx, u8* segment, SkelAnime* skelAnime, Vec3f* pos, Vec3s* rot, f32 scale,
s32 sword, s32 tunic, s32 shield, s32 boots);
void Player_DrawPause(GlobalContext* globalCtx, u8* segment, SkelAnime* skelAnime, Vec3f* pos, Vec3s* rot, f32 scale,
s32 sword, s32 tunic, s32 shield, s32 boots);
void PreNMI_Init(GameState* thisx);
Vec3f* Quake_AddVec(Vec3f* dst, Vec3f* arg1, VecSph* arg2);
void Quake_UpdateShakeInfo(QuakeRequest* req, ShakeInfo* shake, f32 y, f32 x);
+6
View File
@@ -740,6 +740,12 @@ typedef enum {
/* 0x04 */ PAUSE_WORLD_MAP
} PauseMenuPage;
#define PAUSE_EQUIP_PLAYER_WIDTH 64
#define PAUSE_EQUIP_PLAYER_HEIGHT 112
#define PAUSE_EQUIP_BUFFER_SIZE sizeof(u16[PAUSE_EQUIP_PLAYER_HEIGHT][PAUSE_EQUIP_PLAYER_WIDTH])
#define PAUSE_PLAYER_SEGMENT_GAMEPLAY_KEEP_BUFFER_SIZE 0x5000
typedef struct {
/* 0x0000 */ View view;
/* 0x0128 */ u8* iconItemSegment;