Skip to content
Browse files

Merge branch 'master' into solarus-1.0.0

Conflicts:
	ChangeLog
	src/menus/PauseSubmenuInventory.cpp
	src/menus/PauseSubmenuMap.cpp
	src/menus/PauseSubmenuOptions.cpp
	src/menus/PauseSubmenuQuestStatus.cpp
  • Loading branch information...
2 parents a48cfe8 + 82339b4 commit 5c79a86e4a8f35b6be367c5966ca1b8ad19a4613 @christopho committed Jun 9, 2012
View
4 ChangeLog
@@ -32,6 +32,10 @@ easier to use, less error-prone.
* Data files are also in Lua now (no more ini files or custom text files).
* Add conversion scripts to upgrade existing data files (but not scripts).
+solarus-0.9.3 (under development)
+
+* The game screen size can now be set at compilation time.
+
solarus-0.9.2 (2012-04-03)
* Fix a crash using a teletransporter to the same map while an enemy is dying
View
5 src/DialogBox.cpp
@@ -122,8 +122,9 @@ void DialogBox::set_vertical_position(VerticalPosition vertical_position) {
}
// set the coordinates of graphic objects
- int x = SOLARUS_SCREEN_WIDTH_MIDDLE-110;
- int y = (vertical_position == POSITION_TOP) ? 32 : 144;
+ int x = SOLARUS_SCREEN_WIDTH_MIDDLE - 110;
+ int y = (vertical_position == POSITION_TOP) ? 32
+ : SOLARUS_SCREEN_HEIGHT - 96;
if (style == STYLE_WITHOUT_FRAME) {
y += (vertical_position == POSITION_TOP) ? (-24) : 24;
View
8 src/hud/HUD.cpp
@@ -36,15 +36,15 @@ HUD::HUD(Game &game):
nb_elements(0),
showing_dialog(false) {
- elements[nb_elements++] = new HeartsView(game, 216, 6);
- elements[nb_elements++] = new RupeesCounter(game, 8, 220);
- elements[nb_elements++] = new MagicBar(game, 216, 27);
+ elements[nb_elements++] = new HeartsView(game, SOLARUS_SCREEN_WIDTH - 104, 6);
+ elements[nb_elements++] = new RupeesCounter(game, 8, SOLARUS_SCREEN_HEIGHT - 20);
+ elements[nb_elements++] = new MagicBar(game, SOLARUS_SCREEN_WIDTH - 104, 27);
elements[nb_elements++] = new ItemIcon(game, 0, 8, 29);
elements[nb_elements++] = new ItemIcon(game, 1, 60, 29);
elements[nb_elements++] = new SwordIcon(game, 10, 29);
elements[nb_elements++] = new PauseIcon(game, -3, 7);
elements[nb_elements++] = new ActionIcon(game, 23, 51);
- elements[nb_elements++] = new SmallKeysCounter(game, 284, 222);
+ elements[nb_elements++] = new SmallKeysCounter(game, SOLARUS_SCREEN_WIDTH - 36, SOLARUS_SCREEN_HEIGHT - 18);
elements[nb_elements++] = new FloorView(game, 5, 70);
}
View
6 src/menus/PauseSubmenu.cpp
@@ -74,7 +74,7 @@ void PauseSubmenu::set_caption_text(const std::string &text) {
if (index == std::string::npos) {
// only one line
- caption_text_1->set_y(209);
+ caption_text_1->set_y(SOLARUS_SCREEN_HEIGHT_MIDDLE + 89);
caption_text_1->set_text(text);
caption_text_2->set_text("");
}
@@ -84,8 +84,8 @@ void PauseSubmenu::set_caption_text(const std::string &text) {
const std::string line1 = text.substr(0, index);
const std::string line2 = text.substr(index + 1);
- caption_text_1->set_y(203);
- caption_text_2->set_y(215);
+ caption_text_1->set_y(SOLARUS_SCREEN_HEIGHT_MIDDLE + 83);
+ caption_text_2->set_y(SOLARUS_SCREEN_HEIGHT_MIDDLE + 95);
caption_text_1->set_text(line1);
caption_text_2->set_text(line2);
}
View
23 src/menus/PauseSubmenuInventory.cpp
@@ -62,8 +62,8 @@ PauseSubmenuInventory::PauseSubmenuInventory(PauseMenu &pause_menu, Game &game):
int amount = equipment.get_item_amount(item_names[k]);
int maximum = equipment.get_item_maximum(item_names[k]);
- int x = SOLARUS_SCREEN_WIDTH_MIDDLE-100 + (k % 7) * 32;
- int y = 81 + (k / 7) * 32;
+ int x = SOLARUS_SCREEN_WIDTH_MIDDLE - 100 + (k % 7) * 32;
+ int y = SOLARUS_SCREEN_HEIGHT_MIDDLE - 39 + (k / 7) * 32;
counters[k] = new Counter(2, false, x, y);
counters[k]->set_maximum(maximum);
@@ -274,12 +274,12 @@ void PauseSubmenuInventory::display(Surface& dst_surface) {
PauseSubmenu::display(dst_surface);
// display each inventory item
- Rectangle dst_xy(0, 82);
+ Rectangle dst_xy(0, SOLARUS_SCREEN_HEIGHT_MIDDLE - 38);
int k = 0;
for (int i = 0; i < 4; i++) {
- dst_xy.set_x(SOLARUS_SCREEN_WIDTH_MIDDLE-96);
+ dst_xy.set_x(SOLARUS_SCREEN_WIDTH_MIDDLE - 96);
for (int j = 0; j < 7; j++, k++) {
@@ -303,8 +303,8 @@ void PauseSubmenuInventory::display(Surface& dst_surface) {
}
// display the cursor
- int x = SOLARUS_SCREEN_WIDTH_MIDDLE-96 + 32 * cursor_column;
- int y = 77 + 32 * cursor_row;
+ int x = SOLARUS_SCREEN_WIDTH_MIDDLE - 96 + 32 * cursor_column;
+ int y = SOLARUS_SCREEN_HEIGHT_MIDDLE - 43 + 32 * cursor_row;
cursor_sprite->display(dst_surface, x, y);
@@ -328,7 +328,8 @@ void PauseSubmenuInventory::show_info_message() {
std::ostringstream oss;
oss << "_item_description." << item_name << '.' << variant;
- DialogBox::VerticalPosition vertical_position = (cursor_row >= 2) ? DialogBox::POSITION_TOP : DialogBox::POSITION_BOTTOM;
+ DialogBox::VerticalPosition vertical_position = (cursor_row >= 2) ?
+ DialogBox::POSITION_TOP : DialogBox::POSITION_BOTTOM;
game.get_dialog_box().start_dialog(oss.str(), NULL, vertical_position);
}
@@ -367,10 +368,10 @@ void PauseSubmenuInventory::assign_item(int slot) {
Sound::play("throw");
// compute the movement
- int x1 = 60 + 32 * cursor_column;
- int y1 = 75 + 32 * cursor_row;
- int x2 = (slot == 0) ? 20 : 72;
- int y2 = 46;
+ int x1 = SOLARUS_SCREEN_WIDTH_MIDDLE - 100 + 32 * cursor_column;
+ int y1 = SOLARUS_SCREEN_HEIGHT_MIDDLE - 45 + 32 * cursor_row;
+ int x2 = SOLARUS_SCREEN_WIDTH_MIDDLE - ((slot == 0) ? 140 : 88);
+ int y2 = SOLARUS_SCREEN_HEIGHT_MIDDLE - 74;
item_assigned_movement = new TargetMovement(x2, y2, 500, true);
item_assigned_movement->set_xy(x1, y1);
View
50 src/menus/PauseSubmenuMap.cpp
@@ -67,7 +67,8 @@ PauseSubmenuMap::PauseSubmenuMap(PauseMenu &pause_menu, Game &game):
world_minimap_visible_y = 0;
}
moving_visible_y = 0;
- hero_position.add_xy(48 - 8, 59 - 6);
+ hero_position.add_xy(SOLARUS_SCREEN_WIDTH_MIDDLE - 120,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE - 67);
hero_point_sprite = NULL;
if (equipment.has_ability("see_outside_world_minimap")) {
@@ -87,7 +88,8 @@ PauseSubmenuMap::PauseSubmenuMap(PauseMenu &pause_menu, Game &game):
dungeon_map_background = new Surface("menus/dungeon_map_background.png");
dungeon_map_icons = new Surface("menus/dungeon_map_icons.png");
- small_keys_counter = new Counter(2, false, SOLARUS_SCREEN_WIDTH_MIDDLE-36, 182);
+ small_keys_counter = new Counter(2, false,
+ SOLARUS_SCREEN_WIDTH_MIDDLE - 36, SOLARUS_SCREEN_HEIGHT_MIDDLE + 62);
small_keys_counter->set_value(equipment.get_small_keys());
// floors
@@ -400,7 +402,8 @@ void PauseSubmenuMap::display_world_map(Surface& dst_surface) {
// display the surface
Rectangle src_position(0, world_minimap_visible_y, 225, 133);
- static Rectangle dst_position(SOLARUS_SCREEN_WIDTH_MIDDLE-112, 59, 0, 0);
+ static Rectangle dst_position(SOLARUS_SCREEN_WIDTH_MIDDLE - 112,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE - 61, 0, 0);
world_map_img->display_region(src_position, dst_surface, dst_position);
@@ -415,13 +418,17 @@ void PauseSubmenuMap::display_world_map(Surface& dst_surface) {
// display the arrows
if (world_minimap_visible_y > 0) {
- up_arrow_sprite->display(dst_surface, 96, 55);
- up_arrow_sprite->display(dst_surface, 211, 55);
+ up_arrow_sprite->display(dst_surface,
+ SOLARUS_SCREEN_WIDTH_MIDDLE - 64, SOLARUS_SCREEN_HEIGHT_MIDDLE - 65);
+ up_arrow_sprite->display(dst_surface,
+ SOLARUS_SCREEN_WIDTH_MIDDLE + 51, SOLARUS_SCREEN_HEIGHT_MIDDLE - 65);
}
if (world_minimap_visible_y < 388 - 133) {
- down_arrow_sprite->display(dst_surface, 96, 188);
- down_arrow_sprite->display(dst_surface, 211, 188);
+ down_arrow_sprite->display(dst_surface,
+ SOLARUS_SCREEN_WIDTH_MIDDLE - 64, SOLARUS_SCREEN_HEIGHT_MIDDLE + 68);
+ down_arrow_sprite->display(dst_surface,
+ SOLARUS_SCREEN_WIDTH_MIDDLE + 51, SOLARUS_SCREEN_HEIGHT_MIDDLE + 68);
}
}
}
@@ -433,7 +440,8 @@ void PauseSubmenuMap::display_world_map(Surface& dst_surface) {
void PauseSubmenuMap::display_dungeon_map(Surface& dst_surface) {
// show the special background
- Rectangle dst_position(SOLARUS_SCREEN_WIDTH_MIDDLE - 112, 59);
+ Rectangle dst_position(SOLARUS_SCREEN_WIDTH_MIDDLE - 112,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE - 61);
dungeon_map_background->display(dst_surface, dst_position);
// show the dungeon items
@@ -443,7 +451,8 @@ void PauseSubmenuMap::display_dungeon_map(Surface& dst_surface) {
display_dungeon_floors(dst_surface);
// show the map itself
- dst_position.set_xy(SOLARUS_SCREEN_WIDTH_MIDDLE - 17, 66);
+ dst_position.set_xy(SOLARUS_SCREEN_WIDTH_MIDDLE - 17,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE - 54);
dungeon_map_img->display(dst_surface, dst_position);
if (hero_point_sprite != NULL && selected_floor == hero_floor) {
@@ -460,34 +469,39 @@ void PauseSubmenuMap::display_dungeon_items(Surface& dst_surface) {
// rooms
if (equipment.has_ability("see_dungeon_minimap_rooms")) {
Rectangle src_position(0, 0, 17, 17);
- Rectangle dst_position(SOLARUS_SCREEN_WIDTH_MIDDLE - 110, 168);
+ Rectangle dst_position(SOLARUS_SCREEN_WIDTH_MIDDLE - 110,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE + 48);
dungeon_map_icons->display_region(src_position, dst_surface, dst_position);
}
// elements
if (equipment.has_ability("see_dungeon_minimap_elements")) {
Rectangle src_position(17, 0, 17, 17);
- Rectangle dst_position(SOLARUS_SCREEN_WIDTH_MIDDLE - 91, 168);
+ Rectangle dst_position(SOLARUS_SCREEN_WIDTH_MIDDLE - 91,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE + 48);
dungeon_map_icons->display_region(src_position, dst_surface, dst_position);
}
// big key
if (equipment.has_ability("open_dungeon_big_locks")) {
Rectangle src_position(34, 0, 17, 17);
- Rectangle dst_position(SOLARUS_SCREEN_WIDTH_MIDDLE - 72, 168);
+ Rectangle dst_position(SOLARUS_SCREEN_WIDTH_MIDDLE - 72,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE + 48);
dungeon_map_icons->display_region(src_position, dst_surface, dst_position);
}
// boss key
if (equipment.has_ability("open_dungeon_boss_locks")) {
Rectangle src_position(51, 0, 17, 17);
- Rectangle dst_position(SOLARUS_SCREEN_WIDTH_MIDDLE - 53, 168);
+ Rectangle dst_position(SOLARUS_SCREEN_WIDTH_MIDDLE - 53,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE + 48);
dungeon_map_icons->display_region(src_position, dst_surface, dst_position);
}
// small keys
Rectangle src_position(68, 0, 9, 17);
- Rectangle dst_position(SOLARUS_SCREEN_WIDTH_MIDDLE - 34, 168);
+ Rectangle dst_position(SOLARUS_SCREEN_WIDTH_MIDDLE - 34,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE + 48);
dungeon_map_icons->display_region(src_position, dst_surface, dst_position);
small_keys_counter->display(dst_surface);
}
@@ -502,7 +516,7 @@ void PauseSubmenuMap::display_dungeon_floors(Surface& dst_surface) {
int src_y = (15 - highest_floor_displayed) * 12;
int src_height = nb_floors_displayed * 12 + 1;
- int dst_y = 70 + (7 - nb_floors_displayed) * 6;
+ int dst_y = SOLARUS_SCREEN_HEIGHT_MIDDLE - 50 + (7 - nb_floors_displayed) * 6;
Rectangle src_position(96, src_y, 32, src_height);
Rectangle dst_position(SOLARUS_SCREEN_WIDTH_MIDDLE - 81, dst_y);
@@ -538,11 +552,13 @@ void PauseSubmenuMap::display_dungeon_floors(Surface& dst_surface) {
// display the arrows
if (lowest_floor_displayed > lowest_floor) {
- down_arrow_sprite->display(dst_surface, SOLARUS_SCREEN_WIDTH_MIDDLE - 71, 151);
+ down_arrow_sprite->display(dst_surface, SOLARUS_SCREEN_WIDTH_MIDDLE - 71,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE + 31);
}
if (highest_floor_displayed < highest_floor) {
- up_arrow_sprite->display(dst_surface, SOLARUS_SCREEN_WIDTH_MIDDLE - 71, 66);
+ up_arrow_sprite->display(dst_surface, SOLARUS_SCREEN_WIDTH_MIDDLE - 71,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE - 64);
}
}
View
51 src/menus/PauseSubmenuOptions.cpp
@@ -47,18 +47,26 @@ PauseSubmenuOptions::PauseSubmenuOptions(PauseMenu &pause_menu, Game &game):
caption_strings[2] = StringResource::get_string("options.caption.press_key");
// create the text surfaces
- video_mode_text = new TextSurface(SOLARUS_SCREEN_WIDTH_MIDDLE+104, 62, TextSurface::ALIGN_RIGHT, TextSurface::ALIGN_TOP);
+ video_mode_text = new TextSurface(SOLARUS_SCREEN_WIDTH_MIDDLE + 104,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE - 58,
+ TextSurface::ALIGN_RIGHT, TextSurface::ALIGN_TOP);
video_mode_text->set_font("fixed");
- controls_text = new TextSurface(SOLARUS_SCREEN_WIDTH_MIDDLE-76, 83, TextSurface::ALIGN_CENTER, TextSurface::ALIGN_TOP);
+ controls_text = new TextSurface(SOLARUS_SCREEN_WIDTH_MIDDLE - 76,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE - 37,
+ TextSurface::ALIGN_CENTER, TextSurface::ALIGN_TOP);
controls_text->set_font("fixed");
controls_text->set_text(StringResource::get_string("options.commands_column"));
- keyboard_text = new TextSurface(SOLARUS_SCREEN_WIDTH_MIDDLE-7, 83, TextSurface::ALIGN_CENTER, TextSurface::ALIGN_TOP);
+ keyboard_text = new TextSurface(SOLARUS_SCREEN_WIDTH_MIDDLE - 7,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE - 37,
+ TextSurface::ALIGN_CENTER, TextSurface::ALIGN_TOP);
keyboard_text->set_font("fixed");
keyboard_text->set_text(StringResource::get_string("options.keyboard_column"));
- joypad_text = new TextSurface(SOLARUS_SCREEN_WIDTH_MIDDLE+69, 83, TextSurface::ALIGN_CENTER, TextSurface::ALIGN_TOP);
+ joypad_text = new TextSurface(SOLARUS_SCREEN_WIDTH_MIDDLE + 69,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE - 37,
+ TextSurface::ALIGN_CENTER, TextSurface::ALIGN_TOP);
joypad_text->set_font("fixed");
joypad_text->set_text(StringResource::get_string("options.joypad_column"));
@@ -157,25 +165,27 @@ void PauseSubmenuOptions::set_cursor_position(int position) {
if (position == 0) { // screen mode
set_caption_text(caption_strings[0]);
- cursor_sprite_position.set_xy(SOLARUS_SCREEN_WIDTH_MIDDLE-56, 62);
+ cursor_sprite_position.set_xy(SOLARUS_SCREEN_WIDTH_MIDDLE - 56,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE - 58);
cursor_sprite->set_current_animation("big");
}
else { // key customization
set_caption_text(caption_strings[1]);
// make sure the selected key is visible
while (position < highest_visible_key) {
- highest_visible_key--;
- controls_visible_y -= 16;
+ highest_visible_key--;
+ controls_visible_y -= 16;
}
while (position > highest_visible_key + 4) {
- highest_visible_key++;
- controls_visible_y += 16;
+ highest_visible_key++;
+ controls_visible_y += 16;
}
- cursor_sprite_position.set_x(SOLARUS_SCREEN_WIDTH_MIDDLE-105);
- cursor_sprite_position.set_y(104 + (position - highest_visible_key) * 16);
+ cursor_sprite_position.set_x(SOLARUS_SCREEN_WIDTH_MIDDLE - 105);
+ cursor_sprite_position.set_y(
+ SOLARUS_SCREEN_HEIGHT_MIDDLE - 16 + (position - highest_visible_key) * 16);
cursor_sprite->set_current_animation("small");
}
}
@@ -284,18 +294,27 @@ void PauseSubmenuOptions::display(Surface& dst_surface) {
joypad_text->display(dst_surface);
Rectangle src_position(0, controls_visible_y, 215, 84);
- static Rectangle dst_position(SOLARUS_SCREEN_WIDTH_MIDDLE - 107, 102);
+ static Rectangle dst_position(SOLARUS_SCREEN_WIDTH_MIDDLE - 107,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE - 18);
controls_surface->display_region(src_position, dst_surface, dst_position);
// display the arrows
if (controls_visible_y > 0) {
- up_arrow_sprite->display(dst_surface, 96, 96);
- up_arrow_sprite->display(dst_surface, 211, 96);
+ up_arrow_sprite->display(dst_surface,
+ SOLARUS_SCREEN_WIDTH_MIDDLE - 64,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE - 24);
+ up_arrow_sprite->display(dst_surface,
+ SOLARUS_SCREEN_WIDTH_MIDDLE + 91,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE - 24);
}
if (controls_visible_y < 60) {
- down_arrow_sprite->display(dst_surface, 96, 182);
- down_arrow_sprite->display(dst_surface, 211, 182);
+ down_arrow_sprite->display(dst_surface,
+ SOLARUS_SCREEN_WIDTH_MIDDLE - 64,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE + 62);
+ down_arrow_sprite->display(dst_surface,
+ SOLARUS_SCREEN_WIDTH_MIDDLE + 91,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE + 62);
}
}
View
65 src/menus/PauseSubmenuQuestStatus.cpp
@@ -50,7 +50,8 @@ PauseSubmenuQuestStatus::PauseSubmenuQuestStatus(PauseMenu& pause_menu, Game& ga
{
int tunic = equipment.get_ability("tunic");
Rectangle src_position((tunic - 1) * 16, 96, 16, 16);
- Rectangle dst_position(SOLARUS_SCREEN_WIDTH_MIDDLE + 17, 164);
+ Rectangle dst_position(SOLARUS_SCREEN_WIDTH_MIDDLE + 17,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE + 44);
treasures_img.display_region(src_position, quest_items_surface, dst_position);
oss << "quest_status.caption.tunic_" << tunic;
@@ -62,7 +63,8 @@ PauseSubmenuQuestStatus::PauseSubmenuQuestStatus(PauseMenu& pause_menu, Game& ga
if (equipment.has_ability("sword")) {
int sword = equipment.get_ability("sword");
Rectangle src_position(80 + sword * 16, 96, 16, 16);
- Rectangle dst_position(SOLARUS_SCREEN_WIDTH_MIDDLE + 51, 164);
+ Rectangle dst_position(SOLARUS_SCREEN_WIDTH_MIDDLE + 51,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE + 44);
treasures_img.display_region(src_position, quest_items_surface, dst_position);
oss << "quest_status.caption.sword_" << sword;
@@ -74,7 +76,8 @@ PauseSubmenuQuestStatus::PauseSubmenuQuestStatus(PauseMenu& pause_menu, Game& ga
if (equipment.has_ability("shield")) {
int shield = equipment.get_ability("shield");
Rectangle src_position(32 + shield * 16, 96, 16, 16);
- Rectangle dst_position(SOLARUS_SCREEN_WIDTH_MIDDLE + 85, 164);
+ Rectangle dst_position(SOLARUS_SCREEN_WIDTH_MIDDLE + 85,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE + 44);
treasures_img.display_region(src_position, quest_items_surface, dst_position);
oss << "quest_status.caption.shield_" << shield;
@@ -87,7 +90,8 @@ PauseSubmenuQuestStatus::PauseSubmenuQuestStatus(PauseMenu& pause_menu, Game& ga
int rupee_bag = equipment.get_item_variant("rupee_bag");
Rectangle src_position(rupee_bag * 16, 80, 16, 16);
- Rectangle dst_position(SOLARUS_SCREEN_WIDTH_MIDDLE - 100, 71);
+ Rectangle dst_position(SOLARUS_SCREEN_WIDTH_MIDDLE - 100,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE - 49);
treasures_img.display_region(src_position, quest_items_surface, dst_position);
oss << "quest_status.caption.rupee_bag_" << rupee_bag;
@@ -99,7 +103,8 @@ PauseSubmenuQuestStatus::PauseSubmenuQuestStatus(PauseMenu& pause_menu, Game& ga
int bomb_bag = equipment.get_item_variant("bomb_bag");
if (bomb_bag != 0) {
Rectangle src_position(48 + bomb_bag * 16, 80, 16, 16);
- Rectangle dst_position(SOLARUS_SCREEN_WIDTH_MIDDLE - 100, 100);
+ Rectangle dst_position(SOLARUS_SCREEN_WIDTH_MIDDLE - 100,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE - 20);
treasures_img.display_region(src_position, quest_items_surface, dst_position);
oss << "quest_status.caption.bomb_bag_" << bomb_bag;
@@ -112,7 +117,8 @@ PauseSubmenuQuestStatus::PauseSubmenuQuestStatus(PauseMenu& pause_menu, Game& ga
if (quiver != 0) {
Rectangle src_position(96 + quiver * 16, 80, 16, 16);
- Rectangle dst_position(SOLARUS_SCREEN_WIDTH_MIDDLE - 100, 130);
+ Rectangle dst_position(SOLARUS_SCREEN_WIDTH_MIDDLE - 100,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE + 10);
treasures_img.display_region(src_position, quest_items_surface, dst_position);
oss << "quest_status.caption.quiver_" << quiver;
@@ -123,7 +129,8 @@ PauseSubmenuQuestStatus::PauseSubmenuQuestStatus(PauseMenu& pause_menu, Game& ga
// world map
if (equipment.has_item("world_map")) {
Rectangle src_position(0, 80, 16, 16);
- Rectangle dst_position(SOLARUS_SCREEN_WIDTH_MIDDLE - 100, 164);
+ Rectangle dst_position(SOLARUS_SCREEN_WIDTH_MIDDLE - 100,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE + 44);
treasures_img.display_region(src_position, quest_items_surface, dst_position);
caption_texts[3] = StringResource::get_string("quest_status.caption.world_map");
@@ -133,7 +140,8 @@ PauseSubmenuQuestStatus::PauseSubmenuQuestStatus(PauseMenu& pause_menu, Game& ga
{
int x = 51 * savegame.get_integer(1030);
Rectangle src_position(x, 0, 51, 50);
- Rectangle dst_position(SOLARUS_SCREEN_WIDTH_MIDDLE - 59, 82);
+ Rectangle dst_position(SOLARUS_SCREEN_WIDTH_MIDDLE - 59,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE -38);
pieces_of_heart_img.display_region(src_position, quest_items_surface, dst_position);
caption_texts[4] = StringResource::get_string("quest_status.caption.pieces_of_heart");
@@ -142,14 +150,22 @@ PauseSubmenuQuestStatus::PauseSubmenuQuestStatus(PauseMenu& pause_menu, Game& ga
// dungeons finished
{
static const Rectangle dst_positions[] = {
- Rectangle(SOLARUS_SCREEN_WIDTH_MIDDLE + 49, 69),
- Rectangle(SOLARUS_SCREEN_WIDTH_MIDDLE + 72, 74),
- Rectangle(SOLARUS_SCREEN_WIDTH_MIDDLE + 83, 97),
- Rectangle(SOLARUS_SCREEN_WIDTH_MIDDLE + 72, 120),
- Rectangle(SOLARUS_SCREEN_WIDTH_MIDDLE + 49, 127),
- Rectangle(SOLARUS_SCREEN_WIDTH_MIDDLE + 26, 120),
- Rectangle(SOLARUS_SCREEN_WIDTH_MIDDLE + 15, 97),
- Rectangle(SOLARUS_SCREEN_WIDTH_MIDDLE + 26, 74)
+ Rectangle(SOLARUS_SCREEN_WIDTH_MIDDLE + 49,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE - 51),
+ Rectangle(SOLARUS_SCREEN_WIDTH_MIDDLE + 72,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE - 46),
+ Rectangle(SOLARUS_SCREEN_WIDTH_MIDDLE + 83,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE - 23),
+ Rectangle(SOLARUS_SCREEN_WIDTH_MIDDLE + 72,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE),
+ Rectangle(SOLARUS_SCREEN_WIDTH_MIDDLE + 49,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE + 7),
+ Rectangle(SOLARUS_SCREEN_WIDTH_MIDDLE + 26,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE),
+ Rectangle(SOLARUS_SCREEN_WIDTH_MIDDLE + 15,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE - 23),
+ Rectangle(SOLARUS_SCREEN_WIDTH_MIDDLE + 26,
+ SOLARUS_SCREEN_HEIGHT_MIDDLE - 46)
};
for (int i = 0; i < 8; i++) {
if (equipment.is_dungeon_finished(i + 1)) {
@@ -181,35 +197,36 @@ void PauseSubmenuQuestStatus::set_cursor_position(int position) {
this->cursor_position = position;
if (position <= 3) {
- cursor_sprite_position.set_x(SOLARUS_SCREEN_WIDTH_MIDDLE-92);
+ cursor_sprite_position.set_x(SOLARUS_SCREEN_WIDTH_MIDDLE- 92);
}
else if (position == 4) {
- cursor_sprite_position.set_x(SOLARUS_SCREEN_WIDTH_MIDDLE-34);
+ cursor_sprite_position.set_x(SOLARUS_SCREEN_WIDTH_MIDDLE - 34);
}
else {
- cursor_sprite_position.set_x(SOLARUS_SCREEN_WIDTH_MIDDLE-141 + 34 * position - 4);
+ cursor_sprite_position.set_x(
+ SOLARUS_SCREEN_WIDTH_MIDDLE - 141 + 34 * position - 4);
}
switch (position) {
case 0:
- cursor_sprite_position.set_y(79);
+ cursor_sprite_position.set_y(SOLARUS_SCREEN_HEIGHT_MIDDLE - 41);
break;
case 1:
- cursor_sprite_position.set_y(108);
+ cursor_sprite_position.set_y(SOLARUS_SCREEN_HEIGHT_MIDDLE - 12);
break;
case 2:
- cursor_sprite_position.set_y(138);
+ cursor_sprite_position.set_y(SOLARUS_SCREEN_HEIGHT_MIDDLE + 18);
break;
case 4:
- cursor_sprite_position.set_y(107);
+ cursor_sprite_position.set_y(SOLARUS_SCREEN_HEIGHT_MIDDLE - 13);
break;
default:
- cursor_sprite_position.set_y(172);
+ cursor_sprite_position.set_y(SOLARUS_SCREEN_HEIGHT_MIDDLE + 52);
break;
}

0 comments on commit 5c79a86

Please sign in to comment.
Something went wrong with that request. Please try again.