This commit is contained in:
@@ -10,6 +10,9 @@ ModuleGame::ModuleGame( Info* info ) {
|
||||
|
||||
this->info = info;
|
||||
|
||||
//this->info->num_piramide = 6;
|
||||
//this->info->diners = 200;
|
||||
|
||||
this->gfx = JD8_LoadSurface( "frames.gif" );
|
||||
JG_SetUpdateTicks(10);
|
||||
|
||||
@@ -49,8 +52,11 @@ int ModuleGame::Go() {
|
||||
|
||||
this->Draw();
|
||||
|
||||
JS_LoadMusic(this->info->num_piramide==3 ? "00000008.xm" : (this->info->num_piramide==2 ? "00000007.xm" : "00000006.xm"));
|
||||
JS_PlayMusic(-1);
|
||||
const char* music = this->info->num_piramide == 3 ? "00000008.xm" : (this->info->num_piramide == 2 ? "00000007.xm" : (this->info->num_piramide == 6 ? "00000002.xm" : "00000006.xm"));
|
||||
if (!JS_MusicPlaying() || !(SDL_strcmp(music, JS_GetMusicName()) == 0)) {
|
||||
JS_LoadMusic(music);
|
||||
JS_PlayMusic(-1);
|
||||
}
|
||||
|
||||
JD8_FadeToPal( JD8_LoadPalette( "frames.gif" ) );
|
||||
|
||||
@@ -60,7 +66,7 @@ int ModuleGame::Go() {
|
||||
this->Update();
|
||||
}
|
||||
|
||||
JS_FadeOutMusic();
|
||||
//JS_FadeOutMusic();
|
||||
|
||||
if( this->final == 1 ) {
|
||||
this->info->num_habitacio++;
|
||||
@@ -144,16 +150,17 @@ void ModuleGame::Update() {
|
||||
|
||||
void ModuleGame::iniciarMomies() {
|
||||
|
||||
if( this->info->num_habitacio == 10 ) { this->info->momies = 1; } else { this->info->momies++; }
|
||||
if( this->info->num_habitacio == 1 ) { this->info->momies = 1; } else { this->info->momies++; }
|
||||
if (this->info->num_piramide == 6) this->info->momies = 8;
|
||||
|
||||
int x = 20;
|
||||
int y = 170;
|
||||
|
||||
bool dimonis = this->info->num_piramide == 6;
|
||||
for( int i = 0; i < info->momies; i++ ) {
|
||||
if( this->momies == NULL) {
|
||||
this->momies = new Momia( this->gfx, this->info, false, x, y, this->sam );
|
||||
this->momies = new Momia( this->gfx, this->info, dimonis, x, y, this->sam );
|
||||
} else {
|
||||
this->momies->insertar( new Momia( this->gfx, this->info, false, x, y, this->sam ) );
|
||||
this->momies->insertar( new Momia( this->gfx, this->info, dimonis, x, y, this->sam ) );
|
||||
}
|
||||
x += 65;
|
||||
if( x == 345 ) { x = 20; y -= 35; }
|
||||
|
||||
Reference in New Issue
Block a user