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
star_system_generic.h File Reference
#include "config.h"
#include <expat.h>
#include <string>
#include <vector>
#include "xml_support.h"
#include "gfxlib_struct.h"
#include "gfx/vec.h"
#include "cmd/collection.h"
#include "cmd/container.h"
#include <map>

Go to the source code of this file.

Classes

struct  AtmosphericFogMesh
 
class  StarSystem
 
struct  StarSystem::StarXML
 Starsystem XML Struct For use with XML loading. More...
 
struct  StarSystem::Statistics
 

Functions

bool PendingJumpsEmpty ()
 
double calc_blend_factor (double frac, int priority, unsigned int when_it_will_be_simulated, int cur_simulation_frame)
 

Variables

const unsigned int SIM_QUEUE_SIZE = 128
 

Function Documentation

double calc_blend_factor ( double  frac,
int  priority,
unsigned int  when_it_will_be_simulated,
int  cur_simulation_frame 
)

Definition at line 880 of file star_system_generic.cpp.

References SIM_QUEUE_SIZE.

881 {
882  if (when_it_will_be_simulated == SIM_QUEUE_SIZE) {
883  return 1;
884  } else {
885  int relwas = when_it_will_be_simulated-priority;
886  if (relwas < 0) relwas += SIM_QUEUE_SIZE;
887  int relcur = cur_simulation_frame-relwas-1;
888  if (relcur < 0) relcur += SIM_QUEUE_SIZE;
889  return (relcur+frac)/(double) priority;
890  }
891 }
bool PendingJumpsEmpty ( )

Definition at line 797 of file star_system_generic.cpp.

References pendingjump.

Referenced by GameUniverse::StartDraw().

798 {
799  return pendingjump.empty();
800 }

Variable Documentation

const unsigned int SIM_QUEUE_SIZE = 128