#include <SDL.h>
Go to the source code of this file.
Data Structures | |
struct | audio_channel |
struct | audio_chunk |
Defines | |
#define | AV_ALL_CHANNELS -1 |
#define | AV_DTREE_DEPTH 5 |
#define | AV_DTREE_FILL_RATIO .8 |
#define | AV_FADE_IN 0 |
#define | AV_FADE_OUT 1 |
#define | AV_MAX_VOLUME SDL_MIX_MAXVOLUME |
#define | AV_MIN_VOLUME 0 |
#define | AV_MUSIC_CHANNEL 1 |
#define | AV_NUM_CHANNELS 2 |
#define | AV_SOUND_CHANNEL 0 |
Functions | |
char | AnimSoundCheck (void) |
Check if animation sound playback is in progress. | |
void | av_block (void) |
Block until an SDL event comes in. | |
void | av_need_update (SDL_Rect *r) |
Notify graphic subsystem that rectangle has to be redrawn. | |
void | av_need_update_xy (int x1, int y1, int x2, int y2) |
Notify graphic subsystem that rectangle has to be redrawn. | |
void | av_set_fading (int type, int from, int to, int steps, int preserve) |
Set up screen fade effect. | |
void | av_setup (void) |
Setup SDL audio, video and window subsystems. | |
void | av_silence (int channel) |
void | av_step (void) |
void | av_sync (void) |
int | bioskey (int peek) |
double | get_time (void) |
void | MuteChannel (int channel, int mute) |
void | play (struct audio_chunk *cp, int channel) |
void | UpdateAudio (void) |
Variables | |
int | av_mouse_cur_x |
int | av_mouse_cur_y |
int | av_mouse_pressed_cur |
int | av_mouse_pressed_latched |
int | av_mouse_pressed_x |
int | av_mouse_pressed_y |
SDL_Overlay * | news_overlay |
SDL_Rect | news_rect |
SDL_Overlay * | video_overlay |
SDL_Rect | video_rect |
#define AV_ALL_CHANNELS -1 |
#define AV_DTREE_DEPTH 5 |
Definition at line 22 of file av.h.
Referenced by alloc_dirty_tree(), fill_rect_list(), and update_rect().
#define AV_DTREE_FILL_RATIO .8 |
#define AV_FADE_IN 0 |
#define AV_MAX_VOLUME SDL_MIX_MAXVOLUME |
#define AV_MUSIC_CHANNEL 1 |
Definition at line 10 of file av.h.
Referenced by music_set_mute(), music_start_loop(), and music_stop_track().
#define AV_NUM_CHANNELS 2 |
Definition at line 7 of file av.h.
Referenced by audio_callback(), av_setup(), av_silence(), IsChannelMute(), MuteChannel(), and play().
#define AV_SOUND_CHANNEL 0 |
Definition at line 9 of file av.h.
Referenced by AnimSoundCheck(), KillVoice(), News(), PlaySequence(), PlayVoice(), Prefs(), SpotCrap(), and StopVoice().
char AnimSoundCheck | ( | void | ) |
Check if animation sound playback is in progress.
Currently AV_SOUND_CHANNEL is used only for animation sounds.
Definition at line 147 of file sdl.c.
Referenced by News(), and PlaySequence().
Block until an SDL event comes in.
We have a 30ms timer going, so that is the maximum wait time.
Definition at line 510 of file sdl.c.
Referenced by BChoice(), GetBlockName(), getch(), GetMouse(), idle_loop_secs(), PlaySequence(), and Port().
void av_need_update | ( | SDL_Rect * | r | ) |
Notify graphic subsystem that rectangle has to be redrawn.
r | rectangle coordinates |
Definition at line 925 of file sdl.c.
Referenced by av_need_update_xy(), av_set_fading(), av_sync(), grClearArea(), gxClearDisplay(), gxPutImage(), and gxVirtualDisplay().
void av_need_update_xy | ( | int | x1, | |
int | y1, | |||
int | x2, | |||
int | y2 | |||
) |
Notify graphic subsystem that rectangle has to be redrawn.
x1 | x screen coord. of upper left corner | |
y1 | y screen coord. of upper left corner | |
x2 | x screen coord. of bottom right corner | |
y2 | y screen coord. of bottom right corner |
Definition at line 939 of file sdl.c.
Referenced by BChoice(), Burst(), Clock(), DispBig(), DoCycle(), DrawControl(), DrawSpaceport(), DrawTopNewsBox(), GetBlockName(), Help(), InBox(), ManSel(), Master(), OutBox(), Port(), PortOutLine(), PortRestore(), and PrintAt().
void av_set_fading | ( | int | type, | |
int | from, | |||
int | to, | |||
int | steps, | |||
int | preserve | |||
) |
Set up screen fade effect.
Fading applies only to a range of palette color indexes. Rest of colors in the palette can be preserved or forced to black.
type | AV_FADE_IN or AV_FADE_OUT | |
from | index of first affected color | |
to | index of last affected color | |
steps | how many color change steps to perform | |
preserve | whether preserve rest of palette colors or not |
void av_silence | ( | int | channel | ) |
Definition at line 195 of file sdl.c.
Referenced by av_silence(), KillVoice(), music_stop_track(), play(), PlaySequence(), and StopVoice().
Definition at line 492 of file sdl.c.
Referenced by AnimSoundCheck(), av_block(), bioskey(), GetMouse_fast(), Introd(), NUpdateVoice(), and PlaySequence().
Definition at line 703 of file sdl.c.
Referenced by av_set_fading(), Burst(), gr_maybe_sync(), gr_sync(), Help(), and Prefs().
int bioskey | ( | int | peek | ) |
Definition at line 522 of file sdl.c.
Referenced by FailEval(), FailureMode(), GetBlockName(), getch(), GetMouse_fast(), PlaySequence(), and Replay().
double get_time | ( | void | ) |
Definition at line 105 of file sdltest.c.
Referenced by busywait(), FailureMode(), GetMse(), idle_loop_secs(), Introd(), load_audio_file(), LoadNewsAnim(), main(), News(), PlayNewsAnim(), Port(), randomize(), Replay(), and Tick().
void MuteChannel | ( | int | channel, | |
int | mute | |||
) |
void play | ( | struct audio_chunk * | cp, | |
int | channel | |||
) |
Definition at line 166 of file sdl.c.
Referenced by music_start_loop(), PlayVoice(), test_music(), and test_news().
int av_mouse_cur_x |
int av_mouse_cur_y |
SDL_Overlay* news_overlay |
Definition at line 35 of file sdl.c.
Referenced by av_setup(), av_sync(), LoadNewsAnim(), and PlayNewsAnim().
SDL_Rect news_rect |
SDL_Overlay* video_overlay |
Definition at line 34 of file sdl.c.
Referenced by AbzFrame(), av_setup(), av_sync(), PlaySequence(), and Replay().
SDL_Rect video_rect |
Definition at line 36 of file sdl.c.
Referenced by AbzFrame(), av_sync(), Draw_Mis_Stats(), PlaySequence(), and Replay().