Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
Loader.cpp File Reference
#include "precompiled.h"
#include <deque>
#include <numeric>
#include "lib/timer.h"
#include "CStr.h"
#include "Loader.h"
Include dependency graph for Loader.cpp:

Classes

struct  LoadRequest
 

Typedefs

typedef std::deque< LoadRequestLoadRequests
 

Enumerations

enum  { IDLE , REGISTERING , FIRST_LOAD , LOADING }
 

Functions

static bool ldr_was_interrupted (const int ret)
 
void LDR_BeginRegistering ()
 
void LDR_Register (LoadFunc func, const wchar_t *description, int estimatedDurationMs)
 
void LDR_EndRegistering ()
 
void LDR_Cancel ()
 
static bool HaveTimeForNextTask (double time_left, double time_budget, int estimated_duration_ms)
 
Status LDR_ProgressiveLoad (double time_budget, wchar_t *description, size_t max_chars, int *progress_percent)
 
Status LDR_NonprogressiveLoad ()
 

Variables

static double total_estimated_duration
 
static double estimated_duration_tally
 
static double task_elapsed_time
 
static enum { ... }  state = IDLE
 
static LoadRequests load_requests
 

Typedef Documentation

◆ LoadRequests

typedef std::deque<LoadRequest> LoadRequests

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
IDLE 
REGISTERING 
FIRST_LOAD 
LOADING 

Function Documentation

◆ HaveTimeForNextTask()

static bool HaveTimeForNextTask ( double  time_left,
double  time_budget,
int  estimated_duration_ms 
)
static

◆ LDR_BeginRegistering()

void LDR_BeginRegistering ( )

◆ LDR_Cancel()

void LDR_Cancel ( )

◆ LDR_EndRegistering()

void LDR_EndRegistering ( )

◆ LDR_NonprogressiveLoad()

Status LDR_NonprogressiveLoad ( )

◆ LDR_ProgressiveLoad()

Status LDR_ProgressiveLoad ( double  time_budget,
wchar_t *  description,
size_t  max_chars,
int *  progress_percent 
)

◆ LDR_Register()

void LDR_Register ( LoadFunc  func,
const wchar_t *  description,
int  estimatedDurationMs 
)

◆ ldr_was_interrupted()

static bool ldr_was_interrupted ( const int  ret)
static

Variable Documentation

◆ estimated_duration_tally

double estimated_duration_tally
static

◆ load_requests

LoadRequests load_requests
static

◆ 

enum { ... } state

◆ task_elapsed_time

double task_elapsed_time
static

◆ total_estimated_duration

double total_estimated_duration
static