decomp loader (#3373)

fixes `defskelgroup` being broken in jak 2

switches jak 3 to the jak 3 font (currently identical to jak 2)
This commit is contained in:
ManDude
2024-02-13 16:38:58 +00:00
committed by GitHub
parent d8181fb169
commit c99f9a4834
38 changed files with 6130 additions and 425 deletions
+26 -4
View File
@@ -22,7 +22,8 @@
const std::unordered_map<std::string, GameTextVersion> sTextVerEnumMap = {
{"jak1-v1", GameTextVersion::JAK1_V1},
{"jak1-v2", GameTextVersion::JAK1_V2},
{"jak2", GameTextVersion::JAK2}};
{"jak2", GameTextVersion::JAK2},
{"jak3", GameTextVersion::JAK3}};
const std::string& get_text_version_name(GameTextVersion version) {
for (auto& [name, ver] : sTextVerEnumMap) {
@@ -261,7 +262,8 @@ bool GameTextFontBank::valid_char_range(const char in) const {
return ((in >= '0' && in <= '9') || (in >= 'A' && in <= 'Z') ||
m_passthrus->find(in) != m_passthrus->end()) &&
in != '\\';
} else if (m_version == GameTextVersion::JAK2) {
} else if (m_version == GameTextVersion::JAK2 || m_version == GameTextVersion::JAK3 ||
m_version == GameTextVersion::JAKX) {
return ((in >= '0' && in <= '9') || (in >= 'A' && in <= 'Z') || (in >= 'a' && in <= 'z') ||
m_passthrus->find(in) != m_passthrus->end()) &&
in != '\\';
@@ -913,7 +915,9 @@ GameTextFontBank g_font_bank_jak1_v2(GameTextVersion::JAK1_V2,
* GAME TEXT FONT BANK - JAK 2
* ================================
* This font is used in:
* - Jak 2 - NTSC - v1
* - Jak II
* - Jak II: Renegade
* - ジャックXダクスター2
*/
static std::unordered_set<char> s_passthrus_jak2 = {'~', ' ', ',', '.', '-', '+', '(', ')',
@@ -1904,6 +1908,21 @@ GameTextFontBank g_font_bank_jak2(GameTextVersion::JAK2,
&s_replace_info_jak2,
&s_passthrus_jak2);
/*!
* ================================
* GAME TEXT FONT BANK - JAK 3
* ================================
* This font is used in:
* - Jak 3
*/
// TODO cyrillic
GameTextFontBank g_font_bank_jak3(GameTextVersion::JAK3,
&s_encode_info_jak2,
&s_replace_info_jak2,
&s_passthrus_jak2);
/*!
* ========================
* GAME TEXT FONT BANK LIST
@@ -1914,7 +1933,8 @@ GameTextFontBank g_font_bank_jak2(GameTextVersion::JAK2,
std::map<GameTextVersion, GameTextFontBank*> g_font_banks = {
{GameTextVersion::JAK1_V1, &g_font_bank_jak1_v1},
{GameTextVersion::JAK1_V2, &g_font_bank_jak1_v2},
{GameTextVersion::JAK2, &g_font_bank_jak2}};
{GameTextVersion::JAK2, &g_font_bank_jak2},
{GameTextVersion::JAK3, &g_font_bank_jak3}};
const GameTextFontBank* get_font_bank(GameTextVersion version) {
return g_font_banks.at(version);
@@ -1927,6 +1947,8 @@ const GameTextFontBank* get_font_bank_from_game_version(GameVersion version) {
return get_font_bank(GameTextVersion::JAK1_V2);
case GameVersion::Jak2:
return get_font_bank(GameTextVersion::JAK2);
case GameVersion::Jak3:
return get_font_bank(GameTextVersion::JAK3);
default:
ASSERT_MSG(false, "Unsupported game for get_font_bank_from_game_version");
}
+13 -11
View File
@@ -3269,18 +3269,20 @@ goos::Object DefskelgroupElement::to_form_internal(const Env& env) const {
forms.push_back(
pretty_print::to_symbol(fmt::format(":light-index {}", m_static_info.light_index)));
}
if (m_static_info.global_effects != 0) {
forms.push_back(
pretty_print::to_symbol(fmt::format(":global-effects {}", m_static_info.global_effects)));
}
if (!m_static_info.clothing.empty()) {
std::vector<goos::Object> cloth_list;
forms.push_back(pretty_print::to_symbol(":clothing"));
for (const auto& p : m_static_info.clothing) {
auto macro = p.to_list(m_static_info.art_group_name + "-ag", env);
cloth_list.push_back(macro);
if (env.version != GameVersion::Jak2) {
if (m_static_info.global_effects != 0) {
forms.push_back(pretty_print::to_symbol(
fmt::format(":global-effects {}", m_static_info.global_effects)));
}
if (!m_static_info.clothing.empty()) {
std::vector<goos::Object> cloth_list;
forms.push_back(pretty_print::to_symbol(":clothing"));
for (const auto& p : m_static_info.clothing) {
auto macro = p.to_list(m_static_info.art_group_name + "-ag", env);
cloth_list.push_back(macro);
}
forms.push_back(pretty_print::build_list(cloth_list));
}
forms.push_back(pretty_print::build_list(cloth_list));
}
}
+93 -74
View File
@@ -2616,6 +2616,14 @@
(defenum sound-group
:bitfield #t
:type uint8
(sfx)
(music)
(dialog) ;; same as jak 1 dialog
(sog3)
(ambient)
(dialog2) ;; more dialog
(sog6)
(sog7)
)
(defenum sound-mask
@@ -2644,6 +2652,7 @@
(ss1 1) ;; id-is-playing
(ss4 4) ;; is-playing
(ss6 6) ;; id-is-playing
(ss9 9)
)
(deftype sound-stream-name (structure)
@@ -7527,7 +7536,7 @@
(level-method-18 () none) ;; 18 ;; (load-begin (_type_) _type_)
(level-method-19 () none) ;; 19 ;; (login-begin (_type_) _type_)
(level-method-20 () none) ;; 20 ;; (debug-print-region-splitbox (_type_ vector object) none)
(level-method-21 () none) ;; 21 ;; (get-art-group-by-name (_type_ string) art-group)
(get-art-group-by-name (_type_ string) art-group) ;; 21
(level-method-22 () none) ;; 22 ;; (level-method-22 (_type_ symbol) int)
(level-method-23 () none) ;; 23 ;; (lookup-text (_type_ text-id symbol) string)
(level-method-24 () none) ;; 24 ;; (level-method-24 () none)
@@ -10460,8 +10469,8 @@
(setting-control-method-14 (_type_ object) connectable) ;; 14
(remove-setting-by-arg0 (_type_ object) none) ;; 15
(set-setting-by-param (_type_ symbol object object object) connection) ;; 16
(setting-control-method-17 () none) ;; 17 ;; (apply-settings (_type_) user-setting-data)
(setting-control-method-18 () none) ;; 18 ;; (update (_type_) user-setting-data)
(apply-settings (_type_) user-setting-data) ;; 17
(update (_type_) user-setting-data) ;; 18
(setting-control-method-19 () none) ;; 19
)
)
@@ -14179,8 +14188,8 @@
:flag-assert #x1000000020
(:methods
(relocate (_type_ kheap (pointer uint8)) none :replace) ;; 7
(link-art-to-master (_type_) none)
(unknown-1 () none)
(link-art-to-master (_type_) art-group)
(unlink-art-to-master (_type_) int)
)
)
@@ -15882,10 +15891,10 @@
(load-state-method-14 () none) ;; 14 ;; (want-vis-level (_type_ symbol) none)
(load-state-method-15 () none) ;; 15 ;; (want-force-vis (_type_ symbol symbol) int)
(load-state-method-16 () none) ;; 16 ;; (want-force-inside (_type_ symbol symbol) none)
(load-state-method-17 () none) ;; 17 ;; (execute-commands-up-to (_type_ float) none)
(load-state-method-18 () none) ;; 18 ;; (backup-load-state-and-set-cmds (_type_ pair) int)
(load-state-method-19 () none) ;; 19 ;; (restore-load-state-and-cleanup (_type_) int)
(load-state-method-20 () none) ;; 20 ;; (restore-load-state (_type_) int)
(execute-commands-up-to (_type_ float) none) ;; 17
(backup-load-state-and-set-cmds (_type_ pair) int) ;; 18
(restore-load-state-and-cleanup (_type_) int) ;; 19
(restore-load-state (_type_) int) ;; 20
(load-state-method-21 () none) ;; 21 ;; (add-borrow-levels (_type_) none)
)
)
@@ -16322,6 +16331,7 @@
(fo-curve 2)
(fo-min 3)
(fo-max 4)
(volume 5)
)
;; ---gui-h:gui-connection-flags
@@ -16348,11 +16358,6 @@
;; field param1 uses ~A with a signed load. field param2 uses ~A with a signed load. field param3 uses ~A with a signed load.
)
;; (deftype gui-control (basic)
;; ()
;; :flag-assert #x1a00000d30
;; )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ambient-h ;;
@@ -27498,7 +27503,7 @@
(stream-name sound-stream-name 4 :inline :offset-assert 304) ;; guessed by decompiler
; (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read.
(stream-id sound-id 4 :offset-assert 496) ;; guessed by decompiler
; (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read.
(stream-id-signed int32 4 :offset 496) ;; guessed by decompiler
(music-register uint8 17 :offset 512) ;; guessed by decompiler
(music-excite int8 :offset 528)
(ramdisk-name uint8 16 :offset-assert 529)
@@ -29519,87 +29524,101 @@
;; loader ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#|
;; +++loader:spooler-flags
(defenum spooler-flags
:bitfield #t
:type uint32
(blackout-on-stall)
)
;; ---loader:spooler-flags
(deftype spooler-block (basic)
((anim spool-anim :offset-assert 4) ;; guessed by decompiler
(idle art-joint-anim :offset-assert 8) ;; guessed by decompiler
(exit art-joint-anim :offset-assert 12) ;; guessed by decompiler
(break-func (function process-drawable object) :offset-assert 16) ;; guessed by decompiler
(flags uint32 :offset-assert 20)
(flags spooler-flags :offset-assert 20)
(part int32 :offset-assert 24)
(part-audio-start float :offset-assert 28)
(old-status uint16 :offset-assert 32)
(old-pos int32 :offset-assert 36)
(good-time uint64 :offset-assert 40) ;; time-frame
(old-time uint64 :offset-assert 48) ;; time-frame
(good-time time-frame :offset-assert 40) ;; time-frame
(old-time time-frame :offset-assert 48) ;; time-frame
(good-count int32 :offset-assert 56)
(sid sound-id :offset-assert 60) ;; guessed by decompiler
(real-start-time uint64 :offset-assert 64) ;; time-frame
(real-start-time time-frame :offset-assert 64) ;; time-frame
(paused? symbol :offset-assert 72) ;; guessed by decompiler
)
:method-count-assert 9
:size-assert #x4c
:flag-assert #x90000004c
)
|#
#|
(deftype load-dir (basic)
((level basic :offset-assert 4)
(allocated-length uint32 :offset-assert 8)
;; copied from jak1.
((lev level :offset-assert 4)
(string-array (array string) :offset-assert 8) ;; these are the names
(data-array (array basic) :score -50 :offset-assert 12) ;; this is the file data.
)
:method-count-assert 11
:size-assert #x10
:flag-assert #xb00000010
;; Failed to read some fields.
(:methods
(new (symbol type) _type_) ;; 0 ;; (new (symbol type int level) _type_)
(load-dir-method-9 () none) ;; 9 ;; (load-to-heap-by-name (_type_ string symbol kheap int) art-group)
(load-dir-method-10 () none) ;; 10 ;; (set-loaded-art (_type_ art-group) art-group)
(new (symbol type int level) _type_) ;; 0
(load-to-heap-by-name (_type_ string symbol kheap int) art-group) ;; 9
(set-loaded-art (_type_ art-group) art-group) ;; 10
)
)
|#
#|
(deftype gui-control (basic)
((engine engine :offset-assert 4) ;; guessed by decompiler
(UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read.
(update-time time-frame :offset-assert 8)
(connections gui-connection 32 :inline :offset-assert 16)
(spool-connections gui-connection 4 :inline :offset-assert 1552)
(ids sound-id 96 :offset-assert 1744)
(times time-frame 96 :offset-assert 2128)
(cmd pair 96 :offset-assert 2896)
(group sound-group 96 :offset-assert 3280)
)
:method-count-assert 26
:size-assert #xd30
:flag-assert #x1a00000d30
(:methods
(new (symbol type) _type_) ;; 0 ;; (new (symbol type int) _type_)
(gui-control-method-9 () none) ;; 9 ;; (add-process (_type_ process gui-channel gui-action string float time-frame) sound-id)
(gui-control-method-10 () none) ;; 10 ;; (remove-process (_type_ process gui-channel) none)
(gui-control-method-11 () none) ;; 11 ;; (stop-str (_type_ gui-connection) int)
(gui-control-method-12 () none) ;; 12 ;; (gui-control-method-12 (_type_ process gui-channel gui-action string int float sound-id) sound-id)
(gui-control-method-13 () none) ;; 13 ;; (update (_type_ symbol) int)
(gui-control-method-14 () none) ;; 14 ;; (lookup-gui-connection-id (_type_ string gui-channel gui-action) sound-id)
(gui-control-method-15 () none) ;; 15 ;; (lookup-gui-connection (_type_ process gui-channel string sound-id) gui-connection)
(gui-control-method-16 () none) ;; 16 ;; (set-action! (_type_ gui-action sound-id gui-channel gui-action string (function gui-connection symbol) process) int)
(gui-control-method-17 () none) ;; 17 ;; (get-status (_type_ sound-id) gui-status)
(gui-control-method-18 () none) ;; 18 ;; (gui-control-method-18 (_type_ gui-channel) symbol)
(gui-control-method-19 () none) ;; 19 ;; (handle-command-list (_type_ gui-channel gui-connection) symbol)
(gui-control-method-20 () none) ;; 20 ;; (set-falloff! (_type_ sound-id symbol int int int) gui-connection)
(gui-control-method-21 () none) ;; 21 ;; (gui-control-method-21 (_type_ gui-connection vector) int)
(gui-control-method-22 () none) ;; 22 ;; (gui-control-method-22 (_type_ gui-connection process symbol) none)
(gui-control-method-23 () none) ;; 23 ;; (handle-command (_type_ gui-channel gui-channel symbol gui-connection) symbol)
(gui-control-method-24 () none) ;; 24 ;; (channel-id-set! (_type_ gui-connection sound-id) int)
(gui-control-method-25 () none) ;; 25
(new (symbol type int) _type_) ;; 0
(add-process (_type_ process gui-channel gui-action string float time-frame) sound-id) ;; 9
(remove-process (_type_ process gui-channel) int) ;; 10
(stop-str (_type_ gui-connection) int) ;; 11
(gui-control-method-12 (_type_ process gui-channel gui-action string int float sound-id) sound-id) ;; 12
(update (_type_ symbol) int) ;; 13
(lookup-gui-connection-id (_type_ string gui-channel gui-action) sound-id) ;; 14
(lookup-gui-connection (_type_ process gui-channel string sound-id) gui-connection) ;; 15
(set-action! (_type_ gui-action sound-id gui-channel gui-action string (function gui-connection symbol) process) int) ;; 16
(get-status (_type_ sound-id) gui-status) ;; 17 ;; (get-status (_type_ sound-id) gui-status)
(gui-control-method-18 (_type_ gui-channel) symbol) ;; 18
(handle-command-list (_type_ gui-channel gui-connection) symbol) ;; 19
(sound-params-set! (_type_ sound-id symbol int int int float) gui-connection) ;; 20
(gui-control-method-21 (_type_ gui-connection) int) ;; 21
(gui-control-method-22 (_type_ gui-connection vector) int) ;; 22
(update-connection (_type_ gui-connection process symbol) none) ;; 23
(handle-command (_type_ gui-channel gui-channel symbol gui-connection) symbol) ;; 24
(channel-id-set! (_type_ gui-connection sound-id) int) ;; 25
)
)
|#
;; (define-extern drawable-load function) ;; (function drawable kheap drawable)
;; (define-extern art-load function) ;; (function string kheap art)
;; (define-extern art-group-load-check function) ;; (function string kheap int art-group)
(define-extern drawable-load (function drawable kheap drawable))
(define-extern art-load (function string kheap art))
(define-extern art-group-load-check (function string kheap int art-group))
(define-extern external-art-buffer-init (function external-art-buffer int))
;; (define-extern *preload-spool-anims* object) ;; symbol
;; (define-extern ja-play-spooled-anim function) ;; (function spool-anim art-joint-anim art-joint-anim (function process-drawable symbol) int :behavior process-drawable)
;; (define-extern ja-abort-spooled-anim function) ;; (function spool-anim art-joint-anim int int :behavior process-drawable)
;; (define-extern *gui-control* object) ;; gui-control
;; (define-extern *art-control* object) ;; external-art-control
(define-extern *preload-spool-anims* symbol)
(define-extern ja-play-spooled-anim (function spool-anim art-joint-anim art-joint-anim (function process-drawable symbol) spooler-flags int :behavior process-drawable))
(define-extern ja-abort-spooled-anim (function spool-anim art-joint-anim int int :behavior process-drawable))
(define-extern *gui-control* gui-control)
(define-extern *art-control* external-art-control)
(define-extern *stack-top* pointer)
(define-extern *kernel-sp* pointer)
(define-extern loado (function string kheap object))
(define-extern link (function pointer pointer int kheap int pointer))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; game-info ;;
@@ -31905,20 +31924,20 @@
;; (define-extern process-drawable-error-print function)
;; (define-extern skeleton-group->draw-control function) ;; (function process-drawable skeleton-group (pointer cspace-array) draw-control)
;; (define-extern ja-group-in-array? function)
;; (define-extern ja-done? function) ;; (function int symbol :behavior process-drawable)
;; (define-extern ja-min? function) ;; (function int symbol :behavior process-drawable)
;; (define-extern ja-max? function) ;; (function int symbol :behavior process-drawable)
;; (define-extern ja-num-frames function) ;; (function int int :behavior process-drawable)
;; (define-extern ja-frame-num function) ;; (function int float :behavior process-drawable)
;; (define-extern ja-aframe-num function) ;; (function int float :behavior process-drawable)
;; (define-extern ja-aframe function) ;; (function float int float :behavior process-drawable)
;; (define-extern ja-speed function) ;; (function int float :behavior process-drawable)
;; (define-extern ja-step function) ;; (function int float :behavior process-drawable)
(define-extern ja-done? (function int symbol :behavior process-drawable))
(define-extern ja-min? (function int symbol :behavior process-drawable))
(define-extern ja-max? (function int symbol :behavior process-drawable))
(define-extern ja-num-frames (function int int :behavior process-drawable))
(define-extern ja-frame-num (function int float :behavior process-drawable))
(define-extern ja-aframe-num (function int float :behavior process-drawable))
(define-extern ja-aframe (function float int float :behavior process-drawable))
(define-extern ja-speed (function int float :behavior process-drawable))
(define-extern ja-step (function int float :behavior process-drawable))
;; (define-extern ja-rate function)
;; (define-extern ja-linear-vel function)
;; (define-extern ja-channel-set! function) ;; (function int int :behavior process-drawable)
;; (define-extern ja-channel-push! function) ;; (function int time-frame int :behavior process-drawable)
;; (define-extern ja-channel-float! function) ;; (function art-joint-anim float float float joint-control-channel :behavior process-drawable)
(define-extern ja-channel-set! (function int int :behavior process-drawable))
(define-extern ja-channel-push! (function int time-frame int :behavior process-drawable))
(define-extern ja-channel-float! (function art-joint-anim float float float joint-control-channel :behavior process-drawable))
(define-extern joint-control-reset! (function joint-control joint-control-channel none :behavior process-drawable))
;; (define-extern ja-group-size function) ;; (function int :behavior process-drawable)
;; (define-extern ja-eval function) ;; (function int :behavior process-drawable)
@@ -32091,7 +32110,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define-extern can-display-query? (function process string float symbol))
(define-extern talker-surpress! (function none))
(define-extern talker-surpress! (function int))
(define-extern talker-displayed? (function symbol))
(define-extern kill-current-talker (function symbol pair symbol none))
(define-extern string->talker-speech (function string talker-speech-class))
@@ -35743,10 +35762,10 @@
;; main ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; (define-extern set-letterbox-frames function) ;; (function time-frame none)
;; (define-extern letterbox function) ;; (function none)
;; (define-extern set-blackout-frames function) ;; (function time-frame none)
;; (define-extern blackout function) ;; (function none)
(define-extern set-letterbox-frames (function time-frame none))
(define-extern letterbox (function none))
(define-extern set-blackout-frames (function time-frame none))
(define-extern blackout (function none))
;; (define-extern add-blackout function)
(define-extern paused? (function symbol))
(define-extern movie? (function symbol))
+3 -3
View File
@@ -1,6 +1,6 @@
{
"game_version": 3,
"text_version": 20,
"text_version": 30,
"game_name": "jak3",
"expected_elf_name": "SCUS_973.30",
@@ -8,7 +8,7 @@
// if you want to filter to only some object names.
// it will make the decompiler much faster.
"allowed_objects": [],
"banned_objects": [],
"banned_objects": ["collide-shape", "spatial-hash", "entity"],
////////////////////////////
// CODE ANALYSIS OPTIONS
@@ -35,7 +35,7 @@
// unpack textures to assets folder
"process_tpages": true,
// unpack game text to assets folder
"process_game_text": false,
"process_game_text": true,
// unpack game count to assets folder
"process_game_count": false,
// write goal imports for art groups
+3 -1
View File
@@ -257,7 +257,9 @@
"bsp-camera-asm": [1, 2, 3, 4, 6, 7],
"level-remap-texture": [2, 3, 4, 5, 6],
"start-perf-stat-collection": [26],
"end-perf-stat-collection": [0]
"end-perf-stat-collection": [0],
"(method 23 gui-control)": [10, 46, 50, 58, 81, 90, 101]
},
// Sometimes the game might use format strings that are fetched dynamically,
@@ -66,7 +66,5 @@
["L303", "cloth-params"],
["L296", "cloth-params"]
],
"joint-mod": [
["L212", "(inline-array vector)", 3]
]
"joint-mod": [["L212", "(inline-array vector)", 3]]
}
@@ -95,5 +95,6 @@
"joint-mod-joint-set-world-handler": [
[32, "vector"],
[48, "vector"]
]
],
"(method 13 gui-control)": [[16, ["array", "sound-id", 4]]]
}
@@ -322,9 +322,6 @@
[15, "gp", "collide-shape-moving"],
[35, "gp", "collide-shape-moving"]
],
"joint-mod-rotate-world-callback": [
[[0, 24], "s3", "joint-mod-rotate-world"]
],
"joint-mod-set-local-callback": [[[1, 24], "v1", "joint-mod-set-local"]],
"joint-mod-add-local-callback": [[[1, 37], "s4", "joint-mod-add-local"]],
"joint-mod-set-world-callback": [[[1, 4], "v1", "joint-mod-set-local"]],
@@ -426,7 +423,6 @@
],
"ear-trans": [[32, "s5", "process-focusable"]],
"loader-test-command": [[[5, 10], "v1", "sound-rpc-test-cmd"]],
"(method 11 connection)": [[5, "a1", "pointer"]],
"update-light-hash": [
[[234, 239], "a1", "light-hash-bucket"],
[[207, 211], "a0", "light-hash-bucket"]
@@ -529,7 +525,6 @@
"texture-usage-init": [[27, "a1", "vector"]],
"(method 9 art)": [[9, "v1", "pointer"]],
"(code pov-camera-start-playing pov-camera)": [[24, "v0", "joint"]],
"(method 9 art)": [[9, "v1", "pointer"]],
"(method 9 art-mesh-geo)": [
[20, "s4", "(pointer int16)"],
[[14, 19], "a0", "drawable"],
@@ -649,5 +644,51 @@
[[78, 79], "a1", "drawable-tree-instance-tie"],
[123, "a1", "drawable-tree-instance-shrub"],
[[129, 133], "a2", "(inline-array prototype-bucket-shrub)"]
]
],
"drawable-load": [[16, "v0", "drawable"]],
"art-load": [[7, "v0", "art"]],
"art-group-load-check": [[21, "v0", "art-group"]],
"(method 9 external-art-control)": [
[[170, 191], "s4", "external-art-buffer"]
],
"(method 11 external-art-control)": [[19, "s5", "process-drawable"]],
"(method 15 gui-control)": [
[13, "s1", "gui-connection"],
[36, "s1", "gui-connection"],
[43, "s1", "gui-connection"],
[8, "s1", "gui-connection"]
],
"(method 14 gui-control)": [[[7, 41], "s2", "gui-connection"]],
"(method 13 gui-control)": [
[64, "s3", "gui-connection"],
[71, "s3", "gui-connection"]
],
"(method 17 gui-control)": [
[[45, 262], "gp", "gui-connection"],
[13, "v1", "gui-connection"]
],
"(method 16 gui-control)": [[[19, 118], "s1", "gui-connection"]],
"(method 9 gui-control)": [
[131, "v1", "gui-connection"],
[17, "v1", "gui-connection"],
[24, "v1", "gui-connection"],
[[115, 125], "v1", "gui-connection"],
[129, "v1", "gui-connection"],
[127, "a0", "gui-connection"]
],
"(method 10 gui-control)": [[[9, 32], "s3", "gui-connection"]],
"(method 12 gui-control)": [
[128, "v1", "gui-connection"],
[177, "v1", "process-drawable"],
[214, "v1", "gui-connection"]
],
"(method 22 gui-control)": [[54, "v1", "process-drawable"]],
"(method 21 gui-control)": [
[28, "v1", "process-drawable"],
[31, "v1", "process-drawable"],
[45, "s4", "process-drawable"],
[48, "s4", "process-drawable"],
[5, "v0", "sound-rpc-set-param"]
],
"(method 23 gui-control)": [[285, "v0", "sound-rpc-set-param"]]
}
+66 -221
View File
@@ -889,7 +889,7 @@
"args": ["maxlen-out"]
},
"str-play-async": {
"args": ["name", "id", "chunk-idx", "group"]
"args": ["name", "id", "volume", "group"]
},
"str-play-stop": {
"args": ["name", "id"]
@@ -1174,8 +1174,8 @@
"vars": {
"v0-0": ["this", "align-control"]
}
},
"flatten-joint-control-to-spr": {
},
"flatten-joint-control-to-spr": {
"args": ["jc"],
"vars": {
"s5-0": "chan-count",
@@ -1201,13 +1201,13 @@
"s0-0": "last-frame",
"v1-20": "upload"
}
},
"matrix-from-joint-anim-frame": {
"args": ["jacc", "joint-idx", "frame-idx"],
"vars": {
"v1-1": "fixed-matrix",
"v0-0": "frame-matrix"
}
},
"matrix-from-joint-anim-frame": {
"args": ["jacc", "joint-idx", "frame-idx"],
"vars": {
"v1-1": "fixed-matrix",
"v0-0": "frame-matrix"
}
},
"matrix-from-control-channel!": {
"args": ["dest-mat", "requested-joint", "chan"],
@@ -1222,60 +1222,29 @@
}
},
"joint-anim-login": {
"args": [
"jad"
]
"args": ["jad"]
},
"joint-anim-inspect-elt": {
"args": [
"ja",
"frame"
]
"args": ["ja", "frame"]
},
"jacc-mem-usage": {
"args": [
"jacc",
"mem-block",
"flags"
]
"args": ["jacc", "mem-block", "flags"]
},
"joint-control-cleanup": {
"args": [
"jc",
"heap",
"ja"
]
"args": ["jc", "heap", "ja"]
},
"joint-control-channel-eval": {
"args": [
"jcc"
]
"args": ["jcc"]
},
"joint-control-channel-eval!": {
"args": [
"jcc",
"num-func"
]
"args": ["jcc", "num-func"]
},
"joint-control-channel-group-eval!": {
"args": [
"jcc",
"ja",
"num-func"
]
},
"joint-control-channel-group!": {
// "args": [
// "jcc",
// "ja",
// "num-func"
// ]
"args": ["jcc", "ja", "num-func"]
},
"joint-control-channel-group!": {},
"joint-control-copy!": {
"args": [
"dst",
"src"
]
"args": ["dst", "src"]
},
"joint-control-remap!": {
"args": [
@@ -1288,146 +1257,70 @@
]
},
"matrix-from-control-pair!": {
"args": [
"matrix-to-modify",
"jcc",
"jnt",
"active-frame-interp"
]
"args": ["matrix-to-modify", "jcc", "jnt", "active-frame-interp"]
},
"matrix-from-control!": {
"args": [
"mat-stack",
"jnt",
"jc",
"mode"
]
"args": ["mat-stack", "jnt", "jc", "mode"]
},
"cspace<-cspace!": {
"args": [
"dst",
"src"
]
"args": ["dst", "src"]
},
"cspace<-cspace-normalized!": {
"args": [
"dst",
"src"
]
"args": ["dst", "src"]
},
"cspace<-parent-joint!": {
"args": [
"dst",
"proc",
"parent-idx"
]
"args": ["dst", "proc", "parent-idx"]
},
"cspace<-rot-yxy!": {
"args": [
"dst",
"src"
]
"args": ["dst", "src"]
},
"cspace<-transform-yxy!": {
"args": [
"dst",
"src"
]
"args": ["dst", "src"]
},
"cspace<-transformq!": {
"args": [
"dst",
"src"
]
"args": ["dst", "src"]
},
"cspace<-transformq+trans!": {
"args": [
"dst",
"src",
"extra-trans"
]
"args": ["dst", "src", "extra-trans"]
},
"cspace<-transformq+world-trans!": {
"args": [
"dst",
"src",
"extra-trans"
]
"args": ["dst", "src", "extra-trans"]
},
"cspace<-transformq+rot-offset!": {
"args": [
"dst",
"src",
"extra-rot"
]
"args": ["dst", "src", "extra-rot"]
},
"cspace-calc-total-matrix!": {
"args": [
"csp",
"dst"
]
"args": ["csp", "dst"]
},
"cspace<-matrix-no-push-joint!": {
"args": [
"dst",
"jc"
]
"args": ["dst", "jc"]
},
"cspace<-matrix-joint!": {
"args": [
"dst",
"src"
]
"args": ["dst", "src"]
},
"cspace<-parented-matrix-joint!": {
"args": [
"dst",
"joint-mat"
]
"args": ["dst", "joint-mat"]
},
"cspace<-parented-matrix-mirror!": {
"args": [
"dst",
"joint-mat"
]
"args": ["dst", "joint-mat"]
},
"cspace<-parented-matrix-joint-flip-z!": {
"args": [
"dst",
"joint-mat"
]
"args": ["dst", "joint-mat"]
},
"cspace<-matrix-joint-flip-z!": {
"args": [
"dst",
"src"
]
"args": ["dst", "src"]
},
"cspace<-parented-transformq-joint!": {
"args": [
"dst",
"joint-transformq"
]
"args": ["dst", "joint-transformq"]
},
"cspace<-parented-transformq-joint-flip-z!": {
"args": [
"dst",
"joint-transformq"
]
"args": ["dst", "joint-transformq"]
},
"create-interpolated-joint-animation-frame": {
"args": [
"dst",
"num-joints",
"jc"
]
"args": ["dst", "num-joints", "jc"]
},
"create-interpolated2-joint-animation-frame": {
"args": [
"dst",
"num-joints",
"jc"
]
"args": ["dst", "num-joints", "jc"]
},
"(method 37 cloth-system)": {
"args": ["this", "command"],
@@ -1488,104 +1381,56 @@
}
},
"(method 9 joint-mod-polar-look-at)": {
"args": [
"this",
"proc",
"joint-id"
]
"args": ["this", "proc", "joint-id"]
},
"(method 10 joint-mod-polar-look-at)": {
"args": [
"this",
"pos"
]
"args": ["this", "pos"]
},
"(method 11 joint-mod-polar-look-at)": {
"args": [
"this",
"other",
"pos"
]
"args": ["this", "other", "pos"]
},
"(method 12 joint-mod-polar-look-at)": {
"args": [
"this",
"duration",
"final-val",
"restart-if-in-progress"
]
"args": ["this", "duration", "final-val", "restart-if-in-progress"]
},
"(method 13 joint-mod-polar-look-at)": {
"args": [
"this",
"duration",
"restart-if-in-progress"
]
"args": ["this", "duration", "restart-if-in-progress"]
},
"(method 0 joint-mod-ik)": {
"args": [
"allocation",
"type-to-make",
"proc",
"joint-id",
"hand-dist"
]
"args": ["allocation", "type-to-make", "proc", "joint-id", "hand-dist"]
},
"(method 9 joint-mod-ik)": {
"args": [
"this",
"pos"
]
"args": ["this", "pos"]
},
"(method 10 joint-mod-ik)": {
"args": [
"this",
"enable"
]
"args": ["this", "enable"]
},
"(method 0 joint-mod)": {
"args": [
"allocation",
"type-to-make",
"mode",
"proc",
"base-joint-id"
]
"args": ["allocation", "type-to-make", "mode", "proc", "base-joint-id"]
},
"(method 9 joint-mod)": {
"args": [
"this",
"mode"
]
"args": ["this", "mode"]
},
"(method 10 joint-mod)": {
"args": [
"this",
"pos"
]
"args": ["this", "pos"]
},
"(method 11 joint-mod)": {
"args": [
"this",
"target",
"mode",
"proc"
]
"args": ["this", "target", "mode", "proc"]
},
"(method 13 joint-mod)": {
"args": [
"thix",
"x",
"y",
"z"
]
"args": ["this", "x", "y", "z"]
},
"(method 14 joint-mod)": {
"args": [
"this",
"trans",
"quat",
"scale"
]
"args": ["this", "trans", "quat", "scale"]
},
"(method 13 gui-control)": {
"vars": {
"s3-0": ["con-i-0", "gui-connection"],
"a0-33": ["con-i-1", "gui-connection"]
}
},
"(method 10 gui-control)": {
"vars": {
"s3-0": ["con-i-0", "gui-connection"]
}
}
}
@@ -21,6 +21,7 @@
)
;; ---talker-flags
(define-extern talker-surpress! (function int))
;; DECOMP BEGINS
+5 -5
View File
@@ -663,18 +663,18 @@
(none)
)
(defmethod twist-set! ((thix joint-mod) (x float) (y float) (z float))
(defmethod twist-set! ((this joint-mod) (x float) (y float) (z float))
"Set twist x,y,z. A value of #f will skip the set."
(if x
(set! (-> thix twist x) x)
(set! (-> this twist x) x)
)
(if y
(set! (-> thix twist y) y)
(set! (-> this twist y) y)
)
(if z
(set! (-> thix twist z) z)
(set! (-> this twist z) z)
)
(-> thix twist)
(-> this twist)
)
(defmethod trs-set! ((this joint-mod) (trans vector) (quat quaternion) (scale vector))
+2 -2
View File
@@ -200,8 +200,8 @@ actor, like the mesh, animations, shadow mesh, skeleton, etc."
)
(:methods
(relocate (_type_ kheap (pointer uint8)) none :replace)
(link-art-to-master (_type_) none)
(unknown-1 () none)
(link-art-to-master (_type_) art-group)
(unlink-art-to-master (_type_) int)
)
)
+4 -4
View File
@@ -244,10 +244,10 @@
(load-state-method-14 () none)
(load-state-method-15 () none)
(load-state-method-16 () none)
(load-state-method-17 () none)
(load-state-method-18 () none)
(load-state-method-19 () none)
(load-state-method-20 () none)
(execute-commands-up-to (_type_ float) none)
(backup-load-state-and-set-cmds (_type_ pair) int)
(restore-load-state-and-cleanup (_type_) int)
(restore-load-state (_type_) int)
(load-state-method-21 () none)
)
)
+2
View File
@@ -7,6 +7,8 @@
(declare-type debug-menu-context basic)
(define-extern movie? (function symbol))
(define-extern paused? (function symbol))
(define-extern set-blackout-frames (function time-frame none))
;; +++main-h:collide-spec
(defenum collide-spec
+2 -2
View File
@@ -447,8 +447,8 @@
(setting-control-method-14 (_type_ object) connectable)
(remove-setting-by-arg0 (_type_ object) none)
(set-setting-by-param (_type_ symbol object object object) connection)
(setting-control-method-17 () none)
(setting-control-method-18 () none)
(apply-settings (_type_) user-setting-data)
(update (_type_) user-setting-data)
(setting-control-method-19 () none)
)
)
+1 -1
View File
@@ -306,7 +306,7 @@
(level-method-18 () none)
(level-method-19 () none)
(level-method-20 () none)
(level-method-21 () none)
(get-art-group-by-name (_type_ string) art-group)
(level-method-22 () none)
(level-method-23 () none)
(level-method-24 () none)
+2 -2
View File
@@ -120,7 +120,7 @@
(none)
)
(defun str-play-async ((name string) (id sound-id) (chunk-idx int) (group int))
(defun str-play-async ((name string) (id sound-id) (volume int) (group int))
"Start playing a streaming audio."
(set! *que-str-lock* #t)
(let ((s2-0 (the-as play-chunk-msg (add-element *play-str-rpc*))))
@@ -132,7 +132,7 @@
(set! (-> s2-0 id 1) (the-as uint 0))
(set! (-> s2-0 id 2) (the-as uint 0))
(set! (-> s2-0 id 3) (the-as uint 0))
(set! (-> s2-0 section) (the-as uint chunk-idx))
(set! (-> s2-0 section) (the-as uint volume))
(set! (-> s2-0 maxlen) (the-as uint 0))
(set! (-> s2-0 group) (the-as uint group))
(set! (-> s2-0 result) (the-as uint 0))
File diff suppressed because it is too large Load Diff
@@ -10,6 +10,11 @@
(define-extern joint-control-reset! (function joint-control joint-control-channel none :behavior process-drawable))
(define-extern sleep-code (function symbol :behavior process))
(define-extern vector<-matrix! (function vector matrix vector))
(define-extern ja-channel-push! (function int time-frame int :behavior process-drawable))
(define-extern ja-channel-set! (function int int :behavior process-drawable))
(define-extern ja-aframe-num (function int float :behavior process-drawable))
(define-extern ja-frame-num (function int float :behavior process-drawable))
(define-extern ja-aframe (function float int float :behavior process-drawable))
;; DECOMP BEGINS
+9
View File
@@ -63,6 +63,14 @@
(defenum sound-group
:bitfield #t
:type uint8
(sfx)
(music)
(dialog) ;; same as jak 1 dialog
(sog3)
(ambient)
(dialog2) ;; more dialog
(sog6)
(sog7)
)
(defenum sound-mask
@@ -91,6 +99,7 @@
(ss1 1) ;; id-is-playing
(ss4 4) ;; is-playing
(ss6 6) ;; id-is-playing
(ss9 9)
)
(defmacro static-sound-name (str)
+31 -30
View File
@@ -47,36 +47,37 @@
)
(deftype sound-iop-info (structure)
((frame uint32)
(strpos int32)
(str-id uint32)
(str-id-sign int32 :overlay-at str-id)
(freemem uint32)
(chinfo uint8 48)
(freemem2 uint32)
(nocd uint32)
(dirtycd uint32)
(diskspeed uint32 2)
(lastspeed uint32)
(dupseg int32)
(times int32 41)
(times-seq uint32)
(iop-ticks uint32)
(stream-position uint32 4 :offset 272)
(stream-status stream-status 4)
(stream-name sound-stream-name 4 :inline)
(stream-id sound-id 4)
(music-register uint8 17 :offset 512)
(music-excite int8 :overlay-at (-> music-register 16))
(ramdisk-name uint8 16)
(sound-bank0 uint8 16 :offset 592)
(sound-bank1 uint8 16)
(sound-bank2 uint8 16)
(sound-bank3 uint8 16)
(sound-bank4 uint8 16)
(sound-bank5 uint8 16)
(sound-bank6 uint8 16)
(sound-bank7 uint8 16)
((frame uint32)
(strpos int32)
(str-id uint32)
(str-id-sign int32 :overlay-at str-id)
(freemem uint32)
(chinfo uint8 48)
(freemem2 uint32)
(nocd uint32)
(dirtycd uint32)
(diskspeed uint32 2)
(lastspeed uint32)
(dupseg int32)
(times int32 41)
(times-seq uint32)
(iop-ticks uint32)
(stream-position uint32 4 :offset 272)
(stream-status stream-status 4)
(stream-name sound-stream-name 4 :inline)
(stream-id sound-id 4)
(stream-id-signed int32 4 :overlay-at (-> stream-id 0))
(music-register uint8 17 :offset 512)
(music-excite int8 :overlay-at (-> music-register 16))
(ramdisk-name uint8 16)
(sound-bank0 uint8 16 :offset 592)
(sound-bank1 uint8 16)
(sound-bank2 uint8 16)
(sound-bank3 uint8 16)
(sound-bank4 uint8 16)
(sound-bank5 uint8 16)
(sound-bank6 uint8 16)
(sound-bank7 uint8 16)
)
)
+34 -1
View File
@@ -14,6 +14,7 @@
(fo-curve 2)
(fo-min 3)
(fo-max 4)
(volume 5)
)
;; ---gui-connection-flags
@@ -133,4 +134,36 @@
)
;; type gui-control is defined here, but it is unknown to the decompiler
(deftype gui-control (basic)
((engine engine)
(update-time time-frame)
(connections gui-connection 32 :inline)
(spool-connections gui-connection 4 :inline)
(ids sound-id 96)
(times time-frame 96)
(cmd pair 96)
(group sound-group 96)
)
(:methods
(new (symbol type int) _type_)
(add-process (_type_ process gui-channel gui-action string float time-frame) sound-id)
(remove-process (_type_ process gui-channel) int)
(stop-str (_type_ gui-connection) int)
(gui-control-method-12 (_type_ process gui-channel gui-action string int float sound-id) sound-id)
(update (_type_ symbol) int)
(lookup-gui-connection-id (_type_ string gui-channel gui-action) sound-id)
(lookup-gui-connection (_type_ process gui-channel string sound-id) gui-connection)
(set-action! (_type_ gui-action sound-id gui-channel gui-action string (function gui-connection symbol) process) int)
(get-status (_type_ sound-id) gui-status)
(gui-control-method-18 (_type_ gui-channel) symbol)
(handle-command-list (_type_ gui-channel gui-connection) symbol)
(sound-params-set! (_type_ sound-id symbol int int int float) gui-connection)
(gui-control-method-21 (_type_ gui-connection) int)
(gui-control-method-22 (_type_ gui-connection vector) int)
(update-connection (_type_ gui-connection process symbol) none)
(handle-command (_type_ gui-channel gui-channel symbol gui-connection) symbol)
(channel-id-set! (_type_ gui-connection sound-id) int)
)
)
(define-extern *gui-control* gui-control)
+4
View File
@@ -0,0 +1,4 @@
@echo off
cd ..\..
out\build\Release\bin\decompiler decompiler\config\jak3\jak3_config.jsonc iso_data\ decompiler_out\ --version ntsc_v1
pause
+4
View File
@@ -0,0 +1,4 @@
@echo off
cd ..\..
out\build\Release\bin\decompiler decompiler\config\jak3\jak3_config.jsonc iso_data\ decompiler_out\ --version pal
pause
+6
View File
@@ -0,0 +1,6 @@
@echo off
cd ..\..
task set-game-jak3
task set-decomp-ntscv1
task extract
pause
+4
View File
@@ -0,0 +1,4 @@
@echo off
cd ..\..
out\build\Release\bin\goalc --user-auto --game jak3
pause
+4
View File
@@ -0,0 +1,4 @@
@echo off
cd ..\..
out\build\Release\bin\gk -v --no-display --game jak3 -- -fakeiso -debug
pause
@@ -0,0 +1,6 @@
@echo off
cd ..\..
out\build\Release\bin\offline-test -d --iso_data_path iso_data\jak3\ --game jak3
python3 scripts\update_decomp_reference.py failures\ test\decompiler\reference\ --game jak3
RMDIR /Q/S failures
pause
+4
View File
@@ -0,0 +1,4 @@
@echo off
cd ..\..
out\build\Release\bin\goalc-test --gtest_filter="Jak3TypeConsistency.TypeConsistency"
pause
+129
View File
@@ -997,4 +997,133 @@
(.ftoi.vf ,dst temp)
)
)
)
(defmacro ja-group (&key (chan 0))
"get the frame group for self. default channel is 0, the base channel. returns #f if no frame group."
`(if (> (-> self skel active-channels) ,chan)
(-> self skel root-channel ,chan frame-group))
)
(defmacro ja (&key (chan 0)
&key (group! #f)
&key (num! #f)
&key (param0 #f)
&key (param1 #f)
&key (num-func #f)
&key (frame-num #f)
&key (frame-interp #f)
&key (dist #f)
&key (eval? #t)
)
"set various joint anim parameters for self and eval them.
you can use this for playing animations!
chan = the channel to modify. defaults to 0 (base channel). this is usually what you want.
group! = when not #f, set this as the new frame-group. defaults to #f
num! = set the frame playback function. this is what determines what frame an animation is at. funcs below.
#f = no func will be set, and there wont be a frame eval.
num-func = sets the num-func field for the channel. this lets you change the function with eval'ing.
param0 = 1st parameter for the playback function. ONLY USE THESE WITH num-func !!
param1 = 2nd parameter for the playback function. ONLY USE THESE WITH num-func !!
frame-num = set the frame-num field.
frame-interp = set the frame-interp field.
dist = set the dist field.
available num! functions:
- (+!) = advance anim.
- (-!) = reverse anim.
- (identity num) = play 'num' frame.
- (seek! target speed) = animate towards frame target at a speed.
speed is optional and defaults to 1.0 when not provided.
target is optional and defaults to the last frame of the animation.
if you want to set the speed, you therefore must also set the target.
target can be max (no quote), which is just the same as the default value.
- (loop! speed) = loop animation at a speed. default speed is 1.0 when not provided.
- (chan channel) = copy frame from another channel.
- min = the start of the animation.
- max = the end of the animation.
- zero = frame zero.
"
(let* ((num-args (if (pair? num!) (cdr num!) '()))
(num! (if (pair? num!) (car num!) num!))
(nf (cond
((or (eq? num! 'identity)
(eq? num! 'min)
(eq? num! 'max)
(eq? num! 'zero))
'num-func-identity)
((eq? num! 'none) 'num-func-none)
((eq? num! '+!) 'num-func-+!)
((eq? num! '-!) 'num-func--!)
((eq? num! 'seek!) 'num-func-seek!)
((eq? num! 'loop!) 'num-func-loop!)
((eq? num! 'blend-in!) 'num-func-blend-in!)
((eq? num! 'chan) 'num-func-chan)
))
(p0 (if param0 param0
(cond
((eq? num! 'chan) `(the float ,(car num-args)))
((eq? num! '+!) (if (null? num-args) 1.0 (car num-args)))
((eq? num! '-!) (if (null? num-args) 1.0 (car num-args)))
((eq? num! 'loop!) (if (null? num-args) 1.0 (if (eq? 'max (car num-args))
(if group!
`(the float (1- (-> (the art-joint-anim ,group!) frames num-frames)))
`(the float (1- (-> ja-ch frame-group frames num-frames)))
)
(car num-args))))
((eq? num! 'seek!) (if (or (null? num-args) (eq? (car num-args) 'max))
(if group!
`(the float (1- (-> (the art-joint-anim ,group!) frames num-frames)))
`(the float (1- (-> ja-ch frame-group frames num-frames)))
)
(car num-args)))
)))
(p1 (if param1 param1
(cond
((eq? num! 'seek!) (if (or (null? num-args) (null? (cdr num-args))) 1.0 (cadr num-args)))
)))
(frame-num (cond
((eq? 'max frame-num) (if group!
`(the float (1- (-> (the art-joint-anim ,group!) frames num-frames)))
`(the float (1- (-> ja-ch frame-group frames num-frames)))
))
((eq? 'zero frame-num) 0)
(#t frame-num)))
(frame-group (if (or p0 p1 frame-num (not nf)) group! #f))
)
`(let ((ja-ch (-> self skel root-channel ,chan)))
,(if frame-interp `(set! (-> ja-ch frame-interp) ,frame-interp) `(none))
,(if dist `(set! (-> ja-ch dist) ,dist) `(none))
,(if frame-group `(set! (-> ja-ch frame-group) (the art-joint-anim ,frame-group)) `(none))
,(if p0 `(set! (-> ja-ch param 0) ,p0) `(none))
,(if p1 `(set! (-> ja-ch param 1) ,p1) `(none))
,(if num-func `(set! (-> ja-ch num-func) ,num-func) `(none))
,(if frame-num `(set! (-> ja-ch frame-num) ,frame-num) `(none))
,(if nf
`(,(if eval? 'joint-control-channel-group-eval! 'joint-control-channel-group!)
ja-ch (the art-joint-anim ,group!) ,nf)
`(none))
,(cond
((eq? num! 'min) `(set! (-> ja-ch frame-num) 0.0))
((eq? num! 'max) (if group!
`(set! (-> ja-ch frame-num) (the float (1- (-> (the art-joint-anim ,group!) frames num-frames))))
`(set! (-> ja-ch frame-num) (the float (1- (-> ja-ch frame-group frames num-frames))))
))
((eq? num! 'identity) `(set! (-> ja-ch frame-num) ,(car num-args)))
(#t `(none))
)
))
)
(defmacro ja-no-eval (&key (chan 0)
&key (group! #f)
&key (num! #f)
&key (param0 #f)
&key (param1 #f)
&key (num-func #f)
&key (frame-num #f)
&key (frame-interp #f)
&key (dist #f)
)
`(ja :eval? #f :chan ,chan :group! ,group! :num! ,num! :param0 ,param0 :param1 ,param1 :num-func ,num-func :frame-num ,frame-num :frame-interp ,frame-interp :dist ,dist)
)
+5 -9
View File
@@ -666,18 +666,18 @@
)
;; definition for method 13 of type joint-mod
(defmethod twist-set! ((thix joint-mod) (x float) (y float) (z float))
(defmethod twist-set! ((this joint-mod) (x float) (y float) (z float))
"Set twist x,y,z. A value of #f will skip the set."
(if x
(set! (-> thix twist x) x)
(set! (-> this twist x) x)
)
(if y
(set! (-> thix twist y) y)
(set! (-> this twist y) y)
)
(if z
(set! (-> thix twist z) z)
(set! (-> this twist z) z)
)
(-> thix twist)
(-> this twist)
)
;; definition for method 14 of type joint-mod
@@ -1610,7 +1610,3 @@
0
(none)
)
+2 -2
View File
@@ -327,8 +327,8 @@ actor, like the mesh, animations, shadow mesh, skeleton, etc."
)
(:methods
(relocate (_type_ kheap (pointer uint8)) none :replace)
(link-art-to-master (_type_) none)
(unknown-1 () none)
(link-art-to-master (_type_) art-group)
(unlink-art-to-master (_type_) int)
)
)
+4 -4
View File
@@ -142,10 +142,10 @@
(load-state-method-14 () none)
(load-state-method-15 () none)
(load-state-method-16 () none)
(load-state-method-17 () none)
(load-state-method-18 () none)
(load-state-method-19 () none)
(load-state-method-20 () none)
(execute-commands-up-to (_type_ float) none)
(backup-load-state-and-set-cmds (_type_ pair) int)
(restore-load-state-and-cleanup (_type_) int)
(restore-load-state (_type_) int)
(load-state-method-21 () none)
)
)
+2 -2
View File
@@ -631,8 +631,8 @@
(setting-control-method-14 (_type_ object) connectable)
(remove-setting-by-arg0 (_type_ object) none)
(set-setting-by-param (_type_ symbol object object object) connection)
(setting-control-method-17 () none)
(setting-control-method-18 () none)
(apply-settings (_type_) user-setting-data)
(update (_type_) user-setting-data)
(setting-control-method-19 () none)
)
)
+1 -1
View File
@@ -446,7 +446,7 @@
(level-method-18 () none)
(level-method-19 () none)
(level-method-20 () none)
(level-method-21 () none)
(get-art-group-by-name (_type_ string) art-group)
(level-method-22 () none)
(level-method-23 () none)
(level-method-24 () none)
+2 -2
View File
@@ -162,7 +162,7 @@
;; definition for function str-play-async
;; WARN: Return type mismatch int vs none.
(defun str-play-async ((name string) (id sound-id) (chunk-idx int) (group int))
(defun str-play-async ((name string) (id sound-id) (volume int) (group int))
"Start playing a streaming audio."
(set! *que-str-lock* #t)
(let ((s2-0 (the-as play-chunk-msg (add-element *play-str-rpc*))))
@@ -174,7 +174,7 @@
(set! (-> s2-0 id 1) (the-as uint 0))
(set! (-> s2-0 id 2) (the-as uint 0))
(set! (-> s2-0 id 3) (the-as uint 0))
(set! (-> s2-0 section) (the-as uint chunk-idx))
(set! (-> s2-0 section) (the-as uint volume))
(set! (-> s2-0 maxlen) (the-as uint 0))
(set! (-> s2-0 group) (the-as uint group))
(set! (-> s2-0 result) (the-as uint 0))
File diff suppressed because it is too large Load Diff
+31 -34
View File
@@ -71,36 +71,37 @@
;; definition of type sound-iop-info
(deftype sound-iop-info (structure)
((frame uint32)
(strpos int32)
(str-id uint32)
(str-id-sign int32 :overlay-at str-id)
(freemem uint32)
(chinfo uint8 48)
(freemem2 uint32)
(nocd uint32)
(dirtycd uint32)
(diskspeed uint32 2)
(lastspeed uint32)
(dupseg int32)
(times int32 41)
(times-seq uint32)
(iop-ticks uint32)
(stream-position uint32 4 :offset 272)
(stream-status stream-status 4)
(stream-name sound-stream-name 4 :inline)
(stream-id sound-id 4)
(music-register uint8 17 :offset 512)
(music-excite int8 :overlay-at (-> music-register 16))
(ramdisk-name uint8 16)
(sound-bank0 uint8 16 :offset 592)
(sound-bank1 uint8 16)
(sound-bank2 uint8 16)
(sound-bank3 uint8 16)
(sound-bank4 uint8 16)
(sound-bank5 uint8 16)
(sound-bank6 uint8 16)
(sound-bank7 uint8 16)
((frame uint32)
(strpos int32)
(str-id uint32)
(str-id-sign int32 :overlay-at str-id)
(freemem uint32)
(chinfo uint8 48)
(freemem2 uint32)
(nocd uint32)
(dirtycd uint32)
(diskspeed uint32 2)
(lastspeed uint32)
(dupseg int32)
(times int32 41)
(times-seq uint32)
(iop-ticks uint32)
(stream-position uint32 4 :offset 272)
(stream-status stream-status 4)
(stream-name sound-stream-name 4 :inline)
(stream-id sound-id 4)
(stream-id-signed int32 4 :overlay-at (-> stream-id 0))
(music-register uint8 17 :offset 512)
(music-excite int8 :overlay-at (-> music-register 16))
(ramdisk-name uint8 16)
(sound-bank0 uint8 16 :offset 592)
(sound-bank1 uint8 16)
(sound-bank2 uint8 16)
(sound-bank3 uint8 16)
(sound-bank4 uint8 16)
(sound-bank5 uint8 16)
(sound-bank6 uint8 16)
(sound-bank7 uint8 16)
)
)
@@ -1479,7 +1480,3 @@
0
(none)
)