23 |
// enigma.cc |
// enigma.cc |
24 |
//---------------------------------------- |
//---------------------------------------- |
25 |
$#include "enigma.hh" |
$#include "enigma.hh" |
|
$#include "game.hh" |
|
26 |
$using namespace enigma; |
$using namespace enigma; |
27 |
$using px::Surface; |
$using px::Surface; |
28 |
$using px::Font; |
$using px::Font; |
31 |
{ |
{ |
32 |
enum Direction {NODIR, NORTH, EAST, SOUTH, WEST}; |
enum Direction {NODIR, NORTH, EAST, SOUTH, WEST}; |
33 |
|
|
34 |
void AddLevelPack (const char *init_file, const char *name); |
Surface *GetImage(const char *name); |
35 |
void AddZippedLevelPack (const char *zipfile); |
Surface *LoadImage(const char *name); |
36 |
|
Font *GetFont(const char *name); |
37 |
|
} |
38 |
|
|
39 |
|
//---------------------------------------- |
40 |
|
// game.cc |
41 |
|
//---------------------------------------- |
42 |
|
$#include "game.hh" |
43 |
|
module enigma |
44 |
|
{ |
45 |
extern int ConserveLevel; |
extern int ConserveLevel; |
46 |
extern int AllowTogglePlayer; |
extern int AllowTogglePlayer; |
|
extern int Difficulty; |
|
47 |
extern int ShowMoves; |
extern int ShowMoves; |
48 |
|
extern double Brittleness; |
49 |
|
extern double SlopeForce; |
50 |
|
extern double SlopeForce2; |
51 |
|
extern double FrictionFactor; |
52 |
|
|
53 |
Surface *GetImage(const char *name); |
void AddLevelPack (const char *init_file, const char *name); |
54 |
Surface *LoadImage(const char *name); |
void AddZippedLevelPack (const char *zipfile); |
|
Font *GetFont(const char *name); |
|
55 |
|
|
56 |
void FinishLevel(); |
void FinishLevel(); |
57 |
void RestartLevel(); |
void RestartLevel(); |
58 |
void QuitGame(); |
void QuitGame(); |
59 |
} |
} |
60 |
|
|
|
|
|
61 |
//---------------------------------------- |
//---------------------------------------- |
62 |
// world.cc, objects.cc |
// world.cc, objects.cc |
63 |
//---------------------------------------- |
//---------------------------------------- |
99 |
|
|
100 |
module video |
module video |
101 |
{ |
{ |
|
int GetColorDepth(); |
|
102 |
Screen *GetScreen(); |
Screen *GetScreen(); |
103 |
void HideMouse(); |
void HideMouse(); |
104 |
void ShowMouse(); |
void ShowMouse(); |
105 |
} |
} |
106 |
|
|
107 |
//---------------------------------------- |
// //---------------------------------------- |
108 |
// display.cc |
// // display.cc |
109 |
//---------------------------------------- |
// //---------------------------------------- |
110 |
$#include "display.hh" |
// $#include "display.hh" |
111 |
$using namespace display; |
// $using namespace display; |
112 |
$using px::Rect; |
// $using px::Rect; |
113 |
|
|
114 |
module display |
// module display |
115 |
{ |
// { |
116 |
typedef int FollowMode; |
// typedef int FollowMode; |
117 |
enum FollowMode { |
// enum FollowMode { |
118 |
FOLLOW_SCROLLING, // Scroll the screen |
// FOLLOW_SCROLLING, // Scroll the screen |
119 |
FOLLOW_SCREEN // Flip the screen region |
// FOLLOW_SCREEN // Flip the screen region |
120 |
}; |
// }; |
121 |
void SetFollowMode(FollowMode m); |
// void SetFollowMode(FollowMode m); |
122 |
|
|
123 |
void DefineImage(const char *name, const char *fname, |
// void DefineImage(const char *name, const char *fname, |
124 |
int xoff, int yoff); |
// int xoff, int yoff); |
125 |
void DefineSubImage(const char *name, const char *fname, |
// void DefineSubImage(const char *name, const char *fname, |
126 |
int xoff, int yoff, Rect r); |
// int xoff, int yoff, Rect r); |
127 |
void DefineRandModel(const char *name, int n, const char *names[n]); |
// void DefineRandModel(const char *name, int n, const char *names[n]); |
128 |
void DefineShadedModel(const char *name, const char *model, |
// void DefineShadedModel(const char *name, const char *model, |
129 |
const char *shade); |
// const char *shade); |
130 |
void DefineOverlayImage (const char *name, int n, |
// void DefineOverlayImage (const char *name, int n, |
131 |
const char *images[n]); |
// const char *images[n]); |
132 |
void DefineComposite (const char *name, |
// void DefineComposite (const char *name, |
133 |
const char *bgname, |
// const char *bgname, |
134 |
const char *fgname); |
// const char *fgname); |
135 |
void DefineAnim (const char *name, bool loop_p); |
// void DefineAnim (const char *name, bool loop_p); |
136 |
void AddFrame (const char *name, const char *model, double time); |
// void AddFrame (const char *name, const char *model, double time); |
137 |
void DefineAlias (const char *name, const char *othername); |
// void DefineAlias (const char *name, const char *othername); |
138 |
} |
// } |
139 |
|
|
140 |
|
|
141 |
//---------------------------------------- |
//---------------------------------------- |
155 |
extern double StereoSeparation; |
extern double StereoSeparation; |
156 |
extern int SoundSet; |
extern int SoundSet; |
157 |
extern int SkipSolvedLevels; |
extern int SkipSolvedLevels; |
158 |
|
extern int Difficulty; |
159 |
|
|
160 |
struct LevelStatus { |
struct LevelStatus { |
161 |
LevelStatus(int easy=-1, int hard=-1, int fin=0, unsigned long solv = 0); |
LevelStatus(int easy=-1, int hard=-1, int fin=0, unsigned long solv = 0); |