qmlfrontend/game_config.h
author alfadur
Mon, 19 Nov 2018 06:57:36 +0300
changeset 14235 3a9e4f35aa68
parent 14154 8354b390f1a2
child 14273 645e4591361f
permissions -rw-r--r--
On a second though, the actual error seems to be elsewhere, so still can use proper indexing
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14143
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     1
#ifndef GAMECONFIG_H
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     2
#define GAMECONFIG_H
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     3
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     4
#include <QList>
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     5
#include <QVector>
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     6
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     7
#include "team.h"
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     8
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     9
class GameConfig {
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    10
 public:
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    11
  explicit GameConfig();
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    12
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    13
  const char** argv() const;
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    14
  int argc() const;
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    15
  const QList<QByteArray> config() const;
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    16
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    17
  void clear();
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    18
  void cmdSeed(const QByteArray& seed);
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    19
  void cmdTheme(const QByteArray& theme);
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    20
  void cmdMapgen(int mapgen);
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    21
  void cmdTeam(const Team& team);
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    22
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    23
  bool isPreview() const;
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    24
  void setPreview(bool isPreview);
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    25
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    26
 private:
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    27
  mutable QVector<const char*> m_argv;
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    28
  QList<QByteArray> m_arguments;
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    29
  QList<QByteArray> m_cfg;
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    30
  QList<Team> m_teams;
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    31
  bool m_isPreview;
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    32
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    33
  void cfgAppend(const QByteArray& cmd);
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    34
};
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    35
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    36
#endif  // GAMECONFIG_H