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

#include "JSystem/JParticle/JPAExTexShape.h"
#include "JSystem/JParticle/JPAResourceManager.h"
#include "JSystem/JParticle/JPAEmitter.h"
#include "dolphin/gx.h"

/* 8027B040-8027B13C 275980 00FC+00 0/0 1/1 0/0 .text JPALoadExTex__FP18JPAEmitterWorkData */
void JPALoadExTex(JPAEmitterWorkData* work) {
    JPAExTexShape* ets = work->mpRes->getEts();

    GXTexCoordID secTexCoordID = GX_TEXCOORD1;
    if (ets->isUseIndirect()) {
        GXSetTexCoordGen2(GX_TEXCOORD1, GX_TG_MTX2x4, GX_TG_TEX0, GX_IDENTITY, 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;
}