9 #include "keybindings.h"
11 #include "music_and_sound_g.h"
13 struct cursesmovie_headerst
19 class viewscreen_movieplayerst
: viewscreenst
22 static viewscreen_movieplayerst
*create(char pushtype
,viewscreenst
*scr
=NULL
);
24 virtual void feed(std::set
<InterfaceKey
> &events
);
26 virtual void render();
27 virtual char movies_okay(){return 0;}
29 void force_play(const string
&file
);
31 virtual char is_option_screen(){if(is_playing
)return 2;else return 0;}
38 unsigned char editing_char
;
39 int editing_copy_from
;
40 short editing_screenf
;
41 short editing_screenb
;
42 short editing_screenbright
;
43 int editing_selected_sound
;
54 svector
<char *> filelist
;
56 viewscreen_movieplayerst();
57 virtual ~viewscreen_movieplayerst(){clearfilelist();};
60 enum InterfacePushType
62 INTERFACE_PUSH_AS_PARENT
,
63 INTERFACE_PUSH_AS_CHILD
,
64 INTERFACE_PUSH_AT_BACK
,
65 INTERFACE_PUSH_AT_FRONT
,
69 #define INTERFACEFLAG_RETAIN_NONZERO_INPUT BIT1
71 #define MOVIEBUFFSIZE 800000
72 #define COMPMOVIEBUFFSIZE 1000000
77 viewscreenst
*grab_lastscreen();
78 friend class viewscreen_movieplayerst
;
84 int shutdown_interface_tickcount
;
85 int shutdown_interface_for_ms
;
88 void remove_to_first();
89 void removescreen(viewscreenst
*scr
);
90 void addscreen(viewscreenst
*scr
,char pushtype
,viewscreenst
*relate
);
91 char is_supermovie_on()
96 void print_interface_token(InterfaceKey key
,justification just
=justify_left
);
104 int supermovie_delayrate
;
105 int supermovie_delaystep
;
106 stringvectst supermovie_sound
;
108 int supermovie_sound_time
[200][SOUND_CHANNELNUM
];
110 unsigned char supermoviebuffer
[MOVIEBUFFSIZE
];
111 unsigned char supermoviebuffer_comp
[COMPMOVIEBUFFSIZE
];
112 int currentblocksize
;
114 char first_movie_write
;
117 void insertscreen_as_parent(viewscreenst
*scr
,viewscreenst
*child
);
118 void insertscreen_as_child(viewscreenst
*scr
,viewscreenst
*parent
);
119 void insertscreen_at_back(viewscreenst
*scr
);
120 void insertscreen_at_front(viewscreenst
*scr
);
121 void handlemovie(char flushall
);
123 void use_movie_input();
125 int write_movie_chunk();
126 void read_movie_chunk(int &maxmoviepos
,char &is_playing
);
129 #define SCROLLING_NOSELECT BIT1
130 #define SCROLLING_NO_WRAP BIT2
131 #define SCROLLING_REVERSE BIT3
132 void finishscrolling(int32_t &selection
,int32_t min
,int32_t max
,int32_t jump
,uint32_t flag
,char littlekey
);
133 char standardscrolling(std::set
<InterfaceKey
> &events
,short &selection
,int32_t min
,int32_t max
,int32_t jump
,uint32_t flag
=0);
134 char standardscrolling(std::set
<InterfaceKey
> &events
,int32_t &selection
,int32_t min
,int32_t max
,int32_t jump
,uint32_t flag
=0);
135 char secondaryscrolling(std::set
<InterfaceKey
> &events
,short &scroll
,int32_t min
,int32_t max
,int32_t jump
,uint32_t flag
=0);
136 char secondaryscrolling(std::set
<InterfaceKey
> &events
,int32_t &scroll
,int32_t min
,int32_t max
,int32_t jump
,uint32_t flag
=0);
137 #define STRINGENTRY_LETTERS BIT1
138 #define STRINGENTRY_SPACE BIT2
139 #define STRINGENTRY_NUMBERS BIT3
140 #define STRINGENTRY_CAPS BIT4
141 #define STRINGENTRY_SYMBOLS BIT5
142 char standardstringentry(char *str
,int maxlen
,unsigned int flag
,std::set
<InterfaceKey
> &events
);
143 char standardstringentry(string
&str
,int maxlen
,unsigned int flag
,std::set
<InterfaceKey
> &events
);
145 void drawborder(const char *str
,char style
=0,const char *colorstr
=NULL
);
147 extern interfacest gview
;