Floor Surface

This commit is contained in:
Derek Hensley 2022-10-05 20:42:19 -07:00
parent 9d033cd27a
commit 1eca2fc63f
7 changed files with 15 additions and 14 deletions

View File

@ -2468,8 +2468,8 @@ void Play_Draw(PlayState* this);
void Play_SetupDraw(PlayState* this); void Play_SetupDraw(PlayState* this);
void Play_Main(GameState* thisx); void Play_Main(GameState* thisx);
s32 Play_InCsMode(PlayState* this); s32 Play_InCsMode(PlayState* this);
f32 func_80169100(PlayState* this, MtxF* mtx, CollisionPoly** poly, s32* bgId, Vec3f* feetPos); f32 Play_GetFloorSurfaceImpl(PlayState* this, MtxF* mtx, CollisionPoly** poly, s32* bgId, Vec3f* pos);
void func_801691F0(PlayState* this, MtxF* mtx, Vec3f* feetPos); void Play_GetFloorSurface(PlayState* this, MtxF* mtx, Vec3f* pos);
void* Play_LoadFile(PlayState* this, RomFile* entry); void* Play_LoadFile(PlayState* this, RomFile* entry);
void Play_InitEnvironment(PlayState* this, s16 skyboxId); void Play_InitEnvironment(PlayState* this, s16 skyboxId);
// void func_801692C4(PlayState* play, UNK_TYPE1 uParm2); // void func_801692C4(PlayState* play, UNK_TYPE1 uParm2);

View File

@ -224,7 +224,7 @@ void ActorShadow_DrawFeet(Actor* actor, Lights* mapper, PlayState* play) {
for (i = 0; i < ARRAY_COUNT(floorHeight); i++, spB8 >>= 1) { for (i = 0; i < ARRAY_COUNT(floorHeight); i++, spB8 >>= 1) {
feetPosPtr->y += 50.0f; feetPosPtr->y += 50.0f;
*floorHeightPtr = func_80169100(play, &sp13C, &spF8, &bgId, feetPosPtr); *floorHeightPtr = Play_GetFloorSurfaceImpl(play, &sp13C, &spF8, &bgId, feetPosPtr);
feetPosPtr->y -= 50.0f; feetPosPtr->y -= 50.0f;
distToFloor = feetPosPtr->y - *floorHeightPtr; distToFloor = feetPosPtr->y - *floorHeightPtr;

View File

@ -108,7 +108,8 @@ void Play_DisableMotionBlur(void) {
R_MOTION_BLUR_ENABLED = false; R_MOTION_BLUR_ENABLED = false;
} }
void Play_ConvertBufferToI(void* destI, u16* srcBuf, s32 bufWidth, s32 pixelLeft, s32 pixelTop, s32 pixelRight, s32 pixelBottom, s32 type) { void Play_ConvertBufferToI(void* destI, u16* srcBuf, s32 bufWidth, s32 pixelLeft, s32 pixelTop, s32 pixelRight,
s32 pixelBottom, s32 type) {
s32 i; s32 i;
s32 j; s32 j;
u32 pixel; u32 pixel;
@ -1512,7 +1513,7 @@ s32 Play_InCsMode(PlayState* this) {
return (this->csCtx.state != 0) || Player_InCsMode(this); return (this->csCtx.state != 0) || Player_InCsMode(this);
} }
f32 func_80169100(PlayState* this, MtxF* mtx, CollisionPoly** poly, s32* bgId, Vec3f* pos) { f32 Play_GetFloorSurfaceImpl(PlayState* this, MtxF* mtx, CollisionPoly** poly, s32* bgId, Vec3f* pos) {
f32 floorHeight = BgCheck_EntityRaycastFloor3(&this->colCtx, poly, bgId, pos); f32 floorHeight = BgCheck_EntityRaycastFloor3(&this->colCtx, poly, bgId, pos);
if (floorHeight > BGCHECK_Y_MIN) { if (floorHeight > BGCHECK_Y_MIN) {
@ -1539,11 +1540,11 @@ f32 func_80169100(PlayState* this, MtxF* mtx, CollisionPoly** poly, s32* bgId, V
return floorHeight; return floorHeight;
} }
void func_801691F0(PlayState* this, MtxF* mtx, Vec3f* pos) { void Play_GetFloorSurface(PlayState* this, MtxF* mtx, Vec3f* pos) {
CollisionPoly* poly; CollisionPoly* poly;
s32 bgId; s32 bgId;
func_80169100(this, mtx, &poly, &bgId, pos); Play_GetFloorSurfaceImpl(this, mtx, &poly, &bgId, pos);
} }
void* Play_LoadFile(PlayState* this, RomFile* entry) { void* Play_LoadFile(PlayState* this, RomFile* entry) {

View File

@ -209,8 +209,8 @@ void EnWarpTag_RespawnPlayer(EnWarptag* this, PlayState* play) {
// why are we getting player home rotation from the room data? doesnt player have home.rot.y? // why are we getting player home rotation from the room data? doesnt player have home.rot.y?
// especially because we are converting from deg to binang, but isnt home.rot.y already in binang?? // especially because we are converting from deg to binang, but isnt home.rot.y already in binang??
Play_SetRespawnData( Play_SetRespawnData(
&play->state, 0, entrance, &play->state, 0, entrance, play->setupEntranceList[playerSpawnIndex].room, playerParams,
play->setupEntranceList[playerSpawnIndex].room, playerParams, &newRespawnPos, &newRespawnPos,
((((playerActorEntry->rot.y >> 7) & 0x1FF) / 180.0f) * 32768.0f)); // DEG_TO_BINANG ? ((((playerActorEntry->rot.y >> 7) & 0x1FF) / 180.0f) * 32768.0f)); // DEG_TO_BINANG ?
Play_TriggerVoidOut(&play->state); Play_TriggerVoidOut(&play->state);

View File

@ -70,7 +70,7 @@ void EffectSsBlast_Draw(PlayState* play, u32 index, EffectSs* this) {
func_8012C2DC(play->state.gfxCtx); func_8012C2DC(play->state.gfxCtx);
gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rEnvColorA); gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rEnvColorA);
func_801691F0(play, &mf, &this->pos); Play_GetFloorSurface(play, &mf, &this->pos);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, this->rPrimColorA); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, this->rPrimColorA);
Matrix_Put(&mf); Matrix_Put(&mf);
Matrix_Scale(radius, radius, radius, MTXMODE_APPLY); Matrix_Scale(radius, radius, radius, MTXMODE_APPLY);

View File

@ -2999,8 +2999,8 @@
0x80168DAC:("Play_SetupDraw",), 0x80168DAC:("Play_SetupDraw",),
0x80168F64:("Play_Main",), 0x80168F64:("Play_Main",),
0x801690CC:("Play_InCsMode",), 0x801690CC:("Play_InCsMode",),
0x80169100:("func_80169100",), 0x80169100:("Play_GetFloorSurfaceImpl",),
0x801691F0:("func_801691F0",), 0x801691F0:("Play_GetFloorSurface",),
0x80169220:("Play_LoadFile",), 0x80169220:("Play_LoadFile",),
0x8016927C:("Play_InitEnvironment",), 0x8016927C:("Play_InitEnvironment",),
0x801692C4:("Play_InitScene",), 0x801692C4:("Play_InitScene",),

View File

@ -2513,8 +2513,8 @@ asm/non_matchings/code/z_play/Play_Draw.s,Play_Draw,0x80168090,0x347
asm/non_matchings/code/z_play/Play_SetupDraw.s,Play_SetupDraw,0x80168DAC,0x6E asm/non_matchings/code/z_play/Play_SetupDraw.s,Play_SetupDraw,0x80168DAC,0x6E
asm/non_matchings/code/z_play/Play_Main.s,Play_Main,0x80168F64,0x5A asm/non_matchings/code/z_play/Play_Main.s,Play_Main,0x80168F64,0x5A
asm/non_matchings/code/z_play/Play_InCsMode.s,Play_InCsMode,0x801690CC,0xD asm/non_matchings/code/z_play/Play_InCsMode.s,Play_InCsMode,0x801690CC,0xD
asm/non_matchings/code/z_play/func_80169100.s,func_80169100,0x80169100,0x3C asm/non_matchings/code/z_play/Play_GetFloorSurfaceImpl.s,Play_GetFloorSurfaceImpl,0x80169100,0x3C
asm/non_matchings/code/z_play/func_801691F0.s,func_801691F0,0x801691F0,0xC asm/non_matchings/code/z_play/Play_GetFloorSurface.s,Play_GetFloorSurface,0x801691F0,0xC
asm/non_matchings/code/z_play/Play_LoadFile.s,Play_LoadFile,0x80169220,0x17 asm/non_matchings/code/z_play/Play_LoadFile.s,Play_LoadFile,0x80169220,0x17
asm/non_matchings/code/z_play/Play_InitEnvironment.s,Play_InitEnvironment,0x8016927C,0x12 asm/non_matchings/code/z_play/Play_InitEnvironment.s,Play_InitEnvironment,0x8016927C,0x12
asm/non_matchings/code/z_play/Play_InitScene.s,Play_InitScene,0x801692C4,0x44 asm/non_matchings/code/z_play/Play_InitScene.s,Play_InitScene,0x801692C4,0x44

1 asm/non_matchings/code/z_en_a_keep/EnAObj_Init.s EnAObj_Init 0x800A5AC0 0x2B
2513 asm/non_matchings/code/z_play/Play_SetupDraw.s Play_SetupDraw 0x80168DAC 0x6E
2514 asm/non_matchings/code/z_play/Play_Main.s Play_Main 0x80168F64 0x5A
2515 asm/non_matchings/code/z_play/Play_InCsMode.s Play_InCsMode 0x801690CC 0xD
2516 asm/non_matchings/code/z_play/func_80169100.s asm/non_matchings/code/z_play/Play_GetFloorSurfaceImpl.s func_80169100 Play_GetFloorSurfaceImpl 0x80169100 0x3C
2517 asm/non_matchings/code/z_play/func_801691F0.s asm/non_matchings/code/z_play/Play_GetFloorSurface.s func_801691F0 Play_GetFloorSurface 0x801691F0 0xC
2518 asm/non_matchings/code/z_play/Play_LoadFile.s Play_LoadFile 0x80169220 0x17
2519 asm/non_matchings/code/z_play/Play_InitEnvironment.s Play_InitEnvironment 0x8016927C 0x12
2520 asm/non_matchings/code/z_play/Play_InitScene.s Play_InitScene 0x801692C4 0x44