billr@saab.CNA.TEK.COM (Bill Randle) (12/22/90)
Submitted-by: Rich Burridge <rburridge@sun.COM>
Posting-number: Volume 12, Issue 5
Archive-name: reve/Patch3e
Patch-To: reve: Volume 11, Issue 52-58
Environment: SunView, XView, X11R4, termcap
#! /bin/sh
# This is a shell archive. Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file". To overwrite existing
# files, type "sh file -c". You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
# will see the following message at the end:
# "End of archive 5 (of 9)."
# Contents: patches03b
# Wrapped by billr@saab on Fri Dec 21 11:27:09 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'patches03b' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'patches03b'\"
else
echo shar: Extracting \"'patches03b'\" \(44866 characters\)
sed "s/^X//" >'patches03b' <<'END_OF_FILE'
X
X------- boardstuff.c -------
X*** /tmp/da07561 Sun Dec 9 15:11:31 1990
X--- boardstuff.c Sat Dec 8 19:46:17 1990
X***************
X*** 27,37 ****
X #include "color.h"
X #include "extern.h"
X #include <ctype.h>
X- #ifdef SYSV
X- #include <sys/times.h>
X- #else
X- #include <sys/time.h>
X- #endif /*SYSV*/
X
X #ifdef X11
X #include <X11/Xos.h>
X--- 27,32 ----
X***************
X*** 182,188 ****
X
X taken = formfliplist(move, player) ;
X update_board_image(player) ;
X! SPRINTF(line, "%s took %d %s", (player == BLACK) ? "Black" : "White",
X taken, (taken == 1) ? "stone" : "stones") ;
X message(PANEL_MES, line) ;
X }
X--- 177,189 ----
X
X taken = formfliplist(move, player) ;
X update_board_image(player) ;
X! if (DO_LAST == FALSE && DO_NUMBER == FALSE)
X! SPRINTF(line, "%s moved at <%c-%c> and took %d %s",
X! (player == BLACK) ? "Black" : "White",
X! (move % 8) + 'a', (move >> 3) + '1',
X! taken, (taken == 1) ? "stone" : "stones") ;
X! else
X! SPRINTF(line, "%s took %d %s", (player == BLACK) ? "Black" : "White",
X taken, (taken == 1) ? "stone" : "stones") ;
X message(PANEL_MES, line) ;
X }
X***************
X*** 205,214 ****
X {
X switch (piece)
X {
X! case BLACK : draw_stencil(x, y, PSIZE, PSIZE, op, C_BLACK,
X P_BLACK, P_BLACK) ;
X break ;
X! case WHITE : draw_stencil(x, y, PSIZE, PSIZE, op, C_BLACK,
X P_BLACK, P_WHITE) ;
X }
X }
X--- 206,215 ----
X {
X switch (piece)
X {
X! case BLACK : draw_stencil(W_MAIN, x, y, PSIZE, PSIZE, op, C_BLACK,
X P_BLACK, P_BLACK) ;
X break ;
X! case WHITE : draw_stencil(W_MAIN, x, y, PSIZE, PSIZE, op, C_BLACK,
X P_BLACK, P_WHITE) ;
X }
X }
X***************
X*** 215,228 ****
X
X
X void
X! draw_rect(x1, y1, x2, y2, op, color)
X int x1, y1, x2, y2, color ;
X enum optype op ;
X {
X! draw_line(x1, y1, x2, y1, op, color) ;
X! draw_line(x1, y1, x1, y2, op, color) ;
X! draw_line(x2, y1, x2, y2, op, color) ;
X! draw_line(x1, y2, x2, y2, op, color) ;
X }
X
X
X--- 216,230 ----
X
X
X void
X! draw_rect(wtype, x1, y1, x2, y2, op, color)
X! enum win_type wtype ;
X int x1, y1, x2, y2, color ;
X enum optype op ;
X {
X! draw_line(wtype, x1, y1, x2, y1, op, color) ;
X! draw_line(wtype, x1, y1, x1, y2, op, color) ;
X! draw_line(wtype, x2, y1, x2, y2, op, color) ;
X! draw_line(wtype, x1, y2, x2, y2, op, color) ;
X }
X
X
X***************
X*** 238,245 ****
X
X x = (move & 7) * CELL_SIZE + BBORDER ;
X y = (move >> 3) * CELL_SIZE + BBORDER ;
X! draw_rect(x + offset, CY + y + offset,
X! x + CELL_SIZE - offset, CY + y + CELL_SIZE - offset, RSRC, color) ;
X }
X
X
X--- 240,248 ----
X
X x = (move & 7) * CELL_SIZE + BBORDER ;
X y = (move >> 3) * CELL_SIZE + BBORDER ;
X! draw_rect(W_MAIN, x + offset, CY + y + offset,
X! x + CELL_SIZE - offset, CY + y + CELL_SIZE - offset,
X! RSRC, color) ;
X }
X
X
X***************
X*** 385,390 ****
X--- 388,395 ----
X if (legal(move, next_player, &board) == FALSE) return(0) ;
X (void) formfliplist(move, next_player) ;
X batch(IS_ON) ;
X+ if (DO_LAST) show_last(last_move, IS_OFF) ;
X+ if (DO_NUMBER) show_number(last_move, 59 - board.moves_left, IS_OFF) ;
X FOR_BOARD(i)
X if (board.square[i] != old_board.square[i])
X {
X***************
X*** 391,396 ****
X--- 396,404 ----
X get_xy(i, &x, &y) ;
X draw_piece(next_player, x, CY+y, RSRC) ;
X }
X+ if (DO_LAST) show_last(move, IS_ON) ;
X+ if (DO_NUMBER) show_number(move, 60 - board.moves_left, IS_ON) ;
X+ last_move = move ;
X batch(IS_OFF) ;
X return(1) ;
X }
X***************
X*** 465,473 ****
X int player, move ;
X long note ;
X {
X! SPRINTF(line, "%s: <%c-%c> eval : %ld",
X (player == BLACK) ? "Black" : "White",
X! (move & 7) + 'a', (move >> 3) + '1', note) ;
X message(EVAL_MES, line) ;
X }
X
X--- 473,481 ----
X int player, move ;
X long note ;
X {
X! SPRINTF(line, "%s: <%c-%c> eval : %ld depth: %d",
X (player == BLACK) ? "Black" : "White",
X! (move & 7) + 'a', (move >> 3) + '1', note, profmax) ;
X message(EVAL_MES, line) ;
X }
X
X***************
X*** 519,525 ****
X if (iscolor[d])
X {
X get_xy(i, &x, &y) ;
X! draw_stencil(x, CY+y, PSIZE, PSIZE, RSRC, C_BLACK,
X P_WHITE, P_WHITE) ;
X }
X else
X--- 527,533 ----
X if (iscolor[d])
X {
X get_xy(i, &x, &y) ;
X! draw_stencil(W_MAIN, x, CY+y, PSIZE, PSIZE, RSRC, C_BLACK,
X P_WHITE, P_WHITE) ;
X }
X else
X***************
X*** 526,533 ****
X {
X x = BBORDER + ((i & 7) + 1) * CELL_SIZE - CELL_SIZE / 2 ;
X y = BBORDER + ((i >> 3) + 1) * CELL_SIZE - CELL_SIZE / 2 ;
X! draw_line(x-5, CY+y, x+5, CY+y, RSRC, C_BLACK) ;
X! draw_line(x, CY+y+5, x, CY+y-5, RSRC, C_BLACK) ;
X }
X }
X }
X--- 534,541 ----
X {
X x = BBORDER + ((i & 7) + 1) * CELL_SIZE - CELL_SIZE / 2 ;
X y = BBORDER + ((i >> 3) + 1) * CELL_SIZE - CELL_SIZE / 2 ;
X! draw_line(W_MAIN, x-5, CY+y, x+5, CY+y, RSRC, C_BLACK) ;
X! draw_line(W_MAIN, x, CY+y+5, x, CY+y-5, RSRC, C_BLACK) ;
X }
X }
X }
X***************
X*** 540,546 ****
X x = (i & 7) * CELL_SIZE + BBORDER + 1 ;
X y = (i >> 3) * CELL_SIZE + BBORDER + 1 ;
X color = (iscolor[d]) ? C_LBROWN : C_WHITE ;
X! color_area(x, CY + y, CELL_SIZE - 2, CELL_SIZE - 2, color) ;
X }
X }
X batch(IS_OFF) ;
X--- 548,554 ----
X x = (i & 7) * CELL_SIZE + BBORDER + 1 ;
X y = (i >> 3) * CELL_SIZE + BBORDER + 1 ;
X color = (iscolor[d]) ? C_LBROWN : C_WHITE ;
X! color_area(W_MAIN, x, CY + y, CELL_SIZE - 2, CELL_SIZE - 2, color) ;
X }
X }
X batch(IS_OFF) ;
X***************
X*** 554,565 ****
X long note ;
X {
X batch(IS_ON) ;
X! if (move == -1 || do_bestmove == FALSE) return ;
X if (best_cmove != -1)
X! draw_square(best_cmove, IS_OFF, 2) ;
X best_cmove = move ;
X draw_square(best_cmove, IS_ON, 2) ;
X! if (show_notes) set_eval(next_player, move, note) ;
X batch(IS_OFF) ;
X }
X
X--- 562,578 ----
X long note ;
X {
X batch(IS_ON) ;
X! if (move == -1 || DO_BESTMOVE == FALSE) return ;
X if (best_cmove != -1)
X! {
X! draw_square(best_cmove, IS_OFF, 2) ;
X! if (DO_NUMBER) show_number(best_cmove, cmove_depth, IS_OFF) ;
X! }
X best_cmove = move ;
X+ cmove_depth = profmax ;
X draw_square(best_cmove, IS_ON, 2) ;
X! if (DO_NUMBER) show_number(best_cmove, cmove_depth, IS_ON) ;
X! if (SHOW_NOTES) set_eval(next_player, move, note) ;
X batch(IS_OFF) ;
X }
X
X***************
X*** 569,603 ****
X int move ;
X enum bltype state ;
X {
X! if (move == -1 || do_last == FALSE) return ;
X! draw_square(move, state, 2) ;
X }
X
X
X void
X! show_number(move, state)
X! int move ;
X enum bltype state ;
X {
X char num[3] ;
X! int color, strw, val, x, y ;
X
X! if (move == -1 || do_number == FALSE) return ;
X! if (board.square[move] == BLACK)
X color = (state == IS_ON) ? C_WHITE : C_BLACK ;
X else if (board.square[move] == WHITE)
X color = (state == IS_ON) ? C_BLACK : C_WHITE ;
X x = (move & 7) * CELL_SIZE + BBORDER + PIECE_MARGIN ;
X y = (move >> 3) * CELL_SIZE + BBORDER + PIECE_MARGIN ;
X
X- val = 60 - board.moves_left ;
X- if (state == IS_OFF) val-- ;
X SPRINTF(num, "%2d", val) ;
X strw = get_strwidth(NFONT, num) ;
X
X x = x + ((2 * PIECE_RAD) - strw) / 2 ;
X y = y + CY + nfont_height + ((2 * PIECE_RAD) - nfont_height) / 2 ;
X! draw_text(x, y, NFONT, color, num) ;
X }
X
X
X--- 582,621 ----
X int move ;
X enum bltype state ;
X {
X! if (move == -1) return ;
X! if (board.moves_left < 60) draw_square(move, state, 2) ;
X }
X
X
X void
X! show_number(move, val, state)
X! int move, val ;
X enum bltype state ;
X {
X char num[3] ;
X! int color, strw, x, y ;
X
X! if (move == -1) return ;
X!
X! if (board.square[move] == BLACK)
X color = (state == IS_ON) ? C_WHITE : C_BLACK ;
X else if (board.square[move] == WHITE)
X color = (state == IS_ON) ? C_BLACK : C_WHITE ;
X+ else if (iscolor[(int) cur_dpyno])
X+ color = (state == IS_ON) ? C_BLACK : C_LBROWN ;
X+ else
X+ color = (state == IS_ON) ? C_BLACK : C_WHITE ;
X+
X x = (move & 7) * CELL_SIZE + BBORDER + PIECE_MARGIN ;
X y = (move >> 3) * CELL_SIZE + BBORDER + PIECE_MARGIN ;
X
X SPRINTF(num, "%2d", val) ;
X strw = get_strwidth(NFONT, num) ;
X
X x = x + ((2 * PIECE_RAD) - strw) / 2 ;
X+ if (val < 10) x -= 3 ;
X y = y + CY + nfont_height + ((2 * PIECE_RAD) - nfont_height) / 2 ;
X! draw_text(W_MAIN, x, y, NFONT, color, num) ;
X }
X
X
X***************
X*** 611,620 ****
X rop = RCLR ;
X color = (iscolor[(int) cur_dpyno]) ? C_LBROWN : C_WHITE ;
X if (iscolor[(int) cur_dpyno]) rop = RSRC ;
X! draw_line(suggest_x-5, CY+suggest_y-5,
X! suggest_x+5, CY+suggest_y+5, rop, color) ;
X! draw_line(suggest_x-5, CY+suggest_y+5,
X! suggest_x+5, CY+suggest_y-5, rop, color) ;
X suggestion = -1 ;
X }
X }
X--- 629,638 ----
X rop = RCLR ;
X color = (iscolor[(int) cur_dpyno]) ? C_LBROWN : C_WHITE ;
X if (iscolor[(int) cur_dpyno]) rop = RSRC ;
X! draw_line(W_MAIN, suggest_x-5, CY+suggest_y-5,
X! suggest_x+5, CY+suggest_y+5, rop, color) ;
X! draw_line(W_MAIN, suggest_x-5, CY+suggest_y+5,
X! suggest_x+5, CY+suggest_y-5, rop, color) ;
X suggestion = -1 ;
X }
X }
X***************
X*** 626,635 ****
X {
X int flips, i, piece, total_flips, x, y ;
X
X! total_flips = (quickgame == TRUE) ? 2 : 4 ;
X show_all(IS_OFF) ;
X! show_last(last_move, IS_OFF) ;
X! show_number(last_move, IS_OFF) ;
X show_suggestion() ;
X for (flips = 0; flips < total_flips; flips++)
X {
X--- 644,653 ----
X {
X int flips, i, piece, total_flips, x, y ;
X
X! total_flips = (QUICKGAME == TRUE) ? 2 : 4 ;
X show_all(IS_OFF) ;
X! if (DO_LAST) show_last(last_move, IS_OFF) ;
X! if (DO_NUMBER) show_number(last_move, 59 - board.moves_left, IS_OFF) ;
X show_suggestion() ;
X for (flips = 0; flips < total_flips; flips++)
X {
X***************
X*** 648,660 ****
X batch(IS_OFF) ;
X PAUSE ;
X }
X! show_last(move, IS_ON) ;
X! show_number(move, IS_ON) ;
X last_move = move ;
X set_score() ;
X set_turn(OPPONENT(player)) ;
X message(TURN_MES, line) ;
X! if (show_notes)
X if ((player == BLACK && items[(int) BLACK_PLAYS].value == COMPUTER) ||
X (player == WHITE && items[(int) WHITE_PLAYS].value == COMPUTER))
X set_eval(player, move, note) ;
X--- 666,678 ----
X batch(IS_OFF) ;
X PAUSE ;
X }
X! if (DO_LAST) show_last(move, IS_ON) ;
X! if (DO_NUMBER) show_number(move, 60 - board.moves_left, IS_ON) ;
X last_move = move ;
X set_score() ;
X set_turn(OPPONENT(player)) ;
X message(TURN_MES, line) ;
X! if (SHOW_NOTES)
X if ((player == BLACK && items[(int) BLACK_PLAYS].value == COMPUTER) ||
X (player == WHITE && items[(int) WHITE_PLAYS].value == COMPUTER))
X set_eval(player, move, note) ;
X
X------- events.c -------
X*** /tmp/da07564 Sun Dec 9 15:11:32 1990
X--- events.c Sun Dec 9 14:09:16 1990
X***************
X*** 36,41 ****
X--- 36,42 ----
X
X n = (int) item ;
X if (items[n].x == -1) return ;
X+ if (items[n].wtype != curwin) return ;
X if ((curx > items[n].x) && (curx < (items[n].x + items[n].width)) &&
X (cury > items[n].y) && (cury < (items[n].y + items[n].height)))
X {
X***************
X*** 42,92 ****
X down = nextc ;
X itemno = n ;
X but_inverted = itemno ;
X! draw_button((enum panel_type) itemno, C_LGREY, BUT_INVERT) ;
X }
X }
X
X
X void
X check_cycle_down(item)
X enum panel_type item ;
X {
X! int ix, n, reply ;
X
X n = (int) item ;
X! ix = items[n].x + (3 * BWIDTH) + (2 * BGAP) - CWIDTH ;
X! if ((curx > ix) && (curx < (ix + (items[n].width / 2))) &&
X! (cury > items[n].y) && (cury < (items[n].y + items[n].height)) &&
X nextc != RIGHT_DOWN)
X {
X direction = INCREMENT ;
X down = nextc ;
X itemno = n ;
X! draw_cycle((enum panel_type) n, C_LGREY, CY_LINVERT) ;
X }
X! else if ((curx > ix) && (curx < (ix + items[n].width)) &&
X! (cury > items[n].y) && (cury < (items[n].y + items[n].height)) &&
X nextc != RIGHT_DOWN)
X {
X direction = DECREMENT ;
X down = nextc ;
X itemno = n ;
X! draw_cycle((enum panel_type) n, C_LGREY, CY_RINVERT) ;
X }
X- else if ((curx > ix) && (curx < (ix + items[n].width)) &&
X- (cury > items[n].y) && (cury < (items[n].y + items[n].height)))
X- {
X- direction = NONE ;
X- down = RIGHT_DOWN ;
X- itemno = n ;
X- reply = do_menu((enum panel_type) itemno) ;
X- if (reply)
X- {
X- nextc = RIGHT_UP ;
X- handle_item(reply - 1) ;
X- draw_cycle((enum panel_type) itemno, C_LGREY, CY_NORMAL) ;
X- }
X- }
X }
X
X
X--- 43,97 ----
X down = nextc ;
X itemno = n ;
X but_inverted = itemno ;
X! draw_button(W_MAIN, (enum panel_type) itemno, C_LGREY, BUT_INVERT) ;
X }
X }
X
X
X void
X+ check_choice_down(item)
X+ enum panel_type item ;
X+ {
X+ int n ;
X+
X+ n = (int) item ;
X+ if (items[n].wtype != curwin) return ;
X+ if ((curx > items[n].x) && (curx < (items[n].x + items[n].width)) &&
X+ (cury > items[n].y) && (cury < (items[n].y + items[n].height)))
X+ {
X+ down = nextc ;
X+ itemno = n ;
X+ }
X+ }
X+
X+
X+ void
X check_cycle_down(item)
X enum panel_type item ;
X {
X! int ix, n ;
X
X n = (int) item ;
X! if (items[n].wtype != curwin) return ;
X! ix = items[n].x + 40 ;
X! if ((curx > ix) && (curx < (ix + (CWIDTH / 2))) &&
X! (cury > items[n].y) && (cury < (items[n].y + CHEIGHT)) &&
X nextc != RIGHT_DOWN)
X {
X direction = INCREMENT ;
X down = nextc ;
X itemno = n ;
X! draw_cycle(curwin, (enum panel_type) n, C_LGREY, CY_LINVERT) ;
X }
X! else if ((curx > ix) && (curx < (ix + CWIDTH)) &&
X! (cury > items[n].y) && (cury < (items[n].y + CHEIGHT)) &&
X nextc != RIGHT_DOWN)
X {
X direction = DECREMENT ;
X down = nextc ;
X itemno = n ;
X! draw_cycle(curwin, (enum panel_type) n, C_LGREY, CY_RINVERT) ;
X }
X }
X
X
X***************
X*** 100,108 ****
X {
X case P_BUTTON : check_button_down((enum panel_type) n) ;
X break ;
X case P_CYCLE : check_cycle_down((enum panel_type) n) ;
X break ;
X! case P_MESSAGE : /* do nothing. */ ;
X }
X }
X
X--- 105,116 ----
X {
X case P_BUTTON : check_button_down((enum panel_type) n) ;
X break ;
X+ case P_CHOICE : check_choice_down((enum panel_type) n) ;
X+ break ;
X case P_CYCLE : check_cycle_down((enum panel_type) n) ;
X break ;
X! case P_MESSAGE : break ; /* Do nothing. */
X! case P_TOGGLE : check_toggle_down((enum panel_type) n) ;
X }
X }
X
X***************
X*** 110,115 ****
X--- 118,126 ----
X void
X check_item_up()
X {
X+ int color, d ;
X+
X+ d = (int) cur_dpyno ;
X if ((nextc == LEFT_UP && down == LEFT_DOWN) ||
X (nextc == MIDDLE_UP && down == MIDDLE_DOWN) ||
X (nextc == RIGHT_UP && down == RIGHT_DOWN))
X***************
X*** 116,130 ****
X {
X if (items[itemno].type == P_BUTTON && but_inverted == -1) return ;
X handle_item(items[itemno].value) ;
X! if (items[itemno].type == P_BUTTON && items[itemno].x != -1)
X! draw_button((enum panel_type) itemno, C_LGREY, BUT_NORMAL) ;
X! else if (items[itemno].type == P_CYCLE)
X! draw_cycle((enum panel_type) itemno, C_LGREY, CY_NORMAL) ;
X }
X }
X
X
X void
X do_action()
X {
X int cx, cy, thismove ;
X--- 127,174 ----
X {
X if (items[itemno].type == P_BUTTON && but_inverted == -1) return ;
X handle_item(items[itemno].value) ;
X!
X! switch (items[itemno].type)
X! {
X! case P_BUTTON : if (items[itemno].x != -1)
X! draw_button(items[itemno].wtype,
X! (enum panel_type) itemno,
X! C_LGREY, BUT_NORMAL) ;
X! break ;
X! case P_CHOICE : color = (iscolor[d]) ? C_BEIGE : C_WHITE ;
X! draw_choice(items[itemno].wtype,
X! (enum panel_type) itemno, color) ;
X! break ;
X! case P_CYCLE : draw_cycle(items[itemno].wtype,
X! (enum panel_type) itemno,
X! C_LGREY, CY_NORMAL) ;
X! break ;
X! case P_TOGGLE : color = (iscolor[d]) ? C_BEIGE : C_WHITE ;
X! draw_toggle(items[itemno].wtype,
X! (enum panel_type) itemno, color) ;
X! }
X }
X }
X
X
X void
X+ check_toggle_down(item)
X+ enum panel_type item ;
X+ {
X+ int n ;
X+
X+ n = (int) item ;
X+ if (items[n].wtype != curwin) return ;
X+ if ((curx > items[n].x) && (curx < (items[n].x + items[n].width)) &&
X+ (cury > items[n].y) && (cury < (items[n].y + items[n].height)))
X+ {
X+ down = nextc ;
X+ itemno = n ;
X+ }
X+ }
X+
X+
X+ void
X do_action()
X {
X int cx, cy, thismove ;
X***************
X*** 131,137 ****
X
X switch (nextc)
X {
X! case MOUSE_MOVING : if (animation == TRUE)
X draw_piece(next_player, piece_x, piece_y, RINV) ;
X piece_x = curx - PIECE_RAD ;
X piece_y = cury - PIECE_RAD ;
X--- 175,181 ----
X
X switch (nextc)
X {
X! case MOUSE_MOVING : if (ANIMATION == TRUE)
X draw_piece(next_player, piece_x, piece_y, RINV) ;
X piece_x = curx - PIECE_RAD ;
X piece_y = cury - PIECE_RAD ;
X***************
X*** 149,155 ****
X draw_outline(last_outline, IS_ON) ;
X }
X
X! if (animation == TRUE)
X draw_piece(next_player, piece_x, piece_y, RINV) ;
X break ;
X
X--- 193,199 ----
X draw_outline(last_outline, IS_ON) ;
X }
X
X! if (ANIMATION == TRUE)
X draw_piece(next_player, piece_x, piece_y, RINV) ;
X break ;
X
X***************
X*** 157,163 ****
X case EXIT_WINDOW : set_cursor(CANVASCUR) ;
X draw_outline(last_outline, IS_OFF) ;
X last_outline = -1 ;
X! if (animation == TRUE)
X draw_piece(next_player, piece_x, piece_y, RINV) ;
X cmode = (enum cantype) ((int) cmode - 1) ;
X break ;
X--- 201,207 ----
X case EXIT_WINDOW : set_cursor(CANVASCUR) ;
X draw_outline(last_outline, IS_OFF) ;
X last_outline = -1 ;
X! if (ANIMATION == TRUE)
X draw_piece(next_player, piece_x, piece_y, RINV) ;
X cmode = (enum cantype) ((int) cmode - 1) ;
X break ;
X***************
X*** 178,189 ****
X enum panel_type item ;
X int ch ;
X {
X! int val ;
X
X if (!validkey)
X {
X validkey = cur_ch ;
X! message(PANEL_MES, items[(int) item].text) ;
X }
X else
X {
X--- 222,236 ----
X enum panel_type item ;
X int ch ;
X {
X! int color, d, maxw, val ;
X
X+ d = (int) cur_dpyno ;
X+ color = (iscolor[d]) ? C_BEIGE : C_WHITE ;
X if (!validkey)
X {
X validkey = cur_ch ;
X! if (item == OPT_EVAL) message(PANEL_MES, "Notes?") ;
X! else message(PANEL_MES, items[(int) item].label) ;
X }
X else
X {
X***************
X*** 190,232 ****
X val = -1 ;
X switch (item)
X {
X! case BLACK_PLAYS :
X! case WHITE_PLAYS : if (item == BLACK_PLAYS) curx = 0 ;
X! else curx = BBORDER + (3*(BWIDTH+BGAP)) ;
X! switch (ch)
X {
X! case 'c' :
X! case 'C' : val = 1 ;
X! items[(int) item].value = val ;
X! set_cycle(item,
X! player_values[val]) ;
X break ;
X! case 'h' :
X! case 'H' : val = 0 ;
X! items[(int) item].value = val ;
X! set_cycle(item,
X! player_values[val]) ;
X break ;
X default : return ;
X }
X! case DIFFICULTY : if (ch >= '1' && ch <= '9') val = ch - '1' ;
X! items[(int) item].value = val ;
X! set_cycle(item, diff_values[val]) ;
X! break ;
X! case NOTES : switch (ch)
X {
X case 'n' :
X case 'N' : val = 0 ;
X- items[(int) item].value = val ;
X- set_cycle(item, notes_values[val]) ;
X break ;
X case 'y' :
X case 'Y' : val = 1 ;
X- items[(int) item].value = val ;
X- set_cycle(item, notes_values[val]) ;
X break ;
X default : return ;
X }
X }
X if (val != -1)
X {
X--- 237,282 ----
X val = -1 ;
X switch (item)
X {
X! case COMP_CHOICE : switch (ch)
X {
X! case 'a' : /* All (both). */
X! case 'A' : val = CP_BOTH ;
X break ;
X! case 'b' : /* Black. */
X! case 'B' : val = CP_BLACK ;
X break ;
X+ case 'n' : /* Neither. */
X+ case 'N' : val = CP_NEITHER ;
X+ break ;
X+ case 'w' : /* White. */
X+ case 'W' : val = CP_WHITE ;
X+ break ;
X default : return ;
X }
X! maxw = items[(int) item].width /
X! items[(int) item].nopts ;
X! curx = items[(int) item].x + (maxw * val) ;
X! itemno = (int) item ;
X! items[(int) item].value = val ;
X! draw_choice(W_PROPS, item, color) ;
X! break ;
X! case DIFF_CHOICE : if (ch >= '1' && ch <= '9') val = ch - '1' ;
X! items[(int) item].value = val ;
X! draw_choice(W_PROPS, item, color) ;
X! break ;
X! case OPT_EVAL : color = (iscolor[d]) ? C_BEIGE : C_WHITE ;
X! switch (ch)
X {
X case 'n' :
X case 'N' : val = 0 ;
X break ;
X case 'y' :
X case 'Y' : val = 1 ;
X break ;
X default : return ;
X }
X+ items[(int) item].value = val ;
X+ draw_toggle(W_PROPS, OPT_EVAL, color) ;
X }
X if (val != -1)
X {
X***************
X*** 274,280 ****
X set_cursor(NOCURSOR) ;
X piece_x = curx - PIECE_RAD ;
X piece_y = cury - PIECE_RAD ;
X! if (animation == TRUE)
X draw_piece(next_player,
X piece_x, piece_y, RINV) ;
X cmode = (enum cantype) ((int) cmode + 1) ;
X--- 324,330 ----
X set_cursor(NOCURSOR) ;
X piece_x = curx - PIECE_RAD ;
X piece_y = cury - PIECE_RAD ;
X! if (ANIMATION == TRUE)
X draw_piece(next_player,
X piece_x, piece_y, RINV) ;
X cmode = (enum cantype) ((int) cmode + 1) ;
X***************
X*** 292,305 ****
X process_event() ;
X
X if (nextc == FRAME_REPAINT) init_canvas() ;
X else if (nextc == KEYBOARD) handle_key() ;
X else if (nextc == EXIT_WINDOW && but_inverted != -1)
X {
X! draw_button((enum panel_type) but_inverted, C_LGREY, BUT_NORMAL) ;
X but_inverted = -1 ;
X down = 0 ;
X }
X! else if (cury > (CY + BBORDER)) handle_board_event() ;
X else if (nextc == LEFT_UP || nextc == MIDDLE_UP || nextc == RIGHT_UP)
X check_item_up() ;
X else if (nextc == LEFT_DOWN || nextc == MIDDLE_DOWN || nextc == RIGHT_DOWN)
X--- 342,356 ----
X process_event() ;
X
X if (nextc == FRAME_REPAINT) init_canvas() ;
X+ else if (nextc == PROPS_REPAINT) paint_prop_sheet() ;
X else if (nextc == KEYBOARD) handle_key() ;
X else if (nextc == EXIT_WINDOW && but_inverted != -1)
X {
X! draw_button(W_MAIN, (enum panel_type) but_inverted, C_LGREY, BUT_NORMAL) ;
X but_inverted = -1 ;
X down = 0 ;
X }
X! else if (curwin == W_MAIN && cury > (CY + BBORDER)) handle_board_event() ;
X else if (nextc == LEFT_UP || nextc == MIDDLE_UP || nextc == RIGHT_UP)
X check_item_up() ;
X else if (nextc == LEFT_DOWN || nextc == MIDDLE_DOWN || nextc == RIGHT_DOWN)
X***************
X*** 337,350 ****
X }
X switch (cur_ch)
X {
X! case 'B' : do_cycle_key(BLACK_PLAYS, nextc) ; /* Cycle items. */
X break ;
X! case 'D' : do_cycle_key(DIFFICULTY, nextc) ;
X break ;
X! case 'N' : do_cycle_key(NOTES, nextc) ;
X break ;
X- case 'W' : do_cycle_key(WHITE_PLAYS, nextc) ;
X- break ;
X
X case 'M' : show_all_moves() ; /* Button items. */
X break ;
X--- 388,399 ----
X }
X switch (cur_ch)
X {
X! case 'C' : do_cycle_key(COMP_CHOICE, nextc) ; /* Cycle items. */
X break ;
X! case 'D' : do_cycle_key(DIFF_CHOICE, nextc) ;
X break ;
X! case 'N' : do_cycle_key(OPT_EVAL, nextc) ;
X break ;
X
X case 'M' : show_all_moves() ; /* Button items. */
X break ;
X***************
X*** 359,364 ****
X--- 408,415 ----
X case 's' : suggest() ;
X break ;
X case 'u' : undo() ;
X+ break ;
X+ case 'p' : do_props() ;
X break ;
X
X case 'q' : destroy_frame() ;
X
X------- items.c -------
X*** /tmp/da07567 Sun Dec 9 15:11:33 1990
X--- items.c Sun Dec 9 13:53:06 1990
X***************
X*** 27,41 ****
X #include "color.h"
X #include "extern.h"
X
X- #ifdef SYSV
X- #include "string.h"
X- #else
X- #include <strings.h>
X- #endif /*SYSV*/
X
X-
X void
X! draw_button(item, color, image) /* Draw a panel button. */
X enum panel_type item ;
X int color ;
X enum image_type image ;
X--- 27,36 ----
X #include "color.h"
X #include "extern.h"
X
X
X void
X! draw_button(wtype, item, color, image) /* Draw a panel button. */
X! enum win_type wtype ;
X enum panel_type item ;
X int color ;
X enum image_type image ;
X***************
X*** 47,102 ****
X y = items[(int) item].y ;
X if (iscolor[(int) cur_dpyno])
X {
X! draw_stencil(x, y, BWIDTH, BHEIGHT, RSRC, color,
X BUT_STENCIL, BUT_STENCIL) ;
X! draw_image(x, y, BWIDTH, BHEIGHT, image) ;
X }
X! else draw_stencil(x, y, BWIDTH, BHEIGHT, RSRC, C_WHITE, BUT_STENCIL, image) ;
X label = items[(int) item].text ;
X if (image == BUT_INVERT) color = C_WHITE ;
X else color = C_BLACK ;
X x += ((BWIDTH - get_strwidth(NFONT, label)) / 2) ;
X y += (nfont_height + (BHEIGHT - nfont_height) / 2) - 5 ;
X! draw_text(x, y, NFONT, color, label) ;
X }
X
X
X void
X! draw_cycle(item, color, image)
X enum panel_type item ;
X int color ;
X enum image_type image ;
X {
X int x, y ;
X
X! x = items[(int) item].x + (3 * BWIDTH) + (2 * BGAP) - CWIDTH ;
X y = items[(int) item].y ;
X if (iscolor[(int) cur_dpyno])
X {
X! draw_stencil(x, y, CWIDTH, CHEIGHT, RSRC, color, CY_STENCIL, CY_STENCIL) ;
X! draw_image(x, y, CWIDTH, CHEIGHT, image) ;
X }
X! else draw_stencil(x, y, CWIDTH, CHEIGHT, RSRC, C_WHITE, CY_STENCIL, image) ;
X }
X
X
X void
X! draw_cycle_item(item, choices, color, image) /* Display cycle panel item. */
X enum panel_type item ;
X- char *choices[] ;
X int color ;
X enum image_type image ;
X {
X! char *label ;
X! int n, x, y ;
X
X! n = (int) item ;
X! label = items[n].text ;
X! x = items[n].x ;
X! y = items[n].y ;
X! draw_text(x, y + bfont_height, BFONT, C_BLACK, label) ;
X! set_cycle(item, choices[items[n].value]) ;
X! draw_cycle(item, color, image) ;
X }
X
X
X--- 42,154 ----
X y = items[(int) item].y ;
X if (iscolor[(int) cur_dpyno])
X {
X! draw_stencil(wtype, x, y, BWIDTH, BHEIGHT, RSRC, color,
X BUT_STENCIL, BUT_STENCIL) ;
X! draw_image(wtype, x, y, BWIDTH, BHEIGHT, image) ;
X }
X! else draw_stencil(wtype, x, y, BWIDTH, BHEIGHT, RSRC, C_WHITE,
X! BUT_STENCIL, image) ;
X label = items[(int) item].text ;
X if (image == BUT_INVERT) color = C_WHITE ;
X else color = C_BLACK ;
X x += ((BWIDTH - get_strwidth(NFONT, label)) / 2) ;
X y += (nfont_height + (BHEIGHT - nfont_height) / 2) - 5 ;
X! draw_text(wtype, x, y, NFONT, color, label) ;
X }
X
X
X void
X! draw_choice(wtype, item, color)
X! enum win_type wtype ;
X enum panel_type item ;
X int color ;
X+ {
X+ char *str ;
X+ int height, i, maxw, val, width, x, xoff, y ;
X+
X+ if (strlen(items[(int) item].label))
X+ draw_text(items[(int) item].wtype,
X+ items[(int) item].lx, items[(int) item].ly + bfont_height,
X+ BFONT, C_BLACK, items[(int) item].label) ;
X+
X+ maxw = 0 ;
X+ for (i = 0; i < items[(int) item].nopts; i++)
X+ {
X+ str = items[(int) item].options[i] ;
X+ if ((val = get_strwidth(NFONT, str)) > maxw) maxw = val ;
X+ }
X+
X+ maxw += CHOICEGAP ;
X+ x = items[(int) item].x ;
X+ y = items[(int) item].y ;
X+ height = nfont_height * 2 ;
X+ width = items[(int) item].nopts * maxw ;
X+ color_area(wtype, x, y, width, height, color) ;
X+ draw_rect(wtype, x, y, x + width, y + height, RSRC, C_BLACK) ;
X+
X+ items[(int) item].width = width ;
X+ items[(int) item].height = height ;
X+
X+ for (i = 1; i < items[(int) item].nopts; i++)
X+ draw_line(W_PROPS, x + (i * maxw), y,
X+ x + (i * maxw), y + height, RSRC, C_BLACK) ;
X+
X+ for (i = 0; i < items[(int) item].nopts; i++)
X+ {
X+ str = items[(int) item].options[i] ;
X+ val = get_strwidth(NFONT, str) ;
X+ xoff = (maxw - val) / 2 ;
X+ draw_text(items[(int) item].wtype,
X+ x + (i * maxw) + xoff,
X+ y + nfont_height + (nfont_height / 2), NFONT, C_BLACK, str) ;
X+ }
X+
X+ val = items[(int) item].value ;
X+ draw_rect(wtype,
X+ x + (val * maxw) + 1, y + 1,
X+ x + ((val + 1) * maxw) - 1, y + height - 1, RSRC, C_BLACK) ;
X+ }
X+
X+
X+ void
X+ draw_cycle(wtype, item, color, image)
X+ enum win_type wtype ;
X+ enum panel_type item ;
X+ int color ;
X enum image_type image ;
X {
X int x, y ;
X
X! x = items[(int) item].x + 40 ;
X y = items[(int) item].y ;
X if (iscolor[(int) cur_dpyno])
X {
X! draw_stencil(wtype, x, y, CWIDTH, CHEIGHT, RSRC, color,
X! CY_STENCIL, CY_STENCIL) ;
X! draw_image(wtype, x, y, CWIDTH, CHEIGHT, image) ;
X }
X! else draw_stencil(wtype, x, y, CWIDTH, CHEIGHT, RSRC, C_WHITE,
X! CY_STENCIL, image) ;
X }
X
X
X void
X! draw_cycle_item(wtype, item, color, image)
X! enum win_type wtype ;
X enum panel_type item ;
X int color ;
X enum image_type image ;
X {
X! char val[4] ;
X
X! if (strlen(items[(int) item].label))
X! draw_text(items[(int) item].wtype,
X! items[(int) item].lx, items[(int) item].ly + bfont_height,
X! BFONT, C_BLACK, items[(int) item].label) ;
X!
X! SPRINTF(val, "%d", items[(int) item].value) ;
X! set_cycle(wtype, item, val) ;
X! draw_cycle(wtype, item, color, image) ;
X }
X
X
X***************
X*** 106,121 ****
X {
X int y ;
X
X! color_area(tx + 1, ty + 1, tw - 2, th - 2, C_WHITE) ;
X y = ty + (nfont_height + (th - nfont_height) / 2) - 5 ;
X! draw_text(tx + 5, y, NFONT, C_BLACK, str) ;
X! draw_line(tx + 5 + get_strwidth(NFONT, str), y + 5,
X! tx + 5 + get_strwidth(NFONT, str), y + 5 - nfont_height,
X! RSRC, C_BLACK) ;
X }
X
X
X void
X draw_textfield()
X {
X int x1, y1 ;
X--- 158,209 ----
X {
X int y ;
X
X! color_area(W_MAIN, tx + 1, ty + 1, tw - 2, th - 2, C_WHITE) ;
X y = ty + (nfont_height + (th - nfont_height) / 2) - 5 ;
X! draw_text(W_MAIN, tx + 5, y, NFONT, C_BLACK, str) ;
X! draw_line(W_MAIN, tx + 5 + get_strwidth(NFONT, str), y + 5,
X! tx + 5 + get_strwidth(NFONT, str), y + 5 - nfont_height,
X! RSRC, C_BLACK) ;
X }
X
X
X void
X+ draw_toggle(wtype, item, color)
X+ enum win_type wtype ;
X+ enum panel_type item ;
X+ int color ;
X+ {
X+ enum image_type image ;
X+ int x, y ;
X+
X+ if (strlen(items[(int) item].label))
X+ draw_text(items[(int) item].wtype,
X+ items[(int) item].lx, items[(int) item].ly + bfont_height,
X+ BFONT, C_BLACK, items[(int) item].label) ;
X+
X+ if (items[(int) item].value) image = TOGGLE_ON ;
X+ else image = TOGGLE_OFF ;
X+
X+ x = items[(int) item].x ;
X+ y = items[(int) item].y ;
X+ if (iscolor[(int) cur_dpyno])
X+ {
X+ draw_stencil(wtype, x, y, TICKWIDTH, TICKHEIGHT, RSRC, color,
X+ CY_STENCIL, CY_STENCIL) ;
X+ draw_image(wtype, x, y, TICKWIDTH, TICKHEIGHT, image) ;
X+ }
X+ else draw_stencil(wtype, x, y, TICKWIDTH, TICKHEIGHT, RSRC, C_WHITE,
X+ CY_STENCIL, image) ;
X+
X+ if (strlen(items[(int) item].text))
X+ draw_text(items[(int) item].wtype,
X+ items[(int) item].x + TICKWIDTH + 10,
X+ items[(int) item].y + nfont_height,
X+ NFONT, C_BLACK, items[(int) item].text) ;
X+ }
X+
X+
X+ void
X draw_textfield()
X {
X int x1, y1 ;
X***************
X*** 123,132 ****
X lsval = (curx < (BBORDER + (2*(BWIDTH+BGAP)))) ? 'l' : 's' ;
X x1 = BBORDER + BWIDTH + (BGAP / 2) ;
X y1 = BBORDER + BHEIGHT + (BGAP / 2) ;
X! color_area(x1, y1, 4 * (BWIDTH + BGAP), BHEIGHT + BGAP, C_WHITE) ;
X! draw_rect(x1, y1, x1 + (4 * (BWIDTH + BGAP)) - 1,
X! y1 + BHEIGHT + BGAP - 1, RSRC, C_BLACK) ;
X! draw_text(BBORDER + BWIDTH + BGAP, BBORDER + BHEIGHT + BGAP +
X (nfont_height + (BHEIGHT - nfont_height) / 2) - 5,
X BFONT, C_BLACK, "File:") ;
X tx = BBORDER + BWIDTH + BGAP + (BWIDTH / 2) + 10 ;
X--- 211,220 ----
X lsval = (curx < (BBORDER + (2*(BWIDTH+BGAP)))) ? 'l' : 's' ;
X x1 = BBORDER + BWIDTH + (BGAP / 2) ;
X y1 = BBORDER + BHEIGHT + (BGAP / 2) ;
X! color_area(W_MAIN, x1, y1, 4 * (BWIDTH + BGAP), BHEIGHT + BGAP, C_WHITE) ;
X! draw_rect(W_MAIN, x1, y1, x1 + (4 * (BWIDTH + BGAP)) - 1,
X! y1 + BHEIGHT + BGAP - 1, RSRC, C_BLACK) ;
X! draw_text(W_MAIN, BBORDER + BWIDTH + BGAP, BBORDER + BHEIGHT + BGAP +
X (nfont_height + (BHEIGHT - nfont_height) / 2) - 5,
X BFONT, C_BLACK, "File:") ;
X tx = BBORDER + BWIDTH + BGAP + (BWIDTH / 2) + 10 ;
X***************
X*** 133,145 ****
X ty = BBORDER + BHEIGHT + BGAP ;
X tw = (BWIDTH / 2) - 10 + (2 * (BWIDTH + BGAP)) ;
X th = BHEIGHT ;
X! draw_rect(tx, ty, tx + tw, ty + th, RSRC, C_BLACK) ;
X draw_filename(gamefile) ;
X
X tinput = 1 ;
X items[(int) CANCEL_BUT].x = BBORDER + (4*(BWIDTH+BGAP)) ;
X items[(int) CANCEL_BUT].y = BBORDER + (1*(BHEIGHT+BGAP)) ;
X! draw_button(CANCEL_BUT, C_LGREY, BUT_NORMAL) ;
X }
X
X
X--- 221,233 ----
X ty = BBORDER + BHEIGHT + BGAP ;
X tw = (BWIDTH / 2) - 10 + (2 * (BWIDTH + BGAP)) ;
X th = BHEIGHT ;
X! draw_rect(W_MAIN, tx, ty, tx + tw, ty + th, RSRC, C_BLACK) ;
X draw_filename(gamefile) ;
X
X tinput = 1 ;
X items[(int) CANCEL_BUT].x = BBORDER + (4*(BWIDTH+BGAP)) ;
X items[(int) CANCEL_BUT].y = BBORDER + (1*(BHEIGHT+BGAP)) ;
X! draw_button(W_MAIN, CANCEL_BUT, C_LGREY, BUT_NORMAL) ;
X }
X
X
X***************
X*** 175,192 ****
X
X
X void
X! make_message(item) /* Display a message panel. */
X enum panel_type item ;
X {
X char *message ;
X int x, y ;
X
X message = items[(int) item].text ;
X x = items[(int) item].x ;
X y = items[(int) item].y ;
X color = (iscolor[(int) cur_dpyno]) ? C_BEIGE : C_WHITE ;
X! color_area(x, y, TOTAL_WIDTH, 15, color) ;
X! draw_text(x, y+nfont_height, NFONT, C_BLACK, message) ;
X }
X
X
X--- 263,286 ----
X
X
X void
X! make_message(wtype, item) /* Display a message panel. */
X! enum win_type wtype ;
X enum panel_type item ;
X {
X char *message ;
X int x, y ;
X
X+ if (strlen(items[(int) item].label))
X+ draw_text(items[(int) item].wtype,
X+ items[(int) item].lx, items[(int) item].ly + bfont_height,
X+ BFONT, C_BLACK, items[(int) item].label) ;
X+
X message = items[(int) item].text ;
X x = items[(int) item].x ;
X y = items[(int) item].y ;
X color = (iscolor[(int) cur_dpyno]) ? C_BEIGE : C_WHITE ;
X! color_area(wtype, x, y, TOTAL_WIDTH, 15, color) ;
X! draw_text(wtype, x, y + nfont_height, NFONT, C_BLACK, message) ;
X }
X
X
X***************
X*** 193,217 ****
X void
X make_panel()
X {
X! draw_button(LOAD_BUT, C_LGREY, BUT_NORMAL) ;
X! draw_button(NEW_GAME_BUT, C_LGREY, BUT_NORMAL) ;
X! draw_button(SAVE_BUT, C_LGREY, BUT_NORMAL) ;
X! draw_button(SHOW_ALL_BUT, C_LGREY, BUT_NORMAL) ;
X! draw_button(SUGGEST_BUT, C_LGREY, BUT_NORMAL) ;
X! draw_button(UNDO_BUT, C_LGREY, BUT_NORMAL) ;
X
X! draw_button(DONE_BUT, C_LGREY, BUT_NORMAL) ;
X! draw_button(QUIT_BUT, C_LGREY, BUT_NORMAL) ;
X
X! draw_cycle_item(BLACK_PLAYS, player_values, C_LGREY, CY_NORMAL) ;
X! draw_cycle_item(WHITE_PLAYS, player_values, C_LGREY, CY_NORMAL) ;
X! draw_cycle_item(DIFFICULTY, diff_values, C_LGREY, CY_NORMAL) ;
X! draw_cycle_item(NOTES, notes_values, C_LGREY, CY_NORMAL) ;
X!
X! make_message(PANEL_MES) ;
X! make_message(EVAL_MES) ;
X! make_message(SCORE_MES) ;
X! make_message(TURN_MES) ;
X }
X
X
X--- 287,308 ----
X void
X make_panel()
X {
X! draw_button(W_MAIN, LOAD_BUT, C_LGREY, BUT_NORMAL) ;
X! draw_button(W_MAIN, MOVES_BUT, C_LGREY, BUT_NORMAL) ;
X! draw_button(W_MAIN, NEW_GAME_BUT, C_LGREY, BUT_NORMAL) ;
X! draw_button(W_MAIN, SAVE_BUT, C_LGREY, BUT_NORMAL) ;
X! draw_button(W_MAIN, SUGGEST_BUT, C_LGREY, BUT_NORMAL) ;
X! draw_button(W_MAIN, UNDO_BUT, C_LGREY, BUT_NORMAL) ;
X
X! draw_button(W_MAIN, PROPS_BUT, C_LGREY, BUT_NORMAL) ;
X! draw_button(W_MAIN, QUIT_BUT, C_LGREY, BUT_NORMAL) ;
X
X! make_message(W_MAIN, BLACK_PLAYS) ;
X! make_message(W_MAIN, WHITE_PLAYS) ;
X! make_message(W_MAIN, PANEL_MES) ;
X! make_message(W_MAIN, EVAL_MES) ;
X! make_message(W_MAIN, SCORE_MES) ;
X! make_message(W_MAIN, TURN_MES) ;
X }
X
X
X***************
X*** 224,237 ****
X
X n = (int) mtype ;
X color = (iscolor[(int) cur_dpyno]) ? C_BEIGE : C_WHITE ;
X! color_area(items[n].x, items[n].y,
X get_strwidth(NFONT, items[n].text), nfont_height + 5, color) ;
X! draw_text(items[n].x, items[n].y + nfont_height, NFONT, C_BLACK, str) ;
X STRCPY(items[n].text, str) ;
X }
X
X
X void
X remove_textfield()
X {
X int x1, y1 ;
X--- 315,353 ----
X
X n = (int) mtype ;
X color = (iscolor[(int) cur_dpyno]) ? C_BEIGE : C_WHITE ;
X! color_area(W_MAIN, items[n].x, items[n].y,
X get_strwidth(NFONT, items[n].text), nfont_height + 5, color) ;
X! draw_text(W_MAIN, items[n].x, items[n].y + nfont_height,
X! NFONT, C_BLACK, str) ;
X STRCPY(items[n].text, str) ;
X }
X
X
X void
X+ paint_prop_sheet()
X+ {
X+ int color, d ;
X+
X+ d = (int) cur_dpyno ;
X+ color = (iscolor[d]) ? C_BEIGE : C_WHITE ;
X+ color_area(W_PROPS, 0, 0, PROPS_WIDTH, PROPS_HEIGHT, color) ;
X+
X+ color = (iscolor[d]) ? C_BEIGE : C_WHITE ;
X+ draw_choice(W_PROPS, COMP_CHOICE, color) ;
X+ draw_choice(W_PROPS, DIFF_CHOICE, color) ;
X+
X+ draw_cycle_item(W_PROPS, MAX_DEPTH, C_LGREY, CY_NORMAL) ;
X+
X+ draw_toggle(W_PROPS, OPT_ANIM, color) ;
X+ draw_toggle(W_PROPS, OPT_BEST, color) ;
X+ draw_toggle(W_PROPS, OPT_LAST, color) ;
X+ draw_toggle(W_PROPS, OPT_EVAL, color) ;
X+ draw_toggle(W_PROPS, OPT_NUM, color) ;
X+ draw_toggle(W_PROPS, OPT_FLIP, color) ;
X+ }
X+
X+
X+ void
X remove_textfield()
X {
X int x1, y1 ;
X***************
X*** 238,244 ****
X
X x1 = BBORDER + BWIDTH + (BGAP / 2) ;
X y1 = BBORDER + BHEIGHT + (BGAP / 2) ;
X! color_area(x1, y1, 4 * (BWIDTH + BGAP), BHEIGHT + BGAP,
X (iscolor[(int) cur_dpyno]) ? C_BEIGE : C_WHITE) ;
X tinput = 0 ;
X items[(int) CANCEL_BUT].x = -1 ;
X--- 354,360 ----
X
X x1 = BBORDER + BWIDTH + (BGAP / 2) ;
X y1 = BBORDER + BHEIGHT + (BGAP / 2) ;
X! color_area(W_MAIN, x1, y1, 4 * (BWIDTH + BGAP), BHEIGHT + BGAP,
X (iscolor[(int) cur_dpyno]) ? C_BEIGE : C_WHITE) ;
X tinput = 0 ;
X items[(int) CANCEL_BUT].x = -1 ;
X***************
X*** 247,267 ****
X
X
X void
X! set_cycle(mtype, str)
X! enum panel_type mtype ;
X char *str ;
X {
X- int n, width, x ;
X-
X- n = (int) mtype ;
X color = (iscolor[(int) cur_dpyno]) ? C_BEIGE : C_WHITE ;
X
X! width = (3 * BWIDTH) + (2 * BGAP) -
X! get_strwidth(BFONT, items[n].text) - CWIDTH ;
X! x = items[n].x + get_strwidth(BFONT, items[n].text) ;
X! color_area(x, items[n].y, width, items[n].height, color) ;
X!
X! width = get_strwidth(NFONT, str) ;
X! x = items[n].x + (3 * BWIDTH) + (2 * BGAP) - CWIDTH - width ;
X! draw_text(x - 5, items[n].y + nfont_height, NFONT, C_BLACK, str) ;
X }
X--- 363,379 ----
X
X
X void
X! set_cycle(wtype, item, str)
X! enum win_type wtype ;
X! enum panel_type item ;
X char *str ;
X {
X color = (iscolor[(int) cur_dpyno]) ? C_BEIGE : C_WHITE ;
X
X! color_area(wtype, items[(int) item].x, items[(int) item].y,
X! items[(int) item].width, CHEIGHT, color) ;
X! draw_text(wtype, items[(int) item].x, items[(int) item].y + nfont_height,
X! NFONT, C_BLACK, str) ;
X! STRCPY(items[(int) item].text, str) ;
X! items[(int) item].width = get_strwidth(NFONT, str) ;
X }
X
END_OF_FILE
if test 44866 -ne `wc -c <'patches03b'`; then
echo shar: \"'patches03b'\" unpacked with wrong size!
fi
# end of 'patches03b'
fi
echo shar: End of archive 5 \(of 9\).
cp /dev/null ark5isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 9 ; do
if test ! -f ark${I}isdone ; then
MISSING="${MISSING} ${I}"
fi
done
if test "${MISSING}" = "" ; then
echo You have unpacked all 9 archives.
rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
echo You still need to unpack the following archives:
echo " " ${MISSING}
fi
## End of shell archive.
exit 0