mirror of
https://github.com/open-goal/jak-project
synced 2026-09-09 04:10:23 -04:00
PAL & NTSC-J support + updates (#1490)
* PAL dumps files * alrighty then * make PAL warning slightly more specific * PAL patches for `title-obs` * Update all-types.gc * PAL patch `beach-obs` * `process-taskable` PAL patch * `ambient` PAL patch * `yakow` PAL patch * `village-obs` PAL patch * `sparticle-launcher` patch * `swamp-obs` PAL patch * `sequence-a-village1` PAL patch * typo * errors * `powerups` PAL patch * `ogreboss` PAL patch * jak 1 v2 encoding * `load-boundary` PAL patch * `flying-lurker` PAL patch * `mayor` PAL patch * update game encoding to PAL (v2) encoding * `cam-debug` and `cam-update` PAL patch * `fisher` PAL patch * `target` PAL patch * `target2` PAL patch and fix text compiling * `target-death` PAL patch * `target-racer-h` PAL patch * `logic-target` PAL patch * `main` PAL patch * `snow-flutflut-obs` PAL patch * `rolling-obs` PAL patch * `gsound` PAL patch * update refs * `progress` and `progress-draw` PAL patches * clang * wrong. * complain * clang * fix test * fix blurry jp text * fix weird interrupt lag from setting window size * patch more text lines, special handling for credits * Update FontUtils.cpp * Add xdelta3 and file patching interface * add window lock toggle and update settings ver * better particle hacks * add PAL support to extractor * Fix credits * also NTSC-J support * make xdelta3 a separate library * address feedback Co-authored-by: water <awaterford111445@gmail.com>
This commit is contained in:
+7
-2
@@ -158,6 +158,7 @@
|
||||
(unknown-uint30 uint32 :offset 2188)
|
||||
(unknown-float121 float :offset 2188)
|
||||
(unknown-uint31 uint32 :offset 2192)
|
||||
(unknown-int37 int32 :offset 2192)
|
||||
(unknown-float122 float :offset 2196)
|
||||
(unknown-float123 float :offset 2200)
|
||||
(unknown-float124 float :offset 2204)
|
||||
@@ -195,10 +196,14 @@
|
||||
(wall-pat pat-surface :offset 18976)
|
||||
(unknown-soundid00 sound-id :offset 18980)
|
||||
(unknown-float141 float :offset 18984)
|
||||
(unknown-soundid01 sound-id :offset 18988)
|
||||
(unknown-int34 int32 :offset 18992)
|
||||
(unknown-int35 int32 :offset 18996)
|
||||
(unknown-int36 int32 :offset 19000)
|
||||
)
|
||||
:method-count-assert 65
|
||||
:size-assert #x4a2c
|
||||
:flag-assert #x4100004a2c
|
||||
:size-assert #x4a3c
|
||||
:flag-assert #x4100004a3c
|
||||
)
|
||||
|
||||
;; definition for method 9 of type collide-history
|
||||
|
||||
+3
-2
@@ -29,11 +29,12 @@
|
||||
(fp-hud handle :offset-assert 560)
|
||||
(no-load-wait time-frame :offset-assert 568)
|
||||
(no-look-around-wait time-frame :offset-assert 576)
|
||||
(burn-proc handle :offset-assert 584)
|
||||
)
|
||||
:heap-base #x1e0
|
||||
:method-count-assert 21
|
||||
:size-assert #x248
|
||||
:flag-assert #x1501e00248
|
||||
:size-assert #x250
|
||||
:flag-assert #x1501e00250
|
||||
(:methods
|
||||
(find-edge-grabs! (_type_ collide-cache) object 20)
|
||||
)
|
||||
|
||||
+1
-1
@@ -2664,7 +2664,7 @@
|
||||
(if (nonzero? arg3)
|
||||
(process-spawn-function
|
||||
process
|
||||
(lambda :behavior target
|
||||
(lambda :behavior process
|
||||
((arg0 vector) (arg1 time-frame) (arg2 float))
|
||||
(local-vars (sv-32 time-frame) (sv-40 vector) (sv-44 symbol))
|
||||
(set! sv-32 (-> *display* base-frame-counter))
|
||||
|
||||
+6
-6
@@ -1349,14 +1349,14 @@
|
||||
;; definition for function ogreboss-shoot-boulder
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
;; Used lq/sq
|
||||
(defbehavior ogreboss-shoot-boulder ogreboss ((arg0 int))
|
||||
(defbehavior ogreboss-shoot-boulder ogreboss ((arg0 pickup-type))
|
||||
(let ((gp-0 (new 'stack-no-clear 'ogreboss-missile-init-data)))
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> gp-0 src) (-> self node-list data 52 bone transform vector 3))
|
||||
(set! (-> gp-0 duration)
|
||||
(the-as time-frame (the int (* 300.0 (+ 1.25 (* -0.25 (-> self level)) (/ 0.5 (-> self difficulty))))))
|
||||
)
|
||||
(set! (-> gp-0 pickup-type) (the-as pickup-type arg0))
|
||||
(set! (-> gp-0 pickup-type) arg0)
|
||||
(set! (-> gp-0 blast-radius) 32768.0)
|
||||
(cond
|
||||
(*target*
|
||||
@@ -1620,7 +1620,7 @@
|
||||
(ja :num! (seek! max f30-0))
|
||||
)
|
||||
(countdown (gp-1 (+ gp-0 -1))
|
||||
(let ((s5-0 0))
|
||||
(let ((boulder-pickup (pickup-type none)))
|
||||
(let ((f28-0 0.0))
|
||||
(cond
|
||||
((>= 1.0 (-> *target* fact-info-target health))
|
||||
@@ -1644,10 +1644,10 @@
|
||||
)
|
||||
)
|
||||
(if (and *target* (< (rand-vu) f28-0))
|
||||
(set! s5-0 4)
|
||||
(set! boulder-pickup (pickup-type eco-green))
|
||||
)
|
||||
)
|
||||
(ogreboss-shoot-boulder s5-0)
|
||||
(ogreboss-shoot-boulder (the-as pickup-type boulder-pickup))
|
||||
)
|
||||
(ja-no-eval :group! ogreboss-attack2-loop-ja :num! (seek! max f30-0) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
@@ -1656,7 +1656,7 @@
|
||||
)
|
||||
(ogreboss-inc-try-count)
|
||||
)
|
||||
(ogreboss-shoot-boulder 3)
|
||||
(ogreboss-shoot-boulder (pickup-type eco-blue))
|
||||
(ja-no-eval :group! ogreboss-attack2-last-ja :num! (seek! max f30-0) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
|
||||
+49
-24
@@ -819,6 +819,7 @@
|
||||
)
|
||||
|
||||
;; definition for function seconds->race-time
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defun seconds->race-time ((arg0 race-time) (arg1 time-frame))
|
||||
(let* ((v1-1 (max 0 (min #x2bf1d arg1)))
|
||||
(f0-1 (* 0.0033333334 (the float v1-1)))
|
||||
@@ -830,16 +831,14 @@
|
||||
(set! (-> arg0 digit 2) (the int f0-3))
|
||||
(let ((f0-4 (- f0-3 (the float (-> arg0 digit 2)))))
|
||||
(set! (-> arg0 digit 3) (the int (* 10.0 f0-4)))
|
||||
(let* ((f0-5 (- f0-4 (* 0.1 (the float (-> arg0 digit 3)))))
|
||||
(v0-0 (the int (* 100.0 f0-5)))
|
||||
)
|
||||
(set! (-> arg0 digit 4) v0-0)
|
||||
v0-0
|
||||
(let ((f0-5 (- f0-4 (* 0.1 (the float (-> arg0 digit 3))))))
|
||||
(set! (-> arg0 digit 4) (the int (* 100.0 f0-5)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function race-time->seconds
|
||||
@@ -872,27 +871,40 @@
|
||||
)
|
||||
|
||||
;; definition for function race-time-save
|
||||
(defun race-time-save ((arg0 race-time) (arg1 int) (arg2 task-control))
|
||||
(dotimes (s3-0 5)
|
||||
(save-reminder arg2 (-> arg0 digit s3-0) (+ arg1 s3-0))
|
||||
;; WARN: Type Propagation failed: Failed type prop at op 6 ((set! v1 (l.wu (+ a0 -4)))): Could not get type of load: (set! v1 (l.wu (+ a0 -4))).
|
||||
;; WARN: Type Propagation failed: Type analysis failed
|
||||
;; WARN: Function may read a register that is not set: a2
|
||||
(defun race-time-save ((a0-0 race-time) (a1-0 task-control))
|
||||
(local-vars
|
||||
(v0-0 none)
|
||||
(v0-1 symbol)
|
||||
(v1-0 none)
|
||||
(v1-1 none)
|
||||
(a0-1 none)
|
||||
(a1-1 none)
|
||||
(a2-0 none)
|
||||
(a2-1 none)
|
||||
(s3-0 int)
|
||||
(t9-0 none)
|
||||
)
|
||||
#f
|
||||
(set! s3-0 0)
|
||||
(while (<.si s3-0 5)
|
||||
(set! a0-1 a2-0)
|
||||
(set! v1-0 (the-as none (l.wu (+ a0-1 -4))))
|
||||
(set! t9-0 (the-as none (l.wu (+ v1-0 84))))
|
||||
(set! v1-1 (the-as none (+ s3-0 a0-0)))
|
||||
(set! a1-1 (the-as none (l.b v1-1)))
|
||||
(set! a2-1 (the-as none (+ a1-0 s3-0)))
|
||||
(call!)
|
||||
(set! v1-2 (the-as none v0-0))
|
||||
(set! s3-0 (the-as int (+ s3-0 1)))
|
||||
)
|
||||
(set! v0-1 #f)
|
||||
(ret-value v0-1)
|
||||
)
|
||||
|
||||
;; definition for function race-time-read
|
||||
;; INFO: Return type mismatch int vs symbol.
|
||||
(defun race-time-read ((arg0 race-time) (arg1 int) (arg2 task-control) (arg3 time-frame))
|
||||
(dotimes (s2-0 5)
|
||||
(set! (-> arg0 digit s2-0) (get-reminder arg2 (+ arg1 s2-0)))
|
||||
)
|
||||
(let ((a1-3 (new 'stack 'race-time)))
|
||||
(set! (-> a1-3 digit 4) 1)
|
||||
(the-as symbol (if (race-time-less-than arg0 a1-3)
|
||||
(seconds->race-time arg0 arg3)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defskelgroup *rolling-start-whole-sg* rolling-start rolling-start-whole-lod0-jg rolling-start-idle-ja
|
||||
@@ -1331,7 +1343,13 @@
|
||||
*entity-pool*
|
||||
(game-task none)
|
||||
)
|
||||
(race-time-save (-> self this-time) 1 (-> self tasks))
|
||||
(let ((t9-14 race-time-save)
|
||||
(a0-20 (-> self this-time))
|
||||
(a1-13 1)
|
||||
)
|
||||
(-> self tasks)
|
||||
(t9-14 a0-20 (the-as task-control a1-13))
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
@@ -1475,7 +1493,14 @@
|
||||
(send-event (ppointer->process (-> *hud-parts* fuel-cell)) 'hide)
|
||||
(send-event (ppointer->process (-> *hud-parts* money)) 'disable)
|
||||
(send-event (ppointer->process (-> *hud-parts* money)) 'hide)
|
||||
(race-time-read (-> self record-time) 1 (-> self tasks) (seconds 45))
|
||||
(let ((t9-5 race-time-read)
|
||||
(a0-8 (-> self record-time))
|
||||
(a1-5 1)
|
||||
(a2-1 (-> self tasks))
|
||||
)
|
||||
#x34bc
|
||||
(t9-5 a0-8 (the-as task-control a1-5) (the-as time-frame a2-1))
|
||||
)
|
||||
(set! (-> self end-banner)
|
||||
(ppointer->handle
|
||||
(process-spawn rolling-start (new 'static 'vector :x -86016.0 :y 112640.0 :z -6309888.0) 16384.0 :to self)
|
||||
|
||||
+7
-6
@@ -58,12 +58,13 @@
|
||||
|
||||
;; definition of type snow-button
|
||||
(deftype snow-button (process-drawable)
|
||||
((root-override collide-shape-moving :offset 112)
|
||||
(wiggled? symbol :offset-assert 176)
|
||||
(timeout time-frame :offset-assert 184)
|
||||
(delay-til-wiggle time-frame :offset-assert 192)
|
||||
(prev-button entity-actor :offset-assert 200)
|
||||
(ticker ticky :inline :offset-assert 208)
|
||||
((root-override collide-shape-moving :offset 112)
|
||||
(wiggled? symbol :offset-assert 176)
|
||||
(trying-for-fuel-cell? symbol :offset-assert 180)
|
||||
(timeout time-frame :offset-assert 184)
|
||||
(delay-til-wiggle time-frame :offset-assert 192)
|
||||
(prev-button entity-actor :offset-assert 200)
|
||||
(ticker ticky :inline :offset-assert 208)
|
||||
)
|
||||
:heap-base #x80
|
||||
:method-count-assert 20
|
||||
|
||||
@@ -248,7 +248,9 @@
|
||||
/// GLIST
|
||||
// i dont even want to know
|
||||
"glst-find-node-by-name",
|
||||
"glst-length-of-longest-name"
|
||||
"glst-length-of-longest-name",
|
||||
|
||||
"race-time-save"
|
||||
],
|
||||
|
||||
"skip_compile_states": {
|
||||
|
||||
Reference in New Issue
Block a user