mElite
1.0
An Elite clone based on TextElite by Jan-Philipp Kappmeier and Melanie Schmidt.
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
mElite
FileAccess.h
Go to the documentation of this file.
1
9
#pragma once
10
11
#include "
Structures.h
"
12
#include <string>
13
#include <vector>
14
15
class
Vector3
;
16
25
struct
TextureAccess
{
26
TextureAccess
() :
name
(
""
),
hasQualities
(
false
),
type
(
"bmp"
) {}
27
TextureAccess
( std::string n,
bool
h, std::string t ) :
name
(n),
hasQualities
(h),
type
(t) {}
28
29
std::string
name
;
// should contain the filename without ending _and_ without size information e.g. _xs
30
bool
hasQualities
;
// is set to true, if different sizes are available
31
std::string
type
;
// should contain the ending
32
};
33
42
struct
ObjectAccess
{
43
ObjectAccess
() :
name
(
""
),
view
(0,0,1),
factor
(1) {}
44
ObjectAccess
( std::string n,
Vector3
v,
float
f) :
name
(n),
view
(v),
factor
(f) {}
45
std::string
name
;
46
Vector3
view
;
47
float
factor
;
48
};
49
58
class
FileAccess
{
59
// textures
60
public
:
61
static
TextureSlot
getPlanetSlot
(
unsigned
int
index );
62
static
std::string
getTextureFile
(
TextureName
texture );
63
static
TextureAccess
getTextureInfo
(
TextureName
texture );
64
static
void
loadTexture
(
TextureSlot
slot,
TextureName
texture );
65
private
:
66
static
const
int
planetSlotCount = 10;
67
static
const
TextureSlot
planetSlots[];
68
static
const
TextureAccess
textureInfos[];
69
70
// objects
71
public
:
72
static
std::string
getObjectFile
(
ObjectName
object
);
73
static
ObjectAccess
getObjectInfo
(
ObjectName
object
);
74
static
Vector3
getObjectView
(
ObjectName
object
);
75
static
float
getObjectFactor
(
ObjectName
object
);
76
static
void
loadObject
(
ObjectName
object
);
77
private
:
78
static
const
ObjectAccess
objectInfos[];
79
};
Generated on Tue Oct 2 2012 14:38:37 for mElite by
1.8.2