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


    Compiling SDL-source with Dev-C++

    Share

    WLHack
    Senior Member
    Senior Member

    Male
    Number of posts : 792
    Age : 27
    Location : Finland
    Registration date : 2007-03-26

    Compiling SDL-source with Dev-C++

    Post by WLHack on Tue Feb 02, 2010 5:42 am

    First I presume you already have the SDL-source...
    And you have installed Dev-C++ with Mingw.

    Then download these files and replace your Dev-C++ include / lib folders with them...

    Now when you have done that - open up the Dev-C++ and select "Open project or file..."
    from the 'Files'-tab (or just hit CTRL+O) and then locate your Wolf4SDL.dev file from your
    Wolfenstein source-folder... Now Dev-C++ should load your project files (this might take some time though).

    Next we have to change the projects files a bit... Right-click on the "Wolf4SDL" on your left
    (top of the tree-structure containing your files) and select 'Add to project' - Now you just
    need to add these files to your project if they aren't yet included (to get the Rippers features working):
    Code:

    wl_atmos.cpp
    wl_atmos.h
    wl_dir3dspr.cpp
    wl_floorceiling.cpp
    wl_parallax.cpp
    wl_shade.cpp
    wl_shade.h

    Now you just need to hit the "Rebuild All"-button (four grey squares - can be also
    found from the 'execute'-tab or with CTRL+F1)... After you have done that hit
    "Compile and run" (F9, next to the "Rebuild All", multicolor squares with orange bar
    top of them)... And you should be ready.
    Now you have succesfully compiled the Wolfenstein source...

    Oh, one notice though... Some of you might wonder why I didn't change the project-folders,
    Well, the answer is simple - The lib/include folders I asked you to download directly has
    the files needed for compiling SDL in them.


    Last edited by WLHack on Fri Jul 11, 2014 2:54 pm; edited 1 time in total



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

    jayngo26
    Spear of Destiny
    Spear of Destiny

    Male
    Number of posts : 643
    Age : 135
    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: Compiling SDL-source with Dev-C++

    Post by jayngo26 on Tue Feb 02, 2010 12:52 pm

    Nice WLHack. Finally got an SDL "starting" tutorial on this forum!

    I will be giving this a shot whenever I have available time! Would love to "port" my existing mods over to SDL...

    EDIT: Ok. I successfully completed your tutorial WLHack. Just wondering tho, where is my new exe? Maybe I'm not seeing a simple step here...
    EDIT2: The error I get when I try to compile and run says "application has failed to start because SDL.dll was not found."
    EDIT3:Ok. Solved that problem. Chaos-Software had download for SDL.dll files...



    http://jayngoware.com/

    jayngo26
    Spear of Destiny
    Spear of Destiny

    Male
    Number of posts : 643
    Age : 135
    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: Compiling SDL-source with Dev-C++

    Post by jayngo26 on Tue Feb 02, 2010 1:44 pm

    Well now. That wasn't too hard. I have a fully functioning working SDL copy of the original Wolf3d! Now, just need to figure out how to "port" all my work in my first two mods to SDL.....



    http://jayngoware.com/

    WLHack
    Senior Member
    Senior Member

    Male
    Number of posts : 792
    Age : 27
    Location : Finland
    Registration date : 2007-03-26

    Re: Compiling SDL-source with Dev-C++

    Post by WLHack on Tue Feb 02, 2010 1:48 pm

    Though you have figured it out already - the default output folder for the EXE is the folder of the source...
    You can edit the output folder from "Project options" found from projects-tab.

    And yeah, remember to download the needed DLL files from the Chaos-Edits page.



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

    jayngo26
    Spear of Destiny
    Spear of Destiny

    Male
    Number of posts : 643
    Age : 135
    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: Compiling SDL-source with Dev-C++

    Post by jayngo26 on Tue Feb 02, 2010 4:13 pm

    Ugh. I have done some research into "porting" existing mods over to SDL and the news is not fantastic. Porting Existing Mods to SDL

    I really don't understand much of what Ripper is talking about. But, it sounds like you have to RECODE everything. I have put a lot of time into adding lot's of codes to my mods. It was a lot of work. Also, finding out that some of those codes may not even work with SDL is a bummer.
    I was really hoping to make my Episode 3 mod SDL and port Ep1 and Ep2 to SDL. Now, I'm not sure...

    Does anyone know of an easier way to do this??



    http://jayngoware.com/

    WLHack
    Senior Member
    Senior Member

    Male
    Number of posts : 792
    Age : 27
    Location : Finland
    Registration date : 2007-03-26

    Re: Compiling SDL-source with Dev-C++

    Post by WLHack on Tue Feb 02, 2010 9:12 pm

    Could you send me the complete list of features in Ep1 and Ep2
    so I could take a look and tell which features can be ported
    as they are and what do you need to do for other features...

    For instance if you had BrotherTanks 64+ walls-feature in your old code -
    apply Chris' tutorial for removing the harcoded MAXWALLs / MAXDOORs limits
    (not only this would allow you to have more than 64 door per level but
    nearly infinite amount of different wall textures - I currently have 116
    but there is still lot more to add)...



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

    jayngo26
    Spear of Destiny
    Spear of Destiny

    Male
    Number of posts : 643
    Age : 135
    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: Compiling SDL-source with Dev-C++

    Post by jayngo26 on Wed Feb 03, 2010 12:39 pm

    Sounds good. I am crazy busy right now, but when I get some time later, I will compile a list of all the code changes and PM it to you...



    http://jayngoware.com/

    Dark_wizzie
    I am Death Incarnate!
    I am Death Incarnate!

    Male
    Number of posts : 5087
    Age : 22
    Location : USA or Tawain
    Job : Student, Part time Cactuar fanatic
    Hobbie : Planting Cactuars.
    Message : I made this forum when I was 13 High on Drugs
    Registration date : 2007-03-24

    Re: Compiling SDL-source with Dev-C++

    Post by Dark_wizzie on Mon Dec 06, 2010 12:27 pm

    So basically the project file is in one of the folders you downloaded from the guide... and to have the exe done, press rebuild all then compile all... Don't compile and run. *Thumbs up*



    Wolf3d Haven
    Minute Logic Blog

    RSImage
    Can I Play, Daddy?
    Can I Play, Daddy?

    Number of posts : 25
    Age : 29
    Registration date : 2014-07-09

    Re: Compiling SDL-source with Dev-C++

    Post by RSImage on Fri Jul 11, 2014 10:41 am

    SDL-source link is down.

    Alternate:http://homepage.o2mail.de/mkroll/bins/Wolf4SDL-1.7-src.zip

    WLHack
    Senior Member
    Senior Member

    Male
    Number of posts : 792
    Age : 27
    Location : Finland
    Registration date : 2007-03-26

    Re: Compiling SDL-source with Dev-C++

    Post by WLHack on Fri Jul 11, 2014 2:54 pm

    @RSImage wrote:SDL-source link is down.

    Alternate:http://homepage.o2mail.de/mkroll/bins/Wolf4SDL-1.7-src.zip

    Thanks... Fixed the link to the source.



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

    WolferCooker
    Hardcore Wolfer
    Hardcore Wolfer

    Male
    Number of posts : 1160
    Age : 26
    Location : Pennsylvania, U.S.A
    Hobbie : Video games (mostly PC)
    Registration date : 2010-09-24

    Re: Compiling SDL-source with Dev-C++

    Post by WolferCooker on Fri Jul 11, 2014 2:57 pm

    Hack, Chaosedit link is down as well. Just started a thread on it.

    RSImage
    Can I Play, Daddy?
    Can I Play, Daddy?

    Number of posts : 25
    Age : 29
    Registration date : 2014-07-09

    Re: Compiling SDL-source with Dev-C++

    Post by RSImage on Sat Jul 12, 2014 9:22 am

    Hi WLHack. Thank you for this tutorial. However, I've tried twice now to compile the source code in this way (also with a method on the DHW forums from 2008) and have not been successful. These are the steps I've taken (try #3).

    First, the Dev C++ page lists v.5(beta) as compatible with Win 95/95/NT/2000/XP. I have Windows 7, if that's important.

    From the Downloads page, I am downloading this: Dev-C++ 5.0 beta 9.2 (4.9.9.2) (9.0 MB) with Mingw/GCC3.4.2(http://prdownloads.sourceforge.net/dev-cpp/devcpp-4.9.9.2_setup.exe)

    I installed it to C:\Dev-Cpp

    Upon first run of the program I am given this prompt:

    "Dev C++ can retrieve information from headers files, to help you find functions, classes and variables prototypes easily, through a class browswer and a code completion list. Although this feature is useful, it requires more CPU power and memory, and may not be suitable for all developers. Do you want to use it? You can enable or disable it later in Editor Options, Class Browser."

    The first time I installed the program I accepted this, but this time I declined.

    Next I extracted your provided Include and Lib folders into the Dev-Cpp folder after deleting the originals.

    Next I selected "Open Project or File" in Dev C++ and chose "Wolf4SDL.dev" from my Wolf4SDL folder which contains only the contents of "Wolf4SDL-1.7-src.zip"

    Next I right clicked Wolf4SDL in the Project tab and selected "Add to Project", then selected the files:
    wl_atmos.cpp
    wl_atmos.h
    wl_dir3dspr.cpp
    wl_floorceiling.cpp
    wl_parallax.cpp
    wl_shade.cpp
    wl_shade.h


    I next selected "Rebuild All". I then got a message in the section of the program at the bottom (with Compiler, Resources, Compile Log, Debug, etc tabs) under the "Compiler" tab which read:


    Line: 38
    File: \idl_vl.cpp
    Message: [Warning] converting of negative value `-0x000000001' to `unsigned int'

    After selecting "Compile & Run F9", I received this error:
    "The program can't start because SDL.dll is missing from your computer. Try reinstalling the program to fix this problem."

    And that's where I'm at! If you're willing to help I would be very grateful. Take care.

    WolferCooker
    Hardcore Wolfer
    Hardcore Wolfer

    Male
    Number of posts : 1160
    Age : 26
    Location : Pennsylvania, U.S.A
    Hobbie : Video games (mostly PC)
    Registration date : 2010-09-24

    Re: Compiling SDL-source with Dev-C++

    Post by WolferCooker on Sat Jul 12, 2014 10:20 am

    To solve the SDL.dll problem, take a Wolf4SDL mod and copy both its SDL.dll and SDLMixer.dll components.

    To solve the converting of the negative value problem, just change the negative value to 0.

    RSImage
    Can I Play, Daddy?
    Can I Play, Daddy?

    Number of posts : 25
    Age : 29
    Registration date : 2014-07-09

    Re: Compiling SDL-source with Dev-C++

    Post by RSImage on Thu Jul 24, 2014 5:57 pm

    @WolferCooker wrote:To solve the SDL.dll problem, take a Wolf4SDL mod and copy both its SDL.dll and SDLMixer.dll components.

    To solve the converting of the negative value problem, just change the negative value to 0.

    I found id_vl.cpp in my SDL source folder, right clicked and chose Edit, then changed the line

    unsigned screenBits = -1;

    to

    unsigned screenBits = 1;

    re-compiled, and success.

    Does anyone know why this happened, or what exactly it means? (I'm hoping to learn, not just follow tutorials).

    Also if this is a universal problem I guess it should be addressed in the original post.

    EDIT: That sure didn't work. It compiled fine but when I attempted to use the exe it failed with an error related to this -1/1 thing.

    "unable to set 640x400x1 video mode: Invalid bits per pixel (range is {8...32})"

    EDIT 2!! so this last value -- 1, -1.. ok, right it's 8-32, and it is related to something I've seen often but never understood, 8-bit, 16-bit, 32-bit. So I gave it 32 ... can anyone help me understand this? Or what it would mean to give it 16 or 8 bits?

    Andy
    Seasoned Wolfer
    Seasoned Wolfer

    Number of posts : 280
    Registration date : 2007-12-22

    Re: Compiling SDL-source with Dev-C++

    Post by Andy on Fri Jul 25, 2014 8:57 am

    Make it equal to 0 (zero) not 1, and you should be ok.

    RSImage
    Can I Play, Daddy?
    Can I Play, Daddy?

    Number of posts : 25
    Age : 29
    Registration date : 2014-07-09

    Re: Compiling SDL-source with Dev-C++

    Post by RSImage on Sun Jul 27, 2014 6:04 am

    Thanks Andy, I appreciate it.

    I really would like to know what the logic behind that is though. Are all values 0, 8, 16, and 32 equally acceptable and affect performance equally, and why if so?

    Guest
    Guest

    Re: Compiling SDL-source with Dev-C++

    Post by Guest on Sun Jul 27, 2014 7:13 am

    Hi Enrique!


    Last edited by Chokster37 on Sun Aug 10, 2014 12:00 am; edited 1 time in total

    RSImage
    Can I Play, Daddy?
    Can I Play, Daddy?

    Number of posts : 25
    Age : 29
    Registration date : 2014-07-09

    Re: Compiling SDL-source with Dev-C++

    Post by RSImage on Sun Jul 27, 2014 3:06 pm

    Chris Chokan! Hi.

    Good question lol.

    Maybe I can start with 64.

    AlumiuN
    Don't Hurt Me!
    Don't Hurt Me!

    Number of posts : 52
    Age : 24
    Location : Christchurch, New Zealand
    Registration date : 2013-08-31

    Re: Compiling SDL-source with Dev-C++

    Post by AlumiuN on Sun Jul 27, 2014 6:35 pm

    @RSImage wrote:Thanks Andy, I appreciate it.

    I really would like to know what the logic behind that is though. Are all values 0, 8, 16, and 32 equally acceptable and affect performance equally, and why if so?
    -1 or 0 gets the current screen display depth (with -1 forcing it and 0 telling SDL to sort it out), which is why it's the best default value. Setting it to anything else might result in it not working on someone's computer.

    RSImage
    Can I Play, Daddy?
    Can I Play, Daddy?

    Number of posts : 25
    Age : 29
    Registration date : 2014-07-09

    Re: Compiling SDL-source with Dev-C++

    Post by RSImage on Sun Jul 27, 2014 8:47 pm

    Ah I see. By depth I guess you mean color depth. Zero it will be then. Donka shane. Shurn?

    AlumiuN
    Don't Hurt Me!
    Don't Hurt Me!

    Number of posts : 52
    Age : 24
    Location : Christchurch, New Zealand
    Registration date : 2013-08-31

    Re: Compiling SDL-source with Dev-C++

    Post by AlumiuN on Sun Jul 27, 2014 9:35 pm

    @RSImage wrote:Ah I see. By depth I guess you mean color depth. Zero it will be then. Donka shane. Shurn?
    Yup. And it's danke schn. Razz

    Andy
    Seasoned Wolfer
    Seasoned Wolfer

    Number of posts : 280
    Registration date : 2007-12-22

    Re: Compiling SDL-source with Dev-C++

    Post by Andy on Mon Jul 28, 2014 9:37 am

    He must be using the Wayne Newton dialect. Suspect

    Sponsored content

    Re: Compiling SDL-source with Dev-C++

    Post by Sponsored content Today at 6:30 pm


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