mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-05-26 23:26:45 -04:00
4df8ccc871
* Reorganize files into libs/{dolphin,JSystem,PowerPC_EABI_Support,revolution,TRK_MINNOW_DOLPHIN}
* Update configure.py and project.py for new libs structure
* Refactor `#include <dolphin/x.h>` -> `<x.h>`
* Remove `__REVOLUTION_SDK__` forwards from dolphin
* Fix dolphin/ references in revolution
* Wrap `#include <dolphin.h>` in `!__REVOLUTION_SDK__`
* Always build TRK against dolphin headers
* Resolve revolution SDK header resolution issues
41 lines
1.2 KiB
C++
41 lines
1.2 KiB
C++
#include "JSystem/JSystem.h" // IWYU pragma: keep
|
|
|
|
#include "JSystem/J3DGraphAnimator/J3DShapeTable.h"
|
|
#include "JSystem/J3DGraphBase/J3DShape.h"
|
|
|
|
void J3DShapeTable::hide() {
|
|
u16 shapeNum = mShapeNum;
|
|
for (u16 i = 0; i < shapeNum; i++) {
|
|
mShapeNodePointer[i]->onFlag(1);
|
|
}
|
|
}
|
|
|
|
void J3DShapeTable::show() {
|
|
u16 shapeNum = mShapeNum;
|
|
for (u16 i = 0; i < shapeNum; i++) {
|
|
mShapeNodePointer[i]->offFlag(1);
|
|
}
|
|
}
|
|
|
|
void J3DShapeTable::initShapeNodes(J3DDrawMtxData* pMtxData, J3DVertexData* pVtxData) {
|
|
u16 shapeNum = mShapeNum;
|
|
for (u16 i = 0; i < shapeNum; i++) {
|
|
J3DShape* shapeNode = mShapeNodePointer[i];
|
|
|
|
shapeNode->setDrawMtxDataPointer(pMtxData);
|
|
shapeNode->setVertexDataPointer(pVtxData);
|
|
shapeNode->makeVcdVatCmd();
|
|
}
|
|
}
|
|
|
|
void J3DShapeTable::sortVcdVatCmd() {
|
|
u16 shapeNum = mShapeNum;
|
|
for (u16 next = 0; next < shapeNum; next++) {
|
|
for (u16 prev = 0; prev < next; prev++) {
|
|
if (mShapeNodePointer[next]->isSameVcdVatCmd(mShapeNodePointer[prev])) {
|
|
mShapeNodePointer[next]->setVcdVatCmd(mShapeNodePointer[prev]->getVcdVatCmd());
|
|
}
|
|
}
|
|
}
|
|
}
|