Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 14/03/2008, à 19:57

compte supprimé

comment compiler du sdl sans main.c ou executables?

salut! voila j'ai les sources d'un jeu, mais je ne sait comment les compiler (c'est du SDL, donc ça passe sous nux). voila tout les fichiers (en gras):

polo@debian:~/Desktop/dfarc15-source$ dir
DFArc.dev  src
polo@debian:~/Desktop/dfarc15-source$ cd src/
polo@debian:~/Desktop/dfarc15-source/src$ dir
Bz.cpp           DirOps.cpp    Filesystem.cpp    Kill.cpp
Callbacks.cpp  ExtractInfo.cpp    includes    TarConvert.cpp
DFArc.cpp      FileChooser.cpp    Init.cpp    Tar.cpp

polo@debian:~/Desktop/dfarc15-source/src$ cd includes/
polo@debian:~/Desktop/dfarc15-source/src/includes$ dir
appclass.hpp  callbacks.hpp    dfarc.hpp    include.hpp    ProgressBar.hpp
bz.hpp          declarations.hpp    filesystem.hpp    isingleton.hpp    tar.hpp

polo@debian:~/Desktop/dfarc15-source/src/includes$
après si j'arrive a compiler je ferait un petit deb pour debian/ubuntu (c'est le jeu dink smallwood)

pttwdfdhfc.jpg

Dernière modification par MCpaul34 (Le 14/03/2008, à 19:59)

#2 Le 14/03/2008, à 20:13

compte supprimé

Re : comment compiler du sdl sans main.c ou executables?

voila voila, j'ai trouvé un topic sur linux game tome:
http://www.happypenguin.org/show?Dink%20Smallwood%20SDL%20Port
mais j'y comprend rien, je suis pas dev!

plus précisement:

To compile make sure you have SDL and SDL-devel packages.
Also create an empty Makefile.in (and Makefile.am?) in the compiler catalog.
Also remove the reference to doc in the top-level Makefile. The docs won't compile.

Unzip the data files. Rename alle the files in all the Dink-catalogs (make sure you do
NOT rename any of your systemfiles) to lower case with: `find | perl -ne 'chomp;rename($_,lc)';
Then make all wav files uppercase:`find *.wav| perl -ne 'chomp;rename($_,uc)';
Make sure the file gold.wav is in lower case.. (mv GOLD.WAV gold.wav)
Then open dink.ini in your favorite editor and replace all the '\' (backslashes)
in all lines starting with load_sequence. Some files are still reported missing:
tiles/s14.bmp
graphics/inter/arrow/arowl-XX.bmp
graphics/inter/arrow/arowr-XX.bmp
graphics/inter/level#/ln-XX.bmp
(where XX is the number in the filename +1 i.e. they'll always miss??)

Copy arial.ttf (from a windows installation?) into the game directory.

This should get you to the menu (as described above in the other comments.
When you enter the menu and click start, the game hangs searching for files
in the graphics/dink/walk catalog. This is due to an error when loading the dir.ff
package file in the catalog.

Open dinkvar.cpp in your favourite editor and replace lines 3196 - 3213 with this:

/*Start of modified code insert at dinkvar.cpp:3196 replacing upto 3213*/
int strl;
// PALETTEENTRY holdpal[256];
char crap[200], hold[5];

if (no_running_main)
draw_wait ();

Msg (("Loading %s...", org));

char crap2[200];
strcpy (crap2, org);

strl = strlen (crap2);
while (crap2[strl] != '/') //unsafe.. if there is no '/' it will crash..
{
crap2[strl] = 0;
strl--;
}

if(strl <= 0){ Msg (("Error occured when emptiying crap2. Data left: %s", crap2)); }
crap2[strlen (crap2) - 1] = 0;
sprintf (crap, "%s/dir.ff", crap2);
Msg(("Checking for %s..", crap));

/***************** end of modified code ******************************/

Dernière modification par MCpaul34 (Le 14/03/2008, à 20:14)

#3 Le 14/03/2008, à 22:55

Link31

Re : comment compiler du sdl sans main.c ou executables?

cd ~/Desktop/dfarc15-source/src; g++ -I includes `pkg-config --libs --cflags sdl` *.cpp -o dfarc15 || cat ../DFArc.dev

Dernière modification par Link31 (Le 14/03/2008, à 22:57)

Hors ligne

#4 Le 14/03/2008, à 23:35

compte supprimé

Re : comment compiler du sdl sans main.c ou executables?

merci pour la commande , mais ça me sort un huge log d'erreur, disant qu'il ne trouve rien de rien, et me balançant le contenu de DFarc.dev

#5 Le 14/03/2008, à 23:52

Link31

Re : comment compiler du sdl sans main.c ou executables?

Et quelles sont les erreurs et le contenu de DFarc.dev ?

Hors ligne