9 #include "wellengine.h"
10 #include "xwelldrawing.h"
11 #include "xwellimagefont.h"
14 extern Colormap defcmp
;
16 class XWellEngine
:public WellEngine
19 int scr
; //DefaultScreen of X display
20 int xcon
; //X Connection file descriptor
30 XEvent xev
; // X Event we got from x-server
31 Pixmap image_pixmaps
[MAX_IMAGES
]; //X pixmaps of images
33 unsigned long whitepixel
,blackpixel
;
35 unsigned long game_colors
[MAX_GAME_COLORS
];
37 struct timeval nexttime
,now
;
40 virtual void init_mainwindow(int,char**);
41 virtual int wait_for_timers();
42 virtual void init_colors();
43 void correct_to_real_time(struct timeval
& tv
);
46 XWellEngine(int argc
,char** argv
);
48 virtual void show_main();
49 virtual void event_loop();
51 virtual WellDrawingEngine
* new_well_drawing_engine();
52 virtual WellTopNine
* new_well_top_nine();
53 virtual WellIntro
* new_well_intro();
54 virtual WellKey
* new_well_key(char*);
55 virtual WellSwitch
* new_well_switch(char*);
56 virtual WellInput
* new_well_input(char*);
57 virtual WellImageFont
* new_well_image_font(Images id
,
61 virtual WellBase
* new_well_base();
63 Window
get_main_window() {return mainw
;};
64 GC
get_main_gc() {return maingc
;};
65 Pixmap
get_pixmap_of_image(Images id
) { return image_pixmaps
[id
];};
66 unsigned long* get_colors() { return game_colors
; };
67 virtual bool load_image(Images id
, char* name
);
68 virtual void set_main_background_image(Images id
);
69 virtual void screen_copy(Geo
*);
70 virtual void screen_clear(Geo
*);
71 virtual void udelay(int msec
);