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


    (help) Animated floor/ceiling in Wolf 3D SDL

    Share

    Officer-Michael John
    Seasoned Wolfer
    Seasoned Wolfer

    Male
    Number of posts : 323
    Age : 18
    Hobbie : Video and Wolf 3D mode making
    Registration date : 2014-08-04

    (help) Animated floor/ceiling in Wolf 3D SDL

    Post by Officer-Michael John on Tue Sep 06, 2016 10:17 am

    Hi members! I like to add Animated floor/ceiling to Wolf 3D SDL and don't work. What is problem?

    WL_FLOORCEILING.CPP:

    Code:
                    if(curtex)
                    {
                        unsigned curtoptex = curtex >> 8;
                        if(curtoptex > 0 && curtoptex < 64) curtoptex += 255;  //Note: change the 64 to match your last wall texture
                        if (curtoptex==250) // Whatever your wall ID is
                            curtoptex+= (frameon>>4)&4;
                        if (curtoptex != lasttoptex)
                        {
                            lasttoptex = curtoptex;
                            toptex = PM_GetTexture(curtoptex);
                        }
                        unsigned curbottex = curtex & 0xff;             
                        if(curbottex > 0 && curbottex < 64) curbottex += 255; //Note: change the 64 to match your last wall texture
                        if (curbottex==250) // Whatever your wall ID is
                            curbottex+= (frameon>>4)&4;
                        if (curbottex != lastbottex)   
                        {
                            lastbottex = curbottex;
                            bottex = PM_GetTexture(curbottex);
                        }

    250-253:Animated water

      Current date/time is Fri Sep 30, 2016 6:30 pm