#include <simgear/debug/logstream.hxx>
#include <simgear/misc/fgpath.hxx>
+#include <Main/globals.hxx>
#include <Main/options.hxx>
-#include <Main/views.hxx>
#include <Objects/texload.h>
#include "hud.hxx"
bool
fgPanelVisible ()
{
- return ((current_options.get_panel_status()) &&
- (current_options.get_view_mode() == fgOPTIONS::FG_VIEW_PILOT) &&
- (current_view.get_view_offset() == 0.0));
+ return ((globals->get_options()->get_panel_status()) &&
+ (globals->get_options()->get_view_mode() == FGOptions::FG_VIEW_PILOT) &&
+ (globals->get_current_view()->get_view_offset() == 0.0));
}
ssgTexture * texture = _textureMap[relativePath];
if (texture == 0) {
cerr << "Texture " << relativePath << " does not yet exist" << endl;
- FGPath tpath(current_options.get_fg_root());
+ FGPath tpath(globals->get_options()->get_fg_root());
tpath.append(relativePath);
texture = new ssgTexture((char *)tpath.c_str(), false, false);
_textureMap[relativePath] = texture;
}
// Scale for the real window size.
- x = int(((float)x / current_view.get_winWidth()) * _winw);
- y = int(_winh - (((float)y / current_view.get_winHeight()) * _winh));
+ x = int(((float)x / globals->get_current_view()->get_winWidth()) * _winw);
+ y = int(_winh - (((float)y / globals->get_current_view()->get_winHeight())
+ * _winh));
// Adjust for offsets.
x -= _x_offset;