DoomGLES data converter
-----------------------

DGLESConvert is a modified version of DoomGL. It converts Doom datas to OpenGLES compatible ones.

1- Unzip "Converter" folder to your hard drive.
2- Add Doom IWAD & PWADS you wish to convert.
3- If you wish to convert main Doom IWAD, use the bat files provided:
	+ DoomConvert.bat: Convert Ultimate Doom IWAD (V1.9).
	+ Doom2Convert.bat: Convert Doom2 IWAD (V1.9).
	+ Doom2Convert_nomd2.bat: Convert Doom2 IWAD (V1.9), if you don't plan to use MD2s.
4- If you wish to convert PWADs, use DGLESConvert with the -file & -warp parameters. The -iwad parameter can be used if you have several iwads in the same folder.
Example: mypwad.wad contains 2 levels E1M1 & E1M2 for Doom 1:
	DGLESConvert -iwad doom.wad -file mypwad.wad -warp 1 1
	DGLESConvert -iwad doom.wad -file mypwad.wad -warp 1 2
In OpenGLES folder, a "mypwad" subfolder will be created. Copy it to your PocketPC, and launch DoomGLES with the "-file mypwad.wad" parameter.

----------------------------------------------------------------------------------

To optimize texture memory, each level has its own sprites pages. Two problems may occur when you convert datas:

1- "Sprite not converted (lump:??)" error
-----------------------------------------
Some sprites aren't precached and dynamically spawned (monsters fireballs, explosions, etc.). The lumps of these sprites are listed in the Mlump??.txt files.
MlumpD2.txt: for Doom2.
MlumpUD.txt: for Doom1 (ultimate Doom).
MlumpDS.txt: for Doom1 shareware.
I may have forgotten some lumps. In this case, simply add the lump number in the error message in the corresponding Mlump??.txt file, delete E?M?_spr?.pvr (or MAP??_spr?.pvr) in your OpenGLES/<wadfolder>, and relaunch conversion of the map(s).
Also, send me a email with the lump number, so it will be fixed in the next released version.

2- White sprites on screen
--------------------------
It means the texture memory is full. So we have to scale down some sprites. Use the -maxsprsurf parameter.
Example (from Doom2Convert.bat):
DGLESConvert.exe -warp 27 -sprmaxsurf 2048
In Doom2 MAP27 there is too much textures (MD2s, world, sprites), so, each sprite which surface size will be greater than 2048 will be scaled down by 2.
You could also use the "-sprscale" parameter, it specifies the scale the sprite will be scaled down (0.5 by default).
Before you reconvert a map, think to delete OpenGLES/<wad>/E?M?_spr?.pvr files (or OpenGLES/<wad>/MAP??_spr?.pvr for Doom2 wads).

----------------------------------------------------------------------------------

Music conversion
----------------
DGLESConvert can convert musics from MUS doom format to WAV format, directly useable by the midas sound engine used in DoomGLES.

1- Download http://kokak.free.fr/timidity.zip and unzip it in your converter folder.
2- Run DGLESConvert with the -convertmusic command line option. It will convert all musics from the selected wad to a Music/<wadname> folder. Then you only have to copy this folder to your PocketPC.

Example:
DGLESConvert -iwad doom.wad -convertmusic will convert all musics from main Doom IWAD and place them in Music/doom folder.
DGLESConvert -file mypwad.wad -convertmusic will convert all musics from mypwad.wad PWAD and place them in Music/mypwad folder.

The upside of this method are:
- It doesn't consume anything in term of memory (RAM).
- It doesn't consume anything in term of CPU load (the wav file is just streamed).
- It was very easy to develop (the midas sound library used in DoomGLES has built-in streaming files code).
The downside of this method is:
- It costs a lot in term of card storage (93MB for Doom 1, 186MB for Doom 2). So it may be a problem for people with low capacity storage cards.