reverted to just renaming FRAMES in gui.lua

develop
Taxi Service 2023-05-18 12:46:21 +02:00
parent 90fe6e7ae3
commit c52b1cc950
5 changed files with 33 additions and 33 deletions

@ -1716,11 +1716,11 @@ static const LuaWrapper::FunctionReg dfhack_textures_module[] = {
WRAPM(Textures, getIconsTexposStart),
WRAPM(Textures, getOnOffTexposStart),
WRAPM(Textures, getControlPanelTexposStart),
WRAPM(Textures, getBorderThinTexposStart),
WRAPM(Textures, getBorderMediumTexposStart),
WRAPM(Textures, getBorderBoldTexposStart),
WRAPM(Textures, getBorderPanelTexposStart),
WRAPM(Textures, getBorderWindowTexposStart),
WRAPM(Textures, getThinBordersTexposStart),
WRAPM(Textures, getMediumBordersTexposStart),
WRAPM(Textures, getBoldBordersTexposStart),
WRAPM(Textures, getPanelBordersTexposStart),
WRAPM(Textures, getWindowBordersTexposStart),
{ NULL, NULL }
};

@ -54,11 +54,11 @@ DFHACK_EXPORT long getControlPanelTexposStart();
/**
* Get the first texpos for the DFHack borders. Each is a 7x3 grid.
*/
DFHACK_EXPORT long getBorderThinTexposStart();
DFHACK_EXPORT long getBorderMediumTexposStart();
DFHACK_EXPORT long getBorderBoldTexposStart();
DFHACK_EXPORT long getBorderPanelTexposStart();
DFHACK_EXPORT long getBorderWindowTexposStart();
DFHACK_EXPORT long getThinBordersTexposStart();
DFHACK_EXPORT long getMediumBordersTexposStart();
DFHACK_EXPORT long getBoldBordersTexposStart();
DFHACK_EXPORT long getPanelBordersTexposStart();
DFHACK_EXPORT long getWindowBordersTexposStart();
}
}

@ -905,7 +905,7 @@ local BASE_FRAME = {
}
local function make_frame(name, double_line)
local texpos = dfhack.textures['getBorder'..name..'TexposStart']()
local texpos = dfhack.textures['get'..name..'BordersTexposStart']()
local tp = function(offset)
if texpos == -1 then return nil end
return texpos + offset

@ -24,11 +24,11 @@ static long g_red_pin_texpos_start = -1;
static long g_icons_texpos_start = -1;
static long g_on_off_texpos_start = -1;
static long g_control_panel_texpos_start = -1;
static long g_border_thin_texpos_start = -1;
static long g_border_medium_texpos_start = -1;
static long g_border_bold_texpos_start = -1;
static long g_border_panel_texpos_start = -1;
static long g_border_window_texpos_start = -1;
static long g_thin_borders_texpos_start = -1;
static long g_medium_borders_texpos_start = -1;
static long g_bold_borders_texpos_start = -1;
static long g_panel_borders_texpos_start = -1;
static long g_window_borders_texpos_start = -1;
// Converts an arbitrary Surface to something like the display format
// (32-bit RGBA), and converts magenta to transparency if convert_magenta is set
@ -132,15 +132,15 @@ void Textures::init(color_ostream &out) {
g_num_dfhack_textures += load_textures(out, "hack/data/art/control-panel.png",
&g_control_panel_texpos_start);
g_num_dfhack_textures += load_textures(out, "hack/data/art/border-thin.png",
&g_border_thin_texpos_start);
&g_thin_borders_texpos_start);
g_num_dfhack_textures += load_textures(out, "hack/data/art/border-medium.png",
&g_border_medium_texpos_start);
&g_medium_borders_texpos_start);
g_num_dfhack_textures += load_textures(out, "hack/data/art/border-bold.png",
&g_border_bold_texpos_start);
&g_bold_borders_texpos_start);
g_num_dfhack_textures += load_textures(out, "hack/data/art/border-panel.png",
&g_border_panel_texpos_start);
&g_panel_borders_texpos_start);
g_num_dfhack_textures += load_textures(out, "hack/data/art/border-window.png",
&g_border_window_texpos_start);
&g_window_borders_texpos_start);
DEBUG(textures,out).print("loaded %ld textures\n", g_num_dfhack_textures);
@ -197,22 +197,22 @@ long Textures::getControlPanelTexposStart() {
return g_control_panel_texpos_start;
}
long Textures::getBorderThinTexposStart() {
return g_border_thin_texpos_start;
long Textures::getThinBordersTexposStart() {
return g_thin_borders_texpos_start;
}
long Textures::getBorderMediumTexposStart() {
return g_border_medium_texpos_start;
long Textures::getMediumBordersTexposStart() {
return g_medium_borders_texpos_start;
}
long Textures::getBorderBoldTexposStart() {
return g_border_bold_texpos_start;
long Textures::getBoldBordersTexposStart() {
return g_bold_borders_texpos_start;
}
long Textures::getBorderPanelTexposStart() {
return g_border_panel_texpos_start;
long Textures::getPanelBordersTexposStart() {
return g_panel_borders_texpos_start;
}
long Textures::getBorderWindowTexposStart() {
return g_border_window_texpos_start;
long Textures::getWindowBordersTexposStart() {
return g_window_borders_texpos_start;
}

@ -18,12 +18,12 @@ function reload_pens()
GOOD_TILE_PEN = to_pen{ch='o', fg=COLOR_GREEN, tile=dfhack.screen.findGraphicsTile('CURSORS', 1, 2)}
BAD_TILE_PEN = to_pen{ch='X', fg=COLOR_RED, tile=dfhack.screen.findGraphicsTile('CURSORS', 3, 0)}
local tb_texpos = dfhack.textures.getBorderThinTexposStart()
local tb_texpos = dfhack.textures.getThinBordersTexposStart()
VERT_TOP_PEN = to_pen{tile=tp(tb_texpos, 10), ch=194, fg=COLOR_GREY, bg=COLOR_BLACK}
VERT_MID_PEN = to_pen{tile=tp(tb_texpos, 4), ch=179, fg=COLOR_GREY, bg=COLOR_BLACK}
VERT_BOT_PEN = to_pen{tile=tp(tb_texpos, 11), ch=193, fg=COLOR_GREY, bg=COLOR_BLACK}
local mb_texpos = dfhack.textures.getBorderMediumTexposStart()
local mb_texpos = dfhack.textures.getMediumBordersTexposStart()
HORI_LEFT_PEN = to_pen{tile=tp(mb_texpos, 12), ch=195, fg=COLOR_GREY, bg=COLOR_BLACK}
HORI_MID_PEN = to_pen{tile=tp(mb_texpos, 5), ch=196, fg=COLOR_GREY, bg=COLOR_BLACK}
HORI_RIGHT_PEN = to_pen{tile=tp(mb_texpos, 13), ch=180, fg=COLOR_GREY, bg=COLOR_BLACK}