From: Holger Schemel Date: Mon, 17 Sep 2018 18:51:57 +0000 (+0200) Subject: fixed compiler warnings (after adding "-Wstrict-prototypes") X-Git-Tag: 4.1.1.0~27 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=115ce6f2da1914d68b0fe0e5f9082973190dacdd;p=rocksndiamonds.git fixed compiler warnings (after adding "-Wstrict-prototypes") Adding this warning option revealed a bug with an invalid function parameter (fixed by previous commit 085eaa4c). --- diff --git a/src/Makefile b/src/Makefile index da2806bb..f1f99be9 100644 --- a/src/Makefile +++ b/src/Makefile @@ -107,7 +107,8 @@ DEBUG = -DDEBUG -g # OPTIONS = $(DEBUG) -Wall # only for debugging purposes # OPTIONS = $(DEBUG) -O3 -Wall # only for debugging purposes -OPTIONS = $(DEBUG) -Wall # only for debugging purposes +# OPTIONS = $(DEBUG) -Wall # only for debugging purposes +OPTIONS = $(DEBUG) -Wall -Wstrict-prototypes # only for debugging purposes # OPTIONS = $(DEBUG) -Wall -ansi -pedantic # only for debugging purposes # OPTIONS = -O3 -Wall -ansi -pedantic # OPTIONS = -O3 -Wall diff --git a/src/anim.c b/src/anim.c index fbc88c35..b79d5cc6 100644 --- a/src/anim.c +++ b/src/anim.c @@ -198,8 +198,8 @@ struct AnimClassGameMode /* forward declaration for internal use */ static void HandleGlobalAnim(int, int); static void DoAnimationExt(void); -static void ResetGlobalAnim_Clickable(); -static void ResetGlobalAnim_Clicked(); +static void ResetGlobalAnim_Clickable(void); +static void ResetGlobalAnim_Clicked(void); static struct GlobalAnimControlInfo global_anim_ctrl[NUM_GAME_MODES]; @@ -325,7 +325,7 @@ static int compareGlobalAnimMainControlInfo(const void *obj1, const void *obj2) return compare_result; } -static void InitToonControls() +static void InitToonControls(void) { int mode_nr_toons = GAME_MODE_PSEUDO_TOONS; struct GlobalAnimControlInfo *ctrl = &global_anim_ctrl[mode_nr_toons]; @@ -407,7 +407,7 @@ static void InitToonControls() ctrl->num_anims++; } -void InitGlobalAnimControls() +void InitGlobalAnimControls(void) { int i, m, a, p; int mode_nr, anim_nr, part_nr; @@ -568,7 +568,7 @@ void InitGlobalAnimControls() anim_classes_last = ANIM_CLASS_NONE; } -void InitGlobalAnimations() +void InitGlobalAnimations(void) { InitGlobalAnimControls(); } @@ -1453,7 +1453,7 @@ static void HandleGlobalAnim(int action, int game_mode) HandleGlobalAnim_Mode(&global_anim_ctrl[game_mode], action); } -static void DoAnimationExt() +static void DoAnimationExt(void) { int i; @@ -1491,7 +1491,7 @@ static boolean DoGlobalAnim_EventAction(struct GlobalAnimPartControlInfo *part) return action_executed; } -static void InitGlobalAnim_Clickable() +static void InitGlobalAnim_Clickable(void) { int mode_nr; @@ -1642,12 +1642,12 @@ static boolean InitGlobalAnim_Clicked(int mx, int my, boolean clicked) return (anything_clicked || any_event_action); } -static void ResetGlobalAnim_Clickable() +static void ResetGlobalAnim_Clickable(void) { InitGlobalAnim_Clickable(); } -static void ResetGlobalAnim_Clicked() +static void ResetGlobalAnim_Clicked(void) { InitGlobalAnim_Clicked(-1, -1, FALSE); } diff --git a/src/config.c b/src/config.c index eafadddc..f5c47238 100644 --- a/src/config.c +++ b/src/config.c @@ -15,17 +15,17 @@ #include "conftime.h" -char *getSourceDateString() +char *getSourceDateString(void) { return SOURCE_DATE_STRING; } -char *getProgramTitleString() +char *getProgramTitleString(void) { return program.program_title; } -char *getProgramRealVersionString() +char *getProgramRealVersionString(void) { static char program_version_string[32]; @@ -36,12 +36,12 @@ char *getProgramRealVersionString() return program_version_string; } -char *getProgramVersionString() +char *getProgramVersionString(void) { return program.version_string; } -char *getProgramInitString() +char *getProgramInitString(void) { static char *program_init_string = NULL; @@ -57,7 +57,7 @@ char *getProgramInitString() return program_init_string; } -char *getConfigProgramTitleString() +char *getConfigProgramTitleString(void) { TreeInfo *graphics_current = getArtworkTreeInfoForUserLevelSet(ARTWORK_TYPE_GRAPHICS); @@ -69,7 +69,7 @@ char *getConfigProgramTitleString() setup.internal.program_title); } -char *getConfigProgramCopyrightString() +char *getConfigProgramCopyrightString(void) { TreeInfo *graphics_current = getArtworkTreeInfoForUserLevelSet(ARTWORK_TYPE_GRAPHICS); @@ -81,7 +81,7 @@ char *getConfigProgramCopyrightString() setup.internal.program_copyright); } -char *getConfigProgramCompanyString() +char *getConfigProgramCompanyString(void) { TreeInfo *graphics_current = getArtworkTreeInfoForUserLevelSet(ARTWORK_TYPE_GRAPHICS); @@ -93,7 +93,7 @@ char *getConfigProgramCompanyString() setup.internal.program_company); } -char *getWindowTitleString() +char *getWindowTitleString(void) { static char *window_title_string = NULL; diff --git a/src/config.h b/src/config.h index 9395b7b2..6c7396fc 100644 --- a/src/config.h +++ b/src/config.h @@ -19,9 +19,9 @@ char *getProgramTitleString(void); char *getProgramRealVersionString(void); char *getProgramVersionString(void); char *getProgramInitString(void); -char *getConfigProgramTitleString(); -char *getConfigProgramCopyrightString(); -char *getConfigProgramCompanyString(); +char *getConfigProgramTitleString(void); +char *getConfigProgramCopyrightString(void); +char *getConfigProgramCompanyString(void); char *getWindowTitleString(void); #endif /* CONFIG_H */ diff --git a/src/editor.c b/src/editor.c index 06420ebc..3c03f132 100644 --- a/src/editor.c +++ b/src/editor.c @@ -3753,18 +3753,18 @@ static void ModifyEditorCounterLimits(int, int, int); static void ModifyEditorSelectboxValue(int, int); static void ModifyEditorSelectboxOptions(int, struct ValueTextInfo *); static void ModifyEditorDrawingArea(int, int, int); -static void ModifyEditorElementList(); -static void AdjustElementListScrollbar(); -static void RedrawDrawingElements(); +static void ModifyEditorElementList(void); +static void AdjustElementListScrollbar(void); +static void RedrawDrawingElements(void); static void DrawDrawingWindowExt(boolean); -static void DrawDrawingWindow(); -static void DrawLevelInfoWindow(); -static void DrawPropertiesWindow(); -static void DrawPaletteWindow(); -static void UpdateCustomElementGraphicGadgets(); +static void DrawDrawingWindow(void); +static void DrawLevelInfoWindow(void); +static void DrawPropertiesWindow(void); +static void DrawPaletteWindow(void); +static void UpdateCustomElementGraphicGadgets(void); static boolean checkPropertiesConfig(int); -static void SetAutomaticNumberOfGemsNeeded(); -static void ClearEditorGadgetInfoText(); +static void SetAutomaticNumberOfGemsNeeded(void); +static void ClearEditorGadgetInfoText(void); static void CopyLevelToUndoBuffer(int); static void HandleDrawingAreas(struct GadgetInfo *); static void HandleCounterButtons(struct GadgetInfo *); @@ -3778,11 +3778,11 @@ static void HandleCheckbuttons(struct GadgetInfo *); static void HandleControlButtons(struct GadgetInfo *); static void HandleDrawingAreaInfo(struct GadgetInfo *); static void PrintEditorGadgetInfoText(struct GadgetInfo *); -static boolean AskToCopyAndModifyLevelTemplate(); -static boolean getDrawModeHiRes(); -static int getTabulatorBarWidth(); -static int getTabulatorBarHeight(); -static Pixel getTabulatorBarColor(); +static boolean AskToCopyAndModifyLevelTemplate(void); +static boolean getDrawModeHiRes(void); +static int getTabulatorBarWidth(void); +static int getTabulatorBarHeight(void); +static Pixel getTabulatorBarColor(void); static int num_editor_gadgets = 0; /* dynamically determined */ @@ -5385,7 +5385,7 @@ editor_elements_info[] = ----------------------------------------------------------------------------- */ -static int getMaxInfoTextLength() +static int getMaxInfoTextLength(void) { return (SXSIZE / getFontWidth(INFOTEXT_FONT)); } @@ -5477,7 +5477,7 @@ char *getElementDescriptionFilename(int element) return NULL; } -static boolean suppressBorderElement() +static boolean suppressBorderElement(void) { return (level.game_engine_type == GAME_ENGINE_TYPE_MM && lev_fieldx <= MAX_ED_FIELDX && @@ -5531,7 +5531,7 @@ static void InitDynamicEditorElementList(int **elements, int *num_elements) (*elements)[(*num_elements)++] = EL_EMPTY; } -static void ReinitializeElementList_EnableSections() +static void ReinitializeElementList_EnableSections(void) { /* default: enable all element sections */ @@ -5640,7 +5640,7 @@ static void ReinitializeElementList_EnableSections() } } -static void ReinitializeElementList() +static void ReinitializeElementList(void) { static boolean initialization_needed = TRUE; int pos = 0; @@ -5799,7 +5799,7 @@ static void ReinitializeElementList() AdjustElementListScrollbar(); } -void PrintEditorElementList() +void PrintEditorElementList(void) { boolean *stop = &setup_editor_el_user_defined; int i, j; @@ -5843,7 +5843,7 @@ void PrintEditorElementList() } } -static void ReinitializeElementListButtons() +static void ReinitializeElementListButtons(void) { static boolean last_setup_value_headlines = FALSE; static boolean initialization_needed = TRUE; @@ -5944,7 +5944,7 @@ static void DrawEditorLevelBorderLine(int x, int y, int xsize, int ysize) FillRectangle(drawto, SX + x, SY + y, xsize_thin, ysize_thin, BLACK_PIXEL); } -static void DrawEditorLevelBorderLinesIfNeeded() +static void DrawEditorLevelBorderLinesIfNeeded(void) { int xsize = lev_fieldx * ed_tilesize; int ysize = lev_fieldy * ed_tilesize; @@ -6041,7 +6041,7 @@ void getEditorGraphicSource(int element, int tile_size, Bitmap **bitmap, getSizedGraphicSource(el2edimg(element), 0, tile_size, bitmap, x, y); } -static void CreateControlButtons() +static void CreateControlButtons(void) { struct GadgetInfo *gi; int i; @@ -6283,7 +6283,7 @@ static void CreateControlButtons() } } -static void CreateCounterButtons() +static void CreateCounterButtons(void) { int max_infotext_len = getMaxInfoTextLength(); int i; @@ -6445,7 +6445,7 @@ static void CreateCounterButtons() } } -static void CreateDrawingAreas() +static void CreateDrawingAreas(void) { int i; @@ -6499,7 +6499,7 @@ static void CreateDrawingAreas() } } -static void CreateTextInputGadgets() +static void CreateTextInputGadgets(void) { struct GraphicInfo *gd = &graphic_info[IMG_EDITOR_INPUT_TEXT]; int max_infotext_len = getMaxInfoTextLength(); @@ -6570,7 +6570,7 @@ static void CreateTextInputGadgets() } } -static void CreateTextAreaGadgets() +static void CreateTextAreaGadgets(void) { int max_infotext_len = getMaxInfoTextLength(); int i; @@ -6619,7 +6619,7 @@ static void CreateTextAreaGadgets() } } -static void CreateSelectboxGadgets() +static void CreateSelectboxGadgets(void) { int max_infotext_len = getMaxInfoTextLength(); int i, j; @@ -6700,7 +6700,7 @@ static void CreateSelectboxGadgets() } } -static void CreateTextbuttonGadgets() +static void CreateTextbuttonGadgets(void) { int max_infotext_len = getMaxInfoTextLength(); int i; @@ -6784,7 +6784,7 @@ static void CreateTextbuttonGadgets() } } -static void CreateGraphicbuttonGadgets() +static void CreateGraphicbuttonGadgets(void) { struct GadgetInfo *gi; unsigned int event_mask; @@ -6840,7 +6840,7 @@ static void CreateGraphicbuttonGadgets() } } -static void CreateScrollbarGadgets() +static void CreateScrollbarGadgets(void) { int i; @@ -6953,7 +6953,7 @@ static void CreateScrollbarGadgets() } } -static void CreateCheckbuttonGadgets() +static void CreateCheckbuttonGadgets(void) { struct GadgetInfo *gi; unsigned int event_mask; @@ -7015,7 +7015,7 @@ static void CreateCheckbuttonGadgets() } } -static void CreateRadiobuttonGadgets() +static void CreateRadiobuttonGadgets(void) { int graphic = IMG_EDITOR_RADIOBUTTON; struct GraphicInfo *gd = &graphic_info[graphic]; @@ -7080,7 +7080,7 @@ static void CreateRadiobuttonGadgets() } } -void CreateLevelEditorGadgets() +void CreateLevelEditorGadgets(void) { /* force EDITOR font inside level editor */ SetFontStatus(GAME_MODE_EDITOR); @@ -7122,7 +7122,7 @@ void CreateLevelEditorGadgets() ResetFontStatus(); } -void FreeLevelEditorGadgets() +void FreeLevelEditorGadgets(void) { int i; @@ -7199,7 +7199,7 @@ static void MapCounterButtons(int id) MapGadget(gi_up); } -static void MapControlButtons() +static void MapControlButtons(void) { int counter_id; int i; @@ -7442,7 +7442,7 @@ static void MapCheckbuttonGadget(int id) MapGadget(gi); } -static void MapMainDrawingArea() +static void MapMainDrawingArea(void) { boolean no_horizontal_scrollbar = (lev_fieldx + 2 <= ed_fieldx); boolean no_vertical_scrollbar = (lev_fieldy + 2 <= ed_fieldy); @@ -7499,12 +7499,12 @@ static void MapOrUnmapLevelEditorToolboxCustomGadgets(boolean map) } } -static void MapLevelEditorToolboxCustomGadgets() +static void MapLevelEditorToolboxCustomGadgets(void) { MapOrUnmapLevelEditorToolboxCustomGadgets(TRUE); } -static void UnmapLevelEditorToolboxCustomGadgets() +static void UnmapLevelEditorToolboxCustomGadgets(void) { MapOrUnmapLevelEditorToolboxCustomGadgets(FALSE); } @@ -7540,12 +7540,12 @@ static void MapOrUnmapLevelEditorToolboxDrawingGadgets(boolean map) } } -static void MapLevelEditorToolboxDrawingGadgets() +static void MapLevelEditorToolboxDrawingGadgets(void) { MapOrUnmapLevelEditorToolboxDrawingGadgets(TRUE); } -static void UnmapLevelEditorToolboxDrawingGadgets() +static void UnmapLevelEditorToolboxDrawingGadgets(void) { MapOrUnmapLevelEditorToolboxDrawingGadgets(FALSE); } @@ -7555,7 +7555,7 @@ static void UnmapDrawingArea(int id) UnmapGadget(level_editor_gadget[drawingarea_info[id].gadget_id]); } -static void UnmapLevelEditorFieldGadgets() +static void UnmapLevelEditorFieldGadgets(void) { int i; @@ -7565,7 +7565,7 @@ static void UnmapLevelEditorFieldGadgets() UnmapGadget(level_editor_gadget[i]); } -void UnmapLevelEditorGadgets() +void UnmapLevelEditorGadgets(void) { int i; @@ -7573,7 +7573,7 @@ void UnmapLevelEditorGadgets() UnmapGadget(level_editor_gadget[i]); } -static void ResetUndoBuffer() +static void ResetUndoBuffer(void) { undo_buffer_position = -1; undo_buffer_steps = -1; @@ -7602,12 +7602,12 @@ static void DrawEditModeWindowExt(boolean remap_toolbox_gadgets) DrawDrawingWindowExt(remap_toolbox_gadgets); } -static void DrawEditModeWindow() +static void DrawEditModeWindow(void) { DrawEditModeWindowExt(TRUE); } -static void DrawEditModeWindow_PlayfieldOnly() +static void DrawEditModeWindow_PlayfieldOnly(void) { DrawEditModeWindowExt(FALSE); } @@ -7619,7 +7619,7 @@ static void ChangeEditModeWindow(int new_edit_mode) DrawEditModeWindow(); } -static boolean LevelChanged() +static boolean LevelChanged(void) { boolean field_changed = FALSE; int x, y; @@ -7632,7 +7632,7 @@ static boolean LevelChanged() return (level.changed || field_changed); } -static boolean PrepareSavingIntoPersonalLevelSet() +static boolean PrepareSavingIntoPersonalLevelSet(void) { static LevelDirTree *last_copied_leveldir = NULL; static LevelDirTree *last_written_leveldir = NULL; @@ -7774,7 +7774,7 @@ static int setSelectboxValue(int selectbox_id, int new_value) return new_index_value; } -static void setSelectboxSpecialActionVariablesIfNeeded() +static void setSelectboxSpecialActionVariablesIfNeeded(void) { int i; @@ -7800,7 +7800,7 @@ static void setSelectboxSpecialActionVariablesIfNeeded() } } -static void setSelectboxSpecialActionOptions() +static void setSelectboxSpecialActionOptions(void) { int i; @@ -8132,7 +8132,7 @@ static void CopyElementPropertiesToEditor(int element) CopyClassicElementPropertiesToEditor(element); } -static boolean AskToCopyAndModifyLevelTemplate() +static boolean AskToCopyAndModifyLevelTemplate(void) { if (Request("Copy and modify settings from level template?", REQ_ASK)) { @@ -8308,7 +8308,7 @@ static void CopyElementPropertiesToGame(int element) CopyClassicElementPropertiesToGame(element); } -void CheckElementDescriptions() +void CheckElementDescriptions(void) { int i; @@ -8367,7 +8367,7 @@ void InitZoomLevelSettings(int zoom_tilesize) MAX_ED_FIELDY = getMaxEdFieldY(FALSE); } -static void InitDrawingElements() +static void InitDrawingElements(void) { static int game_engine_type_last = GAME_ENGINE_TYPE_UNKNOWN; @@ -8396,7 +8396,7 @@ static void InitDrawingElements() game_engine_type_last = level.game_engine_type; } -static void InitLevelSetInfo() +static void InitLevelSetInfo(void) { snprintf(levelset_name, MAX_LEVEL_NAME_LEN + 1, "%s", leveldir_current->name); @@ -8431,7 +8431,7 @@ static void ChangeEditorToLevelSet(char *levelset_subdir) DrawLevelEd(); } -static boolean useEditorDoorAnimation() +static boolean useEditorDoorAnimation(void) { struct RectWithBorder *vp_door_1 = &viewport.door_1[GAME_MODE_MAIN]; boolean door_1_viewport_unchanged = @@ -8448,7 +8448,7 @@ static boolean useEditorDoorAnimation() return (door_1_viewport_unchanged && door_1_contains_toolbox); } -void DrawEditorDoorContent() +void DrawEditorDoorContent(void) { /* needed for gadgets drawn on background (like palette scrollbar) */ SetDoorBackgroundImage(IMG_UNDEFINED); @@ -8483,7 +8483,7 @@ void DrawEditorDoorContent() BlitBitmap(drawto, bitmap_db_door_1, DX, DY, DXSIZE, DYSIZE, 0, 0); } -void DrawLevelEd() +void DrawLevelEd(void) { int fade_mask = REDRAW_FIELD; @@ -8561,7 +8561,7 @@ void DrawLevelEd() SetDoorState(DOOR_OPEN_1 | DOOR_OPEN_2); } -static void AdjustDrawingAreaGadgets() +static void AdjustDrawingAreaGadgets(void) { int ed_xsize = lev_fieldx + 2; int ed_ysize = lev_fieldy + 2; @@ -8637,7 +8637,7 @@ static void AdjustDrawingAreaGadgets() GDI_END); } -static void AdjustLevelScrollPosition() +static void AdjustLevelScrollPosition(void) { if (level_xpos < -1) level_xpos = -1; @@ -8685,7 +8685,7 @@ static void AdjustEditorScrollbar(int id) GDI_SCROLLBAR_ITEM_POSITION, item_position, GDI_END); } -static void AdjustElementListScrollbar() +static void AdjustElementListScrollbar(void) { struct GadgetInfo *gi = level_editor_gadget[GADGET_ID_SCROLL_LIST_VERTICAL]; int items_max, items_visible, item_position; @@ -8769,7 +8769,7 @@ static void ModifyEditorDrawingArea(int drawingarea_id, int xsize, int ysize) ModifyGadget(gi, GDI_AREA_SIZE, xsize, ysize, GDI_END); } -static void ModifyEditorElementList() +static void ModifyEditorElementList(void) { int i; @@ -8848,7 +8848,7 @@ static void PickDrawingElement(int button, int element) redraw_mask |= REDRAW_DOOR_1; } -static void RedrawDrawingElements() +static void RedrawDrawingElements(void) { PickDrawingElement(1, new_element1); PickDrawingElement(2, new_element2); @@ -8880,12 +8880,12 @@ static void DrawDrawingWindowExt(boolean remap_toolbox_gadgets) } } -static void DrawDrawingWindow() +static void DrawDrawingWindow(void) { DrawDrawingWindowExt(TRUE); } -static int getTabulatorBarWidth() +static int getTabulatorBarWidth(void) { struct GadgetInfo *gd_gi1 = level_editor_gadget[GADGET_ID_PROPERTIES_INFO]; struct GadgetInfo *gd_gi4 = level_editor_gadget[GADGET_ID_PROPERTIES_CHANGE]; @@ -8893,12 +8893,12 @@ static int getTabulatorBarWidth() return gd_gi4->x - gd_gi1->x + gd_gi4->width; } -static int getTabulatorBarHeight() +static int getTabulatorBarHeight(void) { return ED_TAB_BAR_HEIGHT; } -static Pixel getTabulatorBarColor() +static Pixel getTabulatorBarColor(void) { struct GadgetInfo *gd_gi1 = level_editor_gadget[GADGET_ID_LEVELINFO_LEVEL]; struct GadgetDesign *gd = &gd_gi1->alt_design[GD_BUTTON_UNPRESSED]; @@ -8908,7 +8908,7 @@ static Pixel getTabulatorBarColor() return GetPixel(gd->bitmap, gd_x, gd_y); } -static void DrawLevelInfoTabulatorGadgets() +static void DrawLevelInfoTabulatorGadgets(void) { struct GadgetInfo *gd_gi1 = level_editor_gadget[GADGET_ID_LEVELINFO_LEVEL]; Pixel tab_color = getTabulatorBarColor(); @@ -8941,7 +8941,7 @@ static void DrawLevelInfoTabulatorGadgets() getTabulatorBarWidth(), getTabulatorBarHeight(), tab_color); } -static void DrawPropertiesTabulatorGadgets() +static void DrawPropertiesTabulatorGadgets(void) { struct GadgetInfo *gd_gi1 = level_editor_gadget[GADGET_ID_PROPERTIES_INFO]; struct GadgetDesign *gd = &gd_gi1->alt_design[GD_BUTTON_UNPRESSED]; @@ -9009,7 +9009,7 @@ static int PrintElementDescriptionFromFile(char *filename, int font_nr, TRUE, FALSE, FALSE); } -static void DrawLevelInfoLevel() +static void DrawLevelInfoLevel(void) { int i; @@ -9038,7 +9038,7 @@ static char *getLevelSubdirFromSaveMode(int save_mode) return leveldir_current->subdir; } -static void DrawLevelInfoLevelSet_DirectoryInfo() +static void DrawLevelInfoLevelSet_DirectoryInfo(void) { char *directory_text = "Level set directory:"; char *directory_name = getLevelSubdirFromSaveMode(levelset_save_mode); @@ -9053,7 +9053,7 @@ static void DrawLevelInfoLevelSet_DirectoryInfo() PrintInfoText(directory_name, font2_nr, x, y); } -static void DrawLevelInfoLevelSet() +static void DrawLevelInfoLevelSet(void) { boolean artwork_exists = checkIfCustomArtworkExistsForCurrentLevelSet(); boolean template_exists = fileExists(getLocalLevelTemplateFilename()); @@ -9089,7 +9089,7 @@ static void DrawLevelInfoLevelSet() DrawLevelInfoLevelSet_DirectoryInfo(); } -static void DrawLevelInfoEditor() +static void DrawLevelInfoEditor(void) { int i; @@ -9112,7 +9112,7 @@ static void DrawLevelInfoEditor() MapTextbuttonGadget(ED_TEXTBUTTON_ID_SAVE_AS_TEMPLATE_2); } -static void DrawLevelInfoWindow() +static void DrawLevelInfoWindow(void) { char *text = "Global Settings"; int font_nr = FONT_TITLE_1; @@ -9141,7 +9141,7 @@ static void DrawLevelInfoWindow() DrawLevelInfoEditor(); } -static void DrawCustomContentArea() +static void DrawCustomContentArea(void) { int id = ED_DRAWING_ID_CUSTOM_CONTENT; struct GadgetInfo *gi = level_editor_gadget[drawingarea_info[id].gadget_id]; @@ -9158,7 +9158,7 @@ static void DrawCustomContentArea() MapDrawingArea(ED_DRAWING_ID_CUSTOM_CONTENT); } -static void DrawCustomChangeContentArea() +static void DrawCustomChangeContentArea(void) { int id = ED_DRAWING_ID_CUSTOM_CHANGE_CONTENT; struct GadgetInfo *gi = level_editor_gadget[drawingarea_info[id].gadget_id]; @@ -9183,7 +9183,7 @@ static void RemoveElementContentArea(int id, int font_height) ED_GADGET_TEXT_DISTANCE + font_height); } -static void DrawYamYamContentAreas() +static void DrawYamYamContentAreas(void) { int font_nr = FONT_TEXT_1; int font_height = getFontHeight(font_nr); @@ -9218,7 +9218,7 @@ static void DrawYamYamContentAreas() DrawText(x, y + 2 * tilesize, "smashed", font_nr); } -static void DrawMagicBallContentAreas() +static void DrawMagicBallContentAreas(void) { int font_nr = FONT_TEXT_1; int font_height = getFontHeight(font_nr); @@ -9357,7 +9357,7 @@ static void DrawEnvelopeTextArea(int envelope_nr) MapTextAreaGadget(ED_TEXTAREA_ID_ENVELOPE_INFO); } -static void DrawPropertiesInfo() +static void DrawPropertiesInfo(void) { static struct { @@ -9680,7 +9680,7 @@ static boolean checkPropertiesConfig(int element) return FALSE; } -static void SetAutomaticNumberOfGemsNeeded() +static void SetAutomaticNumberOfGemsNeeded(void) { int x, y; @@ -9705,7 +9705,7 @@ static void SetAutomaticNumberOfGemsNeeded() ModifyEditorCounterValue(ED_COUNTER_ID_LEVEL_GEMSLIMIT, level.gems_needed); } -static void DrawPropertiesConfig() +static void DrawPropertiesConfig(void) { boolean draw_footer_line = FALSE; int max_num_element_counters = 4; @@ -10048,7 +10048,7 @@ static void DrawPropertiesConfig() } } -static void DrawPropertiesChangeDrawingAreas() +static void DrawPropertiesChangeDrawingAreas(void) { if (IS_CUSTOM_ELEMENT(properties_element)) { @@ -10062,7 +10062,7 @@ static void DrawPropertiesChangeDrawingAreas() redraw_mask |= REDRAW_FIELD; } -static void DrawPropertiesChange() +static void DrawPropertiesChange(void) { int i; @@ -10156,7 +10156,7 @@ static void DrawEditorElementName(int x, int y, int font_nr) } } -static void DrawPropertiesWindow() +static void DrawPropertiesWindow(void) { struct GraphicInfo *gd = &graphic_info[IMG_EDITOR_INPUT_TEXT]; int element_border = graphic_info[IMG_EDITOR_ELEMENT_BORDER].border_size; @@ -10225,7 +10225,7 @@ static void DrawPropertiesWindow() DrawPropertiesConfig(); } -static void DrawPaletteWindow() +static void DrawPaletteWindow(void) { int i; @@ -10242,7 +10242,7 @@ static void DrawPaletteWindow() MapGadget(level_editor_gadget[GADGET_ID_SCROLL_LIST_DOWN]); } -static void UpdateCustomElementGraphicGadgets() +static void UpdateCustomElementGraphicGadgets(void) { int i; @@ -11541,7 +11541,7 @@ static void SetElementIntelliDraw(int x, int y, int new_element, last_y = y; } -static void ResetIntelliDraw() +static void ResetIntelliDraw(void) { int x, y; @@ -11561,7 +11561,7 @@ static void SetDrawModeHiRes(int element) (IS_MM_WALL_EDITOR(element) || element == EL_EMPTY)); } -static boolean getDrawModeHiRes() +static boolean getDrawModeHiRes(void) { return draw_mode_hires; } @@ -11998,17 +11998,17 @@ static void CopyBrushToCursor(int x, int y) CopyBrushExt(x, y, 0, 0, 0, CB_BRUSH_TO_CURSOR); } -static void DeleteBrushFromCursor() +static void DeleteBrushFromCursor(void) { CopyBrushExt(0, 0, 0, 0, 0, CB_DELETE_OLD_CURSOR); } -void DumpBrush() +void DumpBrush(void) { CopyBrushExt(0, 0, 0, 0, 0, CB_DUMP_BRUSH); } -void DumpBrush_Small() +void DumpBrush_Small(void) { CopyBrushExt(0, 0, 0, 0, 0, CB_DUMP_BRUSH_SMALL); } @@ -13853,7 +13853,7 @@ void HandleLevelEditorKeyInput(Key key) } } -void HandleLevelEditorIdle() +void HandleLevelEditorIdle(void) { int element_border = graphic_info[IMG_EDITOR_ELEMENT_BORDER].border_size; int x = editor.settings.element_graphic.x + element_border; @@ -13883,7 +13883,7 @@ void HandleLevelEditorIdle() FrameCounter++; /* increase animation frame counter */ } -static void ClearEditorGadgetInfoText() +static void ClearEditorGadgetInfoText(void) { DrawBackground(INFOTEXT_XPOS, INFOTEXT_YPOS, INFOTEXT_XSIZE, INFOTEXT_YSIZE); } diff --git a/src/editor.h b/src/editor.h index b39d6765..662d2093 100644 --- a/src/editor.h +++ b/src/editor.h @@ -14,17 +14,17 @@ #include "main.h" -void CreateLevelEditorGadgets(); -void FreeLevelEditorGadgets(); -void UnmapLevelEditorGadgets(); +void CreateLevelEditorGadgets(void); +void FreeLevelEditorGadgets(void); +void UnmapLevelEditorGadgets(void); void DrawLevelEd(void); void HandleLevelEditorKeyInput(Key); -void HandleLevelEditorIdle(); +void HandleLevelEditorIdle(void); void HandleEditorGadgetInfoText(void *ptr); void RequestExitLevelEditor(boolean, boolean); -void PrintEditorElementList(); +void PrintEditorElementList(void); -void DumpBrush(); -void DumpBrush_Small(); +void DumpBrush(void); +void DumpBrush_Small(void); #endif diff --git a/src/engines.h b/src/engines.h index f47cc62a..9dcc7031 100644 --- a/src/engines.h +++ b/src/engines.h @@ -28,7 +28,7 @@ extern void SetBitmaps_EM(Bitmap **); extern void UpdateEngineValues(int, int, int, int); -extern boolean getTeamMode_EM(); +extern boolean getTeamMode_EM(void); extern int getGameFrameDelay_EM(int); extern void PlayLevelSound_EM(int, int, int, int); diff --git a/src/events.c b/src/events.c index b610ff8b..036f8a07 100644 --- a/src/events.c +++ b/src/events.c @@ -164,7 +164,7 @@ boolean NextValidEvent(Event *event) return FALSE; } -void HandleEvents() +void HandleEvents(void) { Event event; unsigned int event_frame_delay = 0; @@ -283,7 +283,7 @@ void HandleOtherEvents(Event *event) } } -void HandleMouseCursor() +void HandleMouseCursor(void) { if (game_status == GAME_MODE_TITLE) { @@ -347,7 +347,7 @@ void EventLoop(void) } } -void ClearAutoRepeatKeyEvents() +void ClearAutoRepeatKeyEvents(void) { while (PendingEvent()) { @@ -364,7 +364,7 @@ void ClearAutoRepeatKeyEvents() } } -void ClearEventQueue() +void ClearEventQueue(void) { Event event; @@ -394,14 +394,14 @@ void ClearEventQueue() } } -void ClearPlayerMouseAction() +void ClearPlayerMouseAction(void) { local_player->mouse_action.lx = 0; local_player->mouse_action.ly = 0; local_player->mouse_action.button = 0; } -void ClearPlayerAction() +void ClearPlayerAction(void) { int i; @@ -442,7 +442,7 @@ void SetPlayerMouseAction(int mx, int my, int button) SetTileCursorXY(lx, ly); } -void SleepWhileUnmapped() +void SleepWhileUnmapped(void) { boolean window_unmapped = TRUE; @@ -1399,7 +1399,7 @@ static void HandleButtonOrFinger(int mx, int my, int button) #if defined(TARGET_SDL2) -static boolean checkTextInputKeyModState() +static boolean checkTextInputKeyModState(void) { // when playing, only handle raw key events and ignore text input if (game_status == GAME_MODE_PLAYING) @@ -2215,7 +2215,7 @@ void HandleKey(Key key, int key_status) HandleKeysDebug(key); } -void HandleNoEvent() +void HandleNoEvent(void) { HandleMouseCursor(); @@ -2227,7 +2227,7 @@ void HandleNoEvent() } } -void HandleEventActions() +void HandleEventActions(void) { // if (button_status && game_status != GAME_MODE_PLAYING) if (button_status && (game_status != GAME_MODE_PLAYING || @@ -2290,7 +2290,7 @@ static void HandleTileCursor(int dx, int dy, int button) } } -static int HandleJoystickForAllPlayers() +static int HandleJoystickForAllPlayers(void) { int i; int result = 0; @@ -2323,7 +2323,7 @@ static int HandleJoystickForAllPlayers() return result; } -void HandleJoystick() +void HandleJoystick(void) { static unsigned int joytest_delay = 0; static unsigned int joytest_delay_value = GADGET_FRAME_DELAY; diff --git a/src/events.h b/src/events.h index 2a4228c7..32348773 100644 --- a/src/events.h +++ b/src/events.h @@ -43,7 +43,7 @@ void HandleToonAnimations(void); void HandleButton(int, int, int, int); void HandleKey(Key, int); -void HandleJoystick(); +void HandleJoystick(void); void HandleSpecialGameControllerButtons(Event *); void HandleSpecialGameControllerKeys(Key, int); diff --git a/src/files.c b/src/files.c index eb9d37e3..29847d96 100644 --- a/src/files.c +++ b/src/files.c @@ -1404,7 +1404,7 @@ static boolean check_special_flags(char *flag) return FALSE; } -static struct DateInfo getCurrentDate() +static struct DateInfo getCurrentDate(void) { time_t epoch_seconds = time(NULL); struct tm *now = localtime(&epoch_seconds); @@ -1427,7 +1427,7 @@ static void resetEventFlags(struct ElementChangeInfo *change) change->has_event[i] = FALSE; } -static void resetEventBits() +static void resetEventBits(void) { int i; @@ -1868,7 +1868,7 @@ static void setFileInfoToDefaults(struct LevelFileInfo *level_file_info) int getMappedElement_SB(int, boolean); -static void ActivateLevelTemplate() +static void ActivateLevelTemplate(void) { int x, y; @@ -2159,12 +2159,12 @@ static int getFiletypeFromID(char *filetype_id) return filetype; } -char *getLocalLevelTemplateFilename() +char *getLocalLevelTemplateFilename(void) { return getDefaultLevelFilename(-1); } -char *getGlobalLevelTemplateFilename() +char *getGlobalLevelTemplateFilename(void) { /* global variable "leveldir_current" must be modified in the loop below */ LevelDirTree *leveldir_current_last = leveldir_current; @@ -3957,7 +3957,7 @@ static void CopyNativeTape_RND_to_SP(struct LevelInfo *level) demo->is_available = TRUE; } -static void setTapeInfoToDefaults(); +static void setTapeInfoToDefaults(void); static void CopyNativeTape_SP_to_RND(struct LevelInfo *level) { @@ -6606,7 +6606,7 @@ static void LoadLevel_InitNativeEngines(struct LevelInfo *level) CopyNativeLevel_RND_to_Native(level); } -static void LoadLevelTemplate_LoadAndInit() +static void LoadLevelTemplate_LoadAndInit(void) { LoadLevelFromFileInfo(&level_template, &level_template.file_info, FALSE); @@ -7514,7 +7514,7 @@ void SaveLevel(int nr) SaveLevelFromFilename(&level, filename, FALSE); } -void SaveLevelTemplate() +void SaveLevelTemplate(void) { char *filename = getLocalLevelTemplateFilename(); @@ -7584,7 +7584,7 @@ void DumpLevel(struct LevelInfo *level) /* tape file functions */ /* ========================================================================= */ -static void setTapeInfoToDefaults() +static void setTapeInfoToDefaults(void) { int i; @@ -9278,7 +9278,7 @@ void LoadSetupFromFilename(char *filename) } } -static void LoadSetup_SpecialPostProcessing() +static void LoadSetup_SpecialPostProcessing(void) { char *player_name_new; @@ -9299,7 +9299,7 @@ static void LoadSetup_SpecialPostProcessing() MIN(MAX(MIN_SCROLL_DELAY, setup.scroll_delay_value), MAX_SCROLL_DELAY); } -void LoadSetup() +void LoadSetup(void) { char *filename; @@ -9320,7 +9320,7 @@ void LoadSetup() LoadSetup_SpecialPostProcessing(); } -void LoadSetup_AutoSetup() +void LoadSetup_AutoSetup(void) { char *filename = getPath2(getSetupDir(), AUTOSETUP_FILENAME); SetupFileHash *setup_file_hash = NULL; @@ -9340,7 +9340,7 @@ void LoadSetup_AutoSetup() free(filename); } -void LoadSetup_EditorCascade() +void LoadSetup_EditorCascade(void) { char *filename = getPath2(getSetupDir(), EDITORCASCADE_FILENAME); SetupFileHash *setup_file_hash = NULL; @@ -9409,7 +9409,7 @@ static void LoadSetup_ReadGameControllerMappings(SetupFileHash *mappings_hash, fclose(file); } -void SaveSetup() +void SaveSetup(void) { char *filename = getSetupFilename(); FILE *file; @@ -9522,7 +9522,7 @@ void SaveSetup() SetFilePermissions(filename, PERMS_PRIVATE); } -void SaveSetup_AutoSetup() +void SaveSetup_AutoSetup(void) { char *filename = getPath2(getSetupDir(), AUTOSETUP_FILENAME); FILE *file; @@ -9550,7 +9550,7 @@ void SaveSetup_AutoSetup() free(filename); } -void SaveSetup_EditorCascade() +void SaveSetup_EditorCascade(void) { char *filename = getPath2(getSetupDir(), EDITORCASCADE_FILENAME); FILE *file; @@ -9619,7 +9619,7 @@ void SaveSetup_AddGameControllerMapping(char *mapping) free(filename); } -void LoadCustomElementDescriptions() +void LoadCustomElementDescriptions(void) { char *filename = getCustomArtworkConfigFilename(ARTWORK_TYPE_GRAPHICS); SetupFileHash *setup_file_hash; @@ -9681,7 +9681,7 @@ static int get_token_parameter_value(char *token, char *value_raw) return get_parameter_value(value_raw, suffix, TYPE_INTEGER); } -void InitMenuDesignSettings_Static() +void InitMenuDesignSettings_Static(void) { int i; @@ -9696,7 +9696,7 @@ void InitMenuDesignSettings_Static() } } -static void InitMenuDesignSettings_SpecialPreProcessing() +static void InitMenuDesignSettings_SpecialPreProcessing(void) { int i; @@ -9788,7 +9788,7 @@ static void InitMenuDesignSettings_SpecialPreProcessing() } } -static void InitMenuDesignSettings_SpecialPostProcessing() +static void InitMenuDesignSettings_SpecialPostProcessing(void) { static struct { @@ -9817,7 +9817,7 @@ static void InitMenuDesignSettings_SpecialPostProcessing() *game_buttons_xy[i].dst = *game_buttons_xy[i].src; } -static void InitMenuDesignSettings_SpecialPostProcessing_AfterGraphics() +static void InitMenuDesignSettings_SpecialPostProcessing_AfterGraphics(void) { static struct { @@ -10251,7 +10251,7 @@ static void LoadMenuDesignSettingsFromFilename(char *filename) freeSetupFileHash(setup_file_hash); } -void LoadMenuDesignSettings() +void LoadMenuDesignSettings(void) { char *filename_base = UNDEFINED_FILENAME, *filename_local; @@ -10275,7 +10275,7 @@ void LoadMenuDesignSettings() InitMenuDesignSettings_SpecialPostProcessing(); } -void LoadMenuDesignSettings_AfterGraphics() +void LoadMenuDesignSettings_AfterGraphics(void) { InitMenuDesignSettings_SpecialPostProcessing_AfterGraphics(); } @@ -10477,7 +10477,7 @@ static boolean sound_info_listed(struct MusicFileInfo *list, char *basename) return music_info_listed_ext(list, basename, TRUE); } -void LoadMusicInfo() +void LoadMusicInfo(void) { char *music_directory = getCustomMusicDirectory(); int num_music = getMusicListSize(); @@ -10639,7 +10639,7 @@ void print_unknown_token_end(int token_nr) Error(ERR_INFO_LINE, "-"); } -void LoadHelpAnimInfo() +void LoadHelpAnimInfo(void) { char *filename = getHelpAnimFilename(); SetupFileList *setup_file_list = NULL, *list; @@ -10849,7 +10849,7 @@ void LoadHelpAnimInfo() #endif } -void LoadHelpTextInfo() +void LoadHelpTextInfo(void) { char *filename = getHelpTextFilename(); int i; @@ -10891,7 +10891,7 @@ void LoadHelpTextInfo() #define MAX_NUM_CONVERT_LEVELS 1000 -void ConvertLevels() +void ConvertLevels(void) { static LevelDirTree *convert_leveldir = NULL; static int convert_level_nr = -1; @@ -11003,7 +11003,7 @@ void ConvertLevels() /* create and save images for use in level sketches (raw BMP format) */ /* ------------------------------------------------------------------------- */ -void CreateLevelSketchImages() +void CreateLevelSketchImages(void) { #if defined(TARGET_SDL) Bitmap *bitmap1; diff --git a/src/files.h b/src/files.h index 9200e538..601fdbeb 100644 --- a/src/files.h +++ b/src/files.h @@ -30,8 +30,8 @@ void setElementChangeInfoToDefaults(struct ElementChangeInfo *); void copyElementInfo(struct ElementInfo *, struct ElementInfo *); char *getDefaultLevelFilename(int); -char *getLocalLevelTemplateFilename(); -char *getGlobalLevelTemplateFilename(); +char *getLocalLevelTemplateFilename(void); +char *getGlobalLevelTemplateFilename(void); void LoadLevelFromFilename(struct LevelInfo *, char *); void LoadLevel(int); @@ -39,7 +39,7 @@ void LoadLevelTemplate(int); void LoadLevelInfoOnly(int); void LoadNetworkLevel(struct NetworkLevelInfo *); void SaveLevel(int); -void SaveLevelTemplate(); +void SaveLevelTemplate(void); void SaveNativeLevel(struct LevelInfo *); void DumpLevel(struct LevelInfo *); boolean SaveLevelChecked(int); @@ -59,31 +59,31 @@ void LoadScore(int); void SaveScore(int); void LoadSetupFromFilename(char *); -void LoadSetup(); -void SaveSetup(); +void LoadSetup(void); +void SaveSetup(void); -void LoadSetup_AutoSetup(); -void SaveSetup_AutoSetup(); +void LoadSetup_AutoSetup(void); +void SaveSetup_AutoSetup(void); -void LoadSetup_EditorCascade(); -void SaveSetup_EditorCascade(); +void LoadSetup_EditorCascade(void); +void SaveSetup_EditorCascade(void); void SaveSetup_AddGameControllerMapping(char *); void setHideSetupEntry(void *); boolean hideSetupEntry(void *); -void LoadCustomElementDescriptions(); -void InitMenuDesignSettings_Static(); -void LoadMenuDesignSettings(); -void LoadMenuDesignSettings_AfterGraphics(); +void LoadCustomElementDescriptions(void); +void InitMenuDesignSettings_Static(void); +void LoadMenuDesignSettings(void); +void LoadMenuDesignSettings_AfterGraphics(void); void LoadUserDefinedEditorElementList(int **, int *); -void LoadMusicInfo(); -void LoadHelpAnimInfo(); -void LoadHelpTextInfo(); +void LoadMusicInfo(void); +void LoadHelpAnimInfo(void); +void LoadHelpTextInfo(void); -void ConvertLevels(); -void CreateLevelSketchImages(); +void ConvertLevels(void); +void CreateLevelSketchImages(void); void CreateCustomElementImages(char *); #endif /* FILES_H */ diff --git a/src/game.c b/src/game.c index e0f9c878..50cc34f2 100644 --- a/src/game.c +++ b/src/game.c @@ -1085,8 +1085,8 @@ static void PlayLevelSoundElementAction(int, int, int, int); static void PlayLevelSoundElementActionIfLoop(int, int, int, int); static void PlayLevelSoundActionIfLoop(int, int, int); static void StopLevelSoundActionIfLoop(int, int, int); -static void PlayLevelMusic(); -static void FadeLevelSoundsAndMusic(); +static void PlayLevelMusic(void); +static void FadeLevelSoundsAndMusic(void); static void HandleGameButtons(struct GadgetInfo *); @@ -1562,7 +1562,7 @@ static int playfield_scan_delta_y = 1; (x) += playfield_scan_delta_x) #ifdef DEBUG -void DEBUG_SetMaximumDynamite() +void DEBUG_SetMaximumDynamite(void) { int i; @@ -1573,7 +1573,7 @@ void DEBUG_SetMaximumDynamite() } #endif -static void InitPlayfieldScanModeVars() +static void InitPlayfieldScanModeVars(void) { if (game.use_reverse_scan_direction) { @@ -1636,7 +1636,7 @@ static void SetPlayerMoveSpeed(struct PlayerInfo *player, int move_stepsize, } } -void GetPlayerConfig() +void GetPlayerConfig(void) { GameFrameDelay = setup.game_frame_delay; @@ -2103,7 +2103,7 @@ int getPlayerInventorySize(int player_nr) return stored_player[player_nr].inventory_size; } -void InitGameControlValues() +void InitGameControlValues(void) { int i; @@ -2148,7 +2148,7 @@ void InitGameControlValues() sizeof(struct GamePanelOrderInfo), compareGamePanelOrderInfo); } -void UpdatePlayfieldElementCount() +void UpdatePlayfieldElementCount(void) { boolean use_element_count = FALSE; int i, j, x, y; @@ -2176,7 +2176,7 @@ void UpdatePlayfieldElementCount() element_info[j].element_count; } -void UpdateGameControlValues() +void UpdateGameControlValues(void) { int i, k; int time = (local_player->LevelSolved ? @@ -2507,7 +2507,7 @@ void UpdateGameControlValues() } } -void DisplayGameControlValues() +void DisplayGameControlValues(void) { boolean redraw_panel = FALSE; int i; @@ -2758,7 +2758,7 @@ void DisplayGameControlValues() SetGameStatus(GAME_MODE_PLAYING); } -void UpdateAndDisplayGameControlValues() +void UpdateAndDisplayGameControlValues(void) { if (tape.deactivate_display) return; @@ -2767,12 +2767,12 @@ void UpdateAndDisplayGameControlValues() DisplayGameControlValues(); } -void UpdateGameDoorValues() +void UpdateGameDoorValues(void) { UpdateGameControlValues(); } -void DrawGameDoorValues() +void DrawGameDoorValues(void) { DisplayGameControlValues(); } @@ -2786,7 +2786,7 @@ void DrawGameDoorValues() ============================================================================= */ -static void InitGameEngine() +static void InitGameEngine(void) { int i, j, k, l, x, y; @@ -3305,7 +3305,7 @@ static void DebugPrintPlayerStatus(char *message) } #endif -void InitGame() +void InitGame(void) { int full_lev_fieldx = lev_fieldx + (BorderElement != EL_EMPTY ? 2 : 0); int full_lev_fieldy = lev_fieldy + (BorderElement != EL_EMPTY ? 2 : 0); @@ -4449,7 +4449,7 @@ static void PlayerWins(struct PlayerInfo *player) player->LevelSolved_CountingHealth = player->health_final; } -void GameWon() +void GameWon(void) { static int time_count_steps; static int time, time_final; @@ -4662,7 +4662,7 @@ void GameWon() GameEnd(); } -void GameEnd() +void GameEnd(void) { int hi_pos; @@ -5135,7 +5135,7 @@ static void setMinimalPlayerBoundaries(int *sx1, int *sy1, int *sx2, int *sy2) } } -static boolean checkIfAllPlayersFitToScreen_RND() +static boolean checkIfAllPlayersFitToScreen_RND(void) { int sx1 = 0, sy1 = 0, sx2 = 0, sy2 = 0; @@ -5794,7 +5794,7 @@ void SplashAcid(int x, int y) PlayLevelSound(x, y, SND_ACID_SPLASHING); } -static void InitBeltMovement() +static void InitBeltMovement(void) { static int belt_base_element[4] = { @@ -6028,7 +6028,7 @@ static int getInvisibleFromInvisibleActiveElement(int element) element); } -static void RedrawAllLightSwitchesAndInvisibleElements() +static void RedrawAllLightSwitchesAndInvisibleElements(void) { int x, y; @@ -6089,7 +6089,7 @@ static void RedrawAllLightSwitchesAndInvisibleElements() } } -static void RedrawAllInvisibleElementsForLenses() +static void RedrawAllInvisibleElementsForLenses(void) { int x, y; @@ -6138,7 +6138,7 @@ static void RedrawAllInvisibleElementsForLenses() } } -static void RedrawAllInvisibleElementsForMagnifier() +static void RedrawAllInvisibleElementsForMagnifier(void) { int x, y; @@ -9144,7 +9144,7 @@ void CheckExitSP(int x, int y) PlayLevelSoundNearest(x, y, SND_CLASS_SP_EXIT_OPENING); } -static void CloseAllOpenTimegates() +static void CloseAllOpenTimegates(void) { int x, y; @@ -10779,7 +10779,7 @@ static void PlayPlayerSound(struct PlayerInfo *player) } } -static void PlayAllPlayersSound() +static void PlayAllPlayersSound(void) { int i; @@ -11060,7 +11060,7 @@ static void SetTapeActionFromMouseAction(byte *tape_action, tape_action[TAPE_ACTION_BUTTON] = mouse_action->button; } -static void CheckLevelTime() +static void CheckLevelTime(void) { int i; @@ -11243,7 +11243,7 @@ void StartGameActions(boolean init_network_game, boolean record_tape, InitGame(); } -void GameActionsExt() +void GameActionsExt(void) { #if 0 static unsigned int game_frame_delay = 0; @@ -11551,7 +11551,7 @@ void GameActionsExt() } } -static void GameActions_CheckSaveEngineSnapshot() +static void GameActions_CheckSaveEngineSnapshot(void) { if (!game.snapshot.save_snapshot) return; @@ -11562,14 +11562,14 @@ static void GameActions_CheckSaveEngineSnapshot() SaveEngineSnapshotToList(); } -void GameActions() +void GameActions(void) { GameActionsExt(); GameActions_CheckSaveEngineSnapshot(); } -void GameActions_EM_Main() +void GameActions_EM_Main(void) { byte effective_action[MAX_PLAYERS]; boolean warp_mode = (tape.playing && tape.warp_forward && !tape.pausing); @@ -11581,7 +11581,7 @@ void GameActions_EM_Main() GameActions_EM(effective_action, warp_mode); } -void GameActions_SP_Main() +void GameActions_SP_Main(void) { byte effective_action[MAX_PLAYERS]; boolean warp_mode = (tape.playing && tape.warp_forward && !tape.pausing); @@ -11601,19 +11601,19 @@ void GameActions_SP_Main() } } -void GameActions_MM_Main() +void GameActions_MM_Main(void) { boolean warp_mode = (tape.playing && tape.warp_forward && !tape.pausing); GameActions_MM(local_player->effective_mouse_action, warp_mode); } -void GameActions_RND_Main() +void GameActions_RND_Main(void) { GameActions_RND(); } -void GameActions_RND() +void GameActions_RND(void) { int magic_wall_x = 0, magic_wall_y = 0; int i, x, y, element, graphic, last_gfx_frame; @@ -12156,7 +12156,7 @@ static boolean AllPlayersInSight(struct PlayerInfo *player, int x, int y) return (max_x - min_x < SCR_FIELDX && max_y - min_y < SCR_FIELDY); } -static boolean AllPlayersInVisibleScreen() +static boolean AllPlayersInVisibleScreen(void) { int i; @@ -14461,7 +14461,7 @@ static boolean DropElement(struct PlayerInfo *player) static int *loop_sound_frame = NULL; static int *loop_sound_volume = NULL; -void InitPlayLevelSound() +void InitPlayLevelSound(void) { int num_sounds = getSoundListSize(); @@ -14564,7 +14564,7 @@ static void StopLevelSoundActionIfLoop(int x, int y, int action) StopSound(sound_effect); } -static int getLevelMusicNr() +static int getLevelMusicNr(void) { if (levelset.music[level_nr] != MUS_UNDEFINED) return levelset.music[level_nr]; /* from config file */ @@ -14572,12 +14572,12 @@ static int getLevelMusicNr() return MAP_NOCONF_MUSIC(level_nr); /* from music dir */ } -static void FadeLevelSounds() +static void FadeLevelSounds(void) { FadeSounds(); } -static void FadeLevelMusic() +static void FadeLevelMusic(void) { int music_nr = getLevelMusicNr(); char *curr_music = getCurrentlyPlayingMusicFilename(); @@ -14587,13 +14587,13 @@ static void FadeLevelMusic() FadeMusic(); } -void FadeLevelSoundsAndMusic() +void FadeLevelSoundsAndMusic(void) { FadeLevelSounds(); FadeLevelMusic(); } -static void PlayLevelMusic() +static void PlayLevelMusic(void) { int music_nr = getLevelMusicNr(); char *curr_music = getCurrentlyPlayingMusicFilename(); @@ -15010,7 +15010,7 @@ static struct EngineSnapshotInfo engine_snapshot_rnd; static char *snapshot_level_identifier = NULL; static int snapshot_level_nr = -1; -static void SaveEngineSnapshotValues_RND() +static void SaveEngineSnapshotValues_RND(void) { static int belt_base_active_element[4] = { @@ -15049,7 +15049,7 @@ static void SaveEngineSnapshotValues_RND() } } -static void LoadEngineSnapshotValues_RND() +static void LoadEngineSnapshotValues_RND(void) { unsigned int num_random_calls = game.num_random_calls; int i, j; @@ -15095,7 +15095,7 @@ static void LoadEngineSnapshotValues_RND() } } -void FreeEngineSnapshotSingle() +void FreeEngineSnapshotSingle(void) { FreeSnapshotSingle(); @@ -15103,12 +15103,12 @@ void FreeEngineSnapshotSingle() snapshot_level_nr = -1; } -void FreeEngineSnapshotList() +void FreeEngineSnapshotList(void) { FreeSnapshotList(); } -ListNode *SaveEngineSnapshotBuffers() +ListNode *SaveEngineSnapshotBuffers(void) { ListNode *buffers = NULL; @@ -15217,7 +15217,7 @@ ListNode *SaveEngineSnapshotBuffers() return buffers; } -void SaveEngineSnapshotSingle() +void SaveEngineSnapshotSingle(void) { ListNode *buffers = SaveEngineSnapshotBuffers(); @@ -15229,7 +15229,7 @@ void SaveEngineSnapshotSingle() snapshot_level_nr = level_nr; } -boolean CheckSaveEngineSnapshotToList() +boolean CheckSaveEngineSnapshotToList(void) { boolean save_snapshot = ((game.snapshot.mode == SNAPSHOT_MODE_EVERY_STEP) || @@ -15245,7 +15245,7 @@ boolean CheckSaveEngineSnapshotToList() return save_snapshot; } -void SaveEngineSnapshotToList() +void SaveEngineSnapshotToList(void) { if (game.snapshot.mode == SNAPSHOT_MODE_OFF || tape.quick_resume) @@ -15257,14 +15257,14 @@ void SaveEngineSnapshotToList() SaveSnapshotToList(buffers); } -void SaveEngineSnapshotToListInitial() +void SaveEngineSnapshotToListInitial(void) { FreeEngineSnapshotList(); SaveEngineSnapshotToList(); } -void LoadEngineSnapshotValues() +void LoadEngineSnapshotValues(void) { /* restore special values from snapshot structure */ @@ -15278,7 +15278,7 @@ void LoadEngineSnapshotValues() LoadEngineSnapshotValues_MM(); } -void LoadEngineSnapshotSingle() +void LoadEngineSnapshotSingle(void) { LoadSnapshotSingle(); @@ -15299,13 +15299,13 @@ void LoadEngineSnapshot_Redo(int steps) LoadEngineSnapshotValues(); } -boolean CheckEngineSnapshotSingle() +boolean CheckEngineSnapshotSingle(void) { return (strEqual(snapshot_level_identifier, leveldir_current->identifier) && snapshot_level_nr == level_nr); } -boolean CheckEngineSnapshotList() +boolean CheckEngineSnapshotList(void) { return CheckSnapshotList(); } @@ -15410,7 +15410,7 @@ static struct } }; -void CreateGameButtons() +void CreateGameButtons(void) { int i; @@ -15496,7 +15496,7 @@ void CreateGameButtons() } } -void FreeGameButtons() +void FreeGameButtons(void) { int i; @@ -15515,7 +15515,7 @@ static void UnmapGameButtonsAtSamePosition(int id) UnmapGadget(game_gadget[i]); } -static void UnmapGameButtonsAtSamePosition_All() +static void UnmapGameButtonsAtSamePosition_All(void) { if (setup.show_snapshot_buttons) { @@ -15548,7 +15548,7 @@ static void MapGameButtonsAtSamePosition(int id) UnmapGameButtonsAtSamePosition_All(); } -void MapUndoRedoButtons() +void MapUndoRedoButtons(void) { UnmapGameButtonsAtSamePosition(GAME_CTRL_ID_UNDO); UnmapGameButtonsAtSamePosition(GAME_CTRL_ID_REDO); @@ -15559,7 +15559,7 @@ void MapUndoRedoButtons() ModifyGadget(game_gadget[GAME_CTRL_ID_PAUSE2], GDI_CHECKED, TRUE, GDI_END); } -void UnmapUndoRedoButtons() +void UnmapUndoRedoButtons(void) { UnmapGadget(game_gadget[GAME_CTRL_ID_UNDO]); UnmapGadget(game_gadget[GAME_CTRL_ID_REDO]); @@ -15628,37 +15628,37 @@ void RedrawSoundButtonGadget(int id) RedrawGadget(game_gadget[id2]); } -void MapGameButtons() +void MapGameButtons(void) { MapGameButtonsExt(FALSE); } -void UnmapGameButtons() +void UnmapGameButtons(void) { UnmapGameButtonsExt(FALSE); } -void RedrawGameButtons() +void RedrawGameButtons(void) { RedrawGameButtonsExt(FALSE); } -void MapGameButtonsOnTape() +void MapGameButtonsOnTape(void) { MapGameButtonsExt(TRUE); } -void UnmapGameButtonsOnTape() +void UnmapGameButtonsOnTape(void) { UnmapGameButtonsExt(TRUE); } -void RedrawGameButtonsOnTape() +void RedrawGameButtonsOnTape(void) { RedrawGameButtonsExt(TRUE); } -void GameUndoRedoExt() +void GameUndoRedoExt(void) { ClearPlayerAction(); diff --git a/src/game.h b/src/game.h index d31d0695..b6e9f5b0 100644 --- a/src/game.h +++ b/src/game.h @@ -362,7 +362,7 @@ extern struct PlayerInfo stored_player[MAX_PLAYERS], *local_player; #ifdef DEBUG -void DEBUG_SetMaximumDynamite(); +void DEBUG_SetMaximumDynamite(void); #endif void GetPlayerConfig(void); @@ -373,10 +373,10 @@ int getPlayerInventorySize(int); void DrawGameValue_Time(int); void DrawGameDoorValues(void); -void UpdateAndDisplayGameControlValues(); +void UpdateAndDisplayGameControlValues(void); -void InitGameSound(); -void InitGame(); +void InitGameSound(void); +void InitGame(void); void UpdateEngineValues(int, int, int, int); void GameWon(void); @@ -390,15 +390,15 @@ void DrawDynamite(int, int); void StartGameActions(boolean, boolean, int); void GameActions(void); -void GameActions_EM_Main(); -void GameActions_SP_Main(); -void GameActions_MM_Main(); -void GameActions_RND_Main(); -void GameActions_RND(); +void GameActions_EM_Main(void); +void GameActions_SP_Main(void); +void GameActions_MM_Main(void); +void GameActions_RND_Main(void); +void GameActions_RND(void); void ScrollLevel(int, int); -void InitPlayLevelSound(); +void InitPlayLevelSound(void); void PlayLevelSound_EM(int, int, int, int); void PlayLevelSound_SP(int, int, int, int); void PlayLevelSound_MM(int, int, int, int); @@ -416,26 +416,26 @@ void RequestRestartGame(char *); unsigned int InitEngineRandom_RND(int); unsigned int RND(int); -void FreeEngineSnapshotSingle(); -void FreeEngineSnapshotList(); -void LoadEngineSnapshotSingle(); -void SaveEngineSnapshotSingle(); -boolean CheckSaveEngineSnapshotToList(); -void SaveEngineSnapshotToList(); -void SaveEngineSnapshotToListInitial(); -boolean CheckEngineSnapshotSingle(); -boolean CheckEngineSnapshotList(); - -void CreateGameButtons(); -void FreeGameButtons(); -void MapUndoRedoButtons(); -void UnmapUndoRedoButtons(); -void MapGameButtons(); -void UnmapGameButtons(); -void RedrawGameButtons(); -void MapGameButtonsOnTape(); -void UnmapGameButtonsOnTape(); -void RedrawGameButtonsOnTape(); +void FreeEngineSnapshotSingle(void); +void FreeEngineSnapshotList(void); +void LoadEngineSnapshotSingle(void); +void SaveEngineSnapshotSingle(void); +boolean CheckSaveEngineSnapshotToList(void); +void SaveEngineSnapshotToList(void); +void SaveEngineSnapshotToListInitial(void); +boolean CheckEngineSnapshotSingle(void); +boolean CheckEngineSnapshotList(void); + +void CreateGameButtons(void); +void FreeGameButtons(void); +void MapUndoRedoButtons(void); +void UnmapUndoRedoButtons(void); +void MapGameButtons(void); +void UnmapGameButtons(void); +void RedrawGameButtons(void); +void MapGameButtonsOnTape(void); +void UnmapGameButtonsOnTape(void); +void RedrawGameButtonsOnTape(void); void HandleSoundButtonKeys(Key); diff --git a/src/game_em/export.h b/src/game_em/export.h index 69c92d8e..d0056ca9 100644 --- a/src/game_em/export.h +++ b/src/game_em/export.h @@ -734,27 +734,27 @@ 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(); -extern void em_close_all(); +extern void em_open_all(void); +extern void em_close_all(void); -extern void InitGfxBuffers_EM(); +extern void InitGfxBuffers_EM(void); -extern void InitGameEngine_EM(); +extern void InitGameEngine_EM(void); extern void GameActions_EM(byte *, boolean); extern unsigned int InitEngineRandom_EM(int); -extern void setLevelInfoToDefaults_EM(); +extern void setLevelInfoToDefaults_EM(void); extern boolean LoadNativeLevel_EM(char *, boolean); -extern int getFieldbufferOffsetX_EM(); -extern int getFieldbufferOffsetY_EM(); +extern int getFieldbufferOffsetX_EM(void); +extern int getFieldbufferOffsetY_EM(void); extern void BackToFront_EM(void); extern void BlitScreenToBitmap_EM(Bitmap *); extern void RedrawPlayfield_EM(boolean); -extern void LoadEngineSnapshotValues_EM(); -extern void SaveEngineSnapshotValues_EM(); +extern void LoadEngineSnapshotValues_EM(void); +extern void SaveEngineSnapshotValues_EM(void); #endif /* EXPORT_H */ diff --git a/src/game_em/graphics.c b/src/game_em/graphics.c index fee2a181..c1b02110 100644 --- a/src/game_em/graphics.c +++ b/src/game_em/graphics.c @@ -37,12 +37,12 @@ int screen_x, screen_y; /* current scroll position */ static int screentiles[MAX_PLAYFIELD_HEIGHT + 2][MAX_PLAYFIELD_WIDTH + 2]; static int crumbled_state[MAX_PLAYFIELD_HEIGHT + 2][MAX_PLAYFIELD_WIDTH + 2]; -int getFieldbufferOffsetX_EM() +int getFieldbufferOffsetX_EM(void) { return screen_x % TILEX; } -int getFieldbufferOffsetY_EM() +int getFieldbufferOffsetY_EM(void) { return screen_y % TILEY; } @@ -501,7 +501,7 @@ static void setMinimalPlayerBoundaries(int *sx1, int *sy1, int *sx2, int *sy2) } } -boolean checkIfAllPlayersFitToScreen() +boolean checkIfAllPlayersFitToScreen(void) { int sx1 = 0, sy1 = 0, sx2 = 0, sy2 = 0; diff --git a/src/game_em/init.c b/src/game_em/init.c index 0d4c3139..699e4b69 100644 --- a/src/game_em/init.c +++ b/src/game_em/init.c @@ -24,8 +24,8 @@ struct GameInfo_EM game_em; char *progname; char *arg_basedir; -extern void tab_generate(); -extern void tab_generate_graphics_info_em(); +extern void tab_generate(void); +extern void tab_generate_graphics_info_em(void); int open_all(void) { @@ -39,14 +39,14 @@ int open_all(void) return 0; } -void InitGfxBuffers_EM() +void InitGfxBuffers_EM(void) { ReCreateBitmap(&screenBitmap, MAX_BUF_XSIZE * TILEX, MAX_BUF_YSIZE * TILEY); global_em_info.screenbuffer = screenBitmap; } -void em_open_all() +void em_open_all(void) { /* pre-calculate some data */ tab_generate(); diff --git a/src/game_em/input.c b/src/game_em/input.c index 4a2be29e..27814ee8 100644 --- a/src/game_em/input.c +++ b/src/game_em/input.c @@ -58,7 +58,7 @@ void game_init_vars(void) Boom = Index[3]; } -void InitGameEngine_EM() +void InitGameEngine_EM(void) { prepare_em_level(); @@ -67,7 +67,7 @@ void InitGameEngine_EM() RedrawPlayfield_EM(FALSE); } -void UpdateGameDoorValues_EM() +void UpdateGameDoorValues_EM(void) { } @@ -167,7 +167,7 @@ void readjoy(byte action, struct PLAYER *ply) ply->joy_snap = snap; } -void SaveEngineSnapshotValues_EM() +void SaveEngineSnapshotValues_EM(void) { int i, j, k; @@ -194,7 +194,7 @@ void SaveEngineSnapshotValues_EM() engine_snapshot_em.Array[i][j][k] = Array[i][j][k]; } -void LoadEngineSnapshotValues_EM() +void LoadEngineSnapshotValues_EM(void) { int i, j, k; diff --git a/src/game_em/synchro_1.c b/src/game_em/synchro_1.c index 7852eb74..475fea1c 100644 --- a/src/game_em/synchro_1.c +++ b/src/game_em/synchro_1.c @@ -10,7 +10,7 @@ #define USE_CHANGED_ACID_STUFF 1 -extern boolean checkIfAllPlayersFitToScreen(); +extern boolean checkIfAllPlayersFitToScreen(void); static void check_player(struct PLAYER *); static void kill_player(struct PLAYER *); diff --git a/src/game_em/tab_generate.c b/src/game_em/tab_generate.c index 95784516..c9b950e1 100644 --- a/src/game_em/tab_generate.c +++ b/src/game_em/tab_generate.c @@ -4453,7 +4453,7 @@ void create_tab(int *invert, unsigned char *array) array[i] = buffer[i]; } -void create_explode() +void create_explode(void) { int i; int *tile = tile_explode; @@ -4476,7 +4476,7 @@ void create_explode() tab_explode_dynamite[i] = buffer[i]; } -void create_obj() +void create_obj(void) { int i, j; int *map = obj_map; @@ -4507,7 +4507,7 @@ void create_obj() map_obj[i][j] = buffer[7 - i][j]; } -void create_obj_graphics_info_em() +void create_obj_graphics_info_em(void) { int i, j; @@ -4543,7 +4543,7 @@ void create_obj_graphics_info_em() } } -void create_spr() +void create_spr(void) { int i, j, k; int *map = spr_map; @@ -4564,7 +4564,7 @@ void create_spr() map_spr[i][j][k] = buffer[i][7 - j][k]; } -void create_spr_graphics_info_em() +void create_spr_graphics_info_em(void) { int i, j, k; @@ -4599,7 +4599,7 @@ void create_spr_graphics_info_em() } } -void tab_generate() +void tab_generate(void) { create_tab(tile_blank, tab_blank); create_tab(tile_acid, tab_acid); @@ -4610,7 +4610,7 @@ void tab_generate() create_spr(); } -void tab_generate_graphics_info_em() +void tab_generate_graphics_info_em(void) { create_obj_graphics_info_em(); create_spr_graphics_info_em(); diff --git a/src/game_mm/export.h b/src/game_mm/export.h index 2647e829..ccb449d4 100644 --- a/src/game_mm/export.h +++ b/src/game_mm/export.h @@ -219,35 +219,35 @@ extern struct EngineSnapshotInfo_MM engine_snapshot_mm; extern short Ur[MM_MAX_PLAYFIELD_WIDTH][MM_MAX_PLAYFIELD_HEIGHT]; -extern void mm_open_all(); -extern void mm_close_all(); +extern void mm_open_all(void); +extern void mm_close_all(void); -void InitElementProperties_MM(); +void InitElementProperties_MM(void); -extern void InitGfxBuffers_MM(); +extern void InitGfxBuffers_MM(void); -extern void InitGameEngine_MM(); -extern void InitGameActions_MM(); +extern void InitGameEngine_MM(void); +extern void InitGameActions_MM(void); extern void GameActions_MM(struct MouseActionInfo, boolean); -extern void DrawLaser_MM(); +extern void DrawLaser_MM(void); extern boolean ClickElement(int, int, int); extern unsigned int InitEngineRandom_MM(int); -extern void setLevelInfoToDefaults_MM(); -extern void copyInternalEngineVars_MM(); +extern void setLevelInfoToDefaults_MM(void); +extern void copyInternalEngineVars_MM(void); extern boolean LoadNativeLevel_MM(char *, boolean); extern void SaveNativeLevel_MM(char *); -extern int getFieldbufferOffsetX_MM(); -extern int getFieldbufferOffsetY_MM(); +extern int getFieldbufferOffsetX_MM(void); +extern int getFieldbufferOffsetY_MM(void); extern void BlitScreenToBitmap_MM(Bitmap *); -extern void RedrawPlayfield_MM(); +extern void RedrawPlayfield_MM(void); -extern void LoadEngineSnapshotValues_MM(); +extern void LoadEngineSnapshotValues_MM(void); extern void SaveEngineSnapshotValues_MM(ListNode **); extern int getButtonFromTouchPosition(int, int, int, int); diff --git a/src/game_mm/mm_files.c b/src/game_mm/mm_files.c index fa47d1f4..dee9445a 100644 --- a/src/game_mm/mm_files.c +++ b/src/game_mm/mm_files.c @@ -88,7 +88,7 @@ static void WriteChunk_MM_VERS(FILE *file, int file_version, int game_version) fputc(0, file); /* not used */ } -void setLevelInfoToDefaults_MM() +void setLevelInfoToDefaults_MM(void) { int i, x, y; diff --git a/src/game_mm/mm_game.c b/src/game_mm/mm_game.c index b55b2bf0..ce811d88 100644 --- a/src/game_mm/mm_game.c +++ b/src/game_mm/mm_game.c @@ -357,7 +357,7 @@ static boolean CheckLaserPixel(int x, int y) return (pixel == WHITE_PIXEL); } -static void CheckExitMM() +static void CheckExitMM(void) { int exit_element = EL_EMPTY; int exit_x = 0; @@ -517,7 +517,7 @@ static void InitField(int x, int y, boolean init_game) } } -static void InitCycleElements_RotateSingleStep() +static void InitCycleElements_RotateSingleStep(void) { int i; @@ -542,7 +542,7 @@ static void InitCycleElements_RotateSingleStep() } } -static void InitLaser() +static void InitLaser(void) { int start_element = Feld[laser.start_edge.x][laser.start_edge.y]; int step = (IS_LASER(start_element) ? 4 : 0); @@ -580,7 +580,7 @@ static void InitLaser() native_mm_level.laser_blue * 0xFF); } -void InitGameEngine_MM() +void InitGameEngine_MM(void) { int i, x, y; @@ -667,7 +667,7 @@ void InitGameEngine_MM() DrawLevel_MM(); } -void InitGameActions_MM() +void InitGameActions_MM(void) { int num_init_game_frames = INIT_GAME_ACTIONS_DELAY; int cycle_steps_done = 0; @@ -778,7 +778,7 @@ void AddDamagedField(int ex, int ey) laser.num_damages++; } -boolean StepBehind() +boolean StepBehind(void) { if (laser.num_edges) { @@ -805,7 +805,7 @@ static int getMaskFromElement(int element) return IMG_MM_MASK_CIRCLE; } -int ScanPixel() +int ScanPixel(void) { int hit_mask = 0; @@ -882,7 +882,7 @@ int ScanPixel() return hit_mask; } -void ScanLaser() +void ScanLaser(void) { int element; int end = 0, rf = laser.num_edges; @@ -1342,7 +1342,7 @@ void DrawLaser(int start_edge, int mode) game_mm.laser_enabled = mode; } -void DrawLaser_MM() +void DrawLaser_MM(void) { DrawLaser(0, game_mm.laser_enabled); } @@ -2959,7 +2959,7 @@ void RotateMirror(int x, int y, int button) } } -void AutoRotateMirrors() +void AutoRotateMirrors(void) { int x, y; @@ -3776,7 +3776,7 @@ void GameActions_MM(struct MouseActionInfo action, boolean warp_mode) CheckSingleStepMode_MM(element_clicked, button_released); } -void MovePacMen() +void MovePacMen(void) { int mx, my, ox, oy, nx, ny; int element; @@ -3881,7 +3881,7 @@ void MovePacMen() } } -void GameWon_MM() +void GameWon_MM(void) { int hi_pos; boolean raise_level = FALSE; @@ -4000,7 +4000,7 @@ void GameWon_MM() BackToFront(); } -int NewHiScore_MM() +int NewHiScore_MM(void) { int k, l; int position = -1; @@ -4281,7 +4281,7 @@ void SaveEngineSnapshotValues_MM(ListNode **buffers) engine_snapshot_mm.overload_delay = overload_delay; } -void LoadEngineSnapshotValues_MM() +void LoadEngineSnapshotValues_MM(void) { int x, y; diff --git a/src/game_mm/mm_game.h b/src/game_mm/mm_game.h index 682d8aab..f8db06bb 100644 --- a/src/game_mm/mm_game.h +++ b/src/game_mm/mm_game.h @@ -59,8 +59,8 @@ boolean SnapField(struct PlayerInfo *, int, int); boolean PlaceBomb(struct PlayerInfo *); void PlaySoundLevel(int, int, int); -void CreateGameButtons(); -void UnmapGameButtons(); +void CreateGameButtons(void); +void UnmapGameButtons(void); void AddLaserEdge(int, int); void AddDamagedField(int, int); diff --git a/src/game_mm/mm_init.c b/src/game_mm/mm_init.c index 73ab232d..1906c97d 100644 --- a/src/game_mm/mm_init.c +++ b/src/game_mm/mm_init.c @@ -22,7 +22,7 @@ unsigned int InitEngineRandom_MM(int seed) return InitEngineRandom(seed); } -void InitElementProperties_MM() +void InitElementProperties_MM(void) { int i,j; @@ -235,11 +235,11 @@ void InitElementProperties_MM() Elementeigenschaften[i] |= EP_BIT_WALL; } -void mm_open_all() +void mm_open_all(void) { InitElementProperties_MM(); } -void mm_close_all() +void mm_close_all(void) { } diff --git a/src/game_mm/mm_tools.c b/src/game_mm/mm_tools.c index a5cd79da..54c25728 100644 --- a/src/game_mm/mm_tools.c +++ b/src/game_mm/mm_tools.c @@ -41,7 +41,7 @@ void SetDrawtoField_MM(int mode) SetTileCursorSXSY(cSX, cSY); } -void ClearWindow() +void ClearWindow(void) { ClearRectangle(backbuffer, REAL_SX, REAL_SY, FULL_SXSIZE, FULL_SYSIZE); @@ -423,7 +423,7 @@ void DrawField_MM(int x, int y) DrawElement_MM(x, y, element); } -void DrawLevel_MM() +void DrawLevel_MM(void) { int x,y; @@ -766,7 +766,7 @@ int el2gfx(int element) } } -void RedrawPlayfield_MM() +void RedrawPlayfield_MM(void) { DrawLevel_MM(); DrawLaser_MM(); diff --git a/src/game_mm/mm_tools.h b/src/game_mm/mm_tools.h index 3fdee2fb..d491c427 100644 --- a/src/game_mm/mm_tools.h +++ b/src/game_mm/mm_tools.h @@ -59,9 +59,9 @@ void SetDrawtoField_MM(int); -void BackToFront(); -void FadeToFront(); -void ClearWindow(); +void BackToFront(void); +void FadeToFront(void); +void ClearWindow(void); void MarkTileDirty(int, int); @@ -109,12 +109,12 @@ unsigned int OpenDoor(unsigned int); unsigned int CloseDoor(unsigned int); unsigned int GetDoorState(void); unsigned int MoveDoor(unsigned int); -void DrawSpecialEditorDoor_MM(); -void UndrawSpecialEditorDoor(); +void DrawSpecialEditorDoor_MM(void); +void UndrawSpecialEditorDoor(void); Pixel ReadPixel(DrawBuffer *, int, int); void SetRGB(unsigned int, unsigned short, unsigned short, unsigned short); -void CreateToolButtons(); +void CreateToolButtons(void); int get_base_element(int); int get_element_phase(int); diff --git a/src/game_sp/BugsTerminals.c b/src/game_sp/BugsTerminals.c index afa7345e..31bd9457 100644 --- a/src/game_sp/BugsTerminals.c +++ b/src/game_sp/BugsTerminals.c @@ -121,7 +121,7 @@ void subAnimateTerminals(int si) // Randomize random number generator // ========================================================================== -void subRandomize() +void subRandomize(void) { int Tick = MyGetTickCount(); @@ -134,7 +134,7 @@ void subRandomize() // Generate new random number, first method (see also sub_g_8580) // ========================================================================== -int subGetRandomNumber() +int subGetRandomNumber(void) { RandomSeed = (RandomSeed * 0x5E5 + 0x31) & 0xFFFF; diff --git a/src/game_sp/BugsTerminals.h b/src/game_sp/BugsTerminals.h index 572395c1..16b351f8 100644 --- a/src/game_sp/BugsTerminals.h +++ b/src/game_sp/BugsTerminals.h @@ -13,7 +13,7 @@ extern int TerminalMaxCycles; extern void subAnimateBugs(int si); extern void subAnimateTerminals(int si); -extern void subRandomize(); -extern int subGetRandomNumber(); +extern void subRandomize(void); +extern int subGetRandomNumber(void); #endif /* BUGSTERMINALS_H */ diff --git a/src/game_sp/DDScrollBuffer.c b/src/game_sp/DDScrollBuffer.c index f580d399..62257d03 100644 --- a/src/game_sp/DDScrollBuffer.c +++ b/src/game_sp/DDScrollBuffer.c @@ -13,7 +13,7 @@ int mScrollX_last, mScrollY_last; int ScreenBuffer[2 + MAX_PLAYFIELD_WIDTH + 2][2 + MAX_PLAYFIELD_HEIGHT + 2]; -int getFieldbufferOffsetX_SP() +int getFieldbufferOffsetX_SP(void) { int px = 2 * TILEX + (mScrollX - mScrollX_last) % TILEX; @@ -28,7 +28,7 @@ int getFieldbufferOffsetX_SP() return px; } -int getFieldbufferOffsetY_SP() +int getFieldbufferOffsetY_SP(void) { int py = 2 * TILEY + (mScrollY - mScrollY_last) % TILEY; @@ -43,7 +43,7 @@ int getFieldbufferOffsetY_SP() return py; } -void RestorePlayfield() +void RestorePlayfield(void) { int x1 = mScrollX / TILEX - 2; int y1 = mScrollY / TILEY - 2; @@ -148,12 +148,12 @@ static void ScrollPlayfieldIfNeededExt(boolean reset) } } -static void ScrollPlayfieldIfNeeded() +static void ScrollPlayfieldIfNeeded(void) { ScrollPlayfieldIfNeededExt(FALSE); } -void InitScrollPlayfield() +void InitScrollPlayfield(void) { ScrollPlayfieldIfNeededExt(TRUE); } diff --git a/src/game_sp/DDScrollBuffer.h b/src/game_sp/DDScrollBuffer.h index 20346b37..35166465 100644 --- a/src/game_sp/DDScrollBuffer.h +++ b/src/game_sp/DDScrollBuffer.h @@ -12,9 +12,9 @@ extern int mScrollX, mScrollY; extern int mScrollX_last, mScrollY_last; -extern void InitScrollPlayfield(); +extern void InitScrollPlayfield(void); extern void UpdatePlayfield(boolean); -extern void RestorePlayfield(); +extern void RestorePlayfield(void); extern void DDScrollBuffer_ScrollTo(int X, int Y); extern void DDScrollBuffer_ScrollTowards(int X, int Y, double Step); diff --git a/src/game_sp/Display.c b/src/game_sp/Display.c index ae9d26ea..ac2ed31a 100644 --- a/src/game_sp/Display.c +++ b/src/game_sp/Display.c @@ -14,7 +14,7 @@ int DisplayMinX, DisplayMaxX; int DisplayMinY, DisplayMaxY; -void subDisplayLevel() +void subDisplayLevel(void) { if (NoDisplayFlag || ! LevelLoaded) return; diff --git a/src/game_sp/Display.h b/src/game_sp/Display.h index dee7b16e..12856385 100644 --- a/src/game_sp/Display.h +++ b/src/game_sp/Display.h @@ -16,7 +16,7 @@ extern boolean NoDisplayFlag; extern int DisplayMinX, DisplayMaxX; extern int DisplayMinY, DisplayMaxY; -extern void subDisplayLevel(); +extern void subDisplayLevel(void); extern void ScrollTo(int, int); extern void ScrollTowards(int, int); extern void SoftScrollTo(int, int, int, int); diff --git a/src/game_sp/DoGameStuff.c b/src/game_sp/DoGameStuff.c index 7a7c1ac7..2ba35823 100644 --- a/src/game_sp/DoGameStuff.c +++ b/src/game_sp/DoGameStuff.c @@ -17,7 +17,7 @@ byte AnimationSubTable[SP_MAX_PLAYFIELD_SIZE]; // Do game stuff // ========================================================================== -void subDoGameStuff() +void subDoGameStuff(void) { int si, cx, dx, bl; int InfotronsNeeded_last = InfotronsNeeded; diff --git a/src/game_sp/DoGameStuff.h b/src/game_sp/DoGameStuff.h index 4fff48c0..facb8fc3 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(); +extern void subDoGameStuff(void); #endif /* DOGAMESTUFF_H */ diff --git a/src/game_sp/Explosions.c b/src/game_sp/Explosions.c index 7729d844..574991b2 100644 --- a/src/game_sp/Explosions.c +++ b/src/game_sp/Explosions.c @@ -270,7 +270,7 @@ void subClearFieldDueToExplosion(int si) // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ } -void subRedDiskReleaseExplosion() +void subRedDiskReleaseExplosion(void) { int al, X, Y, si; @@ -297,7 +297,7 @@ void subRedDiskReleaseExplosion() } } -void subFollowUpExplosions() +void subFollowUpExplosions(void) { int ax, si; diff --git a/src/game_sp/Explosions.h b/src/game_sp/Explosions.h index b62ea8b3..79b2b7c9 100644 --- a/src/game_sp/Explosions.h +++ b/src/game_sp/Explosions.h @@ -11,7 +11,7 @@ extern void ExplodeFieldSP(int); extern void subAnimateExplosion(int); extern void subClearFieldDueToExplosion(int); -extern void subFollowUpExplosions(); -extern void subRedDiskReleaseExplosion(); +extern void subFollowUpExplosions(void); +extern void subRedDiskReleaseExplosion(void); #endif /* EXPLOSIONS_H */ diff --git a/src/game_sp/Globals.c b/src/game_sp/Globals.c index 44affc03..d3813f00 100644 --- a/src/game_sp/Globals.c +++ b/src/game_sp/Globals.c @@ -151,7 +151,7 @@ boolean isSnappingSequence(int sequence) } } -void InitGlobals() +void InitGlobals(void) { InitPrecedingPlayfieldMemory(); @@ -204,7 +204,7 @@ int GetStretchY(int si) return StretchWidth * (si / FieldWidth); } -void PrepareLevel() +void PrepareLevel(void) { copyInternalEngineVars_SP(); diff --git a/src/game_sp/Globals.h b/src/game_sp/Globals.h index 5923bad5..89fe955e 100644 --- a/src/game_sp/Globals.h +++ b/src/game_sp/Globals.h @@ -270,9 +270,9 @@ extern int GetStretchX(int si); extern int GetStretchY(int si); extern int GetX(int si); extern int GetY(int si); -extern void InitGlobals(); +extern void InitGlobals(void); -extern void PrepareLevel(); +extern void PrepareLevel(void); extern int getSequenceLength(int sequence); extern boolean isSnappingSequence(int sequence); diff --git a/src/game_sp/InitGameConditions.c b/src/game_sp/InitGameConditions.c index 1313c49d..1641862f 100644 --- a/src/game_sp/InitGameConditions.c +++ b/src/game_sp/InitGameConditions.c @@ -10,7 +10,7 @@ // Init game conditions (variables) // ========================================================================== -void subInitGameConditions() +void subInitGameConditions(void) { MurphyVarFaceLeft = 0; KillMurphyFlag = 0; // no "kill Murphy" @@ -41,7 +41,7 @@ void subInitGameConditions() // Locate Murphy and init location. // ========================================================================== -void InitMurphyPos() +void InitMurphyPos(void) { int si; @@ -79,7 +79,7 @@ void InitMurphyPosB(int si) // Convert to easy symbols and reset Infotron count If not ThenVer62 // ========================================================================== -int subConvertToEasySymbols() +int subConvertToEasySymbols(void) { int ax, bx, cx, dx, i; int al; @@ -225,12 +225,12 @@ void ResetInfotronsNeeded(int dx) // Fetch and initialize a level // ========================================================================== -void subFetchAndInitLevelB() +void subFetchAndInitLevelB(void) { subFetchAndInitLevelA(); } -void subFetchAndInitLevelA() +void subFetchAndInitLevelA(void) { GameBusyFlag = 0; // restore scissors too subFetchAndInitLevel(); // fetch and initialize a level @@ -239,7 +239,7 @@ void subFetchAndInitLevelA() DemoKeyCode = 0; // delete last demo key! } -void subFetchAndInitLevel() +void subFetchAndInitLevel(void) { int InfoCountInLevel; diff --git a/src/game_sp/InitGameConditions.h b/src/game_sp/InitGameConditions.h index eb4249ff..7842848e 100644 --- a/src/game_sp/InitGameConditions.h +++ b/src/game_sp/InitGameConditions.h @@ -8,14 +8,14 @@ #include "global.h" -extern int subConvertToEasySymbols(); +extern int subConvertToEasySymbols(void); -extern void InitMurphyPos(); +extern void InitMurphyPos(void); extern void InitMurphyPosB(int); extern void ResetInfotronsNeeded(int); -extern void subFetchAndInitLevel(); -extern void subFetchAndInitLevelA(); -extern void subFetchAndInitLevelB(); -extern void subInitGameConditions(); +extern void subFetchAndInitLevel(void); +extern void subFetchAndInitLevelA(void); +extern void subFetchAndInitLevelB(void); +extern void subInitGameConditions(void); #endif /* INITGAMECONDITIONS_H */ diff --git a/src/game_sp/MainForm.c b/src/game_sp/MainForm.c index b6d7952c..85f7a129 100644 --- a/src/game_sp/MainForm.c +++ b/src/game_sp/MainForm.c @@ -6,13 +6,13 @@ static void DrawFrame(int Delta); -static void ReStretch(); +static void ReStretch(void); void DrawField(int X, int Y); void DrawFieldAnimated(int X, int Y); void DrawFieldNoAnimated(int X, int Y); -void DrawFrameIfNeeded() +void DrawFrameIfNeeded(void) { DrawFrame(0); @@ -21,7 +21,7 @@ void DrawFrameIfNeeded() DrawFrame(1); } -void DisplayLevel() +void DisplayLevel(void) { int X, Y; @@ -53,7 +53,7 @@ void DisplayLevel() } } -void Form_Load() +void Form_Load(void) { InitGlobals(); @@ -93,7 +93,7 @@ static void DrawFrame(int Delta) } } -static void RestoreFrame() +static void RestoreFrame(void) { int i, LX, tY, RX, BY; @@ -115,7 +115,7 @@ static void RestoreFrame() } } -void SetDisplayRegion() +void SetDisplayRegion(void) { if (! menBorder) { @@ -139,7 +139,7 @@ void SetDisplayRegion() } } -void menPlay_Click() +void menPlay_Click(void) { bPlaying = True; @@ -150,7 +150,7 @@ void menPlay_Click() subMainGameLoop_Init(); } -static void ReStretch() +static void ReStretch(void) { if (LevelLoaded) { @@ -168,7 +168,7 @@ static void ReStretch() ScrollTo(ScreenScrollXPos, ScreenScrollYPos); } -void SetScrollEdges() +void SetScrollEdges(void) { int border1_offset = (menBorder ? 1 : 2); int border2_offset = (menBorder ? 0 : TILESIZE / 2); diff --git a/src/game_sp/MainForm.h b/src/game_sp/MainForm.h index 24cbd46e..f75896a1 100644 --- a/src/game_sp/MainForm.h +++ b/src/game_sp/MainForm.h @@ -8,20 +8,20 @@ #include "global.h" -extern void DrawFrameIfNeeded(); +extern void DrawFrameIfNeeded(void); -extern void DisplayLevel(); +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); -extern void SetDisplayRegion(); -extern void SetScrollEdges(); +extern void SetDisplayRegion(void); +extern void SetScrollEdges(void); -extern void menPlay_Click(); +extern void menPlay_Click(void); -extern void Form_Load(); +extern void Form_Load(void); #endif /* MAINFORM_H */ diff --git a/src/game_sp/MainGameLoop.c b/src/game_sp/MainGameLoop.c index 61d5ed1c..dcbe62f4 100644 --- a/src/game_sp/MainGameLoop.c +++ b/src/game_sp/MainGameLoop.c @@ -16,7 +16,7 @@ boolean AutoScrollFlag; // Play a game/demo // ========================================================================== -void subMainGameLoop_Init() +void subMainGameLoop_Init(void) { // This was a bug in the original Supaplex: sometimes red disks could not // be released. This happened if Murphy was killed DURING a red disk release @@ -79,7 +79,7 @@ void subMainGameLoop_Main(byte action, boolean warp_mode) game_sp.GameOver = TRUE; } -void subCalculateScreenScrollPos() +void subCalculateScreenScrollPos(void) { int jump_pos = TILEX / 2; diff --git a/src/game_sp/MainGameLoop.h b/src/game_sp/MainGameLoop.h index 3ce85d27..19dcf9ea 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(); +extern void subMainGameLoop_Init(void); extern void subMainGameLoop_Main(byte, boolean); -extern void subCalculateScreenScrollPos(); +extern void subCalculateScreenScrollPos(void); #endif /* MAINGAMELOOP_H */ diff --git a/src/game_sp/export.h b/src/game_sp/export.h index 64700686..9522fdee 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(); -extern void sp_close_all(); +extern void sp_open_all(void); +extern void sp_close_all(void); -extern void InitPrecedingPlayfieldMemory(); -extern void InitGfxBuffers_SP(); +extern void InitPrecedingPlayfieldMemory(void); +extern void InitGfxBuffers_SP(void); -extern void InitGameEngine_SP(); +extern void InitGameEngine_SP(void); extern void GameActions_SP(byte *, boolean); extern unsigned int InitEngineRandom_SP(int); -extern void setLevelInfoToDefaults_SP(); -extern void copyInternalEngineVars_SP(); +extern void setLevelInfoToDefaults_SP(void); +extern void copyInternalEngineVars_SP(void); extern boolean LoadNativeLevel_SP(char *, int, boolean); extern void SaveNativeLevel_SP(char *); -extern int getFieldbufferOffsetX_SP(); -extern int getFieldbufferOffsetY_SP(); +extern int getFieldbufferOffsetX_SP(void); +extern int getFieldbufferOffsetY_SP(void); extern void BlitScreenToBitmap_SP(Bitmap *); extern void RedrawPlayfield_SP(boolean); -extern void LoadEngineSnapshotValues_SP(); +extern void LoadEngineSnapshotValues_SP(void); extern void SaveEngineSnapshotValues_SP(ListNode **); extern int map_key_RND_to_SP(int); extern int map_key_SP_to_RND(int); -extern int getRedDiskReleaseFlag_SP(); +extern int getRedDiskReleaseFlag_SP(void); #endif /* GAME_SP_EXPORT_H */ diff --git a/src/game_sp/file.c b/src/game_sp/file.c index 9fa3908a..d6d62c7b 100644 --- a/src/game_sp/file.c +++ b/src/game_sp/file.c @@ -7,13 +7,13 @@ /* functions for loading Supaplex level */ /* ------------------------------------------------------------------------- */ -void setTapeInfoToDefaults_SP() +void setTapeInfoToDefaults_SP(void) { native_sp_level.demo.is_available = FALSE; native_sp_level.demo.length = 0; } -void setLevelInfoToDefaults_SP() +void setLevelInfoToDefaults_SP(void) { LevelInfoType *header = &native_sp_level.header; char *empty_title = "-------- EMPTY --------"; @@ -58,7 +58,7 @@ void setLevelInfoToDefaults_SP() setTapeInfoToDefaults_SP(); } -void copyInternalEngineVars_SP() +void copyInternalEngineVars_SP(void) { int count; int i, x, y; diff --git a/src/game_sp/init.c b/src/game_sp/init.c index af364aca..eb14398c 100644 --- a/src/game_sp/init.c +++ b/src/game_sp/init.c @@ -57,16 +57,16 @@ Bitmap *bitmap_db_field_sp; struct EngineSnapshotInfo_SP engine_snapshot_sp; -void sp_open_all() +void sp_open_all(void) { Form_Load(); } -void sp_close_all() +void sp_close_all(void) { } -void InitPrecedingPlayfieldMemory() +void InitPrecedingPlayfieldMemory(void) { int preceding_buffer_size = 0; int i; @@ -78,7 +78,7 @@ void InitPrecedingPlayfieldMemory() game_sp.preceding_buffer_size = preceding_buffer_size; } -void InitGfxBuffers_SP() +void InitGfxBuffers_SP(void) { ReCreateBitmap(&bitmap_db_field_sp, FXSIZE, FYSIZE); } @@ -192,7 +192,7 @@ void SaveEngineSnapshotValues_SP(ListNode **buffers) SaveEngineSnapshotValues_SP_Murphy(buffers); } -void LoadEngineSnapshotValues_SP() +void LoadEngineSnapshotValues_SP(void) { int i; diff --git a/src/game_sp/main.c b/src/game_sp/main.c index c7239cc8..7aafb996 100644 --- a/src/game_sp/main.c +++ b/src/game_sp/main.c @@ -12,7 +12,7 @@ int GfxGraphic[SP_MAX_PLAYFIELD_WIDTH][SP_MAX_PLAYFIELD_HEIGHT]; int GfxFrame[SP_MAX_PLAYFIELD_WIDTH][SP_MAX_PLAYFIELD_HEIGHT]; -void InitGameEngine_SP() +void InitGameEngine_SP(void) { int x, y; @@ -64,7 +64,7 @@ void RedrawPlayfield_SP(boolean force_redraw) UpdatePlayfield(force_redraw); } -void UpdateGameDoorValues_SP() +void UpdateGameDoorValues_SP(void) { game_sp.time_played = TimerVar / FRAMES_PER_SECOND; game_sp.infotrons_still_needed = InfotronsNeeded; @@ -94,7 +94,7 @@ void GameActions_SP(byte action[MAX_PLAYERS], boolean warp_mode) GfxFrame[x][y]++; } -int getRedDiskReleaseFlag_SP() +int getRedDiskReleaseFlag_SP(void) { /* 0: when Murphy is moving (including the destination tile!) */ /* 1: when Murphy is not moving for at least one game frame */ diff --git a/src/game_sp/vb_lib.c b/src/game_sp/vb_lib.c index f7b402ae..16382f2b 100644 --- a/src/game_sp/vb_lib.c +++ b/src/game_sp/vb_lib.c @@ -9,7 +9,7 @@ /* helper functions for constructs not supported by C */ -int MyGetTickCount() +int MyGetTickCount(void) { return random_linux_libc(RANDOM_SIMPLE); } diff --git a/src/game_sp/vb_lib.h b/src/game_sp/vb_lib.h index 5c4852ce..12753d59 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(); +extern int MyGetTickCount(void); #endif /* VB_LIB_H */ diff --git a/src/init.c b/src/init.c index 3a2f9f31..c1faec09 100644 --- a/src/init.c +++ b/src/init.c @@ -88,7 +88,7 @@ static int copy_properties[][5] = static int get_graphic_parameter_value(char *, char *, int); -void DrawInitAnim() +void DrawInitAnim(void) { struct GraphicInfo *graphic_info_last = graphic_info; int graphic = 0; @@ -136,7 +136,7 @@ void DrawInitAnim() FrameCounter++; } -void FreeGadgets() +void FreeGadgets(void) { FreeLevelEditorGadgets(); FreeGameButtons(); @@ -145,7 +145,7 @@ void FreeGadgets() FreeScreenGadgets(); } -void InitGadgets() +void InitGadgets(void) { static boolean gadgets_initialized = FALSE; @@ -171,7 +171,7 @@ inline static void InitElementSmallImagesScaledUp(int graphic) CreateImageWithSmallImages(graphic, g->scale_up_factor, g->tile_size); } -void InitElementSmallImages() +void InitElementSmallImages(void) { print_timestamp_init("InitElementSmallImages"); @@ -233,7 +233,7 @@ inline static void InitScaledImagesScaledUp(int graphic) ScaleImage(graphic, g->scale_up_factor); } -void InitScaledImages() +void InitScaledImages(void) { struct PropertyMapping *property_mapping = getImageListPropertyMapping(); int num_property_mappings = getImageListPropertyMappingSize(); @@ -248,7 +248,7 @@ void InitScaledImages() InitScaledImagesScaledUp(property_mapping[i].artwork_index); } -void InitBitmapPointers() +void InitBitmapPointers(void) { int num_images = getImageListSize(); int i; @@ -259,7 +259,7 @@ void InitBitmapPointers() graphic_info[i].bitmap = graphic_info[i].bitmaps[IMG_BITMAP_STANDARD]; } -void InitImageTextures() +void InitImageTextures(void) { int i, j, k; @@ -333,7 +333,7 @@ static int getFontFromToken(char *token) return FONT_INITIAL_1; } -void InitFontGraphicInfo() +void InitFontGraphicInfo(void) { static struct FontBitmapInfo *font_bitmap_info = NULL; struct PropertyMapping *property_mapping = getImageListPropertyMapping(); @@ -572,7 +572,7 @@ void InitFontGraphicInfo() getFontBitmapID, getFontFromToken); } -void InitGlobalAnimGraphicInfo() +void InitGlobalAnimGraphicInfo(void) { struct PropertyMapping *property_mapping = getImageListPropertyMapping(); int num_property_mappings = getImageListPropertyMappingSize(); @@ -644,7 +644,7 @@ void InitGlobalAnimGraphicInfo() #endif } -void InitGlobalAnimSoundInfo() +void InitGlobalAnimSoundInfo(void) { struct PropertyMapping *property_mapping = getSoundListPropertyMapping(); int num_property_mappings = getSoundListPropertyMappingSize(); @@ -693,7 +693,7 @@ void InitGlobalAnimSoundInfo() #endif } -void InitGlobalAnimMusicInfo() +void InitGlobalAnimMusicInfo(void) { struct PropertyMapping *property_mapping = getMusicListPropertyMapping(); int num_property_mappings = getMusicListPropertyMappingSize(); @@ -742,7 +742,7 @@ void InitGlobalAnimMusicInfo() #endif } -void InitElementGraphicInfo() +void InitElementGraphicInfo(void) { struct PropertyMapping *property_mapping = getImageListPropertyMapping(); int num_property_mappings = getImageListPropertyMappingSize(); @@ -1123,7 +1123,7 @@ void InitElementGraphicInfo() UPDATE_BUSY_STATE(); } -void InitElementSpecialGraphicInfo() +void InitElementSpecialGraphicInfo(void) { struct PropertyMapping *property_mapping = getImageListPropertyMapping(); int num_property_mappings = getImageListPropertyMappingSize(); @@ -1639,7 +1639,7 @@ static void set_cloned_graphic_parameters(int graphic) } } -static void InitGraphicInfo() +static void InitGraphicInfo(void) { int fallback_graphic = IMG_CHAR_EXCLAM; int num_images = getImageListSize(); @@ -1819,7 +1819,7 @@ static void InitGraphicInfo() } } -static void InitGraphicCompatibilityInfo() +static void InitGraphicCompatibilityInfo(void) { struct FileInfo *fi_global_door = getImageListEntryFromImageID(IMG_GLOBAL_DOOR); @@ -1861,7 +1861,7 @@ static void InitGraphicCompatibilityInfo() InitGraphicCompatibilityInfo_Doors(); } -static void InitElementSoundInfo() +static void InitElementSoundInfo(void) { struct PropertyMapping *property_mapping = getSoundListPropertyMapping(); int num_property_mappings = getSoundListPropertyMappingSize(); @@ -1965,7 +1965,7 @@ static void InitElementSoundInfo() element_info[copy_properties[i][0]].sound[act]; } -static void InitGameModeSoundInfo() +static void InitGameModeSoundInfo(void) { int i; @@ -2014,7 +2014,7 @@ static void set_sound_parameters(int sound, char **parameter_raw) sound_info[sound].priority = parameter[SND_ARG_PRIORITY]; } -static void InitSoundInfo() +static void InitSoundInfo(void) { int *sound_effect_properties; int num_sounds = getSoundListSize(); @@ -2081,7 +2081,7 @@ static void InitSoundInfo() free(sound_effect_properties); } -static void InitGameModeMusicInfo() +static void InitGameModeMusicInfo(void) { struct PropertyMapping *property_mapping = getMusicListPropertyMapping(); int num_property_mappings = getMusicListPropertyMappingSize(); @@ -2164,7 +2164,7 @@ static void set_music_parameters(int music, char **parameter_raw) music_info[music].loop = parameter[MUS_ARG_MODE_LOOP]; } -static void InitMusicInfo() +static void InitMusicInfo(void) { int num_music = getMusicListSize(); int i, j; @@ -2200,7 +2200,7 @@ static void InitMusicInfo() } } -static void ReinitializeGraphics() +static void ReinitializeGraphics(void) { print_timestamp_init("ReinitializeGraphics"); @@ -2246,7 +2246,7 @@ static void ReinitializeGraphics() print_timestamp_done("ReinitializeGraphics"); } -static void ReinitializeSounds() +static void ReinitializeSounds(void) { InitSoundInfo(); /* sound properties mapping */ InitElementSoundInfo(); /* element game sound mapping */ @@ -2256,7 +2256,7 @@ static void ReinitializeSounds() InitPlayLevelSound(); /* internal game sound settings */ } -static void ReinitializeMusic() +static void ReinitializeMusic(void) { InitMusicInfo(); /* music properties mapping */ InitGameModeMusicInfo(); /* game mode music mapping */ @@ -2448,7 +2448,7 @@ void ResolveGroupElement(int group_element) ResolveGroupElementExt(group_element, 0); } -void InitElementPropertiesStatic() +void InitElementPropertiesStatic(void) { static boolean clipboard_elements_initialized = FALSE; @@ -4725,7 +4725,7 @@ void InitElementPropertiesEngine(int engine_version) InitElementGraphicInfo(); } -void InitElementPropertiesGfxElement() +void InitElementPropertiesGfxElement(void) { int i; @@ -4737,7 +4737,7 @@ void InitElementPropertiesGfxElement() } } -static void InitGlobal() +static void InitGlobal(void) { int graphic; int i; @@ -5081,7 +5081,7 @@ void Execute_Command(char *command) options.network = setup.network_mode = FALSE; } -static void InitSetup() +static void InitSetup(void) { LoadSetup(); /* global setup info */ LoadSetup_AutoSetup(); /* global auto setup info */ @@ -5095,13 +5095,13 @@ static void InitSetup() global.show_frames_per_second = TRUE; } -static void InitGameInfo() +static void InitGameInfo(void) { game.restart_level = FALSE; game.restart_game_message = NULL; } -static void InitPlayerInfo() +static void InitPlayerInfo(void) { int i; @@ -5117,7 +5117,7 @@ static void InitPlayerInfo() local_player->connected_locally = TRUE; } -static void InitArtworkInfo() +static void InitArtworkInfo(void) { LoadArtworkInfo(); } @@ -5143,7 +5143,7 @@ static char *get_level_id_suffix(int id_nr) return id_suffix; } -static void InitArtworkConfig() +static void InitArtworkConfig(void) { static char *image_id_prefix[MAX_NUM_ELEMENTS + NUM_FONTS + @@ -5263,14 +5263,14 @@ static void InitArtworkConfig() level_id_suffix, ignore_music_tokens); } -static void InitMixer() +static void InitMixer(void) { OpenAudio(); StartMixer(); } -static void InitVideoOverlay() +static void InitVideoOverlay(void) { // if virtual buttons are not loaded from setup file, repeat initializing // virtual buttons grid with default values now that video is initialized @@ -5281,7 +5281,7 @@ static void InitVideoOverlay() InitOverlayInfo(); } -void InitGfxBuffers() +void InitGfxBuffers(void) { static int win_xsize_last = -1; static int win_ysize_last = -1; @@ -5321,7 +5321,7 @@ void InitGfxBuffers() InitGfxBuffers_SP(); } -void InitGfx() +void InitGfx(void) { struct GraphicInfo *graphic_info_last = graphic_info; char *filename_font_initial = NULL; @@ -5490,7 +5490,7 @@ void InitGfx() init_last = init; } -void InitGfxBackground() +void InitGfxBackground(void) { fieldbuffer = bitmap_db_field; SetDrawtoField(DRAW_TO_BACKBUFFER); @@ -5500,7 +5500,7 @@ void InitGfxBackground() redraw_mask = REDRAW_ALL; } -static void InitLevelInfo() +static void InitLevelInfo(void) { LoadLevelInfo(); /* global level info */ LoadLevelSetup_LastSeries(); /* last played series info */ @@ -5518,12 +5518,12 @@ static void InitLevelInfo() SetLevelSetInfo(leveldir_current->identifier, level_nr); } -static void InitLevelArtworkInfo() +static void InitLevelArtworkInfo(void) { LoadLevelArtworkInfo(); } -static void InitImages() +static void InitImages(void) { print_timestamp_init("InitImages"); @@ -5626,7 +5626,7 @@ static void InitMusic(char *identifier) print_timestamp_done("InitMusic"); } -static void InitArtworkDone() +static void InitArtworkDone(void) { if (program.headless) return; @@ -5634,7 +5634,7 @@ static void InitArtworkDone() InitGlobalAnimations(); } -void InitNetworkSettings() +void InitNetworkSettings(void) { InitNetworkInfo(options.network || setup.network_mode, FALSE, @@ -5643,7 +5643,7 @@ void InitNetworkSettings() options.server_port); } -void InitNetworkServer() +void InitNetworkServer(void) { if (!network.enabled || network.connected) return; @@ -5742,7 +5742,7 @@ static boolean CheckArtworkTypeForRedefinedCustomElements(int type) return redefined_ce_found; } -static void InitOverrideArtwork() +static void InitOverrideArtwork(void) { boolean redefined_ce_found = FALSE; @@ -5943,7 +5943,7 @@ void ReloadCustomArtwork(int force_reload) LimitScreenUpdates(FALSE); } -void KeyboardAutoRepeatOffUnlessAutoplay() +void KeyboardAutoRepeatOffUnlessAutoplay(void) { if (global.autoplay_leveldir == NULL) KeyboardAutoRepeatOff(); @@ -6018,7 +6018,7 @@ void DisplayExitMessage(char *format, va_list ap) /* OpenAll() */ /* ========================================================================= */ -void OpenAll() +void OpenAll(void) { print_timestamp_init("OpenAll"); diff --git a/src/init.h b/src/init.h index 7a90d880..849f7a1a 100644 --- a/src/init.h +++ b/src/init.h @@ -33,18 +33,18 @@ boolean getBitfieldProperty(int *, int, int); void ResolveGroupElement(int); void InitElementPropertiesStatic(void); void InitElementPropertiesEngine(int); -void InitElementPropertiesGfxElement(); +void InitElementPropertiesGfxElement(void); void ReloadCustomArtwork(int); -void RedrawGlobalBorder(); +void RedrawGlobalBorder(void); -void KeyboardAutoRepeatOffUnlessAutoplay(); +void KeyboardAutoRepeatOffUnlessAutoplay(void); -void InitGfxBuffers(); -void InitGadgets(); -void InitImageTextures(); +void InitGfxBuffers(void); +void InitGadgets(void); +void InitImageTextures(void); -void InitNetworkServer(); +void InitNetworkServer(void); void DisplayExitMessage(char *, va_list); diff --git a/src/libgame/gadgets.c b/src/libgame/gadgets.c index 244db6ea..4cf008fc 100644 --- a/src/libgame/gadgets.c +++ b/src/libgame/gadgets.c @@ -60,7 +60,7 @@ static struct GadgetInfo *getGadgetInfoFromGadgetID(int id) return gi; } -static int getNewGadgetID() +static int getNewGadgetID(void) { int id = next_free_gadget_id++; @@ -1432,37 +1432,37 @@ static void MultiMapGadgets(int mode) } } -void UnmapAllGadgets() +void UnmapAllGadgets(void) { MultiMapGadgets(MULTIMAP_ALL | MULTIMAP_UNMAP); } -void RemapAllGadgets() +void RemapAllGadgets(void) { MultiMapGadgets(MULTIMAP_ALL | MULTIMAP_REMAP); } -boolean anyTextInputGadgetActive() +boolean anyTextInputGadgetActive(void) { return (last_gi && (last_gi->type & GD_TYPE_TEXT_INPUT) && last_gi->mapped); } -boolean anyTextAreaGadgetActive() +boolean anyTextAreaGadgetActive(void) { return (last_gi && (last_gi->type & GD_TYPE_TEXT_AREA) && last_gi->mapped); } -boolean anySelectboxGadgetActive() +boolean anySelectboxGadgetActive(void) { return (last_gi && (last_gi->type & GD_TYPE_SELECTBOX) && last_gi->mapped); } -boolean anyScrollbarGadgetActive() +boolean anyScrollbarGadgetActive(void) { return (last_gi && (last_gi->type & GD_TYPE_SCROLLBAR) && last_gi->mapped); } -boolean anyTextGadgetActive() +boolean anyTextGadgetActive(void) { return (anyTextInputGadgetActive() || anyTextAreaGadgetActive() || @@ -2274,7 +2274,7 @@ boolean HandleGadgetsKeyInput(Key key) return TRUE; } -void DumpGadgetIdentifiers() +void DumpGadgetIdentifiers(void) { struct GadgetInfo *gi; diff --git a/src/libgame/gadgets.h b/src/libgame/gadgets.h index 5102b792..3cfd3dbb 100644 --- a/src/libgame/gadgets.h +++ b/src/libgame/gadgets.h @@ -277,14 +277,14 @@ void RedrawGadget(struct GadgetInfo *); void MapGadget(struct GadgetInfo *); void UnmapGadget(struct GadgetInfo *); -void UnmapAllGadgets(); -void RemapAllGadgets(); - -boolean anyTextInputGadgetActive(); -boolean anyTextAreaGadgetActive(); -boolean anySelectboxGadgetActive(); -boolean anyScrollbarGadgetActive(); -boolean anyTextGadgetActive(); +void UnmapAllGadgets(void); +void RemapAllGadgets(void); + +boolean anyTextInputGadgetActive(void); +boolean anyTextAreaGadgetActive(void); +boolean anySelectboxGadgetActive(void); +boolean anyScrollbarGadgetActive(void); +boolean anyTextGadgetActive(void); void ClickOnGadget(struct GadgetInfo *, int); diff --git a/src/libgame/image.c b/src/libgame/image.c index 699093b7..60c06082 100644 --- a/src/libgame/image.c +++ b/src/libgame/image.c @@ -86,7 +86,7 @@ static void FreeImage(void *ptr) free(image); } -int getImageListSize() +int getImageListSize(void) { return (image_info->num_file_list_entries + image_info->num_dynamic_file_list_entries); @@ -160,17 +160,17 @@ int getImageIDFromToken(char *token) return -1; } -char *getImageConfigFilename() +char *getImageConfigFilename(void) { return getCustomArtworkConfigFilename(image_info->type); } -int getImageListPropertyMappingSize() +int getImageListPropertyMappingSize(void) { return image_info->num_property_mapping_entries; } -struct PropertyMapping *getImageListPropertyMapping() +struct PropertyMapping *getImageListPropertyMapping(void) { return image_info->property_mapping; } @@ -250,7 +250,7 @@ void InitImageList(struct ConfigInfo *config_list, int num_file_list_entries, image_info->free_artwork = FreeImage; } -void ReloadCustomImages() +void ReloadCustomImages(void) { print_timestamp_init("ReloadCustomImages"); @@ -382,7 +382,7 @@ void FreeImageTextures(int pos) img_info->contains_textures = FALSE; } -void FreeAllImageTextures() +void FreeAllImageTextures(void) { int num_images = getImageListSize(); int i; @@ -404,7 +404,7 @@ void ScaleImage(int pos, int zoom_factor) img_info->scaled_up = TRUE; } -void FreeAllImages() +void FreeAllImages(void) { FreeCustomArtworkLists(image_info); } diff --git a/src/libgame/image.h b/src/libgame/image.h index 25b83ce5..bb9b21ee 100644 --- a/src/libgame/image.h +++ b/src/libgame/image.h @@ -52,7 +52,7 @@ 0) -int getImageListSize(); +int getImageListSize(void); struct FileInfo *getImageListEntryFromImageID(int); Bitmap **getBitmapsFromImageID(int); int getOriginalImageWidthFromImageID(int); @@ -60,18 +60,18 @@ int getOriginalImageHeightFromImageID(int); char *getTokenFromImageID(int); char *getFilenameFromImageID(int); int getImageIDFromToken(char *); -char *getImageConfigFilename(); -int getImageListPropertyMappingSize(); -struct PropertyMapping *getImageListPropertyMapping(); +char *getImageConfigFilename(void); +int getImageListPropertyMappingSize(void); +struct PropertyMapping *getImageListPropertyMapping(void); void InitImageList(struct ConfigInfo *, int, struct ConfigTypeInfo *, char **, char **, char **, char **, char **); -void ReloadCustomImages(); +void ReloadCustomImages(void); void CreateImageWithSmallImages(int, int, int); void CreateImageTextures(int); -void FreeAllImageTextures(); +void FreeAllImageTextures(void); void ScaleImage(int, int); -void FreeAllImages(); +void FreeAllImages(void); #endif /* IMAGE_H */ diff --git a/src/libgame/joystick.c b/src/libgame/joystick.c index dfe1cca4..109ea9ea 100644 --- a/src/libgame/joystick.c +++ b/src/libgame/joystick.c @@ -173,7 +173,7 @@ static int JoystickPositionPercent(int center, int border, int actual) return percent; } -void CheckJoystickData() +void CheckJoystickData(void) { int i; int distance = 100; @@ -279,7 +279,7 @@ int JoystickButton(int player_nr) return JoystickButtonExt(player_nr, FALSE); } -int AnyJoystick() +int AnyJoystick(void) { int i; int result = 0; @@ -290,7 +290,7 @@ int AnyJoystick() return result; } -int AnyJoystickButton() +int AnyJoystickButton(void) { int i; int result = JOY_BUTTON_NOT_PRESSED; @@ -305,7 +305,7 @@ int AnyJoystickButton() return result; } -void DeactivateJoystick() +void DeactivateJoystick(void) { /* Temporarily deactivate joystick. This is needed for calibration screens, where the player has to select a joystick device that @@ -318,7 +318,7 @@ void DeactivateJoystick() joystick.status &= ~JOYSTICK_ACTIVE; } -void ActivateJoystick() +void ActivateJoystick(void) { /* reactivate temporarily deactivated joystick */ diff --git a/src/libgame/joystick.h b/src/libgame/joystick.h index 48202d2e..8cee40de 100644 --- a/src/libgame/joystick.h +++ b/src/libgame/joystick.h @@ -80,7 +80,7 @@ int JoystickButton(int); int AnyJoystick(void); int AnyJoystickButton(void); -void DeactivateJoystick(); -void ActivateJoystick(); +void DeactivateJoystick(void); +void ActivateJoystick(void); #endif /* JOYSTICK_H */ diff --git a/src/libgame/misc.c b/src/libgame/misc.c index 28cc8bd5..48fd6e12 100644 --- a/src/libgame/misc.c +++ b/src/libgame/misc.c @@ -336,7 +336,7 @@ boolean getTokenValueFromString(char *string, char **token, char **value) /* maximal allowed length of a command line option */ #define MAX_OPTION_LEN 256 -static unsigned int getCurrentMS() +static unsigned int getCurrentMS(void) { return SDL_GetTicks(); } @@ -558,7 +558,7 @@ static char *get_corrected_real_name(char *real_name) } #endif -char *getLoginName() +char *getLoginName(void) { static char *login_name = NULL; @@ -588,7 +588,7 @@ char *getLoginName() return login_name; } -char *getRealName() +char *getRealName(void) { static char *real_name = NULL; @@ -1141,7 +1141,7 @@ void SetError(char *format, ...) va_end(ap); } -char *GetError() +char *GetError(void) { return internal_error; } @@ -2073,7 +2073,7 @@ int get_player_nr_from_string(char *s) /* functions for generic lists */ /* ------------------------------------------------------------------------- */ -ListNode *newListNode() +ListNode *newListNode(void) { return checked_calloc(sizeof(ListNode)); } @@ -3877,7 +3877,7 @@ char *getLogFilename(char *basename) return getPath2(getUserGameDataDir(), basename); } -void OpenLogFiles() +void OpenLogFiles(void) { int i; @@ -3899,7 +3899,7 @@ void OpenLogFiles() } } -void CloseLogFiles() +void CloseLogFiles(void) { int i; @@ -3921,7 +3921,7 @@ void DumpLogFile(int nr) fclose(log_file); } -void NotifyUserAboutErrorFile() +void NotifyUserAboutErrorFile(void) { #if defined(PLATFORM_WIN32) char *title_text = getStringCat2(program.program_title, " Error Message"); @@ -3948,7 +3948,7 @@ void NotifyUserAboutErrorFile() #define DEBUG_TIME_IN_MICROSECONDS 0 #if DEBUG_TIME_IN_MICROSECONDS -static double Counter_Microseconds() +static double Counter_Microseconds(void) { static struct timeval base_time = { 0, 0 }; struct timeval current_time; diff --git a/src/libgame/misc.h b/src/libgame/misc.h index e71a8df2..0660811e 100644 --- a/src/libgame/misc.h +++ b/src/libgame/misc.h @@ -277,11 +277,11 @@ void ReloadCustomArtworkList(struct ArtworkListInfo *); void FreeCustomArtworkLists(struct ArtworkListInfo *); char *getLogFilename(char *); -void OpenLogFiles(); -void CloseLogFiles(); +void OpenLogFiles(void); +void CloseLogFiles(void); void DumpLogFile(int); -void NotifyUserAboutErrorFile(); +void NotifyUserAboutErrorFile(void); #if DEBUG void debug_print_timestamp(int, char *); diff --git a/src/libgame/sdl.c b/src/libgame/sdl.c index eee5d59a..882aa11c 100644 --- a/src/libgame/sdl.c +++ b/src/libgame/sdl.c @@ -555,7 +555,7 @@ inline static void SDLInitVideoBuffer_VideoBuffer(boolean fullscreen) SDLSetWindowTitle(); } -inline static void SDLInitVideoBuffer_DrawBuffer() +inline static void SDLInitVideoBuffer_DrawBuffer(void) { /* SDL cannot directly draw to the visible video framebuffer like X11, but always uses a backbuffer, which is then blitted to the visible @@ -843,7 +843,7 @@ boolean SDLSetVideoMode(boolean fullscreen) return success; } -void SDLSetWindowTitle() +void SDLSetWindowTitle(void) { #if defined(TARGET_SDL2) if (sdl_window == NULL) @@ -936,7 +936,7 @@ void SDLSetWindowFullscreen(boolean fullscreen) } } -void SDLSetDisplaySize() +void SDLSetDisplaySize(void) { SDL_Rect display_bounds; @@ -990,7 +990,7 @@ void SDLSetScreenSizeForRenderer(int width, int height) SDL_RenderSetLogicalSize(sdl_renderer, width, height); } -void SDLSetScreenProperties() +void SDLSetScreenProperties(void) { SDLSetScreenSizeAndOffsets(video.width, video.height); SDLSetScreenSizeForRenderer(video.screen_width, video.screen_height); @@ -1013,7 +1013,7 @@ void SDLSetScreenRenderingMode(char *screen_rendering_mode) #endif } -void SDLRedrawWindow() +void SDLRedrawWindow(void) { UpdateScreen_WithoutFrameDelay(NULL); } @@ -2607,7 +2607,7 @@ static int sdl_js_axis[MAX_PLAYERS][2]; static int sdl_js_button[MAX_PLAYERS][2]; static boolean sdl_is_controller[MAX_PLAYERS]; -void SDLClearJoystickState() +void SDLClearJoystickState(void) { int i, j; @@ -2848,7 +2848,7 @@ void HandleJoystickEvent(Event *event) } } -void SDLInitJoysticks() +void SDLInitJoysticks(void) { static boolean sdl_joystick_subsystem_initialized = FALSE; boolean print_warning = !sdl_joystick_subsystem_initialized; @@ -3151,7 +3151,7 @@ static void DrawTouchInputOverlay_ShowGridButtons(int alpha) SDL_SetRenderDrawColor(sdl_renderer, 0, 0, 0, 255); } -static void DrawTouchInputOverlay() +static void DrawTouchInputOverlay(void) { static SDL_Texture *texture = NULL; static boolean initialized = FALSE; diff --git a/src/libgame/sdl.h b/src/libgame/sdl.h index d7c6243c..19604188 100644 --- a/src/libgame/sdl.h +++ b/src/libgame/sdl.h @@ -459,7 +459,7 @@ void SDLSetScreenProperties(void); #endif void SDLSetScreenRenderingMode(char *); -void SDLRedrawWindow(); +void SDLRedrawWindow(void); void SDLSetWindowTitle(void); void SDLLimitScreenUpdates(boolean); @@ -497,7 +497,7 @@ void HandleJoystickEvent(Event *); void SDLInitJoysticks(void); boolean SDLReadJoystick(int, int *, int *, boolean *, boolean *); boolean SDLCheckJoystickOpened(int); -void SDLClearJoystickState(); +void SDLClearJoystickState(void); boolean SDLOpenJoystick(int); void SDLCloseJoystick(int); diff --git a/src/libgame/setup.c b/src/libgame/setup.c index e9f28486..b7c59ffd 100644 --- a/src/libgame/setup.c +++ b/src/libgame/setup.c @@ -157,7 +157,7 @@ static char *getLevelSetupDir(char *level_subdir) return levelsetup_dir; } -static char *getCacheDir() +static char *getCacheDir(void) { static char *cache_dir = NULL; @@ -167,7 +167,7 @@ static char *getCacheDir() return cache_dir; } -static char *getNetworkDir() +static char *getNetworkDir(void) { static char *network_dir = NULL; @@ -224,12 +224,12 @@ char *getNetworkLevelDir(char *level_subdir) return network_level_dir; } -char *getCurrentLevelDir() +char *getCurrentLevelDir(void) { return getLevelDirFromTreeInfo(leveldir_current); } -char *getNewUserLevelSubdir() +char *getNewUserLevelSubdir(void) { static char *new_level_subdir = NULL; char *subdir_prefix = getLoginName(); @@ -267,7 +267,7 @@ static char *getTapeDir(char *level_subdir) return tape_dir; } -static char *getSolutionTapeDir() +static char *getSolutionTapeDir(void) { static char *tape_dir = NULL; char *data_dir = getCurrentLevelDir(); @@ -339,7 +339,7 @@ static char *getClassicArtworkDir(int type) getDefaultMusicDir(MUS_CLASSIC_SUBDIR) : ""); } -static char *getUserGraphicsDir() +static char *getUserGraphicsDir(void) { static char *usergraphics_dir = NULL; @@ -349,7 +349,7 @@ static char *getUserGraphicsDir() return usergraphics_dir; } -static char *getUserSoundsDir() +static char *getUserSoundsDir(void) { static char *usersounds_dir = NULL; @@ -359,7 +359,7 @@ static char *getUserSoundsDir() return usersounds_dir; } -static char *getUserMusicDir() +static char *getUserMusicDir(void) { static char *usermusic_dir = NULL; @@ -576,7 +576,7 @@ char *getScoreFilename(int nr) return filename; } -char *getSetupFilename() +char *getSetupFilename(void) { static char *filename = NULL; @@ -587,12 +587,12 @@ char *getSetupFilename() return filename; } -char *getDefaultSetupFilename() +char *getDefaultSetupFilename(void) { return program.config_filename; } -char *getEditorSetupFilename() +char *getEditorSetupFilename(void) { static char *filename = NULL; @@ -608,7 +608,7 @@ char *getEditorSetupFilename() return filename; } -char *getHelpAnimFilename() +char *getHelpAnimFilename(void) { static char *filename = NULL; @@ -619,7 +619,7 @@ char *getHelpAnimFilename() return filename; } -char *getHelpTextFilename() +char *getHelpTextFilename(void) { static char *filename = NULL; @@ -630,7 +630,7 @@ char *getHelpTextFilename() return filename; } -char *getLevelSetInfoFilename() +char *getLevelSetInfoFilename(void) { static char *filename = NULL; char *basenames[] = @@ -1063,7 +1063,7 @@ void InitScoreDirectory(char *level_subdir) createDirectory(getScoreDir(level_subdir), "level score", permissions); } -static void SaveUserLevelInfo(); +static void SaveUserLevelInfo(void); void InitUserLevelDirectory(char *level_subdir) { @@ -1095,7 +1095,7 @@ void InitLevelSetupDirectory(char *level_subdir) createDirectory(getLevelSetupDir(level_subdir), "level setup", PERMS_PRIVATE); } -void InitCacheDirectory() +void InitCacheDirectory(void) { createDirectory(getUserGameDataDir(), "user data", PERMS_PRIVATE); createDirectory(getCacheDir(), "cache data", PERMS_PRIVATE); @@ -1106,7 +1106,7 @@ void InitCacheDirectory() /* some functions to handle lists of level and artwork directories */ /* ------------------------------------------------------------------------- */ -TreeInfo *newTreeInfo() +TreeInfo *newTreeInfo(void) { return checked_calloc(sizeof(TreeInfo)); } @@ -1433,7 +1433,7 @@ void sortTreeInfo(TreeInfo **node_first) #define FILE_PERMS_PUBLIC_ALL (MODE_R_ALL | MODE_W_ALL) -char *getHomeDir() +char *getHomeDir(void) { static char *dir = NULL; @@ -1522,7 +1522,7 @@ char *getUserGameDataDir(void) return user_game_data_dir; } -char *getSetupDir() +char *getSetupDir(void) { return getUserGameDataDir(); } @@ -1545,7 +1545,7 @@ static int posix_mkdir(const char *pathname, mode_t mode) #endif } -static boolean posix_process_running_setgid() +static boolean posix_process_running_setgid(void) { #if defined(PLATFORM_UNIX) return (getgid() != getegid()); @@ -1588,7 +1588,7 @@ void createDirectory(char *dir, char *text, int permission_class) posix_umask(last_umask); /* restore previous umask */ } -void InitUserDataDirectory() +void InitUserDataDirectory(void) { createDirectory(getUserGameDataDir(), "user data", PERMS_PRIVATE); } @@ -1832,7 +1832,7 @@ static int keys_are_equal(void *key1, void *key2) return (strEqual((char *)key1, (char *)key2)); } -SetupFileHash *newSetupFileHash() +SetupFileHash *newSetupFileHash(void) { SetupFileHash *new_hash = create_hashtable(16, 0.75, get_hash_from_key, keys_are_equal); @@ -2791,7 +2791,7 @@ static TreeInfo *createTopTreeInfoNode(TreeInfo *node_first) /* functions for handling level and custom artwork info cache */ /* -------------------------------------------------------------------------- */ -static void LoadArtworkInfoCache() +static void LoadArtworkInfoCache(void) { InitCacheDirectory(); @@ -2813,7 +2813,7 @@ static void LoadArtworkInfoCache() artworkinfo_cache_new = newSetupFileHash(); } -static void SaveArtworkInfoCache() +static void SaveArtworkInfoCache(void) { char *filename = getPath2(getCacheDir(), ARTWORKINFO_CACHE_FILE); @@ -3168,7 +3168,7 @@ static void LoadLevelInfoFromLevelDir(TreeInfo **node_first, level_directory); } -boolean AdjustGraphicsForEMC() +boolean AdjustGraphicsForEMC(void) { boolean settings_changed = FALSE; @@ -3178,7 +3178,7 @@ boolean AdjustGraphicsForEMC() return settings_changed; } -void LoadLevelInfo() +void LoadLevelInfo(void) { InitUserLevelDirectory(getLoginName()); @@ -3423,7 +3423,7 @@ static TreeInfo *getDummyArtworkInfo(int type) return artwork_new; } -void LoadArtworkInfo() +void LoadArtworkInfo(void) { LoadArtworkInfoCache(); @@ -3559,7 +3559,7 @@ void LoadArtworkInfoFromLevelInfo(ArtworkDirTree **artwork_node, } } -void LoadLevelArtworkInfo() +void LoadLevelArtworkInfo(void) { print_timestamp_init("LoadLevelArtworkInfo"); @@ -3704,7 +3704,7 @@ TreeInfo *getArtworkTreeInfoForUserLevelSet(int type) return getTreeInfoFromIdentifier(artwork_first_node, artwork_set); } -boolean checkIfCustomArtworkExistsForCurrentLevelSet() +boolean checkIfCustomArtworkExistsForCurrentLevelSet(void) { char *graphics_set = getArtworkIdentifierForUserLevelSet(ARTWORK_TYPE_GRAPHICS); @@ -3863,7 +3863,7 @@ boolean CreateUserLevelSet(char *level_subdir, char *level_name, return TRUE; } -static void SaveUserLevelInfo() +static void SaveUserLevelInfo(void) { CreateUserLevelSet(getLoginName(), getLoginName(), getRealName(), 100, FALSE); } @@ -3975,7 +3975,7 @@ char *getSetupLine(struct TokenInfo *token_info, char *prefix, int token_nr) return line; } -void LoadLevelSetup_LastSeries() +void LoadLevelSetup_LastSeries(void) { /* ----------------------------------------------------------------------- */ /* ~/./levelsetup.conf */ @@ -4055,17 +4055,17 @@ static void SaveLevelSetup_LastSeries_Ext(boolean deactivate_last_level_series) free(filename); } -void SaveLevelSetup_LastSeries() +void SaveLevelSetup_LastSeries(void) { SaveLevelSetup_LastSeries_Ext(FALSE); } -void SaveLevelSetup_LastSeries_Deactivate() +void SaveLevelSetup_LastSeries_Deactivate(void) { SaveLevelSetup_LastSeries_Ext(TRUE); } -static void checkSeriesInfo() +static void checkSeriesInfo(void) { static char *level_directory = NULL; Directory *dir; @@ -4087,7 +4087,7 @@ static void checkSeriesInfo() closeDirectory(dir); } -void LoadLevelSetup_SeriesInfo() +void LoadLevelSetup_SeriesInfo(void) { char *filename; SetupFileHash *level_setup_hash = NULL; @@ -4185,7 +4185,7 @@ void LoadLevelSetup_SeriesInfo() free(filename); } -void SaveLevelSetup_SeriesInfo() +void SaveLevelSetup_SeriesInfo(void) { char *filename; char *level_subdir = leveldir_current->subdir; diff --git a/src/libgame/setup.h b/src/libgame/setup.h index 90a53154..278269ab 100644 --- a/src/libgame/setup.h +++ b/src/libgame/setup.h @@ -253,7 +253,7 @@ void InitUserLevelDirectory(char *); void InitNetworkLevelDirectory(char *); void InitLevelSetupDirectory(char *); -TreeInfo *newTreeInfo(); +TreeInfo *newTreeInfo(void); TreeInfo *newTreeInfo_setDefaults(int); void pushTreeInfo(TreeInfo **, TreeInfo *); int numTreeInfo(TreeInfo *); @@ -301,7 +301,7 @@ SetupFileList *setListEntry(SetupFileList *, char *, char *); SetupFileList *addListEntry(SetupFileList *, char *, char *); SetupFileList *loadSetupFileList(char *); -SetupFileHash *newSetupFileHash(); +SetupFileHash *newSetupFileHash(void); void freeSetupFileHash(SetupFileHash *); char *getHashEntry(SetupFileHash *, char *); void setHashEntry(SetupFileHash *, char *, char *); @@ -313,7 +313,7 @@ char *getSetupLine(struct TokenInfo *, char *, int); unsigned int get_hash_from_key(void *); -boolean AdjustGraphicsForEMC(); +boolean AdjustGraphicsForEMC(void); void LoadLevelInfo(void); void LoadArtworkInfo(void); @@ -321,14 +321,14 @@ void LoadLevelArtworkInfo(void); char *getArtworkIdentifierForUserLevelSet(int); TreeInfo *getArtworkTreeInfoForUserLevelSet(int); -boolean checkIfCustomArtworkExistsForCurrentLevelSet(); +boolean checkIfCustomArtworkExistsForCurrentLevelSet(void); void AddUserLevelSetToLevelInfo(char *); boolean UpdateUserLevelSet(char *, char *, char *, int); boolean CreateUserLevelSet(char *, char *, char *, int, boolean); void LoadLevelSetup_LastSeries(void); void SaveLevelSetup_LastSeries(void); -void SaveLevelSetup_LastSeries_Deactivate(); +void SaveLevelSetup_LastSeries_Deactivate(void); void LoadLevelSetup_SeriesInfo(void); void SaveLevelSetup_SeriesInfo(void); diff --git a/src/libgame/snapshot.c b/src/libgame/snapshot.c index a3c2162d..221b9b61 100644 --- a/src/libgame/snapshot.c +++ b/src/libgame/snapshot.c @@ -88,7 +88,7 @@ static void FreeSnapshot(void *snapshot_buffers_ptr) FreeSnapshotBuffers(snapshot_buffers_ptr); } -void FreeSnapshotSingle() +void FreeSnapshotSingle(void) { FreeSnapshotBuffers(snapshot_single); @@ -111,7 +111,7 @@ static void FreeSnapshotList_UpToNode(ListNode *node) } } -void FreeSnapshotList() +void FreeSnapshotList(void) { #if DEBUG_SNAPSHOTS printf("::: FreeSnapshotList()\n"); @@ -127,7 +127,7 @@ void FreeSnapshotList() snapshot_current = NULL; } -void ReduceSnapshotList() +void ReduceSnapshotList(void) { #if DEBUG_SNAPSHOTS printf("::: (Reducing number of snapshots from %d ", @@ -202,7 +202,7 @@ void SaveSnapshotToList(ListNode *snapshot_buffers) ReduceSnapshotList(); } -boolean LoadSnapshotSingle() +boolean LoadSnapshotSingle(void) { if (snapshot_single) { @@ -252,7 +252,7 @@ boolean LoadSnapshotFromList_Newer(int steps) return FALSE; } -boolean CheckSnapshotList() +boolean CheckSnapshotList(void) { return (snapshot_list ? TRUE : FALSE); } diff --git a/src/libgame/snapshot.h b/src/libgame/snapshot.h index 54ce381a..cd59d7e3 100644 --- a/src/libgame/snapshot.h +++ b/src/libgame/snapshot.h @@ -35,11 +35,11 @@ void FreeSnapshotBuffers(ListNode *); void SaveSnapshotSingle(ListNode *); void SaveSnapshotToList(ListNode *); -boolean LoadSnapshotSingle(); +boolean LoadSnapshotSingle(void); boolean LoadSnapshotFromList_Older(int); boolean LoadSnapshotFromList_Newer(int); -boolean CheckSnapshotList(); -void FreeSnapshotSingle(); -void FreeSnapshotList(); +boolean CheckSnapshotList(void); +void FreeSnapshotSingle(void); +void FreeSnapshotList(void); #endif /* SNAPSHOT_H */ diff --git a/src/libgame/sound.c b/src/libgame/sound.c index c9a74eb1..6f9dcaf1 100644 --- a/src/libgame/sound.c +++ b/src/libgame/sound.c @@ -126,11 +126,11 @@ static struct SoundControl mixer[NUM_MIXER_CHANNELS]; static int mixer_active_channels = 0; static boolean expire_loop_sounds = FALSE; -static void ReloadCustomSounds(); -static void ReloadCustomMusic(); +static void ReloadCustomSounds(void); +static void ReloadCustomMusic(void); static void FreeSound(void *); static void FreeMusic(void *); -static void FreeAllMusic_NoConf(); +static void FreeAllMusic_NoConf(void); static SoundInfo *getSoundInfoEntryFromSoundID(int); static MusicInfo *getMusicInfoEntryFromMusicID(int); @@ -140,7 +140,7 @@ static MusicInfo *getMusicInfoEntryFromMusicID(int); /* mixer functions */ /* ------------------------------------------------------------------------- */ -void Mixer_InitChannels() +void Mixer_InitChannels(void) { int i; @@ -215,7 +215,7 @@ static void Mixer_PlayChannel(int channel) mixer_active_channels++; } -static void Mixer_PlayMusicChannel() +static void Mixer_PlayMusicChannel(void) { Mixer_PlayChannel(audio.music_channel); @@ -251,7 +251,7 @@ static void Mixer_StopChannel(int channel) mixer_active_channels--; } -static void Mixer_StopMusicChannel() +static void Mixer_StopMusicChannel(void) { Mixer_StopChannel(audio.music_channel); @@ -270,7 +270,7 @@ static void Mixer_FadeChannel(int channel) Mix_FadeOutChannel(channel, SOUND_FADING_INTERVAL); } -static void Mixer_FadeMusicChannel() +static void Mixer_FadeMusicChannel(void) { Mixer_FadeChannel(audio.music_channel); @@ -654,13 +654,13 @@ void LoadCustomMusic_NoConf(void) draw_init_text = FALSE; } -int getSoundListSize() +int getSoundListSize(void) { return (sound_info->num_file_list_entries + sound_info->num_dynamic_file_list_entries); } -int getMusicListSize() +int getMusicListSize(void) { return (music_info->num_file_list_entries + music_info->num_dynamic_file_list_entries); @@ -742,27 +742,27 @@ char *getMusicInfoEntryFilename(int pos) return getBaseNamePtr(mus_info->source_filename); } -char *getCurrentlyPlayingMusicFilename() +char *getCurrentlyPlayingMusicFilename(void) { return currently_playing_music_filename; } -int getSoundListPropertyMappingSize() +int getSoundListPropertyMappingSize(void) { return sound_info->num_property_mapping_entries; } -int getMusicListPropertyMappingSize() +int getMusicListPropertyMappingSize(void) { return music_info->num_property_mapping_entries; } -struct PropertyMapping *getSoundListPropertyMapping() +struct PropertyMapping *getSoundListPropertyMapping(void) { return sound_info->property_mapping; } -struct PropertyMapping *getMusicListPropertyMapping() +struct PropertyMapping *getMusicListPropertyMapping(void) { return music_info->property_mapping; } @@ -1018,12 +1018,12 @@ void FadeSound(int nr) StopSoundExt(nr, SND_CTRL_FADE_SOUND); } -void FadeSounds() +void FadeSounds(void) { StopSoundExt(-1, SND_CTRL_FADE_ALL); } -void FadeSoundsAndMusic() +void FadeSoundsAndMusic(void) { FadeSounds(); FadeMusic(); @@ -1042,7 +1042,7 @@ void StopSound(int nr) StopSoundExt(nr, SND_CTRL_STOP_SOUND); } -void StopSounds() +void StopSounds(void) { StopMusic(); StopSoundExt(-1, SND_CTRL_STOP_ALL); @@ -1079,13 +1079,13 @@ void ExpireSoundLoops(boolean active) HandleSoundRequest(snd_ctrl); } -static void ReloadCustomSounds() +static void ReloadCustomSounds(void) { LoadArtworkConfig(sound_info); ReloadCustomArtworkList(sound_info); } -static void ReloadCustomMusic() +static void ReloadCustomMusic(void) { LoadArtworkConfig(music_info); ReloadCustomArtworkList(music_info); @@ -1145,7 +1145,7 @@ void FreeMusic(void *ptr) free(music); } -static void FreeAllMusic_NoConf() +static void FreeAllMusic_NoConf(void) { int i; @@ -1161,12 +1161,12 @@ static void FreeAllMusic_NoConf() num_music_noconf = 0; } -void FreeAllSounds() +void FreeAllSounds(void) { FreeCustomArtworkLists(sound_info); } -void FreeAllMusic() +void FreeAllMusic(void) { FreeCustomArtworkLists(music_info); FreeAllMusic_NoConf(); diff --git a/src/libgame/sound.h b/src/libgame/sound.h index e2d2054a..cbafa9b7 100644 --- a/src/libgame/sound.h +++ b/src/libgame/sound.h @@ -120,16 +120,16 @@ void StopSounds(void); void StopSoundExt(int, int); void ExpireSoundLoops(boolean); -int getSoundListSize(); -int getMusicListSize(); +int getSoundListSize(void); +int getMusicListSize(void); struct FileInfo *getSoundListEntry(int); struct FileInfo *getMusicListEntry(int); char *getMusicInfoEntryFilename(int); -char *getCurrentlyPlayingMusicFilename(); -int getSoundListPropertyMappingSize(); -int getMusicListPropertyMappingSize(); -struct PropertyMapping *getSoundListPropertyMapping(); -struct PropertyMapping *getMusicListPropertyMapping(); +char *getCurrentlyPlayingMusicFilename(void); +int getSoundListPropertyMappingSize(void); +int getMusicListPropertyMappingSize(void); +struct PropertyMapping *getSoundListPropertyMapping(void); +struct PropertyMapping *getMusicListPropertyMapping(void); void InitSoundList(struct ConfigInfo *, int, struct ConfigTypeInfo *, char **, char **, char **, char **, char **); void InitMusicList(struct ConfigInfo *, int, struct ConfigTypeInfo *, diff --git a/src/libgame/system.c b/src/libgame/system.c index d5504854..0e3a2728 100644 --- a/src/libgame/system.c +++ b/src/libgame/system.c @@ -116,7 +116,7 @@ void InitNetworkInfo(boolean enabled, boolean connected, boolean serveronly, network.server_port = server_port; } -void InitScoresInfo() +void InitScoresInfo(void) { char *global_scores_dir = getPath2(getCommonDataDir(), SCORES_DIRECTORY); @@ -143,7 +143,7 @@ void InitScoresInfo() free(global_scores_dir); } -void SetWindowTitle() +void SetWindowTitle(void) { program.window_title = program.window_title_function(); @@ -307,7 +307,7 @@ void InitGfxDrawTileCursorFunction(void (*draw_tile_cursor_function)(int)) gfx.draw_tile_cursor_function = draw_tile_cursor_function; } -void InitGfxCustomArtworkInfo() +void InitGfxCustomArtworkInfo(void) { gfx.override_level_graphics = FALSE; gfx.override_level_sounds = FALSE; @@ -316,12 +316,12 @@ void InitGfxCustomArtworkInfo() gfx.draw_init_text = TRUE; } -void InitGfxOtherSettings() +void InitGfxOtherSettings(void) { gfx.cursor_mode = CURSOR_DEFAULT; } -void InitTileCursorInfo() +void InitTileCursorInfo(void) { tile_cursor.enabled = FALSE; tile_cursor.active = FALSE; @@ -338,7 +338,7 @@ void InitTileCursorInfo() tile_cursor.sy = 0; } -void InitOverlayInfo() +void InitOverlayInfo(void) { int nr = GRID_ACTIVE_NR(); int x, y; @@ -425,7 +425,7 @@ void SetOverlayShowGrid(boolean show_grid) SetOverlayEnabled(TRUE); } -boolean GetOverlayActive() +boolean GetOverlayActive(void) { return overlay.active; } @@ -435,7 +435,7 @@ void SetDrawDeactivationMask(int draw_deactivation_mask) gfx.draw_deactivation_mask = draw_deactivation_mask; } -int GetDrawDeactivationMask() +int GetDrawDeactivationMask(void) { return gfx.draw_deactivation_mask; } @@ -709,7 +709,7 @@ inline static boolean CheckDrawingArea(int x, int y, int width, int height, return FALSE; } -boolean DrawingDeactivatedField() +boolean DrawingDeactivatedField(void) { if (program.headless) return TRUE; @@ -1120,7 +1120,7 @@ void SetVideoFrameDelay(unsigned int frame_delay_value) video.frame_delay_value = frame_delay_value; } -unsigned int GetVideoFrameDelay() +unsigned int GetVideoFrameDelay(void) { return video.frame_delay_value; } @@ -1719,12 +1719,12 @@ KeyMod HandleKeyModState(Key key, int key_status) return current_modifiers; } -KeyMod GetKeyModState() +KeyMod GetKeyModState(void) { return (KeyMod)SDL_GetModState(); } -KeyMod GetKeyModStateFromEvents() +KeyMod GetKeyModStateFromEvents(void) { /* always use key modifier state as tracked from key events (this is needed if the modifier key event was injected into the event queue, but the key @@ -1751,7 +1751,7 @@ void StartTextInput(int x, int y, int width, int height) #endif } -void StopTextInput() +void StopTextInput(void) { #if defined(TARGET_SDL2) #if defined(HAS_SCREEN_KEYBOARD) @@ -1780,7 +1780,7 @@ boolean CheckCloseWindowEvent(ClientMessageEvent *event) /* joystick functions */ /* ========================================================================= */ -void InitJoysticks() +void InitJoysticks(void) { int i; @@ -1806,7 +1806,7 @@ boolean CheckJoystickOpened(int nr) return SDLCheckJoystickOpened(nr); } -void ClearJoystickState() +void ClearJoystickState(void) { SDLClearJoystickState(); } diff --git a/src/libgame/system.h b/src/libgame/system.h index 29a98017..a8cf2a25 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -1628,8 +1628,8 @@ void InitProgramInfo(char *, char *, char *, char *, char *, char *, char *, char *, int); void InitNetworkInfo(boolean, boolean, boolean, char *, int); -void InitScoresInfo(); -void SetWindowTitle(); +void InitScoresInfo(void); +void SetWindowTitle(void); void InitWindowTitleFunction(char *(*window_title_function)(void)); void InitExitMessageFunction(void (*exit_message_function)(char *, va_list)); @@ -1649,10 +1649,10 @@ void InitGfxDrawBusyAnimFunction(void (*draw_busy_anim_function)(void)); void InitGfxDrawGlobalAnimFunction(void (*draw_global_anim_function)(int, int)); void InitGfxDrawGlobalBorderFunction(void (*draw_global_border_function)(int)); void InitGfxDrawTileCursorFunction(void (*draw_tile_cursor_function)(int)); -void InitGfxCustomArtworkInfo(); -void InitGfxOtherSettings(); -void InitTileCursorInfo(); -void InitOverlayInfo(); +void InitGfxCustomArtworkInfo(void); +void InitGfxOtherSettings(void); +void InitTileCursorInfo(void); +void InitOverlayInfo(void); void SetTileCursorEnabled(boolean); void SetTileCursorActive(boolean); void SetTileCursorTargetXY(int, int); @@ -1661,7 +1661,7 @@ void SetTileCursorSXSY(int, int); void SetOverlayEnabled(boolean); void SetOverlayActive(boolean); void SetOverlayShowGrid(boolean); -boolean GetOverlayActive(); +boolean GetOverlayActive(void); void SetDrawDeactivationMask(int); int GetDrawDeactivationMask(void); void SetDrawBackgroundMask(int); @@ -1691,7 +1691,7 @@ void BlitBitmapMasked(Bitmap *, Bitmap *, int, int, int, int, int, int); boolean DrawingDeactivatedField(void); boolean DrawingDeactivated(int, int, int, int); boolean DrawingOnBackground(int, int); -boolean DrawingAreaChanged(); +boolean DrawingAreaChanged(void); void BlitBitmapOnBackground(Bitmap *, Bitmap *, int, int, int, int, int, int); void BlitTexture(Bitmap *, int, int, int, int, int, int); void BlitTextureMasked(Bitmap *, int, int, int, int, int, int); @@ -1708,7 +1708,7 @@ void KeyboardAutoRepeatOn(void); void KeyboardAutoRepeatOff(void); boolean SetVideoMode(boolean); void SetVideoFrameDelay(unsigned int); -unsigned int GetVideoFrameDelay(); +unsigned int GetVideoFrameDelay(void); boolean ChangeVideoModeIfNeeded(boolean); Bitmap *LoadImage(char *); @@ -1733,15 +1733,15 @@ void PeekEvent(Event *event); void CheckQuitEvent(void); Key GetEventKey(KeyEvent *, boolean); KeyMod HandleKeyModState(Key, int); -KeyMod GetKeyModState(); -KeyMod GetKeyModStateFromEvents(); +KeyMod GetKeyModState(void); +KeyMod GetKeyModStateFromEvents(void); void StartTextInput(int, int, int, int); -void StopTextInput(); +void StopTextInput(void); boolean CheckCloseWindowEvent(ClientMessageEvent *); -void InitJoysticks(); +void InitJoysticks(void); boolean ReadJoystick(int, int *, int *, boolean *, boolean *); boolean CheckJoystickOpened(int); -void ClearJoystickState(); +void ClearJoystickState(void); #endif /* SYSTEM_H */ diff --git a/src/main.c b/src/main.c index 00d7a46b..3f4ea31d 100644 --- a/src/main.c +++ b/src/main.c @@ -7589,7 +7589,7 @@ struct MusicPrefixInfo music_prefix_info[NUM_MUSIC_PREFIXES + 1] = /* main() */ /* ========================================================================= */ -static void print_usage() +static void print_usage(void) { Print("\n" "Usage: %s [OPTION]... [HOSTNAME [PORT]]\n" @@ -7628,7 +7628,7 @@ static void print_usage() program.command_basename); } -static void print_version() +static void print_version(void) { Print("%s", getProgramInitString()); diff --git a/src/netserv.c b/src/netserv.c index 73d35fb3..9bebe38d 100644 --- a/src/netserv.c +++ b/src/netserv.c @@ -107,7 +107,7 @@ int putNetworkString(byte *ptr, char *s) return strlen(s) + 1; } -struct NetworkBuffer *newNetworkBuffer() +struct NetworkBuffer *newNetworkBuffer(void) { struct NetworkBuffer *new = checked_calloc(sizeof(struct NetworkBuffer)); diff --git a/src/netserv.h b/src/netserv.h index ec24d344..3eee34e6 100644 --- a/src/netserv.h +++ b/src/netserv.h @@ -58,7 +58,7 @@ int putNetwork32BitInteger(byte *, int); char *getNetworkString(byte *); int putNetworkString(byte *, char *); -struct NetworkBuffer *newNetworkBuffer(); +struct NetworkBuffer *newNetworkBuffer(void); void initNetworkBufferForReceiving(struct NetworkBuffer *); void initNetworkBufferForReading(struct NetworkBuffer *); void initNetworkBufferForWriting(struct NetworkBuffer *, int, int); diff --git a/src/network.c b/src/network.c index cd004f62..226ce34c 100644 --- a/src/network.c +++ b/src/network.c @@ -364,7 +364,7 @@ void SendToServer_PlayerName(char *player_name) Error(ERR_NETWORK_CLIENT, "you set your player name to \"%s\"", player_name); } -void SendToServer_ProtocolVersion() +void SendToServer_ProtocolVersion(void) { initNetworkBufferForWriting(write_buffer, OP_PROTOCOL_VERSION, 0); @@ -384,7 +384,7 @@ void SendToServer_NrWanted(int nr_wanted) SendNetworkBufferToServer(write_buffer); } -void SendToServer_LevelFile() +void SendToServer_LevelFile(void) { initNetworkBufferForWriting(write_buffer, OP_LEVEL_FILE, 0); @@ -422,7 +422,7 @@ void SendToServer_LevelFile() #endif } -void SendToServer_StartPlaying() +void SendToServer_StartPlaying(void) { unsigned int new_random_seed = InitRND(level.random_seed); @@ -435,14 +435,14 @@ void SendToServer_StartPlaying() SendNetworkBufferToServer(write_buffer); } -void SendToServer_PausePlaying() +void SendToServer_PausePlaying(void) { initNetworkBufferForWriting(write_buffer, OP_PAUSE_PLAYING, 0); SendNetworkBufferToServer(write_buffer); } -void SendToServer_ContinuePlaying() +void SendToServer_ContinuePlaying(void) { initNetworkBufferForWriting(write_buffer, OP_CONTINUE_PLAYING, 0); @@ -467,7 +467,7 @@ void SendToServer_MovePlayer(byte player_action) SendNetworkBufferToServer(write_buffer); } -static void Handle_OP_BAD_PROTOCOL_VERSION() +static void Handle_OP_BAD_PROTOCOL_VERSION(void) { int protocol_version_major = getNetworkBuffer8BitInteger(read_buffer); int protocol_version_minor = getNetworkBuffer8BitInteger(read_buffer); @@ -490,7 +490,7 @@ static void Handle_OP_BAD_PROTOCOL_VERSION() stop_network_client = TRUE; } -static void Handle_OP_YOUR_NUMBER() +static void Handle_OP_YOUR_NUMBER(void) { int old_client_nr = getNetworkBuffer8BitInteger(read_buffer); int new_client_nr = getNetworkBuffer8BitInteger(read_buffer); @@ -522,7 +522,7 @@ static void Handle_OP_YOUR_NUMBER() stored_player[new_index_nr].connected_network = TRUE; } -static void Handle_OP_NUMBER_WANTED() +static void Handle_OP_NUMBER_WANTED(void) { int old_client_nr = getNetworkBuffer8BitInteger(read_buffer); int client_nr_wanted = getNetworkBuffer8BitInteger(read_buffer); @@ -581,7 +581,7 @@ static void Handle_OP_NUMBER_WANTED() DrawNetworkPlayers(); } -static void Handle_OP_PLAYER_NAME() +static void Handle_OP_PLAYER_NAME(void) { int player_nr = getNetworkBuffer8BitInteger(read_buffer); char *player_name = getNetworkBufferString(read_buffer); @@ -596,7 +596,7 @@ static void Handle_OP_PLAYER_NAME() player_nr, player->name); } -static void Handle_OP_PLAYER_CONNECTED() +static void Handle_OP_PLAYER_CONNECTED(void) { struct NetworkClientPlayerInfo *player, *last_player = NULL; int new_client_nr = getNetworkBuffer8BitInteger(read_buffer); @@ -622,7 +622,7 @@ static void Handle_OP_PLAYER_CONNECTED() stored_player[new_index_nr].connected_network = TRUE; } -static void Handle_OP_PLAYER_DISCONNECTED() +static void Handle_OP_PLAYER_DISCONNECTED(void) { struct NetworkClientPlayerInfo *player, *player_disconnected; int player_nr = getNetworkBuffer8BitInteger(read_buffer); @@ -660,7 +660,7 @@ static void Handle_OP_PLAYER_DISCONNECTED() } } -static void Handle_OP_START_PLAYING() +static void Handle_OP_START_PLAYING(void) { int player_nr = getNetworkBuffer8BitInteger(read_buffer); char *new_leveldir_identifier = getNetworkBufferString(read_buffer); @@ -703,7 +703,7 @@ static void Handle_OP_START_PLAYING() StartGameActions(FALSE, setup.autorecord, new_random_seed); } -static void Handle_OP_PAUSE_PLAYING() +static void Handle_OP_PAUSE_PLAYING(void) { int player_nr = getNetworkBuffer8BitInteger(read_buffer); @@ -717,7 +717,7 @@ static void Handle_OP_PAUSE_PLAYING() } } -static void Handle_OP_CONTINUE_PLAYING() +static void Handle_OP_CONTINUE_PLAYING(void) { int player_nr = getNetworkBuffer8BitInteger(read_buffer); @@ -731,7 +731,7 @@ static void Handle_OP_CONTINUE_PLAYING() } } -static void Handle_OP_STOP_PLAYING() +static void Handle_OP_STOP_PLAYING(void) { int client_nr = getNetworkBuffer8BitInteger(read_buffer); int cause_for_stopping = getNetworkBuffer8BitInteger(read_buffer); @@ -764,7 +764,7 @@ static void Handle_OP_STOP_PLAYING() } } -static void Handle_OP_MOVE_PLAYER() +static void Handle_OP_MOVE_PLAYER(void) { int player_nr = getNetworkBuffer8BitInteger(read_buffer); int server_frame_counter = getNetworkBuffer32BitInteger(read_buffer); @@ -794,7 +794,7 @@ static void Handle_OP_MOVE_PLAYER() network_player_action_received = TRUE; } -static void Handle_OP_BROADCAST_MESSAGE() +static void Handle_OP_BROADCAST_MESSAGE(void) { int player_nr = getNetworkBuffer8BitInteger(read_buffer); @@ -802,7 +802,7 @@ static void Handle_OP_BROADCAST_MESSAGE() Error(ERR_NETWORK_CLIENT, "client %d sends message", player_nr); } -static void Handle_OP_LEVEL_FILE() +static void Handle_OP_LEVEL_FILE(void) { int player_nr = getNetworkBuffer8BitInteger(read_buffer); char *leveldir_identifier; @@ -872,7 +872,7 @@ static void Handle_OP_LEVEL_FILE() #endif } -static void HandleNetworkingMessage() +static void HandleNetworkingMessage(void) { stop_network_game = FALSE; @@ -947,7 +947,7 @@ static void HandleNetworkingMessage() SendToServer_StopPlaying(NETWORK_STOP_BY_ERROR); } -static char *HandleNetworkingPackets() +static char *HandleNetworkingPackets(void) { while (1) { @@ -993,7 +993,7 @@ static void FreeNetworkClientPlayerInfo(struct NetworkClientPlayerInfo *player) checked_free(player); } -static void HandleNetworkingDisconnect() +static void HandleNetworkingDisconnect(void) { int i; @@ -1016,7 +1016,7 @@ static void HandleNetworkingDisconnect() first_player.next = NULL; } -void HandleNetworking() +void HandleNetworking(void) { char *error_message = HandleNetworkingPackets(); @@ -1042,7 +1042,7 @@ void HandleNetworking() } } -void DisconnectFromNetworkServer() +void DisconnectFromNetworkServer(void) { DrawNetworkText_Title("Terminating Network"); DrawNetworkText("Disconnecting from network server ..."); diff --git a/src/screens.c b/src/screens.c index 5e0740b6..12fc3bfe 100644 --- a/src/screens.c +++ b/src/screens.c @@ -221,7 +221,7 @@ static void HandleSetupScreen_Generic(int, int, int, int, int); static void HandleSetupScreen_Input(int, int, int, int, int); static void CustomizeKeyboard(int); static void ConfigureJoystick(int); -static void ConfigureVirtualButtons(); +static void ConfigureVirtualButtons(void); static void execSetupGame(void); static void execSetupGraphics(void); static void execSetupSound(void); @@ -1085,7 +1085,7 @@ static boolean visibleTextPos(struct TextPosInfo *pos) return (pos != NULL && pos->x != -1 && pos->y != -1); } -static void InitializeMainControls() +static void InitializeMainControls(void) { boolean local_team_mode = (!network.enabled && setup.team_mode); int i; @@ -1361,7 +1361,7 @@ static void AdjustChooseTreeScrollbar(int id, int first_entry, TreeInfo *ti) first_entry); } -static void clearMenuListArea() +static void clearMenuListArea(void) { int scrollbar_xpos = mSX + SC_SCROLLBAR_XPOS + menu.scrollbar_xoffset; @@ -1415,7 +1415,7 @@ static void drawChooseTreeCursor(int ypos, boolean active) drawCursorExt(0, ypos, active, -1); } -void DrawHeadline() +void DrawHeadline(void) { DrawTextSCentered(MENU_TITLE1_YPOS, FONT_TITLE_1, main_text_title_1); DrawTextSCentered(MENU_TITLE2_YPOS, FONT_TITLE_2, main_text_title_2); @@ -1516,7 +1516,7 @@ void DrawTitleScreenMessage(int nr, boolean initial) ResetFontStatus(); } -void DrawTitleScreen() +void DrawTitleScreen(void) { KeyboardAutoRepeatOff(); @@ -1540,7 +1540,7 @@ boolean CheckTitleScreen(boolean levelset_has_changed) return (show_titlescreen && num_title_screens > 0); } -void DrawMainMenu() +void DrawMainMenu(void) { static LevelDirTree *leveldir_last_valid = NULL; boolean levelset_has_changed = FALSE; @@ -1686,7 +1686,7 @@ void DrawMainMenu() OpenDoor(DOOR_CLOSE_1 | DOOR_OPEN_2); } -static void gotoTopLevelDir() +static void gotoTopLevelDir(void) { /* move upwards until inside (but not above) top level directory */ while (leveldir_current->node_parent && @@ -2137,56 +2137,56 @@ static struct TokenInfo *info_info; static int num_info_info; /* number of info entries shown on screen */ static int max_info_info; /* total number of info entries in list */ -static void execInfoTitleScreen() +static void execInfoTitleScreen(void) { info_mode = INFO_MODE_TITLE; DrawInfoScreen(); } -static void execInfoElements() +static void execInfoElements(void) { info_mode = INFO_MODE_ELEMENTS; DrawInfoScreen(); } -static void execInfoMusic() +static void execInfoMusic(void) { info_mode = INFO_MODE_MUSIC; DrawInfoScreen(); } -static void execInfoCredits() +static void execInfoCredits(void) { info_mode = INFO_MODE_CREDITS; DrawInfoScreen(); } -static void execInfoProgram() +static void execInfoProgram(void) { info_mode = INFO_MODE_PROGRAM; DrawInfoScreen(); } -static void execInfoVersion() +static void execInfoVersion(void) { info_mode = INFO_MODE_VERSION; DrawInfoScreen(); } -static void execInfoLevelSet() +static void execInfoLevelSet(void) { info_mode = INFO_MODE_LEVELSET; DrawInfoScreen(); } -static void execExitInfo() +static void execExitInfo(void) { SetGameStatus(GAME_MODE_MAIN); @@ -2307,7 +2307,7 @@ static void drawMenuInfoList(int first_entry, int num_page_entries, } } -static void DrawInfoScreen_Main() +static void DrawInfoScreen_Main(void) { int fade_mask = REDRAW_FIELD; int i; @@ -2885,7 +2885,7 @@ void DrawInfoScreen_HelpText(int element, int action, int direction, int ypos) TRUE, FALSE, FALSE); } -void DrawInfoScreen_TitleScreen() +void DrawInfoScreen_TitleScreen(void) { SetGameStatus(GAME_MODE_TITLE); @@ -2897,7 +2897,7 @@ void HandleInfoScreen_TitleScreen(int button) HandleTitleScreen(0, 0, 0, 0, button); } -void DrawInfoScreen_Elements() +void DrawInfoScreen_Elements(void) { SetMainBackgroundImageIfDefined(IMG_BACKGROUND_INFO_ELEMENTS); @@ -2990,7 +2990,7 @@ void HandleInfoScreen_Elements(int button) } } -void DrawInfoScreen_Music() +void DrawInfoScreen_Music(void) { SetMainBackgroundImageIfDefined(IMG_BACKGROUND_INFO_MUSIC); @@ -3401,7 +3401,7 @@ static void DrawInfoScreen_CreditsScreen(int screen_nr) "Press any key or button for next page"); } -void DrawInfoScreen_Credits() +void DrawInfoScreen_Credits(void) { SetMainBackgroundImageIfDefined(IMG_BACKGROUND_INFO_CREDITS); @@ -3471,7 +3471,7 @@ void HandleInfoScreen_Credits(int button) } } -void DrawInfoScreen_Program() +void DrawInfoScreen_Program(void) { int font_title = MENU_INFO_FONT_TITLE; int font_head = MENU_INFO_FONT_HEAD; @@ -3556,7 +3556,7 @@ void HandleInfoScreen_Program(int button) } } -void DrawInfoScreen_Version() +void DrawInfoScreen_Version(void) { int font_title = MENU_INFO_FONT_TITLE; int font_head = MENU_INFO_FONT_HEAD; @@ -3753,7 +3753,7 @@ void HandleInfoScreen_Version(int button) } } -void DrawInfoScreen_LevelSet() +void DrawInfoScreen_LevelSet(void) { struct TitleMessageInfo *tmi = &readme; char *filename = getLevelSetInfoFilename(); @@ -3841,7 +3841,7 @@ void HandleInfoScreen_LevelSet(int button) } } -static void DrawInfoScreen() +static void DrawInfoScreen(void) { if (info_mode == INFO_MODE_TITLE) DrawInfoScreen_TitleScreen(); @@ -4430,7 +4430,7 @@ static void HandleChooseTree(int mx, int my, int dx, int dy, int button, } } -void DrawChooseLevelSet() +void DrawChooseLevelSet(void) { FadeMenuSoundsAndMusic(); @@ -4444,7 +4444,7 @@ void HandleChooseLevelSet(int mx, int my, int dx, int dy, int button) HandleChooseTree(mx, my, dx, dy, button, &leveldir_current); } -void DrawChooseLevelNr() +void DrawChooseLevelNr(void) { int i; @@ -4680,14 +4680,14 @@ static char *drop_distance_text; static char *transparency_text; static char *grid_size_text[2][2]; -static void execSetupMain() +static void execSetupMain(void) { setup_mode = SETUP_MODE_MAIN; DrawSetupScreen(); } -static void execSetupGame_setGameSpeeds() +static void execSetupGame_setGameSpeeds(void) { if (game_speeds == NULL) { @@ -4737,7 +4737,7 @@ static void execSetupGame_setGameSpeeds() game_speed_text = game_speed_current->name; } -static void execSetupGame_setScrollDelays() +static void execSetupGame_setScrollDelays(void) { if (scroll_delays == NULL) { @@ -4787,7 +4787,7 @@ static void execSetupGame_setScrollDelays() scroll_delay_text = scroll_delay_current->name; } -static void execSetupGame_setSnapshotModes() +static void execSetupGame_setSnapshotModes(void) { if (snapshot_modes == NULL) { @@ -4837,7 +4837,7 @@ static void execSetupGame_setSnapshotModes() snapshot_mode_text = snapshot_mode_current->name; } -static void execSetupGame() +static void execSetupGame(void) { execSetupGame_setGameSpeeds(); execSetupGame_setScrollDelays(); @@ -4848,28 +4848,28 @@ static void execSetupGame() DrawSetupScreen(); } -static void execSetupChooseGameSpeed() +static void execSetupChooseGameSpeed(void) { setup_mode = SETUP_MODE_CHOOSE_GAME_SPEED; DrawSetupScreen(); } -static void execSetupChooseScrollDelay() +static void execSetupChooseScrollDelay(void) { setup_mode = SETUP_MODE_CHOOSE_SCROLL_DELAY; DrawSetupScreen(); } -static void execSetupChooseSnapshotMode() +static void execSetupChooseSnapshotMode(void) { setup_mode = SETUP_MODE_CHOOSE_SNAPSHOT_MODE; DrawSetupScreen(); } -static void execSetupEditor() +static void execSetupEditor(void) { setup_mode = SETUP_MODE_EDITOR; @@ -4961,7 +4961,7 @@ static void execSetupGraphics_setWindowSizes(boolean update_list) window_size_text = window_size_current->name; } -static void execSetupGraphics_setScalingTypes() +static void execSetupGraphics_setScalingTypes(void) { if (scaling_types == NULL) { @@ -5011,7 +5011,7 @@ static void execSetupGraphics_setScalingTypes() scaling_type_text = scaling_type_current->name; } -static void execSetupGraphics_setRenderingModes() +static void execSetupGraphics_setRenderingModes(void) { if (rendering_modes == NULL) { @@ -5062,7 +5062,7 @@ static void execSetupGraphics_setRenderingModes() rendering_mode_text = rendering_mode_current->name; } -static void execSetupGraphics() +static void execSetupGraphics(void) { // update "setup.window_scaling_percent" from list selection // (in this case, window scaling was changed on setup screen) @@ -5093,49 +5093,49 @@ static void execSetupGraphics() #endif } -static void execSetupChooseWindowSize() +static void execSetupChooseWindowSize(void) { setup_mode = SETUP_MODE_CHOOSE_WINDOW_SIZE; DrawSetupScreen(); } -static void execSetupChooseScalingType() +static void execSetupChooseScalingType(void) { setup_mode = SETUP_MODE_CHOOSE_SCALING_TYPE; DrawSetupScreen(); } -static void execSetupChooseRenderingMode() +static void execSetupChooseRenderingMode(void) { setup_mode = SETUP_MODE_CHOOSE_RENDERING; DrawSetupScreen(); } -static void execSetupChooseVolumeSimple() +static void execSetupChooseVolumeSimple(void) { setup_mode = SETUP_MODE_CHOOSE_VOLUME_SIMPLE; DrawSetupScreen(); } -static void execSetupChooseVolumeLoops() +static void execSetupChooseVolumeLoops(void) { setup_mode = SETUP_MODE_CHOOSE_VOLUME_LOOPS; DrawSetupScreen(); } -static void execSetupChooseVolumeMusic() +static void execSetupChooseVolumeMusic(void) { setup_mode = SETUP_MODE_CHOOSE_VOLUME_MUSIC; DrawSetupScreen(); } -static void execSetupSound() +static void execSetupSound(void) { if (volumes_simple == NULL) { @@ -5355,63 +5355,63 @@ static void execSetupSound() DrawSetupScreen(); } -static void execSetupChooseTouchControls() +static void execSetupChooseTouchControls(void) { setup_mode = SETUP_MODE_CHOOSE_TOUCH_CONTROL; DrawSetupScreen(); } -static void execSetupChooseMoveDistance() +static void execSetupChooseMoveDistance(void) { setup_mode = SETUP_MODE_CHOOSE_MOVE_DISTANCE; DrawSetupScreen(); } -static void execSetupChooseDropDistance() +static void execSetupChooseDropDistance(void) { setup_mode = SETUP_MODE_CHOOSE_DROP_DISTANCE; DrawSetupScreen(); } -static void execSetupChooseTransparency() +static void execSetupChooseTransparency(void) { setup_mode = SETUP_MODE_CHOOSE_TRANSPARENCY; DrawSetupScreen(); } -static void execSetupChooseGridXSize_0() +static void execSetupChooseGridXSize_0(void) { setup_mode = SETUP_MODE_CHOOSE_GRID_XSIZE_0; DrawSetupScreen(); } -static void execSetupChooseGridYSize_0() +static void execSetupChooseGridYSize_0(void) { setup_mode = SETUP_MODE_CHOOSE_GRID_YSIZE_0; DrawSetupScreen(); } -static void execSetupChooseGridXSize_1() +static void execSetupChooseGridXSize_1(void) { setup_mode = SETUP_MODE_CHOOSE_GRID_XSIZE_1; DrawSetupScreen(); } -static void execSetupChooseGridYSize_1() +static void execSetupChooseGridYSize_1(void) { setup_mode = SETUP_MODE_CHOOSE_GRID_YSIZE_1; DrawSetupScreen(); } -static void execSetupConfigureVirtualButtons() +static void execSetupConfigureVirtualButtons(void) { setup_mode = SETUP_MODE_CONFIG_VIRT_BUTTONS; @@ -5422,7 +5422,7 @@ static void execSetupConfigureVirtualButtons() DrawSetupScreen(); } -static void execSetupTouch() +static void execSetupTouch(void) { int i, j, k; @@ -5683,7 +5683,7 @@ static void execSetupTouch() DrawSetupScreen(); } -static void execSetupArtwork() +static void execSetupArtwork(void) { #if 0 printf("::: '%s', '%s', '%s'\n", @@ -5709,84 +5709,84 @@ static void execSetupArtwork() DrawSetupScreen(); } -static void execSetupChooseGraphics() +static void execSetupChooseGraphics(void) { setup_mode = SETUP_MODE_CHOOSE_GRAPHICS; DrawSetupScreen(); } -static void execSetupChooseSounds() +static void execSetupChooseSounds(void) { setup_mode = SETUP_MODE_CHOOSE_SOUNDS; DrawSetupScreen(); } -static void execSetupChooseMusic() +static void execSetupChooseMusic(void) { setup_mode = SETUP_MODE_CHOOSE_MUSIC; DrawSetupScreen(); } -static void execSetupInput() +static void execSetupInput(void) { setup_mode = SETUP_MODE_INPUT; DrawSetupScreen(); } -static void execSetupShortcuts() +static void execSetupShortcuts(void) { setup_mode = SETUP_MODE_SHORTCUTS; DrawSetupScreen(); } -static void execSetupShortcuts1() +static void execSetupShortcuts1(void) { setup_mode = SETUP_MODE_SHORTCUTS_1; DrawSetupScreen(); } -static void execSetupShortcuts2() +static void execSetupShortcuts2(void) { setup_mode = SETUP_MODE_SHORTCUTS_2; DrawSetupScreen(); } -static void execSetupShortcuts3() +static void execSetupShortcuts3(void) { setup_mode = SETUP_MODE_SHORTCUTS_3; DrawSetupScreen(); } -static void execSetupShortcuts4() +static void execSetupShortcuts4(void) { setup_mode = SETUP_MODE_SHORTCUTS_4; DrawSetupScreen(); } -static void execSetupShortcuts5() +static void execSetupShortcuts5(void) { setup_mode = SETUP_MODE_SHORTCUTS_5; DrawSetupScreen(); } -static void execExitSetup() +static void execExitSetup(void) { SetGameStatus(GAME_MODE_MAIN); DrawMainMenu(); } -static void execSaveAndExitSetup() +static void execSaveAndExitSetup(void) { SaveSetup(); execExitSetup(); @@ -5861,7 +5861,7 @@ static struct { NULL, NULL } }; -void setHideRelatedSetupEntries() +void setHideRelatedSetupEntries(void) { int i; @@ -6205,7 +6205,7 @@ static struct TokenInfo setup_info_shortcuts_5[] = { 0, NULL, NULL } }; -static Key getSetupKey() +static Key getSetupKey(void) { Key key = KSYM_UNDEFINED; boolean got_key_event = FALSE; @@ -6507,7 +6507,7 @@ static struct TokenInfo *getSetupInfoFinal(struct TokenInfo *setup_info_orig) return setup_info_final; } -static void DrawSetupScreen_Generic() +static void DrawSetupScreen_Generic(void) { int fade_mask = REDRAW_FIELD; boolean redraw_all = FALSE; @@ -6643,7 +6643,7 @@ void HandleSetupScreen_Generic(int mx, int my, int dx, int dy, int button) setup_mode, num_setup_info, max_setup_info); } -void DrawSetupScreen_Input() +void DrawSetupScreen_Input(void) { int i; @@ -7551,7 +7551,7 @@ void ConfigureJoystick(int player_nr) DrawSetupScreen_Input(); } -boolean ConfigureVirtualButtonsMain() +boolean ConfigureVirtualButtonsMain(void) { static char *customize_step_text[] = { @@ -7788,7 +7788,7 @@ boolean ConfigureVirtualButtonsMain() return success; } -void ConfigureVirtualButtons() +void ConfigureVirtualButtons(void) { boolean success = ConfigureVirtualButtonsMain(); @@ -7815,7 +7815,7 @@ void ConfigureVirtualButtons() } } -void DrawSetupScreen() +void DrawSetupScreen(void) { if (setup_mode == SETUP_MODE_INPUT) DrawSetupScreen_Input(); @@ -7865,7 +7865,7 @@ void DrawSetupScreen() PlayMenuSoundsAndMusic(); } -void RedrawSetupScreenAfterFullscreenToggle() +void RedrawSetupScreenAfterFullscreenToggle(void) { if (setup_mode == SETUP_MODE_GRAPHICS || setup_mode == SETUP_MODE_CHOOSE_WINDOW_SIZE) @@ -7943,7 +7943,7 @@ void HandleSetupScreen(int mx, int my, int dx, int dy, int button) HandleSetupScreen_Generic(mx, my, dx, dy, button); } -void HandleGameActions() +void HandleGameActions(void) { if (game.restart_game_message != NULL) RequestRestartGame(game.restart_game_message); @@ -8094,7 +8094,7 @@ static struct } }; -static void CreateScreenMenubuttons() +static void CreateScreenMenubuttons(void) { struct GadgetInfo *gi; unsigned int event_mask; @@ -8159,7 +8159,7 @@ static void CreateScreenMenubuttons() } } -static void CreateScreenScrollbuttons() +static void CreateScreenScrollbuttons(void) { struct GadgetInfo *gi; unsigned int event_mask; @@ -8227,7 +8227,7 @@ static void CreateScreenScrollbuttons() } } -static void CreateScreenScrollbars() +static void CreateScreenScrollbars(void) { int i; @@ -8308,7 +8308,7 @@ static void CreateScreenScrollbars() } } -void CreateScreenGadgets() +void CreateScreenGadgets(void) { CreateScreenMenubuttons(); @@ -8316,7 +8316,7 @@ void CreateScreenGadgets() CreateScreenScrollbars(); } -void FreeScreenGadgets() +void FreeScreenGadgets(void) { int i; @@ -8451,7 +8451,7 @@ static void HandleScreenGadgets(struct GadgetInfo *gi) } } -void DumpScreenIdentifiers() +void DumpScreenIdentifiers(void) { int i; diff --git a/src/screens.h b/src/screens.h index 70b1701c..eb9da595 100644 --- a/src/screens.h +++ b/src/screens.h @@ -24,7 +24,7 @@ void DrawAndFadeInMainMenu(int); void DrawMainMenu(void); void DrawHallOfFame(int, int); -void RedrawSetupScreenAfterFullscreenToggle(); +void RedrawSetupScreenAfterFullscreenToggle(void); void RedrawSetupScreenAfterScreenRotation(int); void HandleTitleScreen(int, int, int, int, int); @@ -37,10 +37,10 @@ void HandleSetupScreen(int, int, int, int, int); void HandleTypeName(int, Key); void HandleGameActions(void); -void CreateScreenGadgets(); -void FreeScreenGadgets(); +void CreateScreenGadgets(void); +void FreeScreenGadgets(void); -void setHideRelatedSetupEntries(); +void setHideRelatedSetupEntries(void); void DumpScreenIdentifiers(void); boolean DoScreenAction(int); diff --git a/src/tape.c b/src/tape.c index 689f2bf2..bcec56b0 100644 --- a/src/tape.c +++ b/src/tape.c @@ -38,8 +38,8 @@ /* forward declaration for internal use */ static void HandleTapeButtons(struct GadgetInfo *); -static void TapeStopWarpForward(); -static float GetTapeLengthSecondsFloat(); +static void TapeStopWarpForward(void); +static float GetTapeLengthSecondsFloat(void); static struct GadgetInfo *tape_gadget[NUM_TAPE_BUTTONS]; @@ -359,7 +359,7 @@ void DrawVideoDisplaySymbol(unsigned int state) DrawVideoDisplay(state, VIDEO_DISPLAY_SYMBOL_ONLY); } -void DrawVideoDisplayCurrentState() +void DrawVideoDisplayCurrentState(void) { int state = 0; @@ -398,7 +398,7 @@ void DrawVideoDisplayCurrentState() DrawVideoDisplaySymbol(state); } -void DrawCompleteVideoDisplay() +void DrawCompleteVideoDisplay(void) { struct GraphicInfo *g_tape = &graphic_info[IMG_BACKGROUND_TAPE]; @@ -442,7 +442,7 @@ void DrawCompleteVideoDisplay() 0, 0); } -void TapeDeactivateDisplayOn() +void TapeDeactivateDisplayOn(void) { SetDrawDeactivationMask(REDRAW_FIELD); audio.sound_deactivated = TRUE; @@ -512,12 +512,12 @@ void TapeSetDateFromEpochSeconds(time_t epoch_seconds) tape.date = 10000 * (lt->tm_year % 100) + 100 * lt->tm_mon + lt->tm_mday; } -void TapeSetDateFromNow() +void TapeSetDateFromNow(void) { TapeSetDateFromEpochSeconds(time(NULL)); } -void TapeErase() +void TapeErase(void) { int i; @@ -550,7 +550,7 @@ void TapeErase() tape.use_mouse = (level.game_engine_type == GAME_ENGINE_TYPE_MM); } -static void TapeRewind() +static void TapeRewind(void) { tape.counter = 0; tape.delay_played = 0; @@ -598,12 +598,12 @@ void TapeStartRecording(int random_seed) audio.sound_deactivated = FALSE; } -static void TapeStartGameRecording() +static void TapeStartGameRecording(void) { StartGameActions(network.enabled, TRUE, level.random_seed); } -static void TapeAppendRecording() +static void TapeAppendRecording(void) { if (!tape.playing || !tape.pausing) return; @@ -631,7 +631,7 @@ static void TapeAppendRecording() UpdateAndDisplayGameControlValues(); } -void TapeHaltRecording() +void TapeHaltRecording(void) { tape.counter++; @@ -644,7 +644,7 @@ void TapeHaltRecording() tape.length_seconds = GetTapeLengthSeconds(); } -void TapeStopRecording() +void TapeStopRecording(void) { if (tape.recording) TapeHaltRecording(); @@ -771,7 +771,7 @@ void TapeTogglePause(boolean toggle_mode) } } -void TapeStartPlaying() +void TapeStartPlaying(void) { if (TAPE_IS_EMPTY(tape)) return; @@ -794,14 +794,14 @@ void TapeStartPlaying() audio.sound_deactivated = FALSE; } -static void TapeStartGamePlaying() +static void TapeStartGamePlaying(void) { TapeStartPlaying(); InitGame(); } -void TapeStopPlaying() +void TapeStopPlaying(void) { tape.playing = FALSE; tape.pausing = FALSE; @@ -813,7 +813,7 @@ void TapeStopPlaying() MapTapeEjectButton(); } -byte *TapePlayAction() +byte *TapePlayAction(void) { int update_delay = FRAMES_PER_SECOND / 2; boolean update_video_display = (FrameCounter % update_delay == 0); @@ -908,7 +908,7 @@ byte *TapePlayAction() return action; } -void TapeStop() +void TapeStop(void) { if (tape.pausing) TapeTogglePause(TAPE_TOGGLE_MANUAL); @@ -926,7 +926,7 @@ void TapeStop() } } -unsigned int GetTapeLengthFrames() +unsigned int GetTapeLengthFrames(void) { unsigned int tape_length_frames = 0; int i; @@ -940,12 +940,12 @@ unsigned int GetTapeLengthFrames() return tape_length_frames; } -unsigned int GetTapeLengthSeconds() +unsigned int GetTapeLengthSeconds(void) { return (GetTapeLengthFrames() * GAME_FRAME_DELAY / 1000); } -static float GetTapeLengthSecondsFloat() +static float GetTapeLengthSecondsFloat(void) { return ((float)GetTapeLengthFrames() * GAME_FRAME_DELAY / 1000); } @@ -964,7 +964,7 @@ static void TapeStartWarpForward(int mode) DrawVideoDisplayCurrentState(); } -static void TapeStopWarpForward() +static void TapeStopWarpForward(void) { tape.fast_forward = FALSE; tape.warp_forward = FALSE; @@ -977,7 +977,7 @@ static void TapeStopWarpForward() DrawVideoDisplayCurrentState(); } -static void TapeSingleStep() +static void TapeSingleStep(void) { if (network.enabled) return; @@ -990,7 +990,7 @@ static void TapeSingleStep() DrawVideoDisplay(VIDEO_STATE_1STEP(tape.single_step), 0); } -void TapeQuickSave() +void TapeQuickSave(void) { if (game_status == GAME_MODE_MAIN) { @@ -1016,7 +1016,7 @@ void TapeQuickSave() SaveEngineSnapshotSingle(); } -void TapeQuickLoad() +void TapeQuickLoad(void) { char *filename = getTapeFilename(level_nr); @@ -1079,7 +1079,7 @@ void TapeQuickLoad() } } -boolean hasSolutionTape() +boolean hasSolutionTape(void) { boolean tape_file_exists = fileExists(getSolutionTapeFilename(level_nr)); boolean level_has_tape = (level.game_engine_type == GAME_ENGINE_TYPE_SP && @@ -1088,7 +1088,7 @@ boolean hasSolutionTape() return (tape_file_exists || level_has_tape); } -boolean InsertSolutionTape() +boolean InsertSolutionTape(void) { if (!hasSolutionTape()) { @@ -1117,7 +1117,7 @@ boolean InsertSolutionTape() return TRUE; } -boolean PlaySolutionTape() +boolean PlaySolutionTape(void) { if (!InsertSolutionTape()) return FALSE; @@ -1132,7 +1132,7 @@ boolean PlaySolutionTape() * tape autoplay functions * ------------------------------------------------------------------------- */ -void AutoPlayTape() +void AutoPlayTape(void) { static LevelDirTree *autoplay_leveldir = NULL; static boolean autoplay_initialized = FALSE; @@ -1311,7 +1311,7 @@ static struct } }; -void CreateTapeButtons() +void CreateTapeButtons(void) { int i; @@ -1350,7 +1350,7 @@ void CreateTapeButtons() } } -void FreeTapeButtons() +void FreeTapeButtons(void) { int i; @@ -1358,19 +1358,19 @@ void FreeTapeButtons() FreeGadget(tape_gadget[i]); } -void MapTapeEjectButton() +void MapTapeEjectButton(void) { UnmapGadget(tape_gadget[TAPE_CTRL_ID_EXTRA]); MapGadget(tape_gadget[TAPE_CTRL_ID_EJECT]); } -void MapTapeWarpButton() +void MapTapeWarpButton(void) { UnmapGadget(tape_gadget[TAPE_CTRL_ID_EJECT]); MapGadget(tape_gadget[TAPE_CTRL_ID_EXTRA]); } -void MapTapeButtons() +void MapTapeButtons(void) { int i; @@ -1385,7 +1385,7 @@ void MapTapeButtons() MapGameButtonsOnTape(); } -void UnmapTapeButtons() +void UnmapTapeButtons(void) { int i; @@ -1396,7 +1396,7 @@ void UnmapTapeButtons() UnmapGameButtonsOnTape(); } -void RedrawTapeButtons() +void RedrawTapeButtons(void) { int i; @@ -1410,7 +1410,7 @@ void RedrawTapeButtons() redraw_mask &= ~REDRAW_ALL; } -void RedrawOrRemapTapeButtons() +void RedrawOrRemapTapeButtons(void) { if (tape_gadget[TAPE_CTRL_ID_PLAY]->mapped) { diff --git a/src/tape.h b/src/tape.h index e7f4da6e..f18f4ee6 100644 --- a/src/tape.h +++ b/src/tape.h @@ -212,11 +212,11 @@ struct TapeInfo void DrawVideoDisplay(unsigned int, unsigned int); void DrawCompleteVideoDisplay(void); -void TapeDeactivateDisplayOn(); +void TapeDeactivateDisplayOn(void); void TapeDeactivateDisplayOff(boolean); void TapeSetDateFromEpochSeconds(time_t); -void TapeSetDateFromNow(); +void TapeSetDateFromNow(void); void TapeStartRecording(int); void TapeHaltRecording(void); @@ -234,20 +234,20 @@ unsigned int GetTapeLengthSeconds(void); void TapeQuickSave(void); void TapeQuickLoad(void); -boolean hasSolutionTape(); +boolean hasSolutionTape(void); boolean InsertSolutionTape(void); boolean PlaySolutionTape(void); void AutoPlayTape(void); -void CreateTapeButtons(); -void FreeTapeButtons(); -void MapTapeEjectButton(); -void MapTapeWarpButton(); -void MapTapeButtons(); -void UnmapTapeButtons(); -void RedrawTapeButtons(); -void RedrawOrRemapTapeButtons(); +void CreateTapeButtons(void); +void FreeTapeButtons(void); +void MapTapeEjectButton(void); +void MapTapeWarpButton(void); +void MapTapeButtons(void); +void UnmapTapeButtons(void); +void RedrawTapeButtons(void); +void RedrawOrRemapTapeButtons(void); void HandleTapeButtonKeys(Key); diff --git a/src/tools.c b/src/tools.c index 4bd3b8d9..82a58803 100644 --- a/src/tools.c +++ b/src/tools.c @@ -166,7 +166,7 @@ static struct DoorPartControlInfo door_part_controls[] = /* forward declaration for internal use */ -static void UnmapToolButtons(); +static void UnmapToolButtons(void); static void HandleToolButtons(struct GadgetInfo *); static int el_act_dir2crm(int, int, int); static int el_act2crm(int, int); @@ -208,7 +208,7 @@ int correctLevelPosY_EM(int ly) return ly; } -static int getFieldbufferOffsetX_RND() +static int getFieldbufferOffsetX_RND(void) { int full_lev_fieldx = lev_fieldx + (BorderElement != EL_EMPTY ? 2 : 0); int dx = (ScreenMovDir & (MV_LEFT | MV_RIGHT) ? ScreenGfxPos : 0); @@ -240,7 +240,7 @@ static int getFieldbufferOffsetX_RND() return fx; } -static int getFieldbufferOffsetY_RND() +static int getFieldbufferOffsetY_RND(void) { int full_lev_fieldy = lev_fieldy + (BorderElement != EL_EMPTY ? 2 : 0); int dy = (ScreenMovDir & (MV_UP | MV_DOWN) ? ScreenGfxPos : 0); @@ -479,7 +479,7 @@ void SetDrawtoField(int mode) } } -static void RedrawPlayfield_RND() +static void RedrawPlayfield_RND(void) { if (game.envelope_active) return; @@ -488,7 +488,7 @@ static void RedrawPlayfield_RND() DrawAllPlayers(); } -void RedrawPlayfield() +void RedrawPlayfield(void) { if (game_status != GAME_MODE_PLAYING) return; @@ -592,7 +592,7 @@ static void DrawMaskedBorderExt(int redraw_mask, int draw_target) } } -void DrawMaskedBorder_FIELD() +void DrawMaskedBorder_FIELD(void) { DrawMaskedBorderExt_FIELD(DRAW_TO_BACKBUFFER); } @@ -711,7 +711,7 @@ void BlitScreenToBitmap(Bitmap *target_bitmap) redraw_mask |= REDRAW_FIELD; } -void DrawFramesPerSecond() +void DrawFramesPerSecond(void) { char text[100]; int font_nr = FONT_TEXT_2; @@ -737,7 +737,7 @@ void DrawFramesPerSecond() } #if DEBUG_FRAME_TIME -static void PrintFrameTimeDebugging() +static void PrintFrameTimeDebugging(void) { static unsigned int last_counter = 0; unsigned int counter = Counter(); @@ -790,7 +790,7 @@ static boolean equalRedrawMasks(int mask_1, int mask_2) return unifiedRedrawMask(mask_1) == unifiedRedrawMask(mask_2); } -void BackToFront() +void BackToFront(void) { static int last_redraw_mask = REDRAW_NONE; @@ -985,7 +985,7 @@ static void FadeExt(int fade_mask, int fade_mode, int fade_type) ClearAutoRepeatKeyEvents(); } -static void SetScreenStates_BeforeFadingIn() +static void SetScreenStates_BeforeFadingIn(void) { // temporarily set screen mode for animations to screen after fading in global.anim_status = global.anim_status_next; @@ -998,7 +998,7 @@ static void SetScreenStates_BeforeFadingIn() global.anim_status = GAME_MODE_PSEUDO_FADING; } -static void SetScreenStates_AfterFadingIn() +static void SetScreenStates_AfterFadingIn(void) { // store new source screen (to use correct masked border for fading) gfx.fade_border_source_status = global.border_status; @@ -1006,7 +1006,7 @@ static void SetScreenStates_AfterFadingIn() global.anim_status = global.anim_status_next; } -static void SetScreenStates_BeforeFadingOut() +static void SetScreenStates_BeforeFadingOut(void) { // store new target screen (to use correct masked border for fading) gfx.fade_border_target_status = game_status; @@ -1019,7 +1019,7 @@ static void SetScreenStates_BeforeFadingOut() PrepareFadeBitmap(DRAW_TO_FADE_SOURCE); } -static void SetScreenStates_AfterFadingOut() +static void SetScreenStates_AfterFadingOut(void) { global.border_status = game_status; } @@ -1086,28 +1086,28 @@ static void FadeSetLeaveNext(struct TitleFadingInfo fading_leave, boolean set) fading = fading_leave_stored; } -void FadeSetEnterMenu() +void FadeSetEnterMenu(void) { fading = menu.enter_menu; FadeSetLeaveNext(fading, TRUE); /* (keep same fade mode) */ } -void FadeSetLeaveMenu() +void FadeSetLeaveMenu(void) { fading = menu.leave_menu; FadeSetLeaveNext(fading, TRUE); /* (keep same fade mode) */ } -void FadeSetEnterScreen() +void FadeSetEnterScreen(void) { fading = menu.enter_screen[game_status]; FadeSetLeaveNext(menu.leave_screen[game_status], TRUE); /* store */ } -void FadeSetNextScreen() +void FadeSetNextScreen(void) { fading = menu.next_screen[game_status]; @@ -1115,7 +1115,7 @@ void FadeSetNextScreen() // FadeSetLeaveNext(fading, TRUE); /* (keep same fade mode) */ } -void FadeSetLeaveScreen() +void FadeSetLeaveScreen(void) { FadeSetLeaveNext(menu.leave_screen[game_status], FALSE); /* recall */ } @@ -1130,19 +1130,19 @@ void FadeSetFromType(int type) FadeSetLeaveMenu(); } -void FadeSetDisabled() +void FadeSetDisabled(void) { static struct TitleFadingInfo fading_none = { FADE_MODE_NONE, -1, -1, -1 }; fading = fading_none; } -void FadeSkipNextFadeIn() +void FadeSkipNextFadeIn(void) { FadeExt(0, FADE_MODE_SKIP_FADE_IN, FADE_TYPE_SKIP); } -void FadeSkipNextFadeOut() +void FadeSkipNextFadeOut(void) { FadeExt(0, FADE_MODE_SKIP_FADE_OUT, FADE_TYPE_SKIP); } @@ -1213,7 +1213,7 @@ void SetDoorBackgroundImage(int graphic) SetDoorBackgroundBitmap(getBackgroundBitmap(graphic)); } -void SetPanelBackground() +void SetPanelBackground(void) { struct GraphicInfo *gfx = &graphic_info[IMG_BACKGROUND_PANEL]; @@ -1270,7 +1270,7 @@ static int vxsize_last = -1, vysize_last = -1; static int ex_last = -1, ey_last = -1; static int exsize_last = -1, eysize_last = -1; -boolean CheckIfGlobalBorderHasChanged() +boolean CheckIfGlobalBorderHasChanged(void) { // if game status has not changed, global border has not changed either if (game_status == game_status_last) @@ -1282,7 +1282,7 @@ boolean CheckIfGlobalBorderHasChanged() return (global_border_bitmap_last != global_border_bitmap); } -boolean CheckIfGlobalBorderRedrawIsNeeded() +boolean CheckIfGlobalBorderRedrawIsNeeded(void) { // if game status has not changed, nothing has to be redrawn if (game_status == game_status_last) @@ -1327,7 +1327,7 @@ void RedrawGlobalBorderFromBitmap(Bitmap *bitmap) ClearRectangle(backbuffer, 0, 0, WIN_XSIZE, WIN_YSIZE); } -void RedrawGlobalBorder() +void RedrawGlobalBorder(void) { Bitmap *bitmap = getGlobalBorderBitmapFromStatus(game_status); @@ -1338,7 +1338,7 @@ void RedrawGlobalBorder() #define ONLY_REDRAW_GLOBAL_BORDER_IF_NEEDED 0 -static void RedrawGlobalBorderIfNeeded() +static void RedrawGlobalBorderIfNeeded(void) { #if ONLY_REDRAW_GLOBAL_BORDER_IF_NEEDED if (game_status == game_status_last) @@ -1417,7 +1417,7 @@ static void RedrawGlobalBorderIfNeeded() eysize_last = EYSIZE; } -void ClearField() +void ClearField(void) { RedrawGlobalBorderIfNeeded(); @@ -1442,7 +1442,7 @@ void MarkTileDirty(int x, int y) redraw_mask |= REDRAW_FIELD; } -void SetBorderElement() +void SetBorderElement(void) { int x, y; @@ -3510,7 +3510,7 @@ static void DrawPreviewLevelExt(boolean restart) } } -void DrawPreviewPlayers() +void DrawPreviewPlayers(void) { if (game_status != GAME_MODE_MAIN) return; @@ -3585,13 +3585,13 @@ void DrawPreviewPlayers() } } -void DrawPreviewLevelInitial() +void DrawPreviewLevelInitial(void) { DrawPreviewLevelExt(TRUE); DrawPreviewPlayers(); } -void DrawPreviewLevelAnimation() +void DrawPreviewLevelAnimation(void) { DrawPreviewLevelExt(FALSE); } @@ -3679,12 +3679,12 @@ void DrawNetworkPlayersExt(boolean force) } } -void DrawNetworkPlayers() +void DrawNetworkPlayers(void) { DrawNetworkPlayersExt(FALSE); } -void ClearNetworkPlayers() +void ClearNetworkPlayers(void) { DrawNetworkPlayersExt(TRUE); } @@ -3826,7 +3826,7 @@ static boolean equalGraphics(int graphic1, int graphic2) g1->anim_mode == g2->anim_mode); } -void DrawAllPlayers() +void DrawAllPlayers(void) { int i; @@ -4177,7 +4177,7 @@ void DrawPlayer(struct PlayerInfo *player) /* ------------------------------------------------------------------------- */ -void WaitForEventToContinue() +void WaitForEventToContinue(void) { boolean still_wait = TRUE; @@ -4838,7 +4838,7 @@ static int compareDoorPartOrderInfo(const void *object1, const void *object2) return compare_result; } -void InitGraphicCompatibilityInfo_Doors() +void InitGraphicCompatibilityInfo_Doors(void) { struct { @@ -4995,7 +4995,7 @@ void InitGraphicCompatibilityInfo_Doors() } } -void InitDoors() +void InitDoors(void) { int i; @@ -5060,7 +5060,7 @@ unsigned int CloseDoor(unsigned int door_state) return MoveDoor(door_state); } -unsigned int GetDoorState() +unsigned int GetDoorState(void) { return MoveDoor(DOOR_GET_STATE); } @@ -5434,7 +5434,7 @@ unsigned int MoveDoor(unsigned int door_state) return (door1 | door2); } -static boolean useSpecialEditorDoor() +static boolean useSpecialEditorDoor(void) { int graphic = IMG_GLOBAL_BORDER_EDITOR; boolean redefined = getImageListEntryFromImageID(graphic)->redefined; @@ -5457,7 +5457,7 @@ static boolean useSpecialEditorDoor() return TRUE; } -void DrawSpecialEditorDoor() +void DrawSpecialEditorDoor(void) { struct GraphicInfo *gfx1 = &graphic_info[IMG_DOOR_2_TOP_BORDER_CORRECTION]; int top_border_width = gfx1->width; @@ -5480,7 +5480,7 @@ void DrawSpecialEditorDoor() redraw_mask |= REDRAW_ALL; } -void UndrawSpecialEditorDoor() +void UndrawSpecialEditorDoor(void) { struct GraphicInfo *gfx1 = &graphic_info[IMG_DOOR_2_TOP_BORDER_CORRECTION]; int top_border_width = gfx1->width; @@ -5555,7 +5555,7 @@ static struct } }; -void CreateToolButtons() +void CreateToolButtons(void) { int i; @@ -5651,7 +5651,7 @@ void CreateToolButtons() } } -void FreeToolButtons() +void FreeToolButtons(void) { int i; @@ -5659,7 +5659,7 @@ void FreeToolButtons() FreeGadget(tool_gadget[i]); } -static void UnmapToolButtons() +static void UnmapToolButtons(void) { int i; @@ -8113,7 +8113,7 @@ int getBeltSwitchElementFromBeltNrAndBeltDir(int belt_nr, int belt_dir) return getBeltSwitchElementFromBeltNrAndBeltDirNr(belt_nr, belt_dir_nr); } -boolean getTeamMode_EM() +boolean getTeamMode_EM(void) { return game.team_mode || network_playing; } @@ -9169,7 +9169,7 @@ void PlayMenuSoundExt(int sound) PlaySound(sound); } -void PlayMenuSound() +void PlayMenuSound(void) { PlayMenuSoundExt(menu.sound[game_status]); } @@ -9202,7 +9202,7 @@ void PlayMenuSoundIfLoopExt(int sound) PlaySoundLoop(sound); } -void PlayMenuSoundIfLoop() +void PlayMenuSoundIfLoop(void) { PlayMenuSoundIfLoopExt(menu.sound[game_status]); } @@ -9221,7 +9221,7 @@ void PlayMenuMusicExt(int music) PlayMusic(music); } -void PlayMenuMusic() +void PlayMenuMusic(void) { char *curr_music = getCurrentlyPlayingMusicFilename(); char *next_music = getMusicInfoEntryFilename(menu.music[game_status]); @@ -9230,18 +9230,18 @@ void PlayMenuMusic() PlayMenuMusicExt(menu.music[game_status]); } -void PlayMenuSoundsAndMusic() +void PlayMenuSoundsAndMusic(void) { PlayMenuSound(); PlayMenuMusic(); } -static void FadeMenuSounds() +static void FadeMenuSounds(void) { FadeSounds(); } -static void FadeMenuMusic() +static void FadeMenuMusic(void) { char *curr_music = getCurrentlyPlayingMusicFilename(); char *next_music = getMusicInfoEntryFilename(menu.music[game_status]); @@ -9250,27 +9250,27 @@ static void FadeMenuMusic() FadeMusic(); } -void FadeMenuSoundsAndMusic() +void FadeMenuSoundsAndMusic(void) { FadeMenuSounds(); FadeMenuMusic(); } -void PlaySoundActivating() +void PlaySoundActivating(void) { #if 0 PlaySound(SND_MENU_ITEM_ACTIVATING); #endif } -void PlaySoundSelecting() +void PlaySoundSelecting(void) { #if 0 PlaySound(SND_MENU_ITEM_SELECTING); #endif } -void ToggleFullscreenOrChangeWindowScalingIfNeeded() +void ToggleFullscreenOrChangeWindowScalingIfNeeded(void) { boolean change_fullscreen = (setup.fullscreen != video.fullscreen_enabled); @@ -9389,7 +9389,7 @@ void SetFontStatus(int game_status_new) } } -void ResetFontStatus() +void ResetFontStatus(void) { SetFontStatus(-1); } @@ -9401,7 +9401,7 @@ void SetLevelSetInfo(char *identifier, int level_nr) levelset.level_nr = level_nr; } -boolean CheckIfPlayfieldViewportHasChanged() +boolean CheckIfPlayfieldViewportHasChanged(void) { // if game status has not changed, playfield viewport has not changed either if (game_status == game_status_last) @@ -9420,13 +9420,13 @@ boolean CheckIfPlayfieldViewportHasChanged() new_full_sysize != FULL_SYSIZE); } -boolean CheckIfGlobalBorderOrPlayfieldViewportHasChanged() +boolean CheckIfGlobalBorderOrPlayfieldViewportHasChanged(void) { return (CheckIfGlobalBorderHasChanged() || CheckIfPlayfieldViewportHasChanged()); } -void ChangeViewportPropertiesIfNeeded() +void ChangeViewportPropertiesIfNeeded(void) { boolean use_mini_tilesize = (level.game_engine_type == GAME_ENGINE_TYPE_MM ? FALSE : setup.small_game_graphics); diff --git a/src/tools.h b/src/tools.h index b67f23b0..a96930f1 100644 --- a/src/tools.h +++ b/src/tools.h @@ -75,52 +75,52 @@ int getLevelFromScreenY(int); void DumpTile(int, int); void DumpTileFromScreen(int, int); -void DrawMaskedBorder_FIELD(); -void DrawMaskedBorder_DOOR_1(); -void DrawMaskedBorder_DOOR_2(); -void DrawMaskedBorder_DOOR_3(); -void DrawMaskedBorder_ALL(); +void DrawMaskedBorder_FIELD(void); +void DrawMaskedBorder_DOOR_1(void); +void DrawMaskedBorder_DOOR_2(void); +void DrawMaskedBorder_DOOR_3(void); +void DrawMaskedBorder_ALL(void); void DrawMaskedBorder(int); void DrawMaskedBorderToTarget(int); void DrawTileCursor(int); void SetDrawtoField(int); -void RedrawPlayfield(); +void RedrawPlayfield(void); void BlitScreenToBitmap_RND(Bitmap *); void BlitScreenToBitmap(Bitmap *); -void BackToFront(); +void BackToFront(void); void BackToFront_WithFrameDelay(unsigned int); void FadeIn(int); void FadeOut(int); -void FadeSetEnterMenu(); -void FadeSetLeaveMenu(); -void FadeSetEnterScreen(); -void FadeSetNextScreen(); -void FadeSetLeaveScreen(); +void FadeSetEnterMenu(void); +void FadeSetLeaveMenu(void); +void FadeSetEnterScreen(void); +void FadeSetNextScreen(void); +void FadeSetLeaveScreen(void); void FadeSetFromType(int); -void FadeSetDisabled(); -void FadeSkipNextFadeIn(); -void FadeSkipNextFadeOut(); +void FadeSetDisabled(void); +void FadeSkipNextFadeIn(void); +void FadeSkipNextFadeOut(void); Bitmap *getGlobalBorderBitmapFromStatus(int); -void ClearField(); +void ClearField(void); void SetWindowBackgroundImageIfDefined(int); void SetMainBackgroundImageIfDefined(int); void SetDoorBackgroundImageIfDefined(int); void SetWindowBackgroundImage(int); void SetMainBackgroundImage(int); void SetDoorBackgroundImage(int); -void SetPanelBackground(); +void SetPanelBackground(void); void DrawBackground(int, int, int, int); void DrawBackgroundForFont(int, int, int, int, int); void DrawBackgroundForGraphic(int, int, int, int, int); -boolean CheckIfGlobalBorderHasChanged(); -void RedrawGlobalBorder(); +boolean CheckIfGlobalBorderHasChanged(void); +void RedrawGlobalBorder(void); void MarkTileDirty(int, int); -void SetBorderElement(); +void SetBorderElement(void); void FloodFillLevel(int, int, int, short[][MAX_LEV_FIELDY], int, int); void FloodFillLevelExt(int, int, int, int, int y, short field[][y], int, int); @@ -210,11 +210,11 @@ unsigned int GetDoorState(void); unsigned int SetDoorState(unsigned int); unsigned int MoveDoor(unsigned int); -void DrawSpecialEditorDoor(); -void UndrawSpecialEditorDoor(); +void DrawSpecialEditorDoor(void); +void UndrawSpecialEditorDoor(void); -void CreateToolButtons(); -void FreeToolButtons(); +void CreateToolButtons(void); +void FreeToolButtons(void); int map_element_RND_to_EM(int); int map_element_EM_to_RND(int); @@ -262,28 +262,28 @@ unsigned int InitRND(int); void InitGraphicInfo_EM(void); void PlayMenuSoundExt(int); -void PlayMenuSound(); +void PlayMenuSound(void); void PlayMenuSoundStereo(int, int); void PlayMenuSoundIfLoopExt(int); -void PlayMenuSoundIfLoop(); +void PlayMenuSoundIfLoop(void); void PlayMenuMusicExt(int); -void PlayMenuMusic(); -void PlayMenuSoundsAndMusic(); -void FadeMenuSoundsAndMusic(); -void PlaySoundActivating(); -void PlaySoundSelecting(); +void PlayMenuMusic(void); +void PlayMenuSoundsAndMusic(void); +void FadeMenuSoundsAndMusic(void); +void PlaySoundActivating(void); +void PlaySoundSelecting(void); void SetAnimStatus(int); void SetGameStatus(int); void SetFontStatus(int); -void ResetFontStatus(); +void ResetFontStatus(void); void SetLevelSetInfo(char *, int); -void ToggleFullscreenOrChangeWindowScalingIfNeeded(); -void ChangeViewportPropertiesIfNeeded(); +void ToggleFullscreenOrChangeWindowScalingIfNeeded(void); +void ChangeViewportPropertiesIfNeeded(void); -boolean CheckIfPlayfieldViewportHasChanged(); -boolean CheckIfGlobalBorderOrPlayfieldViewportHasChanged(); +boolean CheckIfPlayfieldViewportHasChanged(void); +boolean CheckIfGlobalBorderOrPlayfieldViewportHasChanged(void); #endif /* TOOLS_H */