From d55eb9ba06d77fa44182304ead773aebb852f255 Mon Sep 17 00:00:00 2001 From: zeromus Date: Tue, 21 Sep 2010 04:10:50 +0000 Subject: [PATCH] cleanup unused xbox port cruft --- desmume/src/FIFO.cpp | 28 +++++------ desmume/src/MMU.cpp | 23 ++++----- desmume/src/common.h | 30 +++++------- desmume/src/emufile.h | 34 ++++++-------- desmume/src/gfx3d.cpp | 27 +++++------ desmume/src/matrix.h | 33 +++++-------- desmume/src/metaspu/SoundTouch/FIRFilter.cpp | 2 - desmume/src/metaspu/SoundTouch/STTypes.h | 2 - desmume/src/metaspu/SoundTouch/TDStretch.cpp | 2 - desmume/src/metaspu/metaspu.h | 38 +++++---------- desmume/src/path.h | 18 ++++++- desmume/src/registers.h | 26 +++++------ desmume/src/types.h | 49 ++++++-------------- 13 files changed, 121 insertions(+), 191 deletions(-) diff --git a/desmume/src/FIFO.cpp b/desmume/src/FIFO.cpp index 00467c696..e2807fb0b 100644 --- a/desmume/src/FIFO.cpp +++ b/desmume/src/FIFO.cpp @@ -1,25 +1,19 @@ /* Copyright (C) 2006 yopyop - yopyop156@ifrance.com - yopyop156.ifrance.com - Copyright 2007 shash - Copyright 2007-2009 DeSmuME team + Copyright 2007-2010 DeSmuME team - This file is part of DeSmuME + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - DeSmuME is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - DeSmuME is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DeSmuME; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + You should have received a copy of the GNU General Public License + along with the this software. If not, see . */ #include "FIFO.h" diff --git a/desmume/src/MMU.cpp b/desmume/src/MMU.cpp index bf44dfd6f..58984d2b7 100644 --- a/desmume/src/MMU.cpp +++ b/desmume/src/MMU.cpp @@ -2,21 +2,18 @@ Copyright (C) 2007 shash Copyright (C) 2007-2010 DeSmuME team - This file is part of DeSmuME + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - DeSmuME is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - DeSmuME is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DeSmuME; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + You should have received a copy of the GNU General Public License + along with the this software. If not, see . */ #include diff --git a/desmume/src/common.h b/desmume/src/common.h index d7ee82619..2f597f14b 100644 --- a/desmume/src/common.h +++ b/desmume/src/common.h @@ -1,24 +1,18 @@ /* Copyright (C) 2006 yopyop - yopyop156@ifrance.com - yopyop156.ifrance.com + Copyright (C) 2006-2010 DeSmuME team - Copyright (C) 2006-2008 DeSmuME team + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - This file is part of DeSmuME + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - DeSmuME is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - DeSmuME is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DeSmuME; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + You should have received a copy of the GNU General Public License + along with the this software. If not, see . */ #ifndef _COMMON_H_ @@ -31,7 +25,7 @@ extern const u8 logo_data[156]; -#if defined(WIN32) && !defined(_XBOX) +#if defined(WIN32) #include #include diff --git a/desmume/src/emufile.h b/desmume/src/emufile.h index 1abcaf54d..9fe452318 100644 --- a/desmume/src/emufile.h +++ b/desmume/src/emufile.h @@ -1,20 +1,17 @@ /* Copyright (C) 2009-2010 DeSmuME team - * - * This file is part of DeSmuME - * - * DeSmuME is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * DeSmuME is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with DeSmuME; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with the this software. If not, see . */ //don't use emufile for files bigger than 2GB! you have been warned! some day this will be fixed. @@ -36,11 +33,6 @@ #include #endif -#ifdef _XBOX -#undef min; -#undef max; -#endif - class EMUFILE { protected: bool failbit; diff --git a/desmume/src/gfx3d.cpp b/desmume/src/gfx3d.cpp index ddc8df959..4040abed3 100644 --- a/desmume/src/gfx3d.cpp +++ b/desmume/src/gfx3d.cpp @@ -1,22 +1,18 @@ -/* gfx3d.cpp - Copyright (C) 2006 yopyop +/* Copyright (C) 2006 yopyop Copyright (C) 2008-2010 DeSmuME team - This file is part of DeSmuME + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - DeSmuME is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - DeSmuME is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DeSmuME; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + You should have received a copy of the GNU General Public License + along with the this software. If not, see . */ //This file implements the geometry engine hardware component. @@ -507,7 +503,6 @@ void gfx3d_init() void gfx3d_reset() { - //if this doesn't work on the xbox, we need to find out why. reconstruct(&gfx3d); delete viewer3d_state; viewer3d_state = new Viewer3d_State(); diff --git a/desmume/src/matrix.h b/desmume/src/matrix.h index 83f7e555c..48e705ebd 100644 --- a/desmume/src/matrix.h +++ b/desmume/src/matrix.h @@ -1,21 +1,18 @@ /* Copyright (C) 2006-2007 shash - Copyright (C) 2009 DeSmuME team + Copyright (C) 2009-2010 DeSmuME team - This file is part of DeSmuME + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - DeSmuME is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - DeSmuME is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DeSmuME; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + You should have received a copy of the GNU General Public License + along with the this software. If not, see . */ #ifndef MATRIX_H @@ -143,11 +140,7 @@ FORCEINLINE void memset_u16_le(void* dst, u16 val) #else //no sse2 template -#ifdef _XBOX -FORCEINLINE void memset_u16_le(void* dst, u16 val) -#else static FORCEINLINE void memset_u16_le(void* dst, u16 val) -#endif { for(int i=0;i -#ifdef _XBOX -FORCEINLINE void memset_u8(void* dst, u8 val) -#else static FORCEINLINE void memset_u8(void* dst, u8 val) -#endif { memset(dst,val,NUM); } diff --git a/desmume/src/metaspu/SoundTouch/FIRFilter.cpp b/desmume/src/metaspu/SoundTouch/FIRFilter.cpp index 89d090a1c..d7f2485fc 100644 --- a/desmume/src/metaspu/SoundTouch/FIRFilter.cpp +++ b/desmume/src/metaspu/SoundTouch/FIRFilter.cpp @@ -232,10 +232,8 @@ FIRFilter * FIRFilter::newInstance() { uint uExtensions = 0; -#ifndef _XBOX #if !defined(_MSC_VER) || !defined(__x86_64__) uExtensions = detectCPUextensions(); -#endif #endif // Check if MMX/SSE/3DNow! instruction set extensions supported by CPU diff --git a/desmume/src/metaspu/SoundTouch/STTypes.h b/desmume/src/metaspu/SoundTouch/STTypes.h index 7081b398c..d0a134111 100644 --- a/desmume/src/metaspu/SoundTouch/STTypes.h +++ b/desmume/src/metaspu/SoundTouch/STTypes.h @@ -190,11 +190,9 @@ namespace soundtouch #if _WIN32 // #define ALLOW_3DNOW 1 #endif -#ifndef _XBOX #if (_WIN32 || __i386__ || __x86_64__) #define ALLOW_SSE 1 #endif -#endif #endif #endif // INTEGER_SAMPLES diff --git a/desmume/src/metaspu/SoundTouch/TDStretch.cpp b/desmume/src/metaspu/SoundTouch/TDStretch.cpp index cac9998de..9bd2d5a32 100644 --- a/desmume/src/metaspu/SoundTouch/TDStretch.cpp +++ b/desmume/src/metaspu/SoundTouch/TDStretch.cpp @@ -670,10 +670,8 @@ void * TDStretch::operator new(size_t s) TDStretch * TDStretch::newInstance() { uint uExtensions = 0; -#ifndef _XBOX #if !defined(_MSC_VER) || !defined(__x86_64__) uExtensions = detectCPUextensions(); -#endif #endif // Check if MMX/SSE/3DNow! instruction set extensions supported by CPU diff --git a/desmume/src/metaspu/metaspu.h b/desmume/src/metaspu/metaspu.h index 968db40dd..7a878d548 100644 --- a/desmume/src/metaspu/metaspu.h +++ b/desmume/src/metaspu/metaspu.h @@ -1,20 +1,17 @@ -/* Copyright 2009 DeSmuME team +/* Copyright 2009-2010 DeSmuME team - This file is part of DeSmuME + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - DeSmuME is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - DeSmuME is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DeSmuME; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + You should have received a copy of the GNU General Public License + along with the this software. If not, see . */ //------------------------- @@ -29,27 +26,14 @@ #include -#ifdef _XBOX -#undef min -#undef max -#endif - template< typename T > -#ifdef _XBOX -FORCEINLINE void Clampify( T& src, T min, T max ) -#else static FORCEINLINE void Clampify( T& src, T min, T max ) -#endif { src = std::min( std::max( src, min ), max ); } template< typename T > -#ifdef _XBOX -FORCEINLINE T GetClamped( T src, T min, T max ) -#else static FORCEINLINE T GetClamped( T src, T min, T max ) -#endif { return std::min( std::max( src, min ), max ); } diff --git a/desmume/src/path.h b/desmume/src/path.h index 775672156..3119148a2 100644 --- a/desmume/src/path.h +++ b/desmume/src/path.h @@ -1,3 +1,19 @@ +/* Copyright 2009-2010 DeSmuME team + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with the this software. If not, see . +*/ + #include #ifdef _MSC_VER @@ -160,7 +176,6 @@ public: void LoadModulePath() { -#ifndef _XBOX #if defined(_WINDOWS) char *p; @@ -175,7 +190,6 @@ public: g_mkdir_with_parents(cwd, 0755); strncpy(pathToModule, cwd, MAX_PATH); g_free(cwd); -#endif #endif } diff --git a/desmume/src/registers.h b/desmume/src/registers.h index 3ac4ab37f..d5cd1ad42 100644 --- a/desmume/src/registers.h +++ b/desmume/src/registers.h @@ -1,22 +1,18 @@ /* Copyright (C) 2006 Theo Berkau + Copyright (C) 2006-2010 DeSmuME team - Ideas borrowed from Stephane Dallongeville's SCSP core + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - This file is part of DeSmuME + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - DeSmuME is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - DeSmuME is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DeSmuME; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + You should have received a copy of the GNU General Public License + along with the this software. If not, see . */ #ifndef REGISTERS_H diff --git a/desmume/src/types.h b/desmume/src/types.h index 7635bb275..aeeef9e3a 100644 --- a/desmume/src/types.h +++ b/desmume/src/types.h @@ -1,21 +1,18 @@ /* Copyright (C) 2005 Guillaume Duhamel - Copyright (C) 2008-2009 DeSmuME team + Copyright (C) 2008-2010 DeSmuME team - This file is part of DeSmuME + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - DeSmuME is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - DeSmuME is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DeSmuME; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + You should have received a copy of the GNU General Public License + along with the this software. If not, see . */ #ifndef TYPES_HPP @@ -23,15 +20,11 @@ //analyze microsoft compilers #ifdef _MSC_VER - #ifdef _XBOX - //#define _XBOX //already defined + #define _WINDOWS + #ifdef _M_X64 + //#define _WIN64 //already defined in x64 compiler #else - #define _WINDOWS - #ifdef _M_X64 - //#define _WIN64 //already defined in x64 compiler - #else - //#define _WIN32 //already defined - #endif + //#define _WIN32 //already defined #endif #endif @@ -45,12 +38,6 @@ #define DEVELOPER #endif -//xbox needs to include this to resemble windows -#ifdef _XBOX - #include - #include -#endif - #ifdef DEVELOPER #define IF_DEVELOPER(X) X #else @@ -102,12 +89,6 @@ #endif -#ifdef _XBOX -#define MAX_PATH 1024 -#define PATH_MAX 1024 -#endif - - #if defined(_MSC_VER) || defined(__INTEL_COMPILER) #define ALIGN(X) __declspec(align(X)) #elif __GNUC__