All structures owned by Ryan Sawatzky
; ---- Network Message Types & Formats ---
HELLO EQU 33 ; Message Format Constants
UPDATE EQU 21
GOODBYE EQU 22
HELLOREPLY EQU 23
START EQU 24
FIRE EQU 25
FULL EQU 42
GenericMsg STRUC ; Generic Message Structure
ShipID db 63 ; Player that transmitted the message
; This is the generic message format that all messages
follow
HelloMsg STRUC ; Hello Message
ShipID db 63 ; Sender's IDnum
; The Hello message is sent when the player first attempts to join the game.
; The purpose of this message is to tell all the other players currently in
; the game that there is a new player.
HelloReplyMsg STRUCT ; Reply to Hello Message
ShipID db 63 ; Sender's IDnum
NumPlayers db ? ; Number of active players in the game
; The HelloReply message is sent by player number one to the player who just
; sent a hello message. This message is sent while the game is waiting for
; players to join. It tells the player that just joined which player number
; he is.
FullMsg STRUC ; Game is Full
ShipID db ? ; Sender's IDnum
; The Full Message is sent by the first player to any players who attempt to
; join the game when either the number of players has already reached its max
; or when the game is already underway. It tells the player that he can not
; join the current game.
UpdateMsg STRUC ; Update Message
ShipID db 63 ; Unique ship number (1-4)
XPosE dw ? ; Position of ship - X
YPosE dw ? ; Position of ship - Y
OrientE db ? ; Orientation of ship
;FireE db ? ; Will perhaps hold status of any fire on ship
; The Update message is sent by any ship whenever its position or orientation
; changes. The fire data member might be used to display fire in certain
; compartments of the ship. The other players who receive this information
; will update their enemy ship structs accordingly.
FireMsg STRUC ; Ship fires projectile message
ShipID db 63 ; Sender's IDnum
MunitionP db ? ; What kind of shot - bullet or torpedo
XposP dw ? ; X coord of shot
YposP dw ? ; Y coord of shot
XOffsetP db ? ; movement in X direction
YOffsetP db ? ; movement in Y direction
SpeedP db ? ; Speed of projectile
TargetP db ? ; Target ship
HitProbabilityP db ? ; Probability of hitting target
; The Fire message is sent by any ship whenever it fires a projectile (either
; a bullet or a torpedo. This message contains important information such
; as the starting position, direction, target, and speed, so that all other
; ships can calculate the movements of the projectile on their own, instead
; of having to be sent update messages by the firing ship.
StartMsg STRUC ; Start Game Message
ShipID db ? ; Sender's IDnum
; This message will be sent by player number one, when he clicks on the GO
; button on the main menu. This button will only be activated after enough
; players have joined the game. This message tells everyone to start the
; actual game
GoodByeMsg STRUC ; GoodBye Message
ShipID db 63 ; Sender's IDnum
; The Goodbye message is sent by any ship who is either sunk or quits the
; game, right now by pressing the ESC key. This message tells all the other
; players that this ship is now out of play. As such, the other players will
; update their enemy ship structs appropriately.