2020-10-03 15:22:44 +00:00
|
|
|
#include "global.h"
|
|
|
|
#include "vt.h"
|
2022-06-06 19:37:25 +00:00
|
|
|
#include "assets/objects/gameplay_keep/gameplay_keep.h"
|
2022-06-07 04:42:03 +00:00
|
|
|
#include "assets/objects/object_d_hsblock/object_d_hsblock.h"
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2021-12-06 00:11:38 +00:00
|
|
|
#define FLAGS ACTOR_FLAG_4
|
2020-05-01 18:26:16 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
void EnAObj_Init(Actor* thisx, PlayState* play);
|
|
|
|
void EnAObj_Destroy(Actor* thisx, PlayState* play);
|
|
|
|
void EnAObj_Update(Actor* thisx, PlayState* play);
|
|
|
|
void EnAObj_Draw(Actor* thisx, PlayState* play);
|
2020-05-04 19:02:51 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
void EnAObj_WaitFinishedTalking(EnAObj* this, PlayState* play);
|
|
|
|
void EnAObj_WaitTalk(EnAObj* this, PlayState* play);
|
|
|
|
void EnAObj_BlockRot(EnAObj* this, PlayState* play);
|
|
|
|
void EnAObj_BoulderFragment(EnAObj* this, PlayState* play);
|
|
|
|
void EnAObj_Block(EnAObj* this, PlayState* play);
|
2020-05-01 18:26:16 +00:00
|
|
|
|
2021-10-22 19:54:30 +00:00
|
|
|
void EnAObj_SetupWaitTalk(EnAObj* this, s16 type);
|
|
|
|
void EnAObj_SetupBlockRot(EnAObj* this, s16 type);
|
|
|
|
void EnAObj_SetupBoulderFragment(EnAObj* this, s16 type);
|
|
|
|
void EnAObj_SetupBlock(EnAObj* this, s16 type);
|
2020-05-01 18:26:16 +00:00
|
|
|
|
|
|
|
const ActorInit En_A_Obj_InitVars = {
|
|
|
|
ACTOR_EN_A_OBJ,
|
2021-01-18 21:04:04 +00:00
|
|
|
ACTORCAT_PROP,
|
2020-05-01 18:26:16 +00:00
|
|
|
FLAGS,
|
|
|
|
OBJECT_GAMEPLAY_KEEP,
|
|
|
|
sizeof(EnAObj),
|
|
|
|
(ActorFunc)EnAObj_Init,
|
|
|
|
(ActorFunc)EnAObj_Destroy,
|
|
|
|
(ActorFunc)EnAObj_Update,
|
|
|
|
(ActorFunc)EnAObj_Draw,
|
|
|
|
};
|
|
|
|
|
2020-05-31 09:55:48 +00:00
|
|
|
static ColliderCylinderInit sCylinderInit = {
|
2021-01-18 02:13:36 +00:00
|
|
|
{
|
|
|
|
COLTYPE_NONE,
|
|
|
|
AT_NONE,
|
|
|
|
AC_ON | AC_TYPE_ALL,
|
|
|
|
OC1_ON | OC1_TYPE_ALL,
|
|
|
|
OC2_TYPE_2,
|
|
|
|
COLSHAPE_CYLINDER,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ELEMTYPE_UNK2,
|
|
|
|
{ 0x00000000, 0x00, 0x00 },
|
|
|
|
{ 0xFFCFFFFF, 0x00, 0x00 },
|
|
|
|
TOUCH_NONE,
|
|
|
|
BUMP_ON,
|
|
|
|
OCELEM_ON,
|
|
|
|
},
|
2020-05-31 09:55:48 +00:00
|
|
|
{ 25, 60, 0, { 0, 0, 0 } },
|
|
|
|
};
|
|
|
|
|
2022-06-07 04:42:03 +00:00
|
|
|
//! @bug gHookshotPostCol and gHookshotPostDL are referenced below for type A_OBJ_UNKNOWN_6 but they aren't available
|
|
|
|
//! since object_d_hsblock isn't a dependency of this actor.
|
|
|
|
//! This doesn't cause issues in the base game because A_OBJ_UNKNOWN_6 is never used.
|
z_bgcheck.c, 800430A0.c, 80043480.c (#256)
* beginning of migrating changes
* got matching
* changed order a bit
* clean up bgcheck
* fix conflict
* fix conflict again
* first stab at identifying types, some oks
* Clean up most bad structs/pointer math, move relevant structs to z64bgcheck.h, get some OKs
* more OKs, z_bgcheck.bss migration, update some sys_math3d.c args
* couple more OKs
* pushing some OKs
* fix compilation issues
* code_800430A0.c OK, more files decomp'd
* 8003A3E0 big OK :)
* Decomp most of func_8003C614, decomp helper funcs
* Decomp SurfaceType, CamData, and WaterBox property related functions
* more OKs, big OK in 8003C078
* more OKs, more progress, move a function definition in z_collision_check to functions.h
* more clean-ups, more OKs, dyn_vtx is now defined as u8*
* 8003A5B8, 8003A7D8, 8003C614, 8003DD6C OK, document function args better
* data migrated, more OKs
* 80041240 OK, func_8003B3C8 and func_8003BB18 disassembled
* func_80040284, 800409A8 non_matching, add IS_ZERO macro
* All asm files have C representations, some big OKs, lots of minor tweaks
* More OKs, non-matching code cleanup
* 8003FBF4 and 80040BE4 OK, improve codegen for most functions
* format z_bgcheck.c
* fix warnings, compile errors on NON_MATCHING
* func_8003EE80 is now NON_MATCHING
* begin documenting some functions
* formatting
* more documentation, func_8003A95C OK
* fix PHYSICAL_TO_VIRTUAL changes
* fix var rename
* More documentation, functions 80040E40, 80041648 OK, change types to not be compatible with ZAP
* func_8004239C ok, more NON_MATCHING improvements, more documentation
* Implement most suggested changes
* Convert comments to slower comments
* /**
* Implement ZAP2 changes
* my anti-virus ate my format.sh results
* Rename a couple hundred functions, fix minor stuff
* rename var so that clang formats correctly
* run format.sh
* implement Petrie's matches/suggestions
* format
* matches
* and the asm
* slight error
* Add SSList
* two more matches
* stuff
* implement code changes
* clean up Petrie's matchings
Co-authored-by: Arthur <arthurtilly413@gmail.com>
Co-authored-by: fig02 <fig02srl@gmail.com>
Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-01-08 11:12:58 +00:00
|
|
|
|
2021-10-22 19:54:30 +00:00
|
|
|
static CollisionHeader* sColHeaders[] = {
|
|
|
|
&gLargerCubeCol, // A_OBJ_GRASS_CLUMP, A_OBJ_TREE_STUMP
|
|
|
|
&gLargerCubeCol, // A_OBJ_BLOCK_LARGE, A_OBJ_BLOCK_HUGE
|
|
|
|
&gSmallerFlatBlockCol, // unused
|
|
|
|
&gLargerFlatBlockCol, // A_OBJ_BLOCK_SMALL_ROT, A_OBJ_BLOCK_LARGE_ROT
|
|
|
|
&gSmallerCubeCol, // unused
|
2022-06-07 04:42:03 +00:00
|
|
|
&gHookshotPostCol, // A_OBJ_UNKNOWN_6
|
2020-05-31 09:55:48 +00:00
|
|
|
};
|
|
|
|
|
2021-10-22 19:54:30 +00:00
|
|
|
static Gfx* sDLists[] = {
|
2022-06-07 04:42:03 +00:00
|
|
|
gFlatBlockDL, gFlatBlockDL, gFlatBlockDL, gFlatRotBlockDL, gFlatRotBlockDL, gSmallCubeDL,
|
|
|
|
gHookshotPostDL, gGrassBladesDL, gTreeStumpDL, gSignRectangularDL, gSignDirectionalDL, gBoulderFragmentsDL,
|
2020-05-31 09:55:48 +00:00
|
|
|
};
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-05-05 22:53:15 +00:00
|
|
|
void EnAObj_SetupAction(EnAObj* this, EnAObjActionFunc actionFunc) {
|
2020-05-01 18:26:16 +00:00
|
|
|
this->actionFunc = actionFunc;
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
void EnAObj_Init(Actor* thisx, PlayState* play) {
|
z_bgcheck.c, 800430A0.c, 80043480.c (#256)
* beginning of migrating changes
* got matching
* changed order a bit
* clean up bgcheck
* fix conflict
* fix conflict again
* first stab at identifying types, some oks
* Clean up most bad structs/pointer math, move relevant structs to z64bgcheck.h, get some OKs
* more OKs, z_bgcheck.bss migration, update some sys_math3d.c args
* couple more OKs
* pushing some OKs
* fix compilation issues
* code_800430A0.c OK, more files decomp'd
* 8003A3E0 big OK :)
* Decomp most of func_8003C614, decomp helper funcs
* Decomp SurfaceType, CamData, and WaterBox property related functions
* more OKs, big OK in 8003C078
* more OKs, more progress, move a function definition in z_collision_check to functions.h
* more clean-ups, more OKs, dyn_vtx is now defined as u8*
* 8003A5B8, 8003A7D8, 8003C614, 8003DD6C OK, document function args better
* data migrated, more OKs
* 80041240 OK, func_8003B3C8 and func_8003BB18 disassembled
* func_80040284, 800409A8 non_matching, add IS_ZERO macro
* All asm files have C representations, some big OKs, lots of minor tweaks
* More OKs, non-matching code cleanup
* 8003FBF4 and 80040BE4 OK, improve codegen for most functions
* format z_bgcheck.c
* fix warnings, compile errors on NON_MATCHING
* func_8003EE80 is now NON_MATCHING
* begin documenting some functions
* formatting
* more documentation, func_8003A95C OK
* fix PHYSICAL_TO_VIRTUAL changes
* fix var rename
* More documentation, functions 80040E40, 80041648 OK, change types to not be compatible with ZAP
* func_8004239C ok, more NON_MATCHING improvements, more documentation
* Implement most suggested changes
* Convert comments to slower comments
* /**
* Implement ZAP2 changes
* my anti-virus ate my format.sh results
* Rename a couple hundred functions, fix minor stuff
* rename var so that clang formats correctly
* run format.sh
* implement Petrie's matches/suggestions
* format
* matches
* and the asm
* slight error
* Add SSList
* two more matches
* stuff
* implement code changes
* clean up Petrie's matchings
Co-authored-by: Arthur <arthurtilly413@gmail.com>
Co-authored-by: fig02 <fig02srl@gmail.com>
Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-01-08 11:12:58 +00:00
|
|
|
CollisionHeader* colHeader = NULL;
|
2020-05-03 21:04:11 +00:00
|
|
|
s32 pad;
|
2021-12-04 16:33:00 +00:00
|
|
|
EnAObj* this = (EnAObj*)thisx;
|
2021-10-22 19:54:30 +00:00
|
|
|
f32 shadowScale = 6.0f;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-05-04 19:02:51 +00:00
|
|
|
this->textId = (thisx->params >> 8) & 0xFF;
|
|
|
|
thisx->params &= 0xFF;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-05-04 19:02:51 +00:00
|
|
|
switch (thisx->params) {
|
2020-03-17 04:31:30 +00:00
|
|
|
case A_OBJ_BLOCK_SMALL:
|
2020-05-04 19:02:51 +00:00
|
|
|
Actor_SetScale(thisx, 0.025f);
|
2020-03-17 04:31:30 +00:00
|
|
|
break;
|
|
|
|
case A_OBJ_BLOCK_LARGE:
|
2020-05-04 19:02:51 +00:00
|
|
|
Actor_SetScale(thisx, 0.05f);
|
2020-03-17 04:31:30 +00:00
|
|
|
break;
|
|
|
|
case A_OBJ_BLOCK_HUGE:
|
|
|
|
case A_OBJ_CUBE_SMALL:
|
|
|
|
case A_OBJ_UNKNOWN_6:
|
2020-05-04 19:02:51 +00:00
|
|
|
Actor_SetScale(thisx, 0.1f);
|
2020-03-17 04:31:30 +00:00
|
|
|
break;
|
|
|
|
case A_OBJ_BLOCK_SMALL_ROT:
|
2020-05-04 19:02:51 +00:00
|
|
|
Actor_SetScale(thisx, 0.005f);
|
2020-03-17 04:31:30 +00:00
|
|
|
break;
|
|
|
|
case A_OBJ_BLOCK_LARGE_ROT:
|
|
|
|
default:
|
2020-05-04 19:02:51 +00:00
|
|
|
Actor_SetScale(thisx, 0.01f);
|
2020-03-17 04:31:30 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2021-10-22 19:54:30 +00:00
|
|
|
if (thisx->params >= A_OBJ_SIGNPOST_OBLONG) {
|
|
|
|
shadowScale = 12.0f;
|
2020-03-23 23:11:21 +00:00
|
|
|
}
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2021-10-22 19:54:30 +00:00
|
|
|
ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawCircle, shadowScale);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2021-01-18 21:04:04 +00:00
|
|
|
thisx->focus.pos = thisx->world.pos;
|
z_bgcheck.c, 800430A0.c, 80043480.c (#256)
* beginning of migrating changes
* got matching
* changed order a bit
* clean up bgcheck
* fix conflict
* fix conflict again
* first stab at identifying types, some oks
* Clean up most bad structs/pointer math, move relevant structs to z64bgcheck.h, get some OKs
* more OKs, z_bgcheck.bss migration, update some sys_math3d.c args
* couple more OKs
* pushing some OKs
* fix compilation issues
* code_800430A0.c OK, more files decomp'd
* 8003A3E0 big OK :)
* Decomp most of func_8003C614, decomp helper funcs
* Decomp SurfaceType, CamData, and WaterBox property related functions
* more OKs, big OK in 8003C078
* more OKs, more progress, move a function definition in z_collision_check to functions.h
* more clean-ups, more OKs, dyn_vtx is now defined as u8*
* 8003A5B8, 8003A7D8, 8003C614, 8003DD6C OK, document function args better
* data migrated, more OKs
* 80041240 OK, func_8003B3C8 and func_8003BB18 disassembled
* func_80040284, 800409A8 non_matching, add IS_ZERO macro
* All asm files have C representations, some big OKs, lots of minor tweaks
* More OKs, non-matching code cleanup
* 8003FBF4 and 80040BE4 OK, improve codegen for most functions
* format z_bgcheck.c
* fix warnings, compile errors on NON_MATCHING
* func_8003EE80 is now NON_MATCHING
* begin documenting some functions
* formatting
* more documentation, func_8003A95C OK
* fix PHYSICAL_TO_VIRTUAL changes
* fix var rename
* More documentation, functions 80040E40, 80041648 OK, change types to not be compatible with ZAP
* func_8004239C ok, more NON_MATCHING improvements, more documentation
* Implement most suggested changes
* Convert comments to slower comments
* /**
* Implement ZAP2 changes
* my anti-virus ate my format.sh results
* Rename a couple hundred functions, fix minor stuff
* rename var so that clang formats correctly
* run format.sh
* implement Petrie's matches/suggestions
* format
* matches
* and the asm
* slight error
* Add SSList
* two more matches
* stuff
* implement code changes
* clean up Petrie's matchings
Co-authored-by: Arthur <arthurtilly413@gmail.com>
Co-authored-by: fig02 <fig02srl@gmail.com>
Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-01-08 11:12:58 +00:00
|
|
|
this->dyna.bgId = BGACTOR_NEG_ONE;
|
2022-06-25 13:53:26 +00:00
|
|
|
this->dyna.interactFlags = 0;
|
z_bgcheck.c, 800430A0.c, 80043480.c (#256)
* beginning of migrating changes
* got matching
* changed order a bit
* clean up bgcheck
* fix conflict
* fix conflict again
* first stab at identifying types, some oks
* Clean up most bad structs/pointer math, move relevant structs to z64bgcheck.h, get some OKs
* more OKs, z_bgcheck.bss migration, update some sys_math3d.c args
* couple more OKs
* pushing some OKs
* fix compilation issues
* code_800430A0.c OK, more files decomp'd
* 8003A3E0 big OK :)
* Decomp most of func_8003C614, decomp helper funcs
* Decomp SurfaceType, CamData, and WaterBox property related functions
* more OKs, big OK in 8003C078
* more OKs, more progress, move a function definition in z_collision_check to functions.h
* more clean-ups, more OKs, dyn_vtx is now defined as u8*
* 8003A5B8, 8003A7D8, 8003C614, 8003DD6C OK, document function args better
* data migrated, more OKs
* 80041240 OK, func_8003B3C8 and func_8003BB18 disassembled
* func_80040284, 800409A8 non_matching, add IS_ZERO macro
* All asm files have C representations, some big OKs, lots of minor tweaks
* More OKs, non-matching code cleanup
* 8003FBF4 and 80040BE4 OK, improve codegen for most functions
* format z_bgcheck.c
* fix warnings, compile errors on NON_MATCHING
* func_8003EE80 is now NON_MATCHING
* begin documenting some functions
* formatting
* more documentation, func_8003A95C OK
* fix PHYSICAL_TO_VIRTUAL changes
* fix var rename
* More documentation, functions 80040E40, 80041648 OK, change types to not be compatible with ZAP
* func_8004239C ok, more NON_MATCHING improvements, more documentation
* Implement most suggested changes
* Convert comments to slower comments
* /**
* Implement ZAP2 changes
* my anti-virus ate my format.sh results
* Rename a couple hundred functions, fix minor stuff
* rename var so that clang formats correctly
* run format.sh
* implement Petrie's matches/suggestions
* format
* matches
* and the asm
* slight error
* Add SSList
* two more matches
* stuff
* implement code changes
* clean up Petrie's matchings
Co-authored-by: Arthur <arthurtilly413@gmail.com>
Co-authored-by: fig02 <fig02srl@gmail.com>
Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-01-08 11:12:58 +00:00
|
|
|
this->dyna.unk_15C = DPM_UNK;
|
2020-06-25 01:20:31 +00:00
|
|
|
thisx->uncullZoneDownward = 1200.0f;
|
|
|
|
thisx->uncullZoneScale = 200.0f;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-05-04 19:02:51 +00:00
|
|
|
switch (thisx->params) {
|
2020-03-17 04:31:30 +00:00
|
|
|
case A_OBJ_BLOCK_LARGE:
|
|
|
|
case A_OBJ_BLOCK_HUGE:
|
z_bgcheck.c, 800430A0.c, 80043480.c (#256)
* beginning of migrating changes
* got matching
* changed order a bit
* clean up bgcheck
* fix conflict
* fix conflict again
* first stab at identifying types, some oks
* Clean up most bad structs/pointer math, move relevant structs to z64bgcheck.h, get some OKs
* more OKs, z_bgcheck.bss migration, update some sys_math3d.c args
* couple more OKs
* pushing some OKs
* fix compilation issues
* code_800430A0.c OK, more files decomp'd
* 8003A3E0 big OK :)
* Decomp most of func_8003C614, decomp helper funcs
* Decomp SurfaceType, CamData, and WaterBox property related functions
* more OKs, big OK in 8003C078
* more OKs, more progress, move a function definition in z_collision_check to functions.h
* more clean-ups, more OKs, dyn_vtx is now defined as u8*
* 8003A5B8, 8003A7D8, 8003C614, 8003DD6C OK, document function args better
* data migrated, more OKs
* 80041240 OK, func_8003B3C8 and func_8003BB18 disassembled
* func_80040284, 800409A8 non_matching, add IS_ZERO macro
* All asm files have C representations, some big OKs, lots of minor tweaks
* More OKs, non-matching code cleanup
* 8003FBF4 and 80040BE4 OK, improve codegen for most functions
* format z_bgcheck.c
* fix warnings, compile errors on NON_MATCHING
* func_8003EE80 is now NON_MATCHING
* begin documenting some functions
* formatting
* more documentation, func_8003A95C OK
* fix PHYSICAL_TO_VIRTUAL changes
* fix var rename
* More documentation, functions 80040E40, 80041648 OK, change types to not be compatible with ZAP
* func_8004239C ok, more NON_MATCHING improvements, more documentation
* Implement most suggested changes
* Convert comments to slower comments
* /**
* Implement ZAP2 changes
* my anti-virus ate my format.sh results
* Rename a couple hundred functions, fix minor stuff
* rename var so that clang formats correctly
* run format.sh
* implement Petrie's matches/suggestions
* format
* matches
* and the asm
* slight error
* Add SSList
* two more matches
* stuff
* implement code changes
* clean up Petrie's matchings
Co-authored-by: Arthur <arthurtilly413@gmail.com>
Co-authored-by: fig02 <fig02srl@gmail.com>
Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-01-08 11:12:58 +00:00
|
|
|
this->dyna.bgId = 1;
|
2022-05-21 18:23:43 +00:00
|
|
|
Actor_ChangeCategory(play, &play->actorCtx, thisx, ACTORCAT_BG);
|
2021-10-22 19:54:30 +00:00
|
|
|
EnAObj_SetupBlock(this, thisx->params);
|
2020-03-17 04:31:30 +00:00
|
|
|
break;
|
|
|
|
case A_OBJ_BLOCK_SMALL_ROT:
|
|
|
|
case A_OBJ_BLOCK_LARGE_ROT:
|
z_bgcheck.c, 800430A0.c, 80043480.c (#256)
* beginning of migrating changes
* got matching
* changed order a bit
* clean up bgcheck
* fix conflict
* fix conflict again
* first stab at identifying types, some oks
* Clean up most bad structs/pointer math, move relevant structs to z64bgcheck.h, get some OKs
* more OKs, z_bgcheck.bss migration, update some sys_math3d.c args
* couple more OKs
* pushing some OKs
* fix compilation issues
* code_800430A0.c OK, more files decomp'd
* 8003A3E0 big OK :)
* Decomp most of func_8003C614, decomp helper funcs
* Decomp SurfaceType, CamData, and WaterBox property related functions
* more OKs, big OK in 8003C078
* more OKs, more progress, move a function definition in z_collision_check to functions.h
* more clean-ups, more OKs, dyn_vtx is now defined as u8*
* 8003A5B8, 8003A7D8, 8003C614, 8003DD6C OK, document function args better
* data migrated, more OKs
* 80041240 OK, func_8003B3C8 and func_8003BB18 disassembled
* func_80040284, 800409A8 non_matching, add IS_ZERO macro
* All asm files have C representations, some big OKs, lots of minor tweaks
* More OKs, non-matching code cleanup
* 8003FBF4 and 80040BE4 OK, improve codegen for most functions
* format z_bgcheck.c
* fix warnings, compile errors on NON_MATCHING
* func_8003EE80 is now NON_MATCHING
* begin documenting some functions
* formatting
* more documentation, func_8003A95C OK
* fix PHYSICAL_TO_VIRTUAL changes
* fix var rename
* More documentation, functions 80040E40, 80041648 OK, change types to not be compatible with ZAP
* func_8004239C ok, more NON_MATCHING improvements, more documentation
* Implement most suggested changes
* Convert comments to slower comments
* /**
* Implement ZAP2 changes
* my anti-virus ate my format.sh results
* Rename a couple hundred functions, fix minor stuff
* rename var so that clang formats correctly
* run format.sh
* implement Petrie's matches/suggestions
* format
* matches
* and the asm
* slight error
* Add SSList
* two more matches
* stuff
* implement code changes
* clean up Petrie's matchings
Co-authored-by: Arthur <arthurtilly413@gmail.com>
Co-authored-by: fig02 <fig02srl@gmail.com>
Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-01-08 11:12:58 +00:00
|
|
|
this->dyna.bgId = 3;
|
2022-05-21 18:23:43 +00:00
|
|
|
Actor_ChangeCategory(play, &play->actorCtx, thisx, ACTORCAT_BG);
|
2021-10-22 19:54:30 +00:00
|
|
|
EnAObj_SetupBlockRot(this, thisx->params);
|
2020-03-17 04:31:30 +00:00
|
|
|
break;
|
|
|
|
case A_OBJ_UNKNOWN_6:
|
2022-04-29 19:06:08 +00:00
|
|
|
this->focusYoffset = 10.0f;
|
|
|
|
thisx->flags |= ACTOR_FLAG_0;
|
|
|
|
this->dyna.bgId = 5;
|
2020-05-04 19:02:51 +00:00
|
|
|
thisx->gravity = -2.0f;
|
2021-10-22 19:54:30 +00:00
|
|
|
EnAObj_SetupWaitTalk(this, thisx->params);
|
2020-03-17 04:31:30 +00:00
|
|
|
break;
|
|
|
|
case A_OBJ_GRASS_CLUMP:
|
|
|
|
case A_OBJ_TREE_STUMP:
|
z_bgcheck.c, 800430A0.c, 80043480.c (#256)
* beginning of migrating changes
* got matching
* changed order a bit
* clean up bgcheck
* fix conflict
* fix conflict again
* first stab at identifying types, some oks
* Clean up most bad structs/pointer math, move relevant structs to z64bgcheck.h, get some OKs
* more OKs, z_bgcheck.bss migration, update some sys_math3d.c args
* couple more OKs
* pushing some OKs
* fix compilation issues
* code_800430A0.c OK, more files decomp'd
* 8003A3E0 big OK :)
* Decomp most of func_8003C614, decomp helper funcs
* Decomp SurfaceType, CamData, and WaterBox property related functions
* more OKs, big OK in 8003C078
* more OKs, more progress, move a function definition in z_collision_check to functions.h
* more clean-ups, more OKs, dyn_vtx is now defined as u8*
* 8003A5B8, 8003A7D8, 8003C614, 8003DD6C OK, document function args better
* data migrated, more OKs
* 80041240 OK, func_8003B3C8 and func_8003BB18 disassembled
* func_80040284, 800409A8 non_matching, add IS_ZERO macro
* All asm files have C representations, some big OKs, lots of minor tweaks
* More OKs, non-matching code cleanup
* 8003FBF4 and 80040BE4 OK, improve codegen for most functions
* format z_bgcheck.c
* fix warnings, compile errors on NON_MATCHING
* func_8003EE80 is now NON_MATCHING
* begin documenting some functions
* formatting
* more documentation, func_8003A95C OK
* fix PHYSICAL_TO_VIRTUAL changes
* fix var rename
* More documentation, functions 80040E40, 80041648 OK, change types to not be compatible with ZAP
* func_8004239C ok, more NON_MATCHING improvements, more documentation
* Implement most suggested changes
* Convert comments to slower comments
* /**
* Implement ZAP2 changes
* my anti-virus ate my format.sh results
* Rename a couple hundred functions, fix minor stuff
* rename var so that clang formats correctly
* run format.sh
* implement Petrie's matches/suggestions
* format
* matches
* and the asm
* slight error
* Add SSList
* two more matches
* stuff
* implement code changes
* clean up Petrie's matchings
Co-authored-by: Arthur <arthurtilly413@gmail.com>
Co-authored-by: fig02 <fig02srl@gmail.com>
Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-01-08 11:12:58 +00:00
|
|
|
this->dyna.bgId = 0;
|
2021-10-22 19:54:30 +00:00
|
|
|
EnAObj_SetupWaitTalk(this, thisx->params);
|
2020-03-17 04:31:30 +00:00
|
|
|
break;
|
|
|
|
case A_OBJ_SIGNPOST_OBLONG:
|
|
|
|
case A_OBJ_SIGNPOST_ARROW:
|
2020-05-04 19:02:51 +00:00
|
|
|
thisx->textId = (this->textId & 0xFF) | 0x300;
|
2022-04-29 19:06:08 +00:00
|
|
|
thisx->targetArrowOffset = 500.0f;
|
|
|
|
thisx->flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3;
|
2021-10-22 19:54:30 +00:00
|
|
|
this->focusYoffset = 45.0f;
|
|
|
|
EnAObj_SetupWaitTalk(this, thisx->params);
|
2022-05-21 18:23:43 +00:00
|
|
|
Collider_InitCylinder(play, &this->collider);
|
|
|
|
Collider_SetCylinder(play, &this->collider, thisx, &sCylinderInit);
|
2021-01-18 02:13:36 +00:00
|
|
|
thisx->colChkInfo.mass = MASS_IMMOVABLE;
|
2021-01-18 21:04:04 +00:00
|
|
|
thisx->targetMode = 0;
|
2020-03-17 04:31:30 +00:00
|
|
|
break;
|
2021-10-22 19:54:30 +00:00
|
|
|
case A_OBJ_BOULDER_FRAGMENT:
|
2020-05-04 19:02:51 +00:00
|
|
|
thisx->gravity = -1.5f;
|
2021-10-22 19:54:30 +00:00
|
|
|
EnAObj_SetupBoulderFragment(this, thisx->params);
|
2020-03-17 04:31:30 +00:00
|
|
|
break;
|
|
|
|
default:
|
2020-05-04 19:02:51 +00:00
|
|
|
thisx->gravity = -2.0f;
|
2021-10-22 19:54:30 +00:00
|
|
|
EnAObj_SetupWaitTalk(this, thisx->params);
|
2020-03-17 04:31:30 +00:00
|
|
|
break;
|
|
|
|
}
|
2020-03-22 21:19:43 +00:00
|
|
|
|
2021-10-22 19:54:30 +00:00
|
|
|
if (thisx->params <= A_OBJ_BLOCK_LARGE_ROT) { // A_OBJ_BLOCK_*
|
2021-01-18 02:13:36 +00:00
|
|
|
thisx->colChkInfo.mass = MASS_IMMOVABLE;
|
2020-03-23 23:11:21 +00:00
|
|
|
}
|
2020-03-17 04:31:30 +00:00
|
|
|
|
z_bgcheck.c, 800430A0.c, 80043480.c (#256)
* beginning of migrating changes
* got matching
* changed order a bit
* clean up bgcheck
* fix conflict
* fix conflict again
* first stab at identifying types, some oks
* Clean up most bad structs/pointer math, move relevant structs to z64bgcheck.h, get some OKs
* more OKs, z_bgcheck.bss migration, update some sys_math3d.c args
* couple more OKs
* pushing some OKs
* fix compilation issues
* code_800430A0.c OK, more files decomp'd
* 8003A3E0 big OK :)
* Decomp most of func_8003C614, decomp helper funcs
* Decomp SurfaceType, CamData, and WaterBox property related functions
* more OKs, big OK in 8003C078
* more OKs, more progress, move a function definition in z_collision_check to functions.h
* more clean-ups, more OKs, dyn_vtx is now defined as u8*
* 8003A5B8, 8003A7D8, 8003C614, 8003DD6C OK, document function args better
* data migrated, more OKs
* 80041240 OK, func_8003B3C8 and func_8003BB18 disassembled
* func_80040284, 800409A8 non_matching, add IS_ZERO macro
* All asm files have C representations, some big OKs, lots of minor tweaks
* More OKs, non-matching code cleanup
* 8003FBF4 and 80040BE4 OK, improve codegen for most functions
* format z_bgcheck.c
* fix warnings, compile errors on NON_MATCHING
* func_8003EE80 is now NON_MATCHING
* begin documenting some functions
* formatting
* more documentation, func_8003A95C OK
* fix PHYSICAL_TO_VIRTUAL changes
* fix var rename
* More documentation, functions 80040E40, 80041648 OK, change types to not be compatible with ZAP
* func_8004239C ok, more NON_MATCHING improvements, more documentation
* Implement most suggested changes
* Convert comments to slower comments
* /**
* Implement ZAP2 changes
* my anti-virus ate my format.sh results
* Rename a couple hundred functions, fix minor stuff
* rename var so that clang formats correctly
* run format.sh
* implement Petrie's matches/suggestions
* format
* matches
* and the asm
* slight error
* Add SSList
* two more matches
* stuff
* implement code changes
* clean up Petrie's matchings
Co-authored-by: Arthur <arthurtilly413@gmail.com>
Co-authored-by: fig02 <fig02srl@gmail.com>
Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-01-08 11:12:58 +00:00
|
|
|
if (this->dyna.bgId != BGACTOR_NEG_ONE) {
|
2021-10-22 19:54:30 +00:00
|
|
|
CollisionHeader_GetVirtual(sColHeaders[this->dyna.bgId], &colHeader);
|
2022-05-21 18:23:43 +00:00
|
|
|
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, thisx, colHeader);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
void EnAObj_Destroy(Actor* thisx, PlayState* play) {
|
2021-12-04 16:33:00 +00:00
|
|
|
EnAObj* this = (EnAObj*)thisx;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-05-01 18:26:16 +00:00
|
|
|
switch (this->dyna.actor.params) {
|
2020-03-17 04:31:30 +00:00
|
|
|
case A_OBJ_SIGNPOST_OBLONG:
|
|
|
|
case A_OBJ_SIGNPOST_ARROW:
|
2022-05-21 18:23:43 +00:00
|
|
|
Collider_DestroyCylinder(play, &this->collider);
|
2021-10-22 19:54:30 +00:00
|
|
|
break;
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
void EnAObj_WaitFinishedTalking(EnAObj* this, PlayState* play) {
|
|
|
|
if (Actor_TextboxIsClosing(&this->dyna.actor, play)) {
|
2021-10-22 19:54:30 +00:00
|
|
|
EnAObj_SetupWaitTalk(this, this->dyna.actor.params);
|
2020-03-22 21:19:43 +00:00
|
|
|
}
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2021-10-22 19:54:30 +00:00
|
|
|
void EnAObj_SetupWaitTalk(EnAObj* this, s16 type) {
|
|
|
|
EnAObj_SetupAction(this, EnAObj_WaitTalk);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
void EnAObj_WaitTalk(EnAObj* this, PlayState* play) {
|
2021-10-22 19:54:30 +00:00
|
|
|
s16 relYawTowardsPlayer;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-05-01 18:26:16 +00:00
|
|
|
if (this->dyna.actor.textId != 0) {
|
2021-10-22 19:54:30 +00:00
|
|
|
relYawTowardsPlayer = this->dyna.actor.yawTowardsPlayer - this->dyna.actor.shape.rot.y;
|
|
|
|
if (ABS(relYawTowardsPlayer) < 0x2800 ||
|
|
|
|
(this->dyna.actor.params == A_OBJ_SIGNPOST_ARROW && ABS(relYawTowardsPlayer) > 0x5800)) {
|
2022-05-21 18:23:43 +00:00
|
|
|
if (Actor_ProcessTalkRequest(&this->dyna.actor, play)) {
|
2021-10-22 19:54:30 +00:00
|
|
|
EnAObj_SetupAction(this, EnAObj_WaitFinishedTalking);
|
2020-03-22 21:19:43 +00:00
|
|
|
} else {
|
2022-05-21 18:23:43 +00:00
|
|
|
func_8002F2F4(&this->dyna.actor, play);
|
2020-03-22 21:19:43 +00:00
|
|
|
}
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-10-22 19:54:30 +00:00
|
|
|
void EnAObj_SetupBlockRot(EnAObj* this, s16 type) {
|
|
|
|
this->rotateState = 0;
|
|
|
|
this->rotateWaitTimer = 10;
|
2021-01-18 21:04:04 +00:00
|
|
|
this->dyna.actor.world.rot.y = 0;
|
|
|
|
this->dyna.actor.shape.rot = this->dyna.actor.world.rot;
|
2021-10-22 19:54:30 +00:00
|
|
|
EnAObj_SetupAction(this, EnAObj_BlockRot);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
void EnAObj_BlockRot(EnAObj* this, PlayState* play) {
|
2021-10-22 19:54:30 +00:00
|
|
|
if (this->rotateState == 0) {
|
2022-06-25 13:53:26 +00:00
|
|
|
if (this->dyna.interactFlags != 0) {
|
2021-10-22 19:54:30 +00:00
|
|
|
this->rotateState++;
|
|
|
|
this->rotateForTimer = 20;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2021-01-18 21:04:04 +00:00
|
|
|
if ((s16)(this->dyna.actor.yawTowardsPlayer + 0x4000) < 0) {
|
2021-10-22 19:54:30 +00:00
|
|
|
this->rotSpeedX = -0x3E8;
|
2020-03-22 21:19:43 +00:00
|
|
|
} else {
|
2021-10-22 19:54:30 +00:00
|
|
|
this->rotSpeedX = 0x3E8;
|
2020-03-22 21:19:43 +00:00
|
|
|
}
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2021-01-18 21:04:04 +00:00
|
|
|
if (this->dyna.actor.yawTowardsPlayer < 0) {
|
2021-10-22 19:54:30 +00:00
|
|
|
this->rotSpeedY = -this->rotSpeedX;
|
2020-03-22 21:19:43 +00:00
|
|
|
} else {
|
2021-10-22 19:54:30 +00:00
|
|
|
this->rotSpeedY = this->rotSpeedX;
|
2020-03-22 21:19:43 +00:00
|
|
|
}
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
2020-03-22 21:19:43 +00:00
|
|
|
} else {
|
2021-10-22 19:54:30 +00:00
|
|
|
if (this->rotateWaitTimer != 0) {
|
|
|
|
this->rotateWaitTimer--;
|
2020-03-22 21:19:43 +00:00
|
|
|
} else {
|
2021-10-22 19:54:30 +00:00
|
|
|
this->dyna.actor.shape.rot.y += this->rotSpeedY;
|
|
|
|
this->dyna.actor.shape.rot.x += this->rotSpeedX;
|
|
|
|
this->rotateForTimer--;
|
2020-05-01 18:26:16 +00:00
|
|
|
this->dyna.actor.gravity = -1.0f;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2021-10-22 19:54:30 +00:00
|
|
|
if (this->rotateForTimer == 0) {
|
2021-01-18 21:04:04 +00:00
|
|
|
this->dyna.actor.world.pos = this->dyna.actor.home.pos;
|
2021-10-22 19:54:30 +00:00
|
|
|
this->rotateState = 0;
|
|
|
|
this->rotateWaitTimer = 10;
|
2020-05-01 18:26:16 +00:00
|
|
|
this->dyna.actor.velocity.y = 0.0f;
|
|
|
|
this->dyna.actor.gravity = 0.0f;
|
2021-01-18 21:04:04 +00:00
|
|
|
this->dyna.actor.shape.rot = this->dyna.actor.world.rot;
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-10-22 19:54:30 +00:00
|
|
|
void EnAObj_SetupBoulderFragment(EnAObj* this, s16 type) {
|
|
|
|
EnAObj_SetupAction(this, EnAObj_BoulderFragment);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
void EnAObj_BoulderFragment(EnAObj* this, PlayState* play) {
|
2020-12-26 10:44:53 +00:00
|
|
|
Math_SmoothStepToF(&this->dyna.actor.speedXZ, 1.0f, 1.0f, 0.5f, 0.0f);
|
2021-10-22 19:54:30 +00:00
|
|
|
this->dyna.actor.shape.rot.x += this->dyna.actor.world.rot.x >> 1;
|
|
|
|
this->dyna.actor.shape.rot.z += this->dyna.actor.world.rot.z >> 1;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-02-19 02:16:19 +00:00
|
|
|
if (this->dyna.actor.speedXZ != 0.0f && this->dyna.actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
2021-02-14 00:49:40 +00:00
|
|
|
this->dyna.actor.world.rot.y =
|
2021-10-22 19:54:30 +00:00
|
|
|
this->dyna.actor.wallYaw - this->dyna.actor.world.rot.y + this->dyna.actor.wallYaw - 0x8000;
|
|
|
|
if (1) {}
|
2022-02-19 02:16:19 +00:00
|
|
|
this->dyna.actor.bgCheckFlags &= ~BGCHECKFLAG_WALL;
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-02-19 02:16:19 +00:00
|
|
|
if (this->dyna.actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
2020-05-01 18:26:16 +00:00
|
|
|
if (this->dyna.actor.velocity.y < -8.0f) {
|
|
|
|
this->dyna.actor.velocity.y *= -0.6f;
|
|
|
|
this->dyna.actor.speedXZ *= 0.6f;
|
2022-02-19 02:16:19 +00:00
|
|
|
this->dyna.actor.bgCheckFlags &= ~(BGCHECKFLAG_GROUND | BGCHECKFLAG_GROUND_TOUCH);
|
2020-03-22 21:19:43 +00:00
|
|
|
} else {
|
2020-05-01 18:26:16 +00:00
|
|
|
Actor_Kill(&this->dyna.actor);
|
2020-03-22 21:19:43 +00:00
|
|
|
}
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-10-22 19:54:30 +00:00
|
|
|
void EnAObj_SetupBlock(EnAObj* this, s16 type) {
|
2020-06-25 01:20:31 +00:00
|
|
|
this->dyna.actor.uncullZoneDownward = 1200.0f;
|
|
|
|
this->dyna.actor.uncullZoneScale = 720.0f;
|
2021-10-22 19:54:30 +00:00
|
|
|
EnAObj_SetupAction(this, EnAObj_Block);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
void EnAObj_Block(EnAObj* this, PlayState* play) {
|
2020-05-01 18:26:16 +00:00
|
|
|
this->dyna.actor.speedXZ += this->dyna.unk_150;
|
2021-01-18 21:04:04 +00:00
|
|
|
this->dyna.actor.world.rot.y = this->dyna.unk_158;
|
z_bgcheck.c, 800430A0.c, 80043480.c (#256)
* beginning of migrating changes
* got matching
* changed order a bit
* clean up bgcheck
* fix conflict
* fix conflict again
* first stab at identifying types, some oks
* Clean up most bad structs/pointer math, move relevant structs to z64bgcheck.h, get some OKs
* more OKs, z_bgcheck.bss migration, update some sys_math3d.c args
* couple more OKs
* pushing some OKs
* fix compilation issues
* code_800430A0.c OK, more files decomp'd
* 8003A3E0 big OK :)
* Decomp most of func_8003C614, decomp helper funcs
* Decomp SurfaceType, CamData, and WaterBox property related functions
* more OKs, big OK in 8003C078
* more OKs, more progress, move a function definition in z_collision_check to functions.h
* more clean-ups, more OKs, dyn_vtx is now defined as u8*
* 8003A5B8, 8003A7D8, 8003C614, 8003DD6C OK, document function args better
* data migrated, more OKs
* 80041240 OK, func_8003B3C8 and func_8003BB18 disassembled
* func_80040284, 800409A8 non_matching, add IS_ZERO macro
* All asm files have C representations, some big OKs, lots of minor tweaks
* More OKs, non-matching code cleanup
* 8003FBF4 and 80040BE4 OK, improve codegen for most functions
* format z_bgcheck.c
* fix warnings, compile errors on NON_MATCHING
* func_8003EE80 is now NON_MATCHING
* begin documenting some functions
* formatting
* more documentation, func_8003A95C OK
* fix PHYSICAL_TO_VIRTUAL changes
* fix var rename
* More documentation, functions 80040E40, 80041648 OK, change types to not be compatible with ZAP
* func_8004239C ok, more NON_MATCHING improvements, more documentation
* Implement most suggested changes
* Convert comments to slower comments
* /**
* Implement ZAP2 changes
* my anti-virus ate my format.sh results
* Rename a couple hundred functions, fix minor stuff
* rename var so that clang formats correctly
* run format.sh
* implement Petrie's matches/suggestions
* format
* matches
* and the asm
* slight error
* Add SSList
* two more matches
* stuff
* implement code changes
* clean up Petrie's matchings
Co-authored-by: Arthur <arthurtilly413@gmail.com>
Co-authored-by: fig02 <fig02srl@gmail.com>
Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-01-08 11:12:58 +00:00
|
|
|
this->dyna.actor.speedXZ = CLAMP(this->dyna.actor.speedXZ, -2.5f, 2.5f);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-12-26 10:44:53 +00:00
|
|
|
Math_SmoothStepToF(&this->dyna.actor.speedXZ, 0.0f, 1.0f, 1.0f, 0.0f);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-05-01 18:26:16 +00:00
|
|
|
if (this->dyna.actor.speedXZ != 0.0f) {
|
2022-07-30 13:05:27 +00:00
|
|
|
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG);
|
2020-03-22 21:19:43 +00:00
|
|
|
}
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-05-01 18:26:16 +00:00
|
|
|
this->dyna.unk_154 = 0.0f;
|
|
|
|
this->dyna.unk_150 = 0.0f;
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
void EnAObj_Update(Actor* thisx, PlayState* play) {
|
2021-12-04 16:33:00 +00:00
|
|
|
EnAObj* this = (EnAObj*)thisx;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
this->actionFunc(this, play);
|
2020-05-01 18:26:16 +00:00
|
|
|
Actor_MoveForward(&this->dyna.actor);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-05-01 18:26:16 +00:00
|
|
|
if (this->dyna.actor.gravity != 0.0f) {
|
2021-10-22 19:54:30 +00:00
|
|
|
if (this->dyna.actor.params != A_OBJ_BOULDER_FRAGMENT) {
|
2022-05-21 18:23:43 +00:00
|
|
|
Actor_UpdateBgCheckInfo(play, &this->dyna.actor, 5.0f, 40.0f, 0.0f,
|
2022-02-20 23:41:55 +00:00
|
|
|
UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2 | UPDBGCHECKINFO_FLAG_3 |
|
|
|
|
UPDBGCHECKINFO_FLAG_4);
|
2020-03-22 21:19:43 +00:00
|
|
|
} else {
|
2022-05-21 18:23:43 +00:00
|
|
|
Actor_UpdateBgCheckInfo(play, &this->dyna.actor, 5.0f, 20.0f, 0.0f,
|
2022-02-20 23:41:55 +00:00
|
|
|
UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2 | UPDBGCHECKINFO_FLAG_3 |
|
|
|
|
UPDBGCHECKINFO_FLAG_4);
|
2020-03-22 21:19:43 +00:00
|
|
|
}
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2021-01-18 21:04:04 +00:00
|
|
|
this->dyna.actor.focus.pos = this->dyna.actor.world.pos;
|
2021-10-22 19:54:30 +00:00
|
|
|
this->dyna.actor.focus.pos.y += this->focusYoffset;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-05-01 18:26:16 +00:00
|
|
|
switch (this->dyna.actor.params) {
|
2020-03-17 04:31:30 +00:00
|
|
|
case A_OBJ_SIGNPOST_OBLONG:
|
|
|
|
case A_OBJ_SIGNPOST_ARROW:
|
2021-01-18 02:13:36 +00:00
|
|
|
Collider_UpdateCylinder(&this->dyna.actor, &this->collider);
|
2022-05-21 18:23:43 +00:00
|
|
|
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
|
2021-10-22 19:54:30 +00:00
|
|
|
break;
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
void EnAObj_Draw(Actor* thisx, PlayState* play) {
|
2020-05-04 19:02:51 +00:00
|
|
|
s32 type = thisx->params;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_en_a_keep.c", 701);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-06-03 22:25:48 +00:00
|
|
|
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2021-10-22 19:54:30 +00:00
|
|
|
if (type >= A_OBJ_MAX) {
|
|
|
|
type = A_OBJ_BOULDER_FRAGMENT;
|
2020-03-22 21:19:43 +00:00
|
|
|
}
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2021-10-22 19:54:30 +00:00
|
|
|
if (thisx->params == A_OBJ_BOULDER_FRAGMENT) {
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPSetPrimColor(POLY_OPA_DISP++, 0, 1, 60, 60, 60, 50);
|
2020-03-22 21:19:43 +00:00
|
|
|
}
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_en_a_keep.c", 712),
|
2020-03-22 21:19:43 +00:00
|
|
|
G_MTX_MODELVIEW | G_MTX_LOAD);
|
2021-10-22 19:54:30 +00:00
|
|
|
gSPDisplayList(POLY_OPA_DISP++, sDLists[type]);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_en_a_keep.c", 715);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|