Exemplo n.º 1
0
static U8 handle_dec_entry(U8 key)
{
    U8 status;
    switch (CUR_COL_CHAIN)
    {
        case PHRASE_COL:
            status = get_hex_from_keyboard(key, PHRASE_COUNT - 1);
            switch (status)
            {
                case HEXGET_DONE:
                    last_input_phrase[EDIT_CH] = g_hexget_value;
                    alloc_phrase(g_hexget_value);
                    // Fall through!
                    
                case HEXGET_ACTIVE:
                    set_phrase(g_hexget_value);
            }
            break;

        case TRANSPOSE_COL:
            status = get_hex_from_keyboard(key, 0xffu);
            if (status != HEXGET_IDLE)
            {
                set_transpose(g_hexget_value);
                last_input_transpose[EDIT_CH] = g_hexget_value;
            }
            break;
    }
    return status == HEXGET_ACTIVE;
}
Exemplo n.º 2
0
static void handle_phrase_space()
{
    static U8 s_first_tap_was_on_empty_step;
    U8 phrase = get_phrase();
    release_space_handler_p = release_space_handler;

    if (g_marking) return;

    switch (g_space_tap_count)
    {
        case 1:
            s_first_tap_was_on_empty_step = (0xffu == phrase);

            if (s_first_tap_was_on_empty_step)
            {
                set_phrase(last_input_phrase[EDIT_CH]);
            }
            else 
            {
                last_input_phrase[EDIT_CH] = phrase;
            }
            break;

        case 2:
            new_or_clone(s_first_tap_was_on_empty_step);
            break;
    }
}
Exemplo n.º 3
0
void create() {
   ::create();
/* OBJEDIT { */
   set_phrase( "There is a larder ~plac." );
   set_position( "here" );
   set_preposition( "in" );
/* } OBJEDIT */
}
Exemplo n.º 4
0
void create() {
    ::create();
    /* OBJEDIT { */
    set_phrase( "There is a stone basin ~plac." );
    set_position( "here" );
    set_preposition( "in" );
    set_bulk_capacity( 10000 );
    set_weight_capacity( 15000 );
    /* } OBJEDIT */
}
Exemplo n.º 5
0
create() {
   ::create();
/* OBJEDIT { */
   set_distant( "a library" );
   set_specific( "the library" );
   set_look( "It's a small library. The image of a scroll engraved over the doorpost." );
   set_plural( "libraries" );
   set_name( "library" );
   set_phrase( "A small library has been built ~plac." );
   set_position( "here" );
   set_preposition( "in" );
/* } OBJEDIT */
}
Exemplo n.º 6
0
create() {
   ::create();
/* OBJEDIT { */
   set_distant( "a cottage" );
   set_specific( "the cottage" );
   set_look( "This is a quaint cottage with a red terracotta roof." );
   set_plural( "cottages" );
   set_name( "cottage" );
   set_type( "home" );
   set_phrase( "A small cottage with a red roof has been built ~plac." );
   set_position( "here" );
   set_preposition( "in" );
/* } OBJEDIT */
}
Exemplo n.º 7
0
/// Constructor for the door object.
create() {
/* OBJEDIT { */
   set_distant( "a door" );
   set_specific( "the door" );
   set_look( "You a see a door to your ~dirc." );
   set_plural( "doors" );
   set_name( "door" );
   set_phrase( "There is a door ~plac." );
   set_position( "to the ~dirc" );
   set_block_message( "You can't go that way!" );
   set_block_visible( 1 );
   set_pass_message( "You go through the door to the ~dirc." );
/* } OBJEDIT */
}
Exemplo n.º 8
0
static void new_or_clone(U8 do_new)
{
    U8 phrase;
    if (do_new)
    {
        // No phrase on step, alloc new.
        phrase = next_new_phrase();
    }
    else
    {
        // Clone existing chain.
        phrase = clone_phrase(get_phrase());
    }
    if (phrase == 0xffu)
        return;
    last_input_phrase[EDIT_CH] = phrase;
    alloc_phrase(phrase);
    set_phrase(phrase);
}