These are the instructions for installing Quake.


Installing the Quake Data Files
-------------------------------

You must manually copy the Quake data files to the device.

*** Note, you must obtain the Quake game data file pak0.pak and copy it to the
*** directory quake/app/id1 in the glesquake source tree in
*** order for these instructions to work correctly.

Quake needs about 20 MB of space to store its data files. Quake files go on an external
micro SD card (In the device's /sdcard/data/quake directory).

Using the device with a microsd card:

	Turn on device, plug into your development computer using the supplied ADB cable.
	cd glesquake
	adb remount

Make sure your device is not mounted as an USB Storage Device:
    Press Home button on Phone
    Press Menu
    Select "SD card & phone storage
    Make sure "Use for USB storage" is unchecked.

Use the following adb commands to copy the data files to the device:

    adb shell mkdir /sdcard/data
    adb shell mkdir /sdcard/data/quake
    adb shell mkdir /sdcard/data/quake/id1
    adb push quake/app/id1 /sdcard/data/quake/id1
    
These commands copy two files, pak0.pak and config.cfg, to the /sdcard/data/quake/id1 directory.

Verify that the files were copied:

    adb shell ls /sdcard/data/quake/id1

Should print out:

    config.cfg
    pak0.pak

Using the emulator:

	You can also run Quake with the emulator.
	Once you've started the emulator with a sdcard image you can follow the directions for
	a real device.


Running Quake
-------------

Turn on the device

Look for Quake in the Activities folder. Launch it as you would any other activity.
It will take up to thirty seconds to start running.

When Quake starts running it will display a console with some debug information, then
go into an "attract mode" loop.

Starting a game:

Press space bar to bring up the main menu.
The "Quake icon" should be next to the "Single Player" menu item. Press the
"Enter" button twice to start the game.

Controls:

The Quake controls are customizable, depending upon the settings of config.cfg,
but the defaults are:

Android     PC Key    Command          Notes
Keypad
----------  --------- ---------------  ----------------------------------
Alt Space   TAB       +showscores      Shows scores in multiplayer games
DPad Enter  ENTER     +jump
Menu        ESCAPE    togglemenu       Shows/hides menu
space       SPACE     +jump
+           +         sizeup           Increases size of screen
,           ,         +moveleft	       Strafe left
-           -         sizedown
.           .         +moveright       Strafe right
/           /         impulse 10       Toggle weapons up
0           0         impulse 0        
1           1         impulse 1        Select weapon 1 (axe)
2           2         impulse 2        Select weapon 2 (shotgun)
3           3         impulse 3        Double-barrled shotgun
4           4         impulse 4        Nailgun
5           5         impulse 5        Super nailgun
6           6         impulse 6        Grenade launcher
7           7         impulse 7        Rocket Launcher
8           8         impulse 8        Thunderbolt
=           =         sizeup
\           \         +mlook           Mouse look. (Not very useful, as there is no mouse.)
Alt w       `         toggleconsole    Used to enter fancy commands.
w           w         +forward
s           s         +back
a           a         +left
d           d         +right
q           q         +lookup
z           z         +lookdown
v           v         +movedown
f           f         +moveup
t           t         messagemode
DPad Up     UPARROW   +forward
DPad Down   DOWNARROW +back
DPad Left   LEFTARROW +left
DPad Right  RIGHTARROW+right
Alt         ALT       +strafe
@ or /      CTRL      +attack
Cap         SHIFT     +speed
Alt 1       F1        help              (This is just an advertisement in the shareware version.)
Alt 2       F2        menu_save
Alt 3       F3        menu_load
Alt 4       F4        menu_options
Alt 5       F5        menu_multiplayer
Alt 6       F6        echo Quicksaving...; wait; save quick
Alt 9       F9        echo Quickloading...; wait; load quick
Alt 0       F10       quit
Alt t       F11       zoom_in
Alt y       F12       screenshot
<none>      INS       +klook
<none>      DEL       +lookdown
<none>      PGDN      +lookup
<none>      END       centerview
<none>      MOUSE1    +attack
<none>      MOUSE2    +forward
<none>      MOUSE3    +mlook
Alt z       PAUSE     pause
Camera      HOME      ...not bound by default...
-----

Console Commands:

timedemo demo#  run time demo # (1..3)
god 	        turns on god mode
fly 	        enables fly mode
kill 	        commits suicide
notarget 	enemies don't attack until provoked
noclip 	    walk through walls
give s # 	gives # (where # = a number) of shotgun shells
give n # 	gives # of nails
give r # 	gives # of rockets/grenades
give c # 	gives # of cells
give h # 	gives # of health
give # 	    gives weapon #
map e#m# 	warps to the episode and mission specified
impulse -1 	quad cheat
impulse 9 	all weapons and keys
impulse 255 	quad cheat
 
Uninstalling Quake
------------------

Quake has to be uninstalled in two parts:
    a) the Quake.apk file
    b) the data files on the sdcard

Use the Phone UI to uninstall the Quake apk:

    Press Home Key
    Press Menu Key
    Select Settings
    Select Applications
    Selct Manage Applications
    Select Quake
    Press "Uninstall"

Make sure your device is not mounted as an USB Storage Device:
    Press Home button on Phone
    Press Menu
    Select "SD card & phone storage
    Make sure "Use for USB storage" is unchecked

Then run this script to delete the Quake files on the sdcard:

    cd $TOP/apps/Quake
    ./cleanupdevicesdcard.sh
