RageSurface_Load_GIF
This commit is contained in:
@@ -1,13 +1,21 @@
|
|||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "RageSurface_Load.h"
|
#include "RageSurface_Load.h"
|
||||||
#include "RageSurface_Load_PNG.h"
|
#include "RageSurface_Load_PNG.h"
|
||||||
|
#include "RageSurface_Load_GIF.h"
|
||||||
#include "RageUtil.h"
|
#include "RageUtil.h"
|
||||||
#include "SDL_image.h"
|
#include "SDL_image.h"
|
||||||
|
|
||||||
SDL_Surface *RageSurface::LoadFile( const CString &sPath )
|
SDL_Surface *RageSurface::LoadFile( const CString &sPath )
|
||||||
{
|
{
|
||||||
const CString ext = GetExtension( sPath );
|
const CString ext = GetExtension( sPath );
|
||||||
if( ext.CompareNoCase( "png" ) )
|
|
||||||
|
CString error;
|
||||||
|
SDL_Surface *ret = NULL;
|
||||||
|
if( !ext.CompareNoCase("png") )
|
||||||
|
ret = RageSurface_Load_PNG( sPath, error );
|
||||||
|
else if( !ext.CompareNoCase("gif") )
|
||||||
|
ret = RageSurface_Load_GIF( sPath, error );
|
||||||
|
else
|
||||||
{
|
{
|
||||||
SDL_RWops *rw = OpenRWops( sPath );
|
SDL_RWops *rw = OpenRWops( sPath );
|
||||||
if( rw == NULL )
|
if( rw == NULL )
|
||||||
@@ -22,8 +30,6 @@ SDL_Surface *RageSurface::LoadFile( const CString &sPath )
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
CString error;
|
|
||||||
SDL_Surface *ret = RageSurface_Load_PNG( sPath, error );
|
|
||||||
if( ret == NULL )
|
if( ret == NULL )
|
||||||
SDL_SetError( "%s", error.c_str() );
|
SDL_SetError( "%s", error.c_str() );
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,482 @@
|
|||||||
|
#include "global.h"
|
||||||
|
#include "RageSurface_Load_GIF.h"
|
||||||
|
#include "RageFile.h"
|
||||||
|
#include "RageUtil.h"
|
||||||
|
#include "RageLog.h"
|
||||||
|
|
||||||
|
#define MAXCOLORMAPSIZE 256
|
||||||
|
|
||||||
|
#define MAX_LWZ_BITS 12
|
||||||
|
|
||||||
|
#define INTERLACE 0x40
|
||||||
|
#define LOCALCOLORMAP 0x80
|
||||||
|
#define BitSet(byte, bit) (((byte) & (bit)) == (bit))
|
||||||
|
|
||||||
|
#define ReadOK(file,buffer,len) (file.Read( buffer, len, 1) != 0)
|
||||||
|
|
||||||
|
#define LM_to_uint(a,b) (((b)<<8)|(a))
|
||||||
|
|
||||||
|
|
||||||
|
static SDL_Surface *ReadImage( RageFile &f, int len, int height,
|
||||||
|
const SDL_Color localColorMap[MAXCOLORMAPSIZE],
|
||||||
|
int interlace, int ignore );
|
||||||
|
|
||||||
|
static bool ReadPalette( RageFile &f, int number, SDL_Color buffer[MAXCOLORMAPSIZE] )
|
||||||
|
{
|
||||||
|
for( int i = 0; i < number; ++i )
|
||||||
|
{
|
||||||
|
if( !ReadOK(f, &buffer[i].r, sizeof(buffer[i].r)) )
|
||||||
|
return false;
|
||||||
|
if( !ReadOK(f, &buffer[i].g, sizeof(buffer[i].g)) )
|
||||||
|
return false;
|
||||||
|
if( !ReadOK(f, &buffer[i].b, sizeof(buffer[i].b)) )
|
||||||
|
return false;
|
||||||
|
buffer[i].unused = 0xFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int GetDataBlock( RageFile &f, unsigned char *buf )
|
||||||
|
{
|
||||||
|
unsigned char count;
|
||||||
|
|
||||||
|
if( !ReadOK(f, &count, 1) )
|
||||||
|
{
|
||||||
|
/* pm_message("error in getting DataBlock size" ); */
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( count != 0 && !ReadOK(f, buf, count) )
|
||||||
|
{
|
||||||
|
/* pm_message("error in reading DataBlock" ); */
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
SDL_Surface *RageSurface_Load_GIF( const CString &sPath, CString &error )
|
||||||
|
{
|
||||||
|
unsigned char buf[256];
|
||||||
|
int imageCount = 0;
|
||||||
|
int imageNumber = 1;
|
||||||
|
RageFile f;
|
||||||
|
|
||||||
|
if( !f.Open( sPath ) )
|
||||||
|
{
|
||||||
|
error = f.GetError();
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( !ReadOK(f, buf, 6) )
|
||||||
|
{
|
||||||
|
error = "error reading magic number";
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
if( strncmp((char *) buf, "GIF", 3) != 0 )
|
||||||
|
{
|
||||||
|
error = "not a GIF file";
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
char version[4];
|
||||||
|
strncpy(version, (char *) buf + 3, 3);
|
||||||
|
version[3] = '\0';
|
||||||
|
|
||||||
|
if( (strcmp(version, "87a") != 0) && (strcmp(version, "89a") != 0) )
|
||||||
|
{
|
||||||
|
error = "bad version number, not '87a' or '89a'";
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if( !ReadOK(f, buf, 7) )
|
||||||
|
{
|
||||||
|
error = "failed to read screen descriptor";
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
SDL_Color GlobalColorMap[MAXCOLORMAPSIZE];
|
||||||
|
unsigned int GlobalBitPixel = 0;
|
||||||
|
|
||||||
|
GlobalBitPixel = 2 << (buf[4] & 0x07);
|
||||||
|
|
||||||
|
if( BitSet(buf[4], LOCALCOLORMAP) )
|
||||||
|
{
|
||||||
|
/* Global Colormap */
|
||||||
|
if( !ReadPalette(f, GlobalBitPixel, GlobalColorMap ) )
|
||||||
|
{
|
||||||
|
error = "error reading global colormap";
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int transparency = -1;
|
||||||
|
|
||||||
|
while(1)
|
||||||
|
{
|
||||||
|
unsigned char type;
|
||||||
|
if( !ReadOK(f, &type, 1) )
|
||||||
|
{
|
||||||
|
error = "EOF / read error on image data";
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
switch( type )
|
||||||
|
{
|
||||||
|
case ';':
|
||||||
|
{
|
||||||
|
/* GIF terminator */
|
||||||
|
if( imageCount < imageNumber )
|
||||||
|
{
|
||||||
|
error = ssprintf( "only %d image%s found in file",
|
||||||
|
imageCount, imageCount > 1 ? "s" : "");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
case '!':
|
||||||
|
{
|
||||||
|
/* Extension */
|
||||||
|
unsigned char label;
|
||||||
|
if( !ReadOK(f, &label, 1) )
|
||||||
|
{
|
||||||
|
error = "EOF / read error on extention function code";
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch( label )
|
||||||
|
{
|
||||||
|
case 0xf9:
|
||||||
|
GetDataBlock( f, (unsigned char *) buf );
|
||||||
|
if( (buf[0] & 0x1) != 0 )
|
||||||
|
transparency = buf[3];
|
||||||
|
}
|
||||||
|
|
||||||
|
while( GetDataBlock(f, (unsigned char *) buf) != 0 )
|
||||||
|
;
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
case ',':
|
||||||
|
{
|
||||||
|
++imageCount;
|
||||||
|
|
||||||
|
if( !ReadOK(f, buf, 9) )
|
||||||
|
{
|
||||||
|
error = "couldn't read left/top/width/height";
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
int bitPixel = 1 << ((buf[8] & 0x07) + 1);
|
||||||
|
SDL_Color LocalColorMap[MAXCOLORMAPSIZE];
|
||||||
|
|
||||||
|
if( BitSet(buf[8], LOCALCOLORMAP) )
|
||||||
|
{
|
||||||
|
if( !ReadPalette(f, bitPixel, LocalColorMap) )
|
||||||
|
{
|
||||||
|
error = "error reading local colormap";
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
bitPixel = GlobalBitPixel;
|
||||||
|
memcpy( LocalColorMap, GlobalColorMap, sizeof(LocalColorMap) );
|
||||||
|
}
|
||||||
|
|
||||||
|
SDL_Surface *image = ReadImage( f, LM_to_uint(buf[4], buf[5]), LM_to_uint(buf[6], buf[7]),
|
||||||
|
LocalColorMap, BitSet(buf[8], INTERLACE),
|
||||||
|
imageCount != imageNumber );
|
||||||
|
|
||||||
|
if( !image )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if( transparency != -1 )
|
||||||
|
mySDL_AddColorKey( image, transparency );
|
||||||
|
|
||||||
|
return image;
|
||||||
|
}
|
||||||
|
default: continue; /* Not a valid start character */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
struct LWZState
|
||||||
|
{
|
||||||
|
bool fresh;
|
||||||
|
int code_size, set_code_size;
|
||||||
|
int max_code, max_code_size;
|
||||||
|
int firstcode, oldcode;
|
||||||
|
int clear_code, end_code;
|
||||||
|
int table[2][(1 << MAX_LWZ_BITS)];
|
||||||
|
int stack[(1 << (MAX_LWZ_BITS)) * 2], *sp;
|
||||||
|
|
||||||
|
struct Code
|
||||||
|
{
|
||||||
|
/* code state */
|
||||||
|
unsigned char buf[280];
|
||||||
|
int curbit, lastbit, last_byte;
|
||||||
|
bool done;
|
||||||
|
void Init();
|
||||||
|
int Get( RageFile &f, int code_size );
|
||||||
|
};
|
||||||
|
Code m_Code;
|
||||||
|
|
||||||
|
LWZState() { fresh = false; }
|
||||||
|
bool Init( RageFile &f );
|
||||||
|
int ReadByte( RageFile &f );
|
||||||
|
};
|
||||||
|
|
||||||
|
void LWZState::Code::Init()
|
||||||
|
{
|
||||||
|
curbit = lastbit = 0;
|
||||||
|
last_byte = 2;
|
||||||
|
done = false;
|
||||||
|
memset( buf, 0, sizeof(buf) );
|
||||||
|
}
|
||||||
|
|
||||||
|
int LWZState::Code::Get( RageFile &f, int code_size )
|
||||||
|
{
|
||||||
|
if( (curbit + code_size) >= lastbit )
|
||||||
|
{
|
||||||
|
if (done)
|
||||||
|
{
|
||||||
|
// if( curbit >= lastbit )
|
||||||
|
// RWSetMsg("ran off the end of my bits");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
buf[0] = buf[last_byte - 2];
|
||||||
|
buf[1] = buf[last_byte - 1];
|
||||||
|
|
||||||
|
unsigned char count = (unsigned char) GetDataBlock( f, &buf[2] );
|
||||||
|
if( count == 0 )
|
||||||
|
done = true;
|
||||||
|
|
||||||
|
last_byte = 2 + count;
|
||||||
|
curbit = (curbit - lastbit) + 16;
|
||||||
|
lastbit = (2 + count) * 8;
|
||||||
|
}
|
||||||
|
int ret = 0;
|
||||||
|
int i, j;
|
||||||
|
for (i = curbit, j = 0; j < code_size; ++i, ++j)
|
||||||
|
ret |= ((buf[i / 8] & (1 << (i % 8))) != 0) << j;
|
||||||
|
|
||||||
|
curbit += code_size;
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool LWZState::Init( RageFile &f )
|
||||||
|
{
|
||||||
|
unsigned char input_code_size;
|
||||||
|
|
||||||
|
/* code size: */
|
||||||
|
if( !ReadOK(f, &input_code_size, 1) )
|
||||||
|
{
|
||||||
|
// RWSetMsg("EOF / read error on image data");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
set_code_size = input_code_size;
|
||||||
|
code_size = set_code_size + 1;
|
||||||
|
clear_code = 1 << set_code_size;
|
||||||
|
end_code = clear_code + 1;
|
||||||
|
max_code_size = 2 * clear_code;
|
||||||
|
max_code = clear_code + 2;
|
||||||
|
|
||||||
|
m_Code.Init();
|
||||||
|
|
||||||
|
fresh = true;
|
||||||
|
|
||||||
|
memset( table, 0, sizeof(table) );
|
||||||
|
|
||||||
|
for( int i = 0; i < clear_code; ++i )
|
||||||
|
table[1][i] = i;
|
||||||
|
|
||||||
|
sp = stack;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
int LWZState::ReadByte( RageFile &f )
|
||||||
|
{
|
||||||
|
if( fresh )
|
||||||
|
{
|
||||||
|
fresh = false;
|
||||||
|
do {
|
||||||
|
firstcode = oldcode = m_Code.Get( f, code_size );
|
||||||
|
} while ( firstcode == clear_code );
|
||||||
|
return firstcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( sp > stack )
|
||||||
|
return *--sp;
|
||||||
|
|
||||||
|
int code;
|
||||||
|
while( (code = m_Code.Get(f, code_size)) >= 0 )
|
||||||
|
{
|
||||||
|
if( code == clear_code )
|
||||||
|
{
|
||||||
|
memset( table, 0, sizeof(table) );
|
||||||
|
for( int i = 0; i < clear_code; ++i )
|
||||||
|
table[1][i] = i;
|
||||||
|
code_size = set_code_size + 1;
|
||||||
|
max_code_size = 2 * clear_code;
|
||||||
|
max_code = clear_code + 2;
|
||||||
|
sp = stack;
|
||||||
|
firstcode = oldcode = m_Code.Get( f, code_size );
|
||||||
|
return firstcode;
|
||||||
|
}
|
||||||
|
else if( code == end_code )
|
||||||
|
{
|
||||||
|
int count;
|
||||||
|
unsigned char buf[260];
|
||||||
|
|
||||||
|
if( m_Code.done )
|
||||||
|
return -2;
|
||||||
|
|
||||||
|
while( (count = GetDataBlock(f, buf)) > 0 )
|
||||||
|
;
|
||||||
|
|
||||||
|
if( count != 0 )
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* pm_message("missing EOD in data stream (common occurence)");
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
|
int incode = code;
|
||||||
|
|
||||||
|
if( code >= max_code )
|
||||||
|
{
|
||||||
|
*sp++ = firstcode;
|
||||||
|
code = oldcode;
|
||||||
|
}
|
||||||
|
while( code >= clear_code )
|
||||||
|
{
|
||||||
|
*sp++ = table[1][code];
|
||||||
|
// if (code == table[0][code])
|
||||||
|
// RWSetMsg("circular table entry BIG ERROR");
|
||||||
|
code = table[0][code];
|
||||||
|
}
|
||||||
|
|
||||||
|
*sp++ = firstcode = table[1][code];
|
||||||
|
|
||||||
|
if( (code = max_code) < (1 << MAX_LWZ_BITS) )
|
||||||
|
{
|
||||||
|
table[0][code] = oldcode;
|
||||||
|
table[1][code] = firstcode;
|
||||||
|
++max_code;
|
||||||
|
if (max_code >= max_code_size &&
|
||||||
|
max_code_size < (1 << MAX_LWZ_BITS))
|
||||||
|
{
|
||||||
|
max_code_size *= 2;
|
||||||
|
++code_size;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
oldcode = incode;
|
||||||
|
|
||||||
|
if( sp > stack )
|
||||||
|
return *--sp;
|
||||||
|
}
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
static SDL_Surface *ReadImage( RageFile &f, int len, int height,
|
||||||
|
const SDL_Color localColorMap[MAXCOLORMAPSIZE],
|
||||||
|
int interlace, int ignore )
|
||||||
|
{
|
||||||
|
int xpos = 0, ypos = 0, pass = 0;
|
||||||
|
|
||||||
|
/* Initialize the compression routines */
|
||||||
|
LWZState state;
|
||||||
|
if( !state.Init(f) )
|
||||||
|
{
|
||||||
|
// RWSetMsg("error reading image");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
/* If this is an "uninteresting picture" ignore it. */
|
||||||
|
if( ignore )
|
||||||
|
{
|
||||||
|
while( state.ReadByte(f) >= 0 )
|
||||||
|
;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
SDL_Surface *image = SDL_CreateRGBSurfaceSane( SDL_SWSURFACE, len, height, 8, 0, 0, 0, 0 );
|
||||||
|
mySDL_SetPalette( image, localColorMap, 0, 256 );
|
||||||
|
|
||||||
|
int v;
|
||||||
|
while( (v = state.ReadByte(f)) >= 0 )
|
||||||
|
{
|
||||||
|
char *data = (char *) image->pixels;
|
||||||
|
data[xpos + ypos * image->pitch] = (char) v;
|
||||||
|
|
||||||
|
++xpos;
|
||||||
|
if( xpos == len )
|
||||||
|
{
|
||||||
|
xpos = 0;
|
||||||
|
if( interlace )
|
||||||
|
{
|
||||||
|
int step[] = { 8, 8, 4, 2 };
|
||||||
|
ypos += step[pass];
|
||||||
|
|
||||||
|
if( ypos >= height )
|
||||||
|
{
|
||||||
|
++pass;
|
||||||
|
if( pass == 4 )
|
||||||
|
return image;
|
||||||
|
int start[] = { 0, 4, 2, 1 };
|
||||||
|
ypos = start[pass];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
++ypos;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (ypos >= height)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return image;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright 1990, 1991, 1993 David Koblas.
|
||||||
|
* Copyright 1996 Torsten Martinsen.
|
||||||
|
* Permission to use, copy, modify, and distribute this software
|
||||||
|
* and its documentation for any purpose and without fee is hereby
|
||||||
|
* granted, provided that the above copyright notice appear in all
|
||||||
|
* copies and that both that copyright notice and this permission
|
||||||
|
* notice appear in supporting documentation. This software is
|
||||||
|
* provided "as is" without express or implied warranty.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2004 Glenn Maynard
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and associated documentation files (the
|
||||||
|
* "Software"), to deal in the Software without restriction, including
|
||||||
|
* without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
* distribute, and/or sell copies of the Software, and to permit persons to
|
||||||
|
* whom the Software is furnished to do so, provided that the above
|
||||||
|
* copyright notice(s) and this permission notice appear in all copies of
|
||||||
|
* the Software and that both the above copyright notice(s) and this
|
||||||
|
* permission notice appear in supporting documentation.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||||
|
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||||
|
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
||||||
|
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
||||||
|
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||||
|
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||||
|
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||||
|
* PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
#ifndef RAGE_SURFACE_LOAD_GIF_H
|
||||||
|
#define RAGE_SURFACE_LOAD_GIF_H
|
||||||
|
|
||||||
|
#include "SDL_utils.h"
|
||||||
|
|
||||||
|
SDL_Surface *RageSurface_Load_GIF( const CString &sPath, CString &error );
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (c) 2004 Glenn Maynard
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and associated documentation files (the
|
||||||
|
* "Software"), to deal in the Software without restriction, including
|
||||||
|
* without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
* distribute, and/or sell copies of the Software, and to permit persons to
|
||||||
|
* whom the Software is furnished to do so, provided that the above
|
||||||
|
* copyright notice(s) and this permission notice appear in all copies of
|
||||||
|
* the Software and that both the above copyright notice(s) and this
|
||||||
|
* permission notice appear in supporting documentation.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||||
|
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||||
|
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
||||||
|
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
||||||
|
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||||
|
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||||
|
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||||
|
* PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
+43
-24
@@ -82,22 +82,22 @@ PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania
|
|||||||
# PROP Intermediate_Dir "../Debug_Xbox"
|
# PROP Intermediate_Dir "../Debug_Xbox"
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
XBCP=xbecopy.exe
|
CPP=cl.exe
|
||||||
# ADD BASE XBCP /NOLOGO
|
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_XBOX" /D "_DEBUG" /YX /FD /G6 /Ztmp /c
|
||||||
# ADD XBCP /NOLOGO
|
# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "." /I "SDL-1.2.5\include" /I "SDL_image-1.2" /I "plib-1.6.0" /I "SDL_sound-1.0.0" /I "vorbis" /D "WIN32" /D "_DEBUG" /D "_XBOX" /D "OGG_ONLY" /D "DEBUG" /FR /YX"global.h" /FD /G6 /Ztmp /c
|
||||||
XBE=imagebld.exe
|
BSC32=bscmake.exe
|
||||||
# ADD BASE XBE /nologo /stack:0x10000 /debug
|
# ADD BASE BSC32 /nologo
|
||||||
# ADD XBE /nologo /stack:0x10000 /debug /out:"../default.xbe"
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 xapilibd.lib d3d8d.lib d3dx8d.lib xgraphicsd.lib dsoundd.lib dmusicd.lib xnetd.lib xboxkrnl.lib /nologo /incremental:no /debug /machine:I386 /subsystem:xbox /fixed:no /TMP
|
# ADD BASE LINK32 xapilibd.lib d3d8d.lib d3dx8d.lib xgraphicsd.lib dsoundd.lib dmusicd.lib xnetd.lib xboxkrnl.lib /nologo /incremental:no /debug /machine:I386 /subsystem:xbox /fixed:no /TMP
|
||||||
# ADD LINK32 $(intdir)\verstub.obj xapilibd.lib d3d8d.lib d3dx8d.lib xgraphicsd.lib dsoundd.lib dmusicd.lib xnetd.lib xboxkrnl.lib /nologo /map /debug /machine:I386 /nodefaultlib:"libcd" /nodefaultlib:"libcmt" /out:"../StepManiaXbox-debug.exe" /subsystem:xbox /fixed:no /TMP
|
# ADD LINK32 $(intdir)\verstub.obj xapilibd.lib d3d8d.lib d3dx8d.lib xgraphicsd.lib dsoundd.lib dmusicd.lib xnetd.lib xboxkrnl.lib /nologo /map /debug /machine:I386 /nodefaultlib:"libcd" /nodefaultlib:"libcmt" /out:"../StepManiaXbox-debug.exe" /subsystem:xbox /fixed:no /TMP
|
||||||
# SUBTRACT LINK32 /incremental:no
|
# SUBTRACT LINK32 /incremental:no
|
||||||
BSC32=bscmake.exe
|
XBE=imagebld.exe
|
||||||
# ADD BASE BSC32 /nologo
|
# ADD BASE XBE /nologo /stack:0x10000 /debug
|
||||||
# ADD BSC32 /nologo
|
# ADD XBE /nologo /stack:0x10000 /debug /out:"../default.xbe"
|
||||||
CPP=cl.exe
|
XBCP=xbecopy.exe
|
||||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_XBOX" /D "_DEBUG" /YX /FD /G6 /Ztmp /c
|
# ADD BASE XBCP /NOLOGO
|
||||||
# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "." /I "SDL-1.2.5\include" /I "SDL_image-1.2" /I "plib-1.6.0" /I "SDL_sound-1.0.0" /I "vorbis" /D "WIN32" /D "_DEBUG" /D "_XBOX" /D "OGG_ONLY" /D "DEBUG" /FR /YX"global.h" /FD /G6 /Ztmp /c
|
# ADD XBCP /NOLOGO
|
||||||
# Begin Special Build Tool
|
# Begin Special Build Tool
|
||||||
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi
|
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi
|
||||||
# End Special Build Tool
|
# End Special Build Tool
|
||||||
@@ -156,23 +156,23 @@ PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania
|
|||||||
# PROP Intermediate_Dir "../Release_Xbox"
|
# PROP Intermediate_Dir "../Release_Xbox"
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
XBCP=xbecopy.exe
|
CPP=cl.exe
|
||||||
# ADD BASE XBCP /NOLOGO
|
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "." /I "SDL-1.2.5\include" /I "SDL_image-1.2" /I "plib-1.6.0" /D "WIN32" /D "_XBOX" /D "_DEBUG" /Fr /YX"global.h" /FD /c
|
||||||
# ADD XBCP /NOLOGO
|
# ADD CPP /nologo /MT /W3 /GX /O2 /I "." /I "SDL-1.2.5\include" /I "SDL_image-1.2" /I "plib-1.6.0" /I "SDL_sound-1.0.0" /I "vorbis" /D "WIN32" /D "NDEBUG" /D "_XBOX" /FR /YX /FD /c
|
||||||
XBE=imagebld.exe
|
BSC32=bscmake.exe
|
||||||
# ADD BASE XBE /nologo /stack:0x10000 /debug
|
# ADD BASE BSC32 /nologo
|
||||||
# ADD XBE /nologo /testid:"123456" /stack:0x10000 /debug /out:"../default.xbe"
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 $(intdir)\verstub.obj xapilibd.lib d3d8d.lib d3dx8d.lib xgraphicsd.lib dsoundd.lib dmusicd.lib xnetd.lib xboxkrnl.lib /nologo /pdb:"../debug6/StepMania-debug.pdb" /map /debug /machine:IX86 /nodefaultlib:"libcmtd.lib" /out:"../StepMania-debug.exe"
|
# ADD BASE LINK32 $(intdir)\verstub.obj xapilibd.lib d3d8d.lib d3dx8d.lib xgraphicsd.lib dsoundd.lib dmusicd.lib xnetd.lib xboxkrnl.lib /nologo /pdb:"../debug6/StepMania-debug.pdb" /map /debug /machine:IX86 /nodefaultlib:"libcmtd.lib" /out:"../StepMania-debug.exe"
|
||||||
# SUBTRACT BASE LINK32 /verbose /profile /pdb:none /incremental:no /nodefaultlib
|
# SUBTRACT BASE LINK32 /verbose /profile /pdb:none /incremental:no /nodefaultlib
|
||||||
# ADD LINK32 $(intdir)\verstub.obj xapilib.lib d3d8.lib d3dx8.lib xgraphics.lib dsound.lib dmusic.lib xnet.lib xboxkrnl.lib libcmt.lib /nologo /incremental:no /map /machine:I386 /nodefaultlib:"libc" /nodefaultlib:"libcmtd" /out:"../StepManiaXbox.exe" /subsystem:xbox /fixed:no /TMP /OPT:REF
|
# ADD LINK32 $(intdir)\verstub.obj xapilib.lib d3d8.lib d3dx8.lib xgraphics.lib dsound.lib dmusic.lib xnet.lib xboxkrnl.lib libcmt.lib /nologo /incremental:no /map /machine:I386 /nodefaultlib:"libc" /nodefaultlib:"libcmtd" /out:"../StepManiaXbox.exe" /subsystem:xbox /fixed:no /TMP /OPT:REF
|
||||||
# SUBTRACT LINK32 /pdb:none /debug
|
# SUBTRACT LINK32 /pdb:none /debug
|
||||||
BSC32=bscmake.exe
|
XBE=imagebld.exe
|
||||||
# ADD BASE BSC32 /nologo
|
# ADD BASE XBE /nologo /stack:0x10000 /debug
|
||||||
# ADD BSC32 /nologo
|
# ADD XBE /nologo /testid:"123456" /stack:0x10000 /debug /out:"../default.xbe"
|
||||||
CPP=cl.exe
|
XBCP=xbecopy.exe
|
||||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "." /I "SDL-1.2.5\include" /I "SDL_image-1.2" /I "plib-1.6.0" /D "WIN32" /D "_XBOX" /D "_DEBUG" /Fr /YX"global.h" /FD /c
|
# ADD BASE XBCP /NOLOGO
|
||||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "." /I "SDL-1.2.5\include" /I "SDL_image-1.2" /I "plib-1.6.0" /I "SDL_sound-1.0.0" /I "vorbis" /D "WIN32" /D "NDEBUG" /D "_XBOX" /FR /YX /FD /c
|
# ADD XBCP /NOLOGO
|
||||||
# Begin Special Build Tool
|
# Begin Special Build Tool
|
||||||
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi
|
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi
|
||||||
# End Special Build Tool
|
# End Special Build Tool
|
||||||
@@ -944,6 +944,25 @@ SOURCE=.\RageSurface_Load.h
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\RageSurface_Load_GIF.cpp
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "StepMania - Win32 Debug"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "StepMania - Xbox Debug"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "StepMania - Win32 Release"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "StepMania - Xbox Release"
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\RageSurface_Load_GIF.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\RageSurface_Load_PNG.cpp
|
SOURCE=.\RageSurface_Load_PNG.cpp
|
||||||
|
|
||||||
!IF "$(CFG)" == "StepMania - Win32 Debug"
|
!IF "$(CFG)" == "StepMania - Win32 Debug"
|
||||||
|
|||||||
@@ -1893,6 +1893,12 @@ cl /Zl /nologo /c verstub.cpp /Fo"$(IntDir)"\
|
|||||||
<File
|
<File
|
||||||
RelativePath="RageSurface_Load.h">
|
RelativePath="RageSurface_Load.h">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="RageSurface_Load_GIF.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="RageSurface_Load_GIF.h">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="RageSurface_Load_PNG.cpp">
|
RelativePath="RageSurface_Load_PNG.cpp">
|
||||||
</File>
|
</File>
|
||||||
|
|||||||
Reference in New Issue
Block a user