Document Crawlspaces (#1286)

* Crawlspace docs, first draft

* Add wall docs

* OnePointDemo, fix

* format

* More player docs

* Document bgCamData

* Magic docs WIP

* More docs, first round finished

* Better docs

* More renaming

* Simpler name

* Another small adjustment

* rm if(1)

* Better names again after in-game testing

* Change comments

* change comment

* Big rename based on all the suggestions

* Small touch-up

* More PR Suggestions

* RESTORE_IDLE -> RESET

* More docs

* Capitalization

* PR suggestions

* Make declaration consistent

* Health_ChangeBy (amount)

* cleanup

* Document bgCamData

* More changes and cleanup

* More docs

* Clarify comments

* PR Suggestions

* Missed one

* More PR Suggestions

* Change comment

* Add another clarity comment

* format

* PR Feedback, rename bgcheck functions

* remove fallthrough cleanup (other pr that deals with that)

* PR Suggestions

* bug report

* sync with bgCamData PR

* small cleanup

* Another comment

* bgCamDataIndexBeforeUnderwater

* PR/Discord Discussions

* Missed some

* sync function header args

* Another suggestion

* cleanup

* Comments

* Change bgCamData to s16 for now

* PR suggestions

* the

* use "info"

* Missed a suggestion

* Discord Discussion

* Document playerFlag

* typo

* Revert bgCamFuncData to Vec3s

* format

* format

* First PR suggestion

* Some PR Suggestions, still need to test

* followup docs

* small cleanup

* target offset

* more PR

* forwardYaw

* crawlspace func/flag

* comment

* format

* Update include/z64player.h

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>

* More PR Suggestions

* Update src/overlays/actors/ovl_player_actor/z_player.c

Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>
This commit is contained in:
engineer124
2022-10-23 17:32:51 -04:00
committed by GitHub
parent 2cb423d9ec
commit e4c1a4b512
13 changed files with 261 additions and 192 deletions
+2 -2
View File
@@ -1050,8 +1050,8 @@ s32 Player_OverrideLimbDrawGameplayDefault(PlayState* play, s32 limbIndex, Gfx**
void* thisx);
s32 Player_OverrideLimbDrawGameplayFirstPerson(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
void* thisx);
s32 Player_OverrideLimbDrawGameplay_80090440(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
void* thisx);
s32 Player_OverrideLimbDrawGameplayCrawling(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
void* thisx);
u8 func_80090480(PlayState* play, ColliderQuad* collider, WeaponInfo* weaponInfo, Vec3f* newTip, Vec3f* newBase);
void Player_DrawGetItem(PlayState* play, Player* this);
void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx);
+3 -2
View File
@@ -143,9 +143,10 @@ typedef enum {
#define WALL_FLAG_1 (1 << 1)
#define WALL_FLAG_2 (1 << 2)
#define WALL_FLAG_3 (1 << 3)
#define WALL_FLAG_4 (1 << 4)
#define WALL_FLAG_5 (1 << 5)
#define WALL_FLAG_CRAWLSPACE_1 (1 << 4)
#define WALL_FLAG_CRAWLSPACE_2 (1 << 5)
#define WALL_FLAG_6 (1 << 6)
#define WALL_FLAG_CRAWLSPACE (WALL_FLAG_CRAWLSPACE_1 | WALL_FLAG_CRAWLSPACE_2)
typedef enum {
/* 0 */ FLOOR_PROPERTY_0,
+8 -10
View File
@@ -888,16 +888,14 @@ typedef struct {
} Subj4ReadOnlyData; // size = 0x4
typedef struct {
/* 0x00 */ InfiniteLine unk_00;
/* 0x18 */ f32 unk_18;
/* 0x1C */ f32 unk_1C;
/* 0x20 */ f32 unk_20;
/* 0x24 */ f32 unk_24;
/* 0x28 */ f32 unk_28;
/* 0x2C */ s16 unk_2C;
/* 0x2E */ s16 unk_2E;
/* 0x30 */ s16 unk_30;
/* 0x32 */ s16 unk_32;
/* 0x00 */ InfiniteLine crawlspaceLine;
/* 0x18 */ Vec3f unk_18; // unused
/* 0x24 */ f32 xzSpeed;
/* 0x28 */ f32 eyeLerp;
/* 0x2C */ s16 eyeLerpPhase;
/* 0x2E */ s16 isSfxOff;
/* 0x30 */ s16 forwardYaw; // yaw to the forwards crawling direction
/* 0x32 */ s16 zoomTimer;
} Subj4ReadWriteData; // size = 0x34
typedef struct {
+2 -2
View File
@@ -432,9 +432,9 @@ typedef struct {
#define PLAYER_STATE2_13 (1 << 13)
#define PLAYER_STATE2_14 (1 << 14)
#define PLAYER_STATE2_15 (1 << 15)
#define PLAYER_STATE2_16 (1 << 16)
#define PLAYER_STATE2_DO_ACTION_ENTER (1 << 16) // Turns on the "Enter On A" DoAction
#define PLAYER_STATE2_17 (1 << 17)
#define PLAYER_STATE2_18 (1 << 18)
#define PLAYER_STATE2_CRAWLING (1 << 18) // Crawling through a crawlspace
#define PLAYER_STATE2_19 (1 << 19)
#define PLAYER_STATE2_20 (1 << 20)
#define PLAYER_STATE2_21 (1 << 21)