flags -> flag (#909)

* flagsnt

* not this one

Co-authored-by: HailSanta <Hail2Santa@gmail.com>
This commit is contained in:
HailSanta 2023-01-11 21:09:13 -05:00 committed by GitHub
parent efa45a5668
commit eb7ed118a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
634 changed files with 4907 additions and 4907 deletions

View File

@ -1637,9 +1637,9 @@ typedef struct CollisionStatus {
/* 0x06 */ s16 floorBelow;
/* 0x08 */ s16 currentCeiling; /* valid on touching with head */
/* 0x0A */ s16 currentInspect; /* associated with TRIGGER_WALL_PRESS_A */
/* 0x0C */ s16 unk_0C; /* associated with TRIGGER_FLAGS_2000 */
/* 0x0E */ s16 unk_0E; /* associated with TRIGGER_FLAGS_4000 */
/* 0x10 */ s16 unk_10; /* associated with TRIGGER_FLAGS_8000 */
/* 0x0C */ s16 unk_0C; /* associated with TRIGGER_FLAG_2000 */
/* 0x0E */ s16 unk_0E; /* associated with TRIGGER_FLAG_4000 */
/* 0x10 */ s16 unk_10; /* associated with TRIGGER_FLAG_8000 */
/* 0x12 */ s16 currentWall;
/* 0x14 */ s16 lastWallHammered; /* valid when smashing */
/* 0x16 */ s16 touchingWallTrigger; /* 0/1 */

File diff suppressed because it is too large Load Diff

View File

@ -15,7 +15,7 @@
// rename this to NO_DROPS and the above to NO_STAT_DROPS after all map data done
#define NPC_NO_DROPS { \
.dropFlags = NPC_DROP_FLAGS_80, \
.dropFlags = NPC_DROP_FLAG_80, \
.heartDrops = NO_DROPS, \
.flowerDrops = NO_DROPS, \
}

View File

@ -183,7 +183,7 @@ void func_80036430(void) {
gMapTransitionAlpha = 255;
gMapTransitionFadeRate = 20;
gMapTransitionState = 0x01;
gPlayerStatus.flags |= PS_FLAGS_NO_STATIC_COLLISION;
gPlayerStatus.flags |= PS_FLAG_NO_STATIC_COLLISION;
}
void func_8003646C(void) {

View File

@ -252,9 +252,9 @@ void btl_state_update_normal_start(void) {
battleStatus->damageTaken = 0;
battleStatus->nextMerleeSpellType = MERLEE_SPELL_0;
battleStatus->actionCommandMode = ACTION_COMMAND_MODE_NOT_LEARNED;
gCameras[CAM_DEFAULT].flags |= CAMERA_FLAGS_ENABLED;
gCameras[CAM_BATTLE].flags |= CAMERA_FLAGS_ENABLED;
gCameras[CAM_TATTLE].flags |= CAMERA_FLAGS_ENABLED;
gCameras[CAM_DEFAULT].flags |= CAMERA_FLAG_ENABLED;
gCameras[CAM_BATTLE].flags |= CAMERA_FLAG_ENABLED;
gCameras[CAM_TATTLE].flags |= CAMERA_FLAG_ENABLED;
if (is_ability_active(ABILITY_MYSTERY_SCROLL)) {
battleStatus->actionCommandMode = ACTION_COMMAND_MODE_LEARNED;
}
@ -753,7 +753,7 @@ void btl_state_update_begin_player_turn(void) {
battleStatus->waterBlockTurnsLeft--;
battleStatus->buffEffect->data.partnerBuff->unk_0C[FX_BUFF_DATA_WATER_BLOCK].turnsLeft = battleStatus->waterBlockTurnsLeft;
if (battleStatus->waterBlockTurnsLeft <= 0) {
battleStatus->waterBlockEffect->flags |= EFFECT_INSTANCE_FLAGS_10;
battleStatus->waterBlockEffect->flags |= EFFECT_INSTANCE_FLAG_10;
fx_water_block(1, player->currentPos.x, player->currentPos.y + 18.0f, player->currentPos.z + 5.0f, 1.5f, 10);
fx_water_splash(0, player->currentPos.x - 10.0f, player->currentPos.y + 5.0f, player->currentPos.z + 5.0f, 1.0f, 24);
fx_water_splash(0, player->currentPos.x - 15.0f, player->currentPos.y + 32.0f, player->currentPos.z + 5.0f, 1.0f, 24);
@ -2354,7 +2354,7 @@ void btl_state_update_defeat(void) {
if (player->debuff != 0) {
if (player->debuff == 7) {
sfx_play_sound(SOUND_FROZEN_SHATTER);
player->icePillarEffect->flags |= EFFECT_INSTANCE_FLAGS_10;
player->icePillarEffect->flags |= EFFECT_INSTANCE_FLAG_10;
player->icePillarEffect = NULL;
}
player->debuff = 0;

View File

@ -202,23 +202,23 @@ void initialize_battle(void) {
func_80268E88();
set_windows_visible(WINDOW_GROUP_1);
D_8029EFBC = hud_element_create(&HES_HPBar);
hud_element_set_flags(D_8029EFBC, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029EFBC, HUD_ELEMENT_FLAG_80);
for (i = 0; i < ARRAY_COUNT(D_8029EFC0); i++) {
hudElemID = D_8029EFC0[i] = hud_element_create(&HES_Item_StarPoint);
hud_element_set_flags(hudElemID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(hudElemID, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hud_element_set_render_depth(hudElemID, 20);
}
for (i = 0; i < ARRAY_COUNT(D_8029EFE8); i++) {
hudElemID = D_8029EFE8[i] = hud_element_create(&HES_StatusSPShine);
hud_element_set_flags(hudElemID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(hudElemID, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hud_element_set_render_depth(hudElemID, 20);
}
for (i = 0; i < ARRAY_COUNT(D_8029F010); i++) {
hudElemID = D_8029F010[i] = hud_element_create(&HES_Item_SmallStarPoint);
hud_element_set_flags(hudElemID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(hudElemID, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hud_element_set_render_depth(hudElemID, 20);
}
@ -1029,8 +1029,8 @@ void btl_update_starpoints_display(void) {
}
for (; i < ARRAY_COUNT(D_8029EFC0); i++) {
hud_element_set_flags(D_8029EFC0[i], HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(D_8029EFE8[i], HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(D_8029EFC0[i], HUD_ELEMENT_FLAG_DISABLED);
hud_element_set_flags(D_8029EFE8[i], HUD_ELEMENT_FLAG_DISABLED);
}
posX = D_8029DA40;
@ -1054,7 +1054,7 @@ void btl_update_starpoints_display(void) {
}
for (; i < ARRAY_COUNT(D_8029F010); i++) {
hud_element_set_flags(D_8029F010[i], HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(D_8029F010[i], HUD_ELEMENT_FLAG_DISABLED);
}
}
}

View File

@ -2815,7 +2815,7 @@ void func_8024EFE0(f32 x, f32 y, f32 z, s32 numMessages, s32 arg4, s32 arg5) {
sp10 = &D_80283744[numMessages];
message->unk_00 = 1;
message->unk_04 = load_entity_model(*sp10);
set_entity_model_flags(message->unk_04, ENTITY_MODEL_FLAGS_HIDDEN);
set_entity_model_flags(message->unk_04, ENTITY_MODEL_FLAG_HIDDEN);
bind_entity_model_setupGfx(message->unk_04, message, func_8024F768);
message->pos.x = x;
message->pos.y = y;
@ -2866,7 +2866,7 @@ void func_8024F394(void* data) {
if (message->unk_24 != 0) {
message->unk_24--;
if (message->unk_24 == 0) {
clear_entity_model_flags(modelIdx, MODEL_FLAGS_FLAG_20);
clear_entity_model_flags(modelIdx, MODEL_FLAG_FLAG_20);
}
exec_entity_model_commandlist(modelIdx);
break;
@ -3191,122 +3191,122 @@ void btl_update_message_popup(void* data) {
switch (popup->messageIndex) {
case BTL_MSG_32:
D_8029F642 = hud_element_create(&HES_StickNeutral);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAGS_FILTER_TEX | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
break;
case BTL_MSG_2F:
D_8029F642 = hud_element_create(&HES_StickNeutral);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAGS_FILTER_TEX | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
D_8029F644 = hud_element_create(&HES_TimingReady);
hud_element_set_flags(D_8029F644, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029F644, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F644, -100, -100);
break;
case BTL_MSG_33:
D_8029F642 = hud_element_create(&HES_StickNeutral);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAGS_FILTER_TEX | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
D_8029F644 = hud_element_create(&HES_AimTarget);
hud_element_set_flags(D_8029F644, HUD_ELEMENT_FLAGS_FILTER_TEX | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029F644, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F644, -100, -100);
hud_element_create_transform_B(D_8029F644);
break;
case BTL_MSG_34:
D_8029F642 = hud_element_create(&HES_CUpButton);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAGS_FILTER_TEX | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
D_8029F644 = hud_element_create(&HES_CDownButton);
hud_element_set_flags(D_8029F644, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029F644, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F644, -100, -100);
D_8029F646 = hud_element_create(&HES_CLeftButton);
hud_element_set_flags(D_8029F646, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029F646, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F646, -100, -100);
D_8029F648 = hud_element_create(&HES_CRightButton);
hud_element_set_flags(D_8029F648, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029F648, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F648, -100, -100);
break;
case BTL_MSG_35:
D_8029F642 = hud_element_create(&HES_StickNeutral);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAGS_FILTER_TEX | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
break;
case BTL_MSG_36:
D_8029F642 = hud_element_create(&HES_AButton);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAGS_FILTER_TEX | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
D_8029F644 = hud_element_create(&HES_BButton);
hud_element_set_flags(D_8029F644, HUD_ELEMENT_FLAGS_FILTER_TEX | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029F644, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F644, -100, -100);
D_8029F646 = hud_element_create(&HES_CDownButton);
hud_element_set_flags(D_8029F646, HUD_ELEMENT_FLAGS_FILTER_TEX | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029F646, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F646, -100, -100);
break;
case BTL_MSG_37:
D_8029F642 = hud_element_create(&HES_StickNeutral);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAGS_FILTER_TEX | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
break;
case BTL_MSG_38:
D_8029F642 = hud_element_create(&HES_TimingReady);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
D_8029F644 = hud_element_create(&HES_AButton);
hud_element_set_flags(D_8029F644, HUD_ELEMENT_FLAGS_FILTER_TEX | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029F644, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F644, -100, -100);
break;
case BTL_MSG_39:
D_8029F642 = hud_element_create(&HES_AButton);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAGS_FILTER_TEX | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
D_8029F644 = hud_element_create(&HES_BButton);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAGS_FILTER_TEX | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
break;
case BTL_MSG_3A:
D_8029F642 = hud_element_create(&HES_AButton);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAGS_FILTER_TEX | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
D_8029F644 = hud_element_create(&HES_BButton);
hud_element_set_flags(D_8029F644, HUD_ELEMENT_FLAGS_FILTER_TEX | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029F644, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F644, -100, -100);
break;
case BTL_MSG_3D:
D_8029F642 = hud_element_create(&HES_TimingReady);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
D_8029F644 = hud_element_create(&HES_AButtonDown);
hud_element_set_flags(D_8029F644, HUD_ELEMENT_FLAGS_FILTER_TEX | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029F644, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F644, -100, -100);
break;
case BTL_MSG_3E:
D_8029F642 = hud_element_create(&HES_StickNeutral);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAGS_FILTER_TEX | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
D_8029F644 = hud_element_create(&HES_AimTarget);
hud_element_set_flags(D_8029F644, HUD_ELEMENT_FLAGS_FILTER_TEX | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029F644, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F644, -100, -100);
hud_element_create_transform_B(D_8029F644);
D_8029F646 = hud_element_create(&HES_AimReticle);
hud_element_set_flags(D_8029F646, HUD_ELEMENT_FLAGS_FILTER_TEX | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029F646, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F646, -100, -100);
hud_element_create_transform_B(D_8029F646);
break;
case BTL_MSG_40:
case BTL_MSG_41:
D_8029F642 = hud_element_create(&HES_AButton);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAGS_FILTER_TEX | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
// fallthrough
case BTL_MSG_2E:
@ -3317,7 +3317,7 @@ void btl_update_message_popup(void* data) {
case BTL_MSG_3F:
case BTL_MSG_42:
D_8029F642 = hud_element_create(&HES_AButton);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAGS_FILTER_TEX | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
break;
}
@ -3519,37 +3519,37 @@ void btl_update_message_popup(void* data) {
switch (popup->messageIndex) {
case BTL_MSG_49:
D_8029F642 = hud_element_create(&HES_Item_Hammer1);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
break;
case BTL_MSG_4A:
D_8029F642 = hud_element_create(&HES_Item_Hammer2);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
break;
case BTL_MSG_4B:
D_8029F642 = hud_element_create(&HES_Item_Hammer3);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
break;
case BTL_MSG_4C:
D_8029F642 = hud_element_create(&HES_Item_Boots1);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
break;
case BTL_MSG_4D:
D_8029F642 = hud_element_create(&HES_Item_Boots2);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
break;
case BTL_MSG_4E:
D_8029F642 = hud_element_create(&HES_Item_Boots3);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
break;
case BTL_MSG_4F:
D_8029F642 = hud_element_create(&HES_Item_Items);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
break;
}

View File

@ -600,7 +600,7 @@ void update_actor_shadow(s32 arg0, Actor* actor) {
if (actor != NULL) {
shadow = get_shadow_by_index(actor->shadow.id);
shadow->flags |= ENTITY_FLAGS_HIDDEN;
shadow->flags |= ENTITY_FLAG_HIDDEN;
if (!(actor->flags & ACTOR_FLAG_DISABLED)) {
if (actor->flags & ACTOR_FLAG_BLUR_ENABLED) {
if (arg0 == 0) {
@ -650,7 +650,7 @@ void update_actor_shadow(s32 arg0, Actor* actor) {
if (!(actorPart->flags & ACTOR_PART_FLAG_4)) {
shadow = get_shadow_by_index(actorPart->shadowIndex);
shadow->flags &= ~ENTITY_FLAGS_HIDDEN;
shadow->flags &= ~ENTITY_FLAG_HIDDEN;
x1 = actorPart->currentPos.x;
if (!(actor->flags & ACTOR_FLAG_HP_OFFSET_BELOW)) {
y1 = actorPart->currentPos.y + 12.0;
@ -663,7 +663,7 @@ void update_actor_shadow(s32 arg0, Actor* actor) {
npc_raycast_down_sides(0, &x1, &y1, &z1, &dist);
if (200.0f < dist) {
shadow->flags |= ENTITY_FLAGS_HIDDEN;
shadow->flags |= ENTITY_FLAG_HIDDEN;
}
shadow->position.x = x1;
shadow->position.y = y1;
@ -681,7 +681,7 @@ void update_actor_shadow(s32 arg0, Actor* actor) {
shadow = get_shadow_by_index(actor->shadow.id);
if (!(actor->flags & ACTOR_FLAG_NO_SHADOW)) {
shadow->flags &= ~ENTITY_FLAGS_HIDDEN;
shadow->flags &= ~ENTITY_FLAG_HIDDEN;
}
x1 = actor->currentPos.x + actor->headOffset.x;
@ -696,7 +696,7 @@ void update_actor_shadow(s32 arg0, Actor* actor) {
npc_raycast_down_sides(0, &x1, &y1, &z1, &dist);
if (200.0f < dist) {
shadow->flags |= ENTITY_FLAGS_HIDDEN;
shadow->flags |= ENTITY_FLAG_HIDDEN;
}
shadow->position.x = x1;
shadow->position.y = y1;
@ -788,7 +788,7 @@ void appendGfx_npc_actor(s32 isPartner, s32 actorIndex) {
} else {
effect = actor->icePillarEffect;
if (effect != NULL) {
effect->flags |= EFFECT_INSTANCE_FLAGS_10;
effect->flags |= EFFECT_INSTANCE_FLAG_10;
actor->icePillarEffect = NULL;
}
}
@ -1308,7 +1308,7 @@ void update_player_actor_shadow(void) {
}
shadow = get_shadow_by_index(player->shadow.id);
shadow->flags &= ~ENTITY_FLAGS_HIDDEN;
shadow->flags &= ~ENTITY_FLAG_HIDDEN;
if (!battleStatus->outtaSightActive) {
shadow->alpha = 128;
@ -1323,7 +1323,7 @@ void update_player_actor_shadow(void) {
npc_raycast_down_sides(0, &x, &y, &z, &distance);
if (distance > 200.0f) {
shadow->flags |= ENTITY_FLAGS_HIDDEN;
shadow->flags |= ENTITY_FLAG_HIDDEN;
}
shadow->position.x = x;
shadow->position.y = y;
@ -3696,7 +3696,7 @@ void func_8025D830(ActorPart* part, s32 decorationIndex) {
}
void func_8025D8EC(ActorPart* part, s32 decorationIndex) {
part->decorationTable->effect[decorationIndex]->flags |= EFFECT_INSTANCE_FLAGS_10;
part->decorationTable->effect[decorationIndex]->flags |= EFFECT_INSTANCE_FLAG_10;
}
void func_8025D90C(ActorPart* part, s32 decorationIndex) {

View File

@ -323,16 +323,16 @@ API_CALLABLE(InitStarPointModelFlags) {
model = get_entity_model(*virtual_entity_get_by_index(script->varTable[6]));
model->flags &= ~MODEL_FLAGS_MASK_FFF0 ;
model->flags |= MODEL_FLAGS_TRANSFORM_GROUP_MEMBER;
model->flags |= MODEL_FLAG_TRANSFORM_GROUP_MEMBER;
model = get_entity_model(*virtual_entity_get_by_index(script->varTable[7]));
model->flags &= ~MODEL_FLAGS_MASK_FFF0 ;
model->flags |= MODEL_FLAGS_TRANSFORM_GROUP_MEMBER;
model->flags |= MODEL_FLAG_TRANSFORM_GROUP_MEMBER;
model = get_entity_model(*virtual_entity_get_by_index(script->varTable[8]));
model->flags &= ~MODEL_FLAGS_MASK_FFF0 ;
model->flags |= MODEL_FLAGS_TRANSFORM_GROUP_MEMBER;
model->flags |= MODEL_FLAG_TRANSFORM_GROUP_MEMBER;
model = get_entity_model(*virtual_entity_get_by_index(script->varTable[9]));
model->flags &= ~MODEL_FLAGS_MASK_FFF0 ;
model->flags |= MODEL_FLAGS_TRANSFORM_GROUP_MEMBER;
model->flags |= MODEL_FLAG_TRANSFORM_GROUP_MEMBER;
return ApiStatus_DONE2;
}
@ -340,7 +340,7 @@ API_CALLABLE(InitStarPointModelFlags) {
API_CALLABLE(InitLevelUpModelFlags) {
EntityModel* model = get_entity_model(*virtual_entity_get_by_index(script->varTable[9]));
model->flags &= ~MODEL_FLAGS_MASK_FFF0;
model->flags |= MODEL_FLAGS_TRANSFORM_GROUP_MEMBER;
model->flags |= MODEL_FLAG_TRANSFORM_GROUP_MEMBER;
return ApiStatus_DONE2;
}
@ -652,57 +652,57 @@ void btl_state_update_celebration(void) {
id = hud_element_create(&HES_level_up_heart);
LevelUpStatEmblemHEIDs[0] = id;
hud_element_set_render_pos(id, 310, 140);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
id = hud_element_create(&HES_level_up_flower);
LevelUpStatEmblemHEIDs[1] = id;
hud_element_set_render_pos(id, 158, 340);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
id = hud_element_create(&HES_level_up_leaves);
LevelUpStatEmblemHEIDs[3] = id;
hud_element_set_render_pos(id, 158, 340);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
id = hud_element_create(&HES_level_up_badge);
LevelUpStatEmblemHEIDs[2] = id;
hud_element_set_render_pos(id, 6, 140);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
id = hud_element_create(levelup_stat_scripts[0]);
LevelUpStatTextHEIDs[LVL_UP_FP][LVL_UP_TITLE] = id;
hud_element_set_render_pos(id, 160, 317);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
for (i = 1; i < ARRAY_COUNT(LevelUpStatTextHEIDs[LVL_UP_FP]); i++) {
id = hud_element_create(level_up_digit_scripts[LVL_UP_FP][0]);
LevelUpStatTextHEIDs[LVL_UP_FP][i] = id;
hud_element_set_render_pos(id, 160, 317);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
}
id = hud_element_create(levelup_stat_scripts[1]);
LevelUpStatTextHEIDs[LVL_UP_HP][LVL_UP_TITLE] = id;
hud_element_set_render_pos(id, 312, 117);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
for (i = 1; i < ARRAY_COUNT(LevelUpStatTextHEIDs[LVL_UP_HP]); i++) {
id = hud_element_create(level_up_digit_scripts[LVL_UP_HP][0]);
LevelUpStatTextHEIDs[LVL_UP_HP][i] = id;
hud_element_set_render_pos(id, 312, 117);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
}
id = hud_element_create(levelup_stat_scripts[2]);
LevelUpStatTextHEIDs[LVL_UP_BP][LVL_UP_TITLE] = id;
hud_element_set_render_pos(id, 8, 117);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
for (i = 1; i < ARRAY_COUNT(LevelUpStatTextHEIDs[LVL_UP_BP]); i++) {
id = hud_element_create(level_up_digit_scripts[LVL_UP_BP][0]);
LevelUpStatTextHEIDs[LVL_UP_BP][i] = id;
hud_element_set_render_pos(id, 8, 117);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
}
CantLevelUpStat[MENU_HP] = FALSE;
@ -716,20 +716,20 @@ void btl_state_update_celebration(void) {
id = LevelUpStatTextHEIDs[LVL_UP_FP][LVL_UP_CUR_TENS];
hud_element_set_script(id, level_up_small_digit_scripts[LVL_UP_FP][tensDigit]);
if (tensDigit != 0) {
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
}
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x - 14, y + 46);
id = LevelUpStatTextHEIDs[LVL_UP_FP][LVL_UP_CUR_ONES];
hud_element_set_script(id, level_up_small_digit_scripts[LVL_UP_FP][onesDigit]);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x - 8, y + 46);
id = LevelUpStatTextHEIDs[LVL_UP_FP][LVL_UP_ARROW];
hud_element_set_script(id, &HES_level_up_small_green_arrow);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x - 3, y + 46);
@ -739,14 +739,14 @@ void btl_state_update_celebration(void) {
id = LevelUpStatTextHEIDs[LVL_UP_FP][LVL_UP_NEXT_TENS];
hud_element_set_script(id, level_up_digit_scripts[LVL_UP_FP][tensDigit]);
if (tensDigit != 0) {
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
}
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x + 3, y + 46);
id = LevelUpStatTextHEIDs[LVL_UP_FP][LVL_UP_NEXT_ONES];
hud_element_set_script(id, level_up_digit_scripts[LVL_UP_FP][onesDigit]);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x + 10, y + 46);
} else {
@ -756,7 +756,7 @@ void btl_state_update_celebration(void) {
onesDigit = playerData->curMaxFP % 10;
hud_element_set_script(id, level_up_digit_scripts[LVL_UP_FP][tensDigit]);
if (tensDigit != 0) {
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
}
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x - 6, y + 46);
@ -773,7 +773,7 @@ void btl_state_update_celebration(void) {
id = LevelUpStatTextHEIDs[LVL_UP_FP][LVL_UP_BONUS];
itemHudElemID = gItemTable[ITEM_FP_PLUS_A].hudElemID;
hud_element_set_script(id, gItemHudScripts[itemHudElemID].enabled);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
hud_element_set_scale(id, 0.5f);
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x + 17, y + 46);
@ -787,20 +787,20 @@ void btl_state_update_celebration(void) {
id = LevelUpStatTextHEIDs[LVL_UP_HP][LVL_UP_CUR_TENS];
hud_element_set_script(id, level_up_small_digit_scripts[LVL_UP_HP][tensDigit]);
if (tensDigit != 0) {
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
}
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x - 14, y + 46);
id = LevelUpStatTextHEIDs[LVL_UP_HP][LVL_UP_CUR_ONES];
hud_element_set_script(id, level_up_small_digit_scripts[LVL_UP_HP][onesDigit]);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x - 8, y + 46);
id = LevelUpStatTextHEIDs[LVL_UP_HP][LVL_UP_ARROW];
hud_element_set_script(id, &HES_level_up_small_red_arrow);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x - 3, y + 46);
@ -810,14 +810,14 @@ void btl_state_update_celebration(void) {
id = LevelUpStatTextHEIDs[LVL_UP_HP][LVL_UP_NEXT_TENS];
hud_element_set_script(id, level_up_digit_scripts[LVL_UP_HP][tensDigit]);
if (tensDigit != 0) {
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
}
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x + 3, y + 46);
id = LevelUpStatTextHEIDs[LVL_UP_HP][LVL_UP_NEXT_ONES];
hud_element_set_script(id, level_up_digit_scripts[LVL_UP_HP][onesDigit]);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x + 10, y + 46);
} else {
@ -827,14 +827,14 @@ void btl_state_update_celebration(void) {
id = LevelUpStatTextHEIDs[LVL_UP_HP][LVL_UP_NEXT_TENS];
hud_element_set_script(id, level_up_digit_scripts[LVL_UP_HP][tensDigit]);
if (tensDigit != 0) {
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
}
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x - 6, y + 46);
id = LevelUpStatTextHEIDs[LVL_UP_HP][LVL_UP_NEXT_ONES];
hud_element_set_script(id, level_up_digit_scripts[LVL_UP_HP][onesDigit]);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x + 2, y + 46);
CantLevelUpStat[MENU_HP] = TRUE;
@ -844,7 +844,7 @@ void btl_state_update_celebration(void) {
id = LevelUpStatTextHEIDs[LVL_UP_HP][LVL_UP_BONUS];
itemHudElemID = gItemTable[ITEM_HP_PLUS_A].hudElemID;
hud_element_set_script(id, gItemHudScripts[itemHudElemID].enabled);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
hud_element_set_scale(id, 0.5f);
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x + 17, y + 46);
@ -857,20 +857,20 @@ void btl_state_update_celebration(void) {
id = LevelUpStatTextHEIDs[LVL_UP_BP][LVL_UP_CUR_TENS];
hud_element_set_script(id, level_up_small_digit_scripts[LVL_UP_BP][tensDigit]);
if (tensDigit != 0) {
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
}
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x - 14, y + 46);
id = LevelUpStatTextHEIDs[LVL_UP_BP][LVL_UP_CUR_ONES];
hud_element_set_script(id, level_up_small_digit_scripts[LVL_UP_BP][onesDigit]);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x - 8, y + 46);
id = LevelUpStatTextHEIDs[LVL_UP_BP][LVL_UP_ARROW];
hud_element_set_script(id, &HES_level_up_small_blue_arrow);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x - 3, y + 46);
@ -880,26 +880,26 @@ void btl_state_update_celebration(void) {
id = LevelUpStatTextHEIDs[LVL_UP_BP][LVL_UP_NEXT_TENS];
hud_element_set_script(id, level_up_digit_scripts[LVL_UP_BP][tensDigit]);
if (tensDigit != 0) {
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
}
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x + 3, y + 46);
id = LevelUpStatTextHEIDs[LVL_UP_BP][LVL_UP_NEXT_ONES];
hud_element_set_script(id, level_up_digit_scripts[LVL_UP_BP][onesDigit]);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x + 10, y + 46);
} else {
id = LevelUpStatTextHEIDs[LVL_UP_BP][LVL_UP_NEXT_TENS];
hud_element_set_script(id, level_up_digit_scripts[LVL_UP_BP][3]);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x - 6, y + 46);
id = LevelUpStatTextHEIDs[LVL_UP_BP][LVL_UP_NEXT_ONES];
hud_element_set_script(id, level_up_digit_scripts[LVL_UP_BP][0]);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x + 2, y + 46);
CantLevelUpStat[MENU_BP] = TRUE;
@ -913,11 +913,11 @@ void btl_state_update_celebration(void) {
hud_element_set_transform_rotation(id, 0.0f, 0.0f, 180.0f);
hud_element_set_transform_scale(id, 1.0f, 1.5f, 1.0f);
hud_element_set_alpha(id, 200);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_FILTER_TEX | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
id = LevelUpSelectTextHEID = hud_element_create(&HES_level_up_select_one_to_upgrade);
hud_element_set_render_pos(id, 0, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
battleStatus->currentSubmenu = 1;
CelebrateSubstateTime = 10;
@ -1068,27 +1068,27 @@ void btl_state_update_celebration(void) {
if ((gGameStatusPtr->frameCounter % 2) != 0) {
switch (battleStatus->currentSubmenu) {
case 0:
hud_element_set_flags(LevelUpStatEmblemHEIDs[0], HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(LevelUpStatEmblemHEIDs[0], HUD_ELEMENT_FLAG_DISABLED);
break;
case 1:
hud_element_set_flags(LevelUpStatEmblemHEIDs[1], HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(LevelUpStatEmblemHEIDs[3], HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(LevelUpStatEmblemHEIDs[1], HUD_ELEMENT_FLAG_DISABLED);
hud_element_set_flags(LevelUpStatEmblemHEIDs[3], HUD_ELEMENT_FLAG_DISABLED);
break;
case 2:
hud_element_set_flags(LevelUpStatEmblemHEIDs[2], HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(LevelUpStatEmblemHEIDs[2], HUD_ELEMENT_FLAG_DISABLED);
break;
}
} else {
switch (battleStatus->currentSubmenu) {
case 0:
hud_element_clear_flags(LevelUpStatEmblemHEIDs[0], HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(LevelUpStatEmblemHEIDs[0], HUD_ELEMENT_FLAG_DISABLED);
break;
case 1:
hud_element_clear_flags(LevelUpStatEmblemHEIDs[1], HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(LevelUpStatEmblemHEIDs[3], HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(LevelUpStatEmblemHEIDs[1], HUD_ELEMENT_FLAG_DISABLED);
hud_element_clear_flags(LevelUpStatEmblemHEIDs[3], HUD_ELEMENT_FLAG_DISABLED);
break;
case 2:
hud_element_clear_flags(LevelUpStatEmblemHEIDs[2], HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(LevelUpStatEmblemHEIDs[2], HUD_ELEMENT_FLAG_DISABLED);
break;
}
}

View File

@ -1705,7 +1705,7 @@ s32 inflict_status(Actor* target, s32 statusTypeKey, s32 duration) {
if (target->actorID != ACTOR_PARTNER) {
effect = target->icePillarEffect;
if (effect != NULL) {
effect->flags |= EFFECT_INSTANCE_FLAGS_10;
effect->flags |= EFFECT_INSTANCE_FLAG_10;
}
target->icePillarEffect = fx_ice_pillar(0, target->currentPos.x, target->currentPos.y,
target->currentPos.z, 1.0f, 0);
@ -2633,7 +2633,7 @@ void hide_foreground_models_unchecked(void) {
s32 id = *idList++;
if (id >= 0) {
Model* model = get_model_from_list_index(get_model_list_index_from_tree_index(id));
model->flags |= MODEL_FLAGS_ENABLED;
model->flags |= MODEL_FLAG_ENABLED;
}
}
}
@ -2648,7 +2648,7 @@ void show_foreground_models_unchecked(void) {
s32 id = *idList++;
if (id >= 0) {
Model* model = get_model_from_list_index(get_model_list_index_from_tree_index(id));
model->flags &= ~MODEL_FLAGS_ENABLED;
model->flags &= ~MODEL_FLAG_ENABLED;
}
}
}
@ -2665,7 +2665,7 @@ void hide_foreground_models(void) {
break;
} else {
Model* model = get_model_from_list_index(get_model_list_index_from_tree_index(id));
model->flags |= MODEL_FLAGS_ENABLED;
model->flags |= MODEL_FLAG_ENABLED;
}
}
@ -2683,7 +2683,7 @@ void show_foreground_models(void) {
break;
} else {
Model* model = get_model_from_list_index(get_model_list_index_from_tree_index(id));
model->flags &= ~MODEL_FLAGS_ENABLED;
model->flags &= ~MODEL_FLAG_ENABLED;
}
}
}

View File

@ -147,7 +147,7 @@ void spawn_drops(Enemy* enemy) {
s32 temp = var_s1 + 1;
var_s1 = temp + rand_int(2);
}
if (enemy->flags & ENEMY_FLAGS_800000) {
if (enemy->flags & ENEMY_FLAG_800000) {
var_s1 = 0;
}
if (var_s1 != 0) {
@ -204,7 +204,7 @@ void spawn_drops(Enemy* enemy) {
s32 temp = var_s1 + 1;
var_s1 = temp + rand_int(2);
}
if (enemy->flags & ENEMY_FLAGS_800000) {
if (enemy->flags & ENEMY_FLAG_800000) {
var_s1 = 0;
}
if (var_s1 != 0) {
@ -274,7 +274,7 @@ void spawn_drops(Enemy* enemy) {
if (var_s1 > 20) {
var_s1 = 20;
}
if (enemy->flags & ENEMY_FLAGS_800000) {
if (enemy->flags & ENEMY_FLAG_800000) {
var_s1 = 0;
}
if (var_s1 * 2 > sp28) {
@ -334,7 +334,7 @@ s32 get_coin_drop_amount(Enemy* enemy) {
amt += currentEncounter->coinsEarned;
if (enemy->flags & (ENEMY_FLAGS_800000 | ENEMY_FLAGS_40000)) {
if (enemy->flags & (ENEMY_FLAG_800000 | ENEMY_FLAG_40000)) {
amt = 0;
}
@ -389,7 +389,7 @@ s32 func_80048F0C(void) {
for (j = 0; j < encounter->count; j++) {
Enemy* enemy = encounter->enemy[j];
if (enemy != NULL && !(enemy->flags & ENEMY_FLAGS_20)) {
if (enemy != NULL && !(enemy->flags & ENEMY_FLAG_20)) {
get_npc_unsafe(enemy->npcID);
}
}
@ -424,7 +424,7 @@ s32 basic_ai_check_player_dist(EnemyDetectVolume* territory, Enemy* enemy, f32 r
f32 dist;
s32 skipCheckForPlayer;
if (enemy->aiFlags & ENEMY_AI_FLAGS_2) {
if (enemy->aiFlags & ENEMY_AI_FLAG_2) {
return FALSE;
}
@ -570,8 +570,8 @@ void basic_ai_wander_init(Evt* script, MobileAISettings* npcAISettings, EnemyDet
npc->moveSpeed = enemy->territory->wander.moveSpeedOverride / 32767.0;
}
enemy->aiFlags &= ~ENEMY_AI_FLAGS_40;
enemy->aiFlags &= ~ENEMY_AI_FLAGS_20;
enemy->aiFlags &= ~ENEMY_AI_FLAG_40;
enemy->aiFlags &= ~ENEMY_AI_FLAG_20;
script->AI_TEMP_STATE = AI_STATE_WANDER;
}
@ -595,8 +595,8 @@ void basic_ai_wander(Evt* script, MobileAISettings* aiSettings, EnemyDetectVolum
npc->yaw = yaw;
ai_enemy_play_sound(npc, SOUND_2F4, 0x200000);
fx_emote(EMOTE_EXCLAMATION, npc, 0, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 15, &sp34);
enemy->aiFlags &= ~ENEMY_AI_FLAGS_40;
enemy->aiFlags &= ~ENEMY_AI_FLAGS_20;
enemy->aiFlags &= ~ENEMY_AI_FLAG_40;
enemy->aiFlags &= ~ENEMY_AI_FLAG_20;
if (enemy->npcSettings->actionFlags & AI_ACTION_JUMP_WHEN_SEE_PLAYER) {
script->AI_TEMP_STATE = AI_STATE_ALERT_INIT;
@ -619,13 +619,13 @@ void basic_ai_wander(Evt* script, MobileAISettings* aiSettings, EnemyDetectVolum
enemy->territory->wander.wanderSize.x,
enemy->territory->wander.wanderSize.z)
&& npc->moveSpeed < dist2D(enemy->territory->wander.centerPos.x, enemy->territory->wander.centerPos.z, npc->pos.x, npc->pos.z)) {
if (!(enemy->aiFlags & ENEMY_AI_FLAGS_20)) {
enemy->aiFlags |= (ENEMY_AI_FLAGS_20 | ENEMY_AI_FLAGS_40);
if (!(enemy->aiFlags & ENEMY_AI_FLAG_20)) {
enemy->aiFlags |= (ENEMY_AI_FLAG_20 | ENEMY_AI_FLAG_40);
}
if (enemy->aiFlags & ENEMY_AI_FLAGS_40) {
if (enemy->aiFlags & ENEMY_AI_FLAG_40) {
npc->yaw = clamp_angle(atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.centerPos.x, enemy->territory->wander.centerPos.z));
enemy->aiFlags &= ~ENEMY_AI_FLAGS_40;
enemy->aiFlags &= ~ENEMY_AI_FLAG_40;
}
x = npc->pos.x;
@ -633,14 +633,14 @@ void basic_ai_wander(Evt* script, MobileAISettings* aiSettings, EnemyDetectVolum
z = npc->pos.z;
if (npc_test_move_simple_with_slipping(npc->collisionChannel, &x, &y, &z, 2.0 * npc->moveSpeed, npc->yaw, npc->collisionHeight, npc->collisionRadius)) {
yaw = clamp_angle(atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.centerPos.x, enemy->territory->wander.centerPos.z));
enemy->aiFlags &= ~ENEMY_AI_FLAGS_40;
enemy->aiFlags &= ~ENEMY_AI_FLAG_40;
ai_check_fwd_collisions(npc, 5.0f, &yaw, NULL, NULL, NULL);
npc->yaw = yaw;
}
stillWithinTerritory = TRUE;
} else if (enemy->aiFlags & ENEMY_AI_FLAGS_20) {
enemy->aiFlags &= ~ENEMY_AI_FLAGS_20;
enemy->aiFlags &= ~ENEMY_AI_FLAGS_40;
} else if (enemy->aiFlags & ENEMY_AI_FLAG_20) {
enemy->aiFlags &= ~ENEMY_AI_FLAG_20;
enemy->aiFlags &= ~ENEMY_AI_FLAG_40;
}
// perform the motion
@ -858,7 +858,7 @@ ApiStatus BasicAI_Main(Evt* script, s32 isInitialCall) {
territory.halfHeight = 65.0f;
territory.detectFlags = 0;
if (isInitialCall || enemy->aiFlags & ENEMY_AI_FLAGS_4) {
if (isInitialCall || enemy->aiFlags & ENEMY_AI_FLAG_4) {
script->AI_TEMP_STATE = AI_STATE_WANDER_INIT;
npc->duration = 0;
@ -873,15 +873,15 @@ ApiStatus BasicAI_Main(Evt* script, s32 isInitialCall) {
npc->flags |= NPC_FLAG_ENABLE_HIT_SCRIPT;
}
if (enemy->aiFlags & ENEMY_AI_FLAGS_4) {
if (enemy->aiFlags & ENEMY_AI_FLAG_4) {
script->AI_TEMP_STATE = AI_STATE_SUSPEND;
script->functionTemp[1] = AI_STATE_WANDER_INIT;
} else if (enemy->flags & ENEMY_FLAGS_40000000) {
} else if (enemy->flags & ENEMY_FLAG_40000000) {
script->AI_TEMP_STATE = AI_STATE_CHASE_INIT;
}
enemy->aiFlags &= ~ENEMY_AI_FLAGS_4;
enemy->flags &= ~ENEMY_FLAGS_40000000;
enemy->aiFlags &= ~ENEMY_AI_FLAG_4;
enemy->flags &= ~ENEMY_FLAG_40000000;
}
switch (script->AI_TEMP_STATE) {

View File

@ -13,7 +13,7 @@ void get_npc_pos(s32 npcID, f32* outX, f32* outY, f32* outZ, s32* outAirborne) {
*outX = playerStatus->position.x;
*outY = playerStatus->position.y;
*outZ = playerStatus->position.z;
if (playerStatus->flags & (PS_FLAGS_FALLING | PS_FLAGS_JUMPING)) {
if (playerStatus->flags & (PS_FLAG_FALLING | PS_FLAG_JUMPING)) {
*outAirborne = TRUE;
}
} else {

View File

@ -527,25 +527,25 @@ s32 func_802A11B0(void) {
for (i = 0; i < main_menu_numOptions; i++) {
D_802AD010[i] = id = hud_element_create(main_battle_menu_JumpHudScripts[i]);
hud_element_set_render_depth(id, 5);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_FILTER_TEX);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_FILTER_TEX);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_DISABLED);
hud_element_set_scale(id, 0.75f);
D_802AD028[i] = id = hud_element_create(&HES_ProjectorSpot);
hud_element_create_transform_B(id);
hud_element_set_render_depth(id, 10);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_FILTER_TEX);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_FILTER_TEX);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_DISABLED);
}
D_802AD040 = id = hud_element_create(&HES_ProjectorSpot);
hud_element_create_transform_B(id);
hud_element_set_render_depth(id, 7);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_FILTER_TEX);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_FILTER_TEX);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_DISABLED);
D_802AD044 = id = hud_element_create(&HES_ProjectorReel);
hud_element_create_transform_B(id);
@ -553,8 +553,8 @@ s32 func_802A11B0(void) {
hud_element_set_render_pos(id, 40, 212);
hud_element_set_tint(id, 0, 91, 127);
hud_element_set_transform_rotation_pivot(id, 0x10, -0x10);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_FILTER_TEX);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_FILTER_TEX);
hud_element_set_alpha(id, 240);
D_802AD048 = id = hud_element_create(&HES_ProjectorReel);
@ -563,8 +563,8 @@ s32 func_802A11B0(void) {
hud_element_set_render_pos(id, 39, 212);
hud_element_set_tint(id, 0, 91, 127);
hud_element_set_transform_rotation_pivot(id, 16, -16);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_FILTER_TEX);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_FILTER_TEX);
hud_element_set_alpha(id, 240);
D_802AD04C = id = hud_element_create(&HES_ProjectorBeam);
@ -575,34 +575,34 @@ s32 func_802A11B0(void) {
hud_element_set_transform_rotation_pivot(id, 0, 0);
hud_element_set_transform_rotation(id, 0.0f, 0.0f, -45.0f);
hud_element_set_alpha(id, 200);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_FILTER_TEX);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_FILTER_TEX);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_DISABLED);
D_802AD05C = id = hud_element_create(&HES_SwapBackground);
hud_element_set_render_depth(id, 0);
hud_element_set_render_pos(id, 97, 208);
hud_element_set_tint(id, 255, 255, 255);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_FILTER_TEX);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_FILTER_TEX);
hud_element_set_alpha(id, 230);
D_802AD050 = id = hud_element_create(&HES_SwapZ);
hud_element_set_render_depth(id, 5);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_FILTER_TEX);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_FILTER_TEX);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(id, 94, 209);
D_802AD054 = id = hud_element_create(&HES_SwapArrowLeft);
hud_element_set_render_depth(id, 5);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_FILTER_TEX);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_FILTER_TEX);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(id, 81, 210);
D_802AD058 = id = hud_element_create(&HES_SwapArrowRight);
hud_element_set_render_depth(id, 5);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_FILTER_TEX);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_FILTER_TEX);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(id, 102, 210);
D_802AD00A = 100;
D_802AD001 = 3;
@ -616,7 +616,7 @@ s32 func_802A11B0(void) {
case 1:
if (D_802AD001 == 1) {
id = D_802AD04C;
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
}
default:
D_802AD001--;
@ -634,12 +634,12 @@ s32 func_802A11B0(void) {
t = D_802AD064 + y;
id = D_802AD010[i];
hud_element_set_render_pos(id, l, t);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
id = D_802AD028[i];
hud_element_set_render_pos(id, l, t);
hud_element_set_alpha(id, 100);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
}
x = 0.0f;
@ -653,7 +653,7 @@ s32 func_802A11B0(void) {
hud_element_set_render_pos(id, l, t);
hud_element_set_alpha(id, 180);
hud_element_set_scale(id, 0.85f);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
D_802AD000 = 2;
break;
}
@ -810,9 +810,9 @@ void btl_draw_menu_wheel(void) {
hud_element_set_alpha(id, (opacity * 180) / 255);
hud_element_set_scale(id, 1.2f);
if (!cond) {
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_DISABLED);
} else {
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
}
func_80144238(id);
}
@ -1107,33 +1107,33 @@ s32 func_802A2C84(void) {
id = hud_element_create(battle_menu_moveOptionIconScripts[battle_menu_moveOptionIndexMap[i]]);
battle_menu_moveOptionIconIDs[i] = id;
hud_element_set_scale(id, 0.45f);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_FILTER_TEX | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
}
id = hud_element_create(&HES_AnimatedHandPointer);
battle_menu_moveCursorIcon = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_DROP_SHADOW | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_DROP_SHADOW | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(id, battle_menu_moveX, battle_menu_moveY);
id = hud_element_create(&HES_GreenArrowUp);
battle_menu_moveUpArrowIcon = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_DROP_SHADOW | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_DROP_SHADOW | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(id, battle_menu_moveX + 39, battle_menu_moveY - 7);
id = hud_element_create(&HES_GreenArrowDown);
battle_menu_moveDownArrowIcon = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_DROP_SHADOW | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_DROP_SHADOW | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(id, battle_menu_moveX + 39, battle_menu_moveY + 78);
if (battle_menu_hasSpiritsMenu == 0) {
id = hud_element_create(&HES_StatusFlower);
battle_menu_moveTitleIcon = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
} else {
id = hud_element_create(&HES_MenuStarPower);
battle_menu_moveTitleIcon = id;
hud_element_set_scale(id, 0.75f);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
}
hud_element_set_render_pos(id, battle_menu_moveX + 56, battle_menu_moveY);
@ -1169,7 +1169,7 @@ s32 func_802A2C84(void) {
break;
}
}
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(id, battle_menu_moveX + 56, battle_menu_moveY);
}
@ -1798,19 +1798,19 @@ s32 func_802A4A54(void) {
for (i = 0; i < D_802AD66C; i++) {
D_802AD628[i] = id = hud_element_create(D_802AD640[i]);
hud_element_set_scale(id, 0.45f);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_FILTER_TEX | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
}
D_802AD618 = id = hud_element_create(&HES_AnimatedHandPointer);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_DROP_SHADOW | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_DROP_SHADOW | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(id, D_802AD63C, D_802AD63E);
D_802AD61C = id = hud_element_create(&HES_GreenArrowUp);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_DROP_SHADOW | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_DROP_SHADOW | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(id, D_802AD63C + 39, D_802AD63E - 7);
D_802AD620 = id = hud_element_create(&HES_GreenArrowDown);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_DROP_SHADOW | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_DROP_SHADOW | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(id, D_802AD63C + 39, D_802AD63E + 78);
D_802AD614 = MSG_PAL_STANDARD;

View File

@ -192,7 +192,7 @@ s32 player_raycast_down(f32* x, f32* y, f32* z, f32* length) {
entity = get_entity_by_index(entityID);
if (entity->alpha < 255) {
entity->collisionTimer = 4;
entity->flags |= ENTITY_FLAGS_CONTINUOUS_COLLISION;
entity->flags |= ENTITY_FLAG_CONTINUOUS_COLLISION;
} else {
ret = entityID | COLLISION_WITH_ENTITY_BIT;
}
@ -367,7 +367,7 @@ s32 player_test_lateral_overlap(s32 mode, PlayerStatus* playerStatus, f32* x, f3
radius = playerStatus->colliderDiameter * 0.5f;
ret = -1;
if (!(playerStatus->flags & (PS_FLAGS_FALLING | PS_FLAGS_JUMPING))) {
if (!(playerStatus->flags & (PS_FLAG_FALLING | PS_FLAG_JUMPING))) {
height = playerStatus->colliderHeight * 0.286f;
} else {
height = 1.0f;
@ -422,12 +422,12 @@ s32 player_raycast_general(s32 mode, f32 startX, f32 startY, f32 startZ, f32 dir
entity = get_entity_by_index(entityID);
if (entity->alpha < 255) {
entity->collisionTimer = 0;
entity->flags |= ENTITY_FLAGS_CONTINUOUS_COLLISION;
entity->flags |= ENTITY_FLAG_CONTINUOUS_COLLISION;
} else {
ret = entityID | COLLISION_WITH_ENTITY_BIT;
}
} else if (mode == 3) {
ret = test_ray_colliders(COLLIDER_FLAGS_IGNORE_SHELL, startX, startY, startZ, dirX, dirY, dirZ,
ret = test_ray_colliders(COLLIDER_FLAG_IGNORE_SHELL, startX, startY, startZ, dirX, dirY, dirZ,
hitX, hitY, hitZ, hitDepth, hitNx, hitNy, hitNz);
}
@ -438,7 +438,7 @@ s32 player_raycast_general(s32 mode, f32 startX, f32 startY, f32 startZ, f32 dir
if (mode == 4) {
ignoreFlags = COLLISION_CHANNEL_80000;
} else {
ignoreFlags = COLLIDER_FLAGS_IGNORE_PLAYER;
ignoreFlags = COLLIDER_FLAG_IGNORE_PLAYER;
}
colliderID = test_ray_colliders(ignoreFlags, startX, startY, startZ, dirX, dirY, dirZ,
@ -548,7 +548,7 @@ s32 player_test_move_with_slipping(PlayerStatus* playerStatus, f32* x, f32* y, f
s32 ret = -1;
height = 0.0f;
if (!(playerStatus->flags & (PS_FLAGS_JUMPING | PS_FLAGS_FALLING))) {
if (!(playerStatus->flags & (PS_FLAG_JUMPING | PS_FLAG_FALLING))) {
height = 10.01f;
}
radius = playerStatus->colliderDiameter * 0.5f;
@ -596,16 +596,16 @@ void update_player(void) {
update_partner_timers();
if ((playerStatus->timeInAir > 100) || (playerStatus->position.y < -2000.0f)) {
if (!(playerStatus->animFlags & PA_FLAGS_NO_OOB_RESPAWN)) {
if (!(playerStatus->animFlags & PA_FLAG_NO_OOB_RESPAWN)) {
playerStatus->timeInAir = 0;
playerStatus->position.x = playerStatus->lastGoodPosition.x;
playerStatus->position.y = playerStatus->lastGoodPosition.y;
playerStatus->position.z = playerStatus->lastGoodPosition.z;
if (playerStatus->animFlags & PA_FLAGS_RIDING_PARTNER) {
if (playerStatus->animFlags & PA_FLAG_RIDING_PARTNER) {
Npc* partner;
playerStatus->animFlags |= PA_FLAGS_DISMOUNTING_ALLOWED | PA_FLAGS_INTERRUPT_USE_PARTNER;
playerStatus->animFlags |= PA_FLAG_DISMOUNTING_ALLOWED | PA_FLAG_INTERRUPT_USE_PARTNER;
partner = get_npc_unsafe(NPC_PARTNER);
partner->pos.x = playerStatus->lastGoodPosition.x;
partner->pos.y = playerStatus->lastGoodPosition.y + playerStatus->colliderHeight;
@ -623,10 +623,10 @@ void update_player(void) {
collisionStatus->floorBelow = 1;
update_player_input();
playerStatus->flags &= ~PS_FLAGS_SPECIAL_LAND;
playerStatus->flags &= ~PS_FLAG_SPECIAL_LAND;
update_player_blink();
if (playerStatus->flags & PS_FLAGS_NO_STATIC_COLLISION) {
if (playerStatus->flags & PS_FLAG_NO_STATIC_COLLISION) {
phys_update_action_state();
if (!game_scripts_disabled()) {
collision_main_lateral();
@ -637,15 +637,15 @@ void update_player(void) {
phys_update_lava_reset();
}
if (playerStatus->flags & PS_FLAGS_CUTSCENE_MOVEMENT) {
if (playerStatus->flags & PS_FLAG_CUTSCENE_MOVEMENT) {
playerStatus->moveFrames--;
if (playerStatus->moveFrames <= 0) {
playerStatus->moveFrames = 0;
playerStatus->flags &= ~PS_FLAGS_CUTSCENE_MOVEMENT;
playerStatus->flags &= ~PS_FLAG_CUTSCENE_MOVEMENT;
}
}
if (!(playerStatus->animFlags & PA_FLAGS_USING_PEACH_PHYSICS)) {
if (!(playerStatus->animFlags & PA_FLAG_USING_PEACH_PHYSICS)) {
handle_floor_behavior();
}
@ -658,7 +658,7 @@ void update_player(void) {
gameStatus->playerYaw = playerStatus->currentYaw;
check_input_open_menus();
if (!(playerStatus->animFlags & PA_FLAGS_USING_PEACH_PHYSICS)) {
if (!(playerStatus->animFlags & PA_FLAG_USING_PEACH_PHYSICS)) {
check_input_status_menu();
}
@ -671,8 +671,8 @@ void update_player(void) {
playerStatus->pushVelocity.x = 0.0f;
playerStatus->pushVelocity.y = 0.0f;
playerStatus->pushVelocity.z = 0.0f;
playerStatus->flags &= ~PS_FLAGS_SLIDING;
playerStatus->animFlags &= ~PA_FLAGS_FORCE_USE_PARTNER;
playerStatus->flags &= ~PS_FLAG_SLIDING;
playerStatus->animFlags &= ~PA_FLAG_FORCE_USE_PARTNER;
}
void check_input_use_partner(void) {
@ -680,10 +680,10 @@ void check_input_use_partner(void) {
PlayerData* playerData = &gPlayerData;
u32 actionState = playerStatus->actionState;
if (!(playerStatus->animFlags & PA_FLAGS_8BIT_MARIO)) {
if (playerStatus->animFlags & PA_FLAGS_FORCE_USE_PARTNER || playerStatus->inputEnabledCounter == 0) {
if (playerStatus->pressedButtons & BUTTON_C_DOWN && !(playerStatus->flags & PS_FLAGS_NO_PARTNER_USAGE) &&
!(playerStatus->pressedButtons & BUTTON_B) && !(playerStatus->animFlags & PA_FLAGS_USING_PEACH_PHYSICS) &&
if (!(playerStatus->animFlags & PA_FLAG_8BIT_MARIO)) {
if (playerStatus->animFlags & PA_FLAG_FORCE_USE_PARTNER || playerStatus->inputEnabledCounter == 0) {
if (playerStatus->pressedButtons & BUTTON_C_DOWN && !(playerStatus->flags & PS_FLAG_NO_PARTNER_USAGE) &&
!(playerStatus->pressedButtons & BUTTON_B) && !(playerStatus->animFlags & PA_FLAG_USING_PEACH_PHYSICS) &&
actionState <= ACTION_STATE_RUN) {
if (playerData->currentPartner == PARTNER_GOOMBARIO) {
@ -702,14 +702,14 @@ void phys_update_standard(void) {
check_input_use_partner();
phys_update_action_state();
if (!(playerStatus->flags & PS_FLAGS_FLYING)) {
if (playerStatus->flags & PS_FLAGS_JUMPING) {
if (!(playerStatus->flags & PS_FLAG_FLYING)) {
if (playerStatus->flags & PS_FLAG_JUMPING) {
phys_update_jump();
}
}
if (playerStatus->flags & PS_FLAGS_FALLING) {
if (!(playerStatus->flags & PS_FLAGS_FLYING)) {
if (playerStatus->flags & PS_FLAG_FALLING) {
if (!(playerStatus->flags & PS_FLAG_FLYING)) {
phys_update_falling();
}
}
@ -721,7 +721,7 @@ void phys_update_standard(void) {
collision_check_player_overlaps();
if (collision_main_above() < 0 && playerStatus->timeInAir == 0 &&
playerStatus->animFlags & PA_FLAGS_USING_PEACH_PHYSICS) {
playerStatus->animFlags & PA_FLAG_USING_PEACH_PHYSICS) {
collision_lateral_peach();
}
@ -731,11 +731,11 @@ void phys_update_standard(void) {
}
}
if (playerStatus->animFlags & PA_FLAGS_WATT_IN_HANDS) {
if (playerStatus->animFlags & PA_FLAG_WATT_IN_HANDS) {
world_watt_sync_held_position();
}
if (!(playerStatus->flags & PS_FLAGS_CAMERA_DOESNT_FOLLOW)) {
if (!(playerStatus->flags & PS_FLAG_CAMERA_DOESNT_FOLLOW)) {
gCameras[CAM_DEFAULT].targetPos.x = playerStatus->position.x;
gCameras[CAM_DEFAULT].targetPos.y = playerStatus->position.y;
gCameras[CAM_DEFAULT].targetPos.z = playerStatus->position.z;
@ -747,7 +747,7 @@ void phys_update_lava_reset(void) {
collision_main_lateral();
collision_lava_reset_check_additional_overlaps();
if (!(gPlayerStatusPtr->flags & PS_FLAGS_CAMERA_DOESNT_FOLLOW)) {
if (!(gPlayerStatusPtr->flags & PS_FLAG_CAMERA_DOESNT_FOLLOW)) {
Camera* camera = &gCameras[CAM_DEFAULT];
camera->targetPos.x = gPlayerStatusPtr->position.x;
@ -764,7 +764,7 @@ void player_reset_data(void) {
PlayerStatus* playerStatus = &gPlayerStatus;
mem_clear(playerStatus, sizeof(PlayerStatus));
playerStatus->flags = PS_FLAGS_HAS_REFLECTION;
playerStatus->flags = PS_FLAG_HAS_REFLECTION;
reset_player_status();
playerStatus->shadowID = create_shadow_type(0, playerStatus->position.x, playerStatus->position.y,
playerStatus->position.z);
@ -813,17 +813,17 @@ s32 get_overriding_player_anim(s32 anim) {
}
if (anim == ANIM_Mario_6000C || anim == ANIM_Peach_C0010 || anim == ANIM_Mario_10002) {
if (!(playerStatus->animFlags & PA_FLAGS_USING_PEACH_PHYSICS)) {
if (!(playerStatus->animFlags & PA_FLAG_USING_PEACH_PHYSICS)) {
if (!func_800DFCF4()) {
return -1;
}
} else if (!(playerStatus->animFlags & PA_FLAGS_INVISIBLE)) {
} else if (!(playerStatus->animFlags & PA_FLAG_INVISIBLE)) {
anim = ANIM_Peach_C0010;
} else {
peach_set_disguise_anim(BasicPeachDisguiseAnims[playerStatus->peachDisguise].hold);
return -1;
}
} else if (playerStatus->animFlags & PA_FLAGS_USING_PEACH_PHYSICS) {
} else if (playerStatus->animFlags & PA_FLAG_USING_PEACH_PHYSICS) {
if ((playerStatus->peachItemHeld != 0)
&& (anim == ANIM_Peach_C0000 || anim == ANIM_Peach_C0001 || anim == ANIM_Peach_C0002)) {
anim = ANIM_Peach_D0000;
@ -844,7 +844,7 @@ void suggest_player_anim_clearUnkFlag(AnimID anim) {
if (newAnim != -1) {
playerStatus->anim = newAnim;
playerStatus->animNotifyValue = 0;
playerStatus->flags &= ~PS_FLAGS_FACE_FORWARDS;
playerStatus->flags &= ~PS_FLAG_FACE_FORWARDS;
}
}
@ -853,7 +853,7 @@ void force_player_anim(AnimID anim) {
playerStatus->anim = anim;
playerStatus->animNotifyValue = 0;
playerStatus->flags &= ~PS_FLAGS_FACE_FORWARDS;
playerStatus->flags &= ~PS_FLAG_FACE_FORWARDS;
}
void suggest_player_anim_setUnkFlag(AnimID anim) {
@ -863,7 +863,7 @@ void suggest_player_anim_setUnkFlag(AnimID anim) {
if (newAnim != -1) {
playerStatus->anim = newAnim;
playerStatus->animNotifyValue = 0;
playerStatus->flags |= PS_FLAGS_FACE_FORWARDS;
playerStatus->flags |= PS_FLAG_FACE_FORWARDS;
}
}
@ -894,13 +894,13 @@ void update_player_blink(void) {
if (!playerStatus->blinkTimer) {
if (outtaSight) {
playerStatus->alpha1 = 128;
playerStatus->flags |= PS_FLAGS_HAZARD_INVINCIBILITY;
playerStatus->flags |= PS_FLAG_HAZARD_INVINCIBILITY;
} else {
playerStatus->alpha1 = 255;
playerStatus->flags &= ~PS_FLAGS_HAZARD_INVINCIBILITY;
playerStatus->flags &= ~PS_FLAG_HAZARD_INVINCIBILITY;
}
} else {
playerStatus->flags |= PS_FLAGS_HAZARD_INVINCIBILITY;
playerStatus->flags |= PS_FLAG_HAZARD_INVINCIBILITY;
}
}
}
@ -913,17 +913,17 @@ f32 get_xz_dist_to_player(f32 x, f32 z) {
}
void enable_player_shadow(void) {
get_shadow_by_index(gPlayerStatus.shadowID)->flags &= ~ENTITY_FLAGS_HIDDEN;
get_shadow_by_index(gPlayerStatus.shadowID)->flags &= ~ENTITY_FLAG_HIDDEN;
}
void disable_player_shadow(void) {
get_shadow_by_index(gPlayerStatus.shadowID)->flags |= ENTITY_FLAGS_HIDDEN;
get_shadow_by_index(gPlayerStatus.shadowID)->flags |= ENTITY_FLAG_HIDDEN;
}
s32 disable_player_static_collisions(void) {
PlayerStatus* playerStatus = &gPlayerStatus;
playerStatus->flags |= PS_FLAGS_NO_STATIC_COLLISION;
playerStatus->flags |= PS_FLAG_NO_STATIC_COLLISION;
playerStatus->enableCollisionOverlapsCheck++;
return playerStatus->enableCollisionOverlapsCheck;
}
@ -933,7 +933,7 @@ s32 enable_player_static_collisions(void) {
playerStatus->enableCollisionOverlapsCheck--;
if (playerStatus->enableCollisionOverlapsCheck == 0) {
playerStatus->flags &= ~PS_FLAGS_NO_STATIC_COLLISION;
playerStatus->flags &= ~PS_FLAG_NO_STATIC_COLLISION;
}
return playerStatus->enableCollisionOverlapsCheck;
}
@ -941,7 +941,7 @@ s32 enable_player_static_collisions(void) {
s32 disable_player_input(void) {
PlayerStatus* playerStatus = &gPlayerStatus;
playerStatus->flags |= PS_FLAGS_INPUT_DISABLED;
playerStatus->flags |= PS_FLAG_INPUT_DISABLED;
playerStatus->inputEnabledCounter++;
return playerStatus->inputEnabledCounter;
}
@ -951,7 +951,7 @@ s32 enable_player_input(void) {
playerStatus->inputEnabledCounter--;
if (playerStatus->inputEnabledCounter == 0) {
playerStatus->flags &= ~PS_FLAGS_INPUT_DISABLED;
playerStatus->flags &= ~PS_FLAG_INPUT_DISABLED;
}
return playerStatus->inputEnabledCounter;
}
@ -959,8 +959,8 @@ s32 enable_player_input(void) {
void func_800E01DC(void) {
PlayerStatus* playerStatus = &gPlayerStatus;
if (playerStatus->animFlags & PA_FLAGS_INTERACT_PROMPT_AVAILABLE) {
playerStatus->flags |= PS_FLAGS_INTERACTED;
if (playerStatus->animFlags & PA_FLAG_INTERACT_PROMPT_AVAILABLE) {
playerStatus->flags |= PS_FLAG_INTERACTED;
}
}
@ -988,7 +988,7 @@ void check_for_ispy(void) {
if (D_8015A57A != 0 && ISpyNotificationCallback == NULL) {
if (!(playerStatus->animFlags &
(PA_FLAGS_SPEECH_PROMPT_AVAILABLE | PA_FLAGS_INTERACT_PROMPT_AVAILABLE))) {
(PA_FLAG_SPEECH_PROMPT_AVAILABLE | PA_FLAG_INTERACT_PROMPT_AVAILABLE))) {
dma_copy(E225B0_ROM_START, E225B0_ROM_END, E225B0_VRAM_DEF);
ISpyNotificationCallback = func_802B72C0_E22870;
}
@ -1000,14 +1000,14 @@ void check_for_ispy(void) {
}
void func_800E0330(void) {
if ((gPlayerStatusPtr->animFlags & PA_FLAGS_100) && (ISpyNotificationCallback != NULL)) {
if ((gPlayerStatusPtr->animFlags & PA_FLAG_100) && (ISpyNotificationCallback != NULL)) {
func_802B7000_E225B0();
}
}
void func_800E0374(void) {
ISpyNotificationCallback = NULL;
gPlayerStatusPtr->animFlags &= ~PA_FLAGS_100;
gPlayerStatusPtr->animFlags &= ~PA_FLAG_100;
}
void check_for_pulse_stone(void) {
@ -1015,7 +1015,7 @@ void check_for_pulse_stone(void) {
s32 dx, dy;
if (PulseStoneNotificationCallback == NULL) {
if (gPlayerStatus.animFlags & PA_FLAGS_100) {
if (gPlayerStatus.animFlags & PA_FLAG_100) {
return;
}
@ -1029,15 +1029,15 @@ void check_for_pulse_stone(void) {
return;
}
if (!(gPlayerStatus.animFlags & (PA_FLAGS_USING_PULSE_STONE | PA_FLAGS_40))) {
if (!(gPlayerStatus.animFlags & (PA_FLAG_USING_PULSE_STONE | PA_FLAG_40))) {
return;
}
if (gPlayerStatus.flags & PS_FLAGS_PAUSED || gPlayerStatus.inputEnabledCounter) {
if (gPlayerStatus.flags & PS_FLAG_PAUSED || gPlayerStatus.inputEnabledCounter) {
return;
}
if (!(gPlayerStatus.animFlags & (PA_FLAGS_SPEECH_PROMPT_AVAILABLE | PA_FLAGS_INTERACT_PROMPT_AVAILABLE))) {
if (!(gPlayerStatus.animFlags & (PA_FLAG_SPEECH_PROMPT_AVAILABLE | PA_FLAG_INTERACT_PROMPT_AVAILABLE))) {
dma_copy(E21870_ROM_START, E21870_ROM_END, E21870_VRAM_DEF);
PulseStoneNotificationCallback = func_802B7140;
}
@ -1049,14 +1049,14 @@ void check_for_pulse_stone(void) {
}
void func_800E04D0(void) {
if ((gPlayerStatusPtr->animFlags & PA_FLAGS_40) && (PulseStoneNotificationCallback != 0)) {
if ((gPlayerStatusPtr->animFlags & PA_FLAG_40) && (PulseStoneNotificationCallback != 0)) {
func_802B71D4();
}
}
void func_800E0514(void) {
PulseStoneNotificationCallback = NULL;
gPlayerStatusPtr->animFlags &= ~PA_FLAGS_40;
gPlayerStatusPtr->animFlags &= ~PA_FLAG_40;
}
s32 has_valid_conversation_npc(void) {
@ -1066,20 +1066,20 @@ s32 has_valid_conversation_npc(void) {
s32 cond;
if (npc != NULL && !(npc->flags & NPC_FLAG_10000000)) {
cond = (playerStatus->flags & (PS_FLAGS_HAS_CONVERSATION_NPC | PS_FLAGS_INPUT_DISABLED))
== PS_FLAGS_HAS_CONVERSATION_NPC;
cond = (playerStatus->flags & (PS_FLAG_HAS_CONVERSATION_NPC | PS_FLAG_INPUT_DISABLED))
== PS_FLAG_HAS_CONVERSATION_NPC;
ret = cond;
}
return ret;
}
void check_for_conversation_prompt(void) {
if (gPlayerStatus.animFlags & PA_FLAGS_100 || InteractNotificationCallback || PulseStoneNotificationCallback) {
if (gPlayerStatus.animFlags & PA_FLAG_100 || InteractNotificationCallback || PulseStoneNotificationCallback) {
return;
}
if (TalkNotificationCallback == NULL) {
if (gPlayerStatus.inputEnabledCounter || gPlayerStatus.flags & PS_FLAGS_PAUSED) {
if (gPlayerStatus.inputEnabledCounter || gPlayerStatus.flags & PS_FLAG_PAUSED) {
return;
}
@ -1099,14 +1099,14 @@ void check_for_conversation_prompt(void) {
}
void func_800E0658(void) {
if ((gPlayerStatusPtr->animFlags & PA_FLAGS_SPEECH_PROMPT_AVAILABLE) && (TalkNotificationCallback != 0)) {
if ((gPlayerStatusPtr->animFlags & PA_FLAG_SPEECH_PROMPT_AVAILABLE) && (TalkNotificationCallback != 0)) {
func_802B71C8();
}
}
void func_800E069C(void) {
TalkNotificationCallback = NULL;
gPlayerStatusPtr->animFlags &= ~PA_FLAGS_SPEECH_PROMPT_AVAILABLE;
gPlayerStatusPtr->animFlags &= ~PA_FLAG_SPEECH_PROMPT_AVAILABLE;
}
void func_800E06C0(s32 arg0) {
@ -1125,7 +1125,7 @@ s32 func_800E06D8(void) {
if (gCollisionStatus.currentWall == -1) {
return FALSE;
}
if (playerStatus->flags & PS_FLAGS_HAS_CONVERSATION_NPC && !(playerStatus->flags & PS_FLAGS_INPUT_DISABLED)
if (playerStatus->flags & PS_FLAG_HAS_CONVERSATION_NPC && !(playerStatus->flags & PS_FLAG_INPUT_DISABLED)
&& npc != NULL && npc->flags & NPC_FLAG_10000000) {
playerStatus->interactingWithID = -1;
return TRUE;
@ -1144,11 +1144,11 @@ s32 func_800E06D8(void) {
}
if (temp == wall) {
if (playerStatus->flags & PS_FLAGS_INTERACTED) {
if (playerStatus->flags & PS_FLAG_INTERACTED) {
return FALSE;
}
} else {
playerStatus->flags &= ~PS_FLAGS_INTERACTED;
playerStatus->flags &= ~PS_FLAG_INTERACTED;
}
playerStatus->interactingWithID = -1;
@ -1162,7 +1162,7 @@ void check_for_interactables(void) {
Npc* npc = gPlayerStatus.encounteredNPC;
s32 phi_s2;
if ((playerStatus->animFlags & PA_FLAGS_100) || TalkNotificationCallback || PulseStoneNotificationCallback) {
if ((playerStatus->animFlags & PA_FLAG_100) || TalkNotificationCallback || PulseStoneNotificationCallback) {
return;
}
@ -1197,7 +1197,7 @@ void check_for_interactables(void) {
curInteraction = -1;
break;
}
} else if (((playerStatus->flags & (PS_FLAGS_HAS_CONVERSATION_NPC | PS_FLAGS_INPUT_DISABLED)) == PS_FLAGS_HAS_CONVERSATION_NPC)
} else if (((playerStatus->flags & (PS_FLAG_HAS_CONVERSATION_NPC | PS_FLAG_INPUT_DISABLED)) == PS_FLAG_HAS_CONVERSATION_NPC)
&& (npc != NULL) && (npc->flags & NPC_FLAG_10000000)) {
curInteraction = npc->npcID | COLLISION_WITH_NPC_BIT;
if (playerStatus->interactingWithID == curInteraction) {
@ -1206,7 +1206,7 @@ void check_for_interactables(void) {
phi_s2 = 0;
} else {
playerStatus->interactingWithID = -1;
playerStatus->flags &= ~PS_FLAGS_INTERACTED;
playerStatus->flags &= ~PS_FLAG_INTERACTED;
return;
}
} else {
@ -1215,7 +1215,7 @@ void check_for_interactables(void) {
if (!(curInteraction & COLLISION_WITH_NPC_BIT)) {
if (!should_collider_allow_interact(curInteraction)) {
playerStatus->interactingWithID = -1;
playerStatus->flags &= ~PS_FLAGS_INTERACTED;
playerStatus->flags &= ~PS_FLAG_INTERACTED;
return;
}
}
@ -1223,30 +1223,30 @@ void check_for_interactables(void) {
if (!phys_can_player_interact()) {
phi_s2 = 1;
playerStatus->interactingWithID = -1;
playerStatus->flags &= ~PS_FLAGS_INTERACTED;
playerStatus->flags &= ~PS_FLAG_INTERACTED;
return;
}
phi_s2 = 1;
}
}
if (playerStatus->interactingWithID == curInteraction) {
if ((playerStatus->flags & PS_FLAGS_INTERACTED)) {
if ((playerStatus->flags & PS_FLAG_INTERACTED)) {
return;
}
} else {
playerStatus->flags &= ~PS_FLAGS_INTERACTED;
playerStatus->flags &= ~PS_FLAG_INTERACTED;
}
playerStatus->interactingWithID = curInteraction;
if ((phi_s2 == 0) || curInteraction >= 0 && get_entity_by_index(curInteraction)->flags & ENTITY_FLAGS_SHOWS_INSPECT_PROMPT) {
if ((phi_s2 == 0) || curInteraction >= 0 && get_entity_by_index(curInteraction)->flags & ENTITY_FLAG_SHOWS_INSPECT_PROMPT) {
if (playerStatus->actionState == ACTION_STATE_IDLE || playerStatus->actionState == ACTION_STATE_WALK || playerStatus->actionState == ACTION_STATE_RUN) {
playerStatus->animFlags |= PA_FLAGS_INTERACT_PROMPT_AVAILABLE;
playerStatus->animFlags |= PA_FLAG_INTERACT_PROMPT_AVAILABLE;
func_800EF3D4(2);
}
}
}
if (!(playerStatus->animFlags & PA_FLAGS_INTERACT_PROMPT_AVAILABLE)) {
if (!(playerStatus->animFlags & PA_FLAG_INTERACT_PROMPT_AVAILABLE)) {
func_800EF3D4(0);
partner_reset_tether_distance();
return;
@ -1266,14 +1266,14 @@ void check_for_interactables(void) {
void func_802B71E8_E202F8(void);
void func_800E0AD0(void) {
if ((gPlayerStatusPtr->animFlags & PA_FLAGS_INTERACT_PROMPT_AVAILABLE) && (InteractNotificationCallback != 0)) {
if ((gPlayerStatusPtr->animFlags & PA_FLAG_INTERACT_PROMPT_AVAILABLE) && (InteractNotificationCallback != 0)) {
func_802B71E8_E202F8();
}
}
void func_800E0B14(void) {
InteractNotificationCallback = NULL;
gPlayerStatusPtr->animFlags &= ~PA_FLAGS_INTERACT_PROMPT_AVAILABLE;
gPlayerStatusPtr->animFlags &= ~PA_FLAG_INTERACT_PROMPT_AVAILABLE;
}
void update_partner_timers(void) {
@ -1338,7 +1338,7 @@ void player_sprite_behaviour(void) {
}
}
if (playerStatus->flags & PS_FLAGS_NO_FLIPPING) {
if (playerStatus->flags & PS_FLAG_NO_FLIPPING) {
angle = 0.0f;
}
@ -1351,15 +1351,15 @@ void player_sprite_behaviour(void) {
}
trueAnim = playerStatus->anim;
if (playerStatus->flags & PS_FLAGS_SPINNING) {
if (playerStatus->flags & PS_FLAG_SPINNING) {
playerStatus->trueAnimation = trueAnim;
} else {
sprIndex = (trueAnim >> 0x10) & 0xFF;
if (playerStatus->actionState != ACTION_STATE_TORNADO_JUMP && !(playerStatus->flags & PS_FLAGS_ROTATION_LOCKED)) {
if (playerStatus->actionState != ACTION_STATE_TORNADO_JUMP && !(playerStatus->flags & PS_FLAG_ROTATION_LOCKED)) {
playerStatus->spriteFacingAngle = angle + D_800F7B48;
trueAnim = playerStatus->anim;
if (!(playerStatus->flags & PS_FLAGS_FACE_FORWARDS) &&
if (!(playerStatus->flags & PS_FLAG_FACE_FORWARDS) &&
(sprIndex == SPR_Mario_1 || sprIndex == SPR_Mario_6 || sprIndex == SPR_Peach_A) &&
fabsf(get_clamped_angle_diff(cameraYaw, playerStatus->currentYaw)) < 60.0f)
{
@ -1369,7 +1369,7 @@ void player_sprite_behaviour(void) {
playerStatus->currentYaw = playerStatus->targetYaw;
} else {
trueAnim = playerStatus->anim;
if (!(playerStatus->flags & PS_FLAGS_FACE_FORWARDS) &&
if (!(playerStatus->flags & PS_FLAG_FACE_FORWARDS) &&
(sprIndex == SPR_Mario_1 || sprIndex == SPR_Mario_6 || sprIndex == SPR_Peach_A) &&
playerStatus->spriteFacingAngle < 350.0f && playerStatus->spriteFacingAngle > 190.0f)
{
@ -1380,14 +1380,14 @@ void player_sprite_behaviour(void) {
}
timescale = 1.0f;
if (playerStatus->flags & PS_FLAGS_ENTERING_BATTLE) {
if (playerStatus->flags & PS_FLAG_ENTERING_BATTLE) {
timescale = 0.5f;
}
if (playerStatus->flags & PS_FLAGS_TIME_STOPPED) {
if (playerStatus->flags & PS_FLAG_TIME_STOPPED) {
timescale = 0.0f;
}
playerStatus->animNotifyValue = spr_update_player_sprite(0, playerStatus->trueAnimation, timescale);
playerStatus->flags |= PS_FLAGS_SPRITE_REDRAW;
playerStatus->flags |= PS_FLAG_SPRITE_REDRAW;
}
s32 get_player_back_anim(s32 anim) {
@ -1451,14 +1451,14 @@ void render_player_model(void) {
s8 renderModeTemp;
void (*appendGfx)(void*);
if (playerStatus->flags & PS_FLAGS_SPRITE_REDRAW) {
playerStatus->flags &= ~PS_FLAGS_SPRITE_REDRAW;
if (playerStatus->flags & PS_FLAG_SPRITE_REDRAW) {
playerStatus->flags &= ~PS_FLAG_SPRITE_REDRAW;
get_screen_coords(gCurrentCamID, playerStatus->position.x, playerStatus->position.y,
playerStatus->position.z, &x, &y, &z);
if (!(playerStatus->flags & PS_FLAGS_SPINNING)) {
if (!(playerStatus->flags & PS_FLAG_SPINNING)) {
if (playerStatus->alpha1 != playerStatus->alpha2) {
if (playerStatus->alpha1 < 254) {
if (!(playerStatus->animFlags & PA_FLAGS_MAP_HAS_SWITCH)) {
if (!(playerStatus->animFlags & PA_FLAG_MAP_HAS_SWITCH)) {
renderModeTemp = RENDER_MODE_SURFACE_XLU_LAYER1;
} else {
renderModeTemp = RENDER_MODE_SURFACE_XLU_LAYER2;
@ -1480,13 +1480,13 @@ void render_player_model(void) {
playerStatus->alpha2 = 0;
}
if (!(playerStatus->animFlags & PA_FLAGS_INVISIBLE)) {
if (!(playerStatus->animFlags & PA_FLAG_INVISIBLE)) {
rtPtr->appendGfxArg = playerStatus;
rtPtr->distance = -z;
rtPtr->renderMode = playerStatus->renderMode;
if (!(playerStatus->flags & PS_FLAGS_SPINNING)) {
if (!(playerStatus->flags & PS_FLAG_SPINNING)) {
appendGfx = appendGfx_player;
} else {
appendGfx = appendGfx_player_spin;
@ -1532,8 +1532,8 @@ void appendGfx_player(void* data) {
guTranslateF(sp60, playerStatus->position.x, playerStatus->position.y, playerStatus->position.z);
guMtxCatF(sp20, sp60, sp20);
if (playerStatus->animFlags & PA_FLAGS_SHIVERING) {
playerStatus->animFlags = playerStatus->animFlags & ~PA_FLAGS_SHIVERING;
if (playerStatus->animFlags & PA_FLAG_SHIVERING) {
playerStatus->animFlags = playerStatus->animFlags & ~PA_FLAG_SHIVERING;
playerStatus->shiverTime = 22;
func_802DDEE4(0, -1, 0, 0, 0, 0, 0, 0);
func_802DDFF8(playerStatus->anim, 5, 1, 1, 1, 0, 0);

View File

@ -22,7 +22,7 @@ void update_player_input(void) {
playerStatus->heldButtonsBuffer[inputBufPos] = playerStatus->heldButtons;
playerStatus->inputBufPos = inputBufPos;
if (playerStatus->flags & (PS_FLAGS_INPUT_DISABLED | PS_FLAGS_NO_STATIC_COLLISION)) {
if (playerStatus->flags & (PS_FLAG_INPUT_DISABLED | PS_FLAG_NO_STATIC_COLLISION)) {
playerStatus->stickAxis[0] = 0;
playerStatus->stickAxis[1] = 0;
playerStatus->currentButtons = 0;
@ -30,8 +30,8 @@ void update_player_input(void) {
playerStatus->heldButtons = 0;
}
if (playerStatus->animFlags & PA_FLAGS_FORCE_USE_PARTNER) {
playerStatus->animFlags |= PA_FLAGS_PARTNER_USAGE_FORCED;
if (playerStatus->animFlags & PA_FLAG_FORCE_USE_PARTNER) {
playerStatus->animFlags |= PA_FLAG_PARTNER_USAGE_FORCED;
playerStatus->pressedButtons |= 4;
}
}
@ -67,7 +67,7 @@ void reset_player_status(void) {
if (gGameStatusPtr->peachFlags & PEACH_STATUS_FLAG_IS_PEACH) {
playerStatus->colliderHeight = 55;
playerStatus->colliderDiameter = 38;
playerStatus->animFlags |= PA_FLAGS_USING_PEACH_PHYSICS;
playerStatus->animFlags |= PA_FLAG_USING_PEACH_PHYSICS;
if (gGameStatusPtr->peachFlags & PEACH_STATUS_FLAG_DISGUISED) {
D_8010C92C = 2;

View File

@ -154,9 +154,9 @@ s32 phys_adjust_cam_on_landing(void) {
gCameras[0].moveFlags &= ~CAMERA_MOVE_IGNORE_PLAYER_Y;
}
} else if (partnerActionStatus->partnerActionState != PARTNER_ACTION_NONE && partnerActionStatus->actingPartner == PARTNER_PARAKARRY) {
gCameras[0].moveFlags |= CAMERA_MOVE_FLAGS_2;
gCameras[0].moveFlags |= CAMERA_MOVE_FLAG_2;
} else {
gCameras[0].moveFlags &= ~CAMERA_MOVE_FLAGS_2;
gCameras[0].moveFlags &= ~CAMERA_MOVE_FLAG_2;
}
return ret;
@ -212,11 +212,11 @@ void phys_update_action_state(void) {
PlayerStatus* playerStatus = &gPlayerStatus;
PlayerSpinState* playerSpinState = &gPlayerSpinState;
if (!(playerStatus->flags & PS_FLAGS_ENTERING_BATTLE)) {
playerStatus->flags &= ~PS_FLAGS_TIME_STOPPED;
if (!(playerStatus->flags & PS_FLAG_ENTERING_BATTLE)) {
playerStatus->flags &= ~PS_FLAG_TIME_STOPPED;
}
if (playerStatus->animFlags & PA_FLAGS_USING_PEACH_PHYSICS) {
if (playerStatus->animFlags & PA_FLAG_USING_PEACH_PHYSICS) {
phys_peach_update();
return;
}
@ -224,7 +224,7 @@ void phys_update_action_state(void) {
if (playerStatus->camResetDelay != 0) {
playerStatus->camResetDelay--;
if (playerStatus->camResetDelay == 0) {
gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_FLAGS_4;
gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_FLAG_4;
}
}
@ -240,7 +240,7 @@ void phys_update_action_state(void) {
if (playerSpinState->stopSoundTimer != 0) {
playerSpinState->stopSoundTimer--;
if (playerSpinState->stopSoundTimer == 0) {
playerStatus->animFlags &= ~PA_FLAGS_SPINNING;
playerStatus->animFlags &= ~PA_FLAG_SPINNING;
if (playerSpinState->spinSoundID != 0) {
sfx_stop_sound(playerSpinState->spinSoundID);
}
@ -253,19 +253,19 @@ void phys_update_action_state(void) {
if (actionState == ACTION_STATE_IDLE || actionState == ACTION_STATE_WALK || actionState == ACTION_STATE_RUN) {
s32 cond;
if (!(playerStatus->flags & PS_FLAGS_INPUT_DISABLED)) {
if (!(playerStatus->flags & PS_FLAG_INPUT_DISABLED)) {
cond = check_conversation_trigger();
} else {
cond = FALSE;
}
if ((partnerActionStatus->partnerActionState == PARTNER_ACTION_NONE) && !(playerStatus->flags & PS_FLAGS_PAUSED) && cond) {
if ((partnerActionStatus->partnerActionState == PARTNER_ACTION_NONE) && !(playerStatus->flags & PS_FLAG_PAUSED) && cond) {
set_action_state(ACTION_STATE_TALK);
}
check_input_spin();
}
if (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
if (playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED) {
void* dmaStart = PlayerActionsTable[playerStatus->actionState].dmaStart;
if (dmaStart != NULL && dmaStart != D_8010C924) {
@ -274,7 +274,7 @@ void phys_update_action_state(void) {
}
}
PlayerActionsTable[playerStatus->actionState].update();
} while (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED);
} while (playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED);
}
void phys_peach_update(void) {
@ -283,11 +283,11 @@ void phys_peach_update(void) {
func_800E24F8();
do {
if (!(playerStatus->flags & PS_FLAGS_PAUSED) && check_conversation_trigger()) {
if (!(playerStatus->flags & PS_FLAG_PAUSED) && check_conversation_trigger()) {
set_action_state(ACTION_STATE_TALK);
}
if (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
if (playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED) {
Action* action = &PlayerActionsTable[playerStatus->actionState];
if (action->flag) {
@ -307,10 +307,10 @@ void phys_peach_update(void) {
PlayerActionsTable[playerStatus->actionState].update();
}
}
} while (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED);
} while (playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED);
peach_check_for_parasol_input();
if (playerStatus->animFlags & PA_FLAGS_INVISIBLE) {
if (playerStatus->animFlags & PA_FLAG_INVISIBLE) {
peach_sync_disguise_npc();
}
}
@ -320,12 +320,12 @@ void set_action_state(s32 actionState) {
PlayerData* playerData = &gPlayerData;
PlayerSpinState* spinState = &gPlayerSpinState;
if (playerStatus->flags & PS_FLAGS_SPECIAL_JUMP) {
playerStatus->flags &= ~PS_FLAGS_SPECIAL_JUMP;
if (playerStatus->flags & PS_FLAG_SPECIAL_JUMP) {
playerStatus->flags &= ~PS_FLAG_SPECIAL_JUMP;
enable_player_input();
}
if (playerStatus->animFlags & PA_FLAGS_8BIT_MARIO) {
if (playerStatus->animFlags & PA_FLAG_8BIT_MARIO) {
// TODO figure this out
#ifdef NON_EQUIVALENT
if (
@ -342,7 +342,7 @@ void set_action_state(s32 actionState) {
#endif
playerStatus->prevActionState = playerStatus->actionState;
playerStatus->actionState = actionState;
playerStatus->flags |= PS_FLAGS_ACTION_STATE_CHANGED;
playerStatus->flags |= PS_FLAG_ACTION_STATE_CHANGED;
}
return;
}
@ -359,17 +359,17 @@ void set_action_state(s32 actionState) {
if (partner == PARTNER_SUSHIE || partner == PARTNER_LAKILESTER || partner == PARTNER_PARAKARRY) {
if (gPartnerActionStatus.partnerActionState != PARTNER_ACTION_NONE) {
playerStatus->animFlags |= PA_FLAGS_INTERRUPT_USE_PARTNER;
playerStatus->flags |= PS_FLAGS_HIT_FIRE;
playerStatus->animFlags |= PA_FLAG_INTERRUPT_USE_PARTNER;
playerStatus->flags |= PS_FLAG_HIT_FIRE;
return;
}
}
}
if (actionState == ACTION_STATE_SLIDING) {
playerStatus->flags |= PS_FLAGS_SLIDING;
playerStatus->flags |= PS_FLAG_SLIDING;
playerStatus->moveFrames = 0;
playerStatus->flags &= ~PS_FLAGS_CUTSCENE_MOVEMENT;
playerStatus->flags &= ~PS_FLAG_CUTSCENE_MOVEMENT;
}
playerStatus->prevActionState = playerStatus->actionState;
@ -378,17 +378,17 @@ void set_action_state(s32 actionState) {
}
if (actionState == ACTION_STATE_ENEMY_FIRST_STRIKE) {
playerStatus->animFlags |= PA_FLAGS_INTERRUPT_USE_PARTNER;
playerStatus->animFlags |= PA_FLAG_INTERRUPT_USE_PARTNER;
}
playerStatus->actionState = actionState;
playerStatus->flags |= PS_FLAGS_ACTION_STATE_CHANGED;
playerStatus->flags |= PS_FLAG_ACTION_STATE_CHANGED;
if (playerStatus->actionState == ACTION_STATE_SPIN) {
return;
}
playerStatus->flags &= ~PS_FLAGS_SPINNING;
playerStatus->animFlags &= ~PA_FLAGS_SPINNING;
playerStatus->flags &= ~PS_FLAG_SPINNING;
playerStatus->animFlags &= ~PA_FLAG_SPINNING;
if (spinState->spinSoundID != 0) {
sfx_stop_sound(spinState->spinSoundID);
@ -437,7 +437,7 @@ void start_bounce_b(void) {
playerStatus->gravityIntegrator[1] = -1.0f;
playerStatus->gravityIntegrator[2] = 0;
playerStatus->gravityIntegrator[3] = 0;
playerStatus->flags |= PS_FLAGS_SCRIPTED_FALL;
playerStatus->flags |= PS_FLAG_SCRIPTED_FALL;
}
s32 check_input_hammer(void) {
@ -445,7 +445,7 @@ s32 check_input_hammer(void) {
PlayerData* playerData = &gPlayerData;
if (playerStatus->pressedButtons & BUTTON_B) {
if (playerStatus->flags & PS_FLAGS_FALLING) {
if (playerStatus->flags & PS_FLAG_FALLING) {
return FALSE;
}
@ -472,15 +472,15 @@ s32 check_input_jump(void) {
return FALSE;
}
// @bug? collider flags not properly masked with COLLIDER_FLAGS_SURFACE_TYPE
// @bug? collider flags not properly masked with COLLIDER_FLAG_SURFACE_TYPE
surfaceType = get_collider_flags((u16)gCollisionStatus.currentFloor);
if ((surfaceType == SURFACE_TYPE_SLIDE) && phys_should_player_be_sliding()) {
return FALSE;
}
if (collisionStatus->touchingWallTrigger != 0 ||
(playerStatus->animFlags & (PA_FLAGS_SPEECH_PROMPT_AVAILABLE |
PA_FLAGS_INTERACT_PROMPT_AVAILABLE)))
(playerStatus->animFlags & (PA_FLAG_SPEECH_PROMPT_AVAILABLE |
PA_FLAG_INTERACT_PROMPT_AVAILABLE)))
{
return FALSE;
}
@ -488,8 +488,8 @@ s32 check_input_jump(void) {
if ((collisionStatus->currentInspect != -1) && (collisionStatus->currentInspect & COLLISION_WITH_ENTITY_BIT)) {
Entity* entity = get_entity_by_index(collisionStatus->currentInspect);
if (entity->flags & ENTITY_FLAGS_SHOWS_INSPECT_PROMPT) {
if ((entity->boundScriptBytecode == 0) || (entity->flags & ENTITY_FLAGS_4000)) {
if (entity->flags & ENTITY_FLAG_SHOWS_INSPECT_PROMPT) {
if ((entity->boundScriptBytecode == 0) || (entity->flags & ENTITY_FLAG_4000)) {
if (entity->type == ENTITY_TYPE_PINK_FLOWER ||
entity->type == ENTITY_TYPE_BELLBELL_PLANT ||
entity->type == ENTITY_TYPE_TRUMPET_PLANT)
@ -511,8 +511,8 @@ void check_input_spin(void) {
PlayerSpinState* spinState = &gPlayerSpinState;
PlayerSpinState* temp2 = spinState;
if (!((playerStatus->flags & (PS_FLAGS_NO_STATIC_COLLISION | PS_FLAGS_CUTSCENE_MOVEMENT)) ||
(playerStatus->animFlags & PA_FLAGS_USING_WATT) ||
if (!((playerStatus->flags & (PS_FLAG_NO_STATIC_COLLISION | PS_FLAG_CUTSCENE_MOVEMENT)) ||
(playerStatus->animFlags & PA_FLAG_USING_WATT) ||
(playerStatus->currentButtons & BUTTON_C_DOWN) ||
is_ability_active(ABILITY_SLOW_GO))) {
@ -523,7 +523,7 @@ void check_input_spin(void) {
if (actionState != ACTION_STATE_RIDE) {
if (actionState < ACTION_STATE_STEP_UP) {
if (actionState < ACTION_STATE_JUMP) {
if (actionState >= 0 && !(playerStatus->animFlags & PA_FLAGS_SPINNING)) {
if (actionState >= 0 && !(playerStatus->animFlags & PA_FLAG_SPINNING)) {
if (btnPressed || spinState->hasBufferedSpin) {
set_action_state(ACTION_STATE_SPIN);
if (spinState->hasBufferedSpin != FALSE) {
@ -555,7 +555,7 @@ void peach_force_disguise_action(s32 useParasol) {
if (useParasol) {
set_action_state(ACTION_STATE_USE_SNEAKY_PARASOL);
} else {
playerStatus->animFlags &= ~PA_FLAGS_INVISIBLE;
playerStatus->animFlags &= ~PA_FLAG_INVISIBLE;
gGameStatusPtr->peachFlags &= ~PEACH_STATUS_FLAG_DISGUISED;
playerStatus->peachDisguise = 0;
free_npc_by_index(PeachDisguiseNpcIndex);
@ -575,7 +575,7 @@ void peach_check_for_parasol_input(void) {
D_8010C92C--;
if (D_8010C92C == 0) {
if (gGameStatusPtr->peachFlags & PEACH_STATUS_FLAG_DISGUISED) {
playerStatus->animFlags |= PA_FLAGS_INVISIBLE;
playerStatus->animFlags |= PA_FLAG_INVISIBLE;
gGameStatusPtr->peachFlags |= PEACH_STATUS_FLAG_DISGUISED;
disguiseNpc = peach_make_disguise_npc(gGameStatusPtr->peachDisguise);

View File

@ -34,7 +34,7 @@ s32 can_trigger_loading_zone(void) {
if (partnerActionStatus->partnerActionState != PARTNER_ACTION_NONE) {
return TRUE;
} else {
gPlayerStatusPtr->animFlags |= PA_FLAGS_INTERRUPT_USE_PARTNER;
gPlayerStatusPtr->animFlags |= PA_FLAG_INTERRUPT_USE_PARTNER;
return FALSE;
}
} else {
@ -42,7 +42,7 @@ s32 can_trigger_loading_zone(void) {
return partnerActionStatus->partnerActionState != PARTNER_ACTION_NONE;
}
if (partnerActionStatus->actingPartner == PARTNER_PARAKARRY) {
gPlayerStatusPtr->animFlags |= PA_FLAGS_INTERRUPT_USE_PARTNER;
gPlayerStatusPtr->animFlags |= PA_FLAG_INTERRUPT_USE_PARTNER;
return FALSE;
}
}
@ -51,12 +51,12 @@ s32 can_trigger_loading_zone(void) {
}
void move_player(s32 duration, f32 heading, f32 speed) {
gPlayerStatus.flags |= PS_FLAGS_CUTSCENE_MOVEMENT;
gPlayerStatus.flags |= PS_FLAG_CUTSCENE_MOVEMENT;
gPlayerStatus.heading = heading;
gPlayerStatus.moveFrames = duration;
gPlayerStatus.currentSpeed = speed;
if (!(gPlayerStatus.animFlags & PA_FLAGS_RIDING_PARTNER)) {
if (!(gPlayerStatus.animFlags & PA_FLAG_RIDING_PARTNER)) {
set_action_state(speed > gPlayerStatus.walkSpeed ? ACTION_STATE_RUN : ACTION_STATE_WALK);
}
}
@ -123,8 +123,8 @@ void handle_switch_hit(void) {
f32 groundPosY;
AnimID anim;
if (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
playerStatus->flags &= ~PS_FLAGS_ACTION_STATE_CHANGED;
if (playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED) {
playerStatus->flags &= ~PS_FLAG_ACTION_STATE_CHANGED;
playerStatus->actionSubstate = LANDING_ON_SWITCH_SUBSTATE_0;
}
@ -151,7 +151,7 @@ void handle_switch_hit(void) {
player_handle_floor_collider_type(colliderID);
playerStatus->position.y = groundPosY;
if (colliderID >= 0) {
if (!(playerStatus->animFlags & PA_FLAGS_USING_WATT)) {
if (!(playerStatus->animFlags & PA_FLAG_USING_WATT)) {
anim = ANIM_Mario_10009;
} else {
anim = ANIM_Mario_6000B;
@ -242,7 +242,7 @@ void phys_update_jump(void) {
record_jump_apex();
set_action_state(ACTION_STATE_HOP);
integrate_gravity();
if (playerStatus->flags & PS_FLAGS_ENTERING_BATTLE) {
if (playerStatus->flags & PS_FLAG_ENTERING_BATTLE) {
playerStatus->gravityIntegrator[1] *= 0.5f;
playerStatus->gravityIntegrator[2] *= 0.5f;
playerStatus->gravityIntegrator[3] *= 0.5f;
@ -285,7 +285,7 @@ void phys_init_integrator_for_current_state(void) {
case ACTION_STATE_HIT_FIRE:
case ACTION_STATE_HIT_LAVA:
params = GravityParamsStartJump;
if (!(playerStatus->flags & PS_FLAGS_ENTERING_BATTLE)) {
if (!(playerStatus->flags & PS_FLAG_ENTERING_BATTLE)) {
playerStatus->gravityIntegrator[0] = *params++;
playerStatus->gravityIntegrator[1] = *params++;
playerStatus->gravityIntegrator[2] = *params++;
@ -309,7 +309,7 @@ void gravity_use_fall_parms(void) {
do {} while (0);
playerStatus = &gPlayerStatus;
if (playerStatus->flags & PS_FLAGS_ENTERING_BATTLE) {
if (playerStatus->flags & PS_FLAG_ENTERING_BATTLE) {
playerStatus->gravityIntegrator[0] = *params++ / 12.0f;
playerStatus->gravityIntegrator[1] = *params++ / 12.0f;
playerStatus->gravityIntegrator[2] = *params++ / 12.0f;
@ -383,10 +383,10 @@ void phys_player_land(void) {
playerStatus->timeInAir = 0;
playerStatus->peakJumpTime = 0;
playerStatus->flags &= ~PS_FLAGS_SCRIPTED_FALL;
playerStatus->flags &= ~PS_FLAG_SCRIPTED_FALL;
playerStatus->landPos.x = playerStatus->position.x;
playerStatus->landPos.z = playerStatus->position.z;
playerStatus->flags &= ~PS_FLAGS_AIRBORNE;
playerStatus->flags &= ~PS_FLAG_AIRBORNE;
sfx_play_sound_at_player(SOUND_SOFT_LAND, 0);
if (!(collisionStatus->currentFloor & COLLISION_WITH_ENTITY_BIT)) {
phys_adjust_cam_on_landing();
@ -416,7 +416,7 @@ void phys_player_land(void) {
}
}
if (playerStatus->flags & PS_FLAGS_CUTSCENE_MOVEMENT) {
if (playerStatus->flags & PS_FLAG_CUTSCENE_MOVEMENT) {
set_action_state(ACTION_STATE_RUN);
return;
}
@ -445,7 +445,7 @@ void phys_player_land(void) {
f32 integrate_gravity(void) {
PlayerStatus* playerStatus = &gPlayerStatus;
if (playerStatus->flags & PS_FLAGS_ENTERING_BATTLE) {
if (playerStatus->flags & PS_FLAG_ENTERING_BATTLE) {
playerStatus->gravityIntegrator[2] += playerStatus->gravityIntegrator[3] / 1.7f;
playerStatus->gravityIntegrator[1] += playerStatus->gravityIntegrator[2] / 1.7f;
playerStatus->gravityIntegrator[0] += playerStatus->gravityIntegrator[1] / 1.7f;
@ -508,9 +508,9 @@ void collision_main_lateral(void) {
f32 zBump;
gCollisionStatus.pushingAgainstWall = -1;
if (playerStatus->flags & PS_FLAGS_CUTSCENE_MOVEMENT) {
if (playerStatus->flags & PS_FLAG_CUTSCENE_MOVEMENT) {
speed = playerStatus->currentSpeed;
if (playerStatus->flags & PS_FLAGS_ENTERING_BATTLE) {
if (playerStatus->flags & PS_FLAG_ENTERING_BATTLE) {
speed *= 0.5f;
}
add_vec2D_polar(&playerStatus->position.x, &playerStatus->position.z, speed, playerStatus->heading);
@ -597,21 +597,21 @@ void collision_main_lateral(void) {
}
break;
default:
if (!(playerStatus->flags & PS_FLAGS_FLYING)) {
if (!(playerStatus->flags & PS_FLAG_FLYING)) {
f32 new_var;
speed = 0.0f;
if (!(playerStatus->flags & (PS_FLAGS_SCRIPTED_FALL | PS_FLAGS_INPUT_DISABLED))) {
if (!(playerStatus->flags & (PS_FLAG_SCRIPTED_FALL | PS_FLAG_INPUT_DISABLED))) {
player_input_to_move_vector(&yaw, &speed);
if (!(playerStatus->animFlags & PA_FLAGS_SPINNING)) {
if (!(playerStatus->animFlags & PA_FLAG_SPINNING)) {
speed *= 0.03125f;
if (!(playerStatus->flags & (PS_FLAGS_FALLING | PS_FLAGS_JUMPING))) {
if (!(playerStatus->flags & (PS_FLAG_FALLING | PS_FLAG_JUMPING))) {
speed *= 0.25;
}
if (playerStatus->actionState == ACTION_STATE_LAUNCH) {
speed *= 1.5;
}
if (playerStatus->flags & PS_FLAGS_ENTERING_BATTLE) {
if (playerStatus->flags & PS_FLAG_ENTERING_BATTLE) {
speed *= 0.5f;
}
}
@ -625,7 +625,7 @@ void collision_main_lateral(void) {
xBump = 0.0f;
zBump = -speed * cosTheta;
}
} else if (!(playerStatus->animFlags & PA_FLAGS_SPINNING)) {
} else if (!(playerStatus->animFlags & PA_FLAG_SPINNING)) {
xBump = speed * sinTheta;
zBump = -speed * cosTheta;
} else {
@ -635,14 +635,14 @@ void collision_main_lateral(void) {
sin_cos_rad(DEG_TO_RAD(playerStatus->targetYaw), &sinTheta, &cosTheta);
speed = playerStatus->currentSpeed;
if (playerStatus->flags & PS_FLAGS_ENTERING_BATTLE) {
if (playerStatus->flags & PS_FLAG_ENTERING_BATTLE) {
speed *= 0.5f;
}
playerX = xBump + (speed * sinTheta);
playerZ = zBump - (speed * cosTheta);
yaw = atan2(0.0f, 0.0f, playerX, playerZ);
speed = sqrtf(SQ(playerX) + SQ(playerZ));
if (playerStatus->flags & (PS_FLAGS_FALLING | PS_FLAGS_JUMPING)) {
if (playerStatus->flags & (PS_FLAG_FALLING | PS_FLAG_JUMPING)) {
if (speed > playerStatus->runSpeed) {
speed = playerStatus->runSpeed;
}
@ -680,7 +680,7 @@ void collision_main_lateral(void) {
playerStatus->colliderDiameter, yaw2);
}
collisionStatus->currentWall = result;
if (!(playerStatus->flags & PS_FLAGS_MOVEMENT_LOCKED) && playerStatus->actionState != ACTION_STATE_HAMMER) {
if (!(playerStatus->flags & PS_FLAG_MOVEMENT_LOCKED) && playerStatus->actionState != ACTION_STATE_HAMMER) {
if (speed == 0.0f) {
collision_check_player_intersecting_world(0, 0,
@ -729,7 +729,7 @@ void collision_main_lateral(void) {
}
if (playerStatus->enableCollisionOverlapsCheck == 0) {
if (playerStatus->animFlags & PA_FLAGS_SPINNING) {
if (playerStatus->animFlags & PA_FLAG_SPINNING) {
yaw2 = playerStatus->targetYaw;
} else {
yaw2 = playerStatus->spriteFacingAngle - 90.0f + gCameras[gCurrentCameraID].currentYaw;
@ -903,7 +903,7 @@ void phys_main_collision_below(void) {
return;
}
if (playerStatus->flags & PS_FLAGS_AIRBORNE) {
if (playerStatus->flags & PS_FLAG_AIRBORNE) {
return;
}
@ -911,7 +911,7 @@ void phys_main_collision_below(void) {
return;
}
if ((!(playerStatus->flags & PS_FLAGS_SLIDING) ||
if ((!(playerStatus->flags & PS_FLAG_SLIDING) ||
(phys_adjust_cam_on_landing(), !phys_should_player_be_sliding()) ||
(set_action_state(ACTION_STATE_SLIDING), (playerStatus->actionState != ACTION_STATE_SLIDING))))
{
@ -949,7 +949,7 @@ void phys_main_collision_below(void) {
}
if (playerStatus->actionState != ACTION_STATE_STEP_UP && !cond) {
if (!(playerStatus->animFlags & PA_FLAGS_USING_PEACH_PHYSICS)) {
if (!(playerStatus->animFlags & PA_FLAG_USING_PEACH_PHYSICS)) {
if (playerY - playerStatus->position.y < 6.0f) {
playerStatus->position.y = playerY;
} else {
@ -964,7 +964,7 @@ void phys_main_collision_below(void) {
}
break;
}
} else if (!(playerStatus->flags & PS_FLAGS_FLYING) &&
} else if (!(playerStatus->flags & PS_FLAG_FLYING) &&
playerStatus->actionState != ACTION_STATE_USE_SPINNING_FLOWER)
{
if (outLength <= collHeightHalf + temp_f24 && hitDirX == 0.0f && hitDirZ == 0.0f) {
@ -994,7 +994,7 @@ void collision_lava_reset_check_additional_overlaps(void) {
f32 x, y, z;
f32 temp_f0;
if (playerStatus->animFlags & PA_FLAGS_USING_PEACH_PHYSICS) {
if (playerStatus->animFlags & PA_FLAG_USING_PEACH_PHYSICS) {
collision_lateral_peach();
return;
}
@ -1079,8 +1079,8 @@ void collision_lateral_peach(void) {
}
void check_input_midair_jump(void) {
if (!(gPlayerStatus.flags & (PS_FLAGS_SCRIPTED_FALL | PS_FLAGS_SLIDING | PS_FLAGS_FLYING)) &&
!(gPlayerStatus.animFlags & (PA_FLAGS_8BIT_MARIO | PA_FLAGS_USING_WATT)) &&
if (!(gPlayerStatus.flags & (PS_FLAG_SCRIPTED_FALL | PS_FLAG_SLIDING | PS_FLAG_FLYING)) &&
!(gPlayerStatus.animFlags & (PA_FLAG_8BIT_MARIO | PA_FLAG_USING_WATT)) &&
gPlayerStatus.peakJumpTime >= 6 &&
gPlayerStatus.timeInAir < 18 &&
gPlayerStatus.pressedButtons & BUTTON_A) {
@ -1090,11 +1090,11 @@ void check_input_midair_jump(void) {
break;
case 1:
set_action_state(ACTION_STATE_SPIN_JUMP);
gPlayerStatus.flags |= PS_FLAGS_FLYING;
gPlayerStatus.flags |= PS_FLAG_FLYING;
break;
case 2:
set_action_state(ACTION_STATE_TORNADO_JUMP);
gPlayerStatus.flags |= PS_FLAGS_FLYING;
gPlayerStatus.flags |= PS_FLAG_FLYING;
break;
}
}
@ -1135,7 +1135,7 @@ s32 phys_check_interactable_collision(void) {
f32 x, y, z, yaw;
s32 ret = -1;
if (playerStatus->flags & PS_FLAGS_INPUT_DISABLED) {
if (playerStatus->flags & PS_FLAG_INPUT_DISABLED) {
return ret;
}

View File

@ -41,12 +41,12 @@ s32 func_800E6904(void) {
PlayerStatus* playerStatus = &gPlayerStatus;
s32 actionState = playerStatus->actionState;
if (playerStatus->animFlags & PA_FLAGS_CHANGING_MAP) {
if (playerStatus->animFlags & PA_FLAG_CHANGING_MAP) {
return FALSE;
}
if (partnerActionStatus->partnerActionState == PARTNER_ACTION_NONE) {
if (!(playerStatus->flags & PS_FLAGS_NO_STATIC_COLLISION) &&
if (!(playerStatus->flags & PS_FLAG_NO_STATIC_COLLISION) &&
(actionState == ACTION_STATE_IDLE || actionState == ACTION_STATE_WALK || actionState == ACTION_STATE_RUN))
{
return TRUE;
@ -72,17 +72,17 @@ s32 can_pause(s32 currentButtons, s32 pressedButtons) {
PartnerActionStatus* partnerActionStatus = &gPartnerActionStatus;
s32 actionState = gPlayerStatus.actionState;
if (!(gPlayerStatus.animFlags & PA_FLAGS_CHANGING_MAP) &&
!(gPlayerStatus.flags & PS_FLAGS_PAUSE_DISABLED) &&
if (!(gPlayerStatus.animFlags & PA_FLAG_CHANGING_MAP) &&
!(gPlayerStatus.flags & PS_FLAG_PAUSE_DISABLED) &&
!(currentButtons & (BUTTON_Z | BUTTON_R)) &&
(pressedButtons & (BUTTON_START | BUTTON_C_LEFT | BUTTON_C_RIGHT)) &&
((gGameStatusPtr->mapShop == NULL) || !(gGameStatusPtr->mapShop->flags & 1)) &&
!(gOverrideFlags & GLOBAL_OVERRIDES_DISABLE_MENUS) &&
!is_picking_up_item())
{
if (!(gPlayerStatus.animFlags & PA_FLAGS_8BIT_MARIO)) {
if (!(gPlayerStatus.animFlags & PA_FLAG_8BIT_MARIO)) {
if (partnerActionStatus->partnerActionState == PARTNER_ACTION_NONE) {
if (!(gPlayerStatus.flags & PS_FLAGS_NO_STATIC_COLLISION)) {
if (!(gPlayerStatus.flags & PS_FLAG_NO_STATIC_COLLISION)) {
if (actionState == ACTION_STATE_IDLE ||
actionState == ACTION_STATE_WALK ||
actionState == ACTION_STATE_RUN)
@ -235,11 +235,11 @@ void check_input_open_menus(void) {
block_17:
switch (D_8010CCF8) {
case 0:
if (playerStatus->flags & PS_FLAGS_NO_CHANGE_PARTNER) {
if (playerStatus->flags & PS_FLAG_NO_CHANGE_PARTNER) {
sfx_play_sound(SOUND_MENU_ERROR);
if (D_8010C9C0) {
func_800E6860();
playerStatus->flags &= ~PS_FLAGS_PAUSED;
playerStatus->flags &= ~PS_FLAG_PAUSED;
gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
set_time_freeze_mode(TIME_FREEZE_NORMAL);
}
@ -264,7 +264,7 @@ block_17:
popup->initialPos = 0;
break;
}
playerStatus->flags |= PS_FLAGS_PAUSED;
playerStatus->flags |= PS_FLAG_PAUSED;
disable_player_input();
partner_disable_input();
D_8010CCFA = 3;
@ -273,7 +273,7 @@ block_17:
}
break;
case 1:
flags = ~PS_FLAGS_PAUSED;
flags = ~PS_FLAG_PAUSED;
if ((func_800E6904() == 0) || is_picking_up_item() || D_8010CCFE < playerStatus->inputEnabledCounter) {
playerStatus->flags &= flags;
enable_player_input();
@ -281,7 +281,7 @@ block_17:
D_8010CD00 = 0;
if (D_8010C9C0) {
func_800E6860();
playerStatus->flags &= ~PS_FLAGS_PAUSED;
playerStatus->flags &= ~PS_FLAG_PAUSED;
gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
set_time_freeze_mode(TIME_FREEZE_NORMAL);
}
@ -356,7 +356,7 @@ block_17:
}
}
func_800E6860();
playerStatus->flags &= ~PS_FLAGS_PAUSED;
playerStatus->flags &= ~PS_FLAG_PAUSED;
gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
set_time_freeze_mode(TIME_FREEZE_NORMAL);
}
@ -366,7 +366,7 @@ block_17:
if (D_8010CCFA == 0) {
func_800E6860();
D_8010CD00 = 0;
playerStatus->flags &= ~PS_FLAGS_PAUSED;
playerStatus->flags &= ~PS_FLAG_PAUSED;
gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
enable_player_input();
partner_enable_input();

View File

@ -345,69 +345,69 @@ void initialize_status_menu(void) {
iconIndex = hud_element_create(&HES_StatusHP);
uiStatus->hpIconIndices[0] = iconIndex;
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX);
iconIndex = hud_element_create(&HES_StatusHeart);
uiStatus->hpIconIndices[1] = iconIndex;
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX);
iconIndex = hud_element_create(&HES_StatusFP);
uiStatus->fpIconIndices[0] = iconIndex;
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX);
iconIndex = hud_element_create(&HES_StatusFlower);
uiStatus->fpIconIndices[1] = iconIndex;
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX);
iconIndex = hud_element_create(&HES_StatusCoin);
uiStatus->coinIconIndex = iconIndex;
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX);
iconIndex = hud_element_create(&HES_Item_CoinSparkleRandom);
uiStatus->coinSparkleIconIndex = iconIndex;
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX);
iconIndex = hud_element_create(&HES_StatusStarPoint);
uiStatus->starpointsIconIndex = iconIndex;
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX);
iconIndex = hud_element_create(&HES_StatusSPShine);
uiStatus->starpointsShineIconIndex = iconIndex;
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX);
newVar = hud_element_create(&HES_StatusTimes);
iconIndex = newVar;
uiStatus->iconIndex8 = iconIndex;
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX);
iconIndex = hud_element_create(&HES_StatusTimes);
uiStatus->iconIndex9 = iconIndex;
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX);
iconIndex = hud_element_create(&HES_StatusTimes);
uiStatus->iconIndexA = iconIndex;
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX);
iconIndex = hud_element_create(&HES_StatusTimes);
uiStatus->iconIndexB = iconIndex;
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX);
iconIndex = hud_element_create(&HES_StatusStar1);
uiStatus->starIconIndex = iconIndex;
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX);
func_800F0D5C();
}
@ -423,7 +423,7 @@ void status_menu_draw_number(s32 iconID, s32 x, s32 y, s32 value, s32 numDigits)
x2 = x + 8;
y2 = y + 8;
hud_element_set_render_pos(iconID, x2, y2 - 1);
hud_element_clear_flags(iconID, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(iconID, HUD_ELEMENT_FLAG_DISABLED);
hud_element_draw_next(iconID);
// Write each digit of the input number into the digits array
@ -444,7 +444,7 @@ void status_menu_draw_number(s32 iconID, s32 x, s32 y, s32 value, s32 numDigits)
keepDrawing = TRUE;
hud_element_set_script(iconID, DigitHudScripts[digit]);
hud_element_set_render_pos(iconID, x2, y2);
hud_element_clear_flags(iconID, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(iconID, HUD_ELEMENT_FLAG_DISABLED);
hud_element_draw_next(iconID);
}
}
@ -463,7 +463,7 @@ void status_menu_draw_stat(s32 id, s32 x, s32 y, s32 currentValue, s32 maxValue)
hud_element_set_script(id, SlashHudScript);
hud_element_set_render_pos(id, baseX + 14, baseY + 1);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
hud_element_draw_next(id);
for (i = 0; i < numDigits; i++) {
@ -481,7 +481,7 @@ void status_menu_draw_stat(s32 id, s32 x, s32 y, s32 currentValue, s32 maxValue)
cond = TRUE;
hud_element_set_script(id, DigitHudScripts[digit]);
hud_element_set_render_pos(id, localX, localY);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
hud_element_draw_next(id);
}
}
@ -500,7 +500,7 @@ void status_menu_draw_stat(s32 id, s32 x, s32 y, s32 currentValue, s32 maxValue)
cond = TRUE;
hud_element_set_script(id, DigitHudScripts[digit]);
hud_element_set_render_pos(id, localX, localY);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
hud_element_draw_next(id);
}
}
@ -675,7 +675,7 @@ s32 new_var2;
if (!uiStatus->ignoreChanges) {
if (playerStatus->actionState != ACTION_STATE_IDLE) {
uiStatus->showTimer = 0;
} else if (playerStatus->flags & (PS_FLAGS_NO_STATIC_COLLISION | PS_FLAGS_INPUT_DISABLED)) {
} else if (playerStatus->flags & (PS_FLAG_NO_STATIC_COLLISION | PS_FLAG_INPUT_DISABLED)) {
uiStatus->showTimer = 0;
} else {
uiStatus->showTimer++;
@ -1144,11 +1144,11 @@ void show_coin_counter(void) {
set_window_update(WINDOW_ID_20, (s32)basic_window_update);
index = hud_element_create(&HES_MenuTimes);
uiStatus->iconIndex10 = index;
hud_element_set_flags(index, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(index, HUD_ELEMENT_FLAG_80);
hud_element_set_tint(index, 255, 255, 255);
index = hud_element_create(&HES_StatusCoin);
uiStatus->iconIndex11 = index;
hud_element_set_flags(index, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(index, HUD_ELEMENT_FLAG_80);
hud_element_set_tint(index, 255, 255, 255);
uiStatus->unk_6C[0] = 0;

View File

@ -16,7 +16,7 @@ void update_cameras(void) {
for (i = 0; i < ARRAY_COUNT(gCameras); i++) {
Camera* cam = &gCameras[i];
if (cam->flags != 0 && !(cam->flags & CAMERA_FLAGS_ENABLED)) {
if (cam->flags != 0 && !(cam->flags & CAMERA_FLAG_ENABLED)) {
s32 sx;
s32 sy;
s32 sz;
@ -50,18 +50,18 @@ void update_cameras(void) {
guLookAtReflectF(cam->viewMtxPlayer, &gDisplayContext->lookAt, cam->lookAt_eye.x, cam->lookAt_eye.y, cam->lookAt_eye.z, cam->lookAt_obj.x, cam->lookAt_obj.y, cam->lookAt_obj.z, 0, 1.0f, 0);
if (!(cam->flags & CAMERA_FLAGS_ORTHO)) {
if (cam->flags & CAMERA_FLAGS_LEAD_PLAYER) {
if (!(cam->flags & CAMERA_FLAG_ORTHO)) {
if (cam->flags & CAMERA_FLAG_LEAD_PLAYER) {
create_camera_leadplayer_matrix(cam);
}
guPerspectiveF(cam->perspectiveMatrix, &cam->perspNorm, cam->vfov, (f32) cam->viewportW / (f32) cam->viewportH, (f32) cam->nearClip, (f32) cam->farClip, 1.0f);
if (cam->flags & CAMERA_FLAGS_SHAKING) {
if (cam->flags & CAMERA_FLAG_SHAKING) {
guMtxCatF(cam->viewMtxShaking, cam->perspectiveMatrix, cam->perspectiveMatrix);
}
if (cam->flags & CAMERA_FLAGS_LEAD_PLAYER) {
if (cam->flags & CAMERA_FLAG_LEAD_PLAYER) {
guMtxCatF(cam->viewMtxLeading, cam->perspectiveMatrix, cam->perspectiveMatrix);
}
@ -102,7 +102,7 @@ void render_frame(s32 flag) {
for (; camID < ARRAY_COUNT(gCameras) - flag; camID++) {
Camera* camera = &gCameras[camID];
if (camera->flags != 0 && !(camera->flags & (CAMERA_FLAGS_80 | CAMERA_FLAGS_ENABLED))) {
if (camera->flags != 0 && !(camera->flags & (CAMERA_FLAG_80 | CAMERA_FLAG_ENABLED))) {
u16 matrixListPos;
gCurrentCamID = camID;
@ -170,7 +170,7 @@ void render_frame(s32 flag) {
osVirtualToPhysical(nuGfxCfb_ptr));
gDPPipeSync(gMasterGfxPos++);
if (!(camera->flags & CAMERA_FLAGS_ORTHO)) {
if (!(camera->flags & CAMERA_FLAG_ORTHO)) {
gSPPerspNormalize(gMasterGfxPos++, camera->perspNorm);
}
@ -185,12 +185,12 @@ void render_frame(s32 flag) {
camera->vpAlt.vp.vtrans[0] = camera->vp.vp.vtrans[0] + gGameStatusPtr->unk_82;
camera->vpAlt.vp.vtrans[1] = camera->vp.vp.vtrans[1] + gGameStatusPtr->unk_83;
if (!(camera->flags & CAMERA_FLAGS_ORTHO)) {
if (!(camera->flags & CAMERA_FLAG_ORTHO)) {
if (gCurrentCamID != CAM_3) {
if (!(camera->flags & CAMERA_FLAGS_RENDER_ENTITIES)) {
if (!(camera->flags & CAMERA_FLAG_RENDER_ENTITIES)) {
render_entities();
}
if (!(camera->flags & CAMERA_FLAGS_RENDER_MODELS)) {
if (!(camera->flags & CAMERA_FLAG_RENDER_MODELS)) {
render_models();
}
render_player();
@ -236,7 +236,7 @@ void create_cameras_a(void) {
gCameras[i].flags = 0;
}
camDataPtr->flags = CAMERA_FLAGS_ENABLED;
camDataPtr->flags = CAMERA_FLAG_ENABLED;
camDataPtr->type = 0;
camDataPtr->viewWidth = 160;
camDataPtr->viewHeight = 120;
@ -247,7 +247,7 @@ void create_cameras_a(void) {
camDataPtr->vfov = 50;
initialize_next_camera(camDataPtr);
camDataPtr->flags = CAMERA_FLAGS_ENABLED;
camDataPtr->flags = CAMERA_FLAG_ENABLED;
camDataPtr->type = 0;
camDataPtr->viewWidth = 160;
camDataPtr->viewHeight = 120;
@ -258,7 +258,7 @@ void create_cameras_a(void) {
camDataPtr->vfov = 50;
initialize_next_camera(camDataPtr);
camDataPtr->flags = CAMERA_FLAGS_ENABLED;
camDataPtr->flags = CAMERA_FLAG_ENABLED;
camDataPtr->type = 0;
camDataPtr->viewWidth = 160;
camDataPtr->viewHeight = 120;
@ -269,7 +269,7 @@ void create_cameras_a(void) {
camDataPtr->vfov = 50;
initialize_next_camera(camDataPtr);
camDataPtr->flags = CAMERA_FLAGS_ENABLED;
camDataPtr->flags = CAMERA_FLAG_ENABLED;
camDataPtr->type = 0;
camDataPtr->viewWidth = 160;
camDataPtr->viewHeight = 120;
@ -290,7 +290,7 @@ void create_cameras_b(void) {
gCameras[i].flags = 0;
}
camDataPtr->flags = CAMERA_FLAGS_ENABLED;
camDataPtr->flags = CAMERA_FLAG_ENABLED;
camDataPtr->type = 0;
camDataPtr->viewWidth = 160;
camDataPtr->viewHeight = 120;
@ -301,7 +301,7 @@ void create_cameras_b(void) {
camDataPtr->vfov = 50;
initialize_next_camera(camDataPtr);
camDataPtr->flags = CAMERA_FLAGS_ENABLED;
camDataPtr->flags = CAMERA_FLAG_ENABLED;
camDataPtr->type = 0;
camDataPtr->viewWidth = 160;
camDataPtr->viewHeight = 120;
@ -312,7 +312,7 @@ void create_cameras_b(void) {
camDataPtr->vfov = 50;
initialize_next_camera(camDataPtr);
camDataPtr->flags = CAMERA_FLAGS_ENABLED;
camDataPtr->flags = CAMERA_FLAG_ENABLED;
camDataPtr->type = 0;
camDataPtr->viewWidth = 160;
camDataPtr->viewHeight = 120;
@ -323,7 +323,7 @@ void create_cameras_b(void) {
camDataPtr->vfov = 50;
initialize_next_camera(camDataPtr);
camDataPtr->flags = CAMERA_FLAGS_ENABLED;
camDataPtr->flags = CAMERA_FLAG_ENABLED;
camDataPtr->type = 0;
camDataPtr->viewWidth = 160;
camDataPtr->viewHeight = 120;
@ -349,7 +349,7 @@ Camera* initialize_next_camera(CameraInitData* initData) {
ASSERT(camID < ARRAY_COUNT(gCameras));
camera->flags = initData->flags | (CAMERA_FLAGS_1 | CAMERA_FLAGS_LEAD_PLAYER);
camera->flags = initData->flags | (CAMERA_FLAG_1 | CAMERA_FLAG_LEAD_PLAYER);
camera->moveFlags = 0;
camera->lookAt_eye.x = 0;
camera->lookAt_eye.y = 0;

View File

@ -47,7 +47,7 @@ void handle_floor_behavior(void) {
colliderType = D_80109480;
}
if (playerStatus->actionState == ACTION_STATE_LAND && playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
if (playerStatus->actionState == ACTION_STATE_LAND && playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED) {
D_8010CFF4 = D_8010CFF0;
}
@ -87,7 +87,7 @@ void surface_standard_behavior(void) {
}
if (playerStatus->actionState == ACTION_STATE_LAND &&
(playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) &&
(playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED) &&
D_8010CFF4 >= 10)
{
x = playerStatus->position.x;
@ -100,7 +100,7 @@ void surface_standard_behavior(void) {
}
} else if (
(playerStatus->actionState == ACTION_STATE_SPIN_POUND || playerStatus->actionState == ACTION_STATE_TORNADO_POUND) && (playerStatus->flags & PS_FLAGS_SPECIAL_LAND))
(playerStatus->actionState == ACTION_STATE_SPIN_POUND || playerStatus->actionState == ACTION_STATE_TORNADO_POUND) && (playerStatus->flags & PS_FLAG_SPECIAL_LAND))
{
x = playerStatus->position.x;
y = playerStatus->position.y + 0.0f;
@ -220,8 +220,8 @@ void surface_cloud_behavior(void) {
D_801094A0 += 0.1f;
if (((playerStatus->actionState == ACTION_STATE_LAND && (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED)) ||
((playerStatus->actionState == ACTION_STATE_SPIN_POUND || playerStatus->actionState == ACTION_STATE_TORNADO_POUND) && (playerStatus->flags & PS_FLAGS_SPECIAL_LAND))) &&
if (((playerStatus->actionState == ACTION_STATE_LAND && (playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED)) ||
((playerStatus->actionState == ACTION_STATE_SPIN_POUND || playerStatus->actionState == ACTION_STATE_TORNADO_POUND) && (playerStatus->flags & PS_FLAG_SPECIAL_LAND))) &&
D_8010CFF4 >= 10)
{
fx_cloud_puff(
@ -273,7 +273,7 @@ void surface_snow_behavior(void) {
playerStatus->actionState == ACTION_STATE_RUN ||
(playerStatus->actionState == ACTION_STATE_SPIN && playerStatus->actionSubstate == 0) ||
((playerStatus->actionState == ACTION_STATE_LAND || playerStatus->actionState == ACTION_STATE_IDLE)
&& playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED))
&& playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED))
) {
D_801094A4 = 4;
return;
@ -301,7 +301,7 @@ void surface_hedges_behavior(void) {
playerStatus->actionState == ACTION_STATE_RUN ||
(playerStatus->actionState == ACTION_STATE_SPIN && playerStatus->actionSubstate == 0) ||
((playerStatus->actionState == ACTION_STATE_LAND || playerStatus->actionState == ACTION_STATE_IDLE)
&& playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED))
&& playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED))
) {
D_801094AC = 4;
return;
@ -327,7 +327,7 @@ void surface_water_behavior(void) {
playerStatus->actionState == ACTION_STATE_RUN ||
(playerStatus->actionState == ACTION_STATE_SPIN && playerStatus->actionSubstate == 0) ||
((playerStatus->actionState == ACTION_STATE_LAND || playerStatus->actionState == ACTION_STATE_IDLE)
&& playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED))
&& playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED))
) {
D_801094AE = 4;
return;

View File

@ -315,58 +315,58 @@ s32 popup_menu_update(void) {
D_8010D68C = 0;
elementID = hud_element_create(&HES_EmptyBar);
D_8010D65C = elementID;
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_80);
hud_element_set_tint(elementID, 255, 255, 255);
if (gPopupMenu->popupType != POPUP_MENU_THROW_AWAY_ITEM) {
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_DISABLED);
}
one = 1; // required to match (why is 1 loaded so early?)
elementID = hud_element_create(gPopupMenu->ptrIcon[0]);
D_8010D678 = elementID;
hud_element_set_scale(elementID, 0.45f);
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_FILTER_TEX | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
elementID = hud_element_create(&HES_AnimatedHandPointer);
D_8010D66C = elementID;
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_DROP_SHADOW | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_DROP_SHADOW | HUD_ELEMENT_FLAG_80);
elementID = hud_element_create(&HES_GreenArrowUp);
D_8010D670 = elementID;
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_DROP_SHADOW | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_DROP_SHADOW | HUD_ELEMENT_FLAG_80);
elementID = hud_element_create(&HES_GreenArrowDown);
D_8010D674 = elementID;
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_DROP_SHADOW | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_DROP_SHADOW | HUD_ELEMENT_FLAG_80);
if (gPopupMenu->popupType == POPUP_MENU_TRADE_FOR_BADGE) {
D_8010D660 = hud_element_create(&HES_StatusStarPiece);
elementID = D_8010D660;
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_80);
hud_element_set_tint(elementID, 255, 255, 255);
}
if (gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) {
D_8010D660 = hud_element_create(&HES_StatusStarPiece);
elementID = D_8010D660;
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_FILTER_TEX | HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_tint(elementID, 255, 255, 255);
}
if (gPopupMenu->popupType == POPUP_MENU_SELL_ITEM) {
D_8010D660 = hud_element_create(&HES_StatusCoin);
elementID = D_8010D660;
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_80);
hud_element_set_tint(elementID, 255, 255, 255);
}
if (gPopupMenu->popupType == POPUP_MENU_TRADE_FOR_BADGE || gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) {
D_8010D664 = hud_element_create(&HES_MenuTimes);
elementID = D_8010D664;
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_80);
hud_element_set_tint(elementID, 255, 255, 255);
}
if (gPopupMenu->popupType == one || gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) {
D_8010D668 = hud_element_create(D_80109890[0]);
elementID = D_8010D668;
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_80);
hud_element_set_tint(elementID, 255, 255, 255);
}

View File

@ -40,7 +40,7 @@ void update_camera_mode_unused(Camera* camera) {
camera->lookAt_obj.z = camera->lookAt_obj_target.z;
}
if (!(playerStatus->flags & (PS_FLAGS_FALLING | PS_FLAGS_JUMPING))) {
if (!(playerStatus->flags & (PS_FLAG_FALLING | PS_FLAG_JUMPING))) {
camera->lookAt_obj_target.y = playerStatus->position.y + 60.0f;
}
@ -784,14 +784,14 @@ void update_camera_zone_interp(Camera* camera) {
camera->unk_498 = 1.0f;
}
if (camera->moveFlags & CAMERA_MOVE_FLAGS_4) {
if (camera->moveFlags & CAMERA_MOVE_FLAG_4) {
camera->unk_498 += 0.3;
if (camera->unk_498 >= 1.0) {
camera->unk_498 = 1.0f;
}
}
if (!(camera->moveFlags & CAMERA_MOVE_FLAGS_2)) {
if (!(camera->moveFlags & CAMERA_MOVE_FLAG_2)) {
camera->savedTargetY += (camera->unk_494 - camera->savedTargetY) * camera->unk_498;
}
@ -1024,7 +1024,7 @@ void update_camera_zone_interp(Camera* camera) {
cosViewPitch = cos_deg(blendedCamSettings.boomPitch + D_800A08DC);
sinViewPitch = sin_deg(blendedCamSettings.boomPitch + D_800A08DC);
if (!(camera->moveFlags & CAMERA_MOVE_FLAGS_2)) {
if (!(camera->moveFlags & CAMERA_MOVE_FLAG_2)) {
camera->lookAt_eye.y = blendedCamSettings.pos.y + (blendedCamSettings.boomLength * sinViewPitch);
}
@ -1040,7 +1040,7 @@ void update_camera_zone_interp(Camera* camera) {
}
temp_f8_2 = blendedCamSettings.pos.y - camera->lookAt_eye.y;
if (!(camera->moveFlags & CAMERA_MOVE_FLAGS_2)) {
if (!(camera->moveFlags & CAMERA_MOVE_FLAG_2)) {
camera->lookAt_obj.y = camera->lookAt_eye.y + ((dist * sinViewPitch) + (temp_f8_2 * cosViewPitch));
}
temp_f4_4 = (dist * cosViewPitch) - (temp_f8_2 * sinViewPitch);

View File

@ -288,7 +288,7 @@ s32 create_model_animator(s16* animPos) {
ASSERT(animator != NULL);
animator->flags = MODEL_ANIMATOR_FLAGS_UPDATE_PENDING | MODEL_ANIMATOR_FLAGS_ENABLED | MODEL_ANIMATOR_FLAGS_CAM_2 | MODEL_ANIMATOR_FLAGS_CAM_1 | MODEL_ANIMATOR_FLAGS_CAM_0;
animator->flags = MODEL_ANIMATOR_FLAG_UPDATE_PENDING | MODEL_ANIMATOR_FLAG_ENABLED | MODEL_ANIMATOR_FLAG_CAM_2 | MODEL_ANIMATOR_FLAG_CAM_1 | MODEL_ANIMATOR_FLAG_CAM_0;
animator->renderMode = RENDER_MODE_ALPHATEST;
animator->nextUpdateTime = 1.0f;
animator->timeScale = 1.0f;
@ -332,7 +332,7 @@ s32 create_mesh_animator(s16* animPos, s16* animBuffer) {
ASSERT(animator != NULL);
animator->flags = MODEL_ANIMATOR_FLAGS_UPDATE_PENDING | MODEL_ANIMATOR_FLAGS_ENABLED | MODEL_ANIMATOR_FLAGS_CAM_2 | MODEL_ANIMATOR_FLAGS_CAM_1 | MODEL_ANIMATOR_FLAGS_CAM_0;
animator->flags = MODEL_ANIMATOR_FLAG_UPDATE_PENDING | MODEL_ANIMATOR_FLAG_ENABLED | MODEL_ANIMATOR_FLAG_CAM_2 | MODEL_ANIMATOR_FLAG_CAM_1 | MODEL_ANIMATOR_FLAG_CAM_0;
animator->renderMode = RENDER_MODE_ALPHATEST;
animator->baseAddr = NULL;
animator->fpRenderCallback = NULL;
@ -365,7 +365,7 @@ AnimatorNode* add_anim_node(ModelAnimator* animator, s32 parentNodeID, AnimatorN
ret = heap_malloc(sizeof(*ret));
ASSERT(ret != NULL);
ret->flags = MODEL_ANIMATOR_FLAGS_ENABLED;
ret->flags = MODEL_ANIMATOR_FLAG_ENABLED;
ret->displayList = nodeBP->displayList;
ret->basePos.x = nodeBP->basePos.x;
ret->basePos.y = nodeBP->basePos.y;
@ -437,11 +437,11 @@ void update_model_animator(s32 animatorID) {
if (animator != NULL && animator->flags != 0) {
s32 temp = 0;
if (!(animator->flags & MODEL_ANIMATOR_FLAGS_FREEZE_ANIMATION)) {
animator->flags &= ~MODEL_ANIMATOR_FLAGS_UPDATE_PENDING;
if (!(animator->flags & MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION)) {
animator->flags &= ~MODEL_ANIMATOR_FLAG_UPDATE_PENDING;
animator->nextUpdateTime -= animator->timeScale;
if (animator->nextUpdateTime <= 0.0f) {
if (!(animator->flags & MODEL_ANIMATOR_FLAGS_MESH)) {
if (!(animator->flags & MODEL_ANIMATOR_FLAG_MESH)) {
do {
temp = step_model_animator(animator);
} while (temp > 0);
@ -494,11 +494,11 @@ void update_model_animator_with_transform(s32 animatorID, Mtx* mtx) {
if (animator != NULL && animator->flags != 0) {
s32 temp = 0;
if (!(animator->flags & MODEL_ANIMATOR_FLAGS_FREEZE_ANIMATION)) {
animator->flags &= ~MODEL_ANIMATOR_FLAGS_UPDATE_PENDING;
if (!(animator->flags & MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION)) {
animator->flags &= ~MODEL_ANIMATOR_FLAG_UPDATE_PENDING;
animator->nextUpdateTime -= animator->timeScale;
if (animator->nextUpdateTime <= 0.0f) {
if (!(animator->flags & MODEL_ANIMATOR_FLAGS_MESH)) {
if (!(animator->flags & MODEL_ANIMATOR_FLAG_MESH)) {
do {
temp = step_model_animator(animator);
} while (temp > 0);
@ -583,7 +583,7 @@ s32 step_model_animator(ModelAnimator* animator) {
animator->animReadPos = args;
return 1;
case AS_OP_19:
animator->flags |= MODEL_ANIMATOR_FLAGS_NO_FLIP;
animator->flags |= MODEL_ANIMATOR_FLAG_NO_FLIP;
animator->animReadPos = args;
return 1;
case AS_SET_ROTATION:
@ -645,14 +645,14 @@ void animator_update_model_transforms(ModelAnimator* animator, Mtx* rootTransfor
Matrix4f flipMtx;
if (animator->rootNode != NULL) {
switch (animator->flags & (MODEL_ANIMATOR_FLAGS_FLIP_Z | MODEL_ANIMATOR_FLAGS_FLIP_Y | MODEL_ANIMATOR_FLAGS_FLIP_X)) {
case MODEL_ANIMATOR_FLAGS_FLIP_Z:
switch (animator->flags & (MODEL_ANIMATOR_FLAG_FLIP_Z | MODEL_ANIMATOR_FLAG_FLIP_Y | MODEL_ANIMATOR_FLAG_FLIP_X)) {
case MODEL_ANIMATOR_FLAG_FLIP_Z:
animator_make_mirrorZ(flipMtx);
break;
case MODEL_ANIMATOR_FLAGS_FLIP_Y:
case MODEL_ANIMATOR_FLAG_FLIP_Y:
animator_make_mirrorY(flipMtx);
break;
case MODEL_ANIMATOR_FLAGS_FLIP_X:
case MODEL_ANIMATOR_FLAG_FLIP_X:
animator_make_mirrorX(flipMtx);
break;
default:
@ -674,19 +674,19 @@ void animator_node_update_model_transform(ModelAnimator* animator, f32 (*flipMtx
guMtxCatF(gAnimScaleMtx, gAnimRotMtx, gAnimRotScaleMtx);
guMtxCatF(gAnimRotScaleMtx, gAnimTranslateMtx, sp10);
if (!(animator->flags & MODEL_ANIMATOR_FLAGS_NO_FLIP)) {
if (!(animator->flags & MODEL_ANIMATOR_FLAG_NO_FLIP)) {
guMtxCatF(sp10, flipMtx, sp10);
}
copy_matrix(sp10, node->mtx);
if (node->flags & MODEL_ANIMATOR_FLAGS_HAS_MODEL) {
if (node->flags & MODEL_ANIMATOR_FLAG_HAS_MODEL) {
Model* model = get_model_from_list_index(get_model_list_index_from_tree_index(node->fcData.modelID));
copy_matrix(sp10, model->transformMatrix);
guMtxL2F(sp10, rootTransform);
guMtxCatF(model->transformMatrix, sp10, model->transformMatrix);
model->flags |= MODEL_FLAGS_USES_TRANSFORM_MATRIX;
model->flags |= MODEL_FLAG_USES_TRANSFORM_MATRIX;
}
for (i = 0; i < ARRAY_COUNT(node->children); i++) {
@ -705,8 +705,8 @@ void render_animated_model(s32 animatorID, Mtx* rootTransform) {
animatorID &= ~0x800;
animator = (*gCurrentAnimMeshListPtr)[animatorID];
if (animator != NULL && animator->flags != 0 && !(animator->flags & MODEL_ANIMATOR_FLAGS_UPDATE_PENDING) &&
animator->flags & (1 << gCurrentCamID) && !(animator->flags & MODEL_ANIMATOR_FLAGS_HIDDEN))
if (animator != NULL && animator->flags != 0 && !(animator->flags & MODEL_ANIMATOR_FLAG_UPDATE_PENDING) &&
animator->flags & (1 << gCurrentCamID) && !(animator->flags & MODEL_ANIMATOR_FLAG_HIDDEN))
{
animator->mtx = *rootTransform;
animator->baseAddr = NULL;
@ -728,8 +728,8 @@ void render_animated_model_with_vertices(s32 animatorID, Mtx* rootTransform, s32
animatorID &= ~0x800;
animator = (*gCurrentAnimMeshListPtr)[animatorID];
if (animator != NULL && animator->flags != 0 && !(animator->flags & MODEL_ANIMATOR_FLAGS_UPDATE_PENDING) &&
animator->flags & (1 << gCurrentCamID) && !(animator->flags & MODEL_ANIMATOR_FLAGS_HIDDEN))
if (animator != NULL && animator->flags != 0 && !(animator->flags & MODEL_ANIMATOR_FLAG_UPDATE_PENDING) &&
animator->flags & (1 << gCurrentCamID) && !(animator->flags & MODEL_ANIMATOR_FLAG_HIDDEN))
{
animator->mtx = *rootTransform;
gAnimVtxSegment = segment;
@ -825,7 +825,7 @@ void appendGfx_animator_node(ModelAnimator* animator, AnimatorNode* node, Matrix
s32 totalVtxCount;
s32 cmd;
if (node->flags & MODEL_ANIMATOR_FLAGS_HIDDEN) {
if (node->flags & MODEL_ANIMATOR_FLAG_HIDDEN) {
for (i = 0; i < ARRAY_COUNT(node->children); i++) {
if (node->children[i] != NULL) {
guMtxCatF(node->mtx, mtx, node->mtx);
@ -844,7 +844,7 @@ void appendGfx_animator_node(ModelAnimator* animator, AnimatorNode* node, Matrix
gDPSetTextureLOD(gMasterGfxPos++, G_TL_TILE);
gDPSetTextureLUT(gMasterGfxPos++, G_TT_NONE);
gSPClearGeometryMode(gMasterGfxPos++, G_LIGHTING);
if (animator->flags & MODEL_ANIMATOR_FLAGS_CULL_BACK) {
if (animator->flags & MODEL_ANIMATOR_FLAG_CULL_BACK) {
gSPSetGeometryMode(gMasterGfxPos++, G_CULL_BACK);
}
if (!gAnimModelFogEnabled) {
@ -1059,7 +1059,7 @@ void load_model_animator_node(StaticAnimatorNode* node, ModelAnimator* animator,
if (node->modelID != 0) {
newNode->fcData.modelID = node->modelID - 1;
newNode->flags |= MODEL_ANIMATOR_FLAGS_HAS_MODEL;
newNode->flags |= MODEL_ANIMATOR_FLAG_HAS_MODEL;
}
i = 0;
@ -1126,7 +1126,7 @@ void load_mesh_animator_tree(s32 index, StaticAnimatorNode** tree) {
}
load_mesh_animator_node(*gAnimTreeRoot, animator, 0, nodeIDs);
animator->flags |= MODEL_ANIMATOR_FLAGS_MESH;
animator->flags |= MODEL_ANIMATOR_FLAG_MESH;
}
}
@ -1228,7 +1228,7 @@ s32 step_mesh_animator(ModelAnimator* animator) {
animator->animReadPos = args;
return 1;
case AS_OP_19:
animator->flags |= MODEL_ANIMATOR_FLAGS_NO_FLIP;
animator->flags |= MODEL_ANIMATOR_FLAG_NO_FLIP;
animator->animReadPos = args;
return 1;
case AS_SET_ROTATION:

View File

@ -703,20 +703,20 @@ ItemEntity* get_item_entity(s32 itemEntityIndex) {
void hide_item_entity(ItemEntity* itemEntity) {
Shadow* shadow;
itemEntity->flags |= ITEM_ENTITY_FLAGS_HIDDEN;
itemEntity->flags |= ITEM_ENTITY_FLAG_HIDDEN;
if (itemEntity->shadowIndex >= 0) {
shadow = get_shadow_by_index(itemEntity->shadowIndex);
shadow->flags |= ENTITY_FLAGS_HIDDEN;
shadow->flags |= ENTITY_FLAG_HIDDEN;
}
}
void reveal_item_entity(ItemEntity* itemEntity) {
Shadow* shadow;
itemEntity->flags &= ~ITEM_ENTITY_FLAGS_HIDDEN;
itemEntity->flags &= ~ITEM_ENTITY_FLAG_HIDDEN;
if (itemEntity->shadowIndex >= 0) {
shadow = get_shadow_by_index(itemEntity->shadowIndex);
shadow->flags &= ~ENTITY_FLAGS_HIDDEN;
shadow->flags &= ~ENTITY_FLAG_HIDDEN;
}
}
@ -827,7 +827,7 @@ s32 make_item_entity(s32 itemID, f32 x, f32 y, f32 z, s32 itemSpawnMode, s32 pic
itemID &= 0xFFFF;
itemEntity->flags = ITEM_ENTITY_FLAGS_80 | ITEM_ENTITY_FLAGS_10 | ITEM_ENTITY_FLAGS_CAM2 | ITEM_ENTITY_FLAGS_CAM1 | ITEM_ENTITY_FLAGS_CAM0;
itemEntity->flags = ITEM_ENTITY_FLAG_80 | ITEM_ENTITY_FLAG_10 | ITEM_ENTITY_FLAG_CAM2 | ITEM_ENTITY_FLAG_CAM1 | ITEM_ENTITY_FLAG_CAM0;
itemEntity->pickupMsgFlags = 0;
itemEntity->boundVar = pickupFlagIndex;
itemEntity->itemID = itemID;
@ -842,140 +842,140 @@ s32 make_item_entity(s32 itemID, f32 x, f32 y, f32 z, s32 itemSpawnMode, s32 pic
itemEntity->unk_34.z = -9999;
D_801565A6 = 30;
itemEntity->flags |= ITEM_ENTITY_FLAGS_TINY;
itemEntity->flags |= ITEM_ENTITY_FLAG_TINY;
if (gItemTable[itemID].typeFlags & ITEM_TYPE_FLAG_ENTITY_FULLSIZE) {
itemEntity->flags |= ITEM_ENTITY_FLAGS_40000;
itemEntity->flags &= ~ITEM_ENTITY_FLAGS_TINY;
itemEntity->flags |= ITEM_ENTITY_FLAG_40000;
itemEntity->flags &= ~ITEM_ENTITY_FLAG_TINY;
}
if (ItemEntityAlternatingSpawn != 0) {
itemEntity->flags |= ITEM_ENTITY_FLAGS_20000;
itemEntity->flags |= ITEM_ENTITY_FLAG_20000;
}
ItemEntityAlternatingSpawn = 1 - ItemEntityAlternatingSpawn;
switch (itemEntity->spawnType) {
case ITEM_SPAWN_MODE_KEY:
itemEntity->flags |= ITEM_ENTITY_FLAGS_80000000;
itemEntity->flags |= ITEM_ENTITY_FLAG_80000000;
break;
case ITEM_SPAWN_MODE_DECORATION:
case ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS:
itemEntity->flags |= ITEM_ENTITY_FLAGS_800000;
itemEntity->flags |= ITEM_ENTITY_FLAG_800000;
break;
case ITEM_SPAWN_MODE_INVISIBLE:
itemEntity->flags |= ITEM_ENTITY_FLAGS_100000;
itemEntity->flags |= ITEM_ENTITY_FLAG_100000;
break;
case ITEM_SPAWN_MODE_BATTLE_REWARD:
itemEntity->flags |= ITEM_ENTITY_FLAGS_800000;
itemEntity->flags |= ITEM_ENTITY_FLAGS_10000;
itemEntity->flags |= ITEM_ENTITY_FLAG_800000;
itemEntity->flags |= ITEM_ENTITY_FLAG_10000;
itemEntity->spawnType = ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS;
break;
case ITEM_SPAWN_MODE_TOSS_NEVER_VANISH:
itemEntity->flags |= ITEM_ENTITY_FLAGS_800000 | ITEM_ENTITY_FLAGS_400 | ITEM_ENTITY_FLAGS_NEVER_VANISH;
itemEntity->flags |= ITEM_ENTITY_FLAG_800000 | ITEM_ENTITY_FLAG_400 | ITEM_ENTITY_FLAG_NEVER_VANISH;
itemEntity->spawnType = ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS;
break;
case ITEM_SPAWN_MODE_TOSS:
itemEntity->flags |= ITEM_ENTITY_FLAGS_800000 | ITEM_ENTITY_FLAGS_400;
itemEntity->flags |= ITEM_ENTITY_FLAG_800000 | ITEM_ENTITY_FLAG_400;
itemEntity->spawnType = ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS;
break;
case ITEM_SPAWN_MODE_TOSS_SPAWN_ONCE:
itemEntity->flags |= ITEM_ENTITY_FLAGS_800000 | ITEM_ENTITY_FLAGS_800;
itemEntity->flags |= ITEM_ENTITY_FLAG_800000 | ITEM_ENTITY_FLAG_800;
itemEntity->spawnType = ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS;
break;
case ITEM_SPAWN_MODE_TOSS_SPAWN_ONCE_NEVER_VANISH:
itemEntity->flags |= ITEM_ENTITY_FLAGS_800000 | ITEM_ENTITY_FLAGS_800 | ITEM_ENTITY_FLAGS_NEVER_VANISH;
itemEntity->flags |= ITEM_ENTITY_FLAG_800000 | ITEM_ENTITY_FLAG_800 | ITEM_ENTITY_FLAG_NEVER_VANISH;
itemEntity->spawnType = ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS;
break;
case ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS_NEVER_VANISH:
itemEntity->flags |= ITEM_ENTITY_FLAGS_800000 | ITEM_ENTITY_FLAGS_NEVER_VANISH;
itemEntity->flags |= ITEM_ENTITY_FLAG_800000 | ITEM_ENTITY_FLAG_NEVER_VANISH;
itemEntity->spawnType = ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS;
break;
case ITEM_SPAWN_MODE_ITEM_BLOCK_ITEM:
itemEntity->flags |= ITEM_ENTITY_FLAGS_800000 | ITEM_ENTITY_FLAGS_400;
itemEntity->flags |= ITEM_ENTITY_FLAGS_40000000;
itemEntity->flags |= ITEM_ENTITY_FLAG_800000 | ITEM_ENTITY_FLAG_400;
itemEntity->flags |= ITEM_ENTITY_FLAG_40000000;
itemEntity->spawnType = ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS;
break;
case ITEM_SPAWN_MODE_ITEM_BLOCK_BADGE:
itemEntity->flags |= ITEM_ENTITY_FLAGS_800000 | ITEM_ENTITY_FLAGS_400;
itemEntity->flags |= ITEM_ENTITY_FLAGS_40000000 | ITEM_ENTITY_FLAGS_NEVER_VANISH;
itemEntity->flags |= ITEM_ENTITY_FLAG_800000 | ITEM_ENTITY_FLAG_400;
itemEntity->flags |= ITEM_ENTITY_FLAG_40000000 | ITEM_ENTITY_FLAG_NEVER_VANISH;
itemEntity->spawnType = ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS;
break;
case ITEM_SPAWN_MODE_FALL_SPAWN_ALWAYS:
itemEntity->flags |= ITEM_ENTITY_FLAGS_800000;
itemEntity->flags |= ITEM_ENTITY_FLAG_800000;
break;
case ITEM_SPAWN_MODE_FALL_NEVER_VANISH:
itemEntity->flags |= ITEM_ENTITY_FLAGS_800000 | ITEM_ENTITY_FLAGS_400 | ITEM_ENTITY_FLAGS_NEVER_VANISH;
itemEntity->flags |= ITEM_ENTITY_FLAG_800000 | ITEM_ENTITY_FLAG_400 | ITEM_ENTITY_FLAG_NEVER_VANISH;
itemEntity->spawnType = ITEM_SPAWN_MODE_FALL_SPAWN_ALWAYS;
break;
case ITEM_SPAWN_MODE_FALL:
itemEntity->flags |= ITEM_ENTITY_FLAGS_800000 | ITEM_ENTITY_FLAGS_400;
itemEntity->flags |= ITEM_ENTITY_FLAG_800000 | ITEM_ENTITY_FLAG_400;
itemEntity->spawnType = ITEM_SPAWN_MODE_FALL_SPAWN_ALWAYS;
break;
case ITEM_SPAWN_MODE_FALL_SPAWN_ONCE:
itemEntity->flags |= ITEM_ENTITY_FLAGS_800000 | ITEM_ENTITY_FLAGS_800;
itemEntity->flags |= ITEM_ENTITY_FLAG_800000 | ITEM_ENTITY_FLAG_800;
itemEntity->spawnType = ITEM_SPAWN_MODE_FALL_SPAWN_ALWAYS;
break;
case ITEM_SPAWN_MODE_FIXED_SPAWN_ALWAYS:
itemEntity->flags |= ITEM_ENTITY_FLAGS_800000 | ITEM_ENTITY_FLAGS_FIXED;
itemEntity->flags |= ITEM_ENTITY_FLAGS_10000000;
itemEntity->flags |= ITEM_ENTITY_FLAG_800000 | ITEM_ENTITY_FLAG_FIXED;
itemEntity->flags |= ITEM_ENTITY_FLAG_10000000;
break;
case ITEM_SPAWN_MODE_FIXED_NEVER_VANISH:
itemEntity->flags |= ITEM_ENTITY_FLAGS_800000 | ITEM_ENTITY_FLAGS_FIXED | ITEM_ENTITY_FLAGS_400 | ITEM_ENTITY_FLAGS_NEVER_VANISH;
itemEntity->flags |= ITEM_ENTITY_FLAGS_10000000;
itemEntity->flags |= ITEM_ENTITY_FLAG_800000 | ITEM_ENTITY_FLAG_FIXED | ITEM_ENTITY_FLAG_400 | ITEM_ENTITY_FLAG_NEVER_VANISH;
itemEntity->flags |= ITEM_ENTITY_FLAG_10000000;
itemEntity->spawnType = ITEM_SPAWN_MODE_FIXED_SPAWN_ALWAYS;
break;
case ITEM_SPAWN_MODE_FIXED:
itemEntity->flags |= ITEM_ENTITY_FLAGS_800000 | ITEM_ENTITY_FLAGS_FIXED | ITEM_ENTITY_FLAGS_400;
itemEntity->flags |= ITEM_ENTITY_FLAGS_10000000;
itemEntity->flags |= ITEM_ENTITY_FLAG_800000 | ITEM_ENTITY_FLAG_FIXED | ITEM_ENTITY_FLAG_400;
itemEntity->flags |= ITEM_ENTITY_FLAG_10000000;
itemEntity->spawnType = ITEM_SPAWN_MODE_FIXED_SPAWN_ALWAYS;
break;
case ITEM_SPAWN_MODE_FIXED_SPAWN_ALWAYS_NEVER_VANISH:
itemEntity->flags |= ITEM_ENTITY_FLAGS_800000 | ITEM_ENTITY_FLAGS_FIXED | ITEM_ENTITY_FLAGS_NEVER_VANISH;
itemEntity->flags |= ITEM_ENTITY_FLAGS_10000000;
itemEntity->flags |= ITEM_ENTITY_FLAG_800000 | ITEM_ENTITY_FLAG_FIXED | ITEM_ENTITY_FLAG_NEVER_VANISH;
itemEntity->flags |= ITEM_ENTITY_FLAG_10000000;
itemEntity->spawnType = ITEM_SPAWN_MODE_FIXED_SPAWN_ALWAYS;
break;
case ITEM_SPAWN_MODE_TOSS_FADE1:
itemEntity->flags |= ITEM_ENTITY_FLAGS_800000 | ITEM_ENTITY_FLAGS_1000;
itemEntity->flags |= ITEM_ENTITY_FLAG_800000 | ITEM_ENTITY_FLAG_1000;
itemEntity->scale = 0.8f;
itemEntity->flags |= ITEM_ENTITY_FLAGS_TINY;
itemEntity->flags |= ITEM_ENTITY_FLAG_TINY;
break;
case ITEM_SPAWN_MODE_TOSS_FADE2:
itemEntity->flags |= ITEM_ENTITY_FLAGS_800000 | ITEM_ENTITY_FLAGS_1000;
itemEntity->flags |= ITEM_ENTITY_FLAGS_10000;
itemEntity->flags |= ITEM_ENTITY_FLAG_800000 | ITEM_ENTITY_FLAG_1000;
itemEntity->flags |= ITEM_ENTITY_FLAG_10000;
itemEntity->spawnType = ITEM_SPAWN_MODE_TOSS_FADE1;
itemEntity->scale = 0.8f;
itemEntity->flags |= ITEM_ENTITY_FLAGS_TINY;
itemEntity->flags |= ITEM_ENTITY_FLAG_TINY;
break;
case ITEM_SPAWN_MODE_TOSS_FADE3:
itemEntity->flags |= ITEM_ENTITY_FLAGS_800000 | ITEM_ENTITY_FLAGS_1000;
itemEntity->flags |= ITEM_ENTITY_FLAGS_400000;
itemEntity->flags |= ITEM_ENTITY_FLAG_800000 | ITEM_ENTITY_FLAG_1000;
itemEntity->flags |= ITEM_ENTITY_FLAG_400000;
itemEntity->spawnType = ITEM_SPAWN_MODE_TOSS_FADE1;
itemEntity->scale = 0.8f;
itemEntity->flags |= ITEM_ENTITY_FLAGS_TINY;
itemEntity->flags |= ITEM_ENTITY_FLAG_TINY;
break;
case ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS_SMALL:
itemEntity->flags |= ITEM_ENTITY_FLAGS_800000;
itemEntity->flags |= ITEM_ENTITY_FLAG_800000;
itemEntity->spawnType = ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS;
itemEntity->scale = 0.8f;
itemEntity->flags |= ITEM_ENTITY_FLAGS_TINY;
itemEntity->flags |= ITEM_ENTITY_FLAG_TINY;
break;
case ITEM_SPAWN_MODE_UNKNOWN_1B:
itemEntity->flags |= ITEM_ENTITY_FLAGS_800000 | ITEM_ENTITY_FLAGS_8000;
itemEntity->flags |= ITEM_ENTITY_FLAG_800000 | ITEM_ENTITY_FLAG_8000;
itemEntity->spawnType = ITEM_SPAWN_MODE_ITEM_BLOCK_SPAWN_ALWAYS;
itemEntity->scale = 0.8f;
itemEntity->flags |= ITEM_ENTITY_FLAGS_TINY;
itemEntity->flags |= ITEM_ENTITY_FLAG_TINY;
break;
case ITEM_SPAWN_MODE_ITEM_BLOCK_SPAWN_ALWAYS:
itemEntity->flags |= ITEM_ENTITY_FLAGS_800000 | ITEM_ENTITY_FLAGS_8000 | ITEM_ENTITY_FLAGS_NEVER_VANISH;
itemEntity->flags |= ITEM_ENTITY_FLAG_800000 | ITEM_ENTITY_FLAG_8000 | ITEM_ENTITY_FLAG_NEVER_VANISH;
break;
case ITEM_SPAWN_MODE_ITEM_BLOCK_COIN:
itemEntity->spawnType = ITEM_SPAWN_MODE_ITEM_BLOCK_SPAWN_ALWAYS;
itemEntity->flags |= ITEM_ENTITY_FLAGS_800000 | ITEM_ENTITY_FLAGS_8000 | ITEM_ENTITY_FLAGS_400 | ITEM_ENTITY_FLAGS_NEVER_VANISH;
itemEntity->flags |= ITEM_ENTITY_FLAG_800000 | ITEM_ENTITY_FLAG_8000 | ITEM_ENTITY_FLAG_400 | ITEM_ENTITY_FLAG_NEVER_VANISH;
break;
case ITEM_SPAWN_MODE_TOSS_HIGHER_NEVER_VANISH:
itemEntity->spawnType = ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS;
itemEntity->flags |= ITEM_ENTITY_FLAGS_800000 | ITEM_ENTITY_FLAGS_400 | ITEM_ENTITY_FLAGS_NEVER_VANISH;
itemEntity->flags |= ITEM_ENTITY_FLAGS_1000000;
itemEntity->flags |= ITEM_ENTITY_FLAG_800000 | ITEM_ENTITY_FLAG_400 | ITEM_ENTITY_FLAG_NEVER_VANISH;
itemEntity->flags |= ITEM_ENTITY_FLAG_1000000;
break;
}
@ -989,7 +989,7 @@ s32 make_item_entity(s32 itemID, f32 x, f32 y, f32 z, s32 itemSpawnMode, s32 pic
shadow = get_shadow_by_index(itemEntity->shadowIndex);
if (itemEntity->spawnType == ITEM_SPAWN_MODE_ITEM_BLOCK_SPAWN_ALWAYS) {
shadow->flags |= ENTITY_FLAGS_HIDDEN;
shadow->flags |= ENTITY_FLAG_HIDDEN;
}
x = itemEntity->position.x;
@ -1019,7 +1019,7 @@ s32 make_item_entity(s32 itemID, f32 x, f32 y, f32 z, s32 itemSpawnMode, s32 pic
}
if (itemEntity->itemID == ITEM_STAR_PIECE) {
itemEntity->flags &= ~ITEM_ENTITY_FLAGS_80;
itemEntity->flags &= ~ITEM_ENTITY_FLAG_80;
}
return id;
@ -1058,9 +1058,9 @@ s32 make_item_entity_at_player(s32 itemID, s32 category, s32 pickupMsgFlags) {
itemID &= 0xFFFF;
item->renderGroup = -1;
item->flags = (ITEM_ENTITY_FLAGS_CAM0 | ITEM_ENTITY_FLAGS_CAM1 | ITEM_ENTITY_FLAGS_CAM2 | ITEM_ENTITY_FLAGS_10 | ITEM_ENTITY_FLAGS_2000000);
item->flags = (ITEM_ENTITY_FLAG_CAM0 | ITEM_ENTITY_FLAG_CAM1 | ITEM_ENTITY_FLAG_CAM2 | ITEM_ENTITY_FLAG_10 | ITEM_ENTITY_FLAG_2000000);
if (category != ITEM_TYPE_CONSUMABLE) {
item->flags |= ITEM_ENTITY_FLAGS_4000000;
item->flags |= ITEM_ENTITY_FLAG_4000000;
}
item->pickupMsgFlags = pickupMsgFlags;
item->spawnType = ITEM_SPAWN_AT_PLAYER;
@ -1080,19 +1080,19 @@ s32 make_item_entity_at_player(s32 itemID, s32 category, s32 pickupMsgFlags) {
item->physicsData = NULL;
item->pickupDelay = 0;
item->wsFaceAngle = 0;
item->flags |= ITEM_ENTITY_FLAGS_TINY;
item->flags |= ITEM_ENTITY_FLAG_TINY;
if (gItemTable[itemID].typeFlags & ITEM_TYPE_FLAG_ENTITY_FULLSIZE) {
item->flags = (item->flags | ITEM_ENTITY_FLAGS_40000) & ~ITEM_ENTITY_FLAGS_TINY;
item->flags = (item->flags | ITEM_ENTITY_FLAG_40000) & ~ITEM_ENTITY_FLAG_TINY;
}
if (ItemEntityAlternatingSpawn != 0) {
item->flags |= ITEM_ENTITY_FLAGS_20000;
item->flags |= ITEM_ENTITY_FLAG_20000;
}
ItemEntityAlternatingSpawn = 1 - ItemEntityAlternatingSpawn;
item->shadowIndex = create_shadow_type(0, item->position.x, item->position.y, item->position.z);
shadow = get_shadow_by_index(item->shadowIndex);
shadow->flags |= ENTITY_FLAGS_HIDDEN;
shadow->flags |= ENTITY_FLAG_HIDDEN;
posX = item->position.x;
posY = item->position.y + 12.0f;
@ -1260,12 +1260,12 @@ void appendGfx_item_entity(void* data) {
s32 yOffset;
f32 rot;
if (itemEntity->flags & (ITEM_ENTITY_FLAGS_8000000 | ITEM_ENTITY_FLAGS_TRANSPARENT)) {
if (itemEntity->flags & ITEM_ENTITY_FLAGS_TRANSPARENT) {
if (itemEntity->flags & (ITEM_ENTITY_FLAG_8000000 | ITEM_ENTITY_FLAG_TRANSPARENT)) {
if (itemEntity->flags & ITEM_ENTITY_FLAG_TRANSPARENT) {
alpha = 255;
alpha = (itemEntity->alpha * alpha) / 255;
}
if (itemEntity->flags & ITEM_ENTITY_FLAGS_8000000) {
if (itemEntity->flags & ITEM_ENTITY_FLAG_8000000) {
u8 r, g, b, a;
get_background_color_blend(&r, &g, &b, &a);
@ -1273,7 +1273,7 @@ void appendGfx_item_entity(void* data) {
}
}
if (!(itemEntity->flags & ITEM_ENTITY_FLAGS_40000)) {
if (!(itemEntity->flags & ITEM_ENTITY_FLAG_40000)) {
yOffset = -2;
} else {
yOffset = -3;
@ -1286,7 +1286,7 @@ void appendGfx_item_entity(void* data) {
rot = clamp_angle(180.0f - gCameras[gCurrentCamID].currentYaw);
guTranslateF(mtxTranslate, itemEntity->position.x, itemEntity->position.y + yOffset, itemEntity->position.z);
guRotateF(mtxRotY, rot, 0.0f, 1.0f, 0.0f);
if (itemEntity->flags & ITEM_ENTITY_FLAGS_TINY) {
if (itemEntity->flags & ITEM_ENTITY_FLAG_TINY) {
guScaleF(mtxScale, itemEntity->scale, itemEntity->scale, itemEntity->scale);
guMtxCatF(mtxRotY, mtxScale, mtxRotY);
}
@ -1306,7 +1306,7 @@ void appendGfx_item_entity(void* data) {
gSPClearGeometryMode(gMasterGfxPos++, G_CULL_BOTH | G_LIGHTING);
gSPDisplayList(gMasterGfxPos++, D_8014C620);
if (itemEntity->flags & (ITEM_ENTITY_FLAGS_8000000 | ITEM_ENTITY_FLAGS_TRANSPARENT)) {
if (itemEntity->flags & (ITEM_ENTITY_FLAG_8000000 | ITEM_ENTITY_FLAG_TRANSPARENT)) {
if (D_80151328->flags != 0) {
gDPSetRenderMode(gMasterGfxPos++, AA_EN | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | G_RM_PASS,
AA_EN | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL |
@ -1322,7 +1322,7 @@ void appendGfx_item_entity(void* data) {
}
}
if (!(itemEntity->flags & ITEM_ENTITY_FLAGS_40000)) {
if (!(itemEntity->flags & ITEM_ENTITY_FLAG_40000)) {
gDPLoadTLUT_pal16(gMasterGfxPos++, 0, gHudElementCacheTablePalette[itemEntity->lookupPaletteIndex].data);
if (D_80151328->flags != 0) {
gDPSetTextureImage(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 12, gHudElementCacheTableRaster[itemEntity->lookupRasterIndex].data);
@ -1340,7 +1340,7 @@ void appendGfx_item_entity(void* data) {
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
gDPSetTileSize(gMasterGfxPos++, 2, 0, 0, 0x00FC, 0);
if (itemEntity->flags & (ITEM_ENTITY_FLAGS_8000000 | ITEM_ENTITY_FLAGS_TRANSPARENT)) {
if (itemEntity->flags & (ITEM_ENTITY_FLAG_8000000 | ITEM_ENTITY_FLAG_TRANSPARENT)) {
func_801491E4(mtxTranslate, 0, 0, 0x18, 0x18, alpha);
} else {
func_801491E4(mtxTranslate, 0, 0, 0x18, 0x18, 255);
@ -1374,7 +1374,7 @@ void appendGfx_item_entity(void* data) {
gDPSetTile(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 4, 0x0100, 2, 0, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
gDPSetTileSize(gMasterGfxPos++, 2, 0, 0, 0x00FC, 0);
if (itemEntity->flags & (ITEM_ENTITY_FLAGS_8000000 | ITEM_ENTITY_FLAGS_TRANSPARENT)) {
if (itemEntity->flags & (ITEM_ENTITY_FLAG_8000000 | ITEM_ENTITY_FLAG_TRANSPARENT)) {
func_801491E4(mtxTranslate, 0, 0, 0x20, 0x20, alpha);
} else {
func_801491E4(mtxTranslate, 0, 0, 0x20, 0x20, 255);
@ -1411,12 +1411,12 @@ void draw_item_entities(void) {
if (itemEntity != NULL
&& itemEntity->flags != 0
&& !(itemEntity->flags & ITEM_ENTITY_FLAGS_HIDDEN)
&& !(itemEntity->flags & ITEM_ENTITY_FLAG_HIDDEN)
&& (itemEntity->flags & (1 << gCurrentCamID))
&& !(itemEntity->flags & ITEM_ENTITY_FLAGS_100000)
&& !(itemEntity->flags & ITEM_ENTITY_FLAG_100000)
&& (itemEntity->renderGroup == -1 || ItemEntityRenderGroup == itemEntity->renderGroup))
{
if (!(itemEntity->flags & ITEM_ENTITY_FLAGS_TRANSPARENT)) {
if (!(itemEntity->flags & ITEM_ENTITY_FLAG_TRANSPARENT)) {
rtPtr->renderMode = RENDER_MODE_ALPHATEST;
} else {
rtPtr->renderMode = RENDER_MODE_SURFACE_XLU_LAYER1;
@ -1481,9 +1481,9 @@ void render_item_entities(void) {
ItemEntity* item = gCurrentItemEntities[i];
if (item != NULL) {
if ((item->flags != 0)) {
if (!(item->flags & ITEM_ENTITY_FLAGS_HIDDEN)) {
if ((item->flags & ITEM_ENTITY_FLAGS_100000)) {
if (!(item->flags & ITEM_ENTITY_FLAGS_40000)) {
if (!(item->flags & ITEM_ENTITY_FLAG_HIDDEN)) {
if ((item->flags & ITEM_ENTITY_FLAG_100000)) {
if (!(item->flags & ITEM_ENTITY_FLAG_40000)) {
offsetY = -4;
} else {
offsetY = 0;
@ -1497,7 +1497,7 @@ void render_item_entities(void) {
rotX = clamp_angle(180.0f - gCameras[gCurrentCamID].currentYaw);
guTranslateF(sp58, item->position.x, -item->position.y - offsetY, item->position.z);
guRotateF(sp98, rotX, 0.0f, 1.0f, 0.0f);
if (item->flags & ITEM_ENTITY_FLAGS_TINY) {
if (item->flags & ITEM_ENTITY_FLAG_TINY) {
guScaleF(spD8, item->scale, item->scale, item->scale);
guMtxCatF(sp98, spD8, sp98);
}
@ -1515,15 +1515,15 @@ void render_item_entities(void) {
gSPDisplayList(gMasterGfxPos++, D_8014C620);
alpha = 255;
if (item->flags & (ITEM_ENTITY_FLAGS_TRANSPARENT | ITEM_ENTITY_FLAGS_8000000)) {
if (item->flags & ITEM_ENTITY_FLAGS_TRANSPARENT) {
if (item->flags & (ITEM_ENTITY_FLAG_TRANSPARENT | ITEM_ENTITY_FLAG_8000000)) {
if (item->flags & ITEM_ENTITY_FLAG_TRANSPARENT) {
alpha = item->alpha * alpha / 255;
}
if (item->flags & ITEM_ENTITY_FLAGS_8000000) {
if (item->flags & ITEM_ENTITY_FLAG_8000000) {
get_background_color_blend(&r1, &g1, &b1, &a1);
alpha = alpha * (255 - a1) / 255;
}
if (item->flags & (ITEM_ENTITY_FLAGS_TRANSPARENT | ITEM_ENTITY_FLAGS_8000000)) {
if (item->flags & (ITEM_ENTITY_FLAG_TRANSPARENT | ITEM_ENTITY_FLAG_8000000)) {
if (D_80151328->flags) {
gDPSetRenderMode(gMasterGfxPos++, AA_EN | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | G_RM_PASS,
AA_EN | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA));
@ -1536,7 +1536,7 @@ void render_item_entities(void) {
}
}
if (!(item->flags & ITEM_ENTITY_FLAGS_40000)) {
if (!(item->flags & ITEM_ENTITY_FLAG_40000)) {
gDPLoadTLUT_pal16(gMasterGfxPos++, 0, gHudElementCacheTablePalette[item->lookupPaletteIndex].data);
if (D_80151328->flags) {
gDPSetTextureImage(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 12, gHudElementCacheTableRaster[item->lookupRasterIndex].data);
@ -1549,7 +1549,7 @@ void render_item_entities(void) {
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, G_TX_RENDERTILE, 1, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
gDPSetTile(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 4, 0x0100, 2, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
gDPSetTileSize(gMasterGfxPos++, 2, 0, 0, 0x00FC, 0);
if (item->flags & (ITEM_ENTITY_FLAGS_TRANSPARENT | ITEM_ENTITY_FLAGS_8000000)) {
if (item->flags & (ITEM_ENTITY_FLAG_TRANSPARENT | ITEM_ENTITY_FLAG_8000000)) {
func_801491E4(sp58, 0, 0, 24, 24, alpha);
} else {
func_801491E4(sp58, 0, 0, 24, 24, 255);
@ -1577,7 +1577,7 @@ void render_item_entities(void) {
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, G_TX_RENDERTILE, 1, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
gDPSetTile(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 4, 0x0100, 2, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
gDPSetTileSize(gMasterGfxPos++, 2, 0, 0, 0x00FC, 0);
if (item->flags & (ITEM_ENTITY_FLAGS_TRANSPARENT | ITEM_ENTITY_FLAGS_8000000)) {
if (item->flags & (ITEM_ENTITY_FLAG_TRANSPARENT | ITEM_ENTITY_FLAG_8000000)) {
func_801491E4(sp58, 0, 0, 32, 32, alpha);
} else {
func_801491E4(sp58, 0, 0, 32, 32, 255);
@ -1658,12 +1658,12 @@ void func_80133A94(s32 idx, s32 itemID) {
item->itemID = itemID;
item->flags |= ITEM_ENTITY_FLAGS_TINY;
item->flags &= ~ITEM_ENTITY_FLAGS_40000;
item->flags |= ITEM_ENTITY_FLAG_TINY;
item->flags &= ~ITEM_ENTITY_FLAG_40000;
if (gItemTable[itemID].typeFlags & ITEM_TYPE_FLAG_ENTITY_FULLSIZE) {
item->flags |= ITEM_ENTITY_FLAGS_40000;
item->flags &= ~ITEM_ENTITY_FLAGS_TINY;
item->flags |= ITEM_ENTITY_FLAG_40000;
item->flags &= ~ITEM_ENTITY_FLAG_TINY;
}
item_entity_load(item);
@ -1700,8 +1700,8 @@ s32 test_item_player_collision(ItemEntity* item) {
actionState = playerStatus->actionState;
if (item->flags & ITEM_ENTITY_FLAGS_100) {
item->flags &= ~ITEM_ENTITY_FLAGS_100;
if (item->flags & ITEM_ENTITY_FLAG_100) {
item->flags &= ~ITEM_ENTITY_FLAG_100;
return TRUE;
}
@ -1713,7 +1713,7 @@ s32 test_item_player_collision(ItemEntity* item) {
return FALSE;
}
if (item->flags & ITEM_ENTITY_FLAGS_200000) {
if (item->flags & ITEM_ENTITY_FLAG_200000) {
return FALSE;
}
@ -1721,7 +1721,7 @@ s32 test_item_player_collision(ItemEntity* item) {
return FALSE;
}
if (item->flags & ITEM_ENTITY_FLAGS_HIDDEN) {
if (item->flags & ITEM_ENTITY_FLAG_HIDDEN) {
return FALSE;
}
@ -1795,19 +1795,19 @@ s32 test_item_player_collision(ItemEntity* item) {
}
if (cond) {
if (item->flags & ITEM_ENTITY_FLAGS_80) {
if (item->flags & ITEM_ENTITY_FLAG_80) {
if (D_801565A6 != 0) {
D_801565A6--;
return FALSE;
} else {
item->flags &= ~ITEM_ENTITY_FLAGS_80;
item->flags &= ~ITEM_ENTITY_FLAG_80;
}
}
return TRUE;
}
if (item->flags & ITEM_ENTITY_FLAGS_80) {
item->flags &= ~ITEM_ENTITY_FLAGS_80;
if (item->flags & ITEM_ENTITY_FLAG_80) {
item->flags &= ~ITEM_ENTITY_FLAG_80;
}
return FALSE;
}
@ -1845,11 +1845,11 @@ s32 test_item_entity_position(f32 x, f32 y, f32 z, f32 dist) {
continue;
}
if (item->flags & ITEM_ENTITY_FLAGS_HIDDEN) {
if (item->flags & ITEM_ENTITY_FLAG_HIDDEN) {
continue;
}
if (item->flags & ITEM_ENTITY_FLAGS_200000) {
if (item->flags & ITEM_ENTITY_FLAG_200000) {
continue;
}
@ -1867,7 +1867,7 @@ void set_item_entity_flags(s32 index, s32 flags) {
ItemEntity* itemEntity = gCurrentItemEntities[index];
itemEntity->flags |= flags;
if (itemEntity->flags & ITEM_ENTITY_FLAGS_200000) {
if (itemEntity->flags & ITEM_ENTITY_FLAG_200000) {
D_801565A8 = 1;
}
}
@ -1881,7 +1881,7 @@ void clear_item_entity_flags(s32 index, s32 flags) {
void func_801341B0(s32 index) {
ItemEntity* itemEntity = gCurrentItemEntities[index];
gOverrideFlags |= GLOBAL_OVERRIDES_40;
itemEntity->flags |= ITEM_ENTITY_FLAGS_100;
itemEntity->flags |= ITEM_ENTITY_FLAG_100;
}
/// @returns TRUE when "you got X" popup is on-screen
@ -1939,10 +1939,10 @@ void update_item_entity_collectable(ItemEntity* item) {
item->physicsData = physData;
ASSERT(physData != NULL);
if (item->flags & ITEM_ENTITY_FLAGS_1000000) {
if (item->flags & ITEM_ENTITY_FLAG_1000000) {
physData->verticalVelocity = 16.0f;
physData->gravity = 2.0f;
} else if (!(item->flags & ITEM_ENTITY_FLAGS_10000)) {
} else if (!(item->flags & ITEM_ENTITY_FLAG_10000)) {
physData->verticalVelocity = 12.0f;
physData->gravity = 2.0f;
} else {
@ -2012,7 +2012,7 @@ void update_item_entity_collectable(ItemEntity* item) {
}
}
if (!(item->flags & ITEM_ENTITY_FLAGS_1000000)) {
if (!(item->flags & ITEM_ENTITY_FLAG_1000000)) {
temp = rand_int(2000);
temp = (temp / 1000.0f) + 1.5;
theta = DEG_TO_RAD(physData->moveAngle);
@ -2031,7 +2031,7 @@ void update_item_entity_collectable(ItemEntity* item) {
}
} else {
physData->moveAngle = clamp_angle(item->wsFaceAngle);
if (!(item->flags & ITEM_ENTITY_FLAGS_40000000)) {
if (!(item->flags & ITEM_ENTITY_FLAG_40000000)) {
temp = ((item->wsFaceAngle / 360) * 0.6) + 1.5;
} else {
temp = 2.1f;
@ -2047,7 +2047,7 @@ void update_item_entity_collectable(ItemEntity* item) {
physData->unk_1C = 180;
physData->unk_20 = 0;
} else {
if (!(item->flags & ITEM_ENTITY_FLAGS_400000)) {
if (!(item->flags & ITEM_ENTITY_FLAG_400000)) {
physData->unk_1C = 0x11;
} else {
physData->unk_1C = 0x14;
@ -2078,7 +2078,7 @@ void update_item_entity_collectable(ItemEntity* item) {
physData->unk_20 = 1;
}
if (item->flags & ITEM_ENTITY_FLAGS_800) {
if (item->flags & ITEM_ENTITY_FLAG_800) {
set_global_flag(item->boundVar);
}
item->state = 1;
@ -2094,9 +2094,9 @@ void update_item_entity_collectable(ItemEntity* item) {
break;
}
if (!(item->flags & ITEM_ENTITY_FLAGS_NEVER_VANISH)) {
if (!(item->flags & ITEM_ENTITY_FLAG_NEVER_VANISH)) {
if (!(gOverrideFlags & (GLOBAL_OVERRIDES_200 | GLOBAL_OVERRIDES_DISABLE_BATTLES))) {
if (!(item->flags & ITEM_ENTITY_FLAGS_200000)) {
if (!(item->flags & ITEM_ENTITY_FLAG_200000)) {
physData->unk_1C--;
if (physData->unk_1C < 0) {
item->state = 2;
@ -2106,8 +2106,8 @@ void update_item_entity_collectable(ItemEntity* item) {
}
}
if (!(item->flags & ITEM_ENTITY_FLAGS_FIXED)) {
if (!(item->flags & ITEM_ENTITY_FLAGS_200000)) {
if (!(item->flags & ITEM_ENTITY_FLAG_FIXED)) {
if (!(item->flags & ITEM_ENTITY_FLAG_200000)) {
physData->verticalVelocity -= physData->gravity;
if (physData->verticalVelocity < -16.0) {
physData->verticalVelocity = -16.0f;
@ -2125,7 +2125,7 @@ void update_item_entity_collectable(ItemEntity* item) {
break;
}
if (!(item->flags & (ITEM_ENTITY_FLAGS_20000000 | ITEM_ENTITY_FLAGS_10000000)) &&
if (!(item->flags & (ITEM_ENTITY_FLAG_20000000 | ITEM_ENTITY_FLAG_10000000)) &&
item->spawnType != ITEM_SPAWN_MODE_ITEM_BLOCK_SPAWN_ALWAYS &&
item->spawnType != ITEM_SPAWN_MODE_TOSS_FADE1 &&
physData->verticalVelocity > 0.0f)
@ -2148,7 +2148,7 @@ void update_item_entity_collectable(ItemEntity* item) {
}
}
if (!(item->flags & (ITEM_ENTITY_FLAGS_20000000 | ITEM_ENTITY_FLAGS_10000000)) &&
if (!(item->flags & (ITEM_ENTITY_FLAG_20000000 | ITEM_ENTITY_FLAG_10000000)) &&
item->spawnType != ITEM_SPAWN_MODE_ITEM_BLOCK_SPAWN_ALWAYS &&
item->spawnType != ITEM_SPAWN_MODE_TOSS_FADE1 &&
(physData->velx != 0.0f || physData->velz != 0.0f))
@ -2176,7 +2176,7 @@ void update_item_entity_collectable(ItemEntity* item) {
}
}
if (!(item->flags & ITEM_ENTITY_FLAGS_10000000) &&
if (!(item->flags & ITEM_ENTITY_FLAG_10000000) &&
item->spawnType != ITEM_SPAWN_MODE_ITEM_BLOCK_SPAWN_ALWAYS &&
physData->verticalVelocity <= 0.0)
{
@ -2211,7 +2211,7 @@ void update_item_entity_collectable(ItemEntity* item) {
physData->verticalVelocity = 0.0f;
physData->velx = 0.0f;
physData->velz = 0.0f;
item->flags |= ITEM_ENTITY_FLAGS_20000000;
item->flags |= ITEM_ENTITY_FLAG_20000000;
} else {
if (IS_BADGE(item->itemID)) {
sfx_play_sound_at_position(SOUND_21B, 0, item->position.x, item->position.y, item->position.z);
@ -2260,7 +2260,7 @@ void update_item_entity_collectable(ItemEntity* item) {
}
if (item->state == 3) {
if (item->flags & ITEM_ENTITY_FLAGS_400) {
if (item->flags & ITEM_ENTITY_FLAG_400) {
set_global_flag(item->boundVar);
}
@ -2358,21 +2358,21 @@ void update_item_entity_collectable(ItemEntity* item) {
void func_8013559C(ItemEntity* itemEntity) {
if (itemEntity->state == 1) {
ItemEntityPhysicsData* physicsData = itemEntity->physicsData;
s32 flag = (itemEntity->flags & ITEM_ENTITY_FLAGS_20000) > 0;
s32 flag = (itemEntity->flags & ITEM_ENTITY_FLAG_20000) > 0;
if (itemEntity->spawnType != ITEM_SPAWN_MODE_ITEM_BLOCK_SPAWN_ALWAYS) {
if (itemEntity->spawnType != ITEM_SPAWN_MODE_TOSS_FADE1) {
if (physicsData->unk_1C < 60) {
if ((itemEntity->flags & ITEM_ENTITY_FLAGS_200000) || ((gGameStatusPtr->frameCounter + flag) & 1)) {
itemEntity->flags &= ~ITEM_ENTITY_FLAGS_HIDDEN;
if ((itemEntity->flags & ITEM_ENTITY_FLAG_200000) || ((gGameStatusPtr->frameCounter + flag) & 1)) {
itemEntity->flags &= ~ITEM_ENTITY_FLAG_HIDDEN;
} else {
itemEntity->flags |= ITEM_ENTITY_FLAGS_HIDDEN;
itemEntity->flags |= ITEM_ENTITY_FLAG_HIDDEN;
}
}
} else {
if (physicsData->unk_1C < 10) {
itemEntity->alpha = physicsData->unk_1C * 28;
itemEntity->flags |= ITEM_ENTITY_FLAGS_TRANSPARENT;
itemEntity->flags |= ITEM_ENTITY_FLAG_TRANSPARENT;
}
}
}
@ -2409,7 +2409,7 @@ void update_item_entity_temp(ItemEntity* itemEntity) {
if (itemEntity->state == 0) {
isPickingUpItem = TRUE;
if (!(itemEntity->flags & ITEM_ENTITY_FLAGS_2000000)) {
if (!(itemEntity->flags & ITEM_ENTITY_FLAG_2000000)) {
disable_player_input();
partner_disable_input();
gOverrideFlags |= GLOBAL_OVERRIDES_40;
@ -2421,10 +2421,10 @@ void update_item_entity_temp(ItemEntity* itemEntity) {
switch (itemEntity->state) {
case 1:
if (!(itemEntity->flags & ITEM_ENTITY_FLAGS_2000000)) {
if (!(itemEntity->flags & ITEM_ENTITY_FLAG_2000000)) {
s32 actionState = playerStatus->actionState;
if (!(playerStatus->animFlags & PA_FLAGS_NO_OOB_RESPAWN) &&
if (!(playerStatus->animFlags & PA_FLAG_NO_OOB_RESPAWN) &&
((playerStatus->timeInAir == 0 &&
actionState != ACTION_STATE_JUMP &&
actionState != ACTION_STATE_FALLING) ||
@ -2453,11 +2453,11 @@ void update_item_entity_temp(ItemEntity* itemEntity) {
}
}
D_801568E0 = hud_element_create(gItemHudScripts[gItemTable[itemEntity->itemID].hudElemID].enabled);
hud_element_set_flags(D_801568E0, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(D_801568E0, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_801568E0, -100, -100);
itemEntity->state = 2;
if (!(itemEntity->flags & ITEM_ENTITY_FLAGS_2000000)) {
if (!(itemEntity->flags & ITEM_ENTITY_FLAG_2000000)) {
if (gItemTable[itemEntity->itemID].typeFlags & ITEM_TYPE_FLAG_CONSUMABLE) {
for (i = 0; i < ARRAY_COUNT(playerData->invItems); i++) {
if (playerData->invItems[i] == ITEM_NONE) {
@ -2530,7 +2530,7 @@ void update_item_entity_temp(ItemEntity* itemEntity) {
}
block_47: // TODO required to match
if (itemEntity->flags & ITEM_ENTITY_FLAGS_80000000) {
if (itemEntity->flags & ITEM_ENTITY_FLAG_80000000) {
set_global_flag(itemEntity->boundVar);
}
if (itemEntity->state == 0xA) {
@ -2548,7 +2548,7 @@ block_47: // TODO required to match
(gItemTable[itemEntity->itemID].typeFlags & ITEM_TYPE_FLAG_KEY) ||
(itemEntity->itemID == ITEM_STAR_PIECE) ||
(gItemTable[itemEntity->itemID].typeFlags & ITEM_TYPE_FLAG_GEAR) ||
(itemEntity->flags & ITEM_ENTITY_FLAGS_4000000) ||
(itemEntity->flags & ITEM_ENTITY_FLAG_4000000) ||
(itemEntity->pickupMsgFlags & 2))
{
itemEntity->position.x = playerStatus->position.x;
@ -2574,7 +2574,7 @@ block_47: // TODO required to match
(gItemTable[itemEntity->itemID].typeFlags & ITEM_TYPE_FLAG_KEY) ||
(itemEntity->itemID == ITEM_STAR_PIECE) ||
(gItemTable[itemEntity->itemID].typeFlags & ITEM_TYPE_FLAG_GEAR) ||
(itemEntity->flags & ITEM_ENTITY_FLAGS_4000000) ||
(itemEntity->flags & ITEM_ENTITY_FLAG_4000000) ||
(itemEntity->pickupMsgFlags & 2))
{
suggest_player_anim_setUnkFlag(ANIM_Mario_6000C);
@ -2586,10 +2586,10 @@ block_47: // TODO required to match
(gItemTable[itemEntity->itemID].typeFlags & ITEM_TYPE_FLAG_KEY) ||
itemEntity->itemID == ITEM_STAR_PIECE ||
(gItemTable[itemEntity->itemID].typeFlags & ITEM_TYPE_FLAG_GEAR) ||
(itemEntity->flags & ITEM_ENTITY_FLAGS_4000000) ||
(itemEntity->flags & ITEM_ENTITY_FLAG_4000000) ||
(itemEntity->pickupMsgFlags & 2))
{
itemEntity->flags &= ~ITEM_ENTITY_FLAGS_HIDDEN;
itemEntity->flags &= ~ITEM_ENTITY_FLAG_HIDDEN;
}
}
@ -2612,7 +2612,7 @@ block_47: // TODO required to match
hide_item_entity(itemEntity);
if (func_800DFCF4() &&
playerStatus->actionState != ACTION_STATE_USE_SPINNING_FLOWER &&
!(playerStatus->animFlags & PA_FLAGS_NO_OOB_RESPAWN))
!(playerStatus->animFlags & PA_FLAG_NO_OOB_RESPAWN))
{
set_action_state(ACTION_STATE_IDLE);
}
@ -2626,8 +2626,8 @@ block_47: // TODO required to match
}
break;
case 3:
if (!(gWindows[12].flags & WINDOW_FLAGS_INITIAL_ANIMATION) &&
!(gWindows[19].flags & WINDOW_FLAGS_INITIAL_ANIMATION))
if (!(gWindows[12].flags & WINDOW_FLAG_INITIAL_ANIMATION) &&
!(gWindows[19].flags & WINDOW_FLAG_INITIAL_ANIMATION))
{
itemEntity->state = 4;
}
@ -2667,7 +2667,7 @@ block_47: // TODO required to match
break;
}
case 9:
if (!(itemEntity->flags & ITEM_ENTITY_FLAGS_2000000)) {
if (!(itemEntity->flags & ITEM_ENTITY_FLAG_2000000)) {
set_time_freeze_mode(TIME_FREEZE_NORMAL);
enable_player_input();
partner_enable_input();
@ -2711,9 +2711,9 @@ block_47: // TODO required to match
}
break;
case 11:
if (!(gWindows[12].flags & WINDOW_FLAGS_INITIAL_ANIMATION) &&
!(gWindows[17].flags & WINDOW_FLAGS_INITIAL_ANIMATION) &&
!(gWindows[19].flags & WINDOW_FLAGS_INITIAL_ANIMATION))
if (!(gWindows[12].flags & WINDOW_FLAG_INITIAL_ANIMATION) &&
!(gWindows[17].flags & WINDOW_FLAG_INITIAL_ANIMATION) &&
!(gWindows[19].flags & WINDOW_FLAG_INITIAL_ANIMATION))
{
itemEntity->state = 0xC;
}
@ -2763,9 +2763,9 @@ block_47: // TODO required to match
}
break;
case 14:
if (!(gWindows[12].flags & WINDOW_FLAGS_INITIAL_ANIMATION) &&
!(gWindows[17].flags & WINDOW_FLAGS_INITIAL_ANIMATION) &&
!(gWindows[19].flags & WINDOW_FLAGS_INITIAL_ANIMATION))
if (!(gWindows[12].flags & WINDOW_FLAG_INITIAL_ANIMATION) &&
!(gWindows[17].flags & WINDOW_FLAG_INITIAL_ANIMATION) &&
!(gWindows[19].flags & WINDOW_FLAG_INITIAL_ANIMATION))
{
itemEntity->state = 15;
}
@ -2799,7 +2799,7 @@ void func_801363A0(ItemEntity* itemEntity) {
case 2:
case 10:
if (!(itemData->typeFlags & ITEM_TYPE_FLAG_BADGE)) {
if (!(itemEntity->flags & ITEM_ENTITY_FLAGS_4000000) || (itemEntity->pickupMsgFlags & 0x4)) {
if (!(itemEntity->flags & ITEM_ENTITY_FLAG_4000000) || (itemEntity->pickupMsgFlags & 0x4)) {
itemMsg = MSG_Menus_0058;
} else {
itemMsg = MSG_Menus_005A;
@ -2828,7 +2828,7 @@ void func_801363A0(ItemEntity* itemEntity) {
s1 = 160 - offsetY / 2;
s3 = 76;
} else {
if (!(itemEntity->flags & ITEM_ENTITY_FLAGS_4000000) || (itemEntity->pickupMsgFlags & 0x4)) {
if (!(itemEntity->flags & ITEM_ENTITY_FLAG_4000000) || (itemEntity->pickupMsgFlags & 0x4)) {
itemMsg = MSG_Menus_0059;
} else {
itemMsg = MSG_Menus_005B;
@ -2897,7 +2897,7 @@ void func_8013673C(ItemEntity* itemEntity, s32 posX, s32 posY) {
case 10:
case 11:
if (!(itemData->typeFlags & ITEM_TYPE_FLAG_BADGE)) {
if (!(itemEntity->flags & ITEM_ENTITY_FLAGS_4000000) || (itemEntity->pickupMsgFlags & 0x4)) {
if (!(itemEntity->flags & ITEM_ENTITY_FLAG_4000000) || (itemEntity->pickupMsgFlags & 0x4)) {
itemMsg = MSG_Menus_0058;
} else {
itemMsg = MSG_Menus_005A;
@ -2914,7 +2914,7 @@ void func_8013673C(ItemEntity* itemEntity, s32 posX, s32 posY) {
itemMsg = MSG_Menus_005C;
}
} else {
if (!(itemEntity->flags & ITEM_ENTITY_FLAGS_4000000) || (itemEntity->pickupMsgFlags & 0x4)) {
if (!(itemEntity->flags & ITEM_ENTITY_FLAG_4000000) || (itemEntity->pickupMsgFlags & 0x4)) {
itemMsg = MSG_Menus_0059;
} else {
itemMsg = MSG_Menus_005B;

View File

@ -55,7 +55,7 @@ void func_802B71E8_E202F8(void) {
FoldImageRecPart sp20;
Matrix4f sp38, sp78;
if (gPlayerStatus.animFlags & PA_FLAGS_INTERACT_PROMPT_AVAILABLE) {
if (gPlayerStatus.animFlags & PA_FLAG_INTERACT_PROMPT_AVAILABLE) {
guScaleF(sp38, D_802B7CB8_E20DC8->scale, D_802B7CB8_E20DC8->scale, D_802B7CB8_E20DC8->scale);
guRotateF(sp78, D_802B7CB8_E20DC8->unk_0C - gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
guMtxCatF(sp38, sp78, sp38);
@ -106,7 +106,7 @@ s32 func_802B7450_E20560(void) {
curInteraction = -1;
break;
}
} else if (((playerStatus->flags & (PS_FLAGS_HAS_CONVERSATION_NPC | PS_FLAGS_INPUT_DISABLED)) == PS_FLAGS_HAS_CONVERSATION_NPC)
} else if (((playerStatus->flags & (PS_FLAG_HAS_CONVERSATION_NPC | PS_FLAG_INPUT_DISABLED)) == PS_FLAG_HAS_CONVERSATION_NPC)
&& (npc != NULL) && (npc->flags & NPC_FLAG_10000000)) {
curInteraction = npc->npcID | COLLISION_WITH_NPC_BIT;
if (playerStatus->interactingWithID == curInteraction) {
@ -114,7 +114,7 @@ s32 func_802B7450_E20560(void) {
}
} else {
playerStatus->interactingWithID = -1;
playerStatus->flags &= ~PS_FLAGS_INTERACTED;
playerStatus->flags &= ~PS_FLAG_INTERACTED;
return FALSE;
}
} else {
@ -122,24 +122,24 @@ s32 func_802B7450_E20560(void) {
if (!(curInteraction & COLLISION_WITH_NPC_BIT)) {
if (!should_collider_allow_interact(curInteraction)) {
playerStatus->interactingWithID = -1;
playerStatus->flags &= ~PS_FLAGS_INTERACTED;
playerStatus->flags &= ~PS_FLAG_INTERACTED;
return FALSE;
}
}
} else {
if (!phys_can_player_interact()) {
playerStatus->interactingWithID = -1;
playerStatus->flags &= ~PS_FLAGS_INTERACTED;
playerStatus->flags &= ~PS_FLAG_INTERACTED;
return FALSE;
}
}
}
if (playerStatus->interactingWithID == curInteraction) {
if ((playerStatus->flags & PS_FLAGS_INTERACTED)) {
if ((playerStatus->flags & PS_FLAG_INTERACTED)) {
return FALSE;
}
} else {
playerStatus->flags &= ~PS_FLAGS_INTERACTED;
playerStatus->flags &= ~PS_FLAG_INTERACTED;
}
playerStatus->interactingWithID = curInteraction;
@ -172,7 +172,7 @@ void func_802B75E8_E206F8(void) {
yTemp = playerStatus->position.y + playerStatus->colliderHeight;
unk_21 = D_802B7CB8_E20DC8->unk_21;
y = D_802B7CB8_E20DC8->pos.y;
if (!(playerStatus->animFlags & PA_FLAGS_USING_PEACH_PHYSICS)) {
if (!(playerStatus->animFlags & PA_FLAG_USING_PEACH_PHYSICS)) {
delta = (yTemp + 8.0f + unk_21 - y) * 0.25f;
} else {
delta = (yTemp + 2.0f + unk_21 - y) * 0.25f;
@ -236,7 +236,7 @@ void func_802B7728_E20838(void) {
actionState = playerStatus->actionState;
if (!func_802B7450_E20560() ||
(playerStatus->inputEnabledCounter != 0) ||
(playerStatus->flags & PS_FLAGS_PAUSED) ||
(playerStatus->flags & PS_FLAG_PAUSED) ||
!(actionState == ACTION_STATE_IDLE || actionState == ACTION_STATE_WALK || actionState == ACTION_STATE_RUN))
{
D_802B7CB8_E20DC8->unk_23 = 3;
@ -244,7 +244,7 @@ void func_802B7728_E20838(void) {
if ((playerStatus->interactingWithID >= 0) &&
(playerStatus->interactingWithID & 0x4000) &&
!(get_entity_by_index(playerStatus->interactingWithID)->flags & ENTITY_FLAGS_SHOWS_INSPECT_PROMPT))
!(get_entity_by_index(playerStatus->interactingWithID)->flags & ENTITY_FLAG_SHOWS_INSPECT_PROMPT))
{
D_802B7CB8_E20DC8->unk_23 = 3;
}
@ -255,7 +255,7 @@ void func_802B79C8_E20AD8(void) {
gPlayerStatusPtr->interactingWithID = -1;
InteractNotificationCallback = NULL;
gPlayerStatusPtr->encounteredNPC = NULL;
gPlayerStatusPtr->animFlags &= ~PA_FLAGS_INTERACT_PROMPT_AVAILABLE;
gPlayerStatusPtr->animFlags &= ~PA_FLAG_INTERACT_PROMPT_AVAILABLE;
func_800EF3D4(0);
partner_reset_tether_distance();
}

View File

@ -41,8 +41,8 @@ s32 func_802B704C(void) {
PlayerStatus* playerStatus = &gPlayerStatus;
if (!is_starting_conversation()) {
if (!(playerStatus->flags & PS_FLAGS_PAUSED)) {
if (playerStatus->animFlags & PA_FLAGS_USING_PULSE_STONE) {
if (!(playerStatus->flags & PS_FLAG_PAUSED)) {
if (playerStatus->animFlags & PA_FLAG_USING_PULSE_STONE) {
if (!has_valid_conversation_npc()) {
if (!func_800E06D8()) {
s32 dx = abs((gGameStatusPtr->mapID % 7) - 2);
@ -70,7 +70,7 @@ void func_802B7140(void) {
D_802B7D18_E22588->pos.x = playerStatus->position.x;
D_802B7D18_E22588->pos.y = playerStatus->position.y + playerStatus->colliderHeight + 8.0f;
D_802B7D18_E22588->pos.z = playerStatus->position.z;
playerStatus->animFlags |= PA_FLAGS_40;
playerStatus->animFlags |= PA_FLAG_40;
PulseStoneNotificationCallback = func_802B74F0;
}
@ -81,7 +81,7 @@ void func_802B71D4(void) {
s32 var_v1;
s32 dx, dy;
if (playerStatus->animFlags & PA_FLAGS_40) {
if (playerStatus->animFlags & PA_FLAG_40) {
guScaleF(sp18, D_802B7D18_E22588->scale, D_802B7D18_E22588->scale, D_802B7D18_E22588->scale);
guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
guMtxCatF(sp18, sp58, sp18);
@ -156,7 +156,7 @@ void func_802B74F0(void) {
if (!func_802B704C()) {
PulseStoneNotificationCallback = NULL;
playerStatus->animFlags &= ~PA_FLAGS_40;
playerStatus->animFlags &= ~PA_FLAG_40;
return;
}

View File

@ -33,7 +33,7 @@ void func_802B7000_E225B0(void) {
FoldImageRecPart foldImage;
s32 temp;
if (gPlayerStatus.animFlags & PA_FLAGS_100) {
if (gPlayerStatus.animFlags & PA_FLAG_100) {
guScaleF(matrix1, D_802B7C78_E23228->scale, D_802B7C78_E23228->scale, D_802B7C78_E23228->scale);
guRotateF(matrix2, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
guMtxCatF(matrix1, matrix2, matrix1);
@ -94,7 +94,7 @@ void func_802B72C0_E22870(void) {
D_802B7C78_E23228->unk_28 = 0xFF;
gPlayerStatus.animFlags |= PA_FLAGS_100;
gPlayerStatus.animFlags |= PA_FLAG_100;
ISpyNotificationCallback = &func_802B735C_E2290C;
}
@ -115,7 +115,7 @@ void func_802B735C_E2290C(void) {
{
cond = gGameStatusPtr->keepUsingPartnerOnMapChange;
} else {
cond = playerStatus->flags & (PS_FLAGS_INPUT_DISABLED | PS_FLAGS_NO_STATIC_COLLISION);
cond = playerStatus->flags & (PS_FLAG_INPUT_DISABLED | PS_FLAG_NO_STATIC_COLLISION);
}
if (!cond) {
@ -123,7 +123,7 @@ void func_802B735C_E2290C(void) {
}
break;
case 1:
if (playerStatus->flags & PS_FLAGS_PAUSED) {
if (playerStatus->flags & PS_FLAG_PAUSED) {
D_802B7C78_E23228->unk_24 = 3;
return;
}
@ -140,7 +140,7 @@ void func_802B735C_E2290C(void) {
break;
case 3:
D_802B7C78_E23228->scale = 0.53f;
if (D_802B7C78_E23228->unk_18 >= 47 || playerStatus->flags & PS_FLAGS_PAUSED) {
if (D_802B7C78_E23228->unk_18 >= 47 || playerStatus->flags & PS_FLAG_PAUSED) {
D_802B7C78_E23228->unk_28 -= 64;
if (D_802B7C78_E23228->unk_28 < 0) {
D_802B7C78_E23228->unk_28 = 0;
@ -151,7 +151,7 @@ void func_802B735C_E2290C(void) {
if (D_802B7C78_E23228->unk_18++ > 50) {
gCurrentHiddenPanels.activateISpy = FALSE;
ISpyNotificationCallback = NULL;
playerStatus->animFlags &= ~PA_FLAGS_100;
playerStatus->animFlags &= ~PA_FLAG_100;
}
break;
}

View File

@ -1134,33 +1134,33 @@ void update_entities(void) {
if (entity != NULL) {
entity_numEntities++;
if (!(entity->flags & ENTITY_FLAGS_SKIP_UPDATE)) {
if (entity->flags & ENTITY_FLAGS_BOUND_SCRIPT_DIRTY) {
entity->flags &= ~ENTITY_FLAGS_BOUND_SCRIPT_DIRTY;
if (!(entity->flags & ENTITY_FLAGS_8000)) {
entity->flags |= ENTITY_FLAGS_2000000;
if (!(entity->flags & ENTITY_FLAG_SKIP_UPDATE)) {
if (entity->flags & ENTITY_FLAG_BOUND_SCRIPT_DIRTY) {
entity->flags &= ~ENTITY_FLAG_BOUND_SCRIPT_DIRTY;
if (!(entity->flags & ENTITY_FLAG_8000)) {
entity->flags |= ENTITY_FLAG_2000000;
}
entity->boundScript = start_script(entity->boundScriptBytecode, EVT_PRIORITY_A, EVT_FLAG_RUN_IMMEDIATELY);
}
if (entity->flags & ENTITY_FLAGS_2000000) {
if (entity->flags & ENTITY_FLAG_2000000) {
if (does_script_exist(entity->boundScript->id)) {
if (entity->flags & ENTITY_FLAGS_HAS_ANIMATED_MODEL) {
if (entity->flags & ENTITY_FLAG_HAS_ANIMATED_MODEL) {
update_model_animator(entity->virtualModelIndex);
} else {
exec_entity_model_commandlist(entity->virtualModelIndex);
}
if (entity->flags & ENTITY_FLAGS_ALWAYS_FACE_CAMERA) {
if (entity->flags & ENTITY_FLAG_ALWAYS_FACE_CAMERA) {
entity->rotation.y = -gCameras[gCurrentCameraID].currentYaw;
}
if (!(entity->flags & ENTITY_FLAGS_SKIP_UPDATE_TRANSFORM_MATRIX)) {
if (!(entity->flags & ENTITY_FLAG_SKIP_UPDATE_TRANSFORM_MATRIX)) {
update_entity_transform_matrix(entity);
}
continue;
} else {
entity->flags &= ~ENTITY_FLAGS_2000000;
entity->flags &= ~ENTITY_FLAG_2000000;
}
}
@ -1172,25 +1172,25 @@ void update_entities(void) {
if (handleCollision != NULL && handleCollision(entity) != 0) {
entity->collisionTimer = 10;
entity->flags |= ENTITY_FLAGS_DETECTED_COLLISION;
entity->flags |= ENTITY_FLAG_DETECTED_COLLISION;
}
}
} else {
entity->collisionTimer--;
if (entity->flags & ENTITY_FLAGS_CONTINUOUS_COLLISION) {
if (entity->flags & ENTITY_FLAG_CONTINUOUS_COLLISION) {
if (entity->collisionTimer == 0) {
entity->flags &= ~(ENTITY_FLAGS_DISABLE_COLLISION | ENTITY_FLAGS_CONTINUOUS_COLLISION);
entity->flags &= ~(ENTITY_FLAG_DISABLE_COLLISION | ENTITY_FLAG_CONTINUOUS_COLLISION);
} else {
entity->flags |= ENTITY_FLAGS_DISABLE_COLLISION;
entity->flags |= ENTITY_FLAG_DISABLE_COLLISION;
}
} else if (entity->collisionTimer == 0) {
entity->flags &= ~ENTITY_FLAGS_DETECTED_COLLISION;
entity->flags &= ~ENTITY_FLAGS_PARTNER_COLLISION;
entity->flags &= ~ENTITY_FLAG_DETECTED_COLLISION;
entity->flags &= ~ENTITY_FLAG_PARTNER_COLLISION;
entity->collisionFlags = 0;
}
}
if (entity->flags & ENTITY_FLAGS_ALWAYS_FACE_CAMERA) {
if (entity->flags & ENTITY_FLAG_ALWAYS_FACE_CAMERA) {
entity->rotation.y = -gCameras[gCurrentCameraID].currentYaw;
}
@ -1209,15 +1209,15 @@ void update_entities(void) {
}
}
if (!(entity->flags & ENTITY_FLAGS_SKIP_UPDATE_TRANSFORM_MATRIX)) {
if (!(entity->flags & ENTITY_FLAG_SKIP_UPDATE_TRANSFORM_MATRIX)) {
update_entity_transform_matrix(entity);
}
if (!(entity->flags & ENTITY_FLAGS_DISABLE_COLLISION)) {
if (!(entity->flags & ENTITY_FLAG_DISABLE_COLLISION)) {
update_entity_inverse_rotation_matrix(entity);
}
if (entity->flags & ENTITY_FLAGS_HAS_ANIMATED_MODEL) {
if (entity->flags & ENTITY_FLAG_HAS_ANIMATED_MODEL) {
update_model_animator(entity->virtualModelIndex);
} else {
exec_entity_model_commandlist(entity->virtualModelIndex);
@ -1227,11 +1227,11 @@ void update_entities(void) {
update_entity_shadow_position(entity);
}
if (entity->flags & ENTITY_FLAGS_PENDING_INSTANCE_DELETE) {
if (entity->flags & ENTITY_FLAG_PENDING_INSTANCE_DELETE) {
delete_entity(entity->listIndex);
}
if (entity->flags & ENTITY_FLAGS_PENDING_FULL_DELETE) {
if (entity->flags & ENTITY_FLAG_PENDING_FULL_DELETE) {
delete_entity_and_unload_data(entity->listIndex);
}
}
@ -1253,20 +1253,20 @@ void update_shadows(void) {
if (shadow != NULL) {
entity_numShadows++;
if (!(shadow->flags & ENTITY_FLAGS_SKIP_UPDATE)) {
if (shadow->flags & ENTITY_FLAGS_ALWAYS_FACE_CAMERA) {
if (!(shadow->flags & ENTITY_FLAG_SKIP_UPDATE)) {
if (shadow->flags & ENTITY_FLAG_ALWAYS_FACE_CAMERA) {
shadow->rotation.y = -gCameras[gCurrentCameraID].currentYaw;
}
update_shadow_transform_matrix(shadow);
if (shadow->flags & ENTITY_FLAGS_HAS_ANIMATED_MODEL) {
if (shadow->flags & ENTITY_FLAG_HAS_ANIMATED_MODEL) {
update_model_animator(shadow->entityModelID);
} else {
exec_entity_model_commandlist(shadow->entityModelID);
}
if (shadow->flags & ENTITY_FLAGS_PENDING_INSTANCE_DELETE) {
if (shadow->flags & ENTITY_FLAG_PENDING_INSTANCE_DELETE) {
_delete_shadow(shadow->listIndex);
}
}
@ -1323,7 +1323,7 @@ s32 step_entity_commandlist(Entity* entity) {
break;
case ENTITY_SCRIPT_OP_RestartBoundScript:
if (entity->boundScriptBytecode != NULL) {
entity->flags |= ENTITY_FLAGS_BOUND_SCRIPT_DIRTY;
entity->flags |= ENTITY_FLAG_BOUND_SCRIPT_DIRTY;
}
entity->scriptReadPos = args++;
ret = TRUE;
@ -1386,7 +1386,7 @@ void render_entities(void) {
if (entity != NULL) {
if (!gGameStatusPtr->isBattle) {
if (gEntityHideMode != 0 &&
!(entity->flags & ENTITY_FLAGS_IGNORE_DISTANCE_CULLING) &&
!(entity->flags & ENTITY_FLAG_IGNORE_DISTANCE_CULLING) &&
dist2D(gPlayerStatusPtr->position.x,
gPlayerStatusPtr->position.z,
entity->position.x,
@ -1396,18 +1396,18 @@ void render_entities(void) {
}
if (gEntityHideMode == 1) {
if (!(entity->flags & ENTITY_FLAGS_DRAW_IF_CLOSE_HIDE_MODE1)) {
if (!(entity->flags & ENTITY_FLAG_DRAW_IF_CLOSE_HIDE_MODE1)) {
continue;
}
} else if (gEntityHideMode == 2) {
if (!(entity->flags & ENTITY_FLAGS_DRAW_IF_CLOSE_HIDE_MODE2)) {
if (!(entity->flags & ENTITY_FLAG_DRAW_IF_CLOSE_HIDE_MODE2)) {
continue;
}
}
}
if (!(entity->flags & ENTITY_FLAGS_HIDDEN)) {
if (entity->flags & ENTITY_FLAGS_HAS_ANIMATED_MODEL) {
if (!(entity->flags & ENTITY_FLAG_HIDDEN)) {
if (entity->flags & ENTITY_FLAG_HAS_ANIMATED_MODEL) {
if (D_8014AFB0 == 0xFF) {
if (entity->renderSetupFunc != NULL) {
set_animator_render_callback(
@ -1470,14 +1470,14 @@ void render_shadows(void) {
Shadow* shadow = get_shadow_by_index(i);
if (shadow != NULL) {
if (shadow->flags & ENTITY_FLAGS_HIDDEN) {
if (shadow->flags & ENTITY_FLAGS_FADING_AWAY) {
if (shadow->flags & ENTITY_FLAG_HIDDEN) {
if (shadow->flags & ENTITY_FLAG_FADING_AWAY) {
shadow->alpha -= 20;
if (shadow->alpha <= 20) {
shadow->flags |= ENTITY_FLAGS_PENDING_INSTANCE_DELETE;
shadow->flags |= ENTITY_FLAG_PENDING_INSTANCE_DELETE;
}
}
} else if (shadow->flags & ENTITY_FLAGS_HAS_ANIMATED_MODEL) {
} else if (shadow->flags & ENTITY_FLAG_HAS_ANIMATED_MODEL) {
if (shadow->vertexArray == NULL) {
render_animated_model(shadow->entityModelID, &shadow->transformMatrix);
} else {
@ -1487,10 +1487,10 @@ void render_shadows(void) {
shadow->vertexArray);
}
} else {
if (shadow->flags & ENTITY_FLAGS_FADING_AWAY) {
if (shadow->flags & ENTITY_FLAG_FADING_AWAY) {
shadow->alpha -= 20;
if (shadow->alpha <= 20) {
shadow->flags |= ENTITY_FLAGS_PENDING_INSTANCE_DELETE;
shadow->flags |= ENTITY_FLAG_PENDING_INSTANCE_DELETE;
}
}
@ -1601,7 +1601,7 @@ ShadowList* get_shadow_list(void) {
s32 entity_start_script(Entity* entity) {
if (entity->boundScriptBytecode != NULL) {
entity->flags |= ENTITY_FLAGS_BOUND_SCRIPT_DIRTY;
entity->flags |= ENTITY_FLAG_BOUND_SCRIPT_DIRTY;
return 1;
}
return 0;
@ -1624,7 +1624,7 @@ void delete_entity(s32 entityIndex) {
heap_free(entity->dataBuf.any);
}
if (!(entity->flags & ENTITY_FLAGS_HAS_ANIMATED_MODEL)) {
if (!(entity->flags & ENTITY_FLAG_HAS_ANIMATED_MODEL)) {
free_entity_model_by_index(entity->virtualModelIndex);
} else {
delete_model_animator(get_animator_by_index(entity->virtualModelIndex));
@ -1633,7 +1633,7 @@ void delete_entity(s32 entityIndex) {
if (entity->shadowIndex >= 0) {
Shadow* shadow = get_shadow_by_index(entity->shadowIndex);
shadow->flags |= ENTITY_FLAGS_FADING_AWAY;
shadow->flags |= ENTITY_FLAG_FADING_AWAY;
}
heap_free((*gCurrentEntityListPtr)[entityIndex]);
@ -1647,7 +1647,7 @@ void delete_entity_and_unload_data(s32 entityIndex) {
heap_free(entity->dataBuf.any);
}
if (!(entity->flags & ENTITY_FLAGS_HAS_ANIMATED_MODEL)) {
if (!(entity->flags & ENTITY_FLAG_HAS_ANIMATED_MODEL)) {
free_entity_model_by_index(entity->virtualModelIndex);
} else {
delete_model_animator(get_animator_by_index(entity->virtualModelIndex));
@ -1658,7 +1658,7 @@ void delete_entity_and_unload_data(s32 entityIndex) {
if (entity->shadowIndex >= 0) {
Shadow* shadow = get_shadow_by_index(entity->shadowIndex);
shadow->flags |= ENTITY_FLAGS_FADING_AWAY;
shadow->flags |= ENTITY_FLAG_FADING_AWAY;
}
heap_free((*gCurrentEntityListPtr)[entityIndex]);
@ -1678,9 +1678,9 @@ s32 entity_get_collision_flags(Entity* entity) {
s32 entityFlags = 0;
u32 flag;
if (entity->flags & ENTITY_FLAGS_PARTNER_COLLISION) {
if (entity->flags & ENTITY_FLAG_PARTNER_COLLISION) {
entityFlags = ENTITY_COLLISION_PARTNER;
entity->flags &= ~ENTITY_FLAGS_PARTNER_COLLISION;
entity->flags &= ~ENTITY_FLAG_PARTNER_COLLISION;
}
flag = gCollisionStatus.currentFloor;
@ -1742,7 +1742,7 @@ s32 entity_interacts_with_current_partner(s32 entityIdx) {
case ENTITY_TYPE_SUPER_BLOCK:
case ENTITY_TYPE_BOMBABLE_ROCK:
entity = get_entity_by_index(entityIdx);
entity->flags |= ENTITY_FLAGS_PARTNER_COLLISION;
entity->flags |= ENTITY_FLAG_PARTNER_COLLISION;
ret = TRUE;
}
break;
@ -1765,7 +1765,7 @@ s32 entity_interacts_with_current_partner(s32 entityIdx) {
case ENTITY_TYPE_SAVE_POINT:
case ENTITY_TYPE_SUPER_BLOCK:
entity = get_entity_by_index(entityIdx);
entity->flags |= ENTITY_FLAGS_PARTNER_COLLISION;
entity->flags |= ENTITY_FLAG_PARTNER_COLLISION;
ret = TRUE;
}
break;
@ -1801,14 +1801,14 @@ s32 is_player_action_state(s8 actionState) {
}
void entity_set_render_script(Entity* entity, EntityModelScript* cmdList) {
if (!(entity->flags & ENTITY_FLAGS_HAS_ANIMATED_MODEL)) {
if (!(entity->flags & ENTITY_FLAG_HAS_ANIMATED_MODEL)) {
set_entity_model_render_command_list(entity->virtualModelIndex, cmdList);
}
}
void entity_reset_collision(Entity* entity) {
entity->collisionTimer = 0;
entity->flags &= ~ENTITY_FLAGS_DETECTED_COLLISION;
entity->flags &= ~ENTITY_FLAG_DETECTED_COLLISION;
}
void load_area_specific_entity_data(void) {
@ -1912,7 +1912,7 @@ void reload_world_entity_data(void) {
break;
}
if (!(bp->flags & ENTITY_FLAGS_HAS_ANIMATED_MODEL)) {
if (!(bp->flags & ENTITY_FLAG_HAS_ANIMATED_MODEL)) {
void* gfxData;
dataLength = ((bp->dma.end - bp->dma.start) >> 2);
@ -2008,7 +2008,7 @@ s32 is_entity_data_loaded(Entity* entity, EntityBlueprint* blueprint, s32* loade
blueprints[0] = blueprint;
blueprints[1] = NULL;
ret = TRUE;
if (blueprint->flags & ENTITY_FLAGS_HAS_ANIMATED_MODEL) {
if (blueprint->flags & ENTITY_FLAG_HAS_ANIMATED_MODEL) {
s32 size;
entDmaList = blueprint->dmaList;
size = (entDmaList[0].end - entDmaList[0].start) >> 2;
@ -2020,19 +2020,19 @@ s32 is_entity_data_loaded(Entity* entity, EntityBlueprint* blueprint, s32* loade
do {} while (0); // TODO find better match
entDmaList = blueprint->dmaList;
if (bpDmaList == entDmaList) {
if (blueprint->flags & ENTITY_FLAGS_HAS_ANIMATED_MODEL) {
if (blueprint->flags & ENTITY_FLAG_HAS_ANIMATED_MODEL) {
s32 size = (bpDmaList[0].end - bpDmaList[0].start) >> 2;
*loadedEnd = *loadedStart + size;
}
break;
} else if (bp == blueprint) {
if (bp->flags & ENTITY_FLAGS_HAS_ANIMATED_MODEL) {
if (bp->flags & ENTITY_FLAG_HAS_ANIMATED_MODEL) {
s32 size = (entDmaList[0].end - entDmaList[0].start) >> 2;
*loadedEnd = *loadedStart + size;
}
break;
} else {
if (bp->flags & ENTITY_FLAGS_HAS_ANIMATED_MODEL) {
if (bp->flags & ENTITY_FLAG_HAS_ANIMATED_MODEL) {
s32 size = (bpDmaList[0].end - bpDmaList[0].start) >> 2;
*loadedEnd = *loadedStart = *loadedStart + size;
size = (bpDmaList[1].end - bpDmaList[1].start) >> 2;;
@ -2096,7 +2096,7 @@ void load_split_entity_data(Entity* entity, EntityBlueprint* entityData, s32 lis
s32 dma2size_2;
s32 totalLoaded;
if (entityData->flags & ENTITY_FLAGS_HAS_ANIMATED_MODEL) {
if (entityData->flags & ENTITY_FLAG_HAS_ANIMATED_MODEL) {
DmaEntry* dmaList = entityData->dmaList;
entity->vertexSegment = 0xA;
@ -2182,7 +2182,7 @@ void load_split_entity_data(Entity* entity, EntityBlueprint* entityData, s32 lis
entity->virtualModelIndex = create_mesh_animator(animationScript, animBaseAddr);
load_mesh_animator_tree(entity->virtualModelIndex, animationNodes);
update_model_animator(entity->virtualModelIndex);
entity->flags |= ENTITY_FLAGS_HAS_ANIMATED_MODEL;
entity->flags |= ENTITY_FLAG_HAS_ANIMATED_MODEL;
}
s32 func_80111790(EntityBlueprint* data) {
@ -2215,7 +2215,7 @@ void entity_free_static_data(EntityBlueprint* data) {
if (freeSlot < MAX_ENTITIES) {
bp = wEntityBlueprint[freeSlot - 1];
if (bp == data) {
if (bp->flags & ENTITY_FLAGS_HAS_ANIMATED_MODEL) {
if (bp->flags & ENTITY_FLAG_HAS_ANIMATED_MODEL) {
DmaEntry* dmaList = bp->dmaList;
size = ((dmaList[0].end - dmaList[0].start) >> 2);
size += ((dmaList[1].end - dmaList[1].start) >> 2);
@ -2298,7 +2298,7 @@ s32 create_entity(EntityBlueprint* bp, ...) {
entity->scriptDelay = entity->scriptReadPos != NULL ? 1 : 0;
entity->savedReadPos[0] = bp->updateEntityScript;
entity->updateScriptCallback = NULL;
entity->flags = bp->flags | ENTITY_FLAGS_CREATED;
entity->flags = bp->flags | ENTITY_FLAG_CREATED;
entity->collisionFlags = 0;
entity->collisionTimer = 0;
entity->renderSetupFunc = NULL;
@ -2321,7 +2321,7 @@ s32 create_entity(EntityBlueprint* bp, ...) {
entity->shadowIndex = -1;
entity->gfxBaseAddr = NULL;
if (!(bp->flags & ENTITY_FLAGS_HAS_ANIMATED_MODEL)) {
if (!(bp->flags & ENTITY_FLAG_HAS_ANIMATED_MODEL)) {
if (bp->dma.start != 0) {
load_simple_entity_data(entity, bp, listIndex);
}
@ -2333,7 +2333,7 @@ s32 create_entity(EntityBlueprint* bp, ...) {
load_split_entity_data(entity, bp, listIndex);
}
if (bp->entityType != ENTITY_TYPE_SHADOW && (entity->flags & (ENTITY_FLAGS_FIXED_SHADOW_SIZE | ENTITY_FLAGS_HAS_SHADOW))) {
if (bp->entityType != ENTITY_TYPE_SHADOW && (entity->flags & (ENTITY_FLAG_FIXED_SHADOW_SIZE | ENTITY_FLAG_HAS_SHADOW))) {
create_entity_shadow(entity, x, y, z);
}
@ -2343,7 +2343,7 @@ s32 create_entity(EntityBlueprint* bp, ...) {
case ENTITY_TYPE_SIMPLE_SPRING:
case ENTITY_TYPE_SCRIPT_SPRING:
case ENTITY_TYPE_STAR_BOX_LAUCHER:
entity->flags |= ENTITY_FLAGS_4000;
entity->flags |= ENTITY_FLAG_4000;
break;
}
@ -2371,7 +2371,7 @@ s32 create_shadow_from_data(ShadowBlueprint* bp, f32 x, f32 y, f32 z) {
(*gCurrentShadowListPtr)[i] = shadow;
mem_clear(shadow, sizeof(*shadow));
shadow->listIndex = i;
shadow->flags = bp->flags | ENTITY_FLAGS_CREATED;
shadow->flags = bp->flags | ENTITY_FLAG_CREATED;
shadow->alpha = 128;
shadow->unk_06 = 0x80;
shadow->position.x = x;
@ -2382,7 +2382,7 @@ s32 create_shadow_from_data(ShadowBlueprint* bp, f32 x, f32 y, f32 z) {
shadow->scale.z = 1.0f;
if (bp->animModelNode != NULL) {
shadow->flags |= ENTITY_FLAGS_HAS_ANIMATED_MODEL;
shadow->flags |= ENTITY_FLAG_HAS_ANIMATED_MODEL;
shadow->entityModelID = create_model_animator(bp->renderCommandList);
load_model_animator_tree(shadow->entityModelID, bp->animModelNode);
} else {
@ -2442,14 +2442,14 @@ ApiStatus SetEntityCullMode(Evt* script, s32 isInitialCall) {
s32 mode = evt_get_variable(script, *args++);
if (mode == 0) {
entity->flags |= ENTITY_FLAGS_DRAW_IF_CLOSE_HIDE_MODE1;
entity->flags |= ENTITY_FLAG_DRAW_IF_CLOSE_HIDE_MODE1;
} else if (mode == 1) {
entity->flags |= ENTITY_FLAGS_DRAW_IF_CLOSE_HIDE_MODE2;
entity->flags |= ENTITY_FLAG_DRAW_IF_CLOSE_HIDE_MODE2;
} else if (mode == 2) {
entity->flags |= ENTITY_FLAGS_DRAW_IF_CLOSE_HIDE_MODE2 | ENTITY_FLAGS_DRAW_IF_CLOSE_HIDE_MODE1;
entity->flags |= ENTITY_FLAG_DRAW_IF_CLOSE_HIDE_MODE2 | ENTITY_FLAG_DRAW_IF_CLOSE_HIDE_MODE1;
} else {
entity->flags |= ENTITY_FLAGS_IGNORE_DISTANCE_CULLING | ENTITY_FLAGS_DRAW_IF_CLOSE_HIDE_MODE2 |
ENTITY_FLAGS_DRAW_IF_CLOSE_HIDE_MODE1;
entity->flags |= ENTITY_FLAG_IGNORE_DISTANCE_CULLING | ENTITY_FLAG_DRAW_IF_CLOSE_HIDE_MODE2 |
ENTITY_FLAG_DRAW_IF_CLOSE_HIDE_MODE1;
}
return ApiStatus_DONE2;
}
@ -2461,11 +2461,11 @@ ApiStatus UseDynamicShadow(Evt* script, s32 isInitialCall) {
if (evt_get_variable(script, *args++)) {
Shadow* shadow;
entity->flags |= ENTITY_FLAGS_HAS_DYNAMIC_SHADOW;
entity->flags |= ENTITY_FLAG_HAS_DYNAMIC_SHADOW;
shadow = get_shadow_by_index(entity->shadowIndex);
shadow->flags |= ENTITY_FLAGS_SHADOW_POS_DIRTY;
shadow->flags |= ENTITY_FLAG_SHADOW_POS_DIRTY;
} else {
entity->flags &= ~ENTITY_FLAGS_HAS_DYNAMIC_SHADOW;
entity->flags &= ~ENTITY_FLAG_HAS_DYNAMIC_SHADOW;
}
return ApiStatus_DONE2;
@ -2494,7 +2494,7 @@ ApiStatus AssignSwitchFlag(Evt* script, s32 isInitialCall) {
data->areaFlagIndex = areaFlag;
if (get_area_flag(areaFlag) != 0) {
entity->flags |= ENTITY_FLAGS_PENDING_INSTANCE_DELETE;
entity->flags |= ENTITY_FLAG_PENDING_INSTANCE_DELETE;
}
return ApiStatus_DONE2;
}
@ -2561,8 +2561,8 @@ s32 create_entity_shadow(Entity* entity, f32 x, f32 y, f32 z) {
s32 type;
s16 shadowIndex;
if (staticFlags & ENTITY_FLAGS_FIXED_SHADOW_SIZE) {
if (staticFlags & ENTITY_FLAGS_SQUARE_SHADOW) {
if (staticFlags & ENTITY_FLAG_FIXED_SHADOW_SIZE) {
if (staticFlags & ENTITY_FLAG_SQUARE_SHADOW) {
type = 2;
} else {
type = 3;
@ -2574,7 +2574,7 @@ s32 create_entity_shadow(Entity* entity, f32 x, f32 y, f32 z) {
shadowIndex = create_shadow_type(type, x, y, z);
entity->shadowIndex = shadowIndex;
get_shadow_by_index(shadowIndex)->flags |= ENTITY_FLAGS_DARK_SHADOW | ENTITY_FLAGS_SHADOW_POS_DIRTY;
get_shadow_by_index(shadowIndex)->flags |= ENTITY_FLAG_DARK_SHADOW | ENTITY_FLAG_SHADOW_POS_DIRTY;
return entity->shadowIndex;
}
@ -2605,7 +2605,7 @@ s32 create_shadow_type(s32 type, f32 x, f32 y, f32 z) {
shadowIndex = create_shadow_from_data(bp, x, y, z);
if (isFixedSize) {
get_shadow_by_index(shadowIndex)->flags |= ENTITY_FLAGS_FIXED_SHADOW_SIZE;
get_shadow_by_index(shadowIndex)->flags |= ENTITY_FLAG_FIXED_SHADOW_SIZE;
}
return shadowIndex;
@ -2632,7 +2632,7 @@ void update_entity_shadow_position(Entity* entity) {
} else {
u8 alphaTemp;
if (shadow->flags & ENTITY_FLAGS_DARK_SHADOW) {
if (shadow->flags & ENTITY_FLAG_DARK_SHADOW) {
alphaTemp = 160;
} else {
alphaTemp = 128;
@ -2640,9 +2640,9 @@ void update_entity_shadow_position(Entity* entity) {
shadow->alpha = alphaTemp;
}
if (!(entity->flags & ENTITY_FLAGS_HAS_DYNAMIC_SHADOW)) {
if (shadow->flags & ENTITY_FLAGS_SHADOW_POS_DIRTY) {
shadow->flags &= ~ENTITY_FLAGS_SHADOW_POS_DIRTY;
if (!(entity->flags & ENTITY_FLAG_HAS_DYNAMIC_SHADOW)) {
if (shadow->flags & ENTITY_FLAG_SHADOW_POS_DIRTY) {
shadow->flags &= ~ENTITY_FLAG_SHADOW_POS_DIRTY;
} else {
return;
}
@ -2658,7 +2658,7 @@ void update_entity_shadow_position(Entity* entity) {
origHitLength = hitLength;
if (shadow->flags & ENTITY_FLAGS_FIXED_SHADOW_SIZE) {
if (shadow->flags & ENTITY_FLAG_FIXED_SHADOW_SIZE) {
hitLength = 212.5f;
shadow->scale.x = entity->aabb.x / hitLength;
shadow->scale.z = entity->aabb.z / hitLength;
@ -2677,15 +2677,15 @@ void update_entity_shadow_position(Entity* entity) {
shadow->rotation.y = entity->rotation.y;
if (entity->position.y < rayY) {
shadow->flags |= ENTITY_FLAGS_SKIP_UPDATE;
shadow->flags |= ENTITY_FLAG_SKIP_UPDATE;
entity->position.y = rayY + 10.0f;
} else {
shadow->flags &= ~ENTITY_FLAGS_SKIP_UPDATE;
shadow->flags &= ~ENTITY_FLAG_SKIP_UPDATE;
}
shadow->flags = (shadow->flags & ~ENTITY_FLAGS_HIDDEN) | ((u16)entity->flags & ENTITY_FLAGS_HIDDEN);
if (!(entity->flags & ENTITY_FLAGS_400) && origHitLength == 0.0f) {
shadow->flags |= ENTITY_FLAGS_HIDDEN;
shadow->flags = (shadow->flags & ~ENTITY_FLAG_HIDDEN) | ((u16)entity->flags & ENTITY_FLAG_HIDDEN);
if (!(entity->flags & ENTITY_FLAG_400) && origHitLength == 0.0f) {
shadow->flags |= ENTITY_FLAG_HIDDEN;
}
} else {
entity->shadowPosY = 0.0f;
@ -3202,7 +3202,7 @@ void calculate_model_sizes(void) {
bb->halfSizeX = (bb->maxX - bb->minX) * 0.5;
bb->halfSizeY = (bb->maxY - bb->minY) * 0.5;
bb->halfSizeZ = (bb->maxZ - bb->minZ) * 0.5;
model->flags |= MODEL_FLAGS_USES_TRANSFORM_MATRIX;
model->flags |= MODEL_FLAG_USES_TRANSFORM_MATRIX;
}
}
}
@ -3281,7 +3281,7 @@ void mdl_create_model(ModelBlueprint* bp, s32 arg1) {
} else {
model->currentMatrix = NULL;
guMtxIdent(&model->specialMatrix);
model->flags |= MODEL_FLAGS_FLAG_2000;
model->flags |= MODEL_FLAG_FLAG_2000;
}
guMtxIdentF(model->transformMatrix);
@ -3348,7 +3348,7 @@ void func_80116698(void) {
for (i = 0; i < ARRAY_COUNT(*gCurrentModels); i++) {
model = (*gCurrentModels)[i];
if (model != NULL && (model->flags != 0) && !(model->flags & 4)) {
if (!(model->flags & MODEL_FLAGS_USES_TRANSFORM_MATRIX)) {
if (!(model->flags & MODEL_FLAG_USES_TRANSFORM_MATRIX)) {
if (model->matrixMode != 0) {
model->matrixMode--;
if (model->matrixMode <= 0) {
@ -3361,7 +3361,7 @@ void func_80116698(void) {
model->currentSpecialMatrix = &model->specialMatrix;
}
} else {
model->flags &= ~MODEL_FLAGS_USES_TRANSFORM_MATRIX;
model->flags &= ~MODEL_FLAG_USES_TRANSFORM_MATRIX;
model->matrixMode = 2;
mtx = &gDisplayContext->matrixStack[gMatrixListPos++];
if (model->currentMatrix == NULL || (model->flags & 8)) {
@ -3371,7 +3371,7 @@ void func_80116698(void) {
guMtxCatF(model->transformMatrix, sp20, sp20);
guMtxF2L(sp20, mtx);
}
model->flags &= ~MODEL_FLAGS_FLAG_2000;
model->flags &= ~MODEL_FLAG_FLAG_2000;
bb = (ModelBoundingBox*) get_model_property(model->modelNode, MODEL_PROP_KEY_BOUNDING_BOX);
mX = (bb->minX + bb->maxX) * 0.5f;
mY = (bb->minY + bb->maxY) * 0.5f;
@ -3381,15 +3381,15 @@ void func_80116698(void) {
model->center.x = mX;
model->center.y = mY;
model->center.z = mZ;
model->flags &= ~MODEL_FLAGS_FLAG_200;
model->flags &= ~MODEL_FLAG_FLAG_200;
}
}
}
for (i = 0; i < ARRAY_COUNT((*gCurrentTransformGroups)); i++) {
mtg = (*gCurrentTransformGroups)[i];
if (mtg != NULL && mtg->flags != 0 && !(mtg->flags & MODEL_TRANSFORM_GROUP_FLAGS_4)) {
if (!(mtg->flags & MODEL_TRANSFORM_GROUP_FLAGS_1000)) {
if (mtg != NULL && mtg->flags != 0 && !(mtg->flags & MODEL_TRANSFORM_GROUP_FLAG_4)) {
if (!(mtg->flags & MODEL_TRANSFORM_GROUP_FLAG_1000)) {
if (mtg->matrixMode != 0) {
mtg->matrixMode--;
if (!(mtg->matrixMode & 0xFF)) {
@ -3402,7 +3402,7 @@ void func_80116698(void) {
mtg->transformMtx = &mtg->matrixA;
}
} else {
mtg->flags &= ~MODEL_TRANSFORM_GROUP_FLAGS_1000;
mtg->flags &= ~MODEL_TRANSFORM_GROUP_FLAG_1000;
mtg->matrixMode = 2;
mtx = &gDisplayContext->matrixStack[gMatrixListPos++];
if (mtg->matrixRDP_N == NULL) {
@ -3412,7 +3412,7 @@ void func_80116698(void) {
guMtxCatF(mtg->matrixB, sp60, sp60);
guMtxF2L(sp60, mtx);
}
mtg->flags &= ~MODEL_TRANSFORM_GROUP_FLAGS_2000;
mtg->flags &= ~MODEL_TRANSFORM_GROUP_FLAG_2000;
bb = (ModelBoundingBox*) get_model_property(mtg->modelNode, MODEL_PROP_KEY_BOUNDING_BOX);
mtgX = (bb->minX + bb->maxX) * 0.5f;
mtgY = (bb->minY + bb->maxY) * 0.5f;
@ -3705,7 +3705,7 @@ void render_transform_group_node(ModelNode* node) {
if (groupTypeProp != NULL && groupTypeProp->data.s != 0) {
model = get_model_from_list_index(mdl_currentTransformGroupChildIndex);
if (!(model->flags & MODEL_FLAGS_ENABLED)) {
if (!(model->flags & MODEL_FLAG_ENABLED)) {
appendGfx_model_group(model);
}
mdl_currentTransformGroupChildIndex++;
@ -3737,7 +3737,7 @@ void render_transform_group_node(ModelNode* node) {
}
model = get_model_from_list_index(mdl_currentTransformGroupChildIndex);
if (!(model->flags & MODEL_FLAGS_ENABLED)) {
if (!(model->flags & MODEL_FLAG_ENABLED)) {
appendGfx_model(model);
}
mdl_currentTransformGroupChildIndex++;
@ -3750,14 +3750,14 @@ void render_transform_group(void* data) {
ModelTransformGroup* group = data;
Gfx** gfx = &gMasterGfxPos;
if (!(group->flags & MODEL_TRANSFORM_GROUP_FLAGS_4)) {
if (!(group->flags & MODEL_TRANSFORM_GROUP_FLAG_4)) {
mdl_currentTransformGroupChildIndex = group->minChildModelIndex;
if (!(group->flags & MODEL_TRANSFORM_GROUP_FLAGS_2000)) {
if (!(group->flags & MODEL_TRANSFORM_GROUP_FLAG_2000)) {
gSPMatrix((*gfx)++, group->transformMtx, (G_MTX_PUSH | G_MTX_LOAD) | G_MTX_MODELVIEW);
}
render_transform_group_node(group->modelNode);
if (!(group->flags & MODEL_TRANSFORM_GROUP_FLAGS_2000)) {
if (!(group->flags & MODEL_TRANSFORM_GROUP_FLAG_2000)) {
gSPPopMatrix((*gfx)++, G_MTX_MODELVIEW);
}
gDPPipeSync((*gfx)++);
@ -4235,7 +4235,7 @@ void make_transform_group(u16 modelID) {
}
(*gCurrentTransformGroups)[i] = newMtg = heap_malloc(sizeof(*newMtg));
newMtg->flags = MODEL_TRANSFORM_GROUP_FLAGS_1;
newMtg->flags = MODEL_TRANSFORM_GROUP_FLAG_1;
newMtg->groupModelID = modelID;
newMtg->minChildModelIndex = get_model_list_index_from_tree_index(D_80153374);
newMtg->maxChildModelIndex = get_model_list_index_from_tree_index(D_80153376);
@ -4293,10 +4293,10 @@ void enable_transform_group(u16 modelID) {
for (i = group->minChildModelIndex; i <= group->maxChildModelIndex; i++) {
Model* model = get_model_from_list_index(i);
model->flags |= MODEL_FLAGS_TRANSFORM_GROUP_MEMBER;
model->flags |= MODEL_FLAG_TRANSFORM_GROUP_MEMBER;
if (model->currentMatrix != NULL) {
model->flags |= MODEL_FLAGS_USES_TRANSFORM_MATRIX;
model->flags |= MODEL_FLAG_USES_TRANSFORM_MATRIX;
}
}
}
@ -4305,15 +4305,15 @@ void disable_transform_group(u16 modelID) {
ModelTransformGroup* group = get_transform_group(get_transform_group_index(modelID));
s32 i;
group->flags |= MODEL_TRANSFORM_GROUP_FLAGS_4;
group->flags |= MODEL_TRANSFORM_GROUP_FLAG_4;
for (i = group->minChildModelIndex; i <= group->maxChildModelIndex; i++) {
Model* model = get_model_from_list_index(i);
model->flags &= ~MODEL_FLAGS_TRANSFORM_GROUP_MEMBER;
model->flags &= ~MODEL_FLAG_TRANSFORM_GROUP_MEMBER;
if (model->currentMatrix != NULL) {
model->flags |= MODEL_FLAGS_USES_TRANSFORM_MATRIX;
model->flags |= MODEL_FLAG_USES_TRANSFORM_MATRIX;
}
}
}
@ -4460,7 +4460,7 @@ void func_8011BAE8(void) {
Model* model = (*gCurrentModels)[i];
if (model != NULL) {
model->flags &= ~MODEL_FLAGS_HAS_TRANSFORM_APPLIED;
model->flags &= ~MODEL_FLAG_HAS_TRANSFORM_APPLIED;
}
}
@ -4468,7 +4468,7 @@ void func_8011BAE8(void) {
ModelTransformGroup* transformGroup = (*gCurrentTransformGroups)[i];
if (transformGroup != NULL) {
transformGroup->flags &= ~MODEL_TRANSFORM_GROUP_FLAGS_400;
transformGroup->flags &= ~MODEL_TRANSFORM_GROUP_FLAG_400;
}
}
}
@ -4767,13 +4767,13 @@ void mdl_make_local_vertex_copy(s32 copyIndex, u16 modelID, s32 isMakingCopy) {
mdl_local_gfx_update_vtx_pointers(nodeDlist, baseVtx, copy->gfxCopy[i], copy->vtxCopy[i]);
mdl_local_gfx_copy_vertices(baseVtx, numVertices, copy->vtxCopy[i]);
}
model->flags |= MODEL_FLAGS_HAS_LOCAL_VERTEX_COPY;
model->flags |= MODEL_FLAG_HAS_LOCAL_VERTEX_COPY;
} else {
for (i = 0; i < ARRAY_COUNT(copy->gfxCopy); i++) {
copy->gfxCopy[i] = NULL;
copy->vtxCopy[i] = NULL;
}
model->flags |= MODEL_FLAGS_ENABLED;
model->flags |= MODEL_FLAG_ENABLED;
}
copy->selector = 0;
@ -4982,7 +4982,7 @@ void mdl_draw_hidden_panel_surface(Gfx** arg0, u16 treeIndex) {
oldGfxPos = gMasterGfxPos;
gMasterGfxPos = *arg0;
copied.flags = MODEL_FLAGS_HAS_LOCAL_VERTEX_COPY | MODEL_FLAGS_FLAG_1;
copied.flags = MODEL_FLAG_HAS_LOCAL_VERTEX_COPY | MODEL_FLAG_FLAG_1;
appendGfx_model(&copied);
*arg0 = gMasterGfxPos;

View File

@ -69,17 +69,17 @@ typedef enum AuPriority {
} AuPriority;
enum AuVoiceFlags3D {
AU_VOICE_3D_FLAGS_1 = 0x01,
AU_VOICE_3D_FLAGS_HANDLED_VOL_CHANGE = 0x02,
AU_VOICE_3D_FLAGS_10 = 0x10,
AU_VOICE_3D_FLAGS_VOL_CHANGED = 0x20,
AU_VOICE_3D_FLAG_1 = 0x01,
AU_VOICE_3D_FLAG_HANDLED_VOL_CHANGE = 0x02,
AU_VOICE_3D_FLAG_10 = 0x10,
AU_VOICE_3D_FLAG_VOL_CHANGED = 0x20,
};
enum AuVoiceFlags43 {
AU_VOICE_SYNC_FLAGS_ALL = 0x02,
AU_VOICE_SYNC_FLAGS_4 = 0x04,
AU_VOICE_SYNC_FLAGS_PITCH = 0x08,
AU_VOICE_SYNC_FLAGS_10 = 0x10,
AU_VOICE_SYNC_FLAG_ALL = 0x02,
AU_VOICE_SYNC_FLAG_4 = 0x04,
AU_VOICE_SYNC_FLAG_PITCH = 0x08,
AU_VOICE_SYNC_FLAG_10 = 0x10,
};
typedef enum AuEffectType {

View File

@ -1308,7 +1308,7 @@ void au_bgm_player_update_playing(BGMPlayer *player) {
note->tremoloTime = track->trackTremoloTime;
note->unk_13 = 0;
note->tremoloAmount = track->trackTremoloAmount;
voice->unk_flags_43 = AU_VOICE_SYNC_FLAGS_ALL;
voice->unk_flags_43 = AU_VOICE_SYNC_FLAG_ALL;
voice->priority = player->priority;
voice->priorityCopy = voice->priority;
}
@ -1355,7 +1355,7 @@ void au_bgm_player_update_playing(BGMPlayer *player) {
if (note->noteLength > 0) {
note->noteLength--;
if (note->noteLength == 0) {
voice->unk_flags_3D |= AU_VOICE_3D_FLAGS_10;
voice->unk_flags_3D |= AU_VOICE_3D_FLAG_10;
}
}
if (track->isDrumTrack) {
@ -1363,7 +1363,7 @@ void au_bgm_player_update_playing(BGMPlayer *player) {
note->pitchRatio = au_compute_pitch_ratio(((note->adjustedPitch + note->unk_14) + track->segTrackTune) + player->detune) * note->ins->pitchRatio;
if (voice->pitchRatio != note->pitchRatio) {
voice->pitchRatio = note->pitchRatio;
voice->unk_flags_43 |= AU_VOICE_SYNC_FLAGS_PITCH;
voice->unk_flags_43 |= AU_VOICE_SYNC_FLAG_PITCH;
}
}
if (track->changed.volume) {
@ -1372,7 +1372,7 @@ void au_bgm_player_update_playing(BGMPlayer *player) {
* (track->subTrackVolume >> 0x15))
* (track->unkVolume >> 0x15)) >> 0x14)
* (track->segTrackVolume * note->volume)) >> 0x10;
voice->unk_flags_3D |= AU_VOICE_3D_FLAGS_VOL_CHANGED;
voice->unk_flags_3D |= AU_VOICE_3D_FLAG_VOL_CHANGED;
}
} else {
if (note->tremoloTime != 0) {
@ -1401,7 +1401,7 @@ void au_bgm_player_update_playing(BGMPlayer *player) {
note->pitchRatio = au_compute_pitch_ratio(var_a1_5 + ((note->adjustedPitch + track->segTrackTune) + player->detune)) * note->ins->pitchRatio;
if (voice->pitchRatio != note->pitchRatio) {
voice->pitchRatio = note->pitchRatio;
voice->unk_flags_43 |= AU_VOICE_SYNC_FLAGS_PITCH;
voice->unk_flags_43 |= AU_VOICE_SYNC_FLAG_PITCH;
}
}
} else if (track->changed.tune || (player->detune != 0)) {
@ -1409,20 +1409,20 @@ void au_bgm_player_update_playing(BGMPlayer *player) {
note->pitchRatio = au_compute_pitch_ratio((note->adjustedPitch + track->segTrackTune) + player->detune) * note->ins->pitchRatio;
if (voice->pitchRatio != note->pitchRatio) {
voice->pitchRatio = note->pitchRatio;
voice->unk_flags_43 |= AU_VOICE_SYNC_FLAGS_PITCH;
voice->unk_flags_43 |= AU_VOICE_SYNC_FLAG_PITCH;
}
}
if (track->changed.volume) {
s32 tempVolume = ((player->masterVolume >> 0x15) * (track->subTrackVolume >> 0x15) * (track->unkVolume >> 0x15)) >> 0x14;
note->volume = (tempVolume * (track->segTrackVolume * note->noteVelocity)) >> 9;
voice->adjustedVolume = note->volume;
voice->unk_flags_3D |= AU_VOICE_3D_FLAGS_VOL_CHANGED;
voice->unk_flags_3D |= AU_VOICE_3D_FLAG_VOL_CHANGED;
voice->pan = track->subTrackPan;
voice->reverbAmt = track->subTrackReverb;
} else if (track->changed.pan || track->changed.reverb) {
voice->pan = track->subTrackPan;
voice->reverbAmt = track->subTrackReverb;
voice->unk_flags_43 |= AU_VOICE_SYNC_FLAGS_10;
voice->unk_flags_43 |= AU_VOICE_SYNC_FLAG_10;
}
}
}
@ -2026,7 +2026,7 @@ AuResult func_80050970(SongUpdateEvent* update) {
voice = &player->globals->voices[j];
if (voice->priority == player->priority) {
voice->unk_14.unk_04 = &D_80078554;
voice->unk_flags_3D |= AU_VOICE_3D_FLAGS_10;
voice->unk_flags_3D |= AU_VOICE_3D_FLAG_10;
}
}
oldVolume = track->subTrackVolume >> 24;
@ -2044,7 +2044,7 @@ AuResult func_80050970(SongUpdateEvent* update) {
voice = &player->globals->voices[j];
if (voice->priority == player->priority) {
voice->unk_14.unk_04 = &D_80078554;
voice->unk_flags_3D |= AU_VOICE_3D_FLAGS_10;
voice->unk_flags_3D |= AU_VOICE_3D_FLAG_10;
}
}
oldVolume = parentTrack->subTrackVolume >> 24;

View File

@ -406,7 +406,7 @@ void func_8005232C(AuAmbienceManager* manager, AuAmbPlayer* lambda) {
voice->reverbType = manager->defaultReverbType;
voice->unk_14.unk_00 = xi->unk_04.unk_00;
voice->unk_14.unk_04 = xi->unk_04.unk_04;
voice->unk_flags_43 = AU_VOICE_SYNC_FLAGS_ALL;
voice->unk_flags_43 = AU_VOICE_SYNC_FLAG_ALL;
voice->priority = manager->priority;
voice->priorityCopy = voice->priority;
}

View File

@ -45,13 +45,13 @@ void func_80052660(AuGlobals* globals) {
if (voice->unk_1C == NULL) {
continue;
}
if (voice->unk_flags_3D & AU_VOICE_3D_FLAGS_HANDLED_VOL_CHANGE) {
if (voice->unk_flags_3D & AU_VOICE_3D_FLAG_HANDLED_VOL_CHANGE) {
func_80052B44(voice);
continue;
}
if (voice->unk_flags_3D & AU_VOICE_3D_FLAGS_10) {
voice->unk_flags_3D &= ~AU_VOICE_3D_FLAGS_10;
voice->unk_flags_3D |= AU_VOICE_3D_FLAGS_1;
if (voice->unk_flags_3D & AU_VOICE_3D_FLAG_10) {
voice->unk_flags_3D &= ~AU_VOICE_3D_FLAG_10;
voice->unk_flags_3D |= AU_VOICE_3D_FLAG_1;
voice->unk_1C = (u8*)voice->unk_14.unk_04;
if (voice->unk_28 > AU_5750) {
voice->unk_39 = voice->unk_39 + (s32) (voice->unk_2C * (f32) (voice->unk_24 - voice->unk_28));
@ -70,11 +70,11 @@ void func_80052660(AuGlobals* globals) {
voice->unk_28 = D_800785A0[voice->unk_3B];
voice->unk_24 = voice->unk_28;
if (voice->unk_flags_3D & AU_VOICE_3D_FLAGS_VOL_CHANGED) {
voice->unk_flags_3D &= ~AU_VOICE_3D_FLAGS_VOL_CHANGED;
if (voice->unk_flags_3D & AU_VOICE_3D_FLAG_VOL_CHANGED) {
voice->unk_flags_3D &= ~AU_VOICE_3D_FLAG_VOL_CHANGED;
if (voice->unk_28 > AU_5750) {
voice->unk_28 -= AU_5750;
voice->unk_flags_3D |= AU_VOICE_3D_FLAGS_HANDLED_VOL_CHANGE;
voice->unk_flags_3D |= AU_VOICE_3D_FLAG_HANDLED_VOL_CHANGE;
unkTemp = voice->unk_39 + (s32) (voice->unk_2C * (voice->unk_24 - voice->unk_28));
} else {
unkTemp = voice->unk_3A;
@ -85,19 +85,19 @@ void func_80052660(AuGlobals* globals) {
unkTemp = voice->unk_3A;
}
voice->volume = (((unkTemp * voice->adjustedVolume * voice->unk_3F) >> 0xE) * voice->unk_30) >> 7;
voice->unk_flags_43 |= AU_VOICE_SYNC_FLAGS_4;
voice->unk_flags_43 |= AU_VOICE_SYNC_FLAG_4;
} else {
if (voice->unk_28 == -1) {
if (voice->unk_flags_3D & AU_VOICE_3D_FLAGS_VOL_CHANGED) {
voice->unk_flags_3D &= ~AU_VOICE_3D_FLAGS_VOL_CHANGED;
if (voice->unk_flags_3D & AU_VOICE_3D_FLAG_VOL_CHANGED) {
voice->unk_flags_3D &= ~AU_VOICE_3D_FLAG_VOL_CHANGED;
voice->volume = (((voice->unk_39 * voice->adjustedVolume * voice->unk_3F) >> 0xE) * voice->unk_30) >> 7;
voice->unk_flags_43 |= AU_VOICE_SYNC_FLAGS_4;
voice->unk_flags_43 |= AU_VOICE_SYNC_FLAG_4;
}
} else {
voice->unk_28 -= AU_5750;
if (voice->unk_28 <= 0) {
if (*voice->unk_1C == 0xFF) {
if (voice->unk_flags_3D & AU_VOICE_3D_FLAGS_1) {
if (voice->unk_flags_3D & AU_VOICE_3D_FLAG_1) {
voice->unk_flags_3D = 0;
voice->unk_1C = NULL;
voice->unk_42 = 1;
@ -120,11 +120,11 @@ void func_80052660(AuGlobals* globals) {
} else {
voice->unk_2C = 0.0f;
}
if (voice->unk_flags_3D & AU_VOICE_3D_FLAGS_VOL_CHANGED) {
voice->unk_flags_3D &= ~AU_VOICE_3D_FLAGS_VOL_CHANGED;
if (voice->unk_flags_3D & AU_VOICE_3D_FLAG_VOL_CHANGED) {
voice->unk_flags_3D &= ~AU_VOICE_3D_FLAG_VOL_CHANGED;
if (voice->unk_28 > AU_5750) {
voice->unk_28 -= AU_5750;
voice->unk_flags_3D |= AU_VOICE_3D_FLAGS_HANDLED_VOL_CHANGE;
voice->unk_flags_3D |= AU_VOICE_3D_FLAG_HANDLED_VOL_CHANGE;
unkTemp = voice->unk_39 + (s32) (voice->unk_2C * (voice->unk_24 - voice->unk_28));
} else {
unkTemp = voice->unk_3A;
@ -135,21 +135,21 @@ void func_80052660(AuGlobals* globals) {
unkTemp = voice->unk_3A;
}
voice->volume = (((unkTemp * voice->adjustedVolume * voice->unk_3F) >> 0xE) * voice->unk_30) >> 7;
voice->unk_flags_43 |= AU_VOICE_SYNC_FLAGS_4;
voice->unk_flags_43 |= AU_VOICE_SYNC_FLAG_4;
}
} else {
if (voice->unk_flags_3D & AU_VOICE_3D_FLAGS_VOL_CHANGED) {
voice->unk_flags_3D &= ~AU_VOICE_3D_FLAGS_VOL_CHANGED;
if (voice->unk_flags_3D & AU_VOICE_3D_FLAG_VOL_CHANGED) {
voice->unk_flags_3D &= ~AU_VOICE_3D_FLAG_VOL_CHANGED;
if (voice->unk_28 > AU_5750) {
voice->unk_28 -= AU_5750;
voice->unk_flags_3D |= AU_VOICE_3D_FLAGS_HANDLED_VOL_CHANGE;
voice->unk_flags_3D |= AU_VOICE_3D_FLAG_HANDLED_VOL_CHANGE;
unkTemp = voice->unk_39 + (s32) (voice->unk_2C * (voice->unk_24 - voice->unk_28));
} else {
unkTemp = voice->unk_3A;
}
voice->unk_08 = AUDIO_SAMPLES;
voice->volume = (((unkTemp * voice->adjustedVolume * voice->unk_3F) >> 0xE) * voice->unk_30) >> 7;
voice->unk_flags_43 |= AU_VOICE_SYNC_FLAGS_4;
voice->unk_flags_43 |= AU_VOICE_SYNC_FLAG_4;
}
}
}
@ -160,8 +160,8 @@ void func_80052660(AuGlobals* globals) {
void func_80052B44(AlUnkVoice* arg0) {
arg0->volume = (((arg0->unk_3A * arg0->adjustedVolume * arg0->unk_3F) >> 14) * arg0->unk_30) >> 7;
arg0->unk_08 = func_80052BC0(arg0->unk_28);
arg0->unk_flags_3D &= ~AU_VOICE_3D_FLAGS_HANDLED_VOL_CHANGE;
arg0->unk_flags_43 |= AU_VOICE_SYNC_FLAGS_4;
arg0->unk_flags_3D &= ~AU_VOICE_3D_FLAG_HANDLED_VOL_CHANGE;
arg0->unk_flags_43 |= AU_VOICE_SYNC_FLAG_4;
}
s32 func_80052BC0(s32 arg0) {
@ -199,5 +199,5 @@ void func_80052BF8(AlUnkVoice* voice, AlUnkInstrumentData* arg1) {
INCLUDE_ASM(u8, "audio/2d9a0_len_890", func_80052CFC, AlUnkVoice* arg0);
void func_80052E18(AlUnkVoice* arg0) {
arg0->unk_flags_3D |= AU_VOICE_3D_FLAGS_VOL_CHANGED;
arg0->unk_flags_3D |= AU_VOICE_3D_FLAG_VOL_CHANGED;
}

View File

@ -326,18 +326,18 @@ void func_80053654(AuGlobals* globals) {
voice->priority = AU_PRIORITY_FREE;
}
if (voiceUpdateFlags & AU_VOICE_SYNC_FLAGS_ALL) {
if (voiceUpdateFlags & AU_VOICE_SYNC_FLAG_ALL) {
func_80052BF8(voice, &voice->unk_14);
au_pvoice_set_filter(i, voice->reverbType, voice->instrument, voice->pitchRatio, voice->volume, voice->pan, voice->reverbAmt, voice->unk_08);
voice->priority = voice->priorityCopy;
} else {
if (voiceUpdateFlags & AU_VOICE_SYNC_FLAGS_PITCH) {
if (voiceUpdateFlags & AU_VOICE_SYNC_FLAG_PITCH) {
au_pvoice_set_pitch_ratio(i, voice->pitchRatio);
}
if (voiceUpdateFlags & AU_VOICE_SYNC_FLAGS_4) {
if (voiceUpdateFlags & AU_VOICE_SYNC_FLAG_4) {
func_8005736C(i, voice->volume, voice->unk_08, voice->pan, voice->reverbAmt);
} else if (voiceUpdateFlags & AU_VOICE_SYNC_FLAGS_10) {
} else if (voiceUpdateFlags & AU_VOICE_SYNC_FLAG_10) {
func_80057548(i, voice->pan, voice->reverbAmt);
}
}

View File

@ -82,7 +82,7 @@ void bgm_update_music_settings(void) {
MusicSettings* music = gMusicSettings;
s32 i = 0;
s16 state2 = 2;
s16 flag4 = MUSIC_SETTINGS_FLAGS_4;
s16 flag4 = MUSIC_SETTINGS_FLAG_4;
s32 flags;
for (i; i < 2; i++, music++) {
@ -90,9 +90,9 @@ void bgm_update_music_settings(void) {
case 0:
break;
case 1:
if (music->flags & MUSIC_SETTINGS_FLAGS_1) {
if (music->flags & MUSIC_SETTINGS_FLAG_1) {
if (music->fadeOutTime < 250) {
if (!(music->flags & MUSIC_SETTINGS_FLAGS_4)) {
if (!(music->flags & MUSIC_SETTINGS_FLAG_4)) {
if (au_song_stop(music->songName) == AU_RESULT_OK) {
music->state = state2;
}
@ -101,7 +101,7 @@ void bgm_update_music_settings(void) {
music->state = state2;
}
}
} else if (!(music->flags & MUSIC_SETTINGS_FLAGS_4)) {
} else if (!(music->flags & MUSIC_SETTINGS_FLAG_4)) {
if (snd_set_song_variation_fade_time(music->songName, music->fadeOutTime, 0) == 0) {
music->state = state2;
}
@ -111,8 +111,8 @@ void bgm_update_music_settings(void) {
}
}
} else {
if (music->flags & MUSIC_SETTINGS_FLAGS_4) {
music->flags |= MUSIC_SETTINGS_FLAGS_10;
if (music->flags & MUSIC_SETTINGS_FLAG_4) {
music->flags |= MUSIC_SETTINGS_FLAG_10;
}
music->flags &= ~flag4;
music->state = 5;
@ -123,7 +123,7 @@ void bgm_update_music_settings(void) {
music->flags &= ~flag4;
if (flags & 1) {
if (au_song_is_playing(music->songName) == AU_RESULT_OK) {
music->flags &= ~MUSIC_SETTINGS_FLAGS_1;
music->flags &= ~MUSIC_SETTINGS_FLAG_1;
music->state = 3;
}
} else {
@ -137,36 +137,36 @@ void bgm_update_music_settings(void) {
music->state = 5;
break;
case 5:
if (!(music->flags & MUSIC_SETTINGS_FLAGS_8)) {
if (!(music->flags & MUSIC_SETTINGS_FLAG_8)) {
if (music->songID < 0) {
music->state = 0;
} else {
music->songName = au_song_load(music->songID, i);
if (music->songName > 0xFFFFU) {
if ((music->flags & MUSIC_SETTINGS_FLAGS_20)) {
if ((music->flags & MUSIC_SETTINGS_FLAG_20)) {
snd_set_song_variation_fade(music->songName, music->variation,
music->fadeInTime, music->fadeStartVolume, music->fadeEndVolume);
music->flags &= ~MUSIC_SETTINGS_FLAGS_20;
music->flags &= ~MUSIC_SETTINGS_FLAG_20;
} else {
bgm_set_target_volume(MusicDefaultVolume);
}
if (au_song_start_variation(music->songName, music->variation) == 0) {
music->flags |= MUSIC_SETTINGS_FLAGS_1;
music->flags |= MUSIC_SETTINGS_FLAG_1;
music->state = 0;
}
}
}
} else {
if (music->flags & MUSIC_SETTINGS_FLAGS_10) {
if (music->flags & MUSIC_SETTINGS_FLAG_10) {
music->state = 0;
music->flags &= ~(MUSIC_SETTINGS_FLAGS_10 | MUSIC_SETTINGS_FLAGS_8);
music->flags &= ~(MUSIC_SETTINGS_FLAG_10 | MUSIC_SETTINGS_FLAG_8);
} else if (func_80055B28(music->savedSongName) == 0) {
music->songID = music->savedSongID;
music->variation = music->savedVariation;
music->songName = music->savedSongName;
music->state = 0;
music->flags |= MUSIC_SETTINGS_FLAGS_1;
music->flags &= ~MUSIC_SETTINGS_FLAGS_8;
music->flags |= MUSIC_SETTINGS_FLAG_1;
music->flags &= ~MUSIC_SETTINGS_FLAG_8;
}
}
break;
@ -187,7 +187,7 @@ s32 _bgm_set_song(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime, s
if (!gGameStatusPtr->musicEnabled) {
au_song_stop(musicSetting->songName);
musicSetting->flags &= ~MUSIC_SETTINGS_FLAGS_1;
musicSetting->flags &= ~MUSIC_SETTINGS_FLAG_1;
return 1;
}
@ -200,9 +200,9 @@ s32 _bgm_set_song(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime, s
if (musicSetting->songID == songID && musicSetting->variation == variation) {
bgm_set_target_volume(volume);
if (musicSetting->flags & MUSIC_SETTINGS_FLAGS_4) {
if (musicSetting->flags & MUSIC_SETTINGS_FLAG_4) {
func_80055B80(musicSetting->songName);
musicSetting->flags &= ~MUSIC_SETTINGS_FLAGS_4;
musicSetting->flags &= ~MUSIC_SETTINGS_FLAG_4;
}
return 2;
@ -213,13 +213,13 @@ s32 _bgm_set_song(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime, s
musicSetting->variation = variation;
musicSetting->fadeOutTime = fadeOutTime;
musicSetting->state = 1;
musicSetting->flags &= ~MUSIC_SETTINGS_FLAGS_ENABLE_PROXIMITY_MIX;
musicSetting->flags &= ~MUSIC_SETTINGS_FLAG_ENABLE_PROXIMITY_MIX;
return 1;
}
s32 bgm_set_song(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime, s16 volume) {
gMusicSettings[playerIndex].flags &= ~MUSIC_SETTINGS_FLAGS_8;
gMusicSettings[playerIndex].flags &= ~MUSIC_SETTINGS_FLAG_8;
return _bgm_set_song(playerIndex, songID, variation, fadeOutTime, volume);
}
@ -236,7 +236,7 @@ s32 func_8014A964(s32 playerIndex, s32 songID, s32 variation, s32 fadeInTime, s1
if (!gGameStatusPtr->musicEnabled) {
au_song_stop(musicSetting->songName);
musicSetting->flags &= ~MUSIC_SETTINGS_FLAGS_1;
musicSetting->flags &= ~MUSIC_SETTINGS_FLAG_1;
return 1;
}
@ -250,9 +250,9 @@ s32 func_8014A964(s32 playerIndex, s32 songID, s32 variation, s32 fadeInTime, s1
musicSetting->fadeEndVolume = fadeEndVolume;
musicSetting->songID = songID;
musicSetting->variation = variation;
musicSetting->flags |= MUSIC_SETTINGS_FLAGS_20;
musicSetting->flags |= MUSIC_SETTINGS_FLAG_20;
musicSetting->state = 1;
musicSetting->flags &= ~MUSIC_SETTINGS_FLAGS_ENABLE_PROXIMITY_MIX;
musicSetting->flags &= ~MUSIC_SETTINGS_FLAG_ENABLE_PROXIMITY_MIX;
return 1;
}
@ -260,11 +260,11 @@ s32 func_8014A964(s32 playerIndex, s32 songID, s32 variation, s32 fadeInTime, s1
s32 bgm_adjust_proximity(s32 playerIndex, s32 mix, s16 state) {
MusicSettings* musicSetting = &gMusicSettings[playerIndex];
if (!(musicSetting->flags & MUSIC_SETTINGS_FLAGS_1)) {
if (!(musicSetting->flags & MUSIC_SETTINGS_FLAG_1)) {
return FALSE;
}
if (!(musicSetting->flags & MUSIC_SETTINGS_FLAGS_ENABLE_PROXIMITY_MIX)) {
if (!(musicSetting->flags & MUSIC_SETTINGS_FLAG_ENABLE_PROXIMITY_MIX)) {
return FALSE;
}
@ -285,7 +285,7 @@ s32 bgm_adjust_proximity(s32 playerIndex, s32 mix, s16 state) {
AuResult bgm_set_track_volumes(s32 playerIndex, s16 trackVolSet) {
MusicSettings* musicSetting = &gMusicSettings[playerIndex];
if (!(musicSetting->flags & MUSIC_SETTINGS_FLAGS_1)) {
if (!(musicSetting->flags & MUSIC_SETTINGS_FLAG_1)) {
return AU_RESULT_OK;
}
@ -295,7 +295,7 @@ AuResult bgm_set_track_volumes(s32 playerIndex, s16 trackVolSet) {
AuResult bgm_clear_track_volumes(s32 playerIndex, s16 trackVolSet) {
MusicSettings* musicSetting = &gMusicSettings[playerIndex];
if (!(musicSetting->flags & MUSIC_SETTINGS_FLAGS_1)) {
if (!(musicSetting->flags & MUSIC_SETTINGS_FLAG_1)) {
return AU_RESULT_OK;
}
@ -305,7 +305,7 @@ AuResult bgm_clear_track_volumes(s32 playerIndex, s16 trackVolSet) {
AuResult bgm_set_variation(s32 playerIndex, s16 arg1) {
MusicSettings* musicSetting = &gMusicSettings[playerIndex];
if (!(musicSetting->flags & MUSIC_SETTINGS_FLAGS_1)) {
if (!(musicSetting->flags & MUSIC_SETTINGS_FLAG_1)) {
return AU_RESULT_OK;
}
@ -360,7 +360,7 @@ s32 func_8014AD40(void) {
s32 i;
for (i = 0; i < 2; i++, settings++) {
if (!(settings->flags & MUSIC_SETTINGS_FLAGS_1)) {
if (!(settings->flags & MUSIC_SETTINGS_FLAG_1)) {
continue;
}
@ -375,7 +375,7 @@ void bgm_pop_song(void) {
MusicSettings* musicSetting = gMusicSettings;
if (gGameStatusPtr->demoState == 0) {
musicSetting->flags |= MUSIC_SETTINGS_FLAGS_8;
musicSetting->flags |= MUSIC_SETTINGS_FLAG_8;
_bgm_set_song(0, musicSetting->savedSongID, musicSetting->savedVariation, 0, 8);
}
}
@ -387,7 +387,7 @@ void bgm_push_song(s32 songID, s32 variation) {
musicSetting->savedSongID = musicSetting->songID;
musicSetting->savedVariation = musicSetting->variation;
musicSetting->savedSongName = musicSetting->songName;
musicSetting->flags |= MUSIC_SETTINGS_FLAGS_4;
musicSetting->flags |= MUSIC_SETTINGS_FLAG_4;
bgm_set_song(0, songID, variation, 500, 8);
}
}
@ -399,7 +399,7 @@ void bgm_pop_battle_song(void) {
if (gOverrideFlags & GLOBAL_OVERRIDES_20000) {
gOverrideFlags &= ~GLOBAL_OVERRIDES_20000;
} else {
musicSetting->flags |= MUSIC_SETTINGS_FLAGS_8;
musicSetting->flags |= MUSIC_SETTINGS_FLAG_8;
_bgm_set_song(0, musicSetting->savedSongID, musicSetting->savedVariation, 0, 8);
snd_ambient_80055590(0, 250);
}
@ -414,7 +414,7 @@ void bgm_push_battle_song(void) {
musicSetting->savedSongID = musicSetting->songID;
musicSetting->savedVariation = musicSetting->variation;
musicSetting->savedSongName = musicSetting->songName;
musicSetting->flags |= MUSIC_SETTINGS_FLAGS_4;
musicSetting->flags |= MUSIC_SETTINGS_FLAG_4;
bgm_set_song(0, musicSetting->battleSongID, musicSetting->battleVariation, 500, 8);
}
}

View File

@ -46,7 +46,7 @@ enum SoundEffectParamFlags {
SFX_PARAM_MODE_0 = 0x00000000,
SFX_PARAM_MODE_1 = 0x00000001,
SFX_PARAM_MODE_2 = 0x00000002,
SFX_PARAM_FLAGS_MODE = 0x00000003,
SFX_PARAM_FLAG_MODE = 0x00000003,
SFX_PARAM_FLAG_VOLUME = 0x00000004,
SFX_PARAM_FLAG_PAN = 0x00000008,
SFX_PARAM_FLAG_PITCH = 0x00000010,
@ -679,7 +679,7 @@ static void func_8004C0E4(SoundManager* manager, SoundPlayer* player, s8* readPo
player->unk_84 = 0;
player->soundC00 = 0;
player->sfxParamsFlags = *player->sefDataReadPos++;
switch (player->sfxParamsFlags & SFX_PARAM_FLAGS_MODE) {
switch (player->sfxParamsFlags & SFX_PARAM_FLAG_MODE) {
case SFX_PARAM_MODE_0:
player->unk_A9 = 1;
break;
@ -687,7 +687,7 @@ static void func_8004C0E4(SoundManager* manager, SoundPlayer* player, s8* readPo
player->unk_A9 = 1;
break;
case SFX_PARAM_MODE_2:
player->sfxParamsFlags &= ~SFX_PARAM_FLAGS_MODE;
player->sfxParamsFlags &= ~SFX_PARAM_FLAG_MODE;
player->unk_A9 = 1;
player->locatorB = player->sefDataReadPos[0];
player->locatorC = player->sefDataReadPos[1];
@ -797,7 +797,7 @@ s16 au_sfx_manager_update(SoundManager* manager) {
manager->currentVoice = voice;
if (voice->priority <= manager->priority) {
manager->unk_BF = i;
switch (sndPlayer->sfxParamsFlags & SFX_PARAM_FLAGS_MODE) {
switch (sndPlayer->sfxParamsFlags & SFX_PARAM_FLAG_MODE) {
case SFX_PARAM_MODE_0:
au_sfx_update_mode_0(manager, sndPlayer, voice, i);
break;
@ -835,7 +835,7 @@ static void au_sfx_update_mode_0(SoundManager* manager, SoundPlayer* player, AlU
player->pitchRatio = au_compute_pitch_ratio(
((player->tuneLerp.current >> 0x10) - player->sfxInstrumentRef->keyBase) + player->masterPitchShift) * player->sfxInstrumentRef->pitchRatio;
if (voice->pitchRatio != player->pitchRatio) {
voice->unk_flags_43 |= AU_VOICE_SYNC_FLAGS_PITCH;
voice->unk_flags_43 |= AU_VOICE_SYNC_FLAG_PITCH;
voice->pitchRatio = player->pitchRatio;
}
}
@ -847,13 +847,13 @@ static void au_sfx_update_mode_0(SoundManager* manager, SoundPlayer* player, AlU
}
if (voice->pan != pan) {
voice->pan = pan;
voice->unk_flags_43 |= AU_VOICE_SYNC_FLAGS_10;
voice->unk_flags_43 |= AU_VOICE_SYNC_FLAG_10;
}
volume = au_sfx_get_scaled_volume(manager, player);
if (voice->adjustedVolume != volume) {
voice->adjustedVolume = volume;
voice->unk_flags_3D |= AU_VOICE_3D_FLAGS_VOL_CHANGED;
voice->unk_flags_3D |= AU_VOICE_3D_FLAG_VOL_CHANGED;
}
}
break;
@ -891,7 +891,7 @@ static void au_sfx_update_mode_0(SoundManager* manager, SoundPlayer* player, AlU
voice->unk_14.unk_04 = player->unk_10.unk_04;
voice->instrument = player->sfxInstrumentRef;
voice->pitchRatio = player->pitchRatio;
voice->unk_flags_43 = AU_VOICE_SYNC_FLAGS_ALL;
voice->unk_flags_43 = AU_VOICE_SYNC_FLAG_ALL;
voice->priority = manager->priority;
voice->priorityCopy = voice->priority;
voice->reverbType = manager->defaultReverbType;
@ -1013,7 +1013,7 @@ static void au_sfx_update_mode_1(SoundManager* manager, SoundPlayer* player, AlU
voice->reverbType = manager->defaultReverbType;
voice->priority = manager->priority;
voice->unk_flags_43 = AU_VOICE_SYNC_FLAGS_ALL;
voice->unk_flags_43 = AU_VOICE_SYNC_FLAG_ALL;
var_s3 = TRUE;
voice->priorityCopy = manager->priority;
player->changed.tune = 1;
@ -1039,7 +1039,7 @@ static void au_sfx_update_mode_1(SoundManager* manager, SoundPlayer* player, AlU
if (player->playLength != 0) {
player->playLength--;
if ((player->playLength == 0) && (voice->priority == manager->priority)) {
voice->unk_flags_3D |= AU_VOICE_3D_FLAGS_10;
voice->unk_flags_3D |= AU_VOICE_3D_FLAG_10;
}
}
if (player->tuneLerp.time != 0) {
@ -1057,13 +1057,13 @@ static void au_sfx_update_mode_1(SoundManager* manager, SoundPlayer* player, AlU
} else {
voice->pan = player->masterPan;
}
voice->unk_flags_43 |= AU_VOICE_SYNC_FLAGS_10;
voice->unk_flags_43 |= AU_VOICE_SYNC_FLAG_10;
voice->reverbAmt = player->reverb;
}
}
if (player->changed.volume && (voice->priority == manager->priority)) {
snd_set_voice_volume(voice, manager, player);
voice->unk_flags_3D |= AU_VOICE_3D_FLAGS_VOL_CHANGED;
voice->unk_flags_3D |= AU_VOICE_3D_FLAG_VOL_CHANGED;
}
if (player->changed.tune) {
f32 adjustedSampleRate;
@ -1077,7 +1077,7 @@ static void au_sfx_update_mode_1(SoundManager* manager, SoundPlayer* player, AlU
player->pitchRatio = adjustedSampleRate;
}
if ((voice->priority == manager->priority) && (voice->pitchRatio != adjustedSampleRate)) {
voice->unk_flags_43 |= AU_VOICE_SYNC_FLAGS_PITCH;
voice->unk_flags_43 |= AU_VOICE_SYNC_FLAG_PITCH;
voice->pitchRatio = player->pitchRatio;
}
}

View File

@ -31,7 +31,7 @@ ApiStatus N(init)(Evt* script, s32 isInitialCall) {
hudElement = hud_element_create(&HES_AButton);
actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX,
actionCommandStatus->hudPosY);
hud_element_set_render_depth(hudElement, 0);
@ -43,14 +43,14 @@ ApiStatus N(init)(Evt* script, s32 isInitialCall) {
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX,
actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hudElement = hud_element_create(&HES_RunAwayOK);
actionCommandStatus->hudElements[2] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX,
actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
battleStatus->flags1 &= ~BS_FLAGS1_8000;

View File

@ -36,19 +36,19 @@ ApiStatus N(init)(Evt* script, s32 isInitialCall) {
actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hudElement = hud_element_create(&HES_BlueMeter);
actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hudElement = hud_element_create(&HES_100pct);
actionCommandStatus->hudElements[2] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
return ApiStatus_DONE2;
}

View File

@ -39,19 +39,19 @@ ApiStatus N(init)(Evt* script, s32 isInitialCall) {
actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hudElement = hud_element_create(&HES_BlueMeter);
actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hudElement = hud_element_create(&HES_100pct);
actionCommandStatus->hudElements[2] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
return ApiStatus_DONE2;
}

View File

@ -43,19 +43,19 @@ ApiStatus N(init)(Evt* script, s32 isInitialCall) {
actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hudElement = hud_element_create(&HES_BlueMeter);
actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hudElement = hud_element_create(&HES_100pct);
actionCommandStatus->hudElements[2] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
return ApiStatus_DONE2;
}

View File

@ -34,25 +34,25 @@ ApiStatus N(init)(Evt* script, s32 isInitialCall) {
actionCommandStatus->hudElements[0] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
id = hud_element_create(&HES_BlueMeter);
actionCommandStatus->hudElements[1] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
id = hud_element_create(&HES_FillGaugeResult);
actionCommandStatus->hudElements[3] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
id = hud_element_create(&HES_TimingWait);
actionCommandStatus->hudElements[2] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX + 41, actionCommandStatus->hudPosY + 22);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
return ApiStatus_DONE2;
}

View File

@ -38,19 +38,19 @@ ApiStatus N(init)(Evt* script, s32 isInitialCall) {
actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hudElement = hud_element_create(&HES_BlueMeter);
actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hudElement = hud_element_create(&HES_100pct);
actionCommandStatus->hudElements[2] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
return ApiStatus_DONE2;
}
@ -69,13 +69,13 @@ void N(update)(void) {
hudElement = actionCommandStatus->hudElements[0];
hud_element_set_alpha(hudElement, 255);
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAG_DISABLED);
}
hudElement = actionCommandStatus->hudElements[1];
hud_element_set_alpha(hudElement, 255);
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAG_DISABLED);
}
actionCommandStatus->state = 1;
@ -144,7 +144,7 @@ void N(update)(void) {
actionCommandStatus->isBarFilled = TRUE;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX + 50,
actionCommandStatus->hudPosY + 28);
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAG_DISABLED);
}
battleStatus->actionResult = actionCommandStatus->barFillLevel / 100;

View File

@ -35,25 +35,25 @@ ApiStatus N(init)(Evt* script, s32 isInitialCall) {
actionCommandStatus->hudElements[0] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
id = hud_element_create(&HES_BlueMeter);
actionCommandStatus->hudElements[1] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
id = hud_element_create(&HES_RunningAway);
actionCommandStatus->hudElements[2] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
id = hud_element_create(&HES_RunAwayOK);
actionCommandStatus->hudElements[3] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
return ApiStatus_DONE2;
}

View File

@ -38,19 +38,19 @@ ApiStatus N(init)(Evt* script, s32 isInitialCall) {
actionCommandStatus->hudElements[0] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
id = hud_element_create(&HES_BlueMeter);
actionCommandStatus->hudElements[1] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
id = hud_element_create(&HES_100pct);
actionCommandStatus->hudElements[2] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
return ApiStatus_DONE2;
}

View File

@ -42,19 +42,19 @@ ApiStatus N(init)(Evt* script, s32 isInitialCall) {
actionCommandStatus->hudElements[0] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
id = hud_element_create(&HES_BlueMeter);
actionCommandStatus->hudElements[1] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
id = hud_element_create(&HES_100pct);
actionCommandStatus->hudElements[2] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
return ApiStatus_DONE2;
}

View File

@ -37,25 +37,25 @@ ApiStatus N(init)(Evt* script, s32 isInitialCall) {
actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hudElement = hud_element_create(&HES_BlueMeter);
actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hudElement = hud_element_create(&HES_RunningAway);
actionCommandStatus->hudElements[2] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hudElement = hud_element_create(&HES_RunAwayOK);
actionCommandStatus->hudElements[3] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
xOffset = 29 - ((100 - actionCommandStatus->thresholdLevel) * 60) / 100;
hud_element_set_render_pos(actionCommandStatus->hudElements[3], actionCommandStatus->hudPosX - xOffset, actionCommandStatus->hudPosY + 17);
@ -65,7 +65,7 @@ ApiStatus N(init)(Evt* script, s32 isInitialCall) {
actionCommandStatus->hudElements[4] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
return ApiStatus_DONE2;
}
@ -100,25 +100,25 @@ void N(update)(void) {
hudElement = actionCommandStatus->hudElements[0];
hud_element_set_alpha(hudElement, 0xFF);
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAG_DISABLED);
}
hudElement = actionCommandStatus->hudElements[1];
hud_element_set_alpha(hudElement, 0xFF);
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAG_DISABLED);
}
hudElement = actionCommandStatus->hudElements[2];
hud_element_set_alpha(hudElement, 0xFF);
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAG_DISABLED);
}
hudElement = actionCommandStatus->hudElements[3];
hud_element_set_alpha(hudElement, 0xFF);
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAG_DISABLED);
}
actionCommandStatus->state = 1;
@ -150,7 +150,7 @@ void N(update)(void) {
actionCommandStatus->barFillLevel = 10000;
actionCommandStatus->isBarFilled = TRUE;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX + 50, actionCommandStatus->hudPosY + 28);
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAG_DISABLED);
}
battleStatus->actionSuccess = actionCommandStatus->barFillLevel / 100;

View File

@ -29,43 +29,43 @@ ApiStatus N(init)(Evt* script, s32 isInitialCall) {
id = hud_element_create(&HES_TimingBar1Chance);
actionCommandStatus->hudElements[0] = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 10);
id = hud_element_create(&HES_TimingWait);
actionCommandStatus->hudElements[1] = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
id = hud_element_create(&HES_TimingCharge4a);
actionCommandStatus->hudElements[2] = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
id = hud_element_create(&HES_TimingCharge4b);
actionCommandStatus->hudElements[3] = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
id = hud_element_create(&HES_TimingCharge4c);
actionCommandStatus->hudElements[4] = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
id = hud_element_create(&HES_StickHoldLeft);
actionCommandStatus->hudElements[5] = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
id = hud_element_create(&HES_RightOn);
actionCommandStatus->hudElements[6] = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
hud_element_set_alpha(id, 0xFF);

View File

@ -33,13 +33,13 @@ ApiStatus N(init)(Evt* script, s32 isInitialCall) {
id = hud_element_create(&HES_AButton);
actionCommandStatus->hudElements[0] = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
id = hud_element_create(&HES_BButton);
actionCommandStatus->hudElements[2] = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
@ -47,13 +47,13 @@ ApiStatus N(init)(Evt* script, s32 isInitialCall) {
actionCommandStatus->hudElements[1] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
id = hud_element_create(&HES_100pct);
actionCommandStatus->hudElements[4] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
return ApiStatus_DONE2;
}
@ -109,20 +109,20 @@ void N(update)(void) {
hudElement = actionCommandStatus->hudElements[0];
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAG_DISABLED);
}
hud_element_set_alpha(hudElement, 255);
hudElement = actionCommandStatus->hudElements[2];
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAG_DISABLED);
}
hud_element_set_alpha(hudElement, 255);
hudElement = actionCommandStatus->hudElements[1];
hud_element_set_alpha(hudElement, 255);
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAG_DISABLED);
}
actionCommandStatus->state = 1;
@ -246,7 +246,7 @@ void N(update)(void) {
actionCommandStatus->isBarFilled = TRUE;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX + 50,
actionCommandStatus->hudPosY + 28);
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAG_DISABLED);
}
adjustedFillLevel = actionCommandStatus->barFillLevel / 100;

View File

@ -27,14 +27,14 @@ ApiStatus N(init)(Evt* script, s32 isInitialCall) {
hudElement = hud_element_create(&HES_AButton);
actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_alpha(hudElement, 255);
hudElement = hud_element_create(&HES_RightOn);
actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_alpha(hudElement, 255);
@ -66,7 +66,7 @@ ApiStatus N(start)(Evt* script, s32 isInitialCall) {
battleStatus->flags1 &= ~BS_FLAGS1_2000;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAG_DISABLED);
}
actionCommandStatus->state = 10;
@ -102,14 +102,14 @@ void N(update)(void) {
hudElement = actionCommandStatus->hudElements[0];
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAG_DISABLED);
}
if (actionCommandStatus->autoSucceed) {
hudElement = actionCommandStatus->hudElements[1];
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX + 50, actionCommandStatus->hudPosY);
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAG_DISABLED);
break;
}
}
@ -147,7 +147,7 @@ void N(update)(void) {
if (battleStatus->actionSuccess >= 0) {
hudElement = actionCommandStatus->hudElements[0];
if (actionCommandStatus->showHud) {
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAG_DISABLED);
}
}
}

View File

@ -33,13 +33,13 @@ ApiStatus N(init)(Evt* script, s32 isInitialCall) {
elementID = hud_element_create(&HES_AButton);
actionCommandStatus->hudElements[0] = elementID;
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hud_element_set_render_pos(elementID, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(elementID, 0);
elementID = hud_element_create(&HES_BButton);
actionCommandStatus->hudElements[2] = elementID;
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hud_element_set_render_pos(elementID, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(elementID, 0);
@ -47,13 +47,13 @@ ApiStatus N(init)(Evt* script, s32 isInitialCall) {
actionCommandStatus->hudElements[1] = elementID;
hud_element_set_render_pos(elementID, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 0x1C);
hud_element_set_render_depth(elementID, 0);
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
elementID = hud_element_create(&HES_100pct);
actionCommandStatus->hudElements[4] = elementID;
hud_element_set_render_pos(elementID, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 0x1C);
hud_element_set_render_depth(elementID, 0);
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
return ApiStatus_DONE2;
}
@ -114,20 +114,20 @@ void N(update)(void) {
hudElement = actionCommandStatus->hudElements[0];
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAG_DISABLED);
}
hud_element_set_alpha(hudElement, 255);
hudElement = actionCommandStatus->hudElements[2];
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAG_DISABLED);
}
hud_element_set_alpha(hudElement, 255);
hudElement = actionCommandStatus->hudElements[1];
hud_element_set_alpha(hudElement, 255);
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAG_DISABLED);
}
actionCommandStatus->state = 1;
@ -251,7 +251,7 @@ void N(update)(void) {
actionCommandStatus->isBarFilled = TRUE;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX + 50,
actionCommandStatus->hudPosY + 28);
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAG_DISABLED);
}
adjustedFillLevel = actionCommandStatus->barFillLevel / 100;

View File

@ -39,7 +39,7 @@ ApiStatus N(init)(Evt* script, s32 isInitialCall) {
id = hud_element_create(&HES_AButton);
actionCommandStatus->hudElements[0] = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
@ -47,19 +47,19 @@ ApiStatus N(init)(Evt* script, s32 isInitialCall) {
actionCommandStatus->hudElements[1] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
id = hud_element_create(&HES_100pct);
actionCommandStatus->hudElements[3] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
id = hud_element_create(&HES_RunAwayOK);
actionCommandStatus->hudElements[4] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
temp_v1 = (100 - actionCommandStatus->thresholdLevel) * 60;
temp_v1 /= 100;
@ -108,18 +108,18 @@ void N(update)(void) {
btl_set_popup_duration(99);
id = actionCommandStatus->hudElements[0];
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
}
hud_element_set_alpha(id, 255);
id = actionCommandStatus->hudElements[1];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
}
id = actionCommandStatus->hudElements[4];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
}
actionCommandStatus->state = 1;
break;
@ -204,7 +204,7 @@ void N(update)(void) {
id,
actionCommandStatus->hudPosX + 50,
actionCommandStatus->hudPosY + 28);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
}
battleStatus->actionResult = actionCommandStatus->barFillLevel / 100;

View File

@ -65,19 +65,19 @@ ApiStatus N(init)(Evt* script, s32 isInitialCall) {
actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hudElement = hud_element_create(&HES_BlueMeter);
actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hudElement = hud_element_create(&HES_100pct);
actionCommandStatus->hudElements[2] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
return ApiStatus_DONE2;
}
@ -98,12 +98,12 @@ void N(update)(void) {
hudElement = actionCommandStatus->hudElements[0];
hud_element_set_alpha(hudElement, 255);
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAG_DISABLED);
}
hudElement = actionCommandStatus->hudElements[1];
hud_element_set_alpha(hudElement, 255);
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAG_DISABLED);
}
actionCommandStatus->state = 1;
break;
@ -182,7 +182,7 @@ void N(update)(void) {
actionCommandStatus->isBarFilled = TRUE;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX + 50,
actionCommandStatus->hudPosY + 28);
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAG_DISABLED);
}
battleStatus->actionResult = actionCommandStatus->barFillLevel / 100;

View File

@ -40,19 +40,19 @@ ApiStatus N(init)(Evt* script, s32 isInitialCall) {
actionCommandStatus->hudElements[0] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
id = hud_element_create(&HES_BlueMeter);
actionCommandStatus->hudElements[1] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
id = hud_element_create(&HES_100pct);
actionCommandStatus->hudElements[2] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
return ApiStatus_DONE2;
}
@ -99,13 +99,13 @@ void N(update)(void) {
id = actionCommandStatus->hudElements[0];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
}
id = actionCommandStatus->hudElements[1];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
}
actionCommandStatus->state = 1;

View File

@ -38,19 +38,19 @@ ApiStatus N(init)(Evt* script, s32 isInitialCall) {
actionCommandStatus->hudElements[0] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
id = hud_element_create(&HES_BlueMeter);
actionCommandStatus->hudElements[1] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
id = hud_element_create(&HES_100pct);
actionCommandStatus->hudElements[2] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
return ApiStatus_DONE2;
}

View File

@ -33,7 +33,7 @@ ApiStatus N(init)(Evt* script, s32 isInitialCall) {
id = hud_element_create(&HES_AButton);
actionCommandStatus->hudElements[0] = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
@ -41,7 +41,7 @@ ApiStatus N(init)(Evt* script, s32 isInitialCall) {
actionCommandStatus->hudElements[1] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
return ApiStatus_DONE2;
}
@ -86,14 +86,14 @@ void N(update)(void) {
id = actionCommandStatus->hudElements[0];
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
}
hud_element_set_alpha(id, 255);
id = actionCommandStatus->hudElements[1];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
}
actionCommandStatus->state = 1;

View File

@ -28,7 +28,7 @@ ApiStatus N(init)(Evt* script, s32 isInitialCall) {
hudElement = hud_element_create(&HES_AButton);
actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(hudElement, 0);
@ -36,7 +36,7 @@ ApiStatus N(init)(Evt* script, s32 isInitialCall) {
actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
return ApiStatus_DONE2;
}
@ -77,13 +77,13 @@ void N(update)(void) {
btl_set_popup_duration(99);
hudElement = actionCommandStatus->hudElements[0];
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAG_DISABLED);
}
hud_element_set_alpha(hudElement, 0xFF);
hudElement = actionCommandStatus->hudElements[1];
hud_element_set_alpha(hudElement, 0xFF);
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAG_DISABLED);
}
actionCommandStatus->state = 1;
break;

View File

@ -35,14 +35,14 @@ ApiStatus N(init)(Evt* script, s32 isInitialCall) {
actionCommandStatus->hudElements[0] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
for (i = 1; i < 15; i++) {
id = hud_element_create(&HES_AButton);
actionCommandStatus->hudElements[i] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
}
return ApiStatus_DONE2;
@ -93,7 +93,7 @@ void N(update)(void) {
btl_set_popup_duration(99);
id = actionCommandStatus->hudElements[0];
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
}
hud_element_set_alpha(id, 255);
actionCommandStatus->state = 1;
@ -138,7 +138,7 @@ void N(update)(void) {
id,
actionCommandStatus->hudPosX + ((actionCommandStatus->unk_5D - 1) * 20) + 16,
actionCommandStatus->hudPosY);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
sfx_play_sound(SOUND_233);
actionCommandStatus->lookBackCounter = 1;
actionCommandStatus->state = 12;

View File

@ -137,7 +137,7 @@ ApiStatus N(init)(Evt* script, s32 isInitialCall) {
id = hud_element_create(&HES_AButton);
actionCommandStatus->hudElements[0] = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
@ -145,43 +145,43 @@ ApiStatus N(init)(Evt* script, s32 isInitialCall) {
actionCommandStatus->hudElements[1] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
id = hud_element_create(&HES_TimingWait);
actionCommandStatus->hudElements[2] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
id = hud_element_create(&HES_TimingWait);
actionCommandStatus->hudElements[3] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
id = hud_element_create(&HES_TimingWait);
actionCommandStatus->hudElements[4] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
id = hud_element_create(&HES_TimingOK);
actionCommandStatus->hudElements[6] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
id = hud_element_create(&HES_TimingOK);
actionCommandStatus->hudElements[7] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
id = hud_element_create(&HES_TimingOK);
actionCommandStatus->hudElements[8] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
actionCommandStatus->hudElements[10] = hud_element_create(D_802AB184_42C674[0]);
hud_element_set_render_pos(actionCommandStatus->hudElements[10],

View File

@ -92,7 +92,7 @@ ApiStatus N(init)(Evt* script, s32 isInitialCall) {
id = hud_element_create(&HES_AButton);
actionCommandStatus->hudElements[0] = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
@ -100,19 +100,19 @@ ApiStatus N(init)(Evt* script, s32 isInitialCall) {
actionCommandStatus->hudElements[1] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
id = hud_element_create(&HES_Whirlwind7);
actionCommandStatus->hudElements[2] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX + 54, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
id = hud_element_create(&HES_WhirlwindBubble);
actionCommandStatus->hudElements[3] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX + 60, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
return ApiStatus_DONE2;
}

View File

@ -243,12 +243,12 @@ ApiStatus N(DropBlock)(Evt* script, s32 isInitialCall) {
entity->collisionTimer = 0;
collisionStatus->lastWallHammered = entityIndex | COLLISION_WITH_ENTITY_BIT;
playerStatus->flags |= PS_FLAGS_HAMMER_CHECK;
playerStatus->flags |= PS_FLAG_HAMMER_CHECK;
entity->collisionFlags = ENTITY_COLLISION_PLAYER_HAMMER;
playerStatus->actionState = ACTION_STATE_HAMMER;
entity->blueprint->fpHandleCollision(entity);
entity->collisionTimer = 10;
entity->flags |= ENTITY_FLAGS_DETECTED_COLLISION;
entity->flags |= ENTITY_FLAG_DETECTED_COLLISION;
collisionStatus->lastWallHammered = -1;
return ApiStatus_DONE2;

View File

@ -549,7 +549,7 @@ ApiStatus func_802189DC_447E1C(Evt* script, s32 isInitialCall) {
hud_element_set_render_pos(icon, posX, posY);
hud_element_set_scale(icon, 1.5f);
hud_element_clear_flags(icon, HUD_ELEMENT_FLAGS_200000 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(icon, HUD_ELEMENT_FLAG_200000 | HUD_ELEMENT_FLAG_DISABLED);
evt_set_variable(script, *args++, icon);
load_tattle_flags(0x8B);
return ApiStatus_DONE2;

View File

@ -56,7 +56,7 @@ ActorPartBlueprint N(partsTable_80218EE8)[] = {
.idleAnimations = N(idleAnimations_80218FC4),
.defenseTable = N(defenseTable_80218E10),
.eventFlags = ACTOR_EVENT_FLAG_FIREY,
.elementImmunityFlags = ELEMENT_IMMUNITY_FLAGS_2,
.elementImmunityFlags = ELEMENT_IMMUNITY_FLAG_2,
.unk_1C = 0xFD,
.unk_1D = 0xF6,
},

View File

@ -253,7 +253,7 @@ EvtScript N(handleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(SetAnimatorFlags, LVar0, MODEL_ANIMATOR_FLAGS_FREEZE_ANIMATION, 0)
EVT_CALL(SetAnimatorFlags, LVar0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 0)
EVT_CALL(GetLastElement, LVarE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
@ -295,7 +295,7 @@ EvtScript N(handleEvent) = {
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(SetAnimatorFlags, LVar0, MODEL_ANIMATOR_FLAGS_FREEZE_ANIMATION, 0)
EVT_CALL(SetAnimatorFlags, LVar0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 0)
EVT_CASE_EQ(EVENT_30)
EVT_SET_CONST(LVar0, 1)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar1)
@ -306,7 +306,7 @@ EvtScript N(handleEvent) = {
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_FLAG(LVar0, STATUS_FLAG_STOP)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(SetAnimatorFlags, LVar0, MODEL_ANIMATOR_FLAGS_FREEZE_ANIMATION, 1)
EVT_CALL(SetAnimatorFlags, LVar0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 1)
EVT_END_IF
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)

View File

@ -552,25 +552,25 @@ EvtScript N(init) = {
EVT_CALL(LoadBattleDmaData, 0)
EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE)
EVT_CALL(SetAnimatedModelRootPosition, VINE_0, 0, 0, 0)
EVT_CALL(SetAnimatorFlags, VINE_0, MODEL_ANIMATOR_FLAGS_HIDDEN, 1)
EVT_CALL(SetAnimatorFlags, VINE_0, MODEL_ANIMATOR_FLAG_HIDDEN, 1)
EVT_CALL(LoadAnimatedModel, VINE_1, EVT_PTR(N(AnimModel_SideHeadVine)))
EVT_CALL(OverrideBattleDmaDest, VINE_1_BASE)
EVT_CALL(LoadBattleDmaData, 31)
EVT_CALL(PlayModelAnimation, VINE_1, VINE_1_BASE)
EVT_CALL(SetAnimatedModelRootPosition, VINE_1, 0, 0, 0)
EVT_CALL(SetAnimatorFlags, VINE_1, MODEL_ANIMATOR_FLAGS_HIDDEN, 1)
EVT_CALL(SetAnimatorFlags, VINE_1, MODEL_ANIMATOR_FLAG_HIDDEN, 1)
EVT_CALL(LoadAnimatedModel, VINE_2, EVT_PTR(N(AnimModel_SideHeadVine)))
EVT_CALL(OverrideBattleDmaDest, VINE_2_BASE)
EVT_CALL(LoadBattleDmaData, 31)
EVT_CALL(PlayModelAnimation, VINE_2, VINE_2_BASE)
EVT_CALL(SetAnimatedModelRootPosition, VINE_2, 50, 14, 20)
EVT_CALL(SetAnimatorFlags, VINE_2, MODEL_ANIMATOR_FLAGS_HIDDEN, 1)
EVT_CALL(SetAnimatorFlags, VINE_2, MODEL_ANIMATOR_FLAG_HIDDEN, 1)
EVT_CALL(LoadAnimatedModel, VINE_3, EVT_PTR(N(AnimModel_ExtraVine)))
EVT_CALL(OverrideBattleDmaDest, VINE_3_BASE)
EVT_CALL(LoadBattleDmaData, 34)
EVT_CALL(PlayModelAnimation, VINE_3, VINE_3_BASE)
EVT_CALL(SetAnimatedModelRootPosition, VINE_3, 0, 0, 3)
EVT_CALL(SetAnimatorFlags, VINE_3, MODEL_ANIMATOR_FLAGS_HIDDEN, 1)
EVT_CALL(SetAnimatorFlags, VINE_3, MODEL_ANIMATOR_FLAG_HIDDEN, 1)
EVT_CALL(SummonEnemy, EVT_PTR(N(formation_lava_bud_1)), 0)
EVT_CALL(SummonEnemy, EVT_PTR(N(formation_lava_bud_2)), 0)
EVT_WAIT(2)
@ -939,7 +939,7 @@ EvtScript N(initVines) = {
EvtScript N(handleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetAnimatorFlags, VINE_0, MODEL_ANIMATOR_FLAGS_FREEZE_ANIMATION, 0)
EVT_CALL(SetAnimatorFlags, VINE_0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 0)
EVT_CALL(GetLastElement, LVarE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
@ -990,7 +990,7 @@ EvtScript N(handleEvent) = {
EVT_CASE_EQ(EVENT_SPIKE_TAUNT)
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_CALL(SetAnimatorFlags, VINE_0, MODEL_ANIMATOR_FLAGS_FREEZE_ANIMATION, 0)
EVT_CALL(SetAnimatorFlags, VINE_0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 0)
EVT_CASE_EQ(EVENT_30)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_LavaPiranha_Anim09)
@ -1011,7 +1011,7 @@ EvtScript N(handleEvent) = {
EVT_END_IF
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_FLAG(LVar0, STATUS_FLAG_STOP)
EVT_CALL(SetAnimatorFlags, VINE_0, MODEL_ANIMATOR_FLAGS_FREEZE_ANIMATION, 1)
EVT_CALL(SetAnimatorFlags, VINE_0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 1)
EVT_END_IF
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
@ -1346,11 +1346,11 @@ EvtScript N(onDeath) = {
EVT_CALL(ClearStatusEffects, ACTOR_SELF)
EVT_CALL(ClearStatusEffects, ACTOR_ENEMY1)
EVT_CALL(ClearStatusEffects, ACTOR_ENEMY2)
EVT_CALL(SetAnimatorFlags, VINE_0, MODEL_ANIMATOR_FLAGS_FREEZE_ANIMATION, 0)
EVT_CALL(SetAnimatorFlags, VINE_0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 0)
EVT_CALL(GetActorVar, ACTOR_ENEMY1, 0, LVar0)
EVT_CALL(SetAnimatorFlags, LVar0, MODEL_ANIMATOR_FLAGS_FREEZE_ANIMATION, 0)
EVT_CALL(SetAnimatorFlags, LVar0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 0)
EVT_CALL(GetActorVar, ACTOR_ENEMY2, 0, LVar0)
EVT_CALL(SetAnimatorFlags, LVar0, MODEL_ANIMATOR_FLAGS_FREEZE_ANIMATION, 0)
EVT_CALL(SetAnimatorFlags, LVar0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 0)
EVT_CALL(CancelEnemyTurn, 1)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19)
EVT_CALL(SetBattleCamTarget, 90, 90, 0)

View File

@ -988,7 +988,7 @@ ApiStatus func_80218E2C_4652BC(Evt* script, s32 isInitialCall) {
EffectInstance* tattleEffect = (EffectInstance*) evt_get_variable(script, *script->ptrReadPos);
tattleEffect->data.tattleWindow->pos.y = 144.0f;
tattleEffect->flags |= EFFECT_INSTANCE_FLAGS_10;
tattleEffect->flags |= EFFECT_INSTANCE_FLAG_10;
return ApiStatus_DONE2;
}
@ -2914,7 +2914,7 @@ ApiStatus func_80219188_465618(Evt* script, s32 isInitialCall) {
}
if (wattEffectData->effect2 != NULL) {
wattEffectData->effect2->flags |= EFFECT_INSTANCE_FLAGS_10;
wattEffectData->effect2->flags |= EFFECT_INSTANCE_FLAG_10;
wattEffectData->effect2 = NULL;
}
wattEffectData->effect1->data.staticStatus->unk_04 = x;
@ -2923,7 +2923,7 @@ ApiStatus func_80219188_465618(Evt* script, s32 isInitialCall) {
break;
case 1:
if (wattEffectData->effect1 != NULL) {
wattEffectData->effect1->flags |= EFFECT_INSTANCE_FLAGS_10;
wattEffectData->effect1->flags |= EFFECT_INSTANCE_FLAG_10;
wattEffectData->effect1 = NULL;
}
if (wattEffectData->effect2 == NULL) {
@ -2937,21 +2937,21 @@ ApiStatus func_80219188_465618(Evt* script, s32 isInitialCall) {
}
} else {
if (wattEffectData->effect1 != NULL) {
wattEffectData->effect1->flags |= EFFECT_INSTANCE_FLAGS_10;
wattEffectData->effect1->flags |= EFFECT_INSTANCE_FLAG_10;
wattEffectData->effect1 = NULL;
}
if (wattEffectData->effect2 != NULL) {
wattEffectData->effect2->flags |= EFFECT_INSTANCE_FLAGS_10;
wattEffectData->effect2->flags |= EFFECT_INSTANCE_FLAG_10;
wattEffectData->effect2 = NULL;
}
}
if (wattEffectData->debuff != actor->debuff && wattEffectData->unk_0C) {
if (wattEffectData->effect1 != NULL) {
wattEffectData->effect1->flags |= EFFECT_INSTANCE_FLAGS_10;
wattEffectData->effect1->flags |= EFFECT_INSTANCE_FLAG_10;
wattEffectData->effect1 = NULL;
}
if (wattEffectData->effect2 != NULL) {
wattEffectData->effect2->flags |= EFFECT_INSTANCE_FLAGS_10;
wattEffectData->effect2->flags |= EFFECT_INSTANCE_FLAG_10;
wattEffectData->effect2 = NULL;
}
}
@ -2967,11 +2967,11 @@ ApiStatus func_80219604_465A94(Evt* script, s32 isInitialCall) {
wattEffectData->flags = 0;
if (wattEffectData->effect1 != NULL) {
wattEffectData->effect1->flags |= EFFECT_INSTANCE_FLAGS_10;
wattEffectData->effect1->flags |= EFFECT_INSTANCE_FLAG_10;
}
if (wattEffectData->effect2 != NULL) {
wattEffectData->effect2->flags |= EFFECT_INSTANCE_FLAGS_10;
wattEffectData->effect2->flags |= EFFECT_INSTANCE_FLAG_10;
}
return ApiStatus_DONE2;

View File

@ -51,7 +51,7 @@ ApiStatus N(update_model_uma)(Evt* script, s32 isInitialCall) {
offsetY = SQ(rotZ) / 90.0f;
model = get_model_from_list_index(get_model_list_index_from_tree_index(ptr->modelID));
model->flags |= MODEL_FLAGS_USES_TRANSFORM_MATRIX | MODEL_FLAGS_HAS_TRANSFORM_APPLIED;
model->flags |= MODEL_FLAG_USES_TRANSFORM_MATRIX | MODEL_FLAG_HAS_TRANSFORM_APPLIED;
guTranslateF(mtx1, -ptr->offsetX, 0.0f, -ptr->offsetZ);
guRotateF(mtx2, rotZ, 0.0f, 0.0f, 1.0f);
guMtxCatF(mtx1, mtx2, model->transformMatrix);

View File

@ -51,7 +51,7 @@ ApiStatus N(update_model_uma)(Evt* script, s32 isInitialCall) {
offsetY = SQ(rotZ) / 90.0f;
model = get_model_from_list_index(get_model_list_index_from_tree_index(ptr->modelID));
model->flags |= MODEL_FLAGS_USES_TRANSFORM_MATRIX | MODEL_FLAGS_HAS_TRANSFORM_APPLIED;
model->flags |= MODEL_FLAG_USES_TRANSFORM_MATRIX | MODEL_FLAG_HAS_TRANSFORM_APPLIED;
guTranslateF(mtx1, -ptr->offsetX, 0.0f, -ptr->offsetZ);
guRotateF(mtx2, rotZ, 0.0f, 0.0f, 1.0f);
guMtxCatF(mtx1, mtx2, model->transformMatrix);

View File

@ -23,7 +23,7 @@ ApiStatus N(UnkTattleEffectFunc2)(Evt* script, s32 isInitialCall) {
EffectInstance* effect = (EffectInstance*)evt_get_variable(script, *args++);
effect->data.tattleWindow->pos.y = 144.0f;
effect->flags |= EFFECT_INSTANCE_FLAGS_10;
effect->flags |= EFFECT_INSTANCE_FLAG_10;
return ApiStatus_DONE2;
}

View File

@ -42,7 +42,7 @@ ApiStatus N(UnkWattEffectFunc1)(Evt* script, s32 isInitialCall) {
}
if (wattEffectData->effect2 != NULL) {
wattEffectData->effect2->flags |= EFFECT_INSTANCE_FLAGS_10;
wattEffectData->effect2->flags |= EFFECT_INSTANCE_FLAG_10;
wattEffectData->effect2 = NULL;
}
wattEffectData->effect1->data.staticStatus->unk_04 = x;
@ -51,7 +51,7 @@ ApiStatus N(UnkWattEffectFunc1)(Evt* script, s32 isInitialCall) {
break;
case 1:
if (wattEffectData->effect1 != NULL) {
wattEffectData->effect1->flags |= EFFECT_INSTANCE_FLAGS_10;
wattEffectData->effect1->flags |= EFFECT_INSTANCE_FLAG_10;
wattEffectData->effect1 = NULL;
}
if (wattEffectData->effect2 == NULL) {
@ -65,21 +65,21 @@ ApiStatus N(UnkWattEffectFunc1)(Evt* script, s32 isInitialCall) {
}
} else {
if (wattEffectData->effect1 != NULL) {
wattEffectData->effect1->flags |= EFFECT_INSTANCE_FLAGS_10;
wattEffectData->effect1->flags |= EFFECT_INSTANCE_FLAG_10;
wattEffectData->effect1 = NULL;
}
if (wattEffectData->effect2 != NULL) {
wattEffectData->effect2->flags |= EFFECT_INSTANCE_FLAGS_10;
wattEffectData->effect2->flags |= EFFECT_INSTANCE_FLAG_10;
wattEffectData->effect2 = NULL;
}
}
if (wattEffectData->debuff != actor->debuff && wattEffectData->unk_0C) {
if (wattEffectData->effect1 != NULL) {
wattEffectData->effect1->flags |= EFFECT_INSTANCE_FLAGS_10;
wattEffectData->effect1->flags |= EFFECT_INSTANCE_FLAG_10;
wattEffectData->effect1 = NULL;
}
if (wattEffectData->effect2 != NULL) {
wattEffectData->effect2->flags |= EFFECT_INSTANCE_FLAGS_10;
wattEffectData->effect2->flags |= EFFECT_INSTANCE_FLAG_10;
wattEffectData->effect2 = NULL;
}
}
@ -97,11 +97,11 @@ ApiStatus N(UnkWattEffectFunc2)(Evt* script, s32 isInitialCall) {
wattEffectData->flags = FALSE;
if (wattEffectData->effect1 != NULL) {
wattEffectData->effect1->flags |= EFFECT_INSTANCE_FLAGS_10;
wattEffectData->effect1->flags |= EFFECT_INSTANCE_FLAG_10;
}
if (wattEffectData->effect2 != NULL) {
wattEffectData->effect2->flags |= EFFECT_INSTANCE_FLAGS_10;
wattEffectData->effect2->flags |= EFFECT_INSTANCE_FLAG_10;
}
return ApiStatus_DONE2;

View File

@ -6,7 +6,7 @@
#include "effects.h"
enum N(ActorVars) {
N(VAR_FLAGS_HIT_COMBO) = 0,
N(VAR_FLAG_HIT_COMBO) = 0,
N(VAR_HAS_CLONE) = 1,
N(VAR_CAN_FALL) = 2,
N(VAR_HEAL_ALL_COUNTER) = 3,
@ -412,9 +412,9 @@ EvtScript N(flee) = {
};
EvtScript N(nextTurn) = {
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_FLAGS_HIT_COMBO), LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_FLAG_HIT_COMBO), LVar0)
EVT_BITWISE_AND_CONST(LVar0, ~0x1)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_FLAGS_HIT_COMBO), LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_FLAG_HIT_COMBO), LVar0)
EVT_RETURN
EVT_END
};
@ -428,7 +428,7 @@ EvtScript N(init) = {
EVT_IF_EQ(LVar0, 0)
EVT_CALL(SetBattleVar, 2, -1)
EVT_END_IF
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_FLAGS_HIT_COMBO), 0)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_FLAG_HIT_COMBO), 0)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_HAS_CLONE), 0)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_CAN_FALL), 0)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_HEAL_ALL_COUNTER), 0)
@ -452,7 +452,7 @@ EvtScript N(init_flying) = {
EVT_IF_EQ(LVar0, 0)
EVT_CALL(SetBattleVar, 2, -1)
EVT_END_IF
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_FLAGS_HIT_COMBO), 0)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_FLAG_HIT_COMBO), 0)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_HAS_CLONE), 0)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_CAN_FALL), 0)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_HEAL_ALL_COUNTER), 0)
@ -516,9 +516,9 @@ EvtScript N(handleEvent) = {
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(EVENT_HIT_COMBO)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_FLAGS_HIT_COMBO), LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_FLAG_HIT_COMBO), LVar0)
EVT_BITWISE_OR_CONST(LVar0, 0x1)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_FLAGS_HIT_COMBO), LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_FLAG_HIT_COMBO), LVar0)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim04)
EVT_EXEC_WAIT(DoNormalHit)
@ -567,7 +567,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim01)
EVT_EXEC_WAIT(DoImmune)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_FLAGS_HIT_COMBO), LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_FLAG_HIT_COMBO), LVar0)
EVT_IF_FLAG(LVar0, 1)
EVT_EXEC_WAIT(N(removeClone))
EVT_RETURN
@ -643,9 +643,9 @@ EvtScript N(handleEvent_flying) = {
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(EVENT_HIT_COMBO)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_FLAGS_HIT_COMBO), LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_FLAG_HIT_COMBO), LVar0)
EVT_BITWISE_OR_CONST(LVar0, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_FLAGS_HIT_COMBO), LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_FLAG_HIT_COMBO), LVar0)
EVT_EXEC_WAIT(N(canBeKnockedOff))
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim04)
@ -706,7 +706,7 @@ EvtScript N(handleEvent_flying) = {
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim01)
EVT_EXEC_WAIT(DoImmune)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_FLAGS_HIT_COMBO), LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_FLAG_HIT_COMBO), LVar0)
EVT_IF_FLAG(LVar0, 1)
EVT_EXEC_WAIT(N(removeClone))
EVT_RETURN

View File

@ -26,7 +26,7 @@ ApiStatus N(func_802A1270_727B80)(Evt* script, s32 isInitialCall) {
D_802A1CD0 = create_worker_frontUI(NULL, func_802A123C_727B4C);
script->functionTemp[0] = 1;
case 1:
camera->flags |= CAMERA_FLAGS_SHAKING;
camera->flags |= CAMERA_FLAG_SHAKING;
a = script->functionTemp[1];
guRotateF(camera->viewMtxShaking, a, 0.0f, 0.0f, 1.0f);
script->functionTemp[1] = 2.0 * ((1.0 - sin_rad(DEG_TO_RAD(script->functionTemp[2] + 90))) * 360.0);
@ -35,7 +35,7 @@ ApiStatus N(func_802A1270_727B80)(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK;
}
camera->auxPitch = 0;
camera->flags &= ~CAMERA_FLAGS_SHAKING;
camera->flags &= ~CAMERA_FLAG_SHAKING;
free_worker(D_802A1CD0);
return ApiStatus_DONE2;
}

View File

@ -73,7 +73,7 @@ s32 N(func_802A13E4_72C994)(Evt* script, s32 isInitialCall) {
for (i = 0; i < ARRAY_COUNT(D_802A25C8); i++) {
id = hud_element_create(gItemHudScripts[gItemTable[D_802A25FC[i]].hudElemID].enabled);
D_802A25C8[i] = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
}
D_802A25E4 = 1;
return ApiStatus_BLOCK;

View File

@ -12,10 +12,10 @@ ApiStatus N(func_802A123C_718A8C)(Evt* script, s32 isInitialCall) {
s32 var = script->varTable[10];
get_entity_by_index(var);
collisionStatus->currentCeiling = var | COLLISION_WITH_ENTITY_BIT;
playerStatus->flags |= PS_FLAGS_JUMPING;
playerStatus->flags |= PS_FLAG_JUMPING;
update_entities();
collisionStatus->currentCeiling = -1;
playerStatus->flags &= ~PS_FLAGS_JUMPING;
playerStatus->flags &= ~PS_FLAG_JUMPING;
return ApiStatus_DONE2;
}
@ -25,7 +25,7 @@ ApiStatus N(func_802A123C_718A8C)(Evt* script, s32 isInitialCall) {
ApiStatus N(func_802A12E4_718B34)(Evt* script, s32 isInitialCall) {
Entity* entity = get_entity_by_index(script->varTable[10]);
entity->flags |= ENTITY_FLAGS_PENDING_INSTANCE_DELETE;
entity->flags |= ENTITY_FLAG_PENDING_INSTANCE_DELETE;
return ApiStatus_DONE2;
}

View File

@ -63,7 +63,7 @@ s32 N(func_802A13E4_7316E4)(Evt* script, s32 isInitialCall) {
for (i = 0; i < ARRAY_COUNT(D_802A2DD8); i++) {
id = hud_element_create(N(D_802A2848_732B48)[N(D_802A2858_732B58)[i]]);
D_802A2DD8[i] = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
}
D_802A2DEC = 1;

View File

@ -347,7 +347,7 @@ ApiStatus N(CloseTattleWindow)(Evt* script, s32 isInitialCall) {
EffectInstance* effect = N(tattleEffect);
effect->data.tattleWindow->pos.y = 144.0f;
effect->flags |= EFFECT_INSTANCE_FLAGS_10;
effect->flags |= EFFECT_INSTANCE_FLAG_10;
return ApiStatus_DONE2;
}

View File

@ -77,7 +77,7 @@ ApiStatus N(WattFXUpdate)(Evt* script, s32 isInitialCall) {
sWattEffectData_effect1 = fx_static_status(0, x, y, z, 1.0f, 5, 0);
}
if (sWattEffectData_effect2 != NULL) {
sWattEffectData_effect2->flags |= EFFECT_INSTANCE_FLAGS_10;
sWattEffectData_effect2->flags |= EFFECT_INSTANCE_FLAG_10;
sWattEffectData_effect2 = NULL;
}
sWattEffectData_effect1->data.staticStatus->unk_04 = x;
@ -86,7 +86,7 @@ ApiStatus N(WattFXUpdate)(Evt* script, s32 isInitialCall) {
break;
case 1:
if (sWattEffectData_effect1 != NULL) {
sWattEffectData_effect1->flags |= EFFECT_INSTANCE_FLAGS_10;
sWattEffectData_effect1->flags |= EFFECT_INSTANCE_FLAG_10;
sWattEffectData_effect1 = NULL;
}
if (sWattEffectData_effect2 == NULL) {
@ -99,11 +99,11 @@ ApiStatus N(WattFXUpdate)(Evt* script, s32 isInitialCall) {
}
} else {
if (sWattEffectData_effect1 != NULL) {
sWattEffectData_effect1->flags |= EFFECT_INSTANCE_FLAGS_10;
sWattEffectData_effect1->flags |= EFFECT_INSTANCE_FLAG_10;
sWattEffectData_effect1 = NULL;
}
if (sWattEffectData_effect2 != NULL) {
sWattEffectData_effect2->flags |= EFFECT_INSTANCE_FLAGS_10;
sWattEffectData_effect2->flags |= EFFECT_INSTANCE_FLAG_10;
sWattEffectData_effect2 = NULL;
}
}
@ -167,7 +167,7 @@ ApiStatus N(ElectroDashFXDisable)(Evt* script, s32 isInitialCall) {
EffectInstance* effect = N(radialShimmer);
if (effect != NULL) {
effect->flags |= EFFECT_INSTANCE_FLAGS_10;
effect->flags |= EFFECT_INSTANCE_FLAG_10;
}
N(radialShimmer) = NULL;
@ -392,7 +392,7 @@ ApiStatus N(MegaShockFX)(Evt* script, s32 isInitialCall) {
script->functionTemp[3]--;
}
if (script->functionTemp[2] == 0) {
N(thunderboltRing)->flags |= EFFECT_INSTANCE_FLAGS_10;
N(thunderboltRing)->flags |= EFFECT_INSTANCE_FLAG_10;
return ApiStatus_DONE2;
}
script->functionTemp[2]--;

View File

@ -668,7 +668,7 @@ ApiStatus N(ProcessPeachStarBeam)(Evt* script, s32 isInitialCall) {
if (!cond) {
N(starBeamStage) = 2;
N(effect)->flags |= EFFECT_INSTANCE_FLAGS_10;
N(effect)->flags |= EFFECT_INSTANCE_FLAG_10;
return ApiStatus_DONE2;
}
break;
@ -738,7 +738,7 @@ ApiStatus N(ProcessPeachStarBeam)(Evt* script, s32 isInitialCall) {
if (!cond) {
N(starBeamStage) = 2;
N(effect)->flags |= EFFECT_INSTANCE_FLAGS_10;
N(effect)->flags |= EFFECT_INSTANCE_FLAG_10;
return ApiStatus_DONE2;
}
break;

View File

@ -848,9 +848,9 @@ HudScript HES_AimBlinkA = {
hs_SetVisible
hs_SetTileSize(HUD_ELEMENT_SIZE_16x16)
hs_Loop
hs_ClearFlags(HUD_ELEMENT_FLAGS_200000)
hs_ClearFlags(HUD_ELEMENT_FLAG_200000)
hs_SetCI(3, ui_battle_cmd_aim_marker_0)
hs_SetFlags(HUD_ELEMENT_FLAGS_200000)
hs_SetFlags(HUD_ELEMENT_FLAG_200000)
hs_SetCI(3, ui_battle_cmd_aim_marker_0)
hs_SetCI(3, ui_battle_cmd_aim_marker_0)
hs_Restart
@ -861,11 +861,11 @@ HudScript HES_AimBlinkB = {
hs_SetVisible
hs_SetTileSize(HUD_ELEMENT_SIZE_16x16)
hs_Loop
hs_SetFlags(HUD_ELEMENT_FLAGS_200000)
hs_SetFlags(HUD_ELEMENT_FLAG_200000)
hs_SetCI(3, ui_battle_cmd_aim_marker_0)
hs_ClearFlags(HUD_ELEMENT_FLAGS_200000)
hs_ClearFlags(HUD_ELEMENT_FLAG_200000)
hs_SetCI(3, ui_battle_cmd_aim_marker_0)
hs_SetFlags(HUD_ELEMENT_FLAGS_200000)
hs_SetFlags(HUD_ELEMENT_FLAG_200000)
hs_SetCI(3, ui_battle_cmd_aim_marker_0)
hs_Restart
hs_End
@ -875,10 +875,10 @@ HudScript HES_AimBlinkC = {
hs_SetVisible
hs_SetTileSize(HUD_ELEMENT_SIZE_16x16)
hs_Loop
hs_SetFlags(HUD_ELEMENT_FLAGS_200000)
hs_SetFlags(HUD_ELEMENT_FLAG_200000)
hs_SetCI(3, ui_battle_cmd_aim_marker_0)
hs_SetCI(3, ui_battle_cmd_aim_marker_0)
hs_ClearFlags(HUD_ELEMENT_FLAGS_200000)
hs_ClearFlags(HUD_ELEMENT_FLAG_200000)
hs_SetCI(3, ui_battle_cmd_aim_marker_0)
hs_Restart
hs_End

View File

@ -63,7 +63,7 @@ s32 func_800328A4(CameraControlSettings* camSettings, f32 x, f32 z) {
void func_80032970(Camera* camera, f32 arg1) {
f32 stickX;
f32 deltaLeadAmount;
s32 flags = camera->flags & CAMERA_FLAGS_1000;
s32 flags = camera->flags & CAMERA_FLAG_1000;
s32 a2 = flags != 0;
if (camera->currentController != NULL && camera->currentController->type == CAMERA_SETTINGS_TYPE_4) {
@ -76,7 +76,7 @@ void func_80032970(Camera* camera, f32 arg1) {
camera->unk_514 = 1.0f;
camera->unk_510 = 0.0f;
} else {
if (gPlayerStatusPtr->animFlags & PA_FLAGS_RIDING_PARTNER) {
if (gPlayerStatusPtr->animFlags & PA_FLAG_RIDING_PARTNER) {
stickX = gPartnerActionStatus.stickX;
} else {
stickX = gPlayerStatusPtr->stickAxis[0];

View File

@ -133,7 +133,7 @@ void restore_map_collision_data(void) {
collider->flags = backupEntry->flags;
collider->parentModelIndex = backupEntry->parentModelIndex;
if (collider->flags != -1 && collider->flags & COLLIDER_FLAGS_HAS_MODEL_PARENT) {
if (collider->flags != -1 && collider->flags & COLLIDER_FLAG_HAS_MODEL_PARENT) {
parent_collider_to_model(i, collider->parentModelIndex);
update_collider_transform(i);
}
@ -316,7 +316,7 @@ void parent_collider_to_model(s16 colliderID, s16 modelIndex) {
collider = &gCollisionData.colliderList[colliderID];
collider->parentModelIndex = modelIndex;
collider->flags |= COLLIDER_FLAGS_HAS_MODEL_PARENT;
collider->flags |= COLLIDER_FLAG_HAS_MODEL_PARENT;
vertexBuffer = collision_heap_malloc(collider->numTriangles * sizeof(Vec3f));
vertexBufferSize = 0;
@ -871,7 +871,7 @@ s32 test_ray_zones(f32 startX, f32 startY, f32 startZ, f32 dirX, f32 dirY, f32 d
for (i = 0; i < collisionData->numColliders; i++) {
collider = &collisionData->colliderList[i];
if (collider->flags & COLLIDER_FLAGS_IGNORE_PLAYER)
if (collider->flags & COLLIDER_FLAG_IGNORE_PLAYER)
continue;
if (collider->numTriangles == 0 || collider->aabb == NULL)
@ -971,7 +971,7 @@ s32 test_ray_entities(f32 startX, f32 startY, f32 startZ, f32 dirX, f32 dirY, f3
for (i = 0; i < MAX_ENTITIES; i++) {
entity = get_entity_by_index(i);
if (entity == NULL || (entity->flags & (ENTITY_FLAGS_SKIP_UPDATE | ENTITY_FLAGS_DISABLE_COLLISION))) {
if (entity == NULL || (entity->flags & (ENTITY_FLAG_SKIP_UPDATE | ENTITY_FLAG_DISABLE_COLLISION))) {
continue;
}

View File

@ -60,13 +60,13 @@ ApiStatus N(TransformFoliage)(Evt* script, s32 isInitialCall) {
Model* model = get_model_from_list_index(modelListIndex);
Matrix4f mtx;
if (!(model->flags & MODEL_FLAGS_HAS_TRANSFORM_APPLIED)) {
if (!(model->flags & MODEL_FLAG_HAS_TRANSFORM_APPLIED)) {
guTranslateF(model->transformMatrix, 0.0f, dy, 0.0f);
N(foliage_setup_shear_mtx)(mtx, scale, dx, dz);
guMtxCatF(mtx, model->transformMatrix, model->transformMatrix);
guTranslateF(mtx, 0.0f, -dy, 0.0f);
guMtxCatF(mtx, model->transformMatrix, model->transformMatrix);
model->flags |= (MODEL_FLAGS_HAS_TRANSFORM_APPLIED | MODEL_FLAGS_USES_TRANSFORM_MATRIX);
model->flags |= (MODEL_FLAG_HAS_TRANSFORM_APPLIED | MODEL_FLAG_USES_TRANSFORM_MATRIX);
} else {
guTranslateF(mtx, 0.0f, dy, 0.0f);
guMtxCatF(mtx, model->transformMatrix, model->transformMatrix);

View File

@ -430,7 +430,7 @@ s32 draw_box(s32 flags, WindowStyle windowStyle, s32 posX, s32 posY, s32 posZ, s
return TRUE;
}
if (flags & DRAW_FLAGS_ROTSCALE) {
if (flags & DRAW_FLAG_ROTSCALE) {
quads = gBoxQuadBuffer[gBoxQuadIndex++];
if (gBoxQuadIndex > 20) {
gBoxQuadIndex = 0;
@ -442,7 +442,7 @@ s32 draw_box(s32 flags, WindowStyle windowStyle, s32 posX, s32 posY, s32 posZ, s
gDPSetBlendColor(gMasterGfxPos++, 0, 0, 0, 0);
gDPSetFogColor(gMasterGfxPos++, 0, 0, 0, darkening);
gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_XLU_SURF2);
if (!(flags & DRAW_FLAGS_NO_CLIP)) {
if (!(flags & DRAW_FLAG_NO_CLIP)) {
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
}
@ -487,7 +487,7 @@ s32 draw_box(s32 flags, WindowStyle windowStyle, s32 posX, s32 posY, s32 posZ, s
guTranslateF(mtx2, -160.0f, -120.0f, -320.0f);
guMtxCatF(mtx1, mtx2, mtx1);
gSPClearGeometryMode(gMasterGfxPos++, G_CULL_BOTH | G_LIGHTING);
if (flags & DRAW_FLAGS_CULL_BACK) {
if (flags & DRAW_FLAG_CULL_BACK) {
gSPSetGeometryMode(gMasterGfxPos++, G_CULL_BACK);
}
guMtxF2L(mtx1, &gDisplayContext->matrixStack[gMatrixListPos]);
@ -520,7 +520,7 @@ s32 draw_box(s32 flags, WindowStyle windowStyle, s32 posX, s32 posY, s32 posZ, s
break;
}
if (flags & DRAW_FLAGS_ANIMATED_BACKGROUND) {
if (flags & DRAW_FLAG_ANIMATED_BACKGROUND) {
bgScrollOffsetY = (gGameStatusPtr->frameCounter * 4) & 0x1FF;
bgScrollOffsetX = 511 - bgScrollOffsetY;
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE,

View File

@ -45,7 +45,7 @@ void func_802B70B4(void) {
D_802B79A8_E21858->unk_2A = 0;
D_802B79A8_E21858->scale = 0.1f;
TalkNotificationCallback = func_802B742C;
playerStatus->animFlags |= PA_FLAGS_SPEECH_PROMPT_AVAILABLE;
playerStatus->animFlags |= PA_FLAG_SPEECH_PROMPT_AVAILABLE;
temp = D_802B79A8_E21858;
temp->unk_2A = 0;
temp->scale = 0.4f;
@ -57,7 +57,7 @@ void func_802B71C8(void) {
FoldImageRecPart sp20;
Matrix4f sp38, sp78;
if (gPlayerStatus.animFlags & PA_FLAGS_SPEECH_PROMPT_AVAILABLE) {
if (gPlayerStatus.animFlags & PA_FLAG_SPEECH_PROMPT_AVAILABLE) {
guScaleF(sp38, D_802B79A8_E21858->scale, D_802B79A8_E21858->scale, D_802B79A8_E21858->scale);
guRotateF(sp78, D_802B79A8_E21858->unk_10 - gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
guMtxCatF(sp38, sp78, sp38);
@ -91,12 +91,12 @@ void func_802B742C(void) {
f32 unk10;
Npc* npc;
if (((playerStatus->flags & (PS_FLAGS_HAS_CONVERSATION_NPC | PS_FLAGS_ENTERING_BATTLE | PS_FLAGS_PAUSED))
!= PS_FLAGS_HAS_CONVERSATION_NPC) ||
if (((playerStatus->flags & (PS_FLAG_HAS_CONVERSATION_NPC | PS_FLAG_ENTERING_BATTLE | PS_FLAG_PAUSED))
!= PS_FLAG_HAS_CONVERSATION_NPC) ||
(gEncounterState == ENCOUNTER_STATE_CONVERSATION) ||
(playerStatus->animFlags & PA_FLAGS_USING_WATT) ||
(playerStatus->animFlags & PA_FLAG_USING_WATT) ||
(playerStatus->inputEnabledCounter != 0) ||
(playerStatus->animFlags & PA_FLAGS_SPINNING))
(playerStatus->animFlags & PA_FLAG_SPINNING))
{
D_802B79A8_E21858->unk_2A = 3;
}
@ -137,7 +137,7 @@ void func_802B742C(void) {
if ((unk10 >= 70.0f && unk10 <= 110.0f) || (unk10 >= 250.0f && unk10 <= 290.0f)) {
TalkNotificationCallback = NULL;
playerStatus->encounteredNPC = NULL;
playerStatus->animFlags &= ~PA_FLAGS_SPEECH_PROMPT_AVAILABLE;
playerStatus->animFlags &= ~PA_FLAG_SPEECH_PROMPT_AVAILABLE;
return;
}
var_a2 = e20eb0_UnkAngleFunc1(unk10);

View File

@ -211,8 +211,8 @@ void update_effects(void) {
for (i = 0, effectGraphics = gEffectGraphicsData; i < ARRAY_COUNT(gEffectGraphicsData); i++, effectGraphics++) {
if (effectGraphics->flags & FX_GRAPHICS_ENABLED) {
if (!(effectGraphics->flags & FX_GRAPHICS_FLAGS_2)) {
effectGraphics->flags |= FX_GRAPHICS_FLAGS_2;
if (!(effectGraphics->flags & FX_GRAPHICS_FLAG_2)) {
effectGraphics->flags |= FX_GRAPHICS_FLAG_2;
effectGraphics->freeDelay = 3;
}
}
@ -221,18 +221,18 @@ void update_effects(void) {
for (i = 0; i < ARRAY_COUNT(gEffectInstances); i++) {
EffectInstance* effectInstance = gEffectInstances[i];
if (effectInstance != NULL && (effectInstance->flags & EFFECT_INSTANCE_FLAGS_1)) {
effectInstance->graphics->flags &= ~FX_GRAPHICS_FLAGS_2;
if (effectInstance != NULL && (effectInstance->flags & EFFECT_INSTANCE_FLAG_1)) {
effectInstance->graphics->flags &= ~FX_GRAPHICS_FLAG_2;
if (gGameStatusPtr->isBattle) {
if (effectInstance->flags & EFFECT_INSTANCE_FLAGS_4) {
if (effectInstance->flags & EFFECT_INSTANCE_FLAG_4) {
effectInstance->graphics->update(effectInstance);
effectInstance->flags |= EFFECT_INSTANCE_FLAGS_8;
effectInstance->flags |= EFFECT_INSTANCE_FLAG_8;
}
} else {
if (!(effectInstance->flags & EFFECT_INSTANCE_FLAGS_4)) {
if (!(effectInstance->flags & EFFECT_INSTANCE_FLAG_4)) {
effectInstance->graphics->update(effectInstance);
effectInstance->flags |= EFFECT_INSTANCE_FLAGS_8;
effectInstance->flags |= EFFECT_INSTANCE_FLAG_8;
}
}
}
@ -240,7 +240,7 @@ void update_effects(void) {
for (i = 0, effectGraphics = gEffectGraphicsData; i < ARRAY_COUNT(gEffectGraphicsData); i++, effectGraphics++) {
if (effectGraphics->flags & FX_GRAPHICS_ENABLED) {
if (effectGraphics->flags & FX_GRAPHICS_FLAGS_2) {
if (effectGraphics->flags & FX_GRAPHICS_FLAG_2) {
if (effectGraphics->freeDelay != 0) {
effectGraphics->freeDelay--;
} else {
@ -283,15 +283,15 @@ void render_effects_UI(void) {
EffectInstance* effectInstance = gEffectInstances[i];
if (effectInstance != NULL) {
if (effectInstance->flags & EFFECT_INSTANCE_FLAGS_1) {
if (effectInstance->flags & EFFECT_INSTANCE_FLAGS_8) {
if (effectInstance->flags & EFFECT_INSTANCE_FLAG_1) {
if (effectInstance->flags & EFFECT_INSTANCE_FLAG_8) {
void (*renderUI)(EffectInstance* effect);
if (gGameStatusPtr->isBattle && !(effectInstance->flags & EFFECT_INSTANCE_FLAGS_4)) {
if (gGameStatusPtr->isBattle && !(effectInstance->flags & EFFECT_INSTANCE_FLAG_4)) {
continue;
}
if (!gGameStatusPtr->isBattle && effectInstance->flags & EFFECT_INSTANCE_FLAGS_4) {
if (!gGameStatusPtr->isBattle && effectInstance->flags & EFFECT_INSTANCE_FLAG_4) {
continue;
}
@ -314,7 +314,7 @@ void render_effects_UI(void) {
gSPClipRatio(gMasterGfxPos++, FRUSTRATIO_2);
cond = FALSE;
if (!(camera->flags & CAMERA_FLAGS_ORTHO)) {
if (!(camera->flags & CAMERA_FLAG_ORTHO)) {
gSPPerspNormalize(gMasterGfxPos++, camera->perspNorm);
gSPMatrix(gMasterGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCameraID],
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);

View File

@ -182,8 +182,8 @@ void chapter_change_init(EffectInstance* effect) {
void chapter_change_update(EffectInstance* effect) {
ChapterChangeFXData* data = effect->data.chapterChange;
if (effect->flags & EFFECT_INSTANCE_FLAGS_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAGS_10;
if (effect->flags & EFFECT_INSTANCE_FLAG_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAG_10;
data->timeLeft = 16;
}

View File

@ -88,8 +88,8 @@ void energy_orb_wave_update(EffectInstance* effect) {
u16 var_4;
s32 var_3;
if (effect->flags & EFFECT_INSTANCE_FLAGS_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAGS_10;
if (effect->flags & EFFECT_INSTANCE_FLAG_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAG_10;
data->unk_10 = 30;
}

View File

@ -147,8 +147,8 @@ void firework_rocket_update(EffectInstance* effect) {
s32 lifeTime;
s32 i;
if (effect->flags & EFFECT_INSTANCE_FLAGS_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAGS_10;
if (effect->flags & EFFECT_INSTANCE_FLAG_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAG_10;
data->timeLeft = 16;
}

View File

@ -76,8 +76,8 @@ void ice_shard_update(EffectInstance* effect) {
IceShardFXData* data = effect->data.iceShard;
s32 unk_00 = data->unk_00;
if (effect->flags & EFFECT_INSTANCE_FLAGS_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAGS_10;
if (effect->flags & EFFECT_INSTANCE_FLAG_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAG_10;
data->unk_10 = 16;
}

View File

@ -120,8 +120,8 @@ void lightning_bolt_update(EffectInstance* effect) {
LightningBoltFXData* data = effect->data.lightningBolt;
s32 type = data->type;
if (effect->flags & EFFECT_INSTANCE_FLAGS_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAGS_10;
if (effect->flags & EFFECT_INSTANCE_FLAG_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAG_10;
data->timeLeft = 16;
}

View File

@ -160,8 +160,8 @@ void misc_particles_update(EffectInstance* effect) {
f32 temp_cos;
s32 i;
if (effect->flags & EFFECT_INSTANCE_FLAGS_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAGS_10;
if (effect->flags & EFFECT_INSTANCE_FLAG_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAG_10;
particle->timeLeft = 16;
}

View File

@ -87,8 +87,8 @@ void partner_buff_update(EffectInstance* effect) {
s32 time;
s32 i;
if (effect->flags & EFFECT_INSTANCE_FLAGS_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAGS_10;
if (effect->flags & EFFECT_INSTANCE_FLAG_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAG_10;
data->timeLeft = 16;
}
if (data->timeLeft < 1000) {

View File

@ -63,8 +63,8 @@ void quizmo_assistant_init(EffectInstance* effect) {
void quizmo_assistant_update(EffectInstance* effect) {
QuizmoAssistantFXData* data = effect->data.quizmoAssistant;
if (effect->flags & EFFECT_INSTANCE_FLAGS_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAGS_10;
if (effect->flags & EFFECT_INSTANCE_FLAG_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAG_10;
data->vanishTimer = 16;
}

View File

@ -106,8 +106,8 @@ void shimmer_burst_update(EffectInstance* effect) {
f32 unk_14;
s32 i;
if (effect->flags & EFFECT_INSTANCE_FLAGS_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAGS_10;
if (effect->flags & EFFECT_INSTANCE_FLAG_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAG_10;
part->unk_38 = 16;
}

View File

@ -107,8 +107,8 @@ void shimmer_wave_update(EffectInstance* effect) {
f32 unk_14;
s32 i;
if (effect->flags & EFFECT_INSTANCE_FLAGS_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAGS_10;
if (effect->flags & EFFECT_INSTANCE_FLAG_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAG_10;
part->unk_38 = 16;
}

View File

@ -125,8 +125,8 @@ void snowman_doll_update(EffectInstance* effect) {
s32 unk_14;
s32 unk_58;
if (effect->flags & EFFECT_INSTANCE_FLAGS_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAGS_10;
if (effect->flags & EFFECT_INSTANCE_FLAG_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAG_10;
data->unk_10 = 16;
}

View File

@ -168,8 +168,8 @@ void star_spirits_energy_update(EffectInstance* effect) {
u8 var_int_2;
u8 var_int_3;
if (effect->flags & EFFECT_INSTANCE_FLAGS_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAGS_10;
if (effect->flags & EFFECT_INSTANCE_FLAG_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAG_10;
data->unk_14 = 16;
}

View File

@ -76,8 +76,8 @@ void sun_update(EffectInstance* effect) {
s32 time;
s32 i;
if (effect->flags & EFFECT_INSTANCE_FLAGS_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAGS_10;
if (effect->flags & EFFECT_INSTANCE_FLAG_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAG_10;
data->timeLeft = 16;
}
if (data->timeLeft < 1000) {

View File

@ -91,8 +91,8 @@ void throw_spiny_update(EffectInstance* effectInstance) {
f32 gravity;
s32 lifeDuration;
if (effectInstance->flags & EFFECT_INSTANCE_FLAGS_10) {
effectInstance->flags &= ~EFFECT_INSTANCE_FLAGS_10;
if (effectInstance->flags & EFFECT_INSTANCE_FLAG_10) {
effectInstance->flags &= ~EFFECT_INSTANCE_FLAG_10;
spinyObject->life = 16;
}

View File

@ -68,8 +68,8 @@ void underwater_update(EffectInstance* effect) {
s32 i;
s32 j;
if (effect->flags & EFFECT_INSTANCE_FLAGS_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAGS_10;
if (effect->flags & EFFECT_INSTANCE_FLAG_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAG_10;
data->unk_10 = 32;
}

View File

@ -66,8 +66,8 @@ void waterfall_update(EffectInstance* effect) {
s32 unk_14;
s32 i;
if (effect->flags & EFFECT_INSTANCE_FLAGS_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAGS_10;
if (effect->flags & EFFECT_INSTANCE_FLAG_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAG_10;
data->unk_10 = 16;
}

Some files were not shown because too many files have changed in this diff Show More