summarylogtreecommitdiffstats
path: root/fix-namespaces.patch
blob: 02771aa487fa16c3a275a0588220d15a5a26b847 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
From 1ef4a705f32ff0774585ee1e0209a74e8332b782 Mon Sep 17 00:00:00 2001
From: Ivan Mogilko <ikm_spb@yahoo.com>
Date: Mon, 23 May 2016 20:28:37 +0300
Subject: [PATCH] Plugins: moved standard library header includes out of plugin
 namespace

---
 Plugins/AGSflashlight/agsflashlight.cpp | 14 +++++++-------
 Plugins/ags_parallax/ags_parallax.cpp   | 12 ++++++------
 Plugins/ags_snowrain/ags_snowrain.cpp   | 14 +++++++-------
 3 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/Plugins/AGSflashlight/agsflashlight.cpp b/Plugins/AGSflashlight/agsflashlight.cpp
index 30aa54f..687cb54 100644
--- a/Plugins/AGSflashlight/agsflashlight.cpp
+++ b/Plugins/AGSflashlight/agsflashlight.cpp
@@ -16,12 +16,6 @@ but a workalike plugin created by JJS for the AGS engine PSP port.
 #define THIS_IS_THE_PLUGIN
 #endif
 
-#include "plugin/agsplugin.h"
-
-#if defined(BUILTIN_PLUGINS)
-namespace agsflashlight {
-#endif
-
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -34,6 +28,12 @@ namespace agsflashlight {
 #define sin(x) vfpu_sinf(x)
 #endif
 
+#include "plugin/agsplugin.h"
+
+#if defined(BUILTIN_PLUGINS)
+namespace agsflashlight {
+#endif
+
 #if defined(__GNUC__)
 inline unsigned long _blender_alpha16_bgr(unsigned long y) __attribute__((always_inline));
 inline void calc_x_n(unsigned long bla) __attribute__((always_inline));
@@ -946,5 +946,5 @@ void AGS_EditorLoadGame(char* buffer, int bufsize)
 
 
 #if defined(BUILTIN_PLUGINS)
-}
+} // namespace agsflashlight
 #endif
diff --git a/Plugins/ags_parallax/ags_parallax.cpp b/Plugins/ags_parallax/ags_parallax.cpp
index c9203d5..60fac06 100644
--- a/Plugins/ags_parallax/ags_parallax.cpp
+++ b/Plugins/ags_parallax/ags_parallax.cpp
@@ -16,17 +16,17 @@ but a workalike plugin created by JJS for the AGS engine ports.
 #define THIS_IS_THE_PLUGIN
 #endif
 
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+
 #include "plugin/agsplugin.h"
 
 #if defined(BUILTIN_PLUGINS)
 namespace ags_parallax {
 #endif
 
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <math.h>
-
 //#define DEBUG
 //#define ENABLE_SAVING // The original plugin does not save any data!
 
@@ -343,5 +343,5 @@ void AGS_EditorLoadGame(char* buffer, int bufsize)
 
 
 #if defined(BUILTIN_PLUGINS)
-}
+} // namespace ags_parallax
 #endif
diff --git a/Plugins/ags_snowrain/ags_snowrain.cpp b/Plugins/ags_snowrain/ags_snowrain.cpp
index 39102d6..14e858a 100644
--- a/Plugins/ags_snowrain/ags_snowrain.cpp
+++ b/Plugins/ags_snowrain/ags_snowrain.cpp
@@ -16,12 +16,6 @@ but a workalike plugin created by JJS for the AGS engine PSP port.
 #define THIS_IS_THE_PLUGIN
 #endif
 
-#include "plugin/agsplugin.h"
-
-#if defined(BUILTIN_PLUGINS)
-namespace ags_snowrain {
-#endif
-
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -33,6 +27,12 @@ namespace ags_snowrain {
 #define sin(x) vfpu_sinf(x)
 #endif
 
+#include "plugin/agsplugin.h"
+
+#if defined(BUILTIN_PLUGINS)
+namespace ags_snowrain {
+#endif
+
 //#define DEBUG
 //#define AGS_SNOWRAIN_DLL_SAVEGAME_COMPATIBILITY
 
@@ -960,5 +960,5 @@ void AGS_EditorLoadGame(char* buffer, int bufsize)
 
 
 #if defined(BUILTIN_PLUGINS)
-}
+} // namespace ags_snowrain
 #endif