;;-*-Lisp-*- (in-package goal) ;; definition of type collide-sticky-rider (deftype collide-sticky-rider (structure) ((rider-handle handle) (sticky-prim collide-shape-prim) (prim-ry float) (rider-local-pos vector :inline) ) (:methods (set-rider! (_type_ handle) symbol) ) ) ;; definition for method 3 of type collide-sticky-rider (defmethod inspect ((this collide-sticky-rider)) (format #t "[~8x] ~A~%" this 'collide-sticky-rider) (format #t "~Trider-handle: ~D~%" (-> this rider-handle)) (format #t "~Tsticky-prim: ~A~%" (-> this sticky-prim)) (format #t "~Tprim-ry: ~f~%" (-> this prim-ry)) (format #t "~Trider-local-pos: #~%" (-> this rider-local-pos)) this ) ;; definition for method 9 of type collide-sticky-rider (defmethod set-rider! ((this collide-sticky-rider) (arg0 handle)) (set! (-> this rider-handle) arg0) (set! (-> this sticky-prim) #f) #f ) ;; definition of type collide-sticky-rider-group (deftype collide-sticky-rider-group (basic) ((num-riders int32) (allocated-riders int32) (rider collide-sticky-rider 1 :inline) ) (:methods (new (symbol type int) _type_) (add-rider! (_type_ process-drawable) collide-sticky-rider) (reset! (_type_) int) ) ) ;; definition for method 3 of type collide-sticky-rider-group (defmethod inspect ((this collide-sticky-rider-group)) (format #t "[~8x] ~A~%" this (-> this type)) (format #t "~Tnum-riders: ~D~%" (-> this num-riders)) (format #t "~Tallocated-riders: ~D~%" (-> this allocated-riders)) (format #t "~Trider[1] @ #x~X~%" (-> this rider)) this ) ;; definition for method 10 of type collide-sticky-rider-group (defmethod reset! ((this collide-sticky-rider-group)) (set! (-> this num-riders) 0) 0 ) ;; definition of type pull-rider-info (deftype pull-rider-info (structure) ((rider collide-sticky-rider) (rider-cshape collide-shape-moving) (rider-delta-ry float) (rider-dest vector :inline) ) ) ;; definition for method 3 of type pull-rider-info (defmethod inspect ((this pull-rider-info)) (format #t "[~8x] ~A~%" this 'pull-rider-info) (format #t "~Trider: #~%" (-> this rider)) (format #t "~Trider-cshape: ~A~%" (-> this rider-cshape)) (format #t "~Trider-delta-ry: ~f~%" (-> this rider-delta-ry)) (format #t "~Trider-dest: #~%" (-> this rider-dest)) this ) ;; definition of type collide-shape-intersect (deftype collide-shape-intersect (basic) ((move-vec vector :inline) (best-u float) (best-tri collide-tri-result :inline) (best-from-prim collide-shape-prim) (best-to-prim collide-shape-prim) ) (:methods (init! (_type_ vector) symbol) ) ) ;; definition for method 3 of type collide-shape-intersect (defmethod inspect ((this collide-shape-intersect)) (format #t "[~8x] ~A~%" this (-> this type)) (format #t "~Tmove-vec: ~`vector`P~%" (-> this move-vec)) (format #t "~Tbest-u: ~f~%" (-> this best-u)) (format #t "~Tbest-tri: #~%" (-> this best-tri)) (format #t "~Tbest-from-prim: ~A~%" (-> this best-from-prim)) (format #t "~Tbest-to-prim: ~A~%" (-> this best-to-prim)) this ) ;; definition of type collide-overlap-result (deftype collide-overlap-result (structure) ((best-dist float) (best-from-prim collide-shape-prim) (best-to-prim collide-shape-prim) (best-from-tri collide-tri-result :inline) ) (:methods (reset! (_type_) none) ) ) ;; definition for method 3 of type collide-overlap-result (defmethod inspect ((this collide-overlap-result)) (format #t "[~8x] ~A~%" this 'collide-overlap-result) (format #t "~Tbest-dist: ~f~%" (-> this best-dist)) (format #t "~Tbest-from-prim: ~A~%" (-> this best-from-prim)) (format #t "~Tbest-to-prim: ~A~%" (-> this best-to-prim)) (format #t "~Tbest-from-tri: #~%" (-> this best-from-tri)) this ) ;; definition for method 9 of type collide-overlap-result ;; INFO: Return type mismatch symbol vs none. (defmethod reset! ((this collide-overlap-result)) (set! (-> this best-dist) 0.0) (set! (-> this best-from-prim) #f) (set! (-> this best-to-prim) #f) (none) ) ;; definition of type overlaps-others-params (deftype overlaps-others-params (structure) ((options uint32) (tlist touching-list) ) ) ;; definition for method 3 of type overlaps-others-params (defmethod inspect ((this overlaps-others-params)) (format #t "[~8x] ~A~%" this 'overlaps-others-params) (format #t "~Toptions: ~D~%" (-> this options)) (format #t "~Ttlist: ~A~%" (-> this tlist)) this ) ;; definition for symbol *collide-hit-by-player-list*, type engine (define *collide-hit-by-player-list* (new 'global 'engine 'collide-hit-by-player-list 768)) ;; definition for symbol *collide-usually-hit-by-player-list*, type engine (define *collide-usually-hit-by-player-list* (new 'global 'engine 'collide-usually-hit-by-player-list 256)) ;; definition for symbol *collide-hit-by-others-list*, type engine (define *collide-hit-by-others-list* (new 'global 'engine 'collide-hit-by-others-list 96)) ;; definition for symbol *collide-player-list*, type engine (define *collide-player-list* (new 'global 'engine 'collide-player-list 32)) ;; definition of type collide-prim-core (deftype collide-prim-core (structure) ((world-sphere vector :inline) (collide-as collide-kind) (action collide-action) (offense collide-offense) (prim-type int8) (extra uint8 2) (quad uint128 2 :overlay-at (-> world-sphere quad)) ) ) ;; definition for method 3 of type collide-prim-core (defmethod inspect ((this collide-prim-core)) (format #t "[~8x] ~A~%" this 'collide-prim-core) (format #t "~Tworld-sphere: ~`vector`P~%" (-> this world-sphere)) (format #t "~Tcollide-as: ~D~%" (-> this collide-as)) (format #t "~Taction: ~D~%" (-> this action)) (format #t "~Toffense: ~D~%" (-> this offense)) (format #t "~Tprim-type: ~D~%" (-> this prim-type)) (format #t "~Textra[2] @ #x~X~%" (-> this extra)) (format #t "~Tquad[2] @ #x~X~%" (-> this world-sphere)) this ) ;; definition of type collide-shape-prim (deftype collide-shape-prim (basic) ((cshape collide-shape) (prim-id uint32) (transform-index int8) (prim-core collide-prim-core :inline) (local-sphere vector :inline) (collide-with collide-kind) (world-sphere vector :inline :overlay-at (-> prim-core world-sphere)) (collide-as collide-kind :overlay-at (-> prim-core collide-as)) (action collide-action :overlay-at (-> prim-core action)) (offense collide-offense :overlay-at (-> prim-core offense)) (prim-type int8 :overlay-at (-> prim-core prim-type)) (radius meters :overlay-at (-> local-sphere w)) ) (:methods (new (symbol type collide-shape uint int) _type_) (move-by-vector! (_type_ vector) none) (find-prim-by-id (_type_ uint) collide-shape-prim) (debug-draw-world-sphere (_type_) symbol) (add-fg-prim-using-box (_type_ collide-cache) none) (add-fg-prim-using-line-sphere (_type_ collide-cache) none) (add-fg-prim-using-y-probe (_type_ collide-cache) none) (overlaps-others-test (_type_ overlaps-others-params collide-shape-prim) symbol) (overlaps-others-group (_type_ overlaps-others-params collide-shape-prim-group) symbol) (unused-17 () none) (collide-with-collide-cache-prim-mesh (_type_ collide-shape-intersect collide-cache-prim) none) (collide-with-collide-cache-prim-sphere (_type_ collide-shape-intersect collide-cache-prim) none) (add-to-bounding-box (_type_ collide-kind) symbol) (num-mesh (_type_ collide-shape-prim) int) (on-platform-test (_type_ collide-shape-prim collide-overlap-result float) none) (should-push-away-test (_type_ collide-shape-prim collide-overlap-result) none) (should-push-away-reverse-test (_type_ collide-shape-prim-group collide-overlap-result) none) (update-transforms! (_type_ process-drawable) symbol) (set-collide-as! (_type_ collide-kind) none) (set-collide-with! (_type_ collide-kind) none) ) ) ;; definition for method 3 of type collide-shape-prim (defmethod inspect ((this collide-shape-prim)) (format #t "[~8x] ~A~%" this (-> this type)) (format #t "~Tcshape: ~A~%" (-> this cshape)) (format #t "~Tprim-id: #x~X~%" (-> this prim-id)) (format #t "~Ttransform-index: ~D~%" (-> this transform-index)) (format #t "~Tprim-core: #~%" (-> this prim-core)) (format #t "~Tlocal-sphere: ~`vector`P~%" (-> this local-sphere)) (format #t "~Tcollide-with: ~D~%" (-> this collide-with)) (format #t "~Tworld-sphere: ~`vector`P~%" (-> this prim-core)) (format #t "~Tcollide-as: ~D~%" (-> this prim-core collide-as)) (format #t "~Taction: ~D~%" (-> this prim-core action)) (format #t "~Toffense: ~D~%" (-> this prim-core offense)) (format #t "~Tprim-type: ~D~%" (-> this prim-core prim-type)) (format #t "~Tradius: (meters ~m)~%" (-> this local-sphere w)) this ) ;; definition of type collide-shape-prim-sphere (deftype collide-shape-prim-sphere (collide-shape-prim) ((pat pat-surface) ) (:methods (new (symbol type collide-shape uint) _type_) ) ) ;; definition for method 3 of type collide-shape-prim-sphere (defmethod inspect ((this collide-shape-prim-sphere)) (format #t "[~8x] ~A~%" this (-> this type)) (format #t "~Tcshape: ~A~%" (-> this cshape)) (format #t "~Tprim-id: #x~X~%" (-> this prim-id)) (format #t "~Ttransform-index: ~D~%" (-> this transform-index)) (format #t "~Tprim-core: #~%" (-> this prim-core)) (format #t "~Tlocal-sphere: ~`vector`P~%" (-> this local-sphere)) (format #t "~Tcollide-with: ~D~%" (-> this collide-with)) (format #t "~Tworld-sphere: ~`vector`P~%" (-> this prim-core)) (format #t "~Tcollide-as: ~D~%" (-> this prim-core collide-as)) (format #t "~Taction: ~D~%" (-> this prim-core action)) (format #t "~Toffense: ~D~%" (-> this prim-core offense)) (format #t "~Tprim-type: ~D~%" (-> this prim-core prim-type)) (format #t "~Tradius: (meters ~m)~%" (-> this local-sphere w)) (format #t "~Tpat: ~D~%" (-> this pat)) this ) ;; definition of type collide-shape-prim-mesh (deftype collide-shape-prim-mesh (collide-shape-prim) ((mesh collide-mesh) (mesh-id int32) (mesh-cache-id uint64) (mesh-cache-tris (inline-array collide-mesh-cache-tri)) ) (:methods (new (symbol type collide-shape uint uint) _type_) (change-mesh (_type_ int) none) ) ) ;; definition for method 3 of type collide-shape-prim-mesh (defmethod inspect ((this collide-shape-prim-mesh)) (format #t "[~8x] ~A~%" this (-> this type)) (format #t "~Tcshape: ~A~%" (-> this cshape)) (format #t "~Tprim-id: #x~X~%" (-> this prim-id)) (format #t "~Ttransform-index: ~D~%" (-> this transform-index)) (format #t "~Tprim-core: #~%" (-> this prim-core)) (format #t "~Tlocal-sphere: ~`vector`P~%" (-> this local-sphere)) (format #t "~Tcollide-with: ~D~%" (-> this collide-with)) (format #t "~Tworld-sphere: ~`vector`P~%" (-> this prim-core)) (format #t "~Tcollide-as: ~D~%" (-> this prim-core collide-as)) (format #t "~Taction: ~D~%" (-> this prim-core action)) (format #t "~Toffense: ~D~%" (-> this prim-core offense)) (format #t "~Tprim-type: ~D~%" (-> this prim-core prim-type)) (format #t "~Tradius: (meters ~m)~%" (-> this local-sphere w)) (format #t "~Tmesh: ~A~%" (-> this mesh)) (format #t "~Tmesh-id: ~D~%" (-> this mesh-id)) (format #t "~Tmesh-cache-id: ~D~%" (-> this mesh-cache-id)) (format #t "~Tmesh-cache-tris: #x~X~%" (-> this mesh-cache-tris)) this ) ;; definition of type collide-shape-prim-group (deftype collide-shape-prim-group (collide-shape-prim) ((num-prims int32) (num-prims-u uint32 :overlay-at num-prims) (allocated-prims int32) (prim collide-shape-prim 1) (prims collide-shape-prim :dynamic :overlay-at (-> prim 0)) ) (:methods (new (symbol type collide-shape uint int) _type_) (append-prim (_type_ collide-shape-prim) none) (add-to-non-empty-bounding-box (_type_ collide-kind) none) ) ) ;; definition for method 3 of type collide-shape-prim-group (defmethod inspect ((this collide-shape-prim-group)) (format #t "[~8x] ~A~%" this (-> this type)) (format #t "~Tcshape: ~A~%" (-> this cshape)) (format #t "~Tprim-id: #x~X~%" (-> this prim-id)) (format #t "~Ttransform-index: ~D~%" (-> this transform-index)) (format #t "~Tprim-core: #~%" (-> this prim-core)) (format #t "~Tlocal-sphere: ~`vector`P~%" (-> this local-sphere)) (format #t "~Tcollide-with: ~D~%" (-> this collide-with)) (format #t "~Tworld-sphere: ~`vector`P~%" (-> this prim-core)) (format #t "~Tcollide-as: ~D~%" (-> this prim-core collide-as)) (format #t "~Taction: ~D~%" (-> this prim-core action)) (format #t "~Toffense: ~D~%" (-> this prim-core offense)) (format #t "~Tprim-type: ~D~%" (-> this prim-core prim-type)) (format #t "~Tradius: (meters ~m)~%" (-> this local-sphere w)) (format #t "~Tnum-prims: ~D~%" (-> this num-prims)) (format #t "~Tallocated-prims: ~D~%" (-> this allocated-prims)) (format #t "~Tprim[1] @ #x~X~%" (-> this prims)) this ) ;; definition of type collide-shape (deftype collide-shape (trsqv) ((process process-drawable) (max-iteration-count uint8) (nav-flags nav-flags) (pad-byte uint8 2) (pat-ignore-mask pat-surface) (event-self symbol) (event-other symbol) (root-prim collide-shape-prim) (riders collide-sticky-rider-group) (backup-collide-as collide-kind) (backup-collide-with collide-kind) ) (:methods (new (symbol type process-drawable collide-list-enum) _type_) (move-by-vector! (_type_ vector) none) (alloc-riders (_type_ int) none) (move-to-point! (_type_ vector) none) (debug-draw (_type_) none) (fill-cache-for-shape! (_type_ float collide-kind) none) (fill-cache-integrate-and-collide! (_type_ vector collide-kind) none) (find-prim-by-id (_type_ uint) collide-shape-prim) (detect-riders! (_type_) symbol) (build-bounding-box-for-shape (_type_ bounding-box float collide-kind) symbol) (integrate-and-collide! (_type_ vector) none) (find-collision-meshes (_type_) symbol) (on-platform (_type_ collide-shape collide-overlap-result) symbol) (find-overlapping-shapes (_type_ overlaps-others-params) symbol) (calc-shove-up (_type_ attack-info float) vector) (should-push-away (_type_ collide-shape collide-overlap-result) symbol) (pull-rider! (_type_ pull-rider-info) none) (pull-riders! (_type_) symbol) (do-push-aways! (_type_) symbol) (set-root-prim! (_type_ collide-shape-prim) collide-shape-prim) (update-transforms! (_type_) symbol) (clear-collide-with-as (_type_) none) (restore-collide-with-as (_type_) none) (backup-collide-with-as (_type_) none) (set-root-prim-collide-with! (_type_ collide-kind) none) (set-root-prim-collide-as! (_type_ collide-kind) none) (set-collide-kinds (_type_ int collide-kind collide-kind) none) (set-collide-offense (_type_ int collide-offense) none) (send-shove-back (_type_ process touching-shapes-entry float float float) none) ) ) ;; definition for method 3 of type collide-shape (defmethod inspect ((this collide-shape)) (format #t "[~8x] ~A~%" this (-> this type)) (format #t "~Ttrans: ~`vector`P~%" (-> this trans)) (format #t "~Trot: ~`vector`P~%" (-> this quat)) (format #t "~Tscale: ~`vector`P~%" (-> this scale)) (format #t "~Tquat: #~%" (-> this quat)) (format #t "~Tpause-adjust-distance: (meters ~m)~%" (-> this pause-adjust-distance)) (format #t "~Tnav-radius: (meters ~m)~%" (-> this nav-radius)) (format #t "~Ttransv: ~`vector`P~%" (-> this transv)) (format #t "~Trotv: ~`vector`P~%" (-> this rotv)) (format #t "~Tscalev: ~`vector`P~%" (-> this scalev)) (format #t "~Tdir-targ: #~%" (-> this dir-targ)) (format #t "~Tangle-change-time: ~D~%" (-> this angle-change-time)) (format #t "~Told-y-angle-diff: ~f~%" (-> this old-y-angle-diff)) (format #t "~Tprocess: ~A~%" (-> this process)) (format #t "~Tmax-iteration-count: ~D~%" (-> this max-iteration-count)) (format #t "~Tnav-flags: ~D~%" (-> this nav-flags)) (format #t "~Tpad-byte[2] @ #x~X~%" (-> this pad-byte)) (format #t "~Tpat-ignore-mask: ~D~%" (-> this pat-ignore-mask)) (format #t "~Tevent-self: ~A~%" (-> this event-self)) (format #t "~Tevent-other: ~A~%" (-> this event-other)) (format #t "~Troot-prim: ~A~%" (-> this root-prim)) (format #t "~Triders: ~A~%" (-> this riders)) (format #t "~Tbackup-collide-as: ~D~%" (-> this backup-collide-as)) (format #t "~Tbackup-collide-with: ~D~%" (-> this backup-collide-with)) this ) ;; definition of type collide-shape-moving (deftype collide-shape-moving (collide-shape) ((rider-time time-frame) (rider-last-move vector :inline) (trans-old vector 3 :inline) (poly-pat pat-surface) (cur-pat pat-surface) (ground-pat pat-surface) (status cshape-moving-flags) (old-status cshape-moving-flags) (prev-status cshape-moving-flags) (reaction-flag cshape-reaction-flags) (reaction (function collide-shape-moving collide-shape-intersect vector vector cshape-moving-flags)) (no-reaction (function collide-shape-moving collide-shape-intersect vector vector none)) (local-normal vector :inline) (surface-normal vector :inline) (poly-normal vector :inline) (ground-poly-normal vector :inline) (ground-touch-point vector :inline) (shadow-pos vector :inline) (ground-impact-vel meters) (surface-angle float) (poly-angle float) (touch-angle float) (coverage float) (dynam dynamics) (surf surface) ) (:methods (set-and-handle-pat! (_type_ pat-surface) none) (integrate-no-collide! (_type_ vector) none) (collide-shape-moving-method-58 (_type_ vector) symbol) (integrate-for-enemy-with-move-to-ground! (_type_ vector collide-kind float symbol symbol symbol) none) (move-to-ground (_type_ float float symbol collide-kind) symbol) (move-to-ground-point! (_type_ vector vector vector) none) (compute-acc-due-to-gravity (_type_ vector float) vector) (step-collison! (_type_ vector vector float) float) (move-to-tri! (_type_ collide-tri-result vector) none) ) ) ;; definition for method 3 of type collide-shape-moving (defmethod inspect ((this collide-shape-moving)) (format #t "[~8x] ~A~%" this (-> this type)) (format #t "~Ttrans: ~`vector`P~%" (-> this trans)) (format #t "~Trot: ~`vector`P~%" (-> this quat)) (format #t "~Tscale: ~`vector`P~%" (-> this scale)) (format #t "~Tquat: #~%" (-> this quat)) (format #t "~Tpause-adjust-distance: (meters ~m)~%" (-> this pause-adjust-distance)) (format #t "~Tnav-radius: (meters ~m)~%" (-> this nav-radius)) (format #t "~Ttransv: ~`vector`P~%" (-> this transv)) (format #t "~Trotv: ~`vector`P~%" (-> this rotv)) (format #t "~Tscalev: ~`vector`P~%" (-> this scalev)) (format #t "~Tdir-targ: #~%" (-> this dir-targ)) (format #t "~Tangle-change-time: ~D~%" (-> this angle-change-time)) (format #t "~Told-y-angle-diff: ~f~%" (-> this old-y-angle-diff)) (format #t "~Tprocess: ~A~%" (-> this process)) (format #t "~Tmax-iteration-count: ~D~%" (-> this max-iteration-count)) (format #t "~Tnav-flags: ~D~%" (-> this nav-flags)) (format #t "~Tpad-byte[2] @ #x~X~%" (-> this pad-byte)) (format #t "~Tpat-ignore-mask: ~D~%" (-> this pat-ignore-mask)) (format #t "~Tevent-self: ~A~%" (-> this event-self)) (format #t "~Tevent-other: ~A~%" (-> this event-other)) (format #t "~Troot-prim: ~A~%" (-> this root-prim)) (format #t "~Triders: ~A~%" (-> this riders)) (format #t "~Tbackup-collide-as: ~D~%" (-> this backup-collide-as)) (format #t "~Tbackup-collide-with: ~D~%" (-> this backup-collide-with)) (format #t "~Trider-time: ~D~%" (-> this rider-time)) (format #t "~Trider-last-move: ~`vector`P~%" (-> this rider-last-move)) (format #t "~Ttrans-old[3] @ #x~X~%" (-> this trans-old)) (format #t "~Tpoly-pat: #x~X~%" (-> this poly-pat)) (format #t "~Tcur-pat: #x~X~%" (-> this cur-pat)) (format #t "~Tground-pat: #x~X~%" (-> this ground-pat)) (format #t "~Tstatus: ~D~%" (-> this status)) (format #t "~Told-status: ~D~%" (-> this old-status)) (format #t "~Tprev-status: ~D~%" (-> this prev-status)) (format #t "~Treaction-flag: ~D~%" (-> this reaction-flag)) (format #t "~Treaction: ~A~%" (-> this reaction)) (format #t "~Tno-reaction: ~A~%" (-> this no-reaction)) (format #t "~Tlocal-normal: ~`vector`P~%" (-> this local-normal)) (format #t "~Tsurface-normal: ~`vector`P~%" (-> this surface-normal)) (format #t "~Tpoly-normal: ~`vector`P~%" (-> this poly-normal)) (format #t "~Tground-poly-normal: ~`vector`P~%" (-> this ground-poly-normal)) (format #t "~Tground-touch-point: ~`vector`P~%" (-> this ground-touch-point)) (format #t "~Tshadow-pos: ~`vector`P~%" (-> this shadow-pos)) (format #t "~Tground-impact-vel: (meters ~m)~%" (-> this ground-impact-vel)) (format #t "~Tsurface-angle: ~f~%" (-> this surface-angle)) (format #t "~Tpoly-angle: ~f~%" (-> this poly-angle)) (format #t "~Ttouch-angle: ~f~%" (-> this touch-angle)) (format #t "~Tcoverage: ~f~%" (-> this coverage)) (format #t "~Tdynam: ~A~%" (-> this dynam)) (format #t "~Tsurf: ~A~%" (-> this surf)) this ) ;; definition for method 0 of type collide-shape-prim (defmethod new collide-shape-prim ((allocation symbol) (type-to-make type) (cshape collide-shape) (prim-id uint) (size-bytes int)) (let ((v0-0 (object-new allocation type-to-make size-bytes))) (set! (-> v0-0 cshape) cshape) (set! (-> v0-0 prim-id) prim-id) (set! (-> v0-0 prim-core action) (collide-action)) (set! (-> v0-0 prim-core collide-as) (collide-kind)) (set! (-> v0-0 collide-with) (collide-kind)) (set! (-> v0-0 transform-index) -2) (set! (-> v0-0 prim-core offense) (collide-offense no-offense)) (set! (-> v0-0 prim-core prim-type) -2) v0-0 ) ) ;; definition for method 0 of type collide-shape-prim-sphere ;; INFO: Return type mismatch collide-shape-prim vs collide-shape-prim-sphere. (defmethod new collide-shape-prim-sphere ((allocation symbol) (type-to-make type) (cshape collide-shape) (prim-id uint)) (let ((this (the-as collide-shape-prim-sphere ((method-of-type collide-shape-prim new) allocation type-to-make cshape prim-id 76) ) ) ) (set! (-> this pat) (new 'static 'pat-surface :mode (pat-mode obstacle))) (set! (-> this prim-core prim-type) -1) (the-as collide-shape-prim-sphere this) ) ) ;; definition for method 0 of type collide-shape-prim-mesh ;; INFO: Return type mismatch collide-shape-prim vs collide-shape-prim-mesh. (defmethod new collide-shape-prim-mesh ((allocation symbol) (type-to-make type) (cshape collide-shape) (mesh-id uint) (prim-id uint)) (let ((this (the-as collide-shape-prim-mesh ((method-of-type collide-shape-prim new) allocation type-to-make cshape prim-id 92) ) ) ) (set! (-> this mesh) #f) (set! (-> this mesh-id) (the-as int mesh-id)) (set! (-> this mesh-cache-id) (the-as uint 0)) (set! (-> this prim-core prim-type) 1) (the-as collide-shape-prim-mesh this) ) ) ;; definition for method 0 of type collide-shape-prim-group ;; INFO: Return type mismatch collide-shape-prim vs collide-shape-prim-group. (defmethod new collide-shape-prim-group ((allocation symbol) (type-to-make type) (cshape collide-shape) (elt-count uint) (prim-id int)) (let ((this (the-as collide-shape-prim-group ((method-of-type collide-shape-prim new) allocation type-to-make cshape (the-as uint prim-id) (the-as int (+ (-> type-to-make size) (* (+ elt-count -1) 4))) ) ) ) ) (set! (-> this allocated-prims) (the-as int elt-count)) (set! (-> this num-prims) 0) (set! (-> this prim-core prim-type) 0) (while (nonzero? elt-count) (+! elt-count -1) (set! (-> this prims elt-count) #f) (nop!) ) (the-as collide-shape-prim-group this) ) ) ;; definition for method 4 of type collide-shape-prim-group (defmethod length ((this collide-shape-prim-group)) (-> this num-prims) ) ;; definition for method 5 of type collide-shape-prim-group ;; INFO: Return type mismatch uint vs int. (defmethod asize-of ((this collide-shape-prim-group)) (the-as int (+ (-> this type size) (* (+ (-> this allocated-prims) -1) 4))) ) ;; definition for method 0 of type collide-shape (defmethod new collide-shape ((allocation symbol) (type-to-make type) (proc process-drawable) (collide-list-kind collide-list-enum)) (let ((this (object-new allocation type-to-make (the-as int (-> type-to-make size))))) (set! (-> this process) proc) (set! (-> this max-iteration-count) (the-as uint 1)) (set! (-> this nav-flags) (nav-flags navf0)) (set! (-> this event-self) #f) (set! (-> this event-other) #f) (set! (-> this riders) #f) (set! (-> this root-prim) #f) (case (-> proc type symbol) (('camera) (set! (-> this pat-ignore-mask) (new 'static 'pat-surface :nocamera #x1)) ) (else (set! (-> this pat-ignore-mask) (new 'static 'pat-surface :noentity #x1)) ) ) (set! (-> this trans w) 1.0) (quaternion-identity! (-> this quat)) (vector-identity! (-> this scale)) (cond ((= collide-list-kind (collide-list-enum hit-by-player)) (add-connection *collide-hit-by-player-list* proc #f this #f #f) ) ((= collide-list-kind (collide-list-enum usually-hit-by-player)) (add-connection *collide-usually-hit-by-player-list* proc #f this #f #f) ) ((= collide-list-kind (collide-list-enum hit-by-others)) (add-connection *collide-hit-by-others-list* proc #f this #f #f) ) ((= collide-list-kind (collide-list-enum player)) (add-connection *collide-player-list* proc #f this #f #f) ) (else (format 0 "Unsupported collide-list-enum in collide-shape constructor!~%") ) ) this ) ) ;; definition for method 0 of type collide-sticky-rider-group (defmethod new collide-sticky-rider-group ((allocation symbol) (type-to-make type) (arg0 int)) (let ((this (object-new allocation type-to-make (the-as int (+ (-> type-to-make size) (* (+ arg0 -1) 32)))))) (set! (-> this allocated-riders) arg0) (set! (-> this num-riders) 0) this ) ) ;; definition for method 4 of type collide-sticky-rider-group (defmethod length ((this collide-sticky-rider-group)) (-> this num-riders) ) ;; definition for method 5 of type collide-sticky-rider-group ;; INFO: Return type mismatch uint vs int. (defmethod asize-of ((this collide-sticky-rider-group)) (the-as int (+ (-> this type size) (* (+ (-> this allocated-riders) -1) 32))) ) ;; definition for symbol *collide-shape-prim-backgnd*, type collide-shape-prim-mesh (define *collide-shape-prim-backgnd* (new 'static 'collide-shape-prim-mesh :cshape #f :prim-core (new 'static 'collide-prim-core :world-sphere (new 'static 'vector :w 204800000.0) :collide-as (collide-kind background) :action (collide-action solid) :offense (collide-offense indestructible) :prim-type 2 ) :local-sphere (new 'static 'vector :w 204800000.0) :mesh #f ) ) ;; definition for symbol *collide-shape-prim-water*, type collide-shape-prim-mesh (define *collide-shape-prim-water* (new 'static 'collide-shape-prim-mesh :cshape #f :prim-core (new 'static 'collide-prim-core :world-sphere (new 'static 'vector :w 204800000.0) :collide-as (collide-kind water) :action (collide-action solid) :offense (collide-offense indestructible) :prim-type 2 ) :local-sphere (new 'static 'vector :w 204800000.0) :mesh #f ) )