Skip to content

Commit 5705359

Browse files
authored
[jak3] fix some flag names and a wcar crash (#3498)
1 parent cbf75a9 commit 5705359

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+646
-776
lines changed

decompiler/config/jak3/all-types.gc

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10786,8 +10786,8 @@
1078610786
(darkjak-smack 41)
1078710787
(darkjak-bomb0 42)
1078810788
(darkjak-bomb1 43)
10789-
(feature44 44)
10790-
(feature45 45)
10789+
(darkjak-tracking 44)
10790+
(darkjak-invinc 45)
1079110791
(lightjak 46)
1079210792
(lightjak-regen 47)
1079310793
(lightjak-swoop 48)
@@ -16986,7 +16986,6 @@
1698616986
)
1698716987

1698816988
;; +++game-info-h:continue-flags
16989-
;; TODO copied from jak 2
1699016989
(defenum continue-flags
1699116990
:type uint32
1699216991
:bitfield #t
@@ -16996,32 +16995,32 @@
1699616995
(no-auto 3)
1699716996
(no-blackout 4)
1699816997
(game-start 5)
16999-
(demo-end 6)
16998+
(grab)
1700016999
(warp-gate 7)
1700117000
(demo 8)
1700217001
(intro 9)
1700317002
(hero-mode 10)
17004-
(demo-movie 11)
17003+
(darkjak)
1700517004
(title 12)
1700617005
(title-movie 13)
1700717006
(continue-flag-14 14)
1700817007
(copy-entity-pos 15)
17009-
(continue-flag-16 16)
17010-
(test 17)
17011-
(record-path 18)
17012-
(pilot 19)
17013-
(pilot-dax 20)
17014-
(record-sig 21)
17015-
(indax 22)
17016-
(cf23 23)
17017-
(cf24 24)
17018-
(cf25 25)
17019-
(cf26 26)
17020-
(cf27 27)
17021-
(cf28 28)
17022-
(cf29 29)
17023-
(cf30 30)
17024-
(cf31 31)
17008+
(test)
17009+
(nothing-apparently 17)
17010+
(race 18)
17011+
(credits)
17012+
(indax)
17013+
(mech)
17014+
(continue-flag-22 22)
17015+
(flut 23)
17016+
(flut-racer 24)
17017+
(vehicle 25)
17018+
(vehicle-movie 26)
17019+
(indax-hang 27)
17020+
(flut-fight 28)
17021+
(htorpedo 29)
17022+
(vehicle-scorpion 30)
17023+
(lightjak 31)
1702517024
)
1702617025
;; ---game-info-h:continue-flags
1702717026

@@ -23226,15 +23225,15 @@
2322623225
:bitfield #t
2322723226
:type uint32
2322823227
(force-on)
23228+
(endless-dark)
2322923229
(active)
23230+
(smack)
2323023231
(bomb0)
2323123232
(bomb1)
23233+
(tracking)
2323223234
(invinc)
23233-
(giant)
23235+
(invis)
2323423236
(no-anim)
23235-
(disable-force-on)
23236-
(ds8 8)
23237-
(ds9 9)
2323823237
)
2323923238
;; ---target-h:darkjak-stage
2324023239

decompiler/config/jak3/ntsc_v1/stack_structures.jsonc

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,11 +1113,11 @@
11131113
"(method 199 wvehicle)": [[16, "wvehicle-stack-type3"]],
11141114
"(method 169 wcar-snake-base)": [[16, "wcar-proj-init-by-other-params"]],
11151115
"(method 79 wcar-snake-base)": [
1116-
[16, ["inline-array", "quaternion", 2]],
1116+
[16, ["inline-array", "quaternion", 3]],
11171117
[64, "wcar-stack-type1"]
11181118
],
11191119
"(method 79 v-turtle)": [
1120-
[16, ["inline-array", "quaternion", 2]],
1120+
[16, ["inline-array", "quaternion", 3]],
11211121
[64, "wvehicle-physics-work"],
11221122
[128, "wvehicle-jmod-work"]
11231123
],
@@ -1155,7 +1155,7 @@
11551155
],
11561156
"(method 24 w-parking-spot)": [[16, "cquery-with-5vec"]],
11571157
"(method 79 v-scorpion)": [
1158-
[32, ["inline-array", "quaternion", 2]],
1158+
[32, ["inline-array", "quaternion", 3]],
11591159
[16, "vector"],
11601160
[80, "wvehicle-physics-work"]
11611161
],
@@ -1170,9 +1170,8 @@
11701170
"(method 169 v-rhino)": [[16, "wcar-rhino-proj-params"]],
11711171
"(method 169 v-mirage)": [[16, "wcar-toad-stack-var0"]],
11721172
"(method 79 v-rhino)": [
1173-
[16, ["inline-array", "quaternion", 2]],
1174-
[48, ["inline-array", "quaternion", 1]],
1175-
[64, ["inline-array", "quaternion", 2]]
1173+
[16, ["inline-array", "quaternion", 3]],
1174+
[64, ["inline-array", "quaternion", 3]]
11761175
],
11771176
"(method 17 turret-control)": [[16, "turret-control-stack-var0"]],
11781177
"(method 9 turret-control)": [

decompiler/level_extractor/extract_level.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,11 @@ level_tools::BspHeader extract_bsp_from_level(const ObjectFileDB& db,
180180
bsp_header.read_from_file(bsp_file.linked_data, db.dts, &draw_stats, db.version());
181181
ASSERT((int)bsp_header.drawable_tree_array.trees.size() == bsp_header.drawable_tree_array.length);
182182

183+
if (db.version() == GameVersion::Jak1 && dgo_name == "TIT.DGO" && bsp_header.name == "intro") {
184+
// grrr.....
185+
bsp_header.name = "title";
186+
}
187+
183188
/*
184189
level_tools::PrintSettings settings;
185190
settings.expand_collide = true;

game/overlord/jak2/srpc.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,10 @@ void* RPC_Player(unsigned int /*fno*/, void* data, int size) {
365365
case Jak2SoundCommand::set_fps: {
366366
gFPS = cmd->fps.fps;
367367
} break;
368+
case Jak2SoundCommand::cancel_dgo: {
369+
// temporary. here just so we don't assert.
370+
lg::error("RPC Player dgo cancel command received");
371+
} break;
368372
default:
369373
ASSERT_MSG(false, fmt::format("Unhandled RPC Player command {}", int(cmd->j2command)));
370374
}

goal_src/jak1/engine/level/level.gc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@
141141
(else
142142
(load-dbg "bsp relocate: ~A~%" this)
143143
;; everything is okay, link the bsp and level.
144+
;; og:preserve-this fix bad filename.
145+
(when (= (-> s5-0 name) 'title)
146+
(set! (-> this name) 'title))
144147
(set! (-> s5-0 bsp) this)
145148
(set! (-> this level) s5-0)
146149
this

goal_src/jak3/engine/debug/bug-report.gc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
(new 'static 'continue-point
1919
:name "wasall-start"
2020
:level #f
21-
:flags (continue-flags continue-flag-16)
21+
:flags (continue-flags test)
2222
:trans (new 'static 'vector :x 9283373.0 :y 126422.22 :z 1057314.9 :w 1.0)
2323
:camera-trans (new 'static 'vector :x 9272728.0 :y 147014.05 :z 1009150.4 :w 1.0)
2424
:quat (new 'static 'vector4h :data (new 'static 'array int16 4 -36 #x5dfc 22 #x56de))

0 commit comments

Comments
 (0)