]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/gameparams.h
Inventory: Make addList() consistent (#11382)
[dragonfireclient.git] / src / gameparams.h
index 4afc0fdce0001c3814d42ca0fc9334f1673e610b..70b0ffcde407de2410509d7be2a4030775a73696 100644 (file)
@@ -17,19 +17,35 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
 
-#ifndef GAME_PARAMS_H
-#define GAME_PARAMS_H
+#pragma once
 
 #include "irrlichttypes.h"
 
 struct SubgameSpec;
 
+// Information provided from "main"
 struct GameParams
 {
+       GameParams() = default;
+
        u16 socket_port;
        std::string world_path;
        SubgameSpec game_spec;
        bool is_dedicated_server;
 };
 
-#endif
+// Information processed by main menu
+struct GameStartData : GameParams
+{
+       GameStartData() = default;
+
+       bool isSinglePlayer() const { return address.empty() && !local_server; }
+
+       std::string name;
+       std::string password;
+       std::string address;
+       bool local_server;
+
+       // "world_path" must be kept in sync!
+       WorldSpec world_spec;
+};