Skip to content

Commit e0e303c

Browse files
committed
add hatkids sky for custom level fix
1 parent 399f577 commit e0e303c

File tree

6 files changed

+30
-0
lines changed

6 files changed

+30
-0
lines changed

custom_assets/jak1/levels/test-zone/testzone.gd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
"plat-eco-ag.go"
1111
"test-actor-ag.go"
1212
"babak-ag.go"
13+
"tpage-401.go" ;; for sky (make sure that your level's mood is updating the sky texture)
1314
"test-zone.go"
1415
))

goalc/build_level/jak1/LevelFile.cpp

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,34 @@ size_t generate_u32_array(const std::vector<u32>& array, DataObjectGenerator& ge
7171
return result;
7272
}
7373

74+
size_t generate_adgif_shader_array(DataObjectGenerator& gen) {
75+
gen.align_to_basic();
76+
gen.add_type_tag("adgif-shader-array");
77+
static std::vector<u32> words = {
78+
0x9, 0x9, 0x0, 0x0, 0x0, 0x306, 0x0, 0x120, 0x0, 0x19100414, 0x0, 0x0,
79+
0x0, 0x34, 0x0, 0x0, 0x0, 0x8, 0x0, 0x44, 0x0, 0x42, 0x0, 0x0,
80+
0x0, 0x306, 0x0, 0x120, 0x0, 0x19100514, 0x0, 0x0, 0x0, 0x34, 0x0, 0x0,
81+
0x0, 0x8, 0x0, 0x44, 0x0, 0x42, 0x0, 0x0, 0x0, 0x306, 0x0, 0x120,
82+
0x0, 0x19100614, 0x0, 0x0, 0x0, 0x34, 0x0, 0x0, 0x0, 0x8, 0x0, 0x44,
83+
0x0, 0x42, 0x0, 0x0, 0x0, 0x306, 0x0, 0x120, 0x0, 0x19100714, 0x0, 0x0,
84+
0x0, 0x34, 0x0, 0x0, 0x0, 0x8, 0x0, 0x44, 0x0, 0x42, 0x0, 0x0,
85+
0x0, 0x306, 0x0, 0x120, 0x0, 0x19100814, 0x0, 0x0, 0x0, 0x34, 0x0, 0x0,
86+
0x0, 0x8, 0x0, 0x44, 0x0, 0x42, 0x0, 0x0, 0x0, 0x306, 0x0, 0x120,
87+
0x0, 0x19100914, 0x0, 0x0, 0x0, 0x34, 0x0, 0x0, 0x0, 0x8, 0x0, 0x44,
88+
0x0, 0x42, 0x0, 0x0, 0x0, 0x306, 0x0, 0x120, 0x0, 0x19100a14, 0x0, 0x0,
89+
0x0, 0x34, 0x0, 0x0, 0x0, 0x8, 0x0, 0x44, 0x0, 0x42, 0x0, 0x0,
90+
0x0, 0x306, 0x0, 0x120, 0x0, 0x19100b14, 0x0, 0x0, 0x0, 0x34, 0x0, 0x0,
91+
0x0, 0x8, 0x0, 0x44, 0x0, 0x42, 0x0, 0x0, 0x0, 0x306, 0x0, 0x120,
92+
0x0, 0x19100314, 0x0, 0x0, 0x0, 0x34, 0x0, 0x0, 0x0, 0x8, 0x0, 0x44,
93+
0x0, 0x42, 0x0,
94+
};
95+
size_t result = gen.current_offset_bytes();
96+
for (auto& word : words) {
97+
gen.add_word(word);
98+
}
99+
return result;
100+
}
101+
74102
std::vector<u8> LevelFile::save_object_file() const {
75103
DataObjectGenerator gen;
76104
gen.add_type_tag("bsp-header");
@@ -117,6 +145,7 @@ std::vector<u8> LevelFile::save_object_file() const {
117145
//(unk-data-4 float :offset-assert 160)
118146
//(unk-data-5 float :offset-assert 164)
119147
//(adgifs adgif-shader-array :offset-assert 168)
148+
gen.link_word_to_byte(168 / 4, generate_adgif_shader_array(gen));
120149
//(actor-birth-order (pointer uint32) :offset-assert 172)
121150
gen.link_word_to_byte(172 / 4, generate_u32_array(actor_birth_order, gen));
122151
//(split-box-indices (pointer uint16) :offset-assert 176)
0 Bytes
Binary file not shown.
2 KB
Binary file not shown.

out/build/Release/bin/gk.exe

0 Bytes
Binary file not shown.

out/build/Release/bin/goalc.exe

1.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)