Wolf3d Haven Forum

Please log in or register. Smile

Join the forum, it's quick and easy

Wolf3d Haven Forum

Please log in or register. Smile

Wolf3d Haven Forum

Would you like to react to this message? Create an account in a few clicks or log in to continue.
Wolf3d Haven Forum

A friendly Wolfenstein 3D community, about Wolfenstein 3D, the game that gave birth to first person shooters...


    longer elevator sounds

    Dark_wizzie
    Dark_wizzie
    I am Death Incarnate!
    I am Death Incarnate!


    Female
    Number of posts : 5120
    Age : 30
    Location : California, USA
    Job : Investor
    Hobbie : Computers, chess, computer chess, fashion, and philosophy
    Message : I made this forum when I was 13 High on Drugs
    Registration date : 2007-03-24

    longer elevator sounds Empty longer elevator sounds

    Post by Dark_wizzie Sun Apr 29, 2007 1:18 pm

    from dome
    You'd like a longer elevator sound? Read on!
    Step 1. Go to your source code directory and open the file WL_AGENT.C .
    Step 2. Go to line 1068. You should now see this:
    {
    //
    // use elevator
    //
    buttonheld[bt_use] = true;
    tilemap[checkx][checky]++; // flip switch
    if (*(mapsegs[0]+farmapylookup[player->tiley]+player->tilex) == ALTELEVATORTILE)
    playstate = ex_secretlevel;
    else
    playstate = ex_completed;
    SD_PlaySound (LEVELDONESND);
    SD_WaitSoundDone();
    }
    else if (!buttonheld[bt_use] && doornum & 0x80)
    {
    buttonheld[bt_use] = true;
    OperateDoor (doornum & ~0x80);
    }
    else
    SD_PlaySound (DONOTHINGSND);
    }

    Step 3. Replace all the text in the elevator code(see above) with that below(don't print it, copy it to your clipboard and extract it over the other text, or it will not work):

    if (!buttonheld[bt_use] && doornum == ELEVATORTILE && elevatorok)
    {
    //
    // use elevator
    //
    buttonheld[bt_use] = true;

    tilemap[checkx][checky]++; // flip switch
    if (*(mapsegs[0]+farmapylookup[player->tiley]+player->tilex) == ALTELEVATORTILE)
    playstate = ex_secretlevel;
    else
    SD_StopSound();
    SD_PlaySound(LEVELDONESND);
    if (DigiMode != sds_Off)
    {
    long lasttimecount = TimeCount;

    while(TimeCount < lasttimecount+150)
    SD_Poll();
    }
    playstate = ex_completed;
    }

    else if (!buttonheld[bt_use] && doornum & 0x80)
    {
    buttonheld[bt_use] = true;
    OperateDoor (doornum & ~0x80);
    }
    else
    SD_PlaySound (DONOTHINGSND);
    }

    Step 4. Now the code looks like this:
    if (!buttonheld[bt_use] && doornum == ELEVATORTILE && elevatorok)
    {
    //
    // use elevator
    //
    buttonheld[bt_use] = true;

    tilemap[checkx][checky]++; // flip switch
    if (*(mapsegs[0]+farmapylookup[player->tiley]+player->tilex) == ALTELEVATORTILE)
    playstate = ex_secretlevel;
    else
    SD_StopSound();
    SD_PlaySound(LEVELDONESND);
    if (DigiMode != sds_Off)
    {
    long lasttimecount = TimeCount;
    while(TimeCount < lasttimecount+150)
    SD_Poll();
    }
    playstate = ex_completed;
    }
    else if (!buttonheld[bt_use] && doornum & 0x80)
    {
    buttonheld[bt_use] = true;
    OperateDoor (doornum & ~0x80);

    }
    else
    SD_PlaySound (DONOTHINGSND);

    }
    Step 5. Save the file and Compile. Now you can use long elevator sounds(the Lost Episodes' elevator sound works fine!)




    Wolf3d Haven
    Minute Logic Blog

      Current date/time is Fri Nov 08, 2024 5:52 am