mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-23 07:21:19 +00:00
Generic actor params getters (#1359)
* Initial PARAMS_GET macros * NOSHIFT macro * Use number of bits rather than raw mask values * Add descriptions for each generic macro * Reformat * Adjust comment * format * edit en_door macro names * edit redead macro name * edit bdan switch macro name, and remove unneeded comments in go2 * mizushutter macro names * remove PARAMS_GET_S, rework ishi switch flag handling * actually remove PARAMS_GET_S * remove PARAMS_GET2_S * PARAMS_GET_U and PARAMS_GET_S * format * fix merge * format --------- Co-authored-by: fig02 <fig02srl@gmail.com> Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
This commit is contained in:
parent
137e0d2a10
commit
eaf955ad22
200 changed files with 1113 additions and 1045 deletions
|
@ -65,7 +65,7 @@ void ShotSun_Init(Actor* thisx, PlayState* play) {
|
|||
|
||||
// "Ocarina secret occurrence"
|
||||
PRINTF("%d ---- オカリナの秘密発生!!!!!!!!!!!!!\n", this->actor.params);
|
||||
params = this->actor.params & 0xFF;
|
||||
params = PARAMS_GET_U(this->actor.params, 0, 8);
|
||||
if (params == 0x40 || params == 0x41) {
|
||||
this->fairySpawnerState = SPAWNER_OUT_OF_RANGE;
|
||||
this->actor.flags |= ACTOR_FLAG_4;
|
||||
|
@ -82,7 +82,7 @@ void ShotSun_Init(Actor* thisx, PlayState* play) {
|
|||
|
||||
void ShotSun_Destroy(Actor* thisx, PlayState* play) {
|
||||
ShotSun* this = (ShotSun*)thisx;
|
||||
s32 params = this->actor.params & 0xFF;
|
||||
s32 params = PARAMS_GET_U(this->actor.params, 0, 8);
|
||||
|
||||
if (params != 0x40 && params != 0x41) {
|
||||
Collider_DestroyCylinder(play, &this->collider);
|
||||
|
@ -90,7 +90,7 @@ void ShotSun_Destroy(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
void ShotSun_SpawnFairy(ShotSun* this, PlayState* play) {
|
||||
s32 params = this->actor.params & 0xFF;
|
||||
s32 params = PARAMS_GET_U(this->actor.params, 0, 8);
|
||||
s32 fairyType;
|
||||
|
||||
if (this->timer > 0) {
|
||||
|
@ -128,7 +128,7 @@ void ShotSun_TriggerFairy(ShotSun* this, PlayState* play) {
|
|||
void ShotSun_UpdateFairySpawner(ShotSun* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
s32 pad;
|
||||
s32 params = this->actor.params & 0xFF;
|
||||
s32 params = PARAMS_GET_U(this->actor.params, 0, 8);
|
||||
|
||||
if (Math3D_Vec3fDistSq(&this->actor.world.pos, &player->actor.world.pos) > SQ(150.0f)) {
|
||||
this->fairySpawnerState = SPAWNER_OUT_OF_RANGE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue