fork/training-mode-ce

git clone https://git.julia.blue/fork/training-mode-ce

AitchMerge pull request #243 from NickCondron/remove-asmf9241ee

techchase-camera
2.1 KiB96 linesraw
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
9    backup
10
11########################
12## Create Text Object ##
13########################
14
15    # Backup r3
16    mr originalRegister, r3
17
18    # CREATE TEXT OBJECT, RETURN POINTER TO STRUCT IN r3
19    li r3, 0
20    li r4, 1
21    branchl r12, Text_CreateTextStruct
22
23    # BACKUP STRUCT POINTER
24    mr text, r3
25
26    # STORE POINTER
27    stw text, -0x4EB4(r13)
28
29    # SET TEXT SPACING TO TIGHT
30    li r4, 0x1
31    stb r4, 0x49(text)
32
33    # SET TEXT TO CENTER AROUND X LOCATION
34    li r4, 0x1
35    stb r4, 0x4A(text)
36
37    # GET PROPERTIES TABLE
38    bl TEXTPROPERTIES
39    mflr textproperties
40
41    # Store Base Z Offset
42    lfs f1, ZPos(textproperties)    # Z offset
43    stfs f1, 0x8(text)
44
45    # Scale Canvas Down
46    lfs f1, CanvasScaling(textproperties)
47    stfs f1, 0x24(text)
48    stfs f1, 0x28(text)
49
50#######################
51## Version Indicator ##
52#######################
53
54    # Initialize Subtext
55    lfs f1, XPos(textproperties)    # X offset of text
56    lfs f2, YPos(textproperties)    # Y offset of text
57    mr r3, text                     # struct pointer
58    bl Text
59    mflr r4
60    branchl r12, Text_InitializeSubtext
61    # Change scale
62    mr r4, r3
63    mr r3, text
64    lfs f1, TextScale(textproperties)
65    lfs f2, TextScale(textproperties)
66    branchl r12, Text_UpdateSubtextSize
67
68    b end
69
70# **************************************************#
71TEXTPROPERTIES:
72    blrl
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:
88    blrl
89    .string "L = OSD"
90    .align 2
91
92# **************************************************#
93end:
94    mr r3, originalRegister
95    restore
96    lmw r14, 0x00E0(sp)