| 261 | } |
| 262 | |
| 263 | void BattleAnimationMap::DrawSingle(Bitmap& dst) { |
| 264 | //If animation is targeted on the screen |
| 265 | if (animation.scope == lcf::rpg::Animation::Scope_screen) { |
| 266 | DrawAt(dst, Player::screen_width / 2, Player::screen_height / 2); |
| 267 | return; |
| 268 | } |
| 269 | const int character_height = 24; |
| 270 | int x_off = target->GetScreenX(); |
| 271 | int y_off = target->GetScreenY(false); |
| 272 | if (Scene::instance->type == Scene::Map) { |
| 273 | x_off += static_cast<Scene_Map*>(Scene::instance.get())->spriteset->GetRenderOx(); |
| 274 | y_off += static_cast<Scene_Map*>(Scene::instance.get())->spriteset->GetRenderOy(); |
| 275 | } |
| 276 | int vertical_center = y_off - character_height / 2; |
| 277 | int offset = CalculateOffset(animation.position, character_height); |
| 278 | |
| 279 | DrawAt(dst, x_off, vertical_center + offset); |
| 280 | } |
| 281 | |
| 282 | void BattleAnimationMap::FlashTargets(int r, int g, int b, int p) { |
| 283 | target->Flash(r, g, b, p, 0); |
nothing calls this directly
no test coverage detected