commit 774b230afec7f578c881c868aea4888fda2b2462
parent 29cc981b420a9b74c5894246eaa4268300d727ca
Author: MikoĊaj Lenczewski <mblenczewski@gmail.com>
Date: Sun, 12 Feb 2023 17:30:19 +0000
Added debug print functions to libriot for both WAD and INIBIN types
Diffstat:
5 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/libriot/include/libriot/inibin.h b/libriot/include/libriot/inibin.h
@@ -145,6 +145,9 @@ riot_inibin_read(struct riot_inibin_ctx *ctx, struct mem_stream stream);
extern b32
riot_inibin_write(struct riot_inibin_ctx *ctx, struct mem_stream stream);
+extern void
+riot_inibin_print(struct riot_inibin_ctx *ctx, FILE *f);
+
#ifdef __cplusplus
};
#endif /* __cplusplus */
diff --git a/libriot/include/libriot/wad.h b/libriot/include/libriot/wad.h
@@ -54,6 +54,9 @@ riot_wad_read(struct riot_wad_ctx *ctx, struct mem_stream stream);
extern b32
riot_wad_write(struct riot_wad_ctx *ctx, struct mem_stream stream);
+extern void
+riot_wad_print(struct riot_wad_ctx *ctx, FILE *f);
+
#ifdef __cplusplus
};
#endif /* __cplusplus */
diff --git a/libriot/makefile.mk b/libriot/makefile.mk
@@ -22,9 +22,11 @@ LIBRIOT_SOURCES := libriot/src/libriot.c \
libriot/src/wad.c \
libriot/src/wad_reader.c \
libriot/src/wad_writer.c \
+ libriot/src/wad_printer.c \
libriot/src/inibin.c \
libriot/src/inibin_reader.c \
- libriot/src/inibin_writer.c
+ libriot/src/inibin_writer.c \
+ libriot/src/inibin_printer.c
LIBRIOT_OBJECTS := $(LIBRIOT_SOURCES:%.c=$(OBJ)/%.c.o)
LIBRIOT_OBJDEPS := $(LIBRIOT_OBJECTS:%.o=%.d)
diff --git a/libriot/src/inibin_printer.c b/libriot/src/inibin_printer.c
@@ -0,0 +1,7 @@
+#include "libriot/inibin.h"
+
+void
+riot_inibin_print(struct riot_inibin_ctx *ctx, FILE *f) {
+ assert(ctx);
+ assert(f);
+}
diff --git a/libriot/src/wad_printer.c b/libriot/src/wad_printer.c
@@ -0,0 +1,7 @@
+#include "libriot/wad.h"
+
+void
+riot_wad_print(struct riot_wad_ctx *ctx, FILE *f) {
+ assert(ctx);
+ assert(f);
+}