forked from 0ad/0ad
Ykkrosh
4a7d0e9038
Premake: Don't compile Atlas when compiling ScEd, though I can't remember why. Atlas: Load existing maps. This was SVN commit r2720.
47 lines
671 B
C++
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();
|
|
}
|
|
|
|
|
|
}
|