;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; ;; DynKit v2.03 - a sample SCASM code for a dynamic object shape ;; ;; Copyright (C) 1998 by Konstantin Kukushkin. ;; ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; A dynamic scenery brick created with SCASM and DynKit ; We have to cheat by creating a section 9 scenery. DynKit Hangar will ; extract the SDL code and place it into a dynamic library. Header( 1 90 -90 179 -179 ) LatRange( -90 90 ) Area( B 0 0 65 ) ; This macro will set up the proper delta coordinates and also set the ; collision avoidance radius. Here, we use a scale factor of 1m/delta unit ; and a collision avoidance radius of 3 meters. Macro( dkobj.scm 1.0 3 ) ; Here, our code for drawing the object begins. The proper RefPoint and ; orientation has already been established by the macro. ; Define a point list and draw the brick. Points( 0 -1 0 -2 1 0 -2 -1 0 2 1 0 2 -1 1 -2 1 1 -2 -1 1 2 1 1 2 ) SurfaceColor( 29 f0 ) Poly( a 0 1 3 2 ) ; Bottom Poly( a 4 5 7 6 ) ; Top Poly( a 0 2 6 4 ) ; Left Poly( a 1 3 7 5 ) ; Right Poly( a 2 3 7 6 ) ; Front Poly( a 0 1 5 4 ) ; Rear ; Do crash detection. Monitor3D( :no_crash -1 1 0 1 -2 2 ) ; We do NOT use SetVar, because it would effect variables local to the object. ; SetVar7E allows us to set the (global) crash code variable. SetVar7E( 0284 20 ) ; Crash with a dynamic _object_ :no_crash ; A Return is required here. Return EndA