Message with one line of chat between the consoles of an online session or lobby.
More...
#include <chatmsg.h>
|
| | ChatMsg (int nAccountId, int nPlayer, const char *pszText, const char *pszSender) |
| | Construct a line.
|
| void * | operator new (size_t nSize) |
| | Allocate a message, billed to the class name.
|
| void | operator delete (void *pBlock) |
| | Release a message.
|
| Message * | Clone () override |
| | Produce a heap copy of this message.
|
| int | Type () override |
| | Report this message's registered identity.
|
| const char * | GetName () const override |
| | Report this message's class name.
|
| void | PrintExtra (PrnStream &stream) const override |
| | Write the channel and the text.
|
| int | GetAccountId () const |
| int | GetPlayer () const |
| const char * | GetSender () const |
| const char * | GetText () const |
| virtual | ~Message () |
| | Vtable slot 1.
|
| virtual void | saveGuts (BinStream &stream) const |
| | Write this message's payload to a stream.
|
| virtual void | restoreGuts (BinStream &stream) |
| | Read this message's payload from a stream.
|
| virtual | ~Message () |
| virtual void | Unused1 () |
| | Not called by the control.
|
|
| static void | AddHandler (int nChannel, MsgSink *pHandler) |
| | Register the sink that receives the chat of a channel.
|
| static void | RemoveSink (int nChannel) |
| | Forget the sink of a channel.
|
| static bool | Send (int nChannel, int nRecipient, const char *pszText, int nEcho) |
| | Send a line of chat.
|
| static void | SendPrivate (int nChannel, int nAccountId, const char *pszText) |
| | Send a line of chat to one account only.
|
| static void | ClearPartialMessages () |
| | Discard the lines whose remaining parts have not arrived.
|
| static void | OnLobbyChat (int nConnection, int nType, int nSize, const rtMediusChatMessage *pMessage) |
| | Deliver a line of chat from the lobby server to the sink of its channel.
|
| static Message * | NewMessage (int nType) |
| | Produce a message of the identified class through the factory list.
|
Message with one line of chat between the consoles of an online session or lobby.
The RTTI records the class as deriving from Message, and its vtable is at 0x003d58c8. The class also keeps the sink of each channel, and joins the lines that arrive from the lobby server in parts.
◆ ChatMsg()
| ChatMsg::ChatMsg |
( |
int | nAccountId, |
|
|
int | nPlayer, |
|
|
const char * | pszText, |
|
|
const char * | pszSender ) |
|
inline |
Construct a line.
Inline.
- Parameters
-
| nAccountId | The sender's account identifier. |
| nPlayer | The sender's identifier in the session, or -2 for none. |
| pszText | The text. |
| pszSender | The sender's name. |
◆ operator new()
| void * ChatMsg::operator new |
( |
size_t | nSize | ) |
|
|
inline |
Allocate a message, billed to the class name.
- Parameters
-
| nSize | The object size the compiler supplies. |
- Returns
- The block.
◆ operator delete()
| void ChatMsg::operator delete |
( |
void * | pBlock | ) |
|
|
inline |
Release a message.
- Parameters
-
◆ Clone()
Produce a heap copy of this message.
- Returns
- The copy.
Implements Message.
◆ Type()
Report this message's registered identity.
- Returns
- g_nChatMsgType.
Implements Message.
◆ GetName()
| const char * ChatMsg::GetName |
( |
| ) |
const |
|
inlineoverridevirtual |
Report this message's class name.
- Returns
- The literal ChatMsg.
Implements Message.
◆ AddHandler()
| void ChatMsg::AddHandler |
( |
int | nChannel, |
|
|
MsgSink * | pHandler ) |
|
static |
Register the sink that receives the chat of a channel.
The type information of the registry identifies the pointer type as ChatHandler. A panel passes itself, and the sink receives each line through Dispatch().
- Parameters
-
| nChannel | The channel. |
| pHandler | The sink. |
- Ghidra address:
- NTSC-U/C: 0x00252220
- Ghidra address:
- PAL: 0x0025abc8
◆ RemoveSink()
| void ChatMsg::RemoveSink |
( |
int | nChannel | ) |
|
|
static |
Forget the sink of a channel.
The name is inferred.
- Parameters
-
- Ghidra address:
- NTSC-U/C: 0x00252408
- Ghidra address:
- PAL: 0x0025adb0
◆ Send()
| bool ChatMsg::Send |
( |
int | nChannel, |
|
|
int | nRecipient, |
|
|
const char * | pszText, |
|
|
int | nEcho ) |
|
static |
Send a line of chat.
The names of the parameters are inferred.
- Parameters
-
| nChannel | The channel, 2 for the notices of the session. |
| nRecipient | The recipient, 0 for every console. |
| pszText | The text. |
| nEcho | Non-zero to show the line on this console too. |
- Returns
- Whether the line was sent.
- Ghidra address:
- NTSC-U/C: 0x00252658
- Ghidra address:
- PAL: 0x0025b000
◆ SendPrivate()
| void ChatMsg::SendPrivate |
( |
int | nChannel, |
|
|
int | nAccountId, |
|
|
const char * | pszText ) |
|
static |
Send a line of chat to one account only.
The online session exchanges its key through the line. The name is inferred.
- Parameters
-
| nChannel | The channel. |
| nAccountId | The account that receives the line. |
| pszText | The text. |
- Ghidra address:
- NTSC-U/C: 0x00252580
- Ghidra address:
- PAL: 0x0025af28
◆ ClearPartialMessages()
| void ChatMsg::ClearPartialMessages |
( |
| ) |
|
|
static |
Discard the lines whose remaining parts have not arrived.
The name is inferred.
- Ghidra address:
- NTSC-U/C: 0x00252d58
- Ghidra address:
- PAL: 0x0025b700
◆ OnLobbyChat()
| void ChatMsg::OnLobbyChat |
( |
int | nConnection, |
|
|
int | nType, |
|
|
int | nSize, |
|
|
const rtMediusChatMessage * | pMessage ) |
|
static |
Deliver a line of chat from the lobby server to the sink of its channel.
The lobby client calls the member. The name is inferred.
- Parameters
-
| nConnection | The connection. |
| nType | The kind of response. |
| nSize | The size of the line. |
| pMessage | The line. |
- Ghidra address:
- NTSC-U/C: 0x00252dd0
- Ghidra address:
- PAL: 0x0025b778
◆ PrintExtra()
| void ChatMsg::PrintExtra |
( |
PrnStream & | stream | ) |
const |
|
overridevirtual |
Write the channel and the text.
- Parameters
-
| stream | The stream to write to. |
- Ghidra address:
- NTSC-U/C: 0x002691b8
- Ghidra address:
- PAL: 0x00272dc0
Reimplemented from Message.
◆ GetAccountId()
| int ChatMsg::GetAccountId |
( |
| ) |
const |
|
inline |
- Returns
- The sender's account identifier.
◆ GetPlayer()
| int ChatMsg::GetPlayer |
( |
| ) |
const |
|
inline |
- Returns
- The sender's identifier in the session, or -2 for none.
◆ GetSender()
| const char * ChatMsg::GetSender |
( |
| ) |
const |
|
inline |
- Returns
- The sender's name.
◆ GetText()
| const char * ChatMsg::GetText |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following file: