Skip to content

Commit

Permalink
EXTENSION: Finish FTE_PEXT_COLOURMOD definitions.
Browse files Browse the repository at this point in the history
Support for colourmod was partially declared in protocol.h, but missing
the entity_state_t bytes, as well as a few defines.

colourmod[3] is r/g/b with 1/32 precision, thus a value of 32 corresponds
to 1.0f, which in effect means no color modification, and the same is
true for 0.0f. Values above 1.0f yields overbrights.
  • Loading branch information
dsvensson committed Nov 4, 2024
1 parent bc6a2e1 commit 53e1440
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# define FTE_PEXT_ENTITYDBL2 0x00004000 // max of 1024 ents instead of 512
# define FTE_PEXT_FLOATCOORDS 0x00008000 // supports floating point origins.
# define FTE_PEXT_SPAWNSTATIC2 0x00400000 // Sends an entity delta instead of a baseline.
# define FTE_PEXT_COLOURMOD 0x00080000 // Sends three bytes of color modification for an entity
# define FTE_PEXT_256PACKETENTITIES 0x01000000 // Client can recieve 256 packet entities.
# define FTE_PEXT_CHUNKEDDOWNLOADS 0x20000000 // alternate file download method. Hopefully it'll give
// quadroupled download speed, especially on higher pings.
Expand Down Expand Up @@ -375,6 +376,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//moves verticies along normals
// Useful for vacuum chambers...
# endif // FTE_PEXT_FATNESS
# ifdef FTE_PEXT_COLOURMOD
# define PF_COLOURMOD (1<<19)
# endif // FTE_PEXT_COLOURMOD
# ifdef FTE_PEXT_MODELDBL
# define U_FTE_MODELDBL (1<<3) //extra bit for modelindexes
# endif // FTE_PEXT_MODELDBL
Expand All @@ -388,7 +392,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# define U_FTE_YETMORE (1<<7) //even more extension info stuff.
# define U_FTE_DRAWFLAGS (1<<8) //use an extra qbyte for origin parts, cos one of them is off
# define U_FTE_ABSLIGHT (1<<9) //Force a lightlevel
# define U_FTE_COLOURMOD (1<<10) //rgb
# ifdef FTE_PEXT_COLOURMOD
# define U_FTE_COLOURMOD (1<<10) //rgb
# endif // FTE_PEXT_COLOURMOD
# define U_FTE_DPFLAGS (1<<11)
# define U_FTE_TAGINFO (1<<12)
# define U_FTE_LIGHT (1<<13)
Expand Down Expand Up @@ -469,6 +475,9 @@ typedef struct entity_state_s {
#ifdef FTE_PEXT_TRANS
byte trans;
#endif
#ifdef FTE_PEXT_COLOURMOD
byte colourmod[3];
#endif
} entity_state_t;

#define MAX_PACKET_ENTITIES 64 // doesn't include nails
Expand Down

0 comments on commit 53e1440

Please sign in to comment.