From: Holger Schemel Date: Mon, 22 Oct 2018 17:31:12 +0000 (+0200) Subject: removed unneeded 'extern' keyword for function declarations in header files X-Git-Tag: 4.1.2.0~127 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=855700d73bbef8bb1248fe0ac735738478d6044b;p=rocksndiamonds.git removed unneeded 'extern' keyword for function declarations in header files --- diff --git a/src/engines.h b/src/engines.h index 9dcc7031..1120dd88 100644 --- a/src/engines.h +++ b/src/engines.h @@ -25,16 +25,15 @@ /* functions and definitions exported from main program to game_em */ /* ========================================================================= */ -extern void SetBitmaps_EM(Bitmap **); -extern void UpdateEngineValues(int, int, int, int); +void SetBitmaps_EM(Bitmap **); +void UpdateEngineValues(int, int, int, int); -extern boolean getTeamMode_EM(void); -extern int getGameFrameDelay_EM(int); +boolean getTeamMode_EM(void); +int getGameFrameDelay_EM(int); -extern void PlayLevelSound_EM(int, int, int, int); -extern void InitGraphicInfo_EM(void); -extern void CheckSingleStepMode_EM(byte action[], int, - boolean, boolean, boolean); +void PlayLevelSound_EM(int, int, int, int); +void InitGraphicInfo_EM(void); +void CheckSingleStepMode_EM(byte action[], int, boolean, boolean, boolean); void SetGfxAnimation_EM(struct GraphicInfo_EM *, int, int, int, int); void getGraphicSourceObjectExt_EM(struct GraphicInfo_EM *, int, int, int, int); diff --git a/src/game_em/export.h b/src/game_em/export.h index 400bdc6f..ae5f9a1b 100644 --- a/src/game_em/export.h +++ b/src/game_em/export.h @@ -734,32 +734,32 @@ extern struct GraphicInfo_EM graphic_info_em_object[TILE_MAX][8]; extern struct GraphicInfo_EM graphic_info_em_player[MAX_PLAYERS][SPR_MAX][8]; extern struct EngineSnapshotInfo_EM engine_snapshot_em; -extern void em_open_all(void); -extern void em_close_all(void); +void em_open_all(void); +void em_close_all(void); -extern void InitGfxBuffers_EM(void); +void InitGfxBuffers_EM(void); -extern void InitGameEngine_EM(void); -extern void GameActions_EM(byte *, boolean); +void InitGameEngine_EM(void); +void GameActions_EM(byte *, boolean); -extern unsigned int InitEngineRandom_EM(int); +unsigned int InitEngineRandom_EM(int); -extern void setLevelInfoToDefaults_EM(void); -extern boolean LoadNativeLevel_EM(char *, boolean); +void setLevelInfoToDefaults_EM(void); +boolean LoadNativeLevel_EM(char *, boolean); -extern int getFieldbufferOffsetX_EM(void); -extern int getFieldbufferOffsetY_EM(void); +int getFieldbufferOffsetX_EM(void); +int getFieldbufferOffsetY_EM(void); -extern void BackToFront_EM(void); -extern void BlitScreenToBitmap_EM(Bitmap *); -extern void RedrawPlayfield_EM(boolean); +void BackToFront_EM(void); +void BlitScreenToBitmap_EM(Bitmap *); +void RedrawPlayfield_EM(boolean); -extern void LoadEngineSnapshotValues_EM(void); -extern void SaveEngineSnapshotValues_EM(void); +void LoadEngineSnapshotValues_EM(void); +void SaveEngineSnapshotValues_EM(void); -extern boolean checkIfAllPlayersFitToScreen(void); +boolean checkIfAllPlayersFitToScreen(void); -extern void tab_generate(void); -extern void tab_generate_graphics_info_em(void); +void tab_generate(void); +void tab_generate_graphics_info_em(void); #endif /* EXPORT_H */ diff --git a/src/game_em/sample.h b/src/game_em/sample.h index 41bc8722..f6b9cb95 100644 --- a/src/game_em/sample.h +++ b/src/game_em/sample.h @@ -4,8 +4,8 @@ #include "main_em.h" -extern void play_sound(int, int, int); -extern void play_element_sound(int, int, int, int); +void play_sound(int, int, int); +void play_element_sound(int, int, int, int); extern char play[SAMPLE_MAX]; extern int sound_pipe[2]; diff --git a/src/game_mm/export.h b/src/game_mm/export.h index ccb449d4..f9b40116 100644 --- a/src/game_mm/export.h +++ b/src/game_mm/export.h @@ -219,37 +219,37 @@ extern struct EngineSnapshotInfo_MM engine_snapshot_mm; extern short Ur[MM_MAX_PLAYFIELD_WIDTH][MM_MAX_PLAYFIELD_HEIGHT]; -extern void mm_open_all(void); -extern void mm_close_all(void); +void mm_open_all(void); +void mm_close_all(void); void InitElementProperties_MM(void); -extern void InitGfxBuffers_MM(void); +void InitGfxBuffers_MM(void); -extern void InitGameEngine_MM(void); -extern void InitGameActions_MM(void); -extern void GameActions_MM(struct MouseActionInfo, boolean); +void InitGameEngine_MM(void); +void InitGameActions_MM(void); +void GameActions_MM(struct MouseActionInfo, boolean); -extern void DrawLaser_MM(void); +void DrawLaser_MM(void); -extern boolean ClickElement(int, int, int); +boolean ClickElement(int, int, int); -extern unsigned int InitEngineRandom_MM(int); +unsigned int InitEngineRandom_MM(int); -extern void setLevelInfoToDefaults_MM(void); -extern void copyInternalEngineVars_MM(void); -extern boolean LoadNativeLevel_MM(char *, boolean); -extern void SaveNativeLevel_MM(char *); +void setLevelInfoToDefaults_MM(void); +void copyInternalEngineVars_MM(void); +boolean LoadNativeLevel_MM(char *, boolean); +void SaveNativeLevel_MM(char *); -extern int getFieldbufferOffsetX_MM(void); -extern int getFieldbufferOffsetY_MM(void); +int getFieldbufferOffsetX_MM(void); +int getFieldbufferOffsetY_MM(void); -extern void BlitScreenToBitmap_MM(Bitmap *); -extern void RedrawPlayfield_MM(void); +void BlitScreenToBitmap_MM(Bitmap *); +void RedrawPlayfield_MM(void); -extern void LoadEngineSnapshotValues_MM(void); -extern void SaveEngineSnapshotValues_MM(ListNode **); +void LoadEngineSnapshotValues_MM(void); +void SaveEngineSnapshotValues_MM(ListNode **); -extern int getButtonFromTouchPosition(int, int, int, int); +int getButtonFromTouchPosition(int, int, int, int); #endif /* GAME_MM_EXPORT_H */ diff --git a/src/game_sp/ASM.h b/src/game_sp/ASM.h index a149c808..88b48a99 100644 --- a/src/game_sp/ASM.h +++ b/src/game_sp/ASM.h @@ -8,11 +8,11 @@ #include "global.h" -extern void MovLowByte(int *, int); -extern void MovHighByte(int *, int); -extern int LowByte(int); -extern int HighByte(int); -extern int SgnHighByte(int); -extern int ByteToInt(byte); +void MovLowByte(int *, int); +void MovHighByte(int *, int); +int LowByte(int); +int HighByte(int); +int SgnHighByte(int); +int ByteToInt(byte); #endif /* ASM_H */ diff --git a/src/game_sp/BugsTerminals.h b/src/game_sp/BugsTerminals.h index 16b351f8..857d0f5d 100644 --- a/src/game_sp/BugsTerminals.h +++ b/src/game_sp/BugsTerminals.h @@ -11,9 +11,9 @@ extern byte TerminalState[SP_MAX_PLAYFIELD_SIZE + SP_HEADER_SIZE]; extern int TerminalMaxCycles; -extern void subAnimateBugs(int si); -extern void subAnimateTerminals(int si); -extern void subRandomize(void); -extern int subGetRandomNumber(void); +void subAnimateBugs(int si); +void subAnimateTerminals(int si); +void subRandomize(void); +int subGetRandomNumber(void); #endif /* BUGSTERMINALS_H */ diff --git a/src/game_sp/DDScrollBuffer.h b/src/game_sp/DDScrollBuffer.h index 35166465..be011bb1 100644 --- a/src/game_sp/DDScrollBuffer.h +++ b/src/game_sp/DDScrollBuffer.h @@ -12,12 +12,12 @@ extern int mScrollX, mScrollY; extern int mScrollX_last, mScrollY_last; -extern void InitScrollPlayfield(void); -extern void UpdatePlayfield(boolean); -extern void RestorePlayfield(void); +void InitScrollPlayfield(void); +void UpdatePlayfield(boolean); +void RestorePlayfield(void); -extern void DDScrollBuffer_ScrollTo(int X, int Y); -extern void DDScrollBuffer_ScrollTowards(int X, int Y, double Step); -extern void DDScrollBuffer_SoftScrollTo(int X, int Y, int TimeMS, int FPS); +void DDScrollBuffer_ScrollTo(int X, int Y); +void DDScrollBuffer_ScrollTowards(int X, int Y, double Step); +void DDScrollBuffer_SoftScrollTo(int X, int Y, int TimeMS, int FPS); #endif /* DDSCROLLBUFFER_H */ diff --git a/src/game_sp/DDSpriteBuffer.h b/src/game_sp/DDSpriteBuffer.h index 9872f576..8424ef9d 100644 --- a/src/game_sp/DDSpriteBuffer.h +++ b/src/game_sp/DDSpriteBuffer.h @@ -8,6 +8,6 @@ #include "global.h" -extern void DDSpriteBuffer_BltImg(int pX, int pY, int graphic, int sync_frame); +void DDSpriteBuffer_BltImg(int pX, int pY, int graphic, int sync_frame); #endif /* DDSPRITEBUFFER_H */ diff --git a/src/game_sp/Display.h b/src/game_sp/Display.h index 12856385..adff5e8b 100644 --- a/src/game_sp/Display.h +++ b/src/game_sp/Display.h @@ -16,9 +16,9 @@ extern boolean NoDisplayFlag; extern int DisplayMinX, DisplayMaxX; extern int DisplayMinY, DisplayMaxY; -extern void subDisplayLevel(void); -extern void ScrollTo(int, int); -extern void ScrollTowards(int, int); -extern void SoftScrollTo(int, int, int, int); +void subDisplayLevel(void); +void ScrollTo(int, int); +void ScrollTowards(int, int); +void SoftScrollTo(int, int, int, int); #endif /* DISPLAY_H */ diff --git a/src/game_sp/DoGameStuff.h b/src/game_sp/DoGameStuff.h index facb8fc3..a151f1cb 100644 --- a/src/game_sp/DoGameStuff.h +++ b/src/game_sp/DoGameStuff.h @@ -10,6 +10,6 @@ extern int AnimationPosTable[SP_MAX_PLAYFIELD_SIZE]; extern byte AnimationSubTable[SP_MAX_PLAYFIELD_SIZE]; -extern void subDoGameStuff(void); +void subDoGameStuff(void); #endif /* DOGAMESTUFF_H */ diff --git a/src/game_sp/Electrons.h b/src/game_sp/Electrons.h index 2e12dd37..4e35737d 100644 --- a/src/game_sp/Electrons.h +++ b/src/game_sp/Electrons.h @@ -8,19 +8,19 @@ #include "global.h" -extern void subAnimateElectrons(int); -extern void subDrawAnimatedElectrons(int); -extern void subDrawElectronFromAbove(int, int); -extern void subDrawElectronFromBelow(int, int); -extern void subDrawElectronFromLeft(int, int); -extern void subDrawElectronFromRight(int, int); -extern void subDrawElectronTurnLeft(int, int); -extern void subDrawElectronTurnRight(int, int); -extern void subElectronFromAbove(int, int); -extern void subElectronFromBelow(int, int); -extern void subElectronFromLeft(int, int); -extern void subElectronFromRight(int, int); -extern void subElectronTurnLeft(int, int); -extern void subElectronTurnRight(int, int); +void subAnimateElectrons(int); +void subDrawAnimatedElectrons(int); +void subDrawElectronFromAbove(int, int); +void subDrawElectronFromBelow(int, int); +void subDrawElectronFromLeft(int, int); +void subDrawElectronFromRight(int, int); +void subDrawElectronTurnLeft(int, int); +void subDrawElectronTurnRight(int, int); +void subElectronFromAbove(int, int); +void subElectronFromBelow(int, int); +void subElectronFromLeft(int, int); +void subElectronFromRight(int, int); +void subElectronTurnLeft(int, int); +void subElectronTurnRight(int, int); #endif /* ELECTRONS_H */ diff --git a/src/game_sp/Explosions.h b/src/game_sp/Explosions.h index 79b2b7c9..4017d1c8 100644 --- a/src/game_sp/Explosions.h +++ b/src/game_sp/Explosions.h @@ -8,10 +8,10 @@ #include "global.h" -extern void ExplodeFieldSP(int); -extern void subAnimateExplosion(int); -extern void subClearFieldDueToExplosion(int); -extern void subFollowUpExplosions(void); -extern void subRedDiskReleaseExplosion(void); +void ExplodeFieldSP(int); +void subAnimateExplosion(int); +void subClearFieldDueToExplosion(int); +void subFollowUpExplosions(void); +void subRedDiskReleaseExplosion(void); #endif /* EXPLOSIONS_H */ diff --git a/src/game_sp/Globals.h b/src/game_sp/Globals.h index 89fe955e..36bf0f3a 100644 --- a/src/game_sp/Globals.h +++ b/src/game_sp/Globals.h @@ -265,20 +265,20 @@ typedef struct #endif -extern int GetSI(int X, int Y); -extern int GetStretchX(int si); -extern int GetStretchY(int si); -extern int GetX(int si); -extern int GetY(int si); -extern void InitGlobals(void); +int GetSI(int X, int Y); +int GetStretchX(int si); +int GetStretchY(int si); +int GetX(int si); +int GetY(int si); +void InitGlobals(void); -extern void PrepareLevel(void); +void PrepareLevel(void); -extern int getSequenceLength(int sequence); -extern boolean isSnappingSequence(int sequence); +int getSequenceLength(int sequence); +boolean isSnappingSequence(int sequence); -extern int Min(int A, int B); -extern int Max(int A, int B); +int Min(int A, int B); +int Max(int A, int B); extern int fiGraphic[]; extern int aniSnikSnakTurningLeft[]; diff --git a/src/game_sp/Infotrons.h b/src/game_sp/Infotrons.h index a18fedd0..e92e7304 100644 --- a/src/game_sp/Infotrons.h +++ b/src/game_sp/Infotrons.h @@ -8,7 +8,7 @@ #include "global.h" -extern void subAnimateInfotrons(int); -extern void subCleanUpForInfotronsAbove(int); +void subAnimateInfotrons(int); +void subCleanUpForInfotronsAbove(int); #endif /* INFOTRONS_H */ diff --git a/src/game_sp/InitGameConditions.h b/src/game_sp/InitGameConditions.h index 7842848e..6688a849 100644 --- a/src/game_sp/InitGameConditions.h +++ b/src/game_sp/InitGameConditions.h @@ -8,14 +8,14 @@ #include "global.h" -extern int subConvertToEasySymbols(void); +int subConvertToEasySymbols(void); -extern void InitMurphyPos(void); -extern void InitMurphyPosB(int); -extern void ResetInfotronsNeeded(int); -extern void subFetchAndInitLevel(void); -extern void subFetchAndInitLevelA(void); -extern void subFetchAndInitLevelB(void); -extern void subInitGameConditions(void); +void InitMurphyPos(void); +void InitMurphyPosB(int); +void ResetInfotronsNeeded(int); +void subFetchAndInitLevel(void); +void subFetchAndInitLevelA(void); +void subFetchAndInitLevelB(void); +void subInitGameConditions(void); #endif /* INITGAMECONDITIONS_H */ diff --git a/src/game_sp/Input.h b/src/game_sp/Input.h index 55f6aaf9..2752b809 100644 --- a/src/game_sp/Input.h +++ b/src/game_sp/Input.h @@ -8,6 +8,6 @@ #include "global.h" -extern void subProcessKeyboardInput(byte); +void subProcessKeyboardInput(byte); #endif /* INPUT_H */ diff --git a/src/game_sp/MainForm.h b/src/game_sp/MainForm.h index f75896a1..d640e387 100644 --- a/src/game_sp/MainForm.h +++ b/src/game_sp/MainForm.h @@ -8,20 +8,20 @@ #include "global.h" -extern void DrawFrameIfNeeded(void); +void DrawFrameIfNeeded(void); -extern void DisplayLevel(void); -extern void DrawField(int X, int Y); -extern void DrawFieldAnimated(int X, int Y); -extern void DrawFieldNoAnimated(int X, int Y); -extern void DrawSprite(int X, int Y, int SpritePos); -extern void DrawImage(int X, int Y, int graphic); +void DisplayLevel(void); +void DrawField(int X, int Y); +void DrawFieldAnimated(int X, int Y); +void DrawFieldNoAnimated(int X, int Y); +void DrawSprite(int X, int Y, int SpritePos); +void DrawImage(int X, int Y, int graphic); -extern void SetDisplayRegion(void); -extern void SetScrollEdges(void); +void SetDisplayRegion(void); +void SetScrollEdges(void); -extern void menPlay_Click(void); +void menPlay_Click(void); -extern void Form_Load(void); +void Form_Load(void); #endif /* MAINFORM_H */ diff --git a/src/game_sp/MainGameLoop.h b/src/game_sp/MainGameLoop.h index 19dcf9ea..9d76c0de 100644 --- a/src/game_sp/MainGameLoop.h +++ b/src/game_sp/MainGameLoop.h @@ -13,8 +13,8 @@ extern boolean bPlaying; extern int ExitToMenuFlag; extern int LeadOutCounter; -extern void subMainGameLoop_Init(void); -extern void subMainGameLoop_Main(byte, boolean); -extern void subCalculateScreenScrollPos(void); +void subMainGameLoop_Init(void); +void subMainGameLoop_Main(byte, boolean); +void subCalculateScreenScrollPos(void); #endif /* MAINGAMELOOP_H */ diff --git a/src/game_sp/Murphy.h b/src/game_sp/Murphy.h index f9781cc2..3ddba6df 100644 --- a/src/game_sp/Murphy.h +++ b/src/game_sp/Murphy.h @@ -9,12 +9,12 @@ void SaveEngineSnapshotValues_SP_Murphy(ListNode **); -extern void subAdjustZonksInfotronsAboveMurphy(int); -extern void subAnimateMurphy(int *); -extern void subCopyFieldToScreen(int, int); -extern void subCopyImageToScreen(int, int); -extern void subCopyAnimToScreen(int, int, int); -extern void subExplodeSnikSnaksBelow(int); -extern void subSpPortTest(int); +void subAdjustZonksInfotronsAboveMurphy(int); +void subAnimateMurphy(int *); +void subCopyFieldToScreen(int, int); +void subCopyImageToScreen(int, int); +void subCopyAnimToScreen(int, int, int); +void subExplodeSnikSnaksBelow(int); +void subSpPortTest(int); #endif /* MURPHY_H */ diff --git a/src/game_sp/OrangeDisk.h b/src/game_sp/OrangeDisk.h index 410aab4d..beab880c 100644 --- a/src/game_sp/OrangeDisk.h +++ b/src/game_sp/OrangeDisk.h @@ -8,6 +8,6 @@ #include "global.h" -extern void subAnimateOrangeDisks(int); +void subAnimateOrangeDisks(int); #endif /* ORANGEDISK_H */ diff --git a/src/game_sp/SnikSnaks.h b/src/game_sp/SnikSnaks.h index fd5f9ffe..7faca021 100644 --- a/src/game_sp/SnikSnaks.h +++ b/src/game_sp/SnikSnaks.h @@ -8,7 +8,7 @@ #include "global.h" -extern void subAnimateSnikSnaks(int); -extern void subDrawAnimatedSnikSnaks(int); +void subAnimateSnikSnaks(int); +void subDrawAnimatedSnikSnaks(int); #endif /* SNIKSNAKS_H */ diff --git a/src/game_sp/Sound.h b/src/game_sp/Sound.h index f4ca0f4b..c7a532c7 100644 --- a/src/game_sp/Sound.h +++ b/src/game_sp/Sound.h @@ -8,6 +8,6 @@ #include "global.h" -extern void subSoundFX(int, int, int); +void subSoundFX(int, int, int); #endif /* GAME_SP_SOUND_H */ diff --git a/src/game_sp/Zonk.h b/src/game_sp/Zonk.h index e99ab018..9b73a22c 100644 --- a/src/game_sp/Zonk.h +++ b/src/game_sp/Zonk.h @@ -7,6 +7,6 @@ #include "global.h" -extern void subAnimateZonks(int si); +void subAnimateZonks(int si); #endif /* ZONK_H */ diff --git a/src/game_sp/export.h b/src/game_sp/export.h index 9522fdee..1956c3a0 100644 --- a/src/game_sp/export.h +++ b/src/game_sp/export.h @@ -175,34 +175,34 @@ extern struct GraphicInfo_SP graphic_info_sp_object[TILE_MAX][8]; extern struct GraphicInfo_SP graphic_info_sp_player[MAX_PLAYERS][SPR_MAX][8]; extern struct EngineSnapshotInfo_SP engine_snapshot_sp; -extern void sp_open_all(void); -extern void sp_close_all(void); +void sp_open_all(void); +void sp_close_all(void); -extern void InitPrecedingPlayfieldMemory(void); -extern void InitGfxBuffers_SP(void); +void InitPrecedingPlayfieldMemory(void); +void InitGfxBuffers_SP(void); -extern void InitGameEngine_SP(void); -extern void GameActions_SP(byte *, boolean); +void InitGameEngine_SP(void); +void GameActions_SP(byte *, boolean); -extern unsigned int InitEngineRandom_SP(int); +unsigned int InitEngineRandom_SP(int); -extern void setLevelInfoToDefaults_SP(void); -extern void copyInternalEngineVars_SP(void); -extern boolean LoadNativeLevel_SP(char *, int, boolean); -extern void SaveNativeLevel_SP(char *); +void setLevelInfoToDefaults_SP(void); +void copyInternalEngineVars_SP(void); +boolean LoadNativeLevel_SP(char *, int, boolean); +void SaveNativeLevel_SP(char *); -extern int getFieldbufferOffsetX_SP(void); -extern int getFieldbufferOffsetY_SP(void); +int getFieldbufferOffsetX_SP(void); +int getFieldbufferOffsetY_SP(void); -extern void BlitScreenToBitmap_SP(Bitmap *); -extern void RedrawPlayfield_SP(boolean); +void BlitScreenToBitmap_SP(Bitmap *); +void RedrawPlayfield_SP(boolean); -extern void LoadEngineSnapshotValues_SP(void); -extern void SaveEngineSnapshotValues_SP(ListNode **); +void LoadEngineSnapshotValues_SP(void); +void SaveEngineSnapshotValues_SP(ListNode **); -extern int map_key_RND_to_SP(int); -extern int map_key_SP_to_RND(int); +int map_key_RND_to_SP(int); +int map_key_SP_to_RND(int); -extern int getRedDiskReleaseFlag_SP(void); +int getRedDiskReleaseFlag_SP(void); #endif /* GAME_SP_EXPORT_H */ diff --git a/src/game_sp/vb_lib.h b/src/game_sp/vb_lib.h index 12753d59..06405d4c 100644 --- a/src/game_sp/vb_lib.h +++ b/src/game_sp/vb_lib.h @@ -11,6 +11,6 @@ /* helper functions for constructs not supported by C */ -extern int MyGetTickCount(void); +int MyGetTickCount(void); #endif /* VB_LIB_H */