wavelength 1.0.0
Loading...
Searching...
No Matches
OvyChat Class Reference

Chat of an online game on the head-up display, with the line a player types. More...

#include <ovychat.h>

Inheritance diagram for OvyChat:
Collaboration diagram for OvyChat:

Classes

class  Line
 One line of the chat, which slides between the rows of the panel. More...
struct  PendingMsg
 A line that arrived and waits for the top of the panel. More...

Public Member Functions

 OvyChat (DataArray *pConfig, DataArray *pDefaults, RndView *pHudView)
 Construct an empty chat, and register it for the keyboard and for channel 3 of the chat.
 ~OvyChat () override
 Unregister the chat and destroy its lines.
void Reset ()
 Empty the lines, hide the panel, and stop the editing.
void Poll ()
 Advance the panel and the lines, and show the next waiting line.
bool AddLine (ChatMsg *pMsg)
 Queue a line that arrived from another console.
bool HandleKey (KeyboardKeyMsg *pMsg)
 Apply a key to the line the player types, starting or ending the editing.
void Layout (bool bEditing)
 Move every line one row up, the top line wrapping round to the bottom.
void Collapse ()
 Drop the line the player typed in, moving every other line one row down.
bool DispatchPriv (Message *pMsg) override
 Act on a line of chat or a key.
const std::list< std::unique_ptr< Line > > & GetLines () const
RndDrawable * GetDrawable () const
Public Member Functions inherited from MsgSink
void * operator new (size_t nSize)
 Allocate a sink from the pool heaps under the tag "MsgSink".
void operator delete (void *pBlock)
 Return a sink to the pool heaps.
virtual ~MsgSink ()
virtual bool Dispatch (Message *pMsg)
 Accept a message.
void * operator new (size_t size)
 Allocate from the main heap under the name MsgSink.
void operator delete (void *mem)
 Return memory to its heap.
virtual ~MsgSink ()
 Destroy the sink.
virtual bool Dispatch (Message *msg)
 Handle a message.

Detailed Description

Chat of an online game on the head-up display, with the line a player types.

The RTTI records the class as deriving from MsgSink. The object is 0x80 bytes. The panel slides in when a line arrives or a key is pressed, and slides out once no line has moved for chat_timeout milliseconds. The front of mLines is the bottom line, which the player types in.

Constructor & Destructor Documentation

◆ OvyChat()

OvyChat::OvyChat ( DataArray * pConfig,
DataArray * pDefaults,
RndView * pHudView )

Construct an empty chat, and register it for the keyboard and for channel 3 of the chat.

The lines are HUDnr_chat_<nn>.txt from 01 for as long as they exist, and the rows are the resting positions of the lines plus one row past the last.

Parameters
pConfigThe configuration section of the game mode.
pDefaultsThe section of defaults.
pHudViewThe view of the head-up display, which animates HUD cursor.mnm.
Ghidra address:
NTSC-U/C: 0x001c0ac8
Ghidra address:
PAL: 0x001c9868

◆ ~OvyChat()

OvyChat::~OvyChat ( )
override

Unregister the chat and destroy its lines.

Ghidra address:
NTSC-U/C: 0x001c1200
Ghidra address:
PAL: 0x001c9fa0

Member Function Documentation

◆ Reset()

void OvyChat::Reset ( )

Empty the lines, hide the panel, and stop the editing.

Ghidra address:
NTSC-U/C: 0x001c1358
Ghidra address:
PAL: 0x001ca0f8

◆ Poll()

void OvyChat::Poll ( )

Advance the panel and the lines, and show the next waiting line.

Ghidra address:
NTSC-U/C: 0x001c14f0
Ghidra address:
PAL: 0x001ca290

◆ AddLine()

bool OvyChat::AddLine ( ChatMsg * pMsg)

Queue a line that arrived from another console.

Parameters
pMsgThe line.
Returns
Whether the line was queued.
Ghidra address:
NTSC-U/C: 0x001c1770
Ghidra address:
PAL: 0x001ca510

◆ HandleKey()

bool OvyChat::HandleKey ( KeyboardKeyMsg * pMsg)

Apply a key to the line the player types, starting or ending the editing.

Parameters
pMsgThe key.
Returns
Always false.
Ghidra address:
NTSC-U/C: 0x001c18f0
Ghidra address:
PAL: 0x001ca690

◆ Layout()

void OvyChat::Layout ( bool bEditing)

Move every line one row up, the top line wrapping round to the bottom.

Parameters
bEditingWhether the bottom line is being typed in, which keeps it at the bottom.
Ghidra address:
NTSC-U/C: 0x001c1c08
Ghidra address:
PAL: 0x001ca9a8

◆ Collapse()

void OvyChat::Collapse ( )

Drop the line the player typed in, moving every other line one row down.

Ghidra address:
NTSC-U/C: 0x001c1d90
Ghidra address:
PAL: 0x001cab30

◆ DispatchPriv()

bool OvyChat::DispatchPriv ( Message * pMsg)
overridevirtual

Act on a line of chat or a key.

Parameters
pMsgThe message.
Returns
Whether the message was handled.
Ghidra address:
NTSC-U/C: 0x001c2208
Ghidra address:
PAL: 0x001cafa8

Implements MsgSink.

◆ GetLines()

const std::list< std::unique_ptr< Line > > & OvyChat::GetLines ( ) const
inline
Returns
The lines, from the bottom row up.

◆ GetDrawable()

RndDrawable * OvyChat::GetDrawable ( ) const
inline
Returns
HUDnr_chat_mask.mesh, the drawing of the chat.

The documentation for this class was generated from the following file: