@@ -12,14 +12,17 @@ Type GraphicsOutput
12
12
Field c_Magenta:Int [] = [255 , 0 , 255 ]
13
13
'Graphic Assets
14
14
Field m_SourceImage:TImage
15
- Field m_SourceImageSize:Svec2I
15
+ Field m_SourceImageSize:SVec2I
16
16
'Output Settings
17
17
Field m_InputZoom:Int = g_DefaultInputZoom
18
18
Field m_TileSize:Int = 24 * m_InputZoom
19
19
Field m_FrameCount:Int = g_DefaultFrameCount
20
20
Field m_BackgroundColor:Int [] = [g_DefaultBackgroundRed, g_DefaultBackgroundGreen, g_DefaultBackgroundBlue]
21
21
22
22
Field m_DrawOutputFrameBounds:Int
23
+ Field m_FrameBoundingBoxPosX:Int [c_LimbCount, c_MaxFrameCount]
24
+ Field m_FrameBoundingBoxPosY:Int [c_LimbCount, c_MaxFrameCount]
25
+ Field m_FrameBoundingBoxSize:SVec2I
23
26
24
27
Field m_LimbManager:LimbManager = New LimbManager ()
25
28
@@ -124,22 +127,23 @@ Type GraphicsOutput
124
127
m_LimbManager.DrawTileOutlines()
125
128
m_LimbManager.DrawJointMarkers()
126
129
127
- Local vertOffsetFromSource:Int = (m_SourceImageSize[ 1 ] * m_InputZoom) + 35
130
+ Local vertOffsetFromSource:Int = (m_SourceImageSize[ 1 ] * m_InputZoom) + 34
128
131
m_LimbManager.DrawBentLimbs(New SVec2I (100 , vertOffsetFromSource), m_FrameCount)
129
132
130
133
Local drawColor:Int [] = [ 255 , 230 , 80 ]
131
134
Utility.DrawTextWithShadow(" Arm FG" , New SVec2I (10 , vertOffsetFromSource), drawColor)
132
- Utility.DrawTextWithShadow(" Arm BG" , New SVec2I (10 , vertOffsetFromSource + 48 ), drawColor)
133
- Utility.DrawTextWithShadow(" Leg FG" , New SVec2I (10 , vertOffsetFromSource + (48 * 2 )), drawColor)
134
- Utility.DrawTextWithShadow(" Leg BG" , New SVec2I (10 , vertOffsetFromSource + (48 * 3 )), drawColor)
135
+ Utility.DrawTextWithShadow(" Arm BG" , New SVec2I (10 , vertOffsetFromSource + 50 - 2 ), drawColor)
136
+ Utility.DrawTextWithShadow(" Leg FG" , New SVec2I (10 , vertOffsetFromSource + (50 * 2 ) - 4 ), drawColor)
137
+ Utility.DrawTextWithShadow(" Leg BG" , New SVec2I (10 , vertOffsetFromSource + (50 * 3 ) - 6 ), drawColor)
135
138
136
139
If m_DrawOutputFrameBounds Then
137
- For Local row:Int = 0 To 3
138
- For Local frame:Int = 0 To m_FrameCount - 1
139
- Local tile:TImage = LoadImage(" Incbin::Assets/Tile" )
140
-
141
- 'Doing this with an image because cba doing the math with DrawLine. Offsets are -1px because tile image is 26x26 for outline and tile is 24x24.
142
- DrawImage(tile, 62 + (frame * (m_TileSize / m_InputZoom + 8 )), 138 + (row * 48 ))
140
+ drawColor = [ 0 , 0 , 80 ]
141
+ m_FrameBoundingBoxSize = New SVec2I (32 , 48 )
142
+ For Local row:Int = 0 Until c_LimbCount
143
+ For Local frame:Int = 0 Until m_FrameCount
144
+ m_FrameBoundingBoxPosX[ row, frame] = 100 - 20 + (frame * (m_TileSize / m_InputZoom + 8 ))
145
+ m_FrameBoundingBoxPosY[ row, frame] = vertOffsetFromSource - 12 + (row * 48 )
146
+ Utility.DrawRectOutline(New SVec2I (m_FrameBoundingBoxPosX[ row, frame] , m_FrameBoundingBoxPosY[ row, frame] ), m_FrameBoundingBoxSize, drawColor)
143
147
Next
144
148
Next
145
149
EndIf
0 commit comments