0ad/source/tools/atlas/GameInterface/MessagePasser.h
Ykkrosh cf37e9cbe6 Atlas: Added a button. Reorganised game<->UI communication system.
main.cpp: Allowed correct operation when not calling Init/Shutdown.
Game.cpp: Stopped complaint when starting game with no GUI.

This was SVN commit r2446.
2005-06-27 23:04:34 +00:00

34 lines
617 B
C++

#ifndef MESSAGEPASSER_H__
#define MESSAGEPASSER_H__
namespace AtlasMessage
{
struct IMessage;
class MessagePasser
{
public:
virtual void Add(IMessage*)=0;
virtual IMessage* Retrieve()=0;
virtual void Query(IMessage&)=0;
virtual void QueryDone()=0;
};
extern MessagePasser* g_MessagePasser;
#define ADD_MESSAGE(type) AtlasMessage::g_MessagePasser->Add(new AtlasMessage::m##type)
}
/*
atlas->game command ("initialise now", "render now")
atlas->game->atlas query ("what is at position (x,y)?")
game->atlas notification ("game ended") ??
*/
#endif // MESSAGEPASSER_H__