fork/training-mode-ce
git clone https://git.julia.blue/fork/training-mode-ce
f9241ee
techchase-camera
1# To be inserted at 80264504 2.include "../../../Globals.s" 3.include "../../../m-ex/Header.s" 4 5.set text , 31 6.set textProperties , 30 7.set EventName , 29 8 9# r24 = text struct 10# r27 = Event ID 11 12# Ensure this is event mode 13load r3 , SceneController 14lbz r3 , Scene.CurrentMajor ( r3 ) 15cmpwi r3 , Scene.EventMode 16bne Original 17 18# Check For Custom Event 19lwz r3 , MemcardData ( r13 ) 20lbz r3 , CurrentEventPage ( r3 ) 21lwz r4 , MemcardData ( r13 ) 22lbz r4 , 0x0535 ( r4 ) # get event ID 23rtocbl r12 , TM_GetEventName 24 25# Save Text 26mr EventName , r3 27 28# GET PROPERTIES TABLE 29bl TEXTPROPERTIES 30mflr textProperties 31 32######################## 33## Create Text Object ## 34######################## 35 36# CREATE TEXT OBJECT, RETURN POINTER TO STRUCT IN r3 37li r3 , 0 38li r4 , 0 39branchl r12 , Text_CreateTextStruct 40 41# BACKUP STRUCT POINTER 42mr text , r3 43 44# SET TEXT SPACING TO TIGHT 45li r4 , 0x1 46stb r4 , 0x49 ( text ) 47 48# SET TEXT TO CENTER AROUND X LOCATION 49li r4 , 0x1 50stb r4 , 0x4A ( text ) 51 52# Scale Canvas Down 53lfs f1 , 0xC ( textProperties ) 54stfs f1 , 0x24 ( text ) 55stfs f1 , 0x28 ( text ) 56 57#################################### 58## INITIALIZE PROPERTIES AND TEXT ## 59#################################### 60 61# Initialize Line of Text 62mr r3 , text # struct pointer 63mr r4 , EventName # pointer to ASCII 64lfs f1 , 0x0 ( textProperties ) # X offset of text 65lfs f2 , 0x4 ( textProperties ) # Y offset of text 66branchl r12 , Text_InitializeSubtext 67 68# Set Size/Scaling 69mr r4 , r3 70mr r3 , text 71lfs f1 , 0x8 ( textProperties ) # get text scaling value from table 72lfs f2 , 0x8 ( textProperties ) # get text scaling value from table 73branchl r12 , Text_UpdateSubtextSize 74 75b Original 76 77# **************************************************# 78TEXTPROPERTIES : 79blrl 80 81.float 38 # x offset 82.float -245 # y offset 83.float 0.65 # text scaling 84.float 0.1 # canvas scaling 85 86# **************************************************# 87 88VanillaEvent : 89 90Original : 91li r3 , 4