# 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 -Wstrict-prototypes # only for debugging purposes
+OPTIONS = $(DEBUG) -Wall -Wstrict-prototypes -Wmissing-prototypes
# OPTIONS = $(DEBUG) -Wall -ansi -pedantic # only for debugging purposes
# OPTIONS = -O3 -Wall -ansi -pedantic
# OPTIONS = -O3 -Wall
ctrl->num_anims++;
}
-void InitGlobalAnimControls(void)
+static void InitGlobalAnimControls(void)
{
int i, m, a, p;
int mode_nr, anim_nr, part_nr;
InitGlobalAnimControls();
}
-void DrawGlobalAnimationsExt(int drawing_target, int drawing_stage)
+static void DrawGlobalAnimationsExt(int drawing_target, int drawing_stage)
{
Bitmap *fade_bitmap =
(drawing_target == DRAW_TO_FADE_SOURCE ? gfx.fade_bitmap_source :
ResetGlobalAnim_Clicked();
}
-boolean SetGlobalAnimPart_Viewport(struct GlobalAnimPartControlInfo *part)
+static boolean SetGlobalAnimPart_Viewport(struct GlobalAnimPartControlInfo *part)
{
int viewport_x;
int viewport_y;
return (part->control_info.style & STYLE_PASSTHROUGH ? FALSE : TRUE);
}
-int HandleGlobalAnim_Part(struct GlobalAnimPartControlInfo *part, int state)
+static int HandleGlobalAnim_Part(struct GlobalAnimPartControlInfo *part,
+ int state)
{
struct GlobalAnimControlInfo *ctrl = &global_anim_ctrl[part->mode_nr];
struct GlobalAnimMainControlInfo *anim = &ctrl->anim[part->anim_nr];
return ANIM_STATE_RUNNING;
}
-void HandleGlobalAnim_Main(struct GlobalAnimMainControlInfo *anim, int action)
+static void HandleGlobalAnim_Main(struct GlobalAnimMainControlInfo *anim,
+ int action)
{
struct GlobalAnimPartControlInfo *part;
struct GraphicInfo *c = &anim->control_info;
anim->last_active_part_nr = active_part_nr;
}
-void HandleGlobalAnim_Mode(struct GlobalAnimControlInfo *ctrl, int action)
+static void HandleGlobalAnim_Mode(struct GlobalAnimControlInfo *ctrl, int action)
{
int i;
return NULL;
}
-char *getElementDescriptionFilename(int element)
+static char *getElementDescriptionFilename(int element)
{
char basename[MAX_FILENAME_LEN];
char *filename;
BackToFront();
}
-void getEditorGraphicSource(int element, int tile_size, Bitmap **bitmap,
- int *x, int *y)
+static void getEditorGraphicSource(int element, int tile_size, Bitmap **bitmap,
+ int *x, int *y)
{
getSizedGraphicSource(el2edimg(element), 0, tile_size, bitmap, x, y);
}
CopyClassicElementPropertiesToGame(element);
}
-void CheckElementDescriptions(void)
+static void CheckElementDescriptions(void)
{
int i;
return max_ed_fieldy;
}
-void InitZoomLevelSettings(int zoom_tilesize)
+static void InitZoomLevelSettings(int zoom_tilesize)
{
static int last_game_engine_type = GAME_ENGINE_TYPE_UNKNOWN;
return (door_1_viewport_unchanged && door_1_contains_toolbox);
}
-void DrawEditorDoorContent(void)
+static void DrawEditorDoorContent(void)
{
/* needed for gadgets drawn on background (like palette scrollbar) */
SetDoorBackgroundImage(IMG_UNDEFINED);
CopyLevelToUndoBuffer(UNDO_IMMEDIATE);
}
-void WrapLevel(int dx, int dy)
+static void WrapLevel(int dx, int dy)
{
int wrap_dx = lev_fieldx - dx;
int wrap_dy = lev_fieldy - dy;
return FALSE;
}
-void HandleEvents(void)
+static void HandleEvents(void)
{
Event event;
unsigned int event_frame_delay = 0;
}
}
-void HandleMouseCursor(void)
+static void HandleMouseCursor(void)
{
if (game_status == GAME_MODE_TITLE)
{
}
}
-void ClearPlayerMouseAction(void)
+static void ClearPlayerMouseAction(void)
{
local_player->mouse_action.lx = 0;
local_player->mouse_action.ly = 0;
ClearPlayerMouseAction();
}
-void SetPlayerMouseAction(int mx, int my, int button)
+static void SetPlayerMouseAction(int mx, int my, int button)
{
int lx = getLevelFromScreenX(mx);
int ly = getLevelFromScreenY(my);
Key key;
} touch_info[NUM_TOUCH_FINGERS];
-void HandleFingerEvent_VirtualButtons(FingerEvent *event)
+static void HandleFingerEvent_VirtualButtons(FingerEvent *event)
{
#if 1
int x = event->x * overlay.grid_xsize;
}
}
-void HandleFingerEvent_WipeGestures(FingerEvent *event)
+static void HandleFingerEvent_WipeGestures(FingerEvent *event)
{
static Key motion_key_x = KSYM_UNDEFINED;
static Key motion_key_y = KSYM_UNDEFINED;
/* functions for loading R'n'D level */
/* ------------------------------------------------------------------------- */
-int getMappedElement(int element)
+static int getMappedElement(int element)
{
/* remap some (historic, now obsolete) elements */
return element;
}
-int getMappedElementByVersion(int element, int game_version)
+static int getMappedElementByVersion(int element, int game_version)
{
/* remap some elements due to certain game version */
/* functions for loading EM level */
/* ------------------------------------------------------------------------- */
-void CopyNativeLevel_RND_to_EM(struct LevelInfo *level)
+static void CopyNativeLevel_RND_to_EM(struct LevelInfo *level)
{
static int ball_xy[8][2] =
{
}
}
-void CopyNativeLevel_EM_to_RND(struct LevelInfo *level)
+static void CopyNativeLevel_EM_to_RND(struct LevelInfo *level)
{
static int ball_xy[8][2] =
{
/* functions for loading SP level */
/* ------------------------------------------------------------------------- */
-void CopyNativeLevel_RND_to_SP(struct LevelInfo *level)
+static void CopyNativeLevel_RND_to_SP(struct LevelInfo *level)
{
struct LevelInfo_SP *level_sp = level->native_sp_level;
LevelInfoType *header = &level_sp->header;
}
}
-void CopyNativeLevel_SP_to_RND(struct LevelInfo *level)
+static void CopyNativeLevel_SP_to_RND(struct LevelInfo *level)
{
struct LevelInfo_SP *level_sp = level->native_sp_level;
LevelInfoType *header = &level_sp->header;
/* functions for loading MM level */
/* ------------------------------------------------------------------------- */
-void CopyNativeLevel_RND_to_MM(struct LevelInfo *level)
+static void CopyNativeLevel_RND_to_MM(struct LevelInfo *level)
{
struct LevelInfo_MM *level_mm = level->native_mm_level;
int x, y;
level_mm->field[x][y] = map_element_RND_to_MM(level->field[x][y]);
}
-void CopyNativeLevel_MM_to_RND(struct LevelInfo *level)
+static void CopyNativeLevel_MM_to_RND(struct LevelInfo *level)
{
struct LevelInfo_MM *level_mm = level->native_mm_level;
int x, y;
#define DC_LEVEL_HEADER_SIZE 344
-unsigned short getDecodedWord_DC(unsigned short data_encoded, boolean init)
+static unsigned short getDecodedWord_DC(unsigned short data_encoded,
+ boolean init)
{
static int last_data_encoded;
static int offset1;
return data_decoded;
}
-int getMappedElement_DC(int element)
+static int getMappedElement_DC(int element)
{
switch (element)
{
return chunk_size;
}
-void LoadTape_SokobanSolution(char *filename)
+static void LoadTape_SokobanSolution(char *filename)
{
File *file;
int move_delay = TILESIZE / level.initial_player_stepsize[0];
}
}
-void add_helpanim_entry(int element, int action, int direction, int delay,
- int *num_list_entries)
+static void add_helpanim_entry(int element, int action, int direction,
+ int delay, int *num_list_entries)
{
struct HelpAnimInfo *new_list_entry;
(*num_list_entries)++;
new_list_entry->delay = delay;
}
-void print_unknown_token(char *filename, char *token, int token_nr)
+static void print_unknown_token(char *filename, char *token, int token_nr)
{
if (token_nr == 0)
{
Error(ERR_INFO, "- token: '%s'", token);
}
-void print_unknown_token_end(int token_nr)
+static void print_unknown_token_end(int token_nr)
{
if (token_nr > 0)
Error(ERR_INFO_LINE, "-");
return stored_player[player_nr].inventory_size;
}
-void InitGameControlValues(void)
+static void InitGameControlValues(void)
{
int i;
sizeof(struct GamePanelOrderInfo), compareGamePanelOrderInfo);
}
-void UpdatePlayfieldElementCount(void)
+static void UpdatePlayfieldElementCount(void)
{
boolean use_element_count = FALSE;
int i, j, x, y;
element_info[j].element_count;
}
-void UpdateGameControlValues(void)
+static void UpdateGameControlValues(void)
{
int i, k;
int time = (local_player->LevelSolved ?
}
}
-void DisplayGameControlValues(void)
+static void DisplayGameControlValues(void)
{
boolean redraw_panel = FALSE;
int i;
DisplayGameControlValues();
}
-void UpdateGameDoorValues(void)
+#if 0
+static void UpdateGameDoorValues(void)
{
UpdateGameControlValues();
}
+#endif
void DrawGameDoorValues(void)
{
level.time = 0;
}
-int get_num_special_action(int element, int action_first, int action_last)
+static int get_num_special_action(int element, int action_first,
+ int action_last)
{
int num_special_action = 0;
int i, j;
GfxRandom[x][y] = INIT_GFX_RANDOM();
}
-void InitMovingField(int x, int y, int direction)
+static void InitMovingField(int x, int y, int direction)
{
int element = Feld[x][y];
int dx = (direction == MV_LEFT ? -1 : direction == MV_RIGHT ? +1 : 0);
*comes_from_y = oldy;
}
-int MovingOrBlocked2Element(int x, int y)
+static int MovingOrBlocked2Element(int x, int y)
{
int element = Feld[x][y];
GfxDir[x][y] = MV_NONE;
}
-void RemoveMovingField(int x, int y)
+static void RemoveMovingField(int x, int y)
{
int oldx = x, oldy = y, newx = x, newy = y;
int element = Feld[x][y];
DrawGraphic(sx, sy, graphic, frame);
}
-void CheckDynamite(int x, int y)
+static void CheckDynamite(int x, int y)
{
if (MovDelay[x][y] != 0) /* dynamite is still waiting to explode */
{
*sy = (sy1 + sy2) / 2;
}
-void DrawRelocateScreen(int old_x, int old_y, int x, int y, int move_dir,
- boolean center_screen, boolean quick_relocation)
+static void DrawRelocateScreen(int old_x, int old_y, int x, int y, int move_dir,
+ boolean center_screen, boolean quick_relocation)
{
unsigned int frame_delay_value_old = GetVideoFrameDelay();
boolean ffwd_delay = (tape.playing && tape.fast_forward);
SetVideoFrameDelay(frame_delay_value_old);
}
-void RelocatePlayer(int jx, int jy, int el_player_raw)
+static void RelocatePlayer(int jx, int jy, int el_player_raw)
{
int el_player = GET_PLAYER_ELEMENT(el_player_raw);
int player_nr = GET_PLAYER_NR(el_player);
}
}
-void Explode(int ex, int ey, int phase, int mode)
+static void Explode(int ex, int ey, int phase, int mode)
{
int x, y;
int last_phase;
}
}
-void DynaExplode(int ex, int ey)
+static void DynaExplode(int ex, int ey)
{
int i, j;
int dynabomb_element = Feld[ex][ey];
CheckTriggeredElementChange(x, y, element, CE_EXPLOSION_OF_X);
}
-void SplashAcid(int x, int y)
+static void SplashAcid(int x, int y)
{
if (IN_LEV_FIELD(x - 1, y - 1) && IS_FREE(x - 1, y - 1) &&
(!IN_LEV_FIELD(x - 1, y - 2) ||
EL_DC_TIMEGATE_SWITCH_ACTIVE);
}
-void Impact(int x, int y)
+static void Impact(int x, int y)
{
boolean last_line = (y == lev_fieldy - 1);
boolean object_hit = FALSE;
return FALSE;
}
-void StartMoving(int x, int y)
+static void StartMoving(int x, int y)
{
boolean started_moving = FALSE; /* some elements can fall _and_ move */
int element = Feld[x][y];
return group_nr;
}
-void AmoebenVereinigen(int ax, int ay)
+static void AmoebenVereinigen(int ax, int ay)
{
int i, x, y, xx, yy;
int new_group_nr = AmoebaNr[ax][ay];
}
}
-void AmoebeUmwandelnBD(int ax, int ay, int new_element)
+static void AmoebeUmwandelnBD(int ax, int ay, int new_element)
{
int x, y;
int group_nr = AmoebaNr[ax][ay];
SND_BD_AMOEBA_TURNING_TO_GEM));
}
-void AmoebeWaechst(int x, int y)
+static void AmoebeWaechst(int x, int y)
{
static unsigned int sound_delay = 0;
static unsigned int sound_delay_value = 0;
}
}
-void AmoebaDisappearing(int x, int y)
+static void AmoebaDisappearing(int x, int y)
{
static unsigned int sound_delay = 0;
static unsigned int sound_delay_value = 0;
}
}
-void AmoebeAbleger(int ax, int ay)
+static void AmoebeAbleger(int ax, int ay)
{
int i;
int element = Feld[ax][ay];
TEST_DrawLevelField(newax, neway);
}
-void Life(int ax, int ay)
+static void Life(int ax, int ay)
{
int x1, y1, x2, y2;
int life_time = 40;
game.ball_content_nr = (game.ball_content_nr + 1) % level.num_ball_contents;
}
-void CheckExit(int x, int y)
+static void CheckExit(int x, int y)
{
if (local_player->gems_still_needed > 0 ||
local_player->sokobanfields_still_needed > 0 ||
PlayLevelSoundNearest(x, y, SND_CLASS_EXIT_OPENING);
}
-void CheckExitEM(int x, int y)
+static void CheckExitEM(int x, int y)
{
if (local_player->gems_still_needed > 0 ||
local_player->sokobanfields_still_needed > 0 ||
PlayLevelSoundNearest(x, y, SND_CLASS_EM_EXIT_OPENING);
}
-void CheckExitSteel(int x, int y)
+static void CheckExitSteel(int x, int y)
{
if (local_player->gems_still_needed > 0 ||
local_player->sokobanfields_still_needed > 0 ||
PlayLevelSoundNearest(x, y, SND_CLASS_STEEL_EXIT_OPENING);
}
-void CheckExitSteelEM(int x, int y)
+static void CheckExitSteelEM(int x, int y)
{
if (local_player->gems_still_needed > 0 ||
local_player->sokobanfields_still_needed > 0 ||
PlayLevelSoundNearest(x, y, SND_CLASS_EM_STEEL_EXIT_OPENING);
}
-void CheckExitSP(int x, int y)
+static void CheckExitSP(int x, int y)
{
if (local_player->gems_still_needed > 0)
{
}
}
-void DrawTwinkleOnField(int x, int y)
+static void DrawTwinkleOnField(int x, int y)
{
if (!IN_SCR_FIELD(SCREENX(x), SCREENY(y)) || IS_MOVING(x, y))
return;
}
}
-void MauerWaechst(int x, int y)
+static void MauerWaechst(int x, int y)
{
int delay = 6;
}
}
-void MauerAbleger(int ax, int ay)
+static void MauerAbleger(int ax, int ay)
{
int element = Feld[ax][ay];
int graphic = el2img(element);
PlayLevelSoundAction(ax, ay, ACTION_GROWING);
}
-void MauerAblegerStahl(int ax, int ay)
+static void MauerAblegerStahl(int ax, int ay)
{
int element = Feld[ax][ay];
int graphic = el2img(element);
PlayLevelSoundAction(ax, ay, ACTION_GROWING);
}
-void CheckForDragon(int x, int y)
+static void CheckForDragon(int x, int y)
{
int i, j;
boolean dragon_found = FALSE;
InitGame();
}
-void GameActionsExt(void)
+static void GameActionsExt(void)
{
#if 0
static unsigned int game_frame_delay = 0;
FreeSnapshotList();
}
-ListNode *SaveEngineSnapshotBuffers(void)
+static ListNode *SaveEngineSnapshotBuffers(void)
{
ListNode *buffers = NULL;
SaveEngineSnapshotToList();
}
-void LoadEngineSnapshotValues(void)
+static void LoadEngineSnapshotValues(void)
{
/* restore special values from snapshot structure */
LoadEngineSnapshotValues();
}
-void LoadEngineSnapshot_Undo(int steps)
+static void LoadEngineSnapshot_Undo(int steps)
{
LoadSnapshotFromList_Older(steps);
LoadEngineSnapshotValues();
}
-void LoadEngineSnapshot_Redo(int steps)
+static void LoadEngineSnapshot_Redo(int steps)
{
LoadSnapshotFromList_Newer(steps);
ModifyGadget(game_gadget[GAME_CTRL_ID_PAUSE2], GDI_CHECKED, FALSE, GDI_END);
}
-void MapGameButtonsExt(boolean on_tape)
+static void MapGameButtonsExt(boolean on_tape)
{
int i;
RedrawGameButtons();
}
-void UnmapGameButtonsExt(boolean on_tape)
+static void UnmapGameButtonsExt(boolean on_tape)
{
int i;
UnmapGadget(game_gadget[i]);
}
-void RedrawGameButtonsExt(boolean on_tape)
+static void RedrawGameButtonsExt(boolean on_tape)
{
int i;
redraw_mask &= ~REDRAW_ALL;
}
-void SetGadgetState(struct GadgetInfo *gi, boolean state)
+static void SetGadgetState(struct GadgetInfo *gi, boolean state)
{
if (gi == NULL)
return;
gi->checked = state;
}
-void RedrawSoundButtonGadget(int id)
+static void RedrawSoundButtonGadget(int id)
{
int id2 = (id == SOUND_CTRL_ID_MUSIC ? SOUND_CTRL_ID_PANEL_MUSIC :
id == SOUND_CTRL_ID_LOOPS ? SOUND_CTRL_ID_PANEL_LOOPS :
RedrawGameButtonsExt(TRUE);
}
-void GameUndoRedoExt(void)
+static void GameUndoRedoExt(void)
{
ClearPlayerAction();
BackToFront();
}
-void GameUndo(int steps)
+static void GameUndo(int steps)
{
if (!CheckEngineSnapshotList())
return;
GameUndoRedoExt();
}
-void GameRedo(int steps)
+static void GameRedo(int steps)
{
if (!CheckEngineSnapshotList())
return;
extern void LoadEngineSnapshotValues_EM(void);
extern void SaveEngineSnapshotValues_EM(void);
+extern boolean checkIfAllPlayersFitToScreen(void);
+
+extern void tab_generate(void);
+extern void tab_generate_graphics_info_em(void);
+
#endif /* EXPORT_H */
char *progname;
char *arg_basedir;
-extern void tab_generate(void);
-extern void tab_generate_graphics_info_em(void);
-
int open_all(void)
{
Bitmap *emc_bitmaps[2];
RedrawPlayfield_EM(FALSE);
}
-void UpdateGameDoorValues_EM(void)
+static void UpdateGameDoorValues_EM(void)
{
}
#define USE_CHANGED_ACID_STUFF 1
-extern boolean checkIfAllPlayersFitToScreen(void);
-
static void check_player(struct PLAYER *);
static void kill_player(struct PLAYER *);
static boolean player_digfield(struct PLAYER *, int, int);
/* map player number, frames and action to graphic info */
struct GraphicInfo_EM graphic_info_em_player[MAX_PLAYERS][SPR_MAX][8];
-void create_tab(int *invert, unsigned char *array)
+static void create_tab(int *invert, unsigned char *array)
{
int i;
int buffer[TILE_MAX];
array[i] = buffer[i];
}
-void create_explode(void)
+static void create_explode(void)
{
int i;
int *tile = tile_explode;
tab_explode_dynamite[i] = buffer[i];
}
-void create_obj(void)
+static void create_obj(void)
{
int i, j;
int *map = obj_map;
map_obj[i][j] = buffer[7 - i][j];
}
-void create_obj_graphics_info_em(void)
+static void create_obj_graphics_info_em(void)
{
int i, j;
}
}
-void create_spr(void)
+static void create_spr(void)
{
int i, j, k;
int *map = spr_map;
map_spr[i][j][k] = buffer[i][7 - j][k];
}
-void create_spr_graphics_info_em(void)
+static void create_spr_graphics_info_em(void)
{
int i, j, k;
laser.num_damages++;
}
-boolean StepBehind(void)
+static boolean StepBehind(void)
{
if (laser.num_edges)
{
return IMG_MM_MASK_CIRCLE;
}
-int ScanPixel(void)
+static int ScanPixel(void)
{
int hit_mask = 0;
#endif
}
-void DrawLaserExt(int start_edge, int num_edges, int mode)
+static void DrawLaserExt(int start_edge, int num_edges, int mode)
{
int element;
int elx, ely;
return TRUE;
}
-void OpenExit(int x, int y)
+static void OpenExit(int x, int y)
{
int delay = 6;
}
}
-void OpenSurpriseBall(int x, int y)
+static void OpenSurpriseBall(int x, int y)
{
int delay = 2;
}
}
-void MeltIce(int x, int y)
+static void MeltIce(int x, int y)
{
int frames = 5;
int delay = 5;
}
}
-void GrowAmoeba(int x, int y)
+static void GrowAmoeba(int x, int y)
{
int frames = 5;
int delay = 1;
}
}
-void AutoRotateMirrors(void)
+static void AutoRotateMirrors(void)
{
int x, y;
MarkTileDirty(x / 2, y / 2);
}
-void getMicroGraphicSource(int graphic, Bitmap **bitmap, int *x, int *y)
+#if 0
+static void getMicroGraphicSource(int graphic, Bitmap **bitmap, int *x, int *y)
{
getSizedGraphicSource(graphic, 0, TILESIZE / 4, bitmap, x, y);
}
+#endif
void DrawMiniGraphicExt_MM(DrawBuffer *d, int x, int y, int graphic)
{
DrawGraphic_MM(x, y, el2gfx(element));
}
-void DrawMicroWalls_MM(int x, int y, int element)
+#if 0
+static void DrawMicroWalls_MM(int x, int y, int element)
{
Bitmap *bitmap;
int graphic = el2gfx(WALL_BASE(element));
}
}
-void DrawMicroElement_MM(int x, int y, int element)
+static void DrawMicroElement_MM(int x, int y, int element)
{
Bitmap *bitmap;
int graphic = el2gfx(element);
MICROLEV_XPOS + x * MICRO_TILEX, MICROLEV_YPOS + y * MICRO_TILEY);
}
-void DrawMicroLevelExt_MM(int xpos, int ypos)
+static void DrawMicroLevelExt_MM(int xpos, int ypos)
{
int x, y;
redraw_mask |= REDRAW_FIELD;
}
+#endif
void DrawMiniLevel_MM(int size_x, int size_y, int scroll_x, int scroll_y)
{
redraw_mask |= REDRAW_FIELD;
}
-int REQ_in_range(int x, int y)
+#if 0
+static int REQ_in_range(int x, int y)
{
if (y > DY + 249 && y < DY + 278)
{
return 0;
}
+#endif
Pixel ReadPixel(DrawBuffer *bitmap, int x, int y)
{
/* functions for loading Supaplex level */
/* ------------------------------------------------------------------------- */
-void setTapeInfoToDefaults_SP(void)
+static void setTapeInfoToDefaults_SP(void)
{
native_sp_level.demo.is_available = FALSE;
native_sp_level.demo.length = 0;
UpdatePlayfield(force_redraw);
}
-void UpdateGameDoorValues_SP(void)
+static void UpdateGameDoorValues_SP(void)
{
game_sp.time_played = TimerVar / FRAMES_PER_SECOND;
game_sp.infotrons_still_needed = InfotronsNeeded;
static int get_graphic_parameter_value(char *, char *, int);
-void DrawInitAnim(void)
+static void DrawInitAnim(void)
{
struct GraphicInfo *graphic_info_last = graphic_info;
int graphic = 0;
FrameCounter++;
}
-void FreeGadgets(void)
+static void FreeGadgets(void)
{
FreeLevelEditorGadgets();
FreeGameButtons();
CreateImageWithSmallImages(graphic, g->scale_up_factor, g->tile_size);
}
-void InitElementSmallImages(void)
+static void InitElementSmallImages(void)
{
print_timestamp_init("InitElementSmallImages");
ScaleImage(graphic, g->scale_up_factor);
}
-void InitScaledImages(void)
+static void InitScaledImages(void)
{
struct PropertyMapping *property_mapping = getImageListPropertyMapping();
int num_property_mappings = getImageListPropertyMappingSize();
InitScaledImagesScaledUp(property_mapping[i].artwork_index);
}
-void InitBitmapPointers(void)
+static void InitBitmapPointers(void)
{
int num_images = getImageListSize();
int i;
return FONT_INITIAL_1;
}
-void InitFontGraphicInfo(void)
+static void InitFontGraphicInfo(void)
{
static struct FontBitmapInfo *font_bitmap_info = NULL;
struct PropertyMapping *property_mapping = getImageListPropertyMapping();
getFontBitmapID, getFontFromToken);
}
-void InitGlobalAnimGraphicInfo(void)
+static void InitGlobalAnimGraphicInfo(void)
{
struct PropertyMapping *property_mapping = getImageListPropertyMapping();
int num_property_mappings = getImageListPropertyMappingSize();
#endif
}
-void InitGlobalAnimSoundInfo(void)
+static void InitGlobalAnimSoundInfo(void)
{
struct PropertyMapping *property_mapping = getSoundListPropertyMapping();
int num_property_mappings = getSoundListPropertyMappingSize();
#endif
}
-void InitGlobalAnimMusicInfo(void)
+static void InitGlobalAnimMusicInfo(void)
{
struct PropertyMapping *property_mapping = getMusicListPropertyMapping();
int num_property_mappings = getMusicListPropertyMappingSize();
#endif
}
-void InitElementGraphicInfo(void)
+static void InitElementGraphicInfo(void)
{
struct PropertyMapping *property_mapping = getImageListPropertyMapping();
int num_property_mappings = getImageListPropertyMappingSize();
UPDATE_BUSY_STATE();
}
-void InitElementSpecialGraphicInfo(void)
+static void InitElementSpecialGraphicInfo(void)
{
struct PropertyMapping *property_mapping = getImageListPropertyMapping();
int num_property_mappings = getImageListPropertyMappingSize();
global.use_envelope_request = FALSE;
}
-void Execute_Command(char *command)
+static void Execute_Command(char *command)
{
int i;
InitGfxBuffers_SP();
}
-void InitGfx(void)
+static void InitGfx(void)
{
struct GraphicInfo *graphic_info_last = graphic_info;
char *filename_font_initial = NULL;
init_last = init;
}
-void InitGfxBackground(void)
+static void InitGfxBackground(void)
{
fieldbuffer = bitmap_db_field;
SetDrawtoField(DRAW_TO_BACKBUFFER);
InitGlobalAnimations();
}
-void InitNetworkSettings(void)
+static void InitNetworkSettings(void)
{
InitNetworkInfo(options.network || setup.network_mode,
FALSE,
hashtable_insert(struct hashtable *h, void *k, void *v);
#define DEFINE_HASHTABLE_INSERT(fnname, keytype, valuetype) \
-int fnname (struct hashtable *h, keytype *k, valuetype *v) \
+static int fnname (struct hashtable *h, keytype *k, valuetype *v) \
{ \
return hashtable_insert(h,k,v); \
}
hashtable_change(struct hashtable *h, void *k, void *v);
#define DEFINE_HASHTABLE_CHANGE(fnname, keytype, valuetype) \
-int fnname (struct hashtable *h, keytype *k, valuetype *v) \
+static int fnname (struct hashtable *h, keytype *k, valuetype *v) \
{ \
return hashtable_change(h,k,v); \
}
hashtable_search(struct hashtable *h, void *k);
#define DEFINE_HASHTABLE_SEARCH(fnname, keytype, valuetype) \
-valuetype * fnname (struct hashtable *h, keytype *k) \
+static valuetype * fnname (struct hashtable *h, keytype *k) \
{ \
return (valuetype *) (hashtable_search(h,k)); \
}
hashtable_remove(struct hashtable *h, void *k);
#define DEFINE_HASHTABLE_REMOVE(fnname, keytype, valuetype) \
-valuetype * fnname (struct hashtable *h, keytype *k) \
+static valuetype * fnname (struct hashtable *h, keytype *k) \
{ \
return (valuetype *) (hashtable_remove(h,k)); \
}
img_info->contains_textures = TRUE;
}
-void FreeImageTextures(int pos)
+static void FreeImageTextures(int pos)
{
ImageInfo *img_info = getImageInfoEntryFromImageID(pos);
#define TRANSLATE_JOYSYMBOL_TO_JOYNAME 0
#define TRANSLATE_JOYNAME_TO_JOYSYMBOL 1
-void translate_joyname(int *joysymbol, char **name, int mode)
+static void translate_joyname(int *joysymbol, char **name, int mode)
{
static struct
{
return JoystickExt(player_nr, FALSE);
}
-int JoystickButtonExt(int player_nr, boolean use_as_joystick_nr)
+static int JoystickButtonExt(int player_nr, boolean use_as_joystick_nr)
{
static int last_joy_button[MAX_PLAYERS] = { 0, 0, 0, 0 };
int joy_button = (JoystickExt(player_nr, use_as_joystick_nr) & JOY_BUTTON);
#define TRANSLATE_KEYNAME_TO_KEYSYM 2
#define TRANSLATE_X11KEYNAME_TO_KEYSYM 3
-void translate_keyname(Key *keysym, char **x11name, char **name, int mode)
+static void translate_keyname(Key *keysym, char **x11name, char **name, int mode)
{
static struct
{
return (node_first ? 1 + getNumNodes(node_first->next) : 0);
}
-void dumpList(ListNode *node_first)
+#if 0
+static void dumpList(ListNode *node_first)
{
ListNode *node = node_first;
printf("[%d nodes]\n", getNumNodes(node_first));
}
+#endif
/* ------------------------------------------------------------------------- */
return success;
}
-boolean fileHasPrefix(char *basename, char *prefix)
+#if 0
+static boolean fileHasPrefix(char *basename, char *prefix)
{
static char *basename_lower = NULL;
int basename_length, prefix_length;
return FALSE;
}
+#endif
-boolean fileHasSuffix(char *basename, char *suffix)
+static boolean fileHasSuffix(char *basename, char *suffix)
{
static char *basename_lower = NULL;
int basename_length, suffix_length;
return NULL;
}
-char *get_special_base_token(struct ArtworkListInfo *artwork_info, char *token)
+static char *get_special_base_token(struct ArtworkListInfo *artwork_info,
+ char *token)
{
/* !!! make this dynamically configurable (init.c:InitArtworkConfig) !!! */
static struct ConfigTypeInfo prefix_list[] =
return string_has_parameter(substring, s_contained);
}
-int get_anim_parameter_value(char *s)
+static int get_anim_parameter_value(char *s)
{
char *pattern_1 = "click:anim_";
char *pattern_2 = ".part_";
return result;
}
-int get_anim_action_parameter_value(char *token)
+static int get_anim_action_parameter_value(char *token)
{
int result = getImageIDFromToken(token);
}
#endif
-char *debug_print_timestamp_get_padding(int padding_size)
+static char *debug_print_timestamp_get_padding(int padding_size)
{
static char *padding = NULL;
int max_padding_size = 100;
unit);
}
-void debug_print_parent_only(char *format, ...)
+#if 0
+static void debug_print_parent_only(char *format, ...)
{
if (!IS_PARENT_PROCESS())
return;
printf("\n");
}
}
+#endif
#endif /* DEBUG */
-void print_timestamp_ext(char *message, char *mode)
+static void print_timestamp_ext(char *message, char *mode)
{
#if DEBUG_PRINT_INIT_TIMESTAMPS
static char *debug_message = NULL;
/* http://www.etek.chalmers.se/~e8cal1/sge/index.html */
/* ========================================================================= */
-void _PutPixel(SDL_Surface *surface, Sint16 x, Sint16 y, Uint32 color)
+static void _PutPixel(SDL_Surface *surface, Sint16 x, Sint16 y, Uint32 color)
{
if (x >= 0 && x <= surface->w - 1 && y >= 0 && y <= surface->h - 1)
{
}
}
-void _PutPixelRGB(SDL_Surface *surface, Sint16 x, Sint16 y,
- Uint8 R, Uint8 G, Uint8 B)
+#if 0
+static void _PutPixelRGB(SDL_Surface *surface, Sint16 x, Sint16 y,
+ Uint8 R, Uint8 G, Uint8 B)
{
_PutPixel(surface, x, y, SDL_MapRGB(surface->format, R, G, B));
}
-void _PutPixel8(SDL_Surface *surface, Sint16 x, Sint16 y, Uint32 color)
+static void _PutPixel8(SDL_Surface *surface, Sint16 x, Sint16 y, Uint32 color)
{
*((Uint8 *)surface->pixels + y*surface->pitch + x) = color;
}
-void _PutPixel16(SDL_Surface *surface, Sint16 x, Sint16 y, Uint32 color)
+static void _PutPixel16(SDL_Surface *surface, Sint16 x, Sint16 y, Uint32 color)
{
*((Uint16 *)surface->pixels + y*surface->pitch/2 + x) = color;
}
-void _PutPixel24(SDL_Surface *surface, Sint16 x, Sint16 y, Uint32 color)
+static void _PutPixel24(SDL_Surface *surface, Sint16 x, Sint16 y, Uint32 color)
{
Uint8 *pix;
int shift;
*(pix+shift/8) = color>>shift;
}
-void _PutPixel32(SDL_Surface *surface, Sint16 x, Sint16 y, Uint32 color)
+static void _PutPixel32(SDL_Surface *surface, Sint16 x, Sint16 y, Uint32 color)
{
*((Uint32 *)surface->pixels + y*surface->pitch/4 + x) = color;
}
-void _PutPixelX(SDL_Surface *dest,Sint16 x,Sint16 y,Uint32 color)
+static void _PutPixelX(SDL_Surface *dest,Sint16 x,Sint16 y,Uint32 color)
{
switch (dest->format->BytesPerPixel)
{
break;
}
}
+#endif
-void sge_PutPixel(SDL_Surface *surface, Sint16 x, Sint16 y, Uint32 color)
+static void sge_PutPixel(SDL_Surface *surface, Sint16 x, Sint16 y, Uint32 color)
{
if (SDL_MUSTLOCK(surface))
{
}
}
-void sge_PutPixelRGB(SDL_Surface *surface, Sint16 x, Sint16 y,
- Uint8 r, Uint8 g, Uint8 b)
+#if 0
+static void sge_PutPixelRGB(SDL_Surface *surface, Sint16 x, Sint16 y,
+ Uint8 r, Uint8 g, Uint8 b)
{
sge_PutPixel(surface, x, y, SDL_MapRGB(surface->format, r, g, b));
}
-Sint32 sge_CalcYPitch(SDL_Surface *dest, Sint16 y)
+static Sint32 sge_CalcYPitch(SDL_Surface *dest, Sint16 y)
{
if (y >= 0 && y <= dest->h - 1)
{
return -1;
}
-void sge_pPutPixel(SDL_Surface *surface, Sint16 x, Sint32 ypitch, Uint32 color)
+static void sge_pPutPixel(SDL_Surface *surface, Sint16 x, Sint32 ypitch,
+ Uint32 color)
{
if (x >= 0 && x <= surface->w - 1 && ypitch >= 0)
{
}
}
-void sge_HLine(SDL_Surface *Surface, Sint16 x1, Sint16 x2, Sint16 y,
- Uint32 Color)
+static void sge_HLine(SDL_Surface *Surface, Sint16 x1, Sint16 x2, Sint16 y,
+ Uint32 Color)
{
SDL_Rect l;
}
}
-void sge_HLineRGB(SDL_Surface *Surface, Sint16 x1, Sint16 x2, Sint16 y,
- Uint8 R, Uint8 G, Uint8 B)
+static void sge_HLineRGB(SDL_Surface *Surface, Sint16 x1, Sint16 x2, Sint16 y,
+ Uint8 R, Uint8 G, Uint8 B)
{
sge_HLine(Surface, x1, x2, y, SDL_MapRGB(Surface->format, R, G, B));
}
-void _HLine(SDL_Surface *Surface, Sint16 x1, Sint16 x2, Sint16 y, Uint32 Color)
+static void _HLine(SDL_Surface *Surface, Sint16 x1, Sint16 x2, Sint16 y,
+ Uint32 Color)
{
SDL_Rect l;
SDL_FillRect(Surface, &l, Color);
}
-void sge_VLine(SDL_Surface *Surface, Sint16 x, Sint16 y1, Sint16 y2,
- Uint32 Color)
+static void sge_VLine(SDL_Surface *Surface, Sint16 x, Sint16 y1, Sint16 y2,
+ Uint32 Color)
{
SDL_Rect l;
}
}
-void sge_VLineRGB(SDL_Surface *Surface, Sint16 x, Sint16 y1, Sint16 y2,
- Uint8 R, Uint8 G, Uint8 B)
+static void sge_VLineRGB(SDL_Surface *Surface, Sint16 x, Sint16 y1, Sint16 y2,
+ Uint8 R, Uint8 G, Uint8 B)
{
sge_VLine(Surface, x, y1, y2, SDL_MapRGB(Surface->format, R, G, B));
}
-void _VLine(SDL_Surface *Surface, Sint16 x, Sint16 y1, Sint16 y2, Uint32 Color)
+static void _VLine(SDL_Surface *Surface, Sint16 x, Sint16 y1, Sint16 y2,
+ Uint32 Color)
{
SDL_Rect l;
SDL_FillRect(Surface, &l, Color);
}
+#endif
-void sge_DoLine(SDL_Surface *Surface, Sint16 x1, Sint16 y1,
- Sint16 x2, Sint16 y2, Uint32 Color,
- void Callback(SDL_Surface *Surf, Sint16 X, Sint16 Y,
- Uint32 Color))
+static void sge_DoLine(SDL_Surface *Surface, Sint16 x1, Sint16 y1,
+ Sint16 x2, Sint16 y2, Uint32 Color,
+ void Callback(SDL_Surface *Surf, Sint16 X, Sint16 Y,
+ Uint32 Color))
{
Sint16 dx, dy, sdx, sdy, x, y, px, py;
}
}
-void sge_DoLineRGB(SDL_Surface *Surface, Sint16 X1, Sint16 Y1,
- Sint16 X2, Sint16 Y2, Uint8 R, Uint8 G, Uint8 B,
- void Callback(SDL_Surface *Surf, Sint16 X, Sint16 Y,
- Uint32 Color))
+#if 0
+static void sge_DoLineRGB(SDL_Surface *Surface, Sint16 X1, Sint16 Y1,
+ Sint16 X2, Sint16 Y2, Uint8 R, Uint8 G, Uint8 B,
+ void Callback(SDL_Surface *Surf, Sint16 X, Sint16 Y,
+ Uint32 Color))
{
sge_DoLine(Surface, X1, Y1, X2, Y2,
SDL_MapRGB(Surface->format, R, G, B), Callback);
}
+#endif
void sge_Line(SDL_Surface *Surface, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2,
Uint32 Color)
}
}
-void sge_LineRGB(SDL_Surface *Surface, Sint16 x1, Sint16 y1, Sint16 x2,
- Sint16 y2, Uint8 R, Uint8 G, Uint8 B)
+#if 0
+static void sge_LineRGB(SDL_Surface *Surface, Sint16 x1, Sint16 y1, Sint16 x2,
+ Sint16 y2, Uint8 R, Uint8 G, Uint8 B)
{
sge_Line(Surface, x1, y1, x2, y2, SDL_MapRGB(Surface->format, R, G, B));
}
+#endif
void SDLPutPixel(Bitmap *dst_bitmap, int x, int y, Pixel pixel)
{
Uint8 a;
} tColorRGBA;
-int zoomSurfaceRGBA_scaleDownBy2(SDL_Surface *src, SDL_Surface *dst)
+static int zoomSurfaceRGBA_scaleDownBy2(SDL_Surface *src, SDL_Surface *dst)
{
int x, y;
tColorRGBA *sp, *csp, *dp;
return 0;
}
-int zoomSurfaceRGBA(SDL_Surface *src, SDL_Surface *dst)
+static int zoomSurfaceRGBA(SDL_Surface *src, SDL_Surface *dst)
{
int x, y, *sax, *say, *csax, *csay;
float sx, sy;
-----------------------------------------------------------------------------
*/
-int zoomSurfaceY(SDL_Surface * src, SDL_Surface * dst)
+static int zoomSurfaceY(SDL_Surface * src, SDL_Surface * dst)
{
Uint32 x, y, sx, sy, *sax, *say, *csax, *csay, csx, csy;
Uint8 *sp, *dp, *csp;
-----------------------------------------------------------------------------
*/
-SDL_Surface *zoomSurface(SDL_Surface *src, int dst_width, int dst_height)
+static SDL_Surface *zoomSurface(SDL_Surface *src, int dst_width, int dst_height)
{
SDL_Surface *zoom_src = NULL;
SDL_Surface *zoom_dst = NULL;
return NULL;
}
-char *getLevelSetTitleMessageBasename(int nr, boolean initial)
+static char *getLevelSetTitleMessageBasename(int nr, boolean initial)
{
static char basename[32];
createDirectory(getLevelSetupDir(level_subdir), "level setup", PERMS_PRIVATE);
}
-void InitCacheDirectory(void)
+static void InitCacheDirectory(void)
{
createDirectory(getUserGameDataDir(), "user data", PERMS_PRIVATE);
createDirectory(getCacheDir(), "cache data", PERMS_PRIVATE);
return NULL;
}
-TreeInfo *cloneTreeNode(TreeInfo **node_top, TreeInfo *node_parent,
- TreeInfo *node, boolean skip_sets_without_levels)
+static TreeInfo *cloneTreeNode(TreeInfo **node_top, TreeInfo *node_parent,
+ TreeInfo *node, boolean skip_sets_without_levels)
{
TreeInfo *node_new;
return node_new;
}
-void cloneTree(TreeInfo **ti_new, TreeInfo *ti, boolean skip_empty_sets)
+static void cloneTree(TreeInfo **ti_new, TreeInfo *ti, boolean skip_empty_sets)
{
TreeInfo *ti_cloned = cloneTreeNode(ti_new, NULL, ti, skip_empty_sets);
return TRUE;
}
-void saveSetupFileHash(SetupFileHash *hash, char *filename)
+static void saveSetupFileHash(SetupFileHash *hash, char *filename)
{
FILE *file;
#endif
}
-void LoadArtworkInfoFromLevelInfo(ArtworkDirTree **artwork_node,
- LevelDirTree *level_node)
+static void LoadArtworkInfoFromLevelInfo(ArtworkDirTree **artwork_node,
+ LevelDirTree *level_node)
{
int type = (*artwork_node)->type;
snapshot_current = NULL;
}
-void ReduceSnapshotList(void)
+static void ReduceSnapshotList(void)
{
#if DEBUG_SNAPSHOTS
printf("::: (Reducing number of snapshots from %d ",
return NULL;
}
-void LoadCustomMusic_NoConf(void)
+static void LoadCustomMusic_NoConf(void)
{
static boolean draw_init_text = TRUE; /* only draw at startup */
static char *last_music_directory = NULL;
gfx.draw_background_mask = draw_background_mask;
}
-void SetBackgroundBitmap(Bitmap *background_bitmap_tile, int mask)
+static void SetBackgroundBitmap(Bitmap *background_bitmap_tile, int mask)
{
if (background_bitmap_tile != NULL)
gfx.background_bitmap_mask |= mask;
}
}
-void CloseWindow(DrawWindow *window)
+#if 0
+static void CloseWindow(DrawWindow *window)
{
}
+#endif
void SetRedrawMaskFromArea(int x, int y, int width, int height)
{
SDLDrawSimpleLine(bitmap, from_x, from_y, to_x, to_y, WHITE_PIXEL);
}
-void DrawLine(Bitmap *bitmap, int from_x, int from_y,
- int to_x, int to_y, Pixel pixel, int line_width)
+static void DrawLine(Bitmap *bitmap, int from_x, int from_y,
+ int to_x, int to_y, Pixel pixel, int line_width)
{
int x, y;
#include "game_em/game_em.h"
#include "game_sp/game_sp.h"
#include "game_mm/game_mm.h"
+#include "engines.h"
#include "conf_gfx.h" /* include auto-generated data structure definitions */
#include "conf_snd.h" /* include auto-generated data structure definitions */
SendNetworkBufferToAllButOne(write_buffer, player);
}
-void ExitNetworkServer(int exit_value)
+static void ExitNetworkServer(int exit_value)
{
Error(ERR_NETWORK_SERVER, "exiting network server");
SDLNet_TCP_Send(sfd, nb->buffer, nb->size);
}
-struct NetworkClientPlayerInfo *getNetworkPlayer(int player_nr)
+static struct NetworkClientPlayerInfo *getNetworkPlayer(int player_nr)
{
struct NetworkClientPlayerInfo *player = NULL;
drawCursorExt(0, ypos, active, -1);
}
-void DrawHeadline(void)
+static 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);
}
-void DrawTitleScreenImage(int nr, boolean initial)
+static void DrawTitleScreenImage(int nr, boolean initial)
{
int graphic = getTitleScreenGraphic(nr, initial);
Bitmap *bitmap = graphic_info[graphic].bitmap;
redraw_mask = REDRAW_ALL;
}
-void DrawTitleScreenMessage(int nr, boolean initial)
+static void DrawTitleScreenMessage(int nr, boolean initial)
{
char *filename = getLevelSetTitleMessageFilename(nr, initial);
struct TitleMessageInfo *tmi = getTitleMessageInfo(nr, initial);
ResetFontStatus();
}
-void DrawTitleScreen(void)
+static void DrawTitleScreen(void)
{
KeyboardAutoRepeatOff();
HandleTitleScreen(0, 0, 0, 0, MB_MENU_INITIALIZE);
}
-boolean CheckTitleScreen(boolean levelset_has_changed)
+static boolean CheckTitleScreen(boolean levelset_has_changed)
{
static boolean show_title_initial = TRUE;
boolean show_titlescreen = FALSE;
}
}
-void HandleMainMenu_SelectLevel(int step, int direction, int selected_level_nr)
+static void HandleMainMenu_SelectLevel(int step, int direction,
+ int selected_level_nr)
{
int old_level_nr = level_nr;
int new_level_nr;
static void changeSetupValue(int, int, int);
-void HandleMenuScreen(int mx, int my, int dx, int dy, int button,
- int mode, int num_page_entries, int max_page_entries)
+static void HandleMenuScreen(int mx, int my, int dx, int dy, int button,
+ int mode, int num_page_entries,
+ int max_page_entries)
{
static int num_page_entries_all_last[NUM_SPECIAL_GFX_ARGS][MAX_MENU_MODES];
static int choice_stores[NUM_SPECIAL_GFX_ARGS][MAX_MENU_MODES];
TRUE, FALSE, FALSE);
}
-void DrawInfoScreen_TitleScreen(void)
+static void DrawInfoScreen_TitleScreen(void)
{
SetGameStatus(GAME_MODE_TITLE);
HandleTitleScreen(0, 0, 0, 0, button);
}
-void DrawInfoScreen_Elements(void)
+static void DrawInfoScreen_Elements(void)
{
SetMainBackgroundImageIfDefined(IMG_BACKGROUND_INFO_ELEMENTS);
}
}
-void DrawInfoScreen_Music(void)
+static void DrawInfoScreen_Music(void)
{
SetMainBackgroundImageIfDefined(IMG_BACKGROUND_INFO_MUSIC);
"Press any key or button for next page");
}
-void DrawInfoScreen_Credits(void)
+static void DrawInfoScreen_Credits(void)
{
SetMainBackgroundImageIfDefined(IMG_BACKGROUND_INFO_CREDITS);
}
}
-void DrawInfoScreen_Program(void)
+static void DrawInfoScreen_Program(void)
{
int font_title = MENU_INFO_FONT_TITLE;
int font_head = MENU_INFO_FONT_HEAD;
}
}
-void DrawInfoScreen_Version(void)
+static void DrawInfoScreen_Version(void)
{
int font_title = MENU_INFO_FONT_TITLE;
int font_head = MENU_INFO_FONT_HEAD;
}
}
-void DrawInfoScreen_LevelSet(void)
+static void DrawInfoScreen_LevelSet(void)
{
struct TitleMessageInfo *tmi = &readme;
char *filename = getLevelSetInfoFilename();
FadeIn(REDRAW_FIELD);
}
-void HandleInfoScreen_LevelSet(int button)
+static void HandleInfoScreen_LevelSet(int button)
{
if (button == MB_MENU_LEAVE)
{
setup_mode, num_setup_info, max_setup_info);
}
-void DrawSetupScreen_Input(void)
+static void DrawSetupScreen_Input(void)
{
int i;
static int input_player_nr = 0;
-void HandleSetupScreen_Input_Player(int step, int direction)
+static void HandleSetupScreen_Input_Player(int step, int direction)
{
int old_player_nr = input_player_nr;
int new_player_nr;
DrawSetupScreen_Input();
}
-boolean ConfigureVirtualButtonsMain(void)
+static boolean ConfigureVirtualButtonsMain(void)
{
static char *customize_step_text[] =
{
MapGadget(screen_gadget[menubutton_info[i].gadget_id]);
}
-void UnmapScreenMenuGadgets(int screen_mask)
+static void UnmapScreenMenuGadgets(int screen_mask)
{
int i;
DrawVideoDisplay_DateTime(state, value);
}
-void DrawVideoDisplayLabel(unsigned int state)
+static void DrawVideoDisplayLabel(unsigned int state)
{
DrawVideoDisplay(state, VIDEO_DISPLAY_LABEL_ONLY);
}
-void DrawVideoDisplaySymbol(unsigned int state)
+static void DrawVideoDisplaySymbol(unsigned int state)
{
DrawVideoDisplay(state, VIDEO_DISPLAY_SYMBOL_ONLY);
}
-void DrawVideoDisplayCurrentState(void)
+static void DrawVideoDisplayCurrentState(void)
{
int state = 0;
/* tape logging functions */
/* ========================================================================= */
-void PrintTapeReplayProgress(boolean replay_finished)
+static void PrintTapeReplayProgress(boolean replay_finished)
{
static unsigned int counter_last = -1;
unsigned int counter = Counter();
redraw_mask |= REDRAW_FIELD;
}
-void DrawFramesPerSecond(void)
+static void DrawFramesPerSecond(void)
{
char text[100];
int font_nr = FONT_TEXT_2;
FadeExt(0, FADE_MODE_SKIP_FADE_OUT, FADE_TYPE_SKIP);
}
-Bitmap *getBitmapFromGraphicOrDefault(int graphic, int default_graphic)
+static Bitmap *getBitmapFromGraphicOrDefault(int graphic, int default_graphic)
{
boolean redefined = getImageListEntryFromImageID(graphic)->redefined;
graphic_info[default_graphic].bitmap);
}
-Bitmap *getBackgroundBitmap(int graphic)
+static Bitmap *getBackgroundBitmap(int graphic)
{
return getBitmapFromGraphicOrDefault(graphic, IMG_BACKGROUND);
}
-Bitmap *getGlobalBorderBitmap(int graphic)
+static Bitmap *getGlobalBorderBitmap(int graphic)
{
return getBitmapFromGraphicOrDefault(graphic, IMG_GLOBAL_BORDER);
}
return (global_border_bitmap_last != global_border_bitmap);
}
-boolean CheckIfGlobalBorderRedrawIsNeeded(void)
+#define ONLY_REDRAW_GLOBAL_BORDER_IF_NEEDED 0
+
+#if ONLY_REDRAW_GLOBAL_BORDER_IF_NEEDED
+static boolean CheckIfGlobalBorderRedrawIsNeeded(void)
{
// if game status has not changed, nothing has to be redrawn
if (game_status == game_status_last)
return FALSE;
}
+#endif
-void RedrawGlobalBorderFromBitmap(Bitmap *bitmap)
+static void RedrawGlobalBorderFromBitmap(Bitmap *bitmap)
{
if (bitmap)
BlitBitmap(bitmap, backbuffer, 0, 0, WIN_XSIZE, WIN_YSIZE, 0, 0);
redraw_mask = REDRAW_ALL;
}
-#define ONLY_REDRAW_GLOBAL_BORDER_IF_NEEDED 0
-
static void RedrawGlobalBorderIfNeeded(void)
{
#if ONLY_REDRAW_GLOBAL_BORDER_IF_NEEDED
DrawGraphicShiftedNormal(x, y, dx, dy, graphic, frame, cut_mode,mask_mode);
}
-void DrawGraphicShiftedThruMask(int x, int y, int dx, int dy, int graphic,
- int frame, int cut_mode)
+static void DrawGraphicShiftedThruMask(int x, int y, int dx, int dy,
+ int graphic, int frame, int cut_mode)
{
DrawGraphicShifted(x, y, dx, dy, graphic, frame, cut_mode, USE_MASKING);
}
element, tilesize, el2edimg, masked, element_bits_draw);
}
-void DrawSizedWall_MM(int dst_x, int dst_y, int element, int tilesize,
- int (*el2img_function)(int))
+static void DrawSizedWall_MM(int dst_x, int dst_y, int element, int tilesize,
+ int (*el2img_function)(int))
{
DrawSizedWallExt_MM(dst_x, dst_y, element, tilesize, el2img_function, FALSE,
0x000f);
}
-void DrawSizedElementExt(int x, int y, int element, int tilesize,
- boolean masked)
+static void DrawSizedElementExt(int x, int y, int element, int tilesize,
+ boolean masked)
{
if (IS_MM_WALL(element))
{
DrawMiniGraphic(sx, sy, el2edimg(getBorderElement(x, y)));
}
-void DrawEnvelopeBackgroundTiles(int graphic, int startx, int starty,
- int x, int y, int xsize, int ysize,
- int tile_width, int tile_height)
+static void DrawEnvelopeBackgroundTiles(int graphic, int startx, int starty,
+ int x, int y, int xsize, int ysize,
+ int tile_width, int tile_height)
{
Bitmap *src_bitmap;
int src_x, src_y;
dst_x, dst_y);
}
-void DrawEnvelopeBackground(int graphic, int startx, int starty,
- int x, int y, int xsize, int ysize, int font_nr)
+static void DrawEnvelopeBackground(int graphic, int startx, int starty,
+ int x, int y, int xsize, int ysize,
+ int font_nr)
{
int font_width = getFontWidth(font_nr);
int font_height = getFontHeight(font_nr);
font_width, font_height);
}
-void AnimateEnvelope(int envelope_nr, int anim_mode, int action)
+static void AnimateEnvelope(int envelope_nr, int anim_mode, int action)
{
int graphic = IMG_BACKGROUND_ENVELOPE_1 + envelope_nr;
Bitmap *src_bitmap = graphic_info[graphic].bitmap;
setRequestPositionExt(x, y, request.width, request.height, add_border_size);
}
-void DrawEnvelopeRequest(char *text)
+static void DrawEnvelopeRequest(char *text)
{
char *text_final = text;
char *text_door_style = NULL;
free(text_door_style);
}
-void AnimateEnvelopeRequest(int anim_mode, int action)
+static void AnimateEnvelopeRequest(int anim_mode, int action)
{
int graphic = IMG_BACKGROUND_REQUEST;
boolean draw_masked = graphic_info[graphic].draw_masked;
ClearAutoRepeatKeyEvents();
}
-void ShowEnvelopeRequest(char *text, unsigned int req_state, int action)
+static void ShowEnvelopeRequest(char *text, unsigned int req_state, int action)
{
int graphic = IMG_BACKGROUND_REQUEST;
int sound_opening = SND_REQUEST_OPENING;
SetDrawtoField(DRAW_TO_FIELDBUFFER);
}
-void DrawPreviewElement(int dst_x, int dst_y, int element, int tilesize)
+static void DrawPreviewElement(int dst_x, int dst_y, int element, int tilesize)
{
if (IS_MM_WALL(element))
{
}
}
-void DrawPreviewPlayers(void)
+static void DrawPreviewPlayers(void)
{
if (game_status != GAME_MODE_MAIN)
return;
DrawText(x + xoffset_text, y + yoffset_text, player_name, font_nr);
}
-void DrawNetworkPlayersExt(boolean force)
+static void DrawNetworkPlayersExt(boolean force)
{
if (game_status != GAME_MODE_MAIN)
return;
return MoveDoor(door_state | DOOR_SET_STATE);
}
-int euclid(int a, int b)
+static int euclid(int a, int b)
{
return (b ? euclid(b, a % b) : a);
}
}
}
+#if 0
void ResetGfxAnimation_EM(int x, int y, int tile)
{
GfxFrame[x][y] = 0;
}
+#endif
void SetGfxAnimation_EM(struct GraphicInfo_EM *g_em,
int tile, int frame_em, int x, int y)
#endif
}
-void CheckSaveEngineSnapshot_EM(byte action[MAX_PLAYERS], int frame,
- boolean any_player_moving,
- boolean any_player_snapping,
- boolean any_player_dropping)
+static void CheckSaveEngineSnapshot_EM(byte action[MAX_PLAYERS], int frame,
+ boolean any_player_moving,
+ boolean any_player_snapping,
+ boolean any_player_dropping)
{
if (frame == 0 && !any_player_dropping)
{
}
}
-void CheckSaveEngineSnapshot_SP(boolean murphy_is_waiting,
- boolean murphy_is_dropping)
+static void CheckSaveEngineSnapshot_SP(boolean murphy_is_waiting,
+ boolean murphy_is_dropping)
{
if (murphy_is_waiting)
{
}
}
-void CheckSaveEngineSnapshot_MM(boolean element_clicked,
- boolean button_released)
+static void CheckSaveEngineSnapshot_MM(boolean element_clicked,
+ boolean button_released)
{
if (button_released)
{
}
}
-void JoinRectangles(int *x, int *y, int *width, int *height,
- int x2, int y2, int width2, int height2)
+static void JoinRectangles(int *x, int *y, int *width, int *height,
+ int x2, int y2, int width2, int height2)
{
// do not join with "off-screen" rectangle
if (x2 == -1 || y2 == -1)