d/jak2: get script decompiling, no ref tests yet (#1877)

Has boxed array accessing that prevents me from adding anything to ref
tests (the entire file is lambdas so the access pattern that i would
like to ignore happens at the top-level, can't ignore it.

This code actually already has quite a bit of original docstrings so
it's not too bad in that regard considering a `script-context` can have
16 arbitrary objects. It seems they rarely put more than a single object
in the context and the types are usually obvious / are actually type
checked!
This commit is contained in:
Tyler Wilding 2022-09-14 19:37:12 -04:00 committed by GitHub
parent 8117ed3bc7
commit 82e0517275
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
34 changed files with 635 additions and 2973 deletions

View File

@ -7421,8 +7421,8 @@
:flag-assert #x1300000fb0 :flag-assert #x1300000fb0
(:methods (:methods
(new (symbol type int) _type_ 0) (new (symbol type int) _type_ 0)
(add-setting (_type_ process symbol object object object) none 9) (add-setting "Originally called `setting-set` see (anon-function 48 script)" (_type_ process symbol object object object) none 9)
(persist-with-delay (_type_ process time-frame object object float object) none 10) (persist-with-delay "Originally called `setting-pers` see (anon-function 46 script)" (_type_ symbol time-frame symbol symbol float int) none 10)
(set-setting (_type_ process symbol object object object) none 11) (set-setting (_type_ process symbol object object object) none 11)
(remove-setting (_type_ process symbol) none 12) (remove-setting (_type_ process symbol) none 12)
(kill-persister "Calls [[engine-pers::kill-matching]]" (_type_ engine-pers object) none 13) (kill-persister "Calls [[engine-pers::kill-matching]]" (_type_ engine-pers object) none 13)
@ -8315,6 +8315,7 @@
(defenum game-task (defenum game-task
:type uint8 :type uint8
:bitfield #f :bitfield #f
(unknown -1)
(none 0) (none 0)
(complete 1) (complete 1)
(dummy0 2) (dummy0 2)
@ -11607,7 +11608,7 @@
(vis-nick symbol :offset-assert 112) (vis-nick symbol :offset-assert 112)
(command-list pair) (command-list pair)
(object-name string 256) (object-name string 256)
(object-status basic 256) (object-status basic 256) ;; see (anon-function 25 script), should be an `entity-perm-status` but that's too small!
) )
:method-count-assert 22 :method-count-assert 22
:size-assert #x878 :size-assert #x878
@ -11622,7 +11623,7 @@
(want-display-level (_type_ symbol symbol) int 13) (want-display-level (_type_ symbol symbol) int 13)
(want-vis-level (_type_ symbol) none 14) (want-vis-level (_type_ symbol) none 14)
(want-force-vis (_type_ symbol symbol) int 15) (want-force-vis (_type_ symbol symbol) int 15)
(execute-command (_type_ pair) none 16) (execute-command (_type_ pair object) none 16)
(execute-commands-up-to (_type_ float) none 17) (execute-commands-up-to (_type_ float) none 17)
(backup-load-state-and-set-cmds (_type_ pair) int 18) (backup-load-state-and-set-cmds (_type_ pair) int 18)
(restore-load-state-and-cleanup (_type_) int 19) (restore-load-state-and-cleanup (_type_) int 19)
@ -11884,7 +11885,7 @@
(game-info-method-18 () none 18) (game-info-method-18 () none 18)
(get-current-continue-point (_type_) continue-point 19) (get-current-continue-point (_type_) continue-point 19)
(get-continue-by-name (_type_ string) continue-point 20) (get-continue-by-name (_type_ string) continue-point 20)
(set-continue! (_type_ basic) continue-point 21) (set-continue! (_type_ basic symbol) continue-point 21)
(game-info-method-22 () none 22) (game-info-method-22 () none 22)
(game-info-method-23 () none 23) (game-info-method-23 () none 23)
(game-info-method-24 () none 24) (game-info-method-24 () none 24)
@ -12055,10 +12056,10 @@
;; field on-close uses ~A with a signed load ;; field on-close uses ~A with a signed load
(:methods (:methods
(talker-speech-class-method-9 () none 9) (talker-speech-class-method-9 () none 9)
(talker-speech-class-method-10 () none 10) (talker-speech-class-method-10 (_type_) none 10)
(talker-speech-class-method-11 () none 11) (talker-speech-class-method-11 () none 11)
(talker-speech-class-method-12 () none 12) (talker-speech-class-method-12 (_type_ int) none 12)
(talker-speech-class-method-13 () none 13) (talker-speech-class-method-13 (_type_ int) none 13)
) )
) )
@ -14034,11 +14035,13 @@
;; script-h ;; ;; script-h ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(declare-type script-context structure)
(deftype script-form (structure) (deftype script-form (structure)
((name string :offset-assert 0) ((name symbol :offset-assert 0)
(spec basic :offset-assert 4) (spec pair :offset-assert 4) ;; a pair of forms/symbols ie. (return macro)
(func basic :offset-assert 8) (func (function script-context object) :offset-assert 8) ;; takes atleast 1 arg, probably the script-context WHICH IS ALL ARBITRARY DATA
) )
:pack-me
:method-count-assert 10 :method-count-assert 10
:size-assert #xc :size-assert #xc
:flag-assert #xa0000000c :flag-assert #xa0000000c
@ -14048,26 +14051,25 @@
) )
(deftype script-context (structure) (deftype script-context (structure)
((load-state load-state) ((load-state load-state :offset-assert 0)
(key basic) (key basic :offset-assert 4)
(process process) (process process :offset-assert 8)
(trans vector) (trans vector :offset-assert 12)
(side-effect? symbol) (side-effect? symbol :offset-assert 16)
(got-error? symbol) (got-error? symbol :offset-assert 20)
(expr basic) (expr pair :offset-assert 24)
(param-count int32) (param-count int32 :offset-assert 28)
(param object 16) (param object 16 :offset-assert 32)
(param-type object 16) (param-type object 16 :offset-assert 96)
) )
:method-count-assert 12 :method-count-assert 12
:size-assert #xa0 :size-assert #xa0
:flag-assert #xc000000a0 :flag-assert #xc000000a0
;; Failed to read fields.
(:methods (:methods
(new (symbol type basic process vector) _type_ 0) (new (symbol type basic process vector) _type_ 0)
(eval! (_type_ structure) pair 9) (eval! "TODO - Argument can be a [[symbol]] or a [[pair]]" (_type_ object) object 9)
(script-context-method-10 () none 10) (script-context-method-10 (_type_ object pair) object 10)
(script-context-method-11 () none 11) (script-context-method-11 (_type_ pair pair symbol) symbol 11)
) )
) )
@ -18178,6 +18180,7 @@
(complete 8) (complete 8)
(bit-9 9) (bit-9 9)
(bit-10 10) (bit-10 10)
(entity-perm-status-12 12)
) )
(deftype entity-perm (structure) (deftype entity-perm (structure)
@ -18256,7 +18259,7 @@
;; Failed to read fields. ;; Failed to read fields.
(:methods (:methods
(entity-method-22 (_type_) _type_ 22) ;; (birth! (_type_) _type_ 22) (entity-method-22 (_type_) _type_ 22) ;; (birth! (_type_) _type_ 22)
(entity-method-23 (_type_) _type_ 23) ;; (kill! (_type_) _type_ 23) (kill! (_type_ ) _type_ 23) ;; (kill! (_type_) _type_ 23)
(entity-method-24 () none 24) ;; (add-to-level! (_type_ level-group level actor-id) none 24) (entity-method-24 () none 24) ;; (add-to-level! (_type_ level-group level actor-id) none 24)
(entity-method-25 () none 25) ;; (remove-from-level! (_type_ level-group) _type_ 25) (entity-method-25 () none 25) ;; (remove-from-level! (_type_ level-group) _type_ 25)
(entity-method-26 () none 26) ;; (get-level (_type_) level 26) (entity-method-26 () none 26) ;; (get-level (_type_) level 26)
@ -18308,7 +18311,7 @@
(next-actor (_type_) entity-actor 27) (next-actor (_type_) entity-actor 27)
(prev-actor (_type_) entity-actor 28) (prev-actor (_type_) entity-actor 28)
(entity-actor-method-29 () none 29) ;; (debug-print (_type_ symbol type) none 29) (entity-actor-method-29 () none 29) ;; (debug-print (_type_ symbol type) none 29)
(entity-actor-method-30 () none 30) ;; (dummy-30 (_type_ entity-perm-status symbol) none 30) (entity-actor-method-30 (_type_ entity-perm-status symbol) none 30) ;; (dummy-30 (_type_ entity-perm-status symbol) none 30)
(entity-actor-method-31 (_type_ vector vector vector object float) nav-mesh 31) (entity-actor-method-31 (_type_ vector vector vector object float) nav-mesh 31)
(entity-actor-method-32 (_type_ vector vector nav-poly float) nav-poly 32) (entity-actor-method-32 (_type_ vector vector nav-poly float) nav-poly 32)
) )
@ -21469,8 +21472,11 @@
(define-extern sound-set-volume (function sound-group float int)) (define-extern sound-set-volume (function sound-group float int))
(define-extern sound-set-reverb (function int float float uint int)) (define-extern sound-set-reverb (function int float float uint int))
(define-extern sound-set-ear-trans (function vector vector vector float int)) (define-extern sound-set-ear-trans (function vector vector vector float int))
(define-extern sound-play-by-name (function sound-name sound-id int int int sound-group symbol sound-id)) (define-extern sound-play-by-name
(define-extern sound-play-by-spec (function sound-spec sound-id vector sound-id)) ;; NOTE - the `vector` can also be #t "Last arg can by a symbol with value [[#t]], in which case it will pull `trans` [[vector]] off the current [[process-drawable]]
otherwise, an explicit [[vector]] can be provided"
(function sound-name sound-id int int int sound-group object sound-id :behavior process-drawable))
(define-extern sound-play-by-spec (function sound-spec sound-id vector sound-id :behavior process-drawable))
(define-extern sound-pause (function sound-id int)) (define-extern sound-pause (function sound-id int))
(define-extern sound-stop (function sound-id int)) (define-extern sound-stop (function sound-id int))
(define-extern sound-continue (function sound-id int)) (define-extern sound-continue (function sound-id int))
@ -24625,7 +24631,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; (define-extern *display-load-commands* object) ;; symbol ;; (define-extern *display-load-commands* object) ;; symbol
;; (define-extern *backup-load-state* object) ;; load-state (define-extern *backup-load-state* load-state) ;;
(define-extern *load-state* load-state) (define-extern *load-state* load-state)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -26042,8 +26048,8 @@
(define-extern talker-surpress! (function none)) (define-extern talker-surpress! (function none))
;; (define-extern talker-displayed? function) ;; (define-extern talker-displayed? function)
;; (define-extern kill-current-talker function) ;; (define-extern kill-current-talker function)
;; (define-extern string->talker-speech function) (define-extern string->talker-speech (function string talker-speech-class))
;; (define-extern talker-spawn-func function) (define-extern talker-spawn-func (function talker-speech-class process-tree vector basic int))
;; (define-extern talker-init function) ;; (define-extern talker-init function)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -26058,23 +26064,30 @@
;; (define-extern region-tree-execute function) ;; (define-extern region-tree-execute function)
(define-extern region-execute (function none)) (define-extern region-execute (function none))
;; (define-extern region-prim-lookup-by-id function) (define-extern region-prim-lookup-by-id (function int drawable-region-prim))
;; (define-extern region-lookup-by-id function) (define-extern region-lookup-by-id (function int region))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; fma-sphere ;; ;; fma-sphere ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#| (defenum fma-sphere-mode
:type uint32
:bitfield #t
(nav 0)
(kill-once 1)
(danger 2)
(deadly-overlap 3))
(deftype fma-sphere (process-drawable) (deftype fma-sphere (process-drawable)
((first-time? basic :offset-assert 196) ((first-time? symbol :offset-assert 200)
(mode uint32 :offset-assert 200) (mode fma-sphere-mode :offset-assert 204)
(track-handle uint64 :offset-assert 204) (track-handle handle :offset-assert 208)
(track-joint int32 :offset-assert 212) (track-joint int32 :offset-assert 216)
(attack-id uint32 :offset-assert 216) (attack-id uint32 :offset-assert 220)
(duration uint64 :offset-assert 220) (duration time-frame :offset-assert 224)
(sphere sphere :inline :offset-assert 236) (sphere sphere :inline :offset-assert 240)
(danger traffic-danger-info :inline :offset-assert 252) (danger traffic-danger-info :inline :offset-assert 256)
) )
:method-count-assert 21 :method-count-assert 21
:size-assert #x136 :size-assert #x136
@ -26083,9 +26096,8 @@
(idle () _type_ :state 20) (idle () _type_ :state 20)
) )
) )
|#
;; (define-extern fma-sphere-init-by-other function) (define-extern fma-sphere-init-by-other (function fma-sphere-mode process-drawable int time-frame object object fma-sphere))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; script ;; ;; script ;;
@ -26093,10 +26105,10 @@
(define-extern command-get-int (function object int int)) (define-extern command-get-int (function object int int))
(define-extern command-get-float (function object float float)) (define-extern command-get-float (function object float float))
(define-extern command-get-time (function object int int)) (define-extern command-get-time (function object int time-frame))
(define-extern command-get-param (function object object object)) (define-extern command-get-param (function object object object))
(define-extern command-get-quoted-param (function object object object)) (define-extern command-get-quoted-param (function object object object))
;; (define-extern command-get-process (function object process process :behavior camera-tracker)) (define-extern command-get-process (function object symbol process))
(define-extern command-get-entity (define-extern command-get-entity
"- If `search` is a [[process]] - return it's `entity` "- If `search` is a [[process]] - return it's `entity`
- If `search` is an [[entity]] - return it - If `search` is an [[entity]] - return it
@ -26104,9 +26116,9 @@
- If `search` is [[null?]] or [[empty]] or if no other condition passes, return `fallback`" - If `search` is [[null?]] or [[empty]] or if no other condition passes, return `fallback`"
(function object entity entity)) (function object entity entity))
(define-extern command-get-trans (function object vector vector)) (define-extern command-get-trans (function object vector vector))
(define-extern key-assoc (function none)) (define-extern key-assoc "TODO [[vector4w]] is probably wrong!" (function object pair vector4w pair))
(define-extern *script-form* int) (define-extern *script-form* (inline-array script-form))
;; (define-extern level-from-heap function) (define-extern level-from-heap (function int level))
(define-extern *syntax-context* script-context) (define-extern *syntax-context* script-context)
(define-extern *script-context* script-context) (define-extern *script-context* script-context)
@ -26181,11 +26193,11 @@
;; (define-extern swingpole-init function) ;; (define-extern swingpole-init function)
;; (define-extern manipy-post function) ;; (define-extern manipy-post function)
(define-extern manipy-init (function vector entity-actor skeleton-group vector none :behavior manipy)) ;; (function vector entity-actor skeleton-group vector none :behavior manipy) (define-extern manipy-init (function vector entity-actor skeleton-group vector none :behavior manipy)) ;; (function vector entity-actor skeleton-group vector none :behavior manipy)
;; (define-extern part-tracker-init function) ;; (function sparticle-launch-group time-frame (function part-tracker none) (pointer process-drawable) process collide-prim-core none :behavior part-tracker) (define-extern part-tracker-init (function sparticle-launch-group time-frame (function part-tracker none) (pointer process-drawable) process collide-prim-core none :behavior part-tracker)) ;;
;; (define-extern part-tracker-track-root function) ;; (function sparticle-system sparticle-cpuinfo vector none) ;; (define-extern part-tracker-track-root function) ;; (function sparticle-system sparticle-cpuinfo vector none)
;; (define-extern part-tracker-move-to-target function) ;; (function part-tracker vector) ;; (define-extern part-tracker-move-to-target function) ;; (function part-tracker vector)
;; (define-extern part-tracker-track-target function) ;; (function part-tracker vector) ;; (define-extern part-tracker-track-target function) ;; (function part-tracker vector)
;; (define-extern lightning-tracker-init function) (define-extern lightning-tracker-init (function lightning-spec time-frame symbol process-drawable vector vector none))
;; (define-extern process-grab? function) ;; (function process symbol :behavior camera-tracker) ;; (define-extern process-grab? function) ;; (function process symbol :behavior camera-tracker)
;; (define-extern process-release? function) ;; (function process symbol :behavior process) ;; (define-extern process-release? function) ;; (function process symbol :behavior process)
;; (define-extern camera-look-at function) ;; (function pair uint process :behavior camera-tracker) ;; (define-extern camera-look-at function) ;; (function pair uint process :behavior camera-tracker)
@ -28105,7 +28117,7 @@
(define-extern process-drawable-from-entity! (function process-drawable entity-actor none)) ;; (define-extern process-drawable-from-entity! (function process-drawable entity-actor none)) ;;
(define-extern reset-actors (function symbol none)) (define-extern reset-actors (function symbol none))
(define-extern reset-cameras (function none)) (define-extern reset-cameras (function none))
;; (define-extern entity-birth-no-kill function) ;; (function entity none) (define-extern entity-birth-no-kill (function entity none)) ;;
;; (define-extern entity-task-complete-on function) ;; (function entity none) ;; (define-extern entity-task-complete-on function) ;; (function entity none)
;; (define-extern entity-task-complete-off function) ;; (function entity none) ;; (define-extern entity-task-complete-off function) ;; (function entity none)
(define-extern process-entity-status! (function process entity-perm-status symbol int)) ;; (define-extern process-entity-status! (function process entity-perm-status symbol int)) ;;
@ -28499,7 +28511,7 @@
;; (define-extern *collectable-dummy-shadow-control* shadow-control) ;; (define-extern *collectable-dummy-shadow-control* shadow-control)
;; (define-extern initialize-ammo-by-other function) ;; (define-extern initialize-ammo-by-other function)
;; (define-extern initialize-upgrade-by-other function) ;; (define-extern initialize-upgrade-by-other function)
;; (define-extern birth-pickup-at-point function) ;; (function vector pickup-type float symbol process-tree fact-info (pointer process) :behavior process) (define-extern birth-pickup-at-point (function vector pickup-type float symbol process-tree fact-info (pointer process) :behavior process)) ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; task-control ;; ;; task-control ;;
@ -28586,7 +28598,7 @@
;; (define-extern task-node-reset function) ;; (define-extern task-node-reset function)
;; (define-extern task-node-dump function) ;; (define-extern task-node-dump function)
;; (define-extern fail-mission-init-by-other function) ;; (define-extern fail-mission-init-by-other function)
;; (define-extern task-manager-init-by-other function) (define-extern task-manager-init-by-other (function game-task-node-info object none))
;; (define-extern task-manager-event-handler function) ;; (define-extern task-manager-event-handler function)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -28746,7 +28758,7 @@
;; (define-extern hide-hud function) ;; (function none) ;; (define-extern hide-hud function) ;; (function none)
;; (define-extern enable-hud function) ;; (function none) ;; (define-extern enable-hud function) ;; (function none)
;; (define-extern hide-hud-quick function) ;; (function none) ;; (define-extern hide-hud-quick function) ;; (function none)
;; (define-extern show-hud function) ;; (function none) (define-extern show-hud (function object none)) ;;
;; (define-extern hud-hidden? function) ;; (function symbol) ;; (define-extern hud-hidden? function) ;; (function symbol)
;; (define-extern set-hud-piece-position! function) ;; (define-extern set-hud-piece-position! function)
;; (define-extern set-as-offset-from! function) ;; (define-extern set-as-offset-from! function)

View File

@ -236,5 +236,94 @@
[24, "(function editable symbol symbol)"], [24, "(function editable symbol symbol)"],
[25, "(function editable symbol symbol)"], [25, "(function editable symbol symbol)"],
[28, "(function editable symbol)"] [28, "(function editable symbol)"]
],
"script": [
[0, "(function script-context none)"],
[1, "(function script-context int)"],
[2, "(function script-context int)"],
[3, "(function script-context int)"],
[4, "(function script-context int :behavior process)"],
[5, "(function script-context int)"],
[6, "(function script-context object)"],
[7, "(function script-context object :behavior process)"],
[8, "(function script-context none :behavior process)"],
[9, "(function script-context none :behavior process)"],
[10, "(function script-context none :behavior process)"],
[11, "(function script-context none :behavior process)"],
[12, "(function script-context symbol)"],
[13, "(function script-context symbol)"],
[14, "(function script-context symbol)"],
[16, "(function script-context object)"],
[17, "(function script-context string)"],
[18, "(function script-context symbol)"],
[19, "(function script-context symbol)"],
[20, "(function script-context symbol)"],
[21, "(function script-context none)"],
[22, "(function script-context none)"],
[23, "(function script-context symbol)"],
[24, "(function script-context none)"],
[25, "(function script-context symbol)"],
[26, "(function script-context none)"],
[27, "(function script-context entity-perm-status)"],
[28, "(function script-context (pointer process))"],
[29, "(function script-context symbol)"],
[30, "(function script-context none)"],
[31, "(function script-context none)"],
[32, "(function script-context none)"],
[33, "(function script-context object)"],
[34, "(function script-context region)"],
[35, "(function script-context drawable-region-prim)"],
[36, "(function script-context symbol :behavior time-of-day-proc)"],
[37, "(function script-context object :behavior time-of-day-proc)"],
[38, "(function script-context none)"],
// TODO - ugly time-frame casts
[39, "(function script-context none)"],
// TODO - ugly time-frame casts
[40, "(function script-context none)"],
[41, "(function script-context sound-id)"],
[42, "(function script-context sound-id)"],
[43, "(function script-context none)"],
[44, "(function script-context object)"],
[45, "(function script-context none)"],
[46, "(function script-context none)"],
[47, "(function script-context none)"],
[48, "(function script-context none)"],
[49, "(function script-context symbol)"],
[50, "(function script-context symbol)"],
[51, "(function script-context none)"],
[52, "(function script-context symbol)"],
[53, "(function script-context symbol)"],
[54, "(function script-context symbol)"],
[55, "(function script-context none)"],
[56, "(function script-context none)"],
[57, "(function script-context none)"],
[58, "(function script-context none)"],
[59, "(function script-context none)"],
[60, "(function script-context none)"],
[61, "(function script-context none)"],
[62, "(function script-context none)"],
[64, "(function script-context object)"],
[65, "(function script-context symbol)"],
[66, "(function script-context symbol)"],
[67, "(function script-context symbol)"],
[68, "(function script-context symbol)"],
[69, "(function script-context symbol)"],
[70, "(function script-context pair)"],
[71, "(function script-context object)"],
[72, "(function script-context pair)"],
[73, "(function script-context pair)"],
[74, "(function script-context pair)"],
[75, "(function script-context pair)"],
[76, "(function script-context pair)"],
[77, "(function script-context symbol)"],
[78, "(function script-context pair)"],
[79, "(function script-context object)"],
[80, "(function script-context pair)"],
[81, "(function script-context int)"],
[82, "(function script-context float)"],
[83, "(function script-context time-frame)"],
[84, "(function script-context meters)"],
[85, "(function script-context object)"],
[15, "(function script-context pair :behavior process)"] // NOTE - an interesting one
] ]
} }

View File

@ -38,19 +38,6 @@
"name=", "name=",
"(method 21 game-info)", "(method 21 game-info)",
"cspace-inspect-tree", "cspace-inspect-tree",
"command-get-process",
"command-get-trans",
"(method 10 script-context)",
"(method 11 script-context)",
"(method 9 script-context)",
"(anon-function 64 script)",
"(anon-function 61 script)",
"(anon-function 60 script)",
"(anon-function 54 script)",
"(anon-function 52 script)",
"(anon-function 49 script)",
"(anon-function 33 script)",
"debug-menu-func-decode",
"scene-player-init", "scene-player-init",
"(method 77 spyder)", "(method 77 spyder)",
"(method 77 flamer)", "(method 77 flamer)",
@ -190,6 +177,21 @@
"command-get-param", "command-get-param",
"command-get-quoted-param", "command-get-quoted-param",
"command-get-entity", "command-get-entity",
"(method 9 script-context)",
"(anon-function 6 script)",
"(anon-function 49 script)",
"(anon-function 52 script)",
"(anon-function 72 script)",
"(anon-function 73 script)",
"(anon-function 74 script)",
"(anon-function 75 script)",
"(anon-function 76 script)",
"(anon-function 80 script)",
"(method 11 script-context)",
"(method 10 script-context)",
"command-get-trans",
"key-assoc",
"(anon-function 0 script)",
// default-menu // default-menu
"dm-scene-load-pick-func", "dm-scene-load-pick-func",
"debug-menu-make-continue-sub-menu", "debug-menu-make-continue-sub-menu",

View File

@ -93,7 +93,12 @@
["L1", "(inline-array vector)", 250], ["L1", "(inline-array vector)", 250],
["L2", "(inline-array vector)", 250] ["L2", "(inline-array vector)", 250]
], ],
"script": [["L2358", "vector4"]], "script": [
["L2358", "vector4"],
["L787", "attack-info"],
["L1777", "attack-info"],
["L1776", "attack-info"]
],
"text": [ "text": [
["L96", "vector4"], ["L96", "vector4"],
["L95", "matrix"], ["L95", "matrix"],

View File

@ -771,6 +771,11 @@
"(method 10 editable-face)": [[16, ["inline-array", "vector", 6]]], "(method 10 editable-face)": [[16, ["inline-array", "vector", 6]]],
"(method 11 editable)": [[16, "collide-query"]], "(method 11 editable)": [[16, "collide-query"]],
"(method 10 editable-plane)": [[16, "matrix"]], "(method 10 editable-plane)": [[16, "matrix"]],
"(method 9 script-context)": [[16, "script-context"]],
"(anon-function 32 script)": [
[16, "vector"],
[32, "vector"]
],
// placeholder // placeholder
"placeholder-do-not-add-below": [] "placeholder-do-not-add-below": []
} }

View File

@ -1944,7 +1944,6 @@
[582, "a0", "editable"], [582, "a0", "editable"],
[611, "a0", "editable"] [611, "a0", "editable"]
], ],
"(event idle editable-player)": [ "(event idle editable-player)": [
[351, "s4", "editable-light"], [351, "s4", "editable-light"],
[409, "s4", "editable-light"], [409, "s4", "editable-light"],
@ -2028,9 +2027,7 @@
[156, "a0", "(pointer gs-reg64)"], [156, "a0", "(pointer gs-reg64)"],
[[160, 166], "v1", "dma-packet"] [[160, 166], "v1", "dma-packet"]
], ],
"(method 14 texture-pool)": [ "(method 14 texture-pool)": [[22, "a3", "(pointer int32)"]],
[22, "a3", "(pointer int32)"]
],
"(method 13 texture-page)": [ "(method 13 texture-page)": [
[[16, 23], "a0", "dma-packet"], [[16, 23], "a0", "dma-packet"],
[[25, 32], "a0", "gs-gif-tag"], [[25, 32], "a0", "gs-gif-tag"],
@ -2079,11 +2076,11 @@
[209, "a0", "(pointer int64)"], [209, "a0", "(pointer int64)"],
[[198, 205], "a0", "gs-gif-tag"] [[198, 205], "a0", "gs-gif-tag"]
], ],
"texture-page-login": [ "texture-page-login": [[[34, 45], "s2", "texture-page"]],
[[34, 45], "s2", "texture-page"] "(method 9 texture-page-dir)": [
[[27, 32], "t3", "adgif-shader"],
[[20, 30], "t2", "(pointer shader-ptr)"]
], ],
"(method 9 texture-page-dir)": [[[27, 32], "t3", "adgif-shader"],
[[20, 30], "t2", "(pointer shader-ptr)"]],
"texture-page-dir-inspect": [[[137, 138], "v1", "adgif-shader"]], "texture-page-dir-inspect": [[[137, 138], "v1", "adgif-shader"]],
"level-remap-texture": [ "level-remap-texture": [
[15, "t0", "(pointer uint32)"], [15, "t0", "(pointer uint32)"],
@ -2092,8 +2089,11 @@
[12, "v1", "int"], [12, "v1", "int"],
[12, "a3", "int"] [12, "a3", "int"]
], ],
"debug-menu-func-decode": [ "debug-menu-func-decode": [[18, "a0", "symbol"]],
[18, "a0", "symbol"] "(anon-function 6 script)": [[17, "v1", "pair"]],
"(anon-function 16 script)": [
[10, "s4", "game-task-node-info"],
[12, "v1", "symbol"]
], ],
"(method 13 mysql-nav-graph)": [[[15, 37], "gp", "mysql-nav-node"]], "(method 13 mysql-nav-graph)": [[[15, 37], "gp", "mysql-nav-node"]],
"(method 14 mysql-nav-graph)": [[[16, 31], "v1", "mysql-nav-edge"]], "(method 14 mysql-nav-graph)": [[[16, 31], "v1", "mysql-nav-edge"]],
@ -2126,6 +2126,59 @@
[[39, 59], "a1", "mysql-nav-edge"], [[39, 59], "a1", "mysql-nav-edge"],
[[48, 58], "a2", "mysql-nav-node"] [[48, 58], "a2", "mysql-nav-node"]
], ],
"(anon-function 24 script)": [[14, "s5", "entity-actor"]],
"(anon-function 31 script)": [
[25, "s3", "process-drawable"],
[59, "v0", "joint"],
[14, "s5", "(function process vector cspace)"]
],
"(method 9 script-context)": [[81, "s5", "symbol"]],
"(anon-function 33 script)": [
// TODO - cast had to be added even though `object` is in type_utils.cpp
[14, "a0", "symbol"],
[34, "gp", "process-drawable"],
[95, "s3", "drawable-region-prim"],
[150, "v0", "joint"]
],
"(anon-function 36 script)": [[15, "v0", "int"]],
"(anon-function 49 script)": [[10, "gp", "pair"]],
"(anon-function 52 script)": [
[14, "s5", "pair"],
[11, "s4", "process-focusable"]
],
"(anon-function 64 script)": [[21, "v1", "bfloat"]],
"(anon-function 69 script)": [[3, "t9", "(function script-context symbol)"]],
"(anon-function 72 script)": [[3, "s4", "pair"]],
"(anon-function 73 script)": [[5, "s5", "pair"]],
"(anon-function 74 script)": [[5, "s5", "pair"]],
"(anon-function 75 script)": [[3, "s5", "pair"]],
"(anon-function 76 script)": [[3, "s5", "pair"]],
"(anon-function 80 script)": [[3, "s5", "pair"]],
"(method 10 script-context)": [[22, "s3", "symbol"]],
"command-get-trans": [
[36, "v0", "process-drawable"],
[58, "s3", "process-drawable"],
[76, "v0", "joint"]
],
"(anon-function 0 script)": [
[30, "s5", "pair"],
[16, "s5", "process-drawable"],
[90, "v0", "joint"]
],
"(anon-function 32 script)": [
// TODO - cast had to be added even though `object` is in type_utils.cpp
[13, "a0", "symbol"],
[43, "s5", "process-drawable"],
[32, "s5", "process-drawable"],
[105, "v0", "joint"],
[145, "v0", "joint"]
],
"command-get-process": [[37, "gp", "entity-actor"]],
"command-get-float": [[20, "gp", "bfloat"]],
"command-get-int": [[17, "gp", "bfloat"]],
"(anon-function 54 script)": [[66, "v1", "entity-actor"]],
"(anon-function 53 script)": [[40, "v1", "entity-actor"]],
"(anon-function 71 script)": [[4, "v1", "symbol"]],
// placeholder // placeholder
"placeholder-do-not-add-below": [] "placeholder-do-not-add-below": []
} }

View File

@ -752,200 +752,200 @@
"dma-buffer-add-ref-texture": { "dma-buffer-add-ref-texture": {
"args": ["dma-buf", "tex-data-ptr", "width", "height", "tex-fmt"], "args": ["dma-buf", "tex-data-ptr", "width", "height", "tex-fmt"],
"vars": { "vars": {
"s5-0":"padr", "s5-0": "padr",
"v1-0":"qwc-remaining", "v1-0": "qwc-remaining",
"a0-4":"qwc-transfer", "a0-4": "qwc-transfer",
"a1-3":"eop" "a1-3": "eop"
} }
}, },
"gs-find-block": { "gs-find-block": {
"args" : ["bx", "by", "fmt"] "args": ["bx", "by", "fmt"]
}, },
"(method 18 texture-pool)": { "(method 18 texture-pool)": {
"args":["obj", "tpage-id"] "args": ["obj", "tpage-id"]
}, },
"(method 10 texture-page)": { "(method 10 texture-page)": {
"args":["obj", "num-segments", "upload-offset"], "args": ["obj", "num-segments", "upload-offset"],
"vars": {"v1-0":"offset", "a2-1":"i"} "vars": { "v1-0": "offset", "a2-1": "i" }
}, },
"(method 16 texture-pool)": { "(method 16 texture-pool)": {
"args":["obj", "seg", "num-words"] "args": ["obj", "seg", "num-words"]
}, },
"(method 9 texture-page)": { "(method 9 texture-page)": {
"args":["obj", "heap"] "args": ["obj", "heap"]
}, },
"texture-page-default-allocate" : { "texture-page-default-allocate": {
"args":["pool", "tpage", "heap", "tpage-id"], "args": ["pool", "tpage", "heap", "tpage-id"],
"vars": { "vars": {
"s3-0":"seg", "s3-0": "seg",
"a1-2":"vram-loc", "a1-2": "vram-loc",
"v1-12":"tex-idx", "v1-12": "tex-idx",
"a0-7":"tex", "a0-7": "tex",
"a1-6":"mask-idx", "a1-6": "mask-idx",
"a2-2":"mask-word" "a2-2": "mask-word"
} }
}, },
"texture-page-common-allocate": { "texture-page-common-allocate": {
"args":["pool", "tpage", "heap", "tpage-id"], "args": ["pool", "tpage", "heap", "tpage-id"],
"vars": { "vars": {
"s5-0":"vram-loc", "s5-0": "vram-loc",
"s4-0":"seg" "s4-0": "seg"
} }
}, },
"texture-page-font-allocate": { "texture-page-font-allocate": {
"args":["pool", "tpage", "heap", "tpage-id"], "args": ["pool", "tpage", "heap", "tpage-id"],
"vars": { "vars": {
"v1-4":"tex-idx", "v1-4": "tex-idx",
"a0-5":"tex", "a0-5": "tex",
"a1-5":"mask-idx", "a1-5": "mask-idx",
"a2-2":"mask-word" "a2-2": "mask-word"
} }
}, },
"(method 22 texture-pool)": { "(method 22 texture-pool)": {
"vars": { "vars": {
"s5-0":"vram-loc", "s5-0": "vram-loc",
"gp-0":"level-idx", "gp-0": "level-idx",
"v1-3":"lev", "v1-3": "lev",
"s4-0":"tpage", "s4-0": "tpage",
"s3-0":"seg" "s3-0": "seg"
} }
}, },
"(method 23 texture-pool)": { "(method 23 texture-pool)": {
"vars": { "vars": {
"s5-0":"vram-loc", "s5-0": "vram-loc",
"gp-0":"level-idx", "gp-0": "level-idx",
"v1-3":"lev", "v1-3": "lev",
"s4-0":"tpage", "s4-0": "tpage",
"s3-0":"seg" "s3-0": "seg"
} }
}, },
"(method 24 texture-pool)": { "(method 24 texture-pool)": {
"vars": { "vars": {
"gp-0":"vram-loc", "gp-0": "vram-loc",
"s5-0":"level-idx", "s5-0": "level-idx",
"v1-3":"lev", "v1-3": "lev",
"s4-0":"tpage", "s4-0": "tpage",
"s3-0":"old-dest-base", "s3-0": "old-dest-base",
"s2-0":"new-dest-base", "s2-0": "new-dest-base",
"v1-15":"new-tbp", "v1-15": "new-tbp",
"a0-11":"texture-idx", "a0-11": "texture-idx",
"a1-12":"adgif-iter" "a1-12": "adgif-iter"
} }
}, },
"texture-page-common-boot-allocate": { "texture-page-common-boot-allocate": {
"args":["pool", "tpage", "heap", "tpage-id"], "args": ["pool", "tpage", "heap", "tpage-id"],
"vars": { "vars": {
"s2-0":"common-page-slot-id" "s2-0": "common-page-slot-id"
} }
}, },
"upload-vram-data": { "upload-vram-data": {
"args": ["buf", "dest", "data", "height", "width"], "args": ["buf", "dest", "data", "height", "width"],
"vars": { "vars": {
"a3-2":"height-this-time" "a3-2": "height-this-time"
} }
}, },
"upload-vram-pages": { "upload-vram-pages": {
"args":["pool", "dest-seg", "tpage", "mode", "bucket"], "args": ["pool", "dest-seg", "tpage", "mode", "bucket"],
"vars": { "vars": {
"gp-0":"num-chunks", "gp-0": "num-chunks",
"s3-0":"dma-buf", "s3-0": "dma-buf",
"sv-16":"data-ptr", "sv-16": "data-ptr",
"sv-20":"vram-ptr", "sv-20": "vram-ptr",
"sv-24":"tpage-num-chunks", "sv-24": "tpage-num-chunks",
"sv-32":"chunks-pending", "sv-32": "chunks-pending",
"sv-40":"first-chunk", "sv-40": "first-chunk",
"sv-48":"tpage-id" "sv-48": "tpage-id"
} }
}, },
"update-vram-pages": { "update-vram-pages": {
"args":["pool", "dest-seg", "tpage", "mode", "bucket"], "args": ["pool", "dest-seg", "tpage", "mode", "bucket"],
"vars": { "vars": {
"t1-0":"vram-ptr", "t1-0": "vram-ptr",
"t2-0":"tpage-num-chunks", "t2-0": "tpage-num-chunks",
"v1-2":"chunks-pending", "v1-2": "chunks-pending",
"t0-1":"tpage-id", "t0-1": "tpage-id",
"a1-4":"adjusted-num-chunks", "a1-4": "adjusted-num-chunks",
"a2-3":"chunk-idx", "a2-3": "chunk-idx",
"a3-8":"chunk-ptr" "a3-8": "chunk-ptr"
} }
}, },
"upload-vram-pages-pris": { "upload-vram-pages-pris": {
"args": ["pool", "dest-seg", "tpage", "bucket"], "args": ["pool", "dest-seg", "tpage", "bucket"],
"vars": { "vars": {
"gp-0":"total-chunks-uploaded", "gp-0": "total-chunks-uploaded",
"s3-0":"dma-buf", "s3-0": "dma-buf",
"sv-16":"data-ptr", "sv-16": "data-ptr",
"sv-20":"vram-ptr", "sv-20": "vram-ptr",
"sv-24":"tpage-num-chunks", "sv-24": "tpage-num-chunks",
"sv-32":"chunks-pending", "sv-32": "chunks-pending",
"sv-40":"first-chunk", "sv-40": "first-chunk",
"sv-48":"tpage-id", "sv-48": "tpage-id",
"s0-0":"chunk-idx", "s0-0": "chunk-idx",
"v1-17":"chunk-dest", "v1-17": "chunk-dest",
"a1-1":"mask-work", "a1-1": "mask-work",
"sv-52":"should-upload" "sv-52": "should-upload"
} }
}, },
"texture-page-level-allocate": { "texture-page-level-allocate": {
"args":["pool", "tpage", "heap", "tpage-id"], "args": ["pool", "tpage", "heap", "tpage-id"],
"vars": {"s2-0": "common-page-slot-id"} "vars": { "s2-0": "common-page-slot-id" }
}, },
"texture-page-size-check": { "texture-page-size-check": {
"args":["pool", "lev", "silent"] "args": ["pool", "lev", "silent"]
}, },
"(method 13 texture-pool)": { "(method 13 texture-pool)": {
"args":["pool", "lev", "num-tpage-ids", "tpage-ids"], "args": ["pool", "lev", "num-tpage-ids", "tpage-ids"],
"vars": { "vars": {
"s2-0":"lev-tex-ids", "s2-0": "lev-tex-ids",
"a0-3":"tpage-id", "a0-3": "tpage-id",
"s1-0":"loaded-tpage-idx", "s1-0": "loaded-tpage-idx",
"v1-9":"logged-in-tpage-id" "v1-9": "logged-in-tpage-id"
} }
}, },
"(method 14 texture-pool)": { "(method 14 texture-pool)": {
"args":["pool", "lev", "cat", "bucket"], "args": ["pool", "lev", "cat", "bucket"],
"vars": { "vars": {
"a2-1": "tpage" "a2-1": "tpage"
} }
}, },
"upload-textures": { "upload-textures": {
"vars": { "vars": {
"v1-6":"lev-idx", "v1-6": "lev-idx",
"a0-7":"lev", "a0-7": "lev",
"s5-0":"num-tpage", "s5-0": "num-tpage",
"v1-11":"tpage-info", "v1-11": "tpage-info",
"a1-9":"src-level" "a1-9": "src-level"
} }
}, },
"texture-relocate": { "texture-relocate": {
"args": ["dma-buff", "tex", "dest-loc", "dest-fmt", "clut-dst"] "args": ["dma-buff", "tex", "dest-loc", "dest-fmt", "clut-dst"]
}, },
"(method 11 texture-page)": { "(method 11 texture-page)": {
"args":["obj", "new-dest", "segs"], "args": ["obj", "new-dest", "segs"],
"vars": { "vars": {
"v1-0":"new-tbp", "v1-0": "new-tbp",
"a3-4":"old-tbp", "a3-4": "old-tbp",
"t0-1":"tex-idx", "t0-1": "tex-idx",
"t1-6":"tex", "t1-6": "tex",
"t2-0":"num-mips", "t2-0": "num-mips",
"t3-4":"mip-idx" "t3-4": "mip-idx"
} }
}, },
"(method 7 texture-page)": { "(method 7 texture-page)": {
"args":["obj", "loading-heap", "name"], "args": ["obj", "loading-heap", "name"],
"vars": { "vars": {
"v1-2":"loading-level", "v1-2": "loading-level",
"a3-0":"tpage-id", "a3-0": "tpage-id",
"s4-0":"dir-entry" "s4-0": "dir-entry"
} }
}, },
"texture-page-login": { "texture-page-login": {
"args":["tex-id", "alloc-func", "heap"], "args": ["tex-id", "alloc-func", "heap"],
"vars": { "vars": {
"s5-0":"dir-entry", "s5-0": "dir-entry",
"s4-0":"old-alloc-func", "s4-0": "old-alloc-func",
"s3-0":"name", "s3-0": "name",
"s2-0":"loaded-tpage" "s2-0": "loaded-tpage"
} }
}, },
"(method 9 texture-page-dir)": { "(method 9 texture-page-dir)": {

View File

@ -3,6 +3,6 @@
namespace decompiler { namespace decompiler {
bool allowable_base_type_for_symbol_to_string(const TypeSpec& ts) { bool allowable_base_type_for_symbol_to_string(const TypeSpec& ts) {
auto& bt = ts.base_type(); auto& bt = ts.base_type();
return bt == "symbol" || bt == "basic" || bt == "structure"; return bt == "symbol" || bt == "basic" || bt == "structure" || bt == "object";
} }
} // namespace decompiler } // namespace decompiler

View File

@ -25,13 +25,14 @@
:flag-assert #xe00000018 :flag-assert #xe00000018
(:methods (:methods
(talker-speech-class-method-9 () none 9) (talker-speech-class-method-9 () none 9)
(talker-speech-class-method-10 () none 10) (talker-speech-class-method-10 (_type_) none 10)
(talker-speech-class-method-11 () none 11) (talker-speech-class-method-11 () none 11)
(talker-speech-class-method-12 () none 12) (talker-speech-class-method-12 (_type_ int) none 12)
(talker-speech-class-method-13 () none 13) (talker-speech-class-method-13 (_type_ int) none 13)
) )
) )
(deftype talker (process) (deftype talker (process)
((trans vector :inline :offset-assert 128) ((trans vector :inline :offset-assert 128)
(message talker-speech-class :offset-assert 144) (message talker-speech-class :offset-assert 144)

View File

@ -5997,9 +5997,10 @@
arg0 arg0
) )
(debug-menu-context-make-default-menus *debug-menu-context*) ;; NOTE - disabled for now to prevent a crash at startup
;; The debug menu stuff accesses a lot of stuff that is currently undefined, which will crash the game
(popup-menu-context-make-default-menus *popup-menu-context*) ;; (debug-menu-context-make-default-menus *debug-menu-context*)
;; (popup-menu-context-make-default-menus *popup-menu-context*)
(defun menu-respond-to-pause () (defun menu-respond-to-pause ()
(case *master-mode* (case *master-mode*

File diff suppressed because it is too large Load Diff

View File

@ -655,7 +655,22 @@
arg0 arg0
) )
;; ERROR: function was not converted to expressions. Cannot decompile. (defun debug-menu-func-decode ((arg0 object))
(let ((v1-2 (rtype-of arg0)))
(the-as function (cond
((or (= v1-2 symbol) (= v1-2 type))
(-> (the-as symbol arg0) value)
)
((= v1-2 function)
arg0
)
(else
nothing
)
)
)
)
)
;; ERROR: Stack slot load at 96 mismatch: defined as size 4, got size 16 ;; ERROR: Stack slot load at 96 mismatch: defined as size 4, got size 16
;; ERROR: Stack slot load at 128 mismatch: defined as size 4, got size 16 ;; ERROR: Stack slot load at 128 mismatch: defined as size 4, got size 16

View File

@ -19,6 +19,7 @@
(complete 8) (complete 8)
(bit-9 9) (bit-9 9)
(bit-10 10) (bit-10 10)
(entity-perm-status-12 12)
) )
(declare-type race-mesh basic) (declare-type race-mesh basic)
@ -125,7 +126,7 @@
:flag-assert #x1b00000034 :flag-assert #x1b00000034
(:methods (:methods
(entity-method-22 (_type_) _type_ 22) (entity-method-22 (_type_) _type_ 22)
(entity-method-23 (_type_) _type_ 23) (kill! (_type_) _type_ 23)
(entity-method-24 () none 24) (entity-method-24 () none 24)
(entity-method-25 () none 25) (entity-method-25 () none 25)
(entity-method-26 () none 26) (entity-method-26 () none 26)
@ -178,7 +179,7 @@
(next-actor (_type_) entity-actor 27) (next-actor (_type_) entity-actor 27)
(prev-actor (_type_) entity-actor 28) (prev-actor (_type_) entity-actor 28)
(entity-actor-method-29 () none 29) (entity-actor-method-29 () none 29)
(entity-actor-method-30 () none 30) (entity-actor-method-30 (_type_ entity-perm-status symbol) none 30)
(entity-actor-method-31 (_type_ vector vector vector object float) nav-mesh 31) (entity-actor-method-31 (_type_ vector vector vector object float) nav-mesh 31)
(entity-actor-method-32 (_type_ vector vector nav-poly float) nav-poly 32) (entity-actor-method-32 (_type_ vector vector nav-poly float) nav-poly 32)
) )

View File

@ -212,7 +212,7 @@
(want-display-level (_type_ symbol symbol) int 13) (want-display-level (_type_ symbol symbol) int 13)
(want-vis-level (_type_ symbol) none 14) (want-vis-level (_type_ symbol) none 14)
(want-force-vis (_type_ symbol symbol) int 15) (want-force-vis (_type_ symbol symbol) int 15)
(execute-command (_type_ pair) none 16) (execute-command (_type_ pair object) none 16)
(execute-commands-up-to (_type_ float) none 17) (execute-commands-up-to (_type_ float) none 17)
(backup-load-state-and-set-cmds (_type_ pair) int 18) (backup-load-state-and-set-cmds (_type_ pair) int 18)
(restore-load-state-and-cleanup (_type_) int 19) (restore-load-state-and-cleanup (_type_) int 19)
@ -364,7 +364,7 @@
(game-info-method-18 () none 18) (game-info-method-18 () none 18)
(get-current-continue-point (_type_) continue-point 19) (get-current-continue-point (_type_) continue-point 19)
(get-continue-by-name (_type_ string) continue-point 20) (get-continue-by-name (_type_ string) continue-point 20)
(set-continue! (_type_ basic) continue-point 21) (set-continue! (_type_ basic symbol) continue-point 21)
(game-info-method-22 () none 22) (game-info-method-22 () none 22)
(game-info-method-23 () none 23) (game-info-method-23 () none 23)
(game-info-method-24 () none 24) (game-info-method-24 () none 24)

View File

@ -275,7 +275,7 @@
(:methods (:methods
(new (symbol type int) _type_ 0) (new (symbol type int) _type_ 0)
(add-setting (_type_ process symbol object object object) none 9) (add-setting (_type_ process symbol object object object) none 9)
(persist-with-delay (_type_ process time-frame object object float object) none 10) (persist-with-delay (_type_ symbol time-frame symbol symbol float int) none 10)
(set-setting (_type_ process symbol object object object) none 11) (set-setting (_type_ process symbol object object object) none 11)
(remove-setting (_type_ process symbol) none 12) (remove-setting (_type_ process symbol) none 12)
(kill-persister (_type_ engine-pers object) none 13) (kill-persister (_type_ engine-pers object) none 13)

View File

@ -547,6 +547,7 @@
obj obj
) )
;; WARN: Return type mismatch cam-setting-data vs none.
(defmethod cam-setting-data-method-10 cam-setting-data ((obj cam-setting-data) (arg0 object) (arg1 (pointer process)) (arg2 float) (arg3 int)) (defmethod cam-setting-data-method-10 cam-setting-data ((obj cam-setting-data) (arg0 object) (arg1 (pointer process)) (arg2 float) (arg3 int))
(case arg0 (case arg0
(('fov) (('fov)
@ -805,12 +806,15 @@
(none) (none)
) )
;; WARN: Return type mismatch int vs none.
(defmethod add-setting setting-control ((obj setting-control) (arg0 process) (arg1 symbol) (arg2 object) (arg3 object) (arg4 object)) (defmethod add-setting setting-control ((obj setting-control) (arg0 process) (arg1 symbol) (arg2 object) (arg3 object) (arg4 object))
"Originally called `setting-set` see (anon-function 48 script)"
(add-connection (-> obj engine) arg0 arg1 arg2 arg3 arg4) (add-connection (-> obj engine) arg0 arg1 arg2 arg3 arg4)
0 0
(none) (none)
) )
;; WARN: Return type mismatch int vs none.
(defmethod set-setting setting-control ((obj setting-control) (arg0 process) (arg1 symbol) (arg2 object) (arg3 object) (arg4 object)) (defmethod set-setting setting-control ((obj setting-control) (arg0 process) (arg1 symbol) (arg2 object) (arg3 object) (arg4 object))
(remove-setting obj arg0 arg1) (remove-setting obj arg0 arg1)
(add-connection (-> obj engine) arg0 arg1 arg2 arg3 arg4) (add-connection (-> obj engine) arg0 arg1 arg2 arg3 arg4)
@ -818,14 +822,9 @@
(none) (none)
) )
(defmethod persist-with-delay setting-control ((obj setting-control) ;; WARN: Return type mismatch int vs none.
(arg0 process) (defmethod persist-with-delay setting-control ((obj setting-control) (arg0 symbol) (arg1 time-frame) (arg2 symbol) (arg3 symbol) (arg4 float) (arg5 int))
(arg1 time-frame) "Originally called `setting-pers` see (anon-function 46 script)"
(arg2 object)
(arg3 object)
(arg4 float)
(arg5 object)
)
(let ((v1-1 (schedule-callback (-> obj engine-pers) arg0 arg1))) (let ((v1-1 (schedule-callback (-> obj engine-pers) arg0 arg1)))
(when v1-1 (when v1-1
(set! (-> v1-1 param 0) arg2) (set! (-> v1-1 param 0) arg2)
@ -838,6 +837,7 @@
(none) (none)
) )
;; WARN: Return type mismatch int vs none.
(defmethod remove-setting setting-control ((obj setting-control) (arg0 process) (arg1 symbol)) (defmethod remove-setting setting-control ((obj setting-control) (arg0 process) (arg1 symbol))
(when arg0 (when arg0
(let ((s5-0 (-> obj engine)) (let ((s5-0 (-> obj engine))
@ -857,6 +857,7 @@
(none) (none)
) )
;; WARN: Return type mismatch int vs none.
(defmethod kill-persister setting-control ((obj setting-control) (arg0 engine-pers) (arg1 object)) (defmethod kill-persister setting-control ((obj setting-control) (arg0 engine-pers) (arg1 object))
"Calls [[engine-pers::kill-matching]]" "Calls [[engine-pers::kill-matching]]"
(kill-matching (kill-matching
@ -888,6 +889,7 @@
(the-as connectable #f) (the-as connectable #f)
) )
;; WARN: Return type mismatch int vs none.
(defmethod remove-setting-by-arg0 setting-control ((obj setting-control) (arg0 object)) (defmethod remove-setting-by-arg0 setting-control ((obj setting-control) (arg0 object))
"Calls [[engine::remove-by-param0]] on `engine-hi`" "Calls [[engine::remove-by-param0]] on `engine-hi`"
(remove-by-param0 (-> obj engine-hi) arg0) (remove-by-param0 (-> obj engine-hi) arg0)

View File

@ -9,6 +9,7 @@
(defenum game-task (defenum game-task
:type uint8 :type uint8
:bitfield #f :bitfield #f
(unknown -1)
(none 0) (none 0)
(complete 1) (complete 1)
(dummy0 2) (dummy0 2)

View File

@ -408,66 +408,64 @@
0 0
) )
(defun sound-play-by-name ((arg0 sound-name) (arg1 sound-id) (arg2 int) (arg3 int) (arg4 int) (arg5 sound-group) (arg6 symbol)) (defbehavior sound-play-by-name process-drawable ((arg0 sound-name) (arg1 sound-id) (arg2 int) (arg3 int) (arg4 int) (arg5 sound-group) (arg6 object))
(local-vars (sv-16 sound-group)) (local-vars (sv-16 sound-group))
(with-pp "Last arg can by a symbol with value [[#t]], in which case it will pull `trans` [[vector]] off the current [[process-drawable]]
(set! sv-16 arg5) otherwise, an explicit [[vector]] can be provided"
(let ((s4-0 (the-as object arg6))) (set! sv-16 arg5)
(when *sound-player-enable* (let ((s4-0 arg6))
(let ((s5-0 (the-as sound-rpc-play (get-sound-buffer-entry))))
(set! (-> s5-0 command) (sound-command play))
(set! (-> s5-0 id) arg1)
(set! (-> s5-0 name) arg0)
(set! (-> s5-0 params mask) (the-as uint 0))
(set! (-> s5-0 params group) (the-as uint sv-16))
(set! (-> s5-0 params volume) arg2)
(set! (-> s5-0 params pitch-mod) arg3)
(set! (-> s5-0 params bend) arg4)
(let ((s3-1 (the-as process-drawable pp)))
(when (= (the-as symbol s4-0) #t)
(if (and s3-1 (type? s3-1 process-drawable) (nonzero? (-> s3-1 root)))
(set! s4-0 (-> s3-1 root trans))
(set! s4-0 #f)
)
)
)
(sound-trans-convert (the-as vector3w (-> s5-0 params trans)) (the-as vector s4-0))
)
)
)
arg1
)
)
(defun sound-play-by-spec ((arg0 sound-spec) (arg1 sound-id) (arg2 vector))
(with-pp
(when *sound-player-enable* (when *sound-player-enable*
(let ((s5-0 (the-as sound-rpc-play (get-sound-buffer-entry)))) (let ((s5-0 (the-as sound-rpc-play (get-sound-buffer-entry))))
(set! (-> s5-0 command) (sound-command play)) (set! (-> s5-0 command) (sound-command play))
(set! (-> s5-0 id) arg1) (set! (-> s5-0 id) arg1)
(set! (-> s5-0 name) (-> arg0 sound-name)) (set! (-> s5-0 name) arg0)
(set! (-> s5-0 params mask) (the-as uint (-> arg0 mask))) (set! (-> s5-0 params mask) (the-as uint 0))
(set! (-> s5-0 params group-and-regs) (-> arg0 group-and-regs)) (set! (-> s5-0 params group) (the-as uint sv-16))
(set! (-> s5-0 params volume) (-> arg0 volume)) (set! (-> s5-0 params volume) arg2)
(set! (-> s5-0 params pitch-mod) (-> arg0 pitch-mod)) (set! (-> s5-0 params pitch-mod) arg3)
(set! (-> s5-0 params bend) (-> arg0 bend)) (set! (-> s5-0 params bend) arg4)
(set! (-> s5-0 params fo-min) (-> arg0 fo-min)) (let ((s3-1 self))
(set! (-> s5-0 params fo-max) (-> arg0 fo-max)) (when (= s4-0 #t)
(set! (-> s5-0 params fo-curve) (-> arg0 fo-curve))
(set! (-> s5-0 params priority) (-> arg0 priority))
(let ((s3-1 (the-as process-drawable pp)))
(when (= arg2 #t)
(if (and s3-1 (type? s3-1 process-drawable) (nonzero? (-> s3-1 root))) (if (and s3-1 (type? s3-1 process-drawable) (nonzero? (-> s3-1 root)))
(set! arg2 (-> s3-1 root trans)) (set! s4-0 (-> s3-1 root trans))
(set! arg2 (the-as vector #f)) (set! s4-0 #f)
) )
) )
) )
(sound-trans-convert (the-as vector3w (-> s5-0 params trans)) arg2) (sound-trans-convert (the-as vector3w (-> s5-0 params trans)) (the-as vector s4-0))
) )
) )
arg1
) )
arg1
)
(defbehavior sound-play-by-spec process-drawable ((arg0 sound-spec) (arg1 sound-id) (arg2 vector))
(when *sound-player-enable*
(let ((s5-0 (the-as sound-rpc-play (get-sound-buffer-entry))))
(set! (-> s5-0 command) (sound-command play))
(set! (-> s5-0 id) arg1)
(set! (-> s5-0 name) (-> arg0 sound-name))
(set! (-> s5-0 params mask) (the-as uint (-> arg0 mask)))
(set! (-> s5-0 params group-and-regs) (-> arg0 group-and-regs))
(set! (-> s5-0 params volume) (-> arg0 volume))
(set! (-> s5-0 params pitch-mod) (-> arg0 pitch-mod))
(set! (-> s5-0 params bend) (-> arg0 bend))
(set! (-> s5-0 params fo-min) (-> arg0 fo-min))
(set! (-> s5-0 params fo-max) (-> arg0 fo-max))
(set! (-> s5-0 params fo-curve) (-> arg0 fo-curve))
(set! (-> s5-0 params priority) (-> arg0 priority))
(let ((s3-1 self))
(when (= arg2 #t)
(if (and s3-1 (type? s3-1 process-drawable) (nonzero? (-> s3-1 root)))
(set! arg2 (-> s3-1 root trans))
(set! arg2 (the-as vector #f))
)
)
)
(sound-trans-convert (the-as vector3w (-> s5-0 params trans)) arg2)
)
)
arg1
) )
(defun sound-pause ((arg0 sound-id)) (defun sound-pause ((arg0 sound-id))

View File

@ -3244,12 +3244,7 @@
(if (not arg0) (if (not arg0)
(set! arg0 (get-current-continue-point *game-info*)) (set! arg0 (get-current-continue-point *game-info*))
) )
(let* ((a0-6 *game-info*) (set-continue! *game-info* arg0 #f)
(t9-4 (method-of-object a0-6 set-continue!))
(a1-3 arg0)
)
(t9-4 a0-6 a1-3)
)
(stack-size-set! (-> obj main-thread) 1024) (stack-size-set! (-> obj main-thread) 1024)
(logior! (-> obj mask) (process-mask target)) (logior! (-> obj mask) (process-mask target))
(set! (-> obj state-hook) (the-as (function none :behavior target) nothing)) (set! (-> obj state-hook) (the-as (function none :behavior target) nothing))

View File

@ -19,10 +19,11 @@
;; DECOMP BEGINS ;; DECOMP BEGINS
(deftype script-form (structure) (deftype script-form (structure)
((name string :offset-assert 0) ((name symbol :offset-assert 0)
(spec basic :offset-assert 4) (spec pair :offset-assert 4)
(func basic :offset-assert 8) (func (function script-context object) :offset-assert 8)
) )
:pack-me
:method-count-assert 10 :method-count-assert 10
:size-assert #xc :size-assert #xc
:flag-assert #xa0000000c :flag-assert #xa0000000c
@ -39,7 +40,7 @@
(trans vector :offset-assert 12) (trans vector :offset-assert 12)
(side-effect? symbol :offset-assert 16) (side-effect? symbol :offset-assert 16)
(got-error? symbol :offset-assert 20) (got-error? symbol :offset-assert 20)
(expr basic :offset-assert 24) (expr pair :offset-assert 24)
(param-count int32 :offset-assert 28) (param-count int32 :offset-assert 28)
(param object 16 :offset-assert 32) (param object 16 :offset-assert 32)
(param-type object 16 :offset-assert 96) (param-type object 16 :offset-assert 96)
@ -49,9 +50,9 @@
:flag-assert #xc000000a0 :flag-assert #xc000000a0
(:methods (:methods
(new (symbol type basic process vector) _type_ 0) (new (symbol type basic process vector) _type_ 0)
(eval! (_type_ structure) pair 9) (eval! (_type_ object) object 9)
(script-context-method-10 () none 10) (script-context-method-10 (_type_ object pair) object 10)
(script-context-method-11 () none 11) (script-context-method-11 (_type_ pair pair symbol) symbol 11)
) )
) )

View File

@ -7,3 +7,40 @@
;; DECOMP BEGINS ;; DECOMP BEGINS
(defun command-get-int ((arg0 object) (arg1 int))
(cond
((null? arg0)
(empty)
arg1
)
((type? arg0 binteger)
(the-as int (/ (the-as int arg0) 8))
)
((type? arg0 bfloat)
(the int (-> (the-as bfloat arg0) data))
)
(else
(empty)
arg1
)
)
)
(defun command-get-float ((arg0 object) (arg1 float))
(cond
((null? arg0)
(empty)
arg1
)
((type? arg0 binteger)
(the float (/ (the-as int arg0) 8))
)
((type? arg0 bfloat)
(-> (the-as bfloat arg0) data)
)
(else
(empty)
arg1
)
)
)

View File

@ -186,7 +186,9 @@
(set! (-> obj were-behind?) #t) (set! (-> obj were-behind?) #t)
) )
(and (< (-> obj latch-closed-time) (-> self clock frame-counter)) (and (< (-> obj latch-closed-time) (-> self clock frame-counter))
(or (not (and *target* (logtest? (focus-status pilot teleporting) (-> *target* focus-status)))) (< f30-0 -409.6)) (or (not (and *target* (logtest? (focus-status pilot teleporting) (-> *target* focus-status))))
(< f30-0 -409.6)
)
(or (and (< f30-0 (-> obj open-distance)) (or (and (< f30-0 (-> obj open-distance))
(or (not (-> obj were-behind?)) (< f30-0 20480.0)) (or (not (-> obj were-behind?)) (< f30-0 20480.0))
(and (or (< 409.6 f30-0) (and (or (< 409.6 f30-0)
@ -200,7 +202,7 @@
) )
(and (eval! (and (eval!
(new 'stack 'script-context (the-as basic (process->ppointer self)) self (the-as vector #f)) (new 'stack 'script-context (the-as basic (process->ppointer self)) self (the-as vector #f))
(the-as structure (-> obj open-test)) (-> obj open-test)
) )
(-> *setting-control* user-current airlock) (-> *setting-control* user-current airlock)
) )
@ -241,19 +243,22 @@
) )
) )
(arg0 (arg0
(let* ((s3-0 gp-1) (s2-0 (car s3-0))) (while (not (null? s3-0)) (let* ((s3-0 gp-1)
(let ((v1-4 (level-status *level* (the-as symbol s2-0)))) (s2-0 (car s3-0))
(if (not (or (= v1-4 'loaded) (= v1-4 'active))) )
(return #f) (while (not (null? s3-0))
) (let ((v1-4 (level-status *level* (the-as symbol s2-0))))
) (if (not (or (= v1-4 'loaded) (= v1-4 'active)))
(if (= s2-0 'ctywide) (return #f)
(set! s4-0 (-> ctywide borrow-level 1)) )
)
(set! s3-0 (cdr s3-0))
(set! s2-0 (car s3-0))
)
) )
(if (= s2-0 'ctywide)
(set! s4-0 (-> ctywide borrow-level 1))
)
(set! s3-0 (cdr s3-0))
(set! s2-0 (car (the-as pair s3-0)))
)
)
(when s4-0 (when s4-0
(let ((v1-17 (level-status *level* s4-0))) (let ((v1-17 (level-status *level* s4-0)))
(if (not (or (= v1-17 'loaded) (= v1-17 'active))) (if (not (or (= v1-17 'loaded) (= v1-17 'active)))
@ -272,25 +277,28 @@
) )
) )
(set! gp-1 (cdr gp-1)) (set! gp-1 (cdr gp-1))
(set! a1-7 (car gp-1)) (set! a1-7 (car (the-as pair gp-1)))
) )
) )
#t #t
) )
(else (else
(let* ((v1-33 gp-1) (a0-11 (car v1-33))) (while (not (null? v1-33)) (let* ((v1-33 gp-1)
(dotimes (a1-10 6) (a0-11 (car v1-33))
(if (= a0-11 (-> *load-state* want a1-10 name)) )
(goto cfg-50) (while (not (null? v1-33))
) (dotimes (a1-10 6)
) (if (= a0-11 (-> *load-state* want a1-10 name))
#t (goto cfg-50)
(return #f) )
(label cfg-50)
(set! v1-33 (cdr v1-33))
(set! a0-11 (car v1-33))
)
) )
#t
(return #f)
(label cfg-50)
(set! v1-33 (cdr v1-33))
(set! a0-11 (car (the-as pair v1-33)))
)
)
#t #t
) )
) )
@ -550,12 +558,15 @@
(eval! (new 'stack 'script-context (the-as basic (process->ppointer self)) self (the-as vector #f)) gp-0) (eval! (new 'stack 'script-context (the-as basic (process->ppointer self)) self (the-as vector #f)) gp-0)
) )
) )
(when (-> self were-behind?) (the-as
(let ((gp-1 (res-lump-struct (-> self entity) 'on-inside structure))) pair
(set! (-> self were-behind?) #f) (when (-> self were-behind?)
(if (and gp-1 (not *scene-player*)) (let ((gp-1 (res-lump-struct (-> self entity) 'on-inside structure)))
(eval! (new 'stack 'script-context (the-as basic (process->ppointer self)) self (the-as vector #f)) gp-1) (set! (-> self were-behind?) #f)
) (if (and gp-1 (not *scene-player*))
(eval! (new 'stack 'script-context (the-as basic (process->ppointer self)) self (the-as vector #f)) gp-1)
)
)
) )
) )
) )

View File

@ -1081,7 +1081,7 @@ StaticResult Compiler::fill_static_inline_array(const goos::Object& form,
Val* Compiler::compile_static_pair(const goos::Object& form, Env* env, int seg) { Val* Compiler::compile_static_pair(const goos::Object& form, Env* env, int seg) {
ASSERT(form.is_pair()); // (quote PAIR) ASSERT(form.is_pair()); // (quote PAIR)
auto result = compile_static_no_eval_for_pairs(form, env, seg, true); auto result = compile_static_no_eval_for_pairs(form, env, seg, false);
ASSERT(result.is_reference()); ASSERT(result.is_reference());
auto fe = env->function_env(); auto fe = env->function_env();
auto static_result = fe->alloc_val<StaticVal>(result.reference(), result.typespec()); auto static_result = fe->alloc_val<StaticVal>(result.reference(), result.typespec());

View File

@ -20,10 +20,10 @@
:flag-assert #xe00000018 :flag-assert #xe00000018
(:methods (:methods
(talker-speech-class-method-9 () none 9) (talker-speech-class-method-9 () none 9)
(talker-speech-class-method-10 () none 10) (talker-speech-class-method-10 (_type_) none 10)
(talker-speech-class-method-11 () none 11) (talker-speech-class-method-11 () none 11)
(talker-speech-class-method-12 () none 12) (talker-speech-class-method-12 (_type_ int) none 12)
(talker-speech-class-method-13 () none 13) (talker-speech-class-method-13 (_type_ int) none 13)
) )
) )

View File

@ -2005,7 +2005,7 @@
(when s4-0 (when s4-0
(let ((gp-1 (-> arg3 param 0))) (let ((gp-1 (-> arg3 param 0)))
(set! (-> *syntax-context* got-error?) #f) (set! (-> *syntax-context* got-error?) #f)
(eval! *syntax-context* (the-as structure gp-1)) (eval! *syntax-context* gp-1)
(when (not (-> *syntax-context* got-error?)) (when (not (-> *syntax-context* got-error?))
(set! (-> s4-0 changed) #t) (set! (-> s4-0 changed) #t)
(cond (cond

View File

@ -684,7 +684,24 @@
) )
;; definition for function debug-menu-func-decode ;; definition for function debug-menu-func-decode
;; ERROR: function was not converted to expressions. Cannot decompile. ;; WARN: Return type mismatch object vs function.
;; WARN: Using new Jak 2 rtype-of
(defun debug-menu-func-decode ((arg0 object))
(let ((v1-2 (rtype-of arg0)))
(the-as function (cond
((or (= v1-2 symbol) (= v1-2 type))
(-> (the-as symbol arg0) value)
)
((= v1-2 function)
arg0
)
(else
nothing
)
)
)
)
)
;; definition for function debug-menu-make-from-template ;; definition for function debug-menu-make-from-template
;; INFO: Used lq/sq ;; INFO: Used lq/sq

View File

@ -231,7 +231,7 @@
:flag-assert #x1b00000034 :flag-assert #x1b00000034
(:methods (:methods
(entity-method-22 (_type_) _type_ 22) (entity-method-22 (_type_) _type_ 22)
(entity-method-23 (_type_) _type_ 23) (kill! (_type_) _type_ 23)
(entity-method-24 () none 24) (entity-method-24 () none 24)
(entity-method-25 () none 25) (entity-method-25 () none 25)
(entity-method-26 () none 26) (entity-method-26 () none 26)
@ -288,7 +288,7 @@
(next-actor (_type_) entity-actor 27) (next-actor (_type_) entity-actor 27)
(prev-actor (_type_) entity-actor 28) (prev-actor (_type_) entity-actor 28)
(entity-actor-method-29 () none 29) (entity-actor-method-29 () none 29)
(entity-actor-method-30 () none 30) (entity-actor-method-30 (_type_ entity-perm-status symbol) none 30)
(entity-actor-method-31 (_type_ vector vector vector object float) nav-mesh 31) (entity-actor-method-31 (_type_ vector vector vector object float) nav-mesh 31)
(entity-actor-method-32 (_type_ vector vector nav-poly float) nav-poly 32) (entity-actor-method-32 (_type_ vector vector nav-poly float) nav-poly 32)
) )

View File

@ -131,7 +131,7 @@
(want-display-level (_type_ symbol symbol) int 13) (want-display-level (_type_ symbol symbol) int 13)
(want-vis-level (_type_ symbol) none 14) (want-vis-level (_type_ symbol) none 14)
(want-force-vis (_type_ symbol symbol) int 15) (want-force-vis (_type_ symbol symbol) int 15)
(execute-command (_type_ pair) none 16) (execute-command (_type_ pair object) none 16)
(execute-commands-up-to (_type_ float) none 17) (execute-commands-up-to (_type_ float) none 17)
(backup-load-state-and-set-cmds (_type_ pair) int 18) (backup-load-state-and-set-cmds (_type_ pair) int 18)
(restore-load-state-and-cleanup (_type_) int 19) (restore-load-state-and-cleanup (_type_) int 19)
@ -335,7 +335,7 @@
(game-info-method-18 () none 18) (game-info-method-18 () none 18)
(get-current-continue-point (_type_) continue-point 19) (get-current-continue-point (_type_) continue-point 19)
(get-continue-by-name (_type_ string) continue-point 20) (get-continue-by-name (_type_ string) continue-point 20)
(set-continue! (_type_ basic) continue-point 21) (set-continue! (_type_ basic symbol) continue-point 21)
(game-info-method-22 () none 22) (game-info-method-22 () none 22)
(game-info-method-23 () none 23) (game-info-method-23 () none 23)
(game-info-method-24 () none 24) (game-info-method-24 () none 24)

View File

@ -560,7 +560,7 @@
(:methods (:methods
(new (symbol type int) _type_ 0) (new (symbol type int) _type_ 0)
(add-setting (_type_ process symbol object object object) none 9) (add-setting (_type_ process symbol object object object) none 9)
(persist-with-delay (_type_ process time-frame object object float object) none 10) (persist-with-delay (_type_ symbol time-frame symbol symbol float int) none 10)
(set-setting (_type_ process symbol object object object) none 11) (set-setting (_type_ process symbol object object object) none 11)
(remove-setting (_type_ process symbol) none 12) (remove-setting (_type_ process symbol) none 12)
(kill-persister (_type_ engine-pers object) none 13) (kill-persister (_type_ engine-pers object) none 13)

View File

@ -806,6 +806,7 @@
;; definition for method 9 of type setting-control ;; definition for method 9 of type setting-control
;; WARN: Return type mismatch int vs none. ;; WARN: Return type mismatch int vs none.
(defmethod add-setting setting-control ((obj setting-control) (arg0 process) (arg1 symbol) (arg2 object) (arg3 object) (arg4 object)) (defmethod add-setting setting-control ((obj setting-control) (arg0 process) (arg1 symbol) (arg2 object) (arg3 object) (arg4 object))
"Originally called `setting-set` see (anon-function 48 script)"
(add-connection (-> obj engine) arg0 arg1 arg2 arg3 arg4) (add-connection (-> obj engine) arg0 arg1 arg2 arg3 arg4)
0 0
(none) (none)
@ -822,14 +823,8 @@
;; definition for method 10 of type setting-control ;; definition for method 10 of type setting-control
;; WARN: Return type mismatch int vs none. ;; WARN: Return type mismatch int vs none.
(defmethod persist-with-delay setting-control ((obj setting-control) (defmethod persist-with-delay setting-control ((obj setting-control) (arg0 symbol) (arg1 time-frame) (arg2 symbol) (arg3 symbol) (arg4 float) (arg5 int))
(arg0 process) "Originally called `setting-pers` see (anon-function 46 script)"
(arg1 time-frame)
(arg2 object)
(arg3 object)
(arg4 float)
(arg5 object)
)
(let ((v1-1 (schedule-callback (-> obj engine-pers) arg0 arg1))) (let ((v1-1 (schedule-callback (-> obj engine-pers) arg0 arg1)))
(when v1-1 (when v1-1
(set! (-> v1-1 param 0) arg2) (set! (-> v1-1 param 0) arg2)

View File

@ -687,68 +687,66 @@
;; definition for function sound-play-by-name ;; definition for function sound-play-by-name
;; INFO: Used lq/sq ;; INFO: Used lq/sq
(defun sound-play-by-name ((arg0 sound-name) (arg1 sound-id) (arg2 int) (arg3 int) (arg4 int) (arg5 sound-group) (arg6 symbol)) (defbehavior sound-play-by-name process-drawable ((arg0 sound-name) (arg1 sound-id) (arg2 int) (arg3 int) (arg4 int) (arg5 sound-group) (arg6 object))
"Last arg can by a symbol with value [[#t]], in which case it will pull `trans` [[vector]] off the current [[process-drawable]]
otherwise, an explicit [[vector]] can be provided"
(local-vars (sv-16 sound-group)) (local-vars (sv-16 sound-group))
(with-pp (set! sv-16 arg5)
(set! sv-16 arg5) (let ((s4-0 arg6))
(let ((s4-0 (the-as object arg6)))
(when *sound-player-enable*
(let ((s5-0 (the-as sound-rpc-play (get-sound-buffer-entry))))
(set! (-> s5-0 command) (sound-command play))
(set! (-> s5-0 id) arg1)
(set! (-> s5-0 name) arg0)
(set! (-> s5-0 params mask) (the-as uint 0))
(set! (-> s5-0 params group) (the-as uint sv-16))
(set! (-> s5-0 params volume) arg2)
(set! (-> s5-0 params pitch-mod) arg3)
(set! (-> s5-0 params bend) arg4)
(let ((s3-1 (the-as process-drawable pp)))
(when (= (the-as symbol s4-0) #t)
(if (and s3-1 (type? s3-1 process-drawable) (nonzero? (-> s3-1 root)))
(set! s4-0 (-> s3-1 root trans))
(set! s4-0 #f)
)
)
)
(sound-trans-convert (the-as vector3w (-> s5-0 params trans)) (the-as vector s4-0))
)
)
)
arg1
)
)
;; definition for function sound-play-by-spec
;; INFO: Used lq/sq
(defun sound-play-by-spec ((arg0 sound-spec) (arg1 sound-id) (arg2 vector))
(with-pp
(when *sound-player-enable* (when *sound-player-enable*
(let ((s5-0 (the-as sound-rpc-play (get-sound-buffer-entry)))) (let ((s5-0 (the-as sound-rpc-play (get-sound-buffer-entry))))
(set! (-> s5-0 command) (sound-command play)) (set! (-> s5-0 command) (sound-command play))
(set! (-> s5-0 id) arg1) (set! (-> s5-0 id) arg1)
(set! (-> s5-0 name) (-> arg0 sound-name)) (set! (-> s5-0 name) arg0)
(set! (-> s5-0 params mask) (the-as uint (-> arg0 mask))) (set! (-> s5-0 params mask) (the-as uint 0))
(set! (-> s5-0 params group-and-regs) (-> arg0 group-and-regs)) (set! (-> s5-0 params group) (the-as uint sv-16))
(set! (-> s5-0 params volume) (-> arg0 volume)) (set! (-> s5-0 params volume) arg2)
(set! (-> s5-0 params pitch-mod) (-> arg0 pitch-mod)) (set! (-> s5-0 params pitch-mod) arg3)
(set! (-> s5-0 params bend) (-> arg0 bend)) (set! (-> s5-0 params bend) arg4)
(set! (-> s5-0 params fo-min) (-> arg0 fo-min)) (let ((s3-1 self))
(set! (-> s5-0 params fo-max) (-> arg0 fo-max)) (when (= s4-0 #t)
(set! (-> s5-0 params fo-curve) (-> arg0 fo-curve))
(set! (-> s5-0 params priority) (-> arg0 priority))
(let ((s3-1 (the-as process-drawable pp)))
(when (= arg2 #t)
(if (and s3-1 (type? s3-1 process-drawable) (nonzero? (-> s3-1 root))) (if (and s3-1 (type? s3-1 process-drawable) (nonzero? (-> s3-1 root)))
(set! arg2 (-> s3-1 root trans)) (set! s4-0 (-> s3-1 root trans))
(set! arg2 (the-as vector #f)) (set! s4-0 #f)
) )
) )
) )
(sound-trans-convert (the-as vector3w (-> s5-0 params trans)) arg2) (sound-trans-convert (the-as vector3w (-> s5-0 params trans)) (the-as vector s4-0))
) )
) )
arg1
) )
arg1
)
;; definition for function sound-play-by-spec
;; INFO: Used lq/sq
(defbehavior sound-play-by-spec process-drawable ((arg0 sound-spec) (arg1 sound-id) (arg2 vector))
(when *sound-player-enable*
(let ((s5-0 (the-as sound-rpc-play (get-sound-buffer-entry))))
(set! (-> s5-0 command) (sound-command play))
(set! (-> s5-0 id) arg1)
(set! (-> s5-0 name) (-> arg0 sound-name))
(set! (-> s5-0 params mask) (the-as uint (-> arg0 mask)))
(set! (-> s5-0 params group-and-regs) (-> arg0 group-and-regs))
(set! (-> s5-0 params volume) (-> arg0 volume))
(set! (-> s5-0 params pitch-mod) (-> arg0 pitch-mod))
(set! (-> s5-0 params bend) (-> arg0 bend))
(set! (-> s5-0 params fo-min) (-> arg0 fo-min))
(set! (-> s5-0 params fo-max) (-> arg0 fo-max))
(set! (-> s5-0 params fo-curve) (-> arg0 fo-curve))
(set! (-> s5-0 params priority) (-> arg0 priority))
(let ((s3-1 self))
(when (= arg2 #t)
(if (and s3-1 (type? s3-1 process-drawable) (nonzero? (-> s3-1 root)))
(set! arg2 (-> s3-1 root trans))
(set! arg2 (the-as vector #f))
)
)
)
(sound-trans-convert (the-as vector3w (-> s5-0 params trans)) arg2)
)
)
arg1
) )
;; definition for function sound-pause ;; definition for function sound-pause
@ -1023,7 +1021,7 @@
(-> obj pitch) (-> obj pitch)
0 0
(sound-group sfx) (sound-group sfx)
(the-as symbol (-> obj trans)) (-> obj trans)
) )
) )
) )
@ -1037,7 +1035,7 @@
(-> obj pitch) (-> obj pitch)
0 0
(sound-group sfx) (sound-group sfx)
(the-as symbol (-> obj trans)) (-> obj trans)
) )
) )
(set! (-> obj play-time) (set! (-> obj play-time)

View File

@ -3293,12 +3293,7 @@
(if (not arg0) (if (not arg0)
(set! arg0 (get-current-continue-point *game-info*)) (set! arg0 (get-current-continue-point *game-info*))
) )
(let* ((a0-6 *game-info*) (set-continue! *game-info* arg0 #f)
(t9-4 (method-of-object a0-6 set-continue!))
(a1-3 arg0)
)
(t9-4 a0-6 a1-3)
)
(stack-size-set! (-> obj main-thread) 1024) (stack-size-set! (-> obj main-thread) 1024)
(logior! (-> obj mask) (process-mask target)) (logior! (-> obj mask) (process-mask target))
(set! (-> obj state-hook) (the-as (function none :behavior target) nothing)) (set! (-> obj state-hook) (the-as (function none :behavior target) nothing))

View File

@ -3,10 +3,11 @@
;; definition of type script-form ;; definition of type script-form
(deftype script-form (structure) (deftype script-form (structure)
((name string :offset-assert 0) ((name symbol :offset-assert 0)
(spec basic :offset-assert 4) (spec pair :offset-assert 4)
(func basic :offset-assert 8) (func (function script-context object) :offset-assert 8)
) )
:pack-me
:method-count-assert 10 :method-count-assert 10
:size-assert #xc :size-assert #xc
:flag-assert #xa0000000c :flag-assert #xa0000000c
@ -37,7 +38,7 @@
(trans vector :offset-assert 12) (trans vector :offset-assert 12)
(side-effect? symbol :offset-assert 16) (side-effect? symbol :offset-assert 16)
(got-error? symbol :offset-assert 20) (got-error? symbol :offset-assert 20)
(expr basic :offset-assert 24) (expr pair :offset-assert 24)
(param-count int32 :offset-assert 28) (param-count int32 :offset-assert 28)
(param object 16 :offset-assert 32) (param object 16 :offset-assert 32)
(param-type object 16 :offset-assert 96) (param-type object 16 :offset-assert 96)
@ -47,9 +48,9 @@
:flag-assert #xc000000a0 :flag-assert #xc000000a0
(:methods (:methods
(new (symbol type basic process vector) _type_ 0) (new (symbol type basic process vector) _type_ 0)
(eval! (_type_ structure) pair 9) (eval! (_type_ object) object 9)
(script-context-method-10 () none 10) (script-context-method-10 (_type_ object pair) object 10)
(script-context-method-11 () none 11) (script-context-method-11 (_type_ pair pair symbol) symbol 11)
) )
) )

View File

@ -251,7 +251,7 @@
) )
(and (eval! (and (eval!
(new 'stack 'script-context (the-as basic (process->ppointer self)) self (the-as vector #f)) (new 'stack 'script-context (the-as basic (process->ppointer self)) self (the-as vector #f))
(the-as structure (-> obj open-test)) (-> obj open-test)
) )
(-> *setting-control* user-current airlock) (-> *setting-control* user-current airlock)
) )
@ -306,7 +306,7 @@
(set! s4-0 (-> ctywide borrow-level 1)) (set! s4-0 (-> ctywide borrow-level 1))
) )
(set! s3-0 (cdr s3-0)) (set! s3-0 (cdr s3-0))
(set! s2-0 (car s3-0)) (set! s2-0 (car (the-as pair s3-0)))
) )
) )
(when s4-0 (when s4-0
@ -327,7 +327,7 @@
) )
) )
(set! gp-1 (cdr gp-1)) (set! gp-1 (cdr gp-1))
(set! a1-7 (car gp-1)) (set! a1-7 (car (the-as pair gp-1)))
) )
) )
#t #t
@ -346,7 +346,7 @@
(return #f) (return #f)
(label cfg-50) (label cfg-50)
(set! v1-33 (cdr v1-33)) (set! v1-33 (cdr v1-33))
(set! a0-11 (car v1-33)) (set! a0-11 (car (the-as pair v1-33)))
) )
) )
#t #t
@ -613,12 +613,15 @@
(eval! (new 'stack 'script-context (the-as basic (process->ppointer self)) self (the-as vector #f)) gp-0) (eval! (new 'stack 'script-context (the-as basic (process->ppointer self)) self (the-as vector #f)) gp-0)
) )
) )
(when (-> self were-behind?) (the-as
(let ((gp-1 (res-lump-struct (-> self entity) 'on-inside structure))) pair
(set! (-> self were-behind?) #f) (when (-> self were-behind?)
(if (and gp-1 (not *scene-player*)) (let ((gp-1 (res-lump-struct (-> self entity) 'on-inside structure)))
(eval! (new 'stack 'script-context (the-as basic (process->ppointer self)) self (the-as vector #f)) gp-1) (set! (-> self were-behind?) #f)
) (if (and gp-1 (not *scene-player*))
(eval! (new 'stack 'script-context (the-as basic (process->ppointer self)) self (the-as vector #f)) gp-1)
)
)
) )
) )
) )