Exemplo n.º 1
0
  /* We need to reset the view of things.			-CJS- */
  public static void check_view() {
    int i, j;
    CaveType c_ptr, d_ptr;

    c_ptr = Variable.cave[Player.char_row][Player.char_col];
    /* Check for new panel		   */
    if (Misc1.get_panel(Player.char_row, Player.char_col, false)) {
      Misc1.prt_map();
    }
    /* Move the light source		   */
    Moria1.move_light(Player.char_row, Player.char_col, Player.char_row, Player.char_col);
    /* A room of light should be lit.	 */
    if (c_ptr.fval == Constants.LIGHT_FLOOR) {
      if ((Player.py.flags.blind < 1) && !c_ptr.pl) {
        Moria1.light_room(Player.char_row, Player.char_col);
      }
      /* In doorway of light-room?		   */
    } else if (c_ptr.lr && (Player.py.flags.blind < 1)) {
      for (i = (Player.char_row - 1); i <= (Player.char_row + 1); i++) {
        for (j = (Player.char_col - 1); j <= (Player.char_col + 1); j++) {
          d_ptr = Variable.cave[i][j];
          if ((d_ptr.fval == Constants.LIGHT_FLOOR) && !d_ptr.pl) {
            Moria1.light_room(i, j);
          }
        }
      }
    }
  }