tinygl: add some double functions, add bcc32 example

libimg: small optimize

git-svn-id: svn://kolibrios.org@8408 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
IgorA
2020-12-14 16:48:32 +00:00
parent eac740c648
commit 9a54fc6aed
24 changed files with 1438 additions and 468 deletions

View File

@@ -10,12 +10,40 @@ glVertex4f: ;x, y, z, w
pop eax
ret 20 ;=sizeof(dd)*5
align 4
proc glVertex4d, x:qword, y:qword, z:qword, w:qword
add esp,-16
fld qword[w]
fstp dword[esp+12]
fld qword[z]
fstp dword[esp+8]
fld qword[y]
fstp dword[esp+4]
fld qword[x]
fstp dword[esp]
call glVertex4f
ret
endp
align 4
proc glVertex2f, x:dword, y:dword
stdcall glVertex4f,[x],[y],0.0,1.0
ret
endp
align 4
proc glVertex2d, x:qword, y:qword
push 1.0
push 0.0
add esp,-8
fld qword[y]
fstp dword[esp+4]
fld qword[x]
fstp dword[esp]
call glVertex4f
ret
endp
align 4
proc glVertex2fv uses eax, v:dword
mov eax,[v]
@@ -23,12 +51,40 @@ proc glVertex2fv uses eax, v:dword
ret
endp
align 4
proc glVertex2dv uses eax, v:dword
mov eax,[v]
push 1.0
push 0.0
add esp,-8
fld qword[eax+8]
fstp dword[esp+4]
fld qword[eax]
fstp dword[esp]
call glVertex4f
ret
endp
align 4
proc glVertex3f, x:dword, y:dword, z:dword
stdcall glVertex4f,[x],[y],[z],1.0
ret
endp
align 4
proc glVertex3d, x:qword, y:qword, z:qword
push 1.0
add esp,-12
fld qword[z]
fstp dword[esp+8]
fld qword[y]
fstp dword[esp+4]
fld qword[x]
fstp dword[esp]
call glVertex4f
ret
endp
align 4
proc glVertex3fv uses eax, v:dword
mov eax,[v]
@@ -36,6 +92,21 @@ proc glVertex3fv uses eax, v:dword
ret
endp
align 4
proc glVertex3dv uses eax, v:dword
mov eax,[v]
push 1.0
add esp,-12
fld qword[eax+16]
fstp dword[esp+8]
fld qword[eax+8]
fstp dword[esp+4]
fld qword[eax]
fstp dword[esp]
call glVertex4f
ret
endp
align 4
proc glVertex4fv uses eax, v:dword
mov eax,[v]
@@ -43,6 +114,22 @@ proc glVertex4fv uses eax, v:dword
ret
endp
align 4
proc glVertex4dv uses eax, v:dword
mov eax,[v]
add esp,-16
fld qword[eax+24]
fstp dword[esp+12]
fld qword[eax+16]
fstp dword[esp+8]
fld qword[eax+8]
fstp dword[esp+4]
fld qword[eax]
fstp dword[esp]
call glVertex4f
ret
endp
; glNormal
align 4