diff options
author | maxlefou | 2017-08-29 19:57:44 +0200 |
---|---|---|
committer | maxlefou | 2017-08-29 19:57:44 +0200 |
commit | a95ccac9fb70d1a7a3653684fc97a07f5849eaf6 (patch) | |
tree | f2738ecc87e4d82a1131de9c41ab3e29bf028fb0 | |
download | aur-a95ccac9fb70d1a7a3653684fc97a07f5849eaf6.tar.gz |
first commit. and preferably last...
-rw-r--r-- | .SRCINFO | 32 | ||||
-rw-r--r-- | PKGBUILD | 66 | ||||
-rw-r--r-- | configure-gamepad-fix.patch | 144 | ||||
-rw-r--r-- | doukutsu | 50 | ||||
-rw-r--r-- | doukutsu-config.desktop | 10 | ||||
-rw-r--r-- | doukutsu.desktop | 10 | ||||
-rw-r--r-- | doukutsu.png | bin | 0 -> 411 bytes |
7 files changed, 312 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..e94a4fcd643f --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,32 @@ +pkgbase = doukutsu-fr + pkgdesc = Japanese freeware PC side-scrolling platformer game (aka Cave Story). French ver. + pkgver = 1.2 + pkgrel = 6 + url = http://cavestory.maxlefou.com/ + arch = i686 + arch = x86_64 + license = custom:freeware + depends = bash + depends = sdl + depends = fltk + depends = libxinerama + depends = libxft + source = http://cavestory.maxlefou.com/files/linuxDoukutsu-1.21FR.tar.xz + source = http://www.cavestory.org/downloads/linuxDoukutsu-1.2.zip + source = http://www.cavestory.org/downloads/DoConfigure-r2.zip + source = configure-gamepad-fix.patch + source = doukutsu.desktop + source = doukutsu-config.desktop + source = doukutsu.png + source = doukutsu + md5sums = ff63588fa1bbd5b3c16c603b5074a37e + md5sums = e73d7330fba3cc5c15f0eeb239df586f + md5sums = 9f5e96d5ff9671691b7c8a41f8fa5880 + md5sums = d4f9cdcd06058177671bd741b5bf5fa4 + md5sums = ddd04fb93154c3cfa41589102c1b2487 + md5sums = 663a634c5edecad78db9d33f58f1d636 + md5sums = 5262f9ff9bc528c790bf424016e6305f + md5sums = 33e725f0fd06ae89fbf2290cbae79d9e + +pkgname = doukutsu-fr + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..65318b7b9906 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,66 @@ +# Maintainer: Max le Fou <max at maxlefou.com> +# Contributor: Nascher <kevin at nascher.org> +# Contributor: Anton Larionov <diffident dot cat at gmail dot com> +# Contributor: Victor Feight <vrfeight3 at gmail dot com> +# Contributor: Frozen Fox <frozenfoxz at gmail dot com> + +pkgname=doukutsu-fr +pkgver=1.2 +pkgrel=6 +pkgdesc='Japanese freeware PC side-scrolling platformer game (aka Cave Story). French ver.' +url='http://cavestory.maxlefou.com/' +arch=('i686' 'x86_64') +license=('custom:freeware') +depends=('bash' 'sdl' 'fltk' 'libxinerama' 'libxft') + +source=('http://cavestory.maxlefou.com/files/linuxDoukutsu-1.21FR.tar.xz' + 'http://www.cavestory.org/downloads/linuxDoukutsu-1.2.zip' + 'http://www.cavestory.org/downloads/DoConfigure-r2.zip' + 'configure-gamepad-fix.patch' + 'doukutsu.desktop' + 'doukutsu-config.desktop' + 'doukutsu.png' + 'doukutsu') + +md5sums=('ff63588fa1bbd5b3c16c603b5074a37e' + 'e73d7330fba3cc5c15f0eeb239df586f' + '9f5e96d5ff9671691b7c8a41f8fa5880' + 'd4f9cdcd06058177671bd741b5bf5fa4' + 'ddd04fb93154c3cfa41589102c1b2487' + '663a634c5edecad78db9d33f58f1d636' + '5262f9ff9bc528c790bf424016e6305f' + '33e725f0fd06ae89fbf2290cbae79d9e') + +prepare() { + cd "$srcdir" + + # Fix DoConfigure utility bug where gamepad configurations are not saved correctly + # source: http://www.desura.com/games/cave-story/forum/thread/problems-remapping-the-joystick-under-linux + patch -Np0 -i "$srcdir/configure-gamepad-fix.patch" +} + +build() { + cd "${srcdir}" + rm DoConfigure + g++ DoConfig.cpp -o DoConfigure -s $(fltk-config --cxxflags --ldflags) +} + +package() { + cd "${srcdir}/linuxDoukutsu-1.21FR" + + install -dm755 "${pkgdir}"/{opt/${pkgname},usr/share/{doc/${pkgname},applications}} + cp -r {Config.dat,data,doc,doukutsu} "${pkgdir}/opt/${pkgname}/" + + if [ "$CARCH" == "i686" ]; then + install -Dm755 "${srcdir}/linuxDoukutsu-1.2/doukutsu_32bits" "${pkgdir}/opt/${pkgname}/doukutsu.bin" + else + install -Dm755 "${srcdir}/linuxDoukutsu-1.2/doukutsu_64bits" "${pkgdir}/opt/${pkgname}/doukutsu.bin" + fi + + install -Dm644 "${srcdir}"/*.desktop "${pkgdir}/usr/share/applications/" + install -Dm644 "${srcdir}/doukutsu.png" "${pkgdir}/usr/share/pixmaps/doukutsu.png" + install -Dm644 doc/* "${pkgdir}/usr/share/doc/${pkgname}/" + + install -Dm755 "${srcdir}/DoConfigure" "${pkgdir}/opt/${pkgname}/DoConfigure" + install -Dm755 "${srcdir}/doukutsu" "${pkgdir}/usr/bin/doukutsu" +} diff --git a/configure-gamepad-fix.patch b/configure-gamepad-fix.patch new file mode 100644 index 000000000000..e7ce8e07346a --- /dev/null +++ b/configure-gamepad-fix.patch @@ -0,0 +1,144 @@ +--- DoConfig.cpp 2011-04-26 10:42:52.000000000 +0400 ++++ DoConfig.cpp.new 2014-04-06 11:21:16.000000000 +0400 +@@ -3,10 +3,10 @@ + * and/or modify it under the terms of the Do What The F*** You Want
+ * To Public License, Version 2, as published by Sam Hocevar. See
+ * http://sam.zoy.org/wtfpl/COPYING for more details. */
+- ++
+ #include <cstdlib>
+ #include <iostream>
+-#include <fstream> ++#include <fstream>
+ #include <cstring>
+ #include "FL/Fl.H"
+ #include "FL/Fl_Window.H"
+@@ -66,6 +66,98 @@ + this->buttons[input]->setonly();
+ }
+
++/**
++ * Action code values are a bit mixed up - on the screen they don't follow in the same
++ * way they are coded in Config.dat file.
++ *
++ * this is how hex dump of the last 4x8 bytes of the
++ * Config.dat file looks when the controller settings
++ * are saved in the following way:
++ * 1=[0]Jump(1)
++ * 2=[1]Attack(2)
++ * 3=[2]Weapon+(3)
++ * 4=[3]Weapon-(6)
++ * 5=[4]Items(4)
++ * 6=[5]Map(5)
++ * 7=[0]Jump(1)
++ * 8=[1]Attack(2)
++ * 01 00 00 00 02 00 00 00 03 00 00 00
++ * 06 00 00 00 04 00 00 00 05 00 00 00 01 00 00 00
++ * 02 00 00 00
++ */
++int screenIndexToFileIndex(int screenIndex) {
++ int fileIndex;
++ switch(screenIndex) {
++ case 0: // Jump on screen
++ fileIndex = 1; //Jump in file
++ break;
++ case 1: // Attack on screen
++ fileIndex = 2; // Attack in file
++ break;
++ case 2: // Weapon+ on screen
++ fileIndex = 3; // Weapon+ in file
++ break;
++ case 3: // Weapon- on screen
++ fileIndex = 6; // Weapon- in file
++ break;
++ case 4: // Items on screen
++ fileIndex = 4; // Items in file
++ break;
++ case 5: // Map on screen
++ fileIndex = 5; // Map in file
++ break;
++ default:
++ fileIndex = 0;
++ }
++ return fileIndex;
++}
++
++/**
++ * Action code values are a bit mixed up - on the screen they don't follow in the same
++ * way they are coded in Config.dat file.
++ *
++ * this is how hex dump of the last 4x8 bytes of the
++ * Config.dat file looks when the controller settings
++ * are saved in the following way:
++ * 1=[0]Jump(1)
++ * 2=[1]Attack(2)
++ * 3=[2]Weapon+(3)
++ * 4=[3]Weapon-(6)
++ * 5=[4]Items(4)
++ * 6=[5]Map(5)
++ * 7=[0]Jump(1)
++ * 8=[1]Attack(2)
++ * 01 00 00 00 02 00 00 00 03 00 00 00
++ * 06 00 00 00 04 00 00 00 05 00 00 00 01 00 00 00
++ * 02 00 00 00
++ */
++int fileIndexToScreenIndex(int fileIndex) {
++ int screenIndex;
++ switch(fileIndex) {
++ case 1: // Jump in file
++ screenIndex = 0; //Jump on screen
++ break;
++ case 2: // Attack in file
++ screenIndex = 1; // Attack on screen
++ break;
++ case 3: // Weapon+ in file
++ screenIndex = 2; // Weapon+ on screen
++ break;
++ case 4: // Items in file
++ screenIndex = 4; // Items on screen
++ break;
++ case 5: // Map in file
++ screenIndex = 5; // Map on screen
++ break;
++ case 6: // Weapon- in file
++ screenIndex = 3; // Weapon- on screen
++ break;
++ default:
++ screenIndex = 0;
++ }
++ return screenIndex;
++}
++
+ Fl_Round_Button *movear;
+ Fl_Round_Button *movegt;
+
+@@ -117,10 +209,9 @@ + if( !config.useJoy ){
+ joystuffcontainer->deactivate();
+ }
+- for(char i=0;i<8;i++){
+- if(config.buttons[i]<9 && config.buttons[i]>0){
+- joyRows[i]->value(config.buttons[i] -1);
+- }
++
++ for(char i=0;i<8;i++){
++ joyRows[i]->value(fileIndexToScreenIndex(config.buttons[i]));
+ }
+ fd.close();
+ }
+@@ -141,7 +232,7 @@ + config.display = displaychoice->value();
+ config.useJoy = joychoice->value();
+ for(char i =0;i<8;i++){
+- config.buttons[i] = joyRows[i]->value();
++ config.buttons[i] = screenIndexToFileIndex(joyRows[i]->value());
+ }
+ fd.write((char*)&config, 148);
+ fd.close();
+@@ -227,4 +318,4 @@ + read_Config();
+ Fl::option(Fl::OPTION_VISIBLE_FOCUS, false);
+ return Fl::run();
+-}
++} +\ No newline at end of file diff --git a/doukutsu b/doukutsu new file mode 100644 index 000000000000..daca8c5cb8b2 --- /dev/null +++ b/doukutsu @@ -0,0 +1,50 @@ +#!/usr/bin/env bash + +# This script replicates the Doukutsu working folder in a specified directory +# (defaults to ~/.doukutsu) by creating symbolic links to the installed +# files. This allows the game to store saves and configuration files +# without write permissions in the install folder and lets every user on +# system keep their own saves/settings. It then launches the game or +# configuration tool. + +INSTALLDIR=/opt/doukutsu-fr +USERDATADIR=$HOME/.doukutsu-fr + +function create_structure { + mkdir -p $USERDATADIR + ln -s -t $USERDATADIR $INSTALLDIR/{doukutsu,doukutsu.bin,DoConfigure,data,doc} + cp $INSTALLDIR/Config.dat $USERDATADIR + cd $USERDATADIR +} + +function integrity_check { + USERFILECOUNT=`find $USERDATADIR -maxdepth 1 | grep -v Profile.dat | grep -v error.log | wc -l` + SYSTEMFILECOUNT=`find $INSTALLDIR -maxdepth 1 | grep -v Profile.dat | grep -v error.log | wc -l` + if [ $USERFILECOUNT != $SYSTEMFILECOUNT ]; + then create_structure; + fi +} + +while getopts "ch" options; do + case $options in + c) + integrity_check + cd $USERDATADIR + ./DoConfigure + exit 0;; + h|*) + printf "Usage: doukutsu [-h] [-c]\n" + exit 0;; + esac +done + +if [ -d $USERDATADIR ]; then + integrity_check + + cd $USERDATADIR + exec ./doukutsu $@ +else + create_structure + + exec ./doukutsu $@ +fi diff --git a/doukutsu-config.desktop b/doukutsu-config.desktop new file mode 100644 index 000000000000..15e8c8d5ca19 --- /dev/null +++ b/doukutsu-config.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=Configuration de Cave Story +Comment=Utilitaire de configuration pour Cave Story +Exec=doukutsu -c +Icon=doukutsu +Terminal=false +Type=Application +StartupNotify=true +Categories=Game;AdventureGame; +Encoding=UTF-8 diff --git a/doukutsu.desktop b/doukutsu.desktop new file mode 100644 index 000000000000..05f003ee8af5 --- /dev/null +++ b/doukutsu.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=Cave Story +Comment=Jeu de plateformes en 2D traditionnel +Exec=/usr/bin/doukutsu +Icon=doukutsu +Terminal=false +Type=Application +StartupNotify=true +Categories=Game;AdventureGame; +Encoding=UTF-8 diff --git a/doukutsu.png b/doukutsu.png Binary files differnew file mode 100644 index 000000000000..4598e145e4c7 --- /dev/null +++ b/doukutsu.png |