av.h File Reference

#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 Documentation

#define AV_ALL_CHANNELS   -1

Definition at line 8 of file av.h.

Referenced by av_silence(), MuteChannel(), and Prefs().

#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

Definition at line 26 of file av.h.

Referenced by update_rect().

#define AV_FADE_IN   0

Definition at line 14 of file av.h.

Referenced by av_set_fading().

#define AV_FADE_OUT   1

Definition at line 15 of file av.h.

#define AV_MAX_VOLUME   SDL_MIX_MAXVOLUME

Definition at line 12 of file av.h.

Referenced by av_setup().

#define AV_MIN_VOLUME   0

Definition at line 11 of file av.h.

#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().


Function Documentation

char AnimSoundCheck ( void   ) 

Check if animation sound playback is in progress.

Currently AV_SOUND_CHANNEL is used only for animation sounds.

Returns:
0 means busy playing audio; 1 means idle

Definition at line 147 of file sdl.c.

Referenced by News(), and PlaySequence().

void av_block ( void   ) 

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.

Parameters:
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.

Parameters:
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.

Parameters:
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

Definition at line 784 of file sdl.c.

void av_setup ( void   ) 

Setup SDL audio, video and window subsystems.

Definition at line 232 of file sdl.c.

Referenced by main().

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().

void av_step ( void   ) 

Definition at line 492 of file sdl.c.

Referenced by AnimSoundCheck(), av_block(), bioskey(), GetMouse_fast(), Introd(), NUpdateVoice(), and PlaySequence().

void av_sync ( void   ) 

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 
)

Definition at line 750 of file sdl.c.

Referenced by music_set_mute(), MuteChannel(), and Prefs().

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().

void UpdateAudio ( void   ) 

Definition at line 545 of file sdl.c.

Referenced by PlaySequence(), and Port().


Variable Documentation

int av_mouse_cur_x

Definition at line 26 of file sdl.c.

Referenced by av_process_event(), and grGetMouseCurPos().

int av_mouse_cur_y

Definition at line 26 of file sdl.c.

Referenced by av_process_event(), and grGetMouseCurPos().

int av_mouse_pressed_cur

Definition at line 28 of file sdl.c.

Referenced by av_process_event(), and grGetMouseButtons().

int av_mouse_pressed_latched

Definition at line 29 of file sdl.c.

Referenced by av_process_event(), and grGetMouseButtons().

int av_mouse_pressed_x

Definition at line 27 of file sdl.c.

Referenced by av_process_event(), and grGetMousePressedPos().

int av_mouse_pressed_y

Definition at line 27 of file sdl.c.

Referenced by av_process_event(), and grGetMousePressedPos().

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

Definition at line 37 of file sdl.c.

Referenced by av_sync(), LoadNewsAnim(), News(), and ShowEvt().

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().


Generated on Fri Sep 28 00:35:46 2007 for raceintospace by  doxygen 1.5.3