===============================================================================

Missile Command v1.0.1               By Julian Peterson (weaver@earthcorp.com)
Ported to the Zaurus                 By Steve Essery (tecknobabble@hotmail.com)

A clone of the Atari save-your-city-from-impending-nuclear-doom game.

===============================================================================

REQUIREMENTS:

SDL >= v1.2.4
  http://www.libsdl.org/download-1.2.php
  NB  The Zaurus port requires SDL >= 1.2.5 (first version to support Qtopia)

SDL_image >= 1.2.1  (as well as at least libpng.so.2)
  http://www.libsdl.org/projects/SDL_image/

SDL_mixer >= 1.2.4  (if you compile in sound)
  http://www.libsdl.org/projects/SDL_mixer/


notes: 

 - If you download the binary SDL rpms, you need to also get the associated 
   devel packages to be able to compile Missile Command.

 - The 0.99.7 binary packages are linked against SDL v1.0.x
   Later versions are linked against SDL v1.2.x
   If you have mismatching libraries you will have to download one of the 
   source distributions (SDL v1.0.x and v1.2.x are source compatible, but not 
   binary compatable)

 - The SDL libraries are licensed under the LGPL.

 - To build for the Zaurus you will also need:
   Qtopia Embedded 1.5
   Embedix Cross Compiling Tools
   ipkg-build.sh
     http://www.zaurus.com/dev/support/qtc.htm
     http://www.zaurus.com/dev/support/downloads/qte_programming-guide_v111.pdf
     http://docs.zaurus.com/ipkg_howto.shtml

-------------------------------------------------------------------------------

DOWNLOADING:

All files can be found at:
  https://sourceforge.net/project/showfiles.php?group_id=3504
  
The Missile Command homepage is at: 
  http://missile.sourceforge.net/

The SDL homepage is at:
  http://www.libsdl.org/


note: the SDL_ttf libs are not required for Missile Command v0.99.2 and above

The downloadable ipkg for the Zaurus contains a statically linked executable
and therefore does not require any additional ipkgs to be installed.

-------------------------------------------------------------------------------

INSTALLATION:

Step 1: Edit the Makefile, and change the lines:

    data_prefix    = /usr/local/
    game_bin       = bin
    game_data      = share/missile
    game_icons     = share/pixmaps

    to reflect wherever you want the game installed.


  And change:

    install_as_owner = root
    install_as_group = games
    
    to reflect the ownership of the files. 

    note: This will have to be your username/group if you're not root


  For sound, ensure there is a line:

     sound           = USE_SOUND



Step 2:  Skip to step 3 if you have a precompiled copy of Missile Command, 
otherwise to compile type:

> make

or for the Zaurus

> make -f Makefile.zaurus

 

Step 3: To install all of the files in the right places, type:

> make install

For the Zaurus you will need to build an ipkg file to enable you to install
the program.  As the owner of the files needs to have a UID<99 you may wish to
create the ipkg file as root, e.g:

> su
Password:
# make -f Makefile.zaurus ipkg

Transfer the resulting missilecommand_<VERSION>_arm.ipk to your Zaurus and
install as normal.



Step 4: (optional for KDE or Gnome users)

Copy missile.desktop to your Gnome menu subdir.  
(Usually /usr/share/gnome/apps/Games/ ?)
> cp missile.desktop /usr/share/gnome/apps/Games

And/Or:

Copy missile.kdelnk to your KDE  menu subdir.
(Usually /usr/share/applnk/Games/ ?)
> cp missile.kdelnk /usr/share/applnk/Games/

You will want to check those paths.  All I know is that is where they are on my
machine.

I suspect the gnome path is simply `gnome-config --datadir`/gnome/apps/Games
and I believe KDEs is `kde-config --expandvars --install apps`/Games
Can anyone help with that?

-------------------------------------------------------------------------------

PLAYING:

Command Line:

 missile [options]
   -f, --fullscreen            : play in fullscreen mode 
   -d, --set-datadir=<datadir> : look for game data in dir <datadir>
   -b, --bigcursor             : use a larger crosshair
   -h, --help                  : prints command line options and game controls

 notes:
 - --fullscreen works best if you have a 640x480 video mode defined in your 
   XF86Config file.
 - Use --set-datadir if you move the location of the data dir.  You only need 
   to do this once as it gets remembered.
 - The Zaurus version always runs in full screen mode and does not display a 
   cross hair cursor

Controls:

 Use the mouse to aim.

 1, left mouse button   : fires from the left SAM site.
 2, middle mouse button : fires from the centre SAM site.
 3, right mouse button  : fires from the right SAM site.

 ctrl, shift, space     : fire from the SAM site closest to the target

 ESC                    : Quit
 Print Screen           : Screenshot (doesn't yet work on the splash screens)
 Pause                  : Pause the game

Zaurus Controls:

 Tap the screen with the stylus to fire a missile from the nearest SAM site to
 the position tapped on the screen.

 Cancel                 : Quit
 Central button         : Pause
 p                      : Print Screen

 NB Screen shoots are written to /home/root
    High score information saved in /home/root/.missilecommandrc


Points: 

 Regular Missile ............................    10
 MIRV .......................................    20
 Smart Bomb .................................    50
                                             
 Bonus for SAMS left at the end of a wave ...    10
 Bonus for cities left ......................   100
                                             
 Get a new city every .......................  5000
 Get a new base every ....................... 20000

-------------------------------------------------------------------------------

UNINSTALLING:

To uninstall Missile Command, type:

> make uninstall

Use the package manager to remove the missile command package on the Zaurus

-------------------------------------------------------------------------------

CHANGELOG:

v1.0.1
 Finally merged in the Zaurus specific changes initially done for the original
 Zaurus release (based on the 0.99.7 version)

v1.0.0
 Figured it was about time for version 1.0 =)
 Sound!
 Added version info image to main splash screen.
 Binary distributions are now linked against libSDL-1.2.so.x so if you have 
  SDL v1.0.x installed, you will have to upgrade to v1.2.4 (there are no 
  problems compiling from source code though)
 Ditched having the config file in /etc, that was a bad idea.

v0.99.7
 I'm happy with missile frequency, number, and speed, so unless something major
  is uncovered, this should be the last release before v1.0.0
 Available as binary tar.gz and rpm downloads.
 Now also tries to read /etc/missilecommand.conf when tring to find the data
  directory.  The format for this file is a single line with: 
  Data=/the/data/dir (the same format as the ~/.missilecommandrc files).
 Error messages are little more verbose (and hopefully more helpful).
 Cities are (once again) redrawn every frame, so you can't knock bits out.
 Fully documented command line options.
 Added an icon (submissions of a better one welcome).

v0.99.6
 The event queue is now flushed before the start of each wave, so that if you 
  hit the buttons after the wave is over, you don't fire all your missiles at 
  the start of the next.
 Added a --bigcursor option for those who find the default too hard to see.
 Now works in 8 bit colour mode.
 Cleaned up code a little more.

v0.99.5
 Tweaked missile frequency, number, and speed.
 Fixed bug where you could destroy all the missiles by shooting the top of the
  screen.
 Bases now regenerate (every 20000 points).
 Lined up missiles and cities in end of wave splash screen.
 Added option to pause the game.
 Made error messages a little more helpful.
 Fixed bug in screen_shot which tried to free unallocated memory.

v0.99.4
 Fixed bug with freeing memory not always allocated in reading/writing of rc 
  file (this one was a show stopper for some people) (thanks Mattias Engdegard)
 Changed index/rindex calls to strchr/strrchr for POSIX compliance (thanks 
  Mattias Engdegard)
 Cleaned out some chaff

v0.99.3
 Improvement in image blitting speed.
 Optimised circle drawing routine.
 Add cities gained at the start of the wave instead of the end
  (means you dont start a wave where in the previous everything died).
 Fixed bug where you had a 1/6 chance of having to wait until the next wave to
  get your brand spanking new city.
 Improved error messages for when game data is not found.
 Fixed bug when data dir == "." being set incorrectly

v0.99.2 
 No longer require SDL_ttf
 Tidied up colour stuff (internally)
 Changed "level" to "wave" everywhere =)

v0.99.1 
 Slowed down missiles (they now get 1.3p/s faster per wave instead of 2p/s)
 Decreased missile frequency.
 Some misc cosmetic changes.

v0.99.0
 Initial release.

-------------------------------------------------------------------------------

TODO:
(in a vague-ish order of priority)

Required for v1.0.1:

Check on the still occassional crashes/freezes in the Zaurus port, possibly not
handling all the required Qtopia events properly.


Required for v1.0.0:

Occasional seg fault in DRAWPIXEL() in draw_line(). 
Anyone else had this?  (Run "gdb missile core" to see where it segfaults)
Somehow I'm occasionally creating a missile way out of bounds 
(by stomping on memory somewhere perhaps?)


Maybe for v1.0.0 or at least early v1.x

Sound.  Anyone got any suitable sound effects?
  - start of level
  - end of level
  - sam fired (got one)
  - incoming missile
  - incoming smart bomb
  - explosions (maybe different ones for sams/missiles/bases)
  - game over
  - high score reached
  - new city acquired
  - new base acquired
  - bonus points for cities remaining ticker thing (got one)
  -  ditto for missiles (got one)


For > v1.0.0:

Antialiased blasts (and perhaps missile vapour trails).

New graphics (even though the current ones are far better than anything
Michaelangelo* could do).

Maybe some more features (I have a couple ideas for some new nasties). 



* The Ninja Turtle, not the painter.

-------------------------------------------------------------------------------

CONTACT:

Bug reports, suggestions, and bitching to:

  Julian Peterson (weaver@earthcorp.com)

For issues with the Zaurus port:

  Steve Essery (tecknobabble@hotmail.com)

-------------------------------------------------------------------------------

LEGAL INFORMATION:

Copyright (C) 2000 Julian Peterson

This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

===============================================================================
