From 102dd5720bfd01cc7f32e34fb0e7586db38c1173 Mon Sep 17 00:00:00 2001 From: Laurent Carlier Date: Wed, 16 Jun 2010 13:05:35 +0000 Subject: [PATCH] [GB.SDL] * NEW: Remove libsdl_image dependency, now Image class relies completly on the gb.image.io component to load images. Less dependencies is always better. git-svn-id: svn://localhost/gambas/trunk@3011 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- gb.sdl/configure.ac | 4 ++-- gb.sdl/src/Cimage.cpp | 6 +++--- gb.sdl/src/SDLsurface.cpp | 4 ++-- gb.sdl/src/SDLsurface.h | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gb.sdl/configure.ac b/gb.sdl/configure.ac index b261547fc..f45006a13 100644 --- a/gb.sdl/configure.ac +++ b/gb.sdl/configure.ac @@ -33,8 +33,8 @@ GB_COMPONENT( [SDL], [src], [GB_FIND(SDL_opengl.h SDL.h SDL_image.h SDL_ttf.h, `sdl-config --prefix`, include/SDL)], - [GB_FIND(libSDL_image.$SHLIBEXT libSDL_ttf.$SHLIBEXT libGLEW.$SHLIBEXT, /usr /usr/X11R6 /usr/local `sdl-config --prefix`, lib)], - [$X_LIBS -lSDL_image -lSDL_ttf -lGLU -lGLEW], + [GB_FIND(libSDL_ttf.$SHLIBEXT libGLEW.$SHLIBEXT, /usr /usr/X11R6 /usr/local `sdl-config --prefix`, lib)], + [$X_LIBS -lSDL_ttf -lGLU -lGLEW], [$SDL_CFLAGS]) AC_OUTPUT( \ diff --git a/gb.sdl/src/Cimage.cpp b/gb.sdl/src/Cimage.cpp index 1414c8ec5..8af510b10 100644 --- a/gb.sdl/src/Cimage.cpp +++ b/gb.sdl/src/Cimage.cpp @@ -91,7 +91,7 @@ CIMAGE *CIMAGE_create(SDLsurface *image) } /***************************************************************************/ - +/* BEGIN_METHOD(CIMAGE_load, GB_STRING path) char *addr; @@ -113,14 +113,14 @@ BEGIN_METHOD(CIMAGE_load, GB_STRING path) GB.Error("Unable to load image"); END_METHOD - +*/ /***************************************************************************/ GB_DESC CImage[] = { GB_DECLARE("Image", sizeof(CIMAGE)), - GB_STATIC_METHOD("Load", "Image", CIMAGE_load, "(Path)s"), + //GB_STATIC_METHOD("Load", "Image", CIMAGE_load, "(Path)s"), GB_END_DECLARE }; diff --git a/gb.sdl/src/SDLsurface.cpp b/gb.sdl/src/SDLsurface.cpp index 72d0c6ee1..e420711ce 100644 --- a/gb.sdl/src/SDLsurface.cpp +++ b/gb.sdl/src/SDLsurface.cpp @@ -161,7 +161,7 @@ void SDLsurface::Create(int Width, int Height, int Depth) } hTexture->ToLoad(); } - +/* void SDLsurface::LoadFromMem(char *addr, long len) { SDL_Surface *surface = IMG_Load_RW(SDL_RWFromMem(addr, len), true); @@ -180,7 +180,7 @@ void SDLsurface::LoadFromMem(char *addr, long len) std::cout << "SDLsurface::LoadFromMem : alpha layer detected" << std::endl; #endif } - +*/ int SDLsurface::GetWidth() { if (hSurface) diff --git a/gb.sdl/src/SDLsurface.h b/gb.sdl/src/SDLsurface.h index 4c3ed0355..07c01cd71 100644 --- a/gb.sdl/src/SDLsurface.h +++ b/gb.sdl/src/SDLsurface.h @@ -37,7 +37,7 @@ public: ~SDLsurface(); void Create(int Width, int Height, int Depth = 0); - void LoadFromMem(char* addr, long len); +// void LoadFromMem(char* addr, long len); int GetWidth(void ); int GetHeight(void );