pace.h File Reference

#include <stdio.h>
#include <unistd.h>
#include <sys/time.h>
#include <errno.h>
#include "av.h"

Go to the source code of this file.

Data Structures

struct  diskfree_t
struct  drvr_desc
struct  GXHEADER
struct  HTIMER

Defines

#define EMPTY_BODY   {}
#define grCARROW   2
#define grLBUTTON   1
#define grOUTLINE   1
#define grRBUTTON   2
#define grTRACK   1
#define gxCMM   1
#define gxSET   1
#define gxSUCCESS   0
#define gxVGA_13   1
#define gxXOR   2

Functions

int bioskey (int wait)
int brandom (int limit)
void bzdelay (int ticks)
void dbg (char const *fmt,...) __attribute__((format(printf
void delay (int millisecs)
double get_time (void)
int getch (void)
void getcurdir (int drive, char *buf)
int getdisk (void)
void GetMouse_fast (void)
void gr_maybe_sync (void)
void gr_set_color_map (unsigned char *map)
void gr_sync (void)
void grClearArea (int x1, int y1, int x2, int y2)
void grDrawLine (int x1, int y1, int x2, int y2)
void grDrawRect (int x1, int y1, int x2, int y2, int mode)
int grGetMouseButtons (void)
int grGetMouseCurPos (int *xp, int *yp)
int grGetMousePressedPos (int *xp, int *yp)
int grGetPixel (int x, int y)
int grInitMouse (void)
 Unknown function.
void grLineRel (int x, int y)
void grLineTo (int x, int y)
void grMoveRel (int x, int y)
void grMoveTo (int x, int y)
void grPutPixel (int x, int y, int val)
void grSetBkColor (int col)
 set background color
void grSetColor (int)
 set foreground color
void grSetMousePos (int x, int y)
 Unknown function.
void gxClearDisplay (int, int)
void gxClearVirtual (GXHEADER *hp, int a)
int gxCreateVirtual (int mode, GXHEADER *hp, int gxVGA_mode, int w, int h)
void gxDestroyVirtual (GXHEADER *hp)
void gxDisplayVirtual (int a, int b, int c, int d, int e, GXHEADER *hp, int f, int g)
void gxGetImage (GXHEADER *hp, int a, int b, int c, int d, int e)
void gxPutImage (GXHEADER *hp, int mode, int a, int b, int c)
void gxSetDisplayPalette (char *pal)
void gxVirtualDisplay (GXHEADER *hp, int a, int b, int c, int d, int e, int f, int g)
void gxVirtualScale (GXHEADER *a, GXHEADER *b)
int gxVirtualSize (int mode, int w, int h)
void gxVirtualVirtual (GXHEADER *hp, int a, int b, int c, int d, GXHEADER *hp2, int x, int y, int mode)
void idle_loop (int ticks)
 wait a number of ticks
void idle_loop_secs (double secs)
 do nothing for a few seconds.
int inp (int port)
void LMove (void *p)
ssize_t load_audio_file (const char *, char **data, size_t *size)
void play_audio (int sidx, int mode)
void randomize (void)
int RLED_img (void *src, void *dest, unsigned int src_size, int w, int h)
char * seq_filename (int seq, int mode)
 Get sequence filename by sequence number.
void SMove (void *p, int x, int y)

Variables

char * letter_dat
int show_intro_flag
unsigned char XMAS


Define Documentation

#define EMPTY_BODY   {}

Definition at line 78 of file pace.h.

Referenced by AsnCrew(), CrewProb(), DispBig(), IntelPhase(), SaveMail(), SelectBest(), and Steal().

#define grCARROW   2

Definition at line 23 of file pace.h.

#define grLBUTTON   1

Definition at line 45 of file pace.h.

#define grOUTLINE   1

Definition at line 40 of file pace.h.

Referenced by Box(), and grDrawRect().

#define grRBUTTON   2

Definition at line 46 of file pace.h.

#define grTRACK   1

Definition at line 22 of file pace.h.

#define gxCMM   1

Definition at line 66 of file pace.h.

Referenced by GV().

#define gxSET   1

Definition at line 52 of file pace.h.

Referenced by AstFaces(), AstLevel(), BadFileType(), BChoice(), BigHardMe(), BudPict(), Burst(), DispBaby(), DispIt(), DisplAstData(), Display_ARROW(), DispRck(), DispVA(), DoPack(), DrawFuture(), DrawSpaceport(), DrawStatistics(), EndPict(), Future(), GetBlockName(), GetMse(), gxPutImage(), HardCrewAssign(), HDispIt(), Help(), HModel(), LMove(), LMPict(), Load_LenFlag(), LoserPict(), MChoice(), MisReq(), Moon(), NewEnd(), PadPict(), PatchMe(), PlaceEquip(), PortPlace(), Prefs(), PresPict(), Request(), RequestX(), SatDraw(), SmHardMe(), SMove(), SpotCrap(), StepAnim(), and TopSecret().

#define gxSUCCESS   0

Definition at line 71 of file pace.h.

Referenced by grInitMouse(), and gxCreateVirtual().

#define gxVGA_13   1

Definition at line 64 of file pace.h.

Referenced by BigHardMe(), DispRck(), DispVA(), GV(), and HModel().

#define gxXOR   2

Definition at line 53 of file pace.h.

Referenced by gxPutImage(), and StepAnim().


Function Documentation

int bioskey ( int  wait  ) 

Definition at line 522 of file sdl.c.

int brandom ( int  limit  ) 

void bzdelay ( int  ticks  ) 

Referenced by News(), and Viewing().

void dbg ( char const *  fmt,
  ... 
)

void delay ( int  millisecs  ) 

Referenced by AsnCrew(), AstSel(), BadFileType(), BChoice(), Bre(), Budget(), ChangeStat(), CrewProb(), DamProb(), Draw_Mis_Stats(), EditAst(), EndGame(), FailureMode(), FakeWin(), FileAccess(), FutBad(), Future(), FutureCheck(), GetBlockName(), HardRequest(), Hospital(), HPurc(), IStat(), Limbo(), LMBld(), MCGraph(), MChoice(), MisCheck(), MisReq(), Moon(), NewEnd(), Prefs(), Programs(), RankMe(), Records(), Request(), RequestX(), Rush(), SatBld(), SecondHard(), ShowAstrosHist(), ShowPad(), ShowPrest(), ShowSpHist(), SpecialEnd(), Stat(), Train(), VAB(), and Viewing().

double get_time ( void   ) 

Definition at line 105 of file sdltest.c.

int getch ( void   ) 

Definition at line 525 of file pace.c.

References av_block(), bioskey(), and c.

void getcurdir ( int  drive,
char *  buf 
)

int getdisk ( void   ) 

void GetMouse_fast ( void   ) 

Definition at line 612 of file main.c.

References AL_CALL, av_step(), bioskey(), CloseEmUp(), gr_maybe_sync(), grGetMouseButtons(), grGetMouseCurPos(), grGetMousePressedPos(), Help(), IDT, IKEY, key, mousebuttons, oldx, oldy, x, XMAS, and y.

void gr_maybe_sync ( void   ) 

Definition at line 64 of file gr.c.

References av_sync(), and screen_dirty.

void gr_set_color_map ( unsigned char *  map  ) 

Definition at line 52 of file gr.c.

References pal.

void gr_sync ( void   ) 

Definition at line 58 of file gr.c.

References av_sync().

void grClearArea ( int  x1,
int  y1,
int  x2,
int  y2 
)

Definition at line 94 of file gr.c.

References av_need_update(), gr_bg_color, MAX_X, MAX_Y, screen, and y.

void grDrawLine ( int  x1,
int  y1,
int  x2,
int  y2 
)

Definition at line 224 of file gr.c.

References grLineTo(), and grMoveTo().

void grDrawRect ( int  x1,
int  y1,
int  x2,
int  y2,
int  mode 
)

Definition at line 204 of file gr.c.

References grLineTo(), grMoveTo(), and grOUTLINE.

int grGetMouseButtons ( void   ) 

Definition at line 23 of file gr.c.

References av_mouse_pressed_cur, and av_mouse_pressed_latched.

int grGetMouseCurPos ( int *  xp,
int *  yp 
)

Definition at line 41 of file gr.c.

References av_mouse_cur_x, and av_mouse_cur_y.

int grGetMousePressedPos ( int *  xp,
int *  yp 
)

Definition at line 33 of file gr.c.

References av_mouse_pressed_x, and av_mouse_pressed_y.

int grGetPixel ( int  x,
int  y 
) [inline]

Definition at line 231 of file gr.c.

References MAX_X, MAX_Y, and screen.

int grInitMouse ( void   ) 

Unknown function.

Deprecated:
This function is probably depricated

Definition at line 9 of file gr.c.

References gxSUCCESS.

void grLineRel ( int  x,
int  y 
)

Definition at line 191 of file gr.c.

References gr_cur_x, gr_cur_y, and grLineTo().

void grLineTo ( int  x,
int  y 
)

Definition at line 136 of file gr.c.

References gr_cur_x, gr_cur_y, gr_fg_color, grPutPixel(), swap, x, and y.

void grMoveRel ( int  x,
int  y 
)

Definition at line 197 of file gr.c.

References gr_cur_x, gr_cur_y, and grMoveTo().

void grMoveTo ( int  x,
int  y 
)

Definition at line 121 of file gr.c.

References gr_cur_x, and gr_cur_y.

void grPutPixel ( int  x,
int  y,
int  val 
) [inline]

Definition at line 128 of file gr.c.

References MAX_X, and screen.

void grSetBkColor ( int  color  ) 

set background color

Parameters:
color the color code to use

Definition at line 88 of file gr.c.

References gr_bg_color.

void grSetColor ( int  color  ) 

set foreground color

Parameters:
color the color code to use

Definition at line 78 of file gr.c.

References gr_fg_color.

void grSetMousePos ( int  x,
int  y 
)

Unknown function.

Deprecated:
This function is probably depricated

Definition at line 18 of file gr.c.

void gxClearDisplay ( int  ,
int   
)

Definition at line 107 of file gx.c.

References av_need_update(), MAX_X, MAX_Y, screen, and screen_dirty.

void gxClearVirtual ( GXHEADER hp,
int  a 
)

Definition at line 231 of file gx.c.

References GXHEADER::h, GXHEADER::vptr, and GXHEADER::w.

int gxCreateVirtual ( int  mode,
GXHEADER hp,
int  gxVGA_mode,
int  w,
int  h 
)

Definition at line 18 of file gx.c.

References gxSUCCESS, and xmalloc().

void gxDestroyVirtual ( GXHEADER hp  ) 

Definition at line 30 of file gx.c.

References GXHEADER::vptr.

void gxDisplayVirtual ( int  a,
int  b,
int  c,
int  d,
int  e,
GXHEADER hp,
int  f,
int  g 
)

Definition at line 158 of file gx.c.

References height, MAX_X, MAX_Y, screen, GXHEADER::vptr, and GXHEADER::w.

void gxGetImage ( GXHEADER hp,
int  a,
int  b,
int  c,
int  d,
int  e 
)

Definition at line 39 of file gx.c.

References MAX_X, MAX_Y, screen, GXHEADER::vptr, and GXHEADER::w.

void gxPutImage ( GXHEADER hp,
int  mode,
int  a,
int  b,
int  c 
)

Definition at line 66 of file gx.c.

References av_need_update(), gxSET, gxXOR, GXHEADER::h, MAX_X, MAX_Y, minn, screen, screen_dirty, GXHEADER::vptr, and GXHEADER::w.

void gxSetDisplayPalette ( char *  pal  ) 

Definition at line 192 of file gx.c.

void gxVirtualDisplay ( GXHEADER hp,
int  a,
int  b,
int  c,
int  d,
int  e,
int  f,
int  g 
)

Definition at line 118 of file gx.c.

References av_need_update(), height, MAX_X, MAX_Y, minn, screen, screen_dirty, GXHEADER::vptr, and GXHEADER::w.

void gxVirtualScale ( GXHEADER a,
GXHEADER b 
)

Definition at line 239 of file gx.c.

References GXHEADER::h, GXHEADER::vptr, and GXHEADER::w.

int gxVirtualSize ( int  mode,
int  w,
int  h 
)

Definition at line 12 of file gx.c.

void gxVirtualVirtual ( GXHEADER hp,
int  a,
int  b,
int  c,
int  d,
GXHEADER hp2,
int  x,
int  y,
int  mode 
)

Definition at line 197 of file gx.c.

References GXHEADER::vptr, and GXHEADER::w.

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.

References idle_loop_secs().

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.

References av_block(), get_time(), and gr_maybe_sync().

int inp ( int  port  ) 

void LMove ( void p  ) 

Definition at line 370 of file pace.c.

References DV(), GV(), gxPutImage(), gxSET, screen, and GXHEADER::vptr.

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

Definition at line 429 of file pace.c.

References CDEBUG4, CERROR3, CWARNING3, FT_AUDIO, get_time(), mm_audio_info(), mm_close(), mm_decode_audio(), mm_open_fp(), sOpen(), xmalloc(), and xrealloc().

void play_audio ( int  sidx,
int  mode 
)

Definition at line 537 of file pace.c.

References CINFO3, CWARNING4, load_audio_file(), name, PlayVoice(), seq_filename(), and audio_chunk::size.

void randomize ( void   ) 

Definition at line 383 of file pace.c.

References get_time().

int RLED_img ( void src,
void dest,
unsigned int  src_size,
int  w,
int  h 
)

Referenced by AI_Begin(), BigHardMe(), DrawFuture(), DrawPrefs(), DrawRush(), FutureCheck(), HModel(), LMPict(), Load_FUT_BUT(), Load_RD_BUT(), Moon(), NextTurn(), PadPict(), PlaceEquip(), PortPlace(), PresPict(), SatDraw(), StepAnim(), TopSecret(), and WaveFlagSetup().

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.

References frm_ftbl, and frm_tbl.

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

Definition at line 359 of file pace.c.

References DV(), GV(), gxPutImage(), gxSET, and GXHEADER::vptr.


Variable Documentation

char* letter_dat

Definition at line 107 of file pace.h.

int show_intro_flag

Definition at line 105 of file pace.h.

unsigned char XMAS

Definition at line 25 of file pace.h.


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