From 06bf24a606d5330c4af283cc1dc16b051ec54fd8 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 8 Feb 2018 23:28:30 +1100 Subject: [PATCH] pcb_reader dumps hierachyId now spawning objects has never been more fun! --- src/tools/pcb_reader/lgb.h | 3 ++- src/tools/pcb_reader/main.cpp | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/tools/pcb_reader/lgb.h b/src/tools/pcb_reader/lgb.h index 7a9b7bdc..c90572b3 100644 --- a/src/tools/pcb_reader/lgb.h +++ b/src/tools/pcb_reader/lgb.h @@ -174,7 +174,8 @@ public: struct LGB_EOBJ_HEADER : public LGB_ENTRY_HEADER { uint32_t eobjId; - uint8_t unknown1[0x10]; + uint32_t levelHierachyId; + uint8_t unknown1[0xC]; }; class LGB_EOBJ_ENTRY : public LGB_ENTRY diff --git a/src/tools/pcb_reader/main.cpp b/src/tools/pcb_reader/main.cpp index 83d66887..7b639d07 100644 --- a/src/tools/pcb_reader/main.cpp +++ b/src/tools/pcb_reader/main.cpp @@ -236,6 +236,7 @@ void writeEobjEntry( std::ofstream& out, LGB_ENTRY* pObj ) uint32_t id; std::string name; std::string typeStr; + uint32_t eobjlevelHierachyId = 0; if( pObj->getType() == LgbEntryType::EventObject ) { @@ -243,6 +244,7 @@ void writeEobjEntry( std::ofstream& out, LGB_ENTRY* pObj ) id = pEobj->header.eobjId; name = eobjNameMap[id]; typeStr = eobjStr; + eobjlevelHierachyId = pEobj->header.levelHierachyId; } else if( pObj->getType() == LgbEntryType::MapRange ) { @@ -253,7 +255,8 @@ void writeEobjEntry( std::ofstream& out, LGB_ENTRY* pObj ) std::string outStr( std::to_string( id ) + ", " + typeStr + "\"" + name + "\", " + - std::to_string( pObj->header.translation.x ) + ", " + std::to_string( pObj->header.translation.y ) + ", " + std::to_string( pObj->header.translation.z ) + "\n" + std::to_string( pObj->header.translation.x ) + ", " + std::to_string( pObj->header.translation.y ) + ", " + std::to_string( pObj->header.translation.z ) + + ", " + std::to_string( eobjlevelHierachyId ) + "\n" ); out.write( outStr.c_str(), outStr.size() ); }