06-28-2003, 05:52 PM
http://lithium.zext.net/crap/test.zip
press 1-4 to animate the corrisponding arm
It's QB/C mix.. uses UGL.. I spent all last night working on it.. the sad thing is, I spent < 1 hour coding, and like 7 hours debugging.. ah... (/me sux)
here's what the code on QB side for the demo looks like:
here are the functon protos:
press 1-4 to animate the corrisponding arm
It's QB/C mix.. uses UGL.. I spent all last night working on it.. the sad thing is, I spent < 1 hour coding, and like 7 hours debugging.. ah... (/me sux)
here's what the code on QB side for the demo looks like:
Code:
dim ArmAnim(0 to 3) as long, ManAnim as long
for i = 0 to 3
ArmAnim(i) = AnimNew&(Set(0))
next
ManAnim = AnimNew&(Set(1))
AnimSwitch ManAnim, 0, 0, AF.LOOP
while len(inkey$): wend
do
a = (curtime/100 * 45) mod 360
z! = abs(sin(curtime/100))
for i = 0 to 3
AnimUpdate ArmAnim(i)
next
AnimUpdate ManAnim
z2! = sin(curtime/100) * .1
DrawAnim e.back, ArmAnim(0), 80, 50, 0, .5
DrawAnim e.back, ArmAnim(1), 320-80, 50, 0, .5
DrawAnim e.back, ArmAnim(2), 80, 150, 0, .5
DrawAnim e.back, ArmAnim(3), 320-80, 150, 0, .5
DrawAnim e.back, ManAnim, 160, 100, a, .8*z!
wait &h3da, 8
uglPut e.video, 0, 0, e.back
uglClear e.back, uglColor(e.fmt, 0, 0, 0)
k$ = inkey$
if val(k$) >= 1 and val(k$) <= 4 then AnimSwitch ArmAnim(val(k$)-1), 0, 100, AF.DEFAULT
loop until k$ = chr$(27)
for i = 0 to 3
AnimDelete ArmAnim(i)
next
AnimDelete ManAnim
here are the functon protos:
Code:
' Memory Routines
declare function fpalloc& ( byval bytes as long )
declare sub fpfree ( seg what as long )
declare sub fpfreeall ( )
' Set Routines
declare function SetNew& ( filename as string, byval fmt as integer )
declare sub SetDelete ( seg theSet as long )
declare sub SetWalkNodes ( byval theSet as long, byval firstnode as integer )
declare function SetModel& ( byval theSet as long, byval model as integer )
declare function SetObject& ( byval theSet as long )
' Draw Routines
declare sub DrawModel ( byval dc as long, byval m as long, byval x as integer, byval y as integer, byval a as integer, byval hf as integer, byval vf as integer, byval z as single )
declare sub DrawObject ( byval dc as long, byval o as long, byval theSet as long, byval node as integer, byval x as single, byval y as single, byval a as integer, byval z as single )
declare sub DrawAnim ( byval dc as long, byval animState as long, byval x as integer, byval y as integer, byval a as integer, byval z as single )
' Animation Routines
declare function AnimNew& ( byval theSet as long )
declare sub AnimDelete ( seg animState as long )
declare sub AnimUpdate ( byval animState as long )
declare sub AnimSwitch ( byval animState as long, byval animNo as integer, byval transtime as integer, byval flags as integer )
' Other Routines
declare function curtime& ( )
COUNT HACKED BY RAZVEEE
RAZVEE IS A SCRIPT KIDDIE- hacker9
RAZVEE IS A SCRIPT KIDDIE- hacker9