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...


    new unlocked door

    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

    new unlocked door Empty new unlocked door

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

    copied directly from dome:




    Code Editing Tutorials
    Adding a new Unlocked Door





    In an original VSWAP.WL6 the last 8 wall-images are reserved for the doors(4x2 horizontal + vertical). To add extra doors you can either highten this number with 2 per extra door(one "adding" in FloEdit) or use some walls.

    Step 1. Open up WL_DRAW.C And do a search for "DOORWALL". You'll see this:

    #define DOORWALL (PMSpriteStart-Cool

    Step 2. Highten the 8 with 2 for each unlocked door you want to add.

    Step 3. Add the images for the doors in VSWAP.WL6 with FloEdit or skip this step if you want to use walls.

    Step 4. Add definitions for the extra doors in WL_DEF.H by searching for "dr_normal" and placing under it, for example, dr_tvp for each door(each door MUST have it's own name!).

    Step 5. Add the extra doors in WL_DRAW.C. Search for "case dr_normal" and put the dr_tvp and so on in here too. This has to be done twice, for both the horizontal as the vertical door positions. Be warned that the "doorpage = DOORWALL + <digit>" matches the entry you wanna use for the door-images in the VSWAP file!

    Step 6. Now the engine still needs to know which wall tiles need to be handled as door tiles. Open up WL_GAME.C and search for "InitDoorList". 7 lines after your first hit you'll find this:

    "if (tile >=90 && tile <= 101)"

    Step 7. Highten the 101 with 2 for each extra door and edit the "case" statements a little further on in the code accordingly.

    Step 8. Compile the whole stuff and link it up. Now you have new unlocked doors. However, we DO want to use them, aren't we? Go to your Wolfenstein directory and open up MAPEDIT's MAPDATA file. Add this at the door section:

    0066 6070 New door
    0067 6060 New door


    Done! Now have fun with your doors!




    Wolf3d Haven
    Minute Logic Blog

      Current date/time is Fri Nov 08, 2024 11:13 am