Skip to content

Commit

Permalink
animate fake damage only allow static booms
Browse files Browse the repository at this point in the history
  • Loading branch information
NQNStudios committed Mar 3, 2025
1 parent 50a5dfe commit 98b44da
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions rsrc/strings/specials-text-town.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions src/scenedit/scen.keydlgs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ extern cOutdoors* current_terrain;
extern cCustomGraphics spec_scen_g;

std::vector<pic_num_t> 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<pic_num_t> static_boom_pics = {0,1,2,3,4,5};
std::vector<pic_num_t> boom_pics = {0,1,2,3,4,5,8,9,10,11,12,13};
std::vector<pic_num_t> lgdlog_pics = {0,32};

Expand Down Expand Up @@ -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<pic_num_t> all_pics;
Expand All @@ -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;
Expand Down Expand Up @@ -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, type == PIC_BOOM);
if(store < 0) store = val;
} break;
case eSpecPicker::LOCATION: {
Expand Down
2 changes: 1 addition & 1 deletion src/scenedit/scen.keydlgs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 98b44da

Please sign in to comment.