Changeset - r1309:4100b4013e37
[Not reviewed]
master
0 24 1
tron - 19 years ago 2005-02-06 08:18:00
tron@openttd.org
(svn r1813) Declare functions implemented in strings.c in their own shiny new header (though i think some of these function don't belong into strings.c)
25 files changed with 41 insertions and 18 deletions:
0 comments (0 inline, 0 general)
economy.c
Show inline comments
 
#include "stdafx.h"
 
#include "ttd.h"
 
#include "strings.h" // XXX InjectDParam()
 
#include "table/strings.h"
 
#include "map.h"
 
#include "news.h"
 
@@ -1191,7 +1192,7 @@ static bool CheckSubsidised(Station *fro
 

	
 
			/* Add a news item */
 
			pair = SetupSubsidyDecodeParam(s, 0);
 
			INJECT_DPARAM(2);
 
			InjectDParam(2);
 

	
 
			p = DEREF_PLAYER(_current_player);
 
			SetDParam(0, p->name_1);
functions.h
Show inline comments
 
@@ -47,15 +47,6 @@ static inline Point RemapCoords2(int x, 
 
	return RemapCoords(x, y, GetSlopeZ(x, y));
 
}
 

	
 
/* game.c */
 
byte *GetString(byte *buffr, uint16 string);
 
void InjectDparam(int amount);
 

	
 
int32 GetParamInt32(void);
 
int GetParamInt16(void);
 
int GetParamInt8(void);
 
int GetParamUint16(void);
 

	
 

	
 
/* clear_land.c */
 
void DrawHillyLandTile(TileInfo *ti);
gfx.c
Show inline comments
 
#include "stdafx.h"
 
#include "ttd.h"
 
#include "strings.h"
 
#include "gfx.h"
 
#include "table/palettes.h"
 
#include "hal.h"
industry_gui.c
Show inline comments
 
#include "stdafx.h"
 
#include "ttd.h"
 
#include "debug.h"
 
#include "strings.h"
 
#include "table/strings.h"
 
#include "map.h"
 
//#include "gui.h"
main_gui.c
Show inline comments
 
#include "stdafx.h"
 
#include "ttd.h"
 
#include "strings.h"
 
#include "table/strings.h"
 
#include "map.h"
 
#include "tile.h"
 
@@ -45,8 +46,6 @@ extern void GenerateWorld(int mode, uint
 
extern void GenerateIndustries(void);
 
extern void GenerateTowns(void);
 

	
 
extern uint GetCurrentCurrencyRate(void);
 

	
 
extern void CcTerraform(bool success, uint tile, uint32 p1, uint32 p2);
 

	
 
void HandleOnEditTextCancel(void)
misc.c
Show inline comments
 
#include "stdafx.h"
 
#include "ttd.h"
 
#include "strings.h" // XXX GetParam*
 
#include "table/strings.h"
 
#include "map.h"
 
#include "vehicle.h"
misc_gui.c
Show inline comments
 
#include "stdafx.h"
 
#include "ttd.h"
 
#include "debug.h"
 
#include "strings.h"
 
#include "table/strings.h"
 
#include "map.h"
 
#include "window.h"
network.c
Show inline comments
 
#include "stdafx.h"
 
#include "debug.h"
 
#include "strings.h"
 
#include "map.h"
 
#include "network_data.h"
 

	
 
@@ -44,7 +45,6 @@ static uint16 _network_client_index = NE
 
/* Some externs / forwards */
 
extern void ShowJoinStatusWindow(void);
 
extern void StateGameLoop(void);
 
extern uint GetCurrentCurrencyRate(void);
 

	
 
// Function that looks up the CI for a given client-index
 
NetworkClientInfo *NetworkFindClientInfoFromIndex(uint16 client_index)
network_client.c
Show inline comments
 
#include "stdafx.h"
 
#include "debug.h"
 
#include "strings.h"
 
#include "network_data.h"
 

	
 
#ifdef ENABLE_NETWORK
network_gui.c
Show inline comments
 
#include "stdafx.h"
 
#include "ttd.h"
 
#include "strings.h"
 
#include "network.h"
 
#include "saveload.h"
 

	
network_server.c
Show inline comments
 
#include "stdafx.h"
 
#include "debug.h"
 
#include "strings.h"
 
#include "network_data.h"
 

	
 
#ifdef ENABLE_NETWORK
news_gui.c
Show inline comments
 
#include "stdafx.h"
 
#include "ttd.h"
 
#include "strings.h"
 
#include "table/strings.h"
 
#include "window.h"
 
#include "gui.h"
players.c
Show inline comments
 
#include "stdafx.h"
 
#include "ttd.h"
 
#include "strings.h"
 
#include "table/strings.h"
 
#include "map.h"
 
#include "player.h"
screenshot.c
Show inline comments
 
#include "stdafx.h"
 
#include "ttd.h"
 
#include "debug.h"
 
#include "strings.h"
 
#include "table/strings.h"
 
#include "gfx.h"
 
#include "viewport.h"
settings_gui.c
Show inline comments
 
#include "stdafx.h"
 
#include "ttd.h"
 
#include "strings.h" // XXX GetCurrentCurrencyRate()
 
#include "table/strings.h"
 
#include "window.h"
 
#include "gui.h"
 
@@ -726,7 +727,6 @@ static const PatchPage _patches_page[] =
 
	{_patches_ai,						lengthof(_patches_ai) },
 
};
 

	
 
extern uint GetCurrentCurrencyRate(void);
 

	
 
static int32 ReadPE(const PatchEntry*pe)
 
{
station_gui.c
Show inline comments
 
#include "stdafx.h"
 
#include "ttd.h"
 
#include "debug.h"
 
#include "strings.h"
 
#include "table/strings.h"
 
#include "window.h"
 
#include "gui.h"
strings.c
Show inline comments
 
#include "stdafx.h"
 
#include "ttd.h"
 
#include "strings.h"
 
#include "table/strings.h"
 
#include "namegen.h"
 
#include "station.h"
 
@@ -109,7 +110,7 @@ byte *GetString(byte *buffr, uint16 stri
 
	return DecodeString(buffr, GetStringPtr(string));
 
}
 

	
 
void InjectDparam(int amount)
 
void InjectDParam(int amount)
 
{
 
	memmove(_decode_parameters + amount, _decode_parameters, sizeof(_decode_parameters) - amount * sizeof(uint32));
 
}
 
@@ -443,7 +444,7 @@ static byte *DecodeString(byte *buff, co
 

	
 
		case 0x9A: { // {STATION}
 
			Station *st;
 
			InjectDparam(1);
 
			InjectDParam(1);
 
			st = GetStation(GetDParam(1));
 
			if (!st->xy) { // station doesn't exist anymore
 
				buff = GetString(buff, STR_UNKNOWN_DESTINATION);
 
@@ -480,7 +481,7 @@ static byte *DecodeString(byte *buff, co
 
				if (idx == 0) {
 
					str = STR_WAYPOINTNAME_CITY;
 
				} else {
 
					InjectDparam(1);
 
					InjectDParam(1);
 
					SetDParam(1, idx + 1);
 
					str = STR_WAYPOINTNAME_CITY_SERIAL;
 
				}
strings.h
Show inline comments
 
new file 100644
 
#ifndef STRINGS_H
 
#define STRINGS_H
 

	
 
byte *GetString(byte *buffr, uint16 string);
 

	
 
void InjectDParam(int amount);
 

	
 
int32 GetParamInt32(void);
 
int GetParamInt16(void);
 
int GetParamInt8(void);
 
int GetParamUint16(void);
 

	
 
uint GetCurrentCurrencyRate(void);
 

	
 
#endif
texteff.c
Show inline comments
 
#include "stdafx.h"
 
#include "ttd.h"
 
#include "strings.h"
 
#include "gfx.h"
 
#include "viewport.h"
 
#include "saveload.h"
town_cmd.c
Show inline comments
 
#include "stdafx.h"
 
#include "ttd.h"
 
#include "strings.h"
 
#include "table/strings.h"
 
#include "map.h"
 
#include "tile.h"
town_gui.c
Show inline comments
 
#include "stdafx.h"
 
#include "ttd.h"
 
#include "debug.h"
 
#include "strings.h"
 
#include "table/strings.h"
 
#include "town.h"
 
#include "window.h"
ttd.c
Show inline comments
 
#include "stdafx.h"
 
#include "table/strings.h"
 
#include "debug.h"
 
#include "strings.h"
 
#include "map.h"
 
#include "tile.h"
 

	
variables.h
Show inline comments
 
@@ -412,7 +412,6 @@ static inline uint32 GetDParam(uint n)
 
#define COPY_IN_DPARAM(offs,src,num) memcpy(_decode_parameters + offs, src, sizeof(uint32) * (num))
 
#define COPY_OUT_DPARAM(dst,offs,num) memcpy(dst,_decode_parameters + offs, sizeof(uint32) * (num))
 

	
 
#define INJECT_DPARAM(n) InjectDparam(n);
 

	
 
#define SET_EXPENSES_TYPE(x) _yearly_expenses_type = x;
 

	
vehicle_gui.c
Show inline comments
 
#include "stdafx.h"
 
#include "ttd.h"
 
#include "debug.h"
 
#include "strings.h"
 
#include "table/strings.h"
 
#include "vehicle.h"
 
#include "window.h"
viewport.c
Show inline comments
 
#include "stdafx.h"
 
#include "ttd.h"
 
#include "debug.h"
 
#include "strings.h"
 
#include "table/strings.h"
 
#include "map.h"
 
#include "viewport.h"
0 comments (0 inline, 0 general)