1
1
forked from 0ad/0ad
0ad/source/sced/PaintObjectCommand.h
2004-05-30 00:46:58 +00:00

47 lines
947 B
C++
Executable File

#ifndef _PAINTOBJECTCOMMAND_H
#define _PAINTOBJECTCOMMAND_H
#include "Command.h"
#include "Matrix3D.h"
class CUnit;
class CObjectEntry;
class CPaintObjectCommand : public CCommand
{
public:
// constructor, destructor
CPaintObjectCommand(CObjectEntry* object,const CMatrix3D& transform);
~CPaintObjectCommand();
// return the texture name of this command
const char* GetName() const { return "Add Unit"; }
// execute this command
void Execute();
// can undo command?
bool IsUndoable() const { return false; }
// undo
void Undo();
// redo
void Redo();
// notification that command has finished (ie object stopped rotating) - convert
// unit to entity if there's a template for it
void Finalize();
// return unit added to world
CUnit* GetUnit() { return m_Unit; }
private:
// unit to add to world
CUnit* m_Unit;
// object to paint
CObjectEntry* m_Object;
// model transformation
CMatrix3D m_Transform;
};
#endif