Wolf4SDL released

For the discussion and creation of tutorials for use with the SDL Version of the Wolfenstein Source

Moderators: ronwolf1705, TheTalentedMrLeo, Schabbs, Andy_Nonymous

User avatar
Ripper
Code Master - Developer
Code Master - Developer
Posts: 527
Joined: Sat Mar 15, 2003 7:39 pm
Location: Germany

Wolf4SDL released

Post by Ripper »

Wolf4SDL is an open-source port of Wolfenstein 3D to the cross-plattform
multimedia library "Simple DirectMedia Layer (SDL)" (http://www.libsdl.org).

Supported operating systems should be at least:
- Windows 2000, Windows XP, Windows Vista
- Linux
- BSD variants

This port includes the OPL2 emulator from MAME, so you can not only hear the
Adlib sounds but also music without any Adlib-compatible soundcards!
Digitized sounds are played on 8 channels! So in a fire fight you will always
hear, when a guard opens the door behind you ;)

Higher screen resolutions (multiples of 320x200, default is 640x400) can be
set using the --res parameter (start Wolf4SDL with --help to see usage).

See http://www.chaos-software.de.vu for downloads!

I hope this port will be more successful than Wolf4GW, as you can generate native Windows applications with it, which do NOT rely on slow emulation via DosBox or alike.
Life is an awful game, but the graphics resolution rocks ;D
User avatar
BrotherTank
Forum Administrator
<b>Forum Administrator</b>
Posts: 2203
Joined: Sat Mar 01, 2003 4:34 pm
Location: Ontario

Post by BrotherTank »

So that's where you've been hiding... lol...

Good to hear you back Ripper.
Looks like you've been busy in your absense... in a good way...
Hope all is well with you and things at your end....
And now to see if this thing will run on good ol' Win98 SE with all the service packs installed...

Greg
BrotherTank
User avatar
Andy_Nonymous
DieHard Officer
DieHard Officer
Posts: 578
Joined: Wed Apr 02, 2003 9:24 pm
Location: New Jersey, USA

Wolf4SDL released

Post by Andy_Nonymous »

Ripper,

Nice work! I am running it under Windows 98 SE and I notice better sound, and objects further away are much clearer now, where in the original game they got fuzzier in the distance.

I have mixed emotions about this though, as I am a DOS (mode) die hard, and don't want to see my favorite game become Windows-dependent. But I'm sure this will make many other Wolf3D fans quite happy, especially the Windows XP users.

Andy
User avatar
insurrectionman
DieHard Mutant
DieHard Mutant
Posts: 770
Joined: Sat May 07, 2005 6:09 pm

Post by insurrectionman »

So, this uses Visual C++, what version is best for it?
Youtube Channel: TreeSapThief
Twitter: @treesapthief
User avatar
Tricob
Moderator
<b>Moderator</b>
Posts: 9040
Joined: Tue Mar 15, 2005 2:43 am
Location: Neo-traditions, Inc.

Post by Tricob »

Good to see a project like this come to light. :) Any chance we could have a more compatible hi-res graphics mode run in the game, such as 800x600, 1024x768, or 1280x1024?

And I want you to know that I've always liked Wolf4GW and its concept. I imagine Watcom was too big a file for anyone to download on Dial-up, though. :(
User avatar
the_fish
Bring 'em On
Bring 'em On
Posts: 133
Joined: Sat Nov 18, 2006 5:28 pm
Location: England

Post by the_fish »

Haha, NICE! Good to see you again, Ripper!

Now I have a hard choice...either I go ahead and continue with 4GW, or I port over as much of my code as I can into this new version.
Hmm...aww heck, I've pretty much GOT to port now. DOS was beginning to annoy me, what with the lack of decent stereo/adlib support, and 4:3 resolutions (which I still need to look into, but it looks much more possible now we're on Windows libraries). Bye bye early release date...

Any major code changes between this version and 4GW (i.e. ones that aren't in the low-level vh/vl/us etc. functions)? Notably on the graphics front - a cursory examination show it to be mostly the same apart from the ThreeDRefresh, but I can paste my code around that.

This is freakin' AWESOME! Thanks so much! :D :D :D

[/shameless Ripper fanboyism]
Mostly away: revising for finals (argh!)
Soldat 555

Post by Soldat 555 »

It's very cool, I'm thinking about using the source to make my next Wolf3d Project. :D

But quick question, do I just copy the source to the folder that has the Wolf3d code or do I have to delete the .C files and keep the .CPP or what?


:storm: Joshua "Mad Dog" Waight :storm:
User avatar
Ripper
Code Master - Developer
Code Master - Developer
Posts: 527
Joined: Sat Mar 15, 2003 7:39 pm
Location: Germany

Wolf4SDL released

Post by Ripper »

@BrotherTank: Well, studying, working, other people's problems... you know, how it's going ;)
But Klooni also has several finger prints on it, so there was still a bit of time for Wolf. When I installed Vista in a 64 bit version (yes, embarrasing and much to my regret), playing Wolf on my computer became impossible. Although I already started the project some time before, this increased my need for such a more platform independent solution.
I'm alright, thanks, but I hope you feel much better than you felt when I was around the last time.
SDL claims to officially support Win98:
The current version supports Linux, Windows CE/95/98/ME/XP/Vista, BeOS,
MacOS Classic, Mac OS X, FreeBSD, NetBSD, OpenBSD, BSD/OS, Solaris, IRIX,
and QNX. The code contains support for Dreamcast, Atari, AIX, OSF/Tru64,
RISC OS, SymbianOS, Nintendo DS, and OS/2, but these are not officially
supported.
So hopefully it should not be a problem :D

@Andi: Thanks! And very good that the sound also got better on Win98! What kind of sound card are you using?
Wolf4SDL is not Windows-dependent at all! As I said, SDL is a cross-plattform library. I already played it on Gentoo Linux and a friend played it on FreeBSD. And if you want to play it in DOS, have a look at the HX DOS-Extender (scroll a bit down to "About SDL").
But as I said, for Vista 64 users projects like this are the only hope to play Wolfenstein 3D with the original feeling (I hate those blured OpenGL ports).
insurrectionman wrote:So, this uses Visual C++, what version is best for it?
For Windows I use Visual C++, yes, but I don't know, which is best. I used Visual Studio 2005 for it. Microsoft supplies a free version of the new version as "Visual C++ 2008 Express Edition" under http://www.microsoft.com/express/download/. For Linux I used GCC.
But for Windows you should also be able to use Cygwin or MinGW, though I haven't tried, yet.
Tricob wrote:Good to see a project like this come to light. Any chance we could have a more compatible hi-res graphics mode run in the game, such as 800x600, 1024x768, or 1280x1024?
Currently the scaling is implemented quite simple, as the scaling factor is an integral number. With other resolutions this becomes much more difficult: What do you do with the title screen? Scale it with a high integral scaling factor and then center it? What do you do with the main menu? The same? Or do we want the borders to be filled "accordingly"? This could become very specialized... Nevertheless, you can disable the "is multiple of" check in the source code. The ingame graphic should be OK already, although I didn't test it with the latest version...
Tricob wrote:And I want you to know that I've always liked Wolf4GW and its concept. I imagine Watcom was too big a file for anyone to download on Dial-up, though.
Well, Visual Studio isn't a small download, too. For a dial-up connection I guess MinGW is the way to go (which stands for "Minimalist GNU for Windows").

@the_fish: Wolf4SDL is based on Wolf4GW, so you should recognize large parts of the code. It shouldn't be very difficult to port the code to Wolf4SDL.
Speaking of Wolf4GW, I forgot to thank Chris for his work on Wolf4GW in the credits *doh*
And as I said, the problem with 4:3 resolutions is not the ingame graphics, but fullscreen images, the statusbar, things like that. But that is only a question of people writing the code for it ;)
Yes, there are some IMPORTANT CHANGES you should take care of:
  • Input processing is not done via interrupts anymore! Instead you have to call IN_ProcessEvents() in order to process any events like key presses or mouse movements. Alternatively you can also call IN_WaitAndProcessEvents(), which waits for an event before processing, if no event was available.
    So if you have a loop with a blinking cursor where you are waiting for some key to be pressed, this loop MUST contain a IN_ProcessEvents() or a IN_WaitAndProcessEvents() call. Otherwise the program will never notice any keypress.
  • Don't write something like for example "while(!Keyboard[sc_X]) IN_ProcessEvents();" to wait for the player to press the X key. This would result in a 100% CPU usage. A notebook's accu wouldn't last long with this loop ;)
    Either use IN_WaitAndProcessEvents() or add SDL_Delay(5) to the loop, which waits for 5 ms before it continues.
  • Use the data type "int" with caution. As Wolf4SDL is meant to be cross-platform, you have to take special care with datatypes which have different meanings on different platforms. On a 16-bit system, int is 16-bit. On a 32-bit system, int is 32-bit. On a 64-bit system int is 64-bit. If you load an int from the disk (think of a special data file you created), different things will happen on different systems.
    Instead use int8_t for 8-bit ints, int16_t for 16-bit ints, int32_t for 32-bit ints, and int64_t for 64-bit ints! For unsigned integers there are uint8_t, uint16_t, uint32_t, and uint64_t. You can also use the types defined in wl_def.h: byte, word, fixed, longword, boolean, and memptr.
  • All paintings are done to the surface pointed to by "curSurface", which currently always points to a buffer surface. To make the changes visible you have to call VH_UpdateScreen().
I'm happy that you're so positive about this project :D

@Das soldat 555: Just unpack the Wolf4SDL sourcecode download and use the source in the newly created folder. You cannot use the old C files directly as they contain 16-bit code, while Wolf4SDL is 32-bit, just like Wolf4GW. If you want to use code from old projects, you will probably have to port it. As long as you didn't use assembler routines, this shouldn't be very difficult, though.

Well, that was too much text for a forum post... But I had a lot to say :mrgreen:
Life is an awful game, but the graphics resolution rocks ;D
User avatar
Andy_Nonymous
DieHard Officer
DieHard Officer
Posts: 578
Joined: Wed Apr 02, 2003 9:24 pm
Location: New Jersey, USA

Re: Wolf4SDL released

Post by Andy_Nonymous »

Ripper wrote:@Andi: Thanks! And very good that the sound also got better on Win98! What kind of sound card are you using?
I have a Diamond Monster MX-300 PCI sound card. I think the reason it sounds better in Wolf4SDL is because for DOS it emulates Sound Blaster Pro in Windows rather than supporting DOS directly. I also think this is why there were digitized sound problems running Wolf4GW after it was updated to support DOSBox and/or VDMSound.

The card was inherited (free!) and has a great sounding Wavetable, so I have stuck with it despite its flaws. Changing to any other operating system than Win98, it will have to go, as there are no other drivers for this short-lived card.

Andy
User avatar
the_fish
Bring 'em On
Bring 'em On
Posts: 133
Joined: Sat Nov 18, 2006 5:28 pm
Location: England

Post by the_fish »

For the record, I've tried compiling this in Visual Studio 6.0: not only will the solution file not open, but there are a shedload of errors caused by slight differences in syntax rules (this could be because I suck at getting the SDL libraries to link properly). That'll teach me to use decade old software...

I'm downloading VS C++ Express 9.0 now from the link above, lets hope that works better :)

BTW, looking at the list of possible platforms...SymbianOS? Wolf3D mods on mobile phones? Can it be true!??
Mostly away: revising for finals (argh!)
User avatar
insurrectionman
DieHard Mutant
DieHard Mutant
Posts: 770
Joined: Sat May 07, 2005 6:09 pm

Post by insurrectionman »

I can't get the SDL libraries to work either, i have visual c++ Express 2005 and idk where to find the SDL files (libraries) as I am unfamiliar with this new engine you slapped out. I would like to learn this code... even tho its about the same as wolf4gw and i've become quite familiar to it.
Youtube Channel: TreeSapThief
Twitter: @treesapthief
User avatar
WSJ
DieHard Officer
DieHard Officer
Posts: 534
Joined: Sun Apr 18, 2004 1:16 am
Location: Development Hell

Post by WSJ »

Wow... if I can get this to work, it may be just what I needed. With multiple sound channels, it'll be possible to have things like footsteps, pain screams, and "ricochet" sounds when a bullet misses. Not to mention, it's pretty damn nice to hear music and locational sound working again. And yes, it'd be great if I didn't have to worry about my mod being unplayable in Vista (apparently, the term "backward-compatibility" is missing from Microsoft's vocabulary.) Great work, Ripper! I'll definitely have to look further into this.
User avatar
Tricob
Moderator
<b>Moderator</b>
Posts: 9040
Joined: Tue Mar 15, 2005 2:43 am
Location: Neo-traditions, Inc.

Re: Wolf4SDL released

Post by Tricob »

Ripper wrote:
Tricob wrote:Good to see a project like this come to light. Any chance we could have a more compatible hi-res graphics mode run in the game, such as 800x600, 1024x768, or 1280x1024?
Currently the scaling is implemented quite simple, as the scaling factor is an integral number. With other resolutions this becomes much more difficult: What do you do with the title screen? Scale it with a high integral scaling factor and then center it? What do you do with the main menu? The same? Or do we want the borders to be filled "accordingly"?
I think "filling in the borders" shouldn't be done by the code unless the command line parameter requests it. A lot of Wolf3D purists would object to "border filling" like this. :(

And as far as VGAGRAPH-based images are concerned, here's how I'd do it:

Let's say your having the size of the enlarged pixels set to the variable "NewPixelSize". If it's 3, then each enlarged pixel would be 3x3. If it's 4, then each enlarged pixel would be 4x4. The enlarged pixels are given a upper-left "boundary" which they should not draw outside of. The enlarged pixel drawn at the northwest corner of our boundary (which would be coordinate 0,0 for MCGA) is drawn on coordinate (LowestX, LowestY).

Now, let's say the resolution is 1024x768. First we'd take the vertical resolution (768) and divide it by 200. Changing it to an integer form, it becomes the fixed value of 3.84, or simply 3. So the NewPixelSize variable is given the value of 3.

The next step is setting up alignment, so variables LowestX and LowestY will have the right values, and menus, title screens, and the enlarged image of the game will be drawn in the center of the screen. To find the value of the LowestX variable, take the width of the MCGA screen (320) and multiply it by NewPixelSize, which in this case is 3. We'd get 960. Now take 960 and subtract it from the actual screen width, which would be 1024 in this case. We get 64. If the number the code gets is *not* Zero, we divide the number by 2, and get 32. So in this case, the LowestX variable is given the value of 32.

That's the approach I'd use, anyway. It would keep the 960x600 modes and 640x400 modes working the same as they did before, but would open the door to new graphics modes the game didn't use previously.

I'm sure you can come up with a solution far less bloated, though. :-)
User avatar
AlumiuN
DieHard Wolfer
DieHard Wolfer
Posts: 2744
Joined: Fri Nov 30, 2007 3:34 am
Location: Christchurch, New Zealand

Post by AlumiuN »

Quick question - does curSurface take all drawing in 320x200 and then scales it up, or does it have a dynamic size based on the resolution? (Because if it's the latter, I have a HUD, an automap AND a sky image displayer to recode! :-( )
User avatar
the_fish
Bring 'em On
Bring 'em On
Posts: 133
Joined: Sat Nov 18, 2006 5:28 pm
Location: England

Post by the_fish »

@ AlumiuN: as far as I can tell, the draw routines are identical to 4GW, with no reference to the screenWidth or scaleFactor, so I assume it scales it up. They all reference viewwidth, which seems unchanged. I could be wrong though...

The problem with my code being in such a late stage of development means that I can't really add things to the engine bit by bit and test as I go along. It's got to be all or nothing :( So I'll have a definite answer for you when that's done (tomorrow? the day after? I dunno), when my code either does or doesn't work...

Anyway, good news on the compiling front! Visual Studio C++ Express 9.0 works fine, though it is an 87Mb download. You need the SDL header files frpm here, and the SDL_mixer library from here. Then in VC++, go to "Project-->Wolf4SDL Properties" and change the additional include directories from Ripper's "F:\SDL etc." to wherever your SDL include directory is, and change the linker additional library directories (from "F:\SDL blah etc.") to wherever the SDL_mixer lib directory is.

Works for me, though I don't have the default wolf3d files to test it with. Menu looks sweet though :)

You have NO IDEA how nice it feels to be back in a decent dev environment again after using Watcom. I can find stuff! Easily!
Mostly away: revising for finals (argh!)
User avatar
insurrectionman
DieHard Mutant
DieHard Mutant
Posts: 770
Joined: Sat May 07, 2005 6:09 pm

Post by insurrectionman »

idk what's going on, but I have all the included files and linker files, and i get an error that it cannot find the "windows.h" file, where can I get a replacement, and where does it go, because I assume if someone got it working they can just let me copy the same windows.h file they have.
Youtube Channel: TreeSapThief
Twitter: @treesapthief
User avatar
Andy_Nonymous
DieHard Officer
DieHard Officer
Posts: 578
Joined: Wed Apr 02, 2003 9:24 pm
Location: New Jersey, USA

Wolf4SDL released

Post by Andy_Nonymous »

I am actually able to launch this from a Win98 command prompt, so I am happy!

Noticed a "bug": the enter and arrow keys on the numerical pad are ignored once the Options screen comes up; before then the enter key could be used to change the screens. I only use the numerical pad on the menus, so it's not a big deal. My computer-head friends tell me to use the proper arrow keys anyway, and leave the Num Lock on. :-P

Also, the mouse is detected, but does not work on the menus nor in the game. I never use the mouse for Wolf3D, but I'm sure many others do.

Has anyone else encountered these bugs? Are they Win98-specific, or "Andy-specific?"

I tested it in Windows Me and in XP, and sweetness! Sounds and music together for the first time! :lol:

Ripper, you da man! :tup:
User avatar
Ripper
Code Master - Developer
Code Master - Developer
Posts: 527
Joined: Sat Mar 15, 2003 7:39 pm
Location: Germany

Wolf4SDL released

Post by Ripper »

@Andy_Nonymous: Yes, this may have caused the problems with Wolf4GW.

@the_fish: Visual Studio 6 implements an older version of the C++ standard as the newer Visual Studios. But as the new versions are free, I hope this is not a problem for someone.

@WSJ: Thanks! I'm looking forward to see your first Wolf4SDL based mod :mrgreen:
Tricob wrote:I think "filling in the borders" shouldn't be done by the code unless the command line parameter requests it. A lot of Wolf3D purists would object to "border filling" like this.
Of course, I want Wolf4SDL to look like the original Wolf as much as possible on all resolutions. Especially 320x200 should look exactly like the original (except for bug fixes of course).
Hm yes, the way you described the centering is the way I thought of. Hmm... do we want the ingame graphic to use the full resolution or do we want to scale it just like the menu and title screen (using centering)?
AlumiuN wrote:Quick question - does curSurface take all drawing in 320x200 and then scales it up, or does it have a dynamic size based on the resolution? (Because if it's the latter, I have a HUD, an automap AND a sky image displayer to recode! )
If you operate on curSurface directly (like it's done in wl_draw.cpp and id_vl.cpp), you have the full sized surface in your hands. But there are several functions (VWB_...) which automatically scale whatever you draw (for example VWB_Bar takes coordinates for a 320x200 screen and paints it scaled to the actual resolution). It may be not very consistent though. If you have any suggestions on this mess, I'm happy to hear about it ;)

@the_fish: I think there are some other traps, but I hope they will be found before they can do major damage to our brains!
Thanks for the description on how to use VSC++ Express 9.
Man, I really had to laugh when I read about the comparison to the Watcom "IDE". I'm still working on reformating the code which was totally unformatted by that stupid editor...

@insurrectionman: I have no idea, how you managed not to find "windows.h"! Could you please show me the content of the "All options" field in the project properties -> C/C++ -> Command Line?

@Andy_Nonymous: I don't understand the problem with the numpad, yet, but I guess I'll find out, when I try to use it.
For the mouse to work, you have to press the "Scroll lock" key. In windowed mode, this makes sense, so you can use the mouse to click around in other windows, but in fullscreen mode, the mouse should always be "locked".
Life is an awful game, but the graphics resolution rocks ;D
User avatar
insurrectionman
DieHard Mutant
DieHard Mutant
Posts: 770
Joined: Sat May 07, 2005 6:09 pm

Post by insurrectionman »

my command line is this:

/Od /I "C:\SDL-1.2.12\include" /D "_MBCS" /Gm /EHsc /RTC1 /MDd /Fo"Debug\\"
/Fd"Debug\vc80.pdb" /W3 /nologo /c /Wp64 /ZI /TP /errorReport:prompt
Youtube Channel: TreeSapThief
Twitter: @treesapthief
User avatar
Ripper
Code Master - Developer
Code Master - Developer
Posts: 527
Joined: Sat Mar 15, 2003 7:39 pm
Location: Germany

Wolf4SDL released

Post by Ripper »

@insurrectionman: OK, that looks (except for the sdl path, of course) exactly like my command line for the "Debug" configuration. I normally use the "Release" configuration, but "Debug" is also working on my system. I checked where to find "windows.h" in Visual Studio 2005 and found it at "C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\Include". Does a similar directory exist on your system?
Perhaps you didn't install the PlatformSDK (whereever one could have disabled this)?
Perhaps you have to reinstall Visual Studio to get the PlatformSDK. Be warned, that windows.h is not the only file, that is missing! So sending you this file wouldn't fix it.

@Andy_Nonymous: The numpad and the enter key, and the mouse in fullscreen are fixed in the current svn revision.

Apropos SVN: I strongly recommend you to use the version control system "Subversion" (http://subversion.tigris.org/). Using svn you can simply find out the differences between the version of the Wolf4SDL source code, when you started with a mod, and the current version. Then you can merge the differences to your project (with luck this even works automatically) and stay up to date.
As written in the readme and on the homepage, the svn repository can be found at: svn://tron.homeunix.org:3690/wolf3d/trunk
(yes, your browser won't show you anything, if you click on it)

So if you use the command-line version of Subversion, you can check out the current version into the subfolder "wolf4sdl" with the following command on the command prompt:
svn checkout svn://tron.homeunix.org:3690/wolf3d/trunk wolf4sdl
The following commands all have to be executed in the "wolf4sdl" subfolder:
To update the source code to the current version simply write:
svn up
To see the difference between two revisions n and m, where n and m are numbers, write:
svn diff -r n:m | more
or
svn diff -r n:m > diff.diff
To see the log messages for the revisions write:
svn log | more
Of course there would be much more to say about it, but there are whole web pages about it...
I guess you should have one checkout of wolf4sdl where you can see the differences and one independent folder containing your own project.
Btw, it definately makes sense to create an own repository for your wolf projects both for version control and backup reasons. This can make your life a lot easier, if you try to get rid of a bug, you included in your project recently. Of course, you shouldn't have the repository and your working copy on the same harddisk.
Life is an awful game, but the graphics resolution rocks ;D
User avatar
Codetech84
Code Master
Code Master
Posts: 1282
Joined: Wed Mar 12, 2003 4:38 pm
Location: Rauma - Finland

Wolf4SDL released

Post by Codetech84 »

Just compiled it with MingW.

Requires little tweaking to shut-up the warnings and errors, but works fine. I'm considering to make the move from dos to this platform, so XP/Vista users don't have to use emulation in order to play mods in all their glory.

Now waiting for the standard issue tutorials (textured floor/ceiling, directional-3d sprites, etc...) to be converted to the new generation. :mrgreen:

Good job, looks and feels like the original... :tup:
User avatar
insurrectionman
DieHard Mutant
DieHard Mutant
Posts: 770
Joined: Sat May 07, 2005 6:09 pm

Post by insurrectionman »

okay, i got it compiled, but of course there's about 40+ warnings, all of the UINT, or "strcat". Also I tried to insert my wolf4gw palette numbers in the gamepal3d.cpp, but it was all wrong colors, is there a difference between the gamepal3d files?
Youtube Channel: TreeSapThief
Twitter: @treesapthief
User avatar
Tricob
Moderator
<b>Moderator</b>
Posts: 9040
Joined: Tue Mar 15, 2005 2:43 am
Location: Neo-traditions, Inc.

Post by Tricob »

Ripper - I noticed that the full size game window isn't available yet (biggest size available is 19, not 20). Does my tutorial below work with Wolf4SDL?

http://diehardwolfers.areyep.com/viewtopic.php?t=4829
User avatar
Ripper
Code Master - Developer
Code Master - Developer
Posts: 527
Joined: Sat Mar 15, 2003 7:39 pm
Location: Germany

Wolf4SDL released

Post by Ripper »

@Codetech84: I tried to compile it with Cygwin and it didn't compile yet, too. Can you tell me about the "little tweaking"?

@insurrectionman: I removed all warnings appearing in VSC++ 8 in the current svn version. And yes, there is a difference for the gamepal file. Because SDL_Color is used instead of 3 bytes, each color has to be represented by 4 bytes now. That means, that coming from a gamepal.c you have to add a zero after each three bytes apart from changing the declaration... But I'm still thinking up another solution for this... Btw, how did you generate your Wolf4GW palette file?

@Tricob: First I wasn't sure, whether I want to include the full size feature in the base version of Wolf4SDL, but than I thought, why not? If you want the original feel, you don't have to use the full size option. I'm currently porting that feature and you already saved me much time to find the cause of a crash with your post! Good work!


Are there any more features we should include in the base version of Wolf4SDL? Of course features, which will only be activated when really used, so the standard game looks, feels and acts like the original.
Life is an awful game, but the graphics resolution rocks ;D
User avatar
Tricob
Moderator
<b>Moderator</b>
Posts: 9040
Joined: Tue Mar 15, 2005 2:43 am
Location: Neo-traditions, Inc.

Re: Wolf4SDL released

Post by Tricob »

Ripper wrote:@Tricob: First I wasn't sure, whether I want to include the full size feature in the base version of Wolf4SDL, but than I thought, why not? If you want the original feel, you don't have to use the full size option. I'm currently porting that feature and you already saved me much time to find the cause of a crash with your post! Good work!
Thanks. Something told me I'd be able to figure out what was causing the full-size window crash, so I went ahead and investigated. :)
Are there any more features we should include in the base version of Wolf4SDL? Of course features, which will only be activated when really used, so the standard game looks, feels and acts like the original.
If it's not working already, I'd like a functional Plane 3 in the code. Insurrectionman and I are running into troubles getting the floor/ceiling textures working right in Wolf4GW; objects on the map seem to be giving the Plane 3 squares bad data. Test system - 1.5 GHz PC w/ 512 MB RAM and WinXP Home edition.
User avatar
insurrectionman
DieHard Mutant
DieHard Mutant
Posts: 770
Joined: Sat May 07, 2005 6:09 pm

Post by insurrectionman »

I figured it out, what i did is found out that the 0's at the 4 byte, and i organized the numbers and added the "0," after every three numbers. It works now, and I have been merging tutorials into the engine now. So far I have gotten hi-res to work, but not textured floors\ceilings, because of some changes, i have just begun looking into that, and i will see what other tutorials i can get working.
Youtube Channel: TreeSapThief
Twitter: @treesapthief
User avatar
AlumiuN
DieHard Wolfer
DieHard Wolfer
Posts: 2744
Joined: Fri Nov 30, 2007 3:34 am
Location: Christchurch, New Zealand

Post by AlumiuN »

I think I might just hardcode my mod at 640x400 and make scaleFactor 1 so that I can have hi-res vgaGraph images as well. As for the working plane 3 thing, can you also see about planes 4-8(I know 8 is probably over the top, but why not? :-))?
User avatar
the_fish
Bring 'em On
Bring 'em On
Posts: 133
Joined: Sat Nov 18, 2006 5:28 pm
Location: England

Post by the_fish »

Argh! I've spent the last two evenings porting over my code and it's currently being very unreasonable.

The errors I'm getting don't appear to be due to my code, though, which is strange...it's not recognising the mouse anymore, and crashes when going to the 'customize controls' screen - it breaks erratically when accessing the third plane (not always, but sometimes) - it locks up when playing any sound or music (ok, this one may be my fault), and it crashes just after the 'get psyched!' preload during 'PollControls'.

Guess I'm going to have to start over, and add stuff bit by bit again.

BTW untested, but all I can find that differs in most of the draw code is that '*80' is consistently replaced by '*vbufPitch'. Hope this helps someone.
Mostly away: revising for finals (argh!)
User avatar
Codetech84
Code Master
Code Master
Posts: 1282
Joined: Wed Mar 12, 2003 4:38 pm
Location: Rauma - Finland

Re: Wolf4SDL released

Post by Codetech84 »

Ripper wrote:@Codetech84: I tried to compile it with Cygwin and it didn't compile yet, too. Can you tell me about the "little tweaking"?
Sure, I'll dig up the changes I made, I'll post my revision with .cbp project file tomorrow.

It still gives me some warnings in PushWall(), MovePWalls() and SetupGameLevel() when casting (byte) tile into (objtype *), but it works.
User avatar
Tricob
Moderator
<b>Moderator</b>
Posts: 9040
Joined: Tue Mar 15, 2005 2:43 am
Location: Neo-traditions, Inc.

Post by Tricob »

insurrectionman wrote:I figured it out, what i did is found out that the 0's at the 4 byte, and i organized the numbers and added the "0," after every three numbers. It works now, and I have been merging tutorials into the engine now.
Would you please send me the source files you changed? Thanks. :-)