Now working on the new SFML with better audio.
This commit is contained in:
parent
2d81f900be
commit
c47e688b0b
15 changed files with 189 additions and 169 deletions
14
builder.cpp
14
builder.cpp
|
@ -72,11 +72,13 @@ MatchResult Builder::parse_line(const string &line) {
|
|||
}
|
||||
}
|
||||
|
||||
void Builder::BUILDING(BuildEvent ev) {
|
||||
void Builder::BUILDING(BuildEvent) {
|
||||
// check if there's output
|
||||
if(build_done) {
|
||||
int rc = pclose(build_out);
|
||||
|
||||
fmt::println("PCLOSE RETURNED: {}", rc);
|
||||
|
||||
if(rc == 0) {
|
||||
game.event(GameEvent::BUILD_SUCCESS);
|
||||
gui.build_success();
|
||||
|
@ -98,7 +100,7 @@ void Builder::BUILDING(BuildEvent ev) {
|
|||
}
|
||||
}
|
||||
|
||||
void Builder::START(BuildEvent ev) {
|
||||
void Builder::START(BuildEvent) {
|
||||
gui.output(fmt::format("Using build command: {}", build_cmd));
|
||||
fileWatcher = new efsw::FileWatcher();
|
||||
dbc::check(fileWatcher != nullptr, "Failed to create filewatcher.");
|
||||
|
@ -118,7 +120,7 @@ void Builder::START(BuildEvent ev) {
|
|||
state(BuildState::WAITING);
|
||||
}
|
||||
|
||||
void Builder::WAITING(BuildEvent ev) {
|
||||
void Builder::WAITING(BuildEvent) {
|
||||
if(listener->changes) {
|
||||
game.event(GameEvent::BUILD_START);
|
||||
gui.building();
|
||||
|
@ -127,7 +129,7 @@ void Builder::WAITING(BuildEvent ev) {
|
|||
}
|
||||
}
|
||||
|
||||
void Builder::FORKING(BuildEvent ev) {
|
||||
void Builder::FORKING(BuildEvent) {
|
||||
if(build_fut.valid()) {
|
||||
std::future_status status = build_fut.wait_for(0ms);
|
||||
|
||||
|
@ -146,7 +148,7 @@ void Builder::FORKING(BuildEvent ev) {
|
|||
}
|
||||
}
|
||||
|
||||
void Builder::READING(BuildEvent ev) {
|
||||
void Builder::READING(BuildEvent) {
|
||||
// BUG: too much copy-pasta so turn this into a class?
|
||||
if(read_fut.valid()) {
|
||||
std::future_status status = read_fut.wait_for(0ms);
|
||||
|
@ -164,7 +166,7 @@ void Builder::READING(BuildEvent ev) {
|
|||
}
|
||||
}
|
||||
|
||||
void Builder::DONE(BuildEvent ev) {
|
||||
void Builder::DONE(BuildEvent) {
|
||||
if(game.is_dead()) {
|
||||
gui.you_died();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue