1#include "Game/LiveActor/ActorLightCtrl.hpp"
2#include "Game/Map/LightFunction.hpp"
3#include "Game/NameObj/NameObjExecuteHolder.hpp"
5ActorLightCtrl::ActorLightCtrl(
const LiveActor *pActor)
6 : mActor(pActor), _4(-1), _8(0), _C(0), mAreaLightInf(0), mLightID() {
14void ActorLightCtrl::init(
int interpolate,
bool ) {
15 if (interpolate >= 0) {
21 tryFindNewAreaLight(
false);
22 mAreaLightInf = LightFunction::getAreaLightInfo(mLightID);
23 mLightInfo = *getTargetActorLight(mAreaLightInf);
27void ActorLightCtrl::update(
bool direct) {
28 if (!MR::isHiddenModel(mActor)) {
29 tryFindNewAreaLight(direct);
34void ActorLightCtrl::loadLight()
const {
37 LightFunction::loadActorLightInfo(&mLightInfo);
40 LightFunction::loadActorLightInfo(getTargetActorLight(mAreaLightInf));
45bool ActorLightCtrl::isSameLight(
const ActorLightCtrl *pLight)
const {
50 return mAreaLightInf == pLight->mAreaLightInf;
58 return getTargetActorLight(mAreaLightInf);
61void ActorLightCtrl::initActorLightInfo() {
66 MR::findActorLightInfo(mActor);
70void ActorLightCtrl::resetCurrentLightInfo() {
71 mAreaLightInf = LightFunction::getAreaLightInfo(mLightID);
72 mInterpolate = mAreaLightInf->mInterpolate;
73 mLightInfo.mInfo0.mIsFollowCamera = getTargetActorLight(mAreaLightInf)->mInfo0.mIsFollowCamera;
74 mLightInfo.mInfo1.mIsFollowCamera = getTargetActorLight(mAreaLightInf)->mInfo1.mIsFollowCamera;
82 return &pInfo->mPlayerLight;
85 return &pInfo->mStrongLight;
88 return &pInfo->mWeakLight;
91 return &pInfo->mPlanetLight;
The basis of a drawable actor that can contain states (see: Nerve)