Progress on mingw driver

This commit is contained in:
2021-10-07 14:58:20 -04:00
parent bce756d1fd
commit e7f55a2411
16 changed files with 405 additions and 172 deletions

View File

@@ -178,6 +178,7 @@ void TextGame::event_update()
world_->run_unittests();
actor_id_ = world_->create_login_actor();
std::cerr << "Login actor ID: " << actor_id_ << std::endl;
get_stdio_channel()->out()->write_bytes(console_.get_prompt());
}
world_->update_source(get_lua_source());
@@ -188,16 +189,20 @@ void TextGame::event_update()
int action = console_.action();
if (action == LuaConsole::DO_LUA) {
do_lua(console_.lua_expression());
console_.clear();
} else if (action == LuaConsole::DO_COMMAND) {
do_command(console_.words());
console_.clear();
} else if (action == LuaConsole::DO_SYNTAX) {
std::cerr << console_.syntax() << std::endl;
console_.clear();
}
check_redirects();
if (actor_id_ == 0) {
stop_driver();
return;
}
get_stdio_channel()->out()->write_bytes(console_.get_prompt());
}
}