File: mapobject_preview.h

package info (click to toggle)
gimp 2.2.13-1etch4
  • links: PTS
  • area: main
  • in suites: etch
  • size: 94,832 kB
  • ctags: 47,113
  • sloc: ansic: 524,858; xml: 36,798; lisp: 9,870; sh: 9,409; makefile: 7,923; python: 2,674; perl: 2,589; yacc: 520; lex: 334
file content (51 lines) | stat: -rw-r--r-- 1,080 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
#ifndef __MAPOBJECT_PREVIEW_H__
#define __MAPOBJECT_PREVIEW_H__

#define PREVIEW_WIDTH 200
#define PREVIEW_HEIGHT 200

#define WIRESIZE 16

typedef struct
{
  gint         x1, y1, x2, y2;
  gint         linewidth;
  GdkLineStyle linestyle;
} line;

typedef struct
{
  gint      x, y, w, h;
  GdkImage *image;
} BackBuffer;

/* Externally visible variables */
/* ============================ */

extern line       linetab[];
extern gdouble    mat[3][4];
extern gint       lightx,lighty;
extern BackBuffer backbuf;

/* Externally visible functions */
/* ============================ */

void compute_preview        (gint x,
			     gint y,
			     gint w,
			     gint h,
			     gint pw,
			     gint ph);
void draw_wireframe         (gint startx,
			     gint starty,
			     gint pw,
			     gint ph);
void clear_wireframe        (void);
void draw_preview_image     (gint docompute);
void draw_preview_wireframe (void);
gint check_light_hit        (gint xpos,
			     gint ypos);
void update_light           (gint xpos,
			     gint ypos);

#endif  /* __MAPOBJECT_PREVIEW_H__ */