From 0b112b5ef46bbff0be6839c46e931fa8a512b41e Mon Sep 17 00:00:00 2001 From: adelikat Date: Thu, 15 May 2008 15:58:57 +0000 Subject: [PATCH] --- src/cheat.cpp | 72 ++++++++++++++++++++++++++++++++------ src/drivers/win/cheat.cpp | 2 +- src/drivers/win/res.rc | Bin 145636 -> 145788 bytes 3 files changed, 63 insertions(+), 11 deletions(-) diff --git a/src/cheat.cpp b/src/cheat.cpp index 5f56b7e3..6160a3e4 100644 --- a/src/cheat.cpp +++ b/src/cheat.cpp @@ -781,7 +781,7 @@ void FCEUI_CheatSearchEnd(int type, uint8 v1, uint8 v2) } - if(!type) // Change to a specific value. +if(!type) // Change to a specific value. { for(x=0;x<0x10000;x++) if(!(CheatComp[x]&CHEATC_NOSHOW)) @@ -822,7 +822,7 @@ void FCEUI_CheatSearchEnd(int type, uint8 v1, uint8 v2) } else if(type==3) // Any change. { - for(x=0;x<0x10000;x++) + for(x=0x000;x<0x10000;x++) if(!(CheatComp[x]&CHEATC_NOSHOW)) { if(CheatComp[x]!=CheatRPtrs[x>>10][x]) @@ -832,25 +832,77 @@ void FCEUI_CheatSearchEnd(int type, uint8 v1, uint8 v2) else CheatComp[x]|=CHEATC_EXCLUDED; } + } - else if(type==4) // Value decreased. + else if(type==4) // new value = known { - for(x=0;x<0x10000;x++) + for(x=0x000;x<0x10000;x++) if(!(CheatComp[x]&CHEATC_NOSHOW)) { - if(!(CheatRPtrs[x>>10][x]>10][x]==v1) + { + + } + else CheatComp[x]|=CHEATC_EXCLUDED; } + } - else if(type==5) // Value increased. + else if(type==5) // new value greater than { - for(x=0;x<0x10000;x++) + for(x=0x000;x<0x10000;x++) if(!(CheatComp[x]&CHEATC_NOSHOW)) { - if(!(CheatRPtrs[x>>10][x]>CheatComp[x])) + if(CheatComp[x]>10][x]) + { + + } + else CheatComp[x]|=CHEATC_EXCLUDED; } + + } + else if(type==6) // new value less than + { + for(x=0x000;x<0x10000;x++) + if(!(CheatComp[x]&CHEATC_NOSHOW)) + { + if(CheatComp[x]>CheatRPtrs[x>>10][x]) + { + + } + else + CheatComp[x]|=CHEATC_EXCLUDED; + } + + } + else if(type==7) // new value greater than by known value + { + for(x=0x000;x<0x10000;x++) + if(!(CheatComp[x]&CHEATC_NOSHOW)) + { + if((CheatRPtrs[x>>10][x]-CheatComp[x])==v2) + { + + } + else + CheatComp[x]|=CHEATC_EXCLUDED; + } + + } + else if(type==8) // new value less than by known value + { + for(x=0x000;x<0x10000;x++) + if(!(CheatComp[x]&CHEATC_NOSHOW)) + { + if((CheatComp[x]-CheatRPtrs[x>>10][x])==v2) + { + + } + else + CheatComp[x]|=CHEATC_EXCLUDED; + } + } - if(type>4) - FCEUI_CheatSearchSetCurrentAsOriginal(); } + diff --git a/src/drivers/win/cheat.cpp b/src/drivers/win/cheat.cpp index 8986f601..5c31b60e 100644 --- a/src/drivers/win/cheat.cpp +++ b/src/drivers/win/cheat.cpp @@ -417,7 +417,7 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l GetDlgItemText(hwndDlg,110,str,3); FCEUI_CheatSearchEnd(8,0,StrToU8(str)); } - else FCEUI_CheatSearchEnd(6,0,0); + else FCEUI_CheatSearchEnd(6,0,0); ShowResults(hwndDlg); break; } diff --git a/src/drivers/win/res.rc b/src/drivers/win/res.rc index 2f918442b8df484df08170151881687c0f6ecc03..72fc2cfe977fb5c6c23c198843b3adf84288469c 100644 GIT binary patch delta 92 zcmaFzk>k%Nj)pCaJf9~&3zwKK@|iIN$Pk;J2VqETKlPcBhkLrhG)9i;4`wkcacVGl rFr+e6FlbJG7%nYn#9+i=#-PJs%wPf}4H+!AC%#}zW!!4Sw8;Vh$z>mh delta 54 zcmezKiQ~yfj)pCaJfEi*tY_qyuJV~NgjtutaC-M=#&8g0``6Emg4~nM-1w%S<73*i JRgcNf5&&)-6lDMa