osViFade
Syntax
#include <ultra64.h> /* os.h */
void osViFade(u8 active, u16 factor);
Arguments
- active
Fade flag
TRUE (Fade)
FALSE (Do not fade)
- factor
Fade interpolation coefficient (0~0x3ff)
Return Value
None
Explanation
osViFade enables you to perform fade-out processing of solid-color screens by changing the interpolation coefficient. When any value other than 0 is set in active to enable fading, the colors of the first and second lines in the frame buffer are taken and interpolated at the ratio specified by factor, and then embedded in the screen at that color.
To show this in a concrete equation, where the RGB value of the first line is (r1,g1,b1), that of the second line is (r2,g2,b2), and the coefficient f=(factor/0x3ff),
(R,G,B) = ((r1*(1-f)+r2*f),(g1*(1-f)+g2*f),(b1*(1-f)+ b2*f))
becomes the fill color.
osViFade can be used low resolution, point sampling, and noninterlaced modes (LPN1, LPN2, etc.).
Cautions
When fading is enabled, fading must be returned to disabled before a PreNMI occurs or before executing osViBlack.
See Also
osViGetCurrentMode
osViSetMode
Revision History
2/1/1999 Completely rewritten
|
Nintendo® Confidential
Warning: all information in this document is confidential and covered by a non-disclosure agreement. You are responsible for keeping this information confidential and protected. Nintendo will vigorously enforce this responsibility.
Copyright © 1998
Nintendo of America Inc. All rights reserved Nintendo and N64 are registered trademarks of Nintendo
Last updated March 1998
|