player.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. /* $NetBSD: player.h,v 1.11 2003/08/07 09:37:44 agc Exp $ */
  2. /*
  3. * Copyright (c) 1983, 1993
  4. * The Regents of the University of California. All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions
  8. * are met:
  9. * 1. Redistributions of source code must retain the above copyright
  10. * notice, this list of conditions and the following disclaimer.
  11. * 2. Redistributions in binary form must reproduce the above copyright
  12. * notice, this list of conditions and the following disclaimer in the
  13. * documentation and/or other materials provided with the distribution.
  14. * 3. Neither the name of the University nor the names of its contributors
  15. * may be used to endorse or promote products derived from this software
  16. * without specific prior written permission.
  17. *
  18. * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  19. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  20. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  21. * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  22. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  23. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  24. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  25. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  26. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  27. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  28. * SUCH DAMAGE.
  29. *
  30. * @(#)player.h 8.2 (Berkeley) 5/3/95
  31. */
  32. /* sizes and coordinates for the screen */
  33. #define LINE_T 0
  34. #define LINE_L 0
  35. #define LINE_X COLS
  36. #define LINE_Y 1
  37. #define LINE_B (LINE_T+LINE_Y-1)
  38. #define LINE_R (LINE_L+LINE_X-1)
  39. #define BOX_T 1
  40. #define BOX_L 0
  41. #define BOX_X 65
  42. #define BOX_Y 16
  43. #define BOX_B (BOX_T+BOX_Y-1)
  44. #define BOX_R (BOX_L+BOX_X-1)
  45. #define TURN_T BOX_B
  46. #define TURN_Y 1
  47. #define TURN_L ((BOX_L+BOX_R-TURN_X)/2)
  48. #define TURN_X 9
  49. #define TURN_B (TURN_T+TURN_Y+1)
  50. #define TURN_R (TURN_L+TURN_X+1)
  51. #define STAT_T 0
  52. #define STAT_B BOX_B
  53. #define STAT_L (BOX_R+2)
  54. #define STAT_X 14
  55. #define STAT_Y (STAT_B-STAT_T+1)
  56. #define STAT_R (STAT_L+STAT_X-1)
  57. #define STAT_1 0
  58. #define STAT_2 (STAT_1+4)
  59. #define STAT_3 (STAT_2+7)
  60. #define SCROLL_T (BOX_B+1)
  61. #define SCROLL_L 0
  62. #define SCROLL_B (LINES-1)
  63. #define SCROLL_R (COLS-1)
  64. #define SCROLL_X (SCROLL_R-SCROLL_L+1)
  65. #define SCROLL_Y (SCROLL_B-SCROLL_T+1)
  66. #define VIEW_T (BOX_T+1)
  67. #define VIEW_L (BOX_L+1)
  68. #define VIEW_X (BOX_X-5)
  69. #define VIEW_Y (BOX_Y-2)
  70. #define VIEW_B (VIEW_T+VIEW_Y-1)
  71. #define VIEW_R (VIEW_L+VIEW_X-1)
  72. #define SLOT_T VIEW_T
  73. #define SLOT_L (VIEW_R+1)
  74. #define SLOT_X 3
  75. #define SLOT_Y VIEW_Y
  76. #define SLOT_B VIEW_B
  77. #define SLOT_R (SLOT_L+SLOT_X-1)
  78. extern int done_curses;
  79. extern int loaded, fired, changed, repaired;
  80. extern int dont_adjust;
  81. extern int viewrow, viewcol;
  82. extern char movebuf[sizeof SHIP(0)->file->movebuf];
  83. extern char version[];
  84. extern int player;
  85. extern struct ship *ms; /* memorial structure, &cc->ship[player] */
  86. extern struct File *mf; /* ms->file */
  87. extern struct shipspecs *mc; /* ms->specs */
  88. /* condition codes for leave() */
  89. #define LEAVE_QUIT 0
  90. #define LEAVE_CAPTURED 1
  91. #define LEAVE_HURRICAN 2
  92. #define LEAVE_DRIVER 3
  93. #define LEAVE_FORK 4
  94. #define LEAVE_SYNC 5