5 minute hack attempt to get @Goober5000 started - I'm not 100% about the file string handling.
Index: credits.cpp
===================================================================
--- credits.cpp (revision 7239)
+++ credits.cpp (working copy)
@@ -210,7 +210,7 @@
static int Credits_frametime; // frametime of credits_do_frame() loop in ms
static int Credits_last_time; // timestamp used to calc frametime (in ms)
static float Credits_counter;
-static int Credits_artwork_index;
+static int Credits_artwork_index = -1;
static int Credits_bmps[NUM_IMAGES];
char *Credit_text = NULL;
@@ -326,6 +326,11 @@
read_file_text("credits.tbl", CF_TYPE_TABLES);
reset_parse();
+ if ( optional_string( "$Start Image Index:" ) )
+ {
+ stuff_int( &Credits_artwork_index );
+ }
+
// keep reading everything in
strcpy(Credit_text, fs2_open_credit_text);
@@ -505,7 +510,10 @@
Buttons[EXIT_BUTTON][gr_screen.res].button.set_hotkey(KEY_CTRLED | KEY_ENTER);
Background_bitmap = bm_load(Credits_bitmap_fname[gr_screen.res]);
- Credits_artwork_index = rand() % NUM_IMAGES;
+ if ( Credits_artwork_index == -1 )
+ {
+ Credits_artwork_index = rand() % NUM_IMAGES;
+ }
for (i=0; i<NUM_IMAGES; i++){
Credits_bmps[i] = -1;
}
edit: Should mention that you put $Start Image Index: <integer> at the start of the table, and there's no bound checking done.
edit2: Should also mention that this hasn't really been tested...