File indexing completed on 2024-12-01 06:51:42

0001 /***************************************************************************
0002                              cmapcmdmoveplayer.h
0003                              -------------------
0004     begin                : Sun Mar 29 2015
0005     copyright            : (C) 2015 by Tomas Mecir
0006     email                : mecirt@gmail.com
0007  ***************************************************************************/
0008 
0009 /***************************************************************************
0010  *                                                                         *
0011  *   This program is free software; you can redistribute it and/or modify  *
0012  *   it under the terms of the GNU General Public License as published by  *
0013  *   the Free Software Foundation; either version 2 of the License, or     *
0014  *   (at your option) any later version.                                   *
0015  *                                                                         *
0016  ***************************************************************************/
0017 
0018 #ifndef CMAPCMDMOVEPLAYEAR_H
0019 #define CMAPCMDMOVEPLAYEAR_H
0020 
0021 #include "cmapcommand.h"
0022 #include "cmapelement.h"
0023 
0024 class CMapRoom;
0025 class CMapPath;
0026 class CMapLevel;
0027 class CMapManager;
0028 
0029 class CMapCmdMovePlayer : public CMapCommand
0030 {
0031 public:
0032   CMapCmdMovePlayer(CMapManager *mapManager, directionTyp direction, QString specialCmd, bool create);
0033   ~CMapCmdMovePlayer() override;
0034   void redo() override;
0035   void undo() override;
0036 
0037 private:
0038   CMapManager *m_manager;
0039   bool m_create;
0040   QString m_special;
0041   directionTyp m_direction;
0042 
0043   CMapRoom *m_origroom, *m_newroom;
0044   CMapPath *m_newpath;
0045   CMapLevel *m_createdlevel;
0046 };
0047 
0048 
0049 #endif