Subject: [Nel] Is it possible to have TGA files from snowball demo to make tile

From: "neuser jean-philippe" <[email-masked]>
Date: Fri, 1 Mar 2002 00:52:07 +0100

Hello ,
ok i am near to find how to make a landscape
i have to make my own tile but i dont have any texture and all texture of
snowball demo have been converted to DSS format.

Is it possible to have the texture in TGA format or make tools  DSStoTGA

A+

---

From: "Cyril 'Hulud' Corvazier" <[email-masked]>
Date: Fri, 1 Mar 2002 11:56:38 +0100

Using NeL, it should be something like:

#include <nel/misc/file.h>
#include <nel/misc/bitmap.h>

using namespace NL3D;
using namespace NLMISC;

void main ()
{
    CIFile input;
    if (input.open ("texture.dds"))
    {
        CBitmap bitmap;
        bitmap.load (input);
        bitmap.convertToType (CBitmap::RGBA);
        
        COFile output;
        if (output.open ("texture.tga"))
        { 
            bitmap.writeTGA (output, 32);
        }
    }
}

Hld.