0x0044080C
| 118 | |
| 119 | // 0x0044080C |
| 120 | Exhaust* Exhaust::create(World::Pos3 loc, uint8_t type) |
| 121 | { |
| 122 | if (!World::validCoords(loc)) |
| 123 | { |
| 124 | return nullptr; |
| 125 | } |
| 126 | auto surface = World::TileManager::get(loc.x & 0xFFE0, loc.y & 0xFFE0).surface(); |
| 127 | |
| 128 | if (surface == nullptr) |
| 129 | { |
| 130 | return nullptr; |
| 131 | } |
| 132 | |
| 133 | if (loc.z <= surface->baseHeight()) |
| 134 | { |
| 135 | return nullptr; |
| 136 | } |
| 137 | |
| 138 | auto _exhaust = static_cast<Exhaust*>(EntityManager::createEntityMisc()); |
| 139 | |
| 140 | if (_exhaust != nullptr) |
| 141 | { |
| 142 | _exhaust->baseType = EntityBaseType::effect; |
| 143 | _exhaust->objectId = type; |
| 144 | const auto* obj = _exhaust->getObject(); |
| 145 | _exhaust->spriteWidth = obj->spriteWidth; |
| 146 | _exhaust->spriteHeightNegative = obj->spriteHeightNegative; |
| 147 | _exhaust->spriteHeightPositive = obj->spriteHeightPositive; |
| 148 | _exhaust->setSubType(EffectType::exhaust); |
| 149 | _exhaust->frameNum = 0; |
| 150 | _exhaust->stationaryProgress = 0; |
| 151 | _exhaust->windProgress = 0; |
| 152 | _exhaust->var_34 = 0; |
| 153 | _exhaust->var_36 = 0; |
| 154 | _exhaust->moveTo(loc); |
| 155 | } |
| 156 | return _exhaust; |
| 157 | } |
| 158 | } |
nothing calls this directly
no test coverage detected