* Better icon! Transparency in Windows Taskbar icon is still bad, but I can't figure out how to fix it (documented in code)

* Cleaned up the code of the Gamefixes a bit.
 * More svn:native props -_-

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1788 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2009-09-08 16:39:37 +00:00
parent 756f8c3a15
commit 4b4422d2dc
17 changed files with 274 additions and 165 deletions

View File

@ -1,17 +1,17 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2009 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2009 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include "PrecompiledHeader.h"
#include "IsoFileTools.h"

View File

@ -1,48 +1,48 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2009 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#ifndef _LARGEFILE_SOURCE
#define _LARGEFILE_SOURCE
#endif
#ifndef _LARGEFILE64_SOURCE
#define _LARGEFILE64_SOURCE
#endif
#ifndef __USE_FILE_OFFSET64
#define __USE_FILE_OFFSET64
#endif
#define _FILE_OFFSET_BITS 64
#ifdef _MSC_VER
# pragma warning(disable:4018) // disable signed/unsigned mismatch error
#endif
#include "IopCommon.h"
#include <stdio.h>
#include <fcntl.h>
#include <errno.h>
extern void *_openfile(const char *filename, int flags);
extern u64 _tellfile(void *handle);
extern int _seekfile(void *handle, u64 offset, int whence);
extern int _readfile(void *handle, void *dst, int size);
extern int _writefile(void *handle, const void *src, int size);
extern void _closefile(void *handle);
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2009 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#ifndef _LARGEFILE_SOURCE
#define _LARGEFILE_SOURCE
#endif
#ifndef _LARGEFILE64_SOURCE
#define _LARGEFILE64_SOURCE
#endif
#ifndef __USE_FILE_OFFSET64
#define __USE_FILE_OFFSET64
#endif
#define _FILE_OFFSET_BITS 64
#ifdef _MSC_VER
# pragma warning(disable:4018) // disable signed/unsigned mismatch error
#endif
#include "IopCommon.h"
#include <stdio.h>
#include <fcntl.h>
#include <errno.h>
extern void *_openfile(const char *filename, int flags);
extern u64 _tellfile(void *handle);
extern int _seekfile(void *handle, u64 offset, int whence);
extern int _readfile(void *handle, void *dst, int size);
extern int _writefile(void *handle, const void *src, int size);
extern void _closefile(void *handle);

View File

@ -1,17 +1,17 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2009 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2009 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once

View File

@ -1,17 +1,17 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2009 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2009 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include "PrecompiledHeader.h"

View File

@ -17,10 +17,14 @@
#include "MainFrame.h"
#include "Resources/EmbeddedImage.h"
#include "Resources/AppIcon.h"
#include "Resources/AppIcon16.h"
#include "Resources/AppIcon32.h"
#include "Resources/AppIcon64.h"
#include <wx/iconbndl.h>
#ifdef _WIN32
#include "svnrev.h"
# include "svnrev.h"
#endif
// ------------------------------------------------------------------------
@ -299,10 +303,16 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, const wxString& title):
SetTitle( wintitle );
wxIcon myIcon;
myIcon.CopyFromBitmap( wxBitmap( EmbeddedImage<res_AppIcon>().Rescale( 32, 32 ) ) );
SetIcon( myIcon );
// Ideally the __WXMSW__ port should use the embedded IDI_ICON2 icon, because wxWidgets sucks and
// loses the transparency information when loading bitmaps into icons. But for some reason
// I cannot get it to work despite following various examples to the letter.
wxIconBundle bundle;
bundle.AddIcon( EmbeddedImage<res_AppIcon32>().GetIcon() );
bundle.AddIcon( EmbeddedImage<res_AppIcon64>().GetIcon() );
bundle.AddIcon( EmbeddedImage<res_AppIcon16>().GetIcon() );
SetIcons( bundle );
int m_statusbar_widths[] = { (int)(backsize.GetWidth()*0.73), (int)(backsize.GetWidth()*0.25) };
m_statusbar.SetStatusWidths(2, m_statusbar_widths);
m_statusbar.SetStatusText( L"The Status is Good!", 0);

View File

@ -262,6 +262,9 @@ namespace Panels
//
class GameFixesPanel: public BaseApplicableConfigPanel
{
protected:
wxCheckBox* m_checkbox[NUM_OF_GAME_FIXES];
public:
GameFixesPanel( wxWindow& parent, int idealWidth );
void Apply( AppConfig& conf );

View File

@ -17,7 +17,6 @@
#include "ConfigurationPanels.h"
using namespace wxHelpers;
static wxCheckBox* game_fix_checkbox[NUM_OF_GAME_FIXES];
Panels::GameFixesPanel::GameFixesPanel( wxWindow& parent, int idealWidth ) :
BaseApplicableConfigPanel( &parent, idealWidth)
@ -26,28 +25,53 @@ Panels::GameFixesPanel::GameFixesPanel( wxWindow& parent, int idealWidth ) :
AddStaticText( mainSizer, _("Some games need special settings.\nEnable them here.") );
wxStaticBoxSizer& groupSizer = *new wxStaticBoxSizer( wxVERTICAL, this, _("PCSX2 Gamefixes") );
game_fix_checkbox[0] = &AddCheckBox( groupSizer, _("VU Add Hack - for Tri-Ace games!"), wxEmptyString, _("Star Ocean 3, Radiata Stories and Valkyrie Profile 2 need this.") );
game_fix_checkbox[0]->SetValue(EmuConfig.Gamefixes.VuAddSubHack);
// NOTE: Oder of checkboxes must match the order of the bits in the GamefixOptions structure!
// NOTE2: Don't make this static, because translations can change at run-time :)
game_fix_checkbox[1] = &AddCheckBox( groupSizer, _( "VU Clip Flag Hack - Persona games. Only for SuperVU recompiler!") );
game_fix_checkbox[1]->SetValue(EmuConfig.Gamefixes.VuClipFlagHack);
game_fix_checkbox[2] = &AddCheckBox( groupSizer, _("FPU Compare Hack - for Digimon Rumble Arena 2.") );
game_fix_checkbox[2]->SetValue(EmuConfig.Gamefixes.FpuCompareHack);
struct CheckTextMess
{
wxString label, tooltip;
};
const CheckTextMess check_text[NUM_OF_GAME_FIXES] =
{
{
_("VU Add Hack - for Tri-Ace games!"),
_("Games that need this hack to boot:\n * Star Ocean 3\n * Radiata Stories\n * Valkyrie Profile 2")
},
{
_("VU Clip Flag Hack - for Persona games (SuperVU recompiler only!)"),
wxEmptyString
},
{
_("FPU Compare Hack - for Digimon Rumble Arena 2."),
wxEmptyString
},
{
_("FPU Multiply Hack - for Tales of Destiny."),
wxEmptyString
},
{
_("DMA Execution Hack - for Fatal Frame."),
wxEmptyString
},
{
_("VU XGkick Hack - for Erementar Gerad."),
wxEmptyString
},
{
_("MPEG Hack - for Mana Khemia 1."),
wxEmptyString
}
};
game_fix_checkbox[3] = &AddCheckBox( groupSizer, _("FPU Multiply Hack - for Tales of Destiny.") );
game_fix_checkbox[3]->SetValue(EmuConfig.Gamefixes.FpuMulHack);
game_fix_checkbox[4] = &AddCheckBox( groupSizer, _("DMA Execution Hack - for Fatal Frame.") );
game_fix_checkbox[4]->SetValue(EmuConfig.Gamefixes.DMAExeHack);
game_fix_checkbox[5] = &AddCheckBox( groupSizer, _("VU XGkick Hack - for Erementar Gerad.") );
game_fix_checkbox[5]->SetValue(EmuConfig.Gamefixes.XgKickHack);
// I may as well add this, since these aren't hooked in yet. If the consensus is against it,
// I'll remove it.
game_fix_checkbox[6] = &AddCheckBox( groupSizer, _("MPEG Hack - for Mana Khemia 1. Not working yet!") );
game_fix_checkbox[6]->SetValue(EmuConfig.Gamefixes.MpegHack);
const Pcsx2Config::GamefixOptions& opts( g_Conf->EmuOptions.Gamefixes );
for( int i=0; i<NUM_OF_GAME_FIXES; ++i )
{
m_checkbox[i] = &AddCheckBox( groupSizer, check_text[i].label, wxEmptyString, check_text[i].tooltip );
m_checkbox[i]->SetValue( !!(opts.bitset & (1 << i)) );
}
mainSizer.Add( &groupSizer, wxSizerFlags().Centre() );
@ -63,11 +87,12 @@ Panels::GameFixesPanel::GameFixesPanel( wxWindow& parent, int idealWidth ) :
// I could still probably get rid of the for loop, but I think this is clearer.
void Panels::GameFixesPanel::Apply( AppConfig& conf )
{
Pcsx2Config::GamefixOptions& opts( conf.EmuOptions.Gamefixes );
for (int i = 0; i < NUM_OF_GAME_FIXES; i++)
{
if (game_fix_checkbox[i]->GetValue())
EmuConfig.Gamefixes.bitset |= ( 1 << i);
if (m_checkbox[i]->GetValue())
opts.bitset |= (1 << i);
else
EmuConfig.Gamefixes.bitset &= ~( 1 << i);
opts.bitset &= ~(1 << i);
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 882 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

@ -98,6 +98,13 @@ public:
return m_Image;
}
wxIcon GetIcon()
{
wxIcon retval;
retval.CopyFromBitmap( Get() );
return retval;
}
// ------------------------------------------------------------------------
// Performs a pixel resize of the loaded image and returns a new image handle (EmbeddedImage
// is left unmodified). Useful for creating ugly versions of otherwise nice graphics. Do

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 KiB

After

Width:  |  Height:  |  Size: 137 KiB

View File

@ -2106,11 +2106,7 @@
Name="Resources"
>
<File
RelativePath="..\..\gui\Resources\AppIcon.ico"
>
</File>
<File
RelativePath="..\..\gui\Resources\AppIcon.png"
RelativePath="..\..\gui\Resources\AppIcon16.png"
>
<FileConfiguration
Name="Debug|Win32"
@ -2127,7 +2123,7 @@
>
<Tool
Name="VCCustomBuildTool"
Description="Compiling Bitmap Resource..."
Description=""
CommandLine="&quot;$(InputDir)\bin2cpp.cmd&quot; $(InputFileName)&#x0D;&#x0A;"
Outputs="&quot;$(InputDir)\$(InputName).h"
/>
@ -2137,7 +2133,75 @@
>
<Tool
Name="VCCustomBuildTool"
Description="Compiling Bitmap Resource..."
Description=""
CommandLine="&quot;$(InputDir)\bin2cpp.cmd&quot; $(InputFileName)&#x0D;&#x0A;"
Outputs="&quot;$(InputDir)\$(InputName).h"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\gui\Resources\AppIcon32.png"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCustomBuildTool"
Description=""
CommandLine="&quot;$(InputDir)\bin2cpp.cmd&quot; $(InputFileName)&#x0D;&#x0A;"
Outputs="&quot;$(InputDir)\$(InputName).h"
/>
</FileConfiguration>
<FileConfiguration
Name="Devel|Win32"
>
<Tool
Name="VCCustomBuildTool"
Description=""
CommandLine="&quot;$(InputDir)\bin2cpp.cmd&quot; $(InputFileName)&#x0D;&#x0A;"
Outputs="&quot;$(InputDir)\$(InputName).h"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCustomBuildTool"
Description=""
CommandLine="&quot;$(InputDir)\bin2cpp.cmd&quot; $(InputFileName)&#x0D;&#x0A;"
Outputs="&quot;$(InputDir)\$(InputName).h"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\gui\Resources\AppIcon64.png"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCustomBuildTool"
Description=""
CommandLine="&quot;$(InputDir)\bin2cpp.cmd&quot; $(InputFileName)&#x0D;&#x0A;"
Outputs="&quot;$(InputDir)\$(InputName).h"
/>
</FileConfiguration>
<FileConfiguration
Name="Devel|Win32"
>
<Tool
Name="VCCustomBuildTool"
Description=""
CommandLine="&quot;$(InputDir)\bin2cpp.cmd&quot; $(InputFileName)&#x0D;&#x0A;"
Outputs="&quot;$(InputDir)\$(InputName).h"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCustomBuildTool"
Description=""
CommandLine="&quot;$(InputDir)\bin2cpp.cmd&quot; $(InputFileName)&#x0D;&#x0A;"
Outputs="&quot;$(InputDir)\$(InputName).h"
/>

View File

@ -1,17 +1,17 @@
/* CDVDnull
* Copyright (C) 2002-2009 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
* Copyright (C) 2002-2009 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>

View File

@ -1,17 +1,17 @@
/* CDVDnull
* Copyright (C) 2002-2009 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
* Copyright (C) 2002-2009 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __CDVD_H__

View File

@ -1,17 +1,17 @@
/* DEV9null
* Copyright (C) 2002-2009 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
* Copyright (C) 2002-2009 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h>
#include <string.h>