@@ -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+
74102std::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 commit comments