2014-03-15 16:59:03 +00:00
|
|
|
// SONIC ROBO BLAST 2
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// Copyright (C) 1993-1996 by id Software, Inc.
|
|
|
|
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
2023-03-31 12:53:31 +00:00
|
|
|
// Copyright (C) 1999-2023 by Sonic Team Junior.
|
2014-03-15 16:59:03 +00:00
|
|
|
//
|
|
|
|
// This program is free software distributed under the
|
|
|
|
// terms of the GNU General Public License, version 2.
|
|
|
|
// See the 'LICENSE' file for more details.
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
/// \file d_ticcmd.h
|
|
|
|
/// \brief Button/action code definitions, ticcmd_t
|
|
|
|
|
|
|
|
#ifndef __D_TICCMD__
|
|
|
|
#define __D_TICCMD__
|
|
|
|
|
|
|
|
#include "m_fixed.h"
|
|
|
|
#include "doomtype.h"
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
2021-04-21 23:58:14 +00:00
|
|
|
#define MAXPREDICTTICS 12
|
|
|
|
|
2014-03-15 16:59:03 +00:00
|
|
|
// Button/action code definitions.
|
|
|
|
typedef enum
|
|
|
|
{
|
2023-11-26 20:38:49 +00:00
|
|
|
// First 3 bits are weapon change info, DO NOT USE!
|
|
|
|
BT_WEAPONMASK = 0x07, //our first three bits.
|
|
|
|
|
|
|
|
BT_SHIELD = 1<<3, // shield or super action
|
2014-03-15 16:59:03 +00:00
|
|
|
|
2023-11-26 20:38:49 +00:00
|
|
|
BT_WEAPONNEXT = 1<<4, // select next weapon
|
|
|
|
BT_WEAPONPREV = 1<<5, // select previous weapon
|
2014-03-23 16:00:29 +00:00
|
|
|
|
2023-11-26 20:38:49 +00:00
|
|
|
BT_ATTACK = 1<<6, // shoot rings
|
|
|
|
BT_SPIN = 1<<7, // spin action
|
|
|
|
BT_CAMLEFT = 1<<8, // turn camera left
|
|
|
|
BT_CAMRIGHT = 1<<9, // turn camera right
|
|
|
|
BT_TOSSFLAG = 1<<10, // toss flag or emeralds
|
|
|
|
BT_JUMP = 1<<11, // jump action
|
|
|
|
BT_FIRENORMAL = 1<<12, // fire a normal ring no matter what
|
|
|
|
|
|
|
|
// custom lua buttons
|
2014-03-23 16:00:29 +00:00
|
|
|
BT_CUSTOM1 = 1<<13,
|
|
|
|
BT_CUSTOM2 = 1<<14,
|
|
|
|
BT_CUSTOM3 = 1<<15,
|
2014-03-15 16:59:03 +00:00
|
|
|
} buttoncode_t;
|
|
|
|
|
|
|
|
// The data sampled per tick (single player)
|
|
|
|
// and transmitted to other peers (multiplayer).
|
|
|
|
// Mainly movements/button commands per game tick,
|
|
|
|
// plus a checksum for internal state consistency.
|
|
|
|
|
|
|
|
// bits in angleturn
|
|
|
|
#define TICCMD_RECEIVED 1
|
|
|
|
#define TICCMD_XY 2
|
|
|
|
|
|
|
|
#if defined(_MSC_VER)
|
|
|
|
#pragma pack(1)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
SINT8 forwardmove; // -MAXPLMOVE to MAXPLMOVE (50)
|
|
|
|
SINT8 sidemove; // -MAXPLMOVE to MAXPLMOVE (50)
|
|
|
|
INT16 angleturn; // <<16 for angle delta - saved as 1 byte into demos
|
|
|
|
INT16 aiming; // vertical aiming, see G_BuildTicCmd
|
|
|
|
UINT16 buttons;
|
2021-04-21 23:58:14 +00:00
|
|
|
UINT8 latency; // Netgames: how many tics ago was this ticcmd generated from this player's end?
|
2014-03-15 16:59:03 +00:00
|
|
|
} ATTRPACK ticcmd_t;
|
|
|
|
|
|
|
|
#if defined(_MSC_VER)
|
|
|
|
#pragma pack()
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|