Mercurial > mm7
comparison Engine/MMT.cpp @ 2564:f9bdfe26d03d
.
author | a.parshin |
---|---|
date | Wed, 20 May 2015 00:56:07 +0200 |
parents | c674d547cc7c |
children | d87bfbd3bb3b |
comparison
equal
deleted
inserted
replaced
2563:65c97624c047 | 2564:f9bdfe26d03d |
---|---|
22 bool FileExists(const char *fname) | 22 bool FileExists(const char *fname) |
23 { | 23 { |
24 return access(fname, 0) != -1; | 24 return access(fname, 0) != -1; |
25 } | 25 } |
26 | 26 |
27 void ShowLogoVideo() | 27 void ShowLogoVideo() |
28 { | 28 { |
29 RGBTexture tex; // [sp+Ch] [bp-30h]@1 | |
30 unsigned int uTrackStartMS; // [sp+34h] [bp-8h]@8 | |
31 unsigned int uTrackEndMS; // [sp+38h] [bp-4h]@8 | |
32 | |
33 pMediaPlayer->bStopBeforeSchedule = false; | 29 pMediaPlayer->bStopBeforeSchedule = false; |
34 | 30 |
35 // pMediaPlayer->pResetflag = 0; | 31 // pMediaPlayer->pResetflag = 0; |
36 bGameoverLoop = 1; | 32 bGameoverLoop = 1; |
37 if (!bNoVideo) | 33 if (!bNoVideo) |
54 } | 50 } |
55 } | 51 } |
56 } | 52 } |
57 } | 53 } |
58 | 54 |
59 if (use_MMT) | |
60 tex.LoadPCXFile("data/New_Icons/MMTTITLE.pcx", 0); | |
61 else | |
62 tex.Load("mm6title.pcx", 2); | |
63 | |
64 pRenderer->ResetUIClipRect(); | |
65 pRenderer->BeginScene(); | |
66 { | |
67 pRenderer->DrawTextureNew(0, 0, &tex); | |
68 } | |
69 pRenderer->EndScene(); | |
70 pRenderer->Present(); | |
71 | |
72 tex.Release(); | |
73 | |
74 MainMenuUI_LoadFontsAndSomeStuff(); | |
75 | |
76 pRenderer->BeginScene(); | |
77 if (use_MMT) | |
78 DrawMMTCopyrightWindow(); | |
79 else | |
80 DrawMM7CopyrightWindow(); | |
81 | |
82 pRenderer->EndScene(); | |
83 pRenderer->Present(); | |
84 | |
85 #ifdef NDEBUG | |
86 Sleep(1500); // let the copyright window stay for a while | |
87 #endif | |
88 | |
89 if (!use_MMT) | |
90 { | |
91 if (!bNoSound && pAudioPlayer->hAILRedbook ) | |
92 { | |
93 if ( use_music_folder ) | |
94 { | |
95 if (!FileExists("Music\\14.mp3")) | |
96 { | |
97 Log::Warning(L"File 14.mp3 in Music\\ folder not found"); | |
98 //Error("File 14.mp3 in Music\\ folder not found"); | |
99 return; | |
100 } | |
101 PlayAudio(L"Music\\14.mp3"); | |
102 alSourcef (mSourceID, AL_GAIN, pSoundVolumeLevels[uMusicVolimeMultiplier]); | |
103 } | |
104 else | |
105 { | |
106 pAudioPlayer->SetMusicVolume((signed __int64)(pSoundVolumeLevels[uMusicVolimeMultiplier] * 64.0)); | |
107 AIL_redbook_stop(pAudioPlayer->hAILRedbook); | |
108 AIL_redbook_track_info(pAudioPlayer->hAILRedbook, 14, &uTrackStartMS, &uTrackEndMS); | |
109 AIL_redbook_play(pAudioPlayer->hAILRedbook, uTrackStartMS + 1, uTrackEndMS); | |
110 } | |
111 } | |
112 } | |
113 bGameoverLoop = 0; | 55 bGameoverLoop = 0; |
114 } | 56 } |
115 | 57 |
116 | 58 |
117 Texture *LoadPNG(const char *name) | 59 Texture *LoadPNG(const char *name) |