mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-05 22:04:57 +00:00
(svn r12501) -Codechange: split signs.h.
This commit is contained in:
parent
b1e1c13420
commit
a0895d57fa
@ -1320,7 +1320,15 @@
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\signs.h"
|
||||
RelativePath=".\..\src\signs_base.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\signs_func.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\signs_type.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
|
@ -1317,7 +1317,15 @@
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\signs.h"
|
||||
RelativePath=".\..\src\signs_base.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\signs_func.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\signs_type.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
|
@ -238,7 +238,9 @@ settings_type.h
|
||||
ship.h
|
||||
signal_func.h
|
||||
signal_type.h
|
||||
signs.h
|
||||
signs_base.h
|
||||
signs_func.h
|
||||
signs_type.h
|
||||
slope_func.h
|
||||
slope_type.h
|
||||
sound_func.h
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include "news_func.h"
|
||||
#include "town.h"
|
||||
#include "console.h"
|
||||
#include "signs.h"
|
||||
#include "signs_func.h"
|
||||
#include "waypoint.h"
|
||||
#include "variables.h"
|
||||
#include "train.h"
|
||||
|
@ -45,7 +45,7 @@ enum {
|
||||
/** How many vehicle/station types we put over the network */
|
||||
NETWORK_VEHICLE_TYPES = 5,
|
||||
NETWORK_STATION_TYPES = 5,
|
||||
}
|
||||
};
|
||||
|
||||
struct NetworkPlayerInfo {
|
||||
char company_name[NETWORK_NAME_LENGTH]; ///< Company name
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "roadveh.h"
|
||||
#include "ship.h"
|
||||
#include "train.h"
|
||||
#include "signs.h"
|
||||
#include "signs_base.h"
|
||||
#include "debug.h"
|
||||
#include "depot.h"
|
||||
#include "newgrf_config.h"
|
||||
|
@ -44,7 +44,8 @@
|
||||
#include "console.h"
|
||||
#include "screenshot.h"
|
||||
#include "network/network.h"
|
||||
#include "signs.h"
|
||||
#include "signs_base.h"
|
||||
#include "signs_func.h"
|
||||
#include "depot.h"
|
||||
#include "waypoint.h"
|
||||
#include "ai/ai.h"
|
||||
|
@ -6,7 +6,8 @@
|
||||
#include "openttd.h"
|
||||
#include "landscape.h"
|
||||
#include "player_func.h"
|
||||
#include "signs.h"
|
||||
#include "signs_base.h"
|
||||
#include "signs_func.h"
|
||||
#include "saveload.h"
|
||||
#include "command_func.h"
|
||||
#include "variables.h"
|
||||
|
@ -1,14 +1,13 @@
|
||||
/* $Id$ */
|
||||
|
||||
/** @file signs.h */
|
||||
/** @file signs_base.h Base class for signs. */
|
||||
|
||||
#ifndef SIGNS_H
|
||||
#define SIGNS_H
|
||||
#ifndef SIGNS_BASE_H
|
||||
#define SIGNS_BASE_H
|
||||
|
||||
#include "signs_type.h"
|
||||
#include "oldpool.h"
|
||||
|
||||
typedef uint16 SignID;
|
||||
struct Sign;
|
||||
DECLARE_OLD_POOL(Sign, Sign, 2, 16000)
|
||||
|
||||
struct Sign : PoolItem<Sign, SignID, &_Sign_pool> {
|
||||
@ -30,13 +29,6 @@ struct Sign : PoolItem<Sign, SignID, &_Sign_pool> {
|
||||
inline bool IsValid() const { return this->owner != INVALID_PLAYER; }
|
||||
};
|
||||
|
||||
enum {
|
||||
INVALID_SIGN = 0xFFFF,
|
||||
};
|
||||
|
||||
extern SignID _new_sign_id;
|
||||
|
||||
|
||||
static inline SignID GetMaxSignIndex()
|
||||
{
|
||||
/* TODO - This isn't the real content of the function, but
|
||||
@ -61,14 +53,4 @@ static inline bool IsValidSignID(uint index)
|
||||
#define FOR_ALL_SIGNS_FROM(ss, start) for (ss = GetSign(start); ss != NULL; ss = (ss->index + 1U < GetSignPoolSize()) ? GetSign(ss->index + 1U) : NULL) if (ss->IsValid())
|
||||
#define FOR_ALL_SIGNS(ss) FOR_ALL_SIGNS_FROM(ss, 0)
|
||||
|
||||
extern bool _sign_sort_dirty;
|
||||
|
||||
void UpdateAllSignVirtCoords();
|
||||
void PlaceProc_Sign(TileIndex tile);
|
||||
|
||||
/* signs_gui.cpp */
|
||||
void ShowRenameSignWindow(const Sign *si);
|
||||
|
||||
void ShowSignList();
|
||||
|
||||
#endif /* SIGNS_H */
|
||||
#endif /* SIGNS_BASE_H */
|
21
src/signs_func.h
Normal file
21
src/signs_func.h
Normal file
@ -0,0 +1,21 @@
|
||||
/* $Id$ */
|
||||
|
||||
/** @file signs_func.h Functions related to signs. */
|
||||
|
||||
#ifndef SIGNS_FUNC_H
|
||||
#define SIGNS_FUNC_H
|
||||
|
||||
#include "signs_type.h"
|
||||
|
||||
extern SignID _new_sign_id;
|
||||
extern bool _sign_sort_dirty;
|
||||
|
||||
void UpdateAllSignVirtCoords();
|
||||
void PlaceProc_Sign(TileIndex tile);
|
||||
|
||||
/* signs_gui.cpp */
|
||||
void ShowRenameSignWindow(const Sign *si);
|
||||
|
||||
void ShowSignList();
|
||||
|
||||
#endif /* SIGNS_FUNC_H */
|
@ -8,7 +8,8 @@
|
||||
#include "textbuf_gui.h"
|
||||
#include "window_gui.h"
|
||||
#include "player_gui.h"
|
||||
#include "signs.h"
|
||||
#include "signs_base.h"
|
||||
#include "signs_func.h"
|
||||
#include "debug.h"
|
||||
#include "variables.h"
|
||||
#include "command_func.h"
|
||||
|
15
src/signs_type.h
Normal file
15
src/signs_type.h
Normal file
@ -0,0 +1,15 @@
|
||||
/* $Id$ */
|
||||
|
||||
/** @file signs_type.h Types related to signs */
|
||||
|
||||
#ifndef SIGNS_TYPE_H
|
||||
#define SIGNS_TYPE_H
|
||||
|
||||
typedef uint16 SignID;
|
||||
struct Sign;
|
||||
|
||||
enum {
|
||||
INVALID_SIGN = 0xFFFF,
|
||||
};
|
||||
|
||||
#endif /* SIGNS_TYPE_H */
|
@ -20,7 +20,7 @@
|
||||
#include "group.h"
|
||||
#include "debug.h"
|
||||
#include "newgrf_townname.h"
|
||||
#include "signs.h"
|
||||
#include "signs_base.h"
|
||||
#include "newgrf_engine.h"
|
||||
#include "spritecache.h"
|
||||
#include "fontcache.h"
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "viewport_func.h"
|
||||
#include "gfx_func.h"
|
||||
#include "command_func.h"
|
||||
#include "signs.h"
|
||||
#include "signs_func.h"
|
||||
#include "variables.h"
|
||||
#include "functions.h"
|
||||
#include "sound_func.h"
|
||||
|
@ -12,7 +12,8 @@
|
||||
#include "viewport_func.h"
|
||||
#include "station_base.h"
|
||||
#include "town.h"
|
||||
#include "signs.h"
|
||||
#include "signs_base.h"
|
||||
#include "signs_func.h"
|
||||
#include "waypoint.h"
|
||||
#include "variables.h"
|
||||
#include "train.h"
|
||||
|
Loading…
Reference in New Issue
Block a user