summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--projects/openttd_vs80.vcproj14
-rw-r--r--projects/openttd_vs90.vcproj14
-rw-r--r--source.list8
-rw-r--r--src/network/network_internal.h88
4 files changed, 75 insertions, 49 deletions
diff --git a/projects/openttd_vs80.vcproj b/projects/openttd_vs80.vcproj
index 5743be414..ff901243f 100644
--- a/projects/openttd_vs80.vcproj
+++ b/projects/openttd_vs80.vcproj
@@ -932,7 +932,7 @@
>
</File>
<File
- RelativePath=".\..\src\engine.h"
+ RelativePath=".\..\src\engine_func.h"
>
</File>
<File
@@ -1192,7 +1192,11 @@
>
</File>
<File
- RelativePath=".\..\src\order.h"
+ RelativePath=".\..\src\order_base.h"
+ >
+ </File>
+ <File
+ RelativePath=".\..\src\order_func.h"
>
</File>
<File
@@ -1344,7 +1348,11 @@
>
</File>
<File
- RelativePath=".\..\src\station.h"
+ RelativePath=".\..\src\station_base.h"
+ >
+ </File>
+ <File
+ RelativePath=".\..\src\station_func.h"
>
</File>
<File
diff --git a/projects/openttd_vs90.vcproj b/projects/openttd_vs90.vcproj
index baf39bd52..1af13cafc 100644
--- a/projects/openttd_vs90.vcproj
+++ b/projects/openttd_vs90.vcproj
@@ -929,7 +929,7 @@
>
</File>
<File
- RelativePath=".\..\src\engine.h"
+ RelativePath=".\..\src\engine_func.h"
>
</File>
<File
@@ -1189,7 +1189,11 @@
>
</File>
<File
- RelativePath=".\..\src\order.h"
+ RelativePath=".\..\src\order_base.h"
+ >
+ </File>
+ <File
+ RelativePath=".\..\src\order_func.h"
>
</File>
<File
@@ -1341,7 +1345,11 @@
>
</File>
<File
- RelativePath=".\..\src\station.h"
+ RelativePath=".\..\src\station_base.h"
+ >
+ </File>
+ <File
+ RelativePath=".\..\src\station_func.h"
>
</File>
<File
diff --git a/source.list b/source.list
index 2a0412e50..bde85dec9 100644
--- a/source.list
+++ b/source.list
@@ -141,7 +141,7 @@ widgets/dropdown_type.h
economy_func.h
economy_type.h
core/endian_func.hpp
-engine.h
+engine_func.h
engine_type.h
core/enum_type.hpp
fileio.h
@@ -206,7 +206,8 @@ sound/null_s.h
video/null_v.h
oldpool.h
openttd.h
-order.h
+order_base.h
+order_func.h
order_type.h
core/overflowsafe_type.hpp
pathfind.h
@@ -244,7 +245,8 @@ sound_func.h
sound_type.h
sprite.h
spritecache.h
-station.h
+station_base.h
+station_func.h
station_gui.h
station_type.h
stdafx.h
diff --git a/src/network/network_internal.h b/src/network/network_internal.h
index aa823429c..ae4c56c5a 100644
--- a/src/network/network_internal.h
+++ b/src/network/network_internal.h
@@ -10,58 +10,66 @@
#include "core/config.h"
#include "core/game.h"
-// If this line is enable, every frame will have a sync test
-// this is not needed in normal games. Normal is like 1 sync in 100
-// frames. You can enable this if you have a lot of desyncs on a certain
-// game.
-// Remember: both client and server have to be compiled with this
-// option enabled to make it to work. If one of the two has it disabled
-// nothing will happen.
+/**
+ * If this line is enable, every frame will have a sync test
+ * this is not needed in normal games. Normal is like 1 sync in 100
+ * frames. You can enable this if you have a lot of desyncs on a certain
+ * game.
+ * Remember: both client and server have to be compiled with this
+ * option enabled to make it to work. If one of the two has it disabled
+ * nothing will happen.
+ */
//#define ENABLE_NETWORK_SYNC_EVERY_FRAME
-// In theory sending 1 of the 2 seeds is enough to check for desyncs
-// so in theory, this next define can be left off.
+/**
+ * In theory sending 1 of the 2 seeds is enough to check for desyncs
+ * so in theory, this next define can be left off.
+ */
//#define NETWORK_SEND_DOUBLE_SEED
-// How many clients can we have? Like.. MAX_PLAYERS - 1 is the amount of
-// players that can really play.. so.. a max of 4 spectators.. gives us..
-// MAX_PLAYERS + 3
-#define MAX_CLIENTS (MAX_PLAYERS + 3)
+enum {
+ /**
+ * How many clients can we have? Like.. MAX_PLAYERS - 1 is the amount of
+ * players that can really play.. so.. a max of 4 spectators.. gives us..
+ * MAX_PLAYERS + 3
+ */
+ MAX_CLIENTS = MAX_PLAYERS + 3,
-// Do not change this next line. It should _ALWAYS_ be MAX_CLIENTS + 1
-#define MAX_CLIENT_INFO (MAX_CLIENTS + 1)
+ /** Do not change this next line. It should _ALWAYS_ be MAX_CLIENTS + 1 */
+ MAX_CLIENT_INFO = MAX_CLIENTS + 1,
-#define MAX_INTERFACES 9
+ /** Maximum number of internet interfaces supported. */
+ MAX_INTERFACES = 9,
-
-// How many vehicle/station types we put over the network
-#define NETWORK_VEHICLE_TYPES 5
-#define NETWORK_STATION_TYPES 5
+ /** 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
- char password[NETWORK_PASSWORD_LENGTH]; // The password for the player
- Year inaugurated_year; // What year the company started in
- Money company_value; // The company value
- Money money; // The amount of money the company has
- Money income; // How much did the company earned last year
- uint16 performance; // What was his performance last month?
- bool use_password; // Is there a password
- uint16 num_vehicle[NETWORK_VEHICLE_TYPES]; // How many vehicles are there of this type?
- uint16 num_station[NETWORK_STATION_TYPES]; // How many stations are there of this type?
- char players[NETWORK_PLAYERS_LENGTH]; // The players that control this company (Name1, name2, ..)
- uint16 months_empty; // How many months the company is empty
+ char company_name[NETWORK_NAME_LENGTH]; ///< Company name
+ char password[NETWORK_PASSWORD_LENGTH]; ///< The password for the player
+ Year inaugurated_year; ///< What year the company started in
+ Money company_value; ///< The company value
+ Money money; ///< The amount of money the company has
+ Money income; ///< How much did the company earned last year
+ uint16 performance; ///< What was his performance last month?
+ bool use_password; ///< Is there a password
+ uint16 num_vehicle[NETWORK_VEHICLE_TYPES]; ///< How many vehicles are there of this type?
+ uint16 num_station[NETWORK_STATION_TYPES]; ///< How many stations are there of this type?
+ char players[NETWORK_PLAYERS_LENGTH]; ///< The players that control this company (Name1, name2, ..)
+ uint16 months_empty; ///< How many months the company is empty
};
struct NetworkClientInfo {
- uint16 client_index; // Index of the client (same as ClientState->index)
- char client_name[NETWORK_CLIENT_NAME_LENGTH]; // Name of the client
- byte client_lang; // The language of the client
- PlayerID client_playas; // As which player is this client playing (PlayerID)
- uint32 client_ip; // IP-address of the client (so he can be banned)
- Date join_date; // Gamedate the player has joined
- char unique_id[NETWORK_UNIQUE_ID_LENGTH]; // Every play sends an unique id so we can indentify him
+ uint16 client_index; ///< Index of the client (same as ClientState->index)
+ char client_name[NETWORK_CLIENT_NAME_LENGTH]; ///< Name of the client
+ byte client_lang; ///< The language of the client
+ PlayerID client_playas; ///< As which player is this client playing (PlayerID)
+ uint32 client_ip; ///< IP-address of the client (so he can be banned)
+ Date join_date; ///< Gamedate the player has joined
+ char unique_id[NETWORK_UNIQUE_ID_LENGTH]; ///< Every play sends an unique id so we can indentify him
};
enum NetworkJoinStatus {
@@ -75,7 +83,7 @@ enum NetworkJoinStatus {
NETWORK_JOIN_STATUS_GETTING_COMPANY_INFO,
};
-/* Language ids for server_lang and client_lang. Do NOT modify the order. */
+/** Language ids for server_lang and client_lang. Do NOT modify the order. */
enum NetworkLanguage {
NETLANG_ANY = 0,
NETLANG_ENGLISH,