diff --git a/src/Cheats.cpp b/src/Cheats.cpp index 28f218ff..1e1aacc6 100644 --- a/src/Cheats.cpp +++ b/src/Cheats.cpp @@ -1,6 +1,7 @@ // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator. // Copyright (C) 1999-2003 Forgotten -// Copyright (C) 2005-2006 Forgotten and the VBA development team +// Copyright (C) 2005 Forgotten and the VBA development team +// Copyright (C) 2007-2008 VBA-M development team // 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 diff --git a/src/Cheats.h b/src/Cheats.h index ce966872..61445ae7 100644 --- a/src/Cheats.h +++ b/src/Cheats.h @@ -1,7 +1,7 @@ -// -*- C++ -*- // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator. // Copyright (C) 1999-2003 Forgotten -// Copyright (C) 2004-2006 Forgotten and the VBA development team +// Copyright (C) 2005 Forgotten and the VBA development team +// Copyright (C) 2007-2008 VBA-M development team // 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 @@ -33,23 +33,25 @@ struct CheatsData { char desc[32]; }; -extern void cheatsAdd(const char *,const char *,u32, u32,u32,int,int); -extern void cheatsAddCheatCode(const char *code, const char *desc); -extern void cheatsAddGSACode(const char *code, const char *desc, bool v3); -extern void cheatsAddCBACode(const char *code, const char *desc); -extern bool cheatsImportGSACodeFile(const char *name, int game, bool v3); -extern void cheatsDelete(int number, bool restore); -extern void cheatsDeleteAll(bool restore); -extern void cheatsEnable(int number); -extern void cheatsDisable(int number); -extern void cheatsSaveGame(gzFile file); -extern void cheatsReadGame(gzFile file, int version); -extern void cheatsSaveCheatList(const char *file); -extern bool cheatsLoadCheatList(const char *file); -extern void cheatsWriteMemory(u32, u32); -extern void cheatsWriteHalfWord(u32, u16); -extern void cheatsWriteByte(u32, u8); -extern int cheatsCheckKeys(u32,u32); +void cheatsAdd(const char *codeStr, const char *desc, u32 rawaddress, u32 address, u32 value, int code, int size); +void cheatsAddCheatCode(const char *code, const char *desc); +void cheatsAddGSACode(const char *code, const char *desc, bool v3); +void cheatsAddCBACode(const char *code, const char *desc); +bool cheatsImportGSACodeFile(const char *name, int game, bool v3); +void cheatsDelete(int number, bool restore); +void cheatsDeleteAll(bool restore); +void cheatsEnable(int number); +void cheatsDisable(int number); +void cheatsSaveGame(gzFile file); +void cheatsReadGame(gzFile file, int version); +void cheatsSaveCheatList(const char *file); +bool cheatsLoadCheatList(const char *file); +void cheatsWriteMemory(u32 address, u32 value); +void cheatsWriteHalfWord(u32 address, u16 value); +void cheatsWriteByte(u32 address, u8 value); +int cheatsCheckKeys(u32 keys, u32 extended); + extern int cheatsNumber; extern CheatsData cheatsList[100]; + #endif // GBA_CHEATS_H diff --git a/src/win32/GBACheats.cpp b/src/win32/GBACheats.cpp index 70588427..b6b3fc04 100644 --- a/src/win32/GBACheats.cpp +++ b/src/win32/GBACheats.cpp @@ -684,7 +684,7 @@ bool AddCheat::addCheat() break; } - cheatsAdd(code, buffer, address ,address, value,-1, sizeType); + cheatsAdd(code, buffer, address, address, value, -1, sizeType); return true; } /////////////////////////////////////////////////////////////////////////////