Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 34 additions & 22 deletions .github/workflows/build_prerelease.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,35 @@
name: build_prerelease
on:
push:
branches:
- dev
workflow_dispatch:
inputs:
romfs_version:
type: string
description: 'The romfs version tag to use'
required: true
default: 'latest'

jobs:
# bump the version and build the changelog
version_and_changelog:
runs-on: ubuntu-24.04
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
outputs:
outputs:
version: ${{ steps.push_tag.outputs.version }}
changelog: ${{ steps.github_changelog.outputs.changelog }}
steps:
# fail out if this is not a merge commit
- name: ensure merge
if: ${{ !startsWith(github.event.head_commit.message, 'Merge') }}
run: exit 1

- name: checkout version
uses: actions/checkout@v4.1.4
with:
with:
fetch-depth: 0

# fail out if this is not a merge commit
- name: ensure merge
run: |
if ! git log -1 --pretty=%s | grep -q "^Merge"; then
exit 1
fi

- name: get last merge
id: last_merge
shell: bash
Expand Down Expand Up @@ -80,14 +86,14 @@ jobs:
PLUGIN_NAME: hdr
runs-on: ubuntu-24.04
needs: version_and_changelog
container:
container:
image: wuboyth/skyline-plugin-builder:latest
steps:
# - name: setup python
# uses: actions/setup-python@v5.1.0
# with:
# python-version: '3.9' # Version range or exact version of a Python version to use, using SemVer's version range syntax

- name: checkout version
uses: actions/checkout@v4.1.4

Expand Down Expand Up @@ -143,16 +149,16 @@ jobs:
tag: ${{ needs.version_and_changelog.outputs.version }}
overwrite: true
body: ${{ needs.version_and_changelog.outputs.changelog }}
# wait for any previous prereleases to complete, since we dont want to step on any

# wait for any previous prereleases to complete, since we dont want to step on any
# full package uploads prior to this one.
wait_for_previous_builds:
runs-on: ubuntu-24.04
needs: upload_to_release
steps:
- name: checkout version
uses: actions/checkout@v4.1.4
with:
with:
fetch-depth: 0
- uses: ahmadnassri/action-workflow-queue@v1
with:
Expand All @@ -168,10 +174,16 @@ jobs:
uses: actions/checkout@v4.1.4

- id: romfs_version
uses: pozetroninc/github-action-get-latest-release@master
with:
token: ${{ secrets.RELEASE_TOKEN }}
repository: HDR-Development/romfs-release
shell: bash
run: |
if [ "${{ inputs.romfs_version }}" = "latest" ]; then
RELEASE=$(curl -s -H "Authorization: Bearer ${{ secrets.RELEASE_TOKEN }}" \
https://api.github.com/repos/HDR-Development/romfs-release/releases/latest \
| python3 -c "import sys,json; print(json.load(sys.stdin)['tag_name'])")
echo "release=$RELEASE" >> $GITHUB_OUTPUT
else
echo "release=${{ inputs.romfs_version }}" >> $GITHUB_OUTPUT
fi

- name: Download romfs
id: get_romfs
Expand Down Expand Up @@ -235,14 +247,14 @@ jobs:
- uses: actions/download-artifact@v4.1.7
with:
name: changelog

- name: Display structure of downloaded changelog
run: ls -R && cp CHANGELOG.md artifacts

- uses: actions/download-artifact@v4.1.7
with:
name: version

# build the lvd files
# - id: lvd_files
# uses: robinraju/release-downloader@v1.7
Expand Down Expand Up @@ -400,7 +412,7 @@ jobs:
repo_name: HDR-Development/HDR-PreReleases
tag: ${{ needs.version_and_changelog.outputs.version }}
overwrite: true

# upload the to_beta_deletions.json to the beta for the launcher
- name: Upload to_beta_deletions.json to prerelease
uses: svenstaro/upload-release-action@v2
Expand Down
3 changes: 2 additions & 1 deletion dynamic/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![allow(non_upper_case_globals)]
#![allow(integer_to_ptr_transmutes)]
#![allow(unused)]
pub mod offsets;
pub mod util;
Expand All @@ -24,4 +25,4 @@ pub use hdr_macros::{
pub use hdr_macros as macros;

pub use modules::*;
pub use frame_info::*;
pub use frame_info::*;
24 changes: 12 additions & 12 deletions fighters/chrom/src/status/special_hi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub unsafe extern "C" fn special_hi_common_init(fighter: &mut L2CFighterCommon,
let air_accel_x_mul = WorkModule::get_param_float(fighter.module_accessor, hash40("air_accel_x_mul"), 0);
let air_accel_x_add = WorkModule::get_param_float(fighter.module_accessor, hash40("air_accel_x_add"), 0);
let air_speed_x_stable = WorkModule::get_param_float(fighter.module_accessor, hash40("air_speed_x_stable"), 0);

if !KineticModule::is_enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL) {
let mut speed_x = KineticModule::get_sum_speed_x(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN);
if fighter.is_status(*FIGHTER_STATUS_KIND_SPECIAL_HI) {
Expand Down Expand Up @@ -51,7 +51,7 @@ pub unsafe extern "C" fn special_hi_common_init(fighter: &mut L2CFighterCommon,
sv_kinetic_energy!(set_stable_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, air_speed_x_stable * speed_x_max_mul, 0.0);
WorkModule::set_float(fighter.module_accessor, accel_x_mul, *FIGHTER_INSTANCE_WORK_ID_FLOAT_MUL_FALL_X_ACCEL);
WorkModule::set_float(fighter.module_accessor, speed_x_max_mul, *FIGHTER_INSTANCE_WORK_ID_FLOAT_FALL_X_MAX_MUL);

if fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_SPECIAL_HI, *FIGHTER_STATUS_KIND_FALL_SPECIAL]) {
return;
}
Expand All @@ -60,7 +60,7 @@ pub unsafe extern "C" fn special_hi_common_init(fighter: &mut L2CFighterCommon,
let max_y_param = if (status_kind == statuses::chrom::SPECIAL_HI_DIVE) { hash40("air_speed_y_stable") } else { hash40("dive_speed_y") };
let air_speed_y_stable = WorkModule::get_param_float(fighter.module_accessor, max_y_param, 0);
let speed_y = KineticModule::get_sum_speed_y(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN);
let motion_y: f32 = MotionModule::trans_move_speed(fighter.module_accessor).value[1];
let motion_y: f32 = MotionModule::trans_move_speed(fighter.module_accessor).y();
if !KineticModule::is_enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY) {
KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY);
let flip_speed_y_mul = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.flip_speed_y_mul");
Expand Down Expand Up @@ -168,7 +168,7 @@ pub unsafe extern "C" fn special_hi_main_loop(fighter: &mut L2CFighterCommon) ->
fighter.sub_change_kinetic_type_by_situation(FIGHTER_KINETIC_TYPE_MOTION.into(), FIGHTER_KINETIC_TYPE_MOTION_AIR_ANGLE.into());
fighter.sub_set_ground_correct_by_situation(true.into());
KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION);
}
}
if MotionModule::is_end(fighter.module_accessor) {
let new_status = if fighter.is_situation(*SITUATION_KIND_GROUND) { FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL } else { FIGHTER_STATUS_KIND_FALL_SPECIAL };
let accel_x_mul = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.fall_special_accel_x_mul");
Expand Down Expand Up @@ -198,15 +198,15 @@ pub unsafe extern "C" fn special_hi_main_loop(fighter: &mut L2CFighterCommon) ->
// && !AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_PARRY) {
// VarModule::on_flag(fighter.battle_object, vars::chrom::status::SPECIAL_HI_AERIAL_CANCEL_ENABLE);
// }

return 0.into();
}

pub unsafe extern "C" fn special_hi_exec(fighter: &mut L2CFighterCommon) -> L2CValue {
if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_KINETIC_CHANGE_CHROM) {
let move_energy = KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION) as *mut smash::app::KineticEnergy;
let move_speed_y = lua_bind::KineticEnergy::get_speed_y(move_energy);
let motion_y: f32 = MotionModule::trans_move_speed(fighter.module_accessor).value[1];
let motion_y: f32 = MotionModule::trans_move_speed(fighter.module_accessor).y();

//If rising via motion, or triggered via acmd...
if motion_y > 0.0 || WorkModule::is_flag(fighter.module_accessor, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_TRANS_JUMP) {
Expand Down Expand Up @@ -324,7 +324,7 @@ pub unsafe extern "C" fn special_hi_2_main_loop(fighter: &mut L2CFighterCommon)
if VarModule::is_flag(fighter.battle_object, vars::chrom::status::SPECIAL_HI_DIVE_ENABLE) {
// Aerial cancels
// if VarModule::is_flag(fighter.battle_object, vars::chrom::status::SPECIAL_HI_AERIAL_CANCEL_ENABLE)
// && StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_AIR
// && StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_AIR
// && !fighter.is_in_hitlag()
// && fighter.get_aerial() != None {
// fighter.change_status(FIGHTER_STATUS_KIND_ATTACK_AIR.into(), false.into());
Expand Down Expand Up @@ -376,7 +376,7 @@ pub unsafe extern "C" fn special_hi_3_attack(fighter: &mut L2CFighterCommon, par
}

pub unsafe extern "C" fn special_hi_3_init(fighter: &mut L2CFighterCommon) -> L2CValue {
WorkModule::on_flag(fighter.module_accessor, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_CONTINUE_MOT);
WorkModule::on_flag(fighter.module_accessor, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_CONTINUE_MOT);
special_hi_common_init(fighter, statuses::chrom::SPECIAL_HI_DIVE);
0.into()
}
Expand All @@ -386,7 +386,7 @@ pub unsafe extern "C" fn special_hi_3_main(fighter: &mut L2CFighterCommon) -> L2
let landing_frame = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.dive_landing_frame");
WorkModule::set_float(fighter.module_accessor, landing_frame, *FIGHTER_INSTANCE_WORK_ID_FLOAT_LANDING_FRAME);
fighter.select_cliff_hangdata_from_name("special_hi");

fighter.sub_shift_status_main(L2CValue::Ptr(special_hi_3_main_loop as *const () as _))
}

Expand All @@ -399,7 +399,7 @@ pub unsafe extern "C" fn special_hi_3_main_loop(fighter: &mut L2CFighterCommon)
if fighter.is_situation(*SITUATION_KIND_GROUND) {
// Don't transition to Hi4 if Chrom used his spin final hit
let dive_hi4_max_frame = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.dive_hi4_max_frame");
let new_status = if is_spinning || MotionModule::frame(fighter.module_accessor) < dive_hi4_max_frame
let new_status = if is_spinning || MotionModule::frame(fighter.module_accessor) < dive_hi4_max_frame
{ FIGHTER_ROY_STATUS_KIND_SPECIAL_HI_4 } else { FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL };
fighter.change_status(new_status.into(), false.into());
return 1.into();
Expand All @@ -417,7 +417,7 @@ pub unsafe extern "C" fn special_hi_3_main_loop(fighter: &mut L2CFighterCommon)
&& motion_frame >= end_frame - 2.0;

if manual_transition || auto_transition {
WorkModule::off_flag(fighter.module_accessor, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_CONTINUE_MOT);
WorkModule::off_flag(fighter.module_accessor, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_CONTINUE_MOT);
MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_hi_2"), 0.0, 1.0, false, 0.0, false, false);
}
}
Expand Down Expand Up @@ -455,4 +455,4 @@ pub fn install(agent: &mut smashline::Agent) {
agent.status(Main, statuses::chrom::SPECIAL_HI_DIVE, special_hi_3_main);
agent.status(CheckAttack, statuses::chrom::SPECIAL_HI_DIVE, special_hi_3_attack);
agent.status(Exit, statuses::chrom::SPECIAL_HI_DIVE, special_hi_exit);
}
}
Loading