Add ObjVec pattern
This commit is contained in:
		
							parent
							
								
									74c7da7bdf
								
							
						
					
					
						commit
						523f94206b
					
				|  | @ -36,7 +36,7 @@ | |||
| - [X] MAPISRC | ||||
| - [X] MissionEAX | ||||
| - [X] MultiBrush | ||||
| - [ ] ObjVec | ||||
| - [X] ObjVec | ||||
| - [X] OBJ_MAP | ||||
| - [ ] PHYS_SYSTEM | ||||
| - [ ] PLAYER | ||||
|  |  | |||
|  | @ -31,6 +31,7 @@ | |||
| #include "db_files/chunks/Mission_GameSysEAX.hexpat" | ||||
| #include "db_files/chunks/MultiBrush.hexpat" | ||||
| #include "db_files/chunks/OBJ_MAP.hexpat" | ||||
| #include "db_files/chunks/ObjVec.hexpat" | ||||
| #include "db_files/chunks/P$_.hexpat" | ||||
| #include "db_files/chunks/Relations.hexpat" | ||||
| #include "db_files/chunks/RENDPARAMS.hexpat" | ||||
|  |  | |||
|  | @ -70,6 +70,7 @@ struct TOCEntry { | |||
|         ("MissionEAX"): Chunk<AccousticsProperty> mission_eax @ offset; | ||||
|         ("MultiBrush"): Chunk<MultiBrush> multibrush @ offset; | ||||
|         ("OBJ_MAP"): Chunk<ObjMap> obj_map @ offset; | ||||
|         ("ObjVec"): Chunk<ObjVec> obj_vec @ offset; | ||||
|         ("Relations"): Chunk<Relations> relations @ offset; | ||||
|         ("RENDPARAMS"): Chunk<RendParams> rend_params @ offset; | ||||
|         ("ROOM_DB"): Chunk<RoomDb> room_db @ offset; | ||||
|  | @ -92,10 +93,13 @@ struct TOCEntry { | |||
|             // if (std::string::starts_with(name, "LD$")) { | ||||
|             //     std::print("LD: {}", name); | ||||
|             // } | ||||
|             if (std::string::starts_with(name, "L$")) { | ||||
|             else if (std::string::starts_with(name, "L$")) { | ||||
|                 Chunk<LinkMap> link_chunk @ offset [[name(name)]]; | ||||
|                 // std::print("L: {}", name); | ||||
|             } | ||||
|             else { | ||||
|                 std::print("Didn't load chunk: {}", name); | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| }; | ||||
|  |  | |||
|  | @ -0,0 +1,8 @@ | |||
| #pragma once | ||||
| 
 | ||||
| struct ObjVec { | ||||
|     s32 min_id; | ||||
|     s32 max_id; | ||||
|     s32 byte_count = (max_id - min_id) / 8; | ||||
|     u8 bitmap[byte_count] [[comment("Each bit indicates whether that ID is being used.")]]; | ||||
| }; | ||||
		Loading…
	
		Reference in New Issue