home *** CD-ROM | disk | FTP | other *** search
/ Virtual Reality Homebrewer's Handbook / vr.iso / vr386 / vrconst.h < prev    next >
Text File  |  1996-03-19  |  4KB  |  129 lines

  1. // FOR API: ONLY SPECIAL DEFINES
  2. // for: keys, joysticks, etc
  3.  
  4.  
  5. /*
  6.  This code is part of the VR-386 project, created by Dave Stampe.
  7.  VR-386 is a desendent of REND386, created by Dave Stampe and
  8.  Bernie Roehl.  Almost all the code has been rewritten by Dave
  9.  Stampre for VR-386.
  10.  
  11.  Copyright (c) 1994 by Dave Stampe:
  12.  May be freely used to write software for release into the public domain
  13.  or for educational use; all commercial endeavours MUST contact Dave Stampe
  14.  (dstampe@psych.toronto.edu) for permission to incorporate any part of
  15.  this software or source code into their products!  Usually there is no
  16.  charge for under 50-100 items for low-cost or shareware products, and terms
  17.  are reasonable.  Any royalties are used for development, so equipment is
  18.  often acceptable payment.
  19.  
  20.  ATTRIBUTION:  If you use any part of this source code or the libraries
  21.  in your projects, you must give attribution to VR-386 and Dave Stampe,
  22.  and any other authors in your documentation, source code, and at startup
  23.  of your program.  Let's keep the freeware ball rolling!
  24.  
  25.  DEVELOPMENT: VR-386 is a effort to develop the process started by
  26.  REND386, improving programmer access by rewriting the code and supplying
  27.  a standard API.  If you write improvements, add new functions rather
  28.  than rewriting current functions.  This will make it possible to
  29.  include you improved code in the next API release.  YOU can help advance
  30.  VR-386.  Comments on the API are welcome.
  31.  
  32.  CONTACT: dstampe@psych.toronto.edu
  33. */
  34.  
  35.  
  36. ////////// GLOVE/POINTER POSITION
  37.  
  38.    // offsets of wrist from body
  39. #define Y_PTR_OFFSET  100      /* needed as "body" is at neck level */
  40. #define PTR_DIST      1000
  41.  
  42.  
  43.  
  44. /********** MODE FLAGS FOR JOYSTICK POINTERS *********/
  45.  
  46.             // mouse joy switch
  47. #define MJOY_ENABLE   0x1000 // even if off, it works while ALT key down
  48.             // acceleration mode (NOT all yet)
  49. #define MJOY_VELOCITY 0x2000 // mouse sets velocity not position
  50.  
  51.  
  52.  
  53. /************************ KEY DEFINES **************/
  54. //
  55. // THESE ARE RETURNED BY getkey();
  56. // AND ENCODE SHIFT, ALT, ETC.
  57.  
  58. #define F1  0x3B00
  59. #define F2  0x3C00
  60. #define F3  0x3D00
  61. #define F4  0x3E00
  62. #define F5  0x3F00
  63. #define F6  0x4000
  64. #define F7  0x4100
  65. #define F8  0x4200
  66. #define F9  0x4300
  67. #define F10 0x4400
  68.  
  69. #define HOME      0x4700
  70. #define END       0x4F00
  71. #define PGUP      0x4900
  72. #define PGDN      0x5100
  73.  
  74. #define LEFT      0x4B00
  75. #define RIGHT     0x4D00
  76. #define UP        0x4800
  77. #define DOWN      0x5000
  78.  
  79. #define SHLEFT    0x4B01
  80. #define SHRIGHT   0x4D01
  81. #define SHUP      0x4801
  82. #define SHDOWN    0x5001
  83. #define ASHLEFT   0x3401
  84. #define ASHRIGHT  0x3601
  85. #define ASHUP     0x3801
  86. #define ASHDOWN   0x3201
  87.  
  88. #define LSHLEFT   0x4B02
  89. #define LSHRIGHT  0x4D02
  90. #define LSHUP     0x4802
  91. #define LSHDOWN   0x5002
  92. #define ALSHLEFT  0x3402
  93. #define ALSHRIGHT 0x3602
  94. #define ALSHUP    0x3802
  95. #define ALSHDOWN  0x3202
  96.  
  97. #define SHPGUP    0x4901
  98. #define SHPGDN    0x5101
  99.  
  100. #define CTRLLEFT  0x7300
  101. #define CTRLRIGHT 0x7400
  102.  
  103. #define CTRLHOME  0x7700
  104. #define CTRLEND   0x7500
  105. #define CTRLPGUP  0x8400
  106. #define CTRLPGDN  0x7600
  107.  
  108. #define ESC       0x001B
  109. #define TAB       0x0009
  110.  
  111. /* End of userint.h */
  112.  
  113. /* Depth-sorting control: */
  114. #define DEEPEST 0x0000          /* sort polys by deepest point */
  115. #define ATBACK  0x0001          /* push this object's poly's waaaay back */
  116. #define AVERAGE 0x0002          /* sort polys by average depth */
  117.  
  118. #define BYOBJECT   0x0100       /* sort by object */
  119. #define BYPOLY     0x0000       /* put polys in world before sort */
  120.  
  121. /* Values for object flags */
  122. #define OBJ_NONSEL       0x0800 /* can't be selected (i.e. pointer) */
  123. #define OBJ_INVIS        0x1000
  124. #define OBJ_HIGHLIGHTED  0x2000
  125. #define OBJLIST_HEADER   0x4000
  126. #define IS_VISOBJ        0x8000 /* required by renderer: it will set */
  127.  
  128.  
  129.