@@ -380,7 +380,7 @@ static bool spend_xp_navigate_filter(cDialog& me, std::string item_hit,xp_dlog_s
|
|||||||
} while(univ.party[save.who].main_status != eMainStatus::ALIVE);
|
} while(univ.party[save.who].main_status != eMainStatus::ALIVE);
|
||||||
do_xp_draw(me,save);
|
do_xp_draw(me,save);
|
||||||
} else
|
} else
|
||||||
beep();
|
beep(); // TODO: This is a game event, so it should have a game sound, not a system alert.
|
||||||
} else if(item_hit == "right") {
|
} else if(item_hit == "right") {
|
||||||
// TODO: If they don't work in mode 0, why are they visible?
|
// TODO: If they don't work in mode 0, why are they visible?
|
||||||
if(save.mode != 0) {
|
if(save.mode != 0) {
|
||||||
@@ -390,7 +390,7 @@ static bool spend_xp_navigate_filter(cDialog& me, std::string item_hit,xp_dlog_s
|
|||||||
} while(univ.party[save.who].main_status != eMainStatus::ALIVE);
|
} while(univ.party[save.who].main_status != eMainStatus::ALIVE);
|
||||||
do_xp_draw(me,save);
|
do_xp_draw(me,save);
|
||||||
} else
|
} else
|
||||||
beep();
|
beep(); // TODO: This is a game event, so it should have a game sound, not a system alert.
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -409,7 +409,7 @@ static bool spend_xp_event_filter(cDialog& me, std::string item_hit, eKeyMod mod
|
|||||||
if(save.mode == 1)
|
if(save.mode == 1)
|
||||||
save.g += 10;
|
save.g += 10;
|
||||||
}
|
}
|
||||||
} else beep();
|
} else beep(); // TODO: This is a game event, so it should have a game sound, not a system alert.
|
||||||
} else if(item_hit[3] == 'p') {
|
} else if(item_hit[3] == 'p') {
|
||||||
if(can_change_skill(eSkill::MAX_SP, save, true)) {
|
if(can_change_skill(eSkill::MAX_SP, save, true)) {
|
||||||
save.hp += 2;
|
save.hp += 2;
|
||||||
@@ -444,7 +444,7 @@ static bool spend_xp_event_filter(cDialog& me, std::string item_hit, eKeyMod mod
|
|||||||
if(save.mode == 1)
|
if(save.mode == 1)
|
||||||
save.g += 15;
|
save.g += 15;
|
||||||
}
|
}
|
||||||
} else beep();
|
} else beep(); // TODO: This is a game event, so it should have a game sound, not a system alert.
|
||||||
} else if(item_hit[3] == 'p') {
|
} else if(item_hit[3] == 'p') {
|
||||||
if(can_change_skill(eSkill::MAX_SP, save, true)) {
|
if(can_change_skill(eSkill::MAX_SP, save, true)) {
|
||||||
save.sp += 1;
|
save.sp += 1;
|
||||||
@@ -492,7 +492,7 @@ static bool spend_xp_event_filter(cDialog& me, std::string item_hit, eKeyMod mod
|
|||||||
if(save.mode == 1)
|
if(save.mode == 1)
|
||||||
save.g += skill_g_cost[which_skill];
|
save.g += skill_g_cost[which_skill];
|
||||||
}
|
}
|
||||||
} else beep();
|
} else beep(); // TODO: This is a game event, so it should have a game sound, not a system alert.
|
||||||
} else if(dir == 'p') {
|
} else if(dir == 'p') {
|
||||||
if(can_change_skill(which_skill, save, true)) {
|
if(can_change_skill(which_skill, save, true)) {
|
||||||
save.skills[which_skill] += 1;
|
save.skills[which_skill] += 1;
|
||||||
@@ -506,7 +506,7 @@ static bool spend_xp_event_filter(cDialog& me, std::string item_hit, eKeyMod mod
|
|||||||
give_help(25,0,me);
|
give_help(25,0,me);
|
||||||
else if(save.mode == 1 && save.g < skill_g_cost[which_skill])
|
else if(save.mode == 1 && save.g < skill_g_cost[which_skill])
|
||||||
give_help(24,0,me);
|
give_help(24,0,me);
|
||||||
else beep();
|
else beep(); // TODO: This is a game event, so it should have a game sound, not a system alert.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
#include "keymods.hpp"
|
#include "keymods.hpp"
|
||||||
|
|
||||||
void play_sound(snd_num_t which, sf::Time delay = sf::Time());
|
|
||||||
|
|
||||||
// The default scale should be the largest that the user's screen can fit all three
|
// The default scale should be the largest that the user's screen can fit all three
|
||||||
// BoE application windows (because they should probably default to match each other).
|
// BoE application windows (because they should probably default to match each other).
|
||||||
double fallback_scale() {
|
double fallback_scale() {
|
||||||
@@ -51,7 +49,3 @@ bool pollEvent(sf::Window& win, sf::Event& event){
|
|||||||
bool pollEvent(sf::Window* win, sf::Event& event){
|
bool pollEvent(sf::Window* win, sf::Event& event){
|
||||||
return pollEvent(*win, event);
|
return pollEvent(*win, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void beep() {
|
|
||||||
play_sound(1);
|
|
||||||
}
|
|
@@ -224,6 +224,9 @@ std::unique_ptr<sf::Image> get_clipboard_img() {
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void beep() {
|
||||||
|
}
|
||||||
|
|
||||||
void launchURL(std::string url) {
|
void launchURL(std::string url) {
|
||||||
system((std::string { "xdg-open " } + url).c_str());
|
system((std::string { "xdg-open " } + url).c_str());
|
||||||
}
|
}
|
||||||
|
@@ -169,6 +169,10 @@ std::unique_ptr<sf::Image> get_clipboard_img() {
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void beep() {
|
||||||
|
NSBeep();
|
||||||
|
}
|
||||||
|
|
||||||
void launchURL(std::string url) {
|
void launchURL(std::string url) {
|
||||||
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:[NSString stringWithUTF8String:url.c_str()]]];
|
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:[NSString stringWithUTF8String:url.c_str()]]];
|
||||||
}
|
}
|
||||||
|
@@ -418,6 +418,10 @@ CLEANUP:
|
|||||||
return img;
|
return img;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void beep() {
|
||||||
|
MessageBeep(-1);
|
||||||
|
}
|
||||||
|
|
||||||
void launchURL(std::string url) {
|
void launchURL(std::string url) {
|
||||||
ShellExecuteA(NULL, "open", url.c_str(), NULL, NULL, SW_SHOWNORMAL);
|
ShellExecuteA(NULL, "open", url.c_str(), NULL, NULL, SW_SHOWNORMAL);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user