Descent3/netgames/entropy/EntropyAux.h

71 lines
3.0 KiB
C
Raw Normal View History

2024-04-16 03:43:29 +00:00
#ifndef __ENTROPY_AUX_H__
#define __ENTROPY_AUX_H__
/*
=====================================================================
Entropy Special Packet IDs
=====================================================================
*/
2024-04-16 18:56:40 +00:00
#define SPID_NEWPLAYER 0
#define SPID_TAKEOVER 1
#define SPID_MATCHOBJNUM 2
#define SPID_ROOMINFO 3
#define SPID_PICKUPVIRUS 4
#define SPID_VIRUSCREATE 5
2024-04-16 03:43:29 +00:00
/*
=====================================================================
Some general defines for Entropy
=====================================================================
*/
2024-04-16 18:56:40 +00:00
#define MAX_VIRII 16 // maximum number of virii for each team not picked up
#define MAX_VIRII_PER_ROOM 4 // maximum number of virii allowed to be alive in a lab at once
#define NUM_TEAMS 2 // Only 2 teams supported in this game
2024-04-16 03:43:29 +00:00
2024-04-16 18:56:40 +00:00
// the following are control message code (when the server sends status info to the client)
#define VIRUS_NOTENOUGHKILLS 0
#define VIRUS_CANTKILL 1
#define VIRUS_DESTROYED 2
2024-04-16 03:43:29 +00:00
/*
=====================================================================
Some common function prototypes
=====================================================================
*/
void SendRoomInfo(int pnum);
void ReceiveRoomInfo(ubyte *data);
void SendClientPickupVirus(int player_num);
void ReceivePickupVirus(ubyte *data);
void SendGameStartPacket(int pnum);
void GetGameStartPacket(ubyte *data);
2024-04-16 18:56:40 +00:00
void SendTakeOverPacket(int newteam, int oldteam, int room, int victor);
2024-04-16 03:43:29 +00:00
void ReceiveTakeOverPacket(ubyte *data);
void DoVirusCreate(ubyte *data);
void SendVirusCreate(object *obj);
bool IsPlayerInEnemy(int pnum);
2024-04-16 18:56:40 +00:00
// Functions in EntropyRoom.cpp
int SpewObjectInRoom(int type, int id, int roomnum);
bool PaintRoomWithTexture(int texture, int roomnum);
2024-04-16 03:43:29 +00:00
2024-04-16 18:56:40 +00:00
// Take over functions
void TakeOverRoom(int newteam, int oldteam, int room, int victor);
void SendTakeOverPacket(int newteam, int oldteam, int room, int victor);
2024-04-16 03:43:29 +00:00
void ReceiveTakeOverPacket(ubyte *data);
/*
=====================================================================
Externed globals needed throughout Entropy
=====================================================================
*/
2024-04-16 18:56:40 +00:00
extern int NumberOfKillsSinceLastDeath[DLLMAX_PLAYERS]; //'kills in a row' for a player
extern int TeamScore[NUM_TEAMS]; // team scores
extern int TeamOwnedRooms[NUM_TEAMS]; // Number of rooms each team has
extern int EnergyText[NUM_TEAMS]; // texture handles to Energy room textures
extern int RepairText[NUM_TEAMS]; // texture handles to Repair room textures
extern int LabText[NUM_TEAMS]; // texture handles to Lab room textures
extern int virus_id; // Object ID of the Virus object
extern int *RoomList; // List of room index's that are special for Entropy (i.e. all the labs, repairs and energy rooms)
extern int RoomCount; // Size of RoomList when it's finally allocated
2024-04-16 03:43:29 +00:00
#endif