More C4 fixes (DOWN LOAD, MALU, and more)

This commit is contained in:
n-a-c-h
2003-06-08 23:47:42 +00:00
parent d0c386e4ad
commit d2a55a7c67

View File

@@ -2030,6 +2030,21 @@ C4activate:
add ecx,[C4Ram] add ecx,[C4Ram]
mov [ecx],al mov [ecx],al
sub ecx,[C4Ram] sub ecx,[C4Ram]
cmp ecx,1F4Fh
jne .noc4test
push esi
mov esi,[C4Ram]
cmp byte[esi+1F4Dh],0Eh
jne .befnoc4test
test al,0C3h
jnz .befnoc4test
shr al,2
mov [esi+1F80h],al
pop esi
ret
.befnoc4test
pop esi
.noc4test
cmp al,00h cmp al,00h
je near .dosprites je near .dosprites
cmp al,01h cmp al,01h
@@ -2194,7 +2209,7 @@ C4activate:
popad popad
ret ret
.polarcord2 .polarcord2
pushad pushad
mov esi,[C4Ram] mov esi,[C4Ram]
xor ecx,ecx xor ecx,ecx
mov cx,[esi+1F80h] mov cx,[esi+1F80h]
@@ -2205,9 +2220,7 @@ pushad
imul ebx,eax imul ebx,eax
sar ebx,8 sar ebx,8
adc ebx,0 adc ebx,0
mov [esi+1F86h],bx mov [esi+1F86h],ebx
sar ebx,16
mov [esi+1F88h],bl
movsx ebx,word[SinTable+ecx*2] movsx ebx,word[SinTable+ecx*2]
imul ebx,eax imul ebx,eax
sar ebx,8 sar ebx,8
@@ -2315,12 +2328,7 @@ pushad
mov ebx,[esi+1F83h] mov ebx,[esi+1F83h]
and ebx,0FFFFFFh and ebx,0FFFFFFh
imul eax,ebx imul eax,ebx
mov [esi+1F80h],ax mov [esi+1F80h],eax
sar eax,16
mov [esi+1F82h],al
;imul ebx
;mov [esi+1F80h],eax
;mov [esi+1F84h],dx
popad popad
ret ret
.sum .sum
@@ -2329,6 +2337,14 @@ pushad
ret ret
.square .square
pushad pushad
xor edx,edx
mov esi,[C4Ram]
mov eax,[esi+1F80h]
shl eax,8
sar eax,8
imul eax
mov [esi+1F83h],eax
mov [esi+1F87h],dx
popad popad
ret ret
.equatevelocity .equatevelocity