forked from https://github.com/sm64pc/sm64ex [nightly] commit db9a6345baa5acb41f9d77c480510442cab26025
this fork is for my personal preference edits.
list of current edits;
» coins don't increase mario's health.
» water surface doesn't increase mario's health.
» being submerged in water doesn't hurt mario.
» mario gets fall damage from moderate heights.
» mario dies from falling from high heights regardless of last attempts of physical actions.
» poison Gas hurts mario slower.
code changes in diff style;
sPowerMeterStoredHealth = numHealthWedges; // If Mario is swimming, keep power meter visible - if (gPlayerCameraState->action & ACT_FLAG_SWIMMING) { + /*if (gPlayerCameraState->action & ACT_FLAG_SWIMMING) { if (sPowerMeterHUD.animation == POWER_METER_HIDDEN || sPowerMeterHUD.animation == POWER_METER_EMPHASIZED) { sPowerMeterHUD.animation = POWER_METER_DEEMPHASIZING; sPowerMeterHUD.y = 166; } sPowerMeterVisibleTimer = 0; - } + }*/ }
u32 interact_coin(struct MarioState *m, UNUSED u32 interactType, struct Object *o) { m->numCoins += o->oDamageOrCoinValue; - m->healCounter += 4 * o->oDamageOrCoinValue; + //m->healCounter += 4 * o->oDamageOrCoinValue; o->oInteractStatus = INT_STATUS_INTERACTED;
if (m->actionState == ACT_GROUND_POUND) { damageHeight = 600.0f; } else { - damageHeight = 1150.0f; + damageHeight = 700.0f; } #pragma GCC diagnostic pop if (m->action != ACT_TWIRLING && m->floor->type != SURFACE_BURNING) { - if (m->vel[1] < -55.0f) { - if (fallHeight > 3000.0f) { - m->hurtCounter += (m->flags & MARIO_CAP_ON_HEAD) ? 16 : 24; + //if (m->vel[1] < -55.0f) { + //if (fallHeight > 3000.0f) { + if (m->flags & MARIO_UNKNOWN_18) { + m->hurtCounter += (m->flags & MARIO_CAP_ON_HEAD) ? 32 : 32; queue_rumble_data(5, 80); set_camera_shake_from_hit(SHAKE_FALL_DAMAGE); play_sound(SOUND_MARIO_ATTACKED, m->marioObj->header.gfx.cameraToObject); return drop_and_set_mario_action(m, hardFallAction, 4); } else if (fallHeight > damageHeight && !mario_floor_is_slippery(m)) { - m->hurtCounter += (m->flags & MARIO_CAP_ON_HEAD) ? 8 : 12; + m->hurtCounter += (m->flags & MARIO_CAP_ON_HEAD) ? 4 : 6; m->squishTimer = 30; queue_rumble_data(5, 80); set_camera_shake_from_hit(SHAKE_FALL_DAMAGE); play_sound(SOUND_MARIO_ATTACKED, m->marioObj->header.gfx.cameraToObject); } - } + //} }
if (((u32) m->healCounter | (u32) m->hurtCounter) == 0) { if ((m->input & INPUT_IN_POISON_GAS) && ((m->action & ACT_FLAG_INTANGIBLE) == 0)) { if (((m->flags & MARIO_METAL_CAP) == 0) && (gDebugLevelSelect == 0)) { - m->health -= 4; + m->health -= 1; } } else { if ((m->action & ACT_FLAG_SWIMMING) && ((m->action & ACT_FLAG_INTANGIBLE) == 0)) { .................................. .................................. // when in snow terrains lose 3 health. // If using the debug level select, do not lose any HP to water. if ((m->pos[1] >= (m->waterLevel - 140)) && !terrainIsSnow) { - m->health += 0x1A; + //m->health += 0x1A; } else if (gDebugLevelSelect == 0) { - m->health -= (terrainIsSnow ? 3 : 1); + m->health -= (terrainIsSnow ? 3 : 0); } } }