|
|
@ -5,13 +5,6 @@
|
|
|
|
#pragma once
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
|
|
namespace DFHack { namespace Renderer {
|
|
|
|
namespace DFHack { namespace Renderer {
|
|
|
|
// If the the 'x' parameter points to this value, then the 'y' parameter will
|
|
|
|
|
|
|
|
// be interpreted as a boolean flag for whether to return map coordinates (false)
|
|
|
|
|
|
|
|
// or text tile coordinates (true). Only TWBT implements this logic, and this
|
|
|
|
|
|
|
|
// sentinel value can be removed once DF provides an API for retrieving the
|
|
|
|
|
|
|
|
// two sets of coordinates.
|
|
|
|
|
|
|
|
DFHACK_EXPORT extern const int32_t GET_MOUSE_COORDS_SENTINEL;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct DFHACK_EXPORT renderer_wrap : public df::renderer {
|
|
|
|
struct DFHACK_EXPORT renderer_wrap : public df::renderer {
|
|
|
|
void set_to_null();
|
|
|
|
void set_to_null();
|
|
|
|
void copy_from_parent();
|
|
|
|
void copy_from_parent();
|
|
|
@ -32,6 +25,8 @@ namespace DFHack { namespace Renderer {
|
|
|
|
virtual bool get_mouse_coords(int32_t *x, int32_t *y);
|
|
|
|
virtual bool get_mouse_coords(int32_t *x, int32_t *y);
|
|
|
|
virtual bool uses_opengl();
|
|
|
|
virtual bool uses_opengl();
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* TODO: we can't cat enabler->renderer to renderer_wrap and expect it to work
|
|
|
|
// Returns the renderer instance given on success, or deletes it and returns NULL on failure
|
|
|
|
// Returns the renderer instance given on success, or deletes it and returns NULL on failure
|
|
|
|
// Usage: renderer_foo *r = AddRenderer(new renderer_foo)
|
|
|
|
// Usage: renderer_foo *r = AddRenderer(new renderer_foo)
|
|
|
|
DFHACK_EXPORT renderer_wrap *AddRenderer(renderer_wrap*, bool refresh_screen = false);
|
|
|
|
DFHACK_EXPORT renderer_wrap *AddRenderer(renderer_wrap*, bool refresh_screen = false);
|
|
|
@ -42,4 +37,5 @@ namespace DFHack { namespace Renderer {
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return (renderer_wrap*)(df::global::enabler ? df::global::enabler->renderer : NULL);
|
|
|
|
return (renderer_wrap*)(df::global::enabler ? df::global::enabler->renderer : NULL);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
*/
|
|
|
|
}}
|
|
|
|
}}
|
|
|
|