minimap: try to correct an odd problem with sfml,
+ minor cleaning...
This commit is contained in:
@@ -31,7 +31,6 @@ using namespace ticpp;
|
||||
// TODO: Would be nice if I could avoid depending on mainPtr
|
||||
extern sf::RenderWindow mainPtr;
|
||||
|
||||
extern sf::Texture bg_gworld;
|
||||
const short cDialog::BG_DARK = 5, cDialog::BG_LIGHT = 16;
|
||||
short cDialog::defaultBackground = cDialog::BG_DARK;
|
||||
cDialog* cDialog::topWindow = nullptr;
|
||||
|
@@ -15,8 +15,6 @@
|
||||
|
||||
#include "res_image.hpp"
|
||||
|
||||
extern sf::Texture bg_gworld;
|
||||
|
||||
cButton::cButton(sf::RenderWindow& parent) :
|
||||
cControl(CTRL_BTN,parent),
|
||||
wrapLabel(false),
|
||||
|
@@ -11,8 +11,6 @@
|
||||
#include "dialog.hpp"
|
||||
#include <numeric>
|
||||
|
||||
extern sf::Texture bg_gworld;
|
||||
|
||||
bool cTextMsg::manageFormat(eFormat prop, bool set, boost::any* val) {
|
||||
switch(prop) {
|
||||
case TXT_FRAME:
|
||||
|
@@ -20,7 +20,6 @@
|
||||
#include "dialog.hpp"
|
||||
#include "res_image.hpp"
|
||||
|
||||
extern sf::Texture bg_gworld;
|
||||
extern cCustomGraphics spec_scen_g;
|
||||
const pic_num_t cPict::BLANK = -1;
|
||||
|
||||
|
@@ -61,7 +61,6 @@ extern short num_targets_left;
|
||||
extern location spell_targets[8];
|
||||
extern std::shared_ptr<cScrollbar> text_sbar,item_sbar,shop_sbar;
|
||||
extern std::shared_ptr<cButton> done_btn, help_btn;
|
||||
extern sf::Texture bg_gworld;
|
||||
extern const rectangle sbar_rect,item_sbar_rect,shop_sbar_rect;
|
||||
extern rectangle startup_top;
|
||||
extern rectangle talk_area_rect, word_place_rect;
|
||||
|
@@ -183,6 +183,7 @@ void draw(bool need_refresh) {
|
||||
|
||||
const char* title_string = "Your map:";
|
||||
bool canMap = true;
|
||||
|
||||
static rectangle last_redraw_rect;
|
||||
if (redraw_rect!=last_redraw_rect) {
|
||||
need_refresh=true;
|
||||
@@ -196,6 +197,11 @@ void draw(bool need_refresh) {
|
||||
canMap = false;
|
||||
}
|
||||
else if(need_refresh) {
|
||||
// CHECKME: unsure, but on osx, if mainPtr.setActive() is not called,
|
||||
// the following code does not update the gworld texture if we are
|
||||
// called just after closing a dialog
|
||||
mainPtr.setActive();
|
||||
|
||||
rectangle map_world_rect = rectangle(gworld);
|
||||
gworld.setActive();
|
||||
|
||||
|
@@ -41,7 +41,6 @@ extern eScenMode overall_mode;
|
||||
eDrawMode draw_mode = DRAW_TERRAIN;
|
||||
extern bool editing_town;
|
||||
extern cScenario scenario;
|
||||
extern sf::Texture bg_gworld;
|
||||
|
||||
short mini_map_scales[3] = {12, 6, 4};
|
||||
extern location cur_out, mouse_spot;
|
||||
|
Reference in New Issue
Block a user