Wolf3d Haven Forum

Please log in or register. Smile
Wolf3d Haven Forum

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


    longer elevator sounds

    Share

    Dark_wizzie
    I am Death Incarnate!
    I am Death Incarnate!

    Male
    Number of posts : 5090
    Age : 22
    Location : USA or Tawain
    Job : Student, Part time Cactuar fanatic
    Hobbie : Planting Cactuars.
    Message : I made this forum when I was 13 High on Drugs
    Registration date : 2007-03-24

    longer elevator sounds

    Post by Dark_wizzie on 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 Sun Dec 04, 2016 4:08 am