KEYSTRUC.INC 6.7 KB

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