qmlfrontend/game_config.h
author unC0Rr
Wed, 07 Nov 2018 15:59:51 +0100
changeset 14159 8354b390f1a2
parent 14148 qmlfrontend/gameconfig.h@745c73e0e644
child 14278 645e4591361f
permissions -rw-r--r--
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14148
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