예제 #1
0
int
redraw_line ()
{
  throw_col (0);
  /* 面倒でももう一回スクロール領域を切ろう。 */
  disp_mode ();
  if (!empty_modep ())
    {
      if (not_redraw == 0)
        {
          clr_line_all ();
          (*t_print_l_func) ();
        }
      else
        {
          throw_c (0);
        }
    }
  else
    {
      kk_restore_cursor ();
    }
  flush ();
  return (0);
}
예제 #2
0
파일: title.cpp 프로젝트: maro-n/LS
void title::draw() {
  effectPlay();
  disp_title();
  disp_click();
  disp_mode();
}
예제 #3
0
int
buffer_in ()
{
  unsigned int c;
  int ret;
  unsigned int romkan;
  int ignored = 0;
  int in;
  unsigned int *output;

  while (1)
    {
      in = keyin ();
      output = romkan_henkan (in);
      conv_ltr_to_ieuc (output);
      if (input_func)
        (*input_func) (output, output);
      for (; *output != EOLTTR; output++)
        {
          c = ((romkan = *output) & 0x0000ffff);
          if (isSPCL (romkan))
            {
              if (romkan == REDRAW)
                {
                  (*c_b->redraw_fun) ();
                  continue;
                }
              else if (romkan == CHMSIG)
                {               /* mode changed */
                  if (redraw_when_chmsig_func)
                    (*redraw_when_chmsig_func) ();
                  disp_mode ();
                  continue;
                }
              else if (romkan == NISEBP)
                {               /* error */
                  ring_bell ();
                  continue;
                }
              else
                {
                  continue;     /* if (romkan == EOLTTR) */
                }
            }
          if (ignored)
            {
              if (isNISE (romkan))
                {
                  if (c == rubout_code)
                    {
                      --ignored;
                    }
                  else
                    {
                      ++ignored;
                    }
                }
              else
                {
                  ignored = 0;
                }
              continue;
            }
          if (isNISE (romkan) && (ESCAPE_CHAR (c) || NOT_NORMAL_CHAR (c)) && c != rubout_code)
            {
              ++ignored;
              continue;
            }

          if (c < TBL_SIZE && c_b->key_table[c])
            {
              if (c_b->rk_clear_tbl[c])
                romkan_clear ();
              ret = (*c_b->key_table[c]) (c, romkan);
            }
          else if (c >= 0x80 && c <= 0x9f)
            {
              ret = 0;
              ring_bell ();
            }
          else if (!(ESCAPE_CHAR (c)) || c == 0x09)
            {                   /* TAB is not ESCAPE char */
              if (c_b->maxlen < c_b->buflen)
                {
                  if (c_b->key_in_fun)
                    {
                      ret = (*c_b->key_in_fun) (c, romkan);
                    }
                  else
                    {
                      ret = insert_char (c);
                      call_t_redraw_move (c_b->t_c_p + 1, c_b->t_c_p, c_b->maxlen, 0, 1);
                      check_scroll ();
                      kk_cursor_normal ();
                    }
                }
              else
                {
                  romkan_clear ();
                  ret = 0;
                }
            }
          else
            {
              if (c_b->ctrl_code_fun)
                {
                  ret = (*c_b->ctrl_code_fun) (c, romkan);
                }
              else
                {
                  ret = 0;
                  ring_bell ();
                }
            }
          if (ret == 1)
            {
              return (0);
            }
          else if (ret == -1)
            {
              return (-1);
            }
        }
    }
}