qmlfrontend/gameconfig.h
author unc0rr
Sun, 07 Jan 2018 01:21:42 +0100
branchqmlfrontend
changeset 12888 adb1fccc706a
parent 12868 fe16fa088b69
permissions -rw-r--r--
- ResizeWindow function to pass engine new window size - Remove TabBar to leave more space at the bottom of the screen - ifdef GL_ES in shaders
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12863
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents:
diff changeset
     1
#ifndef GAMECONFIG_H
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents:
diff changeset
     2
#define GAMECONFIG_H
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents:
diff changeset
     3
12864
a03f245243b0 And more refactoring...
unc0rr
parents: 12863
diff changeset
     4
#include <QList>
a03f245243b0 And more refactoring...
unc0rr
parents: 12863
diff changeset
     5
#include <QVector>
12863
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents:
diff changeset
     6
12868
fe16fa088b69 Make playing a game possible
unc0rr
parents: 12866
diff changeset
     7
#include "team.h"
fe16fa088b69 Make playing a game possible
unc0rr
parents: 12866
diff changeset
     8
12864
a03f245243b0 And more refactoring...
unc0rr
parents: 12863
diff changeset
     9
class GameConfig {
12863
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents:
diff changeset
    10
public:
12864
a03f245243b0 And more refactoring...
unc0rr
parents: 12863
diff changeset
    11
    explicit GameConfig();
a03f245243b0 And more refactoring...
unc0rr
parents: 12863
diff changeset
    12
a03f245243b0 And more refactoring...
unc0rr
parents: 12863
diff changeset
    13
    const char** argv() const;
a03f245243b0 And more refactoring...
unc0rr
parents: 12863
diff changeset
    14
    int argc() const;
12865
e33bcb9d5e9c Preview rendering seems to work now
unc0rr
parents: 12864
diff changeset
    15
    const QList<QByteArray> config() const;
12863
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents:
diff changeset
    16
12864
a03f245243b0 And more refactoring...
unc0rr
parents: 12863
diff changeset
    17
    void clear();
a03f245243b0 And more refactoring...
unc0rr
parents: 12863
diff changeset
    18
    void cmdSeed(const QByteArray& seed);
12868
fe16fa088b69 Make playing a game possible
unc0rr
parents: 12866
diff changeset
    19
    void cmdTheme(const QByteArray& theme);
12864
a03f245243b0 And more refactoring...
unc0rr
parents: 12863
diff changeset
    20
    void cmdMapgen(int mapgen);
12868
fe16fa088b69 Make playing a game possible
unc0rr
parents: 12866
diff changeset
    21
    void cmdTeam(const Team& team);
12863
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents:
diff changeset
    22
12868
fe16fa088b69 Make playing a game possible
unc0rr
parents: 12866
diff changeset
    23
    bool isPreview() const;
fe16fa088b69 Make playing a game possible
unc0rr
parents: 12866
diff changeset
    24
    void setPreview(bool isPreview);
12866
488782d9aba9 Recreate uFLRunQueue in Qt, render previews
unc0rr
parents: 12865
diff changeset
    25
12864
a03f245243b0 And more refactoring...
unc0rr
parents: 12863
diff changeset
    26
private:
a03f245243b0 And more refactoring...
unc0rr
parents: 12863
diff changeset
    27
    mutable QVector<const char*> m_argv;
a03f245243b0 And more refactoring...
unc0rr
parents: 12863
diff changeset
    28
    QList<QByteArray> m_arguments;
a03f245243b0 And more refactoring...
unc0rr
parents: 12863
diff changeset
    29
    QList<QByteArray> m_cfg;
12868
fe16fa088b69 Make playing a game possible
unc0rr
parents: 12866
diff changeset
    30
    QList<Team> m_teams;
fe16fa088b69 Make playing a game possible
unc0rr
parents: 12866
diff changeset
    31
    bool m_isPreview;
12864
a03f245243b0 And more refactoring...
unc0rr
parents: 12863
diff changeset
    32
a03f245243b0 And more refactoring...
unc0rr
parents: 12863
diff changeset
    33
    void cfgAppend(const QByteArray& cmd);
12863
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents:
diff changeset
    34
};
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents:
diff changeset
    35
12864
a03f245243b0 And more refactoring...
unc0rr
parents: 12863
diff changeset
    36
#endif // GAMECONFIG_H