1#include "Game/AreaObj/LightArea.hpp"
2#include "Game/Map/LightZoneDataHolder.hpp"
3#include "Game/Map/LightFunction.hpp"
4#include "Game/Util.hpp"
6ZoneLightID::ZoneLightID() {
11void ZoneLightID::clear() {
16bool ZoneLightID::isTargetArea(
const LightArea *pLightArea)
const {
17 if (_0 == pLightArea->mPlacedZoneID && mLightID == pLightArea->mObjArg0) {
24bool ZoneLightID::isOutOfArea()
const {
28LightZoneInfo::LightZoneInfo() {
33const char* LightZoneInfo::getAreaLightNameInZoneData(s32 idx)
const {
34 for (
int i = 0; i < mAreaCount; i++) {
35 if (mAreaInfo[i].mID == idx) {
36 return mAreaInfo[i].mAreaLightName;
40 return LightFunction::getDefaultAreaLightName();
43LightZoneDataHolder::LightZoneDataHolder() {
48void LightZoneDataHolder::initZoneData() {
49 mCount = MR::getZoneNum();
52 for (s32 i = 0; i < mCount; i++) {
57const char* LightZoneDataHolder::getAreaLightNameInZoneData(
const ZoneLightID &zoneID)
const {
64 return mZoneInfo[val].getAreaLightNameInZoneData(zoneID.mLightID);
68const char* LightZoneDataHolder::getDefaultStageAreaLightName()
const {
69 return mZoneInfo->getAreaLightNameInZoneData(-1);
72void LightZoneInfo::init(s32 zoneID) {
73 const char* zoneName = MR::getZoneNameFromZoneId(zoneID);
75 mAreaCount = LightFunction::createZoneDataParser(zoneName, &parser);
76 mAreaInfo =
new AreaInfo[mAreaCount];
78 for (
int i = 0; i < mAreaCount; i++) {
81 MR::getCsvDataS32(&inf->mID, parser,
"LightID", i);
82 MR::getCsvDataStr(&inf->mAreaLightName, parser,
"AreaLightName", i);