View Issue Details

IDProjectCategoryView StatusLast Update
0002453FSSCPuser interfacepublic2011-06-13 03:42
ReporterMjnMixael Assigned ToGoober5000  
PrioritynormalSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
Summary0002453: Credits Slideshow Control.
DescriptionI was hoping to get a little more control for the credits screen.

Basically, the images currently are chosen at random.. sorta of. I watched it a couple different times and checked out the code. I'm pretty sure that currently FSO chooses one random start image index and the plays through the credits images in sequence. I'm 99% sure this is the way it works.

I'm thinking to simply add a check for a flag in the credits table (say.. $Start Image Index) where if the flag exists use that as the starting index, but if the flag is not present, go ahead and use the rand function (like it currently does).

http://www.hard-light.net/forums/index.php?topic=76598.msg1520729#msg1520729
TagsNo tags attached.

Activities

2011-06-13 01:50

 

creditstblformjnmixael.patch (1,158 bytes)   
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;
 	}
creditstblformjnmixael.patch (1,158 bytes)   

portej05

2011-06-13 01:50

reporter   ~0012712

Attached first effort on this.

Goober5000

2011-06-13 03:41

administrator   ~0012713

Last edited: 2011-06-13 03:42

Committed this (albeit not portej05's version) in r7240.

Issue History

Date Modified Username Field Change
2011-06-10 22:47 MjnMixael New Issue
2011-06-13 01:50 portej05 File Added: creditstblformjnmixael.patch
2011-06-13 01:50 portej05 Note Added: 0012712
2011-06-13 03:41 Goober5000 Note Added: 0012713
2011-06-13 03:42 Goober5000 Assigned To => Goober5000
2011-06-13 03:42 Goober5000 Status new => resolved
2011-06-13 03:42 Goober5000 Resolution open => fixed
2011-06-13 03:42 Goober5000 Note Edited: 0012713