Files
ace-dent 398dcbb13d programs/demos: Post-SVN tidy (part 2) (#412)
- Move source code from `trunk` into root directory for each program.
- Update build files and ASM include paths. Add SPDX license header where appropriate.
- Note: Line endings standardised from `CRLF` > `LF`, so best to view diffs with whitespace changes hidden.

(Work towards #75, point 3)

Reviewed-on: KolibriOS/kolibrios#412
Reviewed-by: Ivan B <dunkaist@gmail.com>
Reviewed-by: Mikhail Frolov <mixa.frolov2003@gmail.com>
Co-authored-by: Andrew <dent.ace@gmail.com>
Co-committed-by: Andrew <dent.ace@gmail.com>
2026-04-10 07:12:30 +00:00

48 lines
1.0 KiB
C++

#include<menuet/os.h>
#include "SysCall.h"
/*******************************************************************************
╘╙═╩╓╚▀ ╬╧╨┼─┼╦┼═╚▀ FPS
x,y - ъююЁфшэрЄ√ т√тюфр FPS эр юъэю
тючтЁр∙рхЄ тЁхь  т ёюЄ√ї фюы ї ёхъєэф√ чрЄЁрўштрхьюх эр 1 Ўшъы
*/
int time1=0;
int time2=0;
int fps1=0;
int timerend=0;
int Fps (long x, long y)//ЇєэъЎш  юяЁхфхыхэш  FPS
{
int tr;
time1 = SysCall(26,9);//юяЁхфхы хь тЁхь  яЁю°хф°хх ьюьхэЄр чряєёър ёшёЄхь√
if (timerend==0)
{
time2=time1;
timerend=time1;
}
tr = time1 - timerend;
if ((time1 - time2) < 100)//хёыш яЁю°ыю ьхэхх 1 ёхъєэф√
{ //єтхышўштрхь ёўхЄўшъ fps
fps1++;
}
else
{
//т√тюфшь ўшёыю fps
SysCall(13,(x<<16)+23,(y<<16)+7,0x00555555); //═└╨╚╤╬┬└╥▄ ╧╬╦╬╤╙
SysCall(47,4<<16,fps1,(x<<16)+y,0xfafafa);//┬█┬┼╤╥╚ ┬ ╬╩═╬ ╧╨╚╦╬╞┼═╚▀ ╫╚╤╦╬
fps1=0;
time2=time1;
}
timerend=time1;
return tr;
}
//******************************************************************************