-
-
Save Nuc1eoN/bb38324256e43d5f3b2f to your computer and use it in GitHub Desktop.
pascal error (begin expected)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
procedure InitializeWizard; | |
// mp3 background music | |
procedure MusicPlayback; | |
var | |
ErrorCode: HRESULT; | |
ErrorText: WideString; | |
begin | |
ExtractTemporaryFile('InDeep.mp3'); | |
if DSInitializeAudioFile(ExpandConstant('{tmp}\InDeep.mp3'), | |
@OnMediaPlayerEvent) then | |
begin | |
DSSetVolume(-2500); | |
DSPlayMediaFile; | |
end | |
else | |
begin | |
ErrorCode := DSGetLastError(ErrorText); | |
MsgBox('TDirectShowPlayer error: ' + IntToStr(ErrorCode) + '; ' + | |
ErrorText, mbError, MB_OK); | |
end; | |
end; | |
// Fullscreen Background Image | |
procedure BackgroundImage; | |
var | |
BackgroundBitmapImage: TBitmapImage; | |
BmpFileName: String; | |
begin | |
BmpFileName := ExpandConstant('{tmp}\Red Alert 2 wallpaper.bmp'); | |
if | |
not FileExists(BmpFileName) | |
then | |
ExtractTemporaryFile(ExtractFileName(BmpFileName)); | |
BackgroundBitmapImage := TBitmapImage.Create(MainForm); | |
BackgroundBitmapImage.Align := alClient; | |
BackgroundBitmapImage.Stretch := True; | |
BackgroundBitmapImage.Bitmap.LoadFromFile(BmpFileName); | |
BackgroundBitmapImage.Parent := MainForm; | |
WizardForm.Caption := MainForm.Caption; | |
end; | |
begin | |
MusicPlayback; | |
BackgroundImage; | |
end; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment