improved code beauty :)

This commit is contained in:
spacy51 2008-10-25 15:41:42 +00:00
parent 217548de1e
commit 6a61496c93
3 changed files with 24 additions and 21 deletions

View File

@ -1,6 +1,7 @@
// VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator. // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator.
// Copyright (C) 1999-2003 Forgotten // 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 // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
// -*- C++ -*-
// VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator. // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator.
// Copyright (C) 1999-2003 Forgotten // 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 // 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 // it under the terms of the GNU General Public License as published by
@ -33,23 +33,25 @@ struct CheatsData {
char desc[32]; char desc[32];
}; };
extern void cheatsAdd(const char *,const char *,u32, u32,u32,int,int); void cheatsAdd(const char *codeStr, const char *desc, u32 rawaddress, u32 address, u32 value, int code, int size);
extern void cheatsAddCheatCode(const char *code, const char *desc); void cheatsAddCheatCode(const char *code, const char *desc);
extern void cheatsAddGSACode(const char *code, const char *desc, bool v3); void cheatsAddGSACode(const char *code, const char *desc, bool v3);
extern void cheatsAddCBACode(const char *code, const char *desc); void cheatsAddCBACode(const char *code, const char *desc);
extern bool cheatsImportGSACodeFile(const char *name, int game, bool v3); bool cheatsImportGSACodeFile(const char *name, int game, bool v3);
extern void cheatsDelete(int number, bool restore); void cheatsDelete(int number, bool restore);
extern void cheatsDeleteAll(bool restore); void cheatsDeleteAll(bool restore);
extern void cheatsEnable(int number); void cheatsEnable(int number);
extern void cheatsDisable(int number); void cheatsDisable(int number);
extern void cheatsSaveGame(gzFile file); void cheatsSaveGame(gzFile file);
extern void cheatsReadGame(gzFile file, int version); void cheatsReadGame(gzFile file, int version);
extern void cheatsSaveCheatList(const char *file); void cheatsSaveCheatList(const char *file);
extern bool cheatsLoadCheatList(const char *file); bool cheatsLoadCheatList(const char *file);
extern void cheatsWriteMemory(u32, u32); void cheatsWriteMemory(u32 address, u32 value);
extern void cheatsWriteHalfWord(u32, u16); void cheatsWriteHalfWord(u32 address, u16 value);
extern void cheatsWriteByte(u32, u8); void cheatsWriteByte(u32 address, u8 value);
extern int cheatsCheckKeys(u32,u32); int cheatsCheckKeys(u32 keys, u32 extended);
extern int cheatsNumber; extern int cheatsNumber;
extern CheatsData cheatsList[100]; extern CheatsData cheatsList[100];
#endif // GBA_CHEATS_H #endif // GBA_CHEATS_H

View File

@ -684,7 +684,7 @@ bool AddCheat::addCheat()
break; break;
} }
cheatsAdd(code, buffer, address ,address, value,-1, sizeType); cheatsAdd(code, buffer, address, address, value, -1, sizeType);
return true; return true;
} }
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////