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


    SDL Tut for Animated Floor & Ceiling Textures

    Agent_Falcon93
    Agent_Falcon93
    Can I Play, Daddy?
    Can I Play, Daddy?


    Male
    Number of posts : 39
    Age : 37
    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

    SDL Tut for Animated Floor & Ceiling Textures  Empty SDL Tut for Animated Floor & Ceiling Textures

    Post by Agent_Falcon93 Tue Aug 01, 2023 7:17 pm

    Thanks to insurrectionman wrote the animated Wall Texture tutorial on DHW,

    http://dhw.wolfenstein3d.com/viewtopic.php?t=5384

    which I implemented a few years ago, that helped me do this, I don't think this was in the comments, but it may have been, I cant remember, but I dug into to my bakups and found this, I will be using it in my next KSS Installment. 

    if you want you can use an ifdef for these like I did but I omitted it from this, it's not imperative it just helps keep things clean & tidy and if you are using your engine for multiple games. 

    in    wl_floorceiling.cpp

    under the first  #ifdef use_shading section 
    right below 
     unsigned curtoptex = curtex >> 8;

    add the lines for animated ceiling textures 

    Code:
    if (curtoptex==155) // Whatever your  floor ceiling texture ID is
                            curtoptex+= (frameon>>3)%8; // first number is amount of frames, second number is speed of animation


    the if statement for currnet vs last top textures shoulld be right below those lines 
    then right below

      unsigned curbottex = curtex & 0xff;

    add the lines for animated floor textures

    Code:
    if (curbottex==155) // Whatever your floor ceiling texture ID is
                           curbottex+= (frameon>>3)%8; // first number is amount of frames, second number is speed of animation


    again the if statement for current vs last bottom textures should be right below those lines

    compile file to test for typos/errors
    build it / compile the code / exe

    use chaos edit to know what the floor and ceiling texture is, it will tell you in the floor ceiling texture box label that shows when you select it from the floor ceiling texture select window in chaos edit

    put the that animated floor and or ceiling in the map 
    compile the map 

    Test it and behold the super cool effects. 
    Have fun.


    Last edited by Agent_Falcon93 on Thu Aug 03, 2023 3:17 pm; edited 6 times in total (Reason for editing : to credit insurrectionman)



    SDL Tut for Animated Floor & Ceiling Textures  Right-arrow



    SDL Tut for Animated Floor & Ceiling Textures  Right-arrow farao "Call Pizza Hut and say Ardwolf"  SDL Tut for Animated Floor & Ceiling Textures  1f355
    Agent_Falcon93
    Agent_Falcon93
    Can I Play, Daddy?
    Can I Play, Daddy?


    Male
    Number of posts : 39
    Age : 37
    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

    SDL Tut for Animated Floor & Ceiling Textures  Empty Re: SDL Tut for Animated Floor & Ceiling Textures

    Post by Agent_Falcon93 Tue Aug 01, 2023 7:26 pm

    Temple of Horus with Animated Chi Activated Pentacles and torches SDL Tut for Animated Floor & Ceiling Textures  Magi_g10 
    Tomb of a Past Grand Master with Sarcophagus and animated Djed Pillar Tesla Coils  
    SDL Tut for Animated Floor & Ceiling Textures  Magi_o10

    at the Grand Lodge of the Order of the Magi of the Radiant Star (Player-Character/Protagonists Homebase) with animated objects and wall floor ceiling textures



    SDL Tut for Animated Floor & Ceiling Textures  Right-arrow



    SDL Tut for Animated Floor & Ceiling Textures  Right-arrow farao "Call Pizza Hut and say Ardwolf"  SDL Tut for Animated Floor & Ceiling Textures  1f355

      Current date/time is Sat Apr 27, 2024 6:10 pm