Skip to content

Commit 7f79410

Browse files
committed
Minor cleanup in If statements
1 parent d177675 commit 7f79410

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

types/FileIO.bmx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Type FileIO
4949

5050
Method SetSaveAsIndexed(indexedOrNot:Int)
5151
m_SaveAsIndexed = indexedOrNot
52-
If m_SaveAsIndexed = True Then
52+
If m_SaveAsIndexed Then
5353
m_FileFilters = "Image Files:bmp"
5454
Else
5555
m_FileFilters = "Image Files:png"
@@ -62,7 +62,7 @@ Type FileIO
6262
Local filename:String = RequestFile("Save graphic output", m_FileFilters, True)
6363
If CheckValidExportFileName(filename) Then
6464
Local saveSuccess:Int = True
65-
If m_SaveAsIndexed = True Then
65+
If m_SaveAsIndexed Then
6666
saveSuccess = m_IndexedImageWriter.WriteIndexedBitmapFromPixmap(pixmapToSave, filename)
6767
'saveSuccess = m_IndexedImageWriter.WriteIndexedPNGFromPixmap(pixmapToSave, filename)
6868
Else
@@ -101,7 +101,7 @@ Type FileIO
101101
EndIf
102102

103103
Local saveSuccess:Int = True
104-
If m_SaveAsIndexed = True Then
104+
If m_SaveAsIndexed Then
105105
saveSuccess = m_IndexedImageWriter.WriteIndexedBitmapFromPixmap(pixmapToSave[row, frame], fullFilename + ".bmp")
106106
'saveSuccess = m_IndexedImageWriter.WriteIndexedPNGFromPixmap(pixmapToSave[row, frame], fullFilename + ".png")
107107
Else

types/GraphicsOutput.bmx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Type GraphicsOutput
8888
'Left mouse to adjust joint markers, click or hold and drag
8989
If MouseDown(1) Then
9090
Local mousePos:SVec2I = New SVec2I(MouseX(), MouseY())
91-
If Utility.PointIsWithinBox(mousePos, New SVec2I(0, 0), m_SourceImageSize * m_InputZoom) = True Then
91+
If Utility.PointIsWithinBox(mousePos, New SVec2I(0, 0), m_SourceImageSize * m_InputZoom) Then
9292
m_LimbManager.SetJointMarker(mousePos)
9393
EndIf
9494
EndIf
@@ -120,7 +120,7 @@ Type GraphicsOutput
120120
Utility.DrawTextWithShadow("Leg FG", New SVec2I(10, vertOffsetFromSource + (48 * 2)), drawColor)
121121
Utility.DrawTextWithShadow("Leg BG", New SVec2I(10, vertOffsetFromSource + (48 * 3)), drawColor)
122122

123-
If m_DrawOutputFrameBounds = True Then
123+
If m_DrawOutputFrameBounds Then
124124
For Local row:Int = 0 To 3
125125
For Local frame:Int = 0 To m_FrameCount - 1
126126
Local tile:TImage = LoadImage("Incbin::Assets/Tile")

types/JointMarker.bmx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Type JointMarker
7979
DrawLine(m_PosOnCanvasX - m_Radius + shadowOffset, m_PosOnCanvasY + shadowOffset, m_PosOnCanvasX + m_Radius + shadowOffset, m_PosOnCanvasY + shadowOffset, True)
8080
DrawLine(m_PosOnCanvasX + shadowOffset, m_PosOnCanvasY - m_Radius + shadowOffset, m_PosOnCanvasX + shadowOffset, m_PosOnCanvasY + m_Radius + shadowOffset, True)
8181

82-
If m_Selected = True Then
82+
If m_Selected Then
8383
SetColor(50, 255, 0)
8484
Else
8585
SetColor(255, 230, 80)

types/LimbManager.bmx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Type LimbManager
7171
Local selectedMarker:Int = -1
7272

7373
For Local part:Int = 0 Until c_LimbPartCount
74-
If Utility.PointIsWithinBox(mousePos, New SVec2I(part * (m_TileSize), 0), New SVec2I(m_TileSize, m_TileSize)) = True Then
74+
If Utility.PointIsWithinBox(mousePos, New SVec2I(part * (m_TileSize), 0), New SVec2I(m_TileSize, m_TileSize)) Then
7575
selectedPart = part
7676
Exit
7777
EndIf
@@ -80,9 +80,9 @@ Type LimbManager
8080
If selectedPart = -1 Then
8181
Return
8282
Else
83-
If Utility.PointIsWithinBox(mousePos, New SVec2I(selectedPart * m_TileSize, 0), New SVec2I(m_TileSize, (m_TileSize / 2) - m_InputZoom)) = True Then
83+
If Utility.PointIsWithinBox(mousePos, New SVec2I(selectedPart * m_TileSize, 0), New SVec2I(m_TileSize, (m_TileSize / 2) - m_InputZoom)) Then
8484
selectedMarker = 0
85-
ElseIf Utility.PointIsWithinBox(mousePos, New SVec2I(selectedPart * m_TileSize, (m_TileSize / 2) + m_InputZoom), New SVec2I(m_TileSize, (m_TileSize / 2) - m_InputZoom)) = True Then
85+
ElseIf Utility.PointIsWithinBox(mousePos, New SVec2I(selectedPart * m_TileSize, (m_TileSize / 2) + m_InputZoom), New SVec2I(m_TileSize, (m_TileSize / 2) - m_InputZoom)) Then
8686
selectedMarker = 1
8787
Else
8888
FlushMouse() 'Reset mouse input so markers don't snap when leaving vertical bounds and entering bounds of another marker

0 commit comments

Comments
 (0)