 |
OpenXcom
1.0
Open-source clone of the original X-Com
|
19 #ifndef OPENXCOM_BASEVIEW_H
20 #define OPENXCOM_BASEVIEW_H
22 #include "../Engine/InteractiveSurface.h"
30 class RuleBaseFacility;
43 static const int BASE_SIZE = 6;
44 static const int GRID_SIZE = 32;
48 BaseFacility *_facilities[BASE_SIZE][BASE_SIZE], *_selFacility;
51 int _gridX, _gridY, _selSize;
59 BaseView(
int width,
int height,
int x = 0,
int y = 0);
COPYING:
Definition: BaseInfoState.cpp:41
~BaseView()
Cleans up the base view.
Definition: BaseView.cpp:59
void setSelectable(int size)
Sets whether the base view is selectable.
Definition: BaseView.cpp:165
BaseView(int width, int height, int x=0, int y=0)
Creates a new base view at the specified position and size.
Definition: BaseView.cpp:45
bool isQueuedBuilding(RuleBaseFacility *rule) const
Checks if the placed facility is placed in queue or not.
Definition: BaseView.cpp:237
void reCalcQueuedBuildings()
ReCalculates the remaining build-time of all queued buildings.
Definition: BaseView.cpp:255
int getGridX() const
Gets the X position of the currently selected square.
Definition: BaseView.cpp:145
Represents a player base on the globe.
Definition: Base.h:48
Represents a base facility placed in a base.
Definition: BaseFacility.h:39
Container for all the information associated with a given user action, like mouse clicks,...
Definition: Action.h:35
void setTexture(SurfaceSet *texture)
Sets the texture for this base view.
Definition: BaseView.cpp:116
void blink()
Blinks the selector.
Definition: BaseView.cpp:311
void mouseOver(Action *action, State *state)
Special handling for mouse hovers.
Definition: BaseView.cpp:510
Contains strings used throughout the game for localization.
Definition: Language.h:44
void draw()
Draws the base view.
Definition: BaseView.cpp:346
Container of a set of surfaces.
Definition: SurfaceSet.h:39
Element that is blit (rendered) onto the screen.
Definition: Surface.h:40
int getGridY() const
Gets the Y position of the currently selected square.
Definition: BaseView.cpp:155
void think()
Handles the timers.
Definition: BaseView.cpp:303
bool isPlaceable(RuleBaseFacility *rule) const
Checks if a facility can be placed.
Definition: BaseView.cpp:197
Surface that the user can interact with.
Definition: InteractiveSurface.h:40
BaseFacility * getSelectedFacility() const
Gets the currently selected facility.
Definition: BaseView.cpp:125
Represents a specific type of base facility.
Definition: RuleBaseFacility.h:36
void resetSelectedFacility()
Prevents any mouseover bugs on dismantling base facilities before setBase has had time to update the ...
Definition: BaseView.cpp:133
A game state that receives user input and reacts accordingly.
Definition: State.h:45
Interactive view of a base.
Definition: BaseView.h:41
Timer used to run code in fixed intervals.
Definition: Timer.h:38
Takes care of loading and storing each character in a sprite font.
Definition: Font.h:41
void mouseOut(Action *action, State *state)
Special handling for mouse hovering out.
Definition: BaseView.cpp:548
void setBase(Base *base)
Sets the base to display.
Definition: BaseView.cpp:86
void initText(Font *big, Font *small, Language *lang)
Initializes the base view's various resources.
Definition: BaseView.cpp:74
void blit(Surface *surface)
Blits the base view onto another surface.
Definition: BaseView.cpp:496