MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / create

Method create

src/OpenLoco/src/Effects/SplashEffect.cpp:18–40  ·  view source on GitHub ↗

0x00440C6B

Source from the content-addressed store, hash-verified

16
17 // 0x00440C6B
18 Splash* Splash::create(const World::Pos3& pos)
19 {
20 if (!World::validCoords(pos))
21 {
22 return nullptr;
23 }
24
25 auto* splashEnt = static_cast<Splash*>(EntityManager::createEntityMisc());
26 if (splashEnt == nullptr)
27 {
28 return nullptr;
29 }
30
31 splashEnt->baseType = EntityBaseType::effect;
32 splashEnt->spriteWidth = 33;
33 splashEnt->spriteHeightNegative = 51;
34 splashEnt->spriteHeightPositive = 16;
35 splashEnt->setSubType(EffectType::splash);
36 splashEnt->moveTo(pos + World::Pos3{ 0, 3, 0 });
37 splashEnt->frame = 0;
38
39 return splashEnt;
40 }
41
42}

Callers

nothing calls this directly

Calls 4

validCoordsFunction · 0.85
createEntityMiscFunction · 0.85
moveToMethod · 0.80
setSubTypeMethod · 0.45

Tested by

no test coverage detected