aboutsummaryrefslogtreecommitdiff
path: root/project/text-files/mdl.inc
diff options
context:
space:
mode:
Diffstat (limited to 'project/text-files/mdl.inc')
-rw-r--r--project/text-files/mdl.inc/mdl-file-head-cr.inc26
-rw-r--r--project/text-files/mdl.inc/mdl-header-cr.inc8
-rwxr-xr-xproject/text-files/mdl.inc/mdl-hexdump-cr.inc4
-rw-r--r--project/text-files/mdl.inc/mdl-s0-cr.inc19
-rw-r--r--project/text-files/mdl.inc/mdl-s0-tabhead-cr.inc2
-rw-r--r--project/text-files/mdl.inc/mdl-setup-cr.inc21
6 files changed, 80 insertions, 0 deletions
diff --git a/project/text-files/mdl.inc/mdl-file-head-cr.inc b/project/text-files/mdl.inc/mdl-file-head-cr.inc
new file mode 100644
index 0000000..7725443
--- /dev/null
+++ b/project/text-files/mdl.inc/mdl-file-head-cr.inc
@@ -0,0 +1,26 @@
+#MDL <<< The first 4 characters '#MDL' are the magic for a MDL text file.
+# <<< Don't remove them!
+#
+###############################################################################
+#
+# This is a textual representation of a MDL file used in Nintendos "Mario Kart
+# Wii". "Wiimms SZS Tools" may convert binary (raw) and text MDL files in both
+# directions in the near future. The text parser supports variables, C like
+# expressions and nested IF-THEN-ELSE structures.
+#
+# Info about the general parser syntax and semantics:
+# * https://szs.wiimm.de/doc/syntax
+#
+# Info about the MDL text syntax and semantics:
+# * https://szs.wiimm.de/doc/mdl/syntax
+#
+# Reference list of MDL parser functions:
+# * https://szs.wiimm.de/doc/mdl/func
+#
+# Info about the MDL file format:
+# * https://szs.wiimm.de/r/wiki/MDL0
+#
+# Hint:
+# Set one of the options --no-header (-H) or --brief (-B) while decoding
+# to suppress this large syntax info. The --brief option will also disable
+# info parts in the different sections.
diff --git a/project/text-files/mdl.inc/mdl-header-cr.inc b/project/text-files/mdl.inc/mdl-header-cr.inc
new file mode 100644
index 0000000..315cd77
--- /dev/null
+++ b/project/text-files/mdl.inc/mdl-header-cr.inc
@@ -0,0 +1,8 @@
+
+#FF#
+###############################################################################
+
+[HEADER]
+# MDL header
+@REVISION = %u
+
diff --git a/project/text-files/mdl.inc/mdl-hexdump-cr.inc b/project/text-files/mdl.inc/mdl-hexdump-cr.inc
new file mode 100755
index 0000000..caa6029
--- /dev/null
+++ b/project/text-files/mdl.inc/mdl-hexdump-cr.inc
@@ -0,0 +1,4 @@
+$HEX # switch to hexdump modus
+#----+------------------------------------------------------+----------------+
+#addr: data: bytes in hex | '(' expression ')' : ASCII of data :
+#----+------------------------------------------------------+----------------+
diff --git a/project/text-files/mdl.inc/mdl-s0-cr.inc b/project/text-files/mdl.inc/mdl-s0-cr.inc
new file mode 100644
index 0000000..7bc1f1f
--- /dev/null
+++ b/project/text-files/mdl.inc/mdl-s0-cr.inc
@@ -0,0 +1,19 @@
+# This section represents one draw list.
+#
+# A draw list is a sequence of u8, u16 (1 and 2 byte unsigned integers) and
+# float (4 bytes) values divided into commands. For each command the first
+# byte declares the length and the meaning of the command:
+#
+# #1 : 1 byte, end of command list
+# #2 : 5 bytes, bone mapping
+# #3 : 4+N*6 bytes, weighting
+# #4 : 8 bytes, draw polygon
+# #5 : 5 bytes, indexing
+#
+# And these are the codings of the commands:
+# #1
+# #2, u16:weight_index, u16:parent:weight_index
+# #3, u16:wight_id, u8:N, N*( u16:table_id, float:weight )
+# #4, u16:object_index, u16:material_index, u16:bone_index, u8:unknown
+# #5, u16:weight_id, u16:weight_index
+
diff --git a/project/text-files/mdl.inc/mdl-s0-tabhead-cr.inc b/project/text-files/mdl.inc/mdl-s0-tabhead-cr.inc
new file mode 100644
index 0000000..d9cc11f
--- /dev/null
+++ b/project/text-files/mdl.inc/mdl-s0-tabhead-cr.inc
@@ -0,0 +1,2 @@
+# cmd command dependent parameters
+#-------------------------------------
diff --git a/project/text-files/mdl.inc/mdl-setup-cr.inc b/project/text-files/mdl.inc/mdl-setup-cr.inc
new file mode 100644
index 0000000..da5d0ff
--- /dev/null
+++ b/project/text-files/mdl.inc/mdl-setup-cr.inc
@@ -0,0 +1,21 @@
+
+#FF#
+###############################################################################
+
+[SETUP]
+# This is the general setup and info section. Some parameters are preceeded by
+# a hash ('#') to signal the informative only status. The scanning starts
+# always with this section.
+
+# Identify the tool and version, that have written this file:
+TOOL = %s
+SYSTEM = %s
+VERSION = %s
+REVISION = %u
+DATE = %s
+
+# The MDL name & version and the number of sections
+@MDL-NAME = "%s"
+@MDL-VERSION = %2u
+@N-SECTIONS = %2u
+