Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
communication.cpp File Reference
#include "communication.h"
#include "vs_globals.h"
#include "config_xml.h"
#include <assert.h>
#include "audiolib.h"
#include "options.h"

Go to the source code of this file.

Functions

static float sq (float i)
 
bool nonneg (float i)
 
int createSound (std::string file, bool val)
 
float myround (float i)
 
float myroundclamp (float i)
 

Function Documentation

int createSound ( std::string  file,
bool  val 
)

Definition at line 40 of file libaudioserver.cpp.

Referenced by FSM::Node::GetSound().

41 {
42  return -1;
43 }
float myround ( float  i)

Definition at line 317 of file communication.cpp.

References j.

Referenced by myroundclamp().

318 {
319  float j = floor( i );
320  if (i-j >= .5)
321  return j+1;
322  return j;
323 }
float myroundclamp ( float  i)

Definition at line 325 of file communication.cpp.

References j, and myround().

Referenced by Pilot::getCommFace().

326 {
327  float j = myround( i );
328  if (j < 0)
329  j = 0;
330  return j;
331 }
bool nonneg ( float  i)

Definition at line 130 of file communication.cpp.

Referenced by FSM::getCommMessageMood(), and FSM::getDefaultState().

131 {
132  return i >= 0;
133 }
static float sq ( float  i)
static

Definition at line 125 of file communication.cpp.

Referenced by FSM::getCommMessageMood(), and FSM::getDefaultState().

126 {
127  return i*i;
128 }