prevnext   » SZS: Wiimms SZS Toolset » wkmpt: Wiimms KMP Tool » wkmpt check

wkmpt check

Read the entered KMP files (text or binary) and and make a plausibility check. Hints and warnings are written to standard output. The exit status is 'DIFFER' if at least one KMP warning found.

Contents

1.   Syntax

wkmpt CHECK source...

2.   Options

Options
Option Param Description
--color Force colorized text. This is the default, if an output file is a terminal. But colorized text is only supported for a few messages.

If a command is prefixed by 'C-', then this option is set automatically.

--no-color Deactive colorized text. This is the default, if an output file is not a terminal.
-B --brief Print only warnings and suppress hints.
-l --long Be verbose and print more statistics.
-q --quiet Be quiet until the first warning or hint is found.
--no-echo Suppress output of @ECHO commands while scanning text files.
-G --generic Forget scanned entry names and use generic names for output.
-N --no-check Do not make plausibility checks for KMP files.
-i --ignore Ignore non existing source files without warning.

3.   Description

For each valid input file (KMP, binary or text), a plausibility check is done. Archives are searched for sub file course.kmp. To understand what the check can do, you must know how the tools are read the files.

3.1   Mouth and Stomach

The naming Mouth and Stomach was created by Donald Knuth in his TeX Book. It should explain, how the data is read.

If opening a file, the data comes first into the mouth. The mouth will convert the incoming data to an internal dynamic data structure. First, the file type is analyzed. If it is a KMP text file, a parser environment is setup and the file is scanned. Binary KMP file are scanned directly with some validity checks (invalid pointers, incompelte sections, ...). Errors in the mouth phase are always printed as warnings with a leading '!'. These errors are of kind syntax error.

After reading, the data comes into the stomach and is ready for checking, transforming and output, whatever the user want. And this means, that the KMP plausibility check sees only the fixed data and can only do some semantic checks.

3.2   List of tests

The following tests are done:

List of tests
Section Type Description
* VERBOSE If option --verbose (-v) is set, print a usage counter for each section.
AREA WARN Camera links are checked. Warnings are printed for invalid and missing links.
CAME WARN Check the opening & selection camera index in the CAME section header.
WARN All opening cameras must have type 5.
WARN A camera with type 0 should exist exactly once. This camera is shown directly after crossing the finish line.
WARN Camera types, that need a route, must have a valid route link. Camera types, which never use a route, must have value 0xff as route link.
WARN Each route link must be 0xff or a valid route index.
WARN Cameras can be linked together to a sequence.
CKPH WARN At least one group must exist (section must not be empty).
WARN All 'prev' and 'next' links must be valid.
WARN Each group must have at least one valid next link.
WARN Each group must have at least one valid prev link.
WARN All points of section CKPT must be covered exactly once in increasing order.
WARN A mandatory check point (mode value between 0x01 and 0xfe) must be used maximal once in each group.
CKPT WARN Each check point must point to an existent respawn point.
WARN Check the correct setup of the 'prev' and 'next' links.
WARN Normally, there is exact one check point with mode=0.
HINT Mandatory check points have a mode value between 0x01 and 0xfe. Test, if there are any gaps in the used modes.
WARN Quadrilateral test: Check if the distance of the corners is smaller than 1.0 units. This may force a position jump bug. In this case, the following 2 tests are omitted.
HINT Quadrilateral test: Check if the distance of the corners is smaller than 10.0 units.
WARN Quadrilateral test: Quadrilaterals must be convex. If a quadrilateral is concave, a position jump bug is possible.
ENPH WARN At least one group must exist (section must not be empty).
WARN All 'prev' and 'next' links must be valid.
WARN Each group must have at least one valid next link.
WARN Each group must have at least one valid prev link.
WARN All points of section ENPT must be covered exactly once in increasing order.
ENPT WARN All points must be within at least one convex check quadrilateral (CKPT).
ITPH WARN At least one group must exist (section must not be empty).
WARN All 'prev' and 'next' links must be valid.
WARN Each group must have at least one valid next link.
WARN Each group must have at least one valid prev link.
HINT The first next link of each group must be valid.
WARN All points of section ITPT must be covered exactly once in increasing order.
ITPT WARN All points must be within at least one convex check quadrilateral (CKPT).
JGPT HINT Check, if a respawn point is not used.
GOBJ HINT Print a hint, if 200 or more global objects are defined.
HINT Count objects with ID 0.
WARN Compare each object with the internal objects database
WARN Objects, that need a route, must have a valid route link. Objects, which never use a route, must have value 0xff as route link.
WARN Each route link must be 0xff or a valid route index.
HINT Count all kinds of item boxes with special items.
POTI WARN Find routes that are used by cameras (section CAME) and by objects (section GOBJ), because such rotes may force a freeze.
HINT Find unused (unlinked) routes. These routes may used by externals.
HINT If a route is used by a camera (section CAME), each route point (but not the last point) must have a non zero speed (setting #1).
STGI WARN Exact one element should be defined for the STGI section.
HINT Print a hint about a non standard lap counter (not 3).
VERBOSE If option --verbose (-v) is set, print an info line for value 3.
WARN Print a warning, if pole position value is >1.
VERBOSE If option --verbose (-v) is set, inform about a valid left or right pole position.
WARN Print a warning, if narrow mode value is >1.
VERBOSE If option --verbose (-v) is set, inform about a valid wide or narrow mode.
HINT Print the speed factor as float and hex, if set (not 0).
VERBOSE If option --verbose (-v) is set, print an info line for value 0.

4.   -N   |   --no-check

Do not make plausibility checks for KMP files.
The above checks are done every time a KMP file is read. To suppress this automatic check, set option --no-check (short; -N).