Changeset - r9117:e2b5a638a7c1
[Not reviewed]
master
0 18 0
rubidium - 16 years ago 2008-05-06 22:17:12
rubidium@openttd.org
(svn r12977) -Codechange: remove quite some redundant (duplicate) function declarations.
18 files changed with 14 insertions and 36 deletions:
0 comments (0 inline, 0 general)
config.lib
Show inline comments
 
@@ -918,13 +918,13 @@ make_cflags_and_ldflags() {
 
		# Enable some things only for certain GCC versions
 
		cc_version=`$cc_host -dumpversion | cut -c 1,3`
 

	
 
		if [ $cc_version -ge 29 ]; then
 
			CFLAGS="$CFLAGS -Wall -Wno-multichar -Wsign-compare -Wundef"
 
			CFLAGS="$CFLAGS -Wwrite-strings -Wpointer-arith"
 
			CFLAGS="$CFLAGS -Wno-uninitialized"
 
			CFLAGS="$CFLAGS -Wno-uninitialized -Wredundant-decls"
 

	
 
			CC_CFLAGS="$CC_CFLAGS -Wstrict-prototypes"
 
		fi
 

	
 
		gcc295=""
 
		if [ "$cc_version" = 29 ]; then
src/economy.cpp
Show inline comments
 
@@ -42,12 +42,13 @@
 
#include "track_func.h"
 
#include "road_func.h"
 
#include "rail_map.h"
 
#include "signal_func.h"
 
#include "gfx_func.h"
 
#include "autoreplace_func.h"
 
#include "player_gui.h"
 

	
 
#include "table/strings.h"
 
#include "table/sprites.h"
 

	
 
/**
 
 * Multiply two integer values and shift the results to right.
src/functions.h
Show inline comments
 
@@ -57,13 +57,10 @@ void AskExitGame();
 
void AskExitToGameMenu();
 

	
 
void RedrawAutosave();
 

	
 
void UpdateViewportSignPos(ViewportSign *sign, int left, int top, StringID str);
 

	
 
/* callback from drivers that is called if the game size changes dynamically */
 
void GameSizeChanged();
 

	
 
int ttd_main(int argc, char* argv[]);
 
void HandleExitGameRequest();
 

	
 
#endif /* FUNCTIONS_H */
src/gfx_func.h
Show inline comments
 
@@ -67,16 +67,14 @@ extern Colour _cur_palette[256];
 
void HandleKeypress(uint32 key);
 
void HandleCtrlChanged();
 
void HandleMouseEvents();
 
void CSleep(int milliseconds);
 
void UpdateWindows();
 

	
 
void DrawChatMessage();
 
void DrawMouseCursor();
 
void ScreenSizeChanged();
 
void HandleExitGameRequest();
 
void GameSizeChanged();
 
void UndrawMouseCursor();
 

	
 
void RedrawScreenRect(int left, int top, int right, int bottom);
 
void GfxScroll(int left, int top, int width, int height, int xo, int yo);
 

	
 
@@ -139,15 +137,12 @@ bool FillDrawPixelInfo(DrawPixelInfo* n,
 
/* window.cpp */
 
void DrawOverlappedWindowForAll(int left, int top, int right, int bottom);
 

	
 
void SetMouseCursor(SpriteID sprite, SpriteID pal);
 
void SetAnimatedMouseCursor(const AnimCursor *table);
 
void CursorTick();
 
void DrawMouseCursor();
 
void ScreenSizeChanged();
 
void UndrawMouseCursor();
 
bool ChangeResInGame(int w, int h);
 
void SortResolutions(int count);
 
bool ToggleFullScreen(bool fs);
 

	
 
/* gfx.cpp */
 
#define ASCII_LETTERSTART 32
src/gui.h
Show inline comments
 
@@ -73,15 +73,12 @@ enum {
 
	/* Road specific actions */
 
	DDSP_PLACE_ROAD_X_DIR,
 
	DDSP_PLACE_ROAD_Y_DIR,
 
	DDSP_PLACE_AUTOROAD,
 
};
 

	
 
/* timetable_gui.cpp */
 
void ShowTimetableWindow(const Vehicle *v);
 

	
 
/* misc_gui.cpp */
 
void PlaceLandBlockInfo();
 
void ShowAboutWindow();
 
void ShowBuildTreesToolbar();
 
void ShowBuildTreesScenToolbar();
 
void ShowTownDirectory();
src/intro_gui.cpp
Show inline comments
 
@@ -15,12 +15,13 @@
 
#include "newgrf.h"
 
#include "strings_func.h"
 
#include "window_func.h"
 
#include "fios.h"
 
#include "gfx_func.h"
 
#include "settings_type.h"
 
#include "functions.h"
 

	
 
#include "table/strings.h"
 
#include "table/sprites.h"
 

	
 
static const Widget _select_game_widgets[] = {
 
{    WWT_CAPTION, RESIZE_NONE, 13,   0, 335,   0,  13, STR_0307_OPENTTD,         STR_NULL},
src/players.cpp
Show inline comments
 
@@ -611,14 +611,12 @@ void OnTick_Players()
 
	if (p->name_1 != 0) GenerateCompanyName(p);
 

	
 
	if (AI_AllowNewAI() && _game_mode != GM_MENU && !--_next_competitor_start)
 
		MaybeStartNewPlayer();
 
}
 

	
 
extern void ShowPlayerFinances(PlayerID player);
 

	
 
void PlayersYearlyLoop()
 
{
 
	Player *p;
 

	
 
	/* Copy statistics */
 
	FOR_ALL_PLAYERS(p) {
src/smallmap_gui.cpp
Show inline comments
 
@@ -24,12 +24,13 @@
 
#include "strings_func.h"
 
#include "zoom_func.h"
 
#include "core/endian_func.hpp"
 
#include "vehicle_base.h"
 
#include "sound_func.h"
 
#include "settings_type.h"
 
#include "window_func.h"
 

	
 
#include "table/strings.h"
 
#include "table/sprites.h"
 

	
 
static const Widget _smallmap_widgets[] = {
 
{  WWT_CLOSEBOX,   RESIZE_NONE,    13,     0,    10,     0,    13, STR_00C5,                STR_018B_CLOSE_WINDOW},
src/statusbar_gui.cpp
Show inline comments
 
@@ -14,12 +14,13 @@
 
#include "player_base.h"
 
#include "viewport_func.h"
 
#include "news_gui.h"
 
#include "player_gui.h"
 
#include "window_gui.h"
 
#include "variables.h"
 
#include "window_func.h"
 

	
 
#include "table/strings.h"
 
#include "table/sprites.h"
 

	
 
extern GetNewsStringCallbackProc * const _get_news_string_callback[];
 

	
src/stdafx.h
Show inline comments
 
@@ -280,22 +280,22 @@ typedef unsigned char byte;
 
#endif
 

	
 
/* Compile time assertions */
 
#if defined(__OS2__)
 
	#define assert_compile(expr)
 
#else
 
	#define assert_compile(expr) extern "C" void __ct_assert__(int a[1 - 2 * !(expr)])
 
	#define assert_compile(expr) extern const int __ct_assert__[1 - 2 * !(expr)]
 
#endif /* __OS2__ */
 

	
 
/* Check if the types have the bitsizes like we are using them */
 
assert_compile(sizeof(uint64) == 8);
 
assert_compile(sizeof(uint32) == 4);
 
assert_compile(sizeof(uint16) == 2);
 
assert_compile(sizeof(uint8)  == 1);
 

	
 
#define lengthof(x) (sizeof(x)/sizeof(x[0]))
 
#define lengthof(x) (sizeof(x) / sizeof(x[0]))
 
#define endof(x) (&x[lengthof(x)])
 
#define lastof(x) (&x[lengthof(x) - 1])
 

	
 
#define cpp_offsetof(s, m)   (((size_t)&reinterpret_cast<const volatile char&>((((s*)(char*)8)->m))) - 8)
 
#if !defined(offsetof)
 
	#define offsetof(s, m) cpp_offsetof(s, m)
src/train.h
Show inline comments
 
@@ -261,13 +261,12 @@ static inline Vehicle *GetNextUnit(Vehic
 
}
 

	
 
void ConvertOldMultiheadToNew();
 
void ConnectMultiheadedTrains();
 
uint CountArticulatedParts(EngineID engine_type);
 

	
 
int CheckTrainInDepot(const Vehicle *v, bool needs_to_be_stopped);
 
void CcBuildLoco(bool success, TileIndex tile, uint32 p1, uint32 p2);
 
void CcBuildWagon(bool success, TileIndex tile, uint32 p1, uint32 p2);
 

	
 
byte FreightWagonMult(CargoID cargo);
 

	
 
int CheckTrainInDepot(const Vehicle *v, bool needs_to_be_stopped);
src/vehicle_gui.cpp
Show inline comments
 
@@ -32,12 +32,13 @@
 
#include "autoreplace_gui.h"
 
#include "core/alloc_func.hpp"
 
#include "string_func.h"
 
#include "settings_type.h"
 
#include "widgets/dropdown_func.h"
 
#include "order_func.h"
 
#include "timetable.h"
 

	
 
#include "table/sprites.h"
 
#include "table/strings.h"
 

	
 
struct refit_d {
 
	int sel;
src/video/sdl_v.cpp
Show inline comments
 
@@ -12,12 +12,14 @@
 
#include "../variables.h"
 
#include "../rev.h"
 
#include "../blitter/factory.hpp"
 
#include "../network/network.h"
 
#include "../core/math_func.hpp"
 
#include "../core/random_func.hpp"
 
#include "../functions.h"
 
#include "../texteff.hpp"
 
#include "sdl_v.h"
 
#include <SDL.h>
 

	
 
static FVideoDriver_SDL iFVideoDriver_SDL;
 

	
 
static SDL_Surface *_sdl_screen;
src/video/win32_v.cpp
Show inline comments
 
@@ -9,12 +9,14 @@
 
#include "../win32.h"
 
#include "../rev.h"
 
#include "../blitter/factory.hpp"
 
#include "../network/network.h"
 
#include "../core/math_func.hpp"
 
#include "../core/random_func.hpp"
 
#include "../functions.h"
 
#include "../texteff.hpp"
 
#include "win32_v.h"
 
#include <windows.h>
 
#include <tchar.h>
 

	
 
static struct {
 
	HWND main_wnd;
src/viewport.cpp
Show inline comments
 
@@ -42,12 +42,13 @@
 
#include "vehicle_func.h"
 
#include "player_func.h"
 
#include "settings_type.h"
 
#include "station_func.h"
 
#include "core/alloc_type.hpp"
 
#include "misc/smallvec.h"
 
#include "window_func.h"
 

	
 
#include "table/sprites.h"
 
#include "table/strings.h"
 

	
 
PlaceProc *_place_proc;
 
Point _tile_fract_coords;
src/window.cpp
Show inline comments
 
@@ -17,12 +17,13 @@
 
#include "zoom_func.h"
 
#include "core/alloc_func.hpp"
 
#include "map_func.h"
 
#include "vehicle_base.h"
 
#include "settings_type.h"
 
#include "cheat_func.h"
 
#include "window_func.h"
 

	
 
#include "table/sprites.h"
 

	
 
static Point _drag_delta; ///< delta between mouse cursor and upper left corner of dragged window
 
static Window *_mouseover_last_w = NULL; ///< Window of the last MOUSEOVER event
 

	
src/window_func.h
Show inline comments
 
@@ -22,13 +22,12 @@ void InitWindowSystem();
 
void UnInitWindowSystem();
 
void ResetWindowSystem();
 
void SetupColorsAndInitialWindow();
 
void InputLoop();
 
void InvalidateThisWindowData(Window *w);
 
void InvalidateWindowData(WindowClass cls, WindowNumber number);
 
void RelocateAllWindows(int neww, int newh);
 

	
 
void DeleteNonVitalWindows();
 
void DeleteAllNonVitalWindows();
 
void HideVitalWindows();
 
void ShowVitalWindows();
 

	
src/window_gui.h
Show inline comments
 
@@ -543,19 +543,12 @@ enum WindowFlags {
 
};
 

	
 
/* window.cpp */
 
void CallWindowEventNP(Window *w, int event);
 
void CallWindowTickEvent();
 

	
 
void SetWindowDirty(const Window *w);
 
void SendWindowMessage(WindowClass wnd_class, WindowNumber wnd_num, int msg, int wparam, int lparam);
 
void SendWindowMessageClass(WindowClass wnd_class, int msg, int wparam, int lparam);
 

	
 
Window *FindWindowById(WindowClass cls, WindowNumber number);
 
void DeletePlayerWindows(PlayerID pi);
 
void ChangeWindowOwner(PlayerID old_player, PlayerID new_player);
 
Window *BringWindowToFrontById(WindowClass cls, WindowNumber number);
 
Window *FindWindowFromPt(int x, int y);
 

	
 
bool IsWindowOfPrototype(const Window *w, const Widget *widget);
 
void AssignWidgetToWindow(Window *w, const Widget *widget);
 
Window *AllocateWindow(int x, int y, int width, int height,
 
@@ -563,21 +556,14 @@ Window *AllocateWindow(int x, int y, int
 
			void *data = NULL);
 

	
 
Window *AllocateWindowDesc(const WindowDesc *desc, void *data = NULL);
 
Window *AllocateWindowDescFront(const WindowDesc *desc, int window_number, void *data = NULL);
 

	
 
void DrawWindowViewport(const Window *w);
 
void ResizeWindow(Window *w, int x, int y);
 

	
 
void InitWindowSystem();
 
void UnInitWindowSystem();
 
void ResetWindowSystem();
 
int GetMenuItemIndex(const Window *w, int x, int y);
 
void InputLoop();
 
void InvalidateThisWindowData(Window *w);
 
void InvalidateWindowData(WindowClass cls, WindowNumber number);
 
void RelocateAllWindows(int neww, int newh);
 

	
 
/* misc_gui.cpp */
 
void GuiShowTooltipsWithArgs(StringID str, uint paramcount, const uint64 params[]);
 
static inline void GuiShowTooltips(StringID str)
 
{
 
@@ -619,16 +605,12 @@ enum SpecialMouseMode {
 
	WSM_DRAGDROP = 1,
 
	WSM_SIZING   = 2,
 
	WSM_PRESIZE  = 3,
 
};
 

	
 
Window *GetCallbackWnd();
 
void DeleteNonVitalWindows();
 
void DeleteAllNonVitalWindows();
 
void HideVitalWindows();
 
void ShowVitalWindows();
 
Window **FindWindowZPosition(const Window *w);
 

	
 
void ScrollbarClickHandler(Window *w, const Widget *wi, int x, int y);
 

	
 
void ResizeButtons(Window *w, byte left, byte right);
 

	
0 comments (0 inline, 0 general)