1
0
Fork 0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2025-03-14 02:16:10 +00:00

refactor to .h files

This commit is contained in:
jugeeya 2019-11-27 18:46:42 -08:00
parent e9b0386509
commit e5185a6c8f
11 changed files with 39 additions and 41 deletions

View file

@ -10,7 +10,7 @@
#include "acmd_wrapper.h"
#include "lib/l2c_imports.h"
#include "saltysd/saltysd_helper.h"
#include "training/common.hpp"
#include "training/common.h"
#include "useful/const_value_table.h"
#include "useful/raygun_printer.h"

View file

@ -14,8 +14,8 @@
#include "saltysd/saltysd_ipc.h"
#include "saltysd/saltysd_helper.h"
#include "hitbox_visualizer.hpp"
#include "training_mods.hpp"
#include "hitbox_visualizer.h"
#include "training_mods.h"
extern "C" {
extern u32 __start__;

View file

@ -34,8 +34,8 @@ bool is_in_shieldstun(u64 module_accessor) {
int status_kind = StatusModule::status_kind(module_accessor);
int prev_status = StatusModule::prev_status_kind(module_accessor, 0);
// If we are taking shield damage or we are droping shield from taking shield damage we are in hitstun
if(status_kind == FIGHTER_STATUS_KIND_GUARD_DAMAGE || (prev_status == FIGHTER_STATUS_KIND_GUARD_DAMAGE && status_kind == FIGHTER_STATUS_KIND_GUARD_OFF))
{
if(status_kind == FIGHTER_STATUS_KIND_GUARD_DAMAGE ||
(prev_status == FIGHTER_STATUS_KIND_GUARD_DAMAGE && status_kind == FIGHTER_STATUS_KIND_GUARD_OFF)) {
return true;
}
@ -49,28 +49,6 @@ bool is_in_landing(u64 module_accessor) {
status_kind <= FIGHTER_STATUS_KIND_LANDING_DAMAGE_LIGHT;
}
bool should_hold_shield(u64 module_accessor)
{
// We should hold shield if the state requires it
if (menu.SHIELD_STATE == SHIELD_HOLD || menu.SHIELD_STATE == SHIELD_INFINITE) {
// If we are not mashing then we will always hold shield
if(menu.MASH_STATE == NONE)
return true;
if(!is_in_shieldstun(module_accessor))
return true;
// We will only drop shield if we are in shieldstun and our attack can be performed OOS
if(menu.MASH_STATE == MASH_ATTACK)
{
if(menu.ATTACK_STATE == MASH_NEUTRAL_B || menu.ATTACK_STATE == MASH_SIDE_B || menu.ATTACK_STATE == MASH_DOWN_B)
return true;
}
}
return false;
}
void perform_defensive_option(u64 module_accessor) {
if (menu.DEFENSIVE_STATE == RANDOM_DEFENSIVE) {

View file

@ -1,4 +1,4 @@
#include "common.hpp"
#include "common.h"
#ifndef M_PI
#define M_PI 3.14159265358979323846

View file

@ -1,5 +1,5 @@
#pragma once
#include "common.hpp"
#include "common.h"
typedef struct FrameInput {
int cat1_flag;

View file

@ -1,4 +1,4 @@
#include "common.hpp"
#include "common.h"
namespace Ledge {
void force_option(u64 module_accessor) {

View file

@ -1,4 +1,4 @@
#include "common.hpp"
#include "common.h"
namespace Mash {
int get_attack_air_kind(u64 module_accessor, bool& replace) {

View file

@ -1,5 +1,5 @@
#pragma once
#include "common.hpp"
#include "common.h"
#define SAVE_STATE 1
#define DEFAULT 2

View file

@ -1,4 +1,4 @@
#include "common.hpp"
#include "common.h"
#include "useful/crc32.h"
namespace Shield {
@ -27,6 +27,26 @@ float get_param_float(u64 module_accessor, u64 param_type, u64 param_hash, bool&
return 0.0;
}
bool should_hold_shield(u64 module_accessor) {
// We should hold shield if the state requires it
if (menu.SHIELD_STATE == SHIELD_HOLD || menu.SHIELD_STATE == SHIELD_INFINITE) {
// If we are not mashing then we will always hold shield
if(menu.MASH_STATE == NONE)
return true;
if(!is_in_shieldstun(module_accessor))
return true;
// We will only drop shield if we are in shieldstun and our attack can be performed OOS
if(menu.MASH_STATE == MASH_ATTACK) {
if(menu.ATTACK_STATE == MASH_NEUTRAL_B || menu.ATTACK_STATE == MASH_SIDE_B || menu.ATTACK_STATE == MASH_DOWN_B)
return true;
}
}
return false;
}
bool check_button_on(u64 module_accessor, int button, bool& replace) {
if (button == CONTROL_PAD_BUTTON_GUARD_HOLD || button == CONTROL_PAD_BUTTON_GUARD) {
if (is_training_mode() && is_operation_cpu(module_accessor)) {

View file

@ -1,4 +1,4 @@
#include "common.hpp"
#include "common.h"
namespace Tech {
void init_settings(u64 module_accessor, int status_kind, bool& replace) {

View file

@ -14,14 +14,14 @@
#include "saltysd/saltysd_helper.h"
#include "taunt_toggles.h"
#include "training/common.hpp"
#include "training/save_states.hpp"
#include "training/directional_influence.hpp"
#include "training/ledge.hpp"
#include "training/mash.hpp"
#include "training/shield.hpp"
#include "training/common.h"
#include "training/save_states.h"
#include "training/directional_influence.h"
#include "training/ledge.h"
#include "training/mash.h"
#include "training/shield.h"
#include "training/tech.h"
#include "training/input_recorder.hpp"
#include "training/input_recorder.h"
using namespace lib;
using namespace app::lua_bind;