This dirty little tool will convert script files (plain text) to MD2, and can
also convert MD2 and MDX files to script files. Note that vertex normals are
not properly computed (it works, looks okay enough but needs to be fixed).
This tool is somewhat useful if you refuse to learn a proper modeling software
and only need to make SIMPLE static (one frame) models or manually generate
strips instead of letting a stippifier half-ass the job.

USAGE:
	MakeMD2.EXE <filename> <frame>
	If filename is an MD2 or MDX model, a script file called "outscript.txt"
	will be generated. If no frame number is specified, the very first frame
	(index 0) found in the model is extracted. If the filename is a TXT script
	file, the output will either be TRIS.MD2, or the name specified inside the
	script.

SCRIPT:
	fileOutput
		Filename for the output file (.MD2)

	mdlScale X Y Z
		Multiply the value of the following vertices.

	mdlOffset X Y Z
		Apply a translation to the following vertices. These values are added.

	mdlSkin FILENAME WIDTH HEIGHT
		Model skin; this instruction will create models with a single skin. WIDTH
		and HEIGHT are provided in pixels. Don't forget to set this up because
		it's needed to normalize UV coordinates.

	mdlSkinSize WIDTH HEIGHT
		If you need more than one skin, use this instruction to set the dimensions
		of the skin; WIDTH and HEIGHT are provided in pixels.

	mdlSkinFile FILENAME
		If you need more than one skin, use this instruction to declare skin
		files.

	mdlRotate X Y Z ANGLE_X ANGLE_Y ANGLE_Z
		Apply a rotation around the X,Y,Z origin of the specified angle (in
		degrees, not radiants) to the following vertices. I used that to copy and
		paste the legs of a stool without having to manually compute the vertices
		again, and to correct the angle of a severed head after the MDX conversion
		for Barren Meadow.

	glCommand MODE
		Mode is either "fan" or "strip".
		In "fan" mode, the first vertex (v0) is used as the originating point of
		all subsequent triangles. The second vertex (v1) creates the first side of
		the first triangle, and the third vertex (v2) completes it. The following
		vertex (v3) will create the triangle v0-v2-v3. Another vertex (v4) will
		create the triangle (v0-v3-v4), etc.
		In "strip" mode, each new triangle share the most recent edge. The three
		vertices (v0, v1 and v2) create a triangle. The next vertex (v3) will use
		v1-v2 as an edge, creating the triangle v1-v2-v3. Another vertex (v4) will
		then reuse v2-v3 as an edge, creating v2-v3-v4, etc.

	**COMMENT_START**
	**COMMENT_STOP**
		Any lines placed between those two meta-instructions will be ignored.

	Any line that doesn't start with a command is assumed to be a vertex. The
	first three values are the X, Y and Z coordinates (just like in GTKRadiant)
	and the next 2 values are the U and V coordinates on the skin (horizontal and
	vertical, in PIXELS). You may use decimal values for X, Y and Z using either
	"." or "," as a separator.


Have fun, use at your own risk. - ACC