| 237 | static void zeroEntity(EntityBase* ent); |
| 238 | |
| 239 | static EntityBase* createEntity(EntityId id, EntityListType list) |
| 240 | { |
| 241 | auto* newEntity = get<EntityBase>(id); |
| 242 | if (newEntity == nullptr) |
| 243 | { |
| 244 | Logging::error("Tried to create invalid entity! id: {}, list: {}", enumValue(id), enumValue(list)); |
| 245 | return nullptr; |
| 246 | } |
| 247 | zeroEntity(newEntity); |
| 248 | moveEntityToList(newEntity, list); |
| 249 | |
| 250 | newEntity->position = { Location::null, Location::null, 0 }; |
| 251 | insertToSpatialIndex(*newEntity); |
| 252 | |
| 253 | newEntity->name = StringIds::empty_pop; |
| 254 | newEntity->spriteWidth = 16; |
| 255 | newEntity->spriteHeightNegative = 20; |
| 256 | newEntity->spriteHeightPositive = 8; |
| 257 | newEntity->spriteLeft = Location::null; |
| 258 | |
| 259 | return newEntity; |
| 260 | } |
| 261 | |
| 262 | // 0x004700A5 |
| 263 | EntityBase* createEntityMisc() |
no test coverage detected