-
Notifications
You must be signed in to change notification settings - Fork 0
/
tex.h
59 lines (40 loc) · 1.59 KB
/
tex.h
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//
// Tex
// Texture manager for PSP
//
// Licensed under the BSD license. See LICENSE for details.
// Copyright (c) 2006 Daniel S. Neumeyer <[email protected]>
//
#ifndef __TEX_H__
#define __TEX_H__
#include <psptypes.h>
//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\//
// --- Constants ----------------------------------------------------------- //
//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\//
#define TEX_MAX_BLOCK_SIZE (0)
//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\//
// --- Types --------------------------------------------------------------- //
//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\//
typedef struct
{
void *pixels;
u16 pixelFormat; // uses GU_PSM_* constants in pspgu.h
u16 bufferWidth;
u16 bufferHeight;
u16 imageWidth;
u16 imageHeight;
void *tableEntry; // don't touch this
}
TexTexture;
//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\//
// --- Prototypes ---------------------------------------------------------- //
//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\//
void texInit(void *vramBlockBase, u32 vramBlockSize);
TexTexture *texLoad(const char *file);
void texFree(TexTexture *texture);
TexTexture **texLoadList(const char **files, unsigned count);
void texFreeList(TexTexture **textures, unsigned count);
TexTexture *texNew(u16 width, u16 height, u16 pixelFormat);
void texSwizzle(TexTexture *texture);
void texSet(const TexTexture *texture);
#endif // __TEX_H__