all map data complete (#941)

* just 10 left

* six left

* split dead flo_19

* merged texture pan includes

* cooking

* bedroom

* study

* one left

* kkj_25 ok

* kkj_25 cleanup I

* enemy include reorg

* NO_DROPS cleanup

* revised NO_DROP

* dead_flo_19 splits

* StaticNpc -> NpcData

* removed tabs

* canonical npcdata fields ordering

* ANIM_LIST_END for ExtraAnims

* npcdata field reordering

* DISPOSE_LOCATION

* kkj_25 done

* marked unused area bytes

* adjusted function temp defines

---------

Co-authored-by: HailSanta <Hail2Santa@gmail.com>
This commit is contained in:
HailSanta 2023-02-13 19:46:48 -05:00 committed by GitHub
parent f0ae9177ee
commit 8c688c82d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1243 changed files with 30558 additions and 14649 deletions

View File

@ -1400,7 +1400,7 @@ typedef struct GameStatus {
/* 0x07D */ s8 keepUsingPartnerOnMapChange;
/* 0x07E */ u8 peachFlags; /* (1 = isPeach, 2 = isTransformed, 4 = hasUmbrella) */
/* 0x07F */ s8 peachDisguise; /* (1 = koopatrol, 2 = hammer bros, 3 = clubba) */
/* 0x080 */ u8 peachCookingIngredient; ///< @see enum CookingIngredient
/* 0x080 */ u8 peachBakingIngredient; ///< @see enum PeachBakingItems
/* 0x081 */ s8 multiplayerEnabled;
/* 0x082 */ s8 unk_82;
/* 0x083 */ s8 unk_83;
@ -2174,11 +2174,14 @@ typedef struct MenuWindowBP {
/* 0x06 */ s16 width;
/* 0x08 */ s16 height;
/* 0x0A */ u8 priority;
/* 0x0B */ char unk_0B;
/* 0x0C */ void (*fpDrawContents)(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening);
/* 0x10 */ MenuPanel* tab;
/* 0x14 */ s8 parentID;
/* 0x15 */ char unk_15[3];
/* 0x18 */ WindowUpdateFunc fpUpdate;
/* 0x1C */ u8 extraFlags;
/* 0x1D */ char unk_1D[3];
/* 0x20 */ WindowStyle style;
} MenuWindowBP; // size = 0x24;

View File

@ -835,15 +835,15 @@ typedef struct SteamBurstFXData {
} SteamBurstFXData; // size = 0x34
typedef struct StarsOrbitingFXData {
/* 0x00 */ s32 unk_00;
/* 0x00 */ s32 type;
/* 0x04 */ Vec3f pos;
/* 0x10 */ f32 unk_10;
/* 0x14 */ f32 unk_14;
/* 0x18 */ f32 unk_18;
/* 0x1C */ f32 unk_1C;
/* 0x20 */ f32 unk_20;
/* 0x24 */ s32 unk_24;
/* 0x28 */ s32 unk_28;
/* 0x10 */ f32 orbitRadius;
/* 0x14 */ f32 targetRadius;
/* 0x18 */ f32 roll;
/* 0x1C */ f32 rollSpinRate;
/* 0x20 */ f32 pitch;
/* 0x24 */ s32 yaw;
/* 0x28 */ s32 enabled;
} StarsOrbitingFXData; // size = 0x2C
typedef struct BigSnowflakesFXData {

View File

@ -2943,6 +2943,13 @@ enum DoorSounds {
#include "sprite/sprite_shading_profiles.h"
#endif
enum LightSourceFlags {
LIGHT_SOURCE_DISABLED = 0,
LIGHT_SOURCE_ENABLED = 1,
LIGHT_SOURCE_LINEAR_FALLOFF = 4,
LIGHT_SOURCE_QUADRATIC_FALLOFF = 8,
};
enum ActionStates {
ACTION_STATE_IDLE = 0x00000000,
ACTION_STATE_WALK = 0x00000001,
@ -2998,41 +3005,41 @@ enum LandOnSwitchSubstate {
LANDING_ON_SWITCH_SUBSTATE_2 = 2,
};
/* (1 = isPeach, 2 = isTransformed, 4 = hasUmbrella) */
enum PeachStatusFlags {
PEACH_STATUS_FLAG_IS_PEACH = 0x01,
PEACH_STATUS_FLAG_DISGUISED = 0x02,
PEACH_STATUS_FLAG_HAS_PARASOL = 0x04,
PEACH_STATUS_FLAG_8 = 0x08,
PEACH_STATUS_FLAG_HAS_INGREDIENT = 0x10
PEACH_STATUS_FLAG_DEPRESSED = 0x10
};
enum CookingIngredients {
PEACH_COOKING_NONE = 0x00,
PEACH_COOKING_CREAM = 0x01,
PEACH_COOKING_STRAWBERRY = 0x02,
PEACH_COOKING_BUTTER = 0x03,
PEACH_COOKING_CLEANSER = 0x04,
PEACH_COOKING_WATER = 0x05,
PEACH_COOKING_MILK = 0x06,
PEACH_COOKING_FLOUR = 0x07,
PEACH_COOKING_EGG = 0x08,
PEACH_COOKING_COMPLETE_CAKE = 0x09,
PEACH_COOKING_CAKE_BOWL = 0x0A,
PEACH_COOKING_CAKE_MIXED = 0x0B,
PEACH_COOKING_CAKE_PAN = 0x0C,
PEACH_COOKING_CAKE_BATTER = 0x0D,
PEACH_COOKING_CAKE_BARE = 0x0E,
PEACH_COOKING_SALT = 0x0F,
PEACH_COOKING_SUGAR = 0x10,
PEACH_COOKING_CAKE_WITH_ICING = 0x11,
PEACH_COOKING_CAKE_WITH_BERRIES = 0x12,
enum PeachBakingItems {
PEACH_BAKING_NONE = 0,
PEACH_BAKING_CREAM = 1,
PEACH_BAKING_STRAWBERRY = 2,
PEACH_BAKING_BUTTER = 3,
PEACH_BAKING_CLEANSER = 4,
PEACH_BAKING_WATER = 5,
PEACH_BAKING_MILK = 6,
PEACH_BAKING_FLOUR = 7,
PEACH_BAKING_EGG = 8,
PEACH_BAKING_COMPLETE_CAKE = 9,
PEACH_BAKING_CAKE_BOWL = 10,
PEACH_BAKING_CAKE_MIXED = 11,
PEACH_BAKING_CAKE_PAN = 12,
PEACH_BAKING_CAKE_BATTER = 13,
PEACH_BAKING_CAKE_BARE = 14,
PEACH_BAKING_SALT = 15,
PEACH_BAKING_SUGAR = 16,
PEACH_BAKING_CAKE_WITH_ICING = 17,
PEACH_BAKING_CAKE_WITH_BERRIES = 18,
};
enum PeachDisguises {
PEACH_DISGUISE_1 = 1,
PEACH_DISGUISE_2 = 2,
PEACH_DISGUISE_CLUBBA = 3,
PEACH_DISGUISE_NONE = 0,
PEACH_DISGUISE_KOOPATROL = 1,
PEACH_DISGUISE_HAMMER_BROS = 2,
PEACH_DISGUISE_CLUBBA = 3,
};
// Requires decimals
@ -5183,6 +5190,7 @@ enum TempColliderFlagsModifyMode {
};
enum CollisionChannels {
COLLISION_CHANNEL_8000 = 0x00008000,
COLLISION_CHANNEL_10000 = 0x00010000,
COLLISION_CHANNEL_20000 = 0x00020000,
COLLISION_IGNORE_ENTITIES = 0x00040000,
@ -5870,8 +5878,8 @@ enum WindowId {
WINDOW_ID_7 = 7,
WINDOW_ID_8 = 8,
WINDOW_ID_9 = 9,
WINDOW_ID_10 = 10,
WINDOW_ID_11 = 11,
WINDOW_ID_ITEM_INFO_NAME = 10,
WINDOW_ID_ITEM_INFO_DESC = 11,
WINDOW_ID_12 = 12,
WINDOW_ID_13 = 13,
WINDOW_ID_14 = 14,

View File

@ -7,23 +7,19 @@
// battle and stage are optional in overloaded NPC_GROUP macros
#define NPC_GROUP(args...) VFUNC(NPC_GROUP, args)
#define NPC_GROUP1(npcs) { sizeof(npcs) / sizeof(StaticNpc), (StaticNpc*) &npcs, 0, 0 }
#define NPC_GROUP2(npcs, battle) { sizeof(npcs) / sizeof(StaticNpc), (StaticNpc*) &npcs, battle, 0 }
#define NPC_GROUP3(npcs, battle, stage) { sizeof(npcs) / sizeof(StaticNpc), (StaticNpc*) &npcs, battle, stage + 1 }
#define NPC_GROUP1(npcs) { sizeof(npcs) / sizeof(NpcData), (NpcData*) &npcs, 0, 0 }
#define NPC_GROUP2(npcs, battle) { sizeof(npcs) / sizeof(NpcData), (NpcData*) &npcs, battle, 0 }
#define NPC_GROUP3(npcs, battle, stage) { sizeof(npcs) / sizeof(NpcData), (NpcData*) &npcs, battle, stage + 1 }
#define NPC_GROUP_EXPLICIT_SIZE(args...) VFUNC(NPC_GROUP_EXPLICIT_SIZE, args)
#define NPC_GROUP_EXPLICIT_SIZE3(npcs, start, count) { count, (StaticNpc*) &npcs[start], 0, 0 }
#define NPC_GROUP_EXPLICIT_SIZE4(npcs, start, count, battle) { count, (StaticNpc*) &npcs[start], battle, 0 }
#define NPC_GROUP_EXPLICIT_SIZE5(npcs, start, count, battle, stage) { count, (StaticNpc*) &npcs[start], battle, stage + 1 }
#define NPC_GROUP_EXPLICIT_SIZE3(npcs, start, count) { count, (NpcData*) &npcs[start], 0, 0 }
#define NPC_GROUP_EXPLICIT_SIZE4(npcs, start, count, battle) { count, (NpcData*) &npcs[start], battle, 0 }
#define NPC_GROUP_EXPLICIT_SIZE5(npcs, start, count, battle, stage) { count, (NpcData*) &npcs[start], battle, stage + 1 }
#define NO_DROPS { { F16(100), F16(0), 0, F16(0) }, }
// rename this to NO_DROPS and the above to NO_STAT_DROPS after all map data done
#define NPC_NO_DROPS { \
#define NO_DROPS { \
.dropFlags = NPC_DROP_FLAG_80, \
.heartDrops = NO_DROPS, \
.flowerDrops = NO_DROPS, \
.heartDrops = { { F16(100), F16(0), 0, F16(0) }, }, \
.flowerDrops = { { F16(100), F16(0), 0, F16(0) }, }, \
}
#define STANDARD_HEART_DROPS(attempts) { \
@ -169,7 +165,7 @@ typedef struct ItemDrop {
/// - Roll generalChance. If it fails, drop 0.
/// - Roll chancePerAttempt attempts times. For each success, drop a heart/flower.
///
/// StaticNpc holds a table of StatDrops for each stat (hearts, flowers). All are checked together
/// NpcData holds a table of StatDrops for each stat (hearts, flowers). All are checked together
/// and the number of hearts/flowers to drop is the total number of successful attempts for each stat.
///
/// Each heart/flower is worth 1 HP and 1 FP respectively, if picked up.
@ -253,7 +249,7 @@ typedef union NpcInitialVars {
/* 0x0 */ s32* array;
} NpcInitialVars;
typedef struct StaticNpc {
typedef struct NpcData {
/* 0x000 */ s32 id;
/* 0x004 */ NpcSettings* settings;
/* 0x008 */ Vec3f pos;
@ -289,12 +285,12 @@ typedef struct StaticNpc {
/* 0x1E4 */ u32 aiFlags;
/* 0x1E8 */ s32* extraAnimations;
/* 0x1EC */ s32 tattle;
} StaticNpc; // size = 0x1F0
} NpcData; // size = 0x1F0
/// Zero-terminated.
typedef struct NpcGroup {
/* 0x00 */ s32 npcCount;
/* 0x04 */ StaticNpc* npcs;
/* 0x04 */ NpcData* npcs;
/* 0x08 */ s16 battle;
/* 0x0A */ s16 stage;
} NpcGroup; // size = 0x0C

View File

@ -333,6 +333,7 @@ ApiStatus MakeLocalVertexCopy(Evt* script, s32 isInitialCall);
ApiStatus SetCustomGfx(Evt* script, s32 isInitialCall);
ApiStatus SetCustomGfxBuilders(Evt* script, s32 isInitialCall);
ApiStatus SetModelCustomGfx(Evt* script, s32 isInitialCall);
ApiStatus SetModelTexVariant(Evt* script, s32 isInitialCall);
ApiStatus SetNpcPaletteSwapMode(Evt* script, s32 isInitialCall);
ApiStatus SetNpcPaletteSwapLower(Evt* script, s32 isInitialCall);
ApiStatus SetNpcPaletteSwapping(Evt* script, s32 isInitialCall);

View File

@ -546,7 +546,7 @@
///
/// EVT_CHILD_THREAD
/// EVT_WAIT_SECONDS(1) // child thread will be killed whilst waiting
/// EVT_CALL(SetPlayerPos, 0, -1000, 0) // will not be executed
/// EVT_CALL(SetPlayerPos, NPC_DISPOSE_LOCATION) // will not be executed
/// EVT_END_CHILD_THREAD
/// EVT_RETURN // parent thread dies
///

View File

@ -1073,9 +1073,9 @@ void btl_save_world_cameras(void) {
D_8029EFB0 = playerStatus->position.x;
D_8029EFB4 = playerStatus->position.y;
D_8029EFB8 = playerStatus->position.z;
playerStatus->position.x = 0.0f;
playerStatus->position.y = -1000.0f;
playerStatus->position.z = 0.0f;
playerStatus->position.x = NPC_DISPOSE_POS_X;
playerStatus->position.y = NPC_DISPOSE_POS_Y;
playerStatus->position.z = NPC_DISPOSE_POS_Z;
}
void btl_restore_world_cameras(void) {

View File

@ -763,12 +763,12 @@ void appendGfx_npc_actor(s32 isPartner, s32 actorIndex) {
if (!(gBattleStatus.flags1 & ACTOR_PART_FLAG_4) && (actor->flags & ACTOR_FLAG_8000000)) {
if (actor->disableDismissTimer != 0) {
actor->disableDismissTimer--;
actor->disableEffect->data.disableX->pos.y = -1000.0f;
actor->disableEffect->data.disableX->pos.y = NPC_DISPOSE_POS_Y;
} else {
actor->disableEffect->data.disableX->scale = (actor->scalingFactor * 0.75);
}
} else {
actor->disableEffect->data.disableX->pos.y = -1000.0f;
actor->disableEffect->data.disableX->pos.y = NPC_DISPOSE_POS_Y;
actor->disableDismissTimer = 10;
}
if (actor->debuff == STATUS_FROZEN) {
@ -780,9 +780,9 @@ void appendGfx_npc_actor(s32 isPartner, s32 actorIndex) {
effect->data.icePillar->pos.z = actorPosZ;
effect->data.icePillar->scale = actor->size.y / 24.0;
} else {
effect->data.icePillar->pos.x = 0.0f;
effect->data.icePillar->pos.y = -1000.0f;
effect->data.icePillar->pos.z = 0.0f;
effect->data.icePillar->pos.x = NPC_DISPOSE_POS_X;
effect->data.icePillar->pos.y = NPC_DISPOSE_POS_Y;
effect->data.icePillar->pos.z = NPC_DISPOSE_POS_Z;
}
}
} else {
@ -1374,12 +1374,12 @@ void appendGfx_player_actor(void* arg0) {
if (!(gBattleStatus.flags1 & BS_FLAGS1_4) && (player->flags & ACTOR_FLAG_8000000)) {
if (player->disableDismissTimer != 0) {
player->disableDismissTimer--;
player->disableEffect->data.disableX->pos.y = -1000.0f;
player->disableEffect->data.disableX->pos.y = NPC_DISPOSE_POS_Y;
} else {
player->disableEffect->data.disableX->scale = player->scalingFactor * 0.75;
}
} else {
player->disableEffect->data.disableX->pos.y = -1000.0f;
player->disableEffect->data.disableX->pos.y = NPC_DISPOSE_POS_Y;
player->disableDismissTimer = 10;
}
@ -1394,7 +1394,7 @@ void appendGfx_player_actor(void* arg0) {
} else {
effect = battleStatus->waterBlockEffect;
effect->data.waterBlock->pos.x = playerPosX;
effect->data.waterBlock->pos.y = -1000.0f;
effect->data.waterBlock->pos.y = NPC_DISPOSE_POS_Y;
effect->data.waterBlock->pos.z = playerPosZ;
}
}
@ -1410,7 +1410,7 @@ void appendGfx_player_actor(void* arg0) {
} else {
effect = battleStatus->cloudNineEffect;
effect->data.endingDecals->pos.x = playerPosX;
effect->data.endingDecals->pos.y = -1000.0f;
effect->data.endingDecals->pos.y = NPC_DISPOSE_POS_Y;
effect->data.endingDecals->pos.z = playerPosZ;
}
}
@ -1425,14 +1425,14 @@ void appendGfx_player_actor(void* arg0) {
effect->data.icePillar->pos.z = playerPosZ;
effect->data.icePillar->scale = player->size.y / 24.0;
} else {
effect->data.icePillar->pos.x = 0.0f;
effect->data.icePillar->pos.y = -1000.0f;
effect->data.icePillar->pos.z = 0.0f;
effect->data.icePillar->pos.x = NPC_DISPOSE_POS_X;
effect->data.icePillar->pos.y = NPC_DISPOSE_POS_Y;
effect->data.icePillar->pos.z = NPC_DISPOSE_POS_Z;
}
} else {
effect->data.icePillar->pos.x = 0.0f;
effect->data.icePillar->pos.y = -1000.0f;
effect->data.icePillar->pos.z = 0.0f;
effect->data.icePillar->pos.x = NPC_DISPOSE_POS_X;
effect->data.icePillar->pos.y = NPC_DISPOSE_POS_Y;
effect->data.icePillar->pos.z = NPC_DISPOSE_POS_Z;
}
} else {
effect = player->icePillarEffect;

View File

@ -60,7 +60,7 @@ void reset_player_status(void) {
playerStatus->alpha1 = 255;
playerStatus->alpha2 = 255;
gGameStatusPtr->peachFlags &= ~PEACH_STATUS_FLAG_8;
gGameStatusPtr->peachFlags &= ~PEACH_STATUS_FLAG_HAS_INGREDIENT;
gGameStatusPtr->peachFlags &= ~PEACH_STATUS_FLAG_DEPRESSED;
one = 1.0f;
@ -76,7 +76,7 @@ void reset_player_status(void) {
} else {
playerStatus->colliderHeight = 37;
playerStatus->colliderDiameter = 26;
gGameStatusPtr->peachCookingIngredient = 0;
gGameStatusPtr->peachBakingIngredient = 0;
}
// TODO required to match

View File

@ -564,7 +564,7 @@ void peach_force_disguise_action(s32 useParasol) {
} else {
playerStatus->animFlags &= ~PA_FLAG_INVISIBLE;
gGameStatusPtr->peachFlags &= ~PEACH_STATUS_FLAG_DISGUISED;
playerStatus->peachDisguise = 0;
playerStatus->peachDisguise = PEACH_DISGUISE_NONE;
free_npc_by_index(PeachDisguiseNpcIndex);
set_action_state(ACTION_STATE_IDLE);
playerStatus->colliderHeight = 55;
@ -622,7 +622,7 @@ Npc* peach_make_disguise_npc(s32 peachDisguise) {
Npc* npc;
f32 yaw;
if (peachDisguise == 0) {
if (peachDisguise == PEACH_DISGUISE_NONE) {
return NULL;
}

View File

@ -1,60 +0,0 @@
#include "dead.h"
#include "common.h"
// Copy of flo_19 (CE36F0.c)
#define NAMESPACE EFEB00
#include "world/common/atomic/TexturePan.inc.c"
#include "world/common/todo/DeadUnkFunc1.inc.c"
#include "world/common/todo/UnkFloatFuncAbs.inc.c"
ApiStatus func_802404D0_EFEFD0(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 var1 = *args++;
s32 var2 = *args++;
evt_set_variable(script, var1, gPlayerStatus.spriteFacingAngle);
evt_set_variable(script, var2, gPlayerStatus.targetYaw);
return ApiStatus_DONE2;
}
ApiStatus func_80240540_EFF040(Evt* script, s32 isInitialCall) {
f32 temp_f20 = evt_get_variable(NULL, script->varTable[2]);
f32 dist = dist2D(0.0f, 0.0f, script->varTable[9], script->varTable[11]);
f32 temp_f22 = clamp_angle(atan2(0.0f, 0.0f, script->varTable[9], script->varTable[11]) - temp_f20);
temp_f20 = sin_deg(temp_f22);
gPlayerStatus.position.x = (dist * temp_f20) + 0.0f;
gPlayerStatus.position.y = evt_get_variable(NULL, script->varTable[10]) + evt_get_variable(NULL, script->varTable[3]);
temp_f20 = cos_deg(temp_f22);
gPlayerStatus.position.z = 0.0f - (dist * temp_f20);
return ApiStatus_DONE2;
}
ApiStatus func_80240660_EFF160(Evt* script, s32 isInitialCall) {
Npc* npc = get_npc_by_index(0);
f32 temp_f20 = evt_get_variable(NULL, script->varTable[2]);
f32 dist = dist2D(0.0f, 0.0f, script->varTable[12], script->varTable[14]);
f32 clamped = clamp_angle(atan2(0.0f, 0.0f, script->varTable[12], script->varTable[14]) - temp_f20);
temp_f20 = sin_deg(clamped);
npc->pos.x = (dist * temp_f20) + 0.0f;
npc->pos.y = evt_get_variable(NULL, script->varTable[13]) + evt_get_variable(NULL, script->varTable[3]);
temp_f20 = cos_deg(clamped);
npc->pos.z = 0.0f - (dist * temp_f20);
return ApiStatus_DONE2;
}
ApiStatus func_80240784_EFF284(Evt* script, s32 isInitialCall) {
set_screen_overlay_params_back(1, script->varTable[0]);
return ApiStatus_DONE2;
}
#include "common/CosInterpMinMax.inc.c"

View File

@ -377,7 +377,7 @@ EvtScript N(attackSpinyFlip) = {
EVT_END
};
Vec3i N(spiny_pos) = { 0, -1000, 0 };
Vec3i N(spiny_pos) = { NPC_DISPOSE_LOCATION };
Formation N(formation_spiny) = {
{ .actor = &b_area_flo_spiny, .home = { .vec = &N(spiny_pos) }, .priority = 100, .var0 = 0x00000001, },

View File

@ -542,7 +542,7 @@ EvtScript N(idle) = {
EVT_END
};
Vec3i N(tuff_puff_pos) = { 0, -1000, 0 };
Vec3i N(tuff_puff_pos) = { NPC_DISPOSE_LOCATION };
Formation N(formation_tuff_puff_small) = {
{ .actor = &b_area_flo2_tuff_puff, .home = { .vec = &N(tuff_puff_pos) }, .priority = 0, },

View File

@ -186,7 +186,7 @@ ActorBlueprint N(hole) = {
.statusMessageOffset = { 10, 20 },
};
Vec3i N(hole_pos) = { 0, -1000, 0 };
Vec3i N(hole_pos) = { NPC_DISPOSE_LOCATION };
Formation N(formation_hole_1) = {
{ .actor = &N(hole), .home = { .vec = &N(hole_pos) }, .priority = 0, },

View File

@ -827,7 +827,7 @@ EvtScript N(takeTurn_80221628) = {
EVT_END
};
Vec3i N(vector3D_80221800) = { 0, -1000, 0 };
Vec3i N(vector3D_80221800) = { NPC_DISPOSE_LOCATION };
Formation N(specialFormation_8022180C) = {
{ .actor = &NAMESPACE, .home = { .vec = &N(vector3D_80221800) } },

View File

@ -725,7 +725,7 @@ EvtScript N(summonBackup) = {
EVT_END
};
Vec3i N(vector3D_8021A8B4) = { 0, -1000, 0 };
Vec3i N(vector3D_8021A8B4) = { NPC_DISPOSE_LOCATION };
Formation N(specialFormation_8021A8C0) = {
{ .actor = &NAMESPACE, .home = { .vec = &N(vector3D_8021A8B4) }, .priority = 100, .var0 = 0 },

View File

@ -3,7 +3,7 @@
#define NAMESPACE b_area_kkj_kpa_05
#include "common/UnkLightningFXFunc.inc.c"
#include "world/common/util/SetLightningBoltPurple.inc.c"
s32 N(lightningsSettings1)[] = {
0xFFFFFFEA, 0x000000BE, 0xFFFFFFA5, 0xFFFFFFA8, 0x00000015, 0xFFFFFFA5, 0x0000003C,
@ -19,7 +19,7 @@ EvtScript N(createLightnings1) = {
EVT_BUF_READ3(LVar0, LVar1, LVar2)
EVT_BUF_READ3(LVar3, LVar4, LVar5)
EVT_CALL(PlayEffect, EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 1, 8, 0, 0, 0, 0)
EVT_CALL(N(UnkLightningFXFunc))
EVT_CALL(N(SetLightningBoltPurple))
EVT_BUF_READ1(LVar0)
EVT_WAIT(LVar0)
EVT_END_LOOP
@ -42,7 +42,7 @@ EvtScript N(createLightnings2) = {
EVT_BUF_READ3(LVar0, LVar1, LVar2)
EVT_BUF_READ3(LVar3, LVar4, LVar5)
EVT_CALL(PlayEffect, EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 1, 5, 0, 0, 0, 0)
EVT_CALL(N(UnkLightningFXFunc))
EVT_CALL(N(SetLightningBoltPurple))
EVT_BUF_READ1(LVar0)
EVT_WAIT(LVar0)
EVT_END_LOOP

View File

@ -3,7 +3,7 @@
#define NAMESPACE b_area_kpa2_kpa_03
#include "common/UnkLightningFXFunc.inc.c"
#include "world/common/util/SetLightningBoltPurple.inc.c"
s32 N(lightningsSettings1)[] = {
0xFFFFFFEA, 0x000000BE, 0xFFFFFFA5, 0xFFFFFFA8, 0x00000015, 0xFFFFFFA5, 0x0000003C,
@ -19,7 +19,7 @@ EvtScript N(createLightnings1) = {
EVT_BUF_READ3(LVar0, LVar1, LVar2)
EVT_BUF_READ3(LVar3, LVar4, LVar5)
EVT_CALL(PlayEffect, EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 1, 8, 0, 0, 0, 0)
EVT_CALL(N(UnkLightningFXFunc))
EVT_CALL(N(SetLightningBoltPurple))
EVT_BUF_READ1(LVar0)
EVT_WAIT(LVar0)
EVT_END_LOOP
@ -42,7 +42,7 @@ EvtScript N(createLightnings2) = {
EVT_BUF_READ3(LVar0, LVar1, LVar2)
EVT_BUF_READ3(LVar3, LVar4, LVar5)
EVT_CALL(PlayEffect, EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 1, 5, 0, 0, 0, 0)
EVT_CALL(N(UnkLightningFXFunc))
EVT_CALL(N(SetLightningBoltPurple))
EVT_BUF_READ1(LVar0)
EVT_WAIT(LVar0)
EVT_END_LOOP

View File

@ -230,7 +230,7 @@ EvtScript N(wait) = {
extern ActorBlueprint A(bombshell_bill);
Vec3i N(bill_pos) = { 0, -1000, 0 };
Vec3i N(bill_pos) = { NPC_DISPOSE_LOCATION };
Formation N(formation_bill) = {
{ .actor = &A(bombshell_bill), .home = { .vec = &N(bill_pos) }, .priority = 100, },

View File

@ -394,8 +394,8 @@ EvtScript N(8021E118) = {
EVT_CALL(HPBarToHome, LVarA)
EVT_CALL(SetIdleAnimations, LVarA, 1, EVT_PTR(N(idleAnimations_8021D360)))
EVT_CALL(SetAnimation, LVarA, 1, 0xA40002)
EVT_CALL(SetActorPos, ACTOR_SELF, 0, -1000, 0)
EVT_CALL(ForceHomePos, ACTOR_SELF, 0, -1000, 0)
EVT_CALL(SetActorPos, ACTOR_SELF, NPC_DISPOSE_LOCATION)
EVT_CALL(ForceHomePos, ACTOR_SELF, NPC_DISPOSE_LOCATION)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CALL(RemoveActor, -127)
EVT_RETURN
@ -448,7 +448,7 @@ EvtScript N(8021E5DC) = {
EVT_END
};
Vec3i N(vector3D_8021E940) = { 0, -1000, 0 };
Vec3i N(vector3D_8021E940) = { NPC_DISPOSE_LOCATION };
s32 N(idleAnimations_8021E94C)[] = {
STATUS_NORMAL, ANIM_BattleGoombario_Idle,
@ -980,7 +980,7 @@ ApiStatus func_80218DF4_465284(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
EffectInstance* tattleEffect = (EffectInstance*) evt_get_variable(script, *args++);
tattleEffect->data.tattleWindow->pos.y = -1000.0f;
tattleEffect->data.tattleWindow->pos.y = NPC_DISPOSE_POS_Y;
return ApiStatus_DONE2;
}
@ -4269,8 +4269,8 @@ EvtScript N(copyPartner) = {
EVT_CALL(HPBarToHome, LVarA)
EVT_CALL(ResetActorSounds, LVarA, 2)
EVT_WAIT(20)
EVT_CALL(SetActorPos, ACTOR_SELF, 0, -1000, 0)
EVT_CALL(ForceHomePos, ACTOR_SELF, 0, -1000, 0)
EVT_CALL(SetActorPos, ACTOR_SELF, NPC_DISPOSE_LOCATION)
EVT_CALL(ForceHomePos, ACTOR_SELF, NPC_DISPOSE_LOCATION)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CALL(SetActorVar, -127, 8, 1)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)

View File

@ -654,7 +654,7 @@ EvtScript N(takeTurn_8021A61C) = {
EVT_END
};
Vec3i N(vector3D_8021A7F4) = { 0, -1000, 0 };
Vec3i N(vector3D_8021A7F4) = { NPC_DISPOSE_LOCATION };
Formation N(specialFormation_8021A800) = {
{ .actor = &NAMESPACE, .home = { .vec = &N(vector3D_8021A7F4) }},

View File

@ -234,7 +234,7 @@ ApiStatus UpdateCrystalBitEffect(Evt* script, s32 isInitialCall) {
effect->data.miscParticles->scaleY = actorPart->scale.y * 24.0f;
if (actorPart->flags & ACTOR_PART_FLAG_INVISIBLE) {
effect->data.miscParticles->pos.x = actor->currentPos.x;
effect->data.miscParticles->pos.y = -1000.0f;
effect->data.miscParticles->pos.y = NPC_DISPOSE_POS_Y;
effect->data.miscParticles->pos.z = actor->currentPos.z;
} else {
effect->data.miscParticles->pos.x = actor->currentPos.x;
@ -246,7 +246,7 @@ ApiStatus UpdateCrystalBitEffect(Evt* script, s32 isInitialCall) {
}
EvtScript N(idle) = {
EVT_CALL(PlayEffect, EFFECT_MISC_PARTICLES, 1, 0, -1000, 0, 24, 24, EVT_FLOAT(1.0), 5, 0, 0, 0, 0, 0)
EVT_CALL(PlayEffect, EFFECT_MISC_PARTICLES, 1, NPC_DISPOSE_LOCATION, 24, 24, EVT_FLOAT(1.0), 5, 0, 0, 0, 0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, LVarF)
EVT_CHILD_THREAD
EVT_CALL(UpdateCrystalBitEffect, LVarF)

View File

@ -1214,7 +1214,7 @@ ActorBlueprint N(clone) = {
.statusMessageOffset = { 15, 40 },
};
Vec3i N(pos_crystal_clone) = { 0, -1000, 0 };
Vec3i N(pos_crystal_clone) = { NPC_DISPOSE_LOCATION };
Formation N(clone_formation) = {
{ .actor = &N(clone), .home = { .vec = &N(pos_crystal_clone) }, .priority = 0 },

View File

@ -5,7 +5,6 @@
#define NAMESPACE b_area_tik_tik_05
#include "world/common/atomic/TexturePan.inc.c"
#include "world/common/atomic/TexturePan.data.inc.c"
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, SHADING_NONE)

View File

@ -5,7 +5,6 @@
#define NAMESPACE b_area_tik2_tik_05
#include "world/common/atomic/TexturePan.inc.c"
#include "world/common/atomic/TexturePan.data.inc.c"
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, SHADING_NONE)

View File

@ -5,7 +5,6 @@
#define NAMESPACE b_area_tik3_tik_05
#include "world/common/atomic/TexturePan.inc.c"
#include "world/common/atomic/TexturePan.data.inc.c"
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, SHADING_NONE)

View File

@ -243,7 +243,7 @@ EvtScript N(8021A470) = {
extern ActorBlueprint A(bullet_bill);
Vec3i N(vector3D_8021A4DC) = { 0, -1000, 0, };
Vec3i N(vector3D_8021A4DC) = { NPC_DISPOSE_LOCATION, };
Formation N(specialFormation_8021A4E8) = {
{ .actor = &A(bullet_bill), .home = { .vec = &N(vector3D_8021A4DC) }, .priority = 100 },

View File

@ -675,8 +675,8 @@ EvtScript N(init_8022DC2C) = {
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_8022DD20)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_8022DD88)))
EVT_CALL(BindNextTurn, ACTOR_SELF, EVT_PTR(N(nextTurn_8022E424)))
EVT_CALL(SetActorPos, ACTOR_SELF, 0, -1000, 0)
EVT_CALL(ForceHomePos, ACTOR_SELF, 0, -1000, 0)
EVT_CALL(SetActorPos, ACTOR_SELF, NPC_DISPOSE_LOCATION)
EVT_CALL(ForceHomePos, ACTOR_SELF, NPC_DISPOSE_LOCATION)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 1, ACTOR_PART_FLAG_NO_TARGET, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)

View File

@ -675,8 +675,8 @@ EvtScript N(init_80227CEC) = {
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_80227DE0)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_80227E48)))
EVT_CALL(BindNextTurn, ACTOR_SELF, EVT_PTR(N(nextTurn_802284E4)))
EVT_CALL(SetActorPos, ACTOR_SELF, 0, -1000, 0)
EVT_CALL(ForceHomePos, ACTOR_SELF, 0, -1000, 0)
EVT_CALL(SetActorPos, ACTOR_SELF, NPC_DISPOSE_LOCATION)
EVT_CALL(ForceHomePos, ACTOR_SELF, NPC_DISPOSE_LOCATION)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 1, ACTOR_PART_FLAG_NO_TARGET, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)

View File

@ -675,8 +675,8 @@ EvtScript N(init_8022AC8C) = {
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_8022AD80)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_8022ADE8)))
EVT_CALL(BindNextTurn, ACTOR_SELF, EVT_PTR(N(nextTurn_8022B484)))
EVT_CALL(SetActorPos, ACTOR_SELF, 0, -1000, 0)
EVT_CALL(ForceHomePos, ACTOR_SELF, 0, -1000, 0)
EVT_CALL(SetActorPos, ACTOR_SELF, NPC_DISPOSE_LOCATION)
EVT_CALL(ForceHomePos, ACTOR_SELF, NPC_DISPOSE_LOCATION)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 1, ACTOR_PART_FLAG_NO_TARGET, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)

View File

@ -675,8 +675,8 @@ EvtScript N(init_80230BCC) = {
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_80230CC0)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_80230D28)))
EVT_CALL(BindNextTurn, ACTOR_SELF, EVT_PTR(N(nextTurn_802313C4)))
EVT_CALL(SetActorPos, ACTOR_SELF, 0, -1000, 0)
EVT_CALL(ForceHomePos, ACTOR_SELF, 0, -1000, 0)
EVT_CALL(SetActorPos, ACTOR_SELF, NPC_DISPOSE_LOCATION)
EVT_CALL(ForceHomePos, ACTOR_SELF, NPC_DISPOSE_LOCATION)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 1, ACTOR_PART_FLAG_NO_TARGET, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)

View File

@ -162,7 +162,7 @@ ActorBlueprint N(coin) = {
.statusMessageOffset = { 10, 25 },
};
Vec3i N(coin_pos) = { 0, -1000, 0 };
Vec3i N(coin_pos) = { NPC_DISPOSE_LOCATION };
Formation N(formation_coin) = {
{ .actor = &N(coin), .home = { .vec = &N(coin_pos) }},

View File

@ -375,8 +375,8 @@ EvtScript N(OnHitElectric) = {
EVT_CALL(HPBarToHome, LVarA)
EVT_CALL(SetIdleAnimations, LVarA, 1, EVT_PTR(N(idleAnimations)))
EVT_CALL(SetAnimation, LVarA, 1, ANIM_Duplighost_Anim02)
EVT_CALL(SetActorPos, ACTOR_SELF, 0, -1000, 0)
EVT_CALL(ForceHomePos, ACTOR_SELF, 0, -1000, 0)
EVT_CALL(SetActorPos, ACTOR_SELF, NPC_DISPOSE_LOCATION)
EVT_CALL(ForceHomePos, ACTOR_SELF, NPC_DISPOSE_LOCATION)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CALL(RemoveActor, ACTOR_SELF)
EVT_RETURN
@ -455,8 +455,8 @@ EvtScript N(OnShockHit) = {
EVT_CALL(SetIdleAnimations, LVarA, 1, EVT_PTR(N(idleAnimations)))
EVT_CALL(ForceHomePos, LVarA, LVarB, 0, LVarD)
EVT_CALL(HPBarToHome, LVarA)
EVT_CALL(SetActorPos, ACTOR_SELF, 0, -1000, 0)
EVT_CALL(ForceHomePos, ACTOR_SELF, 0, -1000, 0)
EVT_CALL(SetActorPos, ACTOR_SELF, NPC_DISPOSE_LOCATION)
EVT_CALL(ForceHomePos, ACTOR_SELF, NPC_DISPOSE_LOCATION)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CALL(RemoveActor, ACTOR_SELF)
EVT_RETURN
@ -509,7 +509,7 @@ EvtScript N(OnShockDeath) = {
EVT_END
};
Vec3i N(pos_summon) = { 0, -1000, 0 };
Vec3i N(pos_summon) = { NPC_DISPOSE_LOCATION };
#include "ghost_goombario.inc.c"
@ -712,8 +712,8 @@ EvtScript N(copyPartner) = {
EVT_CALL(HPBarToHome, LVarA)
EVT_CALL(ResetActorSounds, LVarA, 2)
EVT_WAIT(20)
EVT_CALL(SetActorPos, ACTOR_SELF, 0, -1000, 0)
EVT_CALL(ForceHomePos, ACTOR_SELF, 0, -1000, 0)
EVT_CALL(SetActorPos, ACTOR_SELF, NPC_DISPOSE_LOCATION)
EVT_CALL(ForceHomePos, ACTOR_SELF, NPC_DISPOSE_LOCATION)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 1)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)

View File

@ -281,7 +281,7 @@ EvtScript N(8021B398) = {
EVT_END
};
Vec3i N(vector3D_8021B594) = { 0, -1000, 0, };
Vec3i N(vector3D_8021B594) = { NPC_DISPOSE_LOCATION, };
Formation N(specialFormation_8021B5A0) = {
{ .actor = &NAMESPACE, .home = { .vec = &N(vector3D_8021B594) }},

View File

@ -14,7 +14,7 @@ ApiStatus N(UnkTattleEffectFunc1)(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
EffectInstance* effect = (EffectInstance*)evt_get_variable(script, *args++);
effect->data.tattleWindow->pos.y = -1000.0f;
effect->data.tattleWindow->pos.y = NPC_DISPOSE_POS_Y;
return ApiStatus_DONE2;
}

View File

@ -1043,7 +1043,7 @@ EvtScript N(findTarget) = {
EVT_END
};
Vec3i N(summon_pos) = { 0, -1000, 0 };
Vec3i N(summon_pos) = { NPC_DISPOSE_LOCATION };
Formation N(summon_formation) = {
{ .actor = &NAMESPACE, .home = { .vec = &N(summon_pos) }, .priority = 100, }

View File

@ -1394,7 +1394,7 @@ ActorBlueprint N(clone_flying) = {
.statusMessageOffset = { 1, 34 },
};
Vec3i N(clone_pos) = { 0, -1000, 0 };
Vec3i N(clone_pos) = { NPC_DISPOSE_LOCATION };
Formation N(formation_clone) = {
{ .actor = &N(clone), .home = { .vec = &N(clone_pos) }, .priority = 0, },

View File

@ -178,7 +178,7 @@ ActorBlueprint N(hole) = {
.statusMessageOffset = { 10, 20 },
};
Vec3i N(hole_pos) = { 0, -1000, 0, };
Vec3i N(hole_pos) = { NPC_DISPOSE_LOCATION, };
Formation N(formation_hole_1) = {
{ .actor = &N(hole), .home = { .vec = &N(hole_pos) },},

View File

@ -1461,9 +1461,9 @@ ApiStatus N(ProcessHurricane)(Evt* script, s32 isInitialCall) {
sHuffPuffBreathEffect->data.huffPuffBreath->speedX = -2.0f;
// looks like this was breath inhale phase, but then the devs removed it
sHuffPuffBreathEffect->data.huffPuffBreath->pos.x = 0.0f;
sHuffPuffBreathEffect->data.huffPuffBreath->pos.y = -1000.0f;
sHuffPuffBreathEffect->data.huffPuffBreath->pos.z = 0.0f;
sHuffPuffBreathEffect->data.huffPuffBreath->pos.x = NPC_DISPOSE_POS_X;
sHuffPuffBreathEffect->data.huffPuffBreath->pos.y = NPC_DISPOSE_POS_Y;
sHuffPuffBreathEffect->data.huffPuffBreath->pos.z = NPC_DISPOSE_POS_Z;
if (script->functionTemp[2] != 0) {
sfx_play_sound_at_position(SOUND_201E, SOUND_SPACE_MODE_0, partner->currentPos.x, partner->currentPos.y, partner->currentPos.z);
@ -1474,9 +1474,9 @@ ApiStatus N(ProcessHurricane)(Evt* script, s32 isInitialCall) {
set_animation(ACTOR_PARTNER, -1, ANIM_BattleLakilester_HurricaneInhale);
break;
case STATE_DISABLED:
sHuffPuffBreathEffect->data.huffPuffBreath->pos.x = 0.0f;
sHuffPuffBreathEffect->data.huffPuffBreath->pos.y = -1000.0f;
sHuffPuffBreathEffect->data.huffPuffBreath->pos.z = 0.0f;
sHuffPuffBreathEffect->data.huffPuffBreath->pos.x = NPC_DISPOSE_POS_X;
sHuffPuffBreathEffect->data.huffPuffBreath->pos.y = NPC_DISPOSE_POS_Y;
sHuffPuffBreathEffect->data.huffPuffBreath->pos.z = NPC_DISPOSE_POS_Z;
break;
case STATE_EXHALE:
x = partner->currentPos.x;

View File

@ -49,7 +49,7 @@ ApiStatus N(WattFXUpdate)(Evt* script, s32 isInitialCall) {
sWattEffectData_isActive = TRUE;
sWattEffectData_currentEffectIndex = 0;
sWattEffectData_effect1 = fx_static_status(0, partner->currentPos.x, partner->currentPos.y, partner->currentPos.z, 1.0f, 5, 0);
sWattEffectData_effect2 = fx_static_status(1, partner->currentPos.x, -1000.0f, partner->currentPos.z, 1.0f, 5, 0);
sWattEffectData_effect2 = fx_static_status(1, partner->currentPos.x, NPC_DISPOSE_POS_Y, partner->currentPos.z, 1.0f, 5, 0);
sWattEffectData_initialized = TRUE;
}
@ -67,7 +67,7 @@ ApiStatus N(WattFXUpdate)(Evt* script, s32 isInitialCall) {
y = partner->currentPos.y + partner->headOffset.y + partner->unk_19A + 12.0f;
z = partner->currentPos.z + partner->headOffset.z;
if ((gBattleStatus.flags2 & (BS_FLAGS2_10 | BS_FLAGS2_4)) == BS_FLAGS2_4) {
y = -1000.0f;
y = NPC_DISPOSE_POS_Y;
}
if (sWattEffectData_isActive) {

View File

@ -383,7 +383,7 @@ EvtScript N(usePower) = {
EVT_CALL(SetActorScale, LVarA, LVar0, LVar0, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetActorPos, LVarA, 0, -1000, 0)
EVT_CALL(SetActorPos, LVarA, NPC_DISPOSE_LOCATION)
EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2)
EVT_LOOP(10)
EVT_CALL(PlayEffect, 0x11, 1, LVar0, LVar1, LVar2, 20, 0, 0, 0, 0, 0, 0, 0, 0)

View File

@ -32,13 +32,7 @@ typedef struct HitAssetCollider {
/* 0x08 */ s32 trianglesOffset;
} HitAssetCollider; // size = 0x0C
typedef struct VertexIndexStruct {
/* 0x00 */ s16 i1;
/* 0x02 */ s16 i2;
/* 0x04 */ s16 i3;
} VertexIndexStruct; // size = 0x06
extern VertexIndexStruct gEntityColliderFaces[];
extern Vec3s gEntityColliderFaces[];
extern Vec3f gEntityColliderNormals[];
extern f32 gCollisionRayStartX;
extern f32 gCollisionRayStartY;
@ -1017,9 +1011,9 @@ s32 test_ray_entities(f32 startX, f32 startY, f32 startZ, f32 dirX, f32 dirY, f3
startZ - entity->position.z, &gCollisionRayStartX, &gCollisionRayStartY, &gCollisionRayStartZ);
for (j = 0; j < 12; j++) {
Vec3f* v1 = triangle->v1 = &boxVertices[gEntityColliderFaces[j].i1];
Vec3f* v2 = triangle->v2 = &boxVertices[gEntityColliderFaces[j].i2];
Vec3f* v3 = triangle->v3 = &boxVertices[gEntityColliderFaces[j].i3];
Vec3f* v1 = triangle->v1 = &boxVertices[gEntityColliderFaces[j].x];
Vec3f* v2 = triangle->v2 = &boxVertices[gEntityColliderFaces[j].y];
Vec3f* v3 = triangle->v3 = &boxVertices[gEntityColliderFaces[j].z];
triangle->e13.x = v3->x - v1->x;
triangle->e13.y = v3->y - v1->y;
triangle->e13.z = v3->z - v1->z;

View File

@ -1,6 +1,6 @@
#include "common.h"
ApiStatus N(ActorJumpToPos)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(ActorJumpToPos)) {
Actor* actor = get_actor(script->owner1.actorID);
Vec3f* temp_f0 = &actor->state.currentPos;

View File

@ -1,6 +1,6 @@
#include "common.h"
ApiStatus N(AddFP)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(AddFP)) {
PlayerData* playerData = &gPlayerData;
s32 amt = evt_get_variable(script, *script->ptrReadPos);

View File

@ -1,6 +1,6 @@
#include "common.h"
ApiStatus N(AddHP)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(AddHP)) {
PlayerData* playerData = &gPlayerData;
s32 amt = evt_get_variable(script, *script->ptrReadPos);

View File

@ -53,7 +53,7 @@ u32 N(ArcsinDeg)(f32 x, f32 y) {
return ret;
}
ApiStatus N(CalculateArcsinDeg)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(CalculateArcsinDeg)) {
Bytecode* args = script->ptrReadPos;
s32 x1 = evt_get_variable(script, *args++);
s32 y1 = evt_get_variable(script, *args++);

View File

@ -1,6 +1,6 @@
#include "common.h"
ApiStatus N(CanPlayerLoseAction)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(CanPlayerLoseAction)) {
BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos;

View File

@ -1,6 +1,6 @@
#include "common.h"
ApiStatus N(ChompChainInit)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(ChompChainInit)) {
Actor* actor = get_actor(script->owner1.actorID);
ActorPart* actorPart;
ChompChainAnimationState* it;

View File

@ -1,6 +1,6 @@
#include "common.h"
ApiStatus N(CompareFloats)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(CompareFloats)) {
Bytecode* args = script->ptrReadPos;
f32 temp_f20 = evt_get_float_variable(script, *args++);
f32 temp = evt_get_float_variable(script, *args++);

View File

@ -1,7 +1,7 @@
#include "common.h"
#include "npc.h"
ApiStatus N(CosInterpMinMax)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(CosInterpMinMax)) {
Bytecode* args = script->ptrReadPos;
s32 outVarTime = *args++;
s32 time = evt_get_variable(script, outVarTime);

View File

@ -8,7 +8,7 @@ s32 N(jump_icons)[] = { ITEM_BOOTS1_ICON, ITEM_BOOTS2_ICON, ITEM_BOOTS3_ICON };
s32 N(jump_text)[] = { 76, 77, 78 };
ApiStatus N(DisableRandomAbility)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(DisableRandomAbility)) {
Bytecode* args = script->ptrReadPos;
BattleStatus* battleStatus = &gBattleStatus;
PlayerData* playerData = &gPlayerData;

View File

@ -1,6 +1,6 @@
#include "common.h"
ApiStatus N(Dist3D)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(Dist3D)) {
Bytecode* args = script->ptrReadPos;
s32 var1 = evt_get_variable(script, *args++);
s32 var2 = evt_get_variable(script, *args++);

View File

@ -1,7 +1,7 @@
#include "common.h"
#include "battle/battle.h"
ApiStatus N(DivActorLevel4)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(DivActorLevel4)) {
ActorBlueprint* actorData = get_actor(script->owner1.actorID)->actorBlueprint;
actorData->level /= 4;

View File

@ -2,7 +2,7 @@
#include "model.h"
#include "npc.h"
ApiStatus N(FadeBackgroundToBlack)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(FadeBackgroundToBlack)) {
if (isInitialCall) {
mdl_set_all_fog_mode(FOG_MODE_1);
*gBackgroundFogModePtr = FOG_MODE_1;

View File

@ -50,7 +50,7 @@ void N(foliage_setup_shear_mtx)(Matrix4f mtx, f32 scale, f32 xAmount, f32 zAmoun
/// @apiparam float dx
/// @apiparam float dy
/// @apiparam float dz
ApiStatus N(TransformFoliage)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(TransformFoliage)) {
Bytecode* args = script->ptrReadPos;
s32 modelListIndex = get_model_list_index_from_tree_index(evt_get_variable(script, *args++));
f32 scale = evt_get_float_variable(script, *args++);

View File

@ -1,7 +1,7 @@
#include "common.h"
#include "npc.h"
ApiStatus N(FreeIcon)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(FreeIcon)) {
hud_element_free(evt_get_variable(script, *script->ptrReadPos));
return ApiStatus_DONE2;
}

View File

@ -1,6 +1,6 @@
#include "common.h"
ApiStatus N(GetBootsHammerLevel)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(GetBootsHammerLevel)) {
Bytecode* args = script->ptrReadPos;
evt_set_variable(script, *args++, gPlayerData.bootsLevel);

View File

@ -1,7 +1,7 @@
#include "common.h"
#include "npc.h"
ApiStatus N(GetItemEntityPosition)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(GetItemEntityPosition)) {
Bytecode* args = script->ptrReadPos;
ItemEntity* entity = get_item_entity(evt_get_variable(script, *args++));

View File

@ -1,6 +1,6 @@
#include "common.h"
ApiStatus N(GetJumpHammerCharge)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(GetJumpHammerCharge)) {
Bytecode* args = script->ptrReadPos;
evt_set_variable(script, *args++, gBattleStatus.jumpCharge);

View File

@ -1,7 +1,7 @@
#include "common.h"
#include "npc.h"
ApiStatus N(GetLastActorEventType)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(GetLastActorEventType)) {
Bytecode* args = script->ptrReadPos;
Actor* actor = get_actor(script->owner1.actorID);

View File

@ -1,6 +1,6 @@
#include "common.h"
ApiStatus N(GetLastEventType)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(GetLastEventType)) {
Bytecode* args = script->ptrReadPos;
Actor* actor = get_actor(script->owner1.actorID);

View File

@ -1,7 +1,7 @@
#include "common.h"
#include "model.h"
ApiStatus N(GetModelPos)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(GetModelPos)) {
Model* model = get_model_from_list_index(get_model_list_index_from_tree_index(script->varTable[10]));
script->varTable[11] = (s32) model->center.x;

View File

@ -1,6 +1,6 @@
#include "common.h"
ApiStatus N(GetPlayerHpPercent)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(GetPlayerHpPercent)) {
evt_set_variable(script, *script->ptrReadPos, (gPlayerData.curHP * 100) / gPlayerData.curMaxHP);
return ApiStatus_DONE2;
}

View File

@ -1,7 +1,7 @@
#include "common.h"
#include "npc.h"
ApiStatus N(GetSelectedMoveID)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(GetSelectedMoveID)) {
evt_set_variable(script, *script->ptrReadPos, gBattleStatus.selectedMoveID);
return ApiStatus_DONE2;
}

View File

@ -1,6 +1,6 @@
#include "common.h"
ApiStatus N(IsAOrBPressed)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(IsAOrBPressed)) {
script->varTable[0] = FALSE;
if (gGameStatusPtr->pressedButtons[0] & BUTTON_A) {
script->varTable[0] = TRUE;

View File

@ -1,6 +1,6 @@
#include "common.h"
ApiStatus N(ItemEntityJumpToPos)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(ItemEntityJumpToPos)) {
struct {
/* 0x00 */ Vec3f pos;
/* 0x0C */ f32 moveAngle;

View File

@ -1,5 +1,5 @@
// outputs z sprite rotation
ApiStatus N(MediGuySpriteRotationFunc)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(MediGuySpriteRotationFunc)) {
Bytecode* args = script->ptrReadPos;
s32 angle = evt_get_variable(script, *args++);

View File

@ -1,7 +1,7 @@
#include "common.h"
#include "map.h"
ApiStatus N(RemoveChillOut)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(RemoveChillOut)) {
Actor* actor = get_actor(script->owner1.actorID);
s32 hudElementDataIndex = actor->hudElementDataIndex;

View File

@ -1,7 +1,7 @@
#include "common.h"
#include "effects.h"
ApiStatus N(Set80071270_0_16)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(Set80071270_0_16)) {
fx_snowfall(0, 0x10);
return ApiStatus_DONE2;
}

View File

@ -3,7 +3,7 @@
extern s16 D_802809F8;
ApiStatus N(Set80218630_Var0)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(Set80218630_Var0)) {
D_802809F8 = script->varTable[0];
return ApiStatus_DONE2;
}

View File

@ -1,6 +1,6 @@
#include "common.h"
ApiStatus N(SetAngleClamped)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(SetAngleClamped)) {
Bytecode* args = script->ptrReadPos;
s32 var = *args++;
f32 x1 = evt_get_float_variable(script, *args++);

View File

@ -1,7 +1,7 @@
#include "common.h"
#include "model.h"
ApiStatus N(SetBackgroundAlpha)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(SetBackgroundAlpha)) {
Bytecode* args = script->ptrReadPos;
set_background_color_blend(0, 0, 0, evt_get_variable(script, *args++));

View File

@ -1,6 +1,6 @@
#include "common.h"
ApiStatus N(SetNpcCollision32)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(SetNpcCollision32)) {
Npc* npc = get_npc_unsafe(100);
npc->collisionHeight = 32;

View File

@ -1,6 +1,6 @@
#include "common.h"
ApiStatus N(SetNpcPosYaw)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(SetNpcPosYaw)) {
Bytecode* args = script->ptrReadPos;
s32 npcID = evt_get_variable(script, *args++);
f32 x = evt_get_float_variable(script, *args++);

View File

@ -1,6 +1,6 @@
#include "common.h"
ApiStatus N(SetPlayerStatusPosYaw)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(SetPlayerStatusPosYaw)) {
Bytecode* args = script->ptrReadPos;
f32 x = evt_get_float_variable(script, *args++);
f32 y = evt_get_float_variable(script, *args++);

View File

@ -1,7 +1,7 @@
#include "common.h"
#include "battle/battle.h"
ApiStatus N(SetSpinSmashable)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(SetSpinSmashable)) {
s32 canSpinSmash = evt_get_variable(script, *script->ptrReadPos);
Actor* actor = get_actor(script->owner1.actorID);

View File

@ -1,7 +1,7 @@
#include "common.h"
#include "effects.h"
ApiStatus N(ShrinkActor)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(ShrinkActor)) {
Bytecode* args = script->ptrReadPos;
f32 var1 = evt_get_float_variable(script, *args++);
f32 var2 = evt_get_float_variable(script, *args++);

View File

@ -1,7 +1,7 @@
#include "common.h"
#include "effects.h"
ApiStatus N(SpitInk)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(SpitInk)) {
Bytecode* args = script->ptrReadPos;
EffectInstance* effect;
f32 temp_f28;

View File

@ -1,6 +1,6 @@
#include "common.h"
ApiStatus N(SpyGuyActionFunc)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(SpyGuyActionFunc)) {
BattleStatus* status = &gBattleStatus;
Bytecode* args = script->ptrReadPos;

View File

@ -1,7 +1,7 @@
#include "common.h"
#include "effects.h"
ApiStatus N(UnkStarFunc1)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(UnkStarFunc1)) {
Bytecode* args = script->ptrReadPos;
s32 a = evt_get_variable(script, *args++);
s32 b = evt_get_variable(script, *args++);
@ -11,7 +11,7 @@ ApiStatus N(UnkStarFunc1)(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
ApiStatus N(UnkStarFunc2)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(UnkStarFunc2)) {
Bytecode* args = script->ptrReadPos;
s32 a = evt_get_variable(script, *args++);
s32 b = evt_get_variable(script, *args++);
@ -21,7 +21,7 @@ ApiStatus N(UnkStarFunc2)(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
ApiStatus N(UnkStarFunc3)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(UnkStarFunc3)) {
Bytecode* args = script->ptrReadPos;
s32 a = evt_get_variable(script, *args++);
s32 b = evt_get_variable(script, *args++);
@ -31,7 +31,7 @@ ApiStatus N(UnkStarFunc3)(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
ApiStatus N(UnkStarFunc4)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(UnkStarFunc4)) {
Bytecode* args = script->ptrReadPos;
s32 var1 = evt_get_variable(script, *args++);
s32 var2 = evt_get_variable(script, *args++);

View File

@ -17,7 +17,7 @@ typedef struct StarOutlineState {
/* 0x38 */ s32 effectEnded;
} StarOutlineState; // size = 0x3C
ApiStatus N(StarRodAppearEffect)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(StarRodAppearEffect)) {
Bytecode* args = script->ptrReadPos;
Actor* actor = get_actor(script->owner1.actorID);
s32 i;

View File

@ -15,7 +15,7 @@ typedef struct StarOutlineState2 {
/* 0x30 */ s32 effectEnded;
} StarOutlineState2; // size = 0x34
ApiStatus N(StarRodPowerUpEffect)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(StarRodPowerUpEffect)) {
Bytecode* args = script->ptrReadPos;
Actor* actor = get_actor(script->owner1.actorID);
s32 i;

View File

@ -1,7 +1,7 @@
#include "common.h"
#include "npc.h"
ApiStatus N(StartRumbleWithParams)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(StartRumbleWithParams)) {
Bytecode* args = script->ptrReadPos;
start_rumble(evt_get_variable(script, *args++), evt_get_variable(script, *args++));

View File

@ -2,7 +2,7 @@
#include "model.h"
#include "map.h"
ApiStatus N(UnfadeBackgroundToBlack)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(UnfadeBackgroundToBlack)) {
if (isInitialCall) {
script->functionTemp[0] = 20;
}

View File

@ -1,6 +1,6 @@
#include "battle/battle.h"
ApiStatus N(UnkActorPosFunc)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(UnkActorPosFunc)) {
Actor* actor = get_actor(script->owner1.actorID);
ActorState* actorState = &actor->state;

View File

@ -1,6 +1,6 @@
#include "battle/battle.h"
ApiStatus N(UnkActorSizeFunc)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(UnkActorSizeFunc)) {
Actor* actor = get_actor(script->owner1.actorID);
Actor* targetActor = get_actor(actor->targetActorID);
s16 targetActorSizeX;

View File

@ -2,7 +2,7 @@
// TODO: this include should have some scripts; see area_kmr_part_1/stage/kmr_03.c
ApiStatus N(UnkAngleFunc2)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(UnkAngleFunc2)) {
Bytecode* args = script->ptrReadPos;
f32 var0 = evt_get_variable(script, *args++) / 10.0;
s32 a3 = *args++;

View File

@ -1,7 +1,7 @@
#include "common.h"
#include "model.h"
ApiStatus N(UnkBackgroundFunc)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(UnkBackgroundFunc)) {
if (isInitialCall) {
script->functionTemp[0] = 20;
}

View File

@ -1,7 +1,7 @@
#include "common.h"
#include "model.h"
ApiStatus N(UnkBackgroundFunc2)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(UnkBackgroundFunc2)) {
if (isInitialCall) {
mdl_set_all_fog_mode(FOG_MODE_1);
*gBackgroundFogModePtr = FOG_MODE_1;

View File

@ -1,7 +1,7 @@
#include "common.h"
#include "model.h"
ApiStatus N(UnkBackgroundFunc3)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(UnkBackgroundFunc3)) {
mdl_set_all_fog_mode(FOG_MODE_1);
*gBackgroundFogModePtr = FOG_MODE_1;
set_background_color_blend(0, 0, 0, 0);

View File

@ -1,6 +1,6 @@
#include "battle/battle.h"
ApiStatus N(UnkBattleFunc1)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(UnkBattleFunc1)) {
Bytecode* args = script->ptrReadPos;
s32 var0 = evt_get_variable(script, *args++);
s32 var1 = evt_get_variable(script, *args++);

View File

@ -1,7 +1,7 @@
#include "common.h"
#include "npc.h"
ApiStatus N(UnkBattleFunc2)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(UnkBattleFunc2)) {
Bytecode* args = script->ptrReadPos;
s32 x = evt_get_variable(script, *args++);
s32 y = evt_get_variable(script, *args++);
@ -12,7 +12,7 @@ ApiStatus N(UnkBattleFunc2)(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
ApiStatus N(UnkBattleFunc2_2)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(UnkBattleFunc2_2)) {
Bytecode* args = script->ptrReadPos;
s32 x = evt_get_variable(script, *args++);
s32 y = evt_get_variable(script, *args++);

View File

@ -1,6 +1,6 @@
#include "common.h"
ApiStatus N(UnkBattleFunc5)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(UnkBattleFunc5)) {
Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++);
s32 partID = evt_get_variable(script, *args++);

View File

@ -7,7 +7,7 @@
#define BOWSER_FLAG_TOCHECK ACTOR_EVENT_FLAG_80000
#endif
ApiStatus N(UnkBowserFunc1)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(UnkBowserFunc1)) {
Actor* actor = get_actor(script->owner1.actorID);
ActorPart* part;
s32 i, j;

View File

@ -1,7 +1,7 @@
#include "battle/battle.h"
#include "effects.h"
ApiStatus N(UnkEffect6CFunc)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(UnkEffect6CFunc)) {
Bytecode* args = script->ptrReadPos;
evt_set_variable(script, *args++, (s32) fx_tattle_window(0, 106.0f, 144.0f, 0, 1.0f, 0));

View File

@ -1,7 +1,7 @@
#include "battle/battle.h"
#include "effects.h"
ApiStatus N(UnkEffect6FFunc)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(UnkEffect6FFunc)) {
Bytecode* args = script->ptrReadPos;
EffectInstance* effect;
s32 unused_var = evt_get_variable(script, *args++);

View File

@ -1,6 +1,6 @@
#include "common.h"
ApiStatus N(UnkEnemyPosFunc)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(UnkEnemyPosFunc)) {
Bytecode* args = script->ptrReadPos;
Vec3f temp;
Vec3f homePoses[4];

View File

@ -1,7 +1,7 @@
#include "common.h"
#include "effects.h"
ApiStatus N(UnkFireBreathFXFunc)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(UnkFireBreathFXFunc)) {
Bytecode* args = script->ptrReadPos;
EffectInstance* effect = (EffectInstance*) evt_get_variable(script, *args++);
FireBreathFXData* data = effect->data.fireBreath;

View File

@ -1,7 +1,7 @@
#include "common.h"
#include "battle/battle.h"
ApiStatus N(UnkFloatFunc005)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(UnkFloatFunc005)) {
Bytecode* args = script->ptrReadPos;
#ifdef AVOID_UB
f32 vt0 = 0.0f;

View File

@ -1,7 +1,7 @@
#include "common.h"
#include "npc.h"
ApiStatus N(UnkFloatFunc2)(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(UnkFloatFunc2)) {
Bytecode* args = script->ptrReadPos;
s32 var0 = evt_get_variable(script, *args++);
s32 a1 = *args++;

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