summaryrefslogtreecommitdiff
path: root/src/JSystem/JParticle/JPAExTexShape.cpp
blob: 18b0a01e2d037d0c44e6dd1972d961eeee2d249e (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
//
// Generated By: dol2asm
// Translation Unit: JPAExTexShape
//

#include "JSystem/JParticle/JPAExTexShape.h"
#include "JSystem/JParticle/JPAResourceManager.h"
#include "JSystem/JParticle/JPAEmitter.h"
#include "rvl/MTX.h"
#include "rvl/GX.h"

/* 8027B040-8027B13C 275980 00FC+00 0/0 1/1 0/0 .text JPALoadExTex__FP18JPAEmitterWorkData */
void JPALoadExTex(JPAEmitterWorkData* work) {
    Mtx m;
    JPAExTexShape* ets = work->mpRes->getEts();
    
    GXTexCoordID secTexCoordID = GX_TEXCOORD1;
    if (ets->isUseIndirect()) {
        MTXIdentity(m);
        GXLoadTexMtxImm(m, GX_TEXMTX2, GX_MTX2x4);
        GXSetTexCoordGen2(GX_TEXCOORD1, GX_TG_MTX2x4, GX_TG_TEX0, GX_TEXMTX2, GX_FALSE,
                          GX_PTIDENTITY);
        u8 texIdx = ets->getIndTexIdx();
        work->mpResMgr->load(work->mpRes->getTexIdx(texIdx), GX_TEXMAP2);
        secTexCoordID = GX_TEXCOORD2;
    }

    if (ets->isUseSecTex()) {
        GXSetTexCoordGen2(secTexCoordID, GX_TG_MTX2x4, GX_TG_TEX0, GX_IDENTITY, GX_FALSE,
                          GX_PTIDENTITY);
        u8 texIdx = ets->getSecTexIdx();
        work->mpResMgr->load(work->mpRes->getTexIdx(texIdx), GX_TEXMAP3);
    }
}

/* 8027B13C-8027B144 -00001 0008+00 0/0 0/0 0/0 .text            __ct__13JPAExTexShapeFPCUc */
JPAExTexShape::JPAExTexShape(u8 const* data) {
    mpData = (const JPAExTexShapeData*)data;
}