mirror of
https://github.com/open-goal/jak-project
synced 2026-06-04 10:49:04 -04:00
2969833b2d
- `speech` - `ambient` - `water-h` - `vol-h` - `generic-obs` - `carry-h` - `pilot-h` - `board-h` - `gun-h` - `flut-h` - `indax-h` - `lightjak-h` - `darkjak-h` - `target-util` - `history` - `collide-reaction-target` - `logic-target` - `sidekick` - `projectile` - `voicebox` - `ragdoll-edit` - most of `ragdoll` (not added to gsrc yet) - `curves` - `find-nearest` - `lightjak-wings` - `target-handler` - `target-anim` - `target` - `target2` - `target-swim` - `target-lightjak` - `target-invisible` - `target-death` - `target-gun` - `gun-util` - `board-util` - `target-board` - `board-states` - `mech-h` - `vol` - `vent` - `viewer` - `gem-pool` - `collectables` - `crates` - `secrets-menu` Additionally: - Detection of non-virtual state inheritance - Added a config file that allows overriding the process stack size set by `stack-size-set!` calls - Fix for integer multiplication with `r0` - Fixed detection for the following macros: - `static-attack-info` - `defpart` and `defpartgroup` (probably still needs adjustments, uses Jak 2 implementation at the moment) - `sound-play` (Jak 3 seems to always call `sound-play-by-name` with a `sound-group` of 0, so the macro has been temporarily defaulted to use that) One somewhat significant change made here that should be noted is that the return type of `process::init-from-entity!` was changed to `object`. I've been thinking about this for a while, since it looks a bit nicer without the `(none)` at the end and I have recently encountered init methods that early return `0`.
72 lines
2.0 KiB
Common Lisp
72 lines
2.0 KiB
Common Lisp
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; name: script-h.gc
|
|
;; name in dgo: script-h
|
|
;; dgos: GAME
|
|
|
|
|
|
(declare-type script-context structure)
|
|
(declare-type load-state structure)
|
|
(define-extern *load-state* load-state)
|
|
|
|
(defmacro script-eval (script &key (key (process->ppointer PP)) &key (proc PP) &key (vector (the-as vector #f)))
|
|
`(eval! (new 'stack 'script-context ,key ,proc ,vector) ,script))
|
|
|
|
(define-extern command-get-int (function object int int))
|
|
(define-extern command-get-float (function object float float))
|
|
(define-extern command-get-param (function object object object))
|
|
(define-extern command-get-process (function object process process))
|
|
|
|
;; DECOMP BEGINS
|
|
|
|
(deftype script-form (structure)
|
|
((name symbol)
|
|
(spec pair)
|
|
(func (function script-context object))
|
|
)
|
|
(:methods
|
|
(script-form-method-9 () none)
|
|
)
|
|
)
|
|
|
|
|
|
(deftype script-context (structure)
|
|
((load-state load-state)
|
|
(key object)
|
|
(process process)
|
|
(trans vector)
|
|
(side-effect? symbol)
|
|
(got-error? symbol)
|
|
(expr pair)
|
|
(param-count int32)
|
|
(param object 16)
|
|
(param-type object 16)
|
|
)
|
|
(:methods
|
|
(new (symbol type object process vector) _type_)
|
|
(eval! (_type_ pair) object)
|
|
(script-context-method-10 () none)
|
|
(script-context-method-11 () none)
|
|
)
|
|
)
|
|
|
|
|
|
;; WARN: Return type mismatch structure vs script-context.
|
|
(defmethod new script-context ((allocation symbol) (type-to-make type) (arg0 object) (arg1 process) (arg2 vector))
|
|
(let ((t9-0 (method-of-type structure new))
|
|
(v1-1 type-to-make)
|
|
)
|
|
(-> type-to-make size)
|
|
(let ((v0-0 (t9-0 allocation v1-1)))
|
|
(set! (-> (the-as script-context v0-0) key) arg0)
|
|
(set! (-> (the-as script-context v0-0) process) arg1)
|
|
(set! (-> (the-as script-context v0-0) load-state) *load-state*)
|
|
(set! (-> (the-as script-context v0-0) side-effect?) #t)
|
|
(set! (-> (the-as script-context v0-0) got-error?) #f)
|
|
(set! (-> (the-as script-context v0-0) trans) arg2)
|
|
(the-as script-context v0-0)
|
|
)
|
|
)
|
|
)
|