forked from LemonHaze420/DCPopulous
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplatform.h
101 lines (82 loc) · 2.13 KB
/
platform.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#ifndef _PLATFORM_H_
#define _PLATFORM_H_
#include "Object.h"
#include "String.h"
#include "GameDefines.h"
#define GENERIC_MANUFACTURER_BLOCK 10000
#define GENERIC_MACHINE_BLOCK 100
// Machine type.
enum EMachine
{
EM_Generic = 0, // Generic, generic.
// HP.
EM_HP_Generic = (1 * GENERIC_MANUFACTURER_BLOCK), // HP Generic
// Jornada family
EM_HP_Jornada_Generic = (EM_HP_Generic + 1 * GENERIC_MACHINE_BLOCK), // Generic Jornada
// Specific members
EM_HP_Jornada540,
EM_HP_Jornada545,
// Casio
EM_Casio_Generic = (2 * GENERIC_MANUFACTURER_BLOCK), // Casio generic
// Cassiopeia family
EM_Casio_Cassiopeia_Generic = (EM_Casio_Generic + 1 * GENERIC_MACHINE_BLOCK), // Cassiopeia generic
// Specific members
EM_Casio_Cassiopeia125,
// Compaq
EM_Compaq_Generic = (3 * GENERIC_MANUFACTURER_BLOCK), // Compaq generic
// IPaq family
EM_Compaq_IPaq_Generic = (EM_Compaq_Generic + 1 * GENERIC_MACHINE_BLOCK),
// Specific members
EM_Compaq_IPaq_3100,
EM_Compaq_IPaq_3600,
EM_FailedToQuery = -1
};
// ----
// Enumerated list of known paths that the game can use.
enum EPath
{
EP_CWD = 0, // Current working directory
EP_Install, // Install path
EP_Data, // General data
EP_AudioData, // Audio data
EP_ImageData, // Image data
EP_Fonts, // Font data
EP_Text, // Text files
EP_Saves, // Save game path
// Debug / development
EP_Snapshot
};
#define MAX_PATHS ((int)EP_Snapshot + 1)
// ----
// Stores game data.
class CPlatform : public CObject
{
public:
CPlatform();
~CPlatform();
// ----
bool Init();
// ----
EMachine GetMachineType();
EMachine GetMachineFamily();
EMachine GetMachineManufacturer();
#ifdef USE_DEPRICATED
// ----
ELanguage GetLangauge();
#endif
// ----
int GetDeviceLanguage();
// ----
// Get various paths
CString* GetPath(EPath _Locale);
// Returns the time, in seconds, that the device will
// remain on without user activity.
int GetIdleTimeOut();
protected:
EMachine MachineType;
#ifdef USE_DEPRICATED
ELanguage Language;
#endif
CString PathArray[MAX_PATHS];
};
#endif