From 839e927f9b48d52c57c60423e7f9d6606c3ad1d8 Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Wed, 21 Dec 2022 14:06:58 -0800 Subject: [PATCH] comment out problematic code from Renderer --- library/include/modules/Renderer.h | 10 +++------- library/modules/Renderer.cpp | 4 ++-- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/library/include/modules/Renderer.h b/library/include/modules/Renderer.h index 65a9694ab..e01af17cd 100644 --- a/library/include/modules/Renderer.h +++ b/library/include/modules/Renderer.h @@ -5,13 +5,6 @@ #pragma once 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 { void set_to_null(); 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 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 // Usage: renderer_foo *r = AddRenderer(new renderer_foo) 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); } + */ }} diff --git a/library/modules/Renderer.cpp b/library/modules/Renderer.cpp index b746a149c..e134fa4f3 100644 --- a/library/modules/Renderer.cpp +++ b/library/modules/Renderer.cpp @@ -7,10 +7,9 @@ using df::global::enabler; using df::global::gps; using DFHack::Renderer::renderer_wrap; +/* static renderer_wrap *original_renderer = NULL; -const int32_t Renderer::GET_MOUSE_COORDS_SENTINEL = 0xcd1aa471; - bool init() { if (!original_renderer) @@ -156,3 +155,4 @@ bool Renderer::renderer_wrap::get_mouse_coords(int32_t* x, int32_t* y) { bool Renderer::renderer_wrap::uses_opengl() { return parent->uses_opengl(); }; +*/