DRUID Development Docs: gadget_strings.str

File: gadget_strings.str

#
# Justice Unlimited Gadget Strings and Menu Definition File
#
# Copyright (C) 2004, Nathan (Acorn) Pooley
#

#
#@DOC@ Top level strings file: Main menu and general strings
#

#
# TO DEFINE A STRING:
# str_<stringname> "<string text>"
#
#
# TO DEFINE A TEXT MODE
# TEXT mode_<screen_name> mode_<end_mode>
# [str_<stringname>] "<string text>"
#            ...
# END
#
#
# TO DEFINE A MENU
# MENU mode_<menu_name> [str_<stringname>] "<menu header text>"
# mode_<menu_item_mode> [str_<stringname>] "<string text>"
#            ...
# END
#
# NOTE: PUSH or SET can precede mode_<end_mode> or mode_<menu_item_mode>.
#       Default for menu items is PUSH.
#       Default for TEXT is SET.
#       Either mode_<end_mode> or mode_<menu_item_mode> can also be the
#         keyword POP.
#
#
# TO DEFINE A STRING-ENTRY MODE
# ENTRY mode_<entry_name> func_<enter_func> msk<MASK> [str_<stringname>] "<prompt text>"
#             <MASK> contains one or more of [Aa0_] describing which chars will
#                     be accepted (upper, lower, digits, and space)
#
# TO DEFINE A FUNCTION-CALL MODE
# FUNC mode_<func_mode_name> func_<func_name> [<parm1> [<parm2>]]
#
#
# TO DEFINE A FUNCTION POINTER
# FPTR <func_name>
#
#
# TO DEFINE A CODE
# CODE "<code text>" func_<func_name> [parm0] [parm1_max] [parm2_max]
#
#
# Special characters
#      \b    - bullet character
#      \n    - newline (just positions cursor at start of line2)
#      \h    - backspace
#      \0xnn - hex char nn
#
#     COMMANDS
#      \P##  - position cursor
#      \C    - clear screen
#      \s    - hide cursor
#      \S    - show cursor
#      \l    - light off
#      \L    - light on
#      \w    - line wrap off
#      \W    - line wrap on
#
#    DEFINE NEW CHARACTER
#      \Nc   - define character c - next 8 lines are [. ] or [^. ] (5 wide)
#                        c = 0...7
#      \0 - \7 - display character
#    
#    SHOW INFO
#      \t    - game time
#      \T    - real time
#      \i    - irlook result
#    
#    
#     ERROR/DEBUG COUNTS (for debugging)
#      \R    - Restarts (serial)
#      \a    - noacks (serial)
#      \A    - retries (serial)
#      \B    - bus collisions (serial)
#      \c    - wcol collisions (serial)
#      \d    - no sspif (serial)
#      \D    - enables
#      \r    - turnons
#
#


#define ALLOW_CONFIG    0
#define ALLOW_DEBUG     0
#define ALLOW_NEWS      0
#define ALLOW_HINTS     0
#define OUTPUT_PARALLEL 1
#define PUZZLE_CURTIS1  1
#define ALLOW_DBSOUND   1


str_hello       "Hello World!"
str_goodbye     "Goodbye World!"
str_yes         "Yes"
str_no          "No"


#
# Entry special characters
# (NOTE: These must be in this order)
#
str_entry_spc       "       \h\h\h\h\h\h\h\h\S"
str_entry_del       "\0x7f<del> \h\h\h\h\h\h\h\S"
str_entry_enter     "<Enter>\S"
str_entry_exit      "<Exit> \h\S"


#
# WELCOME MODE - MUST BE FIRST MODE IN FILE!!
#
TEXT mode_welcome mode_main_menu
"  Welcome to DRUID"
"Click knob to start"
"(Press entire knob"
"down)"
END


##################
#  MAIN MENU
##################
#
#
MENU mode_main_menu "Main Menu"
mode_codes          "Enter code"
mode_help_druid     "What is DRUID?"
mode_help           "Help with DRUID"

#if 0
#if ALLOW_HINTS
mode_hints          "Get hint"
#endif

#if ALLOW_NEWS
mode_news           "Get latest news"
#endif
#endif

mode_irlook         "Short range scanner"

mode_numbers        "Numbers"
mode_ref            "Reference"
mode_name           "Enter team name"
mode_light          "Backlight on/off"

#if 0
#if ALLOW_DEBUG
mode_debug          "Debugging"
#endif
#endif

#if 0
#if ALLOW_DBSOUND
mode_dbsound        "Sound test"
mode_jonzz_q1       "jj"
#endif
#endif


mode_off            "Turn DRUID off"
END




ENTRY mode_codes func_fn_check_code mskA0 "Enter code:"

ENTRY mode_name func_fn_save_name mskAa0_ "Enter Team Name:"

#FUNC mode_check_code func_fn_check_code

FUNC mode_off func_fn_switch_off
FUNC mode_light func_fn_switch_light
FUNC mode_pop2 func_fn_pop2
FUNC mode_pop3 func_fn_pop3
FUNC mode_irlook_end func_fn_irlook_end

TEXT mode_irlook mode_irlook_end
"Looking for clue..."
"\i"
END

MENU mode_entryabort "Exit without saving?"
POP                 "No"
mode_pop3           "Yes"
END


TEXT mode_checkcode POP
"Uploading code for"
"confirmation..."
END

TEXT mode_badcode POP
"I don't recognize"
"that code."
END

#include "gadget_help.str"
#include "gadget_numbers.str"
#include "gadget_puzzles.str"
#include "gadget_ref.str"


FPTR    input
FPTR    spin_ignore
FPTR    spin_text
FPTR    spin_menu
FPTR    spin_entry
FPTR    click_text
FPTR    click_menu
FPTR    click_entry
FPTR    event_ignore
FPTR    fn_save_name
FPTR    time
FPTR    fn_check_code
FPTR    fn_switch_off
FPTR    fn_switch_light
FPTR    fn_pop3
FPTR    fn_pop2
FPTR    fn_pop
FPTR    fn_setmode



#
# TODO: THE BELOW MODES NEED TO BE UPDATED!!!!
#

TEXT mode_phones POP
"JU HQ   866-411-HERO"
"BatGirl 408-555-1212"      # TODO: REOMOVE THIS!!!
"Jenny   650-867-5309"      # TODO: REOMOVE THIS!!!
END

TEXT mode_goodcode mode_main_menu
"HOORAY! You entered"
"the code!!"
END

TEXT mode_gotname mode_main_menu
"Thanks for entering"
"your team name!!"
END

TEXT mode_status mode_show_arrival
"Time:      \T"
"Game time: \t"
"Clue time: \k"
END

FUNC mode_show_arrival func_fn_show_arrival

#if ALLOW_HINTS
TEXT mode_hints POP
"No hints available"
"right now."
END
#endif

#if ALLOW_NEWS
TEXT mode_news POP
"No news reported"
"at \T"
END
#endif

TEXT mode_combos POP
"Combination lock"
"combo:"
"Right 32"
"Left  8"
"Right 19"
END


#
# START DEBUG
#
MENU mode_debug "M>DEBUG Menu"
mode_sync           "Sync"
mode_timeset        "Timeset"
mode_dbsound        "Sound test"
mode_clrclue        "clear clues"
mode_status         "Get Status"
POP                 "Main Menu"
END

MENU mode_timeset "M>D>Timeset"
mode_addsec         "+s \t"
mode_subsec         "-s \t"
mode_addmin         "+m \t"
mode_submin         "-m \t"
mode_addhr          "+h \t"
mode_subhr          "-h \t"
POP                 "Debug Menu"
END

FUNC mode_clrclue func_fn_clrclue
FUNC mode_addsec func_fn_addsec
FUNC mode_subsec func_fn_subsec
FUNC mode_addmin func_fn_addmin
FUNC mode_submin func_fn_submin
FUNC mode_addhr  func_fn_addhr
FUNC mode_subhr  func_fn_subhr

TEXT mode_sync mode_do_sync
"Click to Sync!"
"1"
"2"
END

FUNC mode_do_sync func_fn_sync

#if ALLOW_DEBUG

MENU mode_debug "M>DEBUG Menu"
mode_dbsound        "Sound test"
mode_en_delay       "Enable delay"
mode_errors         "Errors"
mode_config         "Configure"
POP                 "Main Menu"
END

TEXT mode_errors POP
"ERRORS THAT OCCURRED"
"output error counts:"
"  enables:  \D"
"  en retry: \A"
"  restart:  \R"
"  no ack:   \a"
"  bus col:  \B"
"  wcol:     \c"
"  no sspif: \d"
"turnons:  \r"
END

ENTRY mode_en_delay func_en_delay msk0 "Enter delay:"
FPTR en_delay

str_test_input  "\CINPUT TEST\0xfe\0x47\0x01\0x02PORTB:"

#endif # ALLOW_DEBUG
#
# END DEBUG
#


#
# START CONFIG
#
#if ALLOW_DEBUG
#if ALLOW_CONFIG
    #
    # configure string (use sparingly)
    #
    #   str_config1
    # clear screen:     fe 58
    # "Configuring..."
    # position cursor   fe 47 1 2
    # "a"
    # remember on:      fe 93 01

    #  str_config2
    # "b"
    # backlight off:    fe 46
    # "c"
    # line wrap off:    fe 44
    # "d"
    # scroll off:       fe 52
    # "e"
    # u-cursor off:     fe 4b
    # "f"
    # b-cursor off:     fe 54
    # "g"
    # remember off:     fe 93 00        
    # "h"

    #
    #  str_config3
    # startup screen:   fe 40 "  Welcome to DRUID  Click knob to start "
    # "DONE"
    #
#str_config "\0xfe\0x58Configuring...\0xfe\0x47\0x01\0x02a\0xfe\0x93\0x01STW\0xfe\0x46XYZc\wd\0xfe\0x52e\sf\0xfe\0x54g\0xfe\0x93\0x00h\0xfe\0x40  Welcome to DRUID                      Done."

str_config1 "\0xfe\0x58Configuring...\0xfe\0x47\0x01\0x02a"
str_config2 "b\0xfe\0x93\0x01"
str_config3 "\0xfe\0x46"
str_config4 "\0xfe\0x93\0x00b"
str_config5 "c\0xfe\0x93\0x01"
str_config6 "\w"
str_config7 "\0xfe\0x93\0x00c"
str_config8 "d\0xfe\0x93\0x01"
str_config9 "\0xfe\0x52"
str_configa "\0xfe\0x93\0x00d"
str_configb "e\0xfe\0x93\0x01"
str_configc "\s"
str_configd "\0xfe\0x93\0x00e"
str_confige "f\0xfe\0x93\0x01"
str_configf "\0xfe\0x54"
str_configg "\0xfe\0x93\0x00f"
str_configh "g\0xfe\0x40  Welcome to DRUID                      "
str_configi "gDone."

TEXT mode_didconfig mode_pop2
"Config completed."
END

TEXT mode_failconfig mode_pop2
"Config FAILED."
END

FPTR    config

FUNC mode_config func_config

#else # ALLOW_CONFIG

TEXT mode_config POP
"No Config - disabled"
END

#endif # ALLOW_CONFIG
#endif # ALLOW_DEBUG
#
# END CONFIG
#

#
# START DBSOUND
#
#if ALLOW_DBSOUND

MENU mode_dbsound "Sound test"
mode_snd_hi     "high sound"
mode_snd_med    "medium sound"
mode_snd_lo     "low sound"
POP             "Main menu"
END

FUNC mode_snd_hi    func_snd_hi
FUNC mode_snd_med   func_snd_med
FUNC mode_snd_lo    func_snd_lo

TEXT mode_snd_hi_msg POP
"Playing high sound"
END

TEXT mode_snd_med_msg POP
"Playing med sound"
END

TEXT mode_snd_lo_msg POP
"Playing low sound"
END

#endif # ALLOW_DBSOUND
#
# START DBSOUND
#



This file Copyright (C) 2004 by Nathan (Acorn) Pooley
Go to DRUID Development page
Go to DRUID page
Go to JU Gadgets page
Go to Justice Unlimited homepage
Go to Acorn's personal webpage
Contact Acorn
See comments from others
Post your own comments
File created by do_doc at Wed Aug 4 18:09:49 2004