From 6f0177ec04fa6338ef13ea13df6094d498815299 Mon Sep 17 00:00:00 2001 From: Misa Date: Fri, 19 Feb 2021 23:21:58 -0800 Subject: [PATCH] Move editor functions to separate header Editor functions now live in Editor.h, which is a new file - the existing editor.h has been renamed to CustomLevels.h. --- desktop_version/src/CustomLevels.h | 16 +++------------- desktop_version/src/Editor.h | 16 ++++++++++++++++ desktop_version/src/main.cpp | 1 + 3 files changed, 20 insertions(+), 13 deletions(-) create mode 100644 desktop_version/src/Editor.h diff --git a/desktop_version/src/CustomLevels.h b/desktop_version/src/CustomLevels.h index 8de6c189..8c84341d 100644 --- a/desktop_version/src/CustomLevels.h +++ b/desktop_version/src/CustomLevels.h @@ -1,7 +1,7 @@ #if !defined(NO_CUSTOM_LEVELS) -#ifndef EDITOR_H -#define EDITOR_H +#ifndef CUSTOMLEVELS_H +#define CUSTOMLEVELS_H #include #include @@ -307,20 +307,10 @@ class editorclass{ int currentghosts; }; -#if !defined(NO_EDITOR) -void editorrender(void); - -void editorrenderfixed(void); - -void editorlogic(void); - -void editorinput(void); -#endif - #ifndef ED_DEFINITION extern editorclass ed; #endif -#endif /* EDITOR_H */ +#endif /* CUSTOMLEVELS_H */ #endif /* NO_CUSTOM_LEVELS */ diff --git a/desktop_version/src/Editor.h b/desktop_version/src/Editor.h new file mode 100644 index 00000000..c5f68d20 --- /dev/null +++ b/desktop_version/src/Editor.h @@ -0,0 +1,16 @@ +#if !defined(NO_CUSTOM_LEVELS) && !defined(NO_EDITOR) + +#ifndef EDITOR_H +#define EDITOR_H + +void editorrender(void); + +void editorrenderfixed(void); + +void editorlogic(void); + +void editorinput(void); + +#endif /* EDITOR_H */ + +#endif /* NO_CUSTOM_LEVELS and NO_EDITOR */ diff --git a/desktop_version/src/main.cpp b/desktop_version/src/main.cpp index 25eff2de..f6b68663 100644 --- a/desktop_version/src/main.cpp +++ b/desktop_version/src/main.cpp @@ -2,6 +2,7 @@ #include "CustomLevels.h" #include "DeferCallbacks.h" +#include "Editor.h" #include "Enums.h" #include "Entity.h" #include "Exit.h"