summaryrefslogtreecommitdiffstats
path: root/sigscript/GameWrapper.h
blob: efff7de35eeb7f27e0cd298d1a30cb586dc20fa4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
/*
 * Copyright 2008-2009 Ben Boeckel <MathStuf@gmail.com>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License along
 * with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef SIGSCRIPT_GAMEWRAPPER
#define SIGSCRIPT_GAMEWRAPPER

// Sigscript includes
#include "ObjectWrapper.h"

// Sigcore includes
#include <sigcore/Hat.h>
#include <sigcore/Script.h>

// Sigmod includes
#include <sigmod/Direction.h>
#include <sigmod/Stat.h>

// Qt includes
#include <QtCore/QPoint>

// Forward declarations
namespace Sigmod
{
class Game;
}

namespace Sigscript
{
class AbilityWrapper;
class AuthorWrapper;
class BadgeWrapper;
class CoinListWrapper;
class EggGroupWrapper;
class GlobalScriptWrapper;
class ItemWrapper;
class ItemTypeWrapper;
class MapWrapper;
class MapWarpWrapper;
class MoveWrapper;
class NatureWrapper;
class RulesWrapper;
class SkinWrapper;
class SoundWrapper;
class SpeciesWrapper;
class SpriteWrapper;
class StatusWrapper;
class StoreWrapper;
class TileWrapper;
class TimeWrapper;
class TrainerWrapper;
class TypeWrapper;
class WeatherWrapper;

class SIGSCRIPT_EXPORT GameWrapper : public ObjectWrapper
{
    Q_OBJECT
    
    public:
        GameWrapper(const Sigmod::Game* game);
        
        Sigcore::Hat<NatureWrapper*> natureHat();
        
        AbilityWrapper* ability(const int id);
        AuthorWrapper* author(const int id);
        BadgeWrapper* badge(const int id);
        CoinListWrapper* coinList(const int id);
        EggGroupWrapper* eggGroup(const int id);
        GlobalScriptWrapper* globalScript(const int id);
        ItemWrapper* item(const int id);
        ItemTypeWrapper* itemType(const int id);
        MapWrapper* map(const int id);
        MoveWrapper* move(const int id);
        NatureWrapper* nature(const int id);
        SkinWrapper* skin(const int id);
        SoundWrapper* sound(const int id);
        SpeciesWrapper* species(const int id);
        SpriteWrapper* sprite(const int id);
        StatusWrapper* status(const int id);
        StoreWrapper* store(const int id);
        TileWrapper* tile(const int id);
        TimeWrapper* time(const int id);
        TrainerWrapper* trainer(const int id);
        TypeWrapper* type(const int id);
        WeatherWrapper* weather(const int id);
        
        Q_SCRIPTABLE Sigmod::Stat stat(const QString& name) const;
        Q_SCRIPTABLE Sigmod::Direction direction(const QString& direction) const;
        
        Q_SCRIPTABLE QString title() const;
        Q_SCRIPTABLE QString version() const;
        Q_SCRIPTABLE QString description() const;
        Q_SCRIPTABLE bool singlePlayer() const;
        Q_SCRIPTABLE Sigcore::Script startScript();
        Q_SCRIPTABLE Sigcore::Fraction effectiveness(const TypeWrapper* attacker, const TypeWrapper* defender) const;
        Q_SCRIPTABLE QPoint mapPosition(const MapWrapper* map) const;
        Q_SCRIPTABLE RulesWrapper* rules();
        
        Q_SCRIPTABLE AbilityWrapper* ability(const QString& name);
        Q_SCRIPTABLE AuthorWrapper* author(const QString& name);
        Q_SCRIPTABLE BadgeWrapper* badge(const QString& name);
        Q_SCRIPTABLE CoinListWrapper* coinList(const QString& name);
        Q_SCRIPTABLE EggGroupWrapper* eggGroup(const QString& name);
        Q_SCRIPTABLE GlobalScriptWrapper* globalScript(const QString& name);
        Q_SCRIPTABLE ItemWrapper* item(const QString& name);
        Q_SCRIPTABLE ItemTypeWrapper* itemType(const QString& name);
        Q_SCRIPTABLE MapWrapper* map(const QString& name);
        Q_SCRIPTABLE MoveWrapper* move(const QString& name);
        Q_SCRIPTABLE NatureWrapper* nature(const QString& name);
        Q_SCRIPTABLE SkinWrapper* skin(const QString& name);
        Q_SCRIPTABLE SoundWrapper* sound(const QString& name);
        Q_SCRIPTABLE SpeciesWrapper* species(const QString& name);
        Q_SCRIPTABLE SpriteWrapper* sprite(const QString& name);
        Q_SCRIPTABLE StatusWrapper* status(const QString& name);
        Q_SCRIPTABLE StoreWrapper* store(const QString& name);
        Q_SCRIPTABLE TileWrapper* tile(const QString& name);
        Q_SCRIPTABLE TimeWrapper* time(const QString& name);
        Q_SCRIPTABLE TrainerWrapper* trainer(const QString& name);
        Q_SCRIPTABLE TypeWrapper* type(const QString& name);
        Q_SCRIPTABLE WeatherWrapper* weather(const QString& name);
    private:
        GameWrapper& operator=(const GameWrapper& rhs);
        
        const Sigmod::Game* m_game;
};
}
Q_DECLARE_METATYPE(Sigscript::GameWrapper*)

#endif