Merge branch 'master' into jgrpp
# Conflicts: # cmake/SourceList.cmake # src/build_vehicle_gui.cpp # src/company_gui.cpp # src/console_cmds.cpp # src/depot_base.h # src/elrail.cpp # src/network/core/udp.cpp # src/network/network_admin.cpp # src/network/network_chat_gui.cpp # src/network/network_gui.cpp # src/network/network_server.cpp # src/newgrf.cpp # src/newgrf_engine.cpp # src/newgrf_railtype.cpp # src/newgrf_railtype.h # src/newgrf_storage.h # src/os/unix/crashlog_unix.cpp # src/rail.h # src/rail_cmd.cpp # src/rail_gui.cpp # src/road_cmd.cpp # src/road_map.h # src/saveload/labelmaps_sl.cpp # src/settings_gui.cpp # src/settings_type.h # src/sl/oldloader_sl.cpp # src/station_cmd.cpp # src/station_gui.cpp # src/table/settings/world_settings.ini # src/tests/test_script_admin.cpp # src/textfile_gui.cpp # src/toolbar_gui.cpp # src/train_cmd.cpp # src/tunnelbridge_cmd.cpp # src/vehicle_gui.cpp # src/widget.cpp # src/window.cpp # src/window_gui.h # src/window_type.h
This commit is contained in:
20
src/rail.h
20
src/rail.h
@@ -132,7 +132,7 @@ typedef std::vector<RailTypeLabel> RailTypeLabelList;
|
||||
/**
|
||||
* This struct contains all the info that is needed to draw and construct tracks.
|
||||
*/
|
||||
class RailtypeInfo {
|
||||
class RailTypeInfo {
|
||||
public:
|
||||
/**
|
||||
* Struct containing the main sprites. @note not all sprites are listed, but only
|
||||
@@ -323,11 +323,11 @@ public:
|
||||
/**
|
||||
* Returns a pointer to the Railtype information for a given railtype
|
||||
* @param railtype the rail type which the information is requested for
|
||||
* @return The pointer to the RailtypeInfo
|
||||
* @return The pointer to the RailTypeInfo
|
||||
*/
|
||||
static inline const RailtypeInfo *GetRailTypeInfo(RailType railtype)
|
||||
static inline const RailTypeInfo *GetRailTypeInfo(RailType railtype)
|
||||
{
|
||||
extern RailtypeInfo _railtypes[RAILTYPE_END];
|
||||
extern RailTypeInfo _railtypes[RAILTYPE_END];
|
||||
dbg_assert_msg(railtype < RAILTYPE_END, "%u", railtype);
|
||||
return &_railtypes[railtype];
|
||||
}
|
||||
@@ -379,8 +379,8 @@ static inline bool Rail90DegTurnDisallowed(RailType rt1, RailType rt2, bool def
|
||||
{
|
||||
if (rt1 == INVALID_RAILTYPE || rt2 == INVALID_RAILTYPE) return def;
|
||||
|
||||
const RailtypeInfo *rti1 = GetRailTypeInfo(rt1);
|
||||
const RailtypeInfo *rti2 = GetRailTypeInfo(rt2);
|
||||
const RailTypeInfo *rti1 = GetRailTypeInfo(rt1);
|
||||
const RailTypeInfo *rti2 = GetRailTypeInfo(rt2);
|
||||
|
||||
bool rt1_90deg = HasBit(rti1->flags, RTF_DISALLOW_90DEG) || (!HasBit(rti1->flags, RTF_ALLOW_90DEG) && def);
|
||||
bool rt2_90deg = HasBit(rti2->flags, RTF_DISALLOW_90DEG) || (!HasBit(rti2->flags, RTF_ALLOW_90DEG) && def);
|
||||
@@ -489,13 +489,13 @@ int TicksToLeaveDepot(const Train *v);
|
||||
Foundation GetRailFoundation(Slope tileh, TrackBits bits);
|
||||
|
||||
|
||||
bool HasRailtypeAvail(const CompanyID company, const RailType railtype);
|
||||
bool HasAnyRailtypesAvail(const CompanyID company);
|
||||
bool ValParamRailtype(const RailType rail);
|
||||
bool HasRailTypeAvail(const CompanyID company, const RailType railtype);
|
||||
bool HasAnyRailTypesAvail(const CompanyID company);
|
||||
bool ValParamRailType(const RailType rail);
|
||||
|
||||
RailTypes AddDateIntroducedRailTypes(RailTypes current, Date date);
|
||||
|
||||
RailTypes GetCompanyRailtypes(CompanyID company, bool introduces = true);
|
||||
RailTypes GetCompanyRailTypes(CompanyID company, bool introduces = true);
|
||||
RailTypes GetRailTypes(bool introduces);
|
||||
|
||||
RailType GetRailTypeByLabel(RailTypeLabel label, bool allow_alternate_labels = true);
|
||||
|
Reference in New Issue
Block a user