home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Learn 3D Graphics Programming on the PC
/
Learn_3D_Graphics_Programming_on_the_PC_Ferraro.iso
/
rwwin
/
rtramp.h_
/
rtramp.bin
Wrap
Text File
|
1995-11-14
|
2KB
|
64 lines
#if !defined(_RTRAMP_H)
#define _RTRAMP_H
/*********************************************************************
*
* File: rtramp.h
*
* Abstract: Simple module to assist with generating custom ramps
* for RenderWare smooth shading.
*
* Author: Colin McCartney
*
* Date: 02/03/95
*
*********************************************************************/
/*********************************************************************
*
* Include files.
*
*********************************************************************/
#include <rwlib.h>
/*********************************************************************
*
* Constant Definitions.
*
*********************************************************************/
#define MAXLUM 23
/*********************************************************************
*
* Type Definitions.
*
*********************************************************************/
typedef unsigned char RwByte;
/*********************************************************************
*
* Functions.
*
*********************************************************************/
/*********************************************************************/
/* Simple HSV to RGB conversion */
extern void RtHSVToRGB(RwReal h, RwReal s, RwReal v, RwByte *r, RwByte *g, RwByte *b);
/* Build a ramp starting at entry with the given hue and saturarion */
extern void RtGenRamp(RwPaletteEntry* entry, RwReal hue, RwReal sat);
/* Set the given ramp to a ramp based on the given hue and saturation */
extern void RtSetRamp(RwPaletteEntry* palette, int ramp, RwReal hue, RwReal sat);
/* Fill the array of palette entries with (something similar) to the default palette */
extern void RtDefaultPalette(RwPaletteEntry* palette);
/*********************************************************************/
#endif