summaryrefslogtreecommitdiff
path: root/include/egg/core/eggXfb.h
blob: 3d0d2503b679bdd83f3e0e6ed9abf057fd9a7156 (plain)
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
#ifndef EGG_XFB_H
#define EGG_XFB_H

#include "common.h"
#include "egg/core/eggHeap.h"


namespace EGG {

class Xfb {
public:
    // Non-Official assumed based on actions
    enum XFBState {
        XFB_UNPROCESSED,
        XFB_COPIED,
        XFB_SHOWN,
    };

public:
    /* 0x00 */ u16 mWidth;
    /* 0x02 */ u16 mHeight;
    /* 0x04 */ u8 *mBuffer;
    /* 0x08 */ XFBState mState;
    /* 0x0C */ Xfb *mNext; // idk the actual order, but they always link to each other
    /* 0x10 */ Xfb *mPrev; // idk the actual order, but they always link to each other
public:
    Xfb(Heap *heap);
    void init(u16 width, u16 height, Heap *heap);

    static u32 calcBufferSize(u16 width, u16 height);
};

} // namespace EGG

#endif