ECWolf - Wolfenstein 3D source port for mods
-
@cyperghost If i try to patch ECWolf with the file wl_play_patch.diff, it fails with this in the terminal:
patching file ./src/wl_play.cpp
Hunk #1 FAILED at 73 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file ./src/wl_play.cpp.rejAt the moment it does not work for me even with the command: patch -p0 -i
-
@Solid-One Much of the work i create is directly on a Raspberry Pi 3B on a Sandisk 16gb micro sd card as my test environment. I use Geany as the text editor, when i create the scriptmodules and then test the scriptmodules many times before releasing it to the RetroPie community including ECWolf.
ECWolf is based off the code from the Wolf4SDL project and built to enhance gameplay further. Maybe the developers of Wolf4SDL used Windows as development platform and that explains why ECWolf is working the same way.
-
@tpo1990 Well, assuming the use of Windows as a development platform for Wolf4SDL and/or ECWolf by the developers of those source ports, I guess there's a way of circunventing this issue on Geany.
Try those steps below on Geany:
- Open wl_play.cpp file;
- Go to "Document -> Define Line Break -> Convert and Define to CR/LF (Windows)¹";
- Save the file and exit;
- Try applying @cyperghost's patch.
Assuming the Geany function for converting line breaks to windows-style works, then maybe the patch should work.
¹ The names can be a little different. My desktop is in portuguese, and I don't know the exact term in english.
-
@tpo1990 use --binary switch
The error is an the mix of the line endings.The Unix part for the patch uses L F only but for the patch itself the data uses CRLF so there is a mix of line endings inside the file. I will upload the patch in the evening today
-
For building your ecWolf refer to the description given HERE
@Solid-One @tpo1990
The problem was because of this constellation.First lines are LF like proper unix format
Other lines are CRLF
This patch works nowroot@DietPi:~/bash/ecwolf/ecwolf-ecwolf-5065aaefe055# patch -p0 -i ecwolf_keyboardpatch.diff patching file ./src/wl_play.cpp
-
@cyperghost Great work. Let me try it out again and get back to you.
Edit: The patching works now. Thanks. I will update the scriptmodule with your patch and make some changes to what runcommand files to generate depending on if you have shareware or registered versions of Wolf3d and SOD.
-
@tpo1990 cant wait for the update.
have not had time to mess with learning how to compile anything yet :(
-
@tpo1990 I would suggest following
instead
function configure_ecwolf() { addPort "$md_id" "ecwolf-spear3d" "ECWolf - Spear3d" "$md_inst/ecwolf --data sdm --file %ROM%" addPort "$md_id" "ecwolf-wolf3d" "ECWolf - Wolf3d" "$md_inst/ecwolf --data wl1 --file %ROM%" mkRomDir "ports/wolf3d"
- better use
function configure_ecwolf() { addPort "$md_id" "ecwolf" "Wolfenstein 3D" "pushd $romdir/ports/wolf3d; $md_inst/ecwolf --data wl1; popd" addPort "$md_id" "ecwolf" "Wolfenstein 3D - Spear of Destiny" "pushd $romdir/ports/wolf3d; $md_inst/ecwolf --data sod; popd" mkRomDir "ports/wolf3d" moveConfigDir "$home/.local/share/ecwolf" "$md_conf_root/ecwolf" moveConfigDir "$home/.config/ecwolf" "$romdir/ports/wolf3d
- or just a a launch menu with some helper files ...
function configure_ecwolf() { addPort "$md_id" "ecwolf" "Wolfenstein 3D" "pushd $romdir/ports/wolf3d; $md_inst/ecwolf.sh %ROM%; popd" mkRomDir "ports/wolf3d" moveConfigDir "$home/.local/share/ecwolf" "$md_conf_root/ecwolf" moveConfigDir "$home/.config/ecwolf" "$romdir/ports/wolf3d" #Install Graphical Selection Menu - scriptmodule needs improvement for this cd "$romdir/ports" wget -N -q --show-progress "https://raw.githubusercontent.com/crcerror/ECWolf-RPI/master/file_dl/Wolfenstein 3D.sh" chown $user:$user "Wolfenstein 3D.sh" #Install Translator - scriptmodule needs improvement for this cd "$md_inst" wget -N -q --show-progress "https://raw.githubusercontent.com/crcerror/ECWolf-RPI/master/file_dl/ecwolf.sh" chmod +x "ecwolf.sh" [[ "$md_mode" == "install" ]] && game_data_ecwolf }
that will lead to a menu like this one here in this posting
- I don't want to send you an PR becaus I'm the opinion that you as creator should decide what's the best solution. I strongly modified your scriptmodule but it needs much code review (like yours, too) ---> Take a look here
-
@tpo1990
Let us talk in this gist here
https://gist.github.com/crcerror/9e1742e78d50e58d585f3735dd67e855 -
@cyperghost Good idea. Let's talk about the development in the gist instead of here.
I know that my scriptmodule needs code review, but to begin with my initial idea was just for testing out the source port and making that available for the community. Now it seems that the further progression on this suggests a final release. Maybe replacing Wolf4SDL as the primary source port for Wolfenstein 3D or as an alternative.
I really appreciate your opinion and i'm open for help on developing into making it happen. ;-)
-
@tpo1990 I have a solid solution in my pocket. It will work like the prboom script module. It will find all files placed into wolf3d directory - version does not matter and it may be expanded to future game support like corridor 7 or Black stone.
Let me post this in a few hours
-
@mitu
Can you take a look here: gistHow to proper patch sourcefiles?
Use wget, load the patch and use patch command?
Is there a better way?The patch is needed to make ESC key work --> see here
-
@cyperghost Sounds good. It might be put to good use in other scriptmodules as well. :-)
-
@tpo1990 Yes but I think there is a better way of patching inside scriptmodules. I think some patches are in
RestroPie-Setup
directory for "offlline" patching - that better coding practice and makes control of code easier.But I think you can take the gist and after some final tests you can set a PR.
I think I cleanup the code a bit and then I'm done. -
scriptmodule is working now
get it with
wget https://gist.githubusercontent.com/crcerror/9e1742e78d50e58d585f3735dd67e855/raw/34493a8dc6f3cbb75fda8f381a8a94eb4ec67d82/ecwolf.sh
-
@tpo1990 Send you a massive PR
I tested on my Pi3, compiles and setup is fine -
@cyperghost said in ECWolf - Wolfenstein 3D source port for mods:
@tpo1990 Yes but I think there is a better way of patching inside scriptmodules. I think some patches are in
RestroPie-Setup
directory for "offlline" patching - that better coding practice and makes control of code easier.But I think you can take the gist and after some final tests you can set a PR.
I think I cleanup the code a bit and then I'm done.I will test it out later and update the scriptmodule with your changes and see how well it goes. Then a PR for RetroPie project can be created. :-)
-
@tpo1990 i used what @cyperghost's script module and it compiled fine for me. but that's all i had time for. i did not do any playing as of yet
UPDATE
did a quick poke around. i see that mine does not have the ability to map exit key yet. but i dont know if its just my system and that i have the old versions still on there. even though i did uninstall it before using what cyperghost just posted
-
@ExarKunIv Check your build... it should say
ecwolf-ecwolf-5065aaefe055/android-libs/launcher/src/org/libsdl/../deps/app/SDLControllerManager.java /home/pi/RetroPie-Setup /home/pi/RetroPie-Setup/tmp/build/ecwolf /home/pi/RetroPie-Setup = = = = = = = = = = = = = = = = = = = = = Building 'ecwolf' : ECWolf - ECWolf is an advanced source port for Wolfenstein 3D, Spear of Destiny, and Super 3D Noah's Ark based off of the Wolf4SDL code bas. It also supports mods from .pk3 files. = = = = = = = = = = = = = = = = = = = = = patching file ./src/wl_play.cpp -- The C compiler identification is GNU 4.9.2
You see the patch is applied
Then go to config/controls... last line you'll see
-
@ExarKunIv Maybe you have downloaded @cyperghost scriptmodule before the patch was added.
Uninstall and if it still compiles without the patch, then go to /home/pi/RetroPie-Setup/scriptmodules/ports/ and delete the ecwolf.sh file, then download @cyperghost scriptmodule again and reinstall.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.