From e0bdd8cfbd2f1122e79cbf865d4b9a0460c5a0a9 Mon Sep 17 00:00:00 2001 From: Javidx9 <25419386+OneLoneCoder@users.noreply.github.com> Date: Wed, 24 Oct 2018 15:05:58 +0100 Subject: [PATCH] Update olcPixelGameEngine.h Quick error in docs fixed regarding OLC_PGE_APPLICATION --- olcPixelGameEngine.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/olcPixelGameEngine.h b/olcPixelGameEngine.h index 4233a85..4acad43 100644 --- a/olcPixelGameEngine.h +++ b/olcPixelGameEngine.h @@ -2,7 +2,7 @@ olcPixelGameEngine.h +-------------------------------------------------------------+ - | OneLoneCoder Pixel Game Engine v1.6 | + | OneLoneCoder Pixel Game Engine v1.7 | | "Like the command prompt console one, but not..." - javidx9 | +-------------------------------------------------------------+ @@ -125,7 +125,7 @@ Author ~~~~~~ - David Barr, aka javidx9, ©OneLoneCoder 2018 + David Barr, aka javidx9, ©OneLoneCoder 2018 */ //////////////////////////////////////////////////////////////////////////// @@ -499,15 +499,15 @@ namespace olc // All OneLoneCoder stuff will now exist in the "olc" namespace If the olcPixelGameEngine.h is called from several sources it can cause multiple definitions of objects. To prevent this, ALL but ONE of the pathways - to including this file must have OLC_OOP_MODE defined before it. This prevents + to including this file must have OLC_PGE_APPLICATION defined before it. This prevents the definitions being duplicated. Consider the following project structure: Class1.h - Includes olcPixelGameEngine.h, overrides olc::PixelGameEngine - Class1.cpp - #define OLC_OOP_MODE #include "Class1.h" + Class1.cpp - #define OLC_PGE_APPLICATION #include "Class1.h" Class2.h - Includes Class1.h, which includes olcPixelGameEngine.h - Class2.cpp - #define OLC_OOP_MODE #include "Class2.h" + Class2.cpp - #define OLC_PGE_APPLICATION #include "Class2.h" main.cpp - Includes Class1.h and Class2.h */ @@ -1743,4 +1743,4 @@ namespace olc //============================================================= } -#endif \ No newline at end of file +#endif