Skip to content

Commit

Permalink
Add README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mtheall committed Feb 22, 2017
1 parent 2bfd0be commit 10036b7
Show file tree
Hide file tree
Showing 3 changed files with 176 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ EXTRACT_PRIVATE = YES
EXTRACT_STATIC = YES
GENERATE_LATEX = NO
HAVE_DOT = @HAVE_DOT@
INPUT = include source
INPUT = README.md include source
OUTPUT_DIRECTORY = doc
PREDEFINED = COMPRESSION_INTERNAL MagickLibVersion=0x700
PROJECT_BRIEF = 3DS Texture Converter
Expand Down
154 changes: 154 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
# 3dstex

**3DS Texture Conversion**

```
Usage: ./3dstex [OPTIONS...] <input>
Options:
-f <format> See "Format Options"
-m <filter> Generate mipmaps. See "Mipmap Filter Options"
-o <output> Output file
-p <preview> Output preview file
-q <etc1-quality> ETC1 quality. Valid options: low, medium (default), high
-z <compression> Compress output. See "Compression Options"
--cubemap Generate a cubemap. See "Cubemap"
--skybox Generate a skybox. See "Skybox"
<input> Input file
```

## Format Options

```
-f rgba, -f rgba8, -f rgba8888
32-bit RGBA (8-bit components) (default)
-f rgb, -f rgb8, -f rgb888
24-bit RGB (8-bit components)
-f rgba5551
16-bit RGBA (5-bit RGB, 1-bit Alpha)
-f rgb565
16-bit RGB (5-bit Red/Blue, 6-bit Green)
-f rgba4, -f rgba444
16-bit RGBA (4-bit components)
-f la, -f la8, -f la88
16-bit Luminance/Alpha (8-bit components)
-f hilo, -f hilo8, -f hilo88
16-bit HILO (8-bit components)
Note: HI comes from Red channel, LO comes from Green channel
-f l, -f l8
8-bit Luminance
-f a, -f a8
8-bit Alpha
-f la4, -f la44
8-bit Luminance/Alpha (4-bit components)
-f l4
4-bit Luminance
-f a4
4-bit Alpha
-f etc1
ETC1
-f etc1a4
ETC1 with 4-bit Alpha
-f auto-l8
L8 when input has no alpha, otherwise LA8
-f auto-l4
L4 when input has no alpha, otherwise LA4
-f auto-etc1
ETC1 when input has no alpha, otherwise ETC1A4
```

## Mipmap Filter Options

```
-m bartlett
-m bessel
-m blackman
-m bohman
-m box
-m catrom
-m cosine
-m cubic
-m gaussian
-m hamming
-m hanning
-m hermite
-m jinc
-m kaiser
-m lagrange
-m lanczos
-m lanczos-radius
-m lanczos-sharp
-m lanczos2
-m lanczos2-sharp
-m mitchell
-m parzen
-m point
-m quadratic
-m robidoux
-m robidoux-sharp
-m sinc
-m spline
-m triangle
-m welsh
```

## Compression Options

```
-z none No compression (default)
-z fake Fake compression header
-z huff, -z huffman Huffman encoding (possible to produce garbage)
-z lzss, -z lz10 LZSS compression
-z lz11 LZ11 compression
-z rle Run-length encoding
NOTE: All compression types (except 'none') use a GBA-style compression header: a single byte which denotes the compression type, followed by three bytes (little-endian) which specify the size of the uncompressed data.
Types:
0x00: Fake (uncompressed)
0x10: LZSS
0x11: LZ11
0x28: Huffman encoding
0x30: Run-length encoding
```

## Cubemap

```
A cubemap is generated from the input image in the following convention:
+----+----+---------+
| | +Y | |
+----+----+----+----+
| -X | +Z | -X | -Z |
+----+----+----+----+
| | -Y | |
+----+----+---------+
```

## Skybox

```
A skybox is generated from the input image in the following convention:
+----+----+---------+
| | +Y | |
+----+----+----+----+
| -X | -Z | -X | +Z |
+----+----+----+----+
| | -Y | |
+----+----+---------+
```
41 changes: 21 additions & 20 deletions source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1024,33 +1024,34 @@ void print_usage(const char *prog)
" -z lz11 LZ11 compression\n"
" -z rle Run-length encoding\n\n"

" NOTE: All compression types (except 'none') use a GBA-style compression header: a single byte which denotes the compression type, followed by three bytes (little-endian) which specify the size of the uncompressed data.\n"
" NOTE: All compression types (except 'none') use a GBA-style compression header: a single byte which denotes the compression type, followed by three bytes (little-endian) which specify the size of the uncompressed data.\n\n"

" Types:\n"
" 0x00: Fake (uncompressed)\n"
" 0x10: LZSS\n"
" 0x11: LZ11\n"
" 0x28: Huffman encoding\n"
" 0x30: Run-length encoding\n\n"

" Cubemap:\n"
" A cubemap is generated from the input image in the following convention:\n"
" +----+----+---------+\n"
" | | +Y | |\n"
" +----+----+----+----+\n"
" | -X | +Z | -X | -Z |\n"
" +----+----+----+----+\n"
" | | -Y | |\n"
" +----+----+---------+\n\n"

" Skybox:\n"
" A skybox is generated from the input image in the following convention:\n"
" +----+----+---------+\n"
" | | +Y | |\n"
" +----+----+----+----+\n"
" | -X | -Z | -X | +Z |\n"
" +----+----+----+----+\n"
" | | -Y | |\n"
" +----+----+---------+\n\n"
" Cubemap:\n"
" A cubemap is generated from the input image in the following convention:\n"
" +----+----+---------+\n"
" | | +Y | |\n"
" +----+----+----+----+\n"
" | -X | +Z | -X | -Z |\n"
" +----+----+----+----+\n"
" | | -Y | |\n"
" +----+----+---------+\n\n"

" Skybox:\n"
" A skybox is generated from the input image in the following convention:\n"
" +----+----+---------+\n"
" | | +Y | |\n"
" +----+----+----+----+\n"
" | -X | -Z | -X | +Z |\n"
" +----+----+----+----+\n"
" | | -Y | |\n"
" +----+----+---------+\n\n"
);
}

Expand Down

0 comments on commit 10036b7

Please sign in to comment.