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


2 posters

    [Tutorial] Adding floor/ceiling tiles with ID 256 and higher (SDL)

    avatar
    WLHack
    Senior Member
    Senior Member


    Male
    Number of posts : 800
    Age : 35
    Location : Finland
    Registration date : 2007-03-26

    [Tutorial] Adding floor/ceiling tiles with ID 256 and higher (SDL)  Empty [Tutorial] Adding floor/ceiling tiles with ID 256 and higher (SDL)

    Post by WLHack Tue Feb 26, 2013 1:57 am

    If you have lots of walls in your vswap so that your floor/ceiling tiles have an ID of 256 or larger,
    using only the third plane to store the floor/ceiling values becomes unavailable.
    Fortunately you don't need to enable another plane to get the floor/ceiling values right...

    Open the wl_floorceiling.cpp and search for this line:
    Code:

    unsigned curtoptex = curtex >> 8;
    Now add this line under it:
    Code:

    if(curtoptex > 0 && curtoptex < 64) curtoptex += 255;  //Note: change the 64 to match your last wall texture


    Then search for this line (should be only few lines below):
    Code:

    unsigned curbottex = curtex & 0xff;
    And add this line under it:
    Code:

    if(curbottex > 0 && curbottex < 64) curbottex += 255; //Note: change the 64 to match your last wall texture


    Now using the wall textures 1-63 as the floor/ceiling will change the floor/ceiling value to 256-318.
    So basically now you can have as many floor/ceiling textures with id over 255 as you have walls
    in your vswap (remember to change the 64 as the last wall texture you are using).



    Hammer: I can see it now: you and the moon - wear a necktie so I'll know you.
    Building a new webpage...
    Agent_Falcon93
    Agent_Falcon93
    Can I Play, Daddy?
    Can I Play, Daddy?


    Male
    Number of posts : 39
    Age : 38
    Location : subterranean caverns & catacombs
    Job : Entrepreneur
    Hobbie : Beach Days & Gardening
    Message : Author of Castle Erzengel Demo, and the upcoming Runes of North Castle Court, and the rest of the Series : Knights of the ᛋᛋ.
    Registration date : 2021-12-05

    [Tutorial] Adding floor/ceiling tiles with ID 256 and higher (SDL)  Empty Re: [Tutorial] Adding floor/ceiling tiles with ID 256 and higher (SDL)

    Post by Agent_Falcon93 Wed Aug 23, 2023 1:47 pm

    so I tried doing this in a way that would retain the first 254 floor and ceiling textures, changing the comparison values so I could keep that original index to use with 3d edit in Chaos Edit, and tried all manner of permutations including changing the offset value, all to no avail, and hours later I see that old Chaos Edit isn't even placing the right values in the map once you get past 255. 

    Am I missing something?



    [Tutorial] Adding floor/ceiling tiles with ID 256 and higher (SDL)  Right-arrow



    [Tutorial] Adding floor/ceiling tiles with ID 256 and higher (SDL)  Right-arrow farao "Call Pizza Hut and say Ardwolf"  [Tutorial] Adding floor/ceiling tiles with ID 256 and higher (SDL)  1f355

      Current date/time is Sat Jul 20, 2024 3:52 am