Fix major automap display glitch

This commit is contained in:
2016-09-27 23:55:20 -04:00
parent 9aed4b418f
commit 6fa7603f71
5 changed files with 13 additions and 25 deletions

View File

@@ -237,6 +237,11 @@ void init_screen_locs() {
item_area_rect.left = ITEM_WIN_UL_X;
item_area_rect.bottom = ITEM_WIN_UL_Y + 143;
item_area_rect.right = ITEM_WIN_UL_X + 271;
extern rectangle win_to_rects[6];
win_to_rects[5].offset(TEXT_WIN_UL_X,TEXT_WIN_UL_Y);
win_to_rects[2].offset(PC_WIN_UL_X,PC_WIN_UL_Y);
win_to_rects[3].offset(ITEM_WIN_UL_X,ITEM_WIN_UL_Y);
}
bool prime_time() {

View File

@@ -430,28 +430,6 @@ static void loadImageToRenderTexture(sf::RenderTexture& tex, std::string imgName
rect_draw_some_item(temp_gworld, texrect, tex, texrect, sf::BlendNone);
}
// This loads the graphics at the top of the game.
void Set_up_win () {
rectangle temp_rect = {0,0,0,280},map_world_rect;
rectangle map_rect = {0,0,384,384};
rectangle pc_rect = {0,0,216,113};
rectangle r;
win_to_rects[5].offset(TEXT_WIN_UL_X,TEXT_WIN_UL_Y);
win_to_rects[2].offset(PC_WIN_UL_X,PC_WIN_UL_Y);
win_to_rects[3].offset(ITEM_WIN_UL_X,ITEM_WIN_UL_Y);
// Create and initialize map gworld
if(!map_gworld.create(map_rect.width(), map_rect.height())) {
play_sound(2);
throw std::string("Failed to initialized automap!");
} else {
map_world_rect = rectangle(map_gworld);
fill_rect(map_gworld, map_world_rect, sf::Color::White);
}
}
void load_main_screen() {
// Preload the main game interface images
ResMgr::get<ImageRsrc>("invenbtns");

View File

@@ -28,7 +28,6 @@ void draw_start_button(short which_position,short which_button);
void main_button_click(int which_button);
void arrow_button_click(rectangle button_rect);
void end_startup();
void Set_up_win ();
void load_main_screen();
void redraw_screen(int refresh);
void put_background();

View File

@@ -680,9 +680,16 @@ void init_mini_map() {
mini_map.create(sf::VideoMode(296,277), "Map", sf::Style::Titlebar | sf::Style::Close);
mini_map.setPosition(sf::Vector2i(52,62));
mini_map.setVisible(false);
map_gworld.create(240,240);
setWindowFloating(mini_map, true);
makeFrontWindow(mainPtr);
// Create and initialize map gworld
if(!map_gworld.create(384, 384)) {
play_sound(2);
throw std::string("Failed to initialized automap!");
} else {
map_gworld.clear(sf::Color::White);
}
}
void make_cursor_watch() {

View File

@@ -179,7 +179,6 @@ void init_boe(int argc, char* argv[]) {
check_for_intel();
srand(time(nullptr));
init_screen_locs();
Set_up_win();
init_startup();
flushingInput = true;
});