X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fdemosys.h;h=abbc1548ff61309d45e38dcf7ffa947febda644f;hb=3b852038f69e28291498c05f115f498c4dd47657;hp=e369771cb467f7fca7767a7da1dcad5b7c4e9c94;hpb=ba4adddb6685c5a64a3ca5cae56ba879841327ec;p=andemo diff --git a/src/demosys.h b/src/demosys.h index e369771..abbc154 100644 --- a/src/demosys.h +++ b/src/demosys.h @@ -6,8 +6,6 @@ struct demoscreen { char *name; - struct anm_track track; - int (*init)(void); void (*destroy)(void); void (*reshape)(int x, int y); @@ -22,7 +20,9 @@ struct demoscreen { void (*mouse)(int bn, int pressed, int x, int y); void (*motion)(int x, int y); - struct demoscreen *next; + struct anm_track track; + int active, prio; + float vis; }; /* global demo state */ @@ -33,15 +33,15 @@ long dsys_time; /* demo time in milliseconds */ #define MAX_DSYS_SCREENS 64 struct demoscreen *dsys_screens[MAX_DSYS_SCREENS]; int dsys_num_screens; -struct demoscreen *dsys_act_scr; /* linked list of active screens */ +struct demoscreen *dsys_act[MAX_DSYS_SCREENS]; +int dsys_num_act; int dsys_init(const char *fname); void dsys_destroy(void); -/* overrides the demo sequence, and runs a single screen */ -struct demoscreen *dsys_find_screen(const char *name); -void dsys_run_screen(struct demoscreen *scr); +void dsys_update(void); +void dsys_draw(void); void dsys_run(void); void dsys_stop(void); @@ -49,6 +49,10 @@ void dsys_seek_abs(long tm); void dsys_seek_rel(long dt); void dsys_seek_norm(float t); +/* overrides the demo sequence, and runs a single screen */ +struct demoscreen *dsys_find_screen(const char *name); +void dsys_run_screen(struct demoscreen *scr); + int dsys_add_screen(struct demoscreen *scr); #endif /* DEMOSYS_H_ */