Some optimisation.
This commit is contained in:
@@ -425,76 +425,6 @@ BackAreaFillCol dd 0
|
|||||||
clinemainsub dd 0
|
clinemainsub dd 0
|
||||||
|
|
||||||
BackAreaFill:
|
BackAreaFill:
|
||||||
cmp byte[winbg1enval+eax+5*256],0
|
|
||||||
je near .nowindowb
|
|
||||||
mov ebx,[BackAreaFillCol]
|
|
||||||
cmp ebx,[BackAreaUnFillCol]
|
|
||||||
je near .nowindowb
|
|
||||||
push ecx
|
|
||||||
push edx
|
|
||||||
push eax
|
|
||||||
push edi
|
|
||||||
|
|
||||||
mov ebx,eax
|
|
||||||
mov ecx,[vidbuffer]
|
|
||||||
add ecx,16*2
|
|
||||||
shl eax,9
|
|
||||||
add ecx,eax
|
|
||||||
mov eax,ebx
|
|
||||||
shl eax,6
|
|
||||||
add ecx,eax
|
|
||||||
add ecx,[BackAreaAdd]
|
|
||||||
|
|
||||||
; Construct Window in ecx
|
|
||||||
mov edi,ngwintable
|
|
||||||
sub ecx,2
|
|
||||||
mov eax,256
|
|
||||||
.procnotemptyb
|
|
||||||
mov edx,[edi]
|
|
||||||
add edi,4
|
|
||||||
or edx,edx
|
|
||||||
jz .procemptyb
|
|
||||||
dec edx
|
|
||||||
mov ebx,[BackAreaUnFillCol]
|
|
||||||
.swloopb
|
|
||||||
mov dword[ecx],ebx
|
|
||||||
mov dword[ecx+4],ebx
|
|
||||||
add ecx,8
|
|
||||||
sub eax,4
|
|
||||||
jc .doneb
|
|
||||||
sub edx,4
|
|
||||||
jnc .swloopb
|
|
||||||
sub eax,edx
|
|
||||||
add ecx,edx
|
|
||||||
add ecx,edx
|
|
||||||
dec eax
|
|
||||||
add ecx,2
|
|
||||||
.procemptyb
|
|
||||||
mov edx,[edi]
|
|
||||||
dec edx
|
|
||||||
add edi,4
|
|
||||||
mov ebx,[BackAreaFillCol]
|
|
||||||
.swloop2b
|
|
||||||
mov dword[ecx],ebx
|
|
||||||
mov dword[ecx+4],ebx
|
|
||||||
add ecx,8
|
|
||||||
sub eax,4
|
|
||||||
jc .doneb
|
|
||||||
sub edx,4
|
|
||||||
jnc .swloop2b
|
|
||||||
sub eax,edx
|
|
||||||
add ecx,edx
|
|
||||||
add ecx,edx
|
|
||||||
dec eax
|
|
||||||
add ecx,2
|
|
||||||
jmp .procnotemptyb
|
|
||||||
.doneb
|
|
||||||
pop edi
|
|
||||||
pop eax
|
|
||||||
pop edx
|
|
||||||
pop ecx
|
|
||||||
jmp .yeswindowb
|
|
||||||
.nowindowb
|
|
||||||
push eax
|
push eax
|
||||||
push ecx
|
push ecx
|
||||||
mov ebx,eax
|
mov ebx,eax
|
||||||
@@ -507,7 +437,7 @@ BackAreaFill:
|
|||||||
shl eax,6
|
shl eax,6
|
||||||
add ecx,eax
|
add ecx,eax
|
||||||
add ecx,[BackAreaAdd]
|
add ecx,[BackAreaAdd]
|
||||||
mov ebx,[BackAreaUnFillCol]
|
mov ebx,[BackAreaFillCol]
|
||||||
mov eax,128
|
mov eax,128
|
||||||
.nowinloop
|
.nowinloop
|
||||||
mov [ecx],ebx
|
mov [ecx],ebx
|
||||||
@@ -1106,49 +1036,24 @@ NEWSYM newengine16b
|
|||||||
mov dword[ngwinen],0
|
mov dword[ngwinen],0
|
||||||
push ecx
|
push ecx
|
||||||
push edx
|
push edx
|
||||||
cmp byte[winbg1enval+eax+5*256],0
|
; cmp byte[winbg1enval+eax+5*256],0
|
||||||
je .nowindowb
|
; je .nowindowb
|
||||||
mov bl,[winlogicb]
|
; mov bl,[winlogicb]
|
||||||
shr bl,2
|
; shr bl,2
|
||||||
and bl,03h
|
; and bl,03h
|
||||||
mov [nglogicval],bl
|
; mov [nglogicval],bl
|
||||||
mov ebx,5*256
|
; mov ebx,5*256
|
||||||
add ebx,eax
|
; add ebx,eax
|
||||||
call BuildWindow2
|
; call BuildWindow2
|
||||||
.nowindowb
|
.nowindowb
|
||||||
mov dword[BackAreaAdd],0
|
mov dword[BackAreaAdd],0
|
||||||
|
|
||||||
cmp byte[clinemainsub],1
|
cmp byte[clinemainsub],1
|
||||||
jne near .domainscreen
|
jne near .domainscreen
|
||||||
mov ebx,[ColResult]
|
mov ebx,[ColResult]
|
||||||
or ebx,[UnusedBit]
|
|
||||||
mov edx,[UnusedBit]
|
|
||||||
mov cl,[scaddset]
|
|
||||||
.filledscreen
|
.filledscreen
|
||||||
; get sub-screen colors
|
|
||||||
test cl,10h
|
|
||||||
jnz .inside
|
|
||||||
test cl,20h
|
|
||||||
jnz .outside
|
|
||||||
.insideb
|
|
||||||
mov dword[BackAreaUnFillCol],ebx
|
|
||||||
mov dword[BackAreaFillCol],ebx
|
mov dword[BackAreaFillCol],ebx
|
||||||
jmp .donesubscreen
|
jmp .donesubscreen
|
||||||
.inside
|
|
||||||
test cl,20h
|
|
||||||
jnz .filled
|
|
||||||
mov dword[BackAreaUnFillCol],edx
|
|
||||||
mov [BackAreaFillCol],ebx
|
|
||||||
jmp .donesubscreen
|
|
||||||
.outside
|
|
||||||
mov [BackAreaUnFillCol],ebx
|
|
||||||
mov dword[BackAreaFillCol],edx
|
|
||||||
jmp .donesubscreen
|
|
||||||
.filled
|
|
||||||
xor ebx,ebx
|
|
||||||
mov [BackAreaUnFillCol],edx
|
|
||||||
mov [BackAreaFillCol],edx
|
|
||||||
jmp .donesubscreen
|
|
||||||
.domainscreen
|
.domainscreen
|
||||||
mov ebx,[vbufdptr]
|
mov ebx,[vbufdptr]
|
||||||
add ebx,dword[cpalptrng]
|
add ebx,dword[cpalptrng]
|
||||||
@@ -1162,60 +1067,20 @@ NEWSYM newengine16b
|
|||||||
test byte[scaddtype],20h
|
test byte[scaddtype],20h
|
||||||
jz .notaddbackub
|
jz .notaddbackub
|
||||||
or ebx,[UnusedBit]
|
or ebx,[UnusedBit]
|
||||||
mov edx,[UnusedBit]
|
|
||||||
.notaddbackub
|
.notaddbackub
|
||||||
jmp .filledscreen
|
mov dword[BackAreaFillCol],ebx
|
||||||
.donesubscreen
|
.donesubscreen
|
||||||
cmp dword[ngwinen],0
|
|
||||||
jne .nowinsc2
|
|
||||||
mov edx,[BackAreaUnFillCol]
|
|
||||||
mov [BackAreaFillCol],edx
|
|
||||||
.nowinsc2
|
|
||||||
cmp byte[forceblnk],0
|
|
||||||
je .notforceblanked
|
|
||||||
mov dword[BackAreaUnFillCol],0
|
|
||||||
mov dword[BackAreaFillCol],0
|
|
||||||
.notforceblanked
|
|
||||||
call BackAreaFill
|
call BackAreaFill
|
||||||
|
|
||||||
test byte[FillSubScr+eax],1
|
test byte[FillSubScr+eax],1
|
||||||
jz near .nosubscreen2
|
jz near .nosubscreen2
|
||||||
mov dword[BackAreaAdd],75036*2
|
mov dword[BackAreaAdd],75036*2
|
||||||
mov ebx,[ColResult]
|
mov ebx,[ColResult]
|
||||||
mov edx,[UnusedBit]
|
|
||||||
test byte[scaddset],02h
|
test byte[scaddset],02h
|
||||||
jz .notbackfixed
|
jz .notbackfixed
|
||||||
or ebx,[UnusedBit]
|
or ebx,[UnusedBit]
|
||||||
.notbackfixed
|
.notbackfixed
|
||||||
mov cl,[scaddset]
|
|
||||||
; get sub-screen colors
|
|
||||||
test cl,10h
|
|
||||||
jnz .inside2
|
|
||||||
test cl,20h
|
|
||||||
jnz .outside2
|
|
||||||
.inside2b
|
|
||||||
mov dword[BackAreaUnFillCol],ebx
|
|
||||||
mov dword[BackAreaFillCol],ebx
|
mov dword[BackAreaFillCol],ebx
|
||||||
jmp .donesubscreen2
|
|
||||||
.inside2
|
|
||||||
test cl,20h
|
|
||||||
jnz .filled2
|
|
||||||
mov dword[BackAreaUnFillCol],edx
|
|
||||||
mov [BackAreaFillCol],ebx
|
|
||||||
jmp .donesubscreen2
|
|
||||||
.outside2
|
|
||||||
mov [BackAreaUnFillCol],ebx
|
|
||||||
mov dword[BackAreaFillCol],edx
|
|
||||||
jmp .donesubscreen2
|
|
||||||
.filled2
|
|
||||||
xor ebx,ebx
|
|
||||||
mov [BackAreaUnFillCol],edx
|
|
||||||
mov [BackAreaFillCol],edx
|
|
||||||
.donesubscreen2
|
|
||||||
cmp dword[ngwinen],0
|
|
||||||
jne .nowinsc
|
|
||||||
mov edx,[BackAreaUnFillCol]
|
|
||||||
mov [BackAreaFillCol],edx
|
|
||||||
.nowinsc
|
|
||||||
call BackAreaFill
|
call BackAreaFill
|
||||||
.nosubscreen2
|
.nosubscreen2
|
||||||
pop edx
|
pop edx
|
||||||
@@ -3527,6 +3392,7 @@ SubScreenClip:
|
|||||||
cmp al,0C0h
|
cmp al,0C0h
|
||||||
jne .notentire
|
jne .notentire
|
||||||
mov ebx,[UnusedBit]
|
mov ebx,[UnusedBit]
|
||||||
|
xor ebx,0FFFFFFFFh
|
||||||
mov ecx,256
|
mov ecx,256
|
||||||
mov edx,256
|
mov edx,256
|
||||||
jmp .startclipping
|
jmp .startclipping
|
||||||
@@ -3550,6 +3416,7 @@ SubScreenClip:
|
|||||||
.nowindowing
|
.nowindowing
|
||||||
|
|
||||||
mov ebx,[UnusedBit]
|
mov ebx,[UnusedBit]
|
||||||
|
xor ebx,0FFFFFFFFh
|
||||||
mov edx,256
|
mov edx,256
|
||||||
cmp dword[ngwinen],0
|
cmp dword[ngwinen],0
|
||||||
jne .windowenabled
|
jne .windowenabled
|
||||||
@@ -3579,7 +3446,7 @@ SubScreenClip:
|
|||||||
jmp .startclipping
|
jmp .startclipping
|
||||||
|
|
||||||
.startclipping
|
.startclipping
|
||||||
mov word[esi+75036*2],bx
|
and word[esi],bx
|
||||||
add esi,2
|
add esi,2
|
||||||
dec edx
|
dec edx
|
||||||
jz .finclipping
|
jz .finclipping
|
||||||
|
|||||||
Reference in New Issue
Block a user