Ejemplo n.º 1
0
void frontnet_start_input(void)
{
    if (lbInkey & 0x80)
    {
        lbInkey = 0;
        return;
    }
    if (lbInkey != KC_UNASSIGNED)
    {
        unsigned short asckey;
        asckey = key_to_ascii(lbInkey, KMod_SHIFT);
        if ((lbInkey == KC_BACK) || (lbInkey == KC_RETURN) || (frontend_font_char_width(1, asckey) > 0))
        {
            struct ScreenPacket *nspck;
            nspck = &net_screen_packet[my_player_number];
            if ((nspck->field_4 & 0xF8) == 0)
            {
              nspck->field_4 = (nspck->field_4 & 7) | 0x40;
              nspck->param1 = lbInkey;
              if ((lbKeyOn[KC_LSHIFT] == 0) && (lbKeyOn[KC_RSHIFT] == 0))
              {
                  nspck->param2 = 0;
                  lbInkey = 0;
                  return;
              }
              nspck->param2 = 1;
            }
        }
        lbInkey = 0;
    }
}
Ejemplo n.º 2
0
void frontnet_start_input(void)
{
    //_DK_frontnet_start_input();
    if (lbInkey & 0x80)
    {
        lbInkey = 0;
        return;
    }
    if (lbInkey != 0)
    {
        unsigned short asckey;
        asckey = key_to_ascii(lbInkey, KMod_SHIFT);
        if ((lbInkey == 14) || (lbInkey == 28) || (frontend_font_char_width(1,asckey) > 0))
        {
            struct ScreenPacket *nspck;
            nspck = &net_screen_packet[my_player_number];
            if ((nspck->field_4 & 0xF8) == 0)
            {
                nspck->field_4 = (nspck->field_4 & 7) | 0x40;
                nspck->param1 = lbInkey;
                if ((lbKeyOn[42] == 0) && (lbKeyOn[54] == 0))
                {
                    nspck->param2 = 0;
                    lbInkey = 0;
                    return;
                }
                nspck->param2 = 1;
            }
        }
        lbInkey = 0;
    }
}