File: event.h

package info (click to toggle)
amoeba 1.1-17
  • links: PTS
  • area: contrib
  • in suites: etch, etch-m68k
  • size: 732 kB
  • ctags: 971
  • sloc: cpp: 8,315; makefile: 178
file content (47 lines) | stat: -rw-r--r-- 992 bytes parent folder | download | duplicates (12)
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
#ifndef _EVENT_H
#define _EVENT_H

#include "main/mainloop.h"
#include "util/hashtable.h"

class MainLoop;
class DemoHandler;
class DOFHandler;
class TimewalkHandler;

class Event {
public:
	Event(MainLoop *ml, const char *title, const char *elem, Hashtable *attr, char *curvenames);
	virtual ~Event();
	
	/* these are typically provided by the base class */
	void add_curvepoint(Hashtable *markers, const char *element, const char **attr);
	void end_curvedata();
	
	float get_val(char *attr_name, float progress);
	
	/* these are typically overloaded */
	virtual void start_effect();
	virtual void draw_scene(float progress);
	virtual void end_effect();

	static float parse_time(Hashtable *markers, const char *timestr);
	
	friend class MainLoop;
	friend class DemoHandler;
	friend class DOFHandler;
	friend class TimewalkHandler;
	
	/* sigh */
	float start, stop;
	float layer;

protected:
	Hashtable *curves;
	char *title;
	bool active;

	MainLoop *ml;
};

#endif /* defined(_EVENT_H) */