forked from 0ad/0ad
Ykkrosh
cf37e9cbe6
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.
34 lines
617 B
C++
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__
|