GithubHelp home page GithubHelp logo

jonof / jfsw Goto Github PK

View Code? Open in Web Editor NEW
80.0 11.0 17.0 3.56 MB

Port of the 3D Realms game "Shadow Warrior"

Home Page: http://www.jonof.id.au/jfsw

C 98.03% Objective-C 0.46% Makefile 0.13% Batchfile 0.01% NSIS 0.09% HTML 1.21% Shell 0.04% PowerShell 0.04%

jfsw's Introduction

JonoF's Shadow Warrior Port

by Jonathon Fowler, with contributions by Ken Silverman and others

This is the source code for my port of 3D Realms' Shadow Warrior using my port of Ken Silverman's Build game engine.

Minimum system requirements

  • 32 or 64-bit CPU. These have been tried first-hand:
    • Intel x86, x86_64
    • PowerPC 32-bit (big-endian)
    • ARM 32-bit hard-float, 64-bit
  • A modern operating system:
    • Linux, BSD, possibly other systems supported by SDL 2.0.
    • macOS 10.15+
    • Windows Vista, 7, 8/10+
  • Optional: 3D acceleration with OpenGL 2.0 or OpenGL ES 2.0 capable hardware.

You will require game data from an original release of Shadow Warrior. Refer to the documentation on my website on what releases are suitable and where to locate their game files.

Compilation

Before you begin, clone this repository or unpack the source archive. If you cloned using Git, be sure to initialise the submodules of this repository (i.e. git submodule update --init).

Now, based on your chosen OS and compiler:

Linux and BSD

  1. Install the compiler toolchain and SDL2 development packages, e.g.
    • Debian 9: sudo apt-get install build-essential libsdl2-dev
    • FreeBSD 11: sudo pkg install gmake sdl2 pkgconf
  2. Install optional sound support development packages.
    • Debian 9: sudo apt-get install libvorbis-dev libfluidsynth-dev
    • FreeBSD 11: sudo pkg install libvorbis fluidsynth
  3. Install GTK+ 3 development packages if you want launch windows and editor file choosers, e.g.
    • Debian 9: sudo apt-get install libgtk-3-dev
    • FreeBSD 11: sudo pkg install gtk3
  4. Open a terminal, change into the source code directory, and compile the game with: make or gmake (BSD)
  5. Assuming that was successful, run the game with: ./sw

macOS

  1. Install Xcode from the Mac App Store.
  2. Fetch and install the SDL 2.0 development package:
    1. Fetch SDL2-2.0.x.dmg from http://libsdl.org/download-2.0.php.
    2. Copy SDL2.framework found in the DMG file to ~/Library/Frameworks. Create the Frameworks directory if it doesn't exist on your system.
  3. Open sw.xcodeproj from within the JFShadowWarrior source code's xcode folder.
  4. From the Product menu choose Run.

Windows using Microsoft Visual C++ 2015 (or newer) and NMAKE

  1. If needed, install Visual Studio Community 2017 for free from Microsoft. Terms and conditions apply. Install at minimum these components:
    • VC++ 2015.3 v140 toolset for desktop (x86,x64)
    • Windows Universal CRT SDK
    • Windows 8.1 SDK
  2. Open the command-line build prompt. e.g. VS2015 x64 Native Tools Command Prompt or VS2015 x86 Native Tools Command Prompt.
  3. Change into the JFShadowWarrior source code folder, then compile the game with: nmake /f Makefile.msvc
  4. Assuming success, run the game with: sw

Compilation options

Some engine features may be enabled or disabled at compile time. These can be passed to the MAKE tool, or written to a Makefile.user (Makefile.msvcuser for MSVC) file in the source directory.

These options are available:

  • RELEASE=1 – build with optimisations for release.
  • RELEASE=0 – build for debugging.
  • USE_POLYMOST=1 – enable the true 3D renderer.
  • USE_POLYMOST=0 – disable the true 3D renderer.
  • USE_OPENGL=1 – enable use of OpenGL 2.x acceleration.
  • USE_OPENGL=3 – enable use of OpenGL 3.x acceleration.
  • USE_OPENGL=USE_GL2 – enable use of OpenGL 2.x acceleration. (Not a valid setting for MSVC.)
  • USE_OPENGL=USE_GL3 – enable use of OpenGL 3.x acceleration. (Not a valid setting for MSVC.)
  • USE_OPENGL=USE_GLES2 – enable use of OpenGL ES 2.0 acceleration. (Not a valid setting for MSVC.)
  • USE_OPENGL=0 – disable use of OpenGL acceleration.
  • WITHOUT_GTK=1 – disable use of GTK+ to provide launch windows and load/save file choosers.

Warnings

  1. You should exercise caution if you choose to use multiplayer features over untrustworthy networks with untrustworthy players.
  2. 3D Realms and Apogee do not support this port. Contact me instead.

Enjoy!

Jonathon Fowler

jfsw's People

Contributors

bszili avatar danielgibson avatar jonof avatar martymac avatar plagman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jfsw's Issues

No "Lo Wang's Rap" credit sequence

Even when music is present the end game credit sequence isn't playing, because SongIsPlaying() is currently hardcoded to be FALSE, which causes the CreditsLevel() loop to break immediately.

original retail MacOS group not detected as registered

The SW Group file from the retail Lion classic MacOS port shows up as Mac Registered Version but starts as shareware, even if named swmac.grp. I had to manually change it to GRPFILE_GAME_SWSW in src/grpscan.c to get it to start registered.

Cannot compile due to missing Makefile.shared

I just did a clone of the repo and cannot build due to the following error:

andrew@schotty-tower-wired:~/workspace/git_repos/jfsw> make
Makefile:165: jfbuild/Makefile.shared: No such file or directory
make: *** No rule to make target 'jfbuild/Makefile.shared'.  Stop.
andrew@schotty-tower-wired:~/workspace/git_repos/jfsw> 

I noticed in the Makefile the following references to files that do not exist:

include $(AUDIOLIBROOT)/Makefile.shared
include $(EROOT)/Makefile.shared

Any tips on how to make this?
Thanks!
Andrew.

src/mdsprite.o error 1 and jfbuild/libengine.a error 2

Dear Developer,
The below errors are output when attempting to build ("RELEASE=1 make"). The build system is a PowerPC 970 x4 running a derivative of Debian Bookworm 32-bit userland on 64-bit kernel 6.0.

src/mdsprite.c:590:64: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
  590 |      if (kread(fil,(char *)m->uvs,m->numuv*sizeof(md2uv_t)) != m->numuv*sizeof(md2uv_t))
      |                                                             ^~

src/mdsprite.c:596:68: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
  596 |  if (kread(fil,(char *)m->tris,m->numtris*sizeof(md2tri_t)) != m->numtris*sizeof(md2tri_t))
      |                                                             ^~

src/mdsprite.c:613:43: warning: comparison of unsigned expression in '>= 0' is always true [-Wtype-limits]
  613 |                 for (i = m->numframes-1; i>=0; i--) {
      |                                           ^~
src/mdsprite.c:625:14: warning: comparison of unsigned expression in '< 0' is always false [-Wtype-limits]
  625 |         if (i<0) i=0;
      |              ^
src/mdsprite.c: In function 'md3load':
src/mdsprite.c:936:30: error: 'i' undeclared (first use in this function)
  936 |                         for (i=s->numtris-1;i>=0;i--) {
      |                              ^
src/mdsprite.c:936:30: note: each undeclared identifier is reported only once for each function it appears in
src/mdsprite.c:937:38: error: 'j' undeclared (first use in this function)
  937 |                                 for (j=2;j>=0;j--) s->tris[i].i[j] = B_LITTLE32(s->tris[i].i[j]);
      |                                      ^
make[1]: *** [Makefile:224: src/mdsprite.o] Error 1
make[1]: Leaving directory '/media/fienix/MediaDrive/fienix/evo_6.0/Packages-TODO/8-NewBuilds/jfsw/jfbuild'
make: *** [Makefile:226: jfbuild/libengine.a] Error 2

Segmentation faults when playing

I have been receiving regular segmentation faults when playing the shareware levels found in the full release. They always or most often seem to occur with receiving damage or dying. Here is a backtrace.

os: Slackware64-current
jfsw-54912c4_2016.02.20_master-x86_64-1_git

Reading symbols from jfsw...done.
(gdb) run
Starting program: /usr/games/jfsw 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffebeb8700 (LWP 26206)]
[New Thread 0x7fffeb6b7700 (LWP 26207)]
Added /usr/share/games/jfsw/ to search path.
Added /usr/games/ to search path.
Added /home/orbea/.jfsw/ to search path.

BUILD engine by Ken Silverman (http://www.advsys.net/ken)
Additional improvements by Jonathon Fowler (http://www.jonof.id.au)
and other contributors. See BUILDLIC.TXT for terms.

64-bit word size. Built Mar  2 2016.

Initialising SDL2 system interface (compiled with SDL version 2.0.4, runtime version 2.0.4)
Loading system OpenGL library
Detecting video modes:
  - 1600x900 8-bit fullscreen
  - 1440x900 8-bit fullscreen
  - 1366x768 8-bit fullscreen
  - 1280x1024 8-bit fullscreen
  - 1280x960 8-bit fullscreen
  - 1280x800 8-bit fullscreen
  - 1280x720 8-bit fullscreen
  - 1152x864 8-bit fullscreen
  - 1024x768 8-bit fullscreen
  - 800x600 8-bit fullscreen
  - 640x480 8-bit fullscreen
  - 640x400 8-bit fullscreen
  - 512x384 8-bit fullscreen
  - 480x360 8-bit fullscreen
  - 400x300 8-bit fullscreen
  - 320x240 8-bit fullscreen
  - 320x200 8-bit fullscreen
  - 640x480 24-bit fullscreen
  - 720x400 24-bit fullscreen
  - 800x600 24-bit fullscreen
  - 1024x768 24-bit fullscreen
  - 1152x864 24-bit fullscreen
  - 1280x1024 24-bit fullscreen
  - 1680x1050 24-bit fullscreen
  - 1600x900 8-bit windowed
  - 1440x900 8-bit windowed
  - 1366x768 8-bit windowed
  - 1280x1024 8-bit windowed
  - 1280x960 8-bit windowed
  - 1280x800 8-bit windowed
  - 1280x720 8-bit windowed
  - 1152x864 8-bit windowed
  - 1024x768 8-bit windowed
  - 800x600 8-bit windowed
  - 640x480 8-bit windowed
  - 640x400 8-bit windowed
  - 512x384 8-bit windowed
  - 480x360 8-bit windowed
  - 400x300 8-bit windowed
  - 320x240 8-bit windowed
  - 320x200 8-bit windowed
  - 1600x900 24-bit windowed
  - 1440x900 24-bit windowed
  - 1366x768 24-bit windowed
  - 1280x1024 24-bit windowed
  - 1280x960 24-bit windowed
  - 1280x800 24-bit windowed
  - 1280x720 24-bit windowed
  - 1152x864 24-bit windowed
  - 1024x768 24-bit windowed
  - 800x600 24-bit windowed
  - 640x480 24-bit windowed
  - 640x400 24-bit windowed
  - 512x384 24-bit windowed
  - 480x360 24-bit windowed
  - 400x300 24-bit windowed
  - 320x240 24-bit windowed
  - 320x200 24-bit windowed
Scanning for GRP files...
Detected registered GRP
SHADOW WARRIOR(tm) Version 1.2
Copyright (c) 1997 3D Realms Entertainment



Type 'SW -?' for command line options.

1 joystick(s) found
  1. (null)
Joystick 1 has 33 axes, 32 buttons, and 2 hat(s).
CONTROL_Startup: Mouse Present
CONTROL_Startup: Joystick Present
RTS file sw.rts was not found
Initialising timer
mmulti: This machine's IP is 127.0.0.1
Loading sound and graphics...
initcache(): Initialised with 33554432 bytes
Setting video mode 1280x1024 (8-bpp windowed)
SDL_AudioDriverName: (error)
[New Thread 0x7fffe1ffe700 (LWP 26208)]
SDL_CDNumDrives: -1
CD error: SDL CD: error opening cd device.
Can't play OGG music track: track02.ogg
Can't play OGG music track: track02.ogg
Can't play OGG music track: track04.ogg
Can't play OGG music track: track04.ogg
Can't play OGG music track: track04.ogg

Thread 1 "jfsw" received signal SIGSEGV, Segmentation fault.
0x0000000000435d32 in MNU_DoMenu ()
(gdb) bt full
#0  0x0000000000435d32 in MNU_DoMenu ()
#1  0x000000000041e808 in RunLevel ()
#2  0x000000000041f11f in NewLevel ()
#3  0x000000000041f1d7 in Control ()
#4  0x000000000041f4a5 in app_main ()
#5  0x0000000000405205 in main ()

No music in RetroPie

I compiled jfsw on a Pi4 running RetroPie 4.7, but although there's sound effects, the music is not playing.

I copied the MUSIC folder to the jfsw folder on my Pi. I understand JFSW expects the music tracks to be in the same folder as the binary so I edited the config file, /home/pi/.jfsw/sw.cfg and added the music folder as below:

OggTrackName = "MUSIC/track??.ogg"

I also tried the default location for the music tracks and reverted the sw.cfg file, but that didn't make any difference.

Build failed on 64bits OS

The OS is Ubuntu 13.04 64bits. At the end of the build process (when about to output the 'sw' binary), I got this:

/usr/bin/ld: jfbuild/src/libengine.a(dynamicgtk.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/usr/bin/ld: note: 'dlclose@@GLIBC_2.2.5' is defined in DSO /lib/x86_64-linux-gnu/libdl.so.2 so try adding it to the linker command line
/lib/x86_64-linux-gnu/libdl.so.2: could not read symbols: Invalid operation

background instead of HUD in screenshots

At least in polymost mode, haven't tried software renderer.
I guess a screenshot is the best description:
sw-bug
(everything looks ok ingame, this problem is only on the screenshots).

BTW, this screenshot also demonstrates that "Known Issue 1" from releasenotes.html seems to be fixed :-)

Fixes for some compiler warnings

I tried compiling with clang (linux64) and cranked up the warnings, which uncovered a few potential bugs, but as I'm not familiar with the code base I cannot tell for sure how to properly fix them. ;-)

So here we go:

diff --git a/src/jnstub.c b/src/jnstub.c
index d547d8d..9d2a33b 100644
--- a/src/jnstub.c
+++ b/src/jnstub.c
@@ -1401,7 +1401,7 @@ MoreKeys(short searchstat, short searchwall, short searchsector, short pointhigh
 
 
 
-    if (KEY_PRESSED(KEYSC_RALT + 128) && KEY_PRESSED(KEYSC_RCTRL + 128))
+    if (KEY_PRESSED(KEYSC_RALT /* + 128 */) && KEY_PRESSED(KEYSC_RCTRL /* + 128 */))
         {
         if (KEY_PRESSED(KEYSC_KPMINUS))
             {
@@ -2736,6 +2736,10 @@ DrawClipBox(short spritenum)
         x = mulscale14(x - posx, zoom);
         y = mulscale14(y - posy, zoom);
         }
+    else
+        {
+        x = y = 0;
+        }
 
     x += 320;
     y += 200;

The KEY_PRESSED part is a macro that eventually results in an array access. The array has 256 elements, but because of +128 an OOB access occurs (KEYSC_RALT == 184, KEYSC_RCTRL == 157). I didn't understand right away what the +128 is supposed to achieve, so just removing it is probably wrong.
The second change just fixes uninitialized variable access.

diff --git a/src/jplayer.c b/src/jplayer.c
index b2e21a1..623b117 100644
--- a/src/jplayer.c
+++ b/src/jplayer.c
@@ -651,7 +651,7 @@ void computergetinput(int snum, SW_PACKET *syn)
         // Below formula fails in certain cases
         //syn->angvel = min(max((((daang+1024-damyang)&2047)-1024)>>1,-MAXANGVEL),MAXANGVEL); //was 127
         p->pang = daang;
-        syn->aimvel = min(max((zang-p->horiz)>>1,-PLAYER_HORIZ_MAX),PLAYER_HORIZ_MAX);
+        syn->aimvel = min(max((zang-p->horiz)>>1,-MAXANGVEL),MAXANGVEL);
         // Sets type of aiming, auto aim for bots
         syn->bits |= (1<<SK_AUTO_AIM);
         return;

syn->aimvel is a signed char, but PLAYER_HORIZ_MAX is 299, so it gets truncated to 43. Not sure if this was intended, also not sure if MAXANVGEL is the proper choice here. Fun fact: MAXANGVEL is defined 100 in player.c and game.c, but 80 in jplayer.c.

I also found a few signed/unsigned mismatches in jfaudiolib - are you interested in patches for those? My initial reason for digging around was that sound is pretty broken on Linux, most sounds are very very quiet while some effects play at normal volume. No luck so far tracking it down though.

Right analog stick not working correctly

I've just installed JFSW on RetroPie on my Raspberry Pi 4 using the RetroPie-Extras install script, and everything works. I'm able to get .OGG audio running, and both expansions work correctly as well as the main game. However, I'm having a lot of trouble mapping controls.

I'm playing using my 8bitdo SN30 Pro Wired controller, which maps as an Xinput device (Xbox 360 controller). The face buttons and D-pad all map correctly, as well as the LB and RB buttons. However, none of the other buttons map as they should. In the configuration menu, L3 is actually Start, Back is actually LT/L2, Guide is actually Back/Select, and Start is actually RT/R2. On top of that, the right analog stick is completely broken. The RightY axis is always mapped to Strafe, even if I unset the configuration in the menu, and the RightX axis does nothing. The LeftTrigger and RightTrigger axes do nothing either. I don't think this is an issue with my controller, as jstest shows the axes working correctly, and it works in other games I play like lzdoom.

Feature request - simplified saving

Is it possible to add a simplified saving system that automatically names save files, for use on devices that use a gamepad and no keyboard?

thank you

Radio controlled "silver key" car screen stays at white noise

At the spot in Level 1 where you have to navigate the radio controlled car with the silver wagon the screen for the camera simply stays at white noise. You have to set back to 8 bit mode and steer the wagon to the "player accessible spot".

In high color mode the remote control screen doesn't update.

It sometimes updates, but then you see only one picture and it freezes.

Wanton Destruction LEVEL_INFO metadata

I noticed that Wanton Destruction still uses the original level names, times, etc. without adding an swcustom.txt. I looked up the LEVEL_INFO data from wanton.dat address 1646800:

{"title.map",    "theme.mid",    " ", " ", " "},
{"$bullet.map",  "e1l01.mid",    "Seppuku Station", "0 : 55", "5 : 00"},
{"$dozer.map",   "e1l03.mid",    "Zilla Construction", "4 : 59", "8 : 00"},
{"$shrine.map",  "e1l02.mid",    "Master Leep's Temple" "3 : 16", "10 : 00"},
{"$woods.map",   "e1l04.mid",    "Dark Woods of the Serpent", "7 : 06", "16 : 00"},
{"$whirl.map",   "yokoha03.mid", "Chinatown", "5 : 30", "10 : 00"},
{"$tank.map",    "nippon34.mid", "Monastary", "1 : 46", "4 : 00"},
{"$boat.map",    "execut11.mid", "Trolly Yard", "1 : 56", "10 : 00"},
{"$garden.map",  "",             "Resturant", "1 : 06", "2 : 00"},
{"$outpost.map", "sanai.mid",    "Skyscraper", "1 : 23", "3 : 00"},
{"$hidtemp.map", "kotec2.mid",   "Airplane", "2 : 05", "4 : 10"},
{"$plax1.map",   "",             "Military Base", "6 : 32", "12 : 00"},
{"$bath.map",    "",             "Train", "10 : 00", "10 : 00"},
{"$airport.map", "",             "Auto Factory", "2 : 59", "6 : 00"},
{"$refiner.map", "kotoki12.mid", "Crude Oil", "2 : 40", "10 : 00"},
{"$newmine.map", "hoshia02.mid", "Coolie Mines", "2 : 48", "10 : 00"},
{"$subbase.map", "",             "Subpen 7", "2 : 02", "10 : 00"},
{"$rock.map",    "",             "The Great Escape", "3 : 18", "10 : 00"},
{"$yamato.map",  "",             "Floating Fortress", "11 : 38", "20 : 00"},
{"$seabase.map", "",             "Water Torture", "5 : 07", "10 : 00"},
{"$volcano.map", "",             "Skyline", "9 : 15", "10 : 00"},
{"$shore.map",   "",             "Redwood Forest", "3 : 58", "10 : 00"},
{"$auto.map",    "",             "The Docks", "4 : 07", "10 : 00"},
{"tank.map",     "",             "Waterfight (DM only)", "10 : 00", "10 : 00"},
{"$dmwoods.map", "",             "Wanton DM 1 (DM only)", "10 : 00", "10 : 00"},
{"$dmshrin.map", "",             "Wanton DM 2 (DM only)", "10 : 00", "10 : 00"},
{"$rush.map",    "",             "Lo Wang Rally (DM only)", "10 : 00", "10 : 00"},
{"shotgun.map",  "",             "Wanton CTF (CTF)", "10 : 00", "10 : 00"},
{"$dmdrop.map",  "",             "Killing Fields (CTF)", "10 : 00", "10 : 00"},

The RedBookSong array appears to be the same. The information matches wtcustom.txt from Shadow Warrior Classic Redux. Since WT.GRP is recognized by jfsw its LEVEL_INFO could be included somewhere, so the level names would be correct even without swcustom.txt.

Runtime error on 64bit Linux

Arch x86_64
jfsw 54912c4

Compiles fine (After submodule init and update)

Copied game files to ~/.jfsw

Right after the 3DRealms logo it crashes out.

[parker@e73 jfsw]$ ./sw
Added /home/parker/build/jfsw/ to search path.
Added /home/parker/.jfsw/ to search path.

BUILD engine by Ken Silverman (http://www.advsys.net/ken)
Additional improvements by Jonathon Fowler (http://www.jonof.id.au)
and other contributors. See BUILDLIC.TXT for terms.

64-bit word size. Built Feb 22 2016.

Initialising SDL2 system interface (compiled with SDL version 2.0.4, runtime version 2.0.4)
Loading system OpenGL library
Detecting video modes:
  - 1680x1050 8-bit fullscreen
  - 1600x900 8-bit fullscreen
  - 1400x1050 8-bit fullscreen
  - 1440x900 8-bit fullscreen
  - 1366x768 8-bit fullscreen
  - 1280x1024 8-bit fullscreen
  - 1280x960 8-bit fullscreen
  - 1280x800 8-bit fullscreen
  - 1280x720 8-bit fullscreen
  - 1152x864 8-bit fullscreen
  - 1024x768 8-bit fullscreen
  - 800x600 8-bit fullscreen
  - 640x480 8-bit fullscreen
  - 640x400 8-bit fullscreen
  - 512x384 8-bit fullscreen
  - 480x360 8-bit fullscreen
  - 400x300 8-bit fullscreen
  - 320x240 8-bit fullscreen
  - 320x200 8-bit fullscreen
  - 640x480 24-bit fullscreen
  - 720x400 24-bit fullscreen
  - 800x600 24-bit fullscreen
  - 832x624 24-bit fullscreen
  - 1024x768 24-bit fullscreen
  - 1152x864 24-bit fullscreen
  - 1280x720 24-bit fullscreen
  - 1280x800 24-bit fullscreen
  - 1280x1024 24-bit fullscreen
  - 1440x900 24-bit fullscreen
  - 1600x900 24-bit fullscreen
  - 1680x1050 24-bit fullscreen
  - 1920x1080 24-bit fullscreen
  - 1680x1050 8-bit windowed
  - 1600x900 8-bit windowed
  - 1400x1050 8-bit windowed
  - 1440x900 8-bit windowed
  - 1366x768 8-bit windowed
  - 1280x1024 8-bit windowed
  - 1280x960 8-bit windowed
  - 1280x800 8-bit windowed
  - 1280x720 8-bit windowed
  - 1152x864 8-bit windowed
  - 1024x768 8-bit windowed
  - 800x600 8-bit windowed
  - 640x480 8-bit windowed
  - 640x400 8-bit windowed
  - 512x384 8-bit windowed
  - 480x360 8-bit windowed
  - 400x300 8-bit windowed
  - 320x240 8-bit windowed
  - 320x200 8-bit windowed
  - 1680x1050 24-bit windowed
  - 1600x900 24-bit windowed
  - 1400x1050 24-bit windowed
  - 1440x900 24-bit windowed
  - 1366x768 24-bit windowed
  - 1280x1024 24-bit windowed
  - 1280x960 24-bit windowed
  - 1280x800 24-bit windowed
  - 1280x720 24-bit windowed
  - 1152x864 24-bit windowed
  - 1024x768 24-bit windowed
  - 800x600 24-bit windowed
  - 640x480 24-bit windowed
  - 640x400 24-bit windowed
  - 512x384 24-bit windowed
  - 480x360 24-bit windowed
  - 400x300 24-bit windowed
  - 320x240 24-bit windowed
  - 320x200 24-bit windowed
Scanning for GRP files...
Detected registered GRP
SHADOW WARRIOR(tm) Version 1.2
Copyright (c) 1997 3D Realms Entertainment



Type 'SW -?' for command line options.

0 joystick(s) found
CONTROL_Startup: Mouse Present
RTS file SW.RTS was not found
Initialising timer
mmulti: This machine's IP is 127.0.0.1
Loading sound and graphics...
initcache(): Initialised with 33554432 bytes
Setting video mode 1680x1050 (8-bpp fullscreen)
CD error: Invalid or unsupported card.
Music error: Invalid Music device.
sw: malloc.c:2388: sysmalloc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 *(sizeof(size_t))) - 1)) & ~((2 *(sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.
Aborted (core dumped)

Poor fullscreen support with widescreen monitors and tiling window managers

os: Slackware64-current
jfsw-54912c4_2016.02.20_master-x86_64-1_git
spectrwm-2.7.2-x86_64-1_SBo

When enabling full screen support, it defaults to 1280 x 1024 8bpp even if I select 1680 x 1050 24bpp, but this is not the main problem.

The main issue is that when using a tiling wm (Spectrwm) jfsw fails to fill in the screen and will display anything in the background while displaying a strobe effect. Here is a scrot somewhat showing what I mean.

1

In spectrwm I can have focused tiled windows overlap floating windows with a feature called 'always_raise', if this is turned on the sides are properly displayed as black, but the spectrwm bar is still visible and the strobe effect resumes if the bar is hidden...

2

Can't get mouse to turn left and right

Setting digital up to turn left and digital down to turn right kinda works but doesnt feel like it should. Looking up and down works great just not turning.

Arch x86_64

Command-line options?

I saw in a thread on RetroPie forums how I can use -gdragon.zip and -gWT.GRP to launch the expansions. I also see in your documentation the lists of -net options and console commands, but I don't see any "regular" options anywhere. Are there any? -h and --help aren't showing me anything. Specifically, wondering if I can set the save and/or data dirs from command-line but also curious about any other options there might be.

Edit: ah, I found -? works. Looks like there is no save dir option, then?

(Linux) GTK throws segmentation at start up

Compiling with GTK left on causes a "gtk_text_view_set_attributes_from_style" - exception at startup:

Program` received signal SIGSEGV, Segmentation fault.
gtk_text_view_set_attributes_from_style (text_view=0x12c16c0, style=0x1278820, values=0x0) at /build/gtk+2.0-3ongxb/gtk+2.0-2.24.23/gtk/gtktextview.c:6380
6380 /build/gtk+2.0-3ongxb/gtk+2.0-2.24.23/gtk/gtktextview.c: File not found.

Windows 10 issue

Just built with Win10 / MSVC 2017 Community Edition.

Mouse turning doesn't seem to work. Any ideas?

JFSW on Linux doesn't display SWCR widescreen assets

I have built JFSW on Linux (Mint Tricia) and put the SWCR sw.grp, sw-redux.def (renamed sw.def and with all but the weapon sprite code excised) files and "tiles" directory (from ~/GOG Games/Shadow Warrior Classic Redux) in ~/.config/jfsw. The log file confirms that the .def file was read.

Expected result: I can see the widescreen sword in 1920x1080 resolution.
Actual result: I can only see the classic sword.

I also replaced the sword graphics in the directory with something else just to confirm that JFSW simply isn't picking them up. I've attached the def and log files as TXT because GitHub won't accept them otherwise.

jfsw.log.txt
sw.def.txt

Segmentation fault when usb gamepad is plugged in

When trying to start jfsw with an usb xbox 360 controller plugged in, I get a segmentation fault. I don't need it for jfsw and can just unplug it, but I felt this was worth mentioning anyways... :)

os: Slackware64-current
jfsw-54912c4_2016.02.20_master-x86_64-1_git

Reading symbols from jfsw...done.
(gdb) run
Starting program: /usr/games/jfsw 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffebec2700 (LWP 17114)]
[New Thread 0x7fffeb6c1700 (LWP 17115)]
Added /usr/share/games/jfsw/ to search path.
Added /usr/games/ to search path.
Added /home/orbea/.jfsw/ to search path.

BUILD engine by Ken Silverman (http://www.advsys.net/ken)
Additional improvements by Jonathon Fowler (http://www.jonof.id.au)
and other contributors. See BUILDLIC.TXT for terms.

64-bit word size. Built Mar  2 2016.

Initialising SDL2 system interface (compiled with SDL version 2.0.4, runtime version 2.0.4)
Loading system OpenGL library
Detecting video modes:
  - 1600x900 8-bit fullscreen
  - 1440x900 8-bit fullscreen
  - 1366x768 8-bit fullscreen
  - 1280x1024 8-bit fullscreen
  - 1280x960 8-bit fullscreen
  - 1280x800 8-bit fullscreen
  - 1280x720 8-bit fullscreen
  - 1152x864 8-bit fullscreen
  - 1024x768 8-bit fullscreen
  - 800x600 8-bit fullscreen
  - 640x480 8-bit fullscreen
  - 640x400 8-bit fullscreen
  - 512x384 8-bit fullscreen
  - 480x360 8-bit fullscreen
  - 400x300 8-bit fullscreen
  - 320x240 8-bit fullscreen
  - 320x200 8-bit fullscreen
  - 640x480 24-bit fullscreen
  - 720x400 24-bit fullscreen
  - 800x600 24-bit fullscreen
  - 1024x768 24-bit fullscreen
  - 1152x864 24-bit fullscreen
  - 1280x1024 24-bit fullscreen
  - 1680x1050 24-bit fullscreen
  - 1600x900 8-bit windowed
  - 1440x900 8-bit windowed
  - 1366x768 8-bit windowed
  - 1280x1024 8-bit windowed
  - 1280x960 8-bit windowed
  - 1280x800 8-bit windowed
  - 1280x720 8-bit windowed
  - 1152x864 8-bit windowed
  - 1024x768 8-bit windowed
  - 800x600 8-bit windowed
  - 640x480 8-bit windowed
  - 640x400 8-bit windowed
  - 512x384 8-bit windowed
  - 480x360 8-bit windowed
  - 400x300 8-bit windowed
  - 320x240 8-bit windowed
  - 320x200 8-bit windowed
  - 1600x900 24-bit windowed
  - 1440x900 24-bit windowed
  - 1366x768 24-bit windowed
  - 1280x1024 24-bit windowed
  - 1280x960 24-bit windowed
  - 1280x800 24-bit windowed
  - 1280x720 24-bit windowed
  - 1152x864 24-bit windowed
  - 1024x768 24-bit windowed
  - 800x600 24-bit windowed
  - 640x480 24-bit windowed
  - 640x400 24-bit windowed
  - 512x384 24-bit windowed
  - 480x360 24-bit windowed
  - 400x300 24-bit windowed
  - 320x240 24-bit windowed
  - 320x200 24-bit windowed
Scanning for GRP files...
Detected registered GRP
SHADOW WARRIOR(tm) Version 1.2
Copyright (c) 1997 3D Realms Entertainment



Type 'SW -?' for command line options.

2 joystick(s) found
  1. (null)

Thread 1 "jfsw" received signal SIGSEGV, Segmentation fault.
0x00007ffff7b1f6de in SDL_JoystickName_REAL () from /usr/lib64/libSDL2-2.0.so.0
(gdb) bt full
#0  0x00007ffff7b1f6de in SDL_JoystickName_REAL () at /usr/lib64/libSDL2-2.0.so.0
#1  0x00007ffff7b16a3d in SDL_JoystickName () at /usr/lib64/libSDL2-2.0.so.0
#2  0x00000000004facff in initinput ()
#3  0x00000000004a99af in CONTROL_Startup ()
#4  0x0000000000462fd5 in InitSetup ()
#5  0x000000000041be86 in InitGame ()
#6  0x000000000041f199 in Control ()
#7  0x000000000041f4a5 in app_main ()
#8  0x0000000000405205 in main ()

Add -fPIC to compile in ArchLinux

The last revision of jfsw is not compiling correctly in ArchLinux unless you add -fPIC (and remove -fno-pic) in the makefiles. The compiled game seems to work fine, so is there any good reason to use -fno-pic?

Raspberry Pi 4 issue

Hello

I compiled successful sw using the latest raspbian buster

But upon running and using the full game version

When i try to select the second episode (code of honor)
Its not selectable anyway enter does nothing all it shows me this message down:
full version only call this number and order the game etc

I have build it with : RELEASE=1 USE_POLYMOST=1 USE_OPENGL=USE_GLES2 WITHOUT_GTK=1

Im 100% i put the full game version,upon testing with a sw build over a year old everything works perfect

Is this a bug??

Edit:
I managed to run the full version of sw by using the old source code "20211225"

Also wanton destruction expansion worked
But the twin dragon expansion is not working,is there an info somewhere to make it work???

Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.