summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Campbell <ben@scumways.com>2016-12-09 10:36:10 +1300
committerBen Campbell <ben@scumways.com>2016-12-19 10:09:22 +1300
commitd9f69239ce1706f88ee7eaa3c65d939f3ce25723 (patch)
tree50faf6e597a13ee8722ed60a683fc1255621d63f
parent09efad5474ab07e2f6786eb518be417404384c2f (diff)
downloaddevil-d9f69239ce1706f88ee7eaa3c65d939f3ce25723.tar.gz
il_stack: hide internal workings
-rw-r--r--DevIL/src-IL/include/il_stack.h9
-rw-r--r--DevIL/src-IL/src/il_stack.c17
2 files changed, 15 insertions, 11 deletions
diff --git a/DevIL/src-IL/include/il_stack.h b/DevIL/src-IL/include/il_stack.h
index c5fb0f3f..784fff31 100644
--- a/DevIL/src-IL/include/il_stack.h
+++ b/DevIL/src-IL/include/il_stack.h
@@ -16,15 +16,6 @@
#include "il_internal.h"
-// Just a guess...seems large enough
-#define I_STACK_INCREMENT 1024
-
-typedef struct iFree
-{
- ILuint Name;
- void *Next;
-} iFree;
-
// the currently-bound image
extern ILuint CurName;
diff --git a/DevIL/src-IL/src/il_stack.c b/DevIL/src-IL/src/il_stack.c
index b10fd149..6add628d 100644
--- a/DevIL/src-IL/src/il_stack.c
+++ b/DevIL/src-IL/src/il_stack.c
@@ -19,13 +19,26 @@
ILuint CurName = 0;
-// Internal functions
-static ILboolean iEnlargeStack();
+// Internal stuff
+
+// Just a guess...seems large enough
+#define I_STACK_INCREMENT 1024
+
+typedef struct iFree
+{
+ ILuint Name;
+ void *Next;
+} iFree;
+static ILboolean iEnlargeStack();
+
static ILuint StackSize = 0;
static ILuint LastUsed = 0;
+
+// two fixed slots - slot 0 is default (fallback) image, slot 1 is temp image
static ILimage **ImageStack = NULL;
+
static iFree *FreeNames = NULL;
static ILboolean OnExit = IL_FALSE;
static ILboolean ParentImage = IL_TRUE;