Пример #1
0
void NormalGameModeManager::Exit() {
    successMgr->sTakeYourTime();
    successMgr->s666Loser(level);

    BUTTON(herisson)->enabled = false;

    MUSIC(stressTrack)->volume = 0;
    ADSR(stressTrack)->active = false;
    ADSR(stressTrack)->value = 0;

    GameModeManager::Exit();
}
Пример #2
0
const uint8_t* NormalGameModeManager::restoreInternalState(const uint8_t* in, int size) {
    in = GameModeManager::restoreInternalState(in, size);
    memcpy(&level, in, sizeof(level)); in += sizeof(level);
    memcpy(&remain[0], in, sizeof(remain)); in += sizeof(remain);
    memcpy(&limit, in, sizeof(limit)); in += sizeof(limit);

    TRANSFORM(herisson)->position.x = GameModeManager::position(time / limit);
    MUSIC(stressTrack)->volume = 0;
    ADSR(stressTrack)->active = false;
    ADSR(stressTrack)->value = 0;

    return in;
}
Пример #3
0
 void PrivateData::Setup() {
    soundButton = theEntityManager.CreateEntityFromTemplate("general/soundButton");

    if (storageAPI->isOption("sound", "on"))
        RENDERING(soundButton)->texture = theRenderingSystem.loadTextureFile("sound_on");
    else
        RENDERING(soundButton)->texture = theRenderingSystem.loadTextureFile("sound_off");

    for (int i=0; i<3; ++i) {
        Entity e = theEntityManager.CreateEntityFromTemplate("general/cloud");
        theBackgroundSystem.initCloud(e, i);
    }

    for(auto it : mode2Manager)
        it.second->Setup();

    menu = theEntityManager.CreateEntityFromTemplate("music/menuTrack");

    inGameMusic.masterTrack = theEntityManager.CreateEntityFromTemplate("music/masterTrack");

    for (int i=0; i<3; i++) {
        std::stringstream a;
        a << "" << "secondaryTracks_" << i;
        inGameMusic.secondaryTracks[i] = theEntityManager.CreateEntityFromTemplate("music/secondaryTrack");
        MUSIC(inGameMusic.secondaryTracks[i])->master = MUSIC(inGameMusic.masterTrack);
    }
    inGameMusic.accessoryTrack = theEntityManager.CreateEntityFromTemplate("music/accessoryTrack");
    MUSIC(inGameMusic.accessoryTrack)->master = MUSIC(inGameMusic.masterTrack);

    inGameMusic.stressTrack = theEntityManager.CreateEntityFromTemplate("music/stressTrack");
    MUSIC(inGameMusic.stressTrack)->master = MUSIC(inGameMusic.masterTrack);

    const float MusicFadeOut = 1;
    theMusicSystem.forEachECDo([&MusicFadeOut] (Entity, MusicComponent *mc) -> void {
        mc->fadeOut = MusicFadeOut;
    });

    (static_cast<NormalGameModeManager*> (mode2Manager[Normal]))->stressTrack = inGameMusic.stressTrack;
    // PauseStateManager* pause = static_cast<PauseStateManager*> (state2Manager[Pause]);
    // pause->helpMgr = static_cast<HelpStateManager*> (state2Manager[Help]);

    // static_cast<ModeMenuStateManager*>(state2Manager[ModeMenu])->helpMgr = pause->helpMgr;
}
Пример #4
0
//


// sounds.c

#include "doomdef.h"
#include "i_sound.h"
#include "sounds.h"

// Music info

#define MUSIC(name) \
	{ name, 0, NULL, NULL }

musicinfo_t S_music[] = {
	MUSIC("MUS_E1M1"),            // 1-1
	MUSIC("MUS_E1M2"),
	MUSIC("MUS_E1M3"),
	MUSIC("MUS_E1M4"),
	MUSIC("MUS_E1M5"),
	MUSIC("MUS_E1M6"),
	MUSIC("MUS_E1M7"),
	MUSIC("MUS_E1M8"),
	MUSIC("MUS_E1M9"),

	MUSIC("MUS_E2M1"),            // 2-1
	MUSIC("MUS_E2M2"),
	MUSIC("MUS_E2M3"),
	MUSIC("MUS_E2M4"),
	MUSIC("MUS_E1M4"),
	MUSIC("MUS_E2M6"),