forked from KolibriOS/kolibrios
61 lines
1.1 KiB
PHP
61 lines
1.1 KiB
PHP
|
;include '../../../../../KOSfuncs.inc'
|
|||
|
|
|||
|
;x,y - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> FPS <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 1 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
time1 dd 0 ;int
|
|||
|
time2 dd 0 ;int
|
|||
|
fps1 dd 0 ;int
|
|||
|
timerend dd 0 ;int
|
|||
|
|
|||
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> FPS
|
|||
|
proc Fps uses ebx ecx edx esi, x:dword, y:dword
|
|||
|
locals
|
|||
|
tr dd ?
|
|||
|
endl
|
|||
|
|
|||
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mcall SF_SYSTEM_GET,SSF_TIME_COUNT
|
|||
|
mov [time1],eax
|
|||
|
|
|||
|
cmp dword[timerend],0
|
|||
|
jne @f
|
|||
|
mov eax,[time1]
|
|||
|
mov [time2],eax
|
|||
|
mov [timerend],eax
|
|||
|
@@:
|
|||
|
|
|||
|
mov eax,[time1]
|
|||
|
sub eax,[timerend]
|
|||
|
mov [tr],eax
|
|||
|
|
|||
|
mov eax,[time1]
|
|||
|
sub eax,[time2]
|
|||
|
cmp eax,100 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
jge .else
|
|||
|
inc dword[fps1] ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> fps
|
|||
|
jmp @f
|
|||
|
.else:
|
|||
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> fps
|
|||
|
mov ebx,[x]
|
|||
|
shl ebx,16
|
|||
|
add ebx,23
|
|||
|
mov ecx,[y]
|
|||
|
shl ecx,16
|
|||
|
add ecx,7
|
|||
|
mcall SF_DRAW_RECT,,,0x00555555
|
|||
|
mov edx,[x]
|
|||
|
shl edx,16
|
|||
|
add edx,[y]
|
|||
|
mcall SF_DRAW_NUMBER,4 shl 16,[fps1],,0xfafafa
|
|||
|
mov dword[fps1],0
|
|||
|
mov eax,[time1]
|
|||
|
mov [time2],eax
|
|||
|
@@:
|
|||
|
|
|||
|
mov eax,[time1]
|
|||
|
mov [timerend],eax
|
|||
|
mov eax,[tr]
|
|||
|
ret
|
|||
|
endp
|