codemp/game/bg_saga.h

Go to the documentation of this file.
00001 #define         MAX_SIEGE_INFO_SIZE                                     16384
00002 
00003 #define         SIEGETEAM_TEAM1                                         1 //e.g. TEAM_RED
00004 #define         SIEGETEAM_TEAM2                                         2 //e.g. TEAM_BLUE
00005 
00006 #define         SIEGE_POINTS_OBJECTIVECOMPLETED         20
00007 #define         SIEGE_POINTS_FINALOBJECTIVECOMPLETED    30
00008 #define         SIEGE_POINTS_TEAMWONROUND                       10
00009 
00010 #define         SIEGE_ROUND_BEGIN_TIME                          5000 //delay 5 secs after players are in game.
00011 
00012 #define         MAX_SIEGE_CLASSES                                       128 //up to 128 classes
00013 #define         MAX_SIEGE_CLASSES_PER_TEAM                      16
00014 
00015 #define         MAX_SIEGE_TEAMS                                         16 //up to 16 diffent teams
00016 
00017 #define         MAX_EXDATA_ENTS_TO_SEND                         MAX_CLIENTS //max number of extended data for ents to send
00018 
00019 // The basic siege player classes
00020 typedef enum
00021 {
00022         SPC_INFANTRY = 0,
00023         SPC_VANGUARD,
00024         SPC_SUPPORT,
00025         SPC_JEDI,
00026         SPC_DEMOLITIONIST,
00027         SPC_HEAVY_WEAPONS,
00028         SPC_MAX
00029 } siegePlayerClassFlags_t;
00030 
00031 typedef enum
00032 {
00033         CFL_MORESABERDMG = 0,
00034         CFL_STRONGAGAINSTPHYSICAL,
00035         CFL_FASTFORCEREGEN,
00036         CFL_STATVIEWER,
00037         CFL_HEAVYMELEE,
00038         CFL_SINGLE_ROCKET,//has only 1 rocket to use with rocketlauncher
00039         CFL_CUSTOMSKEL, //class uses a custom skeleton, be sure to load on server etc
00040         CFL_EXTRA_AMMO
00041 } siegeClassFlags_t;
00042 
00043 
00044 #ifdef _XBOX
00045 #define SIEGE_CLASS_DESC_LEN  512
00046 #else
00047 #define SIEGE_CLASS_DESC_LEN  4096
00048 #endif
00049 typedef struct
00050 {
00051         char            desc[SIEGE_CLASS_DESC_LEN];
00052 } siegeClassDesc_t;
00053 
00054 typedef struct
00055 {
00056         char            name[512];
00057         char            forcedModel[256];
00058         char            forcedSkin[256];
00059         char            saber1[64];
00060         char            saber2[64];
00061         int                     saberStance;
00062         int                     weapons;
00063         int                     forcePowerLevels[NUM_FORCE_POWERS];
00064         int                     classflags;
00065         int                     maxhealth;
00066         int                     starthealth;
00067         int                     maxarmor;
00068         int                     startarmor;
00069         float           speed;
00070         qboolean        hasForcedSaberColor;
00071         int                     forcedSaberColor;
00072         qboolean        hasForcedSaber2Color;
00073         int                     forcedSaber2Color;
00074         int                     invenItems;
00075         int                     powerups;
00076         int                     uiPortraitShader;
00077         char            uiPortrait[256];
00078         int                     classShader;
00079         short           playerClass;            // SPC_INFANTRY . .. 
00080 } siegeClass_t;
00081 
00082 typedef struct
00083 {
00084         char            name[512];
00085         siegeClass_t    *classes[MAX_SIEGE_CLASSES_PER_TEAM];
00086         int                     numClasses;
00087         int                     friendlyShader;
00088 } siegeTeam_t;
00089 
00090 #include "../namespace_begin.h"
00091 
00092 extern siegeClass_t bgSiegeClasses[MAX_SIEGE_CLASSES];
00093 extern int bgNumSiegeClasses;
00094 
00095 extern siegeTeam_t bgSiegeTeams[MAX_SIEGE_TEAMS];
00096 extern int bgNumSiegeTeams;
00097 
00098 int BG_SiegeGetValueGroup(char *buf, char *group, char *outbuf);
00099 int BG_SiegeGetPairedValue(char *buf, char *key, char *outbuf);
00100 void BG_SiegeStripTabs(char *buf);
00101 
00102 void BG_SiegeLoadClasses(siegeClassDesc_t *descBuffer);
00103 void BG_SiegeLoadTeams(void);
00104 
00105 siegeTeam_t *BG_SiegeFindThemeForTeam(int team);
00106 void BG_PrecacheSabersForSiegeTeam(int team);
00107 siegeClass_t *BG_SiegeFindClassByName(const char *classname);
00108 qboolean BG_SiegeCheckClassLegality(int team, char *classname);
00109 void BG_SiegeSetTeamTheme(int team, char *themeName);
00110 int BG_SiegeFindClassIndexByName(const char *classname);
00111 
00112 extern char     siege_info[MAX_SIEGE_INFO_SIZE];
00113 extern int      siege_valid;
00114 
00115 #include "../namespace_end.h"