From 473cd01181be6c8160ce477f25ca6bd39f8cc083 Mon Sep 17 00:00:00 2001 From: LPFaint99 Date: Mon, 23 Feb 2009 06:17:57 +0000 Subject: [PATCH] UUpdate svn:eol-style=native ( r1438 ) for Source/*.h git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2385 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Common/Src/ColorUtil.h | 56 +- Source/Core/Common/Src/ConsoleWindow.h | 104 ++-- Source/Core/Common/Src/Setup.h | 136 ++--- Source/Core/Core/Src/Boot/Boot_WiiWAD.h | 68 +-- Source/Core/Core/Src/HW/SI.h | 82 +-- Source/Core/Core/Src/HW/SI_Device.h | 152 +++--- .../Core/Core/Src/HW/SI_DeviceGCController.h | 180 +++---- Source/Core/Core/Src/HW/StreamADPCM.H | 66 +-- Source/Core/Core/Src/IPC_HLE/HW/SDInterface.h | 60 +-- Source/Core/DolphinWX/Src/ARCodeAddEdit.h | 120 ++--- Source/Core/DolphinWX/Src/SDCardWindow.h | 88 ++-- Source/Core/InputCommon/Src/SDL.h | 496 +++++++++--------- Source/Core/InputCommon/Src/XInput.h | 88 ++-- .../Core/VideoCommon/Src/NativeVertexWriter.h | 68 +-- Source/Core/VideoCommon/Src/VideoCommon.h | 264 +++++----- .../Plugin_DSP_HLE/Src/Debugger/File.h | 78 +-- .../Plugin_DSP_HLE/Src/PCHW/SoundStream.h | 100 ++-- .../Plugin_VideoDX9/Src/PixelShaderCache.h | 126 ++--- .../Plugin_VideoDX9/Src/VertexShaderCache.h | 114 ++-- .../Plugin_VideoOGL/Src/OnScreenDisplay.h | 58 +- .../Plugin_VideoOGL/Src/PixelShaderCache.h | 126 ++--- .../Src/TextureConversionShader.h | 74 +-- .../Plugin_VideoOGL/Src/VertexShaderCache.h | 118 ++--- .../Plugins/Plugin_VideoOGL/Src/XFStructs.h | 36 +- Source/Plugins/Plugin_Wiimote/Src/Logging.h | 78 +-- Source/Plugins/Plugin_Wiimote/Src/main.h | 218 ++++---- Source/Plugins/Plugin_nJoy_SDL/Src/Config.h | 82 +-- 27 files changed, 1618 insertions(+), 1618 deletions(-) diff --git a/Source/Core/Common/Src/ColorUtil.h b/Source/Core/Common/Src/ColorUtil.h index 0f417a606d..c89676f575 100644 --- a/Source/Core/Common/Src/ColorUtil.h +++ b/Source/Core/Common/Src/ColorUtil.h @@ -1,28 +1,28 @@ -// 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 _COLORUTIL_H -#define _COLORUTIL_H - -namespace ColorUtil -{ - -u32 Decode5A3(u16 val); - -} // namespace - -#endif +// 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 _COLORUTIL_H +#define _COLORUTIL_H + +namespace ColorUtil +{ + +u32 Decode5A3(u16 val); + +} // namespace + +#endif diff --git a/Source/Core/Common/Src/ConsoleWindow.h b/Source/Core/Common/Src/ConsoleWindow.h index 2688d0bdb7..e897d11220 100644 --- a/Source/Core/Common/Src/ConsoleWindow.h +++ b/Source/Core/Common/Src/ConsoleWindow.h @@ -1,52 +1,52 @@ -// 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 _CONSOLE_H -#define _CONSOLE_H - -////////////////////////////////////////////////////////////////////////////////////////// -// Includes -// ŻŻŻŻŻŻŻŻŻŻŻŻŻ -#include -#ifdef _WIN32 - #include -#endif -////////////////////////////// - -////////////////////////////////////////////////////////////////////////////////////////// -// Declarations -// ŻŻŻŻŻŻŻŻŻŻŻŻŻ -namespace Console -{ - -// Settings -extern bool WriteToFile; - -// Functions -void Open(int Width = 80, int Height = 100, char * Name = "Console", bool File = false); -void Close(); -int Print(const char *fmt, ...); -void ClearScreen(); -#ifdef _WIN32 - HWND GetHwnd(void); -#endif - -} // Console -/////////////////////////////// - - -#endif // _CONSOLE_H +// 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 _CONSOLE_H +#define _CONSOLE_H + +////////////////////////////////////////////////////////////////////////////////////////// +// Includes +// ŻŻŻŻŻŻŻŻŻŻŻŻŻ +#include +#ifdef _WIN32 + #include +#endif +////////////////////////////// + +////////////////////////////////////////////////////////////////////////////////////////// +// Declarations +// ŻŻŻŻŻŻŻŻŻŻŻŻŻ +namespace Console +{ + +// Settings +extern bool WriteToFile; + +// Functions +void Open(int Width = 80, int Height = 100, char * Name = "Console", bool File = false); +void Close(); +int Print(const char *fmt, ...); +void ClearScreen(); +#ifdef _WIN32 + HWND GetHwnd(void); +#endif + +} // Console +/////////////////////////////// + + +#endif // _CONSOLE_H diff --git a/Source/Core/Common/Src/Setup.h b/Source/Core/Common/Src/Setup.h index d13d0e2dbf..302fdbe9f4 100644 --- a/Source/Core/Common/Src/Setup.h +++ b/Source/Core/Common/Src/Setup.h @@ -1,69 +1,69 @@ -// 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 __SETUP_h__ -#define __SETUP_h__ - -//////////////////////////////////////////////////////////////////////////////////////// -// File description -/* ŻŻŻŻŻŻŻŻŻŻŻŻ - - Compilation settings. I avoid placing this in Common.h or some place where lots of files needs - to be rebuilt if any of these settings are changed. I'd rather have it in as few files as possible. - This file can be kept on the ignore list in your SVN program. It allows local optional settings - depending on what works on your computer. - -////////////////////////*/ - -//////////////////////////////////////////////////////////////////////////////////////// -// Settings -// ŻŻŻŻŻŻŻŻŻŻŻŻ - -// This may remove sound artifacts in Wario Land Shake It and perhaps other games -//#define SETUP_AVOID_SOUND_ARTIFACTS - -/* This may fix a problem with Stop and Start that I described in the comments to revision 2,139, - and in the comments in the File Description for PluginManager.cpp */ -//#define SETUP_FREE_VIDEO_PLUGIN_ON_BOOT -//#define SETUP_FREE_DSP_PLUGIN_ON_BOOT -//#define SETUP_DONT_FREE_PLUGIN_ON_STOP - -/* This will avoid deleting the g_EmuThread after Stop, that may hang when we are rendering to a child - window, however, I didn't seem to need this any more */ -//#define SETUP_AVOID_CHILD_WINDOW_RENDERING_HANG - -// Build with playback rerecording options -//#define SETUP_AVOID_OPENGL_SCREEN_MESSAGE_HANG - -// Use a timer to wait for threads for stop instead of WaitForEternity() -/* I tried that this worked with these options - SETUP_FREE_VIDEO_PLUGIN_ON_BOOT - SETUP_DONT_FREE_PLUGIN_ON_STOP - then the Confirm on Close message box doesn't hang, and we have a controlled Shutdown process - without any hanged threads. The downside is a few error messages in the ShutDown() of the - OpenGL plugin, so I still need FreeLibrary() to clean it, even with this option. */ -//#define SETUP_TIMER_WAITING - -// Build with playback rerecording options -//#define RERECORDING - -// Build with music modification -//#define MUSICMOD - -/////////////////////////// - +// 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 __SETUP_h__ +#define __SETUP_h__ + +//////////////////////////////////////////////////////////////////////////////////////// +// File description +/* ŻŻŻŻŻŻŻŻŻŻŻŻ + + Compilation settings. I avoid placing this in Common.h or some place where lots of files needs + to be rebuilt if any of these settings are changed. I'd rather have it in as few files as possible. + This file can be kept on the ignore list in your SVN program. It allows local optional settings + depending on what works on your computer. + +////////////////////////*/ + +//////////////////////////////////////////////////////////////////////////////////////// +// Settings +// ŻŻŻŻŻŻŻŻŻŻŻŻ + +// This may remove sound artifacts in Wario Land Shake It and perhaps other games +//#define SETUP_AVOID_SOUND_ARTIFACTS + +/* This may fix a problem with Stop and Start that I described in the comments to revision 2,139, + and in the comments in the File Description for PluginManager.cpp */ +//#define SETUP_FREE_VIDEO_PLUGIN_ON_BOOT +//#define SETUP_FREE_DSP_PLUGIN_ON_BOOT +//#define SETUP_DONT_FREE_PLUGIN_ON_STOP + +/* This will avoid deleting the g_EmuThread after Stop, that may hang when we are rendering to a child + window, however, I didn't seem to need this any more */ +//#define SETUP_AVOID_CHILD_WINDOW_RENDERING_HANG + +// Build with playback rerecording options +//#define SETUP_AVOID_OPENGL_SCREEN_MESSAGE_HANG + +// Use a timer to wait for threads for stop instead of WaitForEternity() +/* I tried that this worked with these options + SETUP_FREE_VIDEO_PLUGIN_ON_BOOT + SETUP_DONT_FREE_PLUGIN_ON_STOP + then the Confirm on Close message box doesn't hang, and we have a controlled Shutdown process + without any hanged threads. The downside is a few error messages in the ShutDown() of the + OpenGL plugin, so I still need FreeLibrary() to clean it, even with this option. */ +//#define SETUP_TIMER_WAITING + +// Build with playback rerecording options +//#define RERECORDING + +// Build with music modification +//#define MUSICMOD + +/////////////////////////// + #endif // __SETUP_h__ \ No newline at end of file diff --git a/Source/Core/Core/Src/Boot/Boot_WiiWAD.h b/Source/Core/Core/Src/Boot/Boot_WiiWAD.h index 2a4a922b8a..c8e3de4549 100644 --- a/Source/Core/Core/Src/Boot/Boot_WiiWAD.h +++ b/Source/Core/Core/Src/Boot/Boot_WiiWAD.h @@ -1,35 +1,35 @@ -// 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 - -struct STileMetaContent -{ - u32 m_ContentID; - u16 m_Index; - u16 m_Type; - u32 m_Size; - - u8* m_pData; -}; - - -// [TODO]: this global internal stuff sux... the whole data should be inside the ES -// but this is the easiest way atm +// 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 + +struct STileMetaContent +{ + u32 m_ContentID; + u16 m_Index; + u16 m_Type; + u32 m_Size; + + u8* m_pData; +}; + + +// [TODO]: this global internal stuff sux... the whole data should be inside the ES +// but this is the easiest way atm extern std::vector m_TileMetaContent; \ No newline at end of file diff --git a/Source/Core/Core/Src/HW/SI.h b/Source/Core/Core/Src/HW/SI.h index fca79630c6..4b460e5b7d 100644 --- a/Source/Core/Core/Src/HW/SI.h +++ b/Source/Core/Core/Src/HW/SI.h @@ -1,41 +1,41 @@ -// Copyright (C) 2003-2009 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 _SERIALINTERFACE_H -#define _SERIALINTERFACE_H - -#include "Common.h" -#include "SI_Device.h" -class PointerWrap; - -namespace SerialInterface -{ - -void Init(); -void Shutdown(); -void DoState(PointerWrap &p); - -void UpdateDevices(); - -void RemoveDevice(int _iDeviceNumber); -void AddDevice(const TSIDevices _device, int _iDeviceNumber); - -void HWCALL Read32(u32& _uReturnValue, const u32 _iAddress); -void HWCALL Write32(const u32 _iValue, const u32 _iAddress); - -}; // end of namespace SerialInterface - -#endif +// Copyright (C) 2003-2009 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 _SERIALINTERFACE_H +#define _SERIALINTERFACE_H + +#include "Common.h" +#include "SI_Device.h" +class PointerWrap; + +namespace SerialInterface +{ + +void Init(); +void Shutdown(); +void DoState(PointerWrap &p); + +void UpdateDevices(); + +void RemoveDevice(int _iDeviceNumber); +void AddDevice(const TSIDevices _device, int _iDeviceNumber); + +void HWCALL Read32(u32& _uReturnValue, const u32 _iAddress); +void HWCALL Write32(const u32 _iValue, const u32 _iAddress); + +}; // end of namespace SerialInterface + +#endif diff --git a/Source/Core/Core/Src/HW/SI_Device.h b/Source/Core/Core/Src/HW/SI_Device.h index f92774a6ff..ed2e086b28 100644 --- a/Source/Core/Core/Src/HW/SI_Device.h +++ b/Source/Core/Core/Src/HW/SI_Device.h @@ -1,76 +1,76 @@ -// Copyright (C) 2003-2009 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 _SIDEVICE_H -#define _SIDEVICE_H - -#include "Common.h" - -// Devices can reply with these, but idk if we'll ever use them... -#define SI_ERROR_NO_RESPONSE 0x0008 // Nothing is attached -#define SI_ERROR_UNKNOWN 0x0040 // Unknown device is attached -#define SI_ERROR_BUSY 0x0080 // Still detecting - -// Device types -#define SI_TYPE_MASK 0x18000000u // ??? -#define SI_TYPE_GC 0x08000000u - -// GC Controller types -#define SI_GC_NOMOTOR 0x20000000u // No rumble motor -#define SI_GC_STANDARD 0x01000000u - -class ISIDevice -{ -protected: - int m_iDeviceNumber; - -public: - // Constructor - ISIDevice(int _iDeviceNumber) : - m_iDeviceNumber(_iDeviceNumber) - {} - - // Destructor - virtual ~ISIDevice() {} - - // Run the SI Buffer - virtual int RunBuffer(u8* _pBuffer, int _iLength); - - // Return true on new data - virtual bool GetData(u32& _Hi, u32& _Low) = 0; - - // Send a command directly (no detour per buffer) - virtual void SendCommand(u32 _Cmd) = 0; -}; - -// SI Device IDs -enum TSIDevices -{ - SI_DUMMY = 0, - SI_N64_MIC = 0x00010000, - SI_N64_KEYBOARD = 0x00020000, - SI_N64_MOUSE = 0x02000000, - SI_N64_CONTROLLER = 0x05000000, - SI_GBA = 0x00040000, - SI_GC_CONTROLLER = (SI_TYPE_GC | SI_GC_STANDARD), - SI_GC_KEYBOARD = (SI_TYPE_GC | 0x00200000), - SI_GC_STEERING = SI_TYPE_GC, // (shuffle2)I think the "chainsaw" is the same (Or else it's just standard) -}; - -extern ISIDevice* SIDevice_Create(TSIDevices _SIDevice, int _iDeviceNumber); - -#endif +// Copyright (C) 2003-2009 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 _SIDEVICE_H +#define _SIDEVICE_H + +#include "Common.h" + +// Devices can reply with these, but idk if we'll ever use them... +#define SI_ERROR_NO_RESPONSE 0x0008 // Nothing is attached +#define SI_ERROR_UNKNOWN 0x0040 // Unknown device is attached +#define SI_ERROR_BUSY 0x0080 // Still detecting + +// Device types +#define SI_TYPE_MASK 0x18000000u // ??? +#define SI_TYPE_GC 0x08000000u + +// GC Controller types +#define SI_GC_NOMOTOR 0x20000000u // No rumble motor +#define SI_GC_STANDARD 0x01000000u + +class ISIDevice +{ +protected: + int m_iDeviceNumber; + +public: + // Constructor + ISIDevice(int _iDeviceNumber) : + m_iDeviceNumber(_iDeviceNumber) + {} + + // Destructor + virtual ~ISIDevice() {} + + // Run the SI Buffer + virtual int RunBuffer(u8* _pBuffer, int _iLength); + + // Return true on new data + virtual bool GetData(u32& _Hi, u32& _Low) = 0; + + // Send a command directly (no detour per buffer) + virtual void SendCommand(u32 _Cmd) = 0; +}; + +// SI Device IDs +enum TSIDevices +{ + SI_DUMMY = 0, + SI_N64_MIC = 0x00010000, + SI_N64_KEYBOARD = 0x00020000, + SI_N64_MOUSE = 0x02000000, + SI_N64_CONTROLLER = 0x05000000, + SI_GBA = 0x00040000, + SI_GC_CONTROLLER = (SI_TYPE_GC | SI_GC_STANDARD), + SI_GC_KEYBOARD = (SI_TYPE_GC | 0x00200000), + SI_GC_STEERING = SI_TYPE_GC, // (shuffle2)I think the "chainsaw" is the same (Or else it's just standard) +}; + +extern ISIDevice* SIDevice_Create(TSIDevices _SIDevice, int _iDeviceNumber); + +#endif diff --git a/Source/Core/Core/Src/HW/SI_DeviceGCController.h b/Source/Core/Core/Src/HW/SI_DeviceGCController.h index f44606059d..8608e36390 100644 --- a/Source/Core/Core/Src/HW/SI_DeviceGCController.h +++ b/Source/Core/Core/Src/HW/SI_DeviceGCController.h @@ -1,90 +1,90 @@ -// Copyright (C) 2003-2009 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 _SI_DEVICEGCCONTROLLER_H -#define _SI_DEVICEGCCONTROLLER_H - -////////////////////////////////////////////////////////////////////////// -// standard gamecube controller -////////////////////////////////////////////////////////////////////////// - -class CSIDevice_GCController : public ISIDevice -{ -private: - - // Commands - enum EBufferCommands - { - CMD_INVALID = 0xFFFFFFFF, - CMD_RESET = 0x00, - CMD_ORIGIN = 0x41, - CMD_RECALIBRATE = 0x42, - }; - - struct SOrigin - { - u8 uCommand; - u8 unk_1; - u8 uOriginStickX; - u8 uOriginStickY; - u8 uSubStickStickX; // ??? - u8 uSubStickStickY; // ??? - u8 uTrigger_L; // ??? - u8 uTrigger_R; // ??? - u8 unk_4; - u8 unk_5; - u8 unk_6; - u8 unk_7; - }; - - enum EDirectCommands - { - CMD_RUMBLE = 0x40 - }; - - union UCommand - { - u32 Hex; - struct - { - unsigned Parameter1 : 8; - unsigned Parameter2 : 8; - unsigned Command : 8; - unsigned : 8; - }; - UCommand() {Hex = 0;} - UCommand(u32 _iValue) {Hex = _iValue;} - }; - - SOrigin m_origin; - int DeviceNum; - -public: - - // Constructor - CSIDevice_GCController(int _iDeviceNumber); - - // Run the SI Buffer - virtual int RunBuffer(u8* _pBuffer, int _iLength); - - // Return true on new data - virtual bool GetData(u32& _Hi, u32& _Low); - - // Send a command directly - virtual void SendCommand(u32 _Cmd); -}; -#endif +// Copyright (C) 2003-2009 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 _SI_DEVICEGCCONTROLLER_H +#define _SI_DEVICEGCCONTROLLER_H + +////////////////////////////////////////////////////////////////////////// +// standard gamecube controller +////////////////////////////////////////////////////////////////////////// + +class CSIDevice_GCController : public ISIDevice +{ +private: + + // Commands + enum EBufferCommands + { + CMD_INVALID = 0xFFFFFFFF, + CMD_RESET = 0x00, + CMD_ORIGIN = 0x41, + CMD_RECALIBRATE = 0x42, + }; + + struct SOrigin + { + u8 uCommand; + u8 unk_1; + u8 uOriginStickX; + u8 uOriginStickY; + u8 uSubStickStickX; // ??? + u8 uSubStickStickY; // ??? + u8 uTrigger_L; // ??? + u8 uTrigger_R; // ??? + u8 unk_4; + u8 unk_5; + u8 unk_6; + u8 unk_7; + }; + + enum EDirectCommands + { + CMD_RUMBLE = 0x40 + }; + + union UCommand + { + u32 Hex; + struct + { + unsigned Parameter1 : 8; + unsigned Parameter2 : 8; + unsigned Command : 8; + unsigned : 8; + }; + UCommand() {Hex = 0;} + UCommand(u32 _iValue) {Hex = _iValue;} + }; + + SOrigin m_origin; + int DeviceNum; + +public: + + // Constructor + CSIDevice_GCController(int _iDeviceNumber); + + // Run the SI Buffer + virtual int RunBuffer(u8* _pBuffer, int _iLength); + + // Return true on new data + virtual bool GetData(u32& _Hi, u32& _Low); + + // Send a command directly + virtual void SendCommand(u32 _Cmd); +}; +#endif diff --git a/Source/Core/Core/Src/HW/StreamADPCM.H b/Source/Core/Core/Src/HW/StreamADPCM.H index 5f78cd41a2..d6d62ae8e5 100644 --- a/Source/Core/Core/Src/HW/StreamADPCM.H +++ b/Source/Core/Core/Src/HW/StreamADPCM.H @@ -1,33 +1,33 @@ -/********************************************************************* - - Nintendo GameCube ADPCM Decoder Core Class - Original Author: Shinji Chiba - Modified to fit Dolphin code style by ector - - History: Mar.19 2001 - Create. - -*********************************************************************/ - -#ifndef _STREAMADPCM_H -#define _STREAMADPCM_H - -#include "Common.h" -class PointerWrap; - -#define ONE_BLOCK_SIZE 32 -#define SAMPLES_PER_BLOCK 28 -#define MONO 1 -#define STEREO 2 - -class NGCADPCM -{ -public: - static void InitFilter(); - static void DecodeBlock( short*pcm, u8 *adpcm); -private: - static float iir1[STEREO], iir2[STEREO]; - static short DecodeSample(int, int, int); -}; - -#endif - +/********************************************************************* + + Nintendo GameCube ADPCM Decoder Core Class + Original Author: Shinji Chiba + Modified to fit Dolphin code style by ector + + History: Mar.19 2001 - Create. + +*********************************************************************/ + +#ifndef _STREAMADPCM_H +#define _STREAMADPCM_H + +#include "Common.h" +class PointerWrap; + +#define ONE_BLOCK_SIZE 32 +#define SAMPLES_PER_BLOCK 28 +#define MONO 1 +#define STEREO 2 + +class NGCADPCM +{ +public: + static void InitFilter(); + static void DecodeBlock( short*pcm, u8 *adpcm); +private: + static float iir1[STEREO], iir2[STEREO]; + static short DecodeSample(int, int, int); +}; + +#endif + diff --git a/Source/Core/Core/Src/IPC_HLE/HW/SDInterface.h b/Source/Core/Core/Src/IPC_HLE/HW/SDInterface.h index 89895dfe11..cb4b80eb48 100644 --- a/Source/Core/Core/Src/IPC_HLE/HW/SDInterface.h +++ b/Source/Core/Core/Src/IPC_HLE/HW/SDInterface.h @@ -1,31 +1,31 @@ -// 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 _SDINTERFACE_H -#define _SDINTERFACE_H - -#include "Common.h" -#include - -namespace SDInterface -{ - bool IsCardInserted(); - void SetSourceType(bool isDumpFile); - void SetSourcePath(const std::string path); -} - +// 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 _SDINTERFACE_H +#define _SDINTERFACE_H + +#include "Common.h" +#include + +namespace SDInterface +{ + bool IsCardInserted(); + void SetSourceType(bool isDumpFile); + void SetSourcePath(const std::string path); +} + #endif \ No newline at end of file diff --git a/Source/Core/DolphinWX/Src/ARCodeAddEdit.h b/Source/Core/DolphinWX/Src/ARCodeAddEdit.h index 7376c571b4..394684fa87 100644 --- a/Source/Core/DolphinWX/Src/ARCodeAddEdit.h +++ b/Source/Core/DolphinWX/Src/ARCodeAddEdit.h @@ -1,60 +1,60 @@ -// 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 __ARCODE_ADDEDIT_h__ -#define __ARCODE_ADDEDIT_h__ - -#include -#include -#include "ISOProperties.h" - -class CARCodeAddEdit : public wxDialog -{ - public: - CARCodeAddEdit(int _selection, wxWindow* parent, - wxWindowID id = 1, - const wxString& title = wxT("Edit ActionReplay Code"), - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_DIALOG_STYLE); - virtual ~CARCodeAddEdit(); - - private: - DECLARE_EVENT_TABLE(); - - wxTextCtrl *EditCheatName; - wxSpinButton *EntrySelection; - wxTextCtrl *EditCheatCode; - - enum { - ID_EDITCHEAT_NAME_TEXT = 4550, - ID_EDITCHEAT_NAME, - ID_ENTRY_SELECT, - ID_EDITCHEAT_CODE - }; - - void CreateGUIControls(int selection); - void OnClose(wxCloseEvent& event); - void SaveCheatData(wxCommandEvent& event); - void ChangeEntry(wxSpinEvent& event); - void UpdateTextCtrl(ActionReplay::ARCode arCode); - - int selection; - ActionReplay::ARCode tempEntries; - -}; -#endif // __PATCH_ADDEDIT_h__ +// 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 __ARCODE_ADDEDIT_h__ +#define __ARCODE_ADDEDIT_h__ + +#include +#include +#include "ISOProperties.h" + +class CARCodeAddEdit : public wxDialog +{ + public: + CARCodeAddEdit(int _selection, wxWindow* parent, + wxWindowID id = 1, + const wxString& title = wxT("Edit ActionReplay Code"), + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE); + virtual ~CARCodeAddEdit(); + + private: + DECLARE_EVENT_TABLE(); + + wxTextCtrl *EditCheatName; + wxSpinButton *EntrySelection; + wxTextCtrl *EditCheatCode; + + enum { + ID_EDITCHEAT_NAME_TEXT = 4550, + ID_EDITCHEAT_NAME, + ID_ENTRY_SELECT, + ID_EDITCHEAT_CODE + }; + + void CreateGUIControls(int selection); + void OnClose(wxCloseEvent& event); + void SaveCheatData(wxCommandEvent& event); + void ChangeEntry(wxSpinEvent& event); + void UpdateTextCtrl(ActionReplay::ARCode arCode); + + int selection; + ActionReplay::ARCode tempEntries; + +}; +#endif // __PATCH_ADDEDIT_h__ diff --git a/Source/Core/DolphinWX/Src/SDCardWindow.h b/Source/Core/DolphinWX/Src/SDCardWindow.h index b0c0a3d24c..3469407283 100644 --- a/Source/Core/DolphinWX/Src/SDCardWindow.h +++ b/Source/Core/DolphinWX/Src/SDCardWindow.h @@ -1,45 +1,45 @@ -// 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 __SDCARD_WINDOW_h__ -#define __SDCARD_WINDOW_h__ - -#include - -class wxSDCardWindow : public wxDialog -{ -public: - wxSDCardWindow(wxWindow* parent); - virtual ~wxSDCardWindow(); - -protected: - DECLARE_EVENT_TABLE(); - - wxButton *m_Button_Close; - - enum - { - ID_BUTTON_CLOSE, - }; - - void Init_ChildControls(); - void OnEvent_Window_Close(wxCloseEvent& event); - void OnEvent_ButtonClose_Press(wxCommandEvent& event); -}; - - +// 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 __SDCARD_WINDOW_h__ +#define __SDCARD_WINDOW_h__ + +#include + +class wxSDCardWindow : public wxDialog +{ +public: + wxSDCardWindow(wxWindow* parent); + virtual ~wxSDCardWindow(); + +protected: + DECLARE_EVENT_TABLE(); + + wxButton *m_Button_Close; + + enum + { + ID_BUTTON_CLOSE, + }; + + void Init_ChildControls(); + void OnEvent_Window_Close(wxCloseEvent& event); + void OnEvent_ButtonClose_Press(wxCommandEvent& event); +}; + + #endif \ No newline at end of file diff --git a/Source/Core/InputCommon/Src/SDL.h b/Source/Core/InputCommon/Src/SDL.h index a445cfbfab..f17e41b098 100644 --- a/Source/Core/InputCommon/Src/SDL.h +++ b/Source/Core/InputCommon/Src/SDL.h @@ -1,248 +1,248 @@ -////////////////////////////////////////////////////////////////////////////////////////// -// Project description -// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ -// Name: SDL Input -// Description: Common SDL Input Functions -// -// Author: Falcon4ever (nJoy@falcon4ever.com, www.multigesture.net), JPeterson etc -// Copyright (C) 2003-2008 Dolphin Project. -// -////////////////////////////////////////////////////////////////////////////////////////// -// -// Licensetype: GNU General Public License (GPL) -// -// 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 _SDL_h -#define _SDL_h - -////////////////////////////////////////////////////////////////////////////////////////// -// Include -// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ -#include // System -#include -#include - -#ifdef _WIN32 -#include // Externals -#else -#include -#endif - -#include "Common.h" // Common -#include "ConsoleWindow.h" -//////////////////////////// - - -namespace InputCommon -{ - -////////////////////////////////////////////////////////////////////////////////////////// -// Settings -// ŻŻŻŻŻŻŻŻŻŻ -// Show a status window with the detected axes, buttons and so on -//#define SHOW_PAD_STATUS -////////////////////////// - -////////////////////////////////////////////////////////////////////////////////////////// -// Structures -/* ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ - CONTROLLER_STATE buttons (PadState) = 0 or 1 - CONTROLLER_MAPPING buttons (joystick) = 0 or 1, 2, 3, 4, a certain joypad button - - Please remember: The axis limit is hardcoded here, if you allow more axises (for - example for analog A and B buttons) you must first incrase the size of the axis array - size here -*/ -struct CONTROLLER_STATE // GC PAD INFO/STATE -{ - int buttons[8]; // Amount of buttons (A B X Y Z, L-Trigger R-Trigger Start) might need to change the triggers buttons - int dpad; // Automatic SDL D-Pad (8 directions + neutral) - int dpad2[4]; // D-pad using buttons - int axis[6]; // 2 x 2 Axes (Main & Sub) - int halfpress; // Halfpress... you know, like not fully pressed ;)... - SDL_Joystick *joy; // SDL joystick device -}; - -struct CONTROLLER_MAPPING // GC PAD MAPPING -{ - int buttons[8]; // (See above) - int dpad; // (See above) - int dpad2[4]; // (See above) - int axis[6]; // (See above) - int halfpress; // (See above) - int enabled; // Pad attached? - int deadzone; // Deadzone... what else? - int ID; // SDL joystick device ID - int controllertype; // Hat: Hat or custom buttons - int triggertype; // Triggers range - std::string SDiagonal; - bool bSquareToCircle; - int eventnum; // Linux Event Number, Can't be found dynamically yet -}; - -struct CONTROLLER_INFO // CONNECTED WINDOWS DEVICES INFO -{ - int NumAxes; // Amount of Axes - int NumButtons; // Amount of Buttons - int NumBalls; // Amount of Balls - int NumHats; // Amount of Hats (POV) - std::string Name; // Joypad/stickname - int ID; // SDL joystick device ID - bool Good; // Pad is good (it has at least one button or axis) - SDL_Joystick *joy; // SDL joystick device -}; -enum -{ - // CTL_L_SHOULDER and CTL_R_SHOULDER = 0 and 1 - CTL_MAIN_X = 2, - CTL_MAIN_Y, - CTL_SUB_X, - CTL_SUB_Y -}; - -enum -{ - CTL_L_SHOULDER = 0, - CTL_R_SHOULDER, - CTL_A_BUTTON, - CTL_B_BUTTON, - CTL_X_BUTTON, - CTL_Y_BUTTON, - CTL_Z_TRIGGER, - CTL_START -}; -// DPad Type -enum -{ - CTL_DPAD_HAT = 0, // Automatically use the first hat that SDL finds - CTL_DPAD_CUSTOM // Custom directional pad settings -}; -// Trigger Type -enum -{ - CTL_TRIGGER_SDL = 0, // - CTL_TRIGGER_XINPUT // The XBox 360 pad -}; -enum -{ - CTL_D_PAD_UP = 0, - CTL_D_PAD_DOWN, - CTL_D_PAD_LEFT, - CTL_D_PAD_RIGHT -}; -// Button type for the configuration -enum -{ - CTL_AXIS = 0, - CTL_HAT, - CTL_BUTTON, - CTL_KEY -}; -// XInput buttons -enum -{ - XI_TRIGGER_L = 0, - XI_TRIGGER_R -}; - - -struct PadAxis -{ - int Lx; - int Ly; - int Rx; - int Ry; - int Tl; // Triggers - int Tr; -}; -struct PadWiimote -{ - int A; - int B; - int One; - int Two; - int P; - int M; - int H; - int L, R, U, D; - int Shake; - int PitchL, PitchR; -}; -struct PadNunchuck -{ - int Z; - int C; - int L, R, U, D; - int Shake; -}; -struct CONTROLLER_STATE_NEW // GC PAD INFO/STATE -{ - PadAxis Axis; // 6 Axes (Main, Sub, Triggers) - SDL_Joystick *joy; // SDL joystick device -}; -struct CONTROLLER_MAPPING_NEW // GC PAD MAPPING -{ - PadAxis Axis; // (See above) - PadWiimote Wm; - PadNunchuck Nc; - bool enabled; // Pad attached? - int DeadZoneL; // Analog 1 Deadzone - int DeadZoneR; // Analog 2 Deadzone - int ID; // SDL joystick device ID - int controllertype; // D-Pad type: Hat or custom buttons - int triggertype; // SDL or XInput trigger - std::string SDiagonal; - bool bSquareToCircle; - bool bCircle2Square; - bool bRollInvert; - bool bPitchInvert; -}; -//////////////////////////// - - -////////////////////////////////////////////////////////////////////////////////////////// -// Declarations -// ŻŻŻŻŻŻŻŻŻ - -// General functions -bool SearchDevices(std::vector &_joyinfo, int &NumPads, int &NumGoodPads); -void GetJoyState(CONTROLLER_STATE &_PadState, CONTROLLER_MAPPING _PadMapping, int controller, int NumButtons); -void GetButton(SDL_Joystick*, int,int,int,int, int&,int&,int&,int&,bool&,bool&, bool,bool,bool,bool,bool,bool); - -// Value conversion -float Deg2Rad(float Deg); -float Rad2Deg(float Rad); -int Pad_Convert(int _val); -float SquareDistance(float deg); -bool IsDeadZone(float DeadZone, int x, int y); -std::vector Square2Circle(int _x, int _y, int _pad, std::string SDiagonal, bool Circle2Square = false); - -// Input configuration -std::string VKToString(int keycode); - -#ifndef _SDL_MAIN_ - extern int g_LastPad; -#endif -//////////////////////////// - - -} // InputCommon - - -#endif // _SDL_h +////////////////////////////////////////////////////////////////////////////////////////// +// Project description +// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ +// Name: SDL Input +// Description: Common SDL Input Functions +// +// Author: Falcon4ever (nJoy@falcon4ever.com, www.multigesture.net), JPeterson etc +// Copyright (C) 2003-2008 Dolphin Project. +// +////////////////////////////////////////////////////////////////////////////////////////// +// +// Licensetype: GNU General Public License (GPL) +// +// 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 _SDL_h +#define _SDL_h + +////////////////////////////////////////////////////////////////////////////////////////// +// Include +// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ +#include // System +#include +#include + +#ifdef _WIN32 +#include // Externals +#else +#include +#endif + +#include "Common.h" // Common +#include "ConsoleWindow.h" +//////////////////////////// + + +namespace InputCommon +{ + +////////////////////////////////////////////////////////////////////////////////////////// +// Settings +// ŻŻŻŻŻŻŻŻŻŻ +// Show a status window with the detected axes, buttons and so on +//#define SHOW_PAD_STATUS +////////////////////////// + +////////////////////////////////////////////////////////////////////////////////////////// +// Structures +/* ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ + CONTROLLER_STATE buttons (PadState) = 0 or 1 + CONTROLLER_MAPPING buttons (joystick) = 0 or 1, 2, 3, 4, a certain joypad button + + Please remember: The axis limit is hardcoded here, if you allow more axises (for + example for analog A and B buttons) you must first incrase the size of the axis array + size here +*/ +struct CONTROLLER_STATE // GC PAD INFO/STATE +{ + int buttons[8]; // Amount of buttons (A B X Y Z, L-Trigger R-Trigger Start) might need to change the triggers buttons + int dpad; // Automatic SDL D-Pad (8 directions + neutral) + int dpad2[4]; // D-pad using buttons + int axis[6]; // 2 x 2 Axes (Main & Sub) + int halfpress; // Halfpress... you know, like not fully pressed ;)... + SDL_Joystick *joy; // SDL joystick device +}; + +struct CONTROLLER_MAPPING // GC PAD MAPPING +{ + int buttons[8]; // (See above) + int dpad; // (See above) + int dpad2[4]; // (See above) + int axis[6]; // (See above) + int halfpress; // (See above) + int enabled; // Pad attached? + int deadzone; // Deadzone... what else? + int ID; // SDL joystick device ID + int controllertype; // Hat: Hat or custom buttons + int triggertype; // Triggers range + std::string SDiagonal; + bool bSquareToCircle; + int eventnum; // Linux Event Number, Can't be found dynamically yet +}; + +struct CONTROLLER_INFO // CONNECTED WINDOWS DEVICES INFO +{ + int NumAxes; // Amount of Axes + int NumButtons; // Amount of Buttons + int NumBalls; // Amount of Balls + int NumHats; // Amount of Hats (POV) + std::string Name; // Joypad/stickname + int ID; // SDL joystick device ID + bool Good; // Pad is good (it has at least one button or axis) + SDL_Joystick *joy; // SDL joystick device +}; +enum +{ + // CTL_L_SHOULDER and CTL_R_SHOULDER = 0 and 1 + CTL_MAIN_X = 2, + CTL_MAIN_Y, + CTL_SUB_X, + CTL_SUB_Y +}; + +enum +{ + CTL_L_SHOULDER = 0, + CTL_R_SHOULDER, + CTL_A_BUTTON, + CTL_B_BUTTON, + CTL_X_BUTTON, + CTL_Y_BUTTON, + CTL_Z_TRIGGER, + CTL_START +}; +// DPad Type +enum +{ + CTL_DPAD_HAT = 0, // Automatically use the first hat that SDL finds + CTL_DPAD_CUSTOM // Custom directional pad settings +}; +// Trigger Type +enum +{ + CTL_TRIGGER_SDL = 0, // + CTL_TRIGGER_XINPUT // The XBox 360 pad +}; +enum +{ + CTL_D_PAD_UP = 0, + CTL_D_PAD_DOWN, + CTL_D_PAD_LEFT, + CTL_D_PAD_RIGHT +}; +// Button type for the configuration +enum +{ + CTL_AXIS = 0, + CTL_HAT, + CTL_BUTTON, + CTL_KEY +}; +// XInput buttons +enum +{ + XI_TRIGGER_L = 0, + XI_TRIGGER_R +}; + + +struct PadAxis +{ + int Lx; + int Ly; + int Rx; + int Ry; + int Tl; // Triggers + int Tr; +}; +struct PadWiimote +{ + int A; + int B; + int One; + int Two; + int P; + int M; + int H; + int L, R, U, D; + int Shake; + int PitchL, PitchR; +}; +struct PadNunchuck +{ + int Z; + int C; + int L, R, U, D; + int Shake; +}; +struct CONTROLLER_STATE_NEW // GC PAD INFO/STATE +{ + PadAxis Axis; // 6 Axes (Main, Sub, Triggers) + SDL_Joystick *joy; // SDL joystick device +}; +struct CONTROLLER_MAPPING_NEW // GC PAD MAPPING +{ + PadAxis Axis; // (See above) + PadWiimote Wm; + PadNunchuck Nc; + bool enabled; // Pad attached? + int DeadZoneL; // Analog 1 Deadzone + int DeadZoneR; // Analog 2 Deadzone + int ID; // SDL joystick device ID + int controllertype; // D-Pad type: Hat or custom buttons + int triggertype; // SDL or XInput trigger + std::string SDiagonal; + bool bSquareToCircle; + bool bCircle2Square; + bool bRollInvert; + bool bPitchInvert; +}; +//////////////////////////// + + +////////////////////////////////////////////////////////////////////////////////////////// +// Declarations +// ŻŻŻŻŻŻŻŻŻ + +// General functions +bool SearchDevices(std::vector &_joyinfo, int &NumPads, int &NumGoodPads); +void GetJoyState(CONTROLLER_STATE &_PadState, CONTROLLER_MAPPING _PadMapping, int controller, int NumButtons); +void GetButton(SDL_Joystick*, int,int,int,int, int&,int&,int&,int&,bool&,bool&, bool,bool,bool,bool,bool,bool); + +// Value conversion +float Deg2Rad(float Deg); +float Rad2Deg(float Rad); +int Pad_Convert(int _val); +float SquareDistance(float deg); +bool IsDeadZone(float DeadZone, int x, int y); +std::vector Square2Circle(int _x, int _y, int _pad, std::string SDiagonal, bool Circle2Square = false); + +// Input configuration +std::string VKToString(int keycode); + +#ifndef _SDL_MAIN_ + extern int g_LastPad; +#endif +//////////////////////////// + + +} // InputCommon + + +#endif // _SDL_h diff --git a/Source/Core/InputCommon/Src/XInput.h b/Source/Core/InputCommon/Src/XInput.h index 943d6ef9ea..e50db2f87d 100644 --- a/Source/Core/InputCommon/Src/XInput.h +++ b/Source/Core/InputCommon/Src/XInput.h @@ -1,45 +1,45 @@ -////////////////////////////////////////////////////////////////////////////////////////// -// -// Licensetype: GNU General Public License (GPL) -// -// 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 - -////////////////////////////////////////////////////////////////////////////////////////// -// Includes -// ŻŻŻŻŻŻŻŻŻŻ -#include -////////////////////////////// - - - -namespace XInput -{ - -////////////////////////////////////////////////////////////////////////////////////////// -// Declarations -// ŻŻŻŻŻŻŻŻŻŻ -void Init(); -int GetXI(int Controller, int Button); -bool IsConnected(int Controller); -////////////////////////////// - -} // XInput - +////////////////////////////////////////////////////////////////////////////////////////// +// +// Licensetype: GNU General Public License (GPL) +// +// 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 + +////////////////////////////////////////////////////////////////////////////////////////// +// Includes +// ŻŻŻŻŻŻŻŻŻŻ +#include +////////////////////////////// + + + +namespace XInput +{ + +////////////////////////////////////////////////////////////////////////////////////////// +// Declarations +// ŻŻŻŻŻŻŻŻŻŻ +void Init(); +int GetXI(int Controller, int Button); +bool IsConnected(int Controller); +////////////////////////////// + +} // XInput + #endif \ No newline at end of file diff --git a/Source/Core/VideoCommon/Src/NativeVertexWriter.h b/Source/Core/VideoCommon/Src/NativeVertexWriter.h index 3d6b8c5c44..dc7b94dbb0 100644 --- a/Source/Core/VideoCommon/Src/NativeVertexWriter.h +++ b/Source/Core/VideoCommon/Src/NativeVertexWriter.h @@ -1,34 +1,34 @@ -// 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 _NATIVE_VERTEX_WRITER -#define _NATIVE_VERTEX_WRITER - -// TODO: rename -namespace VertexManager -{ - -void AddVertices(int primitive, int numvertices); -void Flush(); // flushes the current buffer -int GetRemainingSize(); // remaining space in the current buffer. - -// TODO: move, rename. -extern u8* s_pCurBufferPointer; - -} - -#endif +// 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 _NATIVE_VERTEX_WRITER +#define _NATIVE_VERTEX_WRITER + +// TODO: rename +namespace VertexManager +{ + +void AddVertices(int primitive, int numvertices); +void Flush(); // flushes the current buffer +int GetRemainingSize(); // remaining space in the current buffer. + +// TODO: move, rename. +extern u8* s_pCurBufferPointer; + +} + +#endif diff --git a/Source/Core/VideoCommon/Src/VideoCommon.h b/Source/Core/VideoCommon/Src/VideoCommon.h index 5bd47db4f4..7e4a8a1138 100644 --- a/Source/Core/VideoCommon/Src/VideoCommon.h +++ b/Source/Core/VideoCommon/Src/VideoCommon.h @@ -1,132 +1,132 @@ -// 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 _VIDEOCOMMON_H -#define _VIDEOCOMMON_H - -#include "Common.h" -#include "pluginspecs_video.h" - -#if defined(_MSC_VER) && !defined(__x86_64__) && !defined(_M_X64) -void * memcpy_amd(void *dest, const void *src, size_t n); -unsigned char memcmp_mmx(const void* src1, const void* src2, int cmpsize); -#define memcpy_gc memcpy_amd -#define memcmp_gc memcmp_mmx -#else -#define memcpy_gc memcpy -#define memcmp_gc memcmp -#endif - -enum { - EFB_WIDTH = 640, - EFB_HEIGHT = 528, -}; - -enum { - XFB_WIDTH = 640, - XFB_HEIGHT = 480, // 528 is max height ... ? or 538? - // TODO: figure out what to do with PAL -}; - -extern SVideoInitialize g_VideoInitialize; -// (mb2) for XFB update hack. TODO: find a static better place -extern volatile u32 g_XFBUpdateRequested; - -void DebugLog(const char* _fmt, ...); - -////////////////////////////////////////////////////////////////////////// -inline u8 *Memory_GetPtr(u32 _uAddress) -{ - return g_VideoInitialize.pGetMemoryPointer(_uAddress);//&g_pMemory[_uAddress & RAM_MASK]; -} - -inline u8 Memory_Read_U8(u32 _uAddress) -{ - return *(u8*)g_VideoInitialize.pGetMemoryPointer(_uAddress);//g_pMemory[_uAddress & RAM_MASK]; -} - -inline u16 Memory_Read_U16(u32 _uAddress) -{ - return Common::swap16(*(u16*)g_VideoInitialize.pGetMemoryPointer(_uAddress)); -} - -inline u32 Memory_Read_U32(u32 _uAddress) -{ - return Common::swap32(*(u32*)g_VideoInitialize.pGetMemoryPointer(_uAddress)); -} -////////////////////////////////////////////////////////////////////////// -inline u8* Memory_Read_U8_Ptr(u32 _uAddress) -{ - return (u8*)g_VideoInitialize.pGetMemoryPointer(_uAddress);//g_pMemory[_uAddress & RAM_MASK]; -} - -inline u16* Memory_Read_U16_Unswapped_Ptr(u32 _uAddress) -{ - return (u16*)g_VideoInitialize.pGetMemoryPointer(_uAddress); -} - -inline u32* Memory_Read_U32_Unswapped_Ptr(u32 _uAddress) -{ - return (u32*)g_VideoInitialize.pGetMemoryPointer(_uAddress); -} -////////////////////////////////////////////////////////////////////////// -inline u32 Memory_Read_U32_Unswapped(u32 _uAddress) -{ - return *(u32*)g_VideoInitialize.pGetMemoryPointer(_uAddress); -} - -inline float Memory_Read_Float(u32 _uAddress) -{ - union {u32 i; float f;} temp; - temp.i = Memory_Read_U32(_uAddress); - return temp.f; -} - -struct TRectangle -{ - int left, top, right, bottom; -}; - - - -// Logging -// ŻŻŻŻŻŻŻŻŻŻ -void DebugLog(const char* _fmt, ...); // This one goes to the main program -void HandleGLError(); - - - -#ifdef _WIN32 -#define ERROR_LOG(...) {LOG(VIDEO, __VA_ARGS__)} -#define INFO_LOG(...) {LOG(VIDEO, __VA_ARGS__)} -#define PRIM_LOG(...) {LOG(VIDEO, __VA_ARGS__)} -#define DEBUG_LOG(...) {LOG(VIDEO, __VA_ARGS__)} - -#else -#define ERROR_LOG(...) {LOG(VIDEO, ##__VA_ARGS__)} -#define INFO_LOG(...) {LOG(VIDEO, ##__VA_ARGS__)} -#define PRIM_LOG(...) {LOG(VIDEO, ##__VA_ARGS__)} -#define DEBUG_LOG(...) {LOG(VIDEO, ##__VA_ARGS__)} -#endif - -#ifdef LOGGING -#define LOG_VTX() PRIM_LOG("vtx: %f %f %f, ", ((float*)VertexManager::s_pCurBufferPointer)[0], ((float*)VertexManager::s_pCurBufferPointer)[1], ((float*)VertexManager::s_pCurBufferPointer)[2]); -#else -#define LOG_VTX() -#endif - -#endif // _VIDEOCOMMON_H +// 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 _VIDEOCOMMON_H +#define _VIDEOCOMMON_H + +#include "Common.h" +#include "pluginspecs_video.h" + +#if defined(_MSC_VER) && !defined(__x86_64__) && !defined(_M_X64) +void * memcpy_amd(void *dest, const void *src, size_t n); +unsigned char memcmp_mmx(const void* src1, const void* src2, int cmpsize); +#define memcpy_gc memcpy_amd +#define memcmp_gc memcmp_mmx +#else +#define memcpy_gc memcpy +#define memcmp_gc memcmp +#endif + +enum { + EFB_WIDTH = 640, + EFB_HEIGHT = 528, +}; + +enum { + XFB_WIDTH = 640, + XFB_HEIGHT = 480, // 528 is max height ... ? or 538? + // TODO: figure out what to do with PAL +}; + +extern SVideoInitialize g_VideoInitialize; +// (mb2) for XFB update hack. TODO: find a static better place +extern volatile u32 g_XFBUpdateRequested; + +void DebugLog(const char* _fmt, ...); + +////////////////////////////////////////////////////////////////////////// +inline u8 *Memory_GetPtr(u32 _uAddress) +{ + return g_VideoInitialize.pGetMemoryPointer(_uAddress);//&g_pMemory[_uAddress & RAM_MASK]; +} + +inline u8 Memory_Read_U8(u32 _uAddress) +{ + return *(u8*)g_VideoInitialize.pGetMemoryPointer(_uAddress);//g_pMemory[_uAddress & RAM_MASK]; +} + +inline u16 Memory_Read_U16(u32 _uAddress) +{ + return Common::swap16(*(u16*)g_VideoInitialize.pGetMemoryPointer(_uAddress)); +} + +inline u32 Memory_Read_U32(u32 _uAddress) +{ + return Common::swap32(*(u32*)g_VideoInitialize.pGetMemoryPointer(_uAddress)); +} +////////////////////////////////////////////////////////////////////////// +inline u8* Memory_Read_U8_Ptr(u32 _uAddress) +{ + return (u8*)g_VideoInitialize.pGetMemoryPointer(_uAddress);//g_pMemory[_uAddress & RAM_MASK]; +} + +inline u16* Memory_Read_U16_Unswapped_Ptr(u32 _uAddress) +{ + return (u16*)g_VideoInitialize.pGetMemoryPointer(_uAddress); +} + +inline u32* Memory_Read_U32_Unswapped_Ptr(u32 _uAddress) +{ + return (u32*)g_VideoInitialize.pGetMemoryPointer(_uAddress); +} +////////////////////////////////////////////////////////////////////////// +inline u32 Memory_Read_U32_Unswapped(u32 _uAddress) +{ + return *(u32*)g_VideoInitialize.pGetMemoryPointer(_uAddress); +} + +inline float Memory_Read_Float(u32 _uAddress) +{ + union {u32 i; float f;} temp; + temp.i = Memory_Read_U32(_uAddress); + return temp.f; +} + +struct TRectangle +{ + int left, top, right, bottom; +}; + + + +// Logging +// ŻŻŻŻŻŻŻŻŻŻ +void DebugLog(const char* _fmt, ...); // This one goes to the main program +void HandleGLError(); + + + +#ifdef _WIN32 +#define ERROR_LOG(...) {LOG(VIDEO, __VA_ARGS__)} +#define INFO_LOG(...) {LOG(VIDEO, __VA_ARGS__)} +#define PRIM_LOG(...) {LOG(VIDEO, __VA_ARGS__)} +#define DEBUG_LOG(...) {LOG(VIDEO, __VA_ARGS__)} + +#else +#define ERROR_LOG(...) {LOG(VIDEO, ##__VA_ARGS__)} +#define INFO_LOG(...) {LOG(VIDEO, ##__VA_ARGS__)} +#define PRIM_LOG(...) {LOG(VIDEO, ##__VA_ARGS__)} +#define DEBUG_LOG(...) {LOG(VIDEO, ##__VA_ARGS__)} +#endif + +#ifdef LOGGING +#define LOG_VTX() PRIM_LOG("vtx: %f %f %f, ", ((float*)VertexManager::s_pCurBufferPointer)[0], ((float*)VertexManager::s_pCurBufferPointer)[1], ((float*)VertexManager::s_pCurBufferPointer)[2]); +#else +#define LOG_VTX() +#endif + +#endif // _VIDEOCOMMON_H diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/File.h b/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/File.h index e200a1deba..5582c29e37 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/File.h +++ b/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/File.h @@ -1,40 +1,40 @@ -// 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/ - - -////////////////////////////////////////////////////////////////////////////////////////// -// Declarations and definitions -// ------------- - -// -------------------- -// Settings -// ------------- -const int nFiles = 4; -const int StringSize = 5000; // Warning, mind this value, if exceeded a crash may occur - -// -------------------- -// Functions -// ------------- -void StartFile(int width, int height, char* fname); -void StopFile(); -int PrintFile(int a, char *fmt, ...); -void OpenConsole(); -void CloseConsole(); -#ifdef _WIN32 - HWND GetConsoleHwnd(void); -#endif +// 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/ + + +////////////////////////////////////////////////////////////////////////////////////////// +// Declarations and definitions +// ------------- + +// -------------------- +// Settings +// ------------- +const int nFiles = 4; +const int StringSize = 5000; // Warning, mind this value, if exceeded a crash may occur + +// -------------------- +// Functions +// ------------- +void StartFile(int width, int height, char* fname); +void StopFile(); +int PrintFile(int a, char *fmt, ...); +void OpenConsole(); +void CloseConsole(); +#ifdef _WIN32 + HWND GetConsoleHwnd(void); +#endif ///////////////////////////// \ No newline at end of file diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/PCHW/SoundStream.h b/Source/Plugins/Plugin_DSP_HLE/Src/PCHW/SoundStream.h index df5db13556..44ffdd43b8 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/PCHW/SoundStream.h +++ b/Source/Plugins/Plugin_DSP_HLE/Src/PCHW/SoundStream.h @@ -1,50 +1,50 @@ -// Copyright (C) 2003-2009 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 __SOUNDSTREAM_H__ -#define __SOUNDSTREAM_H__ - -#include "Common.h" - -typedef void (*StreamCallback)(short* buffer, int numSamples, int bits, int rate, int channels); - -class SoundStream -{ -protected: - int sampleRate; - StreamCallback callback; - - // We set this to shut down the sound thread. - // 0=keep playing, 1=stop playing NOW. - volatile int threadData; - -public: - SoundStream(int _sampleRate, StreamCallback _callback) : - sampleRate(_sampleRate), callback(_callback), threadData(0) {} - virtual ~SoundStream() {} - - static bool isValid() { return false; } - virtual bool usesMixer() const { return false; } - virtual bool Start() { return false; } - virtual void SoundLoop() {} - virtual void Stop() {} - virtual void Update() {} - - virtual int GetSampleRate() const { return sampleRate; } -}; - -#endif +// Copyright (C) 2003-2009 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 __SOUNDSTREAM_H__ +#define __SOUNDSTREAM_H__ + +#include "Common.h" + +typedef void (*StreamCallback)(short* buffer, int numSamples, int bits, int rate, int channels); + +class SoundStream +{ +protected: + int sampleRate; + StreamCallback callback; + + // We set this to shut down the sound thread. + // 0=keep playing, 1=stop playing NOW. + volatile int threadData; + +public: + SoundStream(int _sampleRate, StreamCallback _callback) : + sampleRate(_sampleRate), callback(_callback), threadData(0) {} + virtual ~SoundStream() {} + + static bool isValid() { return false; } + virtual bool usesMixer() const { return false; } + virtual bool Start() { return false; } + virtual void SoundLoop() {} + virtual void Stop() {} + virtual void Update() {} + + virtual int GetSampleRate() const { return sampleRate; } +}; + +#endif diff --git a/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.h b/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.h index c602e1c783..e3bb238eac 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.h @@ -1,63 +1,63 @@ -// 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 _PIXELSHADERCACHE_H -#define _PIXELSHADERCACHE_H - -#include "D3DBase.h" - -#include - -#include "PixelShader.h" -#include "VertexShader.h" - -typedef u32 tevhash; - -tevhash GetCurrentTEV(); - -class PShaderCache -{ - struct PSCacheEntry - { - LPDIRECT3DPIXELSHADER9 shader; - - int frameCount; - PSCacheEntry() - { - shader = 0; - frameCount = 0; - } - void Destroy() - { - if (shader) - shader->Release(); - } - }; - - typedef std::map PSCache; - - static PSCache pshaders; - -public: - static void Init(); - static void Cleanup(); - static void Shutdown(); - static void SetShader(); -}; - - -#endif // _PIXELSHADERCACHE_H +// 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 _PIXELSHADERCACHE_H +#define _PIXELSHADERCACHE_H + +#include "D3DBase.h" + +#include + +#include "PixelShader.h" +#include "VertexShader.h" + +typedef u32 tevhash; + +tevhash GetCurrentTEV(); + +class PShaderCache +{ + struct PSCacheEntry + { + LPDIRECT3DPIXELSHADER9 shader; + + int frameCount; + PSCacheEntry() + { + shader = 0; + frameCount = 0; + } + void Destroy() + { + if (shader) + shader->Release(); + } + }; + + typedef std::map PSCache; + + static PSCache pshaders; + +public: + static void Init(); + static void Cleanup(); + static void Shutdown(); + static void SetShader(); +}; + + +#endif // _PIXELSHADERCACHE_H diff --git a/Source/Plugins/Plugin_VideoDX9/Src/VertexShaderCache.h b/Source/Plugins/Plugin_VideoDX9/Src/VertexShaderCache.h index 7bcebe9cc0..644e35c796 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/VertexShaderCache.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/VertexShaderCache.h @@ -1,57 +1,57 @@ -// 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 _VERTEXSHADERCACHE_H -#define _VERTEXSHADERCACHE_H - -#include "D3DBase.h" - -#include - -#include "PixelShader.h" -#include "VertexShader.h" - -class VShaderCache -{ - struct VSCacheEntry - { - LPDIRECT3DVERTEXSHADER9 shader; - int frameCount; - VSCacheEntry() - { - shader = 0; - frameCount = 0; - } - void Destroy() - { - if (shader) - shader->Release(); - } - }; - - typedef std::map VSCache; - - static VSCache vshaders; - -public: - static void Init(); - static void Cleanup(); - static void Shutdown(); - static void SetShader(); -}; - -#endif // _VERTEXSHADERCACHE_H +// 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 _VERTEXSHADERCACHE_H +#define _VERTEXSHADERCACHE_H + +#include "D3DBase.h" + +#include + +#include "PixelShader.h" +#include "VertexShader.h" + +class VShaderCache +{ + struct VSCacheEntry + { + LPDIRECT3DVERTEXSHADER9 shader; + int frameCount; + VSCacheEntry() + { + shader = 0; + frameCount = 0; + } + void Destroy() + { + if (shader) + shader->Release(); + } + }; + + typedef std::map VSCache; + + static VSCache vshaders; + +public: + static void Init(); + static void Cleanup(); + static void Shutdown(); + static void SetShader(); +}; + +#endif // _VERTEXSHADERCACHE_H diff --git a/Source/Plugins/Plugin_VideoOGL/Src/OnScreenDisplay.h b/Source/Plugins/Plugin_VideoOGL/Src/OnScreenDisplay.h index 614746c2ec..6e958d1807 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/OnScreenDisplay.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/OnScreenDisplay.h @@ -1,30 +1,30 @@ -// 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 _OSD_H -#define _OSD_H - -namespace OSD -{ - -// On-screen message display -void AddMessage(const char* str, u32 ms); -void DrawMessages(); // draw the current messages on the screen. Only call once per frame. - -} // namespace - +// 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 _OSD_H +#define _OSD_H + +namespace OSD +{ + +// On-screen message display +void AddMessage(const char* str, u32 ms); +void DrawMessages(); // draw the current messages on the screen. Only call once per frame. + +} // namespace + #endif \ No newline at end of file diff --git a/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.h b/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.h index 5d0ebb37aa..c1857117b1 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.h @@ -1,63 +1,63 @@ -// 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 "BPMemory.h" -#include "PixelShaderGen.h" - -struct FRAGMENTSHADER -{ - FRAGMENTSHADER() : glprogid(0) { } - GLuint glprogid; // opengl program id -#if defined(_DEBUG) || defined(DEBUGFAST) - std::string strprog; -#endif -}; - -class PixelShaderCache -{ - struct PSCacheEntry - { - FRAGMENTSHADER shader; - int frameCount; - PSCacheEntry() : frameCount(0) {} - ~PSCacheEntry() {} - void Destroy() { - // printf("Destroying ps %i\n", shader.glprogid); - glDeleteProgramsARB(1, &shader.glprogid); - shader.glprogid = 0; - } - }; - - typedef std::map PSCache; - - static PSCache pshaders; - - static PIXELSHADERUID s_curuid; // the current pixel shader uid (progressively changed as memory is written) - -public: - static void Init(); - static void Cleanup(); - static void Shutdown(); - - static FRAGMENTSHADER* GetShader(); - static bool CompilePixelShader(FRAGMENTSHADER& ps, const char* pstrprogram); - - static GLuint GetColorMatrixProgram(); -}; +// 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 "BPMemory.h" +#include "PixelShaderGen.h" + +struct FRAGMENTSHADER +{ + FRAGMENTSHADER() : glprogid(0) { } + GLuint glprogid; // opengl program id +#if defined(_DEBUG) || defined(DEBUGFAST) + std::string strprog; +#endif +}; + +class PixelShaderCache +{ + struct PSCacheEntry + { + FRAGMENTSHADER shader; + int frameCount; + PSCacheEntry() : frameCount(0) {} + ~PSCacheEntry() {} + void Destroy() { + // printf("Destroying ps %i\n", shader.glprogid); + glDeleteProgramsARB(1, &shader.glprogid); + shader.glprogid = 0; + } + }; + + typedef std::map PSCache; + + static PSCache pshaders; + + static PIXELSHADERUID s_curuid; // the current pixel shader uid (progressively changed as memory is written) + +public: + static void Init(); + static void Cleanup(); + static void Shutdown(); + + static FRAGMENTSHADER* GetShader(); + static bool CompilePixelShader(FRAGMENTSHADER& ps, const char* pstrprogram); + + static GLuint GetColorMatrixProgram(); +}; diff --git a/Source/Plugins/Plugin_VideoOGL/Src/TextureConversionShader.h b/Source/Plugins/Plugin_VideoOGL/Src/TextureConversionShader.h index 0cded657d2..c547a8e8cc 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/TextureConversionShader.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/TextureConversionShader.h @@ -1,38 +1,38 @@ -// 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 _TEXTURECONVERSIONSHADER_H -#define _TEXTURECONVERSIONSHADER_H - -#include "Common.h" -#include "TextureDecoder.h" -#include - -namespace TextureConversionShader -{ - -u16 GetBlockWidthInTexels(u32 format); -u16 GetBlockHeightInTexels(u32 format); -u16 GetEncodedSampleCount(u32 format); - -const char *GenerateEncodingShader(u32 format); - -void SetShaderParameters(u32 width, u32 height, u32 offsetX, u32 offsetY, float pixelStride, u32 format); - -} - +// 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 _TEXTURECONVERSIONSHADER_H +#define _TEXTURECONVERSIONSHADER_H + +#include "Common.h" +#include "TextureDecoder.h" +#include + +namespace TextureConversionShader +{ + +u16 GetBlockWidthInTexels(u32 format); +u16 GetBlockHeightInTexels(u32 format); +u16 GetEncodedSampleCount(u32 format); + +const char *GenerateEncodingShader(u32 format); + +void SetShaderParameters(u32 width, u32 height, u32 offsetX, u32 offsetY, float pixelStride, u32 format); + +} + #endif \ No newline at end of file diff --git a/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderCache.h b/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderCache.h index 32a28f6b68..266407829c 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderCache.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderCache.h @@ -1,59 +1,59 @@ -// 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 "BPMemory.h" -#include "VertexShaderGen.h" - -struct VERTEXSHADER -{ - VERTEXSHADER() : glprogid(0) {} - GLuint glprogid; // opengl program id - -#if defined(_DEBUG) || defined(DEBUGFAST) - std::string strprog; -#endif -}; - -class VertexShaderCache -{ - struct VSCacheEntry - { - VERTEXSHADER shader; - int frameCount; - VSCacheEntry() : frameCount(0) {} - void Destroy() { - // printf("Destroying vs %i\n", shader.glprogid); - glDeleteProgramsARB(1, &shader.glprogid); - shader.glprogid = 0; - } - }; - - typedef std::map VSCache; - - static VSCache vshaders; - -public: - static void Init(); - static void Cleanup(); - static void Shutdown(); - - static VERTEXSHADER* GetShader(u32 components); - static bool CompileVertexShader(VERTEXSHADER& ps, const char* pstrprogram); -}; +// 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 "BPMemory.h" +#include "VertexShaderGen.h" + +struct VERTEXSHADER +{ + VERTEXSHADER() : glprogid(0) {} + GLuint glprogid; // opengl program id + +#if defined(_DEBUG) || defined(DEBUGFAST) + std::string strprog; +#endif +}; + +class VertexShaderCache +{ + struct VSCacheEntry + { + VERTEXSHADER shader; + int frameCount; + VSCacheEntry() : frameCount(0) {} + void Destroy() { + // printf("Destroying vs %i\n", shader.glprogid); + glDeleteProgramsARB(1, &shader.glprogid); + shader.glprogid = 0; + } + }; + + typedef std::map VSCache; + + static VSCache vshaders; + +public: + static void Init(); + static void Cleanup(); + static void Shutdown(); + + static VERTEXSHADER* GetShader(u32 components); + static bool CompileVertexShader(VERTEXSHADER& ps, const char* pstrprogram); +}; diff --git a/Source/Plugins/Plugin_VideoOGL/Src/XFStructs.h b/Source/Plugins/Plugin_VideoOGL/Src/XFStructs.h index 6e06efa010..005c20c1d5 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/XFStructs.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/XFStructs.h @@ -1,18 +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 "XFMemory.h" +// 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 "XFMemory.h" diff --git a/Source/Plugins/Plugin_Wiimote/Src/Logging.h b/Source/Plugins/Plugin_Wiimote/Src/Logging.h index 4334110dfd..4dc1860a50 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/Logging.h +++ b/Source/Plugins/Plugin_Wiimote/Src/Logging.h @@ -1,40 +1,40 @@ -// 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 WIIMOTE_CONSOLE_H -#define WIIMOTE_CONSOLE_H - -////////////////////////////////////////////////////////////////////////////////////////// -// Includes -// ŻŻŻŻŻŻŻŻŻŻŻŻŻ -#include -#include "ConsoleWindow.h" -////////////////////////////// - -////////////////////////////////////////////////////////////////////////////////////////// -// Declarations -// ŻŻŻŻŻŻŻŻŻŻŻŻŻ -std::string Tm(bool Ms = false); -int PrintFile(int a, const char *fmt, ...); -void ClearScreen(); - -#ifdef _WIN32 - HWND GetConsoleHwnd(void); -#endif -/////////////////////////////// - +// 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 WIIMOTE_CONSOLE_H +#define WIIMOTE_CONSOLE_H + +////////////////////////////////////////////////////////////////////////////////////////// +// Includes +// ŻŻŻŻŻŻŻŻŻŻŻŻŻ +#include +#include "ConsoleWindow.h" +////////////////////////////// + +////////////////////////////////////////////////////////////////////////////////////////// +// Declarations +// ŻŻŻŻŻŻŻŻŻŻŻŻŻ +std::string Tm(bool Ms = false); +int PrintFile(int a, const char *fmt, ...); +void ClearScreen(); + +#ifdef _WIN32 + HWND GetConsoleHwnd(void); +#endif +/////////////////////////////// + #endif // WIIMOTE_CONSOLE_H \ No newline at end of file diff --git a/Source/Plugins/Plugin_Wiimote/Src/main.h b/Source/Plugins/Plugin_Wiimote/Src/main.h index ca7e264579..ab7accbe73 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/main.h +++ b/Source/Plugins/Plugin_Wiimote/Src/main.h @@ -1,109 +1,109 @@ -// 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 - -////////////////////////////////////////////////////////////////////////////////////////// -// Includes -// ŻŻŻŻŻŻŻŻŻŻŻŻŻ -#include // System -//////////////////////////////// - - -////////////////////////////////////////////////////////////////////////////////////////// -// Definitions and declarations -// ŻŻŻŻŻŻŻŻŻ -#ifdef _WIN32 -#define sleep(x) Sleep(x) -#else -#define sleep(x) usleep(x*1000) -#endif - - -void DoInitialize(); -double GetDoubleTime(); -int GetUpdateRate(); -void InterruptDebugging(bool Emu, const void* _pData); -void ReadDebugging(bool Emu, const void* _pData, int Size); -bool IsFocus(); -void OpenConsole(bool Open = false); - - -// Movement recording -#define RECORDING_ROWS 15 -#define WM_RECORDING_WIIMOTE 0 -#define WM_RECORDING_NUNCHUCK 1 -#define WM_RECORDING_IR 2 -struct SRecording -{ - int x; - int y; - int z; - double Time; - u8 IR[12]; -}; -struct SRecordingAll -{ - std::vector Recording; - int HotKeySwitch, HotKeyWiimote, HotKeyNunchuck, HotKeyIR; - int PlaybackSpeed; - int IRBytes; -}; - -#ifndef EXCLUDEMAIN_H - // General - extern bool g_EmulatorRunning; - extern u32 g_ISOId; - extern bool g_FrameOpen; - extern bool g_RealWiiMotePresent; - extern bool g_RealWiiMoteInitialized; - extern bool g_EmulatedWiiMoteInitialized; - extern bool g_WiimoteUnexpectedDisconnect; - #ifdef _WIN32 - extern HWND g_ParentHWND; - #endif - - // Settings - extern accel_cal g_wm; - extern nu_cal g_nu; - - // Debugging - extern bool g_DebugAccelerometer; - extern bool g_DebugData; - extern bool g_DebugComm; - extern bool g_DebugSoundData; - extern bool g_DebugCustom; - - // Update speed - extern int g_UpdateCounter; - extern double g_UpdateTime; - extern int g_UpdateWriteScreen; - extern int g_UpdateRate; - extern std::vector g_UpdateTimeList; - - // Movement recording - extern std::vector VRecording; - - //#if defined(HAVE_WX) && HAVE_WX && defined(__CONFIGDIALOG_h__) - // extern ConfigDialog *frame; - //#endif -#endif -//////////////////////////////// - - -#endif // MAIN_H +// 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 + +////////////////////////////////////////////////////////////////////////////////////////// +// Includes +// ŻŻŻŻŻŻŻŻŻŻŻŻŻ +#include // System +//////////////////////////////// + + +////////////////////////////////////////////////////////////////////////////////////////// +// Definitions and declarations +// ŻŻŻŻŻŻŻŻŻ +#ifdef _WIN32 +#define sleep(x) Sleep(x) +#else +#define sleep(x) usleep(x*1000) +#endif + + +void DoInitialize(); +double GetDoubleTime(); +int GetUpdateRate(); +void InterruptDebugging(bool Emu, const void* _pData); +void ReadDebugging(bool Emu, const void* _pData, int Size); +bool IsFocus(); +void OpenConsole(bool Open = false); + + +// Movement recording +#define RECORDING_ROWS 15 +#define WM_RECORDING_WIIMOTE 0 +#define WM_RECORDING_NUNCHUCK 1 +#define WM_RECORDING_IR 2 +struct SRecording +{ + int x; + int y; + int z; + double Time; + u8 IR[12]; +}; +struct SRecordingAll +{ + std::vector Recording; + int HotKeySwitch, HotKeyWiimote, HotKeyNunchuck, HotKeyIR; + int PlaybackSpeed; + int IRBytes; +}; + +#ifndef EXCLUDEMAIN_H + // General + extern bool g_EmulatorRunning; + extern u32 g_ISOId; + extern bool g_FrameOpen; + extern bool g_RealWiiMotePresent; + extern bool g_RealWiiMoteInitialized; + extern bool g_EmulatedWiiMoteInitialized; + extern bool g_WiimoteUnexpectedDisconnect; + #ifdef _WIN32 + extern HWND g_ParentHWND; + #endif + + // Settings + extern accel_cal g_wm; + extern nu_cal g_nu; + + // Debugging + extern bool g_DebugAccelerometer; + extern bool g_DebugData; + extern bool g_DebugComm; + extern bool g_DebugSoundData; + extern bool g_DebugCustom; + + // Update speed + extern int g_UpdateCounter; + extern double g_UpdateTime; + extern int g_UpdateWriteScreen; + extern int g_UpdateRate; + extern std::vector g_UpdateTimeList; + + // Movement recording + extern std::vector VRecording; + + //#if defined(HAVE_WX) && HAVE_WX && defined(__CONFIGDIALOG_h__) + // extern ConfigDialog *frame; + //#endif +#endif +//////////////////////////////// + + +#endif // MAIN_H diff --git a/Source/Plugins/Plugin_nJoy_SDL/Src/Config.h b/Source/Plugins/Plugin_nJoy_SDL/Src/Config.h index a59c3679c2..bf14deeb39 100644 --- a/Source/Plugins/Plugin_nJoy_SDL/Src/Config.h +++ b/Source/Plugins/Plugin_nJoy_SDL/Src/Config.h @@ -1,41 +1,41 @@ -// 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 _CONFIG_H -#define _CONFIG_H - -struct Config -{ - Config(); - void Load(bool ChangePad = false, bool ChangeSaveByID = false); - void Save(int Slot = -1); - int CheckForDuplicateJoypads(bool OK); - - // General - bool bShowAdvanced; // Only allow one of these - bool bSaveByID; - bool bCheckFocus; - bool bNoTriggerFilter; -#ifdef RERECORDING - bool bRecording; - bool bPlayback; -#endif -}; - -extern Config g_Config; - -#endif // _CONFIG_H +// 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 _CONFIG_H +#define _CONFIG_H + +struct Config +{ + Config(); + void Load(bool ChangePad = false, bool ChangeSaveByID = false); + void Save(int Slot = -1); + int CheckForDuplicateJoypads(bool OK); + + // General + bool bShowAdvanced; // Only allow one of these + bool bSaveByID; + bool bCheckFocus; + bool bNoTriggerFilter; +#ifdef RERECORDING + bool bRecording; + bool bPlayback; +#endif +}; + +extern Config g_Config; + +#endif // _CONFIG_H