Index: branches/osx/src/lib/graphics/importer/md2Model.cc
===================================================================
--- branches/osx/src/lib/graphics/importer/md2Model.cc	(revision 8122)
+++ branches/osx/src/lib/graphics/importer/md2Model.cc	(revision 8162)
@@ -80,6 +80,13 @@
 		_iptr[_l] = SDL_SwapLE32( _iptr[_l] );\
 } while( 0 )
+#define BULK_CONV16( _ptr, _num ) do { \
+	short  _cnt = _num;\
+	short* _iptr = (short*)_ptr;\
+	for( int _l = 0; _l<_cnt; ++_l )\
+		_iptr[_l] = SDL_SwapLE16( _iptr[_l] );\
+} while( 0 )
 #else
 #define BULK_CONV( _ptr, _num )
+#define BULK_CONV16( _ptr, _num )
 #endif	
 
@@ -111,5 +118,5 @@
   this->setAnim(STAND);
 
-  this->debug();
+  //this->debug();
 
     //write the modelinfo information
@@ -381,6 +388,8 @@
   //PRINTF(0)("\n==========================| MD2Model::debug() |===\n");
   PRINTF(0)("=  Model FileName:\t%s\n", this->data->fileName.c_str());
-  PRINTF(0)("=  Skin FileName:\t%s\n", this->data->skinFileName.c_str());
-  PRINTF(0)("=  Size in Memory:\t%i Bytes\n", this->data->header->frameSize * this->data->header->numFrames + 64); // 64bytes is the header size
+  PRINTF(0)("=  Skin FileName:\t%s\n", 
+		this->data->skinFileName.c_str());
+  PRINTF(0)("=  Size in Memory:\t%i Bytes\n", 
+		this->data->header->frameSize * this->data->header->numFrames + 64); // 64bytes is the header size
   PRINTF(0)("=  Number of Vertices:\t%i\n", this->data->header->numVertices);
   PRINTF(0)("=  Number of Frames: \t%i\n", this->data->header->numFrames);
@@ -491,5 +500,5 @@
   fseek(pFile, this->header->offsetFrames, SEEK_SET);
   fread(buffer, this->header->frameSize, this->numFrames, pFile);
-	BULK_CONV( buffer, this->header->frameSize*this->numFrames*sizeof(char)/4 );
+	//BULK_CONV( buffer, this->header->frameSize*this->numFrames*sizeof(char)/4 );
   /* read opengl commands */
   fseek(pFile, this->header->offsetGlCommands, SEEK_SET);
@@ -500,14 +509,17 @@
   fseek(pFile, this->header->offsetTriangles, SEEK_SET);
   fread(this->pTriangles, sizeof(sTriangle), this->numTriangles, pFile);	
-	BULK_CONV( this->pTriangles, this->numTriangles*(sizeof(sTriangle)/4) );
+	BULK_CONV16( this->pTriangles, this->numTriangles*sizeof(sTriangle)/2 );
 
   /*  read in texture coordinates */
   fseek(pFile, this->header->offsetTexCoords, SEEK_SET);
   fread(this->pTexCoor, sizeof(sTexCoor), this->numTexCoor, pFile);
-	BULK_CONV( this->pTexCoor, this->numTexCoor*(sizeof(sTexCoor)/4) );
+	BULK_CONV16( this->pTexCoor, this->numTexCoor*sizeof(sTexCoor)/2 );
 
   for(int i = 0; i < this->numFrames; ++i)
     {
       frame = (sFrame*)(buffer + this->header->frameSize * i);
+			//Convert the translate and scale Vec3D if needed.
+			BULK_CONV( frame, 6 );
+			BULK_CONV( frame->pVertices, 3 );
       pVertex = this->pVertices + this->numVertices  * i;
       pNormals = this->pLightNormals + this->numVertices * i;
Index: branches/osx/src/lib/graphics/importer/texture.cc
===================================================================
--- branches/osx/src/lib/graphics/importer/texture.cc	(revision 8122)
+++ branches/osx/src/lib/graphics/importer/texture.cc	(revision 8162)
@@ -22,11 +22,47 @@
 #include <math.h>
 
-// INCLUDING SDL_Image
-#ifdef HAVE_SDL_IMAGE_H
+#ifdef HAVE_SDL_SDL_H
+#include <SDL/SDL_image.h>
+#include <SDL/SDL_endian.h>
+#include <SDL/SDL_byteorder.h>
+#else
+#include <SDL_endian.h>
 #include <SDL_image.h>
+#include <SDL_byteorder.h>
+#endif
+#if SDL_BYTEORDER == SDL_BIG_ENDIAN
+/*
+ * On the BIG_ENDIAN architecture, the 24 and 32bit bitmaps have
+ * different masks. If you don't do this distinction properly, 
+ * you will get weird-looking textures.
+ */
+Uint32 alphaMask[] = {
+	0xFF000000,
+	0x00FF0000,
+	0x0000FF00,
+	0x000000FF,
+};
+
+Uint32 opaqueMask[] = {
+	0x00FF0000,
+	0x0000FF00,
+	0x000000FF,
+	0xFF000000
+};
 #else
-#include <SDL/SDL_image.h>
+/*
+ * On the LIL_ENDIAN architecture everything is fine and easy. The 24
+ * and 32bit bitmaps have the same masks.
+ */
+Uint32 alphaMask[] = {
+	0x000000FF,
+	0x0000FF00,
+	0x00FF0000,
+	0xFF000000,
+};
+
+Uint32 opaqueMask[] = alphaMask
+
 #endif
-
 /**
  * @brief Constructor for a Texture
@@ -190,33 +226,24 @@
   Uint32 saved_flags;
   Uint8  saved_alpha;
-
   hasAlpha = false;
   int pixelDepth = 24;
 
+	Uint32* mask = opaqueMask;
+	
   /* Save the alpha blending attributes */
   saved_flags = surface->flags&(SDL_SRCALPHA | SDL_RLEACCELOK);
   saved_alpha = surface->format->alpha;
-  if ( (saved_flags & SDL_SRCALPHA) == SDL_SRCALPHA )
+  if ( saved_flags & SDL_SRCALPHA )
   {
     SDL_SetAlpha(surface, 0, 0);
     hasAlpha = true;
     pixelDepth = 32;
-  }
-
+		mask = alphaMask;
+  }
+		
   retSurface = SDL_CreateRGBSurface(SDL_HWSURFACE,
                                     surface->w, surface->h,
                                     pixelDepth,
-//#if SDL_BYTEORDER == SDL_LIL_ENDIAN /* OpenGL RGBA masks */
-                                    0x000000FF,
-                                    0x0000FF00,
-                                    0x00FF0000,
-                                    0xFF000000
-/*#else*/
-                                    /*0xFF000000,
-                                    0x00FF0000,
-                                    0x0000FF00,
-                                    0x000000FF*/
-/*#endif*/
-                                   );
+																		mask[0], mask[1], mask[2], mask[3] );
   if ( retSurface == NULL )
     return NULL;
