summaryrefslogtreecommitdiffstats
path: root/sdk/rwsdk/include/d3d8/rttoc.h
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-08-02 18:49:12 +0200
committerSergeanur <s.anureev@yandex.ua>2020-08-02 18:49:12 +0200
commit3e24ae8812ca4a0031d82ea7f7393605b8a4283a (patch)
tree5cc79378e86970d3b63cbed173d627410ea90ca6 /sdk/rwsdk/include/d3d8/rttoc.h
parentMerge pull request #669 from erorcun/miami (diff)
parentMove sdk and eax (diff)
downloadre3-3e24ae8812ca4a0031d82ea7f7393605b8a4283a.tar
re3-3e24ae8812ca4a0031d82ea7f7393605b8a4283a.tar.gz
re3-3e24ae8812ca4a0031d82ea7f7393605b8a4283a.tar.bz2
re3-3e24ae8812ca4a0031d82ea7f7393605b8a4283a.tar.lz
re3-3e24ae8812ca4a0031d82ea7f7393605b8a4283a.tar.xz
re3-3e24ae8812ca4a0031d82ea7f7393605b8a4283a.tar.zst
re3-3e24ae8812ca4a0031d82ea7f7393605b8a4283a.zip
Diffstat (limited to 'sdk/rwsdk/include/d3d8/rttoc.h')
-rw-r--r--sdk/rwsdk/include/d3d8/rttoc.h102
1 files changed, 102 insertions, 0 deletions
diff --git a/sdk/rwsdk/include/d3d8/rttoc.h b/sdk/rwsdk/include/d3d8/rttoc.h
new file mode 100644
index 00000000..88926062
--- /dev/null
+++ b/sdk/rwsdk/include/d3d8/rttoc.h
@@ -0,0 +1,102 @@
+/******************************************************************************
+ * *
+ * Module : rttoc.h *
+ * *
+ * Purpose : Table Of Contents (TOC) *
+ * *
+ ******************************************************************************/
+
+#ifndef RTTOC_H
+#define RTTOC_H
+
+/**
+ * \defgroup rttoc RtTOC
+ * \ingroup streaming
+ *
+ * Table Of Contents (TOC) - creating a TOC for a stream.
+ */
+
+/******************************************************************************
+ Includes
+ */
+#include "rwcore.h"
+
+#include "rpcriter.h"
+
+/******************************************************************************
+ Defines
+ */
+
+/******************************************************************************
+ Global Types
+ */
+
+typedef struct _rtTOCGUID _rtTOCGUID;
+#if (!defined(DOXYGEN))
+struct _rtTOCGUID
+{
+ RwUInt32 data1;
+ RwUInt16 data2;
+ RwUInt16 data3;
+ RwUInt8 data4[8];
+};
+#endif /* (!defined(DOXYGEN)) */
+
+typedef struct RtTOCEntry RtTOCEntry;
+/**
+ * \ingroup rttoc
+ * \struct RtTOCEntry
+ *
+ * A Table Of Contents (TOC) entry structure.
+ */
+struct RtTOCEntry
+{
+ RwCorePluginID id; /**< Chunk ID */
+ RwUInt32 gid; /**< Game ID */
+ RwUInt32 offset; /**< Offset of chunk from the start of the file
+ including TOC */
+ _rtTOCGUID guid; /**< GUID */
+};
+
+typedef struct RtTOC RtTOC;
+
+/**
+ * \ingroup rttoc
+ * \struct RtTOC
+ *
+ * Table Of Contents (TOC) structure.
+ */
+struct RtTOC
+{
+ RwInt32 numEntries; /**< Number of entries */
+ RtTOCEntry entry[1]; /**< Entry */
+};
+
+/******************************************************************************
+ Function prototypes
+ */
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+/* Create/Destroy */
+extern RtTOC *RtTOCCreate(RwStream *stream);
+extern void RtTOCDestroy(RtTOC *toc);
+
+/* Access */
+extern RwInt32 RtTOCGetNumEntries(const RtTOC *toc);
+extern RtTOCEntry *RtTOCGetEntry(RtTOC *toc, RwInt32 entry);
+
+/* Serialization */
+extern RwUInt32 RtTOCStreamGetSize(const RtTOC *toc);
+extern const RtTOC *RtTOCStreamWrite(RtTOC *toc, RwStream *stream);
+extern RtTOC *RtTOCStreamRead(RwStream *stream);
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* RTTOC_H */