You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Local maxExtend:Float=0.99'Possibly make definable in settings (slider) -- maybe not, because large number of frames can be rendered and you can just take the ones you need
166
-
Local minExtend:Float=0.30'Possibly make definable in settings (slider) -- maybe not, because large number of frames can be rendered and you can just take the ones you need
166
+
Local maxExtend:Float=0.99'Possibly make definable in settings (slider)
167
+
Local minExtend:Float=0.30'Possibly make definable in settings (slider)
167
168
Local stepSize:Float= (maxExtend-minExtend)/(FRAMES-1) ' -1 to make inclusive of last value (full range)
168
169
Local b:Int, f:Int, l:Float, x:Float, y:Float, airLength:Float, upperLength:Float, lowerLength:Float
169
170
For l =0To LIMBS-1
170
171
For f =0To FRAMES-1
171
172
b = l*2
172
173
x = (f * 32) +80'Drawing position X
173
174
y = ((l * 32) * 1.5 ) +144'Drawing position Y
174
-
upperLength = boneLength[b]/ZOOM'e.g. upper leg
175
-
lowerLength = boneLength[b+1]/ZOOM'e.g. lower leg
175
+
upperLength = boneLength[b]/ZOOM
176
+
lowerLength = boneLength[b+1]/ZOOM
176
177
airLength = (stepSize * f + minExtend) * (upperLength + lowerLength) 'Sum of the two bones * step scaler for frame (hip-ankle)
177
178
FLawOfCosines(airLength,upperLength,lowerLength)
178
179
angle[b,f]= angB
@@ -233,8 +234,8 @@ Type TAppOutput
233
234
Next
234
235
'Draw footer image and text
235
236
DrawImage(logoImage,0,480-ImageHeight(logoImage))
236
-
SetColor(255,230,80)
237
-
DrawText("TBA",ImageWidth(logoImage)+7,480-18)
237
+
'SetColor(255,230,80)
238
+
'DrawText("TBA",ImageWidth(logoImage)+7,480-18)
238
239
'Draw bent limbs
239
240
FLimbBend()
240
241
SetColor(255,255,255)
@@ -250,6 +251,8 @@ Type TAppOutput
250
251
b =7 SetRotation(angle[b,f]) DrawImageRect(boneImage[b],xBone[b,f],yBone[b,f],ImageWidth(boneImage[b])/ZOOM,ImageHeight(boneImage[b])/ZOOM)
aboutTextboxContent[0]="Welcome to the CCCP Bender utility!~n~n"
327
-
aboutTextboxContent[1]="It's purpose is to make the life of modders easier by automagically generating bent limb frames.~n~n"
328
-
aboutTextboxContent[2]="The CC Bender was originally created by Arne Jansson (AndroidArts), the man behind all the Cortex Command artwork.~n"
329
-
aboutTextboxContent[3]="The CCCommunityProject Bender, however, is a brand new tool that allows more control and convenience for the modder (hopefully).~n~n"
330
-
aboutTextboxContent[4]="Arne's original bend code was used as base for this utility, and has been modified and improved to enable the new features.~n~n"
331
-
aboutTextboxContent[5]="Created by MaximDude using BlitzMax MaxIDE 1.52~n"
332
-
aboutTextboxContent[6]="Bender logo image by Arne Jansson - Edited by MaximDude"
333
-
aboutTextboxContent[7]="CCCP Bender version "+appVersion+" - "+appVersionDate
aboutTextboxContent[0]="Welcome to the CCCP Bender utility! ~n~n"
336
+
aboutTextboxContent[1]="It's purpose is to make the life of modders easier by automagically generating bent limb frames. ~n~n"
337
+
aboutTextboxContent[2]="The CC Bender was originally created by Arne Jansson (AndroidArts), the man behind all the Cortex Command artwork. ~n"
338
+
aboutTextboxContent[3]="The CCCommunityProject Bender, however, is a brand new tool that allows more control and convenience for the modder (hopefully). ~n~n"
339
+
aboutTextboxContent[4]="Arne's original bend code was used as base for this utility, and has been modified and improved to enable the new features. ~n~n"
340
+
aboutTextboxContent[5]="Created by MaximDude using BlitzMax 0.105.3.35 and MaxIDE 1.52 ~n"
341
+
aboutTextboxContent[6]="Bender logo image by Arne Jansson - Edited by MaximDude ~n"
helpTextboxContent[1]="LOAD: ~nThis loads an image file and starts bending. Supported formats are bmp, png and jpg. ~n~n"
374
+
helpTextboxContent[2]="- Note: ~nThe loaded file is being cut to 24x24px tiles internally. For best results, use provided template to create correct input files. ~n~n"
375
+
helpTextboxContent[3]="SAVE: ~nThis saves the bended limbs into a file or creates a new file with specified name. ~n~n"
376
+
helpTextboxContent[4]="- Note: ~nFiles are saved in .png format, typing in the extension is not needed. Currently loaded file cannot be overwritten. ~n~n"
helpTextboxContent[6]="To adjust the joint positing on a limb part, click the upper joint marker on and drag it up/down, or click at desired point to set it there. Output will update automatically as you adjust the markers.~n~n"
379
+
helpTextboxContent[7]="- Note: Joint markers cannot be adjusted on the X axis, and will adjust equally on the Y axis. For best results, please position the limb parts as close to dead center as possible for each tile in the input file. ~n~n"
helpTextboxContent[9]="ZOOM : ~nThis magnifies the source image For easier placement of joint markers. Zooming does Not magnify the output. ~n~nAccepts values from 1 To 4. ~n~n"
382
+
helpTextboxContent[10]="- Warning : ~nChanging zoom level will reset the joint markers to initial positions. Zoom first, adjust markers later. ~n~n"
383
+
helpTextboxContent[11]="FRAMES: ~nThis sets the amount of frames output will generate. ~n~nAccepts values from 1 to 20. ~n~n"
384
+
helpTextboxContent[12]="- Note : ~nLimb bending will automatically adjust to number of frames. ~n~n"
385
+
helpTextboxContent[13]="BG COLOR R,G,B: ~nThis changes the background color of the output. ~n~nAccepts values from 0 to 255. ~n~n"
386
+
helpTextboxContent[14]="- Note : ~nWhen saving file, the output will automatically set background to magenta, so no manual setting before saving is needed."
0 commit comments