File indexing completed on 2025-04-27 06:58:04
0001 /* 0002 SPDX-FileCopyrightText: 2011 Mathias Kraus <k.hias@gmx.de> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef GRANATIERGLOBALS_H 0008 #define GRANATIERGLOBALS_H 0009 0010 #include <QtTypes> 0011 0012 namespace Granatier 0013 { 0014 /** The Frames Per Second for the game */ 0015 constexpr int FPS = 60; 0016 0017 /** The Cell size */ 0018 constexpr qreal CellSize = 60.0; 0019 0020 /** All possible graphic types */ 0021 namespace GraphicItem 0022 { 0023 enum Type 0024 { 0025 NONE, 0026 HOLE, 0027 GROUND, 0028 WALL, 0029 BLOCK, 0030 ICE, 0031 BOMBMORTAR, 0032 ARROWUP, 0033 ARROWDOWN, 0034 ARROWLEFT, 0035 ARROWRIGHT, 0036 PLAYER, 0037 BOMB, 0038 BONUS, 0039 BONUS_ITEM_SPEED, 0040 BONUS_ITEM_BOMB, 0041 BONUS_ITEM_POWER, 0042 BONUS_ITEM_SHIELD, 0043 BONUS_ITEM_THROW, 0044 BONUS_ITEM_KICK, 0045 BONUS_ITEM_SLOW, 0046 BONUS_ITEM_HYPERACTIVE, 0047 BONUS_ITEM_MIRROR, 0048 BONUS_ITEM_SCATTY, 0049 BONUS_ITEM_RESTRAIN, 0050 BONUS_ITEM_RESURRECT, 0051 SCORE 0052 }; 0053 } 0054 0055 /** The Cell possible types */ 0056 namespace Cell 0057 { 0058 enum Type 0059 { 0060 HOLE = GraphicItem::HOLE, 0061 GROUND = GraphicItem::GROUND, 0062 WALL = GraphicItem::WALL, 0063 BLOCK = GraphicItem::BLOCK, 0064 ICE = GraphicItem::ICE, 0065 BOMBMORTAR = GraphicItem::BOMBMORTAR, 0066 ARROWUP = GraphicItem::ARROWUP, 0067 ARROWDOWN = GraphicItem::ARROWDOWN, 0068 ARROWLEFT = GraphicItem::ARROWLEFT, 0069 ARROWRIGHT = GraphicItem::ARROWRIGHT 0070 }; 0071 } 0072 0073 /** The Element possible types */ 0074 namespace Element 0075 { 0076 enum Type 0077 { 0078 NONE = GraphicItem::NONE, 0079 BLOCK = GraphicItem::BLOCK, 0080 PLAYER = GraphicItem::PLAYER, 0081 BOMB = GraphicItem::BOMB, 0082 BONUS = GraphicItem::BONUS, 0083 SCORE = GraphicItem::SCORE 0084 }; 0085 } 0086 0087 /** The Bonus possible types */ 0088 namespace Bonus 0089 { 0090 enum Type 0091 { 0092 NONE = GraphicItem::NONE, 0093 SPEED = GraphicItem::BONUS_ITEM_SPEED, 0094 BOMB = GraphicItem::BONUS_ITEM_BOMB, 0095 POWER = GraphicItem::BONUS_ITEM_POWER, 0096 SHIELD = GraphicItem::BONUS_ITEM_SHIELD, 0097 THROW = GraphicItem::BONUS_ITEM_THROW, 0098 KICK = GraphicItem::BONUS_ITEM_KICK, 0099 SLOW = GraphicItem::BONUS_ITEM_SLOW, 0100 HYPERACTIVE = GraphicItem::BONUS_ITEM_HYPERACTIVE, 0101 MIRROR = GraphicItem::BONUS_ITEM_MIRROR, 0102 SCATTY = GraphicItem::BONUS_ITEM_SCATTY, 0103 RESTRAIN = GraphicItem::BONUS_ITEM_RESTRAIN, 0104 RESURRECT = GraphicItem::BONUS_ITEM_RESURRECT, 0105 }; 0106 } 0107 0108 /** The possible directions */ 0109 namespace Direction 0110 { 0111 enum Type 0112 { 0113 NORTH, 0114 SOUTH, 0115 EAST, 0116 WEST 0117 }; 0118 } 0119 0120 /** The different types of information about the game */ 0121 namespace Info 0122 { 0123 enum Type 0124 { 0125 NoInfo = 0, 0126 TimeInfo = 1, // Remaining time 0127 ArenaInfo = 2, // The name of the current arena 0128 PlayerInfo = 4, // Current level 0129 AllInfo = TimeInfo | ArenaInfo | PlayerInfo 0130 }; 0131 } 0132 } 0133 0134 #endif // GRANATIERGLOBALS_H