home *** CD-ROM | disk | FTP | other *** search
- #ifndef lint
- static char sccsid[] = "@(#)static.c 1.1 92/05/28 SMI" ;
- /* from static.c 1.2 88/10/19 SMI */
- #endif
-
- /*
- * Copyright (c) 1986 by Sun Microsystems, Inc.
- */
-
- /*
- * special routines for driving a static object
- */
-
-
-
- #include <stdio.h>
- #include <sys/time.h>
-
- #include "dstar.h"
- #include "object_types.h"
-
-
- extern new_status() ;
- extern control_object() ;
-
-
- fptr static_vector[VECTOR_LENGTH] = {
- new_status, /* new status */
- control_object, /* control */
- NULL, /* when killed */
- NULL, /* when kills */
- } ;
-
-
-
-
-
- create_planet(id)
- int id ;
- {
- Object *object = &objects[id] ;
-
- object->id = id ;
- strncpy(object->name, "mars", NAMELEN) ;
- object->class = OBJ_STATIC ;
- object->status = OBJ_ACTIVE ;
- object->flags = 0 ;
- object->Posn.x = -1000.0 ;
- object->Posn.y = 0 ;
- object->Posn.z = 0 ;
- object->Forward.x = 0.0 ;
- object->Forward.y = 0.0 ;
- object->Forward.z = 1.0 ;
- object->Up.x = 0.0 ;
- object->Up.y = 1.0 ;
- object->Up.z = 0.0 ;
- object->Right.x = 1.0 ;
- object->Right.y = 0.0 ;
- object->Right.z = 0.0 ;
- object->Delta.x = 0.003 ;
- object->Delta.y = 0.0 ;
- object->Delta.z = 0.0 ;
- object->Speed = 3.0 ;
- object->target = NULL ;
- object->description = PLANET1_DESC ;
- bcopy(static_vector, object->f_vector, sizeof(static_vector)) ;
- special_add_player(object) ;
- }
-
-
- create_monolith(id)
- int id ;
- {
- Object *object = &objects[id] ;
-
- object->id = id ;
- strncpy(object->name,"TMA-2",NAMELEN) ;
- object->class = OBJ_STATIC ;
- object->status = OBJ_ACTIVE ;
- object->flags = 0 ;
- object->Posn.x = 0.0 ;
- object->Posn.y = -1000.0 ;
- object->Posn.z = 0 ;
- object->Forward.x = 0.0 ;
- object->Forward.y = 0.0 ;
- object->Forward.z = 1.0 ;
- object->Up.x = 0.0 ;
- object->Up.y = 1.0 ;
- object->Up.z = 0.0 ;
- object->Right.x = 1.0 ;
- object->Right.y = 0.0 ;
- object->Right.z = 0.0 ;
- object->Delta.x = 0.0 ;
- object->Delta.y = 0.005 ;
- object->Delta.z = 0.0 ;
- object->Speed = 5.0 ;
- object->target = NULL ;
- object->description = MONOLITH_DESC ;
- bcopy(static_vector, object->f_vector, sizeof(static_vector)) ;
- special_add_player(object) ;
- }
-