CnC_Remastered_Collection

Command and Conquer: Red Alert
Log | Files | Refs | README | LICENSE

KEYFBUFF.INC (1532B)


      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 
      9 ; TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed 
     10 ; in the hope that it will be useful, but with permitted additional restrictions 
     11 ; under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT 
     12 ; distributed with this program. You should have received a copy of the 
     13 ; GNU General Public License along with permitted additional restrictions 
     14 ; with this program. If not, see [https://github.com/electronicarts/CnC_Remastered_Collection]>.
     15 
     16 
     17 
     18 ;**************************************************************
     19 ;
     20 ; Macro to fetch the header of the next line and jump to the appropriate routine
     21 ;
     22 next_line	macro
     23 
     24 		add	edi,[dest_adjust_width]		;add in dest modulo
     25 		dec	edx				;line counter
     26 		jz	real_out			;return
     27 		mov	ecx,[save_ecx]			;ecx is pixel count
     28 		mov	eax,[header_pointer]		;ptr to next header byte
     29 		mov	al,[eax]
     30 		inc	[header_pointer]
     31 		and	eax,BLIT_ALL			;Make sure we dont jump to some spurious address
     32 							; if the header is wrong then its better to draw with the wrong
     33 							; shape routine than to die
     34 		shl	eax,2
     35 		add	eax,[ShapeJumpTableAddress]	;get the address to jump to
     36 		jmp	[dword eax]			;do the jump
     37 
     38 		endm
     39