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


    Different Door Sides

    Dr.Zin
    Dr.Zin
    Bring em' On!
    Bring em' On!


    Male
    Number of posts : 180
    Age : 40
    Location : Nowhere
    Message : General Programmer
    World of Tanks Username: ToreHund
    Registration date : 2010-08-11

    Different Door Sides Empty Different Door Sides

    Post by Dr.Zin Tue Oct 19, 2010 1:04 pm

    Eventually someone is going to want to have more than one door type and they will want to use it with a different door side than the default, retina burning cyan one. The one you find on DHW isn't terribly flexible and doesn't really allow for the 64+ wall code change. This solution is remarkably simple and takes mere minutes of code editing and is very flexible.

    Do a search for:
    Code:
    if ( tilemap[xtile][ytile-ytilestep]&0x80)
    If you have the bit shifted wall number code in place 0x80 will be that. Either way it should be in HitVertWall().

    Go ahead and put in a new set of curly braces ({}) under the if statement as this takes more than 1 line.

    Add this in our new if-block
    Code:
               
    switch(doorobjlist[doornum].lock)
                {
                default:
                    wallpic = DOORWALL+3;
                    break;
                }

    Do the same for HitHorizWall in the same place and just adjust DOORWALL+3 to whatever you need it to be.



    If a packet hits a pocket on a socket on a port,
    and the bus is interupted as a very last resort,
    and the address of the memory makes your floppy disk abort
    then the socket packet pocket has an error to report!

    http://radix-16.com/
    Wolf3d Chat

      Current date/time is Thu Nov 21, 2024 3:58 am