/*--------------------------------------------------------------------------
 * File: vlgh.c
 * Written by: Fredrik Kling, 1997-05-18
 * Description: Ljusk„lls hanteringen.
 *
 * Updates:
 * -- Date -- | ----- Name ----- |-- Did what....
 * 1997-05-18 | Fredrik Kling    | Implementation
 *
 * Todo:
 *
 *
 *
 -------------------------------------------------------------------------------*/

#include "system/xstdlib.h"
#include "objects/light.h"

VLGH *vlgh_create (void)
{
	VLGH *light;

	light=(VLGH *)xsafe_malloc (sizeof (VLGH));

	light -> flags = 0;
	light -> spot_intens = NULL;
	light->in_range = light->out_range = light->hotspot = light->falloff = 0;
	light->color.r=0;
	light->color.g=0;
	light->color.b=0;

	return light;
}
VLGH *vlgh_createstd (void)
{
	VLGH *light;

	light=(VLGH *)xsafe_malloc (sizeof (VLGH));

	light->flags = VLGHFLAG_OMNI | VLGHFLAG_DISTANCE;
	light->intens = 63;
	light->in_range = light->out_range = light->hotspot = light->falloff = 0;
	light->spot_intens=NULL;
	light->color.r=63;
	light->color.g=63;
  light->color.b=63;

	return light;
}
