From aaa68d2ebcb732d7d18af1a41a292c50182e7fd5 Mon Sep 17 00:00:00 2001 From: Lywx Date: Fri, 22 Mar 2024 09:59:49 -0600 Subject: Cleanup (#49) * Auto debug info generation and some cleanup * Cleaned dry code from segments * Fixed gCurrentCompressionType bss bs --- src/factories/Vec3fFactory.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'src/factories/Vec3fFactory.cpp') diff --git a/src/factories/Vec3fFactory.cpp b/src/factories/Vec3fFactory.cpp index 41b7bfb..ab8f7f3 100644 --- a/src/factories/Vec3fFactory.cpp +++ b/src/factories/Vec3fFactory.cpp @@ -37,20 +37,11 @@ ExportResult Vec3fCodeExporter::Export(std::ostream &write, std::shared_ptr(node, "offset"); auto vecData = std::static_pointer_cast(raw); - auto off = offset; - int i; - - if(IS_SEGMENTED(off)) { - off = SEGMENT_OFFSET(off); - } - if (Companion::Instance->IsDebug()) { - write << "// 0x" << std::uppercase << std::hex << off << "\n"; - } + int i = 0; write << "Vec3f " << symbol << "[] = {"; int cols = 120 / (3 * vecData->mMaxWidth + 8); - i = 0; for(Vec3f v : vecData->mVecs) { if((i++ % cols) == 0) { write << "\n" << fourSpaceTab; @@ -64,7 +55,7 @@ ExportResult Vec3fCodeExporter::Export(std::ostream &write, std::shared_ptrmVecs.size() << " Vec3fs\n"; } - return (IS_SEGMENTED(off) ? SEGMENT_OFFSET(off) : off) + vecData->mVecs.size() * sizeof(Vec3f); + return offset + vecData->mVecs.size() * sizeof(Vec3f); } ExportResult Vec3fBinaryExporter::Export(std::ostream &write, std::shared_ptr raw, std::string& entryName, YAML::Node &node, std::string* replacement ) { -- cgit v1.2.3