// Joe - alliance cgame cvars
#ifndef _BB_CG_PROTO_H_
#define _BB_CG_PROTO_H_

//extern cg_version; //Expert client revision 0.8.xxx
//extern g_version;  //Expert Server Game revision 0.8.xxx

extern vmCvar_t cg_debugSounds;
extern vmCvar_t cg_noTeamAudio;
extern vmCvar_t cg_noVoiceAudio;
extern vmCvar_t cg_soundType;



//extern vmCvar_t cg_predictHookPull;
//extern vmCvar_t cg_PredictHook;
extern vmCvar_t cg_noPredictFire;
extern vmCvar_t cg_noTrailOnPull; // alliance
//BB
extern	vmCvar_t		cg_noMuzzleFlash;
extern	vmCvar_t		cg_strafeJumpTrainer;

typedef enum {
    BC_BLACK,
    BC_RED,
    BC_GREEN,
    BC_YELLOW,
    BC_BLUE,
    BC_AQUA,
    BC_PINK,
    BC_WHITE,
    BC_ORANGE,
    BC_MAX_COLORS
} battleColors_t;

extern qboolean fileExists(const char *filename);
void CG_FileExists_f( void );

int CG_OtherTeam(int team);
const char *TeamName(int team);
const char *OtherTeamName(int team);

char *FindColoredName(char *strText);

int getColorFromString(char *color);
//void StringReplace(char string[], char from[], char to[]);
char *StringReplace(char *Str, size_t BufSiz, char *OldStr, char *NewStr);

//Crock
qboolean BG_battleWeaponsEnabled(void);

void showBattleCTFBonus(int receiverNum, int bonusType,
                        int points, int param);

int BG_gamemode(void);

qboolean BG_IamClient(void);
qboolean BG_IamServer(void);
qboolean BG_noClientPredictFire(void);
void BG_check_Offhand_Grapple(pmove_t *pm);
qboolean BG_SkyHook(void);
int BG_getGrappleHookSpeed(void);
//qboolean BG_predictHook(void);
qboolean BG_superShotgun(void);

// Joe dynamic team audio
void lastToken(const char *input, char *delim, char *output, int outputsize);
void soundtypeForModel(char *soundtype, int soundtypeSize, char *model);
// end Joe dynamic team audio

void CG_LastWeap_f( void ); // Joe lastweap

// Joe new grapples
void CG_SparkleBubbleTrail( vec3_t start, vec3_t end, float spacing );
void CG_GrappleCapEffectTrail( centity_t *ent, const weaponInfo_t *wi );
void CG_GrappleBubbleTrail( centity_t *ent, const weaponInfo_t *wi );
void CG_GrappleBloodTrail( centity_t *ent, const weaponInfo_t *wi );
// end Joe

// Joe - tint smoke trails
localEntity_t *CG_TeamSmokePuff( const vec3_t p, const vec3_t vel,
                                 float radius,
                                 float r, float g, float b, float a,
                                 float duration,
                                 int startTime,
                                 int leFlags,
                                 qhandle_t hShader, int team );

// Shader tints, see a_cgame.c for values
extern byte blueTint[4];
extern byte redTint[4];
extern byte greyTint[4];

extern byte *teamTint[3]; // Joe

// Myrkul Combat CTF scoring text constants
// See a_cgame.c for values
// See bg_alliance.h for further defines
extern char *combatScoringMessages[];
// the function to print the messages
void showBattleCTFBonus(int receiverNum, int bonusVector,
                        int points, int carryTime);

void *getBattleTeamColor(vec4_t icolor, int team);

qboolean A_dynamicTeamRadio(void); // Joe
qboolean A_dynamicVoice(void); // Joe
void CG_Svcmd_Stuff_f(void);

void CG_Serverinfo_f(void);
void CG_Systeminfo_f(void);

char *configName(int num);
void changeItemIcons(void);
// Joe - copied from qagame
char	*ConcatArgs( int start );
void updateServerConfig(const char *info);
qboolean BG_weaponsStayEnabled(void);
char *getFlagShaders(char *flagBannerShader );
void parseRemapFileNew(void);
void getStatusIcons(void );
char *getItemIcon(char *iconShader );
void changeBattleTextures(void);
void changeFlagShaders(void);
void BB_RegisterWeaponTeamEffects(void);
void GetTeamColorsVEC3(vec3_t in, vec3_t out, int team);

#endif //_BB_CG_PROTO_H_











