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

Function createEntityMisc

src/OpenLoco/src/Entities/EntityManager.cpp:263–276  ·  view source on GitHub ↗

0x004700A5

Source from the content-addressed store, hash-verified

261
262 // 0x004700A5
263 EntityBase* createEntityMisc()
264 {
265 if (getListCount(EntityListType::misc) >= Limits::kMaxMiscEntities)
266 {
267 return nullptr;
268 }
269 if (getListCount(EntityListType::null) <= 0)
270 {
271 return nullptr;
272 }
273
274 auto newId = rawListHeads()[enumValue(EntityListType::null)];
275 return createEntity(newId, EntityListType::misc);
276 }
277
278 // 0x0047011C
279 EntityBase* createEntityMoney()

Callers 6

createMethod · 0.85
createMethod · 0.85
createMethod · 0.85
createMethod · 0.85
createMethod · 0.85
createMethod · 0.85

Calls 3

getListCountFunction · 0.85
enumValueFunction · 0.85
createEntityFunction · 0.85

Tested by

no test coverage detected