Files
Hat Kid 93afb02cf4 decomp3: spawn target, add merc and particle buckets and some temporary hacks (#3445)
This includes all the collision stuff needed to spawn `target`,
decompiles the sparticle code and adds some of the PC hacks needed for
merc to run (it doesn't work quite right and looks bad, likely due to a
combination of code copied from Jak 2 and the time of day hacks).

There are a bunch of temporary hacks (see commits) in place to prevent
the game from crashing quite as much, but it is still extremely prone to
doing so due to lots of missing functions/potentially bad decomp.

---------

Co-authored-by: water <awaterford111445@gmail.com>
2024-04-05 00:07:39 -04:00

1360 lines
42 KiB
Common Lisp
Vendored
Generated

;;-*-Lisp-*-
(in-package goal)
;; this file is debug only
(declare-file (debug))
;; definition for symbol *editable-temp-id*, type int
(define *editable-temp-id* 0)
;; definition for symbol *editable-default-name*, type string
(define *editable-default-name* (new 'debug 'string 32 "undefined"))
;; definition for function editable-command->string
(defun editable-command->string ((arg0 editable-command))
(case arg0
(((editable-command select-current-face))
"select-current-face"
)
(((editable-command camera-move))
"camera-move"
)
(((editable-command select-current-region))
"select-current-region"
)
(((editable-command insert-sample))
"insert-sample"
)
(((editable-command print-region-info))
"print-region-info"
)
(((editable-command camera-rotate))
"camera-rotate"
)
(((editable-command select-user1))
"select-user1"
)
(((editable-command select-add))
"select-add"
)
(((editable-command camera-xz))
"camera-xz"
)
(((editable-command pick-loc))
"pick-loc"
)
(((editable-command insert-box))
"insert-box"
)
(((editable-command insert-entity))
"insert-entity"
)
(((editable-command translate-y-level))
"translate-y-level"
)
(((editable-command select-user11))
"select-user11"
)
(((editable-command select-user10))
"select-user10"
)
(((editable-command select-all))
"select-all"
)
(((editable-command copy-region))
"copy-region"
)
(((editable-command select-none))
"select-none"
)
(((editable-command camera-zoom))
"camera-zoom"
)
(((editable-command delete-region))
"delete-region"
)
(((editable-command select-toggle))
"select-toggle"
)
(((editable-command copy))
"copy"
)
(((editable-command pick-yes-no))
"pick-yes-no"
)
(((editable-command insert-light))
"insert-light"
)
(((editable-command none))
"none"
)
(((editable-command select-user4))
"select-user4"
)
(((editable-command resize))
"resize"
)
(((editable-command flip-side))
"flip-side"
)
(((editable-command refresh-filter))
"refresh-filter"
)
(((editable-command cancel))
"cancel"
)
(((editable-command save))
"save"
)
(((editable-command select-user6))
"select-user6"
)
(((editable-command region-new))
"region-new"
)
(((editable-command snap-to-ground))
"snap-to-ground"
)
(((editable-command pick-target))
"pick-target"
)
(((editable-command snap-y))
"snap-y"
)
(((editable-command select-user8))
"select-user8"
)
(((editable-command select-face))
"select-face"
)
(((editable-command exit))
"exit"
)
(((editable-command drag-move))
"drag-move"
)
(((editable-command edit-plane-set))
"edit-plane-set"
)
(((editable-command select-region))
"select-region"
)
(((editable-command delete))
"delete"
)
(((editable-command select-user0))
"select-user0"
)
(((editable-command camera-xy))
"camera-xy"
)
(((editable-command select-current-owner))
"select-current-owner"
)
(((editable-command region-add))
"region-add"
)
(((editable-command insert-sphere))
"insert-sphere"
)
(((editable-command insert-plane))
"insert-plane"
)
(((editable-command drag-rotate))
"drag-rotate"
)
(((editable-command select-one))
"select-one"
)
(((editable-command update-game))
"update-game"
)
(((editable-command select-user2))
"select-user2"
)
(((editable-command select-user3))
"select-user3"
)
(((editable-command snap-rotate))
"snap-rotate"
)
(((editable-command rotate-level))
"rotate-level"
)
(((editable-command select-prim))
"select-prim"
)
(((editable-command drag-none))
"drag-none"
)
(((editable-command select-current-prim))
"select-current-prim"
)
(((editable-command select-user5))
"select-user5"
)
(((editable-command insert-wall))
"insert-wall"
)
(((editable-command insert-simple-camera))
"insert-sample-camera"
)
(((editable-command insert-face))
"insert-face"
)
(((editable-command region-set))
"region-set"
)
(((editable-command select-user7))
"select-user7"
)
(((editable-command insert-point))
"insert-point"
)
(((editable-command drag-resize))
"drag-resize"
)
(((editable-command kill))
"kill"
)
(((editable-command snap-xz))
"snap-xz"
)
(((editable-command select-user12))
"select-user12"
)
(((editable-command camera-tumble))
"camera-tumble"
)
(((editable-command select-user9))
"select-user9"
)
(((editable-command edit-plane-clear))
"edit-plane-clear"
)
(((editable-command drag-scale))
"drag-scale"
)
(((editable-command load))
"load"
)
(((editable-command select-remove))
"select-remove"
)
(else
"*unknown*"
)
)
)
;; definition for function editable-filter->string
;; WARN: Return type mismatch basic vs string.
(defun editable-filter->string ((arg0 editable-filter) (arg1 basic))
(if (= (logand arg0 (editable-filter target)) (editable-filter target))
(format arg1 "target ")
)
(if (= (logand arg0 (editable-filter city_vis)) (editable-filter city_vis))
(format arg1 "city_vis ")
)
(if (= (logand arg0 (editable-filter water-command)) (editable-filter water-command))
(format arg1 "water-command ")
)
(if (= (logand arg0 (editable-filter user-setting)) (editable-filter user-setting))
(format arg1 "user-setting ")
)
(if (= (logand arg0 (editable-filter sample)) (editable-filter sample))
(format arg1 "sample ")
)
(if (= (logand arg0 (editable-filter light)) (editable-filter light))
(format arg1 "light ")
)
(if (= (logand arg0 (editable-filter part)) (editable-filter part))
(format arg1 "part ")
)
(if (= (logand arg0 (editable-filter unknown)) (editable-filter unknown))
(format arg1 "unknown ")
)
(if (= (logand arg0 (editable-filter entity)) (editable-filter entity))
(format arg1 "entity ")
)
(if (= (logand arg0 (editable-filter data)) (editable-filter data))
(format arg1 "data ")
)
(if (= (logand arg0 (editable-filter water)) (editable-filter water))
(format arg1 "water ")
)
(if (= (logand arg0 (editable-filter cam-setting)) (editable-filter cam-setting))
(format arg1 "cam-setting ")
)
(if (= (logand (editable-filter selected) arg0) (editable-filter selected))
(format arg1 "selected ")
)
(if (= (logand arg0 (editable-filter none)) (editable-filter none))
(format arg1 "none ")
)
(if (= (logand arg0 (editable-filter camera)) (editable-filter camera))
(format arg1 "camera ")
)
(if (= (logand arg0 (editable-filter load)) (editable-filter load))
(format arg1 "load ")
)
(if (= (logand arg0 (editable-filter sound)) (editable-filter sound))
(format arg1 "sound ")
)
(the-as string arg1)
)
;; definition of type editable-region
(deftype editable-region (basic)
((changed symbol)
(locked symbol)
(id uint64)
(filter editable-filter)
(tree symbol)
(level string)
(on-enter string)
(on-inside string)
(on-exit string)
)
(:methods
(new (symbol type) _type_)
(editable-region-method-9 () none)
(editable-region-method-10 () none)
(editable-region-method-11 () none)
(editable-region-method-12 () none)
)
)
;; definition for method 3 of type editable-region
(defmethod inspect ((this editable-region))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tchanged: ~A~%" (-> this changed))
(format #t "~1Tlocked: ~A~%" (-> this locked))
(format #t "~1Tid: ~D~%" (-> this id))
(format #t "~1Tfilter: ~D~%" (-> this filter))
(format #t "~1Ttree: ~A~%" (-> this tree))
(format #t "~1Tlevel: ~A~%" (-> this level))
(format #t "~1Ton-enter: ~A~%" (-> this on-enter))
(format #t "~1Ton-inside: ~A~%" (-> this on-inside))
(format #t "~1Ton-exit: ~A~%" (-> this on-exit))
(label cfg-4)
this
)
;; definition of type editable
(deftype editable (basic)
((flags editable-flag)
(name string)
(id uint32)
(region editable-region)
(owner pair)
(prefix basic)
)
(:methods
(editable-method-9 () none)
(editable-method-10 () none)
(editable-method-11 () none)
(editable-method-12 () none)
(editable-method-13 () none)
(editable-method-14 () none)
(editable-method-15 () none)
(editable-method-16 () none)
(editable-method-17 () none)
(editable-method-18 () none)
(editable-method-19 () none)
(editable-method-20 () none)
(editable-method-21 () none)
(editable-method-22 () none)
(editable-method-23 () none)
(editable-method-24 () none)
(editable-method-25 () none)
(editable-method-26 () none)
(editable-method-27 () none)
(editable-method-28 () none)
(editable-method-29 () none)
(editable-method-30 () none)
(editable-method-31 () none)
(editable-method-32 () none)
(editable-method-33 () none)
(editable-method-34 () none)
(editable-method-35 () none)
)
)
;; definition for method 3 of type editable
(defmethod inspect ((this editable))
(when (not this)
(set! this this)
(goto cfg-28)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tflags: #x~X : (editable-flag " (-> this flags))
(let ((s5-0 (-> this flags)))
(if (= (logand s5-0 (editable-flag no-save)) (editable-flag no-save))
(format #t "no-save ")
)
(if (= (logand s5-0 (editable-flag top-set)) (editable-flag top-set))
(format #t "top-set ")
)
(if (= (logand s5-0 (editable-flag orient)) (editable-flag orient))
(format #t "orient ")
)
(if (= (logand s5-0 (editable-flag z)) (editable-flag z))
(format #t "z ")
)
(if (= (logand s5-0 (editable-flag y)) (editable-flag y))
(format #t "y ")
)
(if (= (logand s5-0 (editable-flag x)) (editable-flag x))
(format #t "x ")
)
(if (= (logand s5-0 (editable-flag changed)) (editable-flag changed))
(format #t "changed ")
)
(if (= (logand s5-0 (editable-flag no-plane-snap)) (editable-flag no-plane-snap))
(format #t "no-plane-snap ")
)
(if (= (logand s5-0 (editable-flag mark)) (editable-flag mark))
(format #t "mark ")
)
(if (= (logand s5-0 (editable-flag bot-set)) (editable-flag bot-set))
(format #t "bot-set ")
)
(if (= (logand s5-0 (editable-flag selected)) (editable-flag selected))
(format #t "selected ")
)
(if (= (logand s5-0 (editable-flag no-update)) (editable-flag no-update))
(format #t "no-update ")
)
)
(format #t ")~%")
(format #t "~1Tname: ~A~%" (-> this name))
(format #t "~1Tid: ~D~%" (-> this id))
(format #t "~1Tregion: ~A~%" (-> this region))
(format #t "~1Towner: ~A~%" (-> this owner))
(format #t "~1Tprefix: ~A~%" (-> this prefix))
(label cfg-28)
this
)
;; definition of type editable-array
(deftype editable-array (basic)
((allocated-length int32)
(length int32)
(region editable-region)
(backup-region editable-region)
(region-lock? symbol)
(move-lock? symbol)
(move-speed float)
(selection (array editable))
(filter editable-filter 2)
(target editable)
(target-mode editable-command)
(target-command editable-command)
(target-message string)
(edit-plane editable-plane)
(edit-plane-center vector :inline)
(edit-plane-normal vector :inline)
(level-offset vector :inline)
(level-info-id uint32)
(level uint32)
(edit-param0 float)
(data editable :dynamic)
)
(:methods
(new (symbol type int) _type_)
(editable-array-method-9 () none)
(editable-array-method-10 () none)
(editable-array-method-11 () none)
(editable-array-method-12 () none)
(editable-array-method-13 () none)
(editable-array-method-14 () none)
(editable-array-method-15 () none)
(editable-array-method-16 () none)
(editable-array-method-17 () none)
(editable-array-method-18 () none)
(editable-array-method-19 () none)
)
)
;; definition for method 3 of type editable-array
(defmethod inspect ((this editable-array))
(when (not this)
(set! this this)
(goto cfg-7)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tallocated-length: ~D~%" (-> this allocated-length))
(format #t "~1Tlength: ~D~%" (-> this length))
(format #t "~1Tregion: ~A~%" (-> this region))
(format #t "~1Tbackup-region: ~A~%" (-> this backup-region))
(format #t "~1Tregion-lock?: ~A~%" (-> this region-lock?))
(format #t "~1Tmove-lock?: ~A~%" (-> this move-lock?))
(format #t "~1Tmove-speed: ~f~%" (-> this move-speed))
(format #t "~1Tselection: ~`basic`P~%" (-> this selection))
(format #t "~1Tfilter[2] @ #x~X~%" (-> this filter))
(format #t "~1Ttarget: ~A~%" (-> this target))
(format #t "~1Ttarget-mode: ~D~%" (-> this target-mode))
(format #t "~1Ttarget-command: ~D~%" (-> this target-command))
(format #t "~1Ttarget-message: ~A~%" (-> this target-message))
(format #t "~1Tedit-plane: ~A~%" (-> this edit-plane))
(format #t "~1Tedit-plane-center: ~`vector`P~%" (-> this edit-plane-center))
(format #t "~1Tedit-plane-normal: ~`vector`P~%" (-> this edit-plane-normal))
(format #t "~1Tlevel-offset: ~`vector`P~%" (-> this level-offset))
(format #t "~1Tlevel-info-id: ~D~%" (-> this level-info-id))
(format #t "~1Tlevel: ~A~%" (-> this level))
(format #t "~1Tedit-param0: ~f~%" (-> this edit-param0))
(format #t "~1Tdata[0] @ #x~X~%" (-> this data))
(dotimes (s5-0 (-> this length))
(format #t "~T [~D]~1Tdata: ~A~%" s5-0 (-> this data s5-0))
)
(label cfg-7)
this
)
;; definition for method 0 of type editable-array
(defmethod new editable-array ((allocation symbol) (type-to-make type) (arg0 int))
(let ((s5-0 (object-new allocation type-to-make (the-as int (+ (-> type-to-make size) (* arg0 4))))))
(set! (-> s5-0 allocated-length) arg0)
(set! (-> s5-0 length) 0)
(set! (-> s5-0 region) #f)
(set! (-> s5-0 backup-region) #f)
(set! (-> s5-0 region-lock?) #f)
(set! (-> s5-0 move-lock?) #f)
(set! (-> s5-0 target) #f)
(set! (-> s5-0 target-command) (editable-command none))
(set! (-> s5-0 target-message) #f)
(set! (-> s5-0 selection)
(the-as (array editable) ((method-of-type array new) allocation array editable arg0))
)
(set! (-> s5-0 edit-plane) #f)
(set! (-> s5-0 filter 0) (editable-filter
none
unknown
sound
part
user-setting
cam-setting
load
water-command
city_vis
sample
light
entity
)
)
(set! (-> s5-0 filter 1) (editable-filter camera target water data city_vis sample light entity selected))
(dotimes (v1-5 arg0)
(set! (-> s5-0 data v1-5) #f)
(set! (-> s5-0 selection v1-5) #f)
)
s5-0
)
)
;; definition of type editable-point
(deftype editable-point (editable)
((radius meters)
(trans vector :inline)
)
(:methods
(new (symbol type vector editable-region) _type_)
)
)
;; definition for method 3 of type editable-point
(defmethod inspect ((this editable-point))
(when (not this)
(set! this this)
(goto cfg-28)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tflags: #x~X : (editable-flag " (-> this flags))
(let ((s5-0 (-> this flags)))
(if (= (logand s5-0 (editable-flag no-save)) (editable-flag no-save))
(format #t "no-save ")
)
(if (= (logand s5-0 (editable-flag top-set)) (editable-flag top-set))
(format #t "top-set ")
)
(if (= (logand s5-0 (editable-flag orient)) (editable-flag orient))
(format #t "orient ")
)
(if (= (logand s5-0 (editable-flag z)) (editable-flag z))
(format #t "z ")
)
(if (= (logand s5-0 (editable-flag y)) (editable-flag y))
(format #t "y ")
)
(if (= (logand s5-0 (editable-flag x)) (editable-flag x))
(format #t "x ")
)
(if (= (logand s5-0 (editable-flag changed)) (editable-flag changed))
(format #t "changed ")
)
(if (= (logand s5-0 (editable-flag no-plane-snap)) (editable-flag no-plane-snap))
(format #t "no-plane-snap ")
)
(if (= (logand s5-0 (editable-flag mark)) (editable-flag mark))
(format #t "mark ")
)
(if (= (logand s5-0 (editable-flag bot-set)) (editable-flag bot-set))
(format #t "bot-set ")
)
(if (= (logand s5-0 (editable-flag selected)) (editable-flag selected))
(format #t "selected ")
)
(if (= (logand s5-0 (editable-flag no-update)) (editable-flag no-update))
(format #t "no-update ")
)
)
(format #t ")~%")
(format #t "~1Tname: ~A~%" (-> this name))
(format #t "~1Tid: ~D~%" (-> this id))
(format #t "~1Tregion: ~A~%" (-> this region))
(format #t "~1Towner: ~A~%" (-> this owner))
(format #t "~1Tprefix: ~A~%" (-> this prefix))
(format #t "~1Tradius: (meters ~m)~%" (-> this radius))
(format #t "~1Ttrans: ~`vector`P~%" (-> this trans))
(label cfg-28)
this
)
;; definition for method 0 of type editable-point
;; INFO: Used lq/sq
(defmethod new editable-point ((allocation symbol) (type-to-make type) (arg0 vector) (arg1 editable-region))
(let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
(set! (-> gp-0 region) #f)
(set! (-> gp-0 name) "undefined")
(set! (-> gp-0 prefix) "undefined")
(let* ((s3-0 gp-0)
(s2-0 (method-of-object s3-0 editable-method-23))
)
(set! arg1 (cond
(arg1
(empty)
arg1
)
(else
(new 'debug 'editable-region)
)
)
)
(s2-0)
)
(set! (-> gp-0 trans quad) (-> arg0 quad))
(set! (-> gp-0 radius) 2048.0)
(set! (-> gp-0 owner) '())
gp-0
)
)
;; definition of type editable-sphere
(deftype editable-sphere (editable-point)
()
(:methods
(new (symbol type vector float editable-region) _type_)
)
)
;; definition for method 3 of type editable-sphere
(defmethod inspect ((this editable-sphere))
(when (not this)
(set! this this)
(goto cfg-28)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tflags: #x~X : (editable-flag " (-> this flags))
(let ((s5-0 (-> this flags)))
(if (= (logand s5-0 (editable-flag no-save)) (editable-flag no-save))
(format #t "no-save ")
)
(if (= (logand s5-0 (editable-flag top-set)) (editable-flag top-set))
(format #t "top-set ")
)
(if (= (logand s5-0 (editable-flag orient)) (editable-flag orient))
(format #t "orient ")
)
(if (= (logand s5-0 (editable-flag z)) (editable-flag z))
(format #t "z ")
)
(if (= (logand s5-0 (editable-flag y)) (editable-flag y))
(format #t "y ")
)
(if (= (logand s5-0 (editable-flag x)) (editable-flag x))
(format #t "x ")
)
(if (= (logand s5-0 (editable-flag changed)) (editable-flag changed))
(format #t "changed ")
)
(if (= (logand s5-0 (editable-flag no-plane-snap)) (editable-flag no-plane-snap))
(format #t "no-plane-snap ")
)
(if (= (logand s5-0 (editable-flag mark)) (editable-flag mark))
(format #t "mark ")
)
(if (= (logand s5-0 (editable-flag bot-set)) (editable-flag bot-set))
(format #t "bot-set ")
)
(if (= (logand s5-0 (editable-flag selected)) (editable-flag selected))
(format #t "selected ")
)
(if (= (logand s5-0 (editable-flag no-update)) (editable-flag no-update))
(format #t "no-update ")
)
)
(format #t ")~%")
(format #t "~1Tname: ~A~%" (-> this name))
(format #t "~1Tid: ~D~%" (-> this id))
(format #t "~1Tregion: ~A~%" (-> this region))
(format #t "~1Towner: ~A~%" (-> this owner))
(format #t "~1Tprefix: ~A~%" (-> this prefix))
(format #t "~1Tradius: (meters ~m)~%" (-> this radius))
(format #t "~1Ttrans: ~`vector`P~%" (-> this trans))
(label cfg-28)
this
)
;; definition for method 0 of type editable-sphere
;; INFO: Used lq/sq
(defmethod new editable-sphere ((allocation symbol) (type-to-make type) (arg0 vector) (arg1 float) (arg2 editable-region))
(let ((s5-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
(set! (-> s5-0 region) #f)
(set! (-> s5-0 name) "undefined")
(set! (-> s5-0 prefix) "undefined")
(let* ((s2-0 s5-0)
(s1-0 (method-of-object s2-0 editable-method-23))
)
(set! arg2 (cond
(arg2
(empty)
arg2
)
(else
(new 'debug 'editable-region)
)
)
)
(s1-0)
)
(set! (-> s5-0 trans quad) (-> arg0 quad))
(set! (-> s5-0 radius) arg1)
(set! (-> s5-0 owner) '())
s5-0
)
)
;; definition of type editable-sample
(deftype editable-sample (editable-point)
()
)
;; definition for method 3 of type editable-sample
(defmethod inspect ((this editable-sample))
(when (not this)
(set! this this)
(goto cfg-28)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tflags: #x~X : (editable-flag " (-> this flags))
(let ((s5-0 (-> this flags)))
(if (= (logand s5-0 (editable-flag no-save)) (editable-flag no-save))
(format #t "no-save ")
)
(if (= (logand s5-0 (editable-flag top-set)) (editable-flag top-set))
(format #t "top-set ")
)
(if (= (logand s5-0 (editable-flag orient)) (editable-flag orient))
(format #t "orient ")
)
(if (= (logand s5-0 (editable-flag z)) (editable-flag z))
(format #t "z ")
)
(if (= (logand s5-0 (editable-flag y)) (editable-flag y))
(format #t "y ")
)
(if (= (logand s5-0 (editable-flag x)) (editable-flag x))
(format #t "x ")
)
(if (= (logand s5-0 (editable-flag changed)) (editable-flag changed))
(format #t "changed ")
)
(if (= (logand s5-0 (editable-flag no-plane-snap)) (editable-flag no-plane-snap))
(format #t "no-plane-snap ")
)
(if (= (logand s5-0 (editable-flag mark)) (editable-flag mark))
(format #t "mark ")
)
(if (= (logand s5-0 (editable-flag bot-set)) (editable-flag bot-set))
(format #t "bot-set ")
)
(if (= (logand s5-0 (editable-flag selected)) (editable-flag selected))
(format #t "selected ")
)
(if (= (logand s5-0 (editable-flag no-update)) (editable-flag no-update))
(format #t "no-update ")
)
)
(format #t ")~%")
(format #t "~1Tname: ~A~%" (-> this name))
(format #t "~1Tid: ~D~%" (-> this id))
(format #t "~1Tregion: ~A~%" (-> this region))
(format #t "~1Towner: ~A~%" (-> this owner))
(format #t "~1Tprefix: ~A~%" (-> this prefix))
(format #t "~1Tradius: (meters ~m)~%" (-> this radius))
(format #t "~1Ttrans: ~`vector`P~%" (-> this trans))
(label cfg-28)
this
)
;; definition of type editable-light
(deftype editable-light (editable-sphere)
((direction vector :inline)
(color vector :inline)
(decay-start float)
(ambient-point-ratio float)
(brightness float)
(shadow uint32 :overlay-at (-> direction data 0))
(shadows float 5)
(shadow-ambi float :overlay-at (-> shadows 0))
(shadow-dir0 float :overlay-at (-> shadows 1))
(shadow-dir1 float :overlay-at (-> shadows 2))
(shadow-dir2 float :overlay-at (-> shadows 3))
(shadow-dir3 float :overlay-at (-> shadows 4))
)
(:methods
(new (symbol type vector float editable-region) _type_)
)
)
;; definition for method 3 of type editable-light
(defmethod inspect ((this editable-light))
(when (not this)
(set! this this)
(goto cfg-28)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tflags: #x~X : (editable-flag " (-> this flags))
(let ((s5-0 (-> this flags)))
(if (= (logand s5-0 (editable-flag no-save)) (editable-flag no-save))
(format #t "no-save ")
)
(if (= (logand s5-0 (editable-flag top-set)) (editable-flag top-set))
(format #t "top-set ")
)
(if (= (logand s5-0 (editable-flag orient)) (editable-flag orient))
(format #t "orient ")
)
(if (= (logand s5-0 (editable-flag z)) (editable-flag z))
(format #t "z ")
)
(if (= (logand s5-0 (editable-flag y)) (editable-flag y))
(format #t "y ")
)
(if (= (logand s5-0 (editable-flag x)) (editable-flag x))
(format #t "x ")
)
(if (= (logand s5-0 (editable-flag changed)) (editable-flag changed))
(format #t "changed ")
)
(if (= (logand s5-0 (editable-flag no-plane-snap)) (editable-flag no-plane-snap))
(format #t "no-plane-snap ")
)
(if (= (logand s5-0 (editable-flag mark)) (editable-flag mark))
(format #t "mark ")
)
(if (= (logand s5-0 (editable-flag bot-set)) (editable-flag bot-set))
(format #t "bot-set ")
)
(if (= (logand s5-0 (editable-flag selected)) (editable-flag selected))
(format #t "selected ")
)
(if (= (logand s5-0 (editable-flag no-update)) (editable-flag no-update))
(format #t "no-update ")
)
)
(format #t ")~%")
(format #t "~1Tname: ~A~%" (-> this name))
(format #t "~1Tid: ~D~%" (-> this id))
(format #t "~1Tregion: ~A~%" (-> this region))
(format #t "~1Towner: ~A~%" (-> this owner))
(format #t "~1Tprefix: ~A~%" (-> this prefix))
(format #t "~1Tradius: (meters ~m)~%" (-> this radius))
(format #t "~1Ttrans: ~`vector`P~%" (-> this trans))
(format #t "~1Tdirection: ~`vector`P~%" (-> this direction))
(format #t "~1Tcolor: ~`vector`P~%" (-> this color))
(format #t "~1Tdecay-start: ~f~%" (-> this decay-start))
(format #t "~1Tambient-point-ratio: ~f~%" (-> this ambient-point-ratio))
(format #t "~1Tbrightness: ~f~%" (-> this brightness))
(format #t "~1Tshadow: ~D~%" (-> this direction x))
(format #t "~1Tshadows[5] @ #x~X~%" (-> this shadows))
(format #t "~1Tshadow-ambi: ~f~%" (-> this shadow-ambi))
(format #t "~1Tshadow-dir0: ~f~%" (-> this shadow-dir0))
(format #t "~1Tshadow-dir1: ~f~%" (-> this shadow-dir1))
(format #t "~1Tshadow-dir2: ~f~%" (-> this shadow-dir2))
(format #t "~1Tshadow-dir3: ~f~%" (-> this shadow-dir3))
(label cfg-28)
this
)
;; definition for method 0 of type editable-light
;; INFO: Used lq/sq
(defmethod new editable-light ((allocation symbol) (type-to-make type) (arg0 vector) (arg1 float) (arg2 editable-region))
(let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
(set! (-> gp-0 region) #f)
(let* ((s2-0 gp-0)
(s1-0 (method-of-object s2-0 editable-method-23))
)
(set! arg2 (cond
(arg2
(empty)
arg2
)
(else
(new 'debug 'editable-region)
)
)
)
(s1-0)
)
(set! (-> gp-0 trans quad) (-> arg0 quad))
(set! (-> gp-0 radius) arg1)
(set! (-> gp-0 owner) '())
(set! (-> gp-0 prefix) (new 'debug 'string 32 *editable-default-name*))
(let ((s5-1 (new 'debug 'string 32 (the-as string #f))))
(format s5-1 "~s-~d" (-> gp-0 prefix) *editable-temp-id*)
(set! (-> gp-0 name) s5-1)
)
(set! *editable-temp-id* (+ *editable-temp-id* 1))
(set! (-> gp-0 decay-start) 0.5)
(set! (-> gp-0 ambient-point-ratio) 1.0)
(set! (-> gp-0 brightness) 1.0)
(set-vector! (-> gp-0 color) 1.0 1.0 1.0 -1.0)
(set-vector! (-> gp-0 direction) 0.0 0.0 0.0 0.0)
(set! (-> gp-0 shadow-ambi) 1.0)
(set! (-> gp-0 shadow-dir0) 1.0)
(set! (-> gp-0 shadow-dir1) 1.0)
(set! (-> gp-0 shadow-dir2) 1.0)
(set! (-> gp-0 shadow-dir3) 1.0)
gp-0
)
)
;; definition of type editable-entity
(deftype editable-entity (editable-point)
((angles euler-angles :inline)
(idx int32)
)
(:methods
(new (symbol type vector float editable-region) _type_)
(editable-entity-method-36 () none)
)
)
;; definition for method 3 of type editable-entity
(defmethod inspect ((this editable-entity))
(when (not this)
(set! this this)
(goto cfg-28)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tflags: #x~X : (editable-flag " (-> this flags))
(let ((s5-0 (-> this flags)))
(if (= (logand s5-0 (editable-flag no-save)) (editable-flag no-save))
(format #t "no-save ")
)
(if (= (logand s5-0 (editable-flag top-set)) (editable-flag top-set))
(format #t "top-set ")
)
(if (= (logand s5-0 (editable-flag orient)) (editable-flag orient))
(format #t "orient ")
)
(if (= (logand s5-0 (editable-flag z)) (editable-flag z))
(format #t "z ")
)
(if (= (logand s5-0 (editable-flag y)) (editable-flag y))
(format #t "y ")
)
(if (= (logand s5-0 (editable-flag x)) (editable-flag x))
(format #t "x ")
)
(if (= (logand s5-0 (editable-flag changed)) (editable-flag changed))
(format #t "changed ")
)
(if (= (logand s5-0 (editable-flag no-plane-snap)) (editable-flag no-plane-snap))
(format #t "no-plane-snap ")
)
(if (= (logand s5-0 (editable-flag mark)) (editable-flag mark))
(format #t "mark ")
)
(if (= (logand s5-0 (editable-flag bot-set)) (editable-flag bot-set))
(format #t "bot-set ")
)
(if (= (logand s5-0 (editable-flag selected)) (editable-flag selected))
(format #t "selected ")
)
(if (= (logand s5-0 (editable-flag no-update)) (editable-flag no-update))
(format #t "no-update ")
)
)
(format #t ")~%")
(format #t "~1Tname: ~A~%" (-> this name))
(format #t "~1Tid: ~D~%" (-> this id))
(format #t "~1Tregion: ~A~%" (-> this region))
(format #t "~1Towner: ~A~%" (-> this owner))
(format #t "~1Tprefix: ~A~%" (-> this prefix))
(format #t "~1Tradius: (meters ~m)~%" (-> this radius))
(format #t "~1Ttrans: ~`vector`P~%" (-> this trans))
(format #t "~1Tangles: #<euler-angles @ #x~X>~%" (-> this angles))
(format #t "~1Tidx: ~D~%" (-> this idx))
(label cfg-28)
this
)
;; definition for method 0 of type editable-entity
;; INFO: Used lq/sq
(defmethod new editable-entity ((allocation symbol) (type-to-make type) (arg0 vector) (arg1 float) (arg2 editable-region))
(let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
(set! (-> gp-0 region) #f)
(let* ((s2-0 gp-0)
(s1-0 (method-of-object s2-0 editable-method-23))
)
(set! arg2 (cond
(arg2
(empty)
arg2
)
(else
(new 'debug 'editable-region)
)
)
)
(s1-0)
)
(set! (-> gp-0 trans quad) (-> arg0 quad))
(set! (-> gp-0 radius) arg1)
(set! (-> gp-0 owner) '())
(set! (-> gp-0 prefix) (new 'debug 'string 32 "entity"))
(set! (-> gp-0 name) (new 'debug 'string 32 "entity"))
gp-0
)
)
;; definition of type editable-face
(deftype editable-face (editable)
((length int32)
(normal vector :inline)
(center vector :inline)
(vertex editable-point 6)
)
(:methods
(new (symbol type editable-region) _type_)
(editable-face-method-36 () none)
(editable-face-method-37 () none)
)
)
;; definition for method 3 of type editable-face
(defmethod inspect ((this editable-face))
(when (not this)
(set! this this)
(goto cfg-31)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tflags: #x~X : (editable-flag " (-> this flags))
(let ((s5-0 (-> this flags)))
(if (= (logand s5-0 (editable-flag no-save)) (editable-flag no-save))
(format #t "no-save ")
)
(if (= (logand s5-0 (editable-flag top-set)) (editable-flag top-set))
(format #t "top-set ")
)
(if (= (logand s5-0 (editable-flag orient)) (editable-flag orient))
(format #t "orient ")
)
(if (= (logand s5-0 (editable-flag z)) (editable-flag z))
(format #t "z ")
)
(if (= (logand s5-0 (editable-flag y)) (editable-flag y))
(format #t "y ")
)
(if (= (logand s5-0 (editable-flag x)) (editable-flag x))
(format #t "x ")
)
(if (= (logand s5-0 (editable-flag changed)) (editable-flag changed))
(format #t "changed ")
)
(if (= (logand s5-0 (editable-flag no-plane-snap)) (editable-flag no-plane-snap))
(format #t "no-plane-snap ")
)
(if (= (logand s5-0 (editable-flag mark)) (editable-flag mark))
(format #t "mark ")
)
(if (= (logand s5-0 (editable-flag bot-set)) (editable-flag bot-set))
(format #t "bot-set ")
)
(if (= (logand s5-0 (editable-flag selected)) (editable-flag selected))
(format #t "selected ")
)
(if (= (logand s5-0 (editable-flag no-update)) (editable-flag no-update))
(format #t "no-update ")
)
)
(format #t ")~%")
(format #t "~1Tname: ~A~%" (-> this name))
(format #t "~1Tid: ~D~%" (-> this id))
(format #t "~1Tregion: ~A~%" (-> this region))
(format #t "~1Towner: ~A~%" (-> this owner))
(format #t "~1Tprefix: ~A~%" (-> this prefix))
(format #t "~1Tlength: ~D~%" (-> this length))
(format #t "~1Tnormal: ~`vector`P~%" (-> this normal))
(format #t "~1Tcenter: ~`vector`P~%" (-> this center))
(format #t "~1Tvertex[6] @ #x~X~%" (-> this vertex))
(dotimes (s5-1 (-> this length))
(format #t "~T [~D]~1Tvertex: ~A~%" s5-1 (-> this vertex s5-1))
)
(label cfg-31)
this
)
;; definition for method 0 of type editable-face
(defmethod new editable-face ((allocation symbol) (type-to-make type) (arg0 editable-region))
(let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
(set! (-> gp-0 region) #f)
(set! (-> gp-0 name) "undefined")
(set! (-> gp-0 prefix) "undefined")
(let* ((s4-0 gp-0)
(s3-0 (method-of-object s4-0 editable-method-23))
)
(set! arg0 (cond
(arg0
(empty)
arg0
)
(else
(new 'debug 'editable-region)
)
)
)
(s3-0)
)
(set! (-> gp-0 owner) '())
gp-0
)
)
;; definition of type editable-plane
(deftype editable-plane (editable)
((length int32)
(radius meters)
(vertex editable-point 2)
)
(:methods
(new (symbol type editable-region) _type_)
(editable-plane-method-36 () none)
(editable-plane-method-37 () none)
)
)
;; definition for method 3 of type editable-plane
(defmethod inspect ((this editable-plane))
(when (not this)
(set! this this)
(goto cfg-31)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tflags: #x~X : (editable-flag " (-> this flags))
(let ((s5-0 (-> this flags)))
(if (= (logand s5-0 (editable-flag no-save)) (editable-flag no-save))
(format #t "no-save ")
)
(if (= (logand s5-0 (editable-flag top-set)) (editable-flag top-set))
(format #t "top-set ")
)
(if (= (logand s5-0 (editable-flag orient)) (editable-flag orient))
(format #t "orient ")
)
(if (= (logand s5-0 (editable-flag z)) (editable-flag z))
(format #t "z ")
)
(if (= (logand s5-0 (editable-flag y)) (editable-flag y))
(format #t "y ")
)
(if (= (logand s5-0 (editable-flag x)) (editable-flag x))
(format #t "x ")
)
(if (= (logand s5-0 (editable-flag changed)) (editable-flag changed))
(format #t "changed ")
)
(if (= (logand s5-0 (editable-flag no-plane-snap)) (editable-flag no-plane-snap))
(format #t "no-plane-snap ")
)
(if (= (logand s5-0 (editable-flag mark)) (editable-flag mark))
(format #t "mark ")
)
(if (= (logand s5-0 (editable-flag bot-set)) (editable-flag bot-set))
(format #t "bot-set ")
)
(if (= (logand s5-0 (editable-flag selected)) (editable-flag selected))
(format #t "selected ")
)
(if (= (logand s5-0 (editable-flag no-update)) (editable-flag no-update))
(format #t "no-update ")
)
)
(format #t ")~%")
(format #t "~1Tname: ~A~%" (-> this name))
(format #t "~1Tid: ~D~%" (-> this id))
(format #t "~1Tregion: ~A~%" (-> this region))
(format #t "~1Towner: ~A~%" (-> this owner))
(format #t "~1Tprefix: ~A~%" (-> this prefix))
(format #t "~1Tlength: ~D~%" (-> this length))
(format #t "~1Tradius: (meters ~m)~%" (-> this radius))
(format #t "~1Tvertex[2] @ #x~X~%" (-> this vertex))
(dotimes (s5-1 (-> this length))
(format #t "~T [~D]~1Tvertex: ~A~%" s5-1 (-> this vertex s5-1))
)
(label cfg-31)
this
)
;; definition for method 0 of type editable-plane
(defmethod new editable-plane ((allocation symbol) (type-to-make type) (arg0 editable-region))
(let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
(set! (-> gp-0 region) #f)
(set! (-> gp-0 name) "undefined")
(set! (-> gp-0 prefix) "undefined")
(let* ((s4-0 gp-0)
(s3-0 (method-of-object s4-0 editable-method-23))
)
(set! arg0 (cond
(arg0
(empty)
arg0
)
(else
(new 'debug 'editable-region)
)
)
)
(s3-0)
)
(set! (-> gp-0 owner) '())
(set! (-> gp-0 radius) 20480.0)
gp-0
)
)
;; definition of type editable-player
(deftype editable-player (process-drawable)
((current editable-array)
(current-command uint32)
(select-command function)
(drag-command uint32)
(extra-command function)
(left-handed basic)
(light-names basic)
(external-cam-mode symbol)
(command editable-command 6)
(close-menu-time time-frame)
(mouse-pos vector :inline)
(mouse-end vector :inline)
(manipulator manipulator :inline)
(mouse-box vector 2 :inline)
(mouse-hit vector :inline)
(mouse-normal vector :inline)
(float-variable float)
(float-step float)
(float-max float)
(float-min float)
(float-id uint32)
)
(:methods
(editable-player-method-20 () none)
(editable-player-method-21 () none)
(editable-player-method-22 () none)
(editable-player-method-23 () none)
)
)
;; definition for method 3 of type editable-player
(defmethod inspect ((this editable-player))
(when (not this)
(set! this this)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 this)
)
(format #t "~2Tcurrent: ~A~%" (-> this current))
(format #t "~2Tcurrent-command: ~D~%" (-> this current-command))
(format #t "~2Tselect-command: ~D~%" (-> this select-command))
(format #t "~2Tdrag-command: ~D~%" (-> this drag-command))
(format #t "~2Textra-command: ~D~%" (-> this extra-command))
(format #t "~2Tleft-handed: ~A~%" (-> this left-handed))
(format #t "~2Tlight-names: ~A~%" (-> this light-names))
(format #t "~2Texternal-cam-mode: ~A~%" (-> this external-cam-mode))
(format #t "~2Tcommand[6] @ #x~X~%" (-> this command))
(format #t "~2Tclose-menu-time: ~D~%" (-> this close-menu-time))
(format #t "~2Tmouse-pos: #<vector @ #x~X>~%" (-> this mouse-pos))
(format #t "~2Tmouse-end: #<vector @ #x~X>~%" (-> this mouse-end))
(format #t "~2Tmanipulator: #<manipulator @ #x~X>~%" (-> this manipulator))
(format #t "~2Tmouse-box[2] @ #x~X~%" (-> this mouse-box))
(format #t "~2Tmouse-hit: #<vector @ #x~X>~%" (-> this mouse-hit))
(format #t "~2Tmouse-normal: #<vector @ #x~X>~%" (-> this mouse-normal))
(format #t "~2Tfloat-variable: ~f~%" (-> this float-variable))
(format #t "~2Tfloat-step: ~f~%" (-> this float-step))
(format #t "~2Tfloat-max: ~f~%" (-> this float-max))
(format #t "~2Tfloat-min: ~f~%" (-> this float-min))
(format #t "~2Tfloat-id: ~D~%" (-> this float-id))
(label cfg-4)
this
)
;; definition of type editable-work
(deftype editable-work (basic)
((num-found int16)
(last-found int16)
(last-x float)
(last-y float)
(hide symbol)
(found editable 256)
(dists uint32 256)
)
)
;; definition for method 3 of type editable-work
(defmethod inspect ((this editable-work))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tnum-found: ~D~%" (-> this num-found))
(format #t "~1Tlast-found: ~D~%" (-> this last-found))
(format #t "~1Tlast-x: ~f~%" (-> this last-x))
(format #t "~1Tlast-y: ~f~%" (-> this last-y))
(format #t "~1Thide: ~A~%" (-> this hide))
(format #t "~1Tfound[256] @ #x~X~%" (-> this found))
(format #t "~1Tdists[256] @ #x~X~%" (-> this dists))
(label cfg-4)
this
)
;; definition for symbol *editable-work*, type editable-work
(define *editable-work* (new 'global 'editable-work))
;; definition for symbol *editable*, type (pointer editable-player)
(define *editable* (the-as (pointer editable-player) #f))
;; failed to figure out what this is:
0