fork/training-mode-ce

git clone https://git.julia.blue/fork/training-mode-ce

Kounotori[L-Cancel Training] add "Target's Intangibility Rate" Option (#303)85340bc

master
2.8 KiB77 linesraw
1#include "../MexTK/mex.h"
2#include "events.h"
3
4typedef struct LCancelData LCancelData;
5typedef struct LCancelAssets LCancelAssets;
6
7struct LCancelData
8{
9    EventDesc *event_desc;
10    LCancelAssets *lcancel_assets;
11    GOBJ *barrel_gobj;
12    Vec3 barrel_lastpos;
13    int barrel_intangible_timer; // frame counter for intangible cycles (0-119)
14    bool is_fail;      // status of the last l-cancel
15    bool is_fastfall;  // bool used to detect fastfall frame
16    u8 fastfall_frame; // frame the player fastfell on
17    u8 current_l_input_timing;      // number of frames an L was input before the current aerial landing
18    bool is_current_aerial_counted; // whether or not the current aerial has already been tracked as a success or failure
19    struct
20    {
21        GOBJ *gobj;
22        u16 lcl_success;
23        u16 lcl_total;
24        Text *text_time;
25        Text *text_air;
26        Text *text_scs;
27        int canvas;
28        float arrow_base_x; // starting X position of arrow
29        float arrow_prevpos;
30        float arrow_nextpos;
31        int arrow_timer;
32    } hud;
33    struct
34    {
35        u8 shield_isdisp;   // whether tip has been shown to the player
36        u8 shield_num;      // number of times condition has been met
37        u8 hitbox_active;   // whether or not the last aerial used had a hitbox active
38        u8 hitbox_isdisp;   // whether tip has been shown to the player
39        u8 hitbox_num;      // number of times condition has been met
40        u8 fastfall_active; // whether or not the last aerial used had a hitbox active
41        u8 fastfall_isdisp; // whether tip has been shown to the player
42        u8 fastfall_num;    // number of times condition has been met
43        u8 late_isdisp;     // whether tip has been shown to the player
44        u8 late_num;        // number of times condition has been met
45    } tip;
46};
47
48struct LCancelAssets
49{
50    JOBJDesc *hud;
51    void **hudmatanim; // pointer to array
52};
53
54#define LCLTEXT_SCALE 4.2
55#define LCLARROW_ANIMFRAMES 4
56#define LCLARROW_JOBJ 7
57#define LCLARROW_OFFSET 0.365
58
59// Maximum number of frames before a miss is considered "No Press", using zero-based indexing.
60#define MAX_L_PRESS_TIMING 29
61
62void Tips_Toggle(GOBJ *menu_gobj, int value);
63void Tips_Think(LCancelData *event_data, FighterData *hmn_data);
64void LCancel_Think(LCancelData *event_data, FighterData *hmn_data);
65void LCancel_ChangeBarrel(GOBJ *gobj, int value);
66void LCancel_ChangeShowHUD(GOBJ *gobj, int show);
67void LCancel_Init(LCancelData *event_data);
68void Barrel_Think(LCancelData *event_data);
69void Barrel_Toggle(GOBJ *menu_gobj, int value);
70GOBJ *Barrel_Spawn(int pos_kind);
71int Barrel_OnHurt(GOBJ *barrel_gobj);
72int Barrel_OnDestroy(GOBJ *barrel_gobj);
73void Barrel_Null(void);
74void Event_Exit(GOBJ *menu);
75bool IsAerialLandingState(int state_id);
76bool IsEdgeCancelState(int state_id);
77bool IsAutoCancelLanding(FighterData *hmn_data);