home *** CD-ROM | disk | FTP | other *** search
- PAGE 60,132
- TITLE fxVR.ASM -- PCX Effects
- SUBTTL Copyright (c) Genus Microprogramming, Inc. 1988-89
-
- ; fxVR.ASM ;
- ; Copyright (c) Genus Microprogramming, Inc. 1988-89 All Rights Reserved. ;
-
- ;****************************************************************************;
- ; ;
- ; This file contains procedures for taking a pcx virtual buffer and ;
- ; 'dripping' it on the display. ;
- ; ;
- ; Procedures: fxVirtualSand ;
- ; ;
- ; ;
- ; ;
- ; Microsoft ASM 5.x version. Programmer: Chris Howard 5/04/89 ;
- ; ;
- ;****************************************************************************;
-
- ; Include files
- INCLUDE ..\inc\pcxDefs.inc
- INCLUDE ..\inc\pcxMacs.inc
- INCLUDE ..\inc\pcxErrs.inc
-
- INCLUDE ..\inc\fxDefs.inc
- INCLUDE ..\inc\fxMacs.inc
- INCLUDE ..\inc\fxErrs.inc
-
- @SetModel
-
- @BegData
- @EndData
-
- @BegCode
-
- EXTRN pcxVirtualDisplay : FAR
- EXTRN fxEffectDelay : FAR
-
- PUBLIC fxVirtualDrip
-
- ;**********
-
- ;
- ; This is the Virtual Drip effect procedure, for the fxVirtualEffect
- ; interface. It is an INTERNAL routine only.
- ;
- ; On Entry: SS:BP points to pcxVirtualEffect frame
- ; ES:DI points to display structure
- ; DS:SI points to buffer
- ;
- ; On Exit: retcode contains error code, if any
- ;
-
- fxVirtualDrip PROC FAR
-
- mov ax,vedir ;What direction?
- cmp ax,fxUP ;Right and up
- jne fxVD_down
-
- jmp SHORT fxVD_up
-
- fxVD_down:
-
- mov si,0 ;Initialize loop counter
-
- fxVD_mainloop:
-
- mov di,si ;Init inner loop
-
- fxVD_loop:
-
- mov ax,vevseg ;vptr
- push ax
- mov ax,vevofs
- push ax
- xor ax,ax ;vx = 0
- push ax
- push si ;vy = loop
- mov ax,vex ;x = x
- push ax
- mov bx,vey ;y = y+loop
- add bx,di
- push bx
- mov ax,vex2 ;x2 = x2
- push ax
- push bx ;y2 = y+loop
- mov ax,vepage ;page = current
- push ax
-
- call pcxVirtualDisplay ;Display this part
-
- inc di ;Bump inner loop
- cmp di,vedepth ;Have we 'dripped' to the bottom?
- jl fxVD_loop ;If not, loop
-
- mov ax,vedelay ;Get the delay count
- push ax
-
- call fxEffectDelay ; and delay
-
- jnc fxVD_bump ;If no error, continue
- jmp SHORT fxVD_error
-
- fxVD_bump:
-
- inc si ;Bump main loop
- cmp si,vedepth ;Have we done all lines?
- jl fxVD_mainloop ;If not, loop
-
- @SetRet veret,fxSUCCESS ;Set the return code
- jmp SHORT fxVD_exit
-
- fxVD_up:
-
- mov si,vedepth ;Initialize loop counter
- dec si
-
- fxVD_upmainloop:
-
- mov di,si ;Init inner loop
-
- fxVD_uploop:
-
- mov ax,vevseg ;vptr
- push ax
- mov ax,vevofs
- push ax
- xor ax,ax ;vx = 0
- push ax
- push si ;vy = loop
- mov ax,vex ;x = x
- push ax
- mov bx,vey ;y = y+loop
- add bx,di
- push bx
- mov ax,vex2 ;x2 = x2
- push ax
- push bx ;y2 = y+loop
- mov ax,vepage ;page = current
- push ax
-
- call pcxVirtualDisplay ;Display this part
-
- dec di ;Bump inner loop
- cmp di,0 ;Have we 'dripped' to the top?
- jge fxVD_uploop ;If not, loop
-
- mov ax,vedelay ;Get the delay count
- push ax
-
- call fxEffectDelay ; and delay
-
- jnc fxVD_upbump ;If no error, continue
- jmp SHORT fxVD_error
-
- fxVD_upbump:
-
- dec si ;Bump main loop
- cmp si,0 ;Have we done all lines?
- jge fxVD_upmainloop ;If not, loop
-
- @SetRet veret,fxSUCCESS ;Set the return code
- jmp SHORT fxVD_exit
-
- fxVD_error:
-
- @SetRet veret,ax ;Set the error
-
- fxVD_exit:
-
- @Exit veret,veparm ;Return
-
- fxVirtualDrip ENDP
-
- @EndCode
-
- END
-