CvCity::setupGraphical()
- Defined in
- CvCity.cpp, line 1217
- Class
- CvCity
- Hook name
CivHooks::CvCity_setupGraphical
Hooks
static bool BeforeCvCity_setupGraphical(CvCity* self);static void AfterCvCity_setupGraphical(CvCity* self);static void ReplaceCvCity_setupGraphical(void (*original)(CvCity*), CvCity* self);CivRegisterBefore<CivHooks::CvCity_setupGraphical>(host, &BeforeCvCity_setupGraphical);CivRegisterAfter<CivHooks::CvCity_setupGraphical>(host, &AfterCvCity_setupGraphical);CivRegisterReplace<CivHooks::CvCity_setupGraphical>(host, &ReplaceCvCity_setupGraphical);
Code
1217void CvCity::setupGraphical()1218{1219 VALIDATE_OBJECT1220 if(!GC.IsGraphicsInitialized())1221 {1222 return;1223 }12241225 CvPlayer& player = GET_PLAYER(getOwner());1226 EraTypes eCurrentEra =(EraTypes) player.GetCurrentEra();12271228 auto_ptr<ICvCity1> pkDllCity(new CvDllCity(this));1229 gDLL->GameplayCityCreated(pkDllCity.get(), eCurrentEra);1230 gDLL->GameplayCitySetDamage(pkDllCity.get(), getDamage(), 0);12311232 // setup the wonders1233 setupWonderGraphics();12341235 // setup any special buildings1236 setupBuildingGraphics();12371238 // setup the spaceship1239 setupSpaceshipGraphics();12401241 setLayoutDirty(true);1242}
Calls
- CvCity::getDamage() const
- CvCity::getOwner() const
- CvCity::setLayoutDirty(bool)
- CvCity::setupBuildingGraphics()
- CvCity::setupSpaceshipGraphics()
- CvCity::setupWonderGraphics()
- CvDllCity::CvDllCity(CvCity *)
- CvGlobals::getDLLIFace()
- CvGlobals::IsGraphicsInitialized() const
- CvPlayer::GetCurrentEra() const
- CvPlayerAI::getPlayer(PlayerTypes)
ICvEngineUtility1::GameplayCityCreatedICvEngineUtility1::GameplayCitySetDamagestd::auto_ptr::auto_ptrstd::auto_ptr::get