qmlfrontend/game_config.h
author S.D.
Tue, 06 Sep 2022 22:08:27 +0300
branch1.0.0
changeset 15853 fcea0f51d94f
parent 14273 645e4591361f
permissions -rw-r--r--
Fix the sound issues and crashes on some platforms This commit updates misc/libphyslayer/physfsrwops.* files to the latest versions provided by PhysFS project (https://github.com/icculus/physfs/tree/main/extras/).

#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