fork/training-mode-ce
git clone https://git.julia.blue/fork/training-mode-ce
2c08d3a
nix
1# To be inserted @ 802662D0 2.include "../../Globals.s" 3.include "../Header.s" 4 5.set REG_TextGObj , 31 6.set REG_TextProperties , 30 7 8NTSC102 : 9.set Injection , 0x802662D0 10.set Text_CreateTextGObj , 0x803a6754 11.set Text_InitializeSubtext , 0x803a6b98 12.set Text_UpdateSubtextSize , 0x803a7548 13 14backup 15 16# GET PROPERTIES TABLE 17bl TEXTPROPERTIES 18mflr REG_TextProperties 19 20######################## 21## Create Text Object ## 22######################## 23 24# CREATE TEXT OBJECT, RETURN POINTER TO STRUCT IN r3 25li r3 , 0 26li r4 , 0 27branchl r14 , Text_CreateTextGObj 28 29# BACKUP STRUCT POINTER 30mr REG_TextGObj , r3 31 32# SET TEXT SPACING TO TIGHT 33li r4 , 0x1 34stb r4 , 0x49 ( REG_TextGObj ) 35 36# SET TEXT TO CENTER AROUND X LOCATION 37li r4 , 0x1 38stb r4 , 0x4A ( REG_TextGObj ) 39 40# Scale Canvas Down 41lfs f1 , 0xC ( REG_TextProperties ) 42stfs f1 , 0x24 ( REG_TextGObj ) 43stfs f1 , 0x28 ( REG_TextGObj ) 44 45#################################### 46## INITIALIZE PROPERTIES AND TEXT ## 47#################################### 48 49# Initialize Line of Text 50mr r3 , REG_TextGObj # struct pointer 51bl TEXT 52mflr r4 # pointer to ASCII 53lfs f1 , 0x0 ( REG_TextProperties ) # X offset of REG_TextGObj 54lfs f2 , 0x4 ( REG_TextProperties ) # Y offset of REG_TextGObj 55branchl r14 , Text_InitializeSubtext 56 57# Set Size/Scaling 58mr r4 , r3 59mr r3 , REG_TextGObj 60lfs f1 , 0x8 ( REG_TextProperties ) # get REG_TextGObj scaling value from table 61lfs f2 , 0x8 ( REG_TextProperties ) # get REG_TextGObj scaling value from table 62branchl r12 , Text_UpdateSubtextSize 63 64b end 65 66# **************************************************# 67TEXTPROPERTIES : 68blrl 69.float 38 # x offset 70.float -275 # y offset 71.float 0.45 # REG_TextGObj scaling 72.float 0.1 # canvas scaling 73 74TEXT : 75blrl 76.string "UCF 0.84" 77.align 2 78 79# **************************************************# 80end : 81restore 82 83addi r4 , r24 , 0