layout adjustment
[open-ps2-loader.git] / include / atlas.h
blob195cf248e024cb8264c6f078f707efa6fd4a2837
1 #ifndef __ATLAS_H
2 #define __ATLAS_H
4 #include <gsToolkit.h>
6 struct atlas_allocation_t {
7 int x, y;
8 int w, h;
10 struct atlas_allocation_t *leaf1, *leaf2;
13 typedef struct {
14 struct atlas_allocation_t *allocation;
16 GSTEXTURE surface;
17 } atlas_t;
19 /** allocates a new atlas. Further settings should be set manually
20 * on the atlas_t::surface.
22 atlas_t *atlasNew(size_t width, size_t height, u8 psm);
24 /// Frees the atlas
25 void atlasFree(atlas_t *atlas);
27 /** Allocates a place in atlas for the given pixmap data.
28 * Atlas expects 32bit pixels - all the time
30 struct atlas_allocation_t *atlasPlace(atlas_t *atlas, size_t width,
31 size_t height, const void *surface);
33 #endif