more new var names

develop
Myk Taylor 2022-12-21 20:14:12 -08:00
parent 93c875fb56
commit 48a9e1c518
2 changed files with 6 additions and 13 deletions

@ -12,18 +12,9 @@ namespace DFHack { namespace Renderer {
renderer_wrap *parent;
renderer_wrap *child;
virtual void update_tile(int32_t x, int32_t y);
virtual void update_all();
virtual void render();
virtual void set_fullscreen();
virtual void zoom(df::zoom_commands z);
virtual void resize(int32_t w, int32_t h);
virtual void grid_resize(int32_t w, int32_t h);
virtual ~renderer_wrap() {
// All necessary cleanup should be handled by RemoveRenderer()
};
virtual bool get_mouse_coords(int32_t *x, int32_t *y);
virtual bool uses_opengl();
};
/* TODO: we can't cat enabler->renderer to renderer_wrap and expect it to work

@ -54,6 +54,7 @@ using namespace DFHack;
#include "df/tile_page.h"
#include "df/interfacest.h"
#include "df/enabler.h"
#include "df/graphic_map_portst.h"
#include "df/unit.h"
#include "df/item.h"
#include "df/job.h"
@ -116,10 +117,11 @@ bool Screen::inGraphicsMode()
static bool doSetTile_default(const Pen &pen, int x, int y, bool map)
{
auto dim = Screen::getWindowSize();
if (x < 0 || x >= dim.x || y < 0 || y >= dim.y)
return false;
df::graphic_map_portst *vp = gps->main_map_port;
if (x >= vp->clipx[0] && x <= vp->clipx[1]
&& y >= vp->clipy[0] && y <= vp->clipy[1]) {
vp->screentexpos_interface[x + y*vp->dim_x] = pen.tile;
}
// TODO: understand how this changes for v50
/*
size_t index = ((x * gps->dimy) + y);