Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
GameMessage Class Reference

#include <MessageStream.h>

Inherits MemoryPoolObject.

Public Types

enum  Type {
  MSG_INVALID , MSG_FRAME_TICK , MSG_RAW_MOUSE_BEGIN , MSG_RAW_MOUSE_POSITION ,
  MSG_RAW_MOUSE_LEFT_BUTTON_DOWN , MSG_RAW_MOUSE_LEFT_DOUBLE_CLICK , MSG_RAW_MOUSE_LEFT_BUTTON_UP , MSG_RAW_MOUSE_LEFT_CLICK ,
  MSG_RAW_MOUSE_LEFT_DRAG , MSG_RAW_MOUSE_MIDDLE_BUTTON_DOWN , MSG_RAW_MOUSE_MIDDLE_DOUBLE_CLICK , MSG_RAW_MOUSE_MIDDLE_BUTTON_UP ,
  MSG_RAW_MOUSE_MIDDLE_DRAG , MSG_RAW_MOUSE_RIGHT_BUTTON_DOWN , MSG_RAW_MOUSE_RIGHT_DOUBLE_CLICK , MSG_RAW_MOUSE_RIGHT_BUTTON_UP ,
  MSG_RAW_MOUSE_RIGHT_DRAG , MSG_RAW_MOUSE_WHEEL , MSG_RAW_MOUSE_END , MSG_RAW_KEY_DOWN ,
  MSG_RAW_KEY_UP , MSG_MOUSE_LEFT_CLICK , MSG_MOUSE_LEFT_DOUBLE_CLICK , MSG_MOUSE_MIDDLE_CLICK ,
  MSG_MOUSE_MIDDLE_DOUBLE_CLICK , MSG_MOUSE_RIGHT_CLICK , MSG_MOUSE_RIGHT_DOUBLE_CLICK , MSG_CLEAR_GAME_DATA ,
  MSG_NEW_GAME , MSG_BEGIN_META_MESSAGES , MSG_META_SAVE_VIEW1 , MSG_META_SAVE_VIEW2 ,
  MSG_META_SAVE_VIEW3 , MSG_META_SAVE_VIEW4 , MSG_META_SAVE_VIEW5 , MSG_META_SAVE_VIEW6 ,
  MSG_META_SAVE_VIEW7 , MSG_META_SAVE_VIEW8 , MSG_META_VIEW_VIEW1 , MSG_META_VIEW_VIEW2 ,
  MSG_META_VIEW_VIEW3 , MSG_META_VIEW_VIEW4 , MSG_META_VIEW_VIEW5 , MSG_META_VIEW_VIEW6 ,
  MSG_META_VIEW_VIEW7 , MSG_META_VIEW_VIEW8 , MSG_META_CREATE_TEAM0 , MSG_META_CREATE_TEAM1 ,
  MSG_META_CREATE_TEAM2 , MSG_META_CREATE_TEAM3 , MSG_META_CREATE_TEAM4 , MSG_META_CREATE_TEAM5 ,
  MSG_META_CREATE_TEAM6 , MSG_META_CREATE_TEAM7 , MSG_META_CREATE_TEAM8 , MSG_META_CREATE_TEAM9 ,
  MSG_META_SELECT_TEAM0 , MSG_META_SELECT_TEAM1 , MSG_META_SELECT_TEAM2 , MSG_META_SELECT_TEAM3 ,
  MSG_META_SELECT_TEAM4 , MSG_META_SELECT_TEAM5 , MSG_META_SELECT_TEAM6 , MSG_META_SELECT_TEAM7 ,
  MSG_META_SELECT_TEAM8 , MSG_META_SELECT_TEAM9 , MSG_META_ADD_TEAM0 , MSG_META_ADD_TEAM1 ,
  MSG_META_ADD_TEAM2 , MSG_META_ADD_TEAM3 , MSG_META_ADD_TEAM4 , MSG_META_ADD_TEAM5 ,
  MSG_META_ADD_TEAM6 , MSG_META_ADD_TEAM7 , MSG_META_ADD_TEAM8 , MSG_META_ADD_TEAM9 ,
  MSG_META_VIEW_TEAM0 , MSG_META_VIEW_TEAM1 , MSG_META_VIEW_TEAM2 , MSG_META_VIEW_TEAM3 ,
  MSG_META_VIEW_TEAM4 , MSG_META_VIEW_TEAM5 , MSG_META_VIEW_TEAM6 , MSG_META_VIEW_TEAM7 ,
  MSG_META_VIEW_TEAM8 , MSG_META_VIEW_TEAM9 , MSG_META_SELECT_MATCHING_UNITS , MSG_META_SELECT_NEXT_UNIT ,
  MSG_META_SELECT_PREV_UNIT , MSG_META_SELECT_NEXT_WORKER , MSG_META_SELECT_PREV_WORKER , MSG_META_VIEW_COMMAND_CENTER ,
  MSG_META_VIEW_LAST_RADAR_EVENT , MSG_META_SELECT_HERO , MSG_META_SELECT_ALL , MSG_META_SELECT_ALL_AIRCRAFT ,
  MSG_META_SCATTER , MSG_META_STOP , MSG_META_DEPLOY , MSG_META_CREATE_FORMATION ,
  MSG_META_FOLLOW , MSG_META_CHAT_PLAYERS , MSG_META_CHAT_ALLIES , MSG_META_CHAT_EVERYONE ,
  MSG_META_DIPLOMACY , MSG_META_OPTIONS , MSG_META_TOGGLE_LOWER_DETAILS , MSG_META_TOGGLE_CONTROL_BAR ,
  MSG_META_BEGIN_PATH_BUILD , MSG_META_END_PATH_BUILD , MSG_META_BEGIN_FORCEATTACK , MSG_META_END_FORCEATTACK ,
  MSG_META_BEGIN_FORCEMOVE , MSG_META_END_FORCEMOVE , MSG_META_BEGIN_WAYPOINTS , MSG_META_END_WAYPOINTS ,
  MSG_META_BEGIN_PREFER_SELECTION , MSG_META_END_PREFER_SELECTION , MSG_META_TAKE_SCREENSHOT , MSG_META_ALL_CHEER ,
  MSG_META_TOGGLE_ATTACKMOVE , MSG_META_BEGIN_CAMERA_ROTATE_LEFT , MSG_META_END_CAMERA_ROTATE_LEFT , MSG_META_BEGIN_CAMERA_ROTATE_RIGHT ,
  MSG_META_END_CAMERA_ROTATE_RIGHT , MSG_META_BEGIN_CAMERA_ZOOM_IN , MSG_META_END_CAMERA_ZOOM_IN , MSG_META_BEGIN_CAMERA_ZOOM_OUT ,
  MSG_META_END_CAMERA_ZOOM_OUT , MSG_META_CAMERA_RESET , MSG_META_TOGGLE_CAMERA_TRACKING_DRAWABLE , MSG_META_TOGGLE_FAST_FORWARD_REPLAY ,
  MSG_META_DEMO_INSTANT_QUIT , MSG_META_PLACE_BEACON , MSG_META_REMOVE_BEACON , MSG_END_META_MESSAGES ,
  MSG_MOUSEOVER_DRAWABLE_HINT , MSG_MOUSEOVER_LOCATION_HINT , MSG_VALID_GUICOMMAND_HINT , MSG_INVALID_GUICOMMAND_HINT ,
  MSG_AREA_SELECTION_HINT , MSG_DO_ATTACK_OBJECT_HINT , MSG_IMPOSSIBLE_ATTACK_HINT , MSG_DO_FORCE_ATTACK_OBJECT_HINT ,
  MSG_DO_FORCE_ATTACK_GROUND_HINT , MSG_GET_REPAIRED_HINT , MSG_GET_HEALED_HINT , MSG_DO_REPAIR_HINT ,
  MSG_RESUME_CONSTRUCTION_HINT , MSG_ENTER_HINT , MSG_DOCK_HINT , MSG_DO_MOVETO_HINT ,
  MSG_DO_ATTACKMOVETO_HINT , MSG_ADD_WAYPOINT_HINT , MSG_HIJACK_HINT , MSG_SABOTAGE_HINT ,
  MSG_FIREBOMB_HINT , MSG_CONVERT_TO_CARBOMB_HINT , MSG_CAPTUREBUILDING_HINT , MSG_SNIPE_VEHICLE_HINT ,
  MSG_DEFECTOR_HINT , MSG_SET_RALLY_POINT_HINT , MSG_DO_SPECIAL_POWER_OVERRIDE_DESTINATION_HINT , MSG_DO_SALVAGE_HINT ,
  MSG_DO_INVALID_HINT , MSG_DO_ATTACK_OBJECT_AFTER_MOVING_HINT , MSG_HACK_HINT , MSG_BEGIN_NETWORK_MESSAGES = 1000 ,
  MSG_CREATE_SELECTED_GROUP , MSG_CREATE_SELECTED_GROUP_NO_SOUND , MSG_DESTROY_SELECTED_GROUP , MSG_REMOVE_FROM_SELECTED_GROUP ,
  MSG_SELECTED_GROUP_COMMAND , MSG_CREATE_TEAM0 , MSG_CREATE_TEAM1 , MSG_CREATE_TEAM2 ,
  MSG_CREATE_TEAM3 , MSG_CREATE_TEAM4 , MSG_CREATE_TEAM5 , MSG_CREATE_TEAM6 ,
  MSG_CREATE_TEAM7 , MSG_CREATE_TEAM8 , MSG_CREATE_TEAM9 , MSG_SELECT_TEAM0 ,
  MSG_SELECT_TEAM1 , MSG_SELECT_TEAM2 , MSG_SELECT_TEAM3 , MSG_SELECT_TEAM4 ,
  MSG_SELECT_TEAM5 , MSG_SELECT_TEAM6 , MSG_SELECT_TEAM7 , MSG_SELECT_TEAM8 ,
  MSG_SELECT_TEAM9 , MSG_ADD_TEAM0 , MSG_ADD_TEAM1 , MSG_ADD_TEAM2 ,
  MSG_ADD_TEAM3 , MSG_ADD_TEAM4 , MSG_ADD_TEAM5 , MSG_ADD_TEAM6 ,
  MSG_ADD_TEAM7 , MSG_ADD_TEAM8 , MSG_ADD_TEAM9 , MSG_DO_ATTACKSQUAD ,
  MSG_DO_WEAPON , MSG_DO_WEAPON_AT_LOCATION , MSG_DO_WEAPON_AT_OBJECT , MSG_DO_SPECIAL_POWER ,
  MSG_DO_SPECIAL_POWER_AT_LOCATION , MSG_DO_SPECIAL_POWER_AT_OBJECT , MSG_SET_RALLY_POINT , MSG_PURCHASE_SCIENCE ,
  MSG_QUEUE_UPGRADE , MSG_CANCEL_UPGRADE , MSG_QUEUE_UNIT_CREATE , MSG_CANCEL_UNIT_CREATE ,
  MSG_DOZER_CONSTRUCT , MSG_DOZER_CONSTRUCT_LINE , MSG_DOZER_CANCEL_CONSTRUCT , MSG_SELL ,
  MSG_EXIT , MSG_EVACUATE , MSG_EXECUTE_RAILED_TRANSPORT , MSG_COMBATDROP_AT_LOCATION ,
  MSG_COMBATDROP_AT_OBJECT , MSG_AREA_SELECTION , MSG_DO_ATTACK_OBJECT , MSG_DO_FORCE_ATTACK_OBJECT ,
  MSG_DO_FORCE_ATTACK_GROUND , MSG_GET_REPAIRED , MSG_GET_HEALED , MSG_DO_REPAIR ,
  MSG_RESUME_CONSTRUCTION , MSG_ENTER , MSG_DOCK , MSG_DO_MOVETO ,
  MSG_DO_ATTACKMOVETO , MSG_DO_FORCEMOVETO , MSG_ADD_WAYPOINT , MSG_DO_GUARD_POSITION ,
  MSG_DO_GUARD_OBJECT , MSG_DO_STOP , MSG_DO_SCATTER , MSG_INTERNET_HACK ,
  MSG_DO_CHEER , MSG_TOGGLE_OVERCHARGE , MSG_SWITCH_WEAPONS , MSG_CONVERT_TO_CARBOMB ,
  MSG_CAPTUREBUILDING , MSG_DISABLEVEHICLE_HACK , MSG_STEALCASH_HACK , MSG_DISABLEBUILDING_HACK ,
  MSG_SNIPE_VEHICLE , MSG_DO_SPECIAL_POWER_OVERRIDE_DESTINATION , MSG_DO_SALVAGE , MSG_CLEAR_INGAME_POPUP_MESSAGE ,
  MSG_PLACE_BEACON , MSG_REMOVE_BEACON , MSG_SET_BEACON_TEXT , MSG_SET_REPLAY_CAMERA ,
  MSG_SELF_DESTRUCT , MSG_CREATE_FORMATION , MSG_LOGIC_CRC , MSG_SET_MINE_CLEARING_DETAIL ,
  MSG_ENABLE_RETALIATION_MODE , MSG_BEGIN_DEBUG_NETWORK_MESSAGES = 1900 , MSG_END_NETWORK_MESSAGES = 1999 , MSG_TIMESTAMP ,
  MSG_OBJECT_CREATED , MSG_OBJECT_DESTROYED , MSG_OBJECT_POSITION , MSG_OBJECT_ORIENTATION ,
  MSG_OBJECT_JOINED_TEAM , MSG_COUNT
}
 

Public Member Functions

 GameMessage (Type type)
 
GameMessagenext (void)
 Return next message in the stream.
 
GameMessageprev (void)
 Return prev message in the stream.
 
Type getType (void) const
 Return the message type.
 
UnsignedByte getArgumentCount (void) const
 Return the number of arguments for this msg.
 
AsciiString getCommandAsAsciiString (void)
 returns a string representation of the command type.
 
Int getPlayerIndex (void) const
 Return the originating player.
 
void appendIntegerArgument (Int arg)
 
void appendRealArgument (Real arg)
 
void appendBooleanArgument (Bool arg)
 
void appendDrawableIDArgument (DrawableID arg)
 
void appendObjectIDArgument (ObjectID arg)
 
void appendTeamIDArgument (UnsignedInt arg)
 
void appendLocationArgument (const Coord3D &arg)
 
void appendPixelArgument (const ICoord2D &arg)
 
void appendPixelRegionArgument (const IRegion2D &arg)
 
void appendWideCharArgument (const WideChar &arg)
 
void appendTimestampArgument (UnsignedInt arg)
 
const GameMessageArgumentTypegetArgument (Int argIndex) const
 
GameMessageArgumentDataType getArgumentDataType (Int argIndex)
 
void friend_setNext (GameMessage *m)
 
void friend_setPrev (GameMessage *m)
 
void friend_setList (GameMessageList *m)
 
void friend_setPlayerIndex (Int i)
 
- Public Member Functions inherited from MemoryPoolObject
void deleteInstance ()
 

Static Public Member Functions

static AsciiString getCommandTypeAsAsciiString (GameMessage::Type t)
 

Additional Inherited Members

- Protected Member Functions inherited from MemoryPoolObject
virtual ~MemoryPoolObject ()
 
void * operator new (size_t s)
 
void operator delete (void *p)
 
virtual MemoryPoolgetObjectMemoryPool ()=0
 

Detailed Description

A game message that either lives on TheMessageStream or TheCommandList. Messages consist of a type, defining what the message is, and zero or more arguments of various data types. The user of a message must know how many and what type of arguments are valid for a given message type.

Definition at line 100 of file MessageStream.h.

Member Enumeration Documentation

◆ Type

The various messages which can be sent in a MessageStream

Todo
Replace this hardcoded enum with a generalized system that can be easily changed and updated
Todo
Because the Client will run faster than Logic, we'll need "superceding" messages for events such as mouse movements so we only send the latest one over the net
Todo
Create two classes of message: raw input messages, and command messages. Raw input messages will be destroyed when they reach the end of the stream, whereas command messages will be transferred to TheCommandList
Enumerator
MSG_INVALID 

(none) this msg should never actually occur

MSG_FRAME_TICK 

(timestamp) once each frame this message is sent thru the stream

MSG_RAW_MOUSE_BEGIN 
MSG_RAW_MOUSE_POSITION 

(pixel) the cursor's position

MSG_RAW_MOUSE_LEFT_BUTTON_DOWN 

(pixel, modifiers, time)

MSG_RAW_MOUSE_LEFT_DOUBLE_CLICK 

(pixel, modifiers, time)

MSG_RAW_MOUSE_LEFT_BUTTON_UP 

(pixel, modifiers, time)

MSG_RAW_MOUSE_LEFT_CLICK 

(pixel, modifiers, time)

MSG_RAW_MOUSE_LEFT_DRAG 

drag of the mouse with a button held down

MSG_RAW_MOUSE_MIDDLE_BUTTON_DOWN 

(pixel, modifiers, time)

MSG_RAW_MOUSE_MIDDLE_DOUBLE_CLICK 

(pixel, modifiers, time)

MSG_RAW_MOUSE_MIDDLE_BUTTON_UP 

(pixel, modifiers, time)

MSG_RAW_MOUSE_MIDDLE_DRAG 

drag of the mouse with a button held down

MSG_RAW_MOUSE_RIGHT_BUTTON_DOWN 

(pixel, modifiers, time)

MSG_RAW_MOUSE_RIGHT_DOUBLE_CLICK 

(pixel, modifiers, time)

MSG_RAW_MOUSE_RIGHT_BUTTON_UP 

(pixel, modifiers, time)

MSG_RAW_MOUSE_RIGHT_DRAG 

drag of the mouse with a button held down

MSG_RAW_MOUSE_WHEEL 

(Int spin, + is away, - is toward user)

MSG_RAW_MOUSE_END 
MSG_RAW_KEY_DOWN 

(KeyDefType) the given key was pressed (uses Microsoft VK_ codes)

MSG_RAW_KEY_UP 

(KeyDefType) the given key was released

MSG_MOUSE_LEFT_CLICK 

(pixelRegion, 0 sized means its a point), (Int, modifier keys)

MSG_MOUSE_LEFT_DOUBLE_CLICK 

(pixelRegion, 0 sized means its a point), (Int, modifier keys)

MSG_MOUSE_MIDDLE_CLICK 

(pixelRegion, 0 sized means its a point), (Int, modifier keys)

MSG_MOUSE_MIDDLE_DOUBLE_CLICK 

(pixelRegion, 0 sized means its a point), (Int, modifier keys)

MSG_MOUSE_RIGHT_CLICK 

(pixelRegion, 0 sized means its a point), (Int, modifier keys)

MSG_MOUSE_RIGHT_DOUBLE_CLICK 

(pixelRegion, 0 sized means its a point), (Int, modifier keys)

MSG_CLEAR_GAME_DATA 

Clear all game data in memory.

MSG_NEW_GAME 

Start a new game.

MSG_BEGIN_META_MESSAGES 

Marker to delineate "meta" messages.

MSG_META_SAVE_VIEW1 

save current view as the given user-defined view

MSG_META_SAVE_VIEW2 

save current view as the given user-defined view

MSG_META_SAVE_VIEW3 

save current view as the given user-defined view

MSG_META_SAVE_VIEW4 

save current view as the given user-defined view

MSG_META_SAVE_VIEW5 

save current view as the given user-defined view

MSG_META_SAVE_VIEW6 

save current view as the given user-defined view

MSG_META_SAVE_VIEW7 

save current view as the given user-defined view

MSG_META_SAVE_VIEW8 

save current view as the given user-defined view

MSG_META_VIEW_VIEW1 

center view on the given user-defined view

MSG_META_VIEW_VIEW2 

center view on the given user-defined view

MSG_META_VIEW_VIEW3 

center view on the given user-defined view

MSG_META_VIEW_VIEW4 

center view on the given user-defined view

MSG_META_VIEW_VIEW5 

center view on the given user-defined view

MSG_META_VIEW_VIEW6 

center view on the given user-defined view

MSG_META_VIEW_VIEW7 

center view on the given user-defined view

MSG_META_VIEW_VIEW8 

center view on the given user-defined view

MSG_META_CREATE_TEAM0 

create user-defined team from the selected objects

MSG_META_CREATE_TEAM1 

create user-defined team from the selected objects

MSG_META_CREATE_TEAM2 

create user-defined team from the selected objects

MSG_META_CREATE_TEAM3 

create user-defined team from the selected objects

MSG_META_CREATE_TEAM4 

create user-defined team from the selected objects

MSG_META_CREATE_TEAM5 

create user-defined team from the selected objects

MSG_META_CREATE_TEAM6 

create user-defined team from the selected objects

MSG_META_CREATE_TEAM7 

create user-defined team from the selected objects

MSG_META_CREATE_TEAM8 

create user-defined team from the selected objects

MSG_META_CREATE_TEAM9 

create user-defined team from the selected objects

MSG_META_SELECT_TEAM0 

deselect all, then select all units in the given user-defined team

MSG_META_SELECT_TEAM1 

deselect all, then select all units in the given user-defined team

MSG_META_SELECT_TEAM2 

deselect all, then select all units in the given user-defined team

MSG_META_SELECT_TEAM3 

deselect all, then select all units in the given user-defined team

MSG_META_SELECT_TEAM4 

deselect all, then select all units in the given user-defined team

MSG_META_SELECT_TEAM5 

deselect all, then select all units in the given user-defined team

MSG_META_SELECT_TEAM6 

deselect all, then select all units in the given user-defined team

MSG_META_SELECT_TEAM7 

deselect all, then select all units in the given user-defined team

MSG_META_SELECT_TEAM8 

deselect all, then select all units in the given user-defined team

MSG_META_SELECT_TEAM9 

deselect all, then select all units in the given user-defined team

MSG_META_ADD_TEAM0 

add the user-defined team to the current selection

MSG_META_ADD_TEAM1 

add the user-defined team to the current selection

MSG_META_ADD_TEAM2 

add the user-defined team to the current selection

MSG_META_ADD_TEAM3 

add the user-defined team to the current selection

MSG_META_ADD_TEAM4 

add the user-defined team to the current selection

MSG_META_ADD_TEAM5 

add the user-defined team to the current selection

MSG_META_ADD_TEAM6 

add the user-defined team to the current selection

MSG_META_ADD_TEAM7 

add the user-defined team to the current selection

MSG_META_ADD_TEAM8 

add the user-defined team to the current selection

MSG_META_ADD_TEAM9 

add the user-defined team to the current selection

MSG_META_VIEW_TEAM0 

center view on given user-defined team (but do not affect selection)

MSG_META_VIEW_TEAM1 

center view on given user-defined team (but do not affect selection)

MSG_META_VIEW_TEAM2 

center view on given user-defined team (but do not affect selection)

MSG_META_VIEW_TEAM3 

center view on given user-defined team (but do not affect selection)

MSG_META_VIEW_TEAM4 

center view on given user-defined team (but do not affect selection)

MSG_META_VIEW_TEAM5 

center view on given user-defined team (but do not affect selection)

MSG_META_VIEW_TEAM6 

center view on given user-defined team (but do not affect selection)

MSG_META_VIEW_TEAM7 

center view on given user-defined team (but do not affect selection)

MSG_META_VIEW_TEAM8 

center view on given user-defined team (but do not affect selection)

MSG_META_VIEW_TEAM9 

center view on given user-defined team (but do not affect selection)

MSG_META_SELECT_MATCHING_UNITS 

selects mathcing units, used for both on screen and across map

MSG_META_SELECT_NEXT_UNIT 

select 'next' unit

MSG_META_SELECT_PREV_UNIT 

select 'prev' unit

MSG_META_SELECT_NEXT_WORKER 

select 'next' worker

MSG_META_SELECT_PREV_WORKER 

select 'prev' worker

MSG_META_VIEW_COMMAND_CENTER 

center view on command center

MSG_META_VIEW_LAST_RADAR_EVENT 

center view on last radar event

MSG_META_SELECT_HERO 

selects player's hero character, if exists...

MSG_META_SELECT_ALL 

selects all units across screen

MSG_META_SELECT_ALL_AIRCRAFT 

selects all air units just like select all

MSG_META_SCATTER 

selected units scatter

MSG_META_STOP 

selected units stop

MSG_META_DEPLOY 

selected units 'deploy'

MSG_META_CREATE_FORMATION 

selected units become a formation

MSG_META_FOLLOW 

selected units 'follow'

MSG_META_CHAT_PLAYERS 

send chat msg to all players

MSG_META_CHAT_ALLIES 

send chat msg to allied players

MSG_META_CHAT_EVERYONE 

send chat msg to everyone (incl. observers)

MSG_META_DIPLOMACY 

bring up diplomacy screen

MSG_META_OPTIONS 

bring up options screen

MSG_META_TOGGLE_LOWER_DETAILS 

toggles graphics options to crappy mode instantly

MSG_META_TOGGLE_CONTROL_BAR 

show/hide controlbar

MSG_META_BEGIN_PATH_BUILD 

enter path-building mode

MSG_META_END_PATH_BUILD 

exit path-building mode

MSG_META_BEGIN_FORCEATTACK 

enter force-attack mode

MSG_META_END_FORCEATTACK 

exit force-attack mode

MSG_META_BEGIN_FORCEMOVE 

enter force-move mode

MSG_META_END_FORCEMOVE 

exit force-move mode

MSG_META_BEGIN_WAYPOINTS 

enter waypoint mode

MSG_META_END_WAYPOINTS 

exit waypoint mode

MSG_META_BEGIN_PREFER_SELECTION 

The Shift key has been depressed alone.

MSG_META_END_PREFER_SELECTION 

The Shift key has been released.

MSG_META_TAKE_SCREENSHOT 

take screenshot

MSG_META_ALL_CHEER 

Yay! :)

MSG_META_TOGGLE_ATTACKMOVE 

enter attack-move mode

MSG_META_BEGIN_CAMERA_ROTATE_LEFT 
MSG_META_END_CAMERA_ROTATE_LEFT 
MSG_META_BEGIN_CAMERA_ROTATE_RIGHT 
MSG_META_END_CAMERA_ROTATE_RIGHT 
MSG_META_BEGIN_CAMERA_ZOOM_IN 
MSG_META_END_CAMERA_ZOOM_IN 
MSG_META_BEGIN_CAMERA_ZOOM_OUT 
MSG_META_END_CAMERA_ZOOM_OUT 
MSG_META_CAMERA_RESET 
MSG_META_TOGGLE_CAMERA_TRACKING_DRAWABLE 
MSG_META_TOGGLE_FAST_FORWARD_REPLAY 

Toggle the fast forward feature.

MSG_META_DEMO_INSTANT_QUIT 

bail out of game immediately

MSG_META_PLACE_BEACON 
MSG_META_REMOVE_BEACON 
MSG_END_META_MESSAGES 

Marker to delineate "meta" messages.

MSG_MOUSEOVER_DRAWABLE_HINT 

(drawableid) the given drawable is under the mouse, regardless of button states

MSG_MOUSEOVER_LOCATION_HINT 

(location) The cursor is not over a drawable, but is here.

MSG_VALID_GUICOMMAND_HINT 

posted when the gui command is valid if the user clicked to execute it.

MSG_INVALID_GUICOMMAND_HINT 

posted when the gui command is not valid if the user were to click to attempt to execute it.

MSG_AREA_SELECTION_HINT 

(pixelRegion) rectangular selection area under construction, not confirmed

MSG_DO_ATTACK_OBJECT_HINT 

(victim objectID) If clicked, an attack would be ordered, "Current Selection" is assumed

MSG_IMPOSSIBLE_ATTACK_HINT 

we can't do anything, and target is out of range.

MSG_DO_FORCE_ATTACK_OBJECT_HINT 

(victim objectID) If clicked, an attack would be ordered, "Current Selection" is assumed

MSG_DO_FORCE_ATTACK_GROUND_HINT 

(victim objectID) If clicked, an attack would be ordered, "Current Selection" is assumed

MSG_GET_REPAIRED_HINT 

If clicked, selected unit will go get repaired at clicked object.

MSG_GET_HEALED_HINT 

If clicked, selected unit will go get healed at clicked object.

MSG_DO_REPAIR_HINT 

if clicked, dozer will go repair the clicked target

MSG_RESUME_CONSTRUCTION_HINT 

if clicked, dozer will go construct a partially constructed building

MSG_ENTER_HINT 

if clicked, selected unit(s) will attempt to enter clicked object

MSG_DOCK_HINT 

If clicked, selected unit(s) will dock.

MSG_DO_MOVETO_HINT 

(location) If clicked, a move would be ordered, "Current Selection" is assumed

MSG_DO_ATTACKMOVETO_HINT 

(location) If clicked, a move would be ordered, "Current Selection" is assumed

MSG_ADD_WAYPOINT_HINT 

(location) If clicked, a waypoint will be added for currently selected units.

MSG_HIJACK_HINT 

if clicked, selected unit(s) will attempt to take over vehicle.

MSG_SABOTAGE_HINT 
MSG_FIREBOMB_HINT 

throw a molotov cocktail

MSG_CONVERT_TO_CARBOMB_HINT 

if clicked, selected unit(s) will attempt to convert clicked object into a carbomb.

MSG_CAPTUREBUILDING_HINT 
MSG_SNIPE_VEHICLE_HINT 
MSG_DEFECTOR_HINT 
MSG_SET_RALLY_POINT_HINT 

(location) if clicked, we will place a rally point here.

MSG_DO_SPECIAL_POWER_OVERRIDE_DESTINATION_HINT 
MSG_DO_SALVAGE_HINT 
MSG_DO_INVALID_HINT 

Display invalid cursor because no real command can be done in this context.

MSG_DO_ATTACK_OBJECT_AFTER_MOVING_HINT 
MSG_HACK_HINT 
MSG_BEGIN_NETWORK_MESSAGES 

MARKER TO DELINEATE MESSAGES THAT GO OVER THE NETWORK.

MSG_CREATE_SELECTED_GROUP 

(Bool createNewGroup, objectID1, objectID2, ... objectIDN) The selected team is created/augmented with the given team members

MSG_CREATE_SELECTED_GROUP_NO_SOUND 

(Bool createNewGroup, objectID1, objectID2, ... objectIDN) The selected team is created/augmented with the given team members. Do not play their selection sounds.

MSG_DESTROY_SELECTED_GROUP 

(teamID) the given team is no longer valid

MSG_REMOVE_FROM_SELECTED_GROUP 

(objectID1, objectID2, ... objectIDN) Remove these units from the selected group. (N should almost always be 1)

MSG_SELECTED_GROUP_COMMAND 

(teamID) the NEXT COMMAND acts upon all members of this team

MSG_CREATE_TEAM0 

Creates a hotkey squad from the currently selected units.

MSG_CREATE_TEAM1 
MSG_CREATE_TEAM2 
MSG_CREATE_TEAM3 
MSG_CREATE_TEAM4 
MSG_CREATE_TEAM5 
MSG_CREATE_TEAM6 
MSG_CREATE_TEAM7 
MSG_CREATE_TEAM8 
MSG_CREATE_TEAM9 
MSG_SELECT_TEAM0 

Set a hotkey squad to be the currently selected units.

MSG_SELECT_TEAM1 

Set a hotkey squad to be the currently selected units.

MSG_SELECT_TEAM2 

Set a hotkey squad to be the currently selected units.

MSG_SELECT_TEAM3 

Set a hotkey squad to be the currently selected units.

MSG_SELECT_TEAM4 

Set a hotkey squad to be the currently selected units.

MSG_SELECT_TEAM5 

Set a hotkey squad to be the currently selected units.

MSG_SELECT_TEAM6 

Set a hotkey squad to be the currently selected units.

MSG_SELECT_TEAM7 

Set a hotkey squad to be the currently selected units.

MSG_SELECT_TEAM8 

Set a hotkey squad to be the currently selected units.

MSG_SELECT_TEAM9 

Set a hotkey squad to be the currently selected units.

MSG_ADD_TEAM0 

Add hotkey squad to the currently selected units.

MSG_ADD_TEAM1 

Add hotkey squad to the currently selected units.

MSG_ADD_TEAM2 

Add hotkey squad to the currently selected units.

MSG_ADD_TEAM3 

Add hotkey squad to the currently selected units.

MSG_ADD_TEAM4 

Add hotkey squad to the currently selected units.

MSG_ADD_TEAM5 

Add hotkey squad to the currently selected units.

MSG_ADD_TEAM6 

Add hotkey squad to the currently selected units.

MSG_ADD_TEAM7 

Add hotkey squad to the currently selected units.

MSG_ADD_TEAM8 

Add hotkey squad to the currently selected units.

MSG_ADD_TEAM9 

Add hotkey squad to the currently selected units.

MSG_DO_ATTACKSQUAD 

(numObjects) (numObjects * objectID)

MSG_DO_WEAPON 

fire specific weapon

MSG_DO_WEAPON_AT_LOCATION 

fire a specific weapon at location

MSG_DO_WEAPON_AT_OBJECT 

fire a specific weapon at a target object

MSG_DO_SPECIAL_POWER 

do special

MSG_DO_SPECIAL_POWER_AT_LOCATION 

do special with target location

MSG_DO_SPECIAL_POWER_AT_OBJECT 

do special at with target object

MSG_SET_RALLY_POINT 

(objectID, location)

MSG_PURCHASE_SCIENCE 

purchase a science

MSG_QUEUE_UPGRADE 

queue the "research" of an upgrade

MSG_CANCEL_UPGRADE 

cancel the "research" of an upgrade

MSG_QUEUE_UNIT_CREATE 

clicked on a button to queue the production of a unit

MSG_CANCEL_UNIT_CREATE 

clicked on UI button to cancel production of a unit

MSG_DOZER_CONSTRUCT 

building things requires clicking on a dozer selecting what to build, selecting where to build it ... this construct message will start the actual build process

MSG_DOZER_CONSTRUCT_LINE 

Like MSG_CONSTRUCT, but for build procesess that occur in a line (like walls)

MSG_DOZER_CANCEL_CONSTRUCT 

cancel construction of a building

MSG_SELL 

sell a structure

MSG_EXIT 

WE want to exit from whatever WE are inside of.

MSG_EVACUATE 

Dump out all of OUR contained objects.

MSG_EXECUTE_RAILED_TRANSPORT 

Execute railed transport sequence.

MSG_COMBATDROP_AT_LOCATION 

dump out all rappellers

MSG_COMBATDROP_AT_OBJECT 

dump out all rappellers

MSG_AREA_SELECTION 

(pixelRegion) rectangular selection area

MSG_DO_ATTACK_OBJECT 

(objectID, victim objectID)

MSG_DO_FORCE_ATTACK_OBJECT 

force attack the given object if picked

MSG_DO_FORCE_ATTACK_GROUND 

(locationID) bombard the given location if picked

MSG_GET_REPAIRED 

selected unit will go get repaired at clicked object

MSG_GET_HEALED 

selected unit will go get healed at clicked object

MSG_DO_REPAIR 

dozer will go repair the clicked target

MSG_RESUME_CONSTRUCTION 

resume construction on a structure

MSG_ENTER 

Enter object.

MSG_DOCK 

Dock with this object.

MSG_DO_MOVETO 

location

MSG_DO_ATTACKMOVETO 

location

MSG_DO_FORCEMOVETO 

location

MSG_ADD_WAYPOINT 

location

MSG_DO_GUARD_POSITION 

Guard with the currently selected group.

MSG_DO_GUARD_OBJECT 

Guard with the currently selected group.

MSG_DO_STOP 

Stop with the currently selected group.

MSG_DO_SCATTER 

Scatter the currently selected group.

MSG_INTERNET_HACK 

Begin a persistent internet hack (free slow income)

MSG_DO_CHEER 

Orders selected units to play cheer animation (if possible)

MSG_TOGGLE_OVERCHARGE 

Toggle overcharge status of a power plant.

MSG_SWITCH_WEAPONS 

Switches which weapon slot to use for an object.

MSG_CONVERT_TO_CARBOMB 
MSG_CAPTUREBUILDING 
MSG_DISABLEVEHICLE_HACK 
MSG_STEALCASH_HACK 
MSG_DISABLEBUILDING_HACK 
MSG_SNIPE_VEHICLE 
MSG_DO_SPECIAL_POWER_OVERRIDE_DESTINATION 
MSG_DO_SALVAGE 
MSG_CLEAR_INGAME_POPUP_MESSAGE 

If we want a replay to work with the popup messages then we need it to be passed.

MSG_PLACE_BEACON 
MSG_REMOVE_BEACON 
MSG_SET_BEACON_TEXT 
MSG_SET_REPLAY_CAMERA 

Track camera pos for replays.

MSG_SELF_DESTRUCT 

Destroys a player's units (for copy protection or to quit to observer)

MSG_CREATE_FORMATION 

Creates a formation.

MSG_LOGIC_CRC 

CRC from the logic passed around in a network game :)

MSG_SET_MINE_CLEARING_DETAIL 

CRC from the logic passed around in a network game :)

MSG_ENABLE_RETALIATION_MODE 

Turn retaliation mode on or off for the specified player.

MSG_BEGIN_DEBUG_NETWORK_MESSAGES 

network messages that exist only in debug/internal builds. all grouped separately.

MSG_END_NETWORK_MESSAGES 

MARKER TO DELINEATE MESSAGES THAT GO OVER THE NETWORK.

MSG_TIMESTAMP 

The current frame number.

MSG_OBJECT_CREATED 

(objectID, Int type) Cause a drawable to be created and bound to this ID

MSG_OBJECT_DESTROYED 

(objectID) Free bound drawable

MSG_OBJECT_POSITION 

(objectID, location) New position of object

MSG_OBJECT_ORIENTATION 

(objectID, angle) New orientation of object

MSG_OBJECT_JOINED_TEAM 

(objectID) New team affiliation of object

MSG_COUNT 

Definition at line 114 of file MessageStream.h.

Constructor & Destructor Documentation

◆ GameMessage()

GameMessage::GameMessage ( GameMessage::Type type)

Constructor

Definition at line 60 of file MessageStream.cpp.

Member Function Documentation

◆ appendBooleanArgument()

void GameMessage::appendBooleanArgument ( Bool arg)

Definition at line 167 of file MessageStream.cpp.

◆ appendDrawableIDArgument()

void GameMessage::appendDrawableIDArgument ( DrawableID arg)

Definition at line 181 of file MessageStream.cpp.

◆ appendIntegerArgument()

void GameMessage::appendIntegerArgument ( Int arg)

Append an integer argument

Definition at line 153 of file MessageStream.cpp.

◆ appendLocationArgument()

void GameMessage::appendLocationArgument ( const Coord3D & arg)

Definition at line 195 of file MessageStream.cpp.

◆ appendObjectIDArgument()

void GameMessage::appendObjectIDArgument ( ObjectID arg)

Definition at line 174 of file MessageStream.cpp.

◆ appendPixelArgument()

void GameMessage::appendPixelArgument ( const ICoord2D & arg)

Definition at line 202 of file MessageStream.cpp.

◆ appendPixelRegionArgument()

void GameMessage::appendPixelRegionArgument ( const IRegion2D & arg)

Definition at line 209 of file MessageStream.cpp.

◆ appendRealArgument()

void GameMessage::appendRealArgument ( Real arg)

Definition at line 160 of file MessageStream.cpp.

◆ appendTeamIDArgument()

void GameMessage::appendTeamIDArgument ( UnsignedInt arg)

Definition at line 188 of file MessageStream.cpp.

◆ appendTimestampArgument()

void GameMessage::appendTimestampArgument ( UnsignedInt arg)

Definition at line 216 of file MessageStream.cpp.

◆ appendWideCharArgument()

void GameMessage::appendWideCharArgument ( const WideChar & arg)

Definition at line 223 of file MessageStream.cpp.

◆ friend_setList()

void GameMessage::friend_setList ( GameMessageList * m)
inline

Definition at line 660 of file MessageStream.h.

◆ friend_setNext()

void GameMessage::friend_setNext ( GameMessage * m)
inline

Definition at line 658 of file MessageStream.h.

◆ friend_setPlayerIndex()

void GameMessage::friend_setPlayerIndex ( Int i)
inline

Definition at line 661 of file MessageStream.h.

◆ friend_setPrev()

void GameMessage::friend_setPrev ( GameMessage * m)
inline

Definition at line 659 of file MessageStream.h.

◆ getArgument()

const GameMessageArgumentType * GameMessage::getArgument ( Int argIndex) const

Return the given argument union.

Todo
This should be a more list-like interface. Very inefficient.

Return the given argument union.

Todo
This should be a more list-like interface. Very inefficient.

Definition at line 94 of file MessageStream.cpp.

◆ getArgumentCount()

UnsignedByte GameMessage::getArgumentCount ( void ) const
inline

Return the number of arguments for this msg.

Definition at line 630 of file MessageStream.h.

◆ getArgumentDataType()

GameMessageArgumentDataType GameMessage::getArgumentDataType ( Int argIndex)

Return the given argument data type

Definition at line 110 of file MessageStream.cpp.

◆ getCommandAsAsciiString()

AsciiString GameMessage::getCommandAsAsciiString ( void )

returns a string representation of the command type.

Definition at line 230 of file MessageStream.cpp.

◆ getCommandTypeAsAsciiString()

AsciiString GameMessage::getCommandTypeAsAsciiString ( GameMessage::Type t)
static

Definition at line 235 of file MessageStream.cpp.

◆ getPlayerIndex()

Int GameMessage::getPlayerIndex ( void ) const
inline

Return the originating player.

Definition at line 635 of file MessageStream.h.

◆ getType()

Type GameMessage::getType ( void ) const
inline

Return the message type.

Definition at line 629 of file MessageStream.h.

◆ next()

GameMessage * GameMessage::next ( void )
inline

Return next message in the stream.

Definition at line 626 of file MessageStream.h.

◆ prev()

GameMessage * GameMessage::prev ( void )
inline

Return prev message in the stream.

Definition at line 627 of file MessageStream.h.


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