1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-26 14:38:30 +02:00

Add '#if !defined(NO_EDITOR)' guards around editorinput/render/logic

These functions aren't needed in a NO_EDITOR build, so it's useful to
reduce the binary size this way.
This commit is contained in:
Misa 2020-06-19 15:23:28 -07:00 committed by Ethan Lee
parent 5c7e869ee7
commit c6e800db6f
3 changed files with 7 additions and 3 deletions

View File

@ -2299,6 +2299,7 @@ void editorclass::generatecustomminimap()
} }
} }
#if !defined(NO_EDITOR)
void editormenurender(int tr, int tg, int tb) void editormenurender(int tr, int tg, int tb)
{ {
switch (game.currentmenuname) switch (game.currentmenuname)
@ -5594,6 +5595,7 @@ void editorinput()
} }
} }
} }
#endif /* NO_EDITOR */
int editorclass::numtrinkets() int editorclass::numtrinkets()
{ {

View File

@ -259,11 +259,13 @@ void fillbox(int x, int y, int x2, int y2, int c);
void fillboxabs(int x, int y, int x2, int y2, int c); void fillboxabs(int x, int y, int x2, int y2, int c);
#if !defined(NO_EDITOR)
void editorrender(); void editorrender();
void editorlogic(); void editorlogic();
void editorinput(); void editorinput();
#endif
extern editorclass ed; extern editorclass ed;

View File

@ -400,7 +400,7 @@ void inline deltaloop()
case PRELOADER: case PRELOADER:
preloaderrender(); preloaderrender();
break; break;
#if !defined(NO_CUSTOM_LEVELS) #if !defined(NO_CUSTOM_LEVELS) && !defined(NO_EDITOR)
case EDITORMODE: case EDITORMODE:
graphics.flipmode = false; graphics.flipmode = false;
editorrender(); editorrender();
@ -499,7 +499,7 @@ void inline fixedloop()
case PRELOADER: case PRELOADER:
preloaderlogic(); preloaderlogic();
break; break;
#if !defined(NO_CUSTOM_LEVELS) #if !defined(NO_CUSTOM_LEVELS) && !defined(NO_EDITOR)
case EDITORMODE: case EDITORMODE:
//Input //Input
editorinput(); editorinput();
@ -598,7 +598,7 @@ void inline fixedloop()
} }
//Mute button //Mute button
#if !defined(NO_CUSTOM_LEVELS) #if !defined(NO_CUSTOM_LEVELS) && !defined(NO_EDITOR)
bool inEditor = ed.textentry || ed.scripthelppage == 1; bool inEditor = ed.textentry || ed.scripthelppage == 1;
#else #else
bool inEditor = false; bool inEditor = false;