DDraceNetwork Docs
gamecore.h File Reference
#include <base/vmath.h>
#include <map>
#include <set>
#include <vector>
#include <engine/shared/protocol.h>
#include <game/generated/protocol.h>
#include "prng.h"
#include "tuning.h"
Include dependency graph for gamecore.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CTuneParam
 
class  CTuningParams
 
struct  SSwitchers
 
class  CWorldCore
 
class  CCharacterCore
 
struct  CCharacterCore::WeaponStat
 
struct  CInputCount
 

Macros

#define MACRO_TUNING_PARAM(Name, ScriptName, Value, Description)   m_##Name.Set((int)((Value)*100.0f));
 
#define MACRO_TUNING_PARAM(Name, ScriptName, Value, Description)   CTuneParam m_##Name;
 

Enumerations

enum  {
  HOOK_RETRACTED = -1 , HOOK_IDLE = 0 , HOOK_RETRACT_START = 1 , HOOK_RETRACT_END = 3 ,
  HOOK_FLYING , HOOK_GRABBED , COREEVENT_GROUND_JUMP = 0x01 , COREEVENT_AIR_JUMP = 0x02 ,
  COREEVENT_HOOK_LAUNCH = 0x04 , COREEVENT_HOOK_ATTACH_PLAYER = 0x08 , COREEVENT_HOOK_ATTACH_GROUND = 0x10 , COREEVENT_HOOK_HIT_NOHOOK = 0x20 ,
  COREEVENT_HOOK_RETRACT = 0x40
}
 
enum  { SHOW_OTHERS_NOT_SET = -1 , SHOW_OTHERS_OFF = 0 , SHOW_OTHERS_ON = 1 , SHOW_OTHERS_ONLY_TEAM = 2 }
 

Functions

void StrToInts (int *pInts, size_t NumInts, const char *pStr)
 
bool IntsToStr (const int *pInts, size_t NumInts, char *pStr, size_t StrSize)
 
vec2 CalcPos (vec2 Pos, vec2 Velocity, float Curvature, float Speed, float Time)
 
template<typename T >
SaturatedAdd (T Min, T Max, T Current, T Modifier)
 
float VelocityRamp (float Value, float Start, float Range, float Curvature)
 
CInputCount CountInput (int Prev, int Cur)
 

Macro Definition Documentation

◆ MACRO_TUNING_PARAM [1/2]

#define MACRO_TUNING_PARAM (   Name,
  ScriptName,
  Value,
  Description 
)    m_##Name.Set((int)((Value)*100.0f));

◆ MACRO_TUNING_PARAM [2/2]

#define MACRO_TUNING_PARAM (   Name,
  ScriptName,
  Value,
  Description 
)    CTuneParam m_##Name;

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
HOOK_RETRACTED 
HOOK_IDLE 
HOOK_RETRACT_START 
HOOK_RETRACT_END 
HOOK_FLYING 
HOOK_GRABBED 
COREEVENT_GROUND_JUMP 
COREEVENT_AIR_JUMP 
COREEVENT_HOOK_LAUNCH 
COREEVENT_HOOK_ATTACH_PLAYER 
COREEVENT_HOOK_ATTACH_GROUND 
COREEVENT_HOOK_HIT_NOHOOK 
COREEVENT_HOOK_RETRACT 

◆ anonymous enum

anonymous enum
Enumerator
SHOW_OTHERS_NOT_SET 
SHOW_OTHERS_OFF 
SHOW_OTHERS_ON 
SHOW_OTHERS_ONLY_TEAM 

Function Documentation

◆ CalcPos()

vec2 CalcPos ( vec2  Pos,
vec2  Velocity,
float  Curvature,
float  Speed,
float  Time 
)
inline

◆ CountInput()

CInputCount CountInput ( int  Prev,
int  Cur 
)
inline

◆ IntsToStr()

bool IntsToStr ( const int *  pInts,
size_t  NumInts,
char *  pStr,
size_t  StrSize 
)

◆ SaturatedAdd()

template<typename T >
T SaturatedAdd ( Min,
Max,
Current,
Modifier 
)
inline

◆ StrToInts()

void StrToInts ( int *  pInts,
size_t  NumInts,
const char *  pStr 
)

◆ VelocityRamp()

float VelocityRamp ( float  Value,
float  Start,
float  Range,
float  Curvature 
)