# 2.11BSD#431 - /usr/src/games/sail/player.h

##### Variables

    changed           X
    done_curses       X
    dont_adjust       X
    fired             X
    loaded            X
    mc                X
    mf                X
    movebuf           X
    ms                X
    player            X
    repaired          X
    version           X
    viewcol           X
    viewrow           X

##### Macros

    BOX_B             X
    BOX_L             X
    BOX_R             X
    BOX_T             X
    BOX_X             X
    BOX_Y             X
    LEAVE_CAPTURED    X
    LEAVE_DRIVER      X
    LEAVE_FORK        X
    LEAVE_HURRICAN    X
    LEAVE_QUIT        X
    LEAVE_SYNC        X
    LINE_B            X
    LINE_L            X
    LINE_R            X
    LINE_T            X
    LINE_X            X
    LINE_Y            X
    SCREENTEST        X
    SCROLL_B          X
    SCROLL_L          X
    SCROLL_R          X
    SCROLL_T          X
    SCROLL_X          X
    SCROLL_Y          X
    SLOT_B            X
    SLOT_L            X
    SLOT_R            X
    SLOT_T            X
    SLOT_X            X
    SLOT_Y            X
    STAT_1            X
    STAT_2            X
    STAT_3            X
    STAT_B            X
    STAT_L            X
    STAT_R            X
    STAT_T            X
    STAT_X            X
    STAT_Y            X
    TURN_B            X
    TURN_L            X
    TURN_R            X
    TURN_T            X
    TURN_X            X
    TURN_Y            X
    VIEW_B            X
    VIEW_L            X
    VIEW_R            X
    VIEW_T            X
    VIEW_X            X
    VIEW_Y            X

       1: /*
       2:  * Copyright (c) 1983 Regents of the University of California.
       3:  * All rights reserved.  The Berkeley software License Agreement
       4:  * specifies the terms and conditions for redistribution.
       5:  *
       6:  *	@(#)player.h	5.1.1 (2.11BSD GTE) 1/1/94
       7:  */
       8:
       9: #include <curses.h>
      10: #include "externs.h"
      11:
      12: /* sizes and coordinates for the screen */
      13:
      14: #define LINE_T      0
      15: #define LINE_L      0
      16: #define LINE_X      COLS
      17: #define LINE_Y      1
      18: #define LINE_B      (LINE_T+LINE_Y-1)
      19: #define LINE_R      (LINE_L+LINE_X-1)
      20:
      21: #define BOX_T       1
      22: #define BOX_L       0
      23: #define BOX_X       65
      24: #define BOX_Y       16
      25: #define BOX_B       (BOX_T+BOX_Y-1)
      26: #define BOX_R       (BOX_L+BOX_X-1)
      27:
      28: #define TURN_T      BOX_B
      29: #define TURN_Y      1
      30: #define TURN_L      ((BOX_L+BOX_R-TURN_X)/2)
      31: #define TURN_X      9
      32: #define TURN_B      (TURN_T+TURN_Y+1)
      33: #define TURN_R      (TURN_L+TURN_X+1)
      34:
      35: #define STAT_T      0
      36: #define STAT_B      BOX_B
      37: #define STAT_L      (BOX_R+2)
      38: #define STAT_X      14
      39: #define STAT_Y      (STAT_B-STAT_T+1)
      40: #define STAT_R      (STAT_L+STAT_X-1)
      41: #define STAT_1      0
      42: #define STAT_2          (STAT_1+4)
      43: #define STAT_3          (STAT_2+7)
      44:
      45: #define SCROLL_T    (BOX_B+1)
      46: #define SCROLL_L    0
      47: #define SCROLL_B    (LINES-1)
      48: #define SCROLL_R    (COLS-1)
      49: #define SCROLL_X    (SCROLL_R-SCROLL_L+1)
      50: #define SCROLL_Y    (SCROLL_B-SCROLL_T+1)
      51:
      52: #define VIEW_T      (BOX_T+1)
      53: #define VIEW_L      (BOX_L+1)
      54: #define VIEW_X      (BOX_X-5)
      55: #define VIEW_Y      (BOX_Y-2)
      56: #define VIEW_B      (VIEW_T+VIEW_Y-1)
      57: #define VIEW_R      (VIEW_L+VIEW_X-1)
      58:
      59: #define SLOT_T      VIEW_T
      60: #define SLOT_L      (VIEW_R+1)
      61: #define SLOT_X      3
      62: #define SLOT_Y      VIEW_Y
      63: #define SLOT_B      VIEW_B
      64: #define SLOT_R      (SLOT_L+SLOT_X-1)
      65:
      66: #ifdef SIGTSTP
      67: #define SCREENTEST()    (initscr() != ERR && signal(SIGTSTP, SIG_DFL) != BADSIG && STAT_R < COLS && SCROLL_Y > 0)
      68: #else
      69: #define SCREENTEST()    (initscr() != ERR && STAT_R < COLS && SCROLL_Y > 0)
      70: #endif
      71:
      72: WINDOW *view_w;
      73: WINDOW *slot_w;
      74: WINDOW *scroll_w;
      75: WINDOW *stat_w;
      76: WINDOW *turn_w;
      77:
      78: char done_curses;
      79: char loaded, fired, changed, repaired;
      80: char dont_adjust;
      81: int viewrow, viewcol;
      82: char movebuf[sizeof SHIP(0)->file->movebuf];
      83: char version[];
      84: int player;
      85: struct ship *ms;        /* memorial structure, &cc->ship[player] */
      86: struct File *mf;        /* ms->file */
      87: struct shipspecs *mc;       /* ms->specs */
      88:
      89: /* condition codes for leave() */
      90: #define LEAVE_QUIT  0
      91: #define LEAVE_CAPTURED  1
      92: #define LEAVE_HURRICAN  2
      93: #define LEAVE_DRIVER    3
      94: #define LEAVE_FORK  4
      95: #define LEAVE_SYNC  5

#### Defined variables

changed defined in line 79; used 4 times

- in /usr/src/games/sail/pl_4.c line 25, 32
- in /usr/src/games/sail/pl_6.c line 23
- in /usr/src/games/sail/pl_7.c line 58

done_curses defined in line 78; used 4 times

- in /usr/src/games/sail/pl_1.c line 32
- in /usr/src/games/sail/pl_7.c line 30, 48, 113

dont_adjust defined in line 80; used 4 times

- in /usr/src/games/sail/pl_2.c line 120(2)
- in /usr/src/games/sail/pl_7.c line 248, 430

fired defined in line 79; used 3 times

- in /usr/src/games/sail/pl_3.c line 92
- in /usr/src/games/sail/pl_6.c line 23
- in /usr/src/games/sail/pl_7.c line 58

loaded defined in line 79; used 3 times

- in /usr/src/games/sail/pl_6.c line 23, 167
- in /usr/src/games/sail/pl_7.c line 58

mc defined in line 87; used 39 times

- in /usr/src/games/sail/pl_3.c line 26-28(3), 46-52(4), 116, 134
- in /usr/src/games/sail/pl_4.c line 17-21(3)
- in /usr/src/games/sail/pl_5.c line 26, 127-129(3)
- in /usr/src/games/sail/pl_6.c line 17, 121
- in /usr/src/games/sail/pl_7.c line 88, 279-288(13), 393-395(3)
- in /usr/src/games/sail/pl_main.c line 146, 167-168(3)

mf defined in line 86; used 77 times

- in /usr/src/games/sail/pl_1.c line 79
- in /usr/src/games/sail/pl_2.c line 62-65(4)
- in /usr/src/games/sail/pl_3.c line 30-35(4), 44-50(4), 56, 117, 128, 168-172(4)
- in /usr/src/games/sail/pl_4.c line 18, 95
- in /usr/src/games/sail/pl_5.c line 32-35(2), 96, 105, 131-136(4)
- in /usr/src/games/sail/pl_6.c line 30-36(3), 125-126(2), 161-165(4)
- in /usr/src/games/sail/pl_7.c line 62-71(8), 88-95(4), 255, 277-278(4), 306-317(6), 404-405(2), 432-439(8)
- in /usr/src/games/sail/pl_main.c line 145, 204-208(4)

movebuf defined in line 82; used 7 times

- in line 82
- in /usr/src/games/sail/pl_5.c line 112-116(4)
- in /usr/src/games/sail/pl_6.c line 110
- in /usr/src/games/sail/pl_7.c line 59

ms defined in line 85; used 83 times

- in /usr/src/games/sail/pl_1.c line 75-80(4)
- in /usr/src/games/sail/pl_2.c line 51-52(4), 76-80(2)
- in /usr/src/games/sail/pl_3.c line 58-63(2), 93-94(3), 161, 190-192(3), 198-214(7), 232-240(4)
- in /usr/src/games/sail/pl_4.c line 26-31(2), 50, 94-95(2)
- in /usr/src/games/sail/pl_5.c line 26-32(3), 54, 97, 106, 115, 148-156(6), 164, 199, 209, 219
- in /usr/src/games/sail/pl_6.c line 49, 58, 65, 74-86(4)
- in /usr/src/games/sail/pl_7.c line 89-91(2), 256-273(10), 294-299(2), 396-398(3)
- in /usr/src/games/sail/pl_main.c line 144-148(4), 167, 179, 215

player defined in line 84; used 9 times

- in /usr/src/games/sail/pl_3.c line 200
- in /usr/src/games/sail/pl_main.c line 111, 123-137(6), 144

repaired defined in line 79; used 3 times

- in /usr/src/games/sail/pl_6.c line 23, 103
- in /usr/src/games/sail/pl_7.c line 58

version defined in line 83; used 1 times

- in /usr/src/games/sail/pl_2.c line 32

viewcol defined in line 81; used 11 times

- in /usr/src/games/sail/pl_7.c line 231-238(4), 405, 420-425(2), 436-439(4)

viewrow defined in line 81; used 11 times

- in /usr/src/games/sail/pl_7.c line 229-237(4), 404, 410-415(2), 432-435(4)

#### Defined macros

BOX_B defined in line 25; used 7 times

- in line 28, 36, 45
- in /usr/src/games/sail/pl_7.c line 371-374(2), 380-381(2)

BOX_L defined in line 22; used 8 times

- in line 26-30(2), 53
- in /usr/src/games/sail/pl_7.c line 368-380(5)

BOX_R defined in line 26; used 5 times

- in line 30, 37
- in /usr/src/games/sail/pl_7.c line 376-381(3)

BOX_T defined in line 21; used 6 times

- in line 25, 52
- in /usr/src/games/sail/pl_7.c line 368, 374-379(3)

BOX_X defined in line 23; used 4 times

- in line 26, 54
- in /usr/src/games/sail/pl_7.c line 369-372(2)

BOX_Y defined in line 24; used 2 times

- in line 25, 55

LEAVE_CAPTURED defined in line 91; used 1 times

- in /usr/src/games/sail/pl_7.c line 96

LEAVE_DRIVER defined in line 93; used 1 times

- in /usr/src/games/sail/pl_7.c line 82

LEAVE_FORK defined in line 94; used 1 times

- in /usr/src/games/sail/pl_main.c line 160

LEAVE_HURRICAN defined in line 92; used 1 times

- in /usr/src/games/sail/pl_7.c line 98

LEAVE_QUIT defined in line 90; used 3 times

- in /usr/src/games/sail/pl_1.c line 91
- in /usr/src/games/sail/pl_2.c line 72
- in /usr/src/games/sail/pl_7.c line 94

LEAVE_SYNC defined in line 95; used 5 times

- in /usr/src/games/sail/pl_1.c line 77
- in /usr/src/games/sail/pl_7.c line 80
- in /usr/src/games/sail/pl_main.c line 95, 136, 150

LINE_B defined in line 18; never used
LINE_L defined in line 15; used 2 times

- in line 19
- in /usr/src/games/sail/pl_7.c line 391

LINE_R defined in line 19; never used
LINE_T defined in line 14; used 2 times

- in line 18
- in /usr/src/games/sail/pl_7.c line 391

LINE_X defined in line 16; used 1 times

- in line 19

LINE_Y defined in line 17; used 1 times

- in line 18

SCREENTEST defined in line 69; used 1 times

- in /usr/src/games/sail/pl_main.c line 21

SCROLL_B defined in line 47; used 1 times

- in line 50

SCROLL_L defined in line 46; used 2 times

- in line 49
- in /usr/src/games/sail/pl_7.c line 27

SCROLL_R defined in line 48; used 1 times

- in line 49

SCROLL_T defined in line 45; used 2 times

- in line 50
- in /usr/src/games/sail/pl_7.c line 27

SCROLL_X defined in line 49; used 1 times

- in /usr/src/games/sail/pl_7.c line 27

SCROLL_Y defined in line 50; used 5 times

- in line 67-69(2)
- in /usr/src/games/sail/pl_7.c line 27, 49, 127

SLOT_B defined in line 63; never used
SLOT_L defined in line 60; used 2 times

- in line 64
- in /usr/src/games/sail/pl_7.c line 26

SLOT_R defined in line 64; never used
SLOT_T defined in line 59; used 1 times

- in /usr/src/games/sail/pl_7.c line 26

SLOT_X defined in line 61; used 2 times

- in line 64
- in /usr/src/games/sail/pl_7.c line 26

SLOT_Y defined in line 62; used 5 times

- in /usr/src/games/sail/pl_7.c line 26, 305-315(3), 321

STAT_1 defined in line 41; used 2 times

- in line 42
- in /usr/src/games/sail/pl_7.c line 254

STAT_2 defined in line 42; used 2 times

- in line 43
- in /usr/src/games/sail/pl_7.c line 259

STAT_3 defined in line 43; used 1 times

- in /usr/src/games/sail/pl_7.c line 275

STAT_B defined in line 36; used 1 times

- in line 39

STAT_L defined in line 37; used 2 times

- in line 40
- in /usr/src/games/sail/pl_7.c line 28

STAT_R defined in line 40; used 2 times

- in line 67-69(2)

STAT_T defined in line 35; used 2 times

- in line 39
- in /usr/src/games/sail/pl_7.c line 28

STAT_X defined in line 38; used 2 times

- in line 40
- in /usr/src/games/sail/pl_7.c line 28

STAT_Y defined in line 39; used 1 times

- in /usr/src/games/sail/pl_7.c line 28

TURN_B defined in line 32; never used
TURN_L defined in line 30; used 2 times

- in line 33
- in /usr/src/games/sail/pl_7.c line 29

TURN_R defined in line 33; never used
TURN_T defined in line 28; used 2 times

- in line 32
- in /usr/src/games/sail/pl_7.c line 29

TURN_X defined in line 31; used 3 times

- in line 30-33(2)
- in /usr/src/games/sail/pl_7.c line 29

TURN_Y defined in line 29; used 2 times

- in line 32
- in /usr/src/games/sail/pl_7.c line 29

VIEW_B defined in line 56; used 1 times

- in line 63

VIEW_L defined in line 53; used 2 times

- in line 57
- in /usr/src/games/sail/pl_7.c line 25

VIEW_R defined in line 57; used 1 times

- in line 60

VIEW_T defined in line 52; used 3 times

- in line 56-59(2)
- in /usr/src/games/sail/pl_7.c line 25

VIEW_X defined in line 54; used 14 times

- in line 57
- in /usr/src/games/sail/pl_7.c line 25, 232, 385-387(2), 405, 420-425(2), 436-439(6)

VIEW_Y defined in line 55; used 13 times

- in line 56, 62
- in /usr/src/games/sail/pl_7.c line 25, 230, 404, 410-415(2), 432-435(6)

#### Usage of this include

player.h used 8 times

- in /usr/src/games/sail/pl_1.c line 11
- in /usr/src/games/sail/pl_2.c line 11
- in /usr/src/games/sail/pl_3.c line 11
- in /usr/src/games/sail/pl_4.c line 11
- in /usr/src/games/sail/pl_5.c line 11
- in /usr/src/games/sail/pl_6.c line 11
- in /usr/src/games/sail/pl_7.c line 11
- in /usr/src/games/sail/pl_main.c line 11

Last modified: 1994-01-11 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1642 |