| 46 | } |
| 47 | |
| 48 | int Game_Message::GetRealPosition() { |
| 49 | if (Game_Battle::IsBattleRunning()) { |
| 50 | if (Feature::HasRpg2kBattleSystem()) { |
| 51 | return 2; |
| 52 | } |
| 53 | else { |
| 54 | return 0; |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | if (Main_Data::game_system->IsMessagePositionFixed()) { |
| 59 | return Main_Data::game_system->GetMessagePosition(); |
| 60 | } |
| 61 | else { |
| 62 | // Move Message Box to prevent player hiding |
| 63 | int disp = Main_Data::game_player->GetScreenY(); |
| 64 | |
| 65 | switch (Main_Data::game_system->GetMessagePosition()) { |
| 66 | case 0: // Up |
| 67 | return disp > (16 * 7) ? 0 : 2; |
| 68 | case 1: // Center |
| 69 | if (disp <= 16 * 7) { |
| 70 | return 2; |
| 71 | } |
| 72 | else if (disp >= 16 * 10) { |
| 73 | return 0; |
| 74 | } |
| 75 | else { |
| 76 | return 1; |
| 77 | } |
| 78 | default: // Down |
| 79 | return disp >= (16 * 10) ? 0 : 2; |
| 80 | }; |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | int Game_Message::WordWrap(std::string_view line, const int limit, const WordWrapCallback& callback) { |
| 85 | return WordWrap(line, limit, callback, *Font::Default()); |
nothing calls this directly
no test coverage detected