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

    Different Door Sides

    Bring em' On!
    Bring em' On!

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

    Different Door Sides

    Post by Dr.Zin on 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:
    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
                    wallpic = DOORWALL+3;

    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!

    Wolf3d Chat

      Current date/time is Tue Jul 17, 2018 7:41 pm