qmlfrontend/game_config.h
author S.D.
Fri, 23 Sep 2022 02:45:49 +0300
changeset 15876 1878d95d6e15
parent 14273 645e4591361f
permissions -rw-r--r--
Add GHC_DYNAMIC cmake option - allows building dynamically-linked haskell object files and executables (needed for some distributions)

#ifndef GAMECONFIG_H
#define GAMECONFIG_H

#include <QList>
#include <QVector>

#include "team.h"

class GameConfig {
 public:
  explicit GameConfig();

  const char** argv() const;
  int argc() const;
  const QList<QByteArray> config() const;

  void clear();
  void cmdSeed(const QByteArray& seed);
  void cmdTheme(const QByteArray& theme);
  void cmdMapgen(int mapgen);
  void cmdTeam(const Team& team);

 private:
  mutable QVector<const char*> m_argv;
  QList<QByteArray> m_arguments;
  QList<QByteArray> m_cfg;
  QList<Team> m_teams;

  void cfgAppend(const QByteArray& cmd);
};

#endif  // GAMECONFIG_H