Skip to content
Snippets Groups Projects
Select Git revision
  • a22fa1c455cea774946f7032fd74e2e8155c9d9d
  • next default protected
  • movie
  • movie-netcode-fixes
  • fix-nil-key-unarchiving-error
  • next-test
  • classic-netcode-fixes
  • master protected
  • softcode-info
  • acs
  • clipmidtex
  • custom-map-names
  • nogravity-trampolines
  • 2214-pre4
  • 2214-pre3
  • just-in-case
  • fix-opengl-parameter-crash
  • 2214-pre2
  • 2214-pre1
  • delfile2
  • cleanupmusic
  • SRB2_release_2.2.15
  • SRB2_release_2.2.13
  • SRB2_release_2.2.12
  • SRB2_release_2.2.11
  • SRB2_release_2.2.10
  • SRB2_release_2.2.9
  • SRB2_release_2.2.8
  • SRB2_release_2.2.7
  • SRB2_release_2.2.6
  • SRB2_release_2.2.5
  • SRB2_release_2.2.4
  • SRB2_release_2.2.3
  • SRB2_release_2.2.2
  • SRB2_release_2.2.1
  • SRB2_release_2.2.0
  • SRB2_release_2.1.25
  • SRB2_release_2.1.24
  • SRB2_release_2.1.23
  • SRB2_release_2.1.22
  • SRB2_release_2.1.21
41 results

doomdata.h

Blame
  • d_ticcmd.h 1.95 KiB
    // SONIC ROBO BLAST 2
    //-----------------------------------------------------------------------------
    // Copyright (C) 1993-1996 by id Software, Inc.
    // Copyright (C) 1998-2000 by DooM Legacy Team.
    // Copyright (C) 1999-2023 by Sonic Team Junior.
    //
    // 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
    
    #define MAXPREDICTTICS 12
    
    // Button/action code definitions.
    typedef enum
    {
    	// First 4 bits are weapon change info, DO NOT USE!
    	BT_WEAPONMASK = 0x0F, //our first four bits.
    
    	BT_WEAPONNEXT = 1<<4,
    	BT_WEAPONPREV = 1<<5,
    
    	BT_ATTACK     = 1<<6, // shoot rings
    	BT_SPIN       = 1<<7,
    	BT_CAMLEFT    = 1<<8, // turn camera left
    	BT_CAMRIGHT   = 1<<9, // turn camera right
    	BT_TOSSFLAG   = 1<<10,
    	BT_JUMP       = 1<<11,
    	BT_FIRENORMAL = 1<<12, // Fire a normal ring no matter what
    
    	BT_CUSTOM1    = 1<<13,
    	BT_CUSTOM2    = 1<<14,
    	BT_CUSTOM3    = 1<<15,
    } 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;
    	UINT8 latency; // Netgames: how many tics ago was this ticcmd generated from this player's end?
    } ATTRPACK ticcmd_t;
    
    #if defined(_MSC_VER)
    #pragma pack()
    #endif
    
    #endif