From ec3e07d6a80afe5be1337caaf12f7360e07ca003 Mon Sep 17 00:00:00 2001 From: spacy51 Date: Mon, 27 Oct 2008 18:23:21 +0000 Subject: [PATCH] even more beautiful code --- src/CheatSearch.h | 26 +++++++++--------- src/Cheats.h | 6 ++-- src/EEprom.cpp | 1 - src/EEprom.h | 6 ++-- src/Flash.h | 7 +++-- src/Globals.h | 6 ++-- src/Patch.h | 6 ++-- src/Port.h | 6 ++-- src/RTC.h | 21 +++++++------- src/Sound.h | 8 +++--- src/Sram.h | 12 ++++---- src/System.h | 6 ++-- src/Util.h | 61 ++++++++++++++++++++--------------------- src/agb/GBA.h | 6 ++-- src/agb/GBAGfx.h | 6 ++-- src/agb/GBALink.h | 6 ++-- src/agb/GBAcpu.h | 6 ++-- src/agb/GBAinline.h | 2 +- src/agb/agbprint.h | 18 ++++++------ src/bios.h | 7 +++-- src/dmg/gb.h | 6 ++-- src/dmg/gbCheats.h | 6 ++-- src/dmg/gbGlobals.h | 5 ++++ src/dmg/gbMemory.h | 7 +++-- src/dmg/gbSGB.h | 5 +++- src/dmg/gbSound.h | 10 +++---- src/elf.h | 7 +++-- src/memgzio.h | 15 ++++++---- src/win32/Input.h | 6 ++-- src/win32/LinkOptions.h | 10 ------- src/win32/Sound.h | 5 +--- src/win32/glfont.h | 2 ++ src/win32/gzglfont.h | 3 +- src/win32/protect.h | 5 +--- src/win32/rpi.h | 2 ++ 35 files changed, 159 insertions(+), 158 deletions(-) diff --git a/src/CheatSearch.h b/src/CheatSearch.h index fcf07f91..dc9d9e09 100644 --- a/src/CheatSearch.h +++ b/src/CheatSearch.h @@ -1,5 +1,5 @@ -#ifndef VBA_CHEATSEARCH_H -#define VBA_CHEATSEARCH_H +#ifndef CHEATSEARCH_H +#define CHEATSEARCH_H #include "System.h" @@ -41,14 +41,14 @@ enum { (bits)[(off) >> 3] & (1 << ((off) & 7)) extern CheatSearchData cheatSearchData; -extern void cheatSearchCleanup(CheatSearchData *cs); -extern void cheatSearchStart(const CheatSearchData *cs); -extern void cheatSearch(const CheatSearchData *cs, int compare, int size, - bool isSigned); -extern void cheatSearchValue(const CheatSearchData *cs, int compare, int size, - bool isSigned, u32 value); -extern int cheatSearchGetCount(const CheatSearchData *cs, int size); -extern void cheatSearchUpdateValues(const CheatSearchData *cs); -extern s32 cheatSearchSignedRead(u8 *data, int off, int size); -extern u32 cheatSearchRead(u8 *data, int off, int size); -#endif + +void cheatSearchCleanup(CheatSearchData *cs); +void cheatSearchStart(const CheatSearchData *cs); +void cheatSearch(const CheatSearchData *cs, int compare, int size, bool isSigned); +void cheatSearchValue(const CheatSearchData *cs, int compare, int size, bool isSigned, u32 value); +int cheatSearchGetCount(const CheatSearchData *cs, int size); +void cheatSearchUpdateValues(const CheatSearchData *cs); +s32 cheatSearchSignedRead(u8 *data, int off, int size); +u32 cheatSearchRead(u8 *data, int off, int size); + +#endif // CHEATSEARCH_H diff --git a/src/Cheats.h b/src/Cheats.h index 280e6dd5..3f99783c 100644 --- a/src/Cheats.h +++ b/src/Cheats.h @@ -1,5 +1,5 @@ -#ifndef GBA_CHEATS_H -#define GBA_CHEATS_H +#ifndef CHEATS_H +#define CHEATS_H struct CheatsData { int code; @@ -35,4 +35,4 @@ int cheatsCheckKeys(u32 keys, u32 extended); extern int cheatsNumber; extern CheatsData cheatsList[100]; -#endif // GBA_CHEATS_H +#endif // CHEATS_H diff --git a/src/EEprom.cpp b/src/EEprom.cpp index 40dee1b7..0bc581d9 100644 --- a/src/EEprom.cpp +++ b/src/EEprom.cpp @@ -185,4 +185,3 @@ void eepromWrite(u32 /* address */, u8 value) break; } } - diff --git a/src/EEprom.h b/src/EEprom.h index 6eb9326b..ac20caa7 100644 --- a/src/EEprom.h +++ b/src/EEprom.h @@ -1,5 +1,5 @@ -#ifndef VBA_EEPROM_H -#define VBA_EEPROM_H +#ifndef EEPROM_H +#define EEPROM_H extern void eepromSaveGame(gzFile _gzFile); extern void eepromReadGame(gzFile _gzFile, int version); @@ -18,4 +18,4 @@ extern int eepromSize; #define EEPROM_READDATA2 3 #define EEPROM_WRITEDATA 4 -#endif // VBA_EEPROM_H +#endif // EEPROM_H diff --git a/src/Flash.h b/src/Flash.h index 8c0226c8..51f801aa 100644 --- a/src/Flash.h +++ b/src/Flash.h @@ -1,5 +1,5 @@ -#ifndef VBA_FLASH_H -#define VBA_FLASH_H +#ifndef FLASH_H +#define FLASH_H extern void flashSaveGame(gzFile _gzFile); extern void flashReadGame(gzFile _gzFile, int version); @@ -14,4 +14,5 @@ extern void flashSetSize(int size); extern void flashInit(); extern int flashSize; -#endif // VBA_FLASH_H + +#endif // FLASH_H diff --git a/src/Globals.h b/src/Globals.h index 19bde5c9..aba86969 100644 --- a/src/Globals.h +++ b/src/Globals.h @@ -1,5 +1,5 @@ -#ifndef VBA_GLOBALS_H -#define VBA_GLOBALS_H +#ifndef GLOBALS_H +#define GLOBALS_H #include "agb/GBA.h" @@ -132,4 +132,4 @@ extern u16 IE; extern u16 IF; extern u16 IME; -#endif // VBA_GLOBALS_H +#endif // GLOBALS_H diff --git a/src/Patch.h b/src/Patch.h index 287438be..9e409275 100644 --- a/src/Patch.h +++ b/src/Patch.h @@ -1,8 +1,8 @@ -#ifndef VBA_PATCH_H -#define VBA_PATCH_H +#ifndef PATCH_H +#define PATCH_H #include "System.h" bool applyPatch(const char *patchname, u8 **rom, int *size); -#endif +#endif // PATCH_H diff --git a/src/Port.h b/src/Port.h index 65c624fc..081ead62 100644 --- a/src/Port.h +++ b/src/Port.h @@ -1,5 +1,5 @@ -#ifndef VBA_PORT_H -#define VBA_PORT_H +#ifndef PORT_H +#define PORT_H // swaps a 16-bit value static inline u16 swap16(u16 v) @@ -53,4 +53,4 @@ static inline u32 swap32(u32 v) *((u32 *)x) = (v) #endif -#endif +#endif // PORT_H diff --git a/src/RTC.h b/src/RTC.h index 28c2a64e..8bedd68e 100644 --- a/src/RTC.h +++ b/src/RTC.h @@ -1,12 +1,13 @@ -#ifndef VBA_RTC_H -#define VBA_RTC_H -extern u16 rtcRead(u32 address); -extern bool rtcWrite(u32 address, u16 value); -extern void rtcEnable(bool); -extern bool rtcIsEnabled(); -extern void rtcReset(); +#ifndef RTC_H +#define RTC_H -extern void rtcReadGame(gzFile gzFile); -extern void rtcSaveGame(gzFile gzFile); +u16 rtcRead(u32 address); +bool rtcWrite(u32 address, u16 value); +void rtcEnable(bool); +bool rtcIsEnabled(); +void rtcReset(); -#endif +void rtcReadGame(gzFile gzFile); +void rtcSaveGame(gzFile gzFile); + +#endif // RTC_H diff --git a/src/Sound.h b/src/Sound.h index a4a64c96..94a1319c 100644 --- a/src/Sound.h +++ b/src/Sound.h @@ -1,7 +1,7 @@ -// Sound emulation setup/options and GBA sound emulation +#ifndef SOUND_H +#define SOUND_H -#ifndef VBA_SOUND_H -#define VBA_SOUND_H +// Sound emulation setup/options and GBA sound emulation #include "System.h" @@ -80,4 +80,4 @@ extern int soundTicks; // Number of 16.8 MHz clocks until soundTick() w void soundSaveGame( gzFile ); void soundReadGame( gzFile, int version ); -#endif // VBA_SOUND_H +#endif // SOUND_H diff --git a/src/Sram.h b/src/Sram.h index df2567e5..fdc9aa01 100644 --- a/src/Sram.h +++ b/src/Sram.h @@ -1,8 +1,8 @@ -#ifndef VBA_SRAM_H -#define VBA_SRAM_H +#ifndef SRAM_H +#define SRAM_H -extern u8 sramRead(u32 address); -extern void sramWrite(u32 address, u8 byte); -extern void sramDelayedWrite(u32 address, u8 byte); +u8 sramRead(u32 address); +void sramWrite(u32 address, u8 byte); +void sramDelayedWrite(u32 address, u8 byte); -#endif // VBA_SRAM_H +#endif // SRAM_H diff --git a/src/System.h b/src/System.h index a9a31fb3..28d72e36 100644 --- a/src/System.h +++ b/src/System.h @@ -1,5 +1,5 @@ -#ifndef VBA_SYSTEM_H -#define VBA_SYSTEM_H +#ifndef SYSTEM_H +#define SYSTEM_H #include @@ -107,4 +107,4 @@ extern int systemThrottle; #define SYSTEM_SAVE_UPDATED 30 #define SYSTEM_SAVE_NOT_UPDATED 0 -#endif //VBA_SYSTEM_H +#endif // SYSTEM_H diff --git a/src/Util.h b/src/Util.h index 77cebce0..ca367e68 100644 --- a/src/Util.h +++ b/src/Util.h @@ -1,5 +1,5 @@ -#ifndef VBA_UTIL_H -#define VBA_UTIL_H +#ifndef UTIL_H +#define UTIL_H #include "System.h" @@ -10,39 +10,36 @@ enum IMAGE_TYPE { }; // save game - typedef struct { void *address; int size; } variable_desc; -extern bool utilWritePNGFile(const char *, int, int, u8 *); -extern bool utilWriteBMPFile(const char *, int, int, u8 *); -extern void utilApplyIPS(const char *ips, u8 **rom, int *size); -extern bool utilIsGBAImage(const char *); -extern bool utilIsGBImage(const char *); -extern bool utilIsGzipFile(const char *); -extern void utilStripDoubleExtension(const char *, char *); -extern IMAGE_TYPE utilFindType(const char *); -extern u8 *utilLoad(const char *, - bool (*)(const char*), - u8 *, - int &); +bool utilWritePNGFile(const char *, int, int, u8 *); +bool utilWriteBMPFile(const char *, int, int, u8 *); +void utilApplyIPS(const char *ips, u8 **rom, int *size); +bool utilIsGBAImage(const char *); +bool utilIsGBImage(const char *); +bool utilIsGzipFile(const char *); +void utilStripDoubleExtension(const char *, char *); +IMAGE_TYPE utilFindType(const char *); +u8 *utilLoad(const char *, bool (*)(const char*), u8 *, int &); -extern void utilPutDword(u8 *, u32); -extern void utilPutWord(u8 *, u16); -extern void utilWriteData(gzFile, variable_desc *); -extern void utilReadData(gzFile, variable_desc *); -extern void utilReadDataSkip(gzFile, variable_desc *); -extern int utilReadInt(gzFile); -extern void utilWriteInt(gzFile, int); -extern gzFile utilGzOpen(const char *file, const char *mode); -extern gzFile utilMemGzOpen(char *memory, int available, const char *mode); -extern int utilGzWrite(gzFile file, const voidp buffer, unsigned int len); -extern int utilGzRead(gzFile file, voidp buffer, unsigned int len); -extern int utilGzClose(gzFile file); -extern z_off_t utilGzSeek(gzFile file, z_off_t offset, int whence); -extern long utilGzMemTell(gzFile file); -extern void utilGBAFindSave(const u8 *, const int); -extern void utilUpdateSystemColorMaps(); -#endif +void utilPutDword(u8 *, u32); +void utilPutWord(u8 *, u16); +void utilWriteData(gzFile, variable_desc *); +void utilReadData(gzFile, variable_desc *); +void utilReadDataSkip(gzFile, variable_desc *); +int utilReadInt(gzFile); +void utilWriteInt(gzFile, int); +gzFile utilGzOpen(const char *file, const char *mode); +gzFile utilMemGzOpen(char *memory, int available, const char *mode); +int utilGzWrite(gzFile file, const voidp buffer, unsigned int len); +int utilGzRead(gzFile file, voidp buffer, unsigned int len); +int utilGzClose(gzFile file); +z_off_t utilGzSeek(gzFile file, z_off_t offset, int whence); +long utilGzMemTell(gzFile file); +void utilGBAFindSave(const u8 *, const int); +void utilUpdateSystemColorMaps(); + +#endif // UTIL_H diff --git a/src/agb/GBA.h b/src/agb/GBA.h index 1e696e29..e4a0e111 100644 --- a/src/agb/GBA.h +++ b/src/agb/GBA.h @@ -1,5 +1,5 @@ -#ifndef VBA_GBA_H -#define VBA_GBA_H +#ifndef GBA_H +#define GBA_H #include "../System.h" @@ -138,4 +138,4 @@ extern struct EmulatedSystem GBASystem; #include "../EEprom.h" #include "../Flash.h" -#endif //VBA_GBA_H +#endif // GBA_H diff --git a/src/agb/GBAGfx.h b/src/agb/GBAGfx.h index cbb1f328..647a89dd 100644 --- a/src/agb/GBAGfx.h +++ b/src/agb/GBAGfx.h @@ -1,5 +1,5 @@ -#ifndef VBA_GFX_H -#define VBA_GFX_H +#ifndef GFX_H +#define GFX_H #include "GBA.h" #include "../Globals.h" @@ -1578,4 +1578,4 @@ static inline void gfxAlphaBlend(u32 *ta, u32 *tb, int ca, int cb) } } -#endif // VBA_GFX_H +#endif // GFX_H diff --git a/src/agb/GBALink.h b/src/agb/GBALink.h index 08c1bc7c..60b59f07 100644 --- a/src/agb/GBALink.h +++ b/src/agb/GBALink.h @@ -1,7 +1,7 @@ +#pragma once + #include -#ifndef LINKH -#define LINKH #define LINK_PARENTLOST 0x80 #define UNSUPPORTED -1 #define MULTIPLAYER 0 @@ -102,5 +102,3 @@ extern bool linkenable; extern int linktimeout; extern lclient lc; extern int linkid; - -#endif diff --git a/src/agb/GBAcpu.h b/src/agb/GBAcpu.h index 28325cd3..c21597cb 100644 --- a/src/agb/GBAcpu.h +++ b/src/agb/GBAcpu.h @@ -1,5 +1,5 @@ -#ifndef VBA_GBAcpu_H -#define VBA_GBAcpu_H +#ifndef GBACPU_H +#define GBACPU_H extern int armExecute(); extern int thumbExecute(); @@ -280,4 +280,4 @@ inline void cpuMasterCodeCheck() } } -#endif //VBA_GBAcpu_H +#endif // GBACPU_H diff --git a/src/agb/GBAinline.h b/src/agb/GBAinline.h index 7f632365..e5bb9ad0 100644 --- a/src/agb/GBAinline.h +++ b/src/agb/GBAinline.h @@ -714,4 +714,4 @@ unwritable: } } -#endif //GBAINLINE_H +#endif // GBAINLINE_H diff --git a/src/agb/agbprint.h b/src/agb/agbprint.h index 28a20f3f..43c323fb 100644 --- a/src/agb/agbprint.h +++ b/src/agb/agbprint.h @@ -1,8 +1,10 @@ -#ifndef VBA_AGBPRINT_H -#define VBA_AGBPRINT_H -extern void agbPrintEnable(bool); -extern bool agbPrintIsEnabled(); -extern void agbPrintReset(); -extern bool agbPrintWrite(u32, u16); -extern void agbPrintFlush(); -#endif +#ifndef AGBPRINT_H +#define AGBPRINT_H + +void agbPrintEnable(bool enable); +bool agbPrintIsEnabled(); +void agbPrintReset(); +bool agbPrintWrite(u32 address, u16 value); +void agbPrintFlush(); + +#endif // AGBPRINT_H diff --git a/src/bios.h b/src/bios.h index 49c7a194..68495cf4 100644 --- a/src/bios.h +++ b/src/bios.h @@ -1,5 +1,5 @@ -#ifndef VBA_BIOS_H -#define VBA_BIOS_H +#ifndef BIOS_H +#define BIOS_H extern void BIOS_ArcTan(); extern void BIOS_ArcTan2(); @@ -25,4 +25,5 @@ extern void BIOS_SoftReset(); extern void BIOS_Sqrt(); extern void BIOS_MidiKey2Freq(); extern void BIOS_SndDriverJmpTableCopy(); -#endif // VBA_BIOS_H + +#endif // BIOS_H diff --git a/src/dmg/gb.h b/src/dmg/gb.h index 506e01a3..c031099e 100644 --- a/src/dmg/gb.h +++ b/src/dmg/gb.h @@ -1,5 +1,5 @@ -#ifndef VBA_GB_GB_H -#define VBA_GB_GB_H +#ifndef GB_H +#define GB_H #define C_FLAG 0x10 #define H_FLAG 0x20 @@ -40,4 +40,4 @@ bool gbReadGSASnapshot(const char *); extern struct EmulatedSystem GBSystem; -#endif +#endif // GB_H diff --git a/src/dmg/gbCheats.h b/src/dmg/gbCheats.h index c176746e..08491e15 100644 --- a/src/dmg/gbCheats.h +++ b/src/dmg/gbCheats.h @@ -1,5 +1,5 @@ -#ifndef __VBA_GB_GBCHEATS_H -#define __VBA_GB_GBCHEATS_H +#ifndef GBCHEATS_H +#define GBCHEATS_H #include "../System.h" @@ -39,5 +39,5 @@ bool gbVerifyGgCode(const char *code); extern int gbCheatNumber; extern gbCheat gbCheatList[100]; extern bool gbCheatMap[0x10000]; -#endif +#endif // GBCHEATS_H diff --git a/src/dmg/gbGlobals.h b/src/dmg/gbGlobals.h index aa05785d..03023674 100644 --- a/src/dmg/gbGlobals.h +++ b/src/dmg/gbGlobals.h @@ -1,3 +1,6 @@ +#ifndef GBGLOBALS_H +#define GBGLOBALS_H + extern int gbRomSizeMask; extern int gbRomSize; extern int gbRamSize; @@ -69,3 +72,5 @@ extern void gbRenderLine(); extern void gbDrawSprites(bool); extern u8 (*gbSerialFunction)(u8); + +#endif // GBGLOBALS_H diff --git a/src/dmg/gbMemory.h b/src/dmg/gbMemory.h index 959aab84..7c35c48c 100644 --- a/src/dmg/gbMemory.h +++ b/src/dmg/gbMemory.h @@ -1,3 +1,6 @@ +#ifndef GBMEMORY_H +#define GBMEMORY_H + #include struct mapperMBC1 { @@ -182,6 +185,4 @@ extern void memoryUpdateMapTAMA5(); extern void memoryUpdateMapMMM01(); extern void memoryUpdateMapGS3(); - - - +#endif // GBMEMORY_H diff --git a/src/dmg/gbSGB.h b/src/dmg/gbSGB.h index d9e64d8f..00ccbdb9 100644 --- a/src/dmg/gbSGB.h +++ b/src/dmg/gbSGB.h @@ -1,3 +1,6 @@ +#ifndef GBSGB_H +#define GBSGB_H + void gbSgbInit(); void gbSgbShutdown(); void gbSgbCommand(); @@ -17,4 +20,4 @@ extern int gbSgbPacketTimeout; extern u8 gbSgbReadingController; extern int gbSgbFourPlayers; - +#endif // GBSGB_H diff --git a/src/dmg/gbSound.h b/src/dmg/gbSound.h index 44b7d1db..5e059c4b 100644 --- a/src/dmg/gbSound.h +++ b/src/dmg/gbSound.h @@ -1,7 +1,7 @@ -// GB sound emulation +#ifndef GBSOUND_H +#define GBSOUND_H -#ifndef VBA_GBSOUND_H -#define VBA_GBSOUND_H +// GB sound emulation // See Sound.h for sound setup/options @@ -64,7 +64,7 @@ void gbSoundEvent( u16 address, int data ); #define SOUND_EVENT gbSoundEvent // Emulates read from sound hardware -u8 gbSoundRead( u16 address ); +u8 gbSoundRead( u16 address ); // Notifies emulator that SOUND_CLOCK_TICKS clocks have passed void gbSoundTick(); @@ -75,4 +75,4 @@ extern int soundTicks; // Number of 16.8 MHz clocks until gbSoundTick() void gbSoundSaveGame( gzFile out ); void gbSoundReadGame( int version, gzFile in ); -#endif +#endif // GBSOUND_H diff --git a/src/elf.h b/src/elf.h index 63becb68..6c28e6cb 100644 --- a/src/elf.h +++ b/src/elf.h @@ -1,5 +1,5 @@ -#ifndef VBA_ELF_H -#define VBA_ELF_H +#ifndef ELF_H +#define ELF_H enum LocationType { LOCATION_register, @@ -261,4 +261,5 @@ extern bool elfFindLineInModule(u32 *, const char *, int); u32 elfDecodeLocation(Function *, ELFBlock *, LocationType *); u32 elfDecodeLocation(Function *, ELFBlock *, LocationType *, u32); int elfFindLine(CompileUnit *unit, Function *func, u32 addr, const char **); -#endif + +#endif // ELF_H diff --git a/src/memgzio.h b/src/memgzio.h index f39273b5..e1f69b05 100644 --- a/src/memgzio.h +++ b/src/memgzio.h @@ -1,3 +1,6 @@ +#ifndef MEMGZIO_H +#define MEMGZIO_H + /* gzio.c -- IO on .gz files * Copyright (C) 1995-2002 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h @@ -11,8 +14,10 @@ #include -gzFile ZEXPORT memgzopen(char *memory, int, const char *); -int ZEXPORT memgzread(gzFile, voidp, unsigned); -int ZEXPORT memgzwrite(gzFile, const voidp, unsigned); -int ZEXPORT memgzclose(gzFile); -long ZEXPORT memtell(gzFile); +gzFile ZEXPORT memgzopen(char *memory, int available, const char *mode); +int ZEXPORT memgzread(gzFile file, voidp buf, unsigned len); +int ZEXPORT memgzwrite(gzFile file, const voidp buf, unsigned len); +int ZEXPORT memgzclose(gzFile file); +long ZEXPORT memtell(gzFile file); + +#endif // MEMGZIO_H diff --git a/src/win32/Input.h b/src/win32/Input.h index 5c9e4ea6..7fe3c5fe 100644 --- a/src/win32/Input.h +++ b/src/win32/Input.h @@ -1,5 +1,5 @@ -#ifndef VBA_WIN32_INPUT_H -#define VBA_WIN32_INPUT_H +#pragma once + #include "../System.h" #define JOYCONFIG_MESSAGE (WM_USER + 1000) @@ -44,5 +44,3 @@ class Input { virtual void loadSettings() = 0; virtual void saveSettings() = 0; }; - -#endif diff --git a/src/win32/LinkOptions.h b/src/win32/LinkOptions.h index 62f0263d..17d1383c 100644 --- a/src/win32/LinkOptions.h +++ b/src/win32/LinkOptions.h @@ -1,11 +1,4 @@ -#if !defined(AFX_LINKOPTIONS_H__55E28DAC_10CC_4AB4_9FAC_B036AA8017D3__INCLUDED_) -#define AFX_LINKOPTIONS_H__55E28DAC_10CC_4AB4_9FAC_B036AA8017D3__INCLUDED_ - -#if _MSC_VER > 1000 #pragma once -#endif // _MSC_VER > 1000 -// LinkOptions.h : header file -// class CMyTabCtrl : public CTabCtrl { DECLARE_DYNAMIC(CMyTabCtrl) @@ -225,7 +218,4 @@ protected: //}}AFX_MSG DECLARE_MESSAGE_MAP() }; -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. -#endif // !defined(AFX_LINKOPTIONS_H__55E28DAC_10CC_4AB4_9FAC_B036AA8017D3__INCLUDED_) diff --git a/src/win32/Sound.h b/src/win32/Sound.h index d8d7effa..a0f117e1 100644 --- a/src/win32/Sound.h +++ b/src/win32/Sound.h @@ -1,5 +1,4 @@ -#ifndef VBA_WIN32_SOUND_H -#define VBA_WIN32_SOUND_H +#pragma once enum AUDIO_API { DIRECTSOUND = 0 @@ -24,5 +23,3 @@ class ISound virtual void setThrottle( unsigned short throttle ) {}; }; - -#endif diff --git a/src/win32/glfont.h b/src/win32/glfont.h index 0594fbe3..a477ec22 100644 --- a/src/win32/glfont.h +++ b/src/win32/glfont.h @@ -1,3 +1,5 @@ +#pragma once + #ifndef NO_OGL //********************************************************* diff --git a/src/win32/gzglfont.h b/src/win32/gzglfont.h index 7cba301e..30cc19e2 100644 --- a/src/win32/gzglfont.h +++ b/src/win32/gzglfont.h @@ -1,3 +1,5 @@ +#pragma once + #ifndef NO_OGL #define GZGLFONT_SIZE 35096 @@ -258,5 +260,4 @@ unsigned char gzglfont[]= '\xF1', '\xAA', '\xBA', '\x4E', '\x18', '\x89', '\x00', '\x00' }; - #endif // NO_OGL diff --git a/src/win32/protect.h b/src/win32/protect.h index 27050e1c..6dbd5072 100644 --- a/src/win32/protect.h +++ b/src/win32/protect.h @@ -1,5 +1,4 @@ -#ifndef ___PROTECT_H_ -#define ___PROTECT_H_ +#pragma once #if defined(__cplusplus) extern "C" { @@ -25,5 +24,3 @@ char *unprotect_buffer(unsigned char *buffer, size_t buffer_len); #if defined(__cplusplus) } #endif - -#endif diff --git a/src/win32/rpi.h b/src/win32/rpi.h index 62c85e04..f8b56d60 100644 --- a/src/win32/rpi.h +++ b/src/win32/rpi.h @@ -1,3 +1,5 @@ +#pragma once + //--------------------------------------------------------------------------------------------------------------------------- // hq2x plugin example - Steve Snake 2004. // This plugin uses (modified) code by Maxim Stepin - see "hq2x16.asm" for info