home *** CD-ROM | disk | FTP | other *** search
- DRAW: PUSH CS
- POP ES
- PUSH @DATA
- POP DS
- MOV AX,CS:TEXTBUFF
- MOV GS,AX
- MOV AX,ViSFACES
- MOV N,AX
- MOV Si,OFFSET ORDER
- NEXTFACE:
- LODSW
- ADD Si,2
- PUSH Si
- MOV Si,AX
- MOV Di,OFFSET CS:POiNTBUF
- MOV BP,0
- DiSP: MOV CX,0
- NEXTVERTiCE:
- iNC CX
- LODSW
- MOV BX,AX
- SHL BX,2
- PUSH AX
- MOV AX,C_COORD[BX+2]
- MOV DX,AX
- MOV AX,C_COORD[BX+4]
- STOSW
- MOV AX,DX
- STOSW
- POP AX
- SHL AX,1
- PUSH AX
- ADD BX,AX
- MOV DX,Si
- LEA Si,O_COORDS
- LODSW
- MOV Si,AX
- MOV AX,[BX+Si+2]
- MOVSX EAX,AX
- FR: NOP
- NOP
- NOP
- NOP
- ADD AX,100
- SHL BP,1
- MOV DS:TEXTiBUF[BP],AX
- MOV AX,[BX+Si+6]
- MOVSX EAX,AX
- SC: NOP
- NOP
- NOP
- NOP
- ADD AX,100
- MOV DS:TEXTiBUF[BP+2],AX
- MOV Si,DX
- POP AX
- SUB BX,AX
- SHR BP,1
- MOV AX,BX
- SHR AX,1
- ADD AX,BX
- MOV DX,BX
- MOV BX,AX
- MOVSX EAX,R_COORD[BX+6]
- SHR EAX,2
- CMP AX,-16
- JNL JO1
- MOV AX,-16
- JO1: CMP AX,16
- JNG JO2
- MOV AX,16
- JO2: MOV DS:GOURBUF[BP],AX
- iNC BP
- iNC BP
- CMP WORD PTR DS:[Si],EOF
- JNE NEXTVERTiCE
- MOV AX,N
- PUSHA
- PUSH ES
- MOV BX,SCRPOiNTER
- MOV ES,BX
- PUSH CX
- CMP TEX,1
- JNE NOTEXTURE
- CALL TEXTURE
- JMP TEXTURERULE
- NOTEXTURE:
- POP CX
- CMP CS:GOU,1
- JNE OKAD
- MOV DWORD PTR CS:HORiZCiK_GOUR,0909090AAH
- CALL GOURAUD
- JMP OKAD
- TEXTURERULE:
- POP CX
- CMP CS:GOU,1
- JNE OKAD
- MOV DWORD PTR CS:HORiZCiK_GOUR,47052826H
- CALL GOURAUD
- OKAD: POP ES
- POPA
- ADD Si,2
- NOTTODiSP:
- POP Si
- DEC N
- JNZ NEXTFACE
- RET
- DRAW2: PUSH CS
- POP ES
- PUSH @DATA
- POP DS
- MOV AX,CS:TEXTBUFF
- MOV GS,AX
- MOV AX,ViSFACES
- MOV N,AX
- MOV Si,OFFSET ORDER
- NEXTFACE2:
- LODSW
- ADD Si,2
- PUSH Si
- MOV Si,AX
- MOV Di,OFFSET CS:POiNTBUF
- MOV BP,0;OFFSET CS:GOURBUF
- DiSP22: MOV CX,0
- NEXTVERTiCE2:
- iNC CX
- LODSW
- MOV BX,AX
- SHL BX,2
- PUSH AX
- MOV AX,C_COORD[BX+2]
- MOV DX,AX
- MOV AX,C_COORD[BX+4]
- STOSW
- MOV AX,DX
- STOSW
- POP AX
- SHL AX,1
- PUSH AX
- ADD BX,AX
- MOV DX,Si
- LEA Si,O_COORDS
- LODSW
- MOV Si,AX
- MOV AX,[BX+Si+2]
- MOVSX EAX,AX
- FR2: NOP
- NOP
- NOP
- NOP
- ADD AX,100
- SHL BP,1
- MOV DS:TEXTiBUF[BP],AX
- MOV AX,[BX+Si+6]
- MOVSX EAX,AX
- SC2: NOP
- NOP
- NOP
- NOP
- ADD AX,100
- MOV DS:TEXTiBUF[BP+2],AX
- MOV Si,DX
- POP AX
- SUB BX,AX
- SHR BP,1
- MOV AX,BX
- SHR AX,1
- ADD AX,BX
- MOV DX,BX
- MOV BX,AX
- MOVSX EAX,R_COORD[BX+6]
- SHR EAX,4
- NEG AX
- ADD AX,56
- MOV DS:GOURBUF[BP],AX
- iNC BP
- iNC BP
- CMP WORD PTR DS:[Si],EOF
- JNE NEXTVERTiCE2
- MOV AX,N
- PUSHA
- PUSH ES
- MOV BX,SCRPOiNTER
- MOV ES,BX
- PUSH CX
- CMP TEX,1
- JNE NOTEXTURE2
- CALL TEXTURE
- JMP TEXTURERULE2
- NOTEXTURE2:
- POP CX
- CMP CS:GOU,1
- JNE OKAD2
- MOV DWORD PTR CS:HORiZCiK_GOUR,0909090AAH
- CALL GOURAUD
- JMP OKAD2
- TEXTURERULE2:
- POP CX
- CMP CS:GOU,1
- JNE OKAD2
- MOV DWORD PTR CS:HORiZCiK_GOUR,47052826H
- CALL GOURAUD
- OKAD2: POP ES
- POPA
- ADD Si,2
- NOTTODiSP2:
- POP Si
- DEC N
- JNZ NEXTFACE2
- RET
-