1
0
forked from 0ad/0ad
0ad/source/tools/atlas/GameInterface/Handlers/Command.cpp
Ykkrosh 4a7d0e9038 Config: Changed -e to -entgraph (to avoid conflicts with -editor).
Premake: Don't compile Atlas when compiling ScEd, though I can't
remember why.
Atlas: Load existing maps.

This was SVN commit r2720.
2005-09-14 05:37:52 +00:00

47 lines
671 B
C++

#include "precompiled.h"
#include "MessageHandler.h"
#include "../CommandProc.h"
namespace AtlasMessage {
MESSAGEHANDLER(DoCommand)
{
Command* c = NULL;
cmdHandlers::const_iterator it = GetCmdHandlers().find("c" + msg->name);
if (it != GetCmdHandlers().end())
{
c = (it->second)(msg->data);
}
else
{
debug_warn("Unrecognised command");
return;
}
GetCommandProc().Submit(c);
}
MESSAGEHANDLER(UndoCommand)
{
UNUSED2(msg);
GetCommandProc().Undo();
}
MESSAGEHANDLER(RedoCommand)
{
UNUSED2(msg);
GetCommandProc().Redo();
}
MESSAGEHANDLER(MergeCommand)
{
UNUSED2(msg);
GetCommandProc().Merge();
}
}