fork/training-mode-ce
git clone https://git.julia.blue/fork/training-mode-ce
96edbd1
techchase-camera
1# To be inserted at 8008f71c 2.include "../../../Globals.s" 3.include "../../../m-ex/Header.s" 4 5.set entity , 31 6.set playerdata , 31 7.set player , 30 8.set text , 29 9.set textprop , 28 10.set hitbool , 27 11 12########################################################## 13## 804a1f5c -> 804a1fd4 = Static Stock Icon Text Struct ## 14## Is 0x80 long and is zero'd at the start ## 15## of every VS Match ## 16## Store Text Info here ## 17########################################################## 18 19# Get Victims Data 20lwz r6 , 0x2C ( r31 ) 21# Get Attacker GObj 22lwz r5 , 0x1868 ( r6 ) 23# If Pointer doesn't exist, its most likely environmental damage (break the targets walls) 24cmpwi r5 , 0x0 25beq ResetSDICount 26# Check if Player 27lhz r0 , 0 ( r5 ) # Entity Type 28lwz r5 , 0x2C ( r5 ) # Get Attacker Data 29cmpwi r0 , 4 # Player 30beq LastPlayerMove 31cmpwi r0 , 6 # Item 32beq LastItemMove 33b exit # If neither , exit 34 35LastPlayerMove : 36# Get current Move Instance from attacker 37lhz r4 , 0x2088 ( r5 ) 38b GetLastMoveVictimHitBy 39 40LastItemMove : 41# Get current Move Instance from attacker 42lhz r4 , 0xDA8 ( r5 ) 43 44GetLastMoveVictimHitBy : 45# Get last Move Instance Victim was hit by 46lhz r3 , TM_PreviousMoveInstanceHitBy ( r6 ) 47 48# If the move instance is 0, was most likely a stage element (corneria lasers) 49cmpwi r4 , 0 50beq ResetSDICount 51 52# Check If New Hit 53cmpw r3 , r4 54beq exit 55 56# Reset SDI Counter 57ResetSDICount : 58li r0 , 0x0 59sth r0 , TM_SuccessfulSDIInputs ( r6 ) 60sth r0 , TM_TotalSDIInputs ( r6 ) 61 62exit : 63cmpwi r30 , 0