Exemple #1
0
void CON_DumpSoundList( void )
    {
    extern void DumpSounds(void);
    
    DumpSounds();
    CON_Message("Sounds dumped to dbg.foo");

    }
Exemple #2
0
int main(int argc, char* argv[])
{
    if (argc >= 1 && strcmp(argv[1], "-v") == 0)
    {
        PrintVersion();
        return 0;
    }

    if (argc < 3)
        return PrintHelp();

    bool sounds = false;
    bool stats = false;

    int arg = 1;
    for (arg = 1; arg < argc; arg++)
    {
        if (strcmp(argv[arg], "-s") == 0)
            sounds = true;
        else if (strcmp(argv[arg], "-i") == 0)
            stats = true;
        else
            break;
    }

    // Make sure we have 1 arg left after getting the options
    char* pageFile = nil;
    if (arg < argc)
        pageFile = argv[arg];
    else
        return PrintHelp();

    // Init our special resMgr
    plResMgrSettings::Get().SetFilterNewerPageVersions(false);
    plResMgrSettings::Get().SetFilterOlderPageVersions(false);
    plResMgrSettings::Get().SetLoadPagesOnInit(false);
    gResMgr = new plResManager;
    hsgResMgr::Init(gResMgr);
    gResMgr->AddSinglePage(pageFile);

    if (sounds)
        DumpSounds();
    if (stats)
    {
        char path[256];
        strcpy(path, pageFile);
        plFileUtils::StripFile(path);
        DumpStats(path);
    }

    hsgResMgr::Shutdown();

    return 0;
}
Exemple #3
0
void LockSound(int num)
{
    VOC_INFOp vp = &voc[num];
    // if data is not locked
    if (vp->lock <= CACHE_UNLOCK_MAX)
    {
        vp->lock = CACHE_LOCK_START;
    }
    else
    // if data is already locked
    {
        vp->lock++;
        if (vp->lock >= CACHE_LOCK_MAX || vp->lock == 0)
        {
            DumpSounds();
            TerminateGame();
            printf("lock > MAX, num = %d",num);
            exit(0);
        }
        //ASSERT(vp->lock < CACHE_LOCK_MAX);
        //ASSERT(vp->lock != 0);
    }
}