fork/training-mode-ce
git clone https://git.julia.blue/fork/training-mode-ce
85340bc
techchase-camera
1#include "../MexTK/mex.h" 2#include "events.h" 3 4typedef struct LCancelData LCancelData ; 5typedef struct LCancelAssets LCancelAssets ; 6 7struct LCancelData 8{ 9EventDesc * event_desc ; 10LCancelAssets * lcancel_assets ; 11GOBJ * barrel_gobj ; 12Vec3 barrel_lastpos ; 13int barrel_intangible_timer ;// frame counter for intangible cycles (0-119) 14bool is_fail ;// status of the last l-cancel 15bool is_fastfall ;// bool used to detect fastfall frame 16u8 fastfall_frame ;// frame the player fastfell on 17u8 current_l_input_timing ;// number of frames an L was input before the current aerial landing 18bool is_current_aerial_counted ;// whether or not the current aerial has already been tracked as a success or failure 19struct 20 { 21GOBJ * gobj ; 22u16 lcl_success ; 23u16 lcl_total ; 24Text * text_time ; 25Text * text_air ; 26Text * text_scs ; 27int canvas ; 28float arrow_base_x ;// starting X position of arrow 29float arrow_prevpos ; 30float arrow_nextpos ; 31int arrow_timer ; 32 }hud ; 33struct 34 { 35u8 shield_isdisp ;// whether tip has been shown to the player 36u8 shield_num ;// number of times condition has been met 37u8 hitbox_active ;// whether or not the last aerial used had a hitbox active 38u8 hitbox_isdisp ;// whether tip has been shown to the player 39u8 hitbox_num ;// number of times condition has been met 40u8 fastfall_active ;// whether or not the last aerial used had a hitbox active 41u8 fastfall_isdisp ;// whether tip has been shown to the player 42u8 fastfall_num ;// number of times condition has been met 43u8 late_isdisp ;// whether tip has been shown to the player 44u8 late_num ;// number of times condition has been met 45 }tip ; 46}; 47 48struct LCancelAssets 49{ 50JOBJDesc * hud ; 51void ** 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 );