1#include "Game/System/DrawBufferGroup.hpp"
5DrawBufferGroup::DrawBufferGroup() : _0(), _C() {
11void DrawBufferGroup::init(s32 count) {
13 _0.mArray.mMaxSize = count;
15 _C.mArray.mMaxSize = count;
18s32 DrawBufferGroup::registerDrawBuffer(
LiveActor *pActor) {
19 const char* modelName = MR::getModelResName(pActor);
20 s32 idx = findExecuterIndex(modelName);
30 exec->onExecuteLight(_1C);
34 _0.mArray.mArr[idx]->mDrawBufferCount++;
39void DrawBufferGroup::active(
LiveActor *pActor, s32 a2) {
41 bool isEmpty = !(exec->_8 != 0);
45 _C.push_back(_0.mArray.mArr[a2]);
51void DrawBufferGroup::findLightInfo(
LiveActor *pActor, s32 a2) {
52 MR::initActorLightInfoLightType(pActor, _1C);
53 _0.mArray.mArr[a2]->findLightInfo(pActor);
56 for (u32 i = 0; i < _0.mCount; i++) {
57 _0.mArray.mArr[i]->onExecuteLight(_1C);
63 _0.mArray.mArr[a2]->offExecuteLight();
68void DrawBufferGroup::entry() {
69 for_each(_C.mArray.mArr, &_C.mArray.mArr[_C.mArray.mMaxSize], mem_fun(&DrawBufferExecuter::calcViewAndEntry));
76void DrawBufferGroup::setDrawCameraType(s32 type) {
80void DrawBufferGroup::setLightType(s32 type) {
85s32 DrawBufferGroup::findExecuterIndex(
const char *pName)
const {
86 for (u32 i = 0; i < _0.mCount; i++) {
87 if (MR::isEqualString(_0.mArray.mArr[i]->mName, pName)) {
The basis of a drawable actor that can contain states (see: Nerve)