Advanced Strategic Command
replaymapdisplay.h
Go to the documentation of this file.
1 /*
2  This file is part of Advanced Strategic Command; http://www.asc-hq.de
3  Copyright (C) 1994-2010 Martin Bickel and Marc Schellenberger
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program; see the file COPYING. If not, write to the
17  Free Software Foundation, Inc., 59 Temple Place, Suite 330,
18  Boston, MA 02111-1307 USA
19 */
20 
21 #if defined(karteneditor)
22  #error the mapeditor should not need to use controls.h !
23 #endif
24 
25 
26 #ifndef replaymapdisplayH
27 #define replaymapdisplayH
28 #include "typen.h"
29 #include "mapdisplayinterface.h"
30 
32  MapDisplayInterface* mapDisplay;
33  int cursorDelay;
34  void wait ( int minTime = 0 );
35  public:
36  ReplayMapDisplay ( MapDisplayInterface* md ) { mapDisplay = md; cursorDelay = 20; };
37  int displayMovingUnit ( const MapCoordinate3D& start, const MapCoordinate3D& dest, Vehicle* vehicle, int fieldnum, int totalmove, SoundStartCallback startSound, int duration );
38  void displayPosition ( int x, int y );
39  void displayMap ( Vehicle* additionalVehicle ) { mapDisplay->displayMap( additionalVehicle ); };
40  void displayMap ( void ) { mapDisplay->displayMap(); };
41  void resetMovement ( void ) { mapDisplay->resetMovement(); };
42  void startAction ( void ) { mapDisplay->startAction(); };
43  void stopAction ( void ) { mapDisplay->stopAction(); };
44  void cursor_goto( const MapCoordinate& pos ) { mapDisplay->cursor_goto(pos);};
45  void displayActionCursor ( int x1, int y1, int x2 , int y2 , int secondWait );
46  void displayActionCursor ( int x1, int y1 ) { displayActionCursor ( x1, y1, -1, -1, 0 ); };
47  void displayActionCursor ( int x1, int y1, int x2 , int y2 ) { displayActionCursor ( x1, y1, x2, y2, 0 ); };
48  void removeActionCursor ( void );
49  int checkMapPosition ( int x, int y );
50  void setCursorDelay ( int time ) { cursorDelay = time; };
51  void updateDashboard() { mapDisplay->updateDashboard(); };
52  void repaintDisplay () { mapDisplay->repaintDisplay(); };
53  void setTempView( bool view ) { mapDisplay->setTempView( view ); };
54  void showBattle( tfight& battle ) { mapDisplay->showBattle( battle ); };
55  void playPositionalSound( const MapCoordinate& pos, Sound* snd );
56  int getUnitMovementDuration() const;
57  };
58 
59 #endif
void playPositionalSound(const MapCoordinate &pos, Sound *snd)
void showBattle(tfight &battle)
Definition: sound.h:20
void cursor_goto(const MapCoordinate &pos)
void stopAction(void)
int getUnitMovementDuration() const
virtual void updateDashboard()=0
int checkMapPosition(int x, int y)
virtual void resetMovement(void)=0
void displayActionCursor(int x1, int y1)
Loki::Functor< void, LOKI_TYPELIST_1(int) > SoundStartCallback
virtual void cursor_goto(const MapCoordinate &pos)=0
Coordinate on the twodimensional map.
Definition: typen.h:202
void displayActionCursor(int x1, int y1, int x2, int y2, int secondWait)
virtual void displayMap(void)=0
ReplayMapDisplay(MapDisplayInterface *md)
void displayMap(Vehicle *additionalVehicle)
virtual void setTempView(bool view)=0
void removeActionCursor(void)
int displayMovingUnit(const MapCoordinate3D &start, const MapCoordinate3D &dest, Vehicle *vehicle, int fieldnum, int totalmove, SoundStartCallback startSound, int duration)
void startAction(void)
void displayMap(void)
void setCursorDelay(int time)
void resetMovement(void)
Definition: attack.h:83
virtual void startAction(void)=0
virtual void stopAction(void)=0
void displayActionCursor(int x1, int y1, int x2, int y2)
Coordinate on the map including height.
Definition: typen.h:238
void setTempView(bool view)
virtual void showBattle(tfight &battle)=0
void displayPosition(int x, int y)
virtual void repaintDisplay()=0