| 56 | } |
| 57 | |
| 58 | void Sprite_AirshipShadow::Draw(Bitmap &dst) { |
| 59 | Game_Vehicle* airship = Game_Map::GetVehicle(Game_Vehicle::Airship); |
| 60 | const int altitude = airship->GetAltitude(); |
| 61 | const int max_altitude = TILE_SIZE; |
| 62 | const double opacity = (double)altitude / max_altitude; |
| 63 | SetOpacity(opacity * 255); |
| 64 | |
| 65 | SetX(Main_Data::game_player->GetScreenX() + x_offset); |
| 66 | SetY(Main_Data::game_player->GetScreenY() + y_offset + Main_Data::game_player->GetJumpHeight()); |
| 67 | |
| 68 | Sprite::Draw(dst); |
| 69 | } |
| 70 | |
| 71 | void Sprite_AirshipShadow::Update() { |
| 72 | if (!Main_Data::game_player->InAirship()) { |
nothing calls this directly
no test coverage detected