Merge pull request #3711 from myk002/myk_instrument_textures

[Textures] instrument textures module
develop
Myk 2023-08-31 18:14:18 -07:00 committed by GitHub
commit 940d25accb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 5 deletions

@ -940,21 +940,21 @@ function FRAME_WINDOW(resizable)
end
return frame
end
function FRAME_PANEL(resizable)
function FRAME_PANEL()
return make_frame(textures.tp_border_panel, false)
end
function FRAME_MEDIUM(resizable)
function FRAME_MEDIUM()
return make_frame(textures.tp_border_medium, false)
end
function FRAME_BOLD(resizable)
function FRAME_BOLD()
return make_frame(textures.tp_border_bold, true)
end
function FRAME_INTERIOR(resizable)
function FRAME_INTERIOR()
local frame = make_frame(textures.tp_border_thin, false)
frame.signature_pen = false
return frame
end
function FRAME_INTERIOR_MEDIUM(resizable)
function FRAME_INTERIOR_MEDIUM()
local frame = make_frame(textures.tp_border_medium, false)
frame.signature_pen = false
return frame

@ -191,6 +191,7 @@ void Textures::deleteHandle(TexposHandle handle) {
}
static void reset_texpos() {
DEBUG(textures).print("resetting texture mappings\n");
g_handle_to_texpos.clear();
}
@ -207,6 +208,7 @@ struct tracking_stage_new_region : df::viewscreen_new_regionst {
DEFINE_VMETHOD_INTERPOSE(void, logic, ()) {
if (this->m_raw_load_stage != this->raw_load_stage) {
TRACE(textures).print("raw_load_stage %d -> %d\n", this->m_raw_load_stage, this->raw_load_stage);
this->m_raw_load_stage = this->raw_load_stage;
if (this->m_raw_load_stage == 1)
reset_texpos();
@ -225,6 +227,7 @@ struct tracking_stage_adopt_region : df::viewscreen_adopt_regionst {
DEFINE_VMETHOD_INTERPOSE(void, logic, ()) {
if (this->m_cur_step != this->cur_step) {
TRACE(textures).print("step %d -> %d\n", this->m_cur_step, this->cur_step);
this->m_cur_step = this->cur_step;
if (this->m_cur_step == 1)
reset_texpos();
@ -243,6 +246,7 @@ struct tracking_stage_load_region : df::viewscreen_loadgamest {
DEFINE_VMETHOD_INTERPOSE(void, logic, ()) {
if (this->m_cur_step != this->cur_step) {
TRACE(textures).print("step %d -> %d\n", this->m_cur_step, this->cur_step);
this->m_cur_step = this->cur_step;
if (this->m_cur_step == 1)
reset_texpos();
@ -261,6 +265,7 @@ struct tracking_stage_new_arena : df::viewscreen_new_arenast {
DEFINE_VMETHOD_INTERPOSE(void, logic, ()) {
if (this->m_cur_step != this->cur_step) {
TRACE(textures).print("step %d -> %d\n", this->m_cur_step, this->cur_step);
this->m_cur_step = this->cur_step;
if (this->m_cur_step == 0)
reset_texpos();