mirror of
https://github.com/kevinbentley/Descent3.git
synced 2025-01-22 11:28:56 +00:00
Add oscredits.txt to credit lines
This commit is contained in:
parent
2c8081e832
commit
0d1265ce35
@ -154,12 +154,6 @@ static bool Credits_LoadCredits(const char *filename, std::vector<creditline> &c
|
||||
return false;
|
||||
}
|
||||
|
||||
for (int i = 0; i < 27; i++) {
|
||||
// Generate blank lines for the start
|
||||
cur_credit.type = CLTYPE_BLANK;
|
||||
credit_lines.push_back(cur_credit);
|
||||
}
|
||||
|
||||
// Read in each line of the credit file, allocing memory and putting it into a correct category
|
||||
while (!cfeof(infile)) {
|
||||
cf_ReadString(curline, MAX_CREDIT_LEN, infile);
|
||||
@ -238,10 +232,6 @@ static bool Credits_LoadCredits(const char *filename, std::vector<creditline> &c
|
||||
}
|
||||
}
|
||||
}
|
||||
// End directive to be sure
|
||||
cur_credit.type = CLTYPE_END;
|
||||
cur_credit.text = "";
|
||||
credit_lines.push_back(cur_credit);
|
||||
|
||||
cfclose(infile);
|
||||
return true;
|
||||
@ -274,10 +264,32 @@ void Credits_Display() {
|
||||
LOG_INFO << "Chillin in credits";
|
||||
|
||||
std::vector<creditline> credit_lines;
|
||||
|
||||
// Generate blank lines for the start
|
||||
creditline cur_credit;
|
||||
cur_credit.type = CLTYPE_BLANK;
|
||||
for (int i = 0; i < 27; i++) {
|
||||
credit_lines.push_back(cur_credit);
|
||||
}
|
||||
|
||||
// Load our credits
|
||||
if (!Credits_LoadCredits("GameCredits.txt", credit_lines)) {
|
||||
if (!Credits_LoadCredits("gamecredits.txt", credit_lines) || !Credits_LoadCredits("oscredits.txt", credit_lines)) {
|
||||
LOG_WARNING << "There was an error loading game credits!";
|
||||
} else {
|
||||
// Free bitmaps
|
||||
bm_DestroyChunkedBitmap(&Credits_bm);
|
||||
|
||||
// end the music.
|
||||
D3MusicStop();
|
||||
ddio_KeyFlush();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// End directive to be sure
|
||||
cur_credit.type = CLTYPE_END;
|
||||
cur_credit.text = "";
|
||||
credit_lines.push_back(cur_credit);
|
||||
|
||||
auto credit = credit_lines.begin();
|
||||
|
||||
int font_height = grfont_GetHeight(BIG_BRIEFING_FONT);
|
||||
@ -322,7 +334,6 @@ void Credits_Display() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Free bitmaps
|
||||
bm_DestroyChunkedBitmap(&Credits_bm);
|
||||
|
Loading…
Reference in New Issue
Block a user