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)
107
-
Local minExtend:Float=0.30'Possibly make definable in settings (slider)
121
+
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
122
+
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
108
123
Local stepSize:Float= (maxExtend-minExtend)/(FRAMES-1) ' -1 to make inclusive of last value (full range)
109
124
Local b:Int, f:Int, l:Float, x:Float, y:Float, airLength:Float, upperLength:Float, lowerLength:Float
110
125
For l =0To LIMBS-1
111
126
For f =0To FRAMES-1
112
127
b = l*2
113
-
x = f * TILESIZE+96
114
-
y = l * TILESIZE * 1.5+200
115
-
upperLength = boneLength[b]'e.g. upper leg
116
-
lowerLength = boneLength[b+1]'e.g. lower leg
128
+
x =(f * 32)+80'Drawing position X
129
+
y =((l * 32) * 1.5) +144'Drawing position Y
130
+
upperLength = boneLength[b]/ZOOM'e.g. upper leg
131
+
lowerLength = boneLength[b+1]/ZOOM 'e.g. lower leg
117
132
airLength = (stepSize * f + minExtend) * (upperLength + lowerLength) 'Sum of the two bones * step scaler for frame (hip-ankle)
118
133
FLawOfCosines(airLength,upperLength,lowerLength)
119
134
angle[b,f]= angB
@@ -127,20 +142,7 @@ Type TAppOutput
127
142
Next
128
143
Next
129
144
EndFunction
130
-
131
-
'Set Joint Marker
132
-
FunctionFSetJointMarker()
133
-
Local xm:Int= MouseX()
134
-
Local ym:Int= MouseY()
135
-
If ym < (TILESIZE/2-2) And ym >0And xm >0And xm < TILESIZE*BONES Then
136
-
Local b:Int= xm/TILESIZE
137
-
jointX[b]= TILESIZE/2'X is always at center, so kinda pointless to even bother - at the moment
'These might be in a specific draw-order for joint overlapping purposes
189
-
b =0 SetRotation(angle[b,f]) DrawImage(boneImage[b],xBone[b,f],yBone[b,f]) 'DrawImageRect(boneImage[b],xBone[b,f],yBone[b,f],ImageWidth(boneImage[b])/ZOOM,ImageHeight(boneImage[b])/ZOOM)
190
-
b =1 SetRotation(angle[b,f]) DrawImage(boneImage[b],xBone[b,f],yBone[b,f])
191
-
b =2 SetRotation(angle[b,f]) DrawImage(boneImage[b],xBone[b,f],yBone[b,f])
192
-
b =3 SetRotation(angle[b,f]) DrawImage(boneImage[b],xBone[b,f],yBone[b,f])
193
-
b =4 SetRotation(angle[b,f]) DrawImage(boneImage[b],xBone[b,f],yBone[b,f])
194
-
b =5 SetRotation(angle[b,f]) DrawImage(boneImage[b],xBone[b,f],yBone[b,f])
195
-
b =6 SetRotation(angle[b,f]) DrawImage(boneImage[b],xBone[b,f],yBone[b,f])
196
-
b =7 SetRotation(angle[b,f]) DrawImage(boneImage[b],xBone[b,f],yBone[b,f])
195
+
b =0 SetRotation(angle[b,f]) DrawImageRect(boneImage[b],xBone[b,f],yBone[b,f],ImageWidth(boneImage[b])/ZOOM,ImageHeight(boneImage[b])/ZOOM)
196
+
b =1 SetRotation(angle[b,f]) DrawImageRect(boneImage[b],xBone[b,f],yBone[b,f],ImageWidth(boneImage[b])/ZOOM,ImageHeight(boneImage[b])/ZOOM)
197
+
b =2 SetRotation(angle[b,f]) DrawImageRect(boneImage[b],xBone[b,f],yBone[b,f],ImageWidth(boneImage[b])/ZOOM,ImageHeight(boneImage[b])/ZOOM)
198
+
b =3 SetRotation(angle[b,f]) DrawImageRect(boneImage[b],xBone[b,f],yBone[b,f],ImageWidth(boneImage[b])/ZOOM,ImageHeight(boneImage[b])/ZOOM)
199
+
b =4 SetRotation(angle[b,f]) DrawImageRect(boneImage[b],xBone[b,f],yBone[b,f],ImageWidth(boneImage[b])/ZOOM,ImageHeight(boneImage[b])/ZOOM)
200
+
b =5 SetRotation(angle[b,f]) DrawImageRect(boneImage[b],xBone[b,f],yBone[b,f],ImageWidth(boneImage[b])/ZOOM,ImageHeight(boneImage[b])/ZOOM)
201
+
b =6 SetRotation(angle[b,f]) DrawImageRect(boneImage[b],xBone[b,f],yBone[b,f],ImageWidth(boneImage[b])/ZOOM,ImageHeight(boneImage[b])/ZOOM)
202
+
b =7 SetRotation(angle[b,f]) DrawImageRect(boneImage[b],xBone[b,f],yBone[b,f],ImageWidth(boneImage[b])/ZOOM,ImageHeight(boneImage[b])/ZOOM)
0 commit comments