mirror of https://github.com/PCSX2/pcsx2.git
Fixed the database reader in Linux again (by moving the check into a better location). Got rid of some unused Patch code.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3013 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
00f7cde4e0
commit
427206a97c
|
@ -23,9 +23,11 @@ struct key_pair {
|
||||||
: key(_key) , value(_value) {}
|
: key(_key) , value(_value) {}
|
||||||
string toString() {
|
string toString() {
|
||||||
string t;
|
string t;
|
||||||
|
|
||||||
if (key[0] == '[') {
|
if (key[0] == '[') {
|
||||||
t = key + "\n";
|
t = key + "\n";
|
||||||
t += value;
|
t += value;
|
||||||
|
|
||||||
stringstream ss(key);
|
stringstream ss(key);
|
||||||
string t2;
|
string t2;
|
||||||
ss >> t2;
|
ss >> t2;
|
||||||
|
@ -93,14 +95,14 @@ private:
|
||||||
}
|
}
|
||||||
for(;;) {
|
for(;;) {
|
||||||
t = reader.getLine();
|
t = reader.getLine();
|
||||||
|
int eol = t.rfind("\r");
|
||||||
|
if (eol != string::npos) t = t.substr(0, eol);
|
||||||
|
|
||||||
if (!t.compare(endString)) break;
|
if (!t.compare(endString)) break;
|
||||||
keyPair.value += t + "\n";
|
keyPair.value += t + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void extract(string& line, key_pair& keyPair, File_Reader& reader) {
|
void extract(string& line, key_pair& keyPair, File_Reader& reader) {
|
||||||
int eol = line.rfind("\r");
|
|
||||||
if (eol != string::npos) line = line.substr(0, eol);
|
|
||||||
|
|
||||||
stringstream ss(line);
|
stringstream ss(line);
|
||||||
string t;
|
string t;
|
||||||
keyPair.key = "";
|
keyPair.key = "";
|
||||||
|
|
|
@ -62,7 +62,12 @@ public:
|
||||||
if (fs->eof()) throw 1;
|
if (fs->eof()) throw 1;
|
||||||
fs->getline(buff, sizeof(buff));
|
fs->getline(buff, sizeof(buff));
|
||||||
if (fs->fail()) throw 1;
|
if (fs->fail()) throw 1;
|
||||||
return string(buff);
|
|
||||||
|
string ret(buff);
|
||||||
|
int eol = ret.rfind("\r");
|
||||||
|
if (eol != string::npos) ret = ret.substr(0, eol);
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
template<class T> void readLine(T& str) {
|
template<class T> void readLine(T& str) {
|
||||||
if (fs->eof()) throw 1;
|
if (fs->eof()) throw 1;
|
||||||
|
|
|
@ -27,7 +27,7 @@ u32 SkipCount = 0, IterationCount = 0;
|
||||||
u32 IterationIncrement = 0, ValueIncrement = 0;
|
u32 IterationIncrement = 0, ValueIncrement = 0;
|
||||||
u32 PrevCheatType = 0, PrevCheatAddr = 0,LastType = 0;
|
u32 PrevCheatType = 0, PrevCheatAddr = 0,LastType = 0;
|
||||||
|
|
||||||
int g_ZeroGSOptions = 0, patchnumber;
|
int patchnumber;
|
||||||
|
|
||||||
wxString strgametitle;
|
wxString strgametitle;
|
||||||
|
|
||||||
|
@ -43,17 +43,11 @@ static const PatchTextTable commands[] =
|
||||||
{ 1, L"comment", PatchFunc::comment },
|
{ 1, L"comment", PatchFunc::comment },
|
||||||
{ 2, L"gametitle", PatchFunc::gametitle },
|
{ 2, L"gametitle", PatchFunc::gametitle },
|
||||||
{ 3, L"patch", PatchFunc::patch },
|
{ 3, L"patch", PatchFunc::patch },
|
||||||
{ 4, L"fastmemory", NULL }, // enable for faster but bugger mem (mvc2 is faster)
|
{ 4, L"roundmode", PatchFunc::roundmode }, // changes rounding mode for floating point
|
||||||
{ 5, L"roundmode", PatchFunc::roundmode }, // changes rounding mode for floating point
|
|
||||||
// syntax: roundmode=X,Y
|
// syntax: roundmode=X,Y
|
||||||
// possible values for X,Y: NEAR, DOWN, UP, CHOP
|
// possible values for X,Y: NEAR, DOWN, UP, CHOP
|
||||||
// X - EE rounding mode (default is NEAR)
|
// X - EE rounding mode (default is NEAR)
|
||||||
// Y - VU rounding mode (default is CHOP)
|
// Y - VU rounding mode (default is CHOP)
|
||||||
{ 6, L"zerogs", PatchFunc::zerogs }, // zerogs=hex
|
|
||||||
{ 7, L"vunanmode", NULL },
|
|
||||||
{ 8, L"ffxhack", NULL}, // *obsolete*
|
|
||||||
{ 9, L"xkickdelay", NULL},
|
|
||||||
|
|
||||||
{ 0, wxEmptyString, NULL } // Array Terminator
|
{ 0, wxEmptyString, NULL } // Array Terminator
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -724,12 +718,6 @@ namespace PatchFunc
|
||||||
|
|
||||||
SetRoundMode(eetype,vutype);
|
SetRoundMode(eetype,vutype);
|
||||||
}
|
}
|
||||||
|
|
||||||
void zerogs(const wxString& cmd, const wxString& param)
|
|
||||||
{
|
|
||||||
DevCon.WriteLn( cmd + L" " + param);
|
|
||||||
g_ZeroGSOptions = StrToU32(param, 16);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintRoundMode(SSE_RoundMode ee, SSE_RoundMode vu)
|
void PrintRoundMode(SSE_RoundMode ee, SSE_RoundMode vu)
|
||||||
|
|
|
@ -53,7 +53,6 @@ namespace PatchFunc
|
||||||
PATCHTABLEFUNC gametitle;
|
PATCHTABLEFUNC gametitle;
|
||||||
PATCHTABLEFUNC patch;
|
PATCHTABLEFUNC patch;
|
||||||
PATCHTABLEFUNC roundmode;
|
PATCHTABLEFUNC roundmode;
|
||||||
PATCHTABLEFUNC zerogs;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void inifile_read( const wxString& name );
|
void inifile_read( const wxString& name );
|
||||||
|
@ -65,8 +64,6 @@ int AddPatch(int Mode, int Place, int Address, int Size, u64 data);
|
||||||
void ApplyPatch( int place = 1);
|
void ApplyPatch( int place = 1);
|
||||||
void ResetPatch( void );
|
void ResetPatch( void );
|
||||||
|
|
||||||
extern int g_ZeroGSOptions;
|
|
||||||
|
|
||||||
void SetRoundMode(SSE_RoundMode ee, SSE_RoundMode vu);
|
void SetRoundMode(SSE_RoundMode ee, SSE_RoundMode vu);
|
||||||
|
|
||||||
#endif /* __PATCH_H__ */
|
#endif /* __PATCH_H__ */
|
||||||
|
|
Loading…
Reference in New Issue