Don't reload the title screen image every frame
This commit is contained in:
parent
191c85a63f
commit
21317a5d31
1 changed files with 6 additions and 1 deletions
|
@ -527,9 +527,13 @@ local void ShowTitleScreens(void)
|
|||
if (PlayMovie(TitleScreens[i]->File,
|
||||
PlayMovieZoomScreen | PlayMovieKeepAspect)) {
|
||||
TitleScreenLabel** labels;
|
||||
Graphic* g;
|
||||
|
||||
g = LoadGraphic(TitleScreens[i]->File);
|
||||
ResizeGraphic(g, VideoWidth, VideoHeight);
|
||||
while (timeout-- && WaitNoEvent) {
|
||||
DisplayPicture(TitleScreens[i]->File);
|
||||
VideoDrawSubClip(g, 0, 0, g->Width, g->Height,
|
||||
(VideoWidth - g->Width) / 2, (VideoHeight - g->Height) / 2);
|
||||
labels = TitleScreens[i]->Labels;
|
||||
if (labels && labels[0] && IsFontLoaded(labels[0]->Font)) {
|
||||
for (j = 0; labels[j]; ++j) {
|
||||
|
@ -545,6 +549,7 @@ local void ShowTitleScreens(void)
|
|||
RealizeVideoMemory();
|
||||
WaitEventsOneFrame(&callbacks);
|
||||
}
|
||||
VideoFree(g);
|
||||
}
|
||||
|
||||
VideoClearScreen();
|
||||
|
|
Loading…
Add table
Reference in a new issue