Add status macros and refactor overworld

This commit is contained in:
scawful
2022-08-23 13:26:06 -05:00
parent 86b36b1ba0
commit 6dd4c390fe
4 changed files with 65 additions and 41 deletions

View File

@@ -80,9 +80,9 @@ void HandleMouseMovement(int &wheel) {
bool Controller::isActive() const { return active_; }
absl::Status Controller::onEntry() {
CHECK_STATUS(CreateWindow())
CHECK_STATUS(CreateRenderer())
CHECK_STATUS(CreateGuiContext())
RETURN_IF_ERROR(CreateWindow())
RETURN_IF_ERROR(CreateRenderer())
RETURN_IF_ERROR(CreateGuiContext())
InitializeKeymap();
master_editor_.SetupScreen(renderer_);
active_ = true;