Prelimenary work on advmode

develop
Warmist 2013-06-24 03:47:42 +03:00
parent 4abff416d9
commit 4d7a7425d0
1 changed files with 10 additions and 1 deletions

@ -13,6 +13,7 @@
#include "df/graphic.h" #include "df/graphic.h"
#include "df/viewscreen_dwarfmodest.h" #include "df/viewscreen_dwarfmodest.h"
#include "df/viewscreen_dungeonmodest.h"
#include "df/flow_info.h" #include "df/flow_info.h"
#include "df/world.h" #include "df/world.h"
#include "df/building.h" #include "df/building.h"
@ -32,7 +33,15 @@ rect2d getMapViewport()
const int AREA_MAP_WIDTH = 23; const int AREA_MAP_WIDTH = 23;
const int MENU_WIDTH = 30; const int MENU_WIDTH = 30;
if(!gps || !df::viewscreen_dwarfmodest::_identity.is_instance(DFHack::Gui::getCurViewscreen())) if(!gps || !df::viewscreen_dwarfmodest::_identity.is_instance(DFHack::Gui::getCurViewscreen()))
{
if(gps && df::viewscreen_dungeonmodest::_identity.is_instance(DFHack::Gui::getCurViewscreen()))
{
return mkrect_wh(0,0,gps->dimx,gps->dimy);
}
else
return mkrect_wh(0,0,0,0); return mkrect_wh(0,0,0,0);
}
int w=gps->dimx; int w=gps->dimx;
int h=gps->dimy; int h=gps->dimy;
int view_height=h-2; int view_height=h-2;