De-duplicate Graphics::drawmenu() and Graphics::drawlevelmenu()

Graphics::drawmenu() no longer has copy-pasted code for each individual
case. Instead, the individual cases have their own adding on to common
code, which is far easier to maintain.

Also, the only difference Graphics::drawlevelmenu() does is in some
y-positioning stuff. There's no reason to make it a whole separate
function and duplicate everything AGAIN. So it's been consolidated into
Graphics::drawmenu() as well, and I've added a boolean to draw a menu
this way if it's the level menu.
This commit is contained in:
Misa
2020-07-04 14:53:05 -07:00
committed by Ethan Lee
parent fbfeeaccd1
commit fd0dafc16c
3 changed files with 59 additions and 126 deletions

View File

@@ -46,8 +46,7 @@ public:
void drawcoloredtile(int x, int y, int t, int r, int g, int b);
void drawmenu(int cr, int cg, int cb);
void drawlevelmenu(int cr, int cg, int cb);
void drawmenu(int cr, int cg, int cb, bool levelmenu = false);
void processfade();