add jak 2 test-zone

This commit is contained in:
Hat Kid
2023-10-16 17:26:05 +02:00
parent 90e62fb559
commit e6ee3da503
6 changed files with 205 additions and 1 deletions
+86 -1
View File
@@ -14690,7 +14690,7 @@
0
)
;; added in PC port: test levels from the ps3 version
;; og:preserve-this added in PC port: test levels from the ps3 version
(#when USE_PS3_LEVELS
(define 4aaron (new 'static 'level-load-info
:index 1
@@ -15724,3 +15724,88 @@
(cons! *level-load-list* 'wasall)
(cons! *level-load-list* 'stadocc)
)
;; og:preserve-this added test-zone level
(define test-zone
(new 'static 'level-load-info
:index #x9e
:name 'test-zone
:visname 'test-zone-vis
:nickname 'tsz
:dbname 'test-zone
:taskname 'default
:packages '()
;; :memory-mode (load-buffer-mode small-center)
:music-bank #f
:ambient-sounds '()
:mood-func 'update-mood-default
:mood-init #f
:ocean #f
:sky #t
:use-camera-other #f
:part-engine-max 16
:continues '((new 'static 'continue-point
:name "test-zone-start"
:level 'test-zone
:trans (new 'static 'vector :x 0.0 :y (meters 10) :z (meters 10) :w 1.0)
:quat (new 'static 'vector :y 0.061 :w 0.9981)
:camera-trans (new 'static 'vector :x 0.0 :y (meters 1) :z 0.0 :w 1.0)
:camera-rot (new 'static 'inline-array vector3s 3
(new 'static 'vector3s :data (new 'static 'array float 3 1.0 0.0 0.0))
(new 'static 'vector3s :data (new 'static 'array float 3 0.0 1.0 0.0))
(new 'static 'vector3s :data (new 'static 'array float 3 0.0 0.0 1.0))
)
:on-goto #f
:vis-nick #f
:want (new 'static 'inline-array level-buffer-state 6
(new 'static 'level-buffer-state :name 'test-zone :display? 'display :force-vis? #f :force-inside? #f)
(new 'static 'level-buffer-state :name 'ctywide :display? 'display :force-vis? #f :force-inside? #f)
(new 'static 'level-buffer-state :name #f :display? #f :force-vis? #f :force-inside? #f)
(new 'static 'level-buffer-state :name #f :display? #f :force-vis? #f :force-inside? #f)
(new 'static 'level-buffer-state :name #f :display? #f :force-vis? #f :force-inside? #f)
(new 'static 'level-buffer-state :name #f :display? #f :force-vis? #f :force-inside? #f)
)
:want-sound (new 'static 'array symbol 3 #f #f #f)
)
)
:tasks '()
:priority 100
:load-commands '()
:alt-load-commands '()
:bsp-mask #xffffffffffffffff
:buttom-height (meters -10000000)
:run-packages '()
:wait-for-load #t
:login-func #f
:activate-func #f
:deactivate-func #f
:kill-func #f
:borrow-level (new 'static 'array symbol 2 #f #f)
:borrow-display? (new 'static 'array symbol 2 #f #f)
:base-task-mask (task-mask task0)
:texture-anim-tfrag #f
:texture-anim-pris #f
:texture-anim-shrub #f
:texture-anim-alpha #f
:texture-anim-water #f
:texture-anim-twarp #f
:texture-anim-pris2 #f
:texture-anim-sprite #f
:texture-anim-map #f
:texture-anim-sky #f
:draw-priority 10.0
:fog-height 327680.0
:bigmap-id (bigmap-id bigmap-id-20)
:ocean-near-translucent? #t
:ocean-far? #t
:mood-range (new 'static 'mood-range :data (new 'static 'array float 4 0.0 1.0 0.0 1.0))
:max-rain 1.0
:fog-mult 1.0
:ocean-alpha 1.0
:extra-sound-bank #f
)
)
(#when PC_PORT
(cons! *level-load-list* 'test-zone)
)
+11
View File
@@ -291,6 +291,17 @@
(cgo-file "wasall.gd" common-dep)
)
;;;;;;;;;;;;;;;;;;;;;;;;;
;; Example Custom Level
;;;;;;;;;;;;;;;;;;;;;;;;;
;; Set up the build system to build the level geometry
;; this path is relative to the custom_levels/jak2 folder
;; it should point to the .jsonc file that specifies the level.
(build-custom-level "test-zone")
;; the DGO file
(custom-level-cgo "TSZ.DGO" "test-zone/testzone.gd")
;;;;;;;;;;;;;;;;;;;;;
;; ANIMATIONS
;;;;;;;;;;;;;;;;;;;;;
+17
View File
@@ -83,6 +83,17 @@
)
)
(defun custom-level-cgo (output-name desc-file-name)
"Add a CGO with the given output name (in $OUT/iso) and input name (in custom_levels/jak2/)"
(let ((out-name (string-append "$OUT/iso/" output-name)))
(defstep :in (string-append "custom_levels/jak2/" desc-file-name)
:tool 'dgo
:out `(,out-name)
)
(set! *all-cgos* (cons out-name *all-cgos*))
)
)
(defun cgo (output-name desc-file-name)
"Add a CGO with the given output name (in $OUT/iso) and input name (in goal_src/jak2/dgos)"
(let ((out-name (string-append "$OUT/iso/" output-name)))
@@ -124,6 +135,12 @@
)
)
(defmacro build-custom-level (name)
(let* ((path (string-append "custom_levels/jak2/" name "/" name ".jsonc")))
`(defstep :in ,path
:tool 'build-level2
:out '(,(string-append "$OUT/obj/" name ".go")))))
(defmacro group (name &rest stuff)
`(defstep :in ""
:tool 'group