89 |
class Game { |
class Game { |
90 |
public: |
public: |
91 |
Game(); |
Game(); |
92 |
|
px::Surface *create_preview(LevelPack *lp, int ilevel); |
93 |
void run(LevelPack *lp, int ilevel); |
void run(LevelPack *lp, int ilevel); |
94 |
void quit(); |
void quit(); |
95 |
void finish_level(); |
void finish_level(); |
523 |
return false; |
return false; |
524 |
} |
} |
525 |
|
|
526 |
|
px::Surface * |
527 |
|
Game::create_preview(LevelPack *lp, int ilevel) |
528 |
|
{ |
529 |
|
player::NewGame(2); // two virtual players |
530 |
|
if (lp->load_level (ilevel)) |
531 |
|
{ |
532 |
|
GC gc(video::BackBuffer()); |
533 |
|
display::DrawAll(gc); |
534 |
|
return( video::BackBuffer()); |
535 |
|
} |
536 |
|
return 0; |
537 |
|
} |
538 |
|
|
539 |
void |
void |
540 |
Game::run (LevelPack *lp, int ilevel) |
Game::run (LevelPack *lp, int ilevel) |
541 |
{ |
{ |
789 |
bool enigma::ConserveLevel = false; |
bool enigma::ConserveLevel = false; |
790 |
int enigma::Difficulty = 1; |
int enigma::Difficulty = 1; |
791 |
|
|
792 |
|
px::Surface * |
793 |
|
enigma::LevelPreview (LevelPack *lp, unsigned levelidx) |
794 |
|
{ |
795 |
|
return game_inst.create_preview (lp, levelidx); |
796 |
|
} |
797 |
|
|
798 |
unsigned |
unsigned |
799 |
enigma::StartGame (LevelPack *lp, unsigned levelidx) |
enigma::StartGame (LevelPack *lp, unsigned levelidx) |
800 |
{ |
{ |