This repository was archived by the owner on Apr 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModule.bas
More file actions
executable file
·69 lines (69 loc) · 3.28 KB
/
Copy pathModule.bas
File metadata and controls
executable file
·69 lines (69 loc) · 3.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
Attribute VB_Name = "Module"
Public AppVersion As String, InternalVersion As String
Public Locale As String
Public ConfigFolder As String
Public DesktopFolder As String
Public LevelFolder As String
Public LocaleSuffix As String
Public OperateType As Integer
Public PageNum As Integer
Public OLWebIP, OLAPIIP As String
Public IsSFXEnable As Boolean
Public IsBGMEnable As Boolean
Public IsPreloadEnable As Boolean
Public ProxyDlSuffix As String
Public ConstStr() As String
Public MirrorList() As String
Public LocalizedVals() As String
Public GameLabel() As String
Public MsgBoxType As String
Public IsLoading As Boolean
Public IsSearching As Boolean
Public DownloadMethod As Integer
Public UseMirror As String
Public MundialesSort As Boolean
Public MirrorlistTmp() As String
Public Declare Function InitCommonControls Lib "Comctl32.dll" () As Long
Public Declare Function SetWindowPos Lib "user32" (ByVal hWnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal Cx As Long, ByVal Cy As Long, ByVal wFlags As Long) As Long
Public Declare Function dcWaitForSingleObject Lib "kernel32" Alias "WaitForSingleObject" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long
Public Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Public Const SYNCHRONIZE = &H100000
Public Declare Function SetParent Lib "user32.dll" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Public Declare Function AddFontResourceEx Lib "gdi32" Alias "AddFontResourceExA" (ByVal sFileName As String, ByVal lFlags As Long, ByVal lReserved As Long) As Long
Public Declare Function RemoveFontResourceEx Lib "gdi32" Alias "RemoveFontResourceExA" (ByVal sFileName As String, ByVal lFlags As Long, ByVal lReserved As Long) As Long
Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Public Declare Function DeleteUrlCacheEntry Lib "wininet.dll" Alias "DeleteUrlCacheEntryA" (ByVal lpszUrlName As String) As Long
Public Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
Public Const FR_PRIVATE As Long = &H10
Public Sub ShowMsgBox(MsgType As String)
MsgBoxType = MsgType
frmMsgBox.Show
frmMsgBox.Top = frmMain.Top + 8500
frmMsgBox.Left = frmMain.Left + 12000
End Sub
Public Sub PlayMusic(MusicFileName As String)
If IsBGMEnable Then
'Load Music
Mix_HaltMusic 'Stop previous
Mix_FreeMusic music
music = Mix_LoadMUS(App.Path & "\Assets\" & MusicFileName) 'Open new music
'Starting of music playback
Mix_PlayMusic music, -1
End If
End Sub
Public Sub PlaySFX(MusicFileName As String)
If IsSFXEnable Then
'Load Music
sfx = Mix_LoadWAV(App.Path & "\Assets\" & MusicFileName)
'Starting of music playback
Mix_PlayChannel -1, sfx, 0
End If
End Sub
Public Function CheckFileExists(FilePath As String) As Boolean
On Error GoTo ERR
If Len(FilePath) < 2 Then CheckFileExists = False: Exit Function
If Dir$(FilePath, vbAllFileAttrib) <> vbNullString Then CheckFileExists = True
Exit Function
ERR:
CheckFileExists = False
End Function