From: Tobias Leich Date: Sat, 20 Feb 2010 17:04:04 +0000 (+0100) Subject: finished FPSManager and Framerate X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5a0fe0a61be47c95f0174c91d59f3d783be46bc4;p=sdlgit%2FSDL-Site.git finished FPSManager and Framerate --- diff --git a/pages/SDL-GFX-FPSManager.html-inc b/pages/SDL-GFX-FPSManager.html-inc index 8c33662..3f77e45 100644 --- a/pages/SDL-GFX-FPSManager.html-inc +++ b/pages/SDL-GFX-FPSManager.html-inc @@ -18,12 +18,12 @@

NAME

Top

-

SDL::GFX::FPSManager - blitting functions

+

SDL::GFX::FPSManager - data structure used by SDL::GFX::Framerate

CATEGORY

Top

-

TODO, GFX, FPSManager

+

GFX, FPSManager

METHODS

Top

@@ -32,82 +32,46 @@

new

-
 FPSmanager *
- gfx_fps_new (CLASS, framecount, rateticks, lastticks, rate)
- 	char *CLASS
- 	Uint32 framecount
- 	float rateticks
- 	Uint32 lastticks
-	Uint32 rate
- 	CODE:
- 		RETVAL = (FPSmanager *) safemalloc(sizeof(FPSmanager));
- 		RETVAL->framecount = framecount;
- 		RETVAL->rateticks  = rateticks;
- 		RETVAL->lastticks  = lastticks;
- 		RETVAL->rate       = rate;
- 	OUTPUT:
- 		RETVAL
+
 use SDL;
+ use SDL::GFX::Framerate;
+ use SDL::GFX::FPSManager;
+
+ my $fps = SDL::GFX::FPSManager->new(0, 0, 0, 0);
 
 
+

Initialize the framerate manager object. Arguments: framecount, rateticks, lastticks, rate.

framecount

-
 Uint32
- gfx_fps_framecount ( fps, ... )
- 	FPSmanager *fps
- 	CODE:
- 		if (items > 1 ) fps->framecount = SvIV(ST(1)); 
- 		RETVAL = fps->framecount;
- 	OUTPUT:
- 		RETVAL
+
 my $fc = $fps->framecount;
 
 
+

Returns the framecount.

rateticks

-
 float
- gfx_fps_rateticks ( fps, ... )
- 	FPSmanager *fps
- 	CODE:
- 		if (items > 1 ) fps->rateticks = SvNV(ST(1)); 
- 		RETVAL = fps->rateticks;
- 	OUTPUT:
- 		RETVAL
+
 my $rt = $fps->rateticks;
 
 
+

Returns the rateticks.

lastticks

-
 Uint32
- gfx_fps_lastticks ( fps, ... )
- 	FPSmanager *fps
- 	CODE:
- 		if (items > 1 ) fps->lastticks = SvIV(ST(1)); 
- 		RETVAL = fps->lastticks;
- 	OUTPUT:
- 		RETVAL
+
 my $lt = $fps->lastticks;
 
 
+

Returns the lastticks.

rate

-
 Uint32
- gfx_fps_rate ( fps, ... )
- 	FPSmanager *fps
- 	CODE:
- 		if (items > 1 ) fps->rate = SvIV(ST(1)); 
- 		RETVAL = fps->rate;
- 	OUTPUT:
- 		RETVAL
-
-
-
+
 my $r = $fps->rate;
 
 
+

Returns the rate.

\ No newline at end of file diff --git a/pages/SDL-GFX-Framerate.html-inc b/pages/SDL-GFX-Framerate.html-inc index 108c0e8..a5a1be6 100644 --- a/pages/SDL-GFX-Framerate.html-inc +++ b/pages/SDL-GFX-Framerate.html-inc @@ -4,6 +4,7 @@