Treasure GM example in Enigma

2011/04/21
Recently I have been trying to increase the number of example games that enigma supports while adding functions that are required to svn. However there are still some functions which need to remain in whitespace due to changes required in the compiler or elsewhere which makes them difficult to implement.

The first example is the treasure example which I believe was first released with game maker 7, its basically the original pacman but with different sprites and instead of using a script to wrap it uses the action_wrap function.

It requires renaming the sprite called monster into spr_monster, renaming the sound catch into snd_catch and the sound bonus into snd_bonus.

Then finally add the following definitions to enigma settings (engima settings -> definitions)

//1945

void action_change_object(int changeInto, int performEvents) {
enigma::object_planar* const inst = ((enigma::object_planar*)enigma::instance_event_iterator->inst);
//instance_create(inst->x,inst->y,changeInto);
//instance_destroy();
} //warning don't use in a with statement! (massive memory leak)

void action_restart_game() { //game_restart();
}

// Street Race

void action_highscore_show(int background,int border,double newColor,double otherColor,string font,int a,int b,int c,int d,int e,int f) {}

///////// PACMAN

void action_end_game() {
//game_end();
}
Screenshots running on mac using enigma r705:
The original pacman example also works:

There are however some problems, mainly the action_change_object which won't turn the monsters into scared state, and the high-score screen doesn't appear yet. But apart from that its fully playable.

Table of Contents