fork/training-mode-ce
git clone https://git.julia.blue/fork/training-mode-ce
f9241ee
techchase-camera
1# To be inserted at 80231618 2.include "../../../Globals.s" 3.include "../../../m-ex/Header.s" 4 5.set text , 31 6.set textproperties , 30 7.set originalRegister , 29 8 9backup 10 11######################## 12## Create Text Object ## 13######################## 14 15# Backup r3 16mr originalRegister , r3 17 18# CREATE TEXT OBJECT, RETURN POINTER TO STRUCT IN r3 19li r3 , 0 20li r4 , 1 21branchl r12 , Text_CreateTextStruct 22 23# BACKUP STRUCT POINTER 24mr text , r3 25 26# STORE POINTER 27stw text , -0x4EB4 ( r13 ) 28 29# SET TEXT SPACING TO TIGHT 30li r4 , 0x1 31stb r4 , 0x49 ( text ) 32 33# SET TEXT TO CENTER AROUND X LOCATION 34li r4 , 0x1 35stb r4 , 0x4A ( text ) 36 37# GET PROPERTIES TABLE 38bl TEXTPROPERTIES 39mflr textproperties 40 41# Store Base Z Offset 42lfs f1 , ZPos ( textproperties ) # Z offset 43stfs f1 , 0x8 ( text ) 44 45# Scale Canvas Down 46lfs f1 , CanvasScaling ( textproperties ) 47stfs f1 , 0x24 ( text ) 48stfs f1 , 0x28 ( text ) 49 50####################### 51## Version Indicator ## 52####################### 53 54# Initialize Subtext 55lfs f1 , XPos ( textproperties ) # X offset of text 56lfs f2 , YPos ( textproperties ) # Y offset of text 57mr r3 , text # struct pointer 58bl Text 59mflr r4 60branchl r12 , Text_InitializeSubtext 61# Change scale 62mr r4 , r3 63mr r3 , text 64lfs f1 , TextScale ( textproperties ) 65lfs f2 , TextScale ( textproperties ) 66branchl r12 , Text_UpdateSubtextSize 67 68b end 69 70# **************************************************# 71TEXTPROPERTIES : 72blrl 73.set XPos , 0x0 74.set YPos , 0x4 75.set ZPos , 0x8 76.set TextScale , 0xC 77.set CanvasScaling , 0x10 78 79# Version 80.float -250 # text X pos 81.float -241 # text Y pos 82.float 17 # Z offset 83.float 0.8 # text scale 84 85.float 0.035 # Canvas Scaling 86 87Text : 88blrl 89.string "L = OSD" 90.align 2 91 92# **************************************************# 93end : 94mr r3 , originalRegister 95restore 96lmw r14 , 0x00E0 ( sp )