home *** CD-ROM | disk | FTP | other *** search
- #ifndef lint
- static char sccsid[] = "@(#)blast.c 1.1 92/05/28 SMI" ;
- /* @(#)blast.c 1.3 90/07/23 SMI */
- #endif
-
- /*
- * Copyright (c) 1986 by Sun Microsystems, Inc.
- */
-
- /*
- * this file is special for the fighter visuals. It contains functions:
- *
- * set_blast_state(state)
- * changes graphics when blast state changes
- *
- */
-
-
-
- #include <stdio.h>
- #include <math.h>
- #include "graphics.h"
- #include "dstar.h"
- #include "object_types.h"
- #include "line_object.h"
-
- extern int debug_level ;
-
- static XYZF blast_0[] = {
- #include "blast_line0.h"
- } ;
-
- static XYZF blast_1[] = {
- #include "blast_line1.h"
- } ;
-
-
-
-
-
-
- /* this routine creates a description for an explosion */
-
-
- void
- init_blasts(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 = 100.0*100.0 ;
- desc1->next = desc2 ;
- desc1->type = LINE_DRAWING ;
- desc1->first = (caddr_t) blast_0 ;
-
- desc2->thresh = 0.0 ;
- desc2->next = NULL ;
- desc2->type = LINE_DRAWING ;
- desc2->first = (caddr_t) blast_1 ;
- }
- else
- {
- perror("init_blasts: malloc:") ;
- exit(1) ;
- }
- }
-