summaryrefslogtreecommitdiff
path: root/src/d/d_bg_w_deform.cpp
blob: 91ad2e29d999f3b0e2e701d9468bac2e4f5e921f (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
//
// Generated by dtk
// Translation Unit: d_bg_w_deform.cpp
//

#include "d/d_bg_w_deform.h"
#include "JSystem/J3DGraphAnimator/J3DModel.h"
#include "JSystem/J3DGraphAnimator/J3DModelData.h"

/* 800A9928-800A9A48       .text Set__10dBgWDeformFP6cBgD_tP8J3DModelUl */
bool dBgWDeform::Set(cBgD_t* bgd, J3DModel* pmodel, u32 flag) {
    JUT_ASSERT(32, pmodel->getModelData()->isDeformablePositionFormat() == true);
    if (cBgW::Set(bgd, MOVE_BG_e | NO_CALC_VTX_e | NO_VTX_TBL_e | GLOBAL_e, NULL)) {
        return true;
    }
    SetFlag(flag);
    if (pmodel->setSkinDeform(this, 1) == J3DErrType_OutOfMemory) {
        return true;
    }
    pmodel->offFlag(J3DMdlFlag_SkinNrmCpu);
    pmodel->onFlag(J3DMdlFlag_SkinPosCpu);
    if (ChkNoCrrPos()) {
        return false;
    }
    SetBackVtx(new Vec[pm_bgd->m_v_num]);
    if (GetBackVtx() == NULL) {
        return true;
    }
    return false;
}