File: ETEdit.h

package info (click to toggle)
worlded 0.1.3-7
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 4,044 kB
  • ctags: 1,570
  • sloc: cpp: 8,093; ansic: 6,198; sh: 3,528; makefile: 419; yacc: 316; sed: 16
file content (46 lines) | stat: -rw-r--r-- 954 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// $Id: ETEdit.h,v 1.1 2002/02/17 00:28:19 nekeme Exp $
#ifndef WE_ETNEW_H

#include "EntityTool.h"
#include "Command.h"

class ETEdit : public EntityTool
{
      Entity *m_Entity;
  public:
      ETEdit (World *world);
      virtual ~ETEdit();
      
      /// Apply tool at (x,z)
      virtual void Apply3D (Ark::Vector3 newpos, const Ark::Collision &col);
      
      /// Update or reset tool
      virtual void Update();
      
   public:
      /// Create a command with a correct state.
      virtual Command* CreateCommand();
};

/// Entity command: edit
class ECEdit : public Command
{
      World *m_World;
      Entity *m_Entity;

   public:
      ECEdit (World *world, Entity *entity);
      virtual ~ECEdit();

      /// Return the command type.
      virtual std::string Type() const;

      /// Execute this command.
      virtual void Execute();

      /// Undo the action done by this command.
      virtual void Unexecute();
};

#endif