File: sector.c

package info (click to toggle)
xgalaga 2.1.1.0-7
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,700 kB
  • sloc: ansic: 16,119; sh: 1,548; perl: 816; makefile: 179
file content (37 lines) | stat: -rw-r--r-- 903 bytes parent folder | download | duplicates (11)
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
#include "allincludes.h"

void
W_DrawSectorHighlight(window, x, y, width, h, color)
    W_Window window;
    int     x, y, width, h;
    W_Color color;
{
    Window  win;
#ifdef YUCK
    XRectangle r[2];

    r[0].x = (short) x;
    r[0].y = (short) y;
    r[0].width = (unsigned short) width;
    r[0].height = (unsigned short) h;
    r[1].x = (short) x + 2;
    r[1].y = (short) y + 2;
    r[1].width = (unsigned short) width - 4;
    r[1].height = (unsigned short) h - 4;

    win = W_Void2Window(window)->drawable;
    XDrawRectangles(W_Display, win, colortable[color].contexts[3],
		    r, 2);
#else
    XRectangle r[1];

    r[0].x = (short) x + 2;
    r[0].y = (short) y + 2;
    r[0].width = (unsigned short) width - 4;
    r[0].height = (unsigned short) h - 4;

    win = W_Void2Window(window)->drawable;
    XDrawRectangles(W_Display, win, colortable[color].contexts[3],
		    r, 1);
#endif
}