ComSer Forum
Welcome, Guest. Please login or register.
October 23, 2018, 02:09:28 PM

Login with username, password and session length
Search:     Advanced search
Registration of new members is disabled. Read the newspost.
8133 Posts in 708 Topics by 253 Members
Latest Member: Maxigenzztop
* Home Help Search Calendar Login Register
+  ComSer Forum
|-+  ComSer General
| |-+  Dr. Darka's Linux Centre
| | |-+  Gusanos 0.8.1 on Linux HOWTO [OUTDATED]
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] 2 3 4 5 Go Down Print
Author Topic: Gusanos 0.8.1 on Linux HOWTO [OUTDATED]  (Read 61528 times)
darka
Cancelled
Linux Guru
Veteran Member
*****

Karma: 12
Offline Offline

Posts: 192


View Profile
« on: May 16, 2005, 09:40:21 PM »

This HOWTO is for an old version of Gusanos and has been obsoleted by official documentation.



Gusanos 0.8.1 on Linux HOWTO

First we need to get Gusanos dependencies - Allegro and Zoidcom.

Allegro
Most distributions have their own packages for Allegro.
For example, Debian users can run "apt-get install liballegro4.1 liballegro-dev" and Gentoo users can run "emerge allegro".
If your distribution has a package for Allegro, skip to Zoidcom instructions.
If your distribution does not have a package for Allegro, you can download the sources here and install it:

Code:
tar xvzf allegro-VERSION.tar.gz
cd allegro-VERSION
sh fix.sh unix
./configure
make
su -c "make install"

Zoidcom
Zoidcom is not free software, so it's not packaged with any distributions.
Download Zoidcom for Linux here.

Code:
tar xvzf zoidcom_VERSION.tar.gz
cd zoidcom

Open up include/zoidcom_prereq.h in your favourite text editor and add the line "#include <cstddef>" after "#define _ZOIDCOM_PREREQ_H"
(This is a temporary fix, hopefully you won't have to do this with the next version of zoidcom)
Now install it:

Code:
cp -R include/ /usr/local/include/zoidcom
cp -R lib/ /usr/local/

Gusanos

Since there was no official release of Gusanos 0.8.1 for Linux, you'll have to get the CVS version and compile yourself.
First lets make a folder for all Gusanos stuff.

Code:
mkdir gusanos
cd gusanos

Checkout the CVS from 10/10/2004 since the latest CVS is not compatible with the Windows 0.8.1 release.

Code:
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/gusanos co -D "Oct 10 2004" -P zoid

Get PNG loaders from the latest CVS.

Code:
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/gusanos co zoid/loadpng.c zoid/loadpng.h zoid/regpng.c zoid/savepng.c

Start the build.

Code:
cd zoid
make -f Makefile.linux

Hopefully everything works and there should now be a nice gusanos binary in the upper folder.

Finally, we need to get the datafiles. I have packaged all default levels and mods + some add-ons in a Linux compatible package here (thanks to Wei-Zhi-Hui for hosting). Save it into the Gusanos binary folder and:

Code:
tar xvjf gusdata-linux.tar.bz2

Now go play Gusanos!

If something fails, please post the error here.
« Last Edit: October 06, 2006, 03:23:00 AM by darka » Logged
crashie
Jr. Member
*

Karma: 0
Offline Offline

Posts: 1


View Profile
« Reply #1 on: August 09, 2005, 07:32:01 AM »

If you have an ATI graphics card you might need to rename the file  /usr/lib/allegro/4.*/alleg-dga2.so or your screen will be turned off until reboot (this can be very annoying when you have a lot of web pages and programs open Angry). This happens on ATI Radeon 9500 Pro with fglrx installed but I have encountered similiar problems without fglrx and on other cards (ATI 3D Turbo and ATI X300).

And sourceforge.net's CVS servers are down for hardware upgrades right now. So there wont be any Gusanos gaming today Cry

Edit: I managed to download the "zoid" directory now Cheesy.. but then it went down again...

Edit 2: The gusdata-linux link is broken... remove the "www." to fix it.
« Last Edit: August 11, 2005, 11:59:45 AM by crashie » Logged
RepTail
Guest
« Reply #2 on: August 31, 2005, 01:47:15 PM »

I've got such error:
Code:
render.cpp: In function `void draw_hud(BITMAP*, int, s_viewport)':
render.cpp:143: warning: converting to `int' from `double'
render.cpp:153: warning: converting to `int' from `double'
render.cpp: In member function `void engine::render()':
render.cpp:337: error: `set_clip_rect' undeclared (first use this function)
render.cpp:337: error: (Each undeclared identifier is reported only once for
   each function it appears in.)
make: *** [render.o] Błąd 1
Logged
basara
Administrator
Historic Member
*****

Karma: 31
Offline Offline

Posts: 841



View Profile
« Reply #3 on: August 31, 2005, 05:59:22 PM »

You may have an old allegro version that doesnt support it, it should be 4.1.x or newer
Logged
RepTail
Guest
« Reply #4 on: September 01, 2005, 02:40:28 PM »

now gusanos complain about lib png
Code:
g++ -o ../gusanos.exe gusanos.o sprites.o water.o engine.o console.o text.o keys.o render.o input.o sounds.o particles.o explosions.o weapons.o level.o player.o network.o lights.o loadpng.o regpng.o savepng.o gfx.o -fno-rtti -O2 -I/usr/local/include/zoidcom -L/usr/local/lib/zoidcom `allegro-config --libs` -lzoidcom -lpng
/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../libpng.so: undefined reference to `deflate'
/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../libpng.so: undefined reference to `inflate'
/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../libpng.so: undefined reference to `inflateInit_'
/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../libpng.so: undefined reference to `crc32'
/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../libpng.so: undefined reference to `deflateInit2_'
/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../libpng.so: undefined reference to `inflateReset'
/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../libpng.so: undefined reference to `deflateReset'
/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../libpng.so: undefined reference to `inflateEnd'
/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../libpng.so: undefined reference to `deflateEnd'
collect2: ld returned 1 exit status
I've installed allegro-4.2.0-rc2 libpng-1.2.8
Logged
Gliptic
Gusanos Team
Veteran Member
*****

Karma: 8
Offline Offline

Posts: 208


View Profile
« Reply #5 on: September 01, 2005, 04:21:12 PM »

You must link in zlib, with the link flag: -lz
Just make sure you place it after "-lpng" in the command line.
« Last Edit: September 01, 2005, 04:23:48 PM by Gliptic » Logged
mots
Sr. Member
***

Karma: 0
Offline Offline

Posts: 73



View Profile
« Reply #6 on: October 10, 2005, 08:43:20 AM »

Quote
root@Nonsense:/home/mots/gusanos/zoid # make -f Makefile.linux
g++ -c gusanos.cpp -fno-rtti -O2 -I/usr/local/include/zoidcom -L/usr/local/lib/zoidcom
In file included from gusanos.cpp:1:
console.h:4:21: allegro.h: No such file or directory
In file included from gusanos.cpp:1:
console.h:18: error: `BITMAP' was not declared in this scope
console.h:18: error: `where' was not declared in this scope
console.h:18: error: invalid data member initialization
console.h:18: error: (use `=' to initialize static data members)
console.h:18: error: variable or field `render' declared void
console.h:95: error: `BITMAP' was not declared in this scope
console.h:95: error: `where' was not declared in this scope
console.h:95: error: invalid data member initialization
console.h:95: error: variable or field `render' declared void
In file included from gusanos.cpp:2:
sprites.h:4:21: allegro.h: No such file or directory
In file included from gusanos.cpp:2:
sprites.h:10: error: syntax error before `*' token
In file included from gusanos.cpp:3:
network.h:5:21: allegro.h: No such file or directory
In file included from gusanos.cpp:4:
player.h:4:21: allegro.h: No such file or directory
In file included from gusanos.cpp:4:
player.h:67: error: `BITMAP' was not declared in this scope
player.h:67: error: `where' was not declared in this scope
player.h:67: error: parse error before `,' token
player.h:68: error: `BITMAP' was not declared in this scope
player.h:68: error: `where' was not declared in this scope
player.h:68: error: parse error before `,' token
gusanos.cpp:5:21: allegro.h: No such file or directory
In file included from gusanos.cpp:9:
engine.h:4:21: allegro.h: No such file or directory
In file included from gusanos.cpp:9:
engine.h:38: error: syntax error before `*' token
engine.h:113: error: `BITMAP' was not declared in this scope
engine.h:113: error: `where' was not declared in this scope
engine.h:113: error: parse error before `*' token
engine.h:120: error: syntax error before `;' token
gusanos.cpp: In function `int main(int, char**)':
gusanos.cpp:95: error: `vsync' undeclared (first use this function)
gusanos.cpp:95: error: (Each undeclared identifier is reported only once for
   each function it appears in.)
gusanos.cpp: At global scope:
gusanos.cpp:130: error: ISO C++ forbids declaration of `END_OF_MAIN' with no
   type
gusanos.cpp:130:15: warning: no newline at end of file
make: *** [gusanos.o] Error 1

Help?!
« Last Edit: October 10, 2005, 08:58:25 AM by mots » Logged
Gliptic
Gusanos Team
Veteran Member
*****

Karma: 8
Offline Offline

Posts: 208


View Profile
« Reply #7 on: October 10, 2005, 11:08:43 AM »

You don't have allegro installed (correctly).
Logged
mots
Sr. Member
***

Karma: 0
Offline Offline

Posts: 73



View Profile
« Reply #8 on: October 10, 2005, 12:19:32 PM »

You don't have allegro installed (correctly).

But Synaptic (I'm a Ubuntu User) says, that liballegro is installed
Logged
darka
Cancelled
Linux Guru
Veteran Member
*****

Karma: 12
Offline Offline

Posts: 192


View Profile
« Reply #9 on: October 10, 2005, 10:56:34 PM »

You need the *allegro-whatever*-dev package(s) too, sorry.
Updated the guide.
« Last Edit: October 10, 2005, 10:58:03 PM by darka » Logged
mots
Sr. Member
***

Karma: 0
Offline Offline

Posts: 73



View Profile
« Reply #10 on: October 11, 2005, 09:52:06 AM »

I'm pretty sure, it installed loadpng too, but that's what I get (second try)

Quote
root@Nonsense:/home/mots/gusanos/zoid # make -f Makefile.linux g++ -fno-rtti -O2 -I/usr/local/include/zoidcom -L/usr/local/lib/zoidcom   -c -o loadpng.o loadpng.c
loadpng.c:9:17: png.h: No such file or directory
loadpng.c:23: error: `Z_BEST_COMPRESSION' was not declared in this scope
loadpng.c:51: error: `png_structp' was not declared in this scope
loadpng.c:51: error: parse error before `,' token
loadpng.c: In function `void read_data(...)':
loadpng.c:53: error: `png_ptr' undeclared (first use this function)
loadpng.c:53: error: (Each undeclared identifier is reported only once for each
   function it appears in.)
loadpng.c:53: error: `png_get_io_ptr' undeclared (first use this function)
loadpng.c:54: error: `png_uint_32' undeclared (first use this function)
loadpng.c:54: error: parse error before `(' token
loadpng.c: In function `int check_if_png(PACKFILE*)':
loadpng.c:72: error: `png_byte' undeclared (first use this function)
loadpng.c:72: error: parse error before `)' token
loadpng.c: At global scope:
loadpng.c:80: error: parse error before `,' token
loadpng.c: In function `BITMAP* really_load_png(...)':
loadpng.c:84: error: `png_uint_32' undeclared (first use this function)
loadpng.c:84: error: parse error before `,' token
loadpng.c:90: error: parse error before `;' token
loadpng.c:95: error: `info_ptr' undeclared (first use this function)
loadpng.c:95: error: `png_read_info' undeclared (first use this function)
loadpng.c:97: error: `width' undeclared (first use this function)
loadpng.c:97: error: `height' undeclared (first use this function)
loadpng.c:98: error: `png_get_IHDR' undeclared (first use this function)
loadpng.c:103: error: `png_set_packing' undeclared (first use this function)
loadpng.c:106: error: `PNG_COLOR_TYPE_GRAY' undeclared (first use this
   function)
loadpng.c:107: error: `png_set_expand' undeclared (first use this function)
loadpng.c:111: error: `PNG_INFO_tRNS' undeclared (first use this function)
loadpng.c:111: error: `png_get_valid' undeclared (first use this function)
loadpng.c:112: error: `png_set_tRNS_to_alpha' undeclared (first use this
   function)
loadpng.c:116: error: `png_set_strip_16' undeclared (first use this function)
loadpng.c:120: error: `PNG_COLOR_TYPE_GRAY_ALPHA' undeclared (first use this
   function)
loadpng.c:121: error: `png_set_gray_to_rgb' undeclared (first use this
   function)
loadpng.c:126: error: `png_get_sRGB' undeclared (first use this function)
loadpng.c:127: error: `png_set_sRGB' undeclared (first use this function)
loadpng.c:130: error: `png_get_gAMA' undeclared (first use this function)
loadpng.c:131: error: `png_set_gamma' undeclared (first use this function)
loadpng.c:139: error: `pal' undeclared (first use this function)
loadpng.c:145: error: `PNG_COLOR_MASK_COLOR' undeclared (first use this
   function)
loadpng.c:147: error: `png_colorp' undeclared (first use this function)
loadpng.c:147: error: parse error before `;' token
loadpng.c:149: error: `palette' undeclared (first use this function)
loadpng.c:149: error: `png_get_PLTE' undeclared (first use this function)
loadpng.c:170: error: `png_set_interlace_handling' undeclared (first use this
   function)
loadpng.c:175: error: `png_read_update_info' undeclared (first use this
   function)
loadpng.c:177: error: `rowbytes' undeclared (first use this function)
loadpng.c:177: error: `png_get_rowbytes' undeclared (first use this function)
loadpng.c:196: error: `y' undeclared (first use this function)
loadpng.c:197: error: `png_read_rows' undeclared (first use this function)
loadpng.c:240: error: `png_read_end' undeclared (first use this function)
loadpng.c: In function `BITMAP* load_png(const char*, RGB*)':
loadpng.c:254: error: parse error before `;' token
loadpng.c:272: error: `PNG_LIBPNG_VER_STRING' undeclared (first use this
   function)
loadpng.c:273: error: `png_create_read_struct' undeclared (first use this
   function)
loadpng.c:280: error: `png_create_info_struct' undeclared (first use this
   function)
loadpng.c:282: error: `png_infopp' undeclared (first use this function)
loadpng.c:282: error: parse error before `__null'
loadpng.c:291: error: `setjmp' undeclared (first use this function)
loadpng.c:293: error: parse error before `__null'
loadpng.c:300: error: `png_rw_ptr' undeclared (first use this function)
loadpng.c:300: error: parse error before `)' token
loadpng.c:303: error: `png_set_sig_bytes' undeclared (first use this function)
loadpng.c:309: error: parse error before `__null'
loadpng.c: At global scope:
loadpng.c:325: error: 'png_uint_32' is used as a type, but is not defined as a
   type.
loadpng.c:326: error: 'png_uint_32' is used as a type, but is not defined as a
   type.
loadpng.c:329: error: parse error before `,' token
loadpng.c: In function `void read_data_memory(...)':
loadpng.c:331: error: `png_get_io_ptr' undeclared (first use this function)
loadpng.c:333: error: `length' undeclared (first use this function)
loadpng.c:333: error: 'struct MEMORY_READER_STATE' has no member named 'bufsize
   '
loadpng.c:333: error: 'struct MEMORY_READER_STATE' has no member named '
   current_pos'
loadpng.c:334: error: `png_error' undeclared (first use this function)
loadpng.c:336: error: `data' undeclared (first use this function)
loadpng.c:336: error: 'struct MEMORY_READER_STATE' has no member named '
   current_pos'
loadpng.c:336: error: `memcpy' undeclared (first use this function)
loadpng.c:337: error: 'struct MEMORY_READER_STATE' has no member named '
   current_pos'
loadpng.c: In function `int check_if_png_memory(const void*)':
loadpng.c:347: error: parse error before `)' token
loadpng.c: In function `BITMAP* load_memory_png(const void*, int, RGB*)':
loadpng.c:359: error: parse error before `;' token
loadpng.c:375: error: `png_create_read_struct' undeclared (first use this
   function)
loadpng.c:380: error: `png_create_info_struct' undeclared (first use this
   function)
loadpng.c:382: error: parse error before `__null'
loadpng.c:390: error: `setjmp' undeclared (first use this function)
loadpng.c:392: error: parse error before `__null'
loadpng.c:399: error: 'struct MEMORY_READER_STATE' has no member named 'bufsize
   '
loadpng.c:400: error: 'struct MEMORY_READER_STATE' has no member named '
   current_pos'
loadpng.c:403: error: parse error before `)' token
loadpng.c:406: error: `png_set_sig_bytes' undeclared (first use this function)
loadpng.c:412: error: parse error before `__null'
make: *** [loadpng.o] Error 1
Logged
darka
Cancelled
Linux Guru
Veteran Member
*****

Karma: 12
Offline Offline

Posts: 192


View Profile
« Reply #11 on: October 12, 2005, 10:16:35 AM »

Quote
loadpng.c:9:17: png.h: No such file or directory
Are you sure you installed the libpng-dev package?
Logged
mots
Sr. Member
***

Karma: 0
Offline Offline

Posts: 73



View Profile
« Reply #12 on: October 14, 2005, 09:54:04 AM »

Quote
loadpng.c:9:17: png.h: No such file or directory
Are you sure you installed the libpng-dev package?

I tried to install it again and it said:

Quote
root@Nonsense:/home/mots/gusanos # cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/gusanos co zoid/loadpng.c zoid/loadpng.h zoid/regpng.c zoid/savepng.c
cvs checkout: warning: failed to open /root/.cvspass for reading: No such file or directory
root@Nonsense:/home/mots/gusanos #
Logged
darka
Cancelled
Linux Guru
Veteran Member
*****

Karma: 12
Offline Offline

Posts: 192


View Profile
« Reply #13 on: October 14, 2005, 10:20:41 AM »

I mean a libpng-dev package provided by your distro, those are gusanos special.
Logged
mots
Sr. Member
***

Karma: 0
Offline Offline

Posts: 73



View Profile
« Reply #14 on: October 14, 2005, 11:26:30 AM »

I mean a libpng-dev package provided by your distro, those are gusanos special.
OK thanks, I get nearer. Tongue
Now I get this
Quote
root@Nonsense:/home/mots/gusanos/zoid # make -f Makefile.linux
g++ -o ../gusanos.exe gusanos.o sprites.o water.o engine.o console.o text.o keys.o render.o input.o sounds.o particles.o explosions.o weapons.o level.o player.o network.o lights.o loadpng.o regpng.o savepng.o gfx.o -fno-rtti -O2 -I/usr/local/include/zoidcom -L/usr/local/lib/zoidcom `allegro-config --libs` -lzoidcom -lpng
/usr/bin/ld: cannot find -lXxf86dga
collect2: ld returned 1 exit status
make: *** [../gusanos.exe] Error 1


Sorry for my dumb questions ,but I'm a Linux noob
« Last Edit: October 14, 2005, 11:27:53 AM by mots » Logged
Pages: [1] 2 3 4 5 Go Up Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!