Esempio n. 1
0
/*
  void movefairy(fix &x,fix &y,int misc) {
  return;
  }

  void killfairy(int misc) {
  return;
  }
  */
bool addfairy(fix x, fix y, int misc3, int id)
{
    addenemy(x,y,curQuest->specialEnemies().fairyItem,id);
    ((enemy*)guys.spr(guys.Count()-1))->dstep=misc3;
    ((enemy*)guys.spr(guys.Count()-1))->step=(misc3/100.0);
    movefairy(x,y,id);
    return true;
}
Esempio n. 2
0
/*
  void movefairy(fix &x,fix &y,int misc) {
  return;
  }

  void killfairy(int misc) {
  return;
  }
  */
bool addfairy(fix x, fix y, int misc3, int id)
{
    addenemy(x,y,eITEMFAIRY,id);
    ((enemy*)guys.spr(guys.Count()-1))->dstep=misc3;
    ((enemy*)guys.spr(guys.Count()-1))->step=(misc3/100.0);
    movefairy(x,y,id);
    return true;
}
Esempio n. 3
0
void GanonIntro::update()
{
    /*
    ************************
    * GANON INTRO SEQUENCE *
    ************************
    -25 DOT updates
    -24 LINK in
    0 TRIFORCE overhead - code begins at this point (counter == 0)
    47 GANON in
    58 LIGHT step
    68 LIGHT step
    78 LIGHT step
    255 TRIFORCE out
    256 TRIFORCE in
    270 TRIFORCE out
    271 GANON out, LINK face up
    */
    
    if(counter==47)
    {
        music_stop();
        stop_sfx(WAV_ROAR);
        sfx(WAV_GASP);
        sfx(WAV_GANON);
        int Id=0;
        
        for(int i=0; i<eMAXGUYS; i++)
        {
            if(guysbuf[i].flags2&eneflag_ganon)
            {
                Id=i;
                break;
            }
        }
        
        if(current_item(itype_ring))
            addenemy(160,96,Id,0);
        else
            addenemy(80,32,Id,0);
    }
    
    else if(counter==48)
    {
        lighting(true,true); // Hmm. -L
        counter += 30;
    }
    
    //NES Z1, the triforce vanishes for one frame in two cases
    //while still showing Link's two-handed overhead sprite.
    else if(counter==255 || counter==270)
        link.setHeldItem(-1);
    
    else if(counter==256)
        link.setHeldItem(getItemID(itemsbuf,itype_triforcepiece,1));
    
    counter++;
    if(counter<271)
        return;
    
    link.setAction(none);
    link.dir=up;
    
    if(!getmapflag() && (tunes[MAXMIDIS-1].data))
        jukebox(MAXMIDIS-1);
    else
        playLevelMusic();
        
    currcset=DMaps[currdmap].color;
    showCurrentDMapIntro();
    cont_sfx(WAV_ROAR);
    finish();
}
update_status ModuleEnemyGenerator::PostUpdate(){
	
	
	for (list<ghostgenerator*>::iterator it = generatorlist.begin(); it != generatorlist.end(); ++it)
	{
		if (start==true){

			if (((*it)->colisionN == false)){
				if (borrarN == false){
					borrarN = true;
					generatingN.Start();
					addenemy((*it)->position.x, (*it)->position.y - 16);
				}
				else if (generatingN.Read() > 2000){
					borrarN = false;
				}

			}
			if (((*it)->colisionS == false)){
				if (borrarS == false){
					borrarS = true;
					generatingS.Start();
					addenemy((*it)->position.x, (*it)->position.y + 16);

				}
				else if (generatingS.Read() > 2000){
					borrarS = false;
				}
			}
			if (((*it)->colisionW == false)){
				if (borrarW == false){
					borrarW = true;
					generatingW.Start();
					addenemy((*it)->position.x - 16, (*it)->position.y);
				}
				else if (generatingW.Read() > 2000){
					borrarW = false;
				}
			}
			if (((*it)->colisionE == false)){
				if (borrarE == false){
					borrarE = true;
					generatingE.Start();
					addenemy((*it)->position.x + 16, (*it)->position.y);
				}
				else if (generatingE.Read() > 2000){
					borrarE = false;
				}
			}
		}
		else if ((*it)->timer.Read() > 500){
			start = true;
			(*it)->timer.Stop();
		}
	}

	if (explo == true){
		App->renderer->Blit(ghostimage, posexplosion.x, posexplosion.y, &(explosionani.GetCurrentFrame()));
	}
	if (timeexplosion.Read()>400){
		explo = false;
		timeexplosion.Stop();
	}
	
	
	return UPDATE_CONTINUE;
}