pace.c File Reference

#include "Buzz_inc.h"
#include "externs.h"
#include "assert.h"
#include "pace.h"
#include "av.h"
#include "options.h"
#include "utils.h"
#include "logging.h"

Go to the source code of this file.

Defines

#define debug_file   stdout

Functions

int AquireDrive (void)
char DoModem (int sel)
void frm_read_tbl (char *keyname, struct tblinfo *tbl)
 Read sequence name array from file.
int getch (void)
void idle_loop (int ticks)
 wait a number of ticks
void idle_loop_secs (double secs)
 do nothing for a few seconds.
void KillVoice (void)
void LMove (void *p)
ssize_t load_audio_file (const char *name, char **data, size_t *size)
 LOG_DEFAULT_CATEGORY (LOG_ROOT_CAT)
void MesCenter (void)
char MPrefs (char mode)
void NGetVoice (char plr, char val)
void OpenEmUp (void)
void play_audio (int sidx, int mode)
void PlayAudio (char *name, char mode)
void PlayVoice (void)
int put_serial (unsigned char n)
void randomize (void)
char * seq_filename (int seq, int mode)
 Get sequence filename by sequence number.
void seq_init (void)
 Initialize the sequence keymaps.
void SMove (void *p, int x, int y)
void StopVoice (void)

Variables

static struct tblinfo frm_ftbl
 Mapping from failure sequence numbers to audio/video filenames.
static struct tblinfo frm_tbl
 Mapping from success sequence numbers to audio/video filenames.
char * letter_dat
struct Prest_Upd MP [3]
struct audio_chunk news_chunk
char * soundbuf
size_t soundbuf_size = 0
size_t soundbuf_used = 0
GXHEADER vhptr
long VoiceOff


Define Documentation

#define debug_file   stdout

Definition at line 556 of file pace.c.


Function Documentation

int AquireDrive ( void   ) 

Definition at line 35 of file pace.c.

char DoModem ( int  sel  ) 

Definition at line 17 of file pace.c.

Referenced by FileAccess(), and PortSel().

void frm_read_tbl ( char *  keyname,
struct tblinfo *  tbl 
)

Read sequence name array from file.

Parameters:
keyname Name of the file to read from
tblinfo Pointer to the tblinfo to fill

Todo:
Assumption about the size of name is too high, right?

Definition at line 274 of file pace.c.

References DEBUG4, fin, name, sOpen(), WARNING2, xcalloc(), xrealloc(), and xstrdup().

Referenced by seq_init().

int getch ( void   ) 

Definition at line 525 of file pace.c.

Referenced by ChangeStat(), and Prefs().

void idle_loop ( int  ticks  ) 

wait a number of ticks

Parameters:
ticks Number of ticks to wait.

Definition at line 416 of file pace.c.

Referenced by PlaySequence().

void idle_loop_secs ( double  secs  ) 

do nothing for a few seconds.

The function will wait a number of seconds but will call av_block() in the meantime.

Parameters:
secs Number of seconds to wait.

Definition at line 395 of file pace.c.

Referenced by idle_loop(), News(), PlayNewsAnim(), PlaySequence(), and Replay().

void KillVoice ( void   ) 

Definition at line 504 of file pace.c.

Referenced by News().

void LMove ( void p  ) 

Definition at line 370 of file pace.c.

ssize_t load_audio_file ( const char *  name,
char **  data,
size_t *  size 
)

Definition at line 429 of file pace.c.

Referenced by music_load(), NGetVoice(), play_audio(), and PlayAudio().

LOG_DEFAULT_CATEGORY ( LOG_ROOT_CAT   ) 

void MesCenter ( void   ) 

Definition at line 32 of file pace.c.

Referenced by PortSel().

char MPrefs ( char  mode  ) 

Definition at line 24 of file pace.c.

Referenced by FileAccess().

void NGetVoice ( char  plr,
char  val 
)

Definition at line 482 of file pace.c.

Referenced by News().

void OpenEmUp ( void   ) 

Definition at line 43 of file pace.c.

Referenced by main().

void play_audio ( int  sidx,
int  mode 
)

Definition at line 537 of file pace.c.

Referenced by PlaySequence().

void PlayAudio ( char *  name,
char  mode 
)

Definition at line 516 of file pace.c.

Referenced by PlaySequence(), and SpotCrap().

void PlayVoice ( void   ) 

Definition at line 493 of file pace.c.

Referenced by News(), play_audio(), and PlayAudio().

int put_serial ( unsigned char  n  ) 

Definition at line 31 of file pace.c.

Referenced by PortSel().

void randomize ( void   ) 

Definition at line 383 of file pace.c.

Referenced by EndOfTurnSave(), FileAccess(), and OpenEmUp().

char* seq_filename ( int  seq,
int  mode 
)

Get sequence filename by sequence number.

Parameters:
seq Index number of sequence
mode 0=success, other is failure
Returns:
NULL if the sequence number is out of bound

name of the sequence file as string

Definition at line 343 of file pace.c.

Referenced by AbzFrame(), play_audio(), PlaySequence(), and Replay().

void seq_init ( void   ) 

Initialize the sequence keymaps.

Reads success and failure sequences

Definition at line 327 of file pace.c.

References frm_ftbl, frm_read_tbl(), and frm_tbl.

Referenced by OpenEmUp().

void SMove ( void p,
int  x,
int  y 
)

Definition at line 359 of file pace.c.

void StopVoice ( void   ) 

Definition at line 510 of file pace.c.

Referenced by SpotCrap().


Variable Documentation

struct tblinfo frm_ftbl [static]

Mapping from failure sequence numbers to audio/video filenames.

Definition at line 320 of file pace.c.

Referenced by seq_filename(), and seq_init().

struct tblinfo frm_tbl [static]

Mapping from success sequence numbers to audio/video filenames.

Definition at line 317 of file pace.c.

Referenced by seq_filename(), and seq_init().

char* letter_dat

Definition at line 40 of file pace.c.

Referenced by DispBig(), and OpenEmUp().

struct Prest_Upd MP[3]

Definition at line 29 of file pace.c.

struct audio_chunk news_chunk

Definition at line 426 of file pace.c.

Referenced by PlayVoice().

char* soundbuf

Definition at line 423 of file pace.c.

Referenced by sound_play(), and sound_step().

size_t soundbuf_size = 0

Definition at line 424 of file pace.c.

Referenced by sound_play().

size_t soundbuf_used = 0

Definition at line 425 of file pace.c.

Referenced by sound_play(), and sound_step().

GXHEADER vhptr

Definition at line 50 of file main.c.

long VoiceOff

Definition at line 421 of file pace.c.


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