/* -*-mode: c; fill-column: 78; compile-command: "make ARCH=68K_ONLY MEMDEBUG=TRUE"; -*- */

/*****************************************************************************
 * Copyright 1999 - 2001 by Eric House.  All rights reserved.  
 *
 * 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.
 *
 * These resources are shared among all localized verions of XW4; no
 * localization required.
 ****************************************************************************/

#ifdef COLOR_SUPPORT
/* colors */
HEX "Clrs" ID 1000 
    0x00 0x00 0x00		/* black */
    0xFF 0xFF 0xFF		/* white */
    0x00 0x00 0x00		/* player 1 */
    0xFF 0x00 0x00
    0x00 0x00 0xFF
    0x00 0xFF 0x00
    0xAF 0xAF 0x00		/* bonus 1 */
    0x00 0xAF 0xAF
    0xAF 0x00 0xAF
    0xAF 0xAF 0xAF
    0xFF 0xFF 0xFF		/* empty cells */
    0xFF 0xFF 0x99		/* tile background */
#endif

ICONFAMILY "./bmps/xwbandwicon.bmp" "" "" "./bmps/xwcoloricon.bmp" TRANSPARENT 255 255 255
SMALLICONFAMILY "bmps/xwbandwicon_sm.bmp" "" "" "./bmps/xwcoloricon_sm.bmp" TRANSPARENT 255 255 255

BITMAP ID SHOWTRAY_BUTTON_BMP_RES_ID "bmps/showtray.pbitm" AUTOCOMPRESS

BITMAP ID DOWN_ARROW_RESID AUTOCOMPRESS
BEGIN
    BITMAP "bmps/downarrow.pbitm"   BPP 1 DENSITY 72
    BITMAP "bmps/downarrowhd.pbitm" BPP 1 DENSITY 144
END

BITMAP ID RIGHT_ARROW_RESID AUTOCOMPRESS
BEGIN
    BITMAP "bmps/rightarrow.pbitm"   BPP 1 DENSITY 72
    BITMAP "bmps/rightarrowhd.pbitm" BPP 1 DENSITY 144
END

/* bitmap family for inclding highres version */
BITMAP ID TRAY_BUTTONS_BMP_RES_ID AUTOCOMPRESS
BEGIN
    BITMAP "bmps/traybuttons.pbitm" BPP 1 DENSITY 72
    BITMAP "bmps/traybuttonshd.pbitm" BPP 1 DENSITY 144
END

BITMAP ID STAR_BMP_RES_ID AUTOCOMPRESS
BEGIN
    BITMAP "bmps/startmark.pbitm"   BPP 1  DENSITY 72
    BITMAP "bmps/startmarkhd.pbitm" BPP 1  DENSITY 144
END

BITMAP ID FLIP_BUTTON_BMP_RES_ID AUTOCOMPRESS
BEGIN
    BITMAP "bmps/flipbutton.pbitm"   BPP 1  DENSITY 72
    BITMAP "bmps/flipbuttonhd.pbitm" BPP 1 DENSITY 144
END

BITMAP ID HINT_BUTTON_BMP_RES_ID AUTOCOMPRESS
BEGIN
    BITMAP "bmps/lightbulb.pbitm"   BPP 1 DENSITY 72
    BITMAP "bmps/lightbulbhd.pbitm" BPP 1 DENSITY 144
END

BITMAP ID VALUE_BUTTON_BMP_RES_ID AUTOCOMPRESS
BEGIN
    BITMAP "bmps/valuebutton.pbitm"   BPP 1 DENSITY 72
    BITMAP "bmps/valuebuttonhd.pbitm" BPP 1 DENSITY 144
END

#ifdef XWFEATURE_BLUETOOTH
BITMAP ID BTSTATUS_NONE_RES_ID AUTOCOMPRESS
BEGIN
    BITMAP "bmps/bts_off.pbitm"   BPP 1 DENSITY 72
    BITMAP "bmps/bts_off.bmp" BPP 8 DENSITY 144
END

BITMAP ID BTSTATUS_LISTENING_RES_ID AUTOCOMPRESS
BEGIN
    BITMAP "bmps/bts_listen.pbitm"   BPP 1 DENSITY 72
    BITMAP "bmps/bts_listen.bmp" BPP 8 DENSITY 144
END

BITMAP ID BTSTATUS_SEEKING_RES_ID AUTOCOMPRESS
BEGIN
    BITMAP "bmps/bts_seek.pbitm"   BPP 1 DENSITY 72
    BITMAP "bmps/bts_seek.bmp" BPP 8 DENSITY 144
END

BITMAP ID BTSTATUS_CONNECTED_RES_ID AUTOCOMPRESS
BEGIN
    BITMAP "bmps/bts_conn.pbitm"   BPP 1 DENSITY 72
    BITMAP "bmps/bts_conn.bmp" BPP 8 DENSITY 144
END
#endif /* XWFEATURE_BLUETOOTH */

#define TBH TRAY_BUTTON_HEIGHT_HR
#define TBY TRAY_BUTTONS_Y_HR

FORM ID XW_MAIN_FORM AT (0 0 160 160)
USABLE
NOFRAME
MENUID XW_MAIN_MENU_ID
BEGIN
#ifdef XWFEATURE_FIVEWAY
    GADGET ID XW_SCOREBOARD_GADGET_ID AT (0 0 1 1) USABLE
    GADGET ID XW_BOARD_GADGET_ID AT (0 0 1 1) USABLE
    GADGET ID XW_TRAY_GADGET_ID AT (0 0 1 1) USABLE
#endif
    BUTTON "" XW_MAIN_FLIP_BUTTON_ID 
        AT (PALM_FLIP_LEFT PALM_BOARD_TOP FLIP_BUTTON_WIDTH 
	    FLIP_BUTTON_HEIGHT) NOFRAME
    BUTTON "" XW_MAIN_VALUE_BUTTON_ID 
        AT (PALM_FLIP_LEFT PREVBOTTOM+2 
        FLIP_BUTTON_WIDTH FLIP_BUTTON_HEIGHT+2) NOFRAME
    BUTTON "" XW_MAIN_HINT_BUTTON_ID 
	AT (PALM_FLIP_LEFT PREVBOTTOM+2 FLIP_BUTTON_WIDTH 
	    FLIP_BUTTON_HEIGHT+3) NOFRAME

    SCROLLBAR ID XW_MAIN_SCROLLBAR_ID
	AT ( PREVLEFT PREVBOTTOM+5 RECOMMENDED_SBAR_WIDTH 
	     160-TRAY_HEIGHT_HR-PREVBOTTOM-IR_STATUS_HEIGHT-5)
	USABLE VALUE SBAR_START_VALUE MIN SBAR_MIN MAX SBAR_MIN
	PAGESIZE SBAR_PAGESIZE

#ifdef XWFEATURE_BLUETOOTH
    GADGET ID XW_BTSTATUS_GADGET_ID AT (PALM_FLIP_LEFT PREVBOTTOM+4 16 15) 
         NONUSABLE
#endif

    BUTTON "" XW_MAIN_SHOWTRAY_BUTTON_ID 
        AT (PALM_FLIP_LEFT SHOWTRAY_BUTTON_Y
        FLIP_BUTTON_WIDTH FLIP_BUTTON_WIDTH+4) NOFRAME

#ifndef EIGHT_TILES
    BUTTON "" XW_MAIN_HIDE_BUTTON_ID
       AT(PALM_TRAY_BUTTON_LEFT TBY TRAY_BUTTON_WIDTH TBH) NOFRAME 
    BUTTON "" XW_MAIN_JUGGLE_BUTTON_ID
        AT(PREVRIGHT PREVTOP TRAY_BUTTON_WIDTH TBH) NOFRAME 
    BUTTON "" XW_MAIN_TRADE_BUTTON_ID
        AT(PALM_TRAY_BUTTON_LEFT PREVBOTTOM TRAY_BUTTON_WIDTH
        TBH) NOFRAME
    BUTTON "" XW_MAIN_DONE_BUTTON_ID
        AT(PREVRIGHT PREVTOP TRAY_BUTTON_WIDTH TBH) NOFRAME
#endif
#ifdef FOR_GREMLINS
    GADGET GREMLIN_BOARD_GADGET_IDAUTOID AT ( 0 5 152 135 )
    GADGET GREMLIN_TRAY_GADGET_IDAUTOID AT ( 0 140 145 20 )
#endif
END /* XW_MAIN_FORM */

#ifdef XWFEATURE_FIVEWAY
NAVIGATION ID XW_MAIN_FORM
INITIALSTATE kFrmNavHeaderFlagsObjectFocusStartState
/* INITIALOBJECTID: the OS arbitrarily sends a focusTake event for some button
 * on opening the form if this isn't set, otherwise it sends for this.  That's
 * easier to test for and drop, so set it is. */
INITIALOBJECTID XW_SCOREBOARD_GADGET_ID
NAVIGATIONMAP
    ROW XW_SCOREBOARD_GADGET_ID
    ROW XW_BOARD_GADGET_ID 
        XW_MAIN_FLIP_BUTTON_ID 
        XW_MAIN_VALUE_BUTTON_ID 
        XW_MAIN_HINT_BUTTON_ID 
    ROW XW_TRAY_GADGET_ID
        XW_MAIN_SHOWTRAY_BUTTON_ID
        XW_MAIN_HIDE_BUTTON_ID
        XW_MAIN_JUGGLE_BUTTON_ID
        XW_MAIN_TRADE_BUTTON_ID
        XW_MAIN_DONE_BUTTON_ID
END

NAVIGATION ID XW_PASSWORD_DIALOG_ID
INITIALSTATE kFrmNavHeaderFlagsObjectFocusStartState
INITIALOBJECTID XW_PASSWORD_PASS_FIELD
NAVIGATIONMAP
    ROW XW_PASSWORD_PASS_FIELD
    ROW XW_PASSWORD_OK_BUTTON XW_PASSWORD_CANCEL_BUTTON
END
#endif

STRING ID 1000 "/palm/programs/Crosswords/"

APPLICATIONICONNAME ID 1000 ICONTEXT

/* force hotsync into games category */
LAUNCHERCATEGORY ID 1000 "Games"

HEX "Xbrd" ID 1000
#if 1				/* the "scrabble" pattern */
    0x40 0x01 0x00 0x04
    0x02 0x00 0x03 0x00
    0x00 0x20 0x00 0x10
    0x10 0x02 0x00 0x01
    0x00 0x00 0x20 0x00
    0x03 0x00 0x03 0x00
    0x00 0x10 0x00 0x10
    0x40 0x01 0x00 0x02
#else
    0x04 0x00 0x10 0x04
    0x40 0x00 0x03 0x00
    0x00 0x00 0x20 0x10
    0x00 0x03 0x00 0x01
    0x10 0x20 0x00 0x30
    0x03 0x00 0x01 0x00
    0x00 0x10 0x30 0x00
    0x40 0x01 0x00 0x02
#endif

/* for 13x13 board */
HEX "Xbrd" ID 1001		/* This is 7x7, so one line is two rows */
    0x20 0x03 0x00 0x30 0x40 0x00 0x10
    0x00 0x10 0x00 0x03 0x00 0x30 0x00
    0x00 0x00 0x10 0x00 0x10 0x00 0x30
    0x30 0x00 0x00 0x20

/* for 11x11 board */
HEX "Xbrd" ID 1002		/* This is 6x6 */
    0x04 0x00 0x03
    0x40 0x03 0x00
    0x00 0x10 0x01
    0x03 0x01 0x00
    0x00 0x00 0x30
    0x30 0x10 0x02

VERSION ID 1000 XW_PALM_VERSION_STRING