📄 light.c
字号:
/* light.c, HAWK game engine
*
* Copyright 1997-1998 by Phil Frisbie, Jr.
* for Hawk Software
*
*/
#include "hawk.h"
#include "internal.h"
/* returns the color of the floor lighting below the object */
void lightGetObject(OBJECT *o, vec3_t color)
{
color[R] = 1.0;
color[G] = 1.0;
color[B] = 1.0;
if(o->type&O_PULSE)
{
float t = (float)(sin((float)Engine.gameframes / 8.0f) + 1.0f) / 2.0f;
float c = 0.7 + (0.3 * t);
color[R] = c;
color[G] = c;
color[B] = c;
return;
}
/* find the surface */
/* find the closest texel in the lightmap */
}
/* returns FALSE if there is no dynamic lighting needed, or TRUE and
* the color and normal of the closest/brightest dynamic light source
*/
BOOL lightGetObjectDynamic(OBJECT *o, vec3_t color, vec3_t normal)
{
if(o->type&O_FULLBRIGHT)
return FALSE;
return FALSE;
}
/*
* updates the dynamic lighting
*/
void lightUpdate(void)
{
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -