Cleanup tools & main rendering

Tools were a mess, spread all over the code with hundreds of `else-if`
statements. Instead of magic numbers denoting tools, an enum has been
created, and logic has been extracted into simple switch/cases, shared
logic being deduplicated.

The base of a state system for the editor has been created as well,
laying a good path for further organization improvements. Because of
this, the entire editor no longer gets drawn underneath the menus,
except for a few pieces which I haven't extracted yet. Either way,
this should be good for performance, if that was a concern.
This commit is contained in:
AllyTally
2023-03-02 02:45:22 -04:00
committed by Misa Elizabeth Kai
parent e3612afbd3
commit 34cc15505b
6 changed files with 1213 additions and 1378 deletions

View File

@@ -7237,6 +7237,8 @@ void Game::returntoeditor(void)
}
}
graphics.titlebg.scrolldir = 0;
graphics.backgrounddrawn = false;
graphics.foregrounddrawn = false;
}
#endif