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


    Floor/Ceiling Files Found In SDL Source Code

    Share

    Unusedbattery
    Freshmen
    Freshmen

    Number of posts : 24
    Age : 26
    Registration date : 2008-05-11

    Floor/Ceiling Files Found In SDL Source Code

    Post by Unusedbattery on Sat Feb 13, 2010 11:28 pm

    Hello there. I was looking at the files for the Wolf4SDL source code when I found a file called "wl_floorceiling.cpp." Does this mean I can put some floor/ceiling textures in my mod? If I can, how may I do that? I've tried including the said file into the project file but it seems to have done nothing. Can anyone tell me how to use the file?

    Thanks in advance.


    Last edited by Unusedbattery on Sun Feb 14, 2010 5:13 pm; edited 1 time in total

    jayngo26
    Spear of Destiny
    Spear of Destiny

    Male
    Number of posts : 643
    Age : 136
    Location : Random
    Job : Partime Evil Semi-Genius Plotting To Take Over Half The World. Partime Undead Charged With Keeping the Darkness Dark
    Hobbie : Staying Out Of Sunlight
    Message : Wolfenstein:Umbrella Beginnings Episode 2 released! Download now!

    Registration date : 2008-08-09

    Re: Floor/Ceiling Files Found In SDL Source Code

    Post by jayngo26 on Sat Feb 13, 2010 11:34 pm

    Nice question. I have been just getting into the SDL code myself. Just figured out how to add outside atmosphere today. And I also want to know how to add floor/ceiling textures. I know there is the option in ChaosEdit to do so, but I think you have to uncomment the floorceiling line at the bottom of version.h file. Or, something like that...



    http://jayngoware.com/

    Unusedbattery
    Freshmen
    Freshmen

    Number of posts : 24
    Age : 26
    Registration date : 2008-05-11

    Re: Floor/Ceiling Files Found In SDL Source Code

    Post by Unusedbattery on Sat Feb 13, 2010 11:44 pm

    Alright, I just did that; but it still didn't work I remember incorporating the floor/ceiling code in an old TC I was working on but obviously that's system won't work here.

    (I really should be learning C)

    WLHack
    Senior Member
    Senior Member

    Male
    Number of posts : 798
    Age : 28
    Location : Finland
    Registration date : 2007-03-26

    Re: Floor/Ceiling Files Found In SDL Source Code

    Post by WLHack on Sun Feb 14, 2010 7:07 am

    Uncomment the lines for floor and ceilings in version.h (if I remember right it was USE_FLOORCEILINGTEX),
    Rebuild all. Then in ChaosEdit select "3rd plain" and "split map" and then in 3D-mode press the button
    that says something like "use multitextured ceiling (high) and floor (low) stored in your VSWAP" the button
    with multicolor tiles...

    Now place some ceilings and floors and save your maps... When you run the game now - you should see the floor/ceiling textures.



    Hammer: I can see it now: you and the moon - wear a necktie so I'll know you.
    Building a new webpage...

    Unusedbattery
    Freshmen
    Freshmen

    Number of posts : 24
    Age : 26
    Registration date : 2008-05-11

    Re: Floor/Ceiling Files Found In SDL Source Code

    Post by Unusedbattery on Sun Feb 14, 2010 5:05 pm

    Aha, I have tried that and it didn't work; but then I have just discovered that the tiles that I must use for the floor and ceiling must be different from that generic gray stone wall (the very first wall graphic)

    Now, I have stumbled upon another problem. I wish to incorporate gun bobbing in my mod but sadly, the code only works for the DOS version. I have also read the tutorial BrotherTank put up on the Diehard Wolfers forum; but since I am a newbie at C/C++, I wish to have the instructions put into more detail. Anyone willing to help?

    jayngo26
    Spear of Destiny
    Spear of Destiny

    Male
    Number of posts : 643
    Age : 136
    Location : Random
    Job : Partime Evil Semi-Genius Plotting To Take Over Half The World. Partime Undead Charged With Keeping the Darkness Dark
    Hobbie : Staying Out Of Sunlight
    Message : Wolfenstein:Umbrella Beginnings Episode 2 released! Download now!

    Registration date : 2008-08-09

    Re: Floor/Ceiling Files Found In SDL Source Code

    Post by jayngo26 on Sun Feb 14, 2010 7:18 pm

    Yes, I got the floors to work today as well. So, now in my Wolf3d Ep1 Lv1 test level, I have blue brick flooring and Stars in the sky with snow falling. Quite cool.

    As far as gun bobbing goes, WLHack just did an SDL tutorial for that right on this forum. I think you need to have the original code implemented already though...



    http://jayngoware.com/

    Unusedbattery
    Freshmen
    Freshmen

    Number of posts : 24
    Age : 26
    Registration date : 2008-05-11

    Re: Floor/Ceiling Files Found In SDL Source Code

    Post by Unusedbattery on Sun Feb 14, 2010 7:59 pm

    Ahh, I see. Now if I could only find that tutorial somewhere...

    EDIT: Never mind, I found it.

    I have put the DOS code inside of the SDL source code, and then I modified it with BrotherTank's tutorial but then I get lots of errors in my wl_agent.cpp file.



    DOUBLE EDIT: Never mind, I'll just find someone else who can code and wants to help on the project

    WLHack
    Senior Member
    Senior Member

    Male
    Number of posts : 798
    Age : 28
    Location : Finland
    Registration date : 2007-03-26

    Re: Floor/Ceiling Files Found In SDL Source Code

    Post by WLHack on Mon Feb 15, 2010 10:31 pm

    You have placed it to wrong place...
    It has to be placed under Thrust function like this:
    Code:

    void Thrust (int angle, int32_t speed)
    {
        int32_t xmove,ymove;
        unsigned offset;
       
        if (gamestate.bobdir != 1) gamestate.bobber++; else gamestate.bobber--;     
        if (gamestate.bobber == 10 || gamestate.bobber == 0) gamestate.bobdir ^= 1;   
        if (gamestate.bobdir2 != 1) gamestate.bobber2++; else gamestate.bobber2--;   
        if (gamestate.bobber2 == 20 || gamestate.bobber2 == 0) gamestate.bobdir2 ^= 1;



    Hammer: I can see it now: you and the moon - wear a necktie so I'll know you.
    Building a new webpage...

    Unusedbattery
    Freshmen
    Freshmen

    Number of posts : 24
    Age : 26
    Registration date : 2008-05-11

    Re: Floor/Ceiling Files Found In SDL Source Code

    Post by Unusedbattery on Tue Feb 16, 2010 2:04 pm

    @WLHack wrote:You have placed it to wrong place...
    It has to be placed under Thrust function like this:
    Code:

    void Thrust (int angle, int32_t speed)
    {
        int32_t xmove,ymove;
        unsigned offset;
       
        if (gamestate.bobdir != 1) gamestate.bobber++; else gamestate.bobber--;     
        if (gamestate.bobber == 10 || gamestate.bobber == 0) gamestate.bobdir ^= 1;   
        if (gamestate.bobdir2 != 1) gamestate.bobber2++; else gamestate.bobber2--;   
        if (gamestate.bobber2 == 20 || gamestate.bobber2 == 0) gamestate.bobdir2 ^= 1;

    Okay I got that, but now for that "player gamestate setup." I see a "player state info" but I don't think that's it. Sorry for so many questions :O

    Sponsored content

    Re: Floor/Ceiling Files Found In SDL Source Code

    Post by Sponsored content Today at 2:13 pm


      Current date/time is Thu Dec 08, 2016 2:13 pm