MCPcopy Create free account
hub / github.com/EasyRPG/Player / Draw

Method Draw

src/sprite_airshipshadow.cpp:58–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58void 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
71void Sprite_AirshipShadow::Update() {
72 if (!Main_Data::game_player->InAirship()) {

Callers

nothing calls this directly

Calls 4

GetAltitudeMethod · 0.80
GetScreenXMethod · 0.80
GetJumpHeightMethod · 0.80
GetScreenYMethod · 0.45

Tested by

no test coverage detected