2020-01-01 21:29:24 +01:00
|
|
|
#ifndef BINARYBLOB_H
|
|
|
|
#define BINARYBLOB_H
|
|
|
|
|
2021-02-18 08:48:41 +01:00
|
|
|
#include <stddef.h>
|
2020-07-01 00:27:57 +02:00
|
|
|
|
2020-01-01 21:29:24 +01:00
|
|
|
/* Laaaazyyyyyyy -flibit */
|
|
|
|
// #define VVV_COMPILEMUSIC
|
|
|
|
|
2021-02-16 01:38:10 +01:00
|
|
|
#define TRACK_NAMES(blob) \
|
2021-09-07 03:56:39 +02:00
|
|
|
FOREACH_TRACK(blob, "music/0levelcomplete.ogg") \
|
|
|
|
FOREACH_TRACK(blob, "music/1pushingonwards.ogg") \
|
|
|
|
FOREACH_TRACK(blob, "music/2positiveforce.ogg") \
|
|
|
|
FOREACH_TRACK(blob, "music/3potentialforanything.ogg") \
|
|
|
|
FOREACH_TRACK(blob, "music/4passionforexploring.ogg") \
|
|
|
|
FOREACH_TRACK(blob, "music/5intermission.ogg") \
|
|
|
|
FOREACH_TRACK(blob, "music/6presentingvvvvvv.ogg") \
|
|
|
|
FOREACH_TRACK(blob, "music/7gamecomplete.ogg") \
|
|
|
|
FOREACH_TRACK(blob, "music/8predestinedfate.ogg") \
|
|
|
|
FOREACH_TRACK(blob, "music/9positiveforcereversed.ogg") \
|
|
|
|
FOREACH_TRACK(blob, "music/10popularpotpourri.ogg") \
|
|
|
|
FOREACH_TRACK(blob, "music/11pipedream.ogg") \
|
|
|
|
FOREACH_TRACK(blob, "music/12pressurecooker.ogg") \
|
|
|
|
FOREACH_TRACK(blob, "music/13pacedenergy.ogg") \
|
|
|
|
FOREACH_TRACK(blob, "music/14piercingthesky.ogg") \
|
|
|
|
FOREACH_TRACK(blob, "music/predestinedfatefinallevel.ogg")
|
2020-07-01 00:17:02 +02:00
|
|
|
|
2020-01-01 21:29:24 +01:00
|
|
|
struct resourceheader
|
|
|
|
{
|
2021-09-07 03:56:39 +02:00
|
|
|
char name[48];
|
|
|
|
int start_UNUSED;
|
|
|
|
int size;
|
|
|
|
bool valid;
|
2020-01-01 21:29:24 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
class binaryBlob
|
|
|
|
{
|
|
|
|
public:
|
2021-09-07 03:56:39 +02:00
|
|
|
binaryBlob(void);
|
2020-01-01 21:29:24 +01:00
|
|
|
|
|
|
|
#ifdef VVV_COMPILEMUSIC
|
2021-09-07 03:56:39 +02:00
|
|
|
void AddFileToBinaryBlob(const char* _path);
|
2020-01-01 21:29:24 +01:00
|
|
|
|
2021-09-07 03:56:39 +02:00
|
|
|
void writeBinaryBlob(const char* _name);
|
2020-01-01 21:29:24 +01:00
|
|
|
#endif
|
|
|
|
|
2021-09-07 03:56:39 +02:00
|
|
|
bool unPackBinary(const char* _name);
|
2020-01-01 21:29:24 +01:00
|
|
|
|
2021-09-07 03:56:39 +02:00
|
|
|
int getIndex(const char* _name);
|
2020-01-01 21:29:24 +01:00
|
|
|
|
2021-09-07 03:56:39 +02:00
|
|
|
int getSize(int _index);
|
2020-01-01 21:29:24 +01:00
|
|
|
|
2021-09-07 03:56:39 +02:00
|
|
|
bool nextExtra(size_t* start);
|
2020-07-01 00:27:57 +02:00
|
|
|
|
2021-09-07 03:56:39 +02:00
|
|
|
char* getAddress(int _index);
|
2020-01-01 21:29:24 +01:00
|
|
|
|
2021-09-07 03:56:39 +02:00
|
|
|
void clear(void);
|
2020-06-07 22:11:35 +02:00
|
|
|
|
2021-09-07 03:56:39 +02:00
|
|
|
static const int max_headers = 128;
|
2020-08-14 11:02:16 +02:00
|
|
|
|
2021-09-07 03:56:39 +02:00
|
|
|
int numberofHeaders;
|
|
|
|
resourceheader m_headers[max_headers];
|
|
|
|
char* m_memblocks[max_headers];
|
2020-01-01 21:29:24 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* BINARYBLOB_H */
|