metaforce/Runtime/CScriptMailbox.hpp

39 lines
1.0 KiB
C++
Raw Normal View History

2016-04-12 23:07:23 -07:00
#ifndef __URDE_CSCRIPTMAILBOX_HPP__
#define __URDE_CSCRIPTMAILBOX_HPP__
2015-08-16 22:26:58 -07:00
2016-04-12 01:01:24 -07:00
#include "IOStreams.hpp"
2016-04-17 18:58:13 -07:00
#include "World/ScriptObjectSupport.hpp"
2016-04-12 01:01:24 -07:00
#include "RetroTypes.hpp"
2016-03-04 15:04:53 -08:00
namespace urde
{
2016-04-12 01:01:24 -07:00
class CStateManager;
struct CMailMessage
{
TEditorId x0_id;
EScriptObjectMessage x4_msg;
bool x8_;
CMailMessage(TEditorId id, EScriptObjectMessage msg, bool flag) : x0_id(id), x4_msg(msg), x8_(flag) {}
CMailMessage(const CMailMessage& other) : x0_id(other.x0_id), x4_msg(other.x4_msg), x8_(other.x8_) {}
bool operator==(const CMailMessage& other) const
{ return (x0_id == other.x0_id && x4_msg == other.x4_msg); }
};
2015-08-16 22:26:58 -07:00
class CScriptMailbox
{
2016-04-12 01:01:24 -07:00
rstl::reserved_vector<CMailMessage, 1024> x0_messages;
public:
CScriptMailbox() = default;
CScriptMailbox(CBitStreamReader&);
void AddMsg(TEditorId, EScriptObjectMessage, bool);
void RemoveMsg(TEditorId, EScriptObjectMessage, bool);
2016-04-12 03:52:40 -07:00
void SendMsgs(const TAreaId&, CStateManager&);
2016-04-12 01:01:24 -07:00
void PutTo(CBitStreamWriter&);
2015-08-16 22:26:58 -07:00
};
}
2016-04-12 23:07:23 -07:00
#endif // __URDE_CSCRIPTMAILBOX_HPP__