From 4c2f5ed0325fca06a461a08d30e5d8cf2ae8303d Mon Sep 17 00:00:00 2001 From: Misa Date: Tue, 30 Jun 2020 15:27:57 -0700 Subject: [PATCH] Add binaryBlob::getExtra() This needs to be done because m_headers is a private member of binaryBlob. --- desktop_version/src/BinaryBlob.cpp | 16 ++++++++++++++++ desktop_version/src/BinaryBlob.h | 4 ++++ 2 files changed, 20 insertions(+) diff --git a/desktop_version/src/BinaryBlob.cpp b/desktop_version/src/BinaryBlob.cpp index c46c5261..f099ad21 100644 --- a/desktop_version/src/BinaryBlob.cpp +++ b/desktop_version/src/BinaryBlob.cpp @@ -173,3 +173,19 @@ char* binaryBlob::getAddress(int _index) { return m_memblocks[_index]; } + +std::vector binaryBlob::getExtra() +{ + std::vector result; + for (int i = 0; i < 128; i += 1) + { + if (m_headers[i].valid +#define FOREACH_TRACK(track_name) && strcmp(m_headers[i].name, track_name) != 0 + TRACK_NAMES +#undef FOREACH_TRACK + ) { + result.push_back(i); + } + } + return result; +} diff --git a/desktop_version/src/BinaryBlob.h b/desktop_version/src/BinaryBlob.h index 50137bbc..b2e933c9 100644 --- a/desktop_version/src/BinaryBlob.h +++ b/desktop_version/src/BinaryBlob.h @@ -1,6 +1,8 @@ #ifndef BINARYBLOB_H #define BINARYBLOB_H +#include + /* Laaaazyyyyyyy -flibit */ // #define VVV_COMPILEMUSIC @@ -47,6 +49,8 @@ public: int getSize(int _index); + std::vector getExtra(); + char* getAddress(int _index); void clear();