KEYSTRUC.INC 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. ;
  2. ; Command & Conquer Red Alert(tm)
  3. ; Copyright 2025 Electronic Arts Inc.
  4. ;
  5. ; This program is free software: you can redistribute it and/or modify
  6. ; it under the terms of the GNU General Public License as published by
  7. ; the Free Software Foundation, either version 3 of the License, or
  8. ; (at your option) any later version.
  9. ;
  10. ; This program is distributed in the hope that it will be useful,
  11. ; but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ; GNU General Public License for more details.
  14. ;
  15. ; You should have received a copy of the GNU General Public License
  16. ; along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. ;
  18. ;***************************************************************************
  19. ;** C O N F I D E N T I A L --- W E S T W O O D A S S O C I A T E S **
  20. ;***************************************************************************
  21. ;* *
  22. ;* Project Name : Westwood 32 bit Library *
  23. ;* *
  24. ;* File Name : KEYSTRUC.INC *
  25. ;* *
  26. ;* Programmer : Phil W. Gorrow *
  27. ;* *
  28. ;* Start Date : July 13, 1994 *
  29. ;* *
  30. ;* Last Update : July 13, 1994 [PWG] *
  31. ;* *
  32. ;*-------------------------------------------------------------------------*
  33. ;* Functions: *
  34. ;* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  35. STRUC KeyboardType
  36. SoundOn DW ? ; toggled by alt S
  37. MusicOn DW ? ; toggled by alt M
  38. KeyFlags DD ? ; all but repeat for now
  39. Break DW ?
  40. KeyMouseMove DB 6 DUP(?)
  41. ScreenEdge DW 18 DUP (?)
  42. Bits DB 8 DUP (?)
  43. CondPassKey DW 17 DUP (?)
  44. CondPassCond DW 17 DUP (?)
  45. EscRoutine DD ?
  46. ExtCodes DB 16 DUP (?)
  47. ExtNums DB 16 DUP (?)
  48. ExtRemap DB 16 DUP (?)
  49. ExtRemapEnd DB ?
  50. ExtKeyboard DB ?
  51. KeyBuffer DW 128 DUP(?) ; set to empty
  52. KeyBufferHead DD ? ; set to first entry
  53. KeyBufferTail DD ? ; set to head for empty buffer
  54. KeyLock DW ? ; num and caps lock bits
  55. KeyNums DB 89 DUP (?)
  56. KeysCapsLock DB 16 DUP (?)
  57. KeysNumLock DB 16 DUP (?)
  58. KeysUpDown DB 16 DUP (?)
  59. KeyStream DB 16 DUP (?)
  60. PassCount DW ?
  61. KeyStreamIndex DW ?
  62. LastKeyE0 DB ?
  63. LastKeyE1 DB ?
  64. PassAlways DB 10 DUP (?)
  65. PassAlwaysEnd DB ? ; invalid code to END PassAlways
  66. CtrlFlags DB ?
  67. Buffer DW ?
  68. Time DW ?
  69. XYAdjust DB 26 DUP (?)
  70. EdgeConv DW 16 DUP (?)
  71. MouseUpdate DW ?
  72. MouseX DD ?
  73. LocalMouseX DW ?
  74. MouseY DD ?
  75. LocalMouseY DW ?
  76. IsExtKey DB ?
  77. ExtIndex DW ?
  78. KeyOldRMI DD ? ; The origianl RM interrupt seg:off.
  79. KeyOldPMIOffset DD ? ; The origianl PM interrupt offset
  80. KeyOldPMISelector DD ? ; The original PM interrupt segment.
  81. KeyCodeOffset DW ? ; Offset of the code in the RM stuff.
  82. CallKeyRMIntOffset DW ? ; Offset of function to call DOS timer interrupt.
  83. CallKeyRMIntAddr DD ? ; PM address of CallRealIntOffset for speed.
  84. PMIssuedKeyInt DD ? ; did Protected mode pass this through?
  85. BrkOldRMI DD ? ; The origianl RM interrupt seg:off.
  86. BrkOldPMIOffset DD ? ; The origianl PM interrupt offset
  87. BrkOldPMISelector DD ? ; The original PM interrupt segment.
  88. BrkCodeOffset DW ? ; Offset of the code in the RM stuff.
  89. CallBrkRMIntOffset DW ? ; Offset of function to call DOS timer interrupt.
  90. CallBrkRMIntAddr DD ? ; PM address of CallRealIntOffset for speed.
  91. PMIssuedBrkInt DD ? ; did Protected mode pass this through?
  92. KeyIntDisabled DD ?
  93. DbgOldPMIOffset DD ? ; The origianl PM interrupt offset
  94. DbgOldPMISelector DD ? ; The original PM interrupt segment.
  95. ;---------------------------------------------------------------------------
  96. ; Begin definition of Mouse Specific Variables for real mode
  97. ;---------------------------------------------------------------------------
  98. Button DB ? ; current value of the mouse button
  99. MDisabled DB ? ; Is the mouse driver disabled
  100. MInput DB ? ; Defaults to mouse input allowed.
  101. Adjust DW ? ; flag to adjust coordinates if necessary
  102. MouseStepX DW ? ; step values if the mouse moves at
  103. MouseStepY DW ? ; more than one pixel at a time
  104. MouseOffsetX DW ? ; Fractional step values used if a mouse
  105. MouseOffsetY DW ? ; moves at less than one pixel at a time
  106. MState DD ? ; Tracks if mouse is hidden (TRUE) or not (FALSE)
  107. MouseXOld DW ? ; Holds last MouseX and MouseY to determine if
  108. MouseYOld DW ? ; mouse needs to be redrawn
  109. MCState DW ? ; Tracks if mouse conditional hidden (TRUE) or not
  110. MouseCXLeft DD ? ; Conditional hide mouse left x position
  111. MouseCYUpper DD ? ; Conditional hide mouse top y position
  112. MouseCXRight DD ? ; Conditional hide mouse right x position
  113. MouseCYLower DD ? ; Conditional hide mouse lower y position
  114. MouseCursor DD ? ; Pointer to the mouse cursor to draw
  115. MouseCursorSize DW ? ; Size of mouse cursor draw area
  116. MouseBuffer DD ? ; Pointer to buffer mouse is saved in
  117. MouseXHot DD ? ; Offset to mouse's x hot spot
  118. MouseYHot DD ? ; Offset to mouse's y hot spot
  119. MouseBuffX DD ? ; X position background was saved at
  120. MouseBuffY DD ? ; Y position background was saved at
  121. MouseBuffW DD ? ; Width of the region saved for mouse
  122. MouseBuffH DD ? ; Height of the region saved for mouse
  123. MouseWidth DD ? ; Mouse cursor theoretical width
  124. MouseHeight DD ? ; Mouse cursor theoretical height
  125. MouseCodeOffset DW ? ; Offset to the real mode code offset
  126. MouseRight DD ? ; Right hand side of the screen
  127. MouseBottom DD ? ; Bottom of the screen
  128. ShadowPtr dw ?
  129. DrawMousePtr dw ?
  130. VGAMouseDraw dw ?
  131. VGAMouseShadow dw ?
  132. VESAMouseDraw dw ?
  133. VESAMouseShadow dw ?
  134. VesaPtr dd ?
  135. VesaBankTable DD 8 dup (?)
  136. Adjust_XPos dd ?
  137. Adjust_YPos dd ?
  138. ENDS
  139. ; InitFlags that are set to have a fully functional interrupt.
  140. IF_ALLOC_RM equ 1 ; Allocation of RM was successful.
  141. IF_SET_VECTORS equ 2 ; Vectors have been set.
  142. IF_LOCKED_PM_CODE equ 4 ; Locked PM code for DPMI.
  143. IF_LOCKED_PM_DATA equ 8 ; Locked PM code for DPMI.
  144. IF_RATE_CHANGE equ 10 ; Timer rate was changed.
  145. IF_FUNCTIONAL equ 20 ; Timer is in and functional.
  146. IF_LOCKED_RM_CODE equ 40