home *** CD-ROM | disk | FTP | other *** search
- #ifndef lint
- static char sccsid[] = "@(#)create_planet.c 1.1 92/05/28 SMI" ;
- /* from create_planet.c 1.2 88/10/19 SMI */
- #endif
-
- /*
- * Copyright (c) 1986 by Sun Microsystems, Inc.
- */
-
- /*
- * This file generates the graphic description of a planet
- *
- */
-
-
- #include <stdio.h>
- #include <math.h>
- #include "graphics.h"
- #include "dstar.h"
- #include "object_types.h"
- #include "line_object.h"
- #include "bsp_object.h"
-
- extern int debug_level ;
-
-
-
- #include "planet1.h"
- #include "planet2.h"
-
-
- /* these routines create a description for an enemy fighter */
-
-
- void
- init_planet(index)
- int index ;
- {
-
- Object_Desc *desc1, *desc2 ;
-
- desc1 = (Object_Desc *) malloc(sizeof(Object_Desc)) ;
- desc2 = (Object_Desc *) malloc(sizeof(Object_Desc)) ;
-
- if(desc1 && desc2)
- {
- descriptions[index] = desc1 ;
-
- desc1->thresh = 2000.0*2000.0 ;
- desc1->next = desc2 ;
- desc1->type = BSP_TREE ;
- desc1->first = (caddr_t) &BSP_ROOT2 ;
-
- desc2->thresh = 0.0 ;
- desc2->next = NULL ;
- desc2->type = BSP_TREE ;
- desc2->first = (caddr_t) &BSP_ROOT1 ;
- }
- else
- {
- perror("init_planet: malloc:") ;
- exit(1) ;
- }
- }
-
-
-
-
-