Several tweaks/bugfixes

- Preview terrain step sound when selecting it
- Fix uninitialized start locations
- Fix missing strings in copy files build phase
- Fix mislabelled terrain flag 3 for Call Special When Used
This commit is contained in:
2015-09-06 01:50:00 -04:00
parent 44b75b732b
commit 13801e83ab
4 changed files with 22 additions and 2 deletions

View File

@@ -21,4 +21,4 @@ Unused
Unused
Unused
Unused
Unused
Small icon

View File

@@ -74,6 +74,7 @@
911F2DA71B98FF5600E3102E /* cursors in Copy Data Files */ = {isa = PBXBuildFile; fileRef = 911F2DA21B98FF2300E3102E /* cursors */; };
911F2DA81B98FF5600E3102E /* graphics in Copy Data Files */ = {isa = PBXBuildFile; fileRef = 911F2DA31B98FF2300E3102E /* graphics */; };
911F2DA91B98FF5600E3102E /* sounds in Copy Data Files */ = {isa = PBXBuildFile; fileRef = 911F2DA41B98FF2300E3102E /* sounds */; };
911F2DAA1B9AA9BC00E3102E /* strings in Copy Data Files */ = {isa = PBXBuildFile; fileRef = 91C749B71A2D6432008E0E10 /* strings */; };
9127903E0F9B7F49007B0D52 /* boe.actions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2BF04ACF0BF51923006C0831 /* boe.actions.cpp */; };
9127903F0F9B7F50007B0D52 /* boe.graphics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2BF04AD30BF51923006C0831 /* boe.graphics.cpp */; };
91279BAE0F9CFCBA007B0D52 /* boescenario.icns in Resources */ = {isa = PBXBuildFile; fileRef = 91279BAD0F9CFCBA007B0D52 /* boescenario.icns */; };
@@ -409,6 +410,7 @@
91C749BA1A2D670D008E0E10 /* dialogs in Copy Data Files */,
911F2DA61B98FF5600E3102E /* fonts in Copy Data Files */,
911F2DA71B98FF5600E3102E /* cursors in Copy Data Files */,
911F2DAA1B9AA9BC00E3102E /* strings in Copy Data Files */,
911F2DA81B98FF5600E3102E /* graphics in Copy Data Files */,
911F2DA91B98FF5600E3102E /* sounds in Copy Data Files */,
);

View File

@@ -68,7 +68,7 @@ cScenario::cScenario() {
default_ground = 2;
where_start.x = 24;
where_start.y = 24;
out_start = where_start;
out_start = where_start = loc(24,24);
rating = eContentRating::G;
difficulty = 0;
intro_pic = intro_mess_pic = 0;

View File

@@ -530,6 +530,23 @@ static bool edit_ter_obj(cDialog& me, ter_num_t which_ter) {
return true;
}
static bool play_ter_step_sound(cDialog& me, std::string id, bool losing) {
if(losing) return true;
std::string clicked = dynamic_cast<cLedGroup&>(me[id]).getSelected();
if(clicked == "step") {
play_sound(49);
sf::sleep(sf::milliseconds(200));
play_sound(50);
} else if(clicked == "squish") {
play_sound(55);
} else if(clicked == "crunch") {
play_sound(47);
} else if(clicked == "splash") {
play_sound(17);
}
return true;
}
bool edit_ter_type(ter_num_t which) {
using namespace std::placeholders;
ter_num_t first = which;
@@ -553,6 +570,7 @@ bool edit_ter_type(ter_num_t which) {
ter_dlg["picktrim"].attachClickHandler(std::bind(pick_string,"trim-names", _1, "trim", ""));
ter_dlg["pickarena"].attachClickHandler(std::bind(pick_string,"arena-names", _1, "arena", ""));
ter_dlg["help"].attachClickHandler(std::bind(show_help, "ter-type-help", _1, 16));
ter_dlg["sound"].attachFocusHandler(play_ter_step_sound);
ter_dlg.attachClickHandlers(pick_ter_flag, {"pickflag1", "pickflag2", "pickflag3", "editspec", "picktrans"});
ter_dlg["picktown"].attachClickHandler([](cDialog& me, std::string, eKeyMod) -> bool {
int i = me["arena"].getTextAsNum();