summaryrefslogtreecommitdiff
path: root/include/JSystem/JParticle/JPAExTexShape.h
blob: 0ec6471d1ebdaeca31a3940ddcf4bce75e9d87c0 (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
36
37
38
39
40
41
#ifndef JPAEXTEXSHAPE_H
#define JPAEXTEXSHAPE_H

#include "dolphin/types.h"

/**
 * @ingroup jsystem-jparticle
 * 
 */
struct JPAExTexShapeData {
    // Common header.
    /* 0x00 */ u8 mMagic[4];
    /* 0x04 */ u32 mSize;

    /* 0x08 */ u32 mFlags;
    /* 0x0C */ f32 mIndTexMtx[2][3];
    /* 0x24 */ s8 mExpScale;
    /* 0x25 */ s8 mIndTexIdx;
    /* 0x26 */ s8 mSecTexIdx;
};

/**
 * @ingroup jsystem-jparticle
 * 
 */
class JPAExTexShape {
public:
    /* 8027B13C */ JPAExTexShape(u8 const*);

    const f32* getIndTexMtx() const { return &mpData->mIndTexMtx[0][0]; }
    s32 getExpScale() const { return mpData->mExpScale; }
    u8 getIndTexIdx() const { return mpData->mIndTexIdx; }
    u8 getSecTexIdx() const { return mpData->mSecTexIdx; }
    bool isUseIndirect() const { return !!(mpData->mFlags & 0x01); }
    bool isUseSecTex() const { return !!(mpData->mFlags & 0x0100); }

public:
    const JPAExTexShapeData* mpData;
};

#endif /* JPAEXTEXSHAPE_H */