Fix mapc dependence on share/glext.h
authorparasti <parasti@78b8d119-cf0a-0410-b17c-f493084dd1d7>
Sat, 9 Apr 2011 17:41:29 +0000 (17:41 +0000)
committerparasti <parasti@78b8d119-cf0a-0410-b17c-f493084dd1d7>
Sat, 9 Apr 2011 17:41:29 +0000 (17:41 +0000)
(cherry picked from r3525 by parasti)

git-svn-id: https://s.snth.net/svn/neverball/branches/gles@3564 78b8d119-cf0a-0410-b17c-f493084dd1d7

share/base_config.c
share/base_image.c

index 8334407..b7d5550 100644 (file)
 #include <math.h>
 
 #include "base_config.h"
-#include "glext.h"
-#include "vec3.h"
 #include "common.h"
 #include "fs.h"
-#include "dir.h"
-#include "array.h"
 
 /*---------------------------------------------------------------------------*/
 
index b3c5808..697e30e 100644 (file)
@@ -17,7 +17,6 @@
 #include <stdlib.h>
 #include <assert.h>
 
-#include "glext.h"
 #include "base_config.h"
 #include "base_image.h"
 
@@ -128,7 +127,7 @@ static void *image_load_jpg(const char *filename, int *width,
                                                   int *height,
                                                   int *bytes)
 {
-    GLubyte *p = NULL;
+    unsigned char *p = NULL;
     fs_file fp;
 
     if ((fp = fs_open(filename, "r")))
@@ -158,11 +157,11 @@ static void *image_load_jpg(const char *filename, int *width,
 
         /* Allocate the final pixel buffer and copy pixels there. */
 
-        if ((p = (GLubyte *) malloc (w * h * b)))
+        if ((p = (unsigned char *) malloc (w * h * b)))
         {
             while (cinfo.output_scanline < cinfo.output_height)
             {
-                GLubyte *buffer = p + w * b * (h - i - 1);
+                unsigned char *buffer = p + w * b * (h - i - 1);
                 i += jpeg_read_scanlines(&cinfo, &buffer, 1);
             }