Skip to content

Commit

Permalink
add hatkids sky for custom level fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dallmeyer committed Sep 21, 2024
1 parent 19b237d commit 1ec3d31
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions custom_assets/jak1/levels/test-zone/testzone.gd
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
"plat-eco-ag.go"
"test-actor-ag.go"
"babak-ag.go"
"tpage-401.go" ;; for sky (make sure that your level's mood is updating the sky texture)
"test-zone.go"
))
29 changes: 29 additions & 0 deletions goalc/build_level/jak1/LevelFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,34 @@ size_t generate_u32_array(const std::vector<u32>& array, DataObjectGenerator& ge
return result;
}

size_t generate_adgif_shader_array(DataObjectGenerator& gen) {
gen.align_to_basic();
gen.add_type_tag("adgif-shader-array");
static std::vector<u32> words = {
0x9, 0x9, 0x0, 0x0, 0x0, 0x306, 0x0, 0x120, 0x0, 0x19100414, 0x0, 0x0,
0x0, 0x34, 0x0, 0x0, 0x0, 0x8, 0x0, 0x44, 0x0, 0x42, 0x0, 0x0,
0x0, 0x306, 0x0, 0x120, 0x0, 0x19100514, 0x0, 0x0, 0x0, 0x34, 0x0, 0x0,
0x0, 0x8, 0x0, 0x44, 0x0, 0x42, 0x0, 0x0, 0x0, 0x306, 0x0, 0x120,
0x0, 0x19100614, 0x0, 0x0, 0x0, 0x34, 0x0, 0x0, 0x0, 0x8, 0x0, 0x44,
0x0, 0x42, 0x0, 0x0, 0x0, 0x306, 0x0, 0x120, 0x0, 0x19100714, 0x0, 0x0,
0x0, 0x34, 0x0, 0x0, 0x0, 0x8, 0x0, 0x44, 0x0, 0x42, 0x0, 0x0,
0x0, 0x306, 0x0, 0x120, 0x0, 0x19100814, 0x0, 0x0, 0x0, 0x34, 0x0, 0x0,
0x0, 0x8, 0x0, 0x44, 0x0, 0x42, 0x0, 0x0, 0x0, 0x306, 0x0, 0x120,
0x0, 0x19100914, 0x0, 0x0, 0x0, 0x34, 0x0, 0x0, 0x0, 0x8, 0x0, 0x44,
0x0, 0x42, 0x0, 0x0, 0x0, 0x306, 0x0, 0x120, 0x0, 0x19100a14, 0x0, 0x0,
0x0, 0x34, 0x0, 0x0, 0x0, 0x8, 0x0, 0x44, 0x0, 0x42, 0x0, 0x0,
0x0, 0x306, 0x0, 0x120, 0x0, 0x19100b14, 0x0, 0x0, 0x0, 0x34, 0x0, 0x0,
0x0, 0x8, 0x0, 0x44, 0x0, 0x42, 0x0, 0x0, 0x0, 0x306, 0x0, 0x120,
0x0, 0x19100314, 0x0, 0x0, 0x0, 0x34, 0x0, 0x0, 0x0, 0x8, 0x0, 0x44,
0x0, 0x42, 0x0,
};
size_t result = gen.current_offset_bytes();
for (auto& word : words) {
gen.add_word(word);
}
return result;
}

std::vector<u8> LevelFile::save_object_file() const {
DataObjectGenerator gen;
gen.add_type_tag("bsp-header");
Expand Down Expand Up @@ -117,6 +145,7 @@ std::vector<u8> LevelFile::save_object_file() const {
//(unk-data-4 float :offset-assert 160)
//(unk-data-5 float :offset-assert 164)
//(adgifs adgif-shader-array :offset-assert 168)
gen.link_word_to_byte(168 / 4, generate_adgif_shader_array(gen));
//(actor-birth-order (pointer uint32) :offset-assert 172)
gen.link_word_to_byte(172 / 4, generate_u32_array(actor_birth_order, gen));
//(split-box-indices (pointer uint16) :offset-assert 176)
Expand Down
Binary file modified out/build/Release/bin/decompiler.exe
Binary file not shown.
Binary file modified out/build/Release/bin/extractor.exe
Binary file not shown.
Binary file modified out/build/Release/bin/gk.exe
Binary file not shown.
Binary file modified out/build/Release/bin/goalc.exe
Binary file not shown.

0 comments on commit 1ec3d31

Please sign in to comment.