From cf736d18351e346d0ca5524df27bc7d2cd9d202a Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Sun, 2 Mar 2025 21:10:55 -0600 Subject: [PATCH] animate fake damage only allow static booms --- rsrc/strings/specials-text-town.txt | 4 ++-- src/scenedit/scen.keydlgs.cpp | 7 ++++--- src/scenedit/scen.keydlgs.hpp | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/rsrc/strings/specials-text-town.txt b/rsrc/strings/specials-text-town.txt index 79374a27..5f4a6a02 100644 --- a/rsrc/strings/specials-text-town.txt +++ b/rsrc/strings/specials-text-town.txt @@ -55,8 +55,8 @@ Unused First part of message Second part of message Unused -pic -pictype +Unused +Unused X coordinate of space Y coordinate of space extra 1c diff --git a/src/scenedit/scen.keydlgs.cpp b/src/scenedit/scen.keydlgs.cpp index e18bbb59..c9ac18cd 100644 --- a/src/scenedit/scen.keydlgs.cpp +++ b/src/scenedit/scen.keydlgs.cpp @@ -37,6 +37,7 @@ extern cOutdoors* current_terrain; extern cCustomGraphics spec_scen_g; std::vector field_pics = {0,3,5,6,7,8,9,10,11,12,13,14,15,24,25,26,27,28,29,30,31,4}; +std::vector static_boom_pics = {0,1,2,3,4,5}; std::vector boom_pics = {0,1,2,3,4,5,8,9,10,11,12,13}; std::vector lgdlog_pics = {0,32}; @@ -166,7 +167,7 @@ short choose_background(short cur_choice, cDialog* parent) { // TODO: I have two functions that do this. (The other one is pick_picture.) extern std::string scenario_temp_dir_name; -pic_num_t choose_graphic(short cur_choice,ePicType g_type,cDialog* parent) { +pic_num_t choose_graphic(short cur_choice,ePicType g_type,cDialog* parent, bool static_only) { extern fs::path tempDir; int i = 0; std::vector all_pics; @@ -182,7 +183,7 @@ pic_num_t choose_graphic(short cur_choice,ePicType g_type,cDialog* parent) { // TODO: Include small monster graphics in the PC pic picker case PIC_PC: total_pics = 37; break; case PIC_FIELD: all_pics = field_pics; break; - case PIC_BOOM: all_pics = boom_pics; break; + case PIC_BOOM: all_pics = static_only ? static_boom_pics : boom_pics; break; case PIC_DLOG_LG: all_pics = lgdlog_pics; break; case PIC_MISSILE: total_pics = 16; break; case PIC_STATUS: total_pics = 27; break; @@ -1033,7 +1034,7 @@ static bool edit_spec_enc_value(cDialog& me, std::string item_hit, node_stack_t& type = PIC_DLOG; } else type = ePicType(pictype); } - store = choose_graphic(val, type, &me); + store = choose_graphic(val, type, &me, spec.type == eSpecType::TOWN_BOOM_SPACE); if(store < 0) store = val; } break; case eSpecPicker::LOCATION: { diff --git a/src/scenedit/scen.keydlgs.hpp b/src/scenedit/scen.keydlgs.hpp index d81fadfc..89b975e1 100644 --- a/src/scenedit/scen.keydlgs.hpp +++ b/src/scenedit/scen.keydlgs.hpp @@ -8,7 +8,7 @@ bool cre(short val,short min,short max,std::string text1,std::string text2,cDial void display_strings(char *text1, char *text2, char *title,short sound_num,short graphic_num,short graphic_type,cDialog* parent); void put_choice_pics(short g_type); -pic_num_t choose_graphic(short cur_choice,ePicType g_type,cDialog* parent); +pic_num_t choose_graphic(short cur_choice,ePicType g_type,cDialog* parent, bool static_only = false); short choose_background(short cur_choice, cDialog* parent); short choose_text_res(std::string res_list,short first_t,short last_t,unsigned short cur_choice,cDialog* parent,const char *title); short choose_text(eStrType list, unsigned short cur_choice, cDialog* parent,std::string title);