Skip to content

Commit

Permalink
[jak3] fix some flag names and a wcar crash (#3498)
Browse files Browse the repository at this point in the history
  • Loading branch information
ManDude authored May 1, 2024
1 parent cbf75a9 commit 5705359
Show file tree
Hide file tree
Showing 45 changed files with 646 additions and 776 deletions.
49 changes: 24 additions & 25 deletions decompiler/config/jak3/all-types.gc
Original file line number Diff line number Diff line change
Expand Up @@ -10786,8 +10786,8 @@
(darkjak-smack 41)
(darkjak-bomb0 42)
(darkjak-bomb1 43)
(feature44 44)
(feature45 45)
(darkjak-tracking 44)
(darkjak-invinc 45)
(lightjak 46)
(lightjak-regen 47)
(lightjak-swoop 48)
Expand Down Expand Up @@ -16986,7 +16986,6 @@
)

;; +++game-info-h:continue-flags
;; TODO copied from jak 2
(defenum continue-flags
:type uint32
:bitfield #t
Expand All @@ -16996,32 +16995,32 @@
(no-auto 3)
(no-blackout 4)
(game-start 5)
(demo-end 6)
(grab)
(warp-gate 7)
(demo 8)
(intro 9)
(hero-mode 10)
(demo-movie 11)
(darkjak)
(title 12)
(title-movie 13)
(continue-flag-14 14)
(copy-entity-pos 15)
(continue-flag-16 16)
(test 17)
(record-path 18)
(pilot 19)
(pilot-dax 20)
(record-sig 21)
(indax 22)
(cf23 23)
(cf24 24)
(cf25 25)
(cf26 26)
(cf27 27)
(cf28 28)
(cf29 29)
(cf30 30)
(cf31 31)
(test)
(nothing-apparently 17)
(race 18)
(credits)
(indax)
(mech)
(continue-flag-22 22)
(flut 23)
(flut-racer 24)
(vehicle 25)
(vehicle-movie 26)
(indax-hang 27)
(flut-fight 28)
(htorpedo 29)
(vehicle-scorpion 30)
(lightjak 31)
)
;; ---game-info-h:continue-flags

Expand Down Expand Up @@ -23226,15 +23225,15 @@
:bitfield #t
:type uint32
(force-on)
(endless-dark)
(active)
(smack)
(bomb0)
(bomb1)
(tracking)
(invinc)
(giant)
(invis)
(no-anim)
(disable-force-on)
(ds8 8)
(ds9 9)
)
;; ---target-h:darkjak-stage

Expand Down
11 changes: 5 additions & 6 deletions decompiler/config/jak3/ntsc_v1/stack_structures.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -1113,11 +1113,11 @@
"(method 199 wvehicle)": [[16, "wvehicle-stack-type3"]],
"(method 169 wcar-snake-base)": [[16, "wcar-proj-init-by-other-params"]],
"(method 79 wcar-snake-base)": [
[16, ["inline-array", "quaternion", 2]],
[16, ["inline-array", "quaternion", 3]],
[64, "wcar-stack-type1"]
],
"(method 79 v-turtle)": [
[16, ["inline-array", "quaternion", 2]],
[16, ["inline-array", "quaternion", 3]],
[64, "wvehicle-physics-work"],
[128, "wvehicle-jmod-work"]
],
Expand Down Expand Up @@ -1155,7 +1155,7 @@
],
"(method 24 w-parking-spot)": [[16, "cquery-with-5vec"]],
"(method 79 v-scorpion)": [
[32, ["inline-array", "quaternion", 2]],
[32, ["inline-array", "quaternion", 3]],
[16, "vector"],
[80, "wvehicle-physics-work"]
],
Expand All @@ -1170,9 +1170,8 @@
"(method 169 v-rhino)": [[16, "wcar-rhino-proj-params"]],
"(method 169 v-mirage)": [[16, "wcar-toad-stack-var0"]],
"(method 79 v-rhino)": [
[16, ["inline-array", "quaternion", 2]],
[48, ["inline-array", "quaternion", 1]],
[64, ["inline-array", "quaternion", 2]]
[16, ["inline-array", "quaternion", 3]],
[64, ["inline-array", "quaternion", 3]]
],
"(method 17 turret-control)": [[16, "turret-control-stack-var0"]],
"(method 9 turret-control)": [
Expand Down
5 changes: 5 additions & 0 deletions decompiler/level_extractor/extract_level.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,11 @@ level_tools::BspHeader extract_bsp_from_level(const ObjectFileDB& db,
bsp_header.read_from_file(bsp_file.linked_data, db.dts, &draw_stats, db.version());
ASSERT((int)bsp_header.drawable_tree_array.trees.size() == bsp_header.drawable_tree_array.length);

if (db.version() == GameVersion::Jak1 && dgo_name == "TIT.DGO" && bsp_header.name == "intro") {
// grrr.....
bsp_header.name = "title";
}

/*
level_tools::PrintSettings settings;
settings.expand_collide = true;
Expand Down
4 changes: 4 additions & 0 deletions game/overlord/jak2/srpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,10 @@ void* RPC_Player(unsigned int /*fno*/, void* data, int size) {
case Jak2SoundCommand::set_fps: {
gFPS = cmd->fps.fps;
} break;
case Jak2SoundCommand::cancel_dgo: {
// temporary. here just so we don't assert.
lg::error("RPC Player dgo cancel command received");
} break;
default:
ASSERT_MSG(false, fmt::format("Unhandled RPC Player command {}", int(cmd->j2command)));
}
Expand Down
3 changes: 3 additions & 0 deletions goal_src/jak1/engine/level/level.gc
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@
(else
(load-dbg "bsp relocate: ~A~%" this)
;; everything is okay, link the bsp and level.
;; og:preserve-this fix bad filename.
(when (= (-> s5-0 name) 'title)
(set! (-> this name) 'title))
(set! (-> s5-0 bsp) this)
(set! (-> this level) s5-0)
this
Expand Down
2 changes: 1 addition & 1 deletion goal_src/jak3/engine/debug/bug-report.gc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
(new 'static 'continue-point
:name "wasall-start"
:level #f
:flags (continue-flags continue-flag-16)
:flags (continue-flags test)
:trans (new 'static 'vector :x 9283373.0 :y 126422.22 :z 1057314.9 :w 1.0)
:camera-trans (new 'static 'vector :x 9272728.0 :y 147014.05 :z 1009150.4 :w 1.0)
:quat (new 'static 'vector4h :data (new 'static 'array int16 4 -36 #x5dfc 22 #x56de))
Expand Down
Loading

0 comments on commit 5705359

Please sign in to comment.