queue_special() return whether special was queued

This commit is contained in:
2025-08-11 13:21:23 -05:00
committed by Celtic Minstrel
parent cdc50d09eb
commit 74bb7d39b8
2 changed files with 4 additions and 3 deletions

View File

@@ -1987,8 +1987,8 @@ void special_increase_age(long length, bool queue) {
draw_terrain(0);
}
void queue_special(eSpecCtx mode, eSpecCtxType which_type, spec_num_t spec, location spec_loc) {
if(spec < 0) return;
bool queue_special(eSpecCtx mode, eSpecCtxType which_type, spec_num_t spec, location spec_loc) {
if(spec < 0) return false;
pending_special_type queued_special;
queued_special.spec = spec;
queued_special.where = spec_loc;
@@ -2000,6 +2000,7 @@ void queue_special(eSpecCtx mode, eSpecCtxType which_type, spec_num_t spec, loca
run_special(queued_special, nullptr, nullptr, nullptr);
else
special_queue.push(queued_special);
return true;
}
void run_special(pending_special_type spec, short* a, short* b, bool* redraw) {

View File

@@ -20,7 +20,7 @@ void teleport_party(short x,short y,short mode);
bool run_stone_circle(short which);
void change_level(short town_num,short x,short y);
void push_things();
void queue_special(eSpecCtx mode, eSpecCtxType which_type, spec_num_t spec, location spec_loc);
bool queue_special(eSpecCtx mode, eSpecCtxType which_type, spec_num_t spec, location spec_loc);
void run_special(eSpecCtx which_mode, eSpecCtxType which_type, spec_num_t start_spec, location spec_loc, short* a = nullptr, short* b = nullptr, bool* redraw = nullptr);
void run_special(pending_special_type spec, short* a, short* b, bool* redraw);