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


+4
WolferCooker
WLHack
Dark_wizzie
jayngo26
8 posters

    Compiling SDL-source with Dev-C++

    avatar
    WLHack
    Senior Member
    Senior Member


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

    Compiling SDL-source with Dev-C++ Empty Compiling SDL-source with Dev-C++

    Post by WLHack 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
    jayngo26
    Spear of Destiny
    Spear of Destiny


    Male
    Number of posts : 643
    Age : 143
    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

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

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

    Nice WLHack. Finally got an SDL "starting" tutorial on this forum! Compiling SDL-source with Dev-C++ Icon_lol

    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
    jayngo26
    Spear of Destiny
    Spear of Destiny


    Male
    Number of posts : 643
    Age : 143
    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

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

    Post by jayngo26 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! Compiling SDL-source with Dev-C++ Icon_biggrin Now, just need to figure out how to "port" all my work in my first two mods to SDL.....



    http://jayngoware.com/
    avatar
    WLHack
    Senior Member
    Senior Member


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

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

    Post by WLHack 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
    jayngo26
    Spear of Destiny
    Spear of Destiny


    Male
    Number of posts : 643
    Age : 143
    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

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

    Post by jayngo26 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... Compiling SDL-source with Dev-C++ Icon_silent

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



    http://jayngoware.com/
    avatar
    WLHack
    Senior Member
    Senior Member


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

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

    Post by WLHack 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
    jayngo26
    Spear of Destiny
    Spear of Destiny


    Male
    Number of posts : 643
    Age : 143
    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

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

    Post by jayngo26 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
    Dark_wizzie
    I am Death Incarnate!
    I am Death Incarnate!


    Female
    Number of posts : 5120
    Age : 30
    Location : California, USA
    Job : Investor
    Hobbie : Computers, chess, computer chess, fashion, and philosophy
    Message : I made this forum when I was 13 High on Drugs
    Registration date : 2007-03-24

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

    Post by Dark_wizzie 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
    avatar
    RSImage
    Can I Play, Daddy?
    Can I Play, Daddy?


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

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

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

    SDL-source link is down.

    Alternate: http://homepage.o2mail.de/mkroll/bins/Wolf4SDL-1.7-src.zip
    avatar
    WLHack
    Senior Member
    Senior Member


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

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

    Post by WLHack 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
    WolferCooker
    Hardcore Wolfer
    Hardcore Wolfer


    Male
    Number of posts : 1201
    Age : 34
    Location : Pennsylvania, U.S.A
    Hobbie : Video Games (mostly PC), but been rapidly losing interest in it recently
    Registration date : 2010-09-24

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

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

    Hack, Chaosedit link is down as well. Just started a thread on it.
    avatar
    RSImage
    Can I Play, Daddy?
    Can I Play, Daddy?


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

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

    Post by RSImage 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/GCC 3.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
    WolferCooker
    Hardcore Wolfer
    Hardcore Wolfer


    Male
    Number of posts : 1201
    Age : 34
    Location : Pennsylvania, U.S.A
    Hobbie : Video Games (mostly PC), but been rapidly losing interest in it recently
    Registration date : 2010-09-24

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

    Post by WolferCooker 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.
    avatar
    RSImage
    Can I Play, Daddy?
    Can I Play, Daddy?


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

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

    Post by RSImage 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
    Andy
    Seasoned Wolfer
    Seasoned Wolfer


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

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

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

    Make it equal to 0 (zero) not 1, and you should be ok.
    avatar
    RSImage
    Can I Play, Daddy?
    Can I Play, Daddy?


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

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

    Post by RSImage 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?
    avatar
    Guest
    Guest


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

    Post by Guest 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
    avatar
    RSImage
    Can I Play, Daddy?
    Can I Play, Daddy?


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

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

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

    Chris Chokan! Hi.

    Good question lol.

    Maybe I can start with 64.
    AlumiuN
    AlumiuN
    Don't Hurt Me!
    Don't Hurt Me!


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

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

    Post by AlumiuN 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.
    avatar
    RSImage
    Can I Play, Daddy?
    Can I Play, Daddy?


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

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

    Post by RSImage 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
    AlumiuN
    Don't Hurt Me!
    Don't Hurt Me!


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

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

    Post by AlumiuN 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 schön. Razz
    Andy
    Andy
    Seasoned Wolfer
    Seasoned Wolfer


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

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

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

    He must be using the Wayne Newton dialect.  Suspect
    wolfszemi
    wolfszemi
    Freshmen
    Freshmen


    Male
    Number of posts : 19
    Age : 33
    Location : Hungary
    Hobbie : Game modding or making
    Registration date : 2015-02-17

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

    Post by wolfszemi Wed Jun 19, 2019 1:48 pm

    I received this error:  "x:\Wolf4SDL-1.7-src\Makefile.win [Build Error]  [../Projects/Wolf3d/fmopl.o] Error -1073741819"

    Remember: First time I work with this source code.
    And this is the only error, nothing else, in Dev-CPP.
    avatar
    Guest
    Guest


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

    Post by Guest Sat Jun 22, 2019 2:44 pm

    Hello wolfszemi,

    You might have better luck using the updated source code from AlumiuN and Andy here:
    https://github.com/AlumiuN/Wolf4SDL

    As the wolf4sdl.dev file in v1.7 has not been updated to match the fmopl directory if I remember right.

    Sponsored content


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

    Post by Sponsored content


      Current date/time is Sun Apr 28, 2024 12:50 am