1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-07-03 02:17:06 +00:00

Update Pad.cpp

This commit is contained in:
majestic 2020-06-05 14:20:29 -07:00
parent e2cc3e1a33
commit 66262b14ad

View file

@ -979,12 +979,12 @@ void CPad::AddToCheatString(char c)
} }
#endif #endif
int CheatComp(char* sourceStr, char* origCheatStr) int Cheat_strncmp(char* sourceStr, char* origCheatStr)
{ {
char cheatCodeVals[] = { 3,5,7,1,13,27,3,7,1,11,13,8,7,32,13,6,28,19,10,3,3,5,7,1,13,27,3,7 }; char cheatCodeVals[] = { 3,5,7,1,13,27,3,7,1,11,13,8,7,32,13,6,28,19,10,3,3,5,7,1,13,27,3,7 };
for (int32 i = 0; i < strlen(origCheatStr); i++) { for (int32 i = 0; i < strlen(origCheatStr); i++) {
if (sourceStr[i] != origCheatStr[i] - cheatCodeVals[i]) { if ((sourceStr[i] != origCheatStr[i] - cheatCodeVals[i]) || i >= 28) {
return 1; return 1;
} }
} }
@ -1001,77 +1001,94 @@ void CPad::AddToPCCheatString(char c)
#define _CHEATCMP(str) strncmp(str, KeyBoardCheatString, sizeof(str)-1) #define _CHEATCMP(str) strncmp(str, KeyBoardCheatString, sizeof(str)-1)
// "THUGSTOOLS" // "THUGSTOOLS"
if (!CheatComp(KeyBoardCheatString, "VQVPanJ\\I_")) if (!Cheat_strncmp(KeyBoardCheatString, "VQVPanJ\\I_")) {
KeyBoardCheatString[0] = ' ';
WeaponCheat1(); WeaponCheat1();
}
// "PROFESSIONALTOOLS" // "PROFESSIONALTOOLS"
if (!CheatComp(KeyBoardCheatString, "VQVPagDUPT`[Lf\\Xl")) else if (!Cheat_strncmp(KeyBoardCheatString, "VQVPagDUPT`[Lf\\Xl")) {
KeyBoardCheatString[0] = ' ';
WeaponCheat2(); WeaponCheat2();
}
// "NUTTERTOOLS" // "NUTTERTOOLS"
if (!CheatComp(KeyBoardCheatString, "VQVPamH[U`[")) else if (!Cheat_strncmp(KeyBoardCheatString, "VQVPamH[U`[")) {
KeyBoardCheatString[0] = ' ';
WeaponCheat3(); WeaponCheat3();
}
// "PRECIOUSPROTECTION" // "PRECIOUSPROTECTION"
if (!CheatComp(KeyBoardCheatString, "QTPUP`WVS[`]ViPKnc")) else if (!Cheat_strncmp(KeyBoardCheatString, "QTPUP`WVS[`]ViPKnc")) {
KeyBoardCheatString[0] = ' ';
ArmourCheat(); ArmourCheat();
}
// "ASPIRINE" // "ASPIRINE"
if (!CheatComp(KeyBoardCheatString, "HSPSVkVH")) else if (!Cheat_strncmp(KeyBoardCheatString, "HSPSVkVH")) {
KeyBoardCheatString[0] = ' ';
HealthCheat(); HealthCheat();
}
// "YOUWONTTAKEMEALIVE" // "YOUWONTTAKEMEALIVE"
if (!CheatComp(KeyBoardCheatString, "H[PMN`PLLLa\\Uod[kl")) else if (!Cheat_strncmp(KeyBoardCheatString, "H[PMN`PLLLa\\Uod[kl")) {
KeyBoardCheatString[0] = ' ';
WantedLevelUpCheat(); WantedLevelUpCheat();
}
// "LEAVEMEALONE" // "LEAVEMEALONE"
if (!CheatComp(KeyBoardCheatString, "HSVMN`PLWLRT")) else if (!Cheat_strncmp(KeyBoardCheatString, "HSVMN`PLWLRT")) {
KeyBoardCheatString[0] = ' ';
WantedLevelDownCheat(); WantedLevelDownCheat();
}
// "APLEASANTDAY" // "APLEASANTDAY"
if (!CheatComp(KeyBoardCheatString, "\\FKU[\\VHFW]I")) else if (!Cheat_strncmp(KeyBoardCheatString, "\\FKU[\\VHFW]I")) {
KeyBoardCheatString[0] = ' ';
CloudyWeatherCheat(); CloudyWeatherCheat();
}
// "ALOVELYDAY" // "ALOVELYDAY"
if (!CheatComp(KeyBoardCheatString, "\\FKZY`YVML")) else if (!Cheat_strncmp(KeyBoardCheatString, "\\FKZY`YVML")) {
KeyBoardCheatString[0] = ' ';
SunnyWeatherCheat(); SunnyWeatherCheat();
}
// "ABITDRIEG" // "ABITDRIEG"
// "CATSANDDOGS" // "CATSANDDOGS"
if (!CheatComp(KeyBoardCheatString, "VLVEQiDZULP")) else if (!Cheat_strncmp(KeyBoardCheatString, "VLVEQiDZULP")) {
KeyBoardCheatString[0] = ' ';
StormyWeatherCheat(); StormyWeatherCheat();
}
// "CANTSEEATHING" // "CANTSEEATHING"
if (!CheatComp(KeyBoardCheatString, "JSPIa\\HLT_[IJ")) else if (!Cheat_strncmp(KeyBoardCheatString, "JSPIa\\HLT_[IJ")) {
KeyBoardCheatString[0] = ' ';
FoggyWeatherCheat(); FoggyWeatherCheat();
}
// "PANZER" // "PANZER"
if (!CheatComp(KeyBoardCheatString, "UJaONk")) else if (!Cheat_strncmp(KeyBoardCheatString, "UJaONk")) {
KeyBoardCheatString[0] = ' ';
VehicleCheat(true, MI_RHINO); VehicleCheat(true, MI_RHINO);
}
// "LIFEISPASSINGMEBY" // "LIFEISPASSINGMEBY"
// "BIGBANG" // "BIGBANG"
if (!CheatComp(KeyBoardCheatString, "JSHCTdE")) else if (!Cheat_strncmp(KeyBoardCheatString, "JSHCTdE")) {
KeyBoardCheatString[0] = ' ';
BlowUpCarsCheat(); BlowUpCarsCheat();
}
// "STILLLIKEDRESSINGUP" // "STILLLIKEDRESSINGUP"
if (!CheatComp(KeyBoardCheatString, "SZNOVnVLSORSPlYReg]")) else if (!Cheat_strncmp(KeyBoardCheatString, "SZNOVnVLSORSPlYReg]")) {
KeyBoardCheatString[0] = ' ';
ChangePlayerCheat(); ChangePlayerCheat();
}
// "FIGHTFIGHTFIGHT" // "FIGHTFIGHTFIGHT"
if (!CheatComp(KeyBoardCheatString, "WMNJSoKNJQaPNiS")) else if (!Cheat_strncmp(KeyBoardCheatString, "WMNJSoKNJQaPNiS")) {
KeyBoardCheatString[0] = ' ';
MayhemCheat(); MayhemCheat();
}
// "NOBODYLIKESME" // "NOBODYLIKESME"
if (!CheatComp(KeyBoardCheatString, "HRZFXdO`EZOWU")) else if (!Cheat_strncmp(KeyBoardCheatString, "HRZFXdO`EZOWU")) {
KeyBoardCheatString[0] = ' ';
EverybodyAttacksPlayerCheat(); EverybodyAttacksPlayerCheat();
}
// "OURGODGIVENRIGHTTOBEARARMS" // "OURGODGIVENRIGHTTOBEARARMS"
if (!CheatComp(KeyBoardCheatString, "VRYB_\\HIP_aPNi_TaiSJGTNSbj")) else if (!Cheat_strncmp(KeyBoardCheatString, "VRYB_\\HIP_aPNi_TaiSJGTNSbj")) {
KeyBoardCheatString[0] = ' ';
WeaponsForAllCheat(); WeaponsForAllCheat();
}
// "TRAVELINSTYLE" // "TRAVELINSTYLE"
if (!_CHEATCMP("ELYTSNILEVART")) if (!_CHEATCMP("ELYTSNILEVART"))
VehicleCheat(true, MI_BLOODRA); VehicleCheat(true, MI_BLOODRA);