Skip to content

Commit 6a24453

Browse files
committed
refactor(Theatre): remove references to NostalgiaPlayer2D
I think I might want to make a 'NostalgiaPlayer' `Thinker` class and use that for these checks, instead.
1 parent 2303ce1 commit 6a24453

2 files changed

Lines changed: 5 additions & 11 deletions

File tree

Nostalgia/theatre/theatre.cpp

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,7 @@ bool Theatre::Startup()
159159
iter = m_pInitialState->erase(iter);
160160
continue;
161161
}
162-
else if((ThingFactory::IsDerivedFrom(iter->type, ThingType::NostalgiaPlayer3D) or
163-
ThingFactory::IsDerivedFrom(iter->type, ThingType::NostalgiaPlayer3D)) and
164-
m_pPlayer)
162+
else if(ThingFactory::IsDerivedFrom(iter->type, ThingType::NostalgiaPlayer3D) and m_pPlayer)
165163
{
166164
print_warning("Only one player at a time, please");
167165
iter = m_pInitialState->erase(iter);
@@ -408,9 +406,8 @@ ID Theatre::CreateThing(Farg<TheatreFile::ThingData> inData, bool inDoReadyThing
408406
LockGuard<RMutex> lock{mThingsMutex};
409407
if(inData.name.empty())
410408
{ print_warning("ThingData::name cannot be empty"); return ID::Invalid; }
411-
else if((ThingFactory::IsDerivedFrom(inData.type,ThingType::NostalgiaPlayer3D) or
412-
ThingFactory::IsDerivedFrom(inData.type,ThingType::NostalgiaPlayer2D)) and m_pPlayer)
413-
{ print_warning("Only one player at a time, please!"); return m_pPlayer->uid(); }
409+
else if(ThingFactory::IsDerivedFrom(inData.type,ThingType::NostalgiaPlayer3D) and m_pPlayer)
410+
{ print_warning("Only one player at a time, please!"); return m_pPlayer->uid(); }
414411
else if(ThingExists(inData.name))
415412
{ return GetUID(inData.name); }
416413

@@ -651,10 +648,8 @@ void Theatre::UpdateCallsheet(ID inUID, Farg<ThingData> inData)
651648

652649
void Theatre::UpdateIdSetsAndSpecialThings(FPID inType, ID inUID)
653650
{
654-
if((ThingFactory::IsDerivedFrom(inType, ThingType::NostalgiaPlayer3D) or
655-
ThingFactory::IsDerivedFrom(inType, ThingType::NostalgiaPlayer2D)) and
656-
not m_pPlayer)
657-
{ m_pPlayer = GetThinker(inUID); }
651+
if(ThingFactory::IsDerivedFrom(inType, ThingType::NostalgiaPlayer3D) and not m_pPlayer)
652+
{ m_pPlayer = GetThinker(inUID); }
658653
else if(ThingFactory::IsDerivedFrom(inType, ThingType::Viewport))
659654
{ mViewportIDs.insert(inUID); }
660655
else if(ThingFactory::IsDerivedFrom(inType, ThingType::Visual3D))

Nostalgia/things/thing_type.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ namespace ThingType
3131
TYPE_ID(SpotLight3D),
3232
TYPE_ID(DirectionalLight3D),
3333
TYPE_ID(Actor2D),
34-
TYPE_ID(NostalgiaPlayer2D),
3534
TYPE_ID(Camera2D),
3635
TYPE_ID(Visual2D),
3736
TYPE_ID(Sprite2D),

0 commit comments

Comments
 (0)