/* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE. COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. */ /* * * Routines to display the credits. * */ #include #include #include #include #include #include "error.h" #include "pstypes.h" #include "gr.h" #include "key.h" #include "palette.h" #include "game.h" #include "gamepal.h" #include "timer.h" #include "gamefont.h" #include "pcx.h" #include "screens.h" #include "digi.h" #include "cfile.h" #include "rbaudio.h" #include "text.h" #include "songs.h" #include "menu.h" #define ROW_SPACING (SHEIGHT / 17) #define NUM_LINES 20 //14 #define CREDITS_FILE (cfexist("mcredits.tex")?"mcredits.tex":cfexist("ocredits.tex")?"ocredits.tex":"credits.tex") #ifdef SHAREWARE #define ALLOWED_CHAR 'S' #else #define ALLOWED_CHAR 'R' #endif //if filename passed is NULL, show normal credits void credits_show(char *credits_filename) { CFILE * file; int i, j, l, done; int pcx_error; int buffer_line = 0; int first_line_offset; int extra_inc=0; int have_bin_file = 0; char * tempp; char filename[32]; char buffer[NUM_LINES][80]; ubyte backdrop_palette[768]; grs_bitmap backdrop; grs_canvas *CreditsOffscreenBuf=NULL; // Clear out all tex buffer lines. for (i=0; i0)||(done>NUM_LINES)) { gr_free_bitmap_data (&backdrop); cfclose(file); songs_play_song( SONG_TITLE, 1 ); gr_free_sub_canvas(CreditsOffscreenBuf); return; } } } }