Raised This Month: $ Target: $400
 0% 

Trying to get a user's screen to go black for 2 seconds...


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
VEN
Veteran Member
Join Date: Jan 2005
Old 06-14-2006 , 05:57  
Reply With Quote #8

jtp10181: Let's say i input 50 decisecs (5 seconds) duration will be 1_125_899_906_842_624, doesn't seems to be correct. ;)

Below is the my method.


For int seconds:
Code:
#define SECONDS_TO_SCREENFADE_UNITS(%1) ((1<<12) * (%1))

For float and int seconds (a bit slower):
Code:
#define SECONDS_TO_SCREENFADE_UNITS(%1) floatround(float((1<<12)) * (%1))

Last edited by VEN; 10-02-2006 at 06:52. Reason: fixed
VEN is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:46.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode