Add and use scaling mode enum

This enum is to just make each mode be readable, instead of mysterious
0/1/2 values. It's not a strictly-typed enum because we still have to
serialize it as ints in the XML, but it's better than just leaving them
as ints.

This also adds a NUM_SCALING_MODES enum, so we don't have to hardcode
that 3 when cycling scaling modes anymore.
This commit is contained in:
Misa
2021-12-25 23:05:14 -08:00
parent f5166c437e
commit 550e76a6dc
4 changed files with 16 additions and 7 deletions

View File

@@ -1922,7 +1922,7 @@ void editorinput(void)
game.my = (float) key.my;
ed.tilex=(game.mx - (game.mx%8))/8;
ed.tiley=(game.my - (game.my%8))/8;
if (gameScreen.scalingMode == 1) {
if (gameScreen.scalingMode == SCALING_STRETCH) {
// In this mode specifically, we have to fix the mouse coordinates
int winwidth, winheight;
gameScreen.GetWindowSize(&winwidth, &winheight);