File: sardrawpm.c

package info (click to toggle)
searchandrescue 0.8.2-10
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 4,656 kB
  • ctags: 6,111
  • sloc: ansic: 89,072; cpp: 7,691; sh: 90; makefile: 80
file content (63 lines) | stat: -rw-r--r-- 1,420 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#include <stdio.h>
#include <sys/types.h>
#include <math.h>

#ifdef __MSW__
# include <windows.h>
#endif

#include <GL/gl.h>
#include <GL/glu.h>

#include "gw.h"

#include "sarreality.h"
#include "obj.h"
#include "objutils.h"
#include "sfm.h"
#include "sar.h"
#include "sardraw.h"
#include "sardrawpm.h"
#include "sardrawdefs.h"


void SARDrawPremodeled(SAR_DRAW_PREMODELED_PROTOTYPE);


/*
 *	Front end to drawing premodeled objects, called by SARDraw().
 */
void SARDrawPremodeled(SAR_DRAW_PREMODELED_PROTOTYPE)
{
	if((dc == NULL) || (obj_ptr == NULL) || (obj_premodeled_ptr == NULL))
	    return;

#define SAR_DRAW_PREMODELED_INPUT		\
	dc, obj_ptr, obj_premodeled_ptr,	\
	camera_dist, draw_for_gcc

	switch(obj_premodeled_ptr->type)
	{
	  case SAR_OBJ_PREMODELED_BUILDING:
	    SARDrawPremodeledBuilding(SAR_DRAW_PREMODELED_INPUT);
	    break;
	  case SAR_OBJ_PREMODELED_CONTROL_TOWER:
	    SARDrawPremodeledControlTower(SAR_DRAW_PREMODELED_INPUT);
	    break;
	  case SAR_OBJ_PREMODELED_HANGAR:
	    /* TODO */
	    break;
	  case SAR_OBJ_PREMODELED_POWER_TRANSMISSION_TOWER:
	    SARDrawPremodeledPowerTransmissionTower(SAR_DRAW_PREMODELED_INPUT);
	    break;
	  case SAR_OBJ_PREMODELED_TOWER:
	    SARDrawPremodeledTower(SAR_DRAW_PREMODELED_INPUT);
	    break;
	  case SAR_OBJ_PREMODELED_RADIO_TOWER:
	    SARDrawPremodeledRadioTower(SAR_DRAW_PREMODELED_INPUT);
	    break;
	}

#undef SAR_DRAW_PREMODELED_INPUT
}