RDI/src/files_mms/bundle_struct.h

50 lines
1.0 KiB
C++

/**
* @file bundle_struct.h
* @date 16/09/2022
* @author JackCarterSmith
* @copyright GPL-v3.0
* @brief Bundle (000/001) file mapping definition.
*
* @todo Should not be used for now, bundle files contains game menu elements. May be for graph assets?
*
*/
#ifndef BUNDLE_STRUCT_H_
#define BUNDLE_STRUCT_H_
#ifndef PACK
# if defined(_MSC_VER)
# define PACK
# elif defined(__GNUC__)
# define PACK __attribute__((packed))
# endif
#endif
namespace RDI {
////////////////////////////////////////////////////////////////////////////
// Declaration of Memory Mapped Structure
// Caution: the place of variable is important for correct mapping!
////////////////////////////////////////////////////////////////////////////
#if defined(_MSC_VER)
#pragma pack(push, 1)
#endif
typedef struct PACK file_header {
unsigned int datas_offset;
} T_FILE_HEADER;
typedef struct PACK dat_section {
unsigned int file_headers_offset;
} T_DAT_SECTION;
#if defined(_MSC_VER)
#pragma pack(pop)
#endif
}
#endif /* BUNDLE_STRUCT_H_ */