[Scummvm-git-logs] scummvm master -> 621f5969a068b81ce8edecf384729b7c11663818

LittleToonCat noreply at scummvm.org
Wed Mar 8 08:48:55 UTC 2023


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
621f5969a0 SCUMM HE: Trim net_main.h whitespace.


Commit: 621f5969a068b81ce8edecf384729b7c11663818
    https://github.com/scummvm/scummvm/commit/621f5969a068b81ce8edecf384729b7c11663818
Author: Little Cat (toontownlittlecat at gmail.com)
Date: 2023-03-08T04:48:47-04:00

Commit Message:
SCUMM HE: Trim net_main.h whitespace.

Also added missing documentation.

Changed paths:
    engines/scumm/he/net/net_main.h


diff --git a/engines/scumm/he/net/net_main.h b/engines/scumm/he/net/net_main.h
index 78163665fab..c5c330a336b 100644
--- a/engines/scumm/he/net/net_main.h
+++ b/engines/scumm/he/net/net_main.h
@@ -60,14 +60,14 @@ private:
 	};
 	/**
 	 * Converts a formatted string into an Address object.
-	 * 
+	 *
 	 * @param address A proper formatted string e.g. "127.0.0.1:9120", it may or may not contain a port number.
 	 * @return Address
 	 */
 	Address getAddressFromString(Common::String address);
 	/**
 	 * Converts an Address object into a formatted string.
-	 * 
+	 *
 	 * @param address An address object.
 	 * @return Common::String
 	 */
@@ -76,7 +76,7 @@ private:
 public:
 	/**
 	 * Creates a session and add ourselves as a user.
-	 * 
+	 *
 	 * @param sessionName Name if a session.
 	 * @param userName User name to add.
 	 * @retval 1 on success.
@@ -87,7 +87,7 @@ public:
 	 * Joins a session with the speicified IP address and user name.
 	 * This gets called when attempting to join a Moonbase Commander
 	 * game with the --join-game command line param.
-	 * 
+	 *
 	 * @param IP IP Address to join
 	 * @param userName Username to use.
 	 * @retval 1 on success.
@@ -97,7 +97,7 @@ public:
 
 	/**
 	 * Adds a user to the session and assigns a user id.
-	 * 
+	 *
 	 * @param shortName Short username
 	 * @param longName Long username.
 	 * @retval 1 on success.
@@ -106,29 +106,29 @@ public:
 	int addUser(char *shortName, char *longName);
 	/**
 	 * Remove ourselves if we have a user id for this session.
-	 * 
+	 *
 	 * @retval Always returns 1.
 	 * @see destroyPlayer
-	 * 
+	 *
 	 */
 	int removeUser();
 
 	/**
 	 * Gets the user id who sent the previously received packet.
-	 * 
+	 *
 	 * @retval Last sent user id.
 	 */
 	int whoSentThis();
 	/**
 	 * Gets our assigned user id.
-	 * 
+	 *
 	 * @retval Our user id.
 	 */
 	int whoAmI();
 
 	/**
 	 * @brief Creates and host an network game session.
-	 * 
+	 *
 	 * @param name Session name
 	 * @retval 1 on success.
 	 * @retval 0 on failure.
@@ -136,27 +136,27 @@ public:
 	int createSession(char *name);
 	/**
 	 * Join a session by their given index.
-	 * 
+	 *
 	 * @param sessionIndex Index of a session to join.
 	 * @retval 1 on success.
 	 * @retval 0 on falure.
-	 * 
+	 *
 	 * @note Use the QuerySessions methods to get sessions.
 	 */
 	int joinSession(int sessionIndex);
 	/**
 	 * Join a session by their given id instead of index.
-	 * 
+	 *
 	 * @param sessionId ID of session to join
 	 * @retval 1 on success.
 	 * @retval 0 on falure.
-	 * 
+	 *
 	 * @note Use the QuerySessions methods to get sessions.
 	 */
 	int joinSessionById(int sessionId);
 	/**
 	 * Checks if the queried session id exist.
-	 * 
+	 *
 	 * @param sessionId Session ID to search for.
 	 * @retval 1 if found.
 	 * @retval 0 if not found.
@@ -165,7 +165,7 @@ public:
 
 	/**
 	 * Ends and closes an active game session.
-	 * 
+	 *
 	 * @retval Always returns 1
 	 */
 	int endSession();
@@ -173,7 +173,7 @@ public:
 	/**
 	 * Force a session server address to connect to when creating and joining sessions,
 	 * overriding an existing configuration if any.
-	 * 
+	 *
 	 * @param sessionServer Address to a session server address.
 	 * @note This will disable LAN hosting.
 	 */
@@ -185,48 +185,48 @@ public:
 	/**
 	 * Allows more players to join our session.
 	 * @note Currently stubbed.
-	 * 
+	 *
 	 */
 	void enableSessionJoining();
 
 	/**
 	 * @brief Set AI Player count.
-	 * 
+	 *
 	 * @param botsCount Number of AI players currently created.
 	 */
 	void setBotsCount(int botsCount);
 
 	/**
-	 * @brief Set and initializes the provider given by their name. 
-	 * 
+	 * @brief Set and initializes the provider given by their name.
+	 *
 	 * @param parameter1 SCUMM string array providing the name of the provider.
 	 * @param parameter2 SCUMM string array providing the optional paramater
-	 * 
+	 *
 	 * @retval 1 if successful
 	 * @retval 0 on failure.
-	 * 
+	 *
 	 * @note Currently this will only initialize the ENet provider, regardless of name given.
 	 */
 	int32 setProviderByName(int32 parameter1, int32 parameter2);
 
 	/**
 	 * @brief Sets the fake latency.
-	 * 
+	 *
 	 * @param time Fake latency time in milliseconds.
 	 */
 	void setFakeLatency(int time);
 
 	/**
 	 * Destroys and remove an existing player.
-	 * 
+	 *
 	 * @param userId ID of player to remove.
-	 * @retval true on removed 
-	 * @retval false on failure. 
+	 * @retval true on removed
+	 * @retval false on failure.
 	 */
 	bool destroyPlayer(int32 userId);
 	/**
 	 * Setup and begin to query for active game sessions
-	 * 
+	 *
 	 * @param connectToSessionServer Indicates that it should connect to the session server for Internet-wide connections
 	 * @retval 1 if ready
 	 * @retval 0 if not.
@@ -236,7 +236,7 @@ public:
 	int32 startQuerySessions(bool connectToSessionServer = true);
 	/**
 	 * Make a session query request and updates the session list.
-	 * 
+	 *
 	 * @return Number of sessions found.
 	 */
 	int32 updateQuerySessions();
@@ -247,74 +247,74 @@ public:
 	void stopQuerySessions();
 	/**
 	 * Shortcut for querying sessions, calls startQuerySessions and returns updateQuerySessions.
-	 * 
+	 *
 	 * @return Number of sessions found.
 	 */
 	int querySessions();
 
 	/**
 	 * Query aviliable providers.
-	 * 
+	 *
 	 * @return Always 1 currently.
 	 */
 	int queryProviders();
 	/**
 	 * @brief Set the provider by the index.
-	 * 
+	 *
 	 * @param providerIndex index of a provider
 	 * @retval 1 if successful
 	 * @retval 0 on failure
-	 * 
+	 *
 	 * @note Currently stubbed.
 	 */
 	int setProvider(int providerIndex);
 	/**
 	 * Close and shutsdown an active provider.
-	 * 
+	 *
 	 * @return Always returns 1.
 	 */
 	int closeProvider();
 
 	/**
 	 * Initializes the provider, session, and adds user all at once.
-	 * 
+	 *
 	 * @retval true on success.
-	 * @retval false on failure. 
-	 * 
+	 * @retval false on failure.
+	 *
 	 * @note Currently stubbed.
 	 */
 	bool initAll();
 	/**
 	 * Initializes the provider.
-	 * 
+	 *
 	 * @return true on success.
 	 * @return false on failure.
-	 * 
+	 *
 	 * @note Currently stubbed.
 	 */
 	bool initProvider();
 	/**
 	 * Initializes the session.
-	 * 
+	 *
 	 * @return true on success.
 	 * @return false on failure.
-	 * 
+	 *
 	 * @note Currently stubbed.
 	 */
 	bool initSession();
 	/**
 	 * Initializes the user.
-	 * 
+	 *
 	 * @return true on success.
 	 * @return false on failure.
-	 * 
+	 *
 	 * @note Currently stubbed.
 	 */
 	bool initUser();
 
 /**
 	 * Sends a packet to a remote peer(s) which will call VAR_REMOTE_START_SCRIPT.
-	 * 
+	 *
 	 * @param typeOfSend A type of send this packet goes to, can be an indiviual peer, a group, host, or everybody.
 	 * @param sendTypeParam A parameter for this type of send, e.g. for an indiviual send, this can be a user id of a peer to send to.
 	 * @param priority Tells the provider to ensure that this packet has been sent and received.
@@ -324,7 +324,7 @@ public:
 	void remoteStartScript(int typeOfSend, int sendTypeParam, int priority, int argsCount, int32 *args);
 	/**
 	 * Sends an SCUMM array to a remote peer(s), calling VAR_NETWORK_RECEIVE_ARRAY_SCRIPT there.
-	 * 
+	 *
 	 * @param typeOfSend A type of send this packet goes to, can be an indiviual peer, a group, host, or everybody.
 	 * @param sendTypeParam A parameter for this type of send, e.g. for an indiviual send, this can be a user id of a peer to send to.
 	 * @param priority Tells the provider to ensure that this packet has been sent and received.
@@ -334,7 +334,7 @@ public:
 
 	/**
 	 * Sends a packet to a peer calling VAR_NETWORK_RECEIVE_ARRAY_SCRIPT, and it'll return its return value back to us.
-	 * 
+	 *
 	 * @param typeOfSend A type of send this packet goes to, can be an indiviual peer, a group, host, or everybody.
 	 * @param sendTypeParam A parameter for this type of send, e.g. for an indiviual send, this can be a user id of a peer to send to.
 	 * @param priority Tells the provider to ensure that this packet has been sent and received.
@@ -343,14 +343,14 @@ public:
 	 * @param args The arguments themselves.
 	 * @retval A peer's return value.
 	 * @retval defaultReturnValue if timed out.
-	 * 
+	 *
 	 * @note This has been stubbed, as no game seems to use this.
 	 */
 	int remoteStartScriptFunction(int typeOfSend, int sendTypeParam, int priority, int defaultReturnValue, int argsCount, int32 *args);
 
 	/**
-	 * A method that should be called once at the beginning of a game loop to send/receive network data. 
-	 * 
+	 * A method that should be called once at the beginning of a game loop to send/receive network data.
+	 *
 	 * @param msecs milliseconds to service networks for.
 	 */
 	void doNetworkOnceAFrame(int msecs);
@@ -358,12 +358,12 @@ public:
 private:
 	/**
 	 * Attempt to connect to a game session with its address and port.
-	 * 
+	 *
 	 * @param address Address of an session to connect to.
 	 * @param port Port number of an session to connect to.
-	 * @retval true on success 
+	 * @retval true on success
 	 * @retval false on failure.
-	 * 
+	 *
 	 * @see joinGame
 	 * @see doJoinSession
 	 */
@@ -371,11 +371,11 @@ private:
 
 	/**
 	 * Method that actually attemps to join a session.
-	 * 
+	 *
 	 * @param session Session structure to join to.
 	 * @retval 1 on success
 	 * @retval 0 on failure.
-	 * 
+	 *
 	 * @see joinSession
 	 * @see joinSessionById
 	 */
@@ -383,12 +383,12 @@ private:
 
 	/**
 	 * Sends remote data to peer(s).
-	 * 
+	 *
 	 * @param typeOfSend A type of send this packet goes to, can be an indiviual peer, a group, host, or everybody.
 	 * @param sendTypeParam A parameter for this type of send, e.g. for an indiviual send, this can be a user id of a peer to send to.
 	 * @param type Type of packet.
 	 * @param data Data of contain in the packet.
-	 * @param priority Tells the provider to ensure that this packet has been sent and received. 
+	 * @param priority Tells the provider to ensure that this packet has been sent and received.
 	 * @param defaultRes Default return value (0 by default)
 	 * @param wait Wait for return value (Not currently being used).
 	 * @param callid Call ID of this packet send. (Not currently being used).
@@ -398,14 +398,14 @@ private:
 
 	/**
 	 * Services the broadcast (LAN) socket.
-	 * 
-	 * @return true 
-	 * @return false 
+	 *
+	 * @return true
+	 * @return false
 	 */
 	bool serviceBroadcast();
 	/**
 	 * Handles the data received from the broadcast (LAN) socket.
-	 * 
+	 *
 	 * @param data Data received.
 	 * @param host Host name who sent the data.
 	 * @param port Port number who sent the data.
@@ -417,7 +417,7 @@ private:
 	void serviceSessionServer();
 	/**
 	 * Handles data received from the session server.
-	 * 
+	 *
 	 * @param data Data received.
 	 */
 	void handleSessionServerData(Common::String data);
@@ -427,17 +427,17 @@ private:
 	void remoteReceiveData();
 	/**
 	 * Handle game data received from session host.
-	 * 
+	 *
 	 * @param json JSON object containing game data.
 	 * @param peerIndex Index of a peer who sent this data.
 	 */
 	void handleGameData(Common::JSONValue *json, int peerIndex);
 	/**
 	 * Handle game data received and transfer to peers if needed.
-	 * 
+	 *
 	 * @param json JSON object containing game data.
 	 * @param peerIndex Index of a peer who sent this data.
-	 * 
+	 *
 	 * @see handleGameData
 	 */
 	void handleGameDataHost(Common::JSONValue *json, int peerIndex);
@@ -447,48 +447,48 @@ public:
 
 	/**
 	 * Gets the host name of the local machine.
-	 * 
+	 *
 	 * @param hostname Pointer to store the host name to.
 	 * @param length The length of the pointer.
 	 * @retval true on successful .
 	 * @retval false on failure.
-	 * 
+	 *
 	 * @note This is currently subbed.
 	 */
 	bool getHostName(char *hostname, int length);
 	/**
 	 * Gets the IP address of the given local host name.
-	 * 
+	 *
 	 * @param ip Pointer to store the address to.
 	 * @param ipLength The length of the pointer.
 	 * @param nameBuffer the Host name itself.
 	 * @retval true on successful .
 	 * @retval false on failure..
-	 * 
+	 *
 	 * @note This is currently subbed.
 	 */
 	bool getIPfromName(char *ip, int ipLength, char *nameBuffer);
 	/**
 	 * Get the session name from the session index.
-	 * 
+	 *
 	 * @param sessionNumber The session's index.
 	 * @param buffer A buffer to store the name to.
-	 * @param length Maxinum length of the buffer.
+	 * @param length Maximum length of the buffer.
 	 */
 	void getSessionName(int sessionNumber, char *buffer, int length);
 	/**
 	 * Get the session's player count.
-	 * 
+	 *
 	 * @param sessionNumber The session's index.
 	 * @return Player count.
 	 */
 	int getSessionPlayerCount(int sessionNumber);
 	/**
 	 * @brief Get the name of a provider of the given index.
-	 * 
-	 * @param providerIndex 
-	 * @param buffer 
-	 * @param length 
+	 *
+	 * @param providerIndex The provider's index.
+	 * @param buffer A buffer to store the name to.
+	 * @param length Maximum length of the buffer.
 	 */
 	void getProviderName(int providerIndex, char *buffer, int length);
 
@@ -497,7 +497,7 @@ private:
 
 	/**
 	 * @brief Get total players joined in the session, including AI players.
-	 * 
+	 *
 	 * @return Player count.
 	 */
 	int getTotalPlayers();




More information about the Scummvm-git-logs mailing list