File: gghost.cc

package info (click to toggle)
pacman 10-13
  • links: PTS
  • area: main
  • in suites: woody
  • size: 664 kB
  • ctags: 1,108
  • sloc: cpp: 3,333; makefile: 502; sh: 96
file content (26 lines) | stat: -rw-r--r-- 623 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
#include"gghost.h"
  
G_Ghost::G_Ghost(COLOURTYPE farge) {

consfn();
pix(&pixmapn,ghost_bits,farge,Colour::MYBACKGROUND);
pix(&pixmapr,ghost_bits,Colour::RUNGHOSTCOLOUR,Colour::MYBACKGROUND);
pixmap=pixmapn;

};

G_Ghost::~G_Ghost(void) {
#ifdef XWIN
if (pixmap!=pixmapr) XFreePixmap(display,pixmapr);
if (pixmap!=pixmapn) XFreePixmap(display,pixmapn);
#elif defined MSWIN
if (pixmap!=pixmapr) DeleteObject(pixmapr);
if (pixmap!=pixmapn) DeleteObject(pixmapn);
#endif
}

void G_Ghost::draw(int x,int y,int run) {//draw at x,y with running boolean
if (!run) pixmap=pixmapn; else pixmap=pixmapr;
GraphElement::draw(x,y);
}