:(
Build libsm64 / Build libsm64 for linux (push) Successful in 34s
Build libsm64 / Build libsm64 for web (push) Successful in 32s
Build libsm64 / Build libsm64 for windows (push) Successful in 24s

This commit is contained in:
2026-05-31 21:57:50 -05:00
parent ede2099ff5
commit 40bee0f224
9 changed files with 68 additions and 42 deletions
+46 -25
View File
@@ -34,38 +34,44 @@ static Vec3f gVec3fZero = {0.0f, 0.0f, 0.0f};
void add_tree_leaf_particles(struct MarioState *m)
{
// f32 leafHeight;
f32 leafHeight;
s32 isOnTree = false;//(m->usedObj->behavior == segmented_to_virtual(bhvTree));
// if (m->usedObj->behavior == segmented_to_virtual(bhvTree)) {
// // make leaf effect spawn higher on the Shifting Sand Land palm tree
// if (gCurrLevelNum == LEVEL_SSL) {
// leafHeight = 250.0f;
// } else {
// leafHeight = 100.0f;
// }
// if (m->pos[1] - m->floorHeight > leafHeight) {
// m->particleFlags |= PARTICLE_LEAF;
// }
// }
if (isOnTree) {
// make leaf effect spawn higher on the Shifting Sand Land palm tree
if (gCurrLevelNum == LEVEL_SSL) {
leafHeight = 250.0f;
} else {
leafHeight = 100.0f;
}
if (m->pos[1] - m->floorHeight > leafHeight) {
m->particleFlags |= PARTICLE_LEAF;
}
}
}
void play_climbing_sounds(struct MarioState *m, s32 b)
{
// s32 isOnTree = (m->usedObj->behavior == segmented_to_virtual(bhvTree));
s32 isOnTree = false;//(m->usedObj->behavior == segmented_to_virtual(bhvTree));
// if (b == 1) {
// if (is_anim_past_frame(m, 1)) {
// play_sound(isOnTree ? SOUND_ACTION_CLIMB_UP_TREE : SOUND_ACTION_CLIMB_UP_POLE,
// m->marioObj->header.gfx.cameraToObject);
// }
// } else {
// play_sound(isOnTree ? SOUND_MOVING_SLIDE_DOWN_TREE : SOUND_MOVING_SLIDE_DOWN_POLE,
// m->marioObj->header.gfx.cameraToObject);
// }
if (b == 1) {
if (is_anim_past_frame(m, 1)) {
play_sound(isOnTree ? SOUND_ACTION_CLIMB_UP_TREE : SOUND_ACTION_CLIMB_UP_POLE,
m->marioObj->header.gfx.cameraToObject);
}
} else {
play_sound(isOnTree ? SOUND_MOVING_SLIDE_DOWN_TREE : SOUND_MOVING_SLIDE_DOWN_POLE,
m->marioObj->header.gfx.cameraToObject);
}
}
s32 set_pole_position(struct MarioState *m, f32 offsetY)
{
if (!m->isLocal && m->usedObj == NULL)
{
return POLE_NONE;
}
UNUSED s32 unused1;
UNUSED s32 unused2;
UNUSED s32 unused3;
@@ -95,6 +101,7 @@ s32 set_pole_position(struct MarioState *m, f32 offsetY)
}
f32 floorHeight = find_floor(m->pos[0], m->pos[1], m->pos[2], &floor);
f32 floorHeight2 = find_floor(m->pos[0], m->pos[1] + 100, m->pos[2], &floor);
if (m->pos[1] < floorHeight)
{
m->pos[1] = floorHeight;
@@ -104,8 +111,17 @@ s32 set_pole_position(struct MarioState *m, f32 offsetY)
else if (marioObj->oMarioPolePos < -m->usedObj->hitboxDownOffset)
{
m->pos[1] = m->usedObj->oPosY - m->usedObj->hitboxDownOffset;
set_mario_action(m, ACT_FREEFALL, 0);
result = POLE_FELL_OFF;
if (m->pos[1] < floorHeight2)
{
m->pos[1] = floorHeight2;
set_mario_action(m, ACT_IDLE, 0);
result = POLE_TOUCHED_FLOOR;
}
else
{
set_mario_action(m, ACT_FREEFALL, 0);
result = POLE_FELL_OFF;
}
}
else if (collided)
{
@@ -165,7 +181,12 @@ s32 act_holding_pole(struct MarioState *m)
if (poleStickY > 16.0f)
{
f32 poleTop = m->usedObj->hitboxHeight - 100.0f;
f32 poleTop = m->pos[1] + 1000;
if (m->usedObj != NULL)
{
poleTop = m->usedObj->hitboxHeight - 100.0f;
}
// const BehaviorScript *poleBehavior = virtual_to_segmented(0x13, m->usedObj->behavior);
if (marioObj->oMarioPolePos < poleTop - 0.4f)