Skip to content

Commit 558d78a

Browse files
committed
Rename ZOOM variable to INPUTZOOM for future introduction of OUTPUTZOOM
1 parent 739f66d commit 558d78a

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

cccp-bender-main.bmx

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ Type TAppOutput
245245
Global sourceImage:TImage
246246
Global boneImage:TImage[BONES]
247247
'Output Settings
248-
Global ZOOM:Int = 1
248+
Global INPUTZOOM:Int = 1
249249
Global FRAMES:Int = 7
250250
Global BACKGROUND_RED:Int = 50
251251
Global BACKGROUND_GREEN:Int = 170
@@ -285,7 +285,7 @@ Type TAppOutput
285285
jointX[i] = TILESIZE/2
286286
jointY[i] = TILESIZE/3.3 '3.6
287287
boneLength[i] = (TILESIZE/2-jointY[i])*2
288-
SetImageHandle(boneImage[i],jointX[i]/ZOOM,jointY[i]/ZOOM)
288+
SetImageHandle(boneImage[i],jointX[i]/INPUTZOOM,jointY[i]/INPUTZOOM)
289289
Next
290290
EndFunction
291291

@@ -298,7 +298,7 @@ Type TAppOutput
298298
jointX[b] = TILESIZE/2 'X is always at center, so kinda pointless to even bother - at the moment
299299
jointY[b] = ym 'Determines length
300300
boneLength[b] = (TILESIZE/2 -ym)*2
301-
SetImageHandle(boneImage[b],jointX[b]/ZOOM,jointY[b]/ZOOM) 'Rotation handle.
301+
SetImageHandle(boneImage[b],jointX[b]/INPUTZOOM,jointY[b]/INPUTZOOM) 'Rotation handle.
302302
EndIf
303303
EndFunction
304304

@@ -313,8 +313,8 @@ Type TAppOutput
313313
b = l*2
314314
x = (f * 32) + 80 'Drawing position X
315315
y = ((l * 32) * 1.5 ) + 144 'Drawing position Y
316-
upperLength = boneLength[b]/ZOOM
317-
lowerLength = boneLength[b+1]/ZOOM
316+
upperLength = boneLength[b]/INPUTZOOM
317+
lowerLength = boneLength[b+1]/INPUTZOOM
318318
airLength = (stepSize * f + minExtend) * (upperLength + lowerLength) 'Sum of the two bones * step scaler for frame (hip-ankle)
319319
FLawOfCosines(airLength,upperLength,lowerLength)
320320
angle[b,f] = angB
@@ -334,12 +334,12 @@ Type TAppOutput
334334
SetRotation(0)
335335
SetColor(0,0,80)
336336
x:+1 y:+1 'Add a shade for clarity on bright colours
337-
DrawLine(x-1-ZOOM,y,x+1+ZOOM,y)
338-
DrawLine(x,y-1-ZOOM,x,y+1+ZOOM)
337+
DrawLine(x-1-INPUTZOOM,y,x+1+INPUTZOOM,y)
338+
DrawLine(x,y-1-INPUTZOOM,x,y+1+INPUTZOOM)
339339
x:-1 y:-1 'Cross
340340
SetColor(255,230,80)
341-
DrawLine(x-1-ZOOM,y,x+1+ZOOM,y)
342-
DrawLine(x,y-1-ZOOM,x,y+1+ZOOM)
341+
DrawLine(x-1-INPUTZOOM,y,x+1+INPUTZOOM,y)
342+
DrawLine(x,y-1-INPUTZOOM,x,y+1+INPUTZOOM)
343343
SetColor(255,255,255)
344344
End Function
345345

@@ -360,7 +360,7 @@ Type TAppOutput
360360
EndIf
361361
'Draw source image
362362
SetColor(255,255,255)
363-
DrawImageRect(sourceImage,0,0,ImageWidth(sourceImage)*ZOOM,ImageHeight(sourceImage)*ZOOM)
363+
DrawImageRect(sourceImage,0,0,ImageWidth(sourceImage)*INPUTZOOM,ImageHeight(sourceImage)*INPUTZOOM)
364364
If redoLimbTiles Then
365365
FCreateLimbTiles()
366366
redoLimbTiles = False
@@ -382,14 +382,14 @@ Type TAppOutput
382382
SetColor(255,255,255)
383383
For f = 0 To FRAMES-1
384384
'These might be in a specific draw-order for joint overlapping purposes
385-
b = 0 SetRotation(angle[b,f]) DrawImageRect(boneImage[b],xBone[b,f],yBone[b,f],ImageWidth(boneImage[b])/ZOOM,ImageHeight(boneImage[b])/ZOOM)
386-
b = 1 SetRotation(angle[b,f]) DrawImageRect(boneImage[b],xBone[b,f],yBone[b,f],ImageWidth(boneImage[b])/ZOOM,ImageHeight(boneImage[b])/ZOOM)
387-
b = 2 SetRotation(angle[b,f]) DrawImageRect(boneImage[b],xBone[b,f],yBone[b,f],ImageWidth(boneImage[b])/ZOOM,ImageHeight(boneImage[b])/ZOOM)
388-
b = 3 SetRotation(angle[b,f]) DrawImageRect(boneImage[b],xBone[b,f],yBone[b,f],ImageWidth(boneImage[b])/ZOOM,ImageHeight(boneImage[b])/ZOOM)
389-
b = 4 SetRotation(angle[b,f]) DrawImageRect(boneImage[b],xBone[b,f],yBone[b,f],ImageWidth(boneImage[b])/ZOOM,ImageHeight(boneImage[b])/ZOOM)
390-
b = 5 SetRotation(angle[b,f]) DrawImageRect(boneImage[b],xBone[b,f],yBone[b,f],ImageWidth(boneImage[b])/ZOOM,ImageHeight(boneImage[b])/ZOOM)
391-
b = 6 SetRotation(angle[b,f]) DrawImageRect(boneImage[b],xBone[b,f],yBone[b,f],ImageWidth(boneImage[b])/ZOOM,ImageHeight(boneImage[b])/ZOOM)
392-
b = 7 SetRotation(angle[b,f]) DrawImageRect(boneImage[b],xBone[b,f],yBone[b,f],ImageWidth(boneImage[b])/ZOOM,ImageHeight(boneImage[b])/ZOOM)
385+
b = 0 SetRotation(angle[b,f]) DrawImageRect(boneImage[b],xBone[b,f],yBone[b,f],ImageWidth(boneImage[b])/INPUTZOOM,ImageHeight(boneImage[b])/INPUTZOOM)
386+
b = 1 SetRotation(angle[b,f]) DrawImageRect(boneImage[b],xBone[b,f],yBone[b,f],ImageWidth(boneImage[b])/INPUTZOOM,ImageHeight(boneImage[b])/INPUTZOOM)
387+
b = 2 SetRotation(angle[b,f]) DrawImageRect(boneImage[b],xBone[b,f],yBone[b,f],ImageWidth(boneImage[b])/INPUTZOOM,ImageHeight(boneImage[b])/INPUTZOOM)
388+
b = 3 SetRotation(angle[b,f]) DrawImageRect(boneImage[b],xBone[b,f],yBone[b,f],ImageWidth(boneImage[b])/INPUTZOOM,ImageHeight(boneImage[b])/INPUTZOOM)
389+
b = 4 SetRotation(angle[b,f]) DrawImageRect(boneImage[b],xBone[b,f],yBone[b,f],ImageWidth(boneImage[b])/INPUTZOOM,ImageHeight(boneImage[b])/INPUTZOOM)
390+
b = 5 SetRotation(angle[b,f]) DrawImageRect(boneImage[b],xBone[b,f],yBone[b,f],ImageWidth(boneImage[b])/INPUTZOOM,ImageHeight(boneImage[b])/INPUTZOOM)
391+
b = 6 SetRotation(angle[b,f]) DrawImageRect(boneImage[b],xBone[b,f],yBone[b,f],ImageWidth(boneImage[b])/INPUTZOOM,ImageHeight(boneImage[b])/INPUTZOOM)
392+
b = 7 SetRotation(angle[b,f]) DrawImageRect(boneImage[b],xBone[b,f],yBone[b,f],ImageWidth(boneImage[b])/INPUTZOOM,ImageHeight(boneImage[b])/INPUTZOOM)
393393
Next
394394
SetRotation(0)
395395
'Output copy for saving
@@ -413,7 +413,7 @@ Type TAppOutput
413413
SetClsColor(BACKGROUND_RED,BACKGROUND_GREEN,BACKGROUND_BLUE)
414414
SetMaskColor(255,0,255)
415415
DrawImage(logoImage,0,480-ImageHeight(logoImage))
416-
DrawImageRect(sourceImage,0,0,ImageWidth(sourceImage)*ZOOM,ImageHeight(sourceImage)*ZOOM)
416+
DrawImageRect(sourceImage,0,0,ImageWidth(sourceImage)*INPUTZOOM,ImageHeight(sourceImage)*INPUTZOOM)
417417
FCreateLimbTiles()
418418
FLimbBend()
419419
FOutputUpdate()
@@ -517,7 +517,7 @@ Type TAppGUI
517517
editSettingsIndexedCheckbox = CreateButton("",140,73,20,20,editSettingsPanel,BUTTON_CHECKBOX)
518518
editHelpPanel = CreatePanel(10,203,280,250,editWindow,PANEL_GROUP," Help : ")
519519
editHelpTextbox = CreateTextArea(7,5,GadgetWidth(editHelpPanel)-21,GadgetHeight(editHelpPanel)-32,editHelpPanel,TEXTAREA_WORDWRAP|TEXTAREA_READONLY)
520-
SetGadgetText(editSettingsZoomTextbox,TAppOutput.ZOOM)
520+
SetGadgetText(editSettingsZoomTextbox,TAppOutput.INPUTZOOM)
521521
SetGadgetText(editSettingsFramesTextbox,TAppOutput.FRAMES)
522522
SetGadgetText(editSettingsColorRTextbox,TAppOutput.BACKGROUND_RED)
523523
SetGadgetText(editSettingsColorGTextbox,TAppOutput.BACKGROUND_GREEN)
@@ -633,14 +633,14 @@ While True
633633
Local userInputValue:Int = GadgetText(TAppGUI.editSettingsZoomTextbox).ToInt()
634634
'Foolproofing
635635
If userInputValue > 4 Then
636-
TAppOutput.ZOOM = 4
636+
TAppOutput.INPUTZOOM = 4
637637
ElseIf userInputValue <= 0 Then
638-
TAppOutput.ZOOM = 1
638+
TAppOutput.INPUTZOOM = 1
639639
Else
640-
TAppOutput.ZOOM = userInputValue
640+
TAppOutput.INPUTZOOM = userInputValue
641641
EndIf
642-
SetGadgetText(TAppGUI.editSettingsZoomTextbox,TAppOutput.ZOOM)
643-
TAppOutput.TILESIZE = 24 * TAppOutput.ZOOM
642+
SetGadgetText(TAppGUI.editSettingsZoomTextbox,TAppOutput.INPUTZOOM)
643+
TAppOutput.TILESIZE = 24 * TAppOutput.INPUTZOOM
644644
TAppOutput.redoLimbTiles = True
645645
TAppOutput.FOutputUpdate()
646646
'Frames

0 commit comments

Comments
 (0)