Swear (151)

7 Name: Ordinary K!3GqYIJ3Obs : 2005-11-06 14:47 ID:Heaven [Del]

Huge thanks to waha for porting this game to multi-platform, and for helping me get the code compiled and running properly on my Linux machine. Here's how to do it.

LINUX COMPILATION TIPS:

Before you do anything, make sure you have allegro installed. Get it here:
http://www.talula.demon.co.uk/allegro/

After you've got that taken care of, go ahead and unzip the Swear_src.zip file and cd to the src directory.

There is a bit of code in src/lib/goa/allegro/misc.cpp that will cause an error when attempting to compile on Linux, and needs to be changed. Open up your favorite text editor and change line 41 from:

#ifndef OS_MACOSX

to:

#if 0

Now the program should compile without errors by running:

make os=unix

By default, Makefile.magic in both the src and src/lib/goa directories sets CFLAGS and CXXFLAGS to:

-mcpu=pentium -O6 -ffast-math -D_OS_UNIX_

Under gcc 3.4.x, this will generate a warning, because the -mcpu argument is now deprecated (you should use -march or -mtune instead). You might want to set these flags to your hardware's advantage. For example, for my Pentium 4 machine, I set these to:

-march=pentium4 -O3 -pipe -fomit-frame-pointer -D_OS_UNIX

I'm not sure what the -D_OS_UNIX argument does, but leaving it in didn't cause any harm when I ran make. Also, keep in mind -march will create code that runs ONLY on the CPU you specify. To optimize for your CPU without losing backward compatibility, use -mtune instead.

To save hard drive space, run the following two commands after make runs successfully:

strip --strip-debug main
strip --strip-unneeded main

This reduced the size of the file from 615K to 496K on my machine.

You'll need the swear.dat file from one of the binary zips, or you'll get a Guru Meditation as soon as you try to run the program. Just put it in the same directory as the binary.

You'll only need to keep the following files to run Swear:

main swear.cfg swear.dat swear.ico swear.png swear_res.rc

All other files (the .cpp sources, the .o objects, the .h headers, etc.) can be deleted. swear.cfg will be auto-generated the first time you run the game.

To run the game (at last!), just type 'main'.

Name: Link:
Leave these fields empty (spam trap):
More options...
Verification: