4 #include "wellobject.h"
6 #include "welldrawing.h"
7 #include "wellimagefont.h"
8 #include "welltopnine.h"
11 #include "wellswitch.h"
12 #include "wellinput.h"
16 //Class used in Time queue for delivering time events to objects
22 TimeObject() {ticks
=ticks_left
=0; obj
=0;};
23 TimeObject(WellObject
* wo
, int t
=1) { obj
=wo
;ticks_left
=ticks
=t
;};
24 void restart_ticks() { ticks_left
=ticks
; };
25 bool operator == (TimeObject
& o2
) {return o2
.obj
==obj
;};
28 typedef bilist
<TimeObject
> TimeList
; //List of objects that want timers
29 typedef bilist
<WellObject
*> ObjectList
; //List of all objects that waht events
34 int l
,h
; //Size of image
35 WellImage() { id
=imNone
; l
=h
=0;};
43 ObjectList objectlist
;
45 unsigned int mainl
,mainh
; // size of main window
48 WellImage images
[MAX_IMAGES
];
50 virtual void init_mainwindow(int,char**)=0;
51 virtual int wait_for_timers()=0;
52 virtual bool process_time_event();
53 virtual bool process_event_for_all(wEvent
);
56 WellEngine(int,char**);
59 virtual void show_main()=0;
60 virtual void event_loop()=0;
62 virtual bool add_timer(WellObject
* wo
, int ticks
);
63 virtual bool del_timer(WellObject
* wo
);
64 virtual bool add_object(WellObject
* wo
);
65 virtual bool del_object(WellObject
* wo
);
66 virtual void clear_objectlist();
67 virtual void done_loop() { done_loop_var
=true;};
69 virtual WellDrawingEngine
* new_well_drawing_engine();
70 virtual WellTopNine
* new_well_top_nine();
71 virtual WellIntro
* new_well_intro();
72 virtual WellKey
* new_well_key(char*);
73 virtual WellInput
* new_well_input(char*) { return 0;};
74 virtual WellSwitch
* new_well_switch(char*);
75 virtual WellImageFont
* new_well_image_font(Images id
,
78 int idx
, int idy
) { return 0;};
80 virtual WellBase
* new_well_base();
82 virtual bool load_image(Images id
, char* name
) { return false;};
83 virtual void set_main_background_image(Images id
) {};
84 virtual void screen_copy(Geo
*) {};
85 virtual void screen_clear(Geo
*) {};
86 virtual void load_images();
87 virtual void udelay(int msec
) {};
90 extern WellEngine
* default_well_engine
;
91 extern WellEngine
* new_well_engine(int argc
, char** argv
);