New toolbar buttons for placing boats and horses; replaces the edit boats/horses dialogs
This commit is contained in:
@@ -1,56 +0,0 @@
|
||||
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
|
||||
<?xml-stylesheet href="dialog.xsl" type="text/xsl"?>
|
||||
<dialog defbtn='okay'>
|
||||
<field name='town1' type='int' top='100' left='214' width='67' height='16'/>
|
||||
<field name='town2' type='int' top='128' left='214' width='67' height='16'/>
|
||||
<field name='town3' type='int' top='156' left='214' width='67' height='16'/>
|
||||
<field name='town4' type='int' top='184' left='214' width='67' height='16'/>
|
||||
<field name='town5' type='int' top='212' left='214' width='67' height='16'/>
|
||||
<field name='town6' type='int' top='240' left='214' width='67' height='16'/>
|
||||
<field name='x1' type='uint' top='100' left='329' width='39' height='16'/>
|
||||
<field name='x2' type='uint' top='128' left='329' width='39' height='16'/>
|
||||
<field name='x3' type='uint' top='156' left='329' width='39' height='16'/>
|
||||
<field name='x4' type='uint' top='184' left='329' width='39' height='16'/>
|
||||
<field name='x5' type='uint' top='212' left='329' width='39' height='16'/>
|
||||
<field name='x6' type='uint' top='240' left='329' width='39' height='16'/>
|
||||
<field name='y1' type='uint' top='100' left='410' width='39' height='16'/>
|
||||
<field name='y2' type='uint' top='128' left='410' width='39' height='16'/>
|
||||
<field name='y3' type='uint' top='156' left='410' width='39' height='16'/>
|
||||
<field name='y4' type='uint' top='184' left='410' width='39' height='16'/>
|
||||
<field name='y5' type='uint' top='212' left='410' width='39' height='16'/>
|
||||
<field name='y6' type='uint' top='240' left='410' width='39' height='16'/>
|
||||
<button name='okay' type='regular' top='268' left='468'>OK</button>
|
||||
<text top='268' left='381' width='75' height='16'/>
|
||||
<button name='left' type='left' top='268' left='51'/>
|
||||
<button name='right' type='right' top='268' left='114'/>
|
||||
<text name='num1' top='100' left='152' width='46' height='14'/>
|
||||
<text name='num2' top='128' left='152' width='46' height='14'/>
|
||||
<text name='num3' top='156' left='153' width='46' height='14'/>
|
||||
<text name='num4' top='184' left='153' width='46' height='14'/>
|
||||
<text name='num5' top='211' left='153' width='46' height='14'/>
|
||||
<text name='num6' top='239' left='153' width='46' height='14'/>
|
||||
<pict type='dlog' num='16' top='8' left='8'/>
|
||||
<text size='large' top='6' left='50' width='256' height='17'>Edit Boats</text>
|
||||
<text top='25' left='50' width='439' height='39'>
|
||||
There can be up to 24 boats in your scenario,
|
||||
each of which must start in some town.
|
||||
The boats can start as the parties property, if you want.
|
||||
If the town is left at -1, the boat won't exist.
|
||||
</text>
|
||||
<text top='70' left='199' width='106' height='14'>Town to start in</text>
|
||||
<text top='64' left='310' width='76' height='25'>X Location in town</text>
|
||||
<text top='64' left='392' width='81' height='26'>Y Location in town</text>
|
||||
<text top='100' left='50' width='97' height='14'>Horse number</text>
|
||||
<text top='128' left='50' width='97' height='14'>Horse number</text>
|
||||
<text top='156' left='51' width='97' height='14'>Horse number</text>
|
||||
<text top='184' left='51' width='97' height='14'>Horse number</text>
|
||||
<text top='211' left='51' width='97' height='14'>Horse number</text>
|
||||
<text top='239' left='51' width='97' height='14'>Horse number</text>
|
||||
<text top='64' left='477' width='70' height='26'>Not Party Property</text>
|
||||
<led name='owned1' state='off' top='100' left='487'/>
|
||||
<led name='owned2' state='off' top='128' left='487'/>
|
||||
<led name='owned3' state='off' top='156' left='488'/>
|
||||
<led name='owned4' state='off' top='184' left='488'/>
|
||||
<led name='owned5' state='off' top='211' left='488'/>
|
||||
<led name='owned6' state='off' top='239' left='488'/>
|
||||
</dialog>
|
@@ -1,60 +0,0 @@
|
||||
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
|
||||
<?xml-stylesheet href="dialog.xsl" type="text/xsl"?>
|
||||
<dialog defbtn='okay'>
|
||||
<field name='town1' type='int' top='143' left='214' width='67' height='16'/>
|
||||
<field name='town2' type='int' top='171' left='214' width='67' height='16'/>
|
||||
<field name='town3' type='int' top='199' left='214' width='67' height='16'/>
|
||||
<field name='town4' type='int' top='227' left='214' width='67' height='16'/>
|
||||
<field name='town5' type='int' top='255' left='214' width='67' height='16'/>
|
||||
<field name='town6' type='int' top='283' left='214' width='67' height='16'/>
|
||||
<field name='x1' type='uint' top='143' left='329' width='39' height='16'/>
|
||||
<field name='x2' type='uint' top='171' left='329' width='39' height='16'/>
|
||||
<field name='x3' type='uint' top='199' left='329' width='39' height='16'/>
|
||||
<field name='x4' type='uint' top='227' left='329' width='39' height='16'/>
|
||||
<field name='x5' type='uint' top='255' left='329' width='39' height='16'/>
|
||||
<field name='x6' type='uint' top='283' left='329' width='39' height='16'/>
|
||||
<field name='y1' type='uint' top='143' left='410' width='39' height='16'/>
|
||||
<field name='y2' type='uint' top='171' left='410' width='39' height='16'/>
|
||||
<field name='y3' type='uint' top='199' left='410' width='39' height='16'/>
|
||||
<field name='y4' type='uint' top='227' left='410' width='39' height='16'/>
|
||||
<field name='y5' type='uint' top='255' left='410' width='39' height='16'/>
|
||||
<field name='y6' type='uint' top='283' left='410' width='39' height='16'/>
|
||||
<button name='okay' type='regular' top='309' left='463'>OK</button>
|
||||
<button name='left' type='left' top='309' left='52'/>
|
||||
<button name='right' type='right' top='309' left='115'/>
|
||||
<text name='num1' top='143' left='152' width='46' height='14'/>
|
||||
<text name='num2' top='171' left='152' width='46' height='14'/>
|
||||
<text name='num3' top='199' left='153' width='46' height='14'/>
|
||||
<text name='num4' top='227' left='153' width='46' height='14'/>
|
||||
<text name='num5' top='254' left='153' width='46' height='14'/>
|
||||
<text name='num6' top='282' left='153' width='46' height='14'/>
|
||||
<pict type='dlog' num='16' top='8' left='8'/>
|
||||
<text size='large' top='6' left='50' width='256' height='17'>Edit Horses</text>
|
||||
<text top='25' left='50' width='439' height='39'>
|
||||
There can be up to 24 horses in your scenario,
|
||||
each of which must start in some town.
|
||||
The horses can start as the parties property, if you want.
|
||||
Leave the town at -1 to make the horse not exist.
|
||||
</text>
|
||||
<text top='65' left='50' width='439' height='41'>
|
||||
Note that horses can't walk over certain terrain types (like floors).
|
||||
Be careful not to place horses where they're stuck and can't get out.
|
||||
This makes them sad.
|
||||
</text>
|
||||
<text top='113' left='199' width='106' height='14'>Town to start in</text>
|
||||
<text top='107' left='310' width='76' height='25'>X Location in town</text>
|
||||
<text top='107' left='392' width='81' height='26'>Y Location in town</text>
|
||||
<text top='143' left='50' width='97' height='14'>Horse number</text>
|
||||
<text top='171' left='50' width='97' height='14'>Horse number</text>
|
||||
<text top='199' left='51' width='97' height='14'>Horse number</text>
|
||||
<text top='227' left='51' width='97' height='14'>Horse number</text>
|
||||
<text top='254' left='51' width='97' height='14'>Horse number</text>
|
||||
<text top='282' left='51' width='97' height='14'>Horse number</text>
|
||||
<text top='107' left='477' width='70' height='26'>Not Party Property</text>
|
||||
<led name='owned1' state='off' top='143' left='488'/>
|
||||
<led name='owned2' state='off' top='171' left='488'/>
|
||||
<led name='owned3' state='off' top='199' left='488'/>
|
||||
<led name='owned4' state='off' top='227' left='488'/>
|
||||
<led name='owned5' state='off' top='254' left='488'/>
|
||||
<led name='owned6' state='off' top='282' left='488'/>
|
||||
</dialog>
|
21
rsrc/dialogs/edit-vehicle.xml
Normal file
21
rsrc/dialogs/edit-vehicle.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
|
||||
<?xml-stylesheet href="dialog.xsl" type="text/xsl"?>
|
||||
<dialog defbtn='okay'>
|
||||
<pict type='dlog' num='16' top='8' left='8'/>
|
||||
<text name='title' size='large' top='6' left='50' width='256' height='17'>Edit Vehicle</text>
|
||||
|
||||
<text top='25' left='50' width='97' height='14'>Number</text>
|
||||
<field name='num' top='25' left='152' width='46' height='14'/>
|
||||
|
||||
<text top='50' left='50' width='106' height='14'>Starting Area</text>
|
||||
<text name='area' top='50' left='152' width='100' height='16' framed='true'/>
|
||||
|
||||
<text top='75' left='50' width='76' height='25'>Location</text>
|
||||
<text name='loc' top='75' left='152' width='40' height='16'/>
|
||||
|
||||
<led name='owned' state='off' top='100' left='60' width='70'>Not Party Property</led>
|
||||
|
||||
<button name='cancel' type='regular' def-key='esc' top='125' left='51'>Cancel</button>
|
||||
<button name='del' type='regular' top='125' left='114'>Delete</button>
|
||||
<button name='okay' type='regular' top='125' left='277'>OK</button>
|
||||
</dialog>
|
Binary file not shown.
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.8 KiB |
@@ -135,6 +135,8 @@ void cScenario::import_legacy(legacy::scenario_data_type& old){
|
||||
rating = eContentRating(old.rating);
|
||||
// TODO: Is this used anywhere?
|
||||
uses_custom_graphics = old.uses_custom_graphics;
|
||||
boats.resize(30);
|
||||
horses.resize(30);
|
||||
for(short i = 0; i < 30; i++) {
|
||||
boats[i].import_legacy(old.scen_boats[i]);
|
||||
horses[i].import_legacy(old.scen_horses[i]);
|
||||
|
@@ -76,8 +76,8 @@ public:
|
||||
eContentRating rating;
|
||||
std::vector<ePicType> custom_graphics;
|
||||
std::vector<cMonster> scen_monsters;
|
||||
std::array<cVehicle,30> boats;
|
||||
std::array<cVehicle,30> horses;
|
||||
std::vector<cVehicle> boats;
|
||||
std::vector<cVehicle> horses;
|
||||
std::vector<cTerrain> ter_types;
|
||||
std::array<cTimer,20> scenario_timers;
|
||||
std::vector<cSpecial> scen_specials;
|
||||
|
@@ -72,7 +72,7 @@ ePalBtn out_buttons[6][10] = {
|
||||
{PAL_PENCIL, PAL_BRUSH_LG, PAL_BRUSH_SM, PAL_SPRAY_LG, PAL_SPRAY_SM, PAL_ERASER, PAL_DROPPER, PAL_RECT_HOLLOW, PAL_RECT_FILLED, PAL_BUCKET},
|
||||
{PAL_EDIT_TOWN, PAL_ERASE_TOWN, PAL_BLANK, PAL_BLANK, PAL_EDIT_SIGN, PAL_TEXT_AREA, PAL_WANDER, PAL_CHANGE, PAL_ZOOM, PAL_BLANK},
|
||||
{PAL_SPEC, PAL_COPY_SPEC, PAL_PASTE_SPEC, PAL_ERASE_SPEC, PAL_EDIT_SPEC, PAL_SPEC_SPOT, PAL_BLANK, PAL_BLANK, PAL_BLANK, PAL_BLANK},
|
||||
{PAL_BLANK, PAL_ROAD, PAL_BLANK, PAL_BLANK, PAL_BLANK, PAL_BLANK, PAL_BLANK, PAL_BLANK, PAL_BLANK, PAL_BLANK},
|
||||
{PAL_BOAT, PAL_HORSE, PAL_ROAD, PAL_BLANK, PAL_BLANK, PAL_BLANK, PAL_BLANK, PAL_BLANK, PAL_BLANK, PAL_BLANK},
|
||||
{PAL_BLANK, PAL_BLANK, PAL_BLANK, PAL_BLANK, PAL_BLANK, PAL_BLANK, PAL_BLANK, PAL_BLANK, PAL_BLANK, PAL_BLANK},
|
||||
{PAL_BLANK, PAL_BLANK, PAL_BLANK, PAL_BLANK, PAL_BLANK, PAL_BLANK, PAL_BLANK, PAL_BLANK, PAL_BLANK, PAL_BLANK},
|
||||
};
|
||||
@@ -81,7 +81,7 @@ ePalBtn town_buttons[6][10] = {
|
||||
{PAL_PENCIL, PAL_BRUSH_LG, PAL_BRUSH_SM, PAL_SPRAY_LG, PAL_SPRAY_SM, PAL_ERASER, PAL_DROPPER, PAL_RECT_HOLLOW, PAL_RECT_FILLED, PAL_BUCKET},
|
||||
{PAL_ENTER_N, PAL_ENTER_W, PAL_ENTER_S, PAL_ENTER_E, PAL_EDIT_SIGN, PAL_TEXT_AREA, PAL_WANDER, PAL_CHANGE, PAL_ZOOM, PAL_TERRAIN},
|
||||
{PAL_SPEC, PAL_COPY_SPEC, PAL_PASTE_SPEC, PAL_ERASE_SPEC, PAL_EDIT_SPEC, PAL_SPEC_SPOT, PAL_EDIT_ITEM, PAL_SAME_ITEM, PAL_ERASE_ITEM, PAL_ITEM},
|
||||
{PAL_BLANK, PAL_ROAD, PAL_BLANK, PAL_BLANK, PAL_BLANK, PAL_BLANK, PAL_EDIT_MONST, PAL_SAME_MONST, PAL_ERASE_MONST, PAL_MONST},
|
||||
{PAL_BOAT, PAL_HORSE, PAL_ROAD, PAL_BLANK, PAL_BLANK, PAL_BLANK, PAL_EDIT_MONST, PAL_SAME_MONST, PAL_ERASE_MONST, PAL_MONST},
|
||||
{PAL_WEB, PAL_CRATE, PAL_BARREL, PAL_BLOCK, PAL_FIRE_BARR, PAL_FORCE_BARR, PAL_QUICKFIRE, PAL_FORCECAGE, PAL_ERASE_FIELD, PAL_BLANK},
|
||||
{PAL_SFX_SB, PAL_SFX_MB, PAL_SFX_LB, PAL_SFX_SS, PAL_SFX_LS, PAL_SFX_ASH, PAL_SFX_BONE, PAL_SFX_ROCK, PAL_BLANK, PAL_BLANK},
|
||||
};
|
||||
@@ -132,6 +132,7 @@ static cursor_type get_edit_cursor() {
|
||||
case MODE_PLACE_STONE_BLOCK: case MODE_PLACE_FIRE_BARRIER:
|
||||
case MODE_PLACE_FORCE_BARRIER: case MODE_PLACE_QUICKFIRE:
|
||||
case MODE_PLACE_FORCECAGE: case MODE_PLACE_SFX:
|
||||
case MODE_PLACE_HORSE: case MODE_PLACE_BOAT:
|
||||
case MODE_TOGGLE_SPECIAL_DOT: case MODE_TOGGLE_ROAD:
|
||||
|
||||
case MODE_DRAWING:
|
||||
@@ -1131,6 +1132,32 @@ static bool handle_terrain_action(location the_point, bool ctrl_hit) {
|
||||
overall_mode = MODE_DRAWING;
|
||||
change_made = true;
|
||||
break;
|
||||
case MODE_PLACE_BOAT: case MODE_PLACE_HORSE: {
|
||||
auto& all = overall_mode == MODE_PLACE_BOAT ? scenario.boats : scenario.horses;
|
||||
auto iter = std::find_if(all.begin(), all.end(), [](const cVehicle& what) {
|
||||
if(editing_town && cur_town != what.which_town) return false;
|
||||
else if(!editing_town && what.which_town != 200) return false;
|
||||
return what.loc == spot_hit;
|
||||
});
|
||||
if(iter == all.end()) {
|
||||
iter = std::find_if(all.begin(), all.end(), [](const cVehicle& what) {
|
||||
return what.which_town < 0;
|
||||
});
|
||||
if(iter == all.end()) {
|
||||
all.emplace_back();
|
||||
iter = all.end() - 1;
|
||||
}
|
||||
iter->loc = spot_hit;
|
||||
iter->which_town = editing_town ? cur_town : 200;
|
||||
iter->property = false;
|
||||
iter->exists = false;
|
||||
if(!editing_town) iter->sector = cur_out;
|
||||
}
|
||||
if(!edit_vehicle(*iter, iter - all.begin(), overall_mode == MODE_PLACE_BOAT))
|
||||
all.erase(iter);
|
||||
overall_mode = MODE_DRAWING;
|
||||
break;
|
||||
}
|
||||
case MODE_INTRO_SCREEN:
|
||||
case MODE_EDIT_TYPES:
|
||||
case MODE_MAIN_SCREEN:
|
||||
@@ -1507,6 +1534,14 @@ static bool handle_toolpal_action(location cur_point2) {
|
||||
draw_mode = DRAW_MONST;
|
||||
set_up_terrain_buttons(true);
|
||||
break;
|
||||
case PAL_BOAT:
|
||||
set_string("Place/edit boat","Select boat location");
|
||||
overall_mode = MODE_PLACE_BOAT;
|
||||
break;
|
||||
case PAL_HORSE:
|
||||
set_string("Place/edit horse","Select horse location");
|
||||
overall_mode = MODE_PLACE_HORSE;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@@ -2533,75 +2533,44 @@ void edit_save_rects() {
|
||||
save_dlg.run();
|
||||
}
|
||||
|
||||
static bool save_vehicles(cDialog& me, cVehicle* vehicles, const short page) {
|
||||
for(short i = 0; i < 6; i++) {
|
||||
std::string id = std::to_string(i + 1);
|
||||
vehicles[6 * page + i].which_town = me["town" + id].getTextAsNum();
|
||||
if(cre(vehicles[6 * page + i].which_town,
|
||||
-1,199,"Town number must be from 0 to 199 (or -1 for it to not exist).","",&me)) return false;
|
||||
vehicles[6 * page + i].loc.x = me["x" + id].getTextAsNum();
|
||||
if(cre(vehicles[6 * page + i].loc.x,
|
||||
0,63,"coordinates must be from 0 to 63.","",&me)) return false;
|
||||
vehicles[6 * page + i].loc.y = me["y" + id].getTextAsNum();
|
||||
if(cre(vehicles[6 * page + i].loc.y,
|
||||
0,63,"coordinates must be from 0 to 63.","",&me)) return false;
|
||||
vehicles[6 * page + i].property = dynamic_cast<cLed&>(me["owned" + id]).getState() != led_off;
|
||||
static void put_vehicle_area(cDialog& me, const cVehicle& what) {
|
||||
std::ostringstream sout;
|
||||
if(what.which_town == 200) {
|
||||
sout << "Outdoors @ " << what.sector;
|
||||
} else {
|
||||
sout << "Town " << what.which_town;
|
||||
}
|
||||
return true;
|
||||
me["area"].setText(sout.str());
|
||||
}
|
||||
|
||||
static void put_vehicles_in_dlog(cDialog& me, cVehicle* vehicles, const short page) {
|
||||
for(short i = 0; i < 6; i++) {
|
||||
std::string id = std::to_string(i + 1);
|
||||
me["num" + id].setTextToNum(6 * page + i);
|
||||
me["town" + id].setTextToNum(vehicles[6 * page + i].which_town);
|
||||
me["x" + id].setTextToNum(vehicles[6 * page + i].loc.x);
|
||||
me["y" + id].setTextToNum(vehicles[6 * page + i].loc.y);
|
||||
dynamic_cast<cLed&>(me["owned" + id]).setState(vehicles[6 * page + i].property ? led_red : led_off);
|
||||
}
|
||||
}
|
||||
|
||||
static bool edit_vehicles_event_filter(cDialog& me, std::string hit, cVehicle* vehicles, size_t nVehicles, size_t& page) {
|
||||
|
||||
if(hit == "okay") {
|
||||
if(save_vehicles(me, vehicles, page))
|
||||
me.toast(true);
|
||||
} else if(hit == "left") {
|
||||
if(!save_vehicles(me, vehicles, page)) return true;
|
||||
if(page == 0) page = (nVehicles - 1) / 6;
|
||||
else page--;
|
||||
put_vehicles_in_dlog(me, vehicles, page);
|
||||
} else if(hit == "right") {
|
||||
if(!save_vehicles(me, vehicles, page)) return true;
|
||||
page++;
|
||||
if(page > (nVehicles - 1) / 6) page = 0;
|
||||
put_vehicles_in_dlog(me, vehicles, page);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void edit_horses() {
|
||||
bool edit_vehicle(cVehicle& what, int num, bool is_boat) {
|
||||
using namespace std::placeholders;
|
||||
size_t page = 0;
|
||||
cDialog dlg("edit-vehicle");
|
||||
dlg["okay"].attachClickHandler(std::bind(&cDialog::toast, &dlg, true));
|
||||
dlg["cancel"].attachClickHandler(std::bind(&cDialog::toast, &dlg, false));
|
||||
dlg["del"].attachClickHandler([](cDialog& me, std::string, eKeyMod) {
|
||||
me.setResult(false);
|
||||
return me.toast(false);
|
||||
});
|
||||
|
||||
cDialog horse_dlg("edit-horses");
|
||||
horse_dlg.attachClickHandlers(std::bind(edit_vehicles_event_filter, _1, _2, scenario.horses.data(), 30, std::ref(page)), {"okay", "left", "right"});
|
||||
put_vehicle_area(dlg, what);
|
||||
dlg["loc"].setText(boost::lexical_cast<std::string>(what.loc));
|
||||
dlg["num"].setTextToNum(num);
|
||||
dlg["title"].setText(is_boat ? "Edit Boat" : "Edit Horse");
|
||||
|
||||
put_vehicles_in_dlog(horse_dlg, scenario.horses.data(), page);
|
||||
cLed& prop = dynamic_cast<cLed&>(dlg["owned"]);
|
||||
prop.setState(what.property ? led_red : led_off);
|
||||
|
||||
horse_dlg.run();
|
||||
}
|
||||
|
||||
void edit_boats() {
|
||||
using namespace std::placeholders;
|
||||
size_t page = 0;
|
||||
dlg.setResult(true);
|
||||
dlg.run();
|
||||
if(!dlg.getResult<bool>())
|
||||
return false;
|
||||
|
||||
cDialog boat_dlg("edit-boats");
|
||||
boat_dlg.attachClickHandlers(std::bind(edit_vehicles_event_filter, _1, _2, scenario.boats.data(), 30, std::ref(page)), {"okay", "left", "right"});
|
||||
|
||||
put_vehicles_in_dlog(boat_dlg, scenario.boats.data(), page);
|
||||
|
||||
boat_dlg.run();
|
||||
if(dlg.accepted()) {
|
||||
what.property = prop.getState() != led_off;
|
||||
what.exists = true;
|
||||
}
|
||||
return what.exists;
|
||||
}
|
||||
|
||||
static bool save_add_town(cDialog& me) {
|
||||
|
@@ -13,7 +13,6 @@ bool edit_spec_item(short which_item);
|
||||
bool edit_quest(size_t which_quest);
|
||||
bool edit_shop(size_t which_shop, cDialog* parent = nullptr);
|
||||
void edit_save_rects();
|
||||
void edit_horses();
|
||||
void edit_add_town();
|
||||
void edit_item_placement();
|
||||
void edit_scen_details();
|
||||
@@ -21,7 +20,7 @@ bool edit_make_scen_2(short& out_w, short& out_h, short& town_l, short& town_m,
|
||||
bool edit_make_scen_1(std::string& filename,std::string& title,bool& grass);
|
||||
void edit_scenario_events();
|
||||
bool build_scenario();
|
||||
void edit_boats();
|
||||
bool edit_vehicle(class cVehicle& what, int num, bool is_boat);
|
||||
|
||||
bool check_range_msg(cDialog& me,std::string id,bool losing,long min_val,long max_val,std::string fld_name,std::string xtra);
|
||||
bool check_range(cDialog& me,std::string id,bool losing,long min_val,long max_val,std::string fld_name);
|
||||
|
@@ -29,6 +29,7 @@
|
||||
|
||||
enum eScenMode {
|
||||
MODE_DRAWING = 0,
|
||||
MODE_TOGGLE_ROAD = 1,
|
||||
MODE_SET_WANDER_POINTS = 2,
|
||||
MODE_ROOM_RECT = 3,
|
||||
MODE_PLACE_ITEM = 4,
|
||||
@@ -42,7 +43,8 @@ enum eScenMode {
|
||||
MODE_PLACE_SOUTH_ENTRANCE = 12,
|
||||
MODE_PLACE_WEST_ENTRANCE = 13,
|
||||
MODE_FLOOD_FILL = 14,
|
||||
MODE_TOGGLE_ROAD = 15,
|
||||
MODE_PLACE_HORSE = 15,
|
||||
MODE_PLACE_BOAT = 16,
|
||||
MODE_PLACE_FORCECAGE = 19,
|
||||
MODE_PLACE_WEB = 20,
|
||||
MODE_PLACE_CRATE = 21,
|
||||
@@ -102,6 +104,7 @@ enum ePalBtn {
|
||||
PAL_WEB = 40, PAL_CRATE = 41, PAL_BARREL = 42, PAL_FIRE_BARR = 43, PAL_FORCE_BARR = 44, PAL_QUICKFIRE = 45, PAL_SPEC_SPOT = 46, PAL_BLOCK = 47, PAL_FORCECAGE = 48, PAL_ERASE_FIELD = 33,
|
||||
PAL_SFX_SB = 50, PAL_SFX_MB = 51, PAL_SFX_LB = 52, PAL_SFX_SS = 53, PAL_SFX_LS = 54, PAL_SFX_ASH = 55, PAL_SFX_BONE = 56, PAL_SFX_ROCK = 57, PAL_ROAD = 58,
|
||||
PAL_ARROW_UP = 9, PAL_ARROW_DOWN = 69, PAL_TERRAIN = 29, PAL_ITEM = 39, PAL_MONST = 49,
|
||||
PAL_BOAT = 60, PAL_HORSE = 61,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -375,14 +375,6 @@ void handle_menu_choice(eMenu item_hit) {
|
||||
edit_save_rects();
|
||||
change_made = true;
|
||||
break;
|
||||
case eMenu::SCEN_HORSES:
|
||||
edit_horses();
|
||||
change_made = true;
|
||||
break;
|
||||
case eMenu::SCEN_BOATS:
|
||||
edit_boats();
|
||||
change_made = true;
|
||||
break;
|
||||
case eMenu::TOWN_VARYING:
|
||||
edit_add_town();
|
||||
change_made = true;
|
||||
|
@@ -20,7 +20,7 @@ enum class eMenu {
|
||||
// Scenario menu
|
||||
TOWN_CREATE, OUT_RESIZE, SCEN_DETAILS, SCEN_INTRO, TOWN_START,
|
||||
SCEN_SPECIALS, SCEN_TEXT, SCEN_JOURNALS, TOWN_IMPORT, OUT_IMPORT,
|
||||
SCEN_SAVE_ITEM_RECTS, SCEN_HORSES, SCEN_BOATS,
|
||||
SCEN_SAVE_ITEM_RECTS,
|
||||
TOWN_VARYING, SCEN_TIMERS, SCEN_ITEM_SHORTCUTS, TOWN_DELETE,
|
||||
SCEN_DATA_DUMP, SCEN_TEXT_DUMP,
|
||||
SCEN_PICS, SCEN_SHEETS, SCEN_SNDS,
|
||||
|
@@ -55,7 +55,7 @@ void init_menubar() {
|
||||
eMenu::TOWN_CREATE, eMenu::OUT_RESIZE, eMenu::NONE,
|
||||
eMenu::SCEN_DETAILS, eMenu::SCEN_INTRO, eMenu::SCEN_SHEETS, eMenu::SCEN_PICS, eMenu::SCEN_SNDS, eMenu::NONE, eMenu::NONE,
|
||||
eMenu::SCEN_SPECIALS, eMenu::SCEN_TEXT, eMenu::SCEN_JOURNALS, eMenu::TOWN_IMPORT, eMenu::OUT_IMPORT, eMenu::SCEN_SAVE_ITEM_RECTS,
|
||||
eMenu::SCEN_HORSES, eMenu::SCEN_BOATS, eMenu::TOWN_VARYING, eMenu::SCEN_TIMERS, eMenu::SCEN_ITEM_SHORTCUTS,
|
||||
eMenu::TOWN_VARYING, eMenu::SCEN_TIMERS, eMenu::SCEN_ITEM_SHORTCUTS,
|
||||
eMenu::TOWN_DELETE, eMenu::SCEN_DATA_DUMP, eMenu::SCEN_TEXT_DUMP,
|
||||
};
|
||||
static const eMenu town_choices[] = {
|
||||
|
@@ -83,7 +83,7 @@ void init_menubar() {
|
||||
eMenu::TOWN_CREATE, eMenu::OUT_RESIZE, eMenu::NONE,
|
||||
eMenu::SCEN_DETAILS, eMenu::SCEN_INTRO, eMenu::SCEN_SHEETS, eMenu::SCEN_PICS, eMenu::SCEN_SNDS, eMenu::NONE, eMenu::NONE,
|
||||
eMenu::SCEN_SPECIALS, eMenu::SCEN_TEXT, eMenu::SCEN_JOURNALS, eMenu::TOWN_IMPORT, eMenu::OUT_IMPORT, eMenu::SCEN_SAVE_ITEM_RECTS,
|
||||
eMenu::SCEN_HORSES, eMenu::SCEN_BOATS, eMenu::TOWN_VARYING, eMenu::SCEN_TIMERS, eMenu::SCEN_ITEM_SHORTCUTS,
|
||||
eMenu::TOWN_VARYING, eMenu::SCEN_TIMERS, eMenu::SCEN_ITEM_SHORTCUTS,
|
||||
eMenu::TOWN_DELETE, eMenu::SCEN_DATA_DUMP, eMenu::SCEN_TEXT_DUMP,
|
||||
};
|
||||
static const eMenu town_choices[] = {
|
||||
|
Reference in New Issue
Block a user