SHAPE.ASM 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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 S T U D I O S **
  20. ;***************************************************************************
  21. ;* *
  22. ;* Project Name : WWLIB32 *
  23. ;* *
  24. ;* File Name : SHAPE.ASM *
  25. ;* *
  26. ;* Programmer : Phil W. Gorrow *
  27. ;* *
  28. ;* Start Date : April 13, 1992 *
  29. ;* *
  30. ;* Last Update : September 14, 1994 [IML] *
  31. ;* *
  32. ;*-------------------------------------------------------------------------*
  33. ;* Functions: *
  34. ;* Draw_Shape -- Draws a shape at given buffer coordinates and clips *
  35. ;* Not_Supported -- Replacement function for Draw_Shape routines not used*
  36. ;* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
  37. ;********************* Model & Processor Directives ************************
  38. IDEAL
  39. P386
  40. MODEL USE32 FLAT
  41. INCLUDE "shape.inc"
  42. global C ShapeBuffer :dword
  43. global C ShapeBufferSize :dword
  44. global C _ShapeBuffer :dword
  45. global C _ShapeBufferSize :dword
  46. global C Set_Shape_Buffer :near
  47. DATASEG
  48. label ShapeBuffer dword
  49. _ShapeBuffer dd 0
  50. label ShapeBufferSize dword
  51. _ShapeBufferSize dd 0
  52. CODESEG
  53. ;***************************************************************************
  54. ;* SET_SHAPE_BUFFER -- Sets the shape buffer to the given pointer *
  55. ;* *
  56. ;* This routine will set the shape buffer to the given value and make sure *
  57. ;* that the system does not try to compress any shapes that will be larger *
  58. ;* than the shape buffer. *
  59. ;* *
  60. ;* INPUT: void * - pointer to the shape buffer *
  61. ;* int - size of the buffer which has been passed in *
  62. ;* *
  63. ;* OUTPUT: none *
  64. ;* *
  65. ;* PROTO: VOID *Set_Shape_Bufer(void *buffer, int size); *
  66. ;* *
  67. ;* HISTORY: *
  68. ;* 10/26/1994 PWG : Created. *
  69. ;*=========================================================================*
  70. GLOBAL C Set_Shape_Buffer:NEAR
  71. PROC Set_Shape_Buffer C near
  72. USES eax
  73. ARG buff:DWORD
  74. ARG size:DWORD
  75. mov eax,[size]
  76. mov [_ShapeBufferSize],eax
  77. mov eax,[buff]
  78. mov [_ShapeBuffer],eax
  79. ret
  80. ENDP Set_Shape_Buffer
  81. END