From 5a69fca0be4c00267a0e8c4fbbb4b6bdafe7213d Mon Sep 17 00:00:00 2001 From: hrydgard Date: Sun, 7 Sep 2008 10:29:46 +0000 Subject: [PATCH] Add some missing GPL headers, fix building with Platform SDK 6.0, delete unused HTTP code. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@452 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Common/Src/CPUDetect.cpp | 4 + Source/Core/Common/Src/DynamicLibrary.h | 1 + Source/Core/Common/Src/FileUtil.cpp | 54 ++- Source/Core/Common/Src/FileUtil.h | 17 + Source/Core/Common/Src/HTTP.cpp | 309 ------------------ Source/Core/Common/Src/HTTP.h | 34 -- Source/Core/Common/Src/Hash.cpp | 6 +- .../Interpreter/Interpreter_FloatingPoint.cpp | 6 +- .../Interpreter_SystemRegisters.cpp | 4 + .../Core/Src/PowerPC/Jit64/Jit_LoadStore.cpp | 5 +- Source/Core/VideoCommon/Src/LookUpTables.cpp | 16 +- Source/Core/VideoCommon/Src/LookUpTables.h | 6 +- Source/Core/VideoCommon/Src/Profiler.cpp | 4 + .../Core/VideoCommon/Src/TextureDecoder.cpp | 13 +- .../Plugins/Plugin_VideoDX9/Src/BPStructs.cpp | 17 + .../Plugins/Plugin_VideoDX9/Src/BPStructs.h | 17 + .../Plugins/Plugin_VideoDX9/Src/CPStructs.cpp | 17 + .../Plugins/Plugin_VideoDX9/Src/D3DBase.cpp | 17 + Source/Plugins/Plugin_VideoDX9/Src/D3DBase.h | 17 + .../Plugin_VideoDX9/Src/D3DPostprocess.cpp | 17 + .../Plugin_VideoDX9/Src/D3DPostprocess.h | 17 + .../Plugins/Plugin_VideoDX9/Src/D3DShader.cpp | 17 + .../Plugins/Plugin_VideoDX9/Src/D3DShader.h | 17 + .../Plugin_VideoDX9/Src/D3DTexture.cpp | 17 + .../Plugins/Plugin_VideoDX9/Src/D3DTexture.h | 17 + .../Plugins/Plugin_VideoDX9/Src/D3DUtil.cpp | 17 + Source/Plugins/Plugin_VideoDX9/Src/D3DUtil.h | 17 + .../Plugin_VideoDX9/Src/DataReader.cpp | 17 + .../Plugins/Plugin_VideoDX9/Src/DataReader.h | 17 + .../Plugin_VideoDX9/Src/DecodedVArray.cpp | 17 + .../Plugin_VideoDX9/Src/DecodedVArray.h | 17 + .../Plugin_VideoDX9/Src/DlgSettings.cpp | 17 + .../Plugins/Plugin_VideoDX9/Src/DlgSettings.h | 17 + .../Plugins/Plugin_VideoDX9/Src/Globals.cpp | 17 + Source/Plugins/Plugin_VideoDX9/Src/Globals.h | 17 + .../Plugin_VideoDX9/Src/IndexGenerator.cpp | 17 + .../Plugin_VideoDX9/Src/IndexGenerator.h | 17 + .../Plugin_VideoDX9/Src/OpcodeDecoding.cpp | 17 + .../Plugin_VideoDX9/Src/PixelShader.cpp | 17 + .../Plugins/Plugin_VideoDX9/Src/PixelShader.h | 17 + Source/Plugins/Plugin_VideoDX9/Src/Render.cpp | 17 + Source/Plugins/Plugin_VideoDX9/Src/Render.h | 17 + .../Plugin_VideoDX9/Src/ShaderManager.cpp | 17 + .../Plugin_VideoDX9/Src/ShaderManager.h | 17 + .../Plugin_VideoDX9/Src/TextureCache.cpp | 19 +- .../Plugin_VideoDX9/Src/TextureCache.h | 17 + .../Plugin_VideoDX9/Src/TransformEngine.cpp | 17 + .../Plugin_VideoDX9/Src/TransformEngine.h | 17 + Source/Plugins/Plugin_VideoDX9/Src/Utils.cpp | 46 ++- Source/Plugins/Plugin_VideoDX9/Src/Utils.h | 17 + Source/Plugins/Plugin_VideoDX9/Src/Vec3.h | 17 + .../Plugin_VideoDX9/Src/VertexHandler.cpp | 17 + .../Plugin_VideoDX9/Src/VertexHandler.h | 17 + .../Plugin_VideoDX9/Src/VertexLoader.cpp | 17 + .../Plugin_VideoDX9/Src/VertexLoader.h | 17 + .../Src/VertexLoader_MtxIndex.h | 17 + .../Src/VertexLoader_Normal.cpp | 19 +- .../Plugin_VideoDX9/Src/VertexLoader_Normal.h | 19 +- .../Src/VertexLoader_Position.h | 17 + .../Src/VertexLoader_TextCoord.h | 17 + .../Plugin_VideoDX9/Src/VertexShader.cpp | 17 + .../Plugin_VideoDX9/Src/VertexShader.h | 17 + .../Plugins/Plugin_VideoDX9/Src/XFStructs.cpp | 17 + .../Plugins/Plugin_VideoDX9/Src/XFStructs.h | 17 + Source/Plugins/Plugin_VideoDX9/Src/main.cpp | 17 + Source/Plugins/Plugin_VideoDX9/Src/main.h | 17 + Source/Plugins/Plugin_VideoDX9/Src/stdafx.cpp | 17 + Source/Plugins/Plugin_VideoDX9/Src/stdafx.h | 17 + .../Plugin_VideoOGL/Src/TextureMngr.cpp | 4 + .../Plugin_VideoOGL/Src/VertexLoader.cpp | 2 +- Source/Plugins/Plugin_VideoOGL/Src/main.cpp | 1 + 71 files changed, 1023 insertions(+), 416 deletions(-) delete mode 100644 Source/Core/Common/Src/HTTP.cpp delete mode 100644 Source/Core/Common/Src/HTTP.h diff --git a/Source/Core/Common/Src/CPUDetect.cpp b/Source/Core/Common/Src/CPUDetect.cpp index 09827c3227..181d74dc79 100644 --- a/Source/Core/Common/Src/CPUDetect.cpp +++ b/Source/Core/Common/Src/CPUDetect.cpp @@ -17,7 +17,11 @@ #include #ifdef _WIN32 +#define _interlockedbittestandset workaround_ms_header_bug_platform_sdk6_set +#define _interlockedbittestandreset workaround_ms_header_bug_platform_sdk6_reset #include +#undef _interlockedbittestandset +#undef _interlockedbittestandreset #else //#include diff --git a/Source/Core/Common/Src/DynamicLibrary.h b/Source/Core/Common/Src/DynamicLibrary.h index 49fdb5fa61..f7eb277da3 100644 --- a/Source/Core/Common/Src/DynamicLibrary.h +++ b/Source/Core/Common/Src/DynamicLibrary.h @@ -14,6 +14,7 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ + #ifndef _DYNAMICLIBRARY_H #define _DYNAMICLIBRARY_H diff --git a/Source/Core/Common/Src/FileUtil.cpp b/Source/Core/Common/Src/FileUtil.cpp index ad19778902..061f51ea5a 100644 --- a/Source/Core/Common/Src/FileUtil.cpp +++ b/Source/Core/Common/Src/FileUtil.cpp @@ -1,8 +1,29 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #include "Common.h" #include "FileUtil.h" + #ifdef _WIN32 +#include // for SHGetFolderPath #include +#include // for GetSaveFileName #else + #include #include #include @@ -85,17 +106,17 @@ bool File::CreateDir(const std::string &path) PanicAlert("Error creating directory: %i", error); return false; #else - if (mkdir(path.c_str(), 0644) == 0) - return true; + if (mkdir(path.c_str(), 0644) == 0) + return true; - int err = errno; + int err = errno; - if (err == EEXIST) { - PanicAlert("%s already exists", path.c_str()); - return true; - } + if (err == EEXIST) { + PanicAlert("%s already exists", path.c_str()); + return true; + } - PanicAlert("Error creating directory: %s", strerror(err)); + PanicAlert("Error creating directory: %s", strerror(err)); return false; #endif @@ -103,13 +124,16 @@ bool File::CreateDir(const std::string &path) std::string GetUserDirectory() { #ifdef _WIN32 - //TODO - return std::string(""); + char path[MAX_PATH]; + if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_COMMON_APPDATA, NULL, 0, path))) + { + return std::string(path); + } + return std::string(""); #else - char *dir = getenv("HOME"); - if (!dir) - return std::string(""); - - return dir; + char *dir = getenv("HOME"); + if (!dir) + return std::string(""); + return dir; #endif } diff --git a/Source/Core/Common/Src/FileUtil.h b/Source/Core/Common/Src/FileUtil.h index 52097a1e58..e65a43be91 100644 --- a/Source/Core/Common/Src/FileUtil.h +++ b/Source/Core/Common/Src/FileUtil.h @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #ifndef _FILEUTIL_H #define _FILEUTIL_H diff --git a/Source/Core/Common/Src/HTTP.cpp b/Source/Core/Common/Src/HTTP.cpp deleted file mode 100644 index 49bd2cb12b..0000000000 --- a/Source/Core/Common/Src/HTTP.cpp +++ /dev/null @@ -1,309 +0,0 @@ -// Under MIT licence from http://www.mindcontrol.org/~hplus/http-get.html - -#if defined(WIN32) -#include -#include -#include -#else -#include -#include -#endif -#include -#include -#include -#include - -#include "HTTP.h" -#include "PortableSockets.h" - -#if !defined(WIN32) -static int strnicmp( char const * a, char const * b, int n) { - return strncasecmp( a, b, n ); -} -#endif - - -namespace { - - struct Chunk { - Chunk() { - next_ = 0; - size_ = 0; - } - Chunk * next_; - size_t size_; - char data_[ 30000 ]; - }; - - class HTTPQuery : public I_HTTPRequest { - public: - HTTPQuery() { - head_ = 0; - curRd_ = 0; - curWr_ = 0; - curOffset_ = 0; - toRead_ = 0; - complete_ = false; - gotLength_ = false; - socket_ = BAD_SOCKET_FD; - } - ~HTTPQuery() { - if (socket_ != BAD_SOCKET_FD) { - ::closesocket( socket_ ); - } - Chunk * ch = head_; - while( ch != 0) { - Chunk * d = ch; - ch = ch->next_; - ::free( d ); - } - } - - void setQuery( char const * host, unsigned short port, char const * url) { - if (strlen( url ) > 1536 || strlen( host ) > 256) { - return; - } - struct hostent * hent = gethostbyname( host ); - if (hent == 0) { - complete_ = true; - return; - } - addr_.sin_family = AF_INET; - addr_.sin_addr = *(in_addr *)hent->h_addr_list[0]; - addr_.sin_port = htons( port ); - socket_ = ::socket( AF_INET, SOCK_STREAM, getprotobyname("tcp")->p_proto ); - if (socket_ == BAD_SOCKET_FD) { - complete_ = true; - return; - } - int r; - r = ::connect( socket_, (sockaddr *)&addr_, sizeof( addr_ ) ); - if (r < 0) { - complete_ = true; - return; - } - MAKE_SOCKET_NONBLOCKING( socket_, r ); - if (r < 0) { - complete_ = true; - return; - } - char buf[2048]; - sprintf( buf, "GET %s HTTP/1.0\r\nUser-Agent: Dolphin2.0\r\nAccept: */*\r\nHost: %s\r\nConnection: close\r\n\r\n", - url, host ); - r = ::send( socket_, buf, int(strlen( buf )), NONBLOCK_MSG_SEND ); - if (r != (int)strlen( buf )) { - complete_ = true; - return; - } - } - - void dispose() { - delete this; - } - void step() { - if (!complete_) { - if (!curWr_ || (curWr_->size_ == sizeof( curWr_->data_ ))) { - Chunk * c = new Chunk; - if (!head_) { - head_ = c; - curWr_ = c; - } - else { - curWr_->next_ = c; - curWr_ = c; - } - } - assert( curWr_ && (curWr_->size_ < sizeof( curWr_->data_ )) ); - int r = ::recv( socket_, &curWr_->data_[curWr_->size_], int(sizeof(curWr_->data_)-curWr_->size_), - NONBLOCK_MSG_SEND ); - if (r > 0) { - curWr_->size_ += r; - assert( curWr_->size_ <= sizeof( curWr_->data_ ) ); - if (gotLength_) { - if (toRead_ <= size_t(r)) { - toRead_ = 0; - complete_ = true; - } - else { - toRead_ -= r; - } - } - if (!gotLength_) { - char const * end = &head_->data_[head_->size_]; - char const * ptr = &head_->data_[1]; - while( ptr < end-1) { - if (ptr[-1] == '\n') { - if (!strnicmp( ptr, "content-length:", 15 )) { - ptr += 15; - toRead_ = strtol( ptr, (char **)&ptr, 10 ); - gotLength_ = true; - } - else if (ptr[0] == '\r' && ptr[1] == '\n') { - size_t haveRead = end-ptr-2; - if (haveRead > toRead_) { - toRead_ = 0; - } - else { - toRead_ -= haveRead; - } - if (toRead_ == 0) { - complete_ = true; - } - break; - } - } - ++ptr; - } - } - } - else if (r < 0) { - if (!SOCKET_WOULDBLOCK_ERROR( SOCKET_ERRNO )) { - complete_ = true; - } - } - } - } - bool complete() { - step(); - return complete_; - } - void rewind() { - curRd_ = head_; - curOffset_ = 0; - } - size_t read( void * ptr, size_t size) { - step(); - if (!head_) { - return 0; - } - if (!curRd_) { - curRd_ = head_; - assert( curOffset_ == 0 ); - } - size_t copied = 0; - while( size > 0) { - assert( curRd_->size_ <= sizeof( curRd_->data_ ) ); - size_t toCopy = curRd_->size_ - curOffset_; - if (toCopy > size) { - toCopy = size; - } - memcpy( ptr, &curRd_->data_[curOffset_], toCopy ); - curOffset_ += toCopy; - assert( curOffset_ <= sizeof(curRd_->data_) ); - ptr = ((char *)ptr)+toCopy; - size -= toCopy; - copied += toCopy; - if (curOffset_ == curRd_->size_) { - if (curRd_->next_ != 0) { - curRd_ = curRd_->next_; - curOffset_ = 0; - } - else { - break; - } - } - } - return copied; - } - - Chunk * head_; - Chunk * curRd_; - Chunk * curWr_; - size_t curOffset_; - size_t toRead_; - bool complete_; - bool gotLength_; - SOCKET socket_; - sockaddr_in addr_; - }; - -}; - -I_HTTPRequest * NewHTTPRequest( char const * url ) -{ - static bool socketsInited; - if (!socketsInited) { - socketsInited = true; - INIT_SOCKET_LIBRARY(); - } - if (strncmp( url, "http://", 7 )) { - return 0; - } - url += 7; - char const * path = strchr( url, '/' ); - if (!path) { - return 0; - } - char name[ 256 ]; - if (path-url > 255) { - return 0; - } - strncpy( name, url, path-url ); - name[path-url] = 0; - char * port = strrchr( name, ':' ); - unsigned short iport = 80; - if (port) { - *port = 0; - iport = (unsigned short)( strtol( port+1, &port, 10 ) ); - } - HTTPQuery * q = new HTTPQuery; - q->setQuery( name, iport, path ); - return q; -} - -// TODO(ector): -// Currently extremely bad implementation - busy waits! -std::string HTTPDownloadText(const char *url) -{ - I_HTTPRequest *r = NewHTTPRequest(url); - int timeout = 10; - std::string text = ""; - time_t t; - t = 0; - char buf[4096]; - while (true) - { - r->step(); - size_t rd = r->read(buf, 4096); - if (rd > 0) - { - buf[rd] = 0; - text += buf; - } - else { - if (r->complete()) - goto next; - - if (!t) { - time(&t); - } - else { - time_t t2; - time(&t2); - if (t2 > t + timeout) { - fprintf( stderr, "timeout\n"); - goto next; - } - } - } - } -next: - r->dispose(); - return text; -} - -void UnittestMyNetwork() -{ - I_HTTPRequest * r = NewHTTPRequest( "http://www.cisco.com/" ); - char buf[1024]; - while( !r->complete()) { - r->step(); - while( r->read( buf, sizeof( buf ) ) ) - ; - } - char buf2[100000]; - r->rewind(); - while( r->read( buf2, sizeof( buf2 ) ) ) - ; - r->dispose(); -} diff --git a/Source/Core/Common/Src/HTTP.h b/Source/Core/Common/Src/HTTP.h deleted file mode 100644 index 0b1b670a68..0000000000 --- a/Source/Core/Common/Src/HTTP.h +++ /dev/null @@ -1,34 +0,0 @@ -// Under MIT licence from http://www.mindcontrol.org/~hplus/http-get.html - -#if !defined( mynetwork_h ) -#define mynetwork_h - -#include - -// I_HTTPRequest will run until it's received all available data -// from the query. You can rewind and read the data received just -// like a regular stream. Reading will return 0 bytes when at the -// end, even if the query isn't yet complete. Test for completeness -// with complete(). You need to step() the query every so often to -// retrieve more data. Calling complete() and rewind() may step -// the query. -class I_HTTPRequest { -public: - virtual ~I_HTTPRequest() {} - virtual void dispose() = 0; - virtual void step() = 0; - virtual bool complete() = 0; - virtual void rewind() = 0; - virtual size_t read(void * ptr, size_t data) = 0; -}; - -// The format of "url" is "http://host:port/path". Name resolution -// will be done synchronously, which can be a problem. -// This request will NOT deal with user names and passwords. You -// have been warned! -I_HTTPRequest * NewHTTPRequest(char const * url); - -std::string HTTPDownloadText(const char *url); - -#endif - diff --git a/Source/Core/Common/Src/Hash.cpp b/Source/Core/Common/Src/Hash.cpp index c628f61a64..b892c9e04e 100644 --- a/Source/Core/Common/Src/Hash.cpp +++ b/Source/Core/Common/Src/Hash.cpp @@ -120,8 +120,8 @@ u32 HashFNV1(const u8* ptr, int length) } -// Terribly stupid hash - but can't go back now :) -// Don't use for new things. At least it's fast. +// Stupid hash - but can't go back now :) +// Don't use for new things. At least it's reasonably fast. u32 HashEctor(const u8* ptr, int length) { u32 crc = 0; @@ -134,5 +134,3 @@ u32 HashEctor(const u8* ptr, int length) return(crc); } - - diff --git a/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_FloatingPoint.cpp b/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_FloatingPoint.cpp index 9c18a0bf3c..aea3ae2dfb 100644 --- a/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_FloatingPoint.cpp +++ b/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_FloatingPoint.cpp @@ -19,7 +19,11 @@ #include #ifdef _WIN32 +#define _interlockedbittestandset workaround_ms_header_bug_platform_sdk6_set +#define _interlockedbittestandreset workaround_ms_header_bug_platform_sdk6_reset #include +#undef _interlockedbittestandset +#undef _interlockedbittestandreset #else #include #endif @@ -32,7 +36,7 @@ // POSSIBLE APPROACHES: // * Full SW FPU. Urgh. // * Partial SW FPU, emulate just as much as necessary for monkey ball. Feasible but a lot of work. -// * HLE hacking. Figure out what all the evil functions really do and fake them. +// * HLE hacking. Figure out what all the evil functions really do and fake them. DONE (well, works okay-ish) // Interesting places in Super Monkey Ball: // 80036654: fctwixz stuff diff --git a/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_SystemRegisters.cpp b/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_SystemRegisters.cpp index 3962e08106..e5b099ffd5 100644 --- a/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_SystemRegisters.cpp +++ b/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_SystemRegisters.cpp @@ -17,7 +17,11 @@ #include #ifdef _WIN32 +#define _interlockedbittestandset workaround_ms_header_bug_platform_sdk6_set +#define _interlockedbittestandreset workaround_ms_header_bug_platform_sdk6_reset #include +#undef _interlockedbittestandset +#undef _interlockedbittestandreset #else static const unsigned short FPU_ROUND_NEAR = 0 << 10; static const unsigned short FPU_ROUND_DOWN = 1 << 10; diff --git a/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStore.cpp b/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStore.cpp index 84296f42f6..5ef1afbbc3 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStore.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStore.cpp @@ -65,8 +65,9 @@ namespace Jit64 MOV(32, R(ABI_PARAM1), gpr.R(b)); if (a) ADD(32, R(ABI_PARAM1), gpr.R(a)); - SafeLoadRegToEAX(ABI_PARAM1, 8, 0); - MOV(32, gpr.R(d), R(EAX)); + //SafeLoadRegToEAX(ABI_PARAM1, 8, 0); + UnsafeLoadRegToReg(ABI_PARAM1, gpr.RX(d), 8, 0, false); + //MOV(32, gpr.R(d), R(EAX)); gpr.UnlockAll(); gpr.UnlockAllX(); } diff --git a/Source/Core/VideoCommon/Src/LookUpTables.cpp b/Source/Core/VideoCommon/Src/LookUpTables.cpp index 1e60ce59c3..852f4bb20a 100644 --- a/Source/Core/VideoCommon/Src/LookUpTables.cpp +++ b/Source/Core/VideoCommon/Src/LookUpTables.cpp @@ -17,9 +17,13 @@ #include "LookUpTables.h" -int lut3to8[8]; -int lut4to8[16]; -int lut5to8[32]; +const int lut3to8[] = { 0x00,0x24,0x48,0x6D,0x91,0xB6,0xDA,0xFF}; +const int lut4to8[] = { 0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x77, + 0x88,0x99,0xAA,0xBB,0xCC,0xDD,0xEE,0xFF}; +const int lut5to8[] = { 0x00,0x08,0x10,0x18,0x20,0x29,0x31,0x39, + 0x41,0x4A,0x52,0x5A,0x62,0x6A,0x73,0x7B, + 0x83,0x8B,0x94,0x9C,0xA4,0xAC,0xB4,0xBD, + 0xC5,0xCD,0xD5,0xDE,0xE6,0xEE,0xF6,0xFF}; int lut6to8[64]; float lutu8tosfloat[256]; float lutu8toufloat[256]; @@ -27,12 +31,6 @@ float luts8tosfloat[256]; void InitLUTs() { - for (int i = 0; i < 8; i++) - lut3to8[i] = (i*255) / 7; - for (int i = 0; i < 16; i++) - lut4to8[i] = (i*255) / 15; - for (int i = 0; i < 32; i++) - lut5to8[i] = (i*255) / 31; for (int i = 0; i < 64; i++) lut6to8[i] = (i*255) / 63; for (int i = 0; i < 256; i++) diff --git a/Source/Core/VideoCommon/Src/LookUpTables.h b/Source/Core/VideoCommon/Src/LookUpTables.h index 4c0bc0c5d5..8b76d85269 100644 --- a/Source/Core/VideoCommon/Src/LookUpTables.h +++ b/Source/Core/VideoCommon/Src/LookUpTables.h @@ -20,9 +20,9 @@ #include "Common.h" -extern int lut3to8[8]; -extern int lut4to8[16]; -extern int lut5to8[32]; +extern const int lut3to8[8]; +extern const int lut4to8[16]; +extern const int lut5to8[32]; extern int lut6to8[64]; extern float lutu8tosfloat[256]; extern float lutu8toufloat[256]; diff --git a/Source/Core/VideoCommon/Src/Profiler.cpp b/Source/Core/VideoCommon/Src/Profiler.cpp index 6a66cdc006..e47118409a 100644 --- a/Source/Core/VideoCommon/Src/Profiler.cpp +++ b/Source/Core/VideoCommon/Src/Profiler.cpp @@ -33,7 +33,11 @@ int g_bWriteProfile=0; #ifdef _WIN32 #if defined (_MSC_VER) && _MSC_VER >= 1400 +#define _interlockedbittestandset workaround_ms_header_bug_platform_sdk6_set +#define _interlockedbittestandreset workaround_ms_header_bug_platform_sdk6_reset #include +#undef _interlockedbittestandset +#undef _interlockedbittestandreset #pragma intrinsic(__rdtsc) #endif diff --git a/Source/Core/VideoCommon/Src/TextureDecoder.cpp b/Source/Core/VideoCommon/Src/TextureDecoder.cpp index a7685f47a1..34d3e7e953 100644 --- a/Source/Core/VideoCommon/Src/TextureDecoder.cpp +++ b/Source/Core/VideoCommon/Src/TextureDecoder.cpp @@ -148,11 +148,11 @@ inline void decodebytesI4(u32 *dst, const u8 *src, int numbytes) } } -inline void decodebytesI8(u32 *dst, const u8 *src, int numbytes) +inline void decodebytesI8_8(u32 *dst, const u8 *src) { // TODO: SSSE3 variant (pshufb), possibly SSE2 variant (packuswb). THP videos use this format. - for (int x = 0; x < numbytes; x++) - *dst++ = expand8888(src[x]); + for (int x = 0; x < 8; x++) + dst[x] = src[x] * 0x01010101; //expand8888(src[x]); *0x... may or may not be faster. not sure. Should be faster on P4 at least. } inline void decodebytesC4(u32 *dst, const u8 *src, int numbytes, int tlutaddr, int tlutfmt) @@ -356,12 +356,12 @@ PC_TexFormat TexDecoder_Decode(u8 *dst, const u8 *src, int width, int height, in decodebytesC8((u32*)dst+(y+iy)*width+x, src, 8, tlutaddr, tlutfmt); } return PC_TEX_FMT_BGRA32; - case GX_TF_I8: + case GX_TF_I8: // speed critical { for (int y = 0; y < height; y += 4) for (int x = 0; x < width; x += 8) for (int iy = 0; iy < 4; iy++, src += 8) - decodebytesI8((u32*)dst+(y+iy)*width+x, src, 8); + decodebytesI8_8((u32*)dst+(y+iy)*width+x, src); } return PC_TEX_FMT_BGRA32; case GX_TF_IA4: @@ -404,7 +404,7 @@ PC_TexFormat TexDecoder_Decode(u8 *dst, const u8 *src, int width, int height, in decodebytesRGB5A3((u32*)dst+(y+iy)*width+x, (u16*)src, 4); } return PC_TEX_FMT_BGRA32; - case GX_TF_RGBA8: + case GX_TF_RGBA8: // speed critical { for (int y = 0; y < height; y += 4) { for (int x = 0; x < width; x += 4) @@ -419,6 +419,7 @@ PC_TexFormat TexDecoder_Decode(u8 *dst, const u8 *src, int width, int height, in return PC_TEX_FMT_BGRA32; case GX_TF_CMPR: { + // TODO: Shuffle to PC S3TC (DXTC) format instead of converting // 11111111 22222222 55555555 66666666 // 33333333 44444444 77777777 88888888 for (int y = 0; y < height; y += 8) diff --git a/Source/Plugins/Plugin_VideoDX9/Src/BPStructs.cpp b/Source/Plugins/Plugin_VideoDX9/Src/BPStructs.cpp index 7eb4263fcc..ccab72098e 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/BPStructs.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/BPStructs.cpp @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #include "D3DBase.h" #include "Globals.h" diff --git a/Source/Plugins/Plugin_VideoDX9/Src/BPStructs.h b/Source/Plugins/Plugin_VideoDX9/Src/BPStructs.h index d2f754f73a..99a20f7f68 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/BPStructs.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/BPStructs.h @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #ifndef _BPSTRUCTS_H #define _BPSTRUCTS_H diff --git a/Source/Plugins/Plugin_VideoDX9/Src/CPStructs.cpp b/Source/Plugins/Plugin_VideoDX9/Src/CPStructs.cpp index 095100437b..a454c24eef 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/CPStructs.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/CPStructs.cpp @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #include #include "CPStructs.h" diff --git a/Source/Plugins/Plugin_VideoDX9/Src/D3DBase.cpp b/Source/Plugins/Plugin_VideoDX9/Src/D3DBase.cpp index c04346d68b..4c21756d16 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/D3DBase.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/D3DBase.cpp @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #include "D3DBase.h" #include "Render.h" diff --git a/Source/Plugins/Plugin_VideoDX9/Src/D3DBase.h b/Source/Plugins/Plugin_VideoDX9/Src/D3DBase.h index e86e7c71c6..a61e71534e 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/D3DBase.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/D3DBase.h @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #ifndef _D3DBASE_H #define _D3DBASE_H diff --git a/Source/Plugins/Plugin_VideoDX9/Src/D3DPostprocess.cpp b/Source/Plugins/Plugin_VideoDX9/Src/D3DPostprocess.cpp index 0bc6114527..8ccd3fa710 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/D3DPostprocess.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/D3DPostprocess.cpp @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #include "Common.h" #include "D3DBase.h" diff --git a/Source/Plugins/Plugin_VideoDX9/Src/D3DPostprocess.h b/Source/Plugins/Plugin_VideoDX9/Src/D3DPostprocess.h index f7ce77453f..e46b88fcdc 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/D3DPostprocess.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/D3DPostprocess.h @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #pragma once namespace Postprocess diff --git a/Source/Plugins/Plugin_VideoDX9/Src/D3DShader.cpp b/Source/Plugins/Plugin_VideoDX9/Src/D3DShader.cpp index cbd2df629d..14b8000ceb 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/D3DShader.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/D3DShader.cpp @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #include #include diff --git a/Source/Plugins/Plugin_VideoDX9/Src/D3DShader.h b/Source/Plugins/Plugin_VideoDX9/Src/D3DShader.h index a37ddaabcc..257bd8b550 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/D3DShader.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/D3DShader.h @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #pragma once #include "D3DBase.h" diff --git a/Source/Plugins/Plugin_VideoDX9/Src/D3DTexture.cpp b/Source/Plugins/Plugin_VideoDX9/Src/D3DTexture.cpp index d560aba974..38e376be5c 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/D3DTexture.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/D3DTexture.cpp @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #include "D3DBase.h" #include "D3DTexture.h" diff --git a/Source/Plugins/Plugin_VideoDX9/Src/D3DTexture.h b/Source/Plugins/Plugin_VideoDX9/Src/D3DTexture.h index 9a88eda754..183f097690 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/D3DTexture.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/D3DTexture.h @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #pragma once #include "D3DBase.h" diff --git a/Source/Plugins/Plugin_VideoDX9/Src/D3DUtil.cpp b/Source/Plugins/Plugin_VideoDX9/Src/D3DUtil.cpp index e192f59d1d..0d16f21b4f 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/D3DUtil.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/D3DUtil.cpp @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #include "Common.h" #include "D3DBase.h" diff --git a/Source/Plugins/Plugin_VideoDX9/Src/D3DUtil.h b/Source/Plugins/Plugin_VideoDX9/Src/D3DUtil.h index ae7de47d3b..7a45b86df2 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/D3DUtil.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/D3DUtil.h @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #pragma once #include "D3DBase.h" diff --git a/Source/Plugins/Plugin_VideoDX9/Src/DataReader.cpp b/Source/Plugins/Plugin_VideoDX9/Src/DataReader.cpp index 0bed49718f..18447e336c 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/DataReader.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/DataReader.cpp @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #include #include "Utils.h" diff --git a/Source/Plugins/Plugin_VideoDX9/Src/DataReader.h b/Source/Plugins/Plugin_VideoDX9/Src/DataReader.h index 353679f56f..c9add1422e 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/DataReader.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/DataReader.h @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #ifndef _DATAREADER_H #define _DATAREADER_H diff --git a/Source/Plugins/Plugin_VideoDX9/Src/DecodedVArray.cpp b/Source/Plugins/Plugin_VideoDX9/Src/DecodedVArray.cpp index 4914d341bb..ed76203e3b 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/DecodedVArray.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/DecodedVArray.cpp @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #include "stdafx.h" #include "DecodedVArray.h" diff --git a/Source/Plugins/Plugin_VideoDX9/Src/DecodedVArray.h b/Source/Plugins/Plugin_VideoDX9/Src/DecodedVArray.h index 82190e2ee2..5ed1b73be3 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/DecodedVArray.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/DecodedVArray.h @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #ifndef _DECODED_VARRAY_H #define _DECODED_VARRAY_H diff --git a/Source/Plugins/Plugin_VideoDX9/Src/DlgSettings.cpp b/Source/Plugins/Plugin_VideoDX9/Src/DlgSettings.cpp index fe0146d23f..4f555630db 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/DlgSettings.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/DlgSettings.cpp @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #include #include "resource.h" diff --git a/Source/Plugins/Plugin_VideoDX9/Src/DlgSettings.h b/Source/Plugins/Plugin_VideoDX9/Src/DlgSettings.h index 30686da4f9..8d7bdf01be 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/DlgSettings.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/DlgSettings.h @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #pragma once void DlgSettings_Show(HINSTANCE hInstance, HWND parent); \ No newline at end of file diff --git a/Source/Plugins/Plugin_VideoDX9/Src/Globals.cpp b/Source/Plugins/Plugin_VideoDX9/Src/Globals.cpp index de74613806..7bcfa47d92 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/Globals.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/Globals.cpp @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #include "Globals.h" #include "IniFile.h" diff --git a/Source/Plugins/Plugin_VideoDX9/Src/Globals.h b/Source/Plugins/Plugin_VideoDX9/Src/Globals.h index 3493a54478..94b82b063d 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/Globals.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/Globals.h @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #ifndef _GLOBALS_H #define _GLOBALS_H diff --git a/Source/Plugins/Plugin_VideoDX9/Src/IndexGenerator.cpp b/Source/Plugins/Plugin_VideoDX9/Src/IndexGenerator.cpp index 5c5ccf528d..6fcd9d3ba7 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/IndexGenerator.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/IndexGenerator.cpp @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #include "stdafx.h" #include "IndexGenerator.h" diff --git a/Source/Plugins/Plugin_VideoDX9/Src/IndexGenerator.h b/Source/Plugins/Plugin_VideoDX9/Src/IndexGenerator.h index 839e70b730..7ebf01049b 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/IndexGenerator.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/IndexGenerator.h @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #pragma once class IndexGenerator diff --git a/Source/Plugins/Plugin_VideoDX9/Src/OpcodeDecoding.cpp b/Source/Plugins/Plugin_VideoDX9/Src/OpcodeDecoding.cpp index d5674ff20b..9aa7dbf11c 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/OpcodeDecoding.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/OpcodeDecoding.cpp @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + //DL facts: // Ikaruga uses NO display lists! // Zelda WW uses TONS of display lists diff --git a/Source/Plugins/Plugin_VideoDX9/Src/PixelShader.cpp b/Source/Plugins/Plugin_VideoDX9/Src/PixelShader.cpp index a1e933166d..748b19284f 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/PixelShader.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/PixelShader.cpp @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #include "Globals.h" #include "PixelShader.h" #include "BPStructs.h" diff --git a/Source/Plugins/Plugin_VideoDX9/Src/PixelShader.h b/Source/Plugins/Plugin_VideoDX9/Src/PixelShader.h index 17c83143eb..cfbc55faff 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/PixelShader.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/PixelShader.h @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #pragma once #include "Common.h" diff --git a/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp b/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp index cd6d548f49..ebc37b69e1 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #include #include "Common.h" diff --git a/Source/Plugins/Plugin_VideoDX9/Src/Render.h b/Source/Plugins/Plugin_VideoDX9/Src/Render.h index 55f52a0ee2..0e3a39126a 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/Render.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/Render.h @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #ifndef __H_RENDER__ #define __H_RENDER__ diff --git a/Source/Plugins/Plugin_VideoDX9/Src/ShaderManager.cpp b/Source/Plugins/Plugin_VideoDX9/Src/ShaderManager.cpp index 455b0aa07b..4792b03b66 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/ShaderManager.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/ShaderManager.cpp @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #include "D3DBase.h" #include "Utils.h" #include "Globals.h" diff --git a/Source/Plugins/Plugin_VideoDX9/Src/ShaderManager.h b/Source/Plugins/Plugin_VideoDX9/Src/ShaderManager.h index 56df43cd88..0a668adc7c 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/ShaderManager.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/ShaderManager.h @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #pragma once #include "D3DBase.h" diff --git a/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp b/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp index 5609a37435..addd1eb92d 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #include #include "Common.h" @@ -35,7 +52,7 @@ void TextureCache::TCacheEntry::Destroy() void TextureCache::Init() { temp = (u8*)VirtualAlloc(0,TEMP_SIZE,MEM_COMMIT,PAGE_READWRITE); - TexDecoder_SetTexFmtOverlayOptions(g_Config.bTexFmtOverlayEnable,g_Config.bTexFmtOverlayCenter); + TexDecoder_SetTexFmtOverlayOptions(g_Config.bTexFmtOverlayEnable, g_Config.bTexFmtOverlayCenter); } void TextureCache::Invalidate() diff --git a/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.h b/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.h index c3370a8515..a3a4e7d6b7 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.h @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #ifndef _TEXTURECACHE_H #define _TEXTURECACHE_H diff --git a/Source/Plugins/Plugin_VideoDX9/Src/TransformEngine.cpp b/Source/Plugins/Plugin_VideoDX9/Src/TransformEngine.cpp index adf835fa1b..8aa59c925e 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/TransformEngine.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/TransformEngine.cpp @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #include "Common.h" #include "Globals.h" #include "Vec3.h" diff --git a/Source/Plugins/Plugin_VideoDX9/Src/TransformEngine.h b/Source/Plugins/Plugin_VideoDX9/Src/TransformEngine.h index 70ecad9e43..f7e2606d8f 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/TransformEngine.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/TransformEngine.h @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #ifndef _TRANSFORMENGINE_H #define _TRANSFORMENGINE_H diff --git a/Source/Plugins/Plugin_VideoDX9/Src/Utils.cpp b/Source/Plugins/Plugin_VideoDX9/Src/Utils.cpp index b0fa93913a..80021bbf37 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/Utils.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/Utils.cpp @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #ifdef _WIN32 #include "W32Util/Misc.h" #endif @@ -6,31 +23,6 @@ #include int frameCount; -int lut3to8[8]; -int lut4to8[16]; -int lut5to8[32]; -int lut6to8[64]; -float lutu8tosfloat[256]; -float lutu8toufloat[256]; -float luts8tosfloat[256]; - -void InitLUTs() -{ - for (int i = 0; i < 8; i++) - lut3to8[i] = (i * 255) / 7; - for (int i = 0; i < 16; i++) - lut4to8[i] = (i * 255) / 15; - for (int i = 0; i < 32; i++) - lut5to8[i] = (i * 255) / 31; - for (int i = 0; i < 64; i++) - lut6to8[i] = (i * 255) / 63; - for (int i = 0; i < 256; i++) - { - lutu8tosfloat[i] = (float)(i-128) / 127.0f; - lutu8toufloat[i] = (float)(i) / 255.0f; - luts8tosfloat[i] = ((float)(signed char)(char)i) / 127.0f; - } -} // Message handler for about box. LRESULT CALLBACK AboutProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM /*lParam*/) @@ -66,7 +58,11 @@ int g_bWriteProfile=0; #ifdef _WIN32 #if defined (_MSC_VER) && _MSC_VER >= 1400 +#define _interlockedbittestandset workaround_ms_header_bug_platform_sdk6_set +#define _interlockedbittestandreset workaround_ms_header_bug_platform_sdk6_reset #include +#undef _interlockedbittestandset +#undef _interlockedbittestandreset #pragma intrinsic(__rdtsc) #endif diff --git a/Source/Plugins/Plugin_VideoDX9/Src/Utils.h b/Source/Plugins/Plugin_VideoDX9/Src/Utils.h index 1a55ee2b84..3ddd531620 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/Utils.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/Utils.h @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #ifndef _UTILS_H #define _UTILS_H diff --git a/Source/Plugins/Plugin_VideoDX9/Src/Vec3.h b/Source/Plugins/Plugin_VideoDX9/Src/Vec3.h index f9b00f88f1..298c0c8da2 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/Vec3.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/Vec3.h @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #ifndef _VEC3_H #define _VEC3_H diff --git a/Source/Plugins/Plugin_VideoDX9/Src/VertexHandler.cpp b/Source/Plugins/Plugin_VideoDX9/Src/VertexHandler.cpp index a05c79443e..e8e1589920 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/VertexHandler.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/VertexHandler.cpp @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #include "D3DBase.h" #include "Common.h" diff --git a/Source/Plugins/Plugin_VideoDX9/Src/VertexHandler.h b/Source/Plugins/Plugin_VideoDX9/Src/VertexHandler.h index 4b0e7db3da..f9ac2e751a 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/VertexHandler.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/VertexHandler.h @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #pragma once diff --git a/Source/Plugins/Plugin_VideoDX9/Src/VertexLoader.cpp b/Source/Plugins/Plugin_VideoDX9/Src/VertexLoader.cpp index 3fa3e17042..0509f9f6a4 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/VertexLoader.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/VertexLoader.cpp @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #include #include "x64Emitter.h" diff --git a/Source/Plugins/Plugin_VideoDX9/Src/VertexLoader.h b/Source/Plugins/Plugin_VideoDX9/Src/VertexLoader.h index 63b844c2d6..6dcde42304 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/VertexLoader.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/VertexLoader.h @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #ifndef _VERTEXLOADER_H #define _VERTEXLOADER_H diff --git a/Source/Plugins/Plugin_VideoDX9/Src/VertexLoader_MtxIndex.h b/Source/Plugins/Plugin_VideoDX9/Src/VertexLoader_MtxIndex.h index 5fccc5be97..548d4047d6 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/VertexLoader_MtxIndex.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/VertexLoader_MtxIndex.h @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #pragma once #include "Common.h" diff --git a/Source/Plugins/Plugin_VideoDX9/Src/VertexLoader_Normal.cpp b/Source/Plugins/Plugin_VideoDX9/Src/VertexLoader_Normal.cpp index 206742a04d..865c0336c8 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/VertexLoader_Normal.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/VertexLoader_Normal.cpp @@ -1,6 +1,19 @@ -//__________________________________________________________________________________________________ -// F|RES 2003-2005 -// +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ #include "main.h" #include "Utils.h" diff --git a/Source/Plugins/Plugin_VideoDX9/Src/VertexLoader_Normal.h b/Source/Plugins/Plugin_VideoDX9/Src/VertexLoader_Normal.h index 43ce7b570c..30f8a3c188 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/VertexLoader_Normal.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/VertexLoader_Normal.h @@ -1,6 +1,19 @@ -//__________________________________________________________________________________________________ -// F|RES 2003-2005 -// +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ #pragma once diff --git a/Source/Plugins/Plugin_VideoDX9/Src/VertexLoader_Position.h b/Source/Plugins/Plugin_VideoDX9/Src/VertexLoader_Position.h index cc0800600b..dd9936206e 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/VertexLoader_Position.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/VertexLoader_Position.h @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #ifndef VERTEXHANDLER_POSITION_H #define VERTEXHANDLER_POSITION_H diff --git a/Source/Plugins/Plugin_VideoDX9/Src/VertexLoader_TextCoord.h b/Source/Plugins/Plugin_VideoDX9/Src/VertexLoader_TextCoord.h index e2e8a57975..f58a3103fd 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/VertexLoader_TextCoord.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/VertexLoader_TextCoord.h @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #ifndef VERTEXHANDLER_TEXCOORD_H #define VERTEXHANDLER_TEXCOORD_H diff --git a/Source/Plugins/Plugin_VideoDX9/Src/VertexShader.cpp b/Source/Plugins/Plugin_VideoDX9/Src/VertexShader.cpp index 0675339080..3617bc146f 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/VertexShader.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/VertexShader.cpp @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #include "stdafx.h" #include "D3DShader.h" #include "VertexShader.h" diff --git a/Source/Plugins/Plugin_VideoDX9/Src/VertexShader.h b/Source/Plugins/Plugin_VideoDX9/Src/VertexShader.h index c6930c82fa..bc0c2578fb 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/VertexShader.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/VertexShader.h @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #ifndef _VERTEXSHADER_H #define _VERTEXSHADER_H diff --git a/Source/Plugins/Plugin_VideoDX9/Src/XFStructs.cpp b/Source/Plugins/Plugin_VideoDX9/Src/XFStructs.cpp index 161380a014..0059de7514 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/XFStructs.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/XFStructs.cpp @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #include "stdafx.h" #include "XFStructs.h" #include "Render.h" diff --git a/Source/Plugins/Plugin_VideoDX9/Src/XFStructs.h b/Source/Plugins/Plugin_VideoDX9/Src/XFStructs.h index fcd83b8224..3f2560996d 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/XFStructs.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/XFStructs.h @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #ifndef _XFSTRUCTS_H #define _XFSTRUCTS_H diff --git a/Source/Plugins/Plugin_VideoDX9/Src/main.cpp b/Source/Plugins/Plugin_VideoDX9/Src/main.cpp index 1e3602d07c..18a055a76b 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/main.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/main.cpp @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #include #include #include diff --git a/Source/Plugins/Plugin_VideoDX9/Src/main.h b/Source/Plugins/Plugin_VideoDX9/Src/main.h index a172e8182e..8d78bfbb0c 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/main.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/main.h @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #ifndef MAIN_H #define MAIN_H diff --git a/Source/Plugins/Plugin_VideoDX9/Src/stdafx.cpp b/Source/Plugins/Plugin_VideoDX9/Src/stdafx.cpp index 1577c4e3bc..640544f585 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/stdafx.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/stdafx.cpp @@ -1 +1,18 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #include "stdafx.h" \ No newline at end of file diff --git a/Source/Plugins/Plugin_VideoDX9/Src/stdafx.h b/Source/Plugins/Plugin_VideoDX9/Src/stdafx.h index 73641c4f62..5fce96353a 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/stdafx.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/stdafx.h @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program 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, version 2.0. + +// This program 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 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #pragma once #define _WIN32_WINNT 0x501 #ifndef _WIN32_IE diff --git a/Source/Plugins/Plugin_VideoOGL/Src/TextureMngr.cpp b/Source/Plugins/Plugin_VideoOGL/Src/TextureMngr.cpp index b575490c42..1c20023e00 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/TextureMngr.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/TextureMngr.cpp @@ -16,7 +16,11 @@ // http://code.google.com/p/dolphin-emu/ #ifdef _WIN32 +#define _interlockedbittestandset workaround_ms_header_bug_platform_sdk6_set +#define _interlockedbittestandreset workaround_ms_header_bug_platform_sdk6_reset #include +#undef _interlockedbittestandset +#undef _interlockedbittestandreset #endif #include "Globals.h" diff --git a/Source/Plugins/Plugin_VideoOGL/Src/VertexLoader.cpp b/Source/Plugins/Plugin_VideoOGL/Src/VertexLoader.cpp index f88ad64741..6afb5f4e81 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/VertexLoader.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/VertexLoader.cpp @@ -703,7 +703,7 @@ void VertexLoader::WriteCall(void (LOADERDECL *func)(void *)) void VertexLoader::RunVertices(int primitive, int count) { - ComputeVertexSize(); + ComputeVertexSize(); // HACK for underruns in Super Monkey Ball etc. !!!! if( count <= 0 ) return; diff --git a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp index 2a20c21f3a..f7004ed962 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp @@ -14,6 +14,7 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ + #include #include "Globals.h"