|
mkRPG
|
Definition of the Game and World classes. More...
Go to the source code of this file.
Data Structures | |
| class | DefaultTypes |
| The DefaultTypes class represents the object that will contains all types. More... | |
| class | GameObjectList< Type > |
| The GameObjectList class enables to gather objects by types. More... | |
| class | GameObjectInventory |
| The GameObjectInventory class gathers the different "GameObjectLists" GameObjectList. More... | |
| class | World |
| The World class. More... | |
| class | Game |
| The Game class gather the differents parts needed to describe a game. More... | |
Defines | |
| #define | DefaultType(type, Type) private: Type *default##Type = new Type(*this); public: Type &type() const{return *default##Type;} |
| #define | ListDef(Type, Types) private: GameObjectList<Type> *a##Types; public: |
| #define | ListAdd(type, Type, Types) void add##Type(Type *type) const{a##Types->addGameObject(*type);} |
| #define | ListRemove(Type, Types) void remove##Type(int id) const{a##Types->removeGameObject(id);} |
| #define | ListSetter(type, Type, Types) ListAdd(type, Type, Types) ListRemove(Type,Types) |
| #define | ListGetAll(types, Type, Types) QList<Type*> types() const{return a##Types->gameObjects();} |
| #define | ListGetOne(type, Type, Types) Type &type(int id) const{return a##Types->gameObject(id);} |
| #define | ListGetter(type, types, Type, Types) ListGetAll(types, Type, Types) ListGetOne(type, Type, Types) |
| #define | List(type, types, Type, Types) ListDef(Type, Types) ListSetter(type, Type, Types) ListGetter(type, types, Type, Types) |
| #define | ListD(init, Init, body, sg, pl) List(init##body##sg,init##body##pl,Init##body##sg,Init##body##pl) |
| #define | ListInit(Type, Types) a##Types = new GameObjectList<Type>(QObject::tr(#Types),*this); |
| #define | ListInitD(Body, sg, pl) ListInit(Body##sg, Body##pl) |
| #define DefaultType | ( | type, | |
| Type | |||
| ) | private: Type *default##Type = new Type(*this); public: Type &type() const{return *default##Type;} |
Todoc
| #define List | ( | type, | |
| types, | |||
| Type, | |||
| Types | |||
| ) | ListDef(Type, Types) ListSetter(type, Type, Types) ListGetter(type, types, Type, Types) |
Cool Macro List
| #define ListAdd | ( | type, | |
| Type, | |||
| Types | |||
| ) | void add##Type(Type *type) const{a##Types->addGameObject(*type);} |
Cool Macro ListAdd
| #define ListD | ( | init, | |
| Init, | |||
| body, | |||
| sg, | |||
| pl | |||
| ) | List(init##body##sg,init##body##pl,Init##body##sg,Init##body##pl) |
Cool Macro ListD
| #define ListDef | ( | Type, | |
| Types | |||
| ) | private: GameObjectList<Type> *a##Types; public: |
Cool Macro ListDef
| #define ListGetAll | ( | types, | |
| Type, | |||
| Types | |||
| ) | QList<Type*> types() const{return a##Types->gameObjects();} |
Cool Macro ListGetAll
| #define ListGetOne | ( | type, | |
| Type, | |||
| Types | |||
| ) | Type &type(int id) const{return a##Types->gameObject(id);} |
Cool Macro ListGetOne
| #define ListGetter | ( | type, | |
| types, | |||
| Type, | |||
| Types | |||
| ) | ListGetAll(types, Type, Types) ListGetOne(type, Type, Types) |
Cool Macro ListGetter
| #define ListInit | ( | Type, | |
| Types | |||
| ) | a##Types = new GameObjectList<Type>(QObject::tr(#Types),*this); |
Cool Macro ListInit
| #define ListRemove | ( | Type, | |
| Types | |||
| ) | void remove##Type(int id) const{a##Types->removeGameObject(id);} |
Cool Macro ListRemove
| #define ListSetter | ( | type, | |
| Type, | |||
| Types | |||
| ) | ListAdd(type, Type, Types) ListRemove(Type,Types) |
Cool Macro ListSetter
1.7.6.1