Restore the use of a separate class for town preset creatures

This commit is contained in:
2015-01-22 22:26:43 -05:00
parent ac4441f33e
commit df6222abda
16 changed files with 48 additions and 55 deletions

View File

@@ -98,7 +98,7 @@ short town_buttons[6][10] = {
{50,51,52,53,54,55,56,57,-1,69},
};
cCreature last_placed_monst;
cTownperson last_placed_monst;
rectangle working_rect;
location last_space_hit;

View File

@@ -611,7 +611,7 @@ void writeTownToXml(ticpp::Printer&& data, cTown& town) {
for(size_t i = 0; i < town.max_monst(); i++) {
data.OpenElement("creature");
data.PushAttribute("id", i);
cCreature& preset = town.creatures(i);
cTownperson& preset = town.creatures(i);
data.PushElement("type", preset.number);
data.PushElement("attitude", preset.start_attitude);
data.PushElement("mobility", preset.mobility);

View File

@@ -30,7 +30,7 @@ extern cSpeech::cNode null_talk_node;
extern cOutdoors* current_terrain;
extern location cur_out;
cCreature store_placed_monst,store_placed_monst2;
cTownperson store_placed_monst,store_placed_monst2;
short store_which_placed_monst;
const char *day_str_1[] = {"Unused","Day creature appears","Day creature disappears","",
@@ -67,7 +67,7 @@ static bool get_placed_monst_in_dlog(cDialog& me) {
static bool edit_placed_monst_event_filter(cDialog& me, std::string item_hit, eKeyMod) {
short i;
cCreature store_m;
cTownperson store_m;
if(item_hit == "okay") {
if(!get_placed_monst_in_dlog(me)) return true;
@@ -189,7 +189,7 @@ static bool edit_placed_monst_adv_time_flag(cDialog& me, std::string id, bool lo
return true;
}
cCreature edit_placed_monst_adv(cCreature monst_record, cDialog& parent) {
cTownperson edit_placed_monst_adv(cTownperson monst_record, cDialog& parent) {
store_placed_monst2 = monst_record;
cDialog edit("edit-townperson-advanced", &parent);

View File

@@ -1,6 +1,6 @@
void edit_placed_monst(short which_m);
cCreature edit_placed_monst_adv(cCreature monst_record, class cDialog& parent);
cTownperson edit_placed_monst_adv(cTownperson monst_record, class cDialog& parent);
void edit_sign(short which_sign,short picture);
void edit_roomdescs(bool town);
short pick_town_num(std::string which_dlog,short def,cScenario& scenario);