void finish(void) { killsound(); soundoff(); soundkillglob(); restorekeyb(); graphicsoff(); }
void playb_close (void) { soundoff (); #ifndef __ZTC__ setvect (TIMER_TICK_INTR, n_oldtmint); #else int_restore(TIMER_TICK_INTR); #endif free (n_buff); }
static int play_intr (struct INT_DATA *idp) #endif { int_off (); #ifndef __ZTC__ (*n_oldtmint) (); /* Call Old timer interrupt. */ #else int_prev(idp); #endif if (play_duration == 0) { soundoff (); if (++n_head == (n_buff + n_buff_sz)) n_head = n_buff; if (n_head == n_tail) { --n_head; int_on (); return; } play_duration = n_head->duration; if (0 != (play_freq = n_head->freq)) soundon(); dosound (play_freq); } else --play_duration; int_on (); #ifdef __ZTC__ return 1; /* Don't chain */ #endif }
main() { int i; #ifdef BILL BillMode = 1; #endif terminit(); for(i=0;i<MAXGAMES;i++) { Highscore[i] = 0; MaxWave[i] = 0; } Lastscore = -1; #ifdef HOSTCODE getscores(); #endif VolumeControl = 8; Abort = FALSE; Silent = FALSE; Running = TRUE; Paused = FALSE; Newgame = 0; /* * For each game played... */ while ( Running ) { /* * For each new wave... */ newgame(); while ( Pacmen > 0 && Running ) { newwave(); /* * For each game scan... */ while ( Dotsrem > 0 ) { /* * If the Pacman died, start a new one. */ if ( !Pacman.alive ) { addmen(-1); if ( Pacmen <= 0 ) break; elinit(); if ( Wallsoff ) { compwalls(); Wallsoff = FALSE; } pacinit(); moninit(); fruitinit(FALSE); } do { kbpoll(); } while ( Paused && Newgame==0); if ( Abort || Newgame ) break; elpoll(); } soundoff(); if ( Abort || Newgame ) break; paccomp(); moncomp(); fruitcomp(); soundoff(); } if (Game != 0) { #ifdef HOSTCODE sndhost ("%s%s%d\n%s%D %D\n", SYNCSTRING, GAMESTRING, Game, SCORESTRING, (long)Score, (long)KEY); #endif Lastscore = Score; if ( Score > Highscore[Game-1] ) { Highscore[Game-1] = Score; MaxWave[Game-1] = Wave; } } if ( Abort ) break; } #ifdef HOSTCODE sndhost ("%s", EXITSTRING); #endif termwrapup(); }