dev.gamez.lv Forum Index dev.gamez.lv
Latvian Game Developers Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 

frame rate
Goto page Previous  1, 2
 
dev.gamez.lv Forum Index -> Programmēšana
View previous topic :: View next topic  
Author Message
S1
Indago dalībnieks
Indago dalībnieks


Joined: 31 Jul 2005
Posts: 219
Location: Jelgava

PostPosted: Thu Aug 25, 2005 9:35 am    Post subject:

es atradu šādu lietu
procedure TForm1.ApplicationEvents1Idle(Sender: TObject;var Done: Boolean);
Iebāzu tajā kodu, nestrādā. Lai paliek tas idle.
Mana galvenā problēma - laika uzņemšana iekš taimera procedūras. Ja kas, es taimeri uzliku uz 0, un tas tagad skrien uz max. Kautkas līdzīgs, kā idle.
Back to top
View user's profile Send e-mail
S1
Indago dalībnieks
Indago dalībnieks


Joined: 31 Jul 2005
Posts: 219
Location: Jelgava

PostPosted: Thu Aug 25, 2005 9:59 am    Post subject:

Ja jau es varu aprēķināt FPS, tad jau Laughing ir iespējams noteikt cik ātri izpildās galvenais cikls, vienkārši: frameTime := 1000/rezFPS; Tad sanāk, ja ir 710 fps, tad 1 kadrs(cikls) izpildās ~1.4ms. Vai man ir taisnība? Varbūt es te kautko murgoju Shocked
Back to top
View user's profile Send e-mail
binary
Guest





PostPosted: Mon Jan 09, 2006 12:47 pm    Post subject:

bubu wrote:
Fukcijas izsaukums jau pierakstās šādi: getTickCount(), vismaz paskālā. Bet mainīgā ierakstīšana/nolasīšana: getTickCount.

Pievērs uzmanību iekavām.


Tā gluži nav. Paskālim (vismaz delphu ietvaros) ir pofig - liec iekavas vai nē (protams - līdz brīdim, kad f-jai/procedūrai jāpadod kāds mainīgais). Par C-veidīgajām valodām gan nezinu...
Back to top
fest



Joined: 07 Apr 2003
Posts: 187
Location: Madona

PostPosted: Mon Jan 09, 2006 4:07 pm    Post subject:

binary wrote:
bubu wrote:
Fukcijas izsaukums jau pierakstās šādi: getTickCount(), vismaz paskālā. Bet mainīgā ierakstīšana/nolasīšana: getTickCount.

Pievērs uzmanību iekavām.


Tā gluži nav. Paskālim (vismaz delphu ietvaros) ir pofig - liec iekavas vai nē (protams - līdz brīdim, kad f-jai/procedūrai jāpadod kāds mainīgais). Par C-veidīgajām valodām gan nezinu...

C-veidīgajām valodām iekavas ir obligāti jāliek, pat, ja nav neviena argumenta.
AFAIK iekš tīra C pieraksts func(); nozīme nevis to, ka nav argumentu, bet gan to, ka ir nenoteikts daudzums argumentu.
_________________
Signature for rent. Good as new.
4 lines max. 80 letters.
Ls 0,02/post
Back to top
View user's profile Send e-mail
Vecais_Dumais_Laacis
Guru
Guru


Joined: 29 Jan 2004
Posts: 800

PostPosted: Mon Jan 09, 2006 5:57 pm    Post subject:

man domaat ka galiigs offtopics iestaajies un ka funct() to arii noziimee ka nav argumentu - funct(...) noziimee nezinaamu skaitu argumentu
_________________
...un ja bites buutu laachi...
Back to top
View user's profile
fest



Joined: 07 Apr 2003
Posts: 187
Location: Madona

PostPosted: Mon Jan 09, 2006 11:52 pm    Post subject:

<offtopic>
If you have an empty argument list, you can declare it as func( ) in C++,
which tells the compiler there are exactly zero arguments. You
should be aware that this only means an empty argument list in
C++. In C it means “an indeterminate number of arguments (which
is a “hole” in C since it disables type checking in that case).
_________________
Signature for rent. Good as new.
4 lines max. 80 letters.
Ls 0,02/post
Back to top
View user's profile Send e-mail
Display posts from previous:   
dev.gamez.lv Forum Index -> Programmēšana All times are GMT + 2 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group