Changeset - r9085:bfc6f61fcf0c
[Not reviewed]
master
0 18 1
smatz - 17 years ago 2008-05-04 21:53:36
smatz@openttd.org
(svn r12944) -Codechange: use rev.h instead of externs at many places
19 files changed with 37 insertions and 29 deletions:
0 comments (0 inline, 0 general)
projects/openttd_vs80.vcproj
Show inline comments
 
@@ -1320,6 +1320,10 @@
 
				>
 
			</File>
 
			<File
 
				RelativePath=".\..\src\rev.h"
 
				>
 
			</File>
 
			<File
 
				RelativePath=".\..\src\road_cmd.h"
 
				>
 
			</File>
projects/openttd_vs90.vcproj
Show inline comments
 
@@ -1317,6 +1317,10 @@
 
				>
 
			</File>
 
			<File
 
				RelativePath=".\..\src\rev.h"
 
				>
 
			</File>
 
			<File
 
				RelativePath=".\..\src\road_cmd.h"
 
				>
 
			</File>
source.list
Show inline comments
 
@@ -251,6 +251,7 @@ rail.h
 
rail_gui.h
 
rail_type.h
 
core/random_func.hpp
 
rev.h
 
road_cmd.h
 
road_func.h
 
road_gui.h
src/console.cpp
Show inline comments
 
@@ -18,6 +18,7 @@
 
#include "window_func.h"
 
#include "string_func.h"
 
#include "gfx_func.h"
 
#include "rev.h"
 

	
 
#include "table/strings.h"
 

	
 
@@ -223,7 +224,6 @@ static const WindowDesc _iconsole_window
 

	
 
void IConsoleInit()
 
{
 
	extern const char _openttd_revision[];
 
	_iconsole_output_file = NULL;
 
	_icolour_def  =  1;
 
	_icolour_err  =  3;
src/network/network.cpp
Show inline comments
 
@@ -31,6 +31,7 @@
 
#include "../string_func.h"
 
#include "../player_func.h"
 
#include "../settings_type.h"
 
#include "../rev.h"
 
#ifdef DEBUG_DUMP_COMMANDS
 
	#include "../core/alloc_func.hpp"
 
#endif /* DEBUG_DUMP_COMMANDS */
 
@@ -1470,7 +1471,6 @@ void NetworkShutDown()
 
 */
 
bool IsNetworkCompatibleVersion(const char *other)
 
{
 
	extern const char _openttd_revision[];
 
	return strncmp(_openttd_revision, other, NETWORK_REVISION_LENGTH - 1) == 0;
 
}
 

	
src/network/network.h
Show inline comments
 
@@ -31,9 +31,6 @@ static inline void NetworkShutDown() {}
 

	
 
#endif /* ENABLE_NETWORK */
 

	
 
/** What is the revision of OpenTTD. */
 
extern const char _openttd_revision[];
 

	
 
/** As which player do we play? */
 
extern PlayerID _network_playas;
 

	
src/network/network_client.cpp
Show inline comments
 
@@ -24,6 +24,7 @@
 
#include "../player_func.h"
 
#include "../player_base.h"
 
#include "../player_gui.h"
 
#include "../rev.h"
 

	
 
#include "table/strings.h"
 

	
 
@@ -122,7 +123,6 @@ DEF_CLIENT_SEND_COMMAND(PACKET_CLIENT_JO
 
	//    String: Unique id to find the player back in server-listing
 
	//
 

	
 
	extern const char _openttd_revision[];
 
	Packet *p;
 
	_network_join_status = NETWORK_JOIN_STATUS_AUTHORIZING;
 
	InvalidateWindow(WC_NETWORK_STATUS_WINDOW, 0);
src/newgrf.cpp
Show inline comments
 
@@ -34,6 +34,7 @@
 
#include "newgrf_townname.h"
 
#include "newgrf_industries.h"
 
#include "gfxinit.h"
 
#include "rev.h"
 
#include "fios.h"
 
#include "rail.h"
 
#include "strings_func.h"
 
@@ -3643,11 +3644,9 @@ bool GetGlobalVariable(byte param, uint3
 
			*value = _opt.landscape == LT_ARCTIC ? GetSnowLine() : 0xFF;
 
			return true;
 

	
 
		case 0x21: { // OpenTTD version
 
			extern uint32 _openttd_newgrf_version;
 
		case 0x21: // OpenTTD version
 
			*value = _openttd_newgrf_version;
 
			return true;
 
		}
 

	
 
		case 0x22: // difficulty level
 
			*value = _opt.diff_level;
src/openttd.cpp
Show inline comments
 
@@ -60,6 +60,7 @@
 
#include "cheat_func.h"
 
#include "animated_tile_func.h"
 
#include "functions.h"
 
#include "rev.h"
 

	
 
#include "newgrf.h"
 
#include "newgrf_config.h"
 
@@ -136,9 +137,6 @@ void CDECL ShowInfoF(const char *str, ..
 
	ShowInfo(buf);
 
}
 

	
 
/** The current revision of OpenTTD */
 
extern const char _openttd_revision[];
 

	
 
/**
 
 * Show the help message when someone passed a wrong parameter.
 
 */
src/os/macosx/macos.mm
Show inline comments
 
@@ -11,6 +11,7 @@
 
#include <stdio.h>
 
#include "../../stdafx.h"
 
#include "../../core/bitmath_func.hpp"
 
#include "../../rev.h"
 

	
 
#ifndef CPU_SUBTYPE_POWERPC_970
 
#define CPU_SUBTYPE_POWERPC_970 ((cpu_subtype_t) 100)
 
@@ -33,7 +34,6 @@ static char *GetOSString()
 
	char OS[20];
 
	char newgrf[125];
 
	long sysVersion;
 
	extern const char _openttd_revision[];
 

	
 
	// get the hardware info
 
	host_basic_info_data_t hostInfo;
src/rev.cpp.in
Show inline comments
 
@@ -3,6 +3,7 @@
 
/** @file rev.cpp Autogenerated file with the revision and such of OpenTTD. */
 

	
 
#include "stdafx.h"
 
#include "rev.h"
 

	
 
/**
 
 * The text version of OpenTTD's revision.
 
@@ -19,7 +20,7 @@
 
 * norev000 is for non-releases that are made on systems without
 
 * subversion or sources that are not a checkout of subversion.
 
 */
 
extern const char _openttd_revision[] = "@@VERSION@@";
 
const char _openttd_revision[] = "@@VERSION@@";
 

	
 
/**
 
 * The NewGRF revision of OTTD:
 
@@ -34,7 +35,7 @@ extern const char _openttd_revision[] = 
 
 * final release will always have a lower version number than the released
 
 * version, thus making comparisions on specific revisions easy.
 
 */
 
uint32 _openttd_newgrf_version = 0 << 28 | 7 << 24 | 0 << 20 | 0 << 19 | (@@REVISION@@ & ((1 << 19) - 1));
 
const uint32 _openttd_newgrf_version = 0 << 28 | 7 << 24 | 0 << 20 | 0 << 19 | (@@REVISION@@ & ((1 << 19) - 1));
 

	
 
#ifdef __MORPHOS__
 
/**
src/rev.h
Show inline comments
 
new file 100644
 
/* $Id$ */
 

	
 
/** @file rev.h declaration of OTTD revision dependant variables */
 

	
 
#ifndef REV_H
 
#define REV_H
 

	
 
extern const char _openttd_revision[];
 
extern const uint32 _openttd_newgrf_version;
 

	
 
#endif /* REV_H */
src/settings.cpp
Show inline comments
 
@@ -44,6 +44,7 @@
 
#include "sound_func.h"
 
#include "core/alloc_func.hpp"
 
#include "player_func.h"
 
#include "rev.h"
 
#ifdef WITH_FREETYPE
 
#include "fontcache.h"
 
#endif
 
@@ -1769,9 +1770,6 @@ static void NewsDisplaySaveConfig(IniFil
 
 */
 
static void SaveVersionInConfig(IniFile *ini)
 
{
 
	extern const char _openttd_revision[];
 
	extern uint32 _openttd_newgrf_version;
 

	
 
	IniGroup *group = ini_getgroup(ini, "version", -1);
 

	
 
	if (group == NULL) return;
src/strings.cpp
Show inline comments
 
@@ -27,6 +27,7 @@
 
#include "gui.h"
 
#include "strings_func.h"
 
#include "functions.h"
 
#include "rev.h"
 
#include "core/endian_func.hpp"
 
#include "date_func.h"
 
#include "vehicle_base.h"
 
@@ -560,7 +561,6 @@ uint ConvertDisplaySpeedToSpeed(uint spe
 

	
 
static char* FormatString(char* buff, const char* str, const int64* argv, uint casei, const char* last)
 
{
 
	extern const char _openttd_revision[];
 
	WChar b;
 
	const int64 *argv_orig = argv;
 
	uint modifier = 0;
src/video/cocoa/wnd_quartz.mm
Show inline comments
 
@@ -39,6 +39,7 @@
 

	
 
#include "../../stdafx.h"
 
#include "../../debug.h"
 
#include "../../rev.h"
 
#include "../../core/geometry_type.hpp"
 
#include "cocoa_v.h"
 
#include "../../core/math_func.hpp"
 
@@ -410,9 +411,6 @@ static CGColorSpaceRef QZ_GetCorrectColo
 
@end
 

	
 

	
 
extern const char _openttd_revision[];
 

	
 

	
 
void WindowQuartzSubdriver::GetDeviceInfo()
 
{
 
	CFDictionaryRef    cur_mode;
src/video/cocoa/wnd_quickdraw.mm
Show inline comments
 
@@ -39,6 +39,7 @@
 

	
 
#include "../../stdafx.h"
 
#include "../../debug.h"
 
#include "../../rev.h"
 
#include "../../core/geometry_type.hpp"
 
#include "cocoa_v.h"
 
#include "../../core/math_func.hpp"
 
@@ -331,10 +332,6 @@ static bool _resize_icon[] = {
 
};
 

	
 

	
 

	
 
extern const char _openttd_revision[];
 

	
 

	
 
void WindowQuickdrawSubdriver::GetDeviceInfo()
 
{
 
	CFDictionaryRef    cur_mode;
src/video/sdl_v.cpp
Show inline comments
 
@@ -9,6 +9,7 @@
 
#include "../gfx_func.h"
 
#include "../sdl.h"
 
#include "../variables.h"
 
#include "../rev.h"
 
#include "../blitter/factory.hpp"
 
#include "../network/network.h"
 
#include "../core/math_func.hpp"
 
@@ -186,7 +187,6 @@ static void GetAvailableVideoMode(int *w
 

	
 
static bool CreateMainSurface(int w, int h)
 
{
 
	extern const char _openttd_revision[];
 
	SDL_Surface *newscreen, *icon;
 
	char caption[50];
 
	int bpp = BlitterFactoryBase::GetCurrentBlitter()->GetScreenDepth();
src/video/win32_v.cpp
Show inline comments
 
@@ -5,6 +5,7 @@
 
#include "../gfx_func.h"
 
#include "../variables.h"
 
#include "../win32.h"
 
#include "../rev.h"
 
#include "../blitter/factory.hpp"
 
#include "../network/network.h"
 
#include "../core/math_func.hpp"
 
@@ -282,7 +283,6 @@ static bool MakeWindow(bool full_screen)
 
			ShowWindow(_wnd.main_wnd, SW_SHOWNORMAL); // remove maximize-flag
 
			SetWindowPos(_wnd.main_wnd, 0, x, y, w, h, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOZORDER);
 
		} else {
 
			extern const char _openttd_revision[];
 
			TCHAR Windowtitle[50];
 

	
 
			_sntprintf(Windowtitle, sizeof(Windowtitle), _T("OpenTTD %s"), MB_TO_WIDE(_openttd_revision));
src/win32.cpp
Show inline comments
 
@@ -9,6 +9,7 @@
 
#include "gfx_func.h"
 
#include "textbuf_gui.h"
 
#include "fileio.h"
 
#include "rev.h"
 
#include <windows.h>
 
#include <winnt.h>
 
#include <wininet.h>
 
@@ -460,7 +461,6 @@ extern bool CloseConsoleLogIfActive();
 

	
 
static LONG WINAPI ExceptionHandler(EXCEPTION_POINTERS *ep)
 
{
 
	extern const char _openttd_revision[];
 
	char *output;
 
	static bool had_exception = false;
 

	
0 comments (0 inline, 0 general)