Dstexcomp: Difference between revisions
From GameBrew
More actions
No edit summary |
No edit summary |
||
| Line 3: | Line 3: | ||
| image = [[File:Dstexcompds.png|300px]] | | image = [[File:Dstexcompds.png|300px]] | ||
| type = PC Utility | | type = PC Utility | ||
| version = 0.1 | | version = 0.1 30 March 2009 | ||
| licence = Mixed | | licence = Mixed | ||
| author = kvance (Kevin Vance) | | author = kvance (Kevin Vance) | ||
| Line 11: | Line 11: | ||
}} | }} | ||
This is | This is a python script that can generate compressed textures for the Nintendo DS. It takes any image as input, and can output the NDS formatted texture in a variety of ways. | ||
==Installation== | ==Installation== | ||
'''Requirements:''' | |||
* [http://www.python.org/download/releases/2.5.4/ Python 2.5.] | |||
* [http://www.pythonware.com/products/pil Python/ Imaging Library.] | |||
* [http://numpy.scipy.org/ NumPy.] | |||
* [http://www.scipy.org/ SciPy.] | |||
* [http://pyprocessing.berlios.de/ pyprocessing.] | |||
It will optionally use [http://psyco.sourceforge.net/ Psyco] if you have it. | It will optionally use [http://psyco.sourceforge.net/ Psyco] if you have it. | ||
| Line 27: | Line 28: | ||
Compressed textures have a slightly complicated format, and the hardware is not very forgiving about how they are stored. The texture is divided into three parts: | Compressed textures have a slightly complicated format, and the hardware is not very forgiving about how they are stored. The texture is divided into three parts: | ||
* '''Pixmap''' - The pixels of the texture, grouped into 4x4 blocks. | |||
* '''Index''' - A map from each pixel block to a part of the palette. | |||
* '''Palette''' - The list of colors, used in groups of 2 or 4. | |||
The pixmap can be stored in texture slots 0 or 2. The index must be stored in slot 1. This prevents textures larger than 1024x512, since the index would be in the middle of them. Palettes are stored normally. | The pixmap can be stored in texture slots 0 or 2. The index must be stored in slot 1. This prevents textures larger than 1024x512, since the index would be in the middle of them. Palettes are stored normally. | ||
| Line 37: | Line 38: | ||
[http://gamebrew.org/wiki/File:Texcompexdssrc.tar.gz Example C Source Code]. | [http://gamebrew.org/wiki/File:Texcompexdssrc.tar.gz Example C Source Code]. | ||
[[Category: | <br> | ||
[[Category:DS homebrew applications]] | |||
[[Category:Other DS applications]] | |||
Revision as of 00:45, 28 May 2021
| dstexcomp | |
| File:Dstexcompds.png | |
| General | |
|---|---|
| Author(s) | kvance (Kevin Vance) |
| Type | PC Utility |
| Version | 0.1 30 March 2009 |
| Licence | Mixed |
| Links | |
| [Media:Dstexcomp01.tar.gz Download] | |
| Website | |
<htmlet>adsense</htmlet>