Make the automap actually work

- Except that it's showing just black and white instead of the proper terrain pictures
- Fixed towns not initializing some flags, such as defy_mapping, causing them to be true when they shouldn't be
- Fix Ellipse shapes not being correctly positioned
This commit is contained in:
2014-04-14 21:16:35 -04:00
parent 121273bf57
commit 3c3ed04ca7
12 changed files with 93 additions and 199 deletions

View File

@@ -843,7 +843,7 @@ public:
sf::Vector2f getPoint(unsigned int i) const override {
int t = i * divSz;
return sf::Vector2f(a*sin(t), b*cos(t));
return sf::Vector2f(a + a*sin(t), b + b*cos(t));
}
// TODO: Additional functions?

View File

@@ -17,6 +17,8 @@ namespace fs = boost::filesystem; // TODO: Centralize this alias
bool isFrontWindow(sf::Window& win);
void makeFrontWindow(sf::Window& win);
void setWindowFloating(sf::Window& win, bool floating);
void init_fileio();
fs::path nav_get_party();

View File

@@ -21,15 +21,21 @@ bool isFrontWindow(sf::Window& win) {
return false;
}
void makeFrontWindow(sf::Window& win, bool acceptKeyInput) {
void makeFrontWindow(sf::Window& win) {
sf::WindowHandle handle = win.getSystemHandle();
id nsHandle = id(handle);
if([nsHandle isKindOfClass: [NSWindow class]]) {
[nsHandle orderFrontRegardless];
if(acceptKeyInput) {
[nsHandle makeMainWindow];
[nsHandle makeKeyWindow];
}
[nsHandle makeMainWindow];
[nsHandle makeKeyWindow];
}
}
void setWindowFloating(sf::Window& win, bool floating) {
sf::WindowHandle handle = win.getSystemHandle();
id nsHandle = id(handle);
if([nsHandle isKindOfClass: [NSWindow class]]) {
[nsHandle setLevel: floating ? NSFloatingWindowLevel : NSNormalWindowLevel];
}
}