[dad864]: pvr.h  Maximize  Restore  History

Download this file

46 lines (39 with data), 1.1 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#if !defined(AFX_PVR_H__31C58D81_6869_4B93_B788_E7A2CB00D662__INCLUDED_)
#define AFX_PVR_H__31C58D81_6869_4B93_B788_E7A2CB00D662__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
typedef struct {
unsigned long version;
unsigned long flags;
__int64 format;
unsigned long colorspace;
unsigned long channeltype;
unsigned long height;
unsigned long width;
unsigned long depth;
unsigned long numsurface;
unsigned long numface;
unsigned long mipmapcount;
unsigned long metasize;
} pvr_header;
typedef struct {
unsigned short c0;
unsigned short c1;
unsigned long pixels;
} dxt1;
class Cpvr {
public:
CString m_name;
pvr_header header;
dxt1 *bits;
public:
Cpvr();
~Cpvr();
void WritePvrHeader(int fhandle, unsigned long width, unsigned long height);
int ReadPvrFromFile(int fhandle, int size);
int BuildTile(unsigned int x, unsigned int y, COLORREF *dib);
private:
int Uncompress(int fhandle, unsigned long outsize, unsigned long insize);
};
#endif

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks