decomp3: vivsol-edit, editable and nav mesh editor files (#4200)

- `visvol-edit`
- `editable`
- `editable-player`
- `mysql-nav-graph`
- `nav-graph-editor`
- `nav-mesh-editor-h`
- `nav-mesh-editor`

The SQL data is not filled in yet.
This commit is contained in:
Hat Kid
2026-04-08 17:42:13 +02:00
committed by GitHub
parent b5269a80ee
commit 3f686854e6
41 changed files with 34829 additions and 1146 deletions
+314 -249
View File
@@ -136,6 +136,7 @@
(declare-type sql-result basic)
(define-extern sql-query (function string sql-result))
(define-extern *collapse-quote* symbol)
(define-extern loading-level kheap)
(define-extern dma-sync (function pointer int int int))
@@ -19135,7 +19136,7 @@
(define-extern reset-light-hash
"Resets the global [[*light-hash*]] back to having `0` lights, indicies, and buckets.
@returns [[none]]"
(function none)) ;;
(function light-hash none)) ;;
(define-extern update-light-hash (function light-hash none)) ;;
(define-extern lookup-light-sphere-by-name
"Search through a given [[light-hash]]'s lights to find the one that matches the given name
@@ -39933,6 +39934,7 @@
:type uint32
(mm0 0)
(mm1 1)
(mm2 2)
)
;; ---manipulator:manipulator-mode
@@ -39967,7 +39969,7 @@
:flag-assert #xf000000b0
(:methods
(set-mode (_type_ manipulator-mode) none) ;; 9
(manipulator-method-10 (_type_) none) ;; 10
(manipulator-method-10 (_type_ vector vector) none) ;; 10
(manipulator-method-11 (_type_) none) ;; 11
(manipulator-method-12 (_type_ vector) none) ;; 12
(manipulator-method-13 (_type_ vector vector) none) ;; 13
@@ -40087,6 +40089,7 @@
)
;; ---editable-h:editable-filter
(declare-type editable-array basic)
(deftype editable-region (basic)
((changed symbol :offset-assert 4) ;; guessed by decompiler
(locked symbol :offset-assert 8) ;; guessed by decompiler
@@ -40094,9 +40097,9 @@
(filter editable-filter :offset-assert 24) ;; guessed by decompiler
(tree symbol :offset-assert 28) ;; guessed by decompiler
(level string :offset-assert 32) ;; guessed by decompiler
(on-enter string :offset-assert 36) ;; guessed by decompiler
(on-inside string :offset-assert 40) ;; guessed by decompiler
(on-exit string :offset-assert 44) ;; guessed by decompiler
(on-enter pair :offset-assert 36) ;; guessed by decompiler
(on-inside pair :offset-assert 40) ;; guessed by decompiler
(on-exit pair :offset-assert 44) ;; guessed by decompiler
)
:method-count-assert 13
:size-assert #x30
@@ -40104,10 +40107,10 @@
;; field on-enter uses ~A with a signed load. field on-inside uses ~A with a signed load. field on-exit uses ~A with a signed load.
(:methods
(new (symbol type) _type_) ;; 0
(editable-region-method-9 () none) ;; 9 ;; (editable-region-method-9 (_type_ editable-array int int) symbol)
(editable-region-method-10 () none) ;; 10 ;; (editable-region-method-10 (_type_ int) symbol)
(editable-region-method-11 () none) ;; 11 ;; (editable-region-method-11 (_type_ vector int) none)
(editable-region-method-12 () none) ;; 12 ;; (editable-region-method-12 (_type_) editable-filter)
(save-region! (_type_ editable-array int int) symbol) ;; 9 ;; (editable-region-method-9 (_type_ editable-array int int) symbol)
(editable-region-method-10 (_type_ int) symbol) ;; 10 ;; (editable-region-method-10 (_type_ int) symbol)
(print-region-info (_type_ vector int) none) ;; 11 ;; (editable-region-method-11 (_type_ vector int) none)
(editable-region-method-12 (_type_) editable-filter) ;; 12 ;; (editable-region-method-12 (_type_) editable-filter)
)
)
@@ -40142,33 +40145,33 @@
:size-assert #x1c
:flag-assert #x240000001c
(:methods
(editable-method-9 () none) ;; 9 ;; (get-color (_type_ int) rgba)
(editable-method-10 () none) ;; 10 ;; (editable-method-10 (_type_) none)
(editable-method-11 () none) ;; 11 ;; (editable-method-11 (_type_ vector) symbol)
(editable-method-12 () none) ;; 12 ;; (select-editable! (_type_ symbol) none)
(editable-method-13 () none) ;; 13 ;; (edit-get-distance (_type_ vector) float)
(editable-method-14 () none) ;; 14 ;; (edit-get-trans (_type_) vector)
(editable-method-15 () none) ;; 15 ;; (editable-method-15 (_type_ vector int) none)
(editable-method-16 () none) ;; 16 ;; (edit-coord! (_type_ vector editable-flag) none)
(editable-method-17 () none) ;; 17 ;; (editable-method-17 (_type_ vector) none)
(editable-method-18 () none) ;; 18 ;; (editable-method-18 (_type_ vector matrix) none)
(editable-method-19 () none) ;; 19 ;; (editable-method-19 (_type_ vector) none)
(editable-method-20 () none) ;; 20 ;; (editable-method-20 (_type_ vector vector vector vector) none)
(editable-method-21 () none) ;; 21 ;; (editable-method-21 (_type_ editable-region) none)
(editable-method-22 () none) ;; 22 ;; (editable-method-22 (_type_ editable-array int int) symbol)
(editable-method-23 () none) ;; 23 ;; (editable-method-23 (_type_) symbol)
(editable-method-24 () none) ;; 24 ;; (editable-method-24 (_type_) none)
(editable-method-25 () none) ;; 25 ;; (editable-method-25 (_type_ editable-array) none)
(editable-method-26 () none) ;; 26 ;; (editable-method-26 (_type_ editable editable-array) none)
(editable-method-27 () none) ;; 27 ;; (editable-method-27 (_type_ editable-array) editable)
(editable-method-28 () none) ;; 28 ;; (editable-method-28 (_type_ editable-filter) none)
(editable-method-29 () none) ;; 29 ;; (editable-method-29 (_type_ editable-filter) symbol)
(editable-method-30 () none) ;; 30
(editable-method-31 () none) ;; 31
(editable-method-32 () none) ;; 32
(editable-method-33 () none) ;; 33
(editable-method-34 () none) ;; 34
(editable-method-35 () none) ;; 35
(get-color (_type_) rgba) ;; 9 ;; (get-color (_type_ int) rgba)
(editable-method-10 (_type_) none) ;; 10 ;; (editable-method-10 (_type_) none)
(editable-method-11 (_type_ vector) symbol) ;; 11 ;; (editable-method-11 (_type_ vector) symbol)
(set-selected! (_type_ symbol) none) ;; 12 ;; (select-editable! (_type_ symbol) none)
(editable-method-13 (_type_ vector) float) ;; 13 ;; (edit-get-distance (_type_ vector) float)
(editable-method-14 (_type_ vector vector) float) ;; 14 ;; (edit-get-trans (_type_) vector)
(editable-method-15 (_type_) vector) ;; 15 ;; (editable-method-15 (_type_ vector int) none)
(editable-method-16 (_type_) float) ;; 16 ;; (edit-coord! (_type_ vector editable-flag) none)
(editable-method-17 (_type_ vector editable-flag) none) ;; 17 ;; (editable-method-17 (_type_ vector) none)
(editable-method-18 (_type_ vector int) none) ;; 18 ;; (editable-method-18 (_type_ vector matrix) none)
(editable-method-19 (_type_ vector) none) ;; 19 ;; (editable-method-19 (_type_ vector) none)
(editable-method-20 (_type_ vector matrix) none) ;; 20 ;; (editable-method-20 (_type_ vector vector vector vector) none)
(editable-method-21 (_type_ vector) none) ;; 21 ;; (editable-method-21 (_type_ editable-region) none)
(editable-method-22 (_type_ vector vector vector vector) none) ;; 22 ;; (editable-method-22 (_type_ editable-array int int) symbol)
(change-region! (_type_ editable-region) none) ;; 23 ;; (editable-method-23 (_type_) symbol)
(editable-method-24 (_type_ editable-array int int) symbol) ;; 24 ;; (editable-method-24 (_type_) none)
(editable-method-25 (_type_) symbol) ;; 25 ;; (editable-method-25 (_type_ editable-array) none)
(editable-method-26 (_type_) none) ;; 26 ;; (editable-method-26 (_type_ editable editable-array) none)
(delete! (_type_ editable) none) ;; 27 ;; (editable-method-27 (_type_ editable-array) editable)
(editable-method-28 (_type_ editable editable) none) ;; 28 ;; (editable-method-28 (_type_ editable-filter) none)
(copy-into-editable-array! (_type_ editable-array) editable) ;; 29 ;; (editable-method-29 (_type_ editable-filter) symbol)
(editable-method-30 (_type_ editable-flag) none) ;; 30
(editable-method-31 (_type_ editable-flag) none) ;; 31
(get-null-vec (_type_) vector) ;; 32
(get-null-vec2 (_type_ vector) vector) ;; 33
(get-level-offset (_type_ editable-array) vector) ;; 34
(editable-method-35 (_type_ vector) none) ;; 35
)
)
@@ -40201,17 +40204,17 @@
:flag-assert #x140000007c
(:methods
(new (symbol type int) _type_) ;; 0
(editable-array-method-9 () none) ;; 9 ;; (editable-array-method-9 (_type_ editable-command mouse-info) symbol)
(editable-array-method-10 () none) ;; 10 ;; (editable-array-method-10 (_type_ vector int) editable)
(editable-array-method-11 () none) ;; 11 ;; (editable-array-method-11 (_type_) int)
(editable-array-method-12 () none) ;; 12 ;; (editable-array-method-12 (_type_ editable-array) none)
(editable-array-method-13 () none) ;; 13 ;; (editable-array-method-13 (_type_ editable-command editable-command string) none)
(editable-array-method-14 () none) ;; 14 ;; (editable-array-method-14 (_type_ (function editable editable-region symbol) editable-region) (array editable))
(editable-array-method-15 () none) ;; 15 ;; (editable-array-method-15 (_type_ editable) none)
(editable-array-method-16 () none) ;; 16 ;; (editable-array-method-16 (_type_) none)
(editable-array-method-17 () none) ;; 17 ;; (editable-array-method-17 (_type_ vector vector) vector)
(editable-array-method-18 () none) ;; 18
(editable-array-method-19 () none) ;; 19
(handle-cmd (_type_ editable-command mouse-info object) symbol) ;; 9 ;; (editable-array-method-9 (_type_ editable-command mouse-info) symbol)
(editable-array-method-10 (_type_ vector int) editable) ;; 10 ;; (editable-array-method-10 (_type_ vector int) editable)
(editable-array-method-11 (_type_ vector vector int) none) ;; 11 ;; (editable-array-method-11 (_type_) int)
(get-length (_type_) int) ;; 12 ;; (editable-array-method-12 (_type_ editable-array) none)
(editable-array-method-13 (_type_ symbol) symbol) ;; 13 ;; (editable-array-method-13 (_type_ editable-command editable-command string) none)
(editable-array-method-14 (_type_ editable-command editable-command string) none) ;; 14 ;; (editable-array-method-14 (_type_ (function editable editable-region symbol) editable-region) (array editable))
(editable-array-method-15 (_type_ (function editable editable-region symbol) editable-region) (array editable)) ;; 15 ;; (editable-array-method-15 (_type_ editable) none)
(editable-array-method-16 (_type_ editable) none) ;; 16 ;; (editable-array-method-16 (_type_) none)
(editable-array-method-17 (_type_) none) ;; 17 ;; (editable-array-method-17 (_type_ vector vector) vector)
(editable-array-method-18 (_type_ vector vector) vector) ;; 18
(editable-array-method-19 (_type_ string) symbol) ;; 19
)
)
@@ -40275,7 +40278,8 @@
:flag-assert #x2500000044
(:methods
(new (symbol type vector float editable-region) _type_) ;; 0
(editable-entity-method-36 () none) ;; 36
(editable-entity-method-36 (_type_) none) ;; 36
(copy-into-editable-array! (_type_ editable-array) editable-entity :replace)
)
)
@@ -40290,8 +40294,9 @@
:flag-assert #x2600000058
(:methods
(new (symbol type editable-region) _type_) ;; 0
(editable-face-method-36 () none) ;; 36
(editable-face-method-37 () none) ;; 37
(editable-face-method-36 (_type_ (inline-array vector)) int) ;; 36
(editable-face-method-37 (_type_ vector) vector) ;; 37
(copy-into-editable-array! (_type_ editable-array) editable-face :replace)
)
)
@@ -40305,8 +40310,9 @@
:flag-assert #x260000002c
(:methods
(new (symbol type editable-region) _type_) ;; 0
(editable-plane-method-36 () none) ;; 36
(editable-plane-method-37 () none) ;; 37
(editable-plane-method-36 (_type_ (inline-array vector)) int) ;; 36
(editable-plane-method-37 (_type_ vector) vector) ;; 37
(copy-into-editable-array! (_type_ editable-array) editable-plane :replace)
)
)
@@ -40314,10 +40320,10 @@
(declare-type editable-array basic)
(deftype editable-player (process-drawable)
((current editable-array :offset-assert 200) ;; guessed by decompiler
(current-command uint32 :offset-assert 204)
(select-command function :offset-assert 208) ;; guessed by decompiler
(current-command editable-command :offset-assert 204)
(select-command (function object) :offset-assert 208) ;; guessed by decompiler
(drag-command uint32 :offset-assert 212)
(extra-command function :offset-assert 216) ;; guessed by decompiler
(extra-command (function object) :offset-assert 216) ;; guessed by decompiler
(left-handed basic :offset-assert 220)
(light-names basic :offset-assert 224)
(external-cam-mode symbol :offset-assert 228) ;; guessed by decompiler
@@ -40338,11 +40344,13 @@
:method-count-assert 24
:size-assert #x234
:flag-assert #x1801c00234
(:state-methods
idle
)
(:methods
(editable-player-method-20 () none) ;; 20 ;; (idle () _type_ :state)
(editable-player-method-21 () none) ;; 21 ;; (editable-player-method-21 (_type_) none)
(editable-player-method-22 () none) ;; 22
(editable-player-method-23 () none) ;; 23
(editable-player-method-21 (_type_) none) ;; 21 ;; (editable-player-method-21 (_type_) none)
(editable-player-method-22 (_type_) none) ;; 22
(editable-player-method-23 (_type_) symbol) ;; 23
)
)
@@ -40371,43 +40379,43 @@
;; editable ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; (define-extern common-owner function)
;; (define-extern update-light-sphere-from-editable-light function) ;; (function editable-light none)
;; (define-extern load-editable-lights function)
;; (define-extern *editable-sample-region* object) ;; editable-region
;; (define-extern *editable-light-region* object) ;; editable-region
;; (define-extern *editable-entity-region* object) ;; editable-region
(define-extern common-owner (function editable editable object))
(define-extern update-light-sphere-from-editable-light (function editable-light object))
(define-extern load-editable-lights (function editable-array symbol))
(define-extern *editable-sample-region* editable-region)
(define-extern *editable-light-region* editable-region)
(define-extern *editable-entity-region* editable-region)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; editable-player ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; (define-extern cleanup-selection function) ;; (function editable-array none)
;; (define-extern insert-box function) ;; (function editable-array vector none)
;; (define-extern insert-wall function)
;; (define-extern update-manipulator-position function)
;; (define-extern execute-select function) ;; (function editable-array editable-command mouse-info symbol)
;; (define-extern execute-mouse-move function) ;; (function editable-array editable-command mouse-info symbol)
;; (define-extern execute-move function) ;; (function editable-array editable-command mouse-info symbol)
;; (define-extern get-light-value function)
;; (define-extern set-light-value function)
;; (define-extern keybd-set-time-of-day! function)
(define-extern cleanup-selection (function editable-array object))
(define-extern insert-box (function editable-array vector vector object))
(define-extern insert-wall (function editable-array vector vector object))
(define-extern update-manipulator-position (function editable-array manipulator matrix))
(define-extern execute-select (function editable-array editable-command mouse-info manipulator symbol))
(define-extern execute-mouse-move (function editable-array editable-command mouse-info manipulator symbol))
(define-extern execute-move (function editable-array editable-command mouse-info manipulator symbol))
(define-extern get-light-value (function uint float))
(define-extern set-light-value (function int float object))
(define-extern keybd-set-time-of-day! (function int time-of-day-palette-id object))
(define-extern editable-player-init (function symbol none :behavior editable-player))
;; (define-extern set-editable-name function)
;; (define-extern select-editable-by-name function)
(define-extern set-editable-name (function string object))
(define-extern select-editable-by-name (function string object))
(define-extern *editable-menu-context* debug-menu-context)
;; (define-extern editable-menu-command function) ;; (function int none)
;; (define-extern editable-menu-command-no-close function) ;; (function int none)
;; (define-extern dm-region-tree-pick-func function) ;; (function symbol debug-menu-msg symbol)
;; (define-extern dm-editable-flag-pick-func function) ;; (function editable-flag debug-menu-msg symbol)
;; (define-extern dm-editable-filter0-pick-func function) ;; (function editable-filter debug-menu-msg symbol)
;; (define-extern dm-editable-filter1-pick-func function) ;; (function editable-filter debug-menu-msg symbol)
;; (define-extern dm-editable-light-float-func function) ;; (function int debug-menu-msg float float float)
;; (define-extern dm-cam-externalize2 function) ;; (function symbol debug-menu-msg symbol)
;; (define-extern dm-editable-boolean-toggle-pick-func function) ;; (function int debug-menu-msg symbol)
;; (define-extern editable-menu-context-make-menus function) ;; (function debug-menu-context debug-menu-context)
;; (define-extern insert-sample-camera function) ;; (function symbol none)
;; (define-extern *debug-hook* object) ;; pair
(define-extern editable-menu-command (function int object))
(define-extern editable-menu-command-no-close (function int object))
(define-extern dm-region-tree-pick-func (function symbol debug-menu-msg symbol))
(define-extern dm-editable-flag-pick-func (function editable-flag debug-menu-msg symbol))
(define-extern dm-editable-filter0-pick-func (function editable-filter debug-menu-msg symbol))
(define-extern dm-editable-filter1-pick-func (function editable-filter debug-menu-msg symbol))
(define-extern dm-editable-light-float-func (function int debug-menu-msg float float float))
(define-extern dm-cam-externalize2 (function symbol debug-menu-msg symbol))
(define-extern dm-editable-boolean-toggle-pick-func (function int debug-menu-msg symbol))
(define-extern editable-menu-context-make-menus (function debug-menu-context debug-menu-context))
(define-extern insert-sample-camera (function symbol object))
(define-extern *debug-hook* pair)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; mysql-nav-graph ;;
@@ -40428,11 +40436,13 @@
"This string value is stored in their SQL database"
:type uint32
:bitfield #t
(visited 0)
(blocked 1)
(pedestrian 2)
(selected 3)
(hidden 4)
(blocker 0)
(pov 1)
(visited 2)
(blocked 3)
(pedestrian 4)
(selected 5)
(hidden 6)
)
;; ---mysql-nav-graph:nav-node-flag
@@ -40510,6 +40520,21 @@
)
;; ---mysql-nav-graph:nav-clock-type
;; +++mysql-nav-graph:nav-minimap-edge-flag
(defenum nav-minimap-edge-flag
"This string value is stored in their SQL database"
:type int32
:bitfield #t
(blocker 0)
(one-way 1)
(pass-port-mh 2)
(pass-port-inda 3)
(pass-inda-indb 4)
(pass-indb-sluma 5)
(pass-slumb-genb 6)
)
;; ---mysql-nav-graph:nav-minimap-edge-flag
(deftype mysql-nav-edge (structure)
((mysql-save-flag mysql-save-flag :offset-assert 0) ;; guessed by decompiler
(runtime-id uint32 :offset-assert 4)
@@ -40529,14 +40554,14 @@
(nav_territory_type uint32 :offset-assert 60)
(exclusive_data uint32 :offset-assert 64)
(width float :offset-assert 68)
(minimap_edge_flag int32 :offset-assert 72) ;; nav-minimap-edge-flag
(minimap_edge_flag nav-minimap-edge-flag :offset-assert 72) ;; nav-minimap-edge-flag
)
:allow-misaligned
:method-count-assert 10
:size-assert #x4c
:flag-assert #xa0000004c
(:methods
(mysql-nav-edge-method-9 () none) ;; 9 ;; (exec-sql! (_type_) symbol)
(exec-sql! (_type_) symbol) ;; 9
)
)
@@ -40561,7 +40586,7 @@
:size-assert #x1c
:flag-assert #xa0000001c
(:methods
(mysql-nav-visnode-method-9 () none) ;; 9 ;; (exec-sql! (_type_) symbol)
(exec-sql! (_type_) symbol) ;; 9
)
)
@@ -40597,11 +40622,11 @@
(deftype mysql-nav-graph (basic)
((nav_graph_id uint32 :offset-assert 4)
(graph-type basic :offset-assert 8)
(graph-type symbol :offset-assert 8)
(node-array mysql-nav-node-array :offset-assert 12) ;; guessed by decompiler
(edge-array mysql-nav-edge-array :offset-assert 16) ;; guessed by decompiler
(visnode-array mysql-nav-visnode-array :offset-assert 20) ;; guessed by decompiler
(pov-conn-array uint32 :offset-assert 24)
(pov-conn-array (inline-array mysql-nav-pov-conn) :offset-assert 24)
(pov-conn-array-length int32 :offset-assert 28)
(level-info-array-length int32 :offset-assert 32)
(level-info-last-lookup int32 :offset-assert 36)
@@ -40612,21 +40637,21 @@
:flag-assert #x1800000428
(:methods
(new (symbol type string) _type_) ;; 0
(init-from-sql! (_type_ string string) symbol) ;; 9
(init-from-sql! (_type_ symbol string) symbol) ;; 9
(exec-sql! (_type_) symbol) ;; 10
(indexof-nav-node (_type_ int) int) ;; 11
(indexof-nav-edge (_type_ int) int) ;; 12
(mysql-nav-graph-method-13 (_type_) none) ;; 13 ;; (alloc-new-node! (_type_) int)
(mysql-nav-graph-method-14 (_type_) none) ;; 14 ;; (alloc-new-edge! (_type_) int)
(mysql-nav-graph-method-15 (_type_) none) ;; 15 ;; (indexof-visnode (_type_ int int) int)
(mysql-nav-graph-method-16 (_type_) none) ;; 16 ;; (alloc-new-visnode! (_type_ int int) int)
(mysql-nav-graph-method-17 (_type_) none) ;; 17 ;; (mysql-nav-graph-method-17 (_type_) none)
(alloc-new-node! (_type_) int) ;; 13
(alloc-new-edge! (_type_) int) ;; 14
(indexof-visnode (_type_ int int) int) ;; 15
(alloc-new-visnode! (_type_ int int) int) ;; 16
(mysql-nav-graph-method-17 (_type_) none) ;; 17
(lookup-level-info2 (_type_ mysql-nav-node symbol) mysql-nav-graph-level-info) ;; 18
(mysql-nav-graph-method-19 (_type_) none) ;; 19 ;; (mysql-nav-graph-method-19 (_type_) none)
(mysql-nav-graph-method-20 (_type_) none) ;; 20 ;; (mysql-nav-graph-method-20 (_type_) none)
(mysql-nav-graph-method-21 (_type_) none) ;; 21
(mysql-nav-graph-method-22 (_type_) none) ;; 22
(mysql-nav-graph-method-23 (_type_) none) ;; 23
(mysql-nav-graph-method-19 (_type_) int) ;; 19
(mysql-nav-graph-method-20 (_type_) none) ;; 20
(get-graph-type (_type_ symbol) symbol) ;; 21
(mysql-nav-graph-method-22 (_type_) int) ;; 22
(mysql-nav-graph-method-23 (_type_ vector vector) symbol) ;; 23
)
)
@@ -40634,8 +40659,21 @@
;; nav-graph-editor ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; +++nav-graph-editor:nav-com-type
(defenum nav-com-type
:type uint32
(undo-move-node 0)
(undo-delete-edge 1)
(undo-delete-node 2)
(undo-new-node 3)
(undo-new-edge 4)
(undo-delete-visnode 5)
(undo-new-visnode 6)
)
;; ---nav-graph-editor:nav-com-type
(deftype nav-graph-command (structure)
((com-type uint32 :offset-assert 0)
((com-type nav-com-type :offset-assert 0)
(id int32 :offset-assert 4)
(index int32 :offset-assert 8)
(move-vec vector :inline :offset-assert 16)
@@ -40704,63 +40742,63 @@
create-pov ;; 28
)
(:methods
(nav-graph-editor-method-29 () none) ;; 29 ;; (nav-graph-editor-method-29 (_type_ string string string) none)
(nav-graph-editor-method-30 () none) ;; 30 ;; (nav-graph-editor-method-30 (_type_ int) symbol)
(nav-graph-editor-method-31 () none) ;; 31 ;; (nav-graph-editor-method-31 (_type_ int) symbol)
(nav-graph-editor-method-32 () none) ;; 32 ;; (nav-graph-editor-method-32 (_type_ symbol int) none)
(nav-graph-editor-method-33 () none) ;; 33 ;; (nav-graph-editor-method-33 (_type_ int) none)
(nav-graph-editor-method-34 () none) ;; 34 ;; (nav-graph-editor-method-34 (_type_) object)
(nav-graph-editor-method-35 () none) ;; 35 ;; (nav-graph-editor-method-35 (_type_) none)
(nav-graph-editor-method-36 () none) ;; 36 ;; (nav-graph-editor-method-36 (_type_) none)
(nav-graph-editor-method-37 () none) ;; 37 ;; (nav-graph-editor-method-37 (_type_) none)
(nav-graph-editor-method-38 () none) ;; 38 ;; (nav-graph-editor-method-38 (_type_) none)
(nav-graph-editor-method-39 () none) ;; 39 ;; (nav-graph-editor-method-39 (_type_) none)
(nav-graph-editor-method-40 () none) ;; 40 ;; (nav-graph-editor-method-40 (_type_) none)
(nav-graph-editor-method-41 () none) ;; 41 ;; (nav-graph-editor-method-41 (_type_) none)
(nav-graph-editor-method-42 () none) ;; 42 ;; (nav-graph-editor-method-42 (_type_) symbol)
(nav-graph-editor-method-43 () none) ;; 43 ;; (nav-graph-editor-method-43 (_type_) none)
(nav-graph-editor-method-44 () none) ;; 44 ;; (nav-graph-editor-method-44 (_type_) symbol)
(nav-graph-editor-method-45 () none) ;; 45 ;; (nav-graph-editor-method-45 (_type_) none)
(nav-graph-editor-method-46 () none) ;; 46 ;; (nav-graph-editor-method-46 (_type_) pad-buttons)
(nav-graph-editor-method-47 () none) ;; 47 ;; (nav-graph-editor-method-47 (_type_) none)
(nav-graph-editor-method-48 () none) ;; 48 ;; (nav-graph-editor-method-48 (_type_ uint) nav-graph-command)
(nav-graph-editor-method-49 () none) ;; 49 ;; (nav-graph-editor-method-49 (_type_) nav-graph-command)
(nav-graph-editor-method-50 () none) ;; 50 ;; (nav-graph-editor-method-50 (_type_) none)
(nav-graph-editor-method-51 () none) ;; 51 ;; (nav-graph-editor-method-51 (_type_) none)
(nav-graph-editor-method-52 () none) ;; 52 ;; (nav-graph-editor-method-52 (_type_) uint)
(nav-graph-editor-method-53 () none) ;; 53 ;; (nav-graph-editor-method-53 (_type_ int int) none)
(nav-graph-editor-method-54 () none) ;; 54 ;; (nav-graph-editor-method-54 (_type_ int) none)
(nav-graph-editor-method-55 () none) ;; 55 ;; (nav-graph-editor-method-55 (_type_ int) none)
(nav-graph-editor-method-56 () none) ;; 56 ;; (nav-graph-editor-method-56 (_type_ int) none)
(nav-graph-editor-method-57 () none) ;; 57 ;; (nav-graph-editor-method-57 (_type_ int int) int)
(nav-graph-editor-method-58 () none) ;; 58 ;; (nav-graph-editor-method-58 (_type_) symbol)
(nav-graph-editor-method-59 () none) ;; 59 ;; (nav-graph-editor-method-59 (_type_) pad-buttons)
(nav-graph-editor-method-60 () none) ;; 60 ;; (nav-graph-editor-method-60 (_type_) none)
(nav-graph-editor-method-61 () none) ;; 61 ;; (nav-graph-editor-method-61 (_type_) none)
(nav-graph-editor-method-62 () none) ;; 62 ;; (nav-graph-editor-method-62 (_type_ symbol symbol) none)
(nav-graph-editor-method-63 () none) ;; 63 ;; (nav-graph-editor-method-63 (_type_) none)
(nav-graph-editor-method-64 () none) ;; 64
(nav-graph-editor-method-65 () none) ;; 65
(nav-graph-editor-method-66 () none) ;; 66
(nav-graph-editor-method-67 () none) ;; 67
(nav-graph-editor-method-29 (_type_) none) ;; 29 ;; (nav-graph-editor-method-29 (_type_ string string string) none)
(nav-graph-editor-method-30 (_type_ string string string) object) ;; 30 ;; (nav-graph-editor-method-30 (_type_ int) symbol)
(nav-graph-editor-method-31 (_type_ int) symbol) ;; 31 ;; (nav-graph-editor-method-31 (_type_ int) symbol)
(nav-graph-editor-method-32 (_type_ int) symbol) ;; 32 ;; (nav-graph-editor-method-32 (_type_ symbol int) none)
(nav-graph-editor-method-33 (_type_ int int) object) ;; 33 ;; (nav-graph-editor-method-33 (_type_ int) none)
(nav-graph-editor-method-34 (_type_ int) none) ;; 34 ;; (nav-graph-editor-method-34 (_type_) object)
(nav-graph-editor-method-35 (_type_ vector vector) none) ;; 35 ;; (nav-graph-editor-method-35 (_type_) none)
(nav-graph-editor-method-36 (_type_) none) ;; 36 ;; (nav-graph-editor-method-36 (_type_) none)
(nav-graph-editor-method-37 (_type_) object) ;; 37 ;; (nav-graph-editor-method-37 (_type_) none)
(nav-graph-editor-method-38 (_type_) none) ;; 38 ;; (nav-graph-editor-method-38 (_type_) none)
(nav-graph-editor-method-39 (_type_) none) ;; 39 ;; (nav-graph-editor-method-39 (_type_) none)
(nav-graph-editor-method-40 (_type_) none) ;; 40 ;; (nav-graph-editor-method-40 (_type_) none)
(nav-graph-editor-method-41 (_type_) none) ;; 41 ;; (nav-graph-editor-method-41 (_type_) none)
(nav-graph-editor-method-42 (_type_) none) ;; 42 ;; (nav-graph-editor-method-42 (_type_) symbol)
(nav-graph-editor-method-43 (_type_) none) ;; 43 ;; (nav-graph-editor-method-43 (_type_) none)
(nav-graph-editor-method-44 (_type_) none) ;; 44 ;; (nav-graph-editor-method-44 (_type_) symbol)
(nav-graph-editor-method-45 (_type_) none) ;; 45 ;; (nav-graph-editor-method-45 (_type_) none)
(nav-graph-editor-method-46 (_type_) none) ;; 46 ;; (nav-graph-editor-method-46 (_type_) pad-buttons)
(nav-graph-editor-method-47 (_type_) symbol) ;; 47 ;; (nav-graph-editor-method-47 (_type_) none)
(nav-graph-editor-method-48 (_type_) none) ;; 48 ;; (nav-graph-editor-method-48 (_type_ uint) nav-graph-command)
(nav-graph-editor-method-49 (_type_) symbol) ;; 49 ;; (nav-graph-editor-method-49 (_type_) nav-graph-command)
(nav-graph-editor-method-50 (_type_) none) ;; 50 ;; (nav-graph-editor-method-50 (_type_) none)
(inc-cmd-id! (_type_) int) ;; 51 ;; (nav-graph-editor-method-51 (_type_) none)
(alloc-new-cmd! (_type_ int) nav-graph-command) ;; 52 ;; (nav-graph-editor-method-52 (_type_) uint)
(get-last-cmd (_type_) nav-graph-command) ;; 53 ;; (nav-graph-editor-method-53 (_type_ int int) none)
(nav-graph-editor-method-54 (_type_) none) ;; 54 ;; (nav-graph-editor-method-54 (_type_ int) none)
(nav-graph-editor-method-55 (_type_) none) ;; 55 ;; (nav-graph-editor-method-55 (_type_ int) none)
(nav-graph-editor-method-56 (_type_) int) ;; 56 ;; (nav-graph-editor-method-56 (_type_ int) none)
(nav-graph-editor-method-57 (_type_ int int) none) ;; 57 ;; (nav-graph-editor-method-57 (_type_ int int) int)
(nav-graph-editor-method-58 (_type_ int) symbol) ;; 58 ;; (nav-graph-editor-method-58 (_type_) symbol)
(nav-graph-editor-method-59 (_type_ int) none) ;; 59 ;; (nav-graph-editor-method-59 (_type_) pad-buttons)
(nav-graph-editor-method-60 (_type_ int) none) ;; 60 ;; (nav-graph-editor-method-60 (_type_) none)
(nav-graph-editor-method-61 (_type_ int int) none) ;; 61 ;; (nav-graph-editor-method-61 (_type_) none)
(nav-graph-editor-method-62 (_type_) symbol) ;; 62 ;; (nav-graph-editor-method-62 (_type_ symbol symbol) none)
(nav-graph-editor-method-63 (_type_) none) ;; 63 ;; (nav-graph-editor-method-63 (_type_) none)
(nav-graph-editor-method-64 (_type_) none) ;; 64
(nav-graph-editor-method-65 (_type_) none) ;; 65
(nav-graph-editor-method-66 (_type_ symbol string) none) ;; 66
(nav-graph-editor-method-67 (_type_) none) ;; 67
)
)
(define-extern *nav-graph-editor* (pointer nav-graph-editor))
;; (define-extern get-node-draw-position function)
;; (define-extern nav-graph-editor-init-by-other function) ;; (function string none :behavior nav-graph-editor)
(define-extern run-nav-graph-editor (function symbol (pointer process)))
(define-extern get-node-draw-position (function vector mysql-nav-node vector))
(define-extern nav-graph-editor-init-by-other (function string symbol object :behavior nav-graph-editor))
(define-extern run-nav-graph-editor (function symbol symbol (pointer nav-graph-editor)))
(define-extern get-nav-graph-editor (function nav-graph-editor))
(define-extern exit-nav-graph-editor (function none))
;; (define-extern nav-graph-set-level function)
;; (define-extern set-minimap-edge-flag function) ;; (function nav-minimap-edge-flag uint)
;; (define-extern set-vehicle-edit-mode function) ;; (function symbol none)
;; (define-extern translate-nav-graph function) ;; (function float float float symbol)
;; (define-extern update-nav-meshes function) ;; (function symbol)
;; (define-extern delete-node-nav-mesh function)
;; (define-extern smooth-nav-graph function) ;; (function string symbol)
;; (define-extern update-height function) ;; (function string symbol)
;; (define-extern update-width function) ;; (function string symbol)
(define-extern nav-graph-set-level (function symbol object))
(define-extern set-minimap-edge-flag (function nav-minimap-edge-flag none))
(define-extern set-vehicle-edit-mode (function symbol none))
(define-extern translate-nav-graph (function float float float symbol))
(define-extern update-nav-meshes (function symbol))
(define-extern delete-node-nav-mesh (function int none))
(define-extern smooth-nav-graph (function string symbol))
(define-extern update-height (function string symbol))
(define-extern update-width (function string symbol))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; nav-mesh-editor-h ;;
@@ -40776,10 +40814,22 @@
:flag-assert #xe00000010
)
;; +++nav-mesh-editor-h:nav-mesh-poly-flag
(defenum nav-mesh-poly-flag
:type uint32
:bitfield #t
(gap 0)
(off 1)
(nmpf2 2)
(user0 3)
)
;; ---nav-mesh-editor-h:nav-mesh-poly-flag
(declare-type nav-mesh-editable structure)
(deftype nav-mesh-poly (structure)
((poly-id uint32 :offset-assert 0)
(flags uint32 :offset-assert 4)
(index basic :offset-assert 8)
(flags nav-mesh-poly-flag :offset-assert 4)
(index int16-array :offset-assert 8)
(insert-pos uint32 :offset-assert 12)
)
:method-count-assert 15
@@ -40787,12 +40837,12 @@
:flag-assert #xf00000010
(:methods
(new (symbol type) _type_) ;; 0
(nav-mesh-poly-method-9 () none) ;; 9
(nav-mesh-poly-method-10 () none) ;; 10
(nav-mesh-poly-method-11 () none) ;; 11
(nav-mesh-poly-method-12 () none) ;; 12
(nav-mesh-poly-method-13 () none) ;; 13
(nav-mesh-poly-method-14 () none) ;; 14
(init-fields! (_type_) none) ;; 9
(nav-mesh-poly-method-10 (_type_ nav-mesh-editable) none) ;; 10
(nav-mesh-poly-method-11 (_type_ int) none) ;; 11
(nav-mesh-poly-method-12 (_type_ int) none) ;; 12
(nav-mesh-poly-method-13 (_type_ int) int) ;; 13
(nav-mesh-poly-method-14 (_type_ int int) object) ;; 14
)
)
@@ -40805,8 +40855,8 @@
)
(deftype nav-mesh-tri-quad (structure)
((indices int32 4 :offset-assert 0)
(poly uint32 :offset-assert 16)
((indices uint32 4 :offset-assert 0) ;; changed from int32
(poly uint32 :offset-assert 16)
)
:method-count-assert 9
:size-assert #x14
@@ -40821,10 +40871,18 @@
:flag-assert #xe00000010
)
;; +++nav-mesh-editor-h:nav-mesh-editable-flag
(defenum nav-mesh-editable-flag
:type uint32
:bitfield #t
(nmef0 0)
)
;; ---nav-mesh-editor-h:nav-mesh-editable-flag
(deftype nav-mesh-editable (structure)
((flags uint32 :offset-assert 0)
(verts basic :offset-assert 4)
(tris basic :offset-assert 8)
((flags nav-mesh-editable-flag :offset-assert 0)
(verts vector-array :offset-assert 4)
(tris nav-mesh-tri-quad-array :offset-assert 8)
(quads nav-mesh-tri-quad-array :offset-assert 12)
(navmesh-id uint32 :offset-assert 16)
(idx uint32 :offset-assert 20)
@@ -40837,16 +40895,17 @@
:size-assert #x28
:flag-assert #x1300000028
(:methods
(nav-mesh-editable-method-9 () none) ;; 9
(nav-mesh-editable-method-10 () none) ;; 10
(nav-mesh-editable-method-11 () none) ;; 11
(nav-mesh-editable-method-12 () none) ;; 12
(nav-mesh-editable-method-13 () none) ;; 13
(nav-mesh-editable-method-14 () none) ;; 14
(nav-mesh-editable-method-15 () none) ;; 15
(nav-mesh-editable-method-16 () none) ;; 16
(nav-mesh-editable-method-17 () none) ;; 17
(nav-mesh-editable-method-18 () none) ;; 18
(new (symbol type) _type_) ;; 0
(init-fields! (_type_) none) ;; 9
(nav-mesh-editable-method-10 (_type_ symbol) none) ;; 10
(add-vert! (_type_ vector) int) ;; 11
(nav-mesh-editable-method-12 (_type_ vector symbol) object) ;; 12
(nav-mesh-editable-method-13 (_type_) none) ;; 13
(nav-mesh-editable-method-14 (_type_ vector) int) ;; 14
(nav-mesh-editable-method-15 (_type_ int) object) ;; 15
(nav-mesh-editable-method-16 (_type_) object) ;; 16
(nav-mesh-editable-method-17 (_type_) object) ;; 17
(nav-mesh-editable-method-18 (_type_) none) ;; 18
)
)
@@ -40861,16 +40920,16 @@
(deftype nav-mesh-editor-undo (structure)
((current-nav-mesh nav-mesh-editable :offset-assert 0)
(selected-poly uint32 :offset-assert 4)
(index basic :offset-assert 8)
(index int16-array :offset-assert 8)
(insert-pos uint32 :offset-assert 12)
(verts basic :offset-assert 16)
(verts vector-array :offset-assert 16)
)
:method-count-assert 10
:size-assert #x14
:flag-assert #xa00000014
(:methods
(new (symbol type) _type_) ;; 0
(nav-mesh-editor-undo-method-9 () none) ;; 9
(init-fields! (_type_) none) ;; 9
)
)
@@ -40883,9 +40942,9 @@
)
(deftype nav-mesh-editor (process-drawable)
((close-menu-time uint64 :offset-assert 200)
(external-cam-mode basic :offset-assert 208)
(mouse-pressed uint64 :offset-assert 216)
((close-menu-time time-frame :offset-assert 200)
(external-cam-mode symbol :offset-assert 208)
(mouse-pressed time-frame :offset-assert 216)
(mouse-screen-pos vector :inline :offset-assert 224)
(mouse-pos vector :inline :offset-assert 240)
(mouse-end vector :inline :offset-assert 256)
@@ -40901,74 +40960,74 @@
(lock-action basic :offset-assert 400)
(mouse-action uint32 :offset-assert 404)
(mouse-action-pos-ref vector :inline :offset-assert 416)
(nav-meshes basic :offset-assert 432)
(nav-meshes nav-mesh-editable-array :offset-assert 432)
(current-nav-mesh nav-mesh-editable :offset-assert 436)
(manipulator manipulator :inline :offset-assert 448)
(level-name basic :offset-assert 624)
(level-name string :offset-assert 624)
(level-id uint32 :offset-assert 628)
(undo-min uint32 :offset-assert 632)
(undo-id uint32 :offset-assert 636)
(undo-max uint32 :offset-assert 640)
(undos basic :offset-assert 644)
(hide-unselected basic :offset-assert 648)
(allow-snap basic :offset-assert 652)
(undos nav-mesh-editor-undo-array :offset-assert 644)
(hide-unselected symbol :offset-assert 648)
(allow-snap symbol :offset-assert 652)
)
:method-count-assert 28
:size-assert #x290
:flag-assert #x1c02100290
(:state-methods
idle ;; 20
)
(:methods
(nav-mesh-editor-method-20 () none) ;; 20
(nav-mesh-editor-method-21 () none) ;; 21
(nav-mesh-editor-method-22 () none) ;; 22
(nav-mesh-editor-method-23 () none) ;; 23
(nav-mesh-editor-method-24 () none) ;; 24
(nav-mesh-editor-method-25 () none) ;; 25
(nav-mesh-editor-method-26 () none) ;; 26
(nav-mesh-editor-method-27 () none) ;; 27
(nav-mesh-editor-method-21 (_type_) none) ;; 21
(nav-mesh-editor-method-22 (_type_) none) ;; 22
(set-level-info! (_type_ symbol) none) ;; 23
(select-nav-mesh-by-id (_type_ int) object) ;; 24
(nav-mesh-editor-method-25 (_type_) none) ;; 25
(nav-mesh-editor-method-26 (_type_) none) ;; 26
(nav-mesh-editor-method-27 (_type_) object) ;; 27
)
)
(define-extern *nav-mesh-editor* nav-mesh-editor)
(define-extern *nav-mesh-editor* (pointer nav-mesh-editor))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; nav-mesh-editor ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#|
(deftype triangulation-vert (structure)
((index uint32 :offset-assert 0)
(ear? basic :offset-assert 4)
(ear? symbol :offset-assert 4)
(score float :offset-assert 8)
)
:method-count-assert 9
:size-assert #xc
:flag-assert #x90000000c
)
|#
;; (define-extern snap-level-navmesh function)
;; (define-extern mouse-intersect-triangle function)
;; (define-extern *clean-vertex-array* object)
;; (define-extern *clean-index-array* object)
;; (define-extern poly-flag-to-string function)
;; (define-extern point-in-cone function)
;; (define-extern segment-in-cone function)
;; (define-extern point-in-triangle function)
;; (define-extern segments-intersect function)
;; (define-extern is-diagonal function)
;; (define-extern *verts-buf-1* object)
;; (define-extern *verts-buf-2* object)
;; (define-extern draw-square-point function)
;; (define-extern get-level-id function)
;; (define-extern nav-mesh-editor-new function)
;; (define-extern nav-delete function)
;; (define-extern nav-mesh-editor-translate function)
;; (define-extern nav-mesh-editor-rotate-y function)
;; (define-extern nav-mesh-editor-load function)
;; (define-extern nav-mesh-editor-set-level function)
;; (define-extern nav-set-lev function)
;; (define-extern nav-set-flag function)
(define-extern nav-mesh-editor-init (function none))
(define-extern snap-level-navmesh (function vector vector symbol))
(define-extern mouse-intersect-triangle (function vector vector vector vector float))
(define-extern *clean-vertex-array* (inline-array vector))
(define-extern *clean-index-array* (pointer int32))
(define-extern poly-flag-to-string (function object nav-mesh-poly-flag object))
(define-extern point-in-cone (function vector vector vector vector symbol))
(define-extern segment-in-cone (function vector vector vector vector symbol))
(define-extern point-in-triangle (function vector vector vector vector symbol))
(define-extern segments-intersect (function vector vector vector vector symbol))
(define-extern is-diagonal (function int (inline-array triangulation-vert) vector-array int int int symbol))
(define-extern *verts-buf-1* (inline-array triangulation-vert))
(define-extern *verts-buf-2* (inline-array triangulation-vert))
(define-extern draw-square-point (function vector object))
(define-extern get-level-id (function string int))
(define-extern nav-mesh-editor-new (function object))
(define-extern nav-delete (function int object))
(define-extern nav-mesh-editor-translate (function int float float float object))
(define-extern nav-mesh-editor-rotate-y (function float object))
(define-extern nav-mesh-editor-load (function string object))
(define-extern nav-mesh-editor-set-level (function symbol object))
(define-extern nav-set-lev (function string object))
(define-extern nav-set-flag (function nav-mesh-poly-flag object))
(define-extern nav-mesh-editor-init (function symbol object :behavior nav-mesh-editor))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; bug-report ;;
@@ -41122,26 +41181,33 @@
;; visvol-edit ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#|
;; +++visvol-edit:visvol-edit-func
(defenum visvol-edit-func
:type uint64
(visvol-positive 0)
(visvol-negative 1)
(adjust-sphere 2)
(adjust-vis-distance 3)
)
;; ---visvol-edit:visvol-edit-func
(deftype visvol-edit-info (structure)
((editing basic :offset-assert 0)
(current-func uint64 :offset-assert 8)
(analog-func uint64 :offset-assert 16)
((editing symbol :offset-assert 0)
(current-func visvol-edit-func :offset-assert 8)
(analog-func visvol-edit-func :offset-assert 16)
)
:method-count-assert 12
:size-assert #x18
:flag-assert #xc00000018
(:methods
(visvol-edit-info-method-9 () none) ;; 9
(visvol-edit-info-method-10 () none) ;; 10
(visvol-edit-info-method-11 () none) ;; 11
(handle-pad-input (_type_) object) ;; 9
(draw-menu (_type_ process-drawable) object) ;; 10
(set-origin-joint-idx! (_type_ process-drawable) none) ;; 11
)
)
|#
#|
(deftype visvol-editor (process)
((proc uint64 :offset-assert 128)
((proc handle :offset-assert 128)
)
:method-count-assert 15
:size-assert #x88
@@ -41150,12 +41216,11 @@
idle ;; 14
)
)
|#
;; (define-extern *visvol-edit-info* object)
;; (define-extern visvol-editor-init-by-other function)
;; (define-extern stop-visvol-edit function)
;; (define-extern visvol-edit function)
(define-extern *visvol-edit-info* visvol-edit-info)
(define-extern visvol-editor-init-by-other (function handle object :behavior visvol-editor))
(define-extern stop-visvol-edit (function object))
(define-extern visvol-edit (function string object))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; collision-editor ;;
@@ -41212,9 +41277,9 @@
:size-assert #x1c
:flag-assert #xc0000001c
(:methods
(collision-edit-info-method-9 (_type_) none) ;; 9
(handle-pad-input (_type_) none) ;; 9
(draw-menu (_type_ process-drawable) none) ;; 10
(collision-edit-info-method-11 (_type_ process-drawable) none) ;; 11
(set-current-prim! (_type_ process-drawable) none) ;; 11
)
)
@@ -41223,7 +41288,7 @@
(define-extern *collision-editor-mesh-names* (array string))
(define-extern *collision-editor-art-group-name* string)
(define-extern collision-editor-add-mesh-to-ccache (function collide-shape-prim-group collide-cache none))
(define-extern print-default-collision (function process-drawable none))
(define-extern print-default-collision (function none))
(define-extern print-actual-collision (function process-drawable none))
(define-extern collision-edit-get-max-prim (function process-drawable int))
(define-extern collision-edit-get-prim (function process-drawable int collide-shape-prim))
@@ -1005,5 +1005,14 @@
[15, "(function external-art-buffer object)"],
[16, "(function external-art-buffer object)"],
[17, "(function external-art-buffer object)"]
]
],
"editable-player": [
[0, "(function object)"],
[3, "(function object int float object)"],
[4, "(function object int symbol)"],
[31, "(function editable editable-region symbol)"],
[32, "(function editable editable-region symbol)"],
[35, "(function editable symbol)"]
],
"editable": [[101, "(function object editable-filter)"]]
}
+5 -3
View File
@@ -89,7 +89,6 @@
// CFG failed
"draw-inline-array-instance-shrub",
"(method 9 editable-region)", // condition branch assert hit
"test-to-from-spr",
"test-from-spr",
"test-to-spr",
@@ -101,7 +100,6 @@
"adgif-shader<-texture!",
// jak 3
"(method 10 manipulator)",
"(method 46 ff-squad-control)",
"memcpy"
],
@@ -466,7 +464,11 @@
"(anon-function 90 ctywide-obs)": [4],
"(anon-function 10 cty-sniper-turret)": [44],
"(method 33 rub-tower)": [9, 10],
"(method 30 gungame-manager)": [0, 4, 5, 7]
"(method 30 gungame-manager)": [0, 4, 5, 7],
"(method 9 editable-region)": [63],
"(method 10 manipulator)": [4],
"(method 18 mysql-nav-graph)": [0, 1, 2, 3, 4, 7, 9],
"(method 17 nav-mesh-editable)": [0, 1, 2, 7, 9, 24, 28, 33]
},
// Sometimes the game might use format strings that are fetched dynamically,
@@ -2465,5 +2465,29 @@
["L198", "(pointer uint8)", 16],
["L197", "(pointer uint16)", 48]
],
"game-task": [["L18", "(array game-task-node-command)"]]
"game-task": [["L18", "(array game-task-node-command)"]],
"editable-player": [
["L1431", "(inline-array vector4w)", 4],
["L1499", "uint64", true]
],
"editable": [
["L724", "rgba", true],
["L725", "rgba", true],
["L726", "rgba", true],
["L727", "rgba", true],
["L728", "rgba", true],
["L729", "rgba", true],
["L730", "rgba", true],
["L680", "vector"],
["L722", "uint64", true],
["L723", "rgba", true]
],
"nav-mesh-editor": [
["L560", "uint64", true],
["L504", "(inline-array triangulation-vert)", 256],
["L505", "(inline-array triangulation-vert)", 256],
["L555", "(pointer int32)", 1024],
["L556", "(inline-array vector)", 1024],
["L557", "uint64", true]
]
}
@@ -2519,5 +2519,117 @@
[32, "vector"],
[48, "vector"],
[64, "vector"]
],
"(method 9 editable-array)": [
[16, "vector"],
[96, "vector"]
],
"(method 23 editable-player)": [
[128, "vector"],
[112, "vector"]
],
"execute-move": [
[16, "vector"],
[32, "vector"]
],
"execute-mouse-move": [
[16, "vector"],
[32, "vector"],
[48, "vector"],
[64, "vector"],
[80, "vector"],
[112, "vector"]
],
"update-manipulator-position": [[16, "vector"]],
"insert-wall": [[32, ["array", "int32", 2]]],
"insert-box": [[32, ["array", "int32", 8]]],
"(method 22 editable)": [
[16, "vector"],
[32, "vector"]
],
"(method 21 editable-entity)": [[80, "vector"]],
"(method 13 editable-plane)": [[64, ["inline-array", "vector", 4]]],
"(method 14 editable-point)": [
[80, ["inline-array", "vector", 4]],
[32, "vector"],
[48, "vector"]
],
"(method 31 editable-face)": [
[16, ["inline-array", "vector", 6]],
[112, ["inline-array", "vector", 6]],
[240, ["array", "editable-point", 6]],
[304, "matrix"]
],
"(method 14 editable-face)": [
[64, ["inline-array", "vector", 4]],
[208, ["inline-array", "vector", 6]],
[304, ["inline-array", "vector", 6]],
[416, "vector"]
],
"(method 13 editable-face)": [[64, ["inline-array", "vector", 6]]],
"(method 10 editable-face)": [[16, ["inline-array", "vector", 6]]],
"(method 37 editable-face)": [[16, ["inline-array", "vector", 6]]],
"(method 10 editable-plane)": [[16, ["inline-array", "vector", 4]]],
"(method 13 editable-array)": [
[96, "vector"],
[160, "vector"]
],
"(method 23 mysql-nav-graph)": [[16, ["inline-array", "vector", 5]]],
"(post draw-closest-minimap nav-graph-editor)": [
[64, ["inline-array", "vector", 5]]
],
"(method 29 nav-graph-editor)": [
[32, "vector"],
[48, ["inline-array", "vector", 2]],
[112, "vector"],
[128, "vector"],
[144, "vector"]
],
"(method 32 nav-graph-editor)": [[32, "vector"]],
"(method 31 nav-graph-editor)": [[16, ["inline-array", "vector", 5]]],
"(method 35 nav-graph-editor)": [[16, ["inline-array", "vector", 4]]],
"(method 37 nav-graph-editor)": [
[80, "vector"],
[880, ["inline-array", "vector", 4]]
],
"update-height": [[16, "vector"]],
"(method 33 nav-graph-editor)": [
[16, "vector"],
[48, ["inline-array", "vector", 2]]
],
"(method 49 nav-graph-editor)": [
[16, "vector"],
[32, "vector"]
],
"(method 47 nav-graph-editor)": [
[48, "vector"],
[96, "vector"],
[128, "vector"]
],
"(method 22 nav-mesh-editor)": [[80, "vector"]],
"(method 10 nav-mesh-poly)": [
[16, "vector"],
[32, "vector"],
[48, "vector"],
[64, "vector"],
[80, "vector"],
[96, "vector"],
[112, "vector"],
[128, "vector"]
],
"snap-level-navmesh": [
[16, "vector"],
[64, "vector"]
],
"(method 16 nav-mesh-editable)": [
[16, "vector"],
[48, "vector"],
[32, "vector"]
],
"(method 15 nav-mesh-editable)": [[16, "vector"]],
"(method 12 nav-mesh-editable)": [[32, "vector"]],
"(method 14 nav-mesh-editable)": [
[16, ["inline-array", "vector", 4]],
[80, ["inline-array", "vector", 4]]
]
}
+144 -2
View File
@@ -2229,7 +2229,6 @@
[789, "v1", "float"],
[792, "v1", "float"],
[794, "v0", "float"],
// [784, "v1", "vector"],
[589, "v1", "float"],
[593, "v1", "float"],
@@ -11340,5 +11339,148 @@
[[81, 99], "a0", "(inline-array vector4w)"],
[[165, 190], "a0", "(inline-array vector4w)"]
],
"(event idle progress)": [[[10, 80], "v1", "mc-status-code"]]
"(event idle progress)": [[[10, 80], "v1", "mc-status-code"]],
"visvol-edit": [
[[22, 26], "v1", "handle"],
[[17, 21], "v1", "handle"]
],
"(method 10 visvol-edit-info)": [
[228, "v0", "(pointer float)"],
[458, "v0", "(pointer float)"],
[509, "v0", "(pointer float)"]
],
"(event idle editable-player)": [
[307, "a1", "vector"],
[[473, 492], "s4", "editable-light"],
[[533, 561], "s4", "editable-entity"],
[[607, 618], "v1", "editable-light"],
[[507, 513], "v1", "float"],
[[303, 313], "v1", "editable-entity"],
[[662, 680], "s3", "editable-light"],
[665, "v1", "(pointer float)"],
[666, "a0", "editable-light"],
[[431, 436], "v1", "float"],
[[580, 587], "v1", "float"],
[635, "v1", "float"]
],
"keybd-set-time-of-day!": [[[15, 19], "v1", "float"]],
"set-light-value": [
[[26, 49], "s2", "editable-light"],
[29, "a0", "(pointer float)"]
],
"get-light-value": [
[[26, 39], "s3", "editable-light"],
[28, "v1", "(pointer float)"]
],
"dm-editable-light-float-func": [
[[32, 108], "s2", "editable-light"],
[36, "a0", "(pointer float)"],
[88, "v1", "(pointer float)"],
[[137, 151], "s3", "editable-light"],
[140, "v1", "(pointer float)"],
[81, "a2", "uint"],
[88, "a1", "int"]
],
"(method 23 editable-player)": [
[58, "a1", "int"],
[58, "a0", "int"],
[67, "a0", "int"],
[67, "a1", "int"]
],
"execute-select": [
[[552, 556], "a0", "editable"],
[644, "v1", "editable"],
[[595, 599], "a0", "editable"],
[742, "v1", "editable"],
[[693, 697], "a0", "editable"]
],
"update-manipulator-position": [["_stack_", 48, "euler-angles"]],
"(method 9 editable)": [[35, "a0", "editable-light"]],
"common-owner": [
[18, "v1", "pair"],
[12, "a2", "pair"],
[17, "v1", "pair"],
[11, "a2", "pair"]
],
"(method 27 editable)": [
[[12, 17], "a0", "editable"],
[19, "s4", "pair"],
[18, "s4", "pair"]
],
"(method 31 editable)": [
[[4, 8], "a0", "editable"],
[10, "s5", "pair"],
[9, "s5", "pair"]
],
"(method 30 editable)": [
[[4, 8], "a0", "editable"],
[10, "s5", "pair"],
[9, "s5", "pair"]
],
"(method 36 editable-entity)": [[[23, 55], "s5", "process-drawable"]],
"(method 13 editable-plane)": [
[[63, 66], "s3", "(inline-array vector)"],
[[72, 75], "s3", "(inline-array vector)"],
[89, "s3", "(inline-array vector)"]
],
"(method 31 editable-face)": [
["_stack_", 288, "(array editable-point)"],
["_stack_", 208, "(inline-array vector)"]
],
"(method 13 editable-face)": [
[[57, 60], "s3", "(inline-array vector)"],
[[66, 69], "s3", "(inline-array vector)"],
[83, "s3", "(inline-array vector)"]
],
"(method 14 editable-face)": [["_stack_", 576, "vector"]],
"(method 13 editable-array)": [
["_stack_", 28, "sql-result"],
["_stack_", 84, "string"],
["_stack_", 176, "vector"],
[466, "v1", "sql-result"],
[647, "v1", "sql-result"]
],
"dm-editable-boolean-toggle-pick-func": [[5, "v1", "(pointer float)"]],
"(method 25 editable-light)": [
[78, "a2", "vector"],
[63, "t0", "uint"],
[70, "a3", "int"]
],
"update-light-sphere-from-editable-light": [
[80, "a0", "vector"],
[72, "a1", "int"],
[65, "a2", "uint"]
],
"load-editable-lights": [
[345, "a1", "uint"],
[352, "a0", "int"]
],
"(method 10 mysql-nav-node)": [[4, "v1", "mysql-nav-edge"]],
"(method 19 mysql-nav-graph)": [
[42, "a0", "mysql-nav-edge"],
[46, "a0", "mysql-nav-edge"],
[60, "a0", "mysql-nav-edge"]
],
"nav-graph-set-level": [[5, "v1", "nav-graph-editor"]],
"set-minimap-edge-flag": [[[5, 12], "v1", "nav-graph-editor"]],
"set-vehicle-edit-mode": [[[5, 11], "v1", "nav-graph-editor"]],
"translate-nav-graph": [[[14, 34], "v1", "nav-graph-editor"]],
"update-width": [[5, "a0", "nav-graph-editor"]],
"update-height": [[4, "a1", "nav-graph-editor"]],
"smooth-nav-graph": [[5, "a0", "nav-graph-editor"]],
"delete-node-nav-mesh": [[[15, 36], "s5", "nav-graph-editor"]],
"update-nav-meshes": [[[14, 28], "gp", "nav-graph-editor"]],
"(method 47 nav-graph-editor)": [["_stack_", 192, "vector"]],
"draw-square-point": [[[70, 73], "v1", "dma-packet"]],
"(event idle nav-mesh-editor)": [
[[88, 93], "v1", "float"],
[167, "v1", "float"]
],
"(method 16 nav-mesh-editable)": [
[668, "v1", "(inline-array nav-mesh-tri-quad)"]
],
"(trans idle nav-mesh-editor)": [
[423, "v0", "int"],
[476, "v0", "int"]
]
}
@@ -2164,5 +2164,15 @@
},
"set-font-color": {
"args": ["idx", "clr0", "clr1", "clr2", "clr3"]
},
"(anon-function 101 editable)": {
"vars": {
"gp-0": ["filter-type", "editable-filter"]
}
},
"(method 12 editable-region)": {
"vars": {
"v0-3": ["filter", "editable-filter"]
}
}
}
+104 -2
View File
@@ -1,6 +1,10 @@
#include "klisten.h"
#include "kmachine.h"
#include "common/log/log.h"
#include "common/symbols.h"
#include "common/util/string_util.h"
#include "game/kernel/common/Ptr.h"
#include "game/kernel/common/Symbol4.h"
@@ -111,8 +115,106 @@ void ProcessListenerMessage(Ptr<char> msg) {
SendAck();
}
int sql_query_sync(Ptr<String> /*string_in*/) {
ASSERT_NOT_REACHED();
// (deftype sql-result (basic)
struct SQLResult {
// (len int32 :offset-assert 4)
s32 len;
// (allocated-length uint32 :offset-assert 8)
u32 allocated_length;
// (error symbol :offset-assert 12)
u32 error;
// (data string :dynamic :offset-assert 16)
// don't be fooled by the [1] here, it can hold as many as we allocate when calling `new`
Ptr<String> data[1];
};
int sql_query_sync(Ptr<String> string_in) {
if (!MasterDebug) {
// not debugging, no sql results.
return s7.offset + S7_OFF_FIX_SYM_EMPTY_PAIR;
} else {
/* Original code, disabled
// output sql query to the compiler
output_sql_query(string_in->data());
// clear pending listener stuff, so we don't run it again.
ListenerFunction->value() = s7.offset;
ListenerStatus = 1;
ClearPending();
SendAck();
*/
std::string query_str = string_in->data();
str_util::replace(query_str, "LAST_INSERT_ID()", "last_insert_rowid()");
lg::debug("[SQL] Query '{}'", query_str);
// ensure the DB is initialized
initialize_sql_db();
// clear global
SqlResult->value() = s7.offset;
kdebugheap->top.offset -= 0x4000; // not sure what it's used for...
const auto& result = run_sql_query(query_str);
// TODO - check for errors
auto sym = find_symbol_from_c(-1, "sql-result");
if (sym.offset) {
// TODO - can their sql-result type not return multiple rows and the data is just the columns?
// or do they make assumptions and iterate the data like a 2d flattened array
//
// Collect string results
std::vector<std::string> results;
for (const auto& row : result.rows) {
for (const auto& val : row) {
lg::debug("[SQL] Result \"{}\"", val.data());
results.push_back(val.data());
}
}
// Make the GOAL type to hold them
Ptr<Type> type = Ptr<Type>(sym->value());
auto new_result_ptr = call_method_of_type_arg2(intern_from_c(-1, 0, "debug").offset, type,
GOAL_NEW_METHOD, type.offset, results.size());
SQLResult* new_result = Ptr<SQLResult>(new_result_ptr).c();
for (int i = 0; i < (int)results.size(); i++) {
new_result->data[i] = Ptr<String>(make_debug_string_from_c(results.at(i).data()));
}
new_result->len = results.size();
// TODO - possible values here (when to set them?)
// 'error = the default, fairly obvious
// 'select = the result of a select
new_result->error = intern_from_c(-1, 0, "select").offset;
kdebugheap->top.offset += 0x4000;
// Store the result in the convienant debugging global (stores last query resp)
SqlResult->value() = new_result_ptr;
return new_result_ptr;
}
return s7.offset;
/* Original code, disabled
// didn't we just set these to false?
if (ListenerFunction->value() == s7.offset && SqlResult->value() == s7.offset) {
do {
KernelDispatch(sync_dispatcher->value());
SendAck();
if (SqlResult->value() != s7.offset) {
break;
}
std::this_thread::sleep_for(std::chrono::milliseconds(1));
iVar2 = 99999;
do {
bVar1 = iVar2 != 0;
iVar2 = iVar2 + -1;
} while (bVar1);
} while (SqlResult->value() == s7.offset);
}
*/
}
}
} // namespace jak3
+121 -3
View File
@@ -4,6 +4,7 @@
#include "common/symbols.h"
#include "game/graphics/display.h"
#include "game/graphics/gfx.h"
#include "game/graphics/jak3_texture_remap.h"
#include "game/graphics/sceGraphicsInterface.h"
@@ -309,9 +310,64 @@ u32 KeybdGetData(u32 /*_mouse*/) {
// ASSERT_NOT_REACHED();
}
u32 MouseGetData(u32 /*_mouse*/) {
// ASSERT_NOT_REACHED();
return 0;
u32 MouseGetData(u32 _mouse) {
auto mouse = Ptr<MouseInfo>(_mouse).c();
mouse->active = offset_of_s7() + jak2_symbols::FIX_SYM_TRUE;
mouse->valid = offset_of_s7() + jak2_symbols::FIX_SYM_TRUE;
mouse->cursor = offset_of_s7() + jak2_symbols::FIX_SYM_TRUE;
mouse->status = 1;
// Contrary to the name, this is a 16bitfield
// where:
// 0 = left button
// 1 = right button
// 2 = middle button
mouse->button0 = 0;
s32 xpos = 0;
s32 ypos = 0;
if (Display::GetMainDisplay()) {
std::tie(xpos, ypos) = Display::GetMainDisplay()->get_input_manager()->get_mouse_pos();
const auto mouse_button_status =
Display::GetMainDisplay()->get_input_manager()->get_mouse_button_status();
mouse->button0 |= (mouse_button_status.left ? 1 : 0);
mouse->button0 |= (mouse_button_status.right ? 2 : 0);
mouse->button0 |= (mouse_button_status.middle ? 4 : 0);
}
// NOTE - ignoring speed and setting position directly
// the game assumes resolutions, so this makes it a lot easier to make it actually
// line up with the mouse cursor
// TODO - probably factor in scaling as well
auto win_width = 0;
auto win_height = 0;
auto game_width = 0;
auto game_height = 0;
if (Display::GetMainDisplay()) {
win_width = Display::GetMainDisplay()->get_display_manager()->get_window_width();
win_height = Display::GetMainDisplay()->get_display_manager()->get_window_height();
game_width = Display::GetMainDisplay()->get_display_manager()->get_window_game_width();
game_height = Display::GetMainDisplay()->get_display_manager()->get_window_game_height();
}
xpos -= (win_width - game_width) / 2;
ypos -= (win_height - game_height) / 2;
// These are used to calculate the speed at which to move the mouse to it's new coordinates
// zero'd out so they are ignored and don't impact the position we are about to set
mouse->deltax = 0;
mouse->deltay = 0;
// These positions will get capped to:
// - [-256.0, 256.0] for width
// - [-208.0, 208.0] for height
// (then 208 or 256 is always added to them to get the final screen coordinate)
// So just normalize the actual window's values to this range
double width_per = xpos / double(game_width);
double height_per = ypos / double(game_height);
mouse->posx = (512.0 * width_per) - 256.0;
mouse->posy = (416.0 * height_per) - 208.0;
// fmt::print("Mouse - X:{}({}), Y:{}({})\n", xpos, mouse->posx, ypos, mouse->posy);
return _mouse;
}
/*!
@@ -522,4 +578,66 @@ void InitMachineScheme() {
}
}
sqlite::SQLiteDatabase sql_db;
void initialize_sql_db() {
// If the DB has already been initialized, no-op
if (sql_db.is_open()) {
return;
}
// In the original environment, they relied on a database already being setup with the correct
// schema We are using an embedded SQLite database, which isn't already setup, so we have to do
// that here!
fs::path db_path = file_util::get_user_misc_dir(g_game_version) / "jak3-editor.db";
file_util::create_dir_if_needed_for_file(db_path);
const bool did_db_exist = file_util::file_exists(db_path.string());
// Attempt to open the database
const auto opened = sql_db.open_db(db_path.string());
(void)opened;
fs::path schema_file =
file_util::get_jak_project_dir() / "goal_src" / "jak3" / "tools" / "editable-schema.sql";
if (!file_util::file_exists(schema_file.string())) {
lg::error("Unable to locate SQL Schema file at {}", schema_file.string());
return;
}
const auto success = sql_db.run_query(file_util::read_text_file(schema_file));
// TODO - error check
// If the database did not originally exist, let's seed it with original game data
if (!did_db_exist) {
lg::warn("[SQL]: Seeding database, this may take a bit");
fs::path level_info_fixture = file_util::get_jak_project_dir() / "goal_src" / "jak3" / "tools" /
"db-fixtures" / "fixture-level_info.sql";
if (file_util::file_exists(level_info_fixture.string())) {
const auto success = sql_db.run_query(file_util::read_text_file(level_info_fixture));
// TODO - error check
}
fs::path light_fixture = file_util::get_jak_project_dir() / "goal_src" / "jak3" / "tools" /
"db-fixtures" / "fixture-light.sql";
if (file_util::file_exists(light_fixture.string())) {
const auto success = sql_db.run_query(file_util::read_text_file(light_fixture));
// TODO - error check
}
fs::path region_fixture = file_util::get_jak_project_dir() / "goal_src" / "jak3" / "tools" /
"db-fixtures" / "fixture-region.sql";
if (file_util::file_exists(region_fixture.string())) {
const auto success = sql_db.run_query(file_util::read_text_file(region_fixture));
// TODO - error check
}
}
}
sqlite::GenericResponse run_sql_query(const std::string& query) {
if (!sql_db.is_open()) {
// TODO - error
return sqlite::GenericResponse();
}
return sql_db.run_query(query);
}
} // namespace jak3
+60
View File
@@ -1,8 +1,68 @@
#pragma once
#include "common/common_types.h"
#include "common/sqlite/sqlite.h"
namespace jak3 {
void InitParms(int argc, const char* const* argv);
void InitMachineScheme();
int InitMachine();
int ShutdownMachine();
extern sqlite::SQLiteDatabase sql_db;
void initialize_sql_db();
sqlite::GenericResponse run_sql_query(const std::string& query);
struct MouseInfo {
// ((active symbol :offset-assert 4)
u32 active;
// (cursor basic :offset-assert 8)
u32 cursor;
// (valid symbol :offset-assert 12)
u32 valid;
// (id uint8 :offset-assert 16)
u8 id;
u8 pad;
// (status uint16 :offset-assert 18)
u16 status;
// (button0 uint16 :offset-assert 20)
u16 button0;
// (deltax int8 :offset-assert 22)
s8 deltax;
// (deltay int8 :offset-assert 23)
s8 deltay;
// (wheel uint8 :offset-assert 24)
u8 wheel;
u8 pad1[3];
// (change-time time-frame :offset-assert 32)
// (button0-abs uint32 3 :offset-assert 40)
// (button0-shadow-abs uint32 1 :offset-assert 52)
// (button0-rel uint32 3 :offset-assert 56)
// (pos vector 2 :inline :offset-assert 80)
u32 pad2[13];
// (posx float :offset 80)
float posx;
// (posy float :offset 84)
float posy;
// (oldposx float :offset 96 :do-not-decompile)
// (oldposy float :offset 100)
// (speedx float :offset 92)
// (speedy float :offset 108)
};
// (deftype keybd-info (basic)
// ((active symbol)
// (valid symbol)
// (kdata uint8 16)
// (keys uint8 256)
// )
// (:methods
// (new (symbol type) _type_)
// )
// )
struct KeybdInfo {
u32 active;
u32 valid;
u8 kdata[16];
u8 keys[256];
};
} // namespace jak3
+3
View File
@@ -11,6 +11,8 @@ constexpr s32 SYMBOL_OFFSET = 1;
extern Ptr<u32> SymbolString;
extern bool DebugSymbols;
extern Ptr<Symbol4<u32>> SqlResult;
/*!
* GOAL Type
*/
@@ -53,6 +55,7 @@ u64 print_object(u32 obj);
u64 inspect_object(u32 obj);
Ptr<Symbol4<u32>> find_symbol_from_c(uint16_t sym_id, const char* name);
u64 make_string_from_c(const char* c_str);
u64 make_debug_string_from_c(const char* c_str);
u64 call_method_of_type(u32 arg, Ptr<Type> type, u32 method_id);
u64 new_pair(u32 heap, u32 type, u32 car, u32 cdr);
u64 call_goal_function_by_name(const char* name);
+39 -39
View File
@@ -142,7 +142,7 @@
;; ERROR: Stack slot load at 288 mismatch: defined as size 4, got size 16
;; ERROR: Stack slot load at 272 mismatch: defined as size 4, got size 16
;; ERROR: Stack slot load at 288 mismatch: defined as size 4, got size 16
(defun print-default-collision ((arg0 process-drawable))
(defun print-default-collision ()
(local-vars (sv-224 matrix) (sv-240 symbol) (sv-256 string) (sv-272 float) (sv-288 float))
(let ((gp-0 (process-spawn collision-editor-default-proc :name "collision-editor-default-proc")))
(when gp-0
@@ -162,14 +162,14 @@
)
(format #t " :children (~%")
(let* ((t9-10 (method-of-type res-lump get-property-struct))
(a0-11 (-> (the-as process-drawable (-> gp-0 0)) draw jgeo extra))
(a0-10 (-> (the-as process-drawable (-> gp-0 0)) draw jgeo extra))
(a1-10 'collide-mesh-group)
(a2-3 'interp)
(a3-3 -1000000000.0)
(t0-0 (the-as float #f))
(s5-1 (the-as
(array collide-mesh)
(t9-10 a0-11 a1-10 a2-3 a3-3 (the-as structure t0-0) (the-as (pointer res-tag) #f) *res-static-buf*)
(t9-10 a0-10 a1-10 a2-3 a3-3 (the-as structure t0-0) (the-as (pointer res-tag) #f) *res-static-buf*)
)
)
)
@@ -198,12 +198,12 @@
)
(else
(let ((t9-19 format)
(a0-23 #t)
(a0-22 #t)
(a1-18 " :transform-index (joint-node-index ~S ~S)~%")
(a2-5 *collision-editor-art-group-name*)
(a3-12 (-> (the-as process-drawable (-> gp-0 0)) node-list data (+ (-> s5-1 s4-0 joint-id) 1) joint name))
)
(t9-19 a0-23 a1-18 a2-5 a3-12)
(t9-19 a0-22 a1-18 a2-5 a3-12)
(let ((s0-0 (new 'stack 'collide-shape-prim-mesh (the-as collide-shape 0) (the-as uint a3-12) (the-as uint t0-0))))
(set! (-> s0-0 cshape) (the-as collide-shape (-> (the-as process-drawable (-> gp-0 0)) root)))
(set! (-> s0-0 transform-index) (+ (-> s5-1 s4-0 joint-id) 1))
@@ -213,82 +213,82 @@
(set! (-> s0-0 mesh-cache-id) (the-as uint 0))
(set! (-> s0-0 mesh-id) s4-0)
(collision-editor-add-mesh-to-ccache (the-as collide-shape-prim-group s0-0) *collide-cache*)
(let ((a0-26 (the-as object (-> *collide-cache* tris)))
(let ((a0-25 (the-as object (-> *collide-cache* tris)))
(v1-41 (new 'stack-no-clear 'vector))
(s2-0 (new 'stack-no-clear 'vector))
(s3-0 (new 'stack-no-clear 'vector))
(s1-0 (new 'stack-no-clear 'vector))
)
(when (nonzero? (-> *collide-cache* num-tris))
(vector-copy! v1-41 (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0))
(vector-copy! s2-0 (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0))
(vector-copy! v1-41 (-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 0))
(vector-copy! s2-0 (-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 0))
)
(countdown (a1-27 (-> *collide-cache* num-tris))
(set! (-> v1-41 x) (fmin
(fmin
(fmin (-> v1-41 x) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 x))
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 x)
(fmin (-> v1-41 x) (-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 0 x))
(-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 1 x)
)
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 x)
(-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 2 x)
)
)
(set! (-> v1-41 y) (fmin
(fmin
(fmin (-> v1-41 y) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 y))
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 y)
(fmin (-> v1-41 y) (-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 0 y))
(-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 1 y)
)
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 y)
(-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 2 y)
)
)
(set! (-> v1-41 z) (fmin
(fmin
(fmin (-> v1-41 z) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 z))
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 z)
(fmin (-> v1-41 z) (-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 0 z))
(-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 1 z)
)
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 z)
(-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 2 z)
)
)
(set! (-> s2-0 x) (fmax
(fmax
(fmax (-> s2-0 x) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 x))
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 x)
(fmax (-> s2-0 x) (-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 0 x))
(-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 1 x)
)
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 x)
(-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 2 x)
)
)
(set! (-> s2-0 y) (fmax
(fmax
(fmax (-> s2-0 y) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 y))
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 y)
(fmax (-> s2-0 y) (-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 0 y))
(-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 1 y)
)
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 y)
(-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 2 y)
)
)
(set! (-> s2-0 z) (fmax
(fmax
(fmax (-> s2-0 z) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 z))
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 z)
(fmax (-> s2-0 z) (-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 0 z))
(-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 1 z)
)
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 z)
(-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 2 z)
)
)
(set! a0-26 (-> (the-as (inline-array collide-cache-tri) a0-26) 1))
(set! a0-25 (-> (the-as (inline-array collide-cache-tri) a0-25) 1))
)
(vector+! s3-0 v1-41 s2-0)
(vector-float*! s3-0 s3-0 0.5)
(vector<-cspace! s1-0 (-> (the-as process-drawable (-> gp-0 0)) node-list data (-> s0-0 transform-index)))
(vector-! s1-0 s3-0 s1-0)
(set! sv-224 (new 'stack-no-clear 'matrix))
(let* ((a0-35 (-> (the-as process-drawable (-> gp-0 0)) node-list data (-> s0-0 transform-index) bone transform))
(a2-11 (-> a0-35 rvec quad))
(a1-36 (-> a0-35 uvec quad))
(v1-53 (-> a0-35 fvec quad))
(a0-36 (-> a0-35 trans quad))
(let* ((a0-34 (-> (the-as process-drawable (-> gp-0 0)) node-list data (-> s0-0 transform-index) bone transform))
(a2-11 (-> a0-34 rvec quad))
(a1-36 (-> a0-34 uvec quad))
(v1-53 (-> a0-34 fvec quad))
(a0-35 (-> a0-34 trans quad))
)
(set! (-> sv-224 rvec quad) a2-11)
(set! (-> sv-224 uvec quad) a1-36)
(set! (-> sv-224 fvec quad) v1-53)
(set! (-> sv-224 trans quad) a0-36)
(set! (-> sv-224 trans quad) a0-35)
)
(vector-reset! (-> sv-224 trans))
(matrix-transpose! sv-224 sv-224)
@@ -477,9 +477,9 @@
(current-prim int32)
)
(:methods
(collision-edit-info-method-9 (_type_) none)
(handle-pad-input (_type_) none)
(draw-menu (_type_ process-drawable) none)
(collision-edit-info-method-11 (_type_ process-drawable) none)
(set-current-prim! (_type_ process-drawable) none)
)
)
@@ -524,7 +524,7 @@
(the-as collide-shape-prim #f)
)
(defmethod collision-edit-info-method-9 ((this collision-edit-info))
(defmethod handle-pad-input ((this collision-edit-info))
(if (cpad-pressed? 0 up)
(+! (-> this current-func) -1)
)
@@ -549,7 +549,7 @@
(none)
)
(defmethod collision-edit-info-method-11 ((this collision-edit-info) (arg0 process-drawable))
(defmethod set-current-prim! ((this collision-edit-info) (arg0 process-drawable))
(local-vars (s5-0 int))
(when (not arg0)
(set! s5-0 (the-as int #f))
@@ -609,8 +609,8 @@
)
(else
(set! *external-cam-mode* 'locked)
(collision-edit-info-method-9 this)
(collision-edit-info-method-11 this arg0)
(handle-pad-input this)
(set-current-prim! this arg0)
(let ((s3-0 ">")
(s4-0 " ")
)
+71 -166
View File
@@ -3175,6 +3175,7 @@
(send-event *target* 'change-mode 'pilot #f arg0 #t)
)
;; og:preserve-this added
(defun dm-game-opengoal-cheat-toggle-pick-func ((arg0 int) (arg1 debug-menu-msg))
(if (= arg1 (debug-menu-msg press))
(logxor! (-> *pc-settings* cheats) (the-as uint (/ arg0 8)))
@@ -4936,13 +4937,9 @@
(function
"Start Editor"
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (when (not (get-nav-graph-editor))
(let ((t9-1 run-nav-graph-editor)
(a0-1 'test)
)
(t9-1 a0-1)
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (if (not (get-nav-graph-editor))
(run-nav-graph-editor 'test #f)
)
)
)
)
(function
@@ -4956,24 +4953,22 @@
(function
"Toggle Plane Mode"
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(if a0-1
((method-of-object a0-1 nav-graph-editor-method-64))
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (let ((a0-1 (get-nav-graph-editor)))
(if a0-1
(nav-graph-editor-method-64 a0-1)
)
)
)
)
)
)
(function
"Toggle Hover Mode"
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(if a0-1
((method-of-object a0-1 nav-graph-editor-method-65))
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (let ((a0-1 (get-nav-graph-editor)))
(if a0-1
(nav-graph-editor-method-65 a0-1)
)
)
)
)
)
)
(menu
"Load"
@@ -4982,13 +4977,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'hover
'foresta
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'hover (the-as string 'foresta))
)
)
)
)
)
@@ -4997,13 +4988,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'hover
'sewc
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'hover (the-as string 'sewc))
)
)
)
)
)
@@ -5012,13 +4999,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'hover
'sewg
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'hover (the-as string 'sewg))
)
)
)
)
)
@@ -5027,13 +5010,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'hover
'sewl
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'hover (the-as string 'sewl))
)
)
)
)
)
@@ -5042,12 +5021,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'traffic
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'traffic (the-as string #f))
)
)
)
)
)
@@ -5056,12 +5032,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'minimap
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'minimap (the-as string #f))
)
)
)
)
)
@@ -5070,12 +5043,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'flyingsaw_2
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'flyingsaw_2 (the-as string #f))
)
)
)
)
)
@@ -5084,12 +5054,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'flyingsaw_3
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'flyingsaw_3 (the-as string #f))
)
)
)
)
)
@@ -5098,12 +5065,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'forest-plant-1
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'forest-plant-1 (the-as string #f))
)
)
)
)
)
@@ -5112,12 +5076,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'forest-plant-2
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'forest-plant-2 (the-as string #f))
)
)
)
)
)
@@ -5126,12 +5087,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'forest-plant-3
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'forest-plant-3 (the-as string #f))
)
)
)
)
)
@@ -5140,12 +5098,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'forest-plant-4
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'forest-plant-4 (the-as string #f))
)
)
)
)
)
@@ -5154,12 +5109,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'beast
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'beast (the-as string #f))
)
)
)
)
)
@@ -5168,12 +5120,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'wasminimap
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'wasminimap (the-as string #f))
)
)
)
)
)
@@ -5182,12 +5131,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'desrescue
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'desrescue (the-as string #f))
)
)
)
)
)
@@ -5196,12 +5142,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'assault
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'assault (the-as string #f))
)
)
)
)
)
@@ -5210,12 +5153,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'timer-chase-1
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'timer-chase-1 (the-as string #f))
)
)
)
)
)
@@ -5224,12 +5164,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'protect-hq
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'protect-hq (the-as string #f))
)
)
)
)
)
@@ -5238,12 +5175,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'blow-tower
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'blow-tower (the-as string #f))
)
)
)
)
)
@@ -5252,12 +5186,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'desert-lizard
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'desert-lizard (the-as string #f))
)
)
)
)
)
@@ -5266,12 +5197,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'terraformer-walk
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'terraformer-walk (the-as string #f))
)
)
)
)
)
@@ -5280,12 +5208,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'terraformer-fly
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'terraformer-fly (the-as string #f))
)
)
)
)
)
@@ -5294,12 +5219,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'beast-battle
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'beast-battle (the-as string #f))
)
)
)
)
)
@@ -5308,12 +5230,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'desert-chase-marauder
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'desert-chase-marauder (the-as string #f))
)
)
)
)
)
@@ -5321,13 +5240,12 @@
(function
"Save"
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(if a0-1
((method-of-object a0-1 nav-graph-editor-method-67))
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (let ((a0-1 (get-nav-graph-editor)))
(if a0-1
(nav-graph-editor-method-67 a0-1)
)
)
)
)
)
)
)
)
@@ -5344,20 +5262,7 @@
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(when (not *nav-mesh-editor*)
(kill-by-type nav-mesh-editor *active-pool*)
(let ((gp-0 (get-process *default-dead-pool* nav-mesh-editor #x4000 1)))
(when gp-0
(let ((t9-2 (method-of-type nav-mesh-editor activate)))
(t9-2 (the-as nav-mesh-editor gp-0) *entity-pool* "nav-mesh-editor" (the-as pointer #x70004000))
)
(let ((t9-3 run-function-in-process)
(a0-4 gp-0)
(a1-4 nav-mesh-editor-init)
)
((the-as (function object object none) t9-3) a0-4 a1-4)
)
(-> gp-0 ppointer)
)
)
(process-spawn nav-mesh-editor :init nav-mesh-editor-init #f :name "nav-mesh-editor" :to *entity-pool*)
)
)
)
@@ -7115,24 +7020,24 @@
((and (cpad-hold? 0 l3) (cpad-hold? 0 select))
(debug-menu-context-send-msg *popup-menu-context* (debug-menu-msg activate) (debug-menu-dest activation))
(debug-menu-context-send-msg *debug-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation))
;; (debug-menu-context-send-msg *editable-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation))
(debug-menu-context-send-msg *editable-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation))
)
((and (cpad-hold? 1 start) *editable*)
;; (debug-menu-context-send-msg *editable-menu-context* (debug-menu-msg activate) (debug-menu-dest activation))
(debug-menu-context-send-msg *editable-menu-context* (debug-menu-msg activate) (debug-menu-dest activation))
(debug-menu-context-send-msg *debug-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation))
(debug-menu-context-send-msg *popup-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation))
)
((and (cpad-hold? 0 l3) (cpad-hold? 0 start))
(debug-menu-context-send-msg *debug-menu-context* (debug-menu-msg activate) (debug-menu-dest activation))
(debug-menu-context-send-msg *popup-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation))
;; (debug-menu-context-send-msg *editable-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation))
(debug-menu-context-send-msg *editable-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation))
)
)
)
(else
(debug-menu-context-send-msg *debug-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation))
(debug-menu-context-send-msg *popup-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation))
;; (debug-menu-context-send-msg *editable-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation))
(debug-menu-context-send-msg *editable-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation))
)
)
#f
+126 -147
View File
@@ -136,6 +136,10 @@
(declare-type editable-plane editable)
(declare-type editable-region basic)
(define-extern *editable-sample-region* editable-region)
(define-extern *editable-light-region* editable-region)
(define-extern *editable-entity-region* editable-region)
;; DECOMP BEGINS
;; this file is debug only
@@ -444,16 +448,16 @@
(filter editable-filter)
(tree symbol)
(level string)
(on-enter string)
(on-inside string)
(on-exit string)
(on-enter pair)
(on-inside pair)
(on-exit pair)
)
(: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)
(save-region! (_type_ editable-array int int) symbol)
(editable-region-method-10 (_type_ int) symbol)
(print-region-info (_type_ vector int) none)
(editable-region-method-12 (_type_) editable-filter)
)
)
@@ -467,33 +471,33 @@
(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)
(get-color (_type_) rgba)
(editable-method-10 (_type_) none)
(editable-method-11 (_type_ vector) symbol)
(set-selected! (_type_ symbol) none)
(editable-method-13 (_type_ vector) float)
(editable-method-14 (_type_ vector vector) float)
(editable-method-15 (_type_) vector)
(editable-method-16 (_type_) float)
(editable-method-17 (_type_ vector editable-flag) none)
(editable-method-18 (_type_ vector int) none)
(editable-method-19 (_type_ vector) none)
(editable-method-20 (_type_ vector matrix) none)
(editable-method-21 (_type_ vector) none)
(editable-method-22 (_type_ vector vector vector vector) none)
(change-region! (_type_ editable-region) none)
(editable-method-24 (_type_ editable-array int int) symbol)
(editable-method-25 (_type_) symbol)
(editable-method-26 (_type_) none)
(delete! (_type_ editable) none)
(editable-method-28 (_type_ editable editable) none)
(copy-into-editable-array! (_type_ editable-array) editable)
(editable-method-30 (_type_ editable-flag) none)
(editable-method-31 (_type_ editable-flag) none)
(get-null-vec (_type_) vector)
(get-null-vec2 (_type_ vector) vector)
(get-level-offset (_type_ editable-array) vector)
(editable-method-35 (_type_ vector) none)
)
)
@@ -523,17 +527,17 @@
)
(: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)
(handle-cmd (_type_ editable-command mouse-info object) symbol)
(editable-array-method-10 (_type_ vector int) editable)
(editable-array-method-11 (_type_ vector vector int) none)
(get-length (_type_) int)
(editable-array-method-13 (_type_ symbol) symbol)
(editable-array-method-14 (_type_ editable-command editable-command string) none)
(editable-array-method-15 (_type_ (function editable editable-region symbol) editable-region) (array editable))
(editable-array-method-16 (_type_ editable) none)
(editable-array-method-17 (_type_) none)
(editable-array-method-18 (_type_ vector vector) vector)
(editable-array-method-19 (_type_ string) symbol)
)
)
@@ -592,21 +596,16 @@
(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)
)
(change-region! gp-0 (cond
(arg1
(empty)
arg1
)
(else
(new 'debug 'editable-region)
)
)
)
(vector-copy! (-> gp-0 trans) arg0)
(set! (-> gp-0 radius) 2048.0)
(set! (-> gp-0 owner) '())
@@ -627,21 +626,16 @@
(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)
)
(change-region! s5-0 (cond
(arg2
(empty)
arg2
)
(else
(new 'debug 'editable-region)
)
)
)
(vector-copy! (-> s5-0 trans) arg0)
(set! (-> s5-0 radius) arg1)
(set! (-> s5-0 owner) '())
@@ -677,21 +671,16 @@
(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)
)
(change-region! gp-0 (cond
(arg2
(empty)
arg2
)
(else
(new 'debug 'editable-region)
)
)
)
(vector-copy! (-> gp-0 trans) arg0)
(set! (-> gp-0 radius) arg1)
(set! (-> gp-0 owner) '())
@@ -721,7 +710,8 @@
)
(:methods
(new (symbol type vector float editable-region) _type_)
(editable-entity-method-36 () none)
(editable-entity-method-36 (_type_) none)
(copy-into-editable-array! (_type_ editable-array) editable-entity :replace)
)
)
@@ -729,21 +719,16 @@
(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)
)
(change-region! gp-0 (cond
(arg2
(empty)
arg2
)
(else
(new 'debug 'editable-region)
)
)
)
(vector-copy! (-> gp-0 trans) arg0)
(set! (-> gp-0 radius) arg1)
(set! (-> gp-0 owner) '())
@@ -761,8 +746,9 @@
)
(:methods
(new (symbol type editable-region) _type_)
(editable-face-method-36 () none)
(editable-face-method-37 () none)
(editable-face-method-36 (_type_ (inline-array vector)) int)
(editable-face-method-37 (_type_ vector) vector)
(copy-into-editable-array! (_type_ editable-array) editable-face :replace)
)
)
@@ -772,21 +758,16 @@
(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)
)
(change-region! gp-0 (cond
(arg0
(empty)
arg0
)
(else
(new 'debug 'editable-region)
)
)
)
(set! (-> gp-0 owner) '())
gp-0
)
@@ -799,8 +780,9 @@
)
(:methods
(new (symbol type editable-region) _type_)
(editable-plane-method-36 () none)
(editable-plane-method-37 () none)
(editable-plane-method-36 (_type_ (inline-array vector)) int)
(editable-plane-method-37 (_type_ vector) vector)
(copy-into-editable-array! (_type_ editable-array) editable-plane :replace)
)
)
@@ -810,21 +792,16 @@
(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)
)
(change-region! gp-0 (cond
(arg0
(empty)
arg0
)
(else
(new 'debug 'editable-region)
)
)
)
(set! (-> gp-0 owner) '())
(set! (-> gp-0 radius) 20480.0)
gp-0
@@ -833,10 +810,10 @@
(deftype editable-player (process-drawable)
((current editable-array)
(current-command uint32)
(select-command function)
(current-command editable-command)
(select-command (function object))
(drag-command uint32)
(extra-command function)
(extra-command (function object))
(left-handed basic)
(light-names basic)
(external-cam-mode symbol)
@@ -854,11 +831,13 @@
(float-min float)
(float-id uint32)
)
(:state-methods
idle
)
(:methods
(editable-player-method-20 () none)
(editable-player-method-21 () none)
(editable-player-method-22 () none)
(editable-player-method-23 () none)
(editable-player-method-21 (_type_) none)
(editable-player-method-22 (_type_) none)
(editable-player-method-23 (_type_) symbol)
)
)
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+125 -2
View File
@@ -25,6 +25,7 @@
:type uint32
(mm0 0)
(mm1 1)
(mm2 2)
)
;; ---manipulator-mode
@@ -48,7 +49,7 @@
)
(:methods
(set-mode (_type_ manipulator-mode) none)
(manipulator-method-10 (_type_) none)
(manipulator-method-10 (_type_ vector vector) none)
(manipulator-method-11 (_type_) none)
(manipulator-method-12 (_type_ vector) none)
(manipulator-method-13 (_type_ vector vector) none)
@@ -167,7 +168,129 @@
(none)
)
;; ERROR: function was not converted to expressions. Cannot decompile.
(defmethod manipulator-method-10 ((this manipulator) (arg0 vector) (arg1 vector))
(local-vars (v1-11 symbol) (sv-160 symbol) (sv-176 vector))
(set! sv-176 arg1)
(let ((s4-0 (-> this position)))
0.0
(let* ((v0-0
(vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> *math-camera* trans) (-> this position)) 1.0)
)
(s3-0 (< (fabs (vector-dot v0-0 (-> this mat rvec))) 0.9))
(s2-0 (< (fabs (vector-dot v0-0 (-> this mat uvec))) 0.9))
)
(b! (< (fabs (vector-dot v0-0 (-> this mat fvec))) 0.9) cfg-6 :delay (set! v1-11 #t))
(set! sv-160 v1-11)
(set! sv-160 #f)
(label cfg-6)
(let ((f28-0 (the-as float #x7f800000))
(f30-1 (* 0.15 (vector-vector-distance (-> *math-camera* trans) s4-0)))
)
(set! (-> this action) (manipulator-action ma0))
(let ((s1-0 (new 'stack-no-clear 'vector)))
0.0
(let* ((s0-0 (new 'stack-no-clear 'vector))
(v1-16 arg0)
(s0-1 (vector-! s0-0 sv-176 v1-16))
)
(let ((f0-14 (ray-sphere-intersect arg0 s0-1 s4-0 (/ f30-1 5))))
(when (and (< 0.0 f0-14) (>= f28-0 f0-14))
(set! f28-0 f0-14)
(set! (-> this action) (manipulator-action ma7))
)
)
(when (= (-> this action) (manipulator-action ma0))
(when (and s3-0 s2-0)
(let ((f0-18 (ray-sphere-intersect
arg0
s0-1
(vector+*!
(new 'stack-no-clear 'vector)
s4-0
(vector+! (new 'stack-no-clear 'vector) (-> this mat rvec) (-> this mat uvec))
f30-1
)
(* 0.3 f30-1)
)
)
)
(when (and (< 0.0 f0-18) (>= f28-0 f0-18))
(set! f28-0 f0-18)
(set! (-> this action) (manipulator-action ma4))
)
)
)
(when (and s3-0 sv-160)
(let ((f0-22 (ray-sphere-intersect
arg0
s0-1
(vector+*!
(new 'stack-no-clear 'vector)
s4-0
(vector+! (new 'stack-no-clear 'vector) (-> this mat rvec) (-> this mat fvec))
f30-1
)
(* 0.3 f30-1)
)
)
)
(when (and (< 0.0 f0-22) (>= f28-0 f0-22))
(set! f28-0 f0-22)
(set! (-> this action) (manipulator-action ma5))
)
)
)
(when (and s2-0 sv-160)
(let ((f0-26 (ray-sphere-intersect
arg0
s0-1
(vector+*!
(new 'stack-no-clear 'vector)
s4-0
(vector+! (new 'stack-no-clear 'vector) (-> this mat uvec) (-> this mat fvec))
f30-1
)
(* 0.3 f30-1)
)
)
)
(when (and (< 0.0 f0-26) (>= f28-0 f0-26))
(set! f28-0 f0-26)
(set! (-> this action) (manipulator-action ma6))
)
)
)
(when s3-0
(let ((f0-31 (ray-cylinder-intersect arg0 s0-1 s4-0 (-> this mat rvec) (/ f30-1 10) (* 1.3 f30-1) s1-0)))
(when (and (< 0.0 f0-31) (>= f28-0 f0-31))
(set! f28-0 f0-31)
(set! (-> this action) (manipulator-action ma1))
)
)
)
(when s2-0
(let ((f0-36 (ray-cylinder-intersect arg0 s0-1 s4-0 (-> this mat uvec) (/ f30-1 10) (* 1.3 f30-1) s1-0)))
(if (and (< 0.0 f0-36) (>= f28-0 f0-36))
(set! (-> this action) (manipulator-action ma2))
)
)
)
(when sv-160
(let ((f0-41 (ray-cylinder-intersect arg0 s0-1 s4-0 (-> this mat fvec) (/ f30-1 10) (* 1.3 f30-1) s1-0)))
(if (and (< 0.0 f0-41) (>= f0-41 f0-41))
(set! (-> this action) (manipulator-action ma3))
)
)
)
)
)
)
)
)
)
0
(none)
)
(defmethod manipulator-method-11 ((this manipulator))
(local-vars (sv-240 rgba) (sv-256 vector) (sv-272 vector))
+119 -45
View File
@@ -5,7 +5,26 @@
;; name in dgo: nav-mesh-editor-h
;; dgos: GAME
(define-extern nav-mesh-editor-init (function none))
;; +++nav-mesh-editor-h:nav-mesh-poly-flag
(defenum nav-mesh-poly-flag
:type uint32
:bitfield #t
(gap 0)
(off 1)
(nmpf2 2)
(user0 3)
)
;; ---nav-mesh-editor-h:nav-mesh-poly-flag
;; +++nav-mesh-editor-h:nav-mesh-editable-flag
(defenum nav-mesh-editable-flag
:type uint32
:bitfield #t
(nmef0 0)
)
;; ---nav-mesh-editor-h:nav-mesh-editable-flag
(declare-type nav-mesh-editable structure)
;; DECOMP BEGINS
@@ -30,18 +49,18 @@
(deftype nav-mesh-poly (structure)
((poly-id uint32)
(flags uint32)
(index basic)
(flags nav-mesh-poly-flag)
(index int16-array)
(insert-pos uint32)
)
(:methods
(new (symbol type) _type_)
(nav-mesh-poly-method-9 () none)
(nav-mesh-poly-method-10 () none)
(nav-mesh-poly-method-11 () none)
(nav-mesh-poly-method-12 () none)
(nav-mesh-poly-method-13 () none)
(nav-mesh-poly-method-14 () none)
(init-fields! (_type_) none)
(nav-mesh-poly-method-10 (_type_ nav-mesh-editable) none)
(nav-mesh-poly-method-11 (_type_ int) none)
(nav-mesh-poly-method-12 (_type_ int) none)
(nav-mesh-poly-method-13 (_type_ int) int)
(nav-mesh-poly-method-14 (_type_ int int) object)
)
)
@@ -51,8 +70,17 @@
)
)
(set! (-> nav-mesh-poly-array heap-base) (the-as uint 16))
(defmethod init-fields! ((this nav-mesh-poly))
(set! (-> this index) (new 'debug 'int16-array 512))
(set! (-> this index length) 0)
(set! (-> this insert-pos) (the-as uint 0))
0
(none)
)
;; WARN: Return type mismatch object vs nav-mesh-poly.
(defmethod new nav-mesh-poly ((allocation symbol) (type-to-make type))
(let ((t9-0 (method-of-type structure new))
@@ -64,7 +92,7 @@
(set! gp-0 0)
(goto cfg-4)
)
((method-of-type nav-mesh-poly nav-mesh-poly-method-9))
((method-of-type nav-mesh-poly init-fields!) (the-as nav-mesh-poly gp-0))
(label cfg-4)
(the-as nav-mesh-poly gp-0)
)
@@ -72,7 +100,7 @@
)
(deftype nav-mesh-tri-quad (structure)
((indices int32 4)
((indices uint32 4)
(poly uint32)
)
)
@@ -87,9 +115,9 @@
(set! (-> nav-mesh-tri-quad-array heap-base) (the-as uint 32))
(deftype nav-mesh-editable (structure)
((flags uint32)
(verts basic)
(tris basic)
((flags nav-mesh-editable-flag)
(verts vector-array)
(tris nav-mesh-tri-quad-array)
(quads nav-mesh-tri-quad-array)
(navmesh-id uint32)
(idx uint32)
@@ -99,16 +127,17 @@
(selected-poly uint32)
)
(:methods
(nav-mesh-editable-method-9 () none)
(nav-mesh-editable-method-10 () none)
(nav-mesh-editable-method-11 () none)
(nav-mesh-editable-method-12 () none)
(nav-mesh-editable-method-13 () none)
(nav-mesh-editable-method-14 () none)
(nav-mesh-editable-method-15 () none)
(nav-mesh-editable-method-16 () none)
(nav-mesh-editable-method-17 () none)
(nav-mesh-editable-method-18 () none)
(new (symbol type) _type_)
(init-fields! (_type_) none)
(nav-mesh-editable-method-10 (_type_ symbol) none)
(add-vert! (_type_ vector) int)
(nav-mesh-editable-method-12 (_type_ vector symbol) object)
(nav-mesh-editable-method-13 (_type_) none)
(nav-mesh-editable-method-14 (_type_ vector) int)
(nav-mesh-editable-method-15 (_type_ int) object)
(nav-mesh-editable-method-16 (_type_) object)
(nav-mesh-editable-method-17 (_type_) object)
(nav-mesh-editable-method-18 (_type_) none)
)
)
@@ -121,16 +150,52 @@
(set! (-> nav-mesh-editable-array heap-base) (the-as uint 48))
(defmethod init-fields! ((this nav-mesh-editable))
(set! (-> this verts) (new 'debug 'vector-array 1024))
(set! (-> this verts length) 0)
(set! (-> this tris) (new 'debug 'nav-mesh-tri-quad-array 512))
(set! (-> this tris length) 0)
(set! (-> this quads) (new 'debug 'nav-mesh-tri-quad-array 512))
(set! (-> this quads length) 0)
(set! (-> this polys) (new 'debug 'nav-mesh-poly-array 92))
(dotimes (s5-0 (-> this polys length))
(init-fields! (-> this polys data s5-0))
(set! (-> this polys data s5-0 poly-id) (the-as uint s5-0))
)
(set! (-> this navmesh-id) (the-as uint 0))
(logior! (-> this flags) (nav-mesh-editable-flag nmef0))
0
(none)
)
;; WARN: Return type mismatch object vs nav-mesh-editable.
(defmethod new nav-mesh-editable ((allocation symbol) (type-to-make type))
(let ((t9-0 (method-of-type structure new))
(v1-1 type-to-make)
)
(-> type-to-make size)
(let ((gp-0 (the-as object (t9-0 allocation v1-1))))
(when (zero? (the-as structure gp-0))
(set! gp-0 0)
(goto cfg-4)
)
((method-of-type nav-mesh-editable init-fields!) (the-as nav-mesh-editable gp-0))
(label cfg-4)
(the-as nav-mesh-editable gp-0)
)
)
)
(deftype nav-mesh-editor-undo (structure)
((current-nav-mesh nav-mesh-editable)
(selected-poly uint32)
(index basic)
(index int16-array)
(insert-pos uint32)
(verts basic)
(verts vector-array)
)
(:methods
(new (symbol type) _type_)
(nav-mesh-editor-undo-method-9 () none)
(init-fields! (_type_) none)
)
)
@@ -143,6 +208,13 @@
(set! (-> nav-mesh-editor-undo-array heap-base) (the-as uint 32))
(defmethod init-fields! ((this nav-mesh-editor-undo))
(set! (-> this index) (new 'debug 'int16-array 2048))
(set! (-> this verts) (new 'debug 'vector-array 1024))
0
(none)
)
;; WARN: Return type mismatch object vs nav-mesh-editor-undo.
(defmethod new nav-mesh-editor-undo ((allocation symbol) (type-to-make type))
(let ((t9-0 (method-of-type structure new))
@@ -154,7 +226,7 @@
(set! gp-0 0)
(goto cfg-4)
)
((method-of-type nav-mesh-editor-undo nav-mesh-editor-undo-method-9))
((method-of-type nav-mesh-editor-undo init-fields!) (the-as nav-mesh-editor-undo gp-0))
(label cfg-4)
(the-as nav-mesh-editor-undo gp-0)
)
@@ -162,9 +234,9 @@
)
(deftype nav-mesh-editor (process-drawable)
((close-menu-time uint64)
(external-cam-mode basic)
(mouse-pressed uint64)
((close-menu-time time-frame)
(external-cam-mode symbol)
(mouse-pressed time-frame)
(mouse-screen-pos vector :inline)
(mouse-pos vector :inline)
(mouse-end vector :inline)
@@ -180,29 +252,31 @@
(lock-action basic)
(mouse-action uint32)
(mouse-action-pos-ref vector :inline)
(nav-meshes basic)
(nav-meshes nav-mesh-editable-array)
(current-nav-mesh nav-mesh-editable)
(manipulator manipulator :inline)
(level-name basic)
(level-name string)
(level-id uint32)
(undo-min uint32)
(undo-id uint32)
(undo-max uint32)
(undos basic)
(hide-unselected basic)
(allow-snap basic)
(undos nav-mesh-editor-undo-array)
(hide-unselected symbol)
(allow-snap symbol)
)
(:state-methods
idle
)
(:methods
(nav-mesh-editor-method-20 () none)
(nav-mesh-editor-method-21 () none)
(nav-mesh-editor-method-22 () none)
(nav-mesh-editor-method-23 () none)
(nav-mesh-editor-method-24 () none)
(nav-mesh-editor-method-25 () none)
(nav-mesh-editor-method-26 () none)
(nav-mesh-editor-method-27 () none)
(nav-mesh-editor-method-21 (_type_) none)
(nav-mesh-editor-method-22 (_type_) none)
(set-level-info! (_type_ symbol) none)
(select-nav-mesh-by-id (_type_ int) object)
(nav-mesh-editor-method-25 (_type_) none)
(nav-mesh-editor-method-26 (_type_) none)
(nav-mesh-editor-method-27 (_type_) object)
)
)
(define *nav-mesh-editor* (the-as nav-mesh-editor #f))
(define *nav-mesh-editor* (the-as (pointer nav-mesh-editor) #f))
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+473
View File
@@ -5,5 +5,478 @@
;; name in dgo: visvol-edit
;; dgos: GAME
;; +++visvol-edit-func
(defenum visvol-edit-func
:type uint64
(visvol-positive 0)
(visvol-negative 1)
(adjust-sphere 2)
(adjust-vis-distance 3)
)
;; ---visvol-edit-func
;; DECOMP BEGINS
;; this file is debug only
(declare-file (debug))
(deftype visvol-edit-info (structure)
((editing symbol)
(current-func visvol-edit-func)
(analog-func visvol-edit-func)
)
(:methods
(handle-pad-input (_type_) object)
(draw-menu (_type_ process-drawable) object)
(set-origin-joint-idx! (_type_ process-drawable) none)
)
)
(deftype visvol-editor (process)
((proc handle)
)
(:state-methods
idle
)
)
;; WARN: Return type mismatch int vs object.
(defmethod handle-pad-input ((this visvol-edit-info))
(if (cpad-pressed? 0 up)
(+! (-> this current-func) -1)
)
(if (cpad-pressed? 0 left)
(+! (-> this current-func) -4)
)
(if (cpad-pressed? 0 down)
(+! (-> this current-func) 1)
)
(if (cpad-pressed? 0 right)
(+! (-> this current-func) 4)
)
(cond
((< (the-as int (-> this current-func)) 0)
(let ((v0-0 2))
(set! (-> this current-func) (the-as visvol-edit-func v0-0))
v0-0
)
)
((>= (the-as int (-> this current-func)) 3)
(set! (-> this current-func) (visvol-edit-func visvol-positive))
0
)
)
)
;; WARN: Function (method 11 visvol-edit-info) has a return type of none, but the expression builder found a return statement.
(defmethod set-origin-joint-idx! ((this visvol-edit-info) (arg0 process-drawable))
(if (or (not arg0) (!= (-> this analog-func) 2))
(return #f)
)
(let ((v0-1 (the-as int (-> arg0 draw origin-joint-index))))
(let ((v1-7 (+ (-> arg0 node-list length) -1)))
(when (cpad-pressed? 0 r1)
(set! v0-1 (the-as int (+ (the-as uint v0-1) 1)))
(if (cpad-hold? 0 l1)
(set! v0-1 (the-as int (+ (the-as uint v0-1) 4)))
)
(case v0-1
((1 2)
(set! v0-1 3)
)
)
)
(when (cpad-pressed? 0 l1)
(+! v0-1 -1)
(if (cpad-hold? 0 r1)
(+! v0-1 -4)
)
(case v0-1
((1 2)
(set! v0-1 0)
)
)
)
(if (< v0-1 0)
(set! v0-1 v1-7)
)
(if (< v1-7 v0-1)
(set! v0-1 0)
)
)
(set! (-> arg0 draw origin-joint-index) (the-as uint v0-1))
)
(none)
)
;; WARN: Return type mismatch int vs object.
(defmethod draw-menu ((this visvol-edit-info) (arg0 process-drawable))
(when (cpad-pressed? 0 l2)
(set! (-> this editing) (not (-> this editing)))
(cond
((-> this editing)
(set! *external-cam-mode* 'locked)
)
(*target*
(set! *external-cam-mode* #f)
)
(else
(set! *external-cam-mode* 'pad-0)
)
)
)
(cond
((or (not (-> this editing)) (cpad-hold? 0 r2))
(if (not (-> this editing))
(format *stdcon* "press l2 to edit visvol~%")
(format *stdcon* "release r2 to continue editing visvol~%")
)
(if (or (cpad-hold? 0 r2) (not *target*))
(set! *external-cam-mode* 'pad-0)
)
)
(else
(set! *external-cam-mode* 'locked)
(handle-pad-input this)
(set-origin-joint-idx! this arg0)
(let ((s3-0 ">")
(s4-0 " ")
)
(if (not (logtest? (-> *display* real-frame-clock integral-frame-counter) 8))
(set! s3-0 " ")
)
(format *stdcon* " r2/l2: move camera~%")
(format
*stdcon*
" r1/l1: select joint ~D ~S~%"
(if arg0
(the-as int (-> arg0 draw origin-joint-index))
-1
)
(if (and arg0 (-> arg0 node-list data (-> arg0 draw origin-joint-index) joint))
(-> arg0 node-list data (-> arg0 draw origin-joint-index) joint name)
"?"
)
)
(format *stdcon* " dpad: select function~%")
(format *stdcon* " x, tri: toggle/call~%")
(format *stdcon* "------------------------~%")
(let ((t9-9 format)
(a0-14 *stdcon*)
(a1-9 " ~S analog: ~S~%")
(a2-1 (if (= (-> this current-func) (visvol-edit-func visvol-positive))
s3-0
s4-0
)
)
(v1-45 (-> this analog-func))
)
(t9-9 a0-14 a1-9 a2-1 (cond
((= v1-45 (visvol-edit-func visvol-positive))
(set! *display-xyz-axes* #t)
"visvol positive"
)
((= v1-45 (visvol-edit-func visvol-negative))
(set! *display-xyz-axes* #t)
"visvol negative"
)
((= v1-45 (visvol-edit-func adjust-sphere))
(set! *display-xyz-axes* #f)
"adjust sphere"
)
((= v1-45 (visvol-edit-func adjust-vis-distance))
(set! *display-xyz-axes* #f)
"adjust vis distance"
)
(else
"???"
)
)
)
)
(format *stdcon* " ~S print to listener~%" (if (= (-> this current-func) (visvol-edit-func visvol-negative))
s3-0
s4-0
)
)
(format *stdcon* " ~S quit~%" (cond
((= (-> this current-func) (visvol-edit-func adjust-sphere))
(empty)
s3-0
)
(else
s4-0
)
)
)
)
(let ((v1-51 0))
(if (cpad-pressed? 0 x)
(+! v1-51 1)
)
(if (cpad-pressed? 0 triangle)
(+! v1-51 -1)
)
(when (nonzero? v1-51)
(case (-> this current-func)
(((visvol-edit-func visvol-positive))
(+! (-> this analog-func) v1-51)
)
(((visvol-edit-func visvol-negative))
(when arg0
(let ((s4-1 (entity-by-name (-> arg0 name))))
(when s4-1
(let ((f30-0 (res-lump-float s4-1 'vis-dist :default 200.0))
(s4-2 (res-lump-data s4-1 'visvol (pointer float)))
)
(when s4-2
(format #t "~%actor-vis ~S ~M " (-> arg0 name) f30-0)
(format #t "~M ~M ~M ~M ~M ~M~%~%" (-> s4-2 0) (-> s4-2 1) (-> s4-2 2) (-> s4-2 4) (-> s4-2 5) (-> s4-2 6))
)
)
)
)
(format
#t
"~%:bounds (static-spherem ~M ~M ~M ~M)~%"
(-> arg0 draw bounds x)
(-> arg0 draw bounds y)
(-> arg0 draw bounds z)
(-> arg0 draw bounds w)
)
(let ((v1-63 (-> arg0 draw origin-joint-index)))
(format
#t
":origin-joint ~s~%~%"
(if (and (>= v1-63 0) (< v1-63 (the-as uint (-> arg0 node-list length))) (-> arg0 node-list data v1-63 joint))
(-> arg0 node-list data v1-63 joint name)
"?"
)
)
)
)
)
(((visvol-edit-func adjust-sphere))
(kill-by-type visvol-editor *active-pool*)
)
(else
(format 0 "~%ERROR<GMJ>: bad visvol-edit-func~%")
)
)
)
)
(cond
((< (the-as int (-> this analog-func)) 0)
(set! (-> this analog-func) (visvol-edit-func adjust-vis-distance))
)
((>= (the-as int (-> this analog-func)) 4)
(set! (-> this analog-func) (visvol-edit-func visvol-positive))
0
)
)
(when arg0
(let ((f28-0 (analog-input (the-as int (-> *cpad-list* cpads 0 rightx)) 128.0 48.0 110.0 1.0))
(f30-1 (analog-input (the-as int (-> *cpad-list* cpads 0 righty)) 128.0 48.0 110.0 1.0))
(f26-0 (analog-input (the-as int (-> *cpad-list* cpads 0 lefty)) 128.0 48.0 110.0 1.0))
(f0-10 (analog-input (the-as int (-> *cpad-list* cpads 0 leftx)) 128.0 48.0 110.0 1.0))
)
(when (or (!= f28-0 0.0) (!= f30-1 0.0) (!= f26-0 0.0) (!= f0-10 0.0))
(case (-> this analog-func)
(((visvol-edit-func visvol-positive) (visvol-edit-func visvol-negative))
(set! f28-0 (* 1228.8 f28-0))
(set! f30-1 (* -1228.8 f30-1))
(set! f26-0 (* 1228.8 f26-0))
(let ((f0-11 (/ f0-10 -100)))
(set! f0-10 (+ 1.0 f0-11))
)
)
(((visvol-edit-func adjust-sphere))
(set! f28-0 (* -409.6 f28-0))
(set! f30-1 (* -409.6 f30-1))
(set! f26-0 (* -409.6 f26-0))
(let ((f0-12 (/ f0-10 100)))
(set! f0-10 (+ 1.0 f0-12))
)
)
(((visvol-edit-func adjust-vis-distance))
(let ((f1-15 (/ f28-0 100)))
(set! f28-0 (+ 1.0 f1-15))
)
(let ((f1-17 (/ f30-1 -100)))
(set! f30-1 (+ 1.0 f1-17))
)
(let ((f1-19 (/ f26-0 100)))
(set! f26-0 (+ 1.0 f1-19))
)
)
)
(case (-> this analog-func)
(((visvol-edit-func visvol-positive))
(let ((a0-57 (entity-by-name (-> arg0 name))))
(when a0-57
(let ((v1-110 (res-lump-data a0-57 'visvol (pointer float))))
(when v1-110
(let ((a2-23 (&-> v1-110 4))
(a0-58 (&-> v1-110 4))
(a1-29 (new 'stack-no-clear 'vector))
)
(set! (-> a1-29 x) f28-0)
(set! (-> a1-29 y) f30-1)
(set! (-> a1-29 z) f26-0)
(set! (-> a1-29 w) 1.0)
(vector+! (the-as vector a2-23) (the-as vector a0-58) a1-29)
)
(set! (-> v1-110 4) (fmax (-> v1-110 4) (+ 4096.0 (-> v1-110 0))))
(set! (-> v1-110 5) (fmax (-> v1-110 5) (+ 4096.0 (-> v1-110 1))))
(set! (-> v1-110 6) (fmax (-> v1-110 6) (+ 4096.0 (-> v1-110 2))))
)
)
)
)
)
(((visvol-edit-func visvol-negative))
(let ((a0-65 (entity-by-name (-> arg0 name))))
(when a0-65
(let ((v1-112 (res-lump-data a0-65 'visvol (pointer float))))
(when v1-112
(let ((a2-26 (&-> v1-112 0))
(a0-66 (&-> v1-112 0))
(a1-34 (new 'stack-no-clear 'vector))
)
(set! (-> a1-34 x) f28-0)
(set! (-> a1-34 y) f30-1)
(set! (-> a1-34 z) f26-0)
(set! (-> a1-34 w) 1.0)
(vector+! (the-as vector a2-26) (the-as vector a0-66) a1-34)
)
(set! (-> v1-112 0) (fmin (-> v1-112 0) (+ -4096.0 (-> v1-112 4))))
(set! (-> v1-112 1) (fmin (-> v1-112 1) (+ -4096.0 (-> v1-112 5))))
(set! (-> v1-112 2) (fmin (-> v1-112 2) (+ -4096.0 (-> v1-112 6))))
)
)
)
)
)
(((visvol-edit-func adjust-sphere))
(set! (-> arg0 draw bounds w) (* (-> arg0 draw bounds w) f0-10))
(let ((s4-3 (matrix-copy! (new 'stack-no-clear 'matrix) (matrix-local->world #f #f)))
(s2-0 (matrix-copy!
(new 'stack-no-clear 'matrix)
(-> arg0 node-list data (-> arg0 draw origin-joint-index) bone transform)
)
)
(s3-1 (new 'stack-no-clear 'vector))
)
(set! (-> s3-1 x) f28-0)
(set! (-> s3-1 y) f30-1)
(set! (-> s3-1 z) f26-0)
(set! (-> s3-1 w) 1.0)
(vector-reset! (-> s4-3 trans))
(vector-matrix*! s3-1 s3-1 s4-3)
(vector-reset! (-> s2-0 trans))
(matrix-transpose! s2-0 s2-0)
(vector-matrix*! s3-1 s3-1 s2-0)
(+! (-> arg0 draw bounds x) (-> s3-1 x))
(+! (-> arg0 draw bounds y) (-> s3-1 y))
(+! (-> arg0 draw bounds z) (-> s3-1 z))
)
)
(((visvol-edit-func adjust-vis-distance))
(let ((s4-4 (entity-by-name (-> arg0 name))))
(when s4-4
(let ((f0-36 (* (res-lump-float s4-4 'vis-dist :default 200.0) f30-1)))
(add-32bit-data!
s4-4
(new 'static 'res-tag :name 'vis-dist :key-frame -1000000000.0 :elt-count #x1 :elt-type float)
f0-36
)
)
)
)
)
)
)
)
(case (-> this analog-func)
(((visvol-edit-func adjust-vis-distance))
(let ((a0-93 (entity-by-name (-> arg0 name))))
(when a0-93
(let ((f0-37 (res-lump-float a0-93 'vis-dist :default 200.0)))
(format *stdcon* "~%vis distance: ~M" f0-37)
)
)
)
)
)
)
)
)
(case (-> this analog-func)
(((visvol-edit-func adjust-sphere))
(when arg0
(let ((a1-53 (-> arg0 draw origin-joint-index)))
(show-maya-skeleton arg0 (the-as int a1-53) #x46400000)
)
)
)
)
0
)
(define *visvol-edit-info* (the-as visvol-edit-info 0))
(define *visvol-edit-info* (new 'static 'visvol-edit-info :editing #t))
(defstate idle (visvol-editor)
:virtual #t
:enter (behavior ()
(set! *display-actor-vis* #t)
)
:exit (behavior ()
(set! *display-xyz-axes* #f)
(set! *display-actor-vis* #f)
(set! *external-cam-mode* #f)
)
:trans (behavior ()
(draw-menu
*visvol-edit-info*
(the-as process-drawable (as-type (handle->process (-> self proc)) process-drawable))
)
)
:code sleep-code
)
(defbehavior visvol-editor-init-by-other visvol-editor ((arg0 handle))
(set! (-> self proc) arg0)
(go-virtual idle)
)
;; WARN: Return type mismatch int vs object.
(defun stop-visvol-edit ()
(kill-by-type visvol-editor *active-pool*)
0
)
;; WARN: Return type mismatch int vs object.
(defun visvol-edit ((arg0 string))
(stop-visvol-edit)
(let* ((v1-0 (process->ppointer (process-by-name arg0 *active-pool*)))
(gp-0 (logior (if v1-0
(new 'static 'handle :pid (-> v1-0 0 pid))
(new 'static 'handle)
)
(new 'static 'handle :process v1-0)
)
)
)
(if (not (handle->process gp-0))
(set! gp-0 (process->handle *debug-actor*))
(debug-actor arg0)
)
(process-spawn visvol-editor gp-0 :name "visvol-editor")
)
0
)
+3
View File
@@ -1564,6 +1564,9 @@
;; wrap up this frame (drawing of stdcon, debugging, etc.)
(end-display arg0)
;; og:preserve-this push text below the imgui bar if it's currently open
(when (pc-is-imgui-visible?)
(format *stdcon* "~%~%"))
;; finalize the DMA chain. This does have some potentially complicated texture stuff.
;; Note that, in debug mode, this will do a sync-path, waiting for VU1 to finish.
+188 -67
View File
@@ -20,9 +20,13 @@
(vector-lerp! (-> light-out color) (-> light-a color) (-> light-b color) clamped-alpha)
(vector-deg-slerp (-> light-out direction) (-> light-a direction) (-> light-b direction) clamped-alpha)
(let ((extra-x-a (-> light-a extra x))
(extra-x-b (-> light-b extra x)))
(set! (-> light-out extra x) (+ extra-x-a (* clamped-alpha (- extra-x-b extra-x-a))))))
light-out)
(extra-x-b (-> light-b extra x))
)
(set! (-> light-out extra x) (+ extra-x-a (* clamped-alpha (- extra-x-b extra-x-a))))
)
)
light-out
)
(defun light-group-slerp ((light-group-out light-group) (light-group-a light-group) (light-group-b light-group) (alpha float))
"Linearly interpolate between two [[light-groups]]s by calling [[light-slerp]] on each respective collection of lights
@@ -32,8 +36,15 @@
@param alpha
@returns The linearly interpolated [[light-group]]"
(dotimes (group-idx 4)
(light-slerp (-> light-group-out lights group-idx) (-> light-group-a lights group-idx) (-> light-group-b lights group-idx) alpha))
light-group-out)
(light-slerp
(-> light-group-out lights group-idx)
(-> light-group-a lights group-idx)
(-> light-group-b lights group-idx)
alpha
)
)
light-group-out
)
(defun light-group-process! ((vu-lights vu-lights) (light-group light-group) (vec1 vector) (vec2 vector))
"Unused, needlessly calls [[rotate-y<-vector+vector]] on the two [[vector]]s and calls [[vu-lights<-light-group!]]
@@ -44,7 +55,8 @@
@returns [[none]]"
(rotate-y<-vector+vector vec2 vec1)
(vu-lights<-light-group! vu-lights light-group)
(none))
(none)
)
(define *default-lights* (new 'global 'vu-lights))
@@ -59,7 +71,8 @@
(set-vector! (-> lights direction 0) 1.0 0.0 0.0 1.0)
(set-vector! (-> lights direction 1) 0.0 1.0 0.0 1.0)
(set-vector! (-> lights direction 2) 0.0 0.0 1.0 1.0)
lights)
lights
)
;; WARN: Return type mismatch pointer vs none.
(defun-debug init-light-hash ()
@@ -75,8 +88,12 @@
(set! (-> *light-hash* num-buckets) (the-as uint 0))
(set! (-> *light-hash* bucket-array) (the-as (inline-array light-hash-bucket) (malloc 'loading-level 4096)))
(set! (-> *light-hash* index-array) (malloc 'loading-level #x10000))
(set! (-> *light-hash* light-sphere-array) (the-as (inline-array light-sphere) (malloc 'loading-level #x4000))))
(none))
(set! (-> *light-hash* light-sphere-array)
(the-as (inline-array light-sphere) (malloc 'loading-level #x4000))
)
)
(none)
)
(init-light-hash)
@@ -84,18 +101,20 @@
(def-mips2c light-hash-add-items (function light-hash light-sphere integer object))
(defun-debug reset-light-hash ()
(defun-debug reset-light-hash ((arg0 light-hash))
"Resets the global [[*light-hash*]] back to having `0` lights, indicies, and buckets.
@returns [[none]]"
(set! (-> *light-hash* num-lights) (the-as uint 0))
(set! (-> *light-hash* num-indices) (the-as uint 0))
(set! (-> *light-hash* num-buckets) (the-as uint 0))
0
(none))
(none)
)
(defun-debug update-light-hash ((arg0 light-hash))
(let ((v1-0 (new 'stack-no-clear 'bounding-box))
(s5-0 (new 'stack-no-clear 'vector)))
(s5-0 (new 'stack-no-clear 'vector))
)
(let ((s4-0 (new 'stack-no-clear 'vector)))
(let ((f0-0 0.0))
(set-vector! (-> v1-0 min) 4095996000.0 4095996000.0 4095996000.0 1.0)
@@ -108,40 +127,71 @@
(set! (-> v1-0 max x) (fmax (-> v1-0 max x) (+ (-> a1-9 bsphere x) (-> a1-9 bsphere w))))
(set! (-> v1-0 max y) (fmax (-> v1-0 max y) (+ (-> a1-9 bsphere y) (-> a1-9 bsphere w))))
(set! (-> v1-0 max z) (fmax (-> v1-0 max z) (+ (-> a1-9 bsphere z) (-> a1-9 bsphere w))))
(+! f0-0 (-> a1-9 bsphere w))))
(set! (-> arg0 base-trans quad) (-> v1-0 min quad))
(+! f0-0 (-> a1-9 bsphere w))
)
)
(vector-copy! (-> arg0 base-trans) (-> v1-0 min))
(let ((f0-1 (/ f0-0 (the float (-> arg0 num-lights)))))
(dotimes (a0-8 3)
(set! (-> s5-0 data a0-8) (- (-> v1-0 max data a0-8) (-> v1-0 min data a0-8)))
(set! (-> s4-0 data a0-8) (if (= (-> s5-0 data a0-8) 0.0) 1.0 (/ (-> s5-0 data a0-8) (/ f0-1 (the float (-> arg0 num-lights)))))))))
(set! (-> s4-0 data a0-8) (if (= (-> s5-0 data a0-8) 0.0)
1.0
(/ (-> s5-0 data a0-8) (/ f0-1 (the float (-> arg0 num-lights))))
)
)
)
)
)
(let ((f0-5 (cube-root (/ (the float (-> arg0 num-lights)) (* (-> s4-0 x) (-> s4-0 y) (-> s4-0 z))))))
(set! (-> arg0 dimension-array x) (max 1 (min 16 (the int (+ 0.5 (* f0-5 (-> s4-0 x)))))))
(set! (-> arg0 dimension-array y) (max 1 (min 4 (the int (+ 0.5 (* f0-5 (-> s4-0 y)))))))
(set! (-> arg0 dimension-array z) (max 1 (min 16 (the int (+ 0.5 (* f0-5 (-> s4-0 z)))))))))
(set! (-> arg0 dimension-array z) (max 1 (min 16 (the int (+ 0.5 (* f0-5 (-> s4-0 z)))))))
)
)
(set! (-> arg0 bucket-step 0) (the-as uint (* (-> arg0 dimension-array z) (-> arg0 dimension-array x))))
(set! (-> arg0 bucket-step 1) (the-as uint (-> arg0 dimension-array x)))
(dotimes (v1-13 3)
(set! (-> arg0 axis-scale data v1-13) (/ (the float (-> arg0 dimension-array data v1-13)) (-> s5-0 data v1-13)))))
(set! (-> arg0 num-buckets) (the-as uint (* (* (-> arg0 dimension-array x) (-> arg0 dimension-array y)) (-> arg0 dimension-array z))))
(set! (-> arg0 axis-scale data v1-13)
(/ (the float (-> arg0 dimension-array data v1-13)) (-> s5-0 data v1-13))
)
)
)
(set! (-> arg0 num-buckets)
(the-as uint (* (* (-> arg0 dimension-array x) (-> arg0 dimension-array y)) (-> arg0 dimension-array z)))
)
(dotimes (v1-19 (the-as int (-> arg0 num-buckets)))
(let ((a0-27 (the-as light-hash-bucket (+ (the-as uint (the-as light-hash-bucket (-> arg0 bucket-array))) (* v1-19 4)))))
(let ((a0-27
(the-as light-hash-bucket (+ (the-as uint (the-as light-hash-bucket (-> arg0 bucket-array))) (* v1-19 4)))
)
)
(set! (-> a0-27 index) (the-as uint 0))
(set! (-> a0-27 count) (the-as uint 0)))
0)
(set! (-> a0-27 count) (the-as uint 0))
)
0
)
(dotimes (s5-1 (the-as int (-> arg0 num-lights)))
(light-hash-count-items arg0 (-> arg0 light-sphere-array s5-1)))
(light-hash-count-items arg0 (-> arg0 light-sphere-array s5-1))
)
(let ((v1-26 0))
(dotimes (a0-31 (the-as int (-> arg0 num-buckets)))
(let ((a1-38 (the-as light-hash-bucket (+ (the-as uint (the-as light-hash-bucket (-> arg0 bucket-array))) (* a0-31 4)))))
(let ((a1-38
(the-as light-hash-bucket (+ (the-as uint (the-as light-hash-bucket (-> arg0 bucket-array))) (* a0-31 4)))
)
)
(set! (-> a1-38 index) (the-as uint v1-26))
(+! v1-26 (-> a1-38 count))
(set! (-> a1-38 count) (the-as uint 0)))
0)
(set! (-> arg0 num-indices) (the-as uint v1-26)))
(set! (-> a1-38 count) (the-as uint 0))
)
0
)
(set! (-> arg0 num-indices) (the-as uint v1-26))
)
(dotimes (s5-2 (the-as int (-> arg0 num-lights)))
(light-hash-add-items arg0 (-> arg0 light-sphere-array s5-2) s5-2))
(light-hash-add-items arg0 (-> arg0 light-sphere-array s5-2) s5-2)
)
0
(none))
(none)
)
(defun lookup-light-sphere-by-name ((name string) (hash light-hash))
"Search through a given [[light-hash]]'s lights to find the one that matches the given name
@@ -150,8 +200,15 @@
@returns Either the [[light]] or [[#f]]"
(when (and hash (nonzero? hash))
(dotimes (num-lights (the-as int (-> hash num-lights)))
(let ((light (-> hash light-sphere-array num-lights))) (if (string= name (-> light name)) (return light)))))
(the-as light-sphere #f))
(let ((light (-> hash light-sphere-array num-lights)))
(if (string= name (-> light name))
(return light)
)
)
)
)
(the-as light-sphere #f)
)
(def-mips2c light-hash-get-bucket-index (function light-hash vector int))
@@ -163,17 +220,19 @@
@param! out One of the groups and where the merged result is stored
@param other The other group to merge with
@returns [[none]]"
(local-vars (v1-0 float)
(v1-1 float)
(v1-3 float)
(v1-5 float)
(a1-1 float)
(a1-3 float)
(a2-0 float)
(a2-2 float)
(a2-4 float)
(a3-0 float)
(f6-0 float))
(local-vars
(v1-0 float)
(v1-1 float)
(v1-3 float)
(v1-5 float)
(a1-1 float)
(a1-3 float)
(a2-0 float)
(a2-2 float)
(a2-4 float)
(a3-0 float)
(f6-0 float)
)
(rlet ((acc :class vf)
(Q :class vf)
(vf0 :class vf)
@@ -194,7 +253,8 @@
(vf3 :class vf)
(vf4 :class vf)
(vf5 :class vf)
(vf6 :class vf))
(vf6 :class vf)
)
(init-vf0-vector)
(nop!)
(.max.w.vf vf1 vf0 vf0)
@@ -239,7 +299,10 @@
(let ((v1-2 (shl (the-as int v1-1) 32)))
(b! (zero? a2-1) cfg-9 :delay (set! f6-0 (-> other dir0 extra x)))
(b! (zero? a3-1) cfg-10 :delay (nop!))
(b! (zero? v1-2) cfg-11 :delay (nop!)))))
(b! (zero? v1-2) cfg-11 :delay (nop!))
)
)
)
(.mul.x.vf acc vf15 vf15)
(nop!)
(.add.mul.x.vf acc vf16 vf16 acc)
@@ -330,7 +393,16 @@
(nop!)
(.mov a2-4 vf15)
(nop!)
(let ((f10-1 (/ f1-0 a2-4))) (nop!) (nop!) (set! (-> out dir0 extra x) a2-4) (nop!) (nop!) (let ((a2-6 f10-1)) (.mov vf15 a2-6)))
(let ((f10-1 (/ f1-0 a2-4)))
(nop!)
(nop!)
(set! (-> out dir0 extra x) a2-4)
(nop!)
(nop!)
(let ((a2-6 f10-1))
(.mov vf15 a2-6)
)
)
(.mul.x.vf vf3 vf3 vf15)
(nop!)
(nop!)
@@ -358,7 +430,16 @@
(nop!)
(.mov a1-3 vf16)
(nop!)
(let ((f11-1 (/ f1-0 a1-3))) (nop!) (nop!) (set! (-> out dir1 extra x) a1-3) (nop!) (nop!) (let ((a1-5 f11-1)) (.mov vf16 a1-5)))
(let ((f11-1 (/ f1-0 a1-3)))
(nop!)
(nop!)
(set! (-> out dir1 extra x) a1-3)
(nop!)
(nop!)
(let ((a1-5 f11-1))
(.mov vf16 a1-5)
)
)
(.mul.x.vf vf4 vf4 vf16)
(nop!)
(nop!)
@@ -368,7 +449,10 @@
(nop!)
(.svf (&-> out dir1 direction quad) vf26)
(label cfg-7)
(b! (zero? v1-4) cfg-12 :delay (nop!)))))
(b! (zero? v1-4) cfg-12 :delay (nop!))
)
)
)
(.mul.vf vf24 vf27 vf27)
(nop!)
(.mul.vf vf17 vf17 vf23)
@@ -386,7 +470,17 @@
(nop!)
(.mov v1-5 vf17)
(nop!)
(let ((f12-1 (/ f1-0 v1-5))) (nop!) (nop!) (set! (-> out dir2 extra x) v1-5) (nop!) (nop!) (let ((v1-7 f12-1)) (.mov vf17 v1-7))))
(let ((f12-1 (/ f1-0 v1-5)))
(nop!)
(nop!)
(set! (-> out dir2 extra x) v1-5)
(nop!)
(nop!)
(let ((v1-7 f12-1))
(.mov vf17 v1-7)
)
)
)
(.mul.x.vf vf5 vf5 vf17)
(nop!)
(nop!)
@@ -415,7 +509,9 @@
(set! (-> out dir2 extra x) f6-0)
(label cfg-12)
0
(none)))
(none)
)
)
(defun light-group-scale! ((group light-group) (backup-ptr (pointer light-group)) (scale float))
"Given a [[light-group]], a `pointer` to a [[light-group]] to back it up, and a scale value,
@@ -424,12 +520,17 @@
@param pointer A location to backup the original [[light]]s
@param scale The value to scale by
@returns [[none]]"
(if (!= group backup-ptr) (mem-copy! (the-as pointer group) backup-ptr 192))
(if (!= group backup-ptr)
(mem-copy! (the-as pointer group) backup-ptr 192)
)
(when (!= scale 1.0)
(dotimes (light-idx 4)
(set! (-> group lights light-idx extra x) (* (-> group lights light-idx extra x) scale))))
(set! (-> group lights light-idx extra x) (* (-> group lights light-idx extra x) scale))
)
)
0
(none))
(none)
)
(defun light-group-madd! ((group light-group) (backup-ptr (pointer light-group)) (other light-group) (scalar float))
"Scales the ambient and direction info of one [[light-group]]'s [[light]]s using a scalar value and another [[light-group]]
@@ -438,36 +539,53 @@
@param other The other [[light-group]] used as part of the operation
@param scalar An arbitrary scalar value multipled against each field
@returns [[none]]"
(if (!= group backup-ptr) (mem-copy! (the-as pointer group) backup-ptr 192))
(if (!= group backup-ptr)
(mem-copy! (the-as pointer group) backup-ptr 192)
)
(when (!= scalar 0.0)
(let ((new-light (new 'stack 'light))
(ambi-scaled (* (-> other ambi extra x) scalar)))
(ambi-scaled (* (-> other ambi extra x) scalar))
)
(let ((dir0-scaled (* (-> other dir0 extra x) scalar))
(dir1-scaled (* (-> other dir1 extra x) scalar))
(dir2-scaled (* (-> other dir2 extra x) scalar)))
(dir2-scaled (* (-> other dir2 extra x) scalar))
)
(when (!= dir0-scaled 0.0)
(mem-copy! (the-as pointer new-light) (the-as pointer (-> other dir0)) 48)
(set! (-> new-light extra x) dir0-scaled)
(light-merge! group (the-as light-group new-light))
(set! (-> group dir0 extra y) 0.0))
(set! (-> group dir0 extra y) 0.0)
)
(when (!= dir1-scaled 0.0)
(mem-copy! (the-as pointer new-light) (the-as pointer (-> other dir1)) 48)
(set! (-> new-light extra x) dir1-scaled)
(light-merge! group (the-as light-group new-light))
(set! (-> group dir1 extra y) 0.0))
(set! (-> group dir1 extra y) 0.0)
)
(when (!= dir2-scaled 0.0)
(mem-copy! (the-as pointer new-light) (the-as pointer (-> other dir2)) 48)
(set! (-> new-light extra x) dir2-scaled)
(light-merge! group (the-as light-group new-light))
(set! (-> group dir2 extra y) 0.0)))
(vector4-scale! (the-as vector4 (-> group ambi color)) (the-as vector4 (-> group ambi color)) (-> group ambi extra x))
(vector4-madd! (the-as vector4 (-> group ambi color))
(the-as vector4 (-> group ambi color))
(the-as vector4 (-> other ambi color))
ambi-scaled))
(set! (-> group ambi extra x) 1.0))
(set! (-> group dir2 extra y) 0.0)
)
)
(vector4-scale!
(the-as vector4 (-> group ambi color))
(the-as vector4 (-> group ambi color))
(-> group ambi extra x)
)
(vector4-madd!
(the-as vector4 (-> group ambi color))
(the-as vector4 (-> group ambi color))
(the-as vector4 (-> other ambi color))
ambi-scaled
)
)
(set! (-> group ambi extra x) 1.0)
)
0
(none))
(none)
)
(defun light-group-lerp! ((group light-group) (backup-ptr (pointer light-group)) (other light-group) (scalar float))
"Linearly interpolates between two [[light-group]]'s.
@@ -479,7 +597,8 @@
(light-group-scale! group backup-ptr (- 1.0 scalar))
(light-group-madd! group backup-ptr other scalar)
0
(none))
(none)
)
(defun shadow-info-copy! ((dest light-group) (src light-group))
"Copies `extra.y` from `src` into `dest` for each [[light]]
@@ -487,6 +606,8 @@
@param src
@returns [[none]]"
(dotimes (light-idx 4)
(set! (-> dest lights light-idx extra y) (-> src lights light-idx extra y)))
(set! (-> dest lights light-idx extra y) (-> src lights light-idx extra y))
)
0
(none))
(none)
)
+2 -1
View File
@@ -785,7 +785,8 @@
(set! (-> mouse button0-rel 0) (logclear (-> mouse button0-abs 0) (-> mouse button0-abs 1)))
)
)
(if (and (-> mouse active) (-> mouse valid) (-> mouse cursor))
;; og:preserve-this added pc port check
(if (and (-> mouse active) (-> mouse valid) (-> mouse cursor) (#if PC_PORT (not *disable-mouse*) #t))
(add-debug-cursor
#t
(bucket-id debug-no-zbuf2)
+1
View File
@@ -523,6 +523,7 @@
)
(define *sql-result* (the-as sql-result #f))
(define-extern *collapse-quote* symbol)
(defmacro defbehavior (name process-type bindings &rest body)
"define a new behavior. This is simply a function where self is bound to the process register,
@@ -1116,7 +1116,7 @@
(set! (-> arg0 node-array length) 0)
(set! (-> arg0 edge-array length) 0)
(set! (-> arg0 visnode-array length) 0)
(set! (-> arg0 graph-type) (the-as basic (mysql-nav-graph-method-21 arg0)))
(set! (-> arg0 graph-type) (get-graph-type arg0 (the-as symbol arg1)))
(let ((s3-0 (clear *temp-string*)))
(format s3-0 "select nav_graph_id from nav_graph where name='~S'" arg1)
(let ((a2-2 (sql-query s3-0)))
+43 -39
View File
@@ -162,7 +162,7 @@
;; ERROR: Stack slot load at 272 mismatch: defined as size 4, got size 16
;; ERROR: Stack slot load at 288 mismatch: defined as size 4, got size 16
;; WARN: Return type mismatch int vs none.
(defun print-default-collision ((arg0 process-drawable))
(defun print-default-collision ()
(local-vars (sv-224 matrix) (sv-240 symbol) (sv-256 string) (sv-272 float) (sv-288 float))
(let ((gp-0 (process-spawn collision-editor-default-proc :name "collision-editor-default-proc")))
(when gp-0
@@ -182,14 +182,14 @@
)
(format #t " :children (~%")
(let* ((t9-10 (method-of-type res-lump get-property-struct))
(a0-11 (-> (the-as process-drawable (-> gp-0 0)) draw jgeo extra))
(a0-10 (-> (the-as process-drawable (-> gp-0 0)) draw jgeo extra))
(a1-10 'collide-mesh-group)
(a2-3 'interp)
(a3-3 -1000000000.0)
(t0-0 (the-as float #f))
(s5-1 (the-as
(array collide-mesh)
(t9-10 a0-11 a1-10 a2-3 a3-3 (the-as structure t0-0) (the-as (pointer res-tag) #f) *res-static-buf*)
(t9-10 a0-10 a1-10 a2-3 a3-3 (the-as structure t0-0) (the-as (pointer res-tag) #f) *res-static-buf*)
)
)
)
@@ -218,12 +218,12 @@
)
(else
(let ((t9-19 format)
(a0-23 #t)
(a0-22 #t)
(a1-18 " :transform-index (joint-node-index ~S ~S)~%")
(a2-5 *collision-editor-art-group-name*)
(a3-12 (-> (the-as process-drawable (-> gp-0 0)) node-list data (+ (-> s5-1 s4-0 joint-id) 1) joint name))
)
(t9-19 a0-23 a1-18 a2-5 a3-12)
(t9-19 a0-22 a1-18 a2-5 a3-12)
(let ((s0-0 (new 'stack 'collide-shape-prim-mesh (the-as collide-shape 0) (the-as uint a3-12) (the-as uint t0-0))))
(set! (-> s0-0 cshape) (the-as collide-shape (-> (the-as process-drawable (-> gp-0 0)) root)))
(set! (-> s0-0 transform-index) (+ (-> s5-1 s4-0 joint-id) 1))
@@ -233,82 +233,82 @@
(set! (-> s0-0 mesh-cache-id) (the-as uint 0))
(set! (-> s0-0 mesh-id) s4-0)
(collision-editor-add-mesh-to-ccache (the-as collide-shape-prim-group s0-0) *collide-cache*)
(let ((a0-26 (the-as object (-> *collide-cache* tris)))
(let ((a0-25 (the-as object (-> *collide-cache* tris)))
(v1-41 (new 'stack-no-clear 'vector))
(s2-0 (new 'stack-no-clear 'vector))
(s3-0 (new 'stack-no-clear 'vector))
(s1-0 (new 'stack-no-clear 'vector))
)
(when (nonzero? (-> *collide-cache* num-tris))
(vector-copy! v1-41 (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0))
(vector-copy! s2-0 (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0))
(vector-copy! v1-41 (-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 0))
(vector-copy! s2-0 (-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 0))
)
(countdown (a1-27 (-> *collide-cache* num-tris))
(set! (-> v1-41 x) (fmin
(fmin
(fmin (-> v1-41 x) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 x))
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 x)
(fmin (-> v1-41 x) (-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 0 x))
(-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 1 x)
)
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 x)
(-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 2 x)
)
)
(set! (-> v1-41 y) (fmin
(fmin
(fmin (-> v1-41 y) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 y))
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 y)
(fmin (-> v1-41 y) (-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 0 y))
(-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 1 y)
)
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 y)
(-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 2 y)
)
)
(set! (-> v1-41 z) (fmin
(fmin
(fmin (-> v1-41 z) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 z))
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 z)
(fmin (-> v1-41 z) (-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 0 z))
(-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 1 z)
)
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 z)
(-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 2 z)
)
)
(set! (-> s2-0 x) (fmax
(fmax
(fmax (-> s2-0 x) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 x))
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 x)
(fmax (-> s2-0 x) (-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 0 x))
(-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 1 x)
)
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 x)
(-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 2 x)
)
)
(set! (-> s2-0 y) (fmax
(fmax
(fmax (-> s2-0 y) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 y))
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 y)
(fmax (-> s2-0 y) (-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 0 y))
(-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 1 y)
)
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 y)
(-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 2 y)
)
)
(set! (-> s2-0 z) (fmax
(fmax
(fmax (-> s2-0 z) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 z))
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 z)
(fmax (-> s2-0 z) (-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 0 z))
(-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 1 z)
)
(-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 z)
(-> (the-as (inline-array collide-cache-tri) a0-25) 0 vertex 2 z)
)
)
(set! a0-26 (-> (the-as (inline-array collide-cache-tri) a0-26) 1))
(set! a0-25 (-> (the-as (inline-array collide-cache-tri) a0-25) 1))
)
(vector+! s3-0 v1-41 s2-0)
(vector-float*! s3-0 s3-0 0.5)
(vector<-cspace! s1-0 (-> (the-as process-drawable (-> gp-0 0)) node-list data (-> s0-0 transform-index)))
(vector-! s1-0 s3-0 s1-0)
(set! sv-224 (new 'stack-no-clear 'matrix))
(let* ((a0-35 (-> (the-as process-drawable (-> gp-0 0)) node-list data (-> s0-0 transform-index) bone transform))
(a2-11 (-> a0-35 rvec quad))
(a1-36 (-> a0-35 uvec quad))
(v1-53 (-> a0-35 fvec quad))
(a0-36 (-> a0-35 trans quad))
(let* ((a0-34 (-> (the-as process-drawable (-> gp-0 0)) node-list data (-> s0-0 transform-index) bone transform))
(a2-11 (-> a0-34 rvec quad))
(a1-36 (-> a0-34 uvec quad))
(v1-53 (-> a0-34 fvec quad))
(a0-35 (-> a0-34 trans quad))
)
(set! (-> sv-224 rvec quad) a2-11)
(set! (-> sv-224 uvec quad) a1-36)
(set! (-> sv-224 fvec quad) v1-53)
(set! (-> sv-224 trans quad) a0-36)
(set! (-> sv-224 trans quad) a0-35)
)
(vector-reset! (-> sv-224 trans))
(matrix-transpose! sv-224 sv-224)
@@ -501,9 +501,9 @@
(current-prim int32)
)
(:methods
(collision-edit-info-method-9 (_type_) none)
(handle-pad-input (_type_) none)
(draw-menu (_type_ process-drawable) none)
(collision-edit-info-method-11 (_type_ process-drawable) none)
(set-current-prim! (_type_ process-drawable) none)
)
)
@@ -553,7 +553,7 @@
;; definition for method 9 of type collision-edit-info
;; WARN: Return type mismatch int vs none.
(defmethod collision-edit-info-method-9 ((this collision-edit-info))
(defmethod handle-pad-input ((this collision-edit-info))
(if (cpad-pressed? 0 up)
(+! (-> this current-func) -1)
)
@@ -580,7 +580,7 @@
;; definition for method 11 of type collision-edit-info
;; WARN: Return type mismatch int vs none.
(defmethod collision-edit-info-method-11 ((this collision-edit-info) (arg0 process-drawable))
(defmethod set-current-prim! ((this collision-edit-info) (arg0 process-drawable))
(local-vars (s5-0 int))
(when (not arg0)
(set! s5-0 (the-as int #f))
@@ -643,8 +643,8 @@
)
(else
(set! *external-cam-mode* 'locked)
(collision-edit-info-method-9 this)
(collision-edit-info-method-11 this arg0)
(handle-pad-input this)
(set-current-prim! this arg0)
(let ((s3-0 ">")
(s4-0 " ")
)
@@ -968,3 +968,7 @@
(process-spawn collision-editor gp-2 :name "collision-editor")
)
)
+66 -162
View File
@@ -4934,13 +4934,9 @@
(function
"Start Editor"
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (when (not (get-nav-graph-editor))
(let ((t9-1 run-nav-graph-editor)
(a0-1 'test)
)
(t9-1 a0-1)
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (if (not (get-nav-graph-editor))
(run-nav-graph-editor 'test #f)
)
)
)
)
(function
@@ -4954,24 +4950,22 @@
(function
"Toggle Plane Mode"
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(if a0-1
((method-of-object a0-1 nav-graph-editor-method-64))
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (let ((a0-1 (get-nav-graph-editor)))
(if a0-1
(nav-graph-editor-method-64 a0-1)
)
)
)
)
)
)
(function
"Toggle Hover Mode"
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(if a0-1
((method-of-object a0-1 nav-graph-editor-method-65))
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (let ((a0-1 (get-nav-graph-editor)))
(if a0-1
(nav-graph-editor-method-65 a0-1)
)
)
)
)
)
)
(menu
"Load"
@@ -4980,13 +4974,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'hover
'foresta
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'hover (the-as string 'foresta))
)
)
)
)
)
@@ -4995,13 +4985,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'hover
'sewc
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'hover (the-as string 'sewc))
)
)
)
)
)
@@ -5010,13 +4996,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'hover
'sewg
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'hover (the-as string 'sewg))
)
)
)
)
)
@@ -5025,13 +5007,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'hover
'sewl
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'hover (the-as string 'sewl))
)
)
)
)
)
@@ -5040,12 +5018,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'traffic
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'traffic (the-as string #f))
)
)
)
)
)
@@ -5054,12 +5029,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'minimap
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'minimap (the-as string #f))
)
)
)
)
)
@@ -5068,12 +5040,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'flyingsaw_2
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'flyingsaw_2 (the-as string #f))
)
)
)
)
)
@@ -5082,12 +5051,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'flyingsaw_3
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'flyingsaw_3 (the-as string #f))
)
)
)
)
)
@@ -5096,12 +5062,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'forest-plant-1
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'forest-plant-1 (the-as string #f))
)
)
)
)
)
@@ -5110,12 +5073,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'forest-plant-2
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'forest-plant-2 (the-as string #f))
)
)
)
)
)
@@ -5124,12 +5084,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'forest-plant-3
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'forest-plant-3 (the-as string #f))
)
)
)
)
)
@@ -5138,12 +5095,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'forest-plant-4
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'forest-plant-4 (the-as string #f))
)
)
)
)
)
@@ -5152,12 +5106,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'beast
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'beast (the-as string #f))
)
)
)
)
)
@@ -5166,12 +5117,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'wasminimap
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'wasminimap (the-as string #f))
)
)
)
)
)
@@ -5180,12 +5128,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'desrescue
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'desrescue (the-as string #f))
)
)
)
)
)
@@ -5194,12 +5139,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'assault
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'assault (the-as string #f))
)
)
)
)
)
@@ -5208,12 +5150,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'timer-chase-1
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'timer-chase-1 (the-as string #f))
)
)
)
)
)
@@ -5222,12 +5161,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'protect-hq
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'protect-hq (the-as string #f))
)
)
)
)
)
@@ -5236,12 +5172,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'blow-tower
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'blow-tower (the-as string #f))
)
)
)
)
)
@@ -5250,12 +5183,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'desert-lizard
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'desert-lizard (the-as string #f))
)
)
)
)
)
@@ -5264,12 +5194,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'terraformer-walk
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'terraformer-walk (the-as string #f))
)
)
)
)
)
@@ -5278,12 +5205,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'terraformer-fly
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'terraformer-fly (the-as string #f))
)
)
)
)
)
@@ -5292,12 +5216,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'beast-battle
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'beast-battle (the-as string #f))
)
)
)
)
)
@@ -5306,12 +5227,9 @@
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(when a0-1
(let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66)))
'desert-chase-marauder
(t9-1)
(if a0-1
(nav-graph-editor-method-66 a0-1 'desert-chase-marauder (the-as string #f))
)
)
)
)
)
@@ -5319,13 +5237,12 @@
(function
"Save"
#f
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(let ((a0-1 (get-nav-graph-editor)))
(if a0-1
((method-of-object a0-1 nav-graph-editor-method-67))
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (let ((a0-1 (get-nav-graph-editor)))
(if a0-1
(nav-graph-editor-method-67 a0-1)
)
)
)
)
)
)
)
)
@@ -5342,20 +5259,7 @@
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
(when (not *nav-mesh-editor*)
(kill-by-type nav-mesh-editor *active-pool*)
(let ((gp-0 (get-process *default-dead-pool* nav-mesh-editor #x4000 1)))
(when gp-0
(let ((t9-2 (method-of-type nav-mesh-editor activate)))
(t9-2 (the-as nav-mesh-editor gp-0) *entity-pool* "nav-mesh-editor" (the-as pointer #x70004000))
)
(let ((t9-3 run-function-in-process)
(a0-4 gp-0)
(a1-4 nav-mesh-editor-init)
)
((the-as (function object object none) t9-3) a0-4 a1-4)
)
(-> gp-0 ppointer)
)
)
(process-spawn nav-mesh-editor :init nav-mesh-editor-init #f :name "nav-mesh-editor" :to *entity-pool*)
)
)
)
+122 -147
View File
@@ -312,16 +312,16 @@
(filter editable-filter)
(tree symbol)
(level string)
(on-enter string)
(on-inside string)
(on-exit string)
(on-enter pair)
(on-inside pair)
(on-exit pair)
)
(: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)
(save-region! (_type_ editable-array int int) symbol)
(editable-region-method-10 (_type_ int) symbol)
(print-region-info (_type_ vector int) none)
(editable-region-method-12 (_type_) editable-filter)
)
)
@@ -355,33 +355,33 @@
(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)
(get-color (_type_) rgba)
(editable-method-10 (_type_) none)
(editable-method-11 (_type_ vector) symbol)
(set-selected! (_type_ symbol) none)
(editable-method-13 (_type_ vector) float)
(editable-method-14 (_type_ vector vector) float)
(editable-method-15 (_type_) vector)
(editable-method-16 (_type_) float)
(editable-method-17 (_type_ vector editable-flag) none)
(editable-method-18 (_type_ vector int) none)
(editable-method-19 (_type_ vector) none)
(editable-method-20 (_type_ vector matrix) none)
(editable-method-21 (_type_ vector) none)
(editable-method-22 (_type_ vector vector vector vector) none)
(change-region! (_type_ editable-region) none)
(editable-method-24 (_type_ editable-array int int) symbol)
(editable-method-25 (_type_) symbol)
(editable-method-26 (_type_) none)
(delete! (_type_ editable) none)
(editable-method-28 (_type_ editable editable) none)
(copy-into-editable-array! (_type_ editable-array) editable)
(editable-method-30 (_type_ editable-flag) none)
(editable-method-31 (_type_ editable-flag) none)
(get-null-vec (_type_) vector)
(get-null-vec2 (_type_ vector) vector)
(get-level-offset (_type_ editable-array) vector)
(editable-method-35 (_type_ vector) none)
)
)
@@ -467,17 +467,17 @@
)
(: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)
(handle-cmd (_type_ editable-command mouse-info object) symbol)
(editable-array-method-10 (_type_ vector int) editable)
(editable-array-method-11 (_type_ vector vector int) none)
(get-length (_type_) int)
(editable-array-method-13 (_type_ symbol) symbol)
(editable-array-method-14 (_type_ editable-command editable-command string) none)
(editable-array-method-15 (_type_ (function editable editable-region symbol) editable-region) (array editable))
(editable-array-method-16 (_type_ editable) none)
(editable-array-method-17 (_type_) none)
(editable-array-method-18 (_type_ vector vector) vector)
(editable-array-method-19 (_type_ string) symbol)
)
)
@@ -631,21 +631,16 @@
(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)
)
(change-region! gp-0 (cond
(arg1
(empty)
arg1
)
(else
(new 'debug 'editable-region)
)
)
)
(vector-copy! (-> gp-0 trans) arg0)
(set! (-> gp-0 radius) 2048.0)
(set! (-> gp-0 owner) '())
@@ -726,21 +721,16 @@
(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)
)
(change-region! s5-0 (cond
(arg2
(empty)
arg2
)
(else
(new 'debug 'editable-region)
)
)
)
(vector-copy! (-> s5-0 trans) arg0)
(set! (-> s5-0 radius) arg1)
(set! (-> s5-0 owner) '())
@@ -906,21 +896,16 @@
(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)
)
(change-region! gp-0 (cond
(arg2
(empty)
arg2
)
(else
(new 'debug 'editable-region)
)
)
)
(vector-copy! (-> gp-0 trans) arg0)
(set! (-> gp-0 radius) arg1)
(set! (-> gp-0 owner) '())
@@ -951,7 +936,8 @@
)
(:methods
(new (symbol type vector float editable-region) _type_)
(editable-entity-method-36 () none)
(editable-entity-method-36 (_type_) none)
(copy-into-editable-array! (_type_ editable-array) editable-entity :replace)
)
)
@@ -1020,21 +1006,16 @@
(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)
)
(change-region! gp-0 (cond
(arg2
(empty)
arg2
)
(else
(new 'debug 'editable-region)
)
)
)
(vector-copy! (-> gp-0 trans) arg0)
(set! (-> gp-0 radius) arg1)
(set! (-> gp-0 owner) '())
@@ -1053,8 +1034,9 @@
)
(:methods
(new (symbol type editable-region) _type_)
(editable-face-method-36 () none)
(editable-face-method-37 () none)
(editable-face-method-36 (_type_ (inline-array vector)) int)
(editable-face-method-37 (_type_ vector) vector)
(copy-into-editable-array! (_type_ editable-array) editable-face :replace)
)
)
@@ -1127,21 +1109,16 @@
(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)
)
(change-region! gp-0 (cond
(arg0
(empty)
arg0
)
(else
(new 'debug 'editable-region)
)
)
)
(set! (-> gp-0 owner) '())
gp-0
)
@@ -1155,8 +1132,9 @@
)
(:methods
(new (symbol type editable-region) _type_)
(editable-plane-method-36 () none)
(editable-plane-method-37 () none)
(editable-plane-method-36 (_type_ (inline-array vector)) int)
(editable-plane-method-37 (_type_ vector) vector)
(copy-into-editable-array! (_type_ editable-array) editable-plane :replace)
)
)
@@ -1228,21 +1206,16 @@
(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)
)
(change-region! gp-0 (cond
(arg0
(empty)
arg0
)
(else
(new 'debug 'editable-region)
)
)
)
(set! (-> gp-0 owner) '())
(set! (-> gp-0 radius) 20480.0)
gp-0
@@ -1252,10 +1225,10 @@
;; definition of type editable-player
(deftype editable-player (process-drawable)
((current editable-array)
(current-command uint32)
(select-command function)
(current-command editable-command)
(select-command (function object))
(drag-command uint32)
(extra-command function)
(extra-command (function object))
(left-handed basic)
(light-names basic)
(external-cam-mode symbol)
@@ -1273,11 +1246,13 @@
(float-min float)
(float-id uint32)
)
(:state-methods
idle
)
(:methods
(editable-player-method-20 () none)
(editable-player-method-21 () none)
(editable-player-method-22 () none)
(editable-player-method-23 () none)
(editable-player-method-21 (_type_) none)
(editable-player-method-22 (_type_) none)
(editable-player-method-23 (_type_) symbol)
)
)
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+130 -2
View File
@@ -19,7 +19,7 @@
)
(:methods
(set-mode (_type_ manipulator-mode) none)
(manipulator-method-10 (_type_) none)
(manipulator-method-10 (_type_ vector vector) none)
(manipulator-method-11 (_type_) none)
(manipulator-method-12 (_type_ vector) none)
(manipulator-method-13 (_type_ vector vector) none)
@@ -163,7 +163,131 @@
)
;; definition for method 10 of type manipulator
;; ERROR: function was not converted to expressions. Cannot decompile.
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod manipulator-method-10 ((this manipulator) (arg0 vector) (arg1 vector))
(local-vars (v1-11 symbol) (sv-160 symbol) (sv-176 vector))
(set! sv-176 arg1)
(let ((s4-0 (-> this position)))
0.0
(let* ((v0-0
(vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> *math-camera* trans) (-> this position)) 1.0)
)
(s3-0 (< (fabs (vector-dot v0-0 (-> this mat rvec))) 0.9))
(s2-0 (< (fabs (vector-dot v0-0 (-> this mat uvec))) 0.9))
)
(b! (< (fabs (vector-dot v0-0 (-> this mat fvec))) 0.9) cfg-6 :delay (set! v1-11 #t))
(set! sv-160 v1-11)
(set! sv-160 #f)
(label cfg-6)
(let ((f28-0 (the-as float #x7f800000))
(f30-1 (* 0.15 (vector-vector-distance (-> *math-camera* trans) s4-0)))
)
(set! (-> this action) (manipulator-action ma0))
(let ((s1-0 (new 'stack-no-clear 'vector)))
0.0
(let* ((s0-0 (new 'stack-no-clear 'vector))
(v1-16 arg0)
(s0-1 (vector-! s0-0 sv-176 v1-16))
)
(let ((f0-14 (ray-sphere-intersect arg0 s0-1 s4-0 (/ f30-1 5))))
(when (and (< 0.0 f0-14) (>= f28-0 f0-14))
(set! f28-0 f0-14)
(set! (-> this action) (manipulator-action ma7))
)
)
(when (= (-> this action) (manipulator-action ma0))
(when (and s3-0 s2-0)
(let ((f0-18 (ray-sphere-intersect
arg0
s0-1
(vector+*!
(new 'stack-no-clear 'vector)
s4-0
(vector+! (new 'stack-no-clear 'vector) (-> this mat rvec) (-> this mat uvec))
f30-1
)
(* 0.3 f30-1)
)
)
)
(when (and (< 0.0 f0-18) (>= f28-0 f0-18))
(set! f28-0 f0-18)
(set! (-> this action) (manipulator-action ma4))
)
)
)
(when (and s3-0 sv-160)
(let ((f0-22 (ray-sphere-intersect
arg0
s0-1
(vector+*!
(new 'stack-no-clear 'vector)
s4-0
(vector+! (new 'stack-no-clear 'vector) (-> this mat rvec) (-> this mat fvec))
f30-1
)
(* 0.3 f30-1)
)
)
)
(when (and (< 0.0 f0-22) (>= f28-0 f0-22))
(set! f28-0 f0-22)
(set! (-> this action) (manipulator-action ma5))
)
)
)
(when (and s2-0 sv-160)
(let ((f0-26 (ray-sphere-intersect
arg0
s0-1
(vector+*!
(new 'stack-no-clear 'vector)
s4-0
(vector+! (new 'stack-no-clear 'vector) (-> this mat uvec) (-> this mat fvec))
f30-1
)
(* 0.3 f30-1)
)
)
)
(when (and (< 0.0 f0-26) (>= f28-0 f0-26))
(set! f28-0 f0-26)
(set! (-> this action) (manipulator-action ma6))
)
)
)
(when s3-0
(let ((f0-31 (ray-cylinder-intersect arg0 s0-1 s4-0 (-> this mat rvec) (/ f30-1 10) (* 1.3 f30-1) s1-0)))
(when (and (< 0.0 f0-31) (>= f28-0 f0-31))
(set! f28-0 f0-31)
(set! (-> this action) (manipulator-action ma1))
)
)
)
(when s2-0
(let ((f0-36 (ray-cylinder-intersect arg0 s0-1 s4-0 (-> this mat uvec) (/ f30-1 10) (* 1.3 f30-1) s1-0)))
(if (and (< 0.0 f0-36) (>= f28-0 f0-36))
(set! (-> this action) (manipulator-action ma2))
)
)
)
(when sv-160
(let ((f0-41 (ray-cylinder-intersect arg0 s0-1 s4-0 (-> this mat fvec) (/ f30-1 10) (* 1.3 f30-1) s1-0)))
(if (and (< 0.0 f0-41) (>= f0-41 f0-41))
(set! (-> this action) (manipulator-action ma3))
)
)
)
)
)
)
)
)
)
0
(none)
)
;; definition for method 11 of type manipulator
;; INFO: Used lq/sq
@@ -486,3 +610,7 @@
0
(none)
)
+465
View File
@@ -0,0 +1,465 @@
;;-*-Lisp-*-
(in-package goal)
;; this file is debug only
(declare-file (debug))
;; definition of type vector-array
(deftype vector-array (inline-array-class)
((data vector :inline :dynamic)
)
)
;; definition for method 3 of type vector-array
(defmethod inspect ((this vector-array))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tlength: ~D~%" (-> this length))
(format #t "~1Tallocated-length: ~D~%" (-> this allocated-length))
(format #t "~1Tdata[0] @ #x~X~%" (-> this data))
(label cfg-4)
this
)
;; failed to figure out what this is:
(set! (-> vector-array heap-base) (the-as uint 16))
;; definition of type int16-array
(deftype int16-array (inline-array-class)
((data int16 :dynamic)
)
)
;; definition for method 3 of type int16-array
(defmethod inspect ((this int16-array))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tlength: ~D~%" (-> this length))
(format #t "~1Tallocated-length: ~D~%" (-> this allocated-length))
(format #t "~1Tdata[0] @ #x~X~%" (-> this data))
(label cfg-4)
this
)
;; failed to figure out what this is:
(set! (-> int16-array heap-base) (the-as uint 2))
;; definition of type nav-mesh-poly
(deftype nav-mesh-poly (structure)
((poly-id uint32)
(flags nav-mesh-poly-flag)
(index int16-array)
(insert-pos uint32)
)
(:methods
(new (symbol type) _type_)
(init-fields! (_type_) none)
(nav-mesh-poly-method-10 (_type_ nav-mesh-editable) none)
(nav-mesh-poly-method-11 (_type_ int) none)
(nav-mesh-poly-method-12 (_type_ int) none)
(nav-mesh-poly-method-13 (_type_ int) int)
(nav-mesh-poly-method-14 (_type_ int int) object)
)
)
;; definition for method 3 of type nav-mesh-poly
(defmethod inspect ((this nav-mesh-poly))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'nav-mesh-poly)
(format #t "~1Tpoly-id: ~D~%" (-> this poly-id))
(format #t "~1Tflags: ~D~%" (-> this flags))
(format #t "~1Tindex: ~A~%" (-> this index))
(format #t "~1Tinsert-pos: ~D~%" (-> this insert-pos))
(label cfg-4)
this
)
;; definition of type nav-mesh-poly-array
(deftype nav-mesh-poly-array (inline-array-class)
((data nav-mesh-poly :inline :dynamic)
)
)
;; definition for method 3 of type nav-mesh-poly-array
(defmethod inspect ((this nav-mesh-poly-array))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tlength: ~D~%" (-> this length))
(format #t "~1Tallocated-length: ~D~%" (-> this allocated-length))
(format #t "~1Tdata[0] @ #x~X~%" (-> this data))
(label cfg-4)
this
)
;; failed to figure out what this is:
(set! (-> nav-mesh-poly-array heap-base) (the-as uint 16))
;; definition for method 9 of type nav-mesh-poly
;; WARN: Return type mismatch int vs none.
(defmethod init-fields! ((this nav-mesh-poly))
(set! (-> this index) (new 'debug 'int16-array 512))
(set! (-> this index length) 0)
(set! (-> this insert-pos) (the-as uint 0))
0
(none)
)
;; definition for method 0 of type nav-mesh-poly
;; WARN: Return type mismatch object vs nav-mesh-poly.
(defmethod new nav-mesh-poly ((allocation symbol) (type-to-make type))
(let ((t9-0 (method-of-type structure new))
(v1-1 type-to-make)
)
(-> type-to-make size)
(let ((gp-0 (the-as object (t9-0 allocation v1-1))))
(when (zero? (the-as structure gp-0))
(set! gp-0 0)
(goto cfg-4)
)
((method-of-type nav-mesh-poly init-fields!) (the-as nav-mesh-poly gp-0))
(label cfg-4)
(the-as nav-mesh-poly gp-0)
)
)
)
;; definition of type nav-mesh-tri-quad
(deftype nav-mesh-tri-quad (structure)
((indices uint32 4)
(poly uint32)
)
)
;; definition for method 3 of type nav-mesh-tri-quad
(defmethod inspect ((this nav-mesh-tri-quad))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'nav-mesh-tri-quad)
(format #t "~1Tindices[4] @ #x~X~%" (-> this indices))
(format #t "~1Tpoly: ~D~%" (-> this poly))
(label cfg-4)
this
)
;; definition of type nav-mesh-tri-quad-array
(deftype nav-mesh-tri-quad-array (inline-array-class)
((data nav-mesh-tri-quad :inline :dynamic)
)
)
;; definition for method 3 of type nav-mesh-tri-quad-array
(defmethod inspect ((this nav-mesh-tri-quad-array))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tlength: ~D~%" (-> this length))
(format #t "~1Tallocated-length: ~D~%" (-> this allocated-length))
(format #t "~1Tdata[0] @ #x~X~%" (-> this data))
(label cfg-4)
this
)
;; failed to figure out what this is:
(set! (-> nav-mesh-tri-quad-array heap-base) (the-as uint 32))
;; definition of type nav-mesh-editable
(deftype nav-mesh-editable (structure)
((flags nav-mesh-editable-flag)
(verts vector-array)
(tris nav-mesh-tri-quad-array)
(quads nav-mesh-tri-quad-array)
(navmesh-id uint32)
(idx uint32)
(level-name symbol)
(level-id uint32)
(polys nav-mesh-poly-array)
(selected-poly uint32)
)
(:methods
(new (symbol type) _type_)
(init-fields! (_type_) none)
(nav-mesh-editable-method-10 (_type_ symbol) none)
(add-vert! (_type_ vector) int)
(nav-mesh-editable-method-12 (_type_ vector symbol) object)
(nav-mesh-editable-method-13 (_type_) none)
(nav-mesh-editable-method-14 (_type_ vector) int)
(nav-mesh-editable-method-15 (_type_ int) object)
(nav-mesh-editable-method-16 (_type_) object)
(nav-mesh-editable-method-17 (_type_) object)
(nav-mesh-editable-method-18 (_type_) none)
)
)
;; definition for method 3 of type nav-mesh-editable
(defmethod inspect ((this nav-mesh-editable))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'nav-mesh-editable)
(format #t "~1Tflags: ~D~%" (-> this flags))
(format #t "~1Tverts: ~A~%" (-> this verts))
(format #t "~1Ttris: ~A~%" (-> this tris))
(format #t "~1Tquads: ~A~%" (-> this quads))
(format #t "~1Tnavmesh-id: ~D~%" (-> this navmesh-id))
(format #t "~1Tidx: ~D~%" (-> this idx))
(format #t "~1Tlevel-name: ~A~%" (-> this level-name))
(format #t "~1Tlevel-id: ~D~%" (-> this level-id))
(format #t "~1Tpolys: ~A~%" (-> this polys))
(format #t "~1Tselected-poly: ~D~%" (-> this selected-poly))
(label cfg-4)
this
)
;; definition of type nav-mesh-editable-array
(deftype nav-mesh-editable-array (inline-array-class)
((data nav-mesh-editable :inline :dynamic)
)
)
;; definition for method 3 of type nav-mesh-editable-array
(defmethod inspect ((this nav-mesh-editable-array))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tlength: ~D~%" (-> this length))
(format #t "~1Tallocated-length: ~D~%" (-> this allocated-length))
(format #t "~1Tdata[0] @ #x~X~%" (-> this data))
(label cfg-4)
this
)
;; failed to figure out what this is:
(set! (-> nav-mesh-editable-array heap-base) (the-as uint 48))
;; definition for method 9 of type nav-mesh-editable
;; WARN: Return type mismatch int vs none.
(defmethod init-fields! ((this nav-mesh-editable))
(set! (-> this verts) (new 'debug 'vector-array 1024))
(set! (-> this verts length) 0)
(set! (-> this tris) (new 'debug 'nav-mesh-tri-quad-array 512))
(set! (-> this tris length) 0)
(set! (-> this quads) (new 'debug 'nav-mesh-tri-quad-array 512))
(set! (-> this quads length) 0)
(set! (-> this polys) (new 'debug 'nav-mesh-poly-array 92))
(dotimes (s5-0 (-> this polys length))
(init-fields! (-> this polys data s5-0))
(set! (-> this polys data s5-0 poly-id) (the-as uint s5-0))
)
(set! (-> this navmesh-id) (the-as uint 0))
(logior! (-> this flags) (nav-mesh-editable-flag nmef0))
0
(none)
)
;; definition for method 0 of type nav-mesh-editable
;; WARN: Return type mismatch object vs nav-mesh-editable.
(defmethod new nav-mesh-editable ((allocation symbol) (type-to-make type))
(let ((t9-0 (method-of-type structure new))
(v1-1 type-to-make)
)
(-> type-to-make size)
(let ((gp-0 (the-as object (t9-0 allocation v1-1))))
(when (zero? (the-as structure gp-0))
(set! gp-0 0)
(goto cfg-4)
)
((method-of-type nav-mesh-editable init-fields!) (the-as nav-mesh-editable gp-0))
(label cfg-4)
(the-as nav-mesh-editable gp-0)
)
)
)
;; definition of type nav-mesh-editor-undo
(deftype nav-mesh-editor-undo (structure)
((current-nav-mesh nav-mesh-editable)
(selected-poly uint32)
(index int16-array)
(insert-pos uint32)
(verts vector-array)
)
(:methods
(new (symbol type) _type_)
(init-fields! (_type_) none)
)
)
;; definition for method 3 of type nav-mesh-editor-undo
(defmethod inspect ((this nav-mesh-editor-undo))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'nav-mesh-editor-undo)
(format #t "~1Tcurrent-nav-mesh: #<nav-mesh-editable @ #x~X>~%" (-> this current-nav-mesh))
(format #t "~1Tselected-poly: ~D~%" (-> this selected-poly))
(format #t "~1Tindex: ~A~%" (-> this index))
(format #t "~1Tinsert-pos: ~D~%" (-> this insert-pos))
(format #t "~1Tverts: ~A~%" (-> this verts))
(label cfg-4)
this
)
;; definition of type nav-mesh-editor-undo-array
(deftype nav-mesh-editor-undo-array (inline-array-class)
((data nav-mesh-editor-undo :inline :dynamic)
)
)
;; definition for method 3 of type nav-mesh-editor-undo-array
(defmethod inspect ((this nav-mesh-editor-undo-array))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tlength: ~D~%" (-> this length))
(format #t "~1Tallocated-length: ~D~%" (-> this allocated-length))
(format #t "~1Tdata[0] @ #x~X~%" (-> this data))
(label cfg-4)
this
)
;; failed to figure out what this is:
(set! (-> nav-mesh-editor-undo-array heap-base) (the-as uint 32))
;; definition for method 9 of type nav-mesh-editor-undo
;; WARN: Return type mismatch int vs none.
(defmethod init-fields! ((this nav-mesh-editor-undo))
(set! (-> this index) (new 'debug 'int16-array 2048))
(set! (-> this verts) (new 'debug 'vector-array 1024))
0
(none)
)
;; definition for method 0 of type nav-mesh-editor-undo
;; WARN: Return type mismatch object vs nav-mesh-editor-undo.
(defmethod new nav-mesh-editor-undo ((allocation symbol) (type-to-make type))
(let ((t9-0 (method-of-type structure new))
(v1-1 type-to-make)
)
(-> type-to-make size)
(let ((gp-0 (the-as object (t9-0 allocation v1-1))))
(when (zero? (the-as structure gp-0))
(set! gp-0 0)
(goto cfg-4)
)
((method-of-type nav-mesh-editor-undo init-fields!) (the-as nav-mesh-editor-undo gp-0))
(label cfg-4)
(the-as nav-mesh-editor-undo gp-0)
)
)
)
;; definition of type nav-mesh-editor
(deftype nav-mesh-editor (process-drawable)
((close-menu-time time-frame)
(external-cam-mode symbol)
(mouse-pressed time-frame)
(mouse-screen-pos vector :inline)
(mouse-pos vector :inline)
(mouse-end vector :inline)
(mouse-hit vector :inline)
(mouse-hit-pick vector :inline)
(mouse-snap vector :inline)
(mouse-normal vector :inline)
(mouse-collide basic)
(mouse-tumble-dist float)
(mouse-tumble vector :inline)
(manipulator-pos vector :inline)
(manipulator-back-pos vector :inline)
(lock-action basic)
(mouse-action uint32)
(mouse-action-pos-ref vector :inline)
(nav-meshes nav-mesh-editable-array)
(current-nav-mesh nav-mesh-editable)
(manipulator manipulator :inline)
(level-name string)
(level-id uint32)
(undo-min uint32)
(undo-id uint32)
(undo-max uint32)
(undos nav-mesh-editor-undo-array)
(hide-unselected symbol)
(allow-snap symbol)
)
(:state-methods
idle
)
(:methods
(nav-mesh-editor-method-21 (_type_) none)
(nav-mesh-editor-method-22 (_type_) none)
(set-level-info! (_type_ symbol) none)
(select-nav-mesh-by-id (_type_ int) object)
(nav-mesh-editor-method-25 (_type_) none)
(nav-mesh-editor-method-26 (_type_) none)
(nav-mesh-editor-method-27 (_type_) object)
)
)
;; definition for method 3 of type nav-mesh-editor
(defmethod inspect ((this nav-mesh-editor))
(when (not this)
(set! this this)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 this)
)
(format #t "~2Tclose-menu-time: ~D~%" (-> this close-menu-time))
(format #t "~2Texternal-cam-mode: ~A~%" (-> this external-cam-mode))
(format #t "~2Tmouse-pressed: ~D~%" (-> this mouse-pressed))
(format #t "~2Tmouse-screen-pos: #<vector @ #x~X>~%" (-> this mouse-screen-pos))
(format #t "~2Tmouse-pos: #<vector @ #x~X>~%" (-> this mouse-pos))
(format #t "~2Tmouse-end: #<vector @ #x~X>~%" (-> this mouse-end))
(format #t "~2Tmouse-hit: #<vector @ #x~X>~%" (-> this mouse-hit))
(format #t "~2Tmouse-hit-pick: #<vector @ #x~X>~%" (-> this mouse-hit-pick))
(format #t "~2Tmouse-snap: #<vector @ #x~X>~%" (-> this mouse-snap))
(format #t "~2Tmouse-normal: #<vector @ #x~X>~%" (-> this mouse-normal))
(format #t "~2Tmouse-collide: ~A~%" (-> this mouse-collide))
(format #t "~2Tmouse-tumble-dist: ~f~%" (-> this mouse-tumble-dist))
(format #t "~2Tmouse-tumble: #<vector @ #x~X>~%" (-> this mouse-tumble))
(format #t "~2Tmanipulator-pos: #<vector @ #x~X>~%" (-> this manipulator-pos))
(format #t "~2Tmanipulator-back-pos: #<vector @ #x~X>~%" (-> this manipulator-back-pos))
(format #t "~2Tlock-action: ~A~%" (-> this lock-action))
(format #t "~2Tmouse-action: ~D~%" (-> this mouse-action))
(format #t "~2Tmouse-action-pos-ref: #<vector @ #x~X>~%" (-> this mouse-action-pos-ref))
(format #t "~2Tnav-meshes: ~A~%" (-> this nav-meshes))
(format #t "~2Tcurrent-nav-mesh: #<nav-mesh-editable @ #x~X>~%" (-> this current-nav-mesh))
(format #t "~2Tmanipulator: #<manipulator @ #x~X>~%" (-> this manipulator))
(format #t "~2Tlevel-name: ~A~%" (-> this level-name))
(format #t "~2Tlevel-id: ~D~%" (-> this level-id))
(format #t "~2Tundo-min: ~D~%" (-> this undo-min))
(format #t "~2Tundo-id: ~D~%" (-> this undo-id))
(format #t "~2Tundo-max: ~D~%" (-> this undo-max))
(format #t "~2Tundos: ~A~%" (-> this undos))
(format #t "~2Thide-unselected: ~A~%" (-> this hide-unselected))
(format #t "~2Tallow-snap: ~A~%" (-> this allow-snap))
(label cfg-4)
this
)
;; definition for symbol *nav-mesh-editor*, type (pointer nav-mesh-editor)
(define *nav-mesh-editor* (the-as (pointer nav-mesh-editor) #f))
;; failed to figure out what this is:
0
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+508
View File
@@ -0,0 +1,508 @@
;;-*-Lisp-*-
(in-package goal)
;; this file is debug only
(declare-file (debug))
;; definition of type visvol-edit-info
(deftype visvol-edit-info (structure)
((editing symbol)
(current-func visvol-edit-func)
(analog-func visvol-edit-func)
)
(:methods
(handle-pad-input (_type_) object)
(draw-menu (_type_ process-drawable) object)
(set-origin-joint-idx! (_type_ process-drawable) none)
)
)
;; definition for method 3 of type visvol-edit-info
(defmethod inspect ((this visvol-edit-info))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'visvol-edit-info)
(format #t "~1Tediting: ~A~%" (-> this editing))
(format #t "~1Tcurrent-func: ~D~%" (-> this current-func))
(format #t "~1Tanalog-func: ~D~%" (-> this analog-func))
(label cfg-4)
this
)
;; definition of type visvol-editor
(deftype visvol-editor (process)
((proc handle)
)
(:state-methods
idle
)
)
;; definition for method 3 of type visvol-editor
(defmethod inspect ((this visvol-editor))
(when (not this)
(set! this this)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process inspect)))
(t9-0 this)
)
(format #t "~2Tproc: ~D~%" (-> this proc))
(label cfg-4)
this
)
;; definition for method 9 of type visvol-edit-info
;; WARN: Return type mismatch int vs object.
(defmethod handle-pad-input ((this visvol-edit-info))
(if (cpad-pressed? 0 up)
(+! (-> this current-func) -1)
)
(if (cpad-pressed? 0 left)
(+! (-> this current-func) -4)
)
(if (cpad-pressed? 0 down)
(+! (-> this current-func) 1)
)
(if (cpad-pressed? 0 right)
(+! (-> this current-func) 4)
)
(cond
((< (the-as int (-> this current-func)) 0)
(let ((v0-0 2))
(set! (-> this current-func) (the-as visvol-edit-func v0-0))
v0-0
)
)
((>= (the-as int (-> this current-func)) 3)
(set! (-> this current-func) (visvol-edit-func visvol-positive))
0
)
)
)
;; definition for method 11 of type visvol-edit-info
;; WARN: Return type mismatch int vs none.
;; WARN: Function (method 11 visvol-edit-info) has a return type of none, but the expression builder found a return statement.
(defmethod set-origin-joint-idx! ((this visvol-edit-info) (arg0 process-drawable))
(if (or (not arg0) (!= (-> this analog-func) 2))
(return #f)
)
(let ((v0-1 (the-as int (-> arg0 draw origin-joint-index))))
(let ((v1-7 (+ (-> arg0 node-list length) -1)))
(when (cpad-pressed? 0 r1)
(set! v0-1 (the-as int (+ (the-as uint v0-1) 1)))
(if (cpad-hold? 0 l1)
(set! v0-1 (the-as int (+ (the-as uint v0-1) 4)))
)
(case v0-1
((1 2)
(set! v0-1 3)
)
)
)
(when (cpad-pressed? 0 l1)
(+! v0-1 -1)
(if (cpad-hold? 0 r1)
(+! v0-1 -4)
)
(case v0-1
((1 2)
(set! v0-1 0)
)
)
)
(if (< v0-1 0)
(set! v0-1 v1-7)
)
(if (< v1-7 v0-1)
(set! v0-1 0)
)
)
(set! (-> arg0 draw origin-joint-index) (the-as uint v0-1))
)
(none)
)
;; definition for method 10 of type visvol-edit-info
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs object.
(defmethod draw-menu ((this visvol-edit-info) (arg0 process-drawable))
(when (cpad-pressed? 0 l2)
(set! (-> this editing) (not (-> this editing)))
(cond
((-> this editing)
(set! *external-cam-mode* 'locked)
)
(*target*
(set! *external-cam-mode* #f)
)
(else
(set! *external-cam-mode* 'pad-0)
)
)
)
(cond
((or (not (-> this editing)) (cpad-hold? 0 r2))
(if (not (-> this editing))
(format *stdcon* "press l2 to edit visvol~%")
(format *stdcon* "release r2 to continue editing visvol~%")
)
(if (or (cpad-hold? 0 r2) (not *target*))
(set! *external-cam-mode* 'pad-0)
)
)
(else
(set! *external-cam-mode* 'locked)
(handle-pad-input this)
(set-origin-joint-idx! this arg0)
(let ((s3-0 ">")
(s4-0 " ")
)
(if (not (logtest? (-> *display* real-frame-clock integral-frame-counter) 8))
(set! s3-0 " ")
)
(format *stdcon* " r2/l2: move camera~%")
(format
*stdcon*
" r1/l1: select joint ~D ~S~%"
(if arg0
(the-as int (-> arg0 draw origin-joint-index))
-1
)
(if (and arg0 (-> arg0 node-list data (-> arg0 draw origin-joint-index) joint))
(-> arg0 node-list data (-> arg0 draw origin-joint-index) joint name)
"?"
)
)
(format *stdcon* " dpad: select function~%")
(format *stdcon* " x, tri: toggle/call~%")
(format *stdcon* "------------------------~%")
(let ((t9-9 format)
(a0-14 *stdcon*)
(a1-9 " ~S analog: ~S~%")
(a2-1 (if (= (-> this current-func) (visvol-edit-func visvol-positive))
s3-0
s4-0
)
)
(v1-45 (-> this analog-func))
)
(t9-9 a0-14 a1-9 a2-1 (cond
((= v1-45 (visvol-edit-func visvol-positive))
(set! *display-xyz-axes* #t)
"visvol positive"
)
((= v1-45 (visvol-edit-func visvol-negative))
(set! *display-xyz-axes* #t)
"visvol negative"
)
((= v1-45 (visvol-edit-func adjust-sphere))
(set! *display-xyz-axes* #f)
"adjust sphere"
)
((= v1-45 (visvol-edit-func adjust-vis-distance))
(set! *display-xyz-axes* #f)
"adjust vis distance"
)
(else
"???"
)
)
)
)
(format *stdcon* " ~S print to listener~%" (if (= (-> this current-func) (visvol-edit-func visvol-negative))
s3-0
s4-0
)
)
(format *stdcon* " ~S quit~%" (cond
((= (-> this current-func) (visvol-edit-func adjust-sphere))
(empty)
s3-0
)
(else
s4-0
)
)
)
)
(let ((v1-51 0))
(if (cpad-pressed? 0 x)
(+! v1-51 1)
)
(if (cpad-pressed? 0 triangle)
(+! v1-51 -1)
)
(when (nonzero? v1-51)
(case (-> this current-func)
(((visvol-edit-func visvol-positive))
(+! (-> this analog-func) v1-51)
)
(((visvol-edit-func visvol-negative))
(when arg0
(let ((s4-1 (entity-by-name (-> arg0 name))))
(when s4-1
(let ((f30-0 (res-lump-float s4-1 'vis-dist :default 200.0))
(s4-2 (res-lump-data s4-1 'visvol (pointer float)))
)
(when s4-2
(format #t "~%actor-vis ~S ~M " (-> arg0 name) f30-0)
(format #t "~M ~M ~M ~M ~M ~M~%~%" (-> s4-2 0) (-> s4-2 1) (-> s4-2 2) (-> s4-2 4) (-> s4-2 5) (-> s4-2 6))
)
)
)
)
(format
#t
"~%:bounds (static-spherem ~M ~M ~M ~M)~%"
(-> arg0 draw bounds x)
(-> arg0 draw bounds y)
(-> arg0 draw bounds z)
(-> arg0 draw bounds w)
)
(let ((v1-63 (-> arg0 draw origin-joint-index)))
(format
#t
":origin-joint ~s~%~%"
(if (and (>= v1-63 0) (< v1-63 (the-as uint (-> arg0 node-list length))) (-> arg0 node-list data v1-63 joint))
(-> arg0 node-list data v1-63 joint name)
"?"
)
)
)
)
)
(((visvol-edit-func adjust-sphere))
(kill-by-type visvol-editor *active-pool*)
)
(else
(format 0 "~%ERROR<GMJ>: bad visvol-edit-func~%")
)
)
)
)
(cond
((< (the-as int (-> this analog-func)) 0)
(set! (-> this analog-func) (visvol-edit-func adjust-vis-distance))
)
((>= (the-as int (-> this analog-func)) 4)
(set! (-> this analog-func) (visvol-edit-func visvol-positive))
0
)
)
(when arg0
(let ((f28-0 (analog-input (the-as int (-> *cpad-list* cpads 0 rightx)) 128.0 48.0 110.0 1.0))
(f30-1 (analog-input (the-as int (-> *cpad-list* cpads 0 righty)) 128.0 48.0 110.0 1.0))
(f26-0 (analog-input (the-as int (-> *cpad-list* cpads 0 lefty)) 128.0 48.0 110.0 1.0))
(f0-10 (analog-input (the-as int (-> *cpad-list* cpads 0 leftx)) 128.0 48.0 110.0 1.0))
)
(when (or (!= f28-0 0.0) (!= f30-1 0.0) (!= f26-0 0.0) (!= f0-10 0.0))
(case (-> this analog-func)
(((visvol-edit-func visvol-positive) (visvol-edit-func visvol-negative))
(set! f28-0 (* 1228.8 f28-0))
(set! f30-1 (* -1228.8 f30-1))
(set! f26-0 (* 1228.8 f26-0))
(let ((f0-11 (/ f0-10 -100)))
(set! f0-10 (+ 1.0 f0-11))
)
)
(((visvol-edit-func adjust-sphere))
(set! f28-0 (* -409.6 f28-0))
(set! f30-1 (* -409.6 f30-1))
(set! f26-0 (* -409.6 f26-0))
(let ((f0-12 (/ f0-10 100)))
(set! f0-10 (+ 1.0 f0-12))
)
)
(((visvol-edit-func adjust-vis-distance))
(let ((f1-15 (/ f28-0 100)))
(set! f28-0 (+ 1.0 f1-15))
)
(let ((f1-17 (/ f30-1 -100)))
(set! f30-1 (+ 1.0 f1-17))
)
(let ((f1-19 (/ f26-0 100)))
(set! f26-0 (+ 1.0 f1-19))
)
)
)
(case (-> this analog-func)
(((visvol-edit-func visvol-positive))
(let ((a0-57 (entity-by-name (-> arg0 name))))
(when a0-57
(let ((v1-110 (res-lump-data a0-57 'visvol (pointer float))))
(when v1-110
(let ((a2-23 (&-> v1-110 4))
(a0-58 (&-> v1-110 4))
(a1-29 (new 'stack-no-clear 'vector))
)
(set! (-> a1-29 x) f28-0)
(set! (-> a1-29 y) f30-1)
(set! (-> a1-29 z) f26-0)
(set! (-> a1-29 w) 1.0)
(vector+! (the-as vector a2-23) (the-as vector a0-58) a1-29)
)
(set! (-> v1-110 4) (fmax (-> v1-110 4) (+ 4096.0 (-> v1-110 0))))
(set! (-> v1-110 5) (fmax (-> v1-110 5) (+ 4096.0 (-> v1-110 1))))
(set! (-> v1-110 6) (fmax (-> v1-110 6) (+ 4096.0 (-> v1-110 2))))
)
)
)
)
)
(((visvol-edit-func visvol-negative))
(let ((a0-65 (entity-by-name (-> arg0 name))))
(when a0-65
(let ((v1-112 (res-lump-data a0-65 'visvol (pointer float))))
(when v1-112
(let ((a2-26 (&-> v1-112 0))
(a0-66 (&-> v1-112 0))
(a1-34 (new 'stack-no-clear 'vector))
)
(set! (-> a1-34 x) f28-0)
(set! (-> a1-34 y) f30-1)
(set! (-> a1-34 z) f26-0)
(set! (-> a1-34 w) 1.0)
(vector+! (the-as vector a2-26) (the-as vector a0-66) a1-34)
)
(set! (-> v1-112 0) (fmin (-> v1-112 0) (+ -4096.0 (-> v1-112 4))))
(set! (-> v1-112 1) (fmin (-> v1-112 1) (+ -4096.0 (-> v1-112 5))))
(set! (-> v1-112 2) (fmin (-> v1-112 2) (+ -4096.0 (-> v1-112 6))))
)
)
)
)
)
(((visvol-edit-func adjust-sphere))
(set! (-> arg0 draw bounds w) (* (-> arg0 draw bounds w) f0-10))
(let ((s4-3 (matrix-copy! (new 'stack-no-clear 'matrix) (matrix-local->world #f #f)))
(s2-0 (matrix-copy!
(new 'stack-no-clear 'matrix)
(-> arg0 node-list data (-> arg0 draw origin-joint-index) bone transform)
)
)
(s3-1 (new 'stack-no-clear 'vector))
)
(set! (-> s3-1 x) f28-0)
(set! (-> s3-1 y) f30-1)
(set! (-> s3-1 z) f26-0)
(set! (-> s3-1 w) 1.0)
(vector-reset! (-> s4-3 trans))
(vector-matrix*! s3-1 s3-1 s4-3)
(vector-reset! (-> s2-0 trans))
(matrix-transpose! s2-0 s2-0)
(vector-matrix*! s3-1 s3-1 s2-0)
(+! (-> arg0 draw bounds x) (-> s3-1 x))
(+! (-> arg0 draw bounds y) (-> s3-1 y))
(+! (-> arg0 draw bounds z) (-> s3-1 z))
)
)
(((visvol-edit-func adjust-vis-distance))
(let ((s4-4 (entity-by-name (-> arg0 name))))
(when s4-4
(let ((f0-36 (* (res-lump-float s4-4 'vis-dist :default 200.0) f30-1)))
(add-32bit-data!
s4-4
(new 'static 'res-tag :name 'vis-dist :key-frame -1000000000.0 :elt-count #x1 :elt-type float)
f0-36
)
)
)
)
)
)
)
)
(case (-> this analog-func)
(((visvol-edit-func adjust-vis-distance))
(let ((a0-93 (entity-by-name (-> arg0 name))))
(when a0-93
(let ((f0-37 (res-lump-float a0-93 'vis-dist :default 200.0)))
(format *stdcon* "~%vis distance: ~M" f0-37)
)
)
)
)
)
)
)
)
(case (-> this analog-func)
(((visvol-edit-func adjust-sphere))
(when arg0
(let ((a1-53 (-> arg0 draw origin-joint-index)))
(show-maya-skeleton arg0 (the-as int a1-53) #x46400000)
)
)
)
)
0
)
;; definition for symbol *visvol-edit-info*, type visvol-edit-info
(define *visvol-edit-info* (the-as visvol-edit-info 0))
;; definition for symbol *visvol-edit-info*, type visvol-edit-info
(define *visvol-edit-info* (new 'static 'visvol-edit-info :editing #t))
;; failed to figure out what this is:
(defstate idle (visvol-editor)
:virtual #t
:enter (behavior ()
(set! *display-actor-vis* #t)
)
:exit (behavior ()
(set! *display-xyz-axes* #f)
(set! *display-actor-vis* #f)
(set! *external-cam-mode* #f)
)
:trans (behavior ()
(draw-menu
*visvol-edit-info*
(the-as process-drawable (as-type (handle->process (-> self proc)) process-drawable))
)
)
:code sleep-code
)
;; definition for function visvol-editor-init-by-other
(defbehavior visvol-editor-init-by-other visvol-editor ((arg0 handle))
(set! (-> self proc) arg0)
(go-virtual idle)
)
;; definition for function stop-visvol-edit
;; WARN: Return type mismatch int vs object.
(defun stop-visvol-edit ()
(kill-by-type visvol-editor *active-pool*)
0
)
;; definition for function visvol-edit
;; WARN: Return type mismatch int vs object.
(defun visvol-edit ((arg0 string))
(stop-visvol-edit)
(let* ((v1-0 (process->ppointer (process-by-name arg0 *active-pool*)))
(gp-0 (logior (if v1-0
(new 'static 'handle :pid (-> v1-0 0 pid))
(new 'static 'handle)
)
(new 'static 'handle :process v1-0)
)
)
)
(if (not (handle->process gp-0))
(set! gp-0 (process->handle *debug-actor*))
(debug-actor arg0)
)
(process-spawn visvol-editor gp-0 :name "visvol-editor")
)
0
)
+1 -1
View File
@@ -109,7 +109,7 @@
;; definition (debug) for function reset-light-hash
;; WARN: Return type mismatch int vs none.
(defun-debug reset-light-hash ()
(defun-debug reset-light-hash ((arg0 light-hash))
"Resets the global [[*light-hash*]] back to having `0` lights, indicies, and buckets.
@returns [[none]]"
(set! (-> *light-hash* num-lights) (the-as uint 0))
+1 -1
View File
@@ -1213,7 +1213,7 @@
(set! (-> arg0 node-array length) 0)
(set! (-> arg0 edge-array length) 0)
(set! (-> arg0 visnode-array length) 0)
(set! (-> arg0 graph-type) (the-as basic (mysql-nav-graph-method-21 arg0)))
(set! (-> arg0 graph-type) (get-graph-type arg0 (the-as symbol arg1)))
(let ((s3-0 (clear *temp-string*)))
(format s3-0 "select nav_graph_id from nav_graph where name='~S'" arg1)
(let ((a2-2 (sql-query s3-0)))
+4 -2
View File
@@ -390,7 +390,8 @@
"(method 37 cloth-system)",
"(method 19 rope-prim-system)",
// funny casts with matrix.
"sprite-add-matrix-data"
"sprite-add-matrix-data",
"(method 17 nav-mesh-editable)" // weird delay branch that tries to set a variable that doesn't exist
],
"skip_compile_states": {
@@ -403,6 +404,7 @@
"(hostile spydroid)": ["trans"], // reassigning process to a conditional
"(explode krimson-wall-break)": ["code"], // art-joint-anim cast
"(active desert-chase-ambush-manager)": ["code"],
"(riding-idle-ship bt-grunt)": ["code"] // int->float attempted on a function
"(riding-idle-ship bt-grunt)": ["code"], // int->float attempted on a function
"(idle editable-player)": ["trans"] // fails to use subdivide-setting enum in places where it's set with r0
}
}