summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2018-09-28 19:42:39 +0800
committerIru Cai <mytbk920423@gmail.com>2018-09-28 19:43:27 +0800
commitc304a77a69abf934719c160ab613a350ad245919 (patch)
tree078bd037e55cf4345bf8968d7f1ac83c50b1a5b5
parente43297332c5a37298d85124f4bddd3fa4c360113 (diff)
downloadrich4-c304a77a69abf934719c160ab613a350ad245919.tar.xz
add test/dump_loading to dump the loading scene
-rw-r--r--csrc/test/dump_loading_scene.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/csrc/test/dump_loading_scene.c b/csrc/test/dump_loading_scene.c
new file mode 100644
index 0000000..ee9d31e
--- /dev/null
+++ b/csrc/test/dump_loading_scene.c
@@ -0,0 +1,17 @@
+/* gcc -m32 -I.. dump_loading_scene.c ../mkf.c ../mkf_00455040.c -o dump_loading */
+/* copy Data.mkf and run this,
+ * open loading.data with GIMP, data type is RGB565 little endian */
+
+#include <stdio.h>
+#include "mkf.h"
+
+int pixel_fmt = 1;
+
+int main()
+{
+ int mkf_data = load_mkf("Data.mkf");
+ char *data = read_mkf(mkf_data, 0x259, NULL, NULL);
+ FILE *fp = fopen("loading.data", "wb");
+ fwrite(data, 1, 0x96000, fp);
+ fclose(fp);
+}