├── Typing ├── Script Files │ ├── Setup.isr │ ├── setup.brk │ ├── Setup.dbg │ ├── Setup.inx │ ├── Setup.obs │ ├── Setup.Rul │ └── Setup.map └── Install Files │ └── Database │ ├── keys.mdb │ ├── words.mdb │ └── ranking.mdb ├── Typing.rc ├── resource.h ├── resources ├── icon.ico ├── sound1.wav ├── sound2.wav ├── sound3.wav ├── sound4.wav ├── sound5.wav ├── sound6.wav └── MPLUSRounded1c-Bold.ttf ├── README.md ├── LICENSE.TXT ├── Typing.sln ├── Typing.vcxproj.filters ├── .gitattributes ├── .gitignore ├── Typing.vcxproj └── Source.cpp /Typing/Script Files/Setup.isr: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Typing/Script Files/setup.brk: -------------------------------------------------------------------------------- 1 | 1.0.0.0 2 | -------------------------------------------------------------------------------- /Typing.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kenjinote/Typing/HEAD/Typing.rc -------------------------------------------------------------------------------- /resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kenjinote/Typing/HEAD/resource.h -------------------------------------------------------------------------------- /resources/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kenjinote/Typing/HEAD/resources/icon.ico -------------------------------------------------------------------------------- /resources/sound1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kenjinote/Typing/HEAD/resources/sound1.wav -------------------------------------------------------------------------------- /resources/sound2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kenjinote/Typing/HEAD/resources/sound2.wav -------------------------------------------------------------------------------- /resources/sound3.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kenjinote/Typing/HEAD/resources/sound3.wav -------------------------------------------------------------------------------- /resources/sound4.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kenjinote/Typing/HEAD/resources/sound4.wav -------------------------------------------------------------------------------- /resources/sound5.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kenjinote/Typing/HEAD/resources/sound5.wav -------------------------------------------------------------------------------- /resources/sound6.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kenjinote/Typing/HEAD/resources/sound6.wav -------------------------------------------------------------------------------- /Typing/Script Files/Setup.dbg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kenjinote/Typing/HEAD/Typing/Script Files/Setup.dbg -------------------------------------------------------------------------------- /Typing/Script Files/Setup.inx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kenjinote/Typing/HEAD/Typing/Script Files/Setup.inx -------------------------------------------------------------------------------- /Typing/Script Files/Setup.obs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kenjinote/Typing/HEAD/Typing/Script Files/Setup.obs -------------------------------------------------------------------------------- /resources/MPLUSRounded1c-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kenjinote/Typing/HEAD/resources/MPLUSRounded1c-Bold.ttf -------------------------------------------------------------------------------- /Typing/Install Files/Database/keys.mdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kenjinote/Typing/HEAD/Typing/Install Files/Database/keys.mdb -------------------------------------------------------------------------------- /Typing/Install Files/Database/words.mdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kenjinote/Typing/HEAD/Typing/Install Files/Database/words.mdb -------------------------------------------------------------------------------- /Typing/Install Files/Database/ranking.mdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kenjinote/Typing/HEAD/Typing/Install Files/Database/ranking.mdb -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Typing 2 | 3 | 日本語のタイピングゲームです。60秒間にどれだけタイプできるかを競います。ランキング機能付き。 4 | 5 | ![image](https://user-images.githubusercontent.com/2605401/183997362-d44f84a7-570d-4b48-99d7-6be3fb9a1d75.png) 6 | -------------------------------------------------------------------------------- /LICENSE.TXT: -------------------------------------------------------------------------------- 1 | MIT License (MIT) 2 | 3 | Copyright (c) 2021 kenjinote (hack.jp) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Typing.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25123.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Typing", "Typing.vcxproj", "{D327119E-D676-4F87-B0AF-08D64AE6AC1A}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {D327119E-D676-4F87-B0AF-08D64AE6AC1A}.Debug|x64.ActiveCfg = Debug|x64 17 | {D327119E-D676-4F87-B0AF-08D64AE6AC1A}.Debug|x64.Build.0 = Debug|x64 18 | {D327119E-D676-4F87-B0AF-08D64AE6AC1A}.Debug|x86.ActiveCfg = Debug|Win32 19 | {D327119E-D676-4F87-B0AF-08D64AE6AC1A}.Debug|x86.Build.0 = Debug|Win32 20 | {D327119E-D676-4F87-B0AF-08D64AE6AC1A}.Release|x64.ActiveCfg = Release|x64 21 | {D327119E-D676-4F87-B0AF-08D64AE6AC1A}.Release|x64.Build.0 = Release|x64 22 | {D327119E-D676-4F87-B0AF-08D64AE6AC1A}.Release|x86.ActiveCfg = Release|Win32 23 | {D327119E-D676-4F87-B0AF-08D64AE6AC1A}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /Typing.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 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 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /Typing/Script Files/Setup.Rul: -------------------------------------------------------------------------------- 1 | //=========================================================================== 2 | // 3 | // File Name: Setup.rul 4 | // 5 | // Description: Blank setup main script file 6 | // 7 | // Comments: Blank setup is an empty setup project. If you want to 8 | // create a new project via. step-by step instructions use the 9 | // Project Assistant. 10 | // 11 | //=========================================================================== 12 | 13 | // Included header files ---------------------------------------------------- 14 | #include "ifx.h" 15 | 16 | 17 | //--------------------------------------------------------------------------- 18 | // OnFirstUIBefore 19 | // 20 | // First Install UI Sequence - Before Move Data 21 | // 22 | // The OnFirstUIBefore event is called by OnShowUI when the setup is 23 | // running in first install mode. By default this event displays UI allowing 24 | // the end user to specify installation parameters. 25 | // 26 | // Note: This event will not be called automatically in a 27 | // program...endprogram style setup. 28 | //--------------------------------------------------------------------------- 29 | function OnFirstUIBefore() 30 | number nResult, nLevel, nSize, nSetupType; 31 | string szTitle, szMsg, szOpt1, szOpt2, szLicenseFile; 32 | string szName, szCompany, szTargetPath, szDir, szFeatures; 33 | BOOL bLicenseAccepted; 34 | begin 35 | 36 | // Added in InstallShield 15 - Show an appropriate error message if 37 | // -removeonly is specified and the product is not installed. 38 | if( REMOVEONLY ) then 39 | Disable( DIALOGCACHE ); 40 | szMsg = SdLoadString( IDS_IFX_ERROR_PRODUCT_NOT_INSTALLED_UNINST ); 41 | SdSubstituteProductInfo( szMsg ); 42 | MessageBox( szMsg, SEVERE ); 43 | abort; 44 | endif; 45 | 46 | nSetupType = COMPLETE; 47 | szDir = TARGETDIR; 48 | szName = ""; 49 | szCompany = ""; 50 | bLicenseAccepted = FALSE; 51 | 52 | 53 | FeatureSetTarget(MEDIA, "", FOLDER_COMMON_APPDATA ^ "Typing"); 54 | 55 | // Beginning of UI Sequence 56 | Dlg_Start: 57 | nResult = 0; 58 | 59 | Dlg_SdWelcome: 60 | szTitle = ""; 61 | szMsg = ""; 62 | //{{IS_SCRIPT_TAG(Dlg_SdWelcome) 63 | nResult = SdWelcome( szTitle, szMsg ); 64 | //}}IS_SCRIPT_TAG(Dlg_SdWelcome) 65 | if (nResult = BACK) goto Dlg_Start; 66 | 67 | Dlg_SdLicense2: 68 | szTitle = ""; 69 | szOpt1 = ""; 70 | szOpt2 = ""; 71 | //{{IS_SCRIPT_TAG(License_File_Path) 72 | szLicenseFile = SUPPORTDIR ^ "License.rtf"; 73 | //}}IS_SCRIPT_TAG(License_File_Path) 74 | //{{IS_SCRIPT_TAG(Dlg_SdLicense2) 75 | //nResult = SdLicense2Ex( szTitle, szOpt1, szOpt2, szLicenseFile, bLicenseAccepted, TRUE ); 76 | //}}IS_SCRIPT_TAG(Dlg_SdLicense2) 77 | if (nResult = BACK) then 78 | goto Dlg_SdWelcome; 79 | else 80 | bLicenseAccepted = TRUE; 81 | endif; 82 | 83 | Dlg_SdRegisterUser: 84 | szMsg = ""; 85 | szTitle = ""; 86 | //{{IS_SCRIPT_TAG(Dlg_SdRegisterUser) 87 | //nResult = SdRegisterUser( szTitle, szMsg, szName, szCompany ); 88 | //}}IS_SCRIPT_TAG(Dlg_SdRegisterUser) 89 | if (nResult = BACK) goto Dlg_SdLicense2; 90 | 91 | Dlg_SetupType2: 92 | szTitle = ""; 93 | szMsg = ""; 94 | nResult = CUSTOM; 95 | //{{IS_SCRIPT_TAG(Dlg_SetupType2) 96 | //nResult = SetupType2( szTitle, szMsg, "", nSetupType, 0 ); 97 | //}}IS_SCRIPT_TAG(Dlg_SetupType2) 98 | if (nResult = BACK) then 99 | goto Dlg_SdRegisterUser; 100 | else 101 | nSetupType = nResult; 102 | if (nSetupType != CUSTOM) then 103 | szTargetPath = TARGETDIR; 104 | nSize = 0; 105 | FeatureCompareSizeRequired( MEDIA, szTargetPath, nSize ); 106 | if (nSize != 0) then 107 | MessageBox( szSdStr_NotEnoughSpace, WARNING ); 108 | goto Dlg_SetupType2; 109 | endif; 110 | endif; 111 | endif; 112 | 113 | Dlg_SdAskDestPath2: 114 | if ((nResult = BACK) && (nSetupType != CUSTOM)) goto Dlg_SetupType2; 115 | szTitle = ""; 116 | szMsg = ""; 117 | if (nSetupType = CUSTOM) then 118 | //{{IS_SCRIPT_TAG(Dlg_SdAskDestPath2) 119 | //nResult = SdAskDestPath2( szTitle, szMsg, szDir ); 120 | //}}IS_SCRIPT_TAG(Dlg_SdAskDestPath2) 121 | TARGETDIR = szDir; 122 | endif; 123 | if (nResult = BACK) goto Dlg_SetupType2; 124 | 125 | Dlg_SdFeatureTree: 126 | if ((nResult = BACK) && (nSetupType != CUSTOM)) goto Dlg_SdAskDestPath2; 127 | szTitle = ""; 128 | szMsg = ""; 129 | szFeatures = ""; 130 | nLevel = 2; 131 | if (nSetupType = CUSTOM) then 132 | //{{IS_SCRIPT_TAG(Dlg_SdFeatureTree) 133 | //nResult = SdFeatureTree( szTitle, szMsg, TARGETDIR, szFeatures, nLevel ); 134 | //}}IS_SCRIPT_TAG(Dlg_SdFeatureTree) 135 | if (nResult = BACK) goto Dlg_SdAskDestPath2; 136 | endif; 137 | 138 | Dlg_SQLServer: 139 | nResult = OnSQLServerInitialize( nResult ); 140 | if( nResult = BACK ) goto Dlg_SdFeatureTree; 141 | 142 | Dlg_ObjDialogs: 143 | nResult = ShowObjWizardPages( nResult ); 144 | if (nResult = BACK) goto Dlg_SQLServer; 145 | 146 | Dlg_SdStartCopy2: 147 | szTitle = ""; 148 | szMsg = ""; 149 | //{{IS_SCRIPT_TAG(Dlg_SdStartCopy2) 150 | nResult = SdStartCopy2( szTitle, szMsg ); 151 | //}}IS_SCRIPT_TAG(Dlg_SdStartCopy2) 152 | if (nResult = BACK) goto Dlg_ObjDialogs; 153 | 154 | // Added in 11.0 - Set appropriate StatusEx static text. 155 | SetStatusExStaticText( SdLoadString( IDS_IFX_STATUSEX_STATICTEXT_FIRSTUI ) ); 156 | 157 | return 0; 158 | end; 159 | 160 | //--------------------------------------------------------------------------- 161 | // OnFirstUIAfter 162 | // 163 | // First Install UI Sequence - After Move Data 164 | // 165 | // The OnFirstUIAfter event called by OnShowUI after the file transfer 166 | // of the setup when the setup is running in first install mode. By default 167 | // this event displays UI that informs the end user that the setup has been 168 | // completed successfully. 169 | // 170 | // Note: This event will not be called automatically in a 171 | // program...endprogram style setup. 172 | //--------------------------------------------------------------------------- 173 | function OnFirstUIAfter() 174 | STRING szTitle, szMsg1, szMsg2, szOpt1, szOpt2; 175 | NUMBER bvOpt1, bvOpt2; 176 | begin 177 | 178 | SetObjectPermissions (FOLDER_COMMON_APPDATA ^ "Typing", IS_PERMISSIONS_TYPE_FOLDER, "", "Everyone", GENERIC_ALL, IS_PERMISSIONS_OPTION_ALLOW_ACCESS); 179 | 180 | ShowObjWizardPages(NEXT); 181 | 182 | szTitle = ""; 183 | szMsg1 = ""; 184 | szMsg2 = ""; 185 | szOpt1 = ""; 186 | szOpt2 = ""; 187 | bvOpt1 = FALSE; 188 | bvOpt2 = FALSE; 189 | 190 | //{{IS_SCRIPT_TAG(Dlg_SdDinishEx) 191 | if ( BATCH_INSTALL ) then 192 | SdFinishReboot ( szTitle , szMsg1 , SYS_BOOTMACHINE , szMsg2 , 0 ); 193 | else 194 | SdFinish ( szTitle , szMsg1 , szMsg2 , szOpt1 , szOpt2 , bvOpt1 , bvOpt2 ); 195 | endif; 196 | //}}IS_SCRIPT_TAG(Dlg_SdDinishEx) 197 | end; 198 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Ww][Ii][Nn]32/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Oo]ut/ 33 | [Ll]og/ 34 | [Ll]ogs/ 35 | 36 | # Visual Studio 2015/2017 cache/options directory 37 | .vs/ 38 | # Uncomment if you have tasks that create the project's static files in wwwroot 39 | #wwwroot/ 40 | 41 | # Visual Studio 2017 auto generated files 42 | Generated\ Files/ 43 | 44 | # MSTest test Results 45 | [Tt]est[Rr]esult*/ 46 | [Bb]uild[Ll]og.* 47 | 48 | # NUnit 49 | *.VisualState.xml 50 | TestResult.xml 51 | nunit-*.xml 52 | 53 | # Build Results of an ATL Project 54 | [Dd]ebugPS/ 55 | [Rr]eleasePS/ 56 | dlldata.c 57 | 58 | # Benchmark Results 59 | BenchmarkDotNet.Artifacts/ 60 | 61 | # .NET Core 62 | project.lock.json 63 | project.fragment.lock.json 64 | artifacts/ 65 | 66 | # ASP.NET Scaffolding 67 | ScaffoldingReadMe.txt 68 | 69 | # StyleCop 70 | StyleCopReport.xml 71 | 72 | # Files built by Visual Studio 73 | *_i.c 74 | *_p.c 75 | *_h.h 76 | *.ilk 77 | *.meta 78 | *.obj 79 | *.iobj 80 | *.pch 81 | *.pdb 82 | *.ipdb 83 | *.pgc 84 | *.pgd 85 | *.rsp 86 | *.sbr 87 | *.tlb 88 | *.tli 89 | *.tlh 90 | *.tmp 91 | *.tmp_proj 92 | *_wpftmp.csproj 93 | *.log 94 | *.vspscc 95 | *.vssscc 96 | .builds 97 | *.pidb 98 | *.svclog 99 | *.scc 100 | 101 | # Chutzpah Test files 102 | _Chutzpah* 103 | 104 | # Visual C++ cache files 105 | ipch/ 106 | *.aps 107 | *.ncb 108 | *.opendb 109 | *.opensdf 110 | *.sdf 111 | *.cachefile 112 | *.VC.db 113 | *.VC.VC.opendb 114 | 115 | # Visual Studio profiler 116 | *.psess 117 | *.vsp 118 | *.vspx 119 | *.sap 120 | 121 | # Visual Studio Trace Files 122 | *.e2e 123 | 124 | # TFS 2012 Local Workspace 125 | $tf/ 126 | 127 | # Guidance Automation Toolkit 128 | *.gpState 129 | 130 | # ReSharper is a .NET coding add-in 131 | _ReSharper*/ 132 | *.[Rr]e[Ss]harper 133 | *.DotSettings.user 134 | 135 | # TeamCity is a build add-in 136 | _TeamCity* 137 | 138 | # DotCover is a Code Coverage Tool 139 | *.dotCover 140 | 141 | # AxoCover is a Code Coverage Tool 142 | .axoCover/* 143 | !.axoCover/settings.json 144 | 145 | # Coverlet is a free, cross platform Code Coverage Tool 146 | coverage*.json 147 | coverage*.xml 148 | coverage*.info 149 | 150 | # Visual Studio code coverage results 151 | *.coverage 152 | *.coveragexml 153 | 154 | # NCrunch 155 | _NCrunch_* 156 | .*crunch*.local.xml 157 | nCrunchTemp_* 158 | 159 | # MightyMoose 160 | *.mm.* 161 | AutoTest.Net/ 162 | 163 | # Web workbench (sass) 164 | .sass-cache/ 165 | 166 | # Installshield output folder 167 | [Ee]xpress/ 168 | 169 | # DocProject is a documentation generator add-in 170 | DocProject/buildhelp/ 171 | DocProject/Help/*.HxT 172 | DocProject/Help/*.HxC 173 | DocProject/Help/*.hhc 174 | DocProject/Help/*.hhk 175 | DocProject/Help/*.hhp 176 | DocProject/Help/Html2 177 | DocProject/Help/html 178 | 179 | # Click-Once directory 180 | publish/ 181 | 182 | # Publish Web Output 183 | *.[Pp]ublish.xml 184 | *.azurePubxml 185 | # Note: Comment the next line if you want to checkin your web deploy settings, 186 | # but database connection strings (with potential passwords) will be unencrypted 187 | *.pubxml 188 | *.publishproj 189 | 190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 191 | # checkin your Azure Web App publish settings, but sensitive information contained 192 | # in these scripts will be unencrypted 193 | PublishScripts/ 194 | 195 | # NuGet Packages 196 | *.nupkg 197 | # NuGet Symbol Packages 198 | *.snupkg 199 | # The packages folder can be ignored because of Package Restore 200 | **/[Pp]ackages/* 201 | # except build/, which is used as an MSBuild target. 202 | !**/[Pp]ackages/build/ 203 | # Uncomment if necessary however generally it will be regenerated when needed 204 | #!**/[Pp]ackages/repositories.config 205 | # NuGet v3's project.json files produces more ignorable files 206 | *.nuget.props 207 | *.nuget.targets 208 | 209 | # Microsoft Azure Build Output 210 | csx/ 211 | *.build.csdef 212 | 213 | # Microsoft Azure Emulator 214 | ecf/ 215 | rcf/ 216 | 217 | # Windows Store app package directories and files 218 | AppPackages/ 219 | BundleArtifacts/ 220 | Package.StoreAssociation.xml 221 | _pkginfo.txt 222 | *.appx 223 | *.appxbundle 224 | *.appxupload 225 | 226 | # Visual Studio cache files 227 | # files ending in .cache can be ignored 228 | *.[Cc]ache 229 | # but keep track of directories ending in .cache 230 | !?*.[Cc]ache/ 231 | 232 | # Others 233 | ClientBin/ 234 | ~$* 235 | *~ 236 | *.dbmdl 237 | *.dbproj.schemaview 238 | *.jfm 239 | *.pfx 240 | *.publishsettings 241 | orleans.codegen.cs 242 | 243 | # Including strong name files can present a security risk 244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 245 | #*.snk 246 | 247 | # Since there are multiple workflows, uncomment next line to ignore bower_components 248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 249 | #bower_components/ 250 | 251 | # RIA/Silverlight projects 252 | Generated_Code/ 253 | 254 | # Backup & report files from converting an old project file 255 | # to a newer Visual Studio version. Backup files are not needed, 256 | # because we have git ;-) 257 | _UpgradeReport_Files/ 258 | Backup*/ 259 | UpgradeLog*.XML 260 | UpgradeLog*.htm 261 | ServiceFabricBackup/ 262 | *.rptproj.bak 263 | 264 | # SQL Server files 265 | *.mdf 266 | *.ldf 267 | *.ndf 268 | 269 | # Business Intelligence projects 270 | *.rdl.data 271 | *.bim.layout 272 | *.bim_*.settings 273 | *.rptproj.rsuser 274 | *- [Bb]ackup.rdl 275 | *- [Bb]ackup ([0-9]).rdl 276 | *- [Bb]ackup ([0-9][0-9]).rdl 277 | 278 | # Microsoft Fakes 279 | FakesAssemblies/ 280 | 281 | # GhostDoc plugin setting file 282 | *.GhostDoc.xml 283 | 284 | # Node.js Tools for Visual Studio 285 | .ntvs_analysis.dat 286 | node_modules/ 287 | 288 | # Visual Studio 6 build log 289 | *.plg 290 | 291 | # Visual Studio 6 workspace options file 292 | *.opt 293 | 294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 295 | *.vbw 296 | 297 | # Visual Studio LightSwitch build output 298 | **/*.HTMLClient/GeneratedArtifacts 299 | **/*.DesktopClient/GeneratedArtifacts 300 | **/*.DesktopClient/ModelManifest.xml 301 | **/*.Server/GeneratedArtifacts 302 | **/*.Server/ModelManifest.xml 303 | _Pvt_Extensions 304 | 305 | # Paket dependency manager 306 | .paket/paket.exe 307 | paket-files/ 308 | 309 | # FAKE - F# Make 310 | .fake/ 311 | 312 | # CodeRush personal settings 313 | .cr/personal 314 | 315 | # Python Tools for Visual Studio (PTVS) 316 | __pycache__/ 317 | *.pyc 318 | 319 | # Cake - Uncomment if you are using it 320 | # tools/** 321 | # !tools/packages.config 322 | 323 | # Tabs Studio 324 | *.tss 325 | 326 | # Telerik's JustMock configuration file 327 | *.jmconfig 328 | 329 | # BizTalk build output 330 | *.btp.cs 331 | *.btm.cs 332 | *.odx.cs 333 | *.xsd.cs 334 | 335 | # OpenCover UI analysis results 336 | OpenCover/ 337 | 338 | # Azure Stream Analytics local run output 339 | ASALocalRun/ 340 | 341 | # MSBuild Binary and Structured Log 342 | *.binlog 343 | 344 | # NVidia Nsight GPU debugger configuration file 345 | *.nvuser 346 | 347 | # MFractors (Xamarin productivity tool) working folder 348 | .mfractor/ 349 | 350 | # Local History for Visual Studio 351 | .localhistory/ 352 | 353 | # BeatPulse healthcheck temp database 354 | healthchecksdb 355 | 356 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 357 | MigrationBackup/ 358 | 359 | # Ionide (cross platform F# VS Code tools) working folder 360 | .ionide/ 361 | 362 | # Fody - auto-generated XML schema 363 | FodyWeavers.xsd 364 | /Typing/Media/SINGLE_EXE_IMAGE 365 | -------------------------------------------------------------------------------- /Typing.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | Debug 14 | x64 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | {D327119E-D676-4F87-B0AF-08D64AE6AC1A} 23 | Win32Proj 24 | Typing 25 | 10.0 26 | 27 | 28 | 29 | Application 30 | true 31 | v143 32 | Unicode 33 | 34 | 35 | Application 36 | false 37 | v143 38 | true 39 | Unicode 40 | 41 | 42 | Application 43 | true 44 | v143 45 | Unicode 46 | 47 | 48 | Application 49 | false 50 | v143 51 | true 52 | Unicode 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | true 74 | 75 | 76 | true 77 | 78 | 79 | false 80 | 81 | 82 | false 83 | 84 | 85 | 86 | 87 | 88 | Level3 89 | Disabled 90 | WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) 91 | MultiThreadedDebug 92 | 93 | 94 | Windows 95 | true 96 | 97 | 98 | PerMonitorHighDPIAware 99 | 100 | 101 | 102 | 103 | 104 | 105 | Level3 106 | Disabled 107 | _DEBUG;_WINDOWS;%(PreprocessorDefinitions) 108 | MultiThreadedDebug 109 | 110 | 111 | Windows 112 | true 113 | 114 | 115 | PerMonitorHighDPIAware 116 | 117 | 118 | 119 | 120 | Level3 121 | 122 | 123 | MaxSpeed 124 | true 125 | true 126 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 127 | MultiThreaded 128 | 129 | 130 | Windows 131 | true 132 | true 133 | No 134 | 135 | 136 | PerMonitorHighDPIAware 137 | 138 | 139 | 140 | 141 | Level3 142 | 143 | 144 | MaxSpeed 145 | true 146 | true 147 | NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 148 | MultiThreaded 149 | 150 | 151 | Windows 152 | true 153 | true 154 | No 155 | 156 | 157 | PerMonitorHighDPIAware 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | -------------------------------------------------------------------------------- /Typing/Script Files/Setup.map: -------------------------------------------------------------------------------- 1 | ***** External Functions ***** 2 | 1 AddFontRegistrationToLog isrt.obl(Misc.obs) 3 | 2 AppSearch isrt.obl(Driver.obs) 4 | 3 CCPSearch isrt.obl(Driver.obs) 5 | 4 ChangeDirectory isrt.obl(Files.obs) 6 | 5 CloseFile isrt.obl(Files.obs) 7 | 6 CmdGetHwndDlg isrt.obl(CustomDialog.obs) 8 | 7 ComponentAddFileToLog isrt.obl(component.obs) 9 | 8 ComponentCompareSizeRequired isrt.obl(component.obs) 10 | 9 ComponentGetData isrt.obl(component.obs) 11 | 10 ComponentGetTotalCost isrt.obl(component.obs) 12 | 11 ComponentIsItemSelected isrt.obl(component.obs) 13 | 12 ComponentListItems isrt.obl(component.obs) 14 | 13 ComponentSelectItem isrt.obl(component.obs) 15 | 14 ComponentTreeInit isrt.obl(Dialogs.obs) 16 | 15 CreateDir isrt.obl(Files.obs) 17 | 16 CreateFile isrt.obl(Files.obs) 18 | 17 CreateInstallationInfo isrt.obl(Registry.obs) 19 | 18 CreateRegistrySet isrt.obl(Feature.obs) 20 | 19 CtrlGetDlgItem isrt.obl(CustomDialog.obs) 21 | 20 CtrlGetNotificationCode isrt.obl(CustomDialog.obs) 22 | 21 CtrlGetState isrt.obl(CustomDialog.obs) 23 | 22 CtrlGetText isrt.obl(CustomDialog.obs) 24 | 23 CtrlSelectText isrt.obl(CustomDialog.obs) 25 | 24 CtrlSetState isrt.obl(CustomDialog.obs) 26 | 25 CtrlSetText isrt.obl(CustomDialog.obs) 27 | 26 DIFxDriverPackageUninstall isrt.obl(ISDIFx.obs) 28 | 27 DRMINSTALLERPRO.DRMInstallPRO isrt.obl(Activation.obs) 29 | 28 DRMINSTALLERPRO.DRMUnInstallPRO isrt.obl(Activation.obs) 30 | 29 DefineDialog isrt.obl(CustomDialog.obs) 31 | 30 Delay isrt.obl(Misc.obs) 32 | 31 DeleteFile isrt.obl(Files.obs) 33 | 32 DeleteSingleFile isrt.obl(Files.obs) 34 | 33 DialogSetDefaultFont isrt.obl(Dialogs.obs) 35 | 34 DialogSetFont isrt.obl(Dialogs.obs) 36 | 35 DialogSetInfo isrt.obl(Dialogs.obs) 37 | 36 Disable isrt.obl(Enable.obs) 38 | 37 DllSizeOf isrt.obl(Str.obs) 39 | 38 Do isrt.obl(Misc.obs) 40 | 39 Enable isrt.obl(Enable.obs) 41 | 40 EndCurrentDialog isrt.obl(Dialogs.obs) 42 | 41 EndDialog isrt.obl(CustomDialog.obs) 43 | 42 EnterDisk isrt.obl(ISRTScriptDialogs.obs) 44 | 43 EnterDiskError isrt.obl(ISRTScriptDialogs.obs) 45 | 44 EnterPassword isrt.obl(ISRTScriptDialogs.obs) 46 | 45 ExistsDir isrt.obl(Files.obs) 47 | 46 ExistsDisk isrt.obl(Files.obs) 48 | 47 ExitInstall isrt.obl(Driver.obs) 49 | 48 EzDefineDialog isrt.obl(CustomDialog.obs) 50 | 49 FeatureAddFileToLog isrt.obl(Feature.obs) 51 | 50 FeatureCompareSizeRequired isrt.obl(Feature.obs) 52 | 51 FeatureConfigureFeaturesFromSuite isrt.obl(Feature.obs) 53 | 52 FeatureErrorInfo isrt.obl(Feature.obs) 54 | 53 FeatureFilterLanguage isrt.obl(Feature.obs) 55 | 54 FeatureFilterOS isrt.obl(Feature.obs) 56 | 55 FeatureGetData isrt.obl(Feature.obs) 57 | 56 FeatureGetTotalCost isrt.obl(Feature.obs) 58 | 57 FeatureIsItemSelected isrt.obl(Feature.obs) 59 | 58 FeatureListItems isrt.obl(Feature.obs) 60 | 59 FeaturePatch isrt.obl(Feature.obs) 61 | 60 FeatureReinstall isrt.obl(Feature.obs) 62 | 61 FeatureRemoveAllInLogOnly isrt.obl(Feature.obs) 63 | 62 FeatureRemoveAllInMedia isrt.obl(Feature.obs) 64 | 63 FeatureRemoveAllInMediaAndLog isrt.obl(Feature.obs) 65 | 64 FeatureSaveTarget isrt.obl(Feature.obs) 66 | 65 FeatureSelectItem isrt.obl(Feature.obs) 67 | 66 FeatureSelectNew isrt.obl(Feature.obs) 68 | 67 FeatureSetTarget isrt.obl(Feature.obs) 69 | 68 FeatureTransferData isrt.obl(Feature.obs) 70 | 69 FeatureUpdate isrt.obl(Feature.obs) 71 | 70 FeatureValidate isrt.obl(Feature.obs) 72 | 71 FinalConstruct ifx.obl(EventsPriv.obs) 73 | 72 FinalRelease ifx.obl(EventsPriv.obs) 74 | 73 FindFile isrt.obl(Files.obs) 75 | 74 FormatMessage isrt.obl(Misc.obs) 76 | 75 GDI32.AddFontResource Setup.obs 77 | 76 GDI32.CreateRectRgn Setup.obs 78 | 77 GDI32.GetDeviceCaps Setup.obs 79 | 78 GDI32.RemoveFontResource Setup.obs 80 | 79 GetAddRemove isrt.obl(SysVars.obs) 81 | 80 GetBillboard isrt.obl(SysVars.obs) 82 | 81 GetCmdLine isrt.obl(SysVars.obs) 83 | 82 GetCommonAppDataFolder isrt.obl(SysVars.obs) 84 | 83 GetCurrentDialogName isrt.obl(Dialogs.obs) 85 | 84 GetCurrentDir isrt.obl(Files.obs) 86 | 85 GetDialogTitle isrt.obl(Dialogs.obs) 87 | 86 GetDir isrt.obl(Str.obs) 88 | 87 GetDisk isrt.obl(Str.obs) 89 | 88 GetDiskSpace isrt.obl(GSI.obs) 90 | 89 GetDiskSpaceEx isrt.obl(GSI.obs) 91 | 90 GetEnabledIServices isrt.obl(SysVars.obs) 92 | 91 GetErrorMsg isrt.obl(Dialogs.obs) 93 | 92 GetErrorTitle isrt.obl(Dialogs.obs) 94 | 93 GetExtents isrt.obl(GSI.obs) 95 | 94 GetFolderApplications isrt.obl(SysVars.obs) 96 | 95 GetFolderApplications64 isrt.obl(SysVars.obs) 97 | 96 GetFolderDotNet10 isrt.obl(SysVars.obs) 98 | 97 GetFolderDotNet11 isrt.obl(SysVars.obs) 99 | 98 GetFolderDotNet20 isrt.obl(SysVars.obs) 100 | 99 GetFolderFonts isrt.obl(SysVars.obs) 101 | 100 GetISRes isrt.obl(SysVars.obs) 102 | 101 GetInstallScriptMSI isrt.obl(SysVars.obs) 103 | 102 GetInstanceGUID isrt.obl(SysVars.obs) 104 | 103 GetKeyPathWinCurrVerAuto isrt.obl(SysVars.obs) 105 | 104 GetLog isrt.obl(SysVars.obs) 106 | 105 GetLogEx isrt.obl(SysVars.obs) 107 | 106 GetMaintOption isrt.obl(SysVars.obs) 108 | 107 GetMaintenance isrt.obl(SysVars.obs) 109 | 108 GetMultiInstanceCount isrt.obl(SysVars.obs) 110 | 109 GetOpenFileMode isrt.obl(Files.obs) 111 | 110 GetPackageLocation isrt.obl(SysVars.obs) 112 | 111 GetProductGUID isrt.obl(SysVars.obs) 113 | 112 GetProfString isrt.obl(Profile.obs) 114 | 113 GetProgramFiles isrt.obl(SysVars.obs) 115 | 114 GetReinstallMode isrt.obl(SysVars.obs) 116 | 115 GetRemoveAllMode isrt.obl(SysVars.obs) 117 | 116 GetRemoveOnly isrt.obl(SysVars.obs) 118 | 117 GetSelectedTreeComponent isrt.obl(CmptView.obs) 119 | 118 GetShowPasswordDialog isrt.obl(SysVars.obs) 120 | 119 GetStandardSelectedLanguage isrt.obl(SysVars.obs) 121 | 120 GetSuiteHosted isrt.obl(SysVars.obs) 122 | 121 GetSupportDir isrt.obl(SysVars.obs) 123 | 122 GetSystemInfo isrt.obl(GSI.obs) 124 | 123 GetTempFolder isrt.obl(SysVars.obs) 125 | 124 GetTrueTypeFontFileInfo isrt.obl(Misc.obs) 126 | 125 GetUserSelectableAuto isrt.obl(SysVars.obs) 127 | 126 GetWinDir isrt.obl(SysVars.obs) 128 | 127 GetWinSysDir isrt.obl(SysVars.obs) 129 | 128 GetWindowHandle isrt.obl(Misc.obs) 130 | 129 HIWORD isrt.obl(Misc.obs) 131 | 130 ISDeterminePlatform isrt.obl(OsInfo.obs) 132 | 131 ISMIF32.InstallStatusMIF isrt.obl(MIF.obs) 133 | 132 ISRT.ComponentViewSetInfoEx isrt.obl(Dialogs.obs) 134 | 133 ISRT.EnableHourGlass isrt.obl(Enable.obs) 135 | 134 ISRT.GetCPUType isrt.obl(GSI.obs) 136 | 135 ISRT.GetFontSub isrt.obl(Dialogs.obs) 137 | 136 ISRT.GetHandle Setup.obs 138 | 137 ISRT.GetPorts isrt.obl(GSI.obs) 139 | 138 ISRT.IsEmpty Setup.obs 140 | 139 ISRT.IsNTAdmin isrt.obl(Is.obs) 141 | 140 ISRT.IsObject Setup.obs 142 | 141 ISRT.IsPowerUser isrt.obl(Is.obs) 143 | 142 ISRT.LangLoadString isrt.obl(SDINT.obs) 144 | 143 ISRT.MessageBeepP Setup.obs 145 | 144 ISRT.PathGetDir isrt.obl(Str.obs) 146 | 145 ISRT.PathGetDrive isrt.obl(Str.obs) 147 | 146 ISRT.PathGetFile isrt.obl(Files.obs) 148 | 147 ISRT.PathGetFileExt isrt.obl(Str.obs) 149 | 148 ISRT.PathGetFileName isrt.obl(Str.obs) 150 | 149 ISRT.PathGetPath isrt.obl(Str.obs) 151 | 150 ISRT.PathIsValidSyntax isrt.obl(Is.obs) 152 | 151 ISRT.VerGetFileVersion Setup.obs 153 | 152 ISRT._AppSearch Setup.obs 154 | 153 ISRT._BrowseForFolder isrt.obl(ISRTScriptDialogsPriv.obs) 155 | 154 ISRT._CCPSearch Setup.obs 156 | 155 ISRT._CleanupInet isrt.obl(MIO.obs) 157 | 156 ISRT._CloseFile isrt.obl(Files.obs) 158 | 157 ISRT._CmdGetHwndDlg isrt.obl(CustomDialog.obs) 159 | 158 ISRT._CompareDWORD isrt.obl(Extend.obs) 160 | 159 ISRT._ComponentCompareSizeRequired isrt.obl(Feature.obs) 161 | 160 ISRT._ComponentErrorInfo isrt.obl(Feature.obs) 162 | 161 ISRT._ComponentFilterLanguage isrt.obl(Feature.obs) 163 | 162 ISRT._ComponentFilterOS isrt.obl(Feature.obs) 164 | 163 ISRT._ComponentGetData isrt.obl(Feature.obs) 165 | 164 ISRT._ComponentGetTotalCost isrt.obl(Feature.obs) 166 | 165 ISRT._ComponentGetTotalCostEx Setup.obs 167 | 166 ISRT._ComponentIsItemSelected isrt.obl(Feature.obs) 168 | 167 ISRT._ComponentListItems isrt.obl(Feature.obs) 169 | 168 ISRT._ComponentPatch isrt.obl(Feature.obs) 170 | 169 ISRT._ComponentReinstall isrt.obl(Feature.obs) 171 | 170 ISRT._ComponentRemoveAll isrt.obl(Feature.obs) 172 | 171 ISRT._ComponentRemoveAllInLogOnly isrt.obl(Feature.obs) 173 | 172 ISRT._ComponentSaveTarget isrt.obl(Feature.obs) 174 | 173 ISRT._ComponentSelectItem isrt.obl(Feature.obs) 175 | 174 ISRT._ComponentSelectNew isrt.obl(Feature.obs) 176 | 175 ISRT._ComponentTransferData isrt.obl(Feature.obs) 177 | 176 ISRT._ComponentUpdate isrt.obl(Feature.obs) 178 | 177 ISRT._ComponentValidate isrt.obl(Feature.obs) 179 | 178 ISRT._CreateDir isrt.obl(Files.obs) 180 | 179 ISRT._CreateRegistrySet isrt.obl(Feature.obs) 181 | 180 ISRT._CtrlGetNotificationCode isrt.obl(CustomDialog.obs) 182 | 181 ISRT._CtrlSetHtmlContent isrt.obl(CustomDialog.obs) 183 | 182 ISRT._DIFxDriverPackageUninstall isrt.obl(ISDIFx.obs) 184 | 183 ISRT._DefineDialog isrt.obl(CustomDialog.obs) 185 | 184 ISRT._DialogSetFont isrt.obl(Dialogs.obs) 186 | 185 ISRT._DisableStatus isrt.obl(Enable.obs) 187 | 186 ISRT._DoSprintf isrt.obl(ISRTScriptDialogsPriv.obs) 188 | 187 ISRT._EnableDialogCache isrt.obl(Enable.obs) 189 | 188 ISRT._EnablePrevDialog Setup.obs 190 | 189 ISRT._EnableSkins isrt.obl(Enable.obs) 191 | 190 ISRT._EnableStatus isrt.obl(Enable.obs) 192 | 191 ISRT._EnableWow64FsRedirection isrt.obl(Enable.obs) 193 | 192 ISRT._EndDialog isrt.obl(CustomDialog.obs) 194 | 193 ISRT._ExistsDir isrt.obl(Files.obs) 195 | 194 ISRT._ExistsDisk isrt.obl(Files.obs) 196 | 195 ISRT._ExistsFile isrt.obl(Files.obs) 197 | 196 ISRT._ExitInstall Setup.obs 198 | 197 ISRT._GetCurrentDialogName isrt.obl(Dialogs.obs) 199 | 198 ISRT._GetDiskSpaceEx isrt.obl(GSI.obs) 200 | 199 ISRT._GetDiskSpaceExEx Setup.obs 201 | 200 ISRT._GetGlobalFlags ifx.obl(EventsPriv.obs) 202 | 201 ISRT._GetGlobalMemorySize isrt.obl(GSI.obs) 203 | 202 ISRT._GetProcessorInfo isrt.obl(OsInfo.obs) 204 | 203 ISRT._GetSelectedTreeComponent isrt.obl(CmptView.obs) 205 | 204 ISRT._GetStandardLangId isrt.obl(Misc.obs) 206 | 205 ISRT._GetSupportDir isrt.obl(SysVars.obs) 207 | 206 ISRT._GetSystemDpi isrt.obl(GSI.obs) 208 | 207 ISRT._GetTrueTypeFontFileInfo isrt.obl(Misc.obs) 209 | 208 ISRT._GetVirtualMachineType isrt.obl(GSI.obs) 210 | 209 ISRT._InetEndofTransfer isrt.obl(iftw.obs) 211 | 210 ISRT._InetGetNextDisk isrt.obl(iftw.obs) 212 | 211 ISRT._InitInstall Setup.obs 213 | 212 ISRT._IsFontTypefaceNameAvailable isrt.obl(Is.obs) 214 | 213 ISRT._IsInAdminGroup isrt.obl(Is.obs) 215 | 214 ISRT._IsLangSupported isrt.obl(Is.obs) 216 | 215 ISRT._IsSkinLoaded isrt.obl(Is.obs) 217 | 216 ISRT._IsVirtualMachine isrt.obl(OsInfo.obs) 218 | 217 ISRT._IsWindowsME isrt.obl(GSI.obs) 219 | 218 ISRT._IsWow64 isrt.obl(OsInfo.obs) 220 | 219 ISRT._ListAddItem isrt.obl(scrlist.obs) 221 | 220 ISRT._ListAddString isrt.obl(scrlist.obs) 222 | 221 ISRT._ListCount isrt.obl(scrlist.obs) 223 | 222 ISRT._ListCreate isrt.obl(scrlist.obs) 224 | 223 ISRT._ListCurrentString isrt.obl(scrlist.obs) 225 | 224 ISRT._ListDeleteItem isrt.obl(scrlist.obs) 226 | 225 ISRT._ListDeleteString isrt.obl(scrlist.obs) 227 | 226 ISRT._ListDestroy isrt.obl(scrlist.obs) 228 | 227 ISRT._ListFindString isrt.obl(scrlist.obs) 229 | 228 ISRT._ListGetFirstItem isrt.obl(scrlist.obs) 230 | 229 ISRT._ListGetFirstString isrt.obl(scrlist.obs) 231 | 230 ISRT._ListGetNextItem isrt.obl(scrlist.obs) 232 | 231 ISRT._ListGetNextString isrt.obl(scrlist.obs) 233 | 232 ISRT._ListGetType isrt.obl(scrlist.obs) 234 | 233 ISRT._ListSetIndex isrt.obl(scrlist.obs) 235 | 234 ISRT._MediaGetFilteringInfo isrt.obl(Feature.obs) 236 | 235 ISRT._MediaGetInfo isrt.obl(Feature.obs) 237 | 236 ISRT._OnUninstPriv Setup.obs 238 | 237 ISRT._OpenFile isrt.obl(Files.obs) 239 | 238 ISRT._Preprogram Setup.obs 240 | 239 ISRT._Rebooted Setup.obs 241 | 240 ISRT._RegCreateKey isrt.obl(Registry.obs) 242 | 241 ISRT._RegDeleteValue isrt.obl(Registry.obs) 243 | 242 ISRT._RegEnableTextSubs isrt.obl(Enable.obs) 244 | 243 ISRT._RegGetOptions isrt.obl(SysVars.obs) 245 | 244 ISRT._RegIsRemoteRegConnected isrt.obl(Is.obs) 246 | 245 ISRT._RegQueryKeyBinaryValue isrt.obl(Registry.obs) 247 | 246 ISRT._RegQueryKeyValue isrt.obl(Registry.obs) 248 | 247 ISRT._RegSetKeyBinaryValue isrt.obl(Registry.obs) 249 | 248 ISRT._RegSetKeyValue isrt.obl(Registry.obs) 250 | 249 ISRT._RegSetOptions isrt.obl(SysVars.obs) 251 | 250 ISRT._ReleaseDialog isrt.obl(CustomDialog.obs) 252 | 251 ISRT._SdShowMsg isrt.obl(ISRTScriptDialogsPriv.obs) 253 | 252 ISRT._SetAltMainImage isrt.obl(Dialogs.obs) 254 | 253 ISRT._SetAltMainImageEx isrt.obl(Dialogs.obs) 255 | 254 ISRT._SetDisplayEffect isrt.obl(ui.obs) 256 | 255 ISRT._SetDllDirectory isrt.obl(Enable.obs) 257 | 256 ISRT._SetGlobalFlags ifx.obl(EventsPriv.obs) 258 | 257 ISRT._SetObjectPermissions isrt.obl(Misc.obs) 259 | 258 ISRT._SetPaletteFile isrt.obl(MIO.obs) 260 | 259 ISRT._SetSilentSdShowMsg isrt.obl(Enable.obs) 261 | 260 ISRT._SetTitle isrt.obl(ui.obs) 262 | 261 ISRT._SetupInet isrt.obl(MIO.obs) 263 | 262 ISRT._SetupTraceWrite isrt.obl(Misc.obs) 264 | 263 ISRT._ShowObjWizardPages isrt.obl(Objects.obs) 265 | 264 ISRT._ShowWizardPages Setup.obs 266 | 265 ISRT._StatusUpdate isrt.obl(ui.obs) 267 | 266 ISRT._TreeViewCreate isrt.obl(CmptView.obs) 268 | 267 ISRT._WaitOnDialog isrt.obl(CustomDialog.obs) 269 | 268 ISRT._WriteLine isrt.obl(Files.obs) 270 | 269 ISRT.__CreateObjectContext isrt.obl(ISRTInit.obs) 271 | 270 ISRT.__GetCmdLineOptions isrt.obl(ISRTInit.obs) 272 | 271 ISRT.__GetContextGUID isrt.obl(ISRTInit.obs) 273 | 272 ISRT.__GetEnabledIServices isrt.obl(SysVars.obs) 274 | 273 ISRT.__GetFileRegistrar isrt.obl(ISRTInit.obs) 275 | 274 ISRT.__GetInfo isrt.obl(ISRTInit.obs) 276 | 275 ISRT.__GetInstallGuid isrt.obl(SysVars.obs) 277 | 276 ISRT.__GetLog isrt.obl(SysVars.obs) 278 | 277 ISRT.__GetLogDB isrt.obl(ISRTInit.obs) 279 | 278 ISRT.__GetLogEx isrt.obl(SysVars.obs) 280 | 279 ISRT.__GetMainWindow Setup.obs 281 | 280 ISRT.__GetMaintOption isrt.obl(SysVars.obs) 282 | 281 ISRT.__GetMaintenanceMode isrt.obl(SysVars.obs) 283 | 282 ISRT.__GetObjects isrt.obl(ISRTInit.obs) 284 | 283 ISRT.__GetProductGuid isrt.obl(SysVars.obs) 285 | 284 ISRT.__GetProgress Setup.obs 286 | 285 ISRT.__GetReboot isrt.obl(ISRTInit.obs) 287 | 286 ISRT.__GetReinstallMode isrt.obl(SysVars.obs) 288 | 287 ISRT.__GetRemoveAllMode isrt.obl(SysVars.obs) 289 | 288 ISRT.__GetTextSub isrt.obl(ISRTInit.obs) 290 | 289 ISRT.__GetUpdateMode isrt.obl(SysVars.obs) 291 | 290 ISRT.__GetUser isrt.obl(MIO.obs) 292 | 291 ISRT.__ISRTGetPropertyBag ifx.obl(PersistPropertyBag.obs) 293 | 292 ISRT.__ISRTReleasePropertyBag ifx.obl(PersistPropertyBag.obs) 294 | 293 ISRT.__LoadString isrt.obl(LoadStr.obs) 295 | 294 ISRT.__PutEnabledIServices isrt.obl(Enable.obs) 296 | 295 ISRT.__ReleaseObjectContext isrt.obl(ISRTInit.obs) 297 | 296 ISRT.__RestoreMainLog isrt.obl(ISRTInit.obs) 298 | 297 ISRT.__RestoreMainLogEx isrt.obl(ISRTInit.obs) 299 | 298 ISRT.__SetComponentLog isrt.obl(ISRTInit.obs) 300 | 299 ISRT.__SetUpdateMode isrt.obl(SysVars.obs) 301 | 300 ISRTHandleScriptException isrt.obl(Misc.obs) 302 | 301 ISRTOnUninstPriv isrt.obl(Driver.obs) 303 | 302 ISRTPreprogram isrt.obl(Driver.obs) 304 | 303 IfxFilterComponents ifx.obl(EventsSetupPriv.obs) 305 | 304 IfxFinalConstruct ifx.obl(EventsSetupPriv.obs) 306 | 305 IfxFinalRelease ifx.obl(EventsSetupPriv.obs) 307 | 306 IfxInitProperties ifx.obl(PersistPropertyBag.obs) 308 | 307 IfxOnAbortInstall ifx.obl(EventsPriv.obs) 309 | 308 IfxOnAppSearch ifx.obl(EventsPriv.obs) 310 | 309 IfxOnCCPSearch ifx.obl(EventsPriv.obs) 311 | 310 IfxOnCanceling ifx.obl(EventsPriv.obs) 312 | 311 IfxOnDisk1Installed ifx.obl(EventsSetupPriv.obs) 313 | 312 IfxOnDisk1Installing ifx.obl(EventsSetupPriv.obs) 314 | 313 IfxOnExitInstall ifx.obl(EventsSetupPriv.obs) 315 | 314 IfxOnFileError ifx.obl(EventsSetupPriv.obs) 316 | 315 IfxOnFileLocked ifx.obl(EventsSetupPriv.obs) 317 | 316 IfxOnFileReadOnly ifx.obl(EventsSetupPriv.obs) 318 | 317 IfxOnGeneralScriptOp ifx.obl(EventsPriv.obs) 319 | 318 IfxOnHelp ifx.obl(EventsPriv.obs) 320 | 319 IfxOnInitInstall ifx.obl(EventsSetupPriv.obs) 321 | 320 IfxOnInternetError ifx.obl(EventsSetupPriv.obs) 322 | 321 IfxOnMD5Error ifx.obl(EventsSetupPriv.obs) 323 | 322 IfxOnNextDisk ifx.obl(EventsSetupPriv.obs) 324 | 323 IfxOnRebooted ifx.obl(EventsPriv.obs) 325 | 324 IfxOnRemovingSharedFile ifx.obl(EventsSetupPriv.obs) 326 | 325 IfxOnShowWizardPages ifx.obl(EventsSetupPriv.obs) 327 | 326 IfxOnTransferred ifx.obl(EventsPriv.obs) 328 | 327 IfxOnTransferring ifx.obl(EventsSetupPriv.obs) 329 | 328 IfxOnUnhandledException ifx.obl(EventsPriv.obs) 330 | 329 IfxOnUninst ifx.obl(EventsSetupPriv.obs) 331 | 330 IfxOnUninstPriv ifx.obl(EventsSetupPriv.obs) 332 | 331 IfxPostprogram ifx.obl(EventsSetupPriv.obs) 333 | 332 IfxPreprogram ifx.obl(EventsSetupPriv.obs) 334 | 333 IfxReadProperties ifx.obl(PersistPropertyBag.obs) 335 | 334 IfxRunAfterReboot ifx.obl(EventsSetupPriv.obs) 336 | 335 IfxWriteProperties ifx.obl(PersistPropertyBag.obs) 337 | 336 InetEndofTransfer isrt.obl(iftw.obs) 338 | 337 InetNextDisk isrt.obl(iftw.obs) 339 | 338 InitInstall isrt.obl(Driver.obs) 340 | 339 InitProperties ifx.obl(PersistPropertyBag.obs) 341 | 340 Is isrt.obl(Is.obs) 342 | 341 IsInetInstall isrt.obl(iftw.obs) 343 | 342 KERNEL.GetModuleHandle Setup.obs 344 | 343 KERNEL32.CloseHandle Setup.obs 345 | 344 KERNEL32.CreateFileW Setup.obs 346 | 345 KERNEL32.DeleteFileW Setup.obs 347 | 346 KERNEL32.FindClose Setup.obs 348 | 347 KERNEL32.FindFirstFileW Setup.obs 349 | 348 KERNEL32.FindNextFileW Setup.obs 350 | 349 KERNEL32.FormatMessageW Setup.obs 351 | 350 KERNEL32.FreeLibrary Setup.obs 352 | 351 KERNEL32.GetCurrentDirectoryW Setup.obs 353 | 352 KERNEL32.GetDriveType Setup.obs 354 | 353 KERNEL32.GetFileAttributesW Setup.obs 355 | 354 KERNEL32.GetLocalTime Setup.obs 356 | 355 KERNEL32.GetLocaleInfo Setup.obs 357 | 356 KERNEL32.GetPrivateProfileString Setup.obs 358 | 357 KERNEL32.GetPrivateProfileStringW Setup.obs 359 | 358 KERNEL32.GetProcAddress Setup.obs 360 | 359 KERNEL32.GetProfileStringW Setup.obs 361 | 360 KERNEL32.GetSystemDefaultLCID Setup.obs 362 | 361 KERNEL32.GetSystemDefaultLangID Setup.obs 363 | 362 KERNEL32.GetSystemDefaultUILanguage Setup.obs 364 | 363 KERNEL32.GetTickCount Setup.obs 365 | 364 KERNEL32.GetUserDefaultLangID Setup.obs 366 | 365 KERNEL32.GetVersion Setup.obs 367 | 366 KERNEL32.GetVersionEx Setup.obs 368 | 367 KERNEL32.GetVolumeInformation Setup.obs 369 | 368 KERNEL32.GetWindowsDirectory Setup.obs 370 | 369 KERNEL32.LoadLibraryW Setup.obs 371 | 370 KERNEL32.SetCurrentDirectoryW Setup.obs 372 | 371 KERNEL32.SetFileAttributesW Setup.obs 373 | 372 KERNEL32.Sleep Setup.obs 374 | 373 KERNEL32.WritePrivateProfileString Setup.obs 375 | 374 KERNEL32.WritePrivateProfileStringW Setup.obs 376 | 375 KERNEL32.WriteProfileStringW Setup.obs 377 | 376 KERNEL32.lstrlenW Setup.obs 378 | 377 LOWORD isrt.obl(Misc.obs) 379 | 378 LaunchAppAndWaitInitStartupInfo isrt.obl(Extend.obs) 380 | 379 LaunchApplicationInit isrt.obl(Extend.obs) 381 | 380 ListAddItem isrt.obl(scrlist.obs) 382 | 381 ListAddString isrt.obl(scrlist.obs) 383 | 382 ListCount isrt.obl(scrlist.obs) 384 | 383 ListCreate isrt.obl(scrlist.obs) 385 | 384 ListCurrentString isrt.obl(scrlist.obs) 386 | 385 ListDeleteItem isrt.obl(scrlist.obs) 387 | 386 ListDeleteString isrt.obl(scrlist.obs) 388 | 387 ListDestroy isrt.obl(scrlist.obs) 389 | 388 ListFindString isrt.obl(scrlist.obs) 390 | 389 ListGetFirstItem isrt.obl(scrlist.obs) 391 | 390 ListGetFirstString isrt.obl(scrlist.obs) 392 | 391 ListGetNextItem isrt.obl(scrlist.obs) 393 | 392 ListGetNextString isrt.obl(scrlist.obs) 394 | 393 ListGetType isrt.obl(scrlist.obs) 395 | 394 ListSetIndex isrt.obl(scrlist.obs) 396 | 395 ListValid isrt.obl(scrlist.obs) 397 | 396 ListValidType isrt.obl(scrlist.obs) 398 | 397 LoadStringFromStringTable isrt.obl(Str.obs) 399 | 398 LogReadCustomString isrt.obl(Misc.obs) 400 | 399 LogReadCustomVariant isrt.obl(Misc.obs) 401 | 400 LogWriteCustomString isrt.obl(Misc.obs) 402 | 401 LogWriteCustomVariant isrt.obl(Misc.obs) 403 | 402 LongPathToQuote isrt.obl(Str.obs) 404 | 403 MAKELONG isrt.obl(Misc.obs) 405 | 404 MIFCreateMIFFile isrt.obl(MIF.obs) 406 | 405 MIFDeleteMIFFile isrt.obl(MIF.obs) 407 | 406 MIFInitialize isrt.obl(MIF.obs) 408 | 407 MIFSetInformation isrt.obl(MIF.obs) 409 | 408 MIFUnInitialize isrt.obl(MIF.obs) 410 | 409 MIFWasSetInformationCalled isrt.obl(MIF.obs) 411 | 410 MIOShutdown isrt.obl(MIO.obs) 412 | 411 MIOStartup isrt.obl(MIO.obs) 413 | 412 MaintenanceStart isrt.obl(Registry.obs) 414 | 413 MediaGetData isrt.obl(Feature.obs) 415 | 414 MediaGetDataEx isrt.obl(Feature.obs) 416 | 415 MessageBeep isrt.obl(Misc.obs) 417 | 416 MessageBox isrt.obl(ISRTScriptDialogsPriv.obs) 418 | 417 MessageBoxEx isrt.obl(ISRTScriptDialogsPriv.obs) 419 | 418 OnAbort ifx.obl(EventsSetup.obs) 420 | 419 OnAppSearch ifx.obl(EventsSetup.obs) 421 | 420 OnBegin ifx.obl(EventsSetup.obs) 422 | 421 OnCCPSearch ifx.obl(EventsSetup.obs) 423 | 422 OnCanceling ifx.obl(EventsSetup.obs) 424 | 423 OnCheckMediaPassword ifx.obl(EventsSetup.obs) 425 | 424 OnComponentError ifx.obl(EventsSetup.obs) 426 | 425 OnCustomizeUninstInfo ifx.obl(EventsSetup.obs) 427 | 426 OnDIFxLogCallback ifx.obl(EventsSetup.obs) 428 | 427 OnDIFxLogCallbackImpl isrt.obl(ISDIFx.obs) 429 | 428 OnEnd ifx.obl(EventsSetup.obs) 430 | 429 OnFileError ifx.obl(EventsSetup.obs) 431 | 430 OnFileLocked ifx.obl(EventsSetup.obs) 432 | 431 OnFileReadOnly ifx.obl(EventsSetup.obs) 433 | 432 OnFilterComponents ifx.obl(EventsSetup.obs) 434 | 433 OnFirstUIAfter Setup.obs 435 | 434 OnFirstUIBefore Setup.obs 436 | 435 OnHelp ifx.obl(EventsSetup.obs) 437 | 436 OnIISAppPoolUninstalling ifx.obl(EventsPriv.obs) 438 | 437 OnIISCheckRequirements ifx.obl(EventsPriv.obs) 439 | 438 OnIISComponentInstalled ifx.obl(EventsPriv.obs) 440 | 439 OnIISInitialize ifx.obl(EventsPriv.obs) 441 | 440 OnIISUninitialize ifx.obl(EventsPriv.obs) 442 | 441 OnIISVRootUninstalling ifx.obl(EventsPriv.obs) 443 | 442 OnIISWebServiceExtensionUninstalling ifx.obl(EventsPriv.obs) 444 | 443 OnIISWebSiteUninstalling ifx.obl(EventsPriv.obs) 445 | 444 OnInstallDRMService isrt.obl(Activation.obs) 446 | 445 OnInstalledFile ifx.obl(EventsSetup.obs) 447 | 446 OnInstalledFontFile ifx.obl(EventsSetup.obs) 448 | 447 OnInstallingFile ifx.obl(EventsSetup.obs) 449 | 448 OnInternetError ifx.obl(EventsSetup.obs) 450 | 449 OnLaunchAppAndWaitCallback ifx.obl(EventsSetup.obs) 451 | 450 OnMD5Error ifx.obl(EventsSetup.obs) 452 | 451 OnMaintUIAfter ifx.obl(EventsSetup.obs) 453 | 452 OnMaintUIBefore ifx.obl(EventsSetup.obs) 454 | 453 OnMoveData ifx.obl(EventsSetup.obs) 455 | 454 OnMoved ifx.obl(EventsSetup.obs) 456 | 455 OnMoving ifx.obl(EventsSetup.obs) 457 | 456 OnNetApiCreateUserAccount ifx.obl(EventsSetup.obs) 458 | 457 OnNetApiCreateUserAccountInternal isrt.obl(NetApiRT.obs) 459 | 458 OnNextDisk ifx.obl(EventsSetup.obs) 460 | 459 OnRebooted ifx.obl(EventsSetup.obs) 461 | 460 OnRemovingSharedFile ifx.obl(EventsSetup.obs) 462 | 461 OnSQLBatchScripts ifx.obl(EventsPriv.obs) 463 | 462 OnSQLComponentInstalled ifx.obl(EventsPriv.obs) 464 | 463 OnSQLComponentUninstalled ifx.obl(EventsPriv.obs) 465 | 464 OnSQLServerInitialize ifx.obl(EventsPriv.obs) 466 | 465 OnSQLServerInitializeMaint ifx.obl(EventsPriv.obs) 467 | 466 OnSelfRegistrationError ifx.obl(EventsSetup.obs) 468 | 467 OnSetTARGETDIR ifx.obl(EventsSetup.obs) 469 | 468 OnSetUpdateMode ifx.obl(EventsSetup.obs) 470 | 469 OnShowUI ifx.obl(EventsSetup.obs) 471 | 470 OnSuiteInstallAfter ifx.obl(EventsSetup.obs) 472 | 471 OnSuiteInstallBefore ifx.obl(EventsSetup.obs) 473 | 472 OnSuiteMaintAfter ifx.obl(EventsSetup.obs) 474 | 473 OnSuiteMaintBefore ifx.obl(EventsSetup.obs) 475 | 474 OnSuiteShowUI ifx.obl(EventsSetup.obs) 476 | 475 OnSuiteUpdateAfter ifx.obl(EventsSetup.obs) 477 | 476 OnSuiteUpdateBefore ifx.obl(EventsSetup.obs) 478 | 477 OnUnInstallDRMService isrt.obl(Activation.obs) 479 | 478 OnUnhandledException ifx.obl(EventsPriv.obs) 480 | 479 OnUninstall ifx.obl(EventsSetup.obs) 481 | 480 OnUninstalledFile ifx.obl(EventsSetup.obs) 482 | 481 OnUninstallingDIFxDriverFile ifx.obl(EventsSetup.obs) 483 | 482 OnUninstallingFile ifx.obl(EventsSetup.obs) 484 | 483 OnUninstallingFontFile ifx.obl(EventsSetup.obs) 485 | 484 OnUpdateUIAfter ifx.obl(EventsSetup.obs) 486 | 485 OnUpdateUIBefore ifx.obl(EventsSetup.obs) 487 | 486 OnXMLComponentInstalled ifx.obl(EventsPriv.obs) 488 | 487 OnXMLComponentUninstalling ifx.obl(EventsPriv.obs) 489 | 488 OnXMLInitialize ifx.obl(EventsPriv.obs) 490 | 489 OnXMLUninitialize ifx.obl(EventsPriv.obs) 491 | 490 OpenFileMode isrt.obl(Files.obs) 492 | 491 ParsePath isrt.obl(Str.obs) 493 | 492 Postprogram ifx.obl(EventsSetupPriv.obs) 494 | 493 Preprogram ifx.obl(EventsSetupPriv.obs) 495 | 494 PthFixPath isrt.obl(Pth.obs) 496 | 495 PthIsAbsPath isrt.obl(Pth.obs) 497 | 496 ReadProperties ifx.obl(PersistPropertyBag.obs) 498 | 497 Rebooted isrt.obl(Driver.obs) 499 | 498 RegDBDeleteItem isrt.obl(Registry.obs) 500 | 499 RegDBDeleteValue isrt.obl(Registry.obs) 501 | 500 RegDBDeleteValueEx isrt.obl(Registry.obs) 502 | 501 RegDBDeleteValueEx32 isrt.obl(Registry.obs) 503 | 502 RegDBGetItem isrt.obl(Registry.obs) 504 | 503 RegDBGetKeyValueEx isrt.obl(Registry.obs) 505 | 504 RegDBQueryValue isrt.obl(Registry.obs) 506 | 505 RegDBQueryValue32 isrt.obl(Registry.obs) 507 | 506 RegDBSetItem isrt.obl(Registry.obs) 508 | 507 RegDBSetKeyValueEx isrt.obl(Registry.obs) 509 | 508 RegDBSetValue isrt.obl(Registry.obs) 510 | 509 RegDBSetValue32 isrt.obl(Registry.obs) 511 | 510 RegDBSetVersion isrt.obl(Registry.obs) 512 | 511 RegisterFontResource isrt.obl(Misc.obs) 513 | 512 ReleaseDialog isrt.obl(CustomDialog.obs) 514 | 513 SdCloseDlg isrt.obl(SDINT.obs) 515 | 514 SdComponentDlgCheckSpace isrt.obl(SDINT.obs) 516 | 515 SdDlgToTop isrt.obl(SDINT.obs) 517 | 516 SdDoStdButton isrt.obl(SDINT.obs) 518 | 517 SdEnablement isrt.obl(SDINT.obs) 519 | 518 SdError isrt.obl(SDINT.obs) 520 | 519 SdExceptionsInit isrt.obl(ISRTScriptDialogsPriv.obs) 521 | 520 SdFeatureTree isrt.obl(ISRTScriptDialogs.obs) 522 | 521 SdFinish isrt.obl(ISRTScriptDialogs.obs) 523 | 522 SdFinishReboot isrt.obl(ISRTScriptDialogs.obs) 524 | 523 SdGeneralInit isrt.obl(SDINT.obs) 525 | 524 SdInit isrt.obl(SDINT.obs) 526 | 525 SdIsStdButton isrt.obl(SDINT.obs) 527 | 526 SdLoadString isrt.obl(SDINT.obs) 528 | 527 SdMakeName isrt.obl(SDINT.obs) 529 | 528 SdPlugInProductName isrt.obl(SDINT.obs) 530 | 529 SdSetDlgTitle isrt.obl(SDINT.obs) 531 | 530 SdSetStatic isrt.obl(SDINT.obs) 532 | 531 SdShowMsg isrt.obl(ISRTScriptDialogsPriv.obs) 533 | 532 SdStartCopy2 isrt.obl(ISRTScriptDialogs.obs) 534 | 533 SdSubstituteProductInfo isrt.obl(SDINT.obs) 535 | 534 SdUnInit isrt.obl(SDINT.obs) 536 | 535 SdWelcome isrt.obl(ISRTScriptDialogs.obs) 537 | 536 SdWelcomeMaint isrt.obl(ISRTScriptDialogs.obs) 538 | 537 SelectDir isrt.obl(ISRTScriptDialogsPriv.obs) 539 | 538 SelectDirNoLog isrt.obl(ISRTScriptDialogsPriv.obs) 540 | 539 SendMessage isrt.obl(Misc.obs) 541 | 540 ServiceInitParams isrt.obl(Service.obs) 542 | 541 SetCmdLine isrt.obl(SysVars.obs) 543 | 542 SetDialogTitle isrt.obl(Dialogs.obs) 544 | 543 SetDisplayEffect isrt.obl(ui.obs) 545 | 544 SetExtendedErrInfo isrt.obl(IsUtil.obs) 546 | 545 SetObjectPermissions isrt.obl(Misc.obs) 547 | 546 SetStatus ifx.obl(EventsSetupPriv.obs) 548 | 547 SetStatusEx ifx.obl(EventsSetupPriv.obs) 549 | 548 SetStatusExStaticText isrt.obl(ui.obs) 550 | 549 SetStatusWindow isrt.obl(ui.obs) 551 | 550 SetTitle isrt.obl(ui.obs) 552 | 551 SetupTraceWrite isrt.obl(Misc.obs) 553 | 552 ShowObjWizardPages isrt.obl(Objects.obs) 554 | 553 ShowWizardPages isrt.obl(Driver.obs) 555 | 554 SilentCreateFile isrt.obl(Silent.obs) 556 | 555 SilentDoGeneralInfo isrt.obl(Silent.obs) 557 | 556 SilentFailed isrt.obl(Silent.obs) 558 | 557 SilentFinish isrt.obl(Silent.obs) 559 | 558 SilentInit isrt.obl(Silent.obs) 560 | 559 SilentLogWriteData isrt.obl(Silent.obs) 561 | 560 SilentReadData isrt.obl(Silent.obs) 562 | 561 SilentSetInfo isrt.obl(Silent.obs) 563 | 562 SilentSetMode isrt.obl(Silent.obs) 564 | 563 SilentWriteData isrt.obl(Silent.obs) 565 | 564 Sprintf isrt.obl(Str.obs) 566 | 565 SprintfBox isrt.obl(ISRTScriptDialogsPriv.obs) 567 | 566 StatusUpdate isrt.obl(ui.obs) 568 | 567 StrAddLastSlash isrt.obl(Str.obs) 569 | 568 StrConvertSizeUnit isrt.obl(Str.obs) 570 | 569 StrFindEx isrt.obl(Str.obs) 571 | 570 StrGetTokens isrt.obl(Str.obs) 572 | 571 StrLength isrt.obl(Str.obs) 573 | 572 StrRemoveLastSlash isrt.obl(Str.obs) 574 | 573 StrReplace isrt.obl(Str.obs) 575 | 574 StrToNumHex isrt.obl(Str.obs) 576 | 575 StrToUpper isrt.obl(Str.obs) 577 | 576 StrTrim isrt.obl(Str.obs) 578 | 577 SuiteLogInfo isrt.obl(SuiteWrappers.obs) 579 | 578 SuiteReportError isrt.obl(SuiteWrappers.obs) 580 | 579 SysVarsInit isrt.obl(SysVars.obs) 581 | 580 SysVarsTrace isrt.obl(SysVars.obs) 582 | 581 SysVarsUnInit isrt.obl(SysVars.obs) 583 | 582 System isrt.obl(Misc.obs) 584 | 583 SystemRestoreCancelRestorePointIS isrt.obl(PCRestore.obs) 585 | 584 SystemRestoreCloseRestorePointIS isrt.obl(PCRestore.obs) 586 | 585 SystemRestoreDisableIS isrt.obl(PCRestore.obs) 587 | 586 SystemRestoreIsEnabledIS isrt.obl(PCRestore.obs) 588 | 587 SystemRestoreOpenRestorePointIS isrt.obl(PCRestore.obs) 589 | 588 TextSubGetValue isrt.obl(TextSub.obs) 590 | 589 TextSubParseTextSub isrt.obl(TextSub.obs) 591 | 590 TextSubSetValue isrt.obl(TextSub.obs) 592 | 591 TextSubSubstitute isrt.obl(TextSub.obs) 593 | 592 TreeViewCreate isrt.obl(CmptView.obs) 594 | 593 USER.EnableWindow Setup.obs 595 | 594 USER.GetClassName Setup.obs 596 | 595 USER.GetDC Setup.obs 597 | 596 USER.GetDlgItem Setup.obs 598 | 597 USER.GetFocus Setup.obs 599 | 598 USER.GetWindowLong Setup.obs 600 | 599 USER.GetWindowRect Setup.obs 601 | 600 USER.IsIconic Setup.obs 602 | 601 USER.IsWindow Setup.obs 603 | 602 USER.PostMessage Setup.obs 604 | 603 USER.ReleaseDC Setup.obs 605 | 604 USER.SendMessageW Setup.obs 606 | 605 USER.SetFocus Setup.obs 607 | 606 USER.SetWindowPos Setup.obs 608 | 607 USER.SetWindowText Setup.obs 609 | 608 USER.ShowWindow Setup.obs 610 | 609 USER32.CharUpperBuffW Setup.obs 611 | 610 USER32.DispatchMessage Setup.obs 612 | 611 USER32.GetDesktopWindow Setup.obs 613 | 612 USER32.GetSystemMetrics Setup.obs 614 | 613 USER32.GetWindowText Setup.obs 615 | 614 USER32.GetWindowTextLength Setup.obs 616 | 615 USER32.IsWindowVisible Setup.obs 617 | 616 USER32.MessageBoxW Setup.obs 618 | 617 USER32.PeekMessageW Setup.obs 619 | 618 USER32.SendMessageW Setup.obs 620 | 619 USER32.SetForegroundWindow Setup.obs 621 | 620 USER32.SetWindowLong Setup.obs 622 | 621 USER32.SetWindowRgn Setup.obs 623 | 622 USER32.TranslateMessage Setup.obs 624 | 623 UpdateServiceEnableUpdateService isrt.obl(ISUpdateService.obs) 625 | 624 VarInit isrt.obl(SysVars.obs) 626 | 625 VarRestore isrt.obl(SysVars.obs) 627 | 626 VarRestoreISRT isrt.obl(SysVars.obs) 628 | 627 VarSave isrt.obl(SysVars.obs) 629 | 628 VarSaveISRT isrt.obl(SysVars.obs) 630 | 629 VerCompare isrt.obl(version.obs) 631 | 630 VerProductCompareVersions isrt.obl(version.obs) 632 | 631 VerProductGetInstalledVersion isrt.obl(version.obs) 633 | 632 VerProductIsVersionSupported isrt.obl(version.obs) 634 | 633 VerProductNumToStr isrt.obl(version.obs) 635 | 634 VerProductStrToNum isrt.obl(version.obs) 636 | 635 VerProductVerFromVerParts isrt.obl(version.obs) 637 | 636 VerProductVerPartsFromVer isrt.obl(version.obs) 638 | 637 WaitOnDialog isrt.obl(CustomDialog.obs) 639 | 638 WizardDirection ifx.obl(EventsSetupPriv.obs) 640 | 639 WriteLine isrt.obl(Files.obs) 641 | 640 WriteProfInt isrt.obl(Profile.obs) 642 | 641 WriteProfString isrt.obl(Profile.obs) 643 | 642 WriteProperties ifx.obl(PersistPropertyBag.obs) 644 | 643 __ISRTDoExit isrt.obl(Misc.obs) 645 | 644 __ISRTInit isrt.obl(ISRTInit.obs) 646 | 645 __ISRTRestoreMainLog isrt.obl(ISRTInit.obs) 647 | 646 __ISRTRestoreMainLogEx isrt.obl(ISRTInit.obs) 648 | 647 __ISRTSetComponentLog isrt.obl(ISRTInit.obs) 649 | 648 __ISRTUnInit isrt.obl(ISRTInit.obs) 650 | 649 __LoadIScriptString isrt.obl(LoadStr.obs) 651 | 650 program ifx.obl(EventsSetupPriv.obs) 652 | 651 sfc.SRSetRestorePointW Setup.obs 653 | 654 | 655 | ***** External Variables ***** 656 | 1 ADDREMOVE isrt.obl(DebugSymbols.obs) 657 | 2 ADDREMOVE_COMBINEDBUTTON Setup.obs 658 | 3 ADDREMOVE_HIDECHANGEOPTION Setup.obs 659 | 4 ADDREMOVE_HIDEREMOVEOPTION Setup.obs 660 | 5 ADDREMOVE_HIDEREPAIROPTION Setup.obs 661 | 6 ADDREMOVE_STRING_REMOVEONLY Setup.obs 662 | 7 ADDREMOVE_SYSTEMCOMPONENT Setup.obs 663 | 8 ADMINUSER Setup.obs 664 | 9 ALLUSERS Setup.obs 665 | 10 BASICMSI isrt.obl(DebugSymbols.obs) 666 | 11 BATCH_INSTALL Setup.obs 667 | 12 CMDLINE isrt.obl(DebugSymbols.obs) 668 | 13 COMMONFILES isrt.obl(DebugSymbols.obs) 669 | 14 COMMONFILES64 isrt.obl(DebugSymbols.obs) 670 | 15 DISABLE_ALLUSERBTN Setup.obs 671 | 16 DISABLE_PERUSERBTN Setup.obs 672 | 17 DISK1SETUPEXENAME isrt.obl(DebugSymbols.obs) 673 | 18 DISK1TARGET Setup.obs 674 | 19 ENABLED_ISERVICES isrt.obl(DebugSymbols.obs) 675 | 20 ENGINECOMMONDIR isrt.obl(DebugSymbols.obs) 676 | 21 ENGINEDIR isrt.obl(DebugSymbols.obs) 677 | 22 ERRORFILENAME Setup.obs 678 | 23 Err Setup.obs 679 | 24 FILETIME Setup.obs 680 | 25 FIND_DATAW Setup.obs 681 | 26 FOLDER_APPDATA isrt.obl(DebugSymbols.obs) 682 | 27 FOLDER_COMMON_APPDATA isrt.obl(DebugSymbols.obs) 683 | 28 FOLDER_DESKTOP isrt.obl(DebugSymbols.obs) 684 | 29 FOLDER_DOTNET_10 isrt.obl(DebugSymbols.obs) 685 | 30 FOLDER_DOTNET_11 isrt.obl(DebugSymbols.obs) 686 | 31 FOLDER_DOTNET_20 isrt.obl(DebugSymbols.obs) 687 | 32 FOLDER_DOTNET_30 isrt.obl(DebugSymbols.obs) 688 | 33 FOLDER_DOTNET_35 isrt.obl(DebugSymbols.obs) 689 | 34 FOLDER_DOTNET_40 isrt.obl(DebugSymbols.obs) 690 | 35 FOLDER_FONTS isrt.obl(DebugSymbols.obs) 691 | 36 FOLDER_LOCAL_APPDATA isrt.obl(DebugSymbols.obs) 692 | 37 FOLDER_PERSONAL isrt.obl(DebugSymbols.obs) 693 | 38 FOLDER_PROGRAMS isrt.obl(DebugSymbols.obs) 694 | 39 FOLDER_STARTMENU isrt.obl(DebugSymbols.obs) 695 | 40 FOLDER_STARTUP isrt.obl(DebugSymbols.obs) 696 | 41 FOLDER_TEMP isrt.obl(DebugSymbols.obs) 697 | 42 FileRegistrar Setup.obs 698 | 43 HIDE_DISABLED_BTNS Setup.obs 699 | 44 HKEYCURRENTROOTKEY Setup.obs 700 | 45 IFX_COMPANY_NAME Setup.obs 701 | 46 IFX_DISK1INSTALLED Setup.obs 702 | 47 IFX_INITIALIZED Setup.obs 703 | 48 IFX_INSTALLED_DISPLAY_VERSION Setup.obs 704 | 49 IFX_INSTALLED_VERSION Setup.obs 705 | 50 IFX_KEYPATH_PRODUCT_INFO Setup.obs 706 | 51 IFX_MULTI_INSTANCE_SUFFIX Setup.obs 707 | 52 IFX_OPEN_RESTORE_POINT isrt.obl(PCRestore.obs) 708 | 53 IFX_PRODUCT_COMMENTS Setup.obs 709 | 54 IFX_PRODUCT_DISPLAY_NAME Setup.obs 710 | 55 IFX_PRODUCT_DISPLAY_VERSION Setup.obs 711 | 56 IFX_PRODUCT_ICON Setup.obs 712 | 57 IFX_PRODUCT_KEY Setup.obs 713 | 58 IFX_PRODUCT_NAME Setup.obs 714 | 59 IFX_PRODUCT_README Setup.obs 715 | 60 IFX_PRODUCT_REGISTEREDCOMPANY Setup.obs 716 | 61 IFX_PRODUCT_REGISTEREDOWNER Setup.obs 717 | 62 IFX_PRODUCT_REGISTEREDSERIALNUM Setup.obs 718 | 63 IFX_PRODUCT_SUPPORT_CONTACT Setup.obs 719 | 64 IFX_PRODUCT_SUPPORT_PHONE Setup.obs 720 | 65 IFX_PRODUCT_SUPPORT_URL Setup.obs 721 | 66 IFX_PRODUCT_UPDATE_URL Setup.obs 722 | 67 IFX_PRODUCT_URL Setup.obs 723 | 68 IFX_PRODUCT_VERSION Setup.obs 724 | 69 IFX_RESTORE_DISABLED isrt.obl(PCRestore.obs) 725 | 70 IFX_SETUP_TITLE Setup.obs 726 | 71 IFX_SUPPORTED_VERSIONS Setup.obs 727 | 72 IISROOTFOLDER isrt.obl(DebugSymbols.obs) 728 | 73 INSTALLSCRIPTMSI isrt.obl(DebugSymbols.obs) 729 | 74 INSTALLSCRIPTMSIEEUI isrt.obl(DebugSymbols.obs) 730 | 75 INSTANCE_GUID isrt.obl(DebugSymbols.obs) 731 | 76 ISDIFXAPPID Setup.obs 732 | 77 ISRES isrt.obl(DebugSymbols.obs) 733 | 78 ISUSER isrt.obl(DebugSymbols.obs) 734 | 79 ISUTIL_FUNCTION_ACTUAL_ERROR Setup.obs 735 | 80 ISUTIL_LINE_NUMBER Setup.obs 736 | 81 ISUTIL_SCRIPT_FILE Setup.obs 737 | 82 ISVERSION isrt.obl(DebugSymbols.obs) 738 | 83 IS_NULLSTR_PTR Setup.obs 739 | 84 InetSRCDIR Setup.obs 740 | 85 LAAW_PARAMETERS Setup.obs 741 | 86 LAAW_SHELLEXECUTEINFO Setup.obs 742 | 87 LAAW_SHELLEXECUTEVERB Setup.obs 743 | 88 LAAW_STARTUPINFO Setup.obs 744 | 89 LAST_RESULT Setup.obs 745 | 90 LogDB Setup.obs 746 | 91 MAINTENANCE isrt.obl(DebugSymbols.obs) 747 | 92 MAINT_OPTION isrt.obl(DebugSymbols.obs) 748 | 93 MEDIA Setup.obs 749 | 94 MEDIA_INFO isrt.obl(Feature.obs) 750 | 95 MODE Setup.obs 751 | 96 MSG Setup.obs 752 | 97 MULTI_INSTANCE_COUNT isrt.obl(DebugSymbols.obs) 753 | 98 MainWindow Setup.obs 754 | 99 NOTHING Setup.obs 755 | 100 OSINFO_PLATFORM_INFO Setup.obs 756 | 101 OSINFO_PROCESSOR_INFO Setup.obs 757 | 102 OSVERSIONINFOEXW Setup.obs 758 | 103 OSVERSIONINFOW Setup.obs 759 | 104 Objects Setup.obs 760 | 105 PACKAGE_LOCATION isrt.obl(DebugSymbols.obs) 761 | 106 POINT Setup.obs 762 | 107 PRIVILEGED Setup.obs 763 | 108 PRODUCT_GUID isrt.obl(DebugSymbols.obs) 764 | 109 PROGRAMFILES isrt.obl(DebugSymbols.obs) 765 | 110 PROGRAMFILES64 isrt.obl(DebugSymbols.obs) 766 | 111 RECT Setup.obs 767 | 112 REGDB_OPTIONS Setup.obs 768 | 113 REINSTALLMODE isrt.obl(DebugSymbols.obs) 769 | 114 REMOVEALLMODE isrt.obl(DebugSymbols.obs) 770 | 115 REMOVEONLY isrt.obl(DebugSymbols.obs) 771 | 116 RUN_ONCE_PROGRAM isrt.obl(DebugSymbols.obs) 772 | 117 Reboot Setup.obs 773 | 118 SELECTED_LANGUAGE isrt.obl(DebugSymbols.obs) 774 | 119 SERVICE_IS_PARAMS Setup.obs 775 | 120 SETUPTYPE_STR_COMPACT Setup.obs 776 | 121 SETUPTYPE_STR_COMPLETE Setup.obs 777 | 122 SETUPTYPE_STR_CUSTOM Setup.obs 778 | 123 SETUPTYPE_STR_TYPICAL Setup.obs 779 | 124 SHAREDSUPPORTDIR isrt.obl(DebugSymbols.obs) 780 | 125 SHELLEXECUTEINFOW Setup.obs 781 | 126 SHELL_OBJECT_FOLDER Setup.obs 782 | 127 SHOW_PASSWORD_DIALOG isrt.obl(DebugSymbols.obs) 783 | 128 SRCDIR Setup.obs 784 | 129 SRCDISK isrt.obl(DebugSymbols.obs) 785 | 130 STANDARD_SELECTED_LANGUAGE isrt.obl(DebugSymbols.obs) 786 | 131 STARTUPINFOW Setup.obs 787 | 132 SUITE_HOSTED isrt.obl(DebugSymbols.obs) 788 | 133 SUPPORTDIR isrt.obl(DebugSymbols.obs) 789 | 134 SYSINFO Setup.obs 790 | 135 SYSPROCESSORINFO Setup.obs 791 | 136 SYSTEMTIME Setup.obs 792 | 137 SetupInfo Setup.obs 793 | 138 StatusDlg Setup.obs 794 | 139 SuiteHost Setup.obs 795 | 140 TARGETDIR Setup.obs 796 | 141 TARGETDISK isrt.obl(DebugSymbols.obs) 797 | 142 TextSub Setup.obs 798 | 143 UNINST Setup.obs 799 | 144 UNINSTALLKEY Setup.obs 800 | 145 UNINSTALL_DISPLAYNAME Setup.obs 801 | 146 UNINSTALL_STRING Setup.obs 802 | 147 UPDATEMODE Setup.obs 803 | 148 WINDIR isrt.obl(DebugSymbols.obs) 804 | 149 WINDISK isrt.obl(DebugSymbols.obs) 805 | 150 WINSYSDIR isrt.obl(DebugSymbols.obs) 806 | 151 WINSYSDIR64 isrt.obl(DebugSymbols.obs) 807 | 152 WINSYSDISK isrt.obl(DebugSymbols.obs) 808 | 153 _FONTFILEINFO Setup.obs 809 | 154 _INT64 Setup.obs 810 | 155 _ISDIFXINSTALLERINFO isrt.obl(ISDIFx.obs) 811 | 156 _LAAW_PARAMETERS Setup.obs 812 | 157 _RESTOREPOINTINFO Setup.obs 813 | 158 _SERVICE_IS_PARAMS Setup.obs 814 | 159 _STATEMGRSTATUS Setup.obs 815 | 160 _WIN9X Setup.obs 816 | 161 _WINNT Setup.obs 817 | 162 __hContext Setup.obs 818 | 163 __objGlobalTextSub Setup.obs 819 | 164 __szGUID Setup.obs 820 | 165 bBackButton Setup.obs 821 | 166 bCancelButton Setup.obs 822 | 167 bEnterDiskBeep Setup.obs 823 | 168 bFinishButton Setup.obs 824 | 169 bIFXLFNoToAll Setup.obs 825 | 170 bIFXLFOnRebootToAll Setup.obs 826 | 171 bIFXLFYesToAll Setup.obs 827 | 172 bIFXMD5IgnoreToAll Setup.obs 828 | 173 bIFXRONoToAll Setup.obs 829 | 174 bIFXROYesToAll Setup.obs 830 | 175 bIFXSFNoToAll Setup.obs 831 | 176 bIFXSFYesToAll Setup.obs 832 | 177 bInstall16 Setup.obs 833 | 178 bNextButton Setup.obs 834 | 179 bSdInit Setup.obs 835 | 180 bViewCmptKunits Setup.obs 836 | 181 bViewCmptUseDecimal Setup.obs 837 | 182 g_bSuppressMissingStringWarning isrt.obl(Enable.obs) 838 | 183 nDlgEnterPassword Setup.obs 839 | 184 nDlgMessageBox Setup.obs 840 | 185 nDlgSelectDir Setup.obs 841 | 186 nDlgSprintfBox Setup.obs 842 | 187 nSdComponentTree Setup.obs 843 | 188 nSdFinish Setup.obs 844 | 189 nSdFinishReboot Setup.obs 845 | 190 nSdStartCopy2 Setup.obs 846 | 191 nSdWelcome Setup.obs 847 | 192 nSdWelcomeMaint Setup.obs 848 | 193 szAppKey Setup.obs 849 | 194 szSdProduct Setup.obs 850 | 195 szSdStr_NotEnoughSpace Setup.obs 851 | -------------------------------------------------------------------------------- /Source.cpp: -------------------------------------------------------------------------------- 1 | #pragma comment(linker,"\"/manifestdependency:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") 2 | 3 | #pragma comment(lib, "shlwapi") 4 | #pragma comment(lib, "d2d1") 5 | #pragma comment(lib, "dwrite") 6 | #pragma comment(lib, "dsound") 7 | #pragma comment(lib, "legacy_stdio_definitions") 8 | #pragma comment(lib, "windowscodecs.lib") 9 | 10 | #import "C:\Program Files (x86)\Common Files\Microsoft Shared\DAO\dao360.dll" rename_namespace("DAO") rename("EOF", "adoEOF") 11 | #import "C:\Program Files (x86)\Common Files\System\ado\msado60.tlb" no_namespace rename("EOF", "EndOfFile") 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include "resource.h" 26 | 27 | #define MAX_SOUND_COUNT 6 28 | #define DEFAULT_DPI 96 29 | #define SCALEX(X) MulDiv(X, uDpiX, DEFAULT_DPI) 30 | #define SCALEY(Y) MulDiv(Y, uDpiY, DEFAULT_DPI) 31 | #define POINT2PIXEL(PT) MulDiv(PT, uDpiY, DEFAULT_DPI) 32 | #define MAX_LOADSTRING 100 33 | 34 | #ifdef _DEBUG 35 | # define debuglog( str, ... ) \ 36 | { \ 37 | WCHAR c[1024]; \ 38 | wsprintf(c, str, __VA_ARGS__); \ 39 | OutputDebugString(c); \ 40 | } 41 | #else 42 | # define debuglog( str, ... ) // 空実装 43 | #endif 44 | 45 | // グローバル変数: 46 | HWND hWnd; 47 | WCHAR szTitle[MAX_LOADSTRING]; 48 | WCHAR szWindowClass[MAX_LOADSTRING]; 49 | IDirectSoundBuffer* dsb1[MAX_SOUND_COUNT]; 50 | int nSoundResourceID[MAX_SOUND_COUNT] = { IDR_WAVE1,IDR_WAVE2,IDR_WAVE3,IDR_WAVE4,IDR_WAVE5,IDR_WAVE6 }; 51 | 52 | struct kana 53 | { 54 | kana(LPCWSTR s, DATE d) :kana1(s), priority(d) {}; 55 | std::wstring kana1; 56 | DATE priority; 57 | }; 58 | 59 | std::map g_rome{ 60 | {L"A",{L"ア",1.0}}, 61 | {L"BA",{L"バ",0.0}}, 62 | {L"BBA",{L"ッバ",1.0}}, 63 | {L"BBE",{L"ッベ",1.0}}, 64 | {L"BBI",{L"ッビ",1.0}}, 65 | {L"BBO",{L"ッボ",1.0}}, 66 | {L"BBU",{L"ッブ",1.0}}, 67 | {L"BBYA",{L"ッビャ",1.0}}, 68 | {L"BBYE",{L"ッビェ",1.0}}, 69 | {L"BBYI",{L"ッビィ",1.0}}, 70 | {L"BBYO",{L"ッビョ",1.0}}, 71 | {L"BBYU",{L"ッビュ",1.0}}, 72 | {L"BE",{L"ベ",0.0}}, 73 | {L"BI",{L"ビ",0.0}}, 74 | {L"BO",{L"ボ",0.0}}, 75 | {L"BU",{L"ブ",0.0}}, 76 | {L"BYA",{L"ビャ",0.0}}, 77 | {L"BYE",{L"ビェ",0.0}}, 78 | {L"BYI",{L"ビィ",0.0}}, 79 | {L"BYO",{L"ビョ",0.0}}, 80 | {L"BYU",{L"ビュ",0.0}}, 81 | {L"CA",{L"カ",0.0}}, 82 | {L"CCA",{L"ッカ",0.0}}, 83 | {L"CCE",{L"ッセ",0.0}}, 84 | {L"CCHA",{L"ッチャ",0.0}}, 85 | {L"CCHE",{L"ッチェ",0.0}}, 86 | {L"CCHI",{L"ッチ",0.0}}, 87 | {L"CCHO",{L"ッチョ",0.0}}, 88 | {L"CCHU",{L"ッチュ",0.0}}, 89 | {L"CCI",{L"ッシ",0.0}}, 90 | {L"CCO",{L"ッコ",0.0}}, 91 | {L"CCU",{L"ック",0.0}}, 92 | {L"CCYA",{L"ッチャ",0.0}}, 93 | {L"CCYE",{L"ッチェ",0.0}}, 94 | {L"CCYI",{L"ッチィ",0.0}}, 95 | {L"CCYO",{L"ッチョ",0.0}}, 96 | {L"CCYU",{L"ッチュ",0.0}}, 97 | {L"CE",{L"セ",0.0}}, 98 | {L"CHA",{L"チャ",0.0}}, 99 | {L"CHE",{L"チェ",0.0}}, 100 | {L"CHI",{L"チ",0.0}}, 101 | {L"CHO",{L"チョ",0.0}}, 102 | {L"CHU",{L"チュ",0.0}}, 103 | {L"CI",{L"シ",0.0}}, 104 | {L"CO",{L"コ",0.0}}, 105 | {L"CU",{L"ク",0.0}}, 106 | {L"CYA",{L"チャ",0.0}}, 107 | {L"CYE",{L"チェ",0.0}}, 108 | {L"CYI",{L"チィ",0.0}}, 109 | {L"CYO",{L"チョ",0.0}}, 110 | {L"CYU",{L"チュ",0.0}}, 111 | {L"DA",{L"ダ",0.0}}, 112 | {L"DDA",{L"ッダ",1.0}}, 113 | {L"DDE",{L"ッデ",1.0}}, 114 | {L"DDHA",{L"ッデャ",0.0}}, 115 | {L"DDHE",{L"ッデェ",0.0}}, 116 | {L"DDHI",{L"ッディ",0.0}}, 117 | {L"DDHO",{L"ッデョ",0.0}}, 118 | {L"DDHU",{L"ッデュ",0.0}}, 119 | {L"DDI",{L"ッヂ",1.0}}, 120 | {L"DDO",{L"ッド",1.0}}, 121 | {L"DDU",{L"ッヅ",1.0}}, 122 | {L"DDWA",{L"ッドァ",0.0}}, 123 | {L"DDWE",{L"ッドェ",0.0}}, 124 | {L"DDWI",{L"ッドィ",0.0}}, 125 | {L"DDWO",{L"ッドォ",0.0}}, 126 | {L"DDWU",{L"ッドゥ",0.0}}, 127 | {L"DE",{L"デ",0.0}}, 128 | {L"DHA",{L"デャ",0.0}}, 129 | {L"DHE",{L"デェ",0.0}}, 130 | {L"DHI",{L"ディ",0.0}}, 131 | {L"DHO",{L"デョ",0.0}}, 132 | {L"DHU",{L"デュ",0.0}}, 133 | {L"DI",{L"ディ",0.0}}, 134 | {L"DJI",{L"ヂ",0.0}}, 135 | {L"DO",{L"ド",0.0}}, 136 | {L"DU",{L"ヅ",1.0}}, 137 | {L"DWA",{L"ドァ",0.0}}, 138 | {L"DWE",{L"ドェ",0.0}}, 139 | {L"DWI",{L"ドィ",0.0}}, 140 | {L"DWO",{L"ドォ",0.0}}, 141 | {L"DWU",{L"ドゥ",0.0}}, 142 | {L"DYA",{L"ヂャ",0.0}}, 143 | {L"DYE",{L"ヂェ",0.0}}, 144 | {L"DYI",{L"ヂィ",0.0}}, 145 | {L"DYO",{L"ヂョ",0.0}}, 146 | {L"DYU",{L"ヂュ",0.0}}, 147 | {L"DZU",{L"ヅ",0.0}}, 148 | {L"E",{L"エ",1.0}}, 149 | {L"FA",{L"ファ",1.0}}, 150 | {L"FE",{L"フェ",1.0}}, 151 | {L"FFA",{L"ッファ",0.0}}, 152 | {L"FFE",{L"ッフェ",0.0}}, 153 | {L"FFI",{L"ッフィ",0.0}}, 154 | {L"FFO",{L"ッフォ",0.0}}, 155 | {L"FFU",{L"ッフ",0.0}}, 156 | {L"FFWA",{L"ッファ",0.0}}, 157 | {L"FFWE",{L"ッフェ",0.0}}, 158 | {L"FFWI",{L"ッフィ",0.0}}, 159 | {L"FFWO",{L"ッフォ",0.0}}, 160 | {L"FFWU",{L"ッフゥ",0.0}}, 161 | {L"FFYA",{L"ッフャ",0.0}}, 162 | {L"FFYE",{L"ッフェ",0.0}}, 163 | {L"FFYI",{L"ッフィ",0.0}}, 164 | {L"FFYO",{L"ッフョ",0.0}}, 165 | {L"FFYU",{L"ッフュ",0.0}}, 166 | {L"FI",{L"フィ",1.0}}, 167 | {L"FO",{L"フォ",1.0}}, 168 | {L"FU",{L"フ",0.0}}, 169 | {L"FWA",{L"ファ",0.0}}, 170 | {L"FWE",{L"フェ",0.0}}, 171 | {L"FWI",{L"フィ",0.0}}, 172 | {L"FWO",{L"フォ",0.0}}, 173 | {L"FWU",{L"フゥ",0.0}}, 174 | {L"FYA",{L"フャ",0.0}}, 175 | {L"FYE",{L"フェ",0.0}}, 176 | {L"FYI",{L"フィ",0.0}}, 177 | {L"FYO",{L"フョ",0.0}}, 178 | {L"FYU",{L"フュ",0.0}}, 179 | {L"GA",{L"ガ",0.0}}, 180 | {L"GE",{L"ゲ",0.0}}, 181 | {L"GGA",{L"ッガ",1.0}}, 182 | {L"GGE",{L"ッゲ",1.0}}, 183 | {L"GGI",{L"ッギ",1.0}}, 184 | {L"GGO",{L"ッゴ",1.0}}, 185 | {L"GGU",{L"ッグ",1.0}}, 186 | {L"GGWA",{L"ッグァ",0.0}}, 187 | {L"GGWE",{L"ッグェ",0.0}}, 188 | {L"GGWI",{L"ッグィ",0.0}}, 189 | {L"GGWO",{L"ッグォ",0.0}}, 190 | {L"GGWU",{L"ッグゥ",0.0}}, 191 | {L"GGYA",{L"ッギャ",1.0}}, 192 | {L"GGYE",{L"ッギェ",1.0}}, 193 | {L"GGYI",{L"ッギィ",1.0}}, 194 | {L"GGYO",{L"ッギョ",1.0}}, 195 | {L"GGYU",{L"ッギュ",1.0}}, 196 | {L"GI",{L"ギ",0.0}}, 197 | {L"GO",{L"ゴ",0.0}}, 198 | {L"GU",{L"グ",0.0}}, 199 | {L"GWA",{L"グァ",0.0}}, 200 | {L"GWE",{L"グェ",0.0}}, 201 | {L"GWI",{L"グィ",0.0}}, 202 | {L"GWO",{L"グォ",0.0}}, 203 | {L"GWU",{L"グゥ",0.0}}, 204 | {L"GYA",{L"ギャ",0.0}}, 205 | {L"GYE",{L"ギェ",0.0}}, 206 | {L"GYI",{L"ギィ",0.0}}, 207 | {L"GYO",{L"ギョ",0.0}}, 208 | {L"GYU",{L"ギュ",0.0}}, 209 | {L"HA",{L"ハ",1.0}}, 210 | {L"HE",{L"ヘ",1.0}}, 211 | {L"HHA",{L"ッハ",1.0}}, 212 | {L"HHE",{L"ッヘ",1.0}}, 213 | {L"HHI",{L"ッヒ",1.0}}, 214 | {L"HHO",{L"ッポ",1.0}}, 215 | {L"HHU",{L"ッフ",1.0}}, 216 | {L"HHYA",{L"ッヒャ",0.0}}, 217 | {L"HHYE",{L"ッヒェ",0.0}}, 218 | {L"HHYI",{L"ッヒィ",0.0}}, 219 | {L"HHYO",{L"ッヒョ",0.0}}, 220 | {L"HHYU",{L"ッヒュ",0.0}}, 221 | {L"HI",{L"ヒ",1.0}}, 222 | {L"HO",{L"ホ",1.0}}, 223 | {L"HU",{L"フ",1.0}}, 224 | {L"HYA",{L"ヒャ",0.0}}, 225 | {L"HYE",{L"ヒェ",0.0}}, 226 | {L"HYI",{L"ヒィ",0.0}}, 227 | {L"HYO",{L"ヒョ",0.0}}, 228 | {L"HYU",{L"ヒュ",0.0}}, 229 | {L"I",{L"イ",1.0}}, 230 | {L"JA",{L"ジャ",1.0}}, 231 | {L"JE",{L"ジェ",1.0}}, 232 | {L"JI",{L"ジ",1.0}}, 233 | {L"JJA",{L"ッジャ",1.0}}, 234 | {L"JJE",{L"ッジェ",1.0}}, 235 | {L"JJI",{L"ッジ",1.0}}, 236 | {L"JJO",{L"ッジォ",1.0}}, 237 | {L"JJU",{L"ッジュ",1.0}}, 238 | {L"JJYA",{L"ッジャ",0.0}}, 239 | {L"JJYE",{L"ッジェ",0.0}}, 240 | {L"JJYI",{L"ッジィ",0.0}}, 241 | {L"JJYO",{L"ッジョ",0.0}}, 242 | {L"JJYU",{L"ッジュ",0.0}}, 243 | {L"JO",{L"ジョ",1.0}}, 244 | {L"JU",{L"ジュ",1.0}}, 245 | {L"JYA",{L"ジャ",1.0}}, 246 | {L"JYE",{L"ジェ",1.0}}, 247 | {L"JYI",{L"ジィ",1.0}}, 248 | {L"JYO",{L"ジョ",1.0}}, 249 | {L"JYU",{L"ジュ",1.0}}, 250 | {L"KA",{L"カ",1.0}}, 251 | {L"KE",{L"ケ",1.0}}, 252 | {L"KI",{L"キ",1.0}}, 253 | {L"KKA",{L"ッカ",1.0}}, 254 | {L"KKE",{L"ッケ",1.0}}, 255 | {L"KKI",{L"ッキ",1.0}}, 256 | {L"KKO",{L"ッコ",1.0}}, 257 | {L"KKU",{L"ック",1.0}}, 258 | {L"KKWA",{L"ックァ",0.0}}, 259 | {L"KKYA",{L"ッキャ",0.0}}, 260 | {L"KKYE",{L"ッキェ",0.0}}, 261 | {L"KKYI",{L"ッキィ",0.0}}, 262 | {L"KKYO",{L"ッキョ",0.0}}, 263 | {L"KKYU",{L"ッキュ",0.0}}, 264 | {L"KO",{L"コ",1.0}}, 265 | {L"KU",{L"ク",1.0}}, 266 | {L"KWA",{L"クァ",0.0}}, 267 | {L"KYA",{L"キャ",1.0}}, 268 | {L"KYE",{L"キェ",1.0}}, 269 | {L"KYI",{L"キィ",1.0}}, 270 | {L"KYO",{L"キョ",1.0}}, 271 | {L"KYU",{L"キュ",1.0}}, 272 | {L"LA",{L"ァ",0.0}}, 273 | {L"LE",{L"ェ",0.0}}, 274 | {L"LI",{L"ィ",0.0}}, 275 | {L"LKA",{L"ヵ",0.0}}, 276 | {L"LKE",{L"ヶ",0.0}}, 277 | {L"LLA",{L"ッァ",0.0}}, 278 | {L"LLE",{L"ッェ",0.0}}, 279 | {L"LLI",{L"ッィ",0.0}}, 280 | {L"LLO",{L"ッォ",0.0}}, 281 | {L"LLU",{L"ッゥ",0.0}}, 282 | {L"LO",{L"ォ",0.0}}, 283 | {L"LTSU",{L"ッ",0.0}}, 284 | {L"LTU",{L"ッ",0.0}}, 285 | {L"LU",{L"ゥ",0.0}}, 286 | {L"LWA",{L"ヮ",0.0}}, 287 | {L"LYA",{L"ャ",0.0}}, 288 | {L"LYE",{L"ェ",0.0}}, 289 | {L"LYI",{L"ィ",0.0}}, 290 | {L"LYO",{L"ョ",0.0}}, 291 | {L"LYU",{L"ュ",0.0}}, 292 | {L"MA",{L"マ",0.0}}, 293 | {L"ME",{L"メ",0.0}}, 294 | {L"MI",{L"ミ",0.0}}, 295 | {L"MMA",{L"ッマ",1.0}}, 296 | {L"MME",{L"ッメ",1.0}}, 297 | {L"MMI",{L"ッミ",1.0}}, 298 | {L"MMO",{L"ッモ",1.0}}, 299 | {L"MMU",{L"ッム",1.0}}, 300 | {L"MMYA",{L"ッミャ",1.0}}, 301 | {L"MMYE",{L"ッミェ",1.0}}, 302 | {L"MMYI",{L"ッミィ",1.0}}, 303 | {L"MMYO",{L"ッミョ",1.0}}, 304 | {L"MMYU",{L"ッミュ",1.0}}, 305 | {L"MO",{L"モ",0.0}}, 306 | {L"MU",{L"ム",0.0}}, 307 | {L"MYA",{L"ミャ",0.0}}, 308 | {L"MYE",{L"ミェ",0.0}}, 309 | {L"MYI",{L"ミィ",0.0}}, 310 | {L"MYO",{L"ミョ",0.0}}, 311 | {L"MYU",{L"ミュ",0.0}}, 312 | {L"NA",{L"ナ",1.0}}, 313 | {L"NE",{L"ネ",1.0}}, 314 | {L"NI",{L"ニ",1.0}}, 315 | {L"NN",{L"ン",1.0}}, 316 | {L"NO",{L"ノ",1.0}}, 317 | {L"NU",{L"ヌ",1.0}}, 318 | {L"NYA",{L"ニャ",0.0}}, 319 | {L"NYE",{L"ニェ",0.0}}, 320 | {L"NYI",{L"ニィ",0.0}}, 321 | {L"NYO",{L"ニョ",0.0}}, 322 | {L"NYU",{L"ニュ",0.0}}, 323 | {L"O",{L"オ",1.0}}, 324 | {L"PA",{L"パ",0.0}}, 325 | {L"PE",{L"ペ",0.0}}, 326 | {L"PI",{L"ピ",0.0}}, 327 | {L"PO",{L"ポ",0.0}}, 328 | {L"PPA",{L"ッバ",1.0}}, 329 | {L"PPE",{L"ッベ",1.0}}, 330 | {L"PPI",{L"ッピ",1.0}}, 331 | {L"PPO",{L"ッポ",1.0}}, 332 | {L"PPU",{L"ップ",1.0}}, 333 | {L"PPYA",{L"ッピャ",0.0}}, 334 | {L"PPYE",{L"ッピェ",0.0}}, 335 | {L"PPYI",{L"ッピィ",0.0}}, 336 | {L"PPYO",{L"ッピョ",0.0}}, 337 | {L"PPYU",{L"ッピュ",0.0}}, 338 | {L"PU",{L"プ",0.0}}, 339 | {L"PYA",{L"ピャ",0.0}}, 340 | {L"PYE",{L"ピェ",0.0}}, 341 | {L"PYI",{L"ピィ",0.0}}, 342 | {L"PYO",{L"ピョ",0.0}}, 343 | {L"PYU",{L"ピュ",0.0}}, 344 | {L"QA",{L"クァ",0.0}}, 345 | {L"QE",{L"クェ",0.0}}, 346 | {L"QI",{L"クィ",0.0}}, 347 | {L"QO",{L"クォ",0.0}}, 348 | {L"QQA",{L"ックァ",0.0}}, 349 | {L"QQE",{L"ックェ",0.0}}, 350 | {L"QQI",{L"ックィ",0.0}}, 351 | {L"QQO",{L"ックォ",0.0}}, 352 | {L"QQU",{L"ック",0.0}}, 353 | {L"QQWA",{L"ックァ",0.0}}, 354 | {L"QQWE",{L"ックェ",0.0}}, 355 | {L"QQWI",{L"ックィ",0.0}}, 356 | {L"QQWO",{L"ックォ",0.0}}, 357 | {L"QQWU",{L"ックゥ",0.0}}, 358 | {L"QQYA",{L"ックャ",0.0}}, 359 | {L"QQYE",{L"ックェ",0.0}}, 360 | {L"QQYI",{L"ックィ",0.0}}, 361 | {L"QQYO",{L"ックョ",0.0}}, 362 | {L"QQYU",{L"ックュ",0.0}}, 363 | {L"QU",{L"クゥ",0.0}}, 364 | {L"QWA",{L"クァ",0.0}}, 365 | {L"QWE",{L"クェ",0.0}}, 366 | {L"QWI",{L"クィ",0.0}}, 367 | {L"QWO",{L"クォ",0.0}}, 368 | {L"QWU",{L"クゥ",0.0}}, 369 | {L"QYA",{L"クャ",0.0}}, 370 | {L"QYE",{L"クェ",0.0}}, 371 | {L"QYI",{L"クィ",0.0}}, 372 | {L"QYO",{L"クョ",0.0}}, 373 | {L"QYU",{L"クュ",0.0}}, 374 | {L"RA",{L"ラ",0.0}}, 375 | {L"RE",{L"レ",0.0}}, 376 | {L"RI",{L"リ",0.0}}, 377 | {L"RO",{L"ロ",0.0}}, 378 | {L"RRA",{L"ッラ",0.0}}, 379 | {L"RRE",{L"ッレ",0.0}}, 380 | {L"RRI",{L"ッリ",0.0}}, 381 | {L"RRO",{L"ッロ",0.0}}, 382 | {L"RRU",{L"ッル",0.0}}, 383 | {L"RRYA",{L"ッリャ",0.0}}, 384 | {L"RRYE",{L"ッリェ",0.0}}, 385 | {L"RRYI",{L"ッリィ",0.0}}, 386 | {L"RRYO",{L"ッリョ",0.0}}, 387 | {L"RRYU",{L"ッリュ",0.0}}, 388 | {L"RU",{L"ル",0.0}}, 389 | {L"RYA",{L"リャ",1.0}}, 390 | {L"RYO",{L"リョ",1.0}}, 391 | {L"RYU",{L"リュ",1.0}}, 392 | {L"SA",{L"サ",1.0}}, 393 | {L"SE",{L"セ",1.0}}, 394 | {L"SHA",{L"シャ",0.0}}, 395 | {L"SHE",{L"シェ",0.0}}, 396 | {L"SHI",{L"シ",0.0}}, 397 | {L"SHO",{L"ショ",0.0}}, 398 | {L"SHU",{L"シュ",0.0}}, 399 | {L"SI",{L"シ",1.0}}, 400 | {L"SO",{L"ソ",1.0}}, 401 | {L"SSA",{L"ッサ",1.0}}, 402 | {L"SSE",{L"ッセ",1.0}}, 403 | {L"SSHA",{L"ッシャ",0.0}}, 404 | {L"SSHE",{L"ッシェ",0.0}}, 405 | {L"SSHI",{L"ッシ",0.0}}, 406 | {L"SSHO",{L"ッショ",0.0}}, 407 | {L"SSHU",{L"ッシュ",0.0}}, 408 | {L"SSI",{L"ッシ",1.0}}, 409 | {L"SSO",{L"ッソ",1.0}}, 410 | {L"SSU",{L"ッス",1.0}}, 411 | {L"SSWA",{L"ッスァ",0.0}}, 412 | {L"SSWE",{L"ッスェ",0.0}}, 413 | {L"SSWI",{L"ッスィ",0.0}}, 414 | {L"SSWO",{L"ッスォ",0.0}}, 415 | {L"SSWU",{L"ッスゥ",0.0}}, 416 | {L"SSYA",{L"ッシャ",0.0}}, 417 | {L"SSYE",{L"ッシェ",0.0}}, 418 | {L"SSYI",{L"ッシィ",0.0}}, 419 | {L"SSYO",{L"ッショ",0.0}}, 420 | {L"SSYU",{L"ッシュ",0.0}}, 421 | {L"SU",{L"ス",1.0}}, 422 | {L"SWA",{L"スァ",0.0}}, 423 | {L"SWE",{L"スェ",0.0}}, 424 | {L"SWI",{L"スィ",0.0}}, 425 | {L"SWO",{L"スォ",0.0}}, 426 | {L"SWU",{L"スゥ",0.0}}, 427 | {L"SYA",{L"シャ",1.0}}, 428 | {L"SYE",{L"シェ",1.0}}, 429 | {L"SYE",{L"シェ",1.0}}, 430 | {L"SYI",{L"シィ",1.0}}, 431 | {L"SYO",{L"ショ",1.0}}, 432 | {L"SYU",{L"シュ",1.0}}, 433 | {L"TA",{L"タ",1.0}}, 434 | {L"TE",{L"テ",1.0}}, 435 | {L"THA",{L"テャ",0.0}}, 436 | {L"THE",{L"テェ",0.0}}, 437 | {L"THI",{L"ティ",0.0}}, 438 | {L"THO",{L"テョ",0.0}}, 439 | {L"THU",{L"テュ",0.0}}, 440 | {L"TI",{L"チ",1.0}}, 441 | {L"TO",{L"ト",1.0}}, 442 | {L"TSA",{L"ツァ",0.0}}, 443 | {L"TSE",{L"ツェ",0.0}}, 444 | {L"TSI",{L"ツィ",0.0}}, 445 | {L"TSO",{L"ツォ",0.0}}, 446 | {L"TSU",{L"ツ",0.0}}, 447 | {L"TTA",{L"ッタ",1.0}}, 448 | {L"TTE",{L"ッテ",1.0}}, 449 | {L"TTHA",{L"ッテャ",0.0}}, 450 | {L"TTHE",{L"ッテェ",0.0}}, 451 | {L"TTHI",{L"ッティ",0.0}}, 452 | {L"TTHO",{L"ッテョ",0.0}}, 453 | {L"TTHU",{L"ッテュ",0.0}}, 454 | {L"TTI",{L"ッチ",1.0}}, 455 | {L"TTO",{L"ット",1.0}}, 456 | {L"TTSA",{L"ッツァ",0.0}}, 457 | {L"TTSE",{L"ッツェ",0.0}}, 458 | {L"TTSI",{L"ッツィ",0.0}}, 459 | {L"TTSO",{L"ッツォ",0.0}}, 460 | {L"TTSU",{L"ッツ",0.0}}, 461 | {L"TTU",{L"ッツ",1.0}}, 462 | {L"TTWA",{L"ットァ",0.0}}, 463 | {L"TTWE",{L"ットェ",0.0}}, 464 | {L"TTWI",{L"ットィ",0.0}}, 465 | {L"TTWO",{L"ットォ",0.0}}, 466 | {L"TTWU",{L"ットゥ",0.0}}, 467 | {L"TTYA",{L"ッチャ",0.0}}, 468 | {L"TTYE",{L"ッチェ",0.0}}, 469 | {L"TTYI",{L"ッチィ",0.0}}, 470 | {L"TTYO",{L"ッチョ",0.0}}, 471 | {L"TTYU",{L"ッチュ",0.0}}, 472 | {L"TU",{L"ツ",1.0}}, 473 | {L"TWA",{L"トァ",0.0}}, 474 | {L"TWE",{L"トェ",0.0}}, 475 | {L"TWI",{L"トィ",0.0}}, 476 | {L"TWO",{L"トォ",0.0}}, 477 | {L"TWU",{L"トゥ",0.0}}, 478 | {L"TYA",{L"チャ",1.0}}, 479 | {L"TYE",{L"チェ",1.0}}, 480 | {L"TYI",{L"チィ",1.0}}, 481 | {L"TYO",{L"チョ",1.0}}, 482 | {L"TYU",{L"チュ",1.0}}, 483 | {L"U",{L"ウ",1.0}}, 484 | {L"VA",{L"ヴァ",0.0}}, 485 | {L"VE",{L"ヴェ",0.0}}, 486 | {L"VI",{L"ヴィ",0.0}}, 487 | {L"VO",{L"ヴォ",0.0}}, 488 | {L"VU",{L"ヴ",0.0}}, 489 | {L"VVA",{L"ッヴァ",0.0}}, 490 | {L"VVE",{L"ッヴェ",1.0}}, 491 | {L"VVI",{L"ッヴィ",1.0}}, 492 | {L"VVO",{L"ッヴォ",0.0}}, 493 | {L"VVU",{L"ッヴ",0.0}}, 494 | {L"VVYA",{L"ッヴャ",0.0}}, 495 | {L"VVYE",{L"ッヴェ",0.0}}, 496 | {L"VVYI",{L"ッヴィ",0.0}}, 497 | {L"VVYO",{L"ッヴョ",0.0}}, 498 | {L"VVYU",{L"ッヴュ",0.0}}, 499 | {L"VYA",{L"ヴャ",0.0}}, 500 | {L"VYE",{L"ヴェ",0.0}}, 501 | {L"VYI",{L"ヴィ",0.0}}, 502 | {L"VYO",{L"ヴョ",0.0}}, 503 | {L"VYU",{L"ヴュ",0.0}}, 504 | {L"WA",{L"ワ",0.0}}, 505 | {L"WE",{L"ウェ",0.0}}, 506 | {L"WHA",{L"ウァ",0.0}}, 507 | {L"WHE",{L"ウェ",0.0}}, 508 | {L"WHI",{L"ウィ",0.0}}, 509 | {L"WHO",{L"ウォ",0.0}}, 510 | {L"WHU",{L"ウ",0.0}}, 511 | {L"WI",{L"ウィ",0.0}}, 512 | {L"WO",{L"ヲ",0.0}}, 513 | {L"WU",{L"ウ",0.0}}, 514 | {L"WWA",{L"ッワ",0.0}}, 515 | {L"WWE",{L"ッウェ",0.0}}, 516 | {L"WWI",{L"ッウィ",0.0}}, 517 | {L"WWO",{L"ッヲ",0.0}}, 518 | {L"WWU",{L"ッウ",0.0}}, 519 | {L"XA",{L"ァ",0.0}}, 520 | {L"XE",{L"ェ",0.0}}, 521 | {L"XI",{L"ィ",0.0}}, 522 | {L"XKA",{L"ヵ",0.0}}, 523 | {L"XKE",{L"ヶ",0.0}}, 524 | {L"XN",{L"ン",0.0}}, 525 | {L"XO",{L"ォ",0.0}}, 526 | {L"XTSU",{L"ッ",0.0}}, 527 | {L"XTU",{L"ッ",0.0}}, 528 | {L"XU",{L"ゥ",0.0}}, 529 | {L"XWA",{L"ヮ",0.0}}, 530 | {L"XXA",{L"ッァ",0.0}}, 531 | {L"XXE",{L"ッェ",0.0}}, 532 | {L"XXI",{L"ッィ",0.0}}, 533 | {L"XXO",{L"ッォ",0.0}}, 534 | {L"XXU",{L"ッゥ",0.0}}, 535 | {L"XXYA",{L"ッャ",0.0}}, 536 | {L"XXYE",{L"ッェ",0.0}}, 537 | {L"XXYI",{L"ッィ",0.0}}, 538 | {L"XXYO",{L"ッョ",0.0}}, 539 | {L"XXYU",{L"ッュ",0.0}}, 540 | {L"XYA",{L"ャ",0.0}}, 541 | {L"XYE",{L"ェ",0.0}}, 542 | {L"XYI",{L"ィ",0.0}}, 543 | {L"XYO",{L"ョ",0.0}}, 544 | {L"XYU",{L"ュ",0.0}}, 545 | {L"YA",{L"ヤ",0.0}}, 546 | {L"YE",{L"イェ",0.0}}, 547 | {L"YI",{L"イ",0.0}}, 548 | {L"YO",{L"ヨ",0.0}}, 549 | {L"YU",{L"ユ",0.0}}, 550 | {L"YYA",{L"ッヤ",0.0}}, 551 | {L"YYE",{L"ッイェ",0.0}}, 552 | {L"YYI",{L"ッイ",0.0}}, 553 | {L"YYO",{L"ッヨ",0.0}}, 554 | {L"YYU",{L"ッユ",0.0}}, 555 | {L"ZA",{L"ザ",0.0}}, 556 | {L"ZE",{L"ゼ",0.0}}, 557 | {L"ZO",{L"ゾ",0.0}}, 558 | {L"ZU",{L"ズ",0.0}}, 559 | {L"ZYA",{L"ジャ",0.0}}, 560 | {L"ZYE",{L"ジェ",0.0}}, 561 | {L"ZYI",{L"ジィ",0.0}}, 562 | {L"ZYO",{L"ジョ",0.0}}, 563 | {L"ZYU",{L"ジュ",0.0}}, 564 | {L"ZZA",{L"ッザ",0.0}}, 565 | {L"ZZE",{L"ッゼ",0.0}}, 566 | {L"ZZI",{L"ッジ",0.0}}, 567 | {L"ZZO",{L"ッゾ",0.0}}, 568 | {L"ZZU",{L"ッズ",0.0}}, 569 | {L"ZZYA",{L"ッジャ",0.0}}, 570 | {L"ZZYE",{L"ッジェ",0.0}}, 571 | {L"ZZYI",{L"ッジィ",0.0}}, 572 | {L"ZZYO",{L"ッジョ",0.0}}, 573 | {L"ZZYU",{L"ッジュ",0.0}}, 574 | }; 575 | 576 | std::map g_kana{ 577 | }; 578 | 579 | struct sentence 580 | { 581 | std::wstring words; 582 | std::wstring kana; 583 | }; 584 | 585 | typedef enum { 586 | GS_TITLE, 587 | GS_COUNTDOWN, 588 | GS_GAMESTART, 589 | GS_GAMEEND, 590 | GS_GAMESTATUS, 591 | GS_RANKING, 592 | GS_NAMEINPUT, 593 | GS_SETTINGS, 594 | } GAME_STATE; 595 | 596 | void PlaySound(int nSoundKind) 597 | { 598 | if (0 <= nSoundKind && nSoundKind < MAX_SOUND_COUNT) 599 | { 600 | dsb1[nSoundKind]->SetCurrentPosition(0); 601 | dsb1[nSoundKind]->Play(0, 0, 0); 602 | } 603 | } 604 | 605 | struct game 606 | { 607 | game() :szInputRome{}, szQuestionKana{}, szQuestionRome{} 608 | { 609 | nGameState = GS_TITLE; 610 | nMaxTimeCount = 60; 611 | nTimeCount = nMaxTimeCount; 612 | nCursorKana = 0; 613 | nCursorRome = 0; 614 | nCategory = 1; 615 | nTypeCountKana = 0; 616 | nTypeCountRome = 0; 617 | bMiss = FALSE; 618 | nMissCount = 0; 619 | nQuestionCount = 0; 620 | nMaxQuestionCount = nMaxTimeCount * 10; // 1 秒間に 10 問はさすがにありえない 621 | nCountDown = 0; 622 | list.clear(); 623 | } 624 | 625 | BOOL LoadWordsFromDatabase(); 626 | LPWSTR GetRomeFromKana(LPCWSTR); 627 | 628 | void start() 629 | { 630 | list.clear(); 631 | nCursorKana = 0; 632 | nCursorRome = 0; 633 | nTypeCountKana = 0; 634 | nTypeCountRome = 0; 635 | bMiss = FALSE; 636 | nMissCount = 0; 637 | nQuestionCount = 0; 638 | nMaxQuestionCount = 10; 639 | nMaxTimeCount = 60; 640 | nTimeCount = nMaxTimeCount; 641 | szInputRome[0] = 0; 642 | LoadWordsFromDatabase(); 643 | lstrcpy(szQuestionKana, list[nQuestionCount].kana.c_str()); 644 | lstrcpy(szQuestionRome, GetRomeFromKana(szQuestionKana)); 645 | nGameState = GS_GAMESTART; 646 | } 647 | void next() 648 | { 649 | nQuestionCount++; 650 | lstrcpy(szQuestionKana, list[nQuestionCount % list.size()].kana.c_str()); 651 | lstrcpy(szQuestionRome, GetRomeFromKana(szQuestionKana)); 652 | szInputRome[0] = 0; 653 | nCursorKana = 0; 654 | nCursorRome = 0; 655 | bMiss = FALSE; 656 | } 657 | std::vector list; 658 | GAME_STATE nGameState; 659 | int nTypeCountKana; 660 | int nTypeCountRome; 661 | BOOL bMiss; 662 | int nMissCount; 663 | int nQuestionCount; 664 | int nMaxQuestionCount; 665 | int nTimeCount; 666 | int nMaxTimeCount; 667 | int nCursorKana; // 現在のかな入力位置 668 | int nCursorRome; // 現在のローマ字入力位置 669 | WCHAR szInputRome[5]; // 現在入力されたローマ字 670 | int nCategory; 671 | WCHAR szQuestionKana[256]; // カタカナを配列で用意しておく 672 | WCHAR szQuestionRome[1024]; // ローマ字を配列で用意しておく 673 | std::vector kanakugiri; // どこで区切るかの情報 674 | int nCountDown; 675 | }; 676 | 677 | template inline void SafeRelease(Interface** ppInterfaceToRelease) 678 | { 679 | if (*ppInterfaceToRelease != NULL) 680 | { 681 | (*ppInterfaceToRelease)->Release(); 682 | (*ppInterfaceToRelease) = NULL; 683 | } 684 | } 685 | 686 | void GetAppFolderPath(OUT LPWSTR lpszFolderPath) 687 | { 688 | if (SHGetSpecialFolderPath(hWnd, lpszFolderPath, CSIDL_COMMON_APPDATA, 0)) 689 | { 690 | PathAppend(lpszFolderPath, szWindowClass); 691 | if (!PathFileExists(lpszFolderPath)) 692 | { 693 | CreateDirectory(lpszFolderPath, NULL); 694 | } 695 | } 696 | } 697 | 698 | LPCWSTR GetWordsDataBaseFilePath() 699 | { 700 | static WCHAR szFilePath[MAX_PATH] = {}; 701 | if (szFilePath[0] == L'\0') 702 | { 703 | GetAppFolderPath(szFilePath); 704 | PathAppend(szFilePath, L"words.mdb"); 705 | } 706 | return szFilePath; 707 | } 708 | 709 | LPCWSTR GetKeysDataBaseFilePath() 710 | { 711 | static WCHAR szFilePath[MAX_PATH] = {}; 712 | if (szFilePath[0] == L'\0') 713 | { 714 | GetAppFolderPath(szFilePath); 715 | PathAppend(szFilePath, L"keys.mdb"); 716 | } 717 | return szFilePath; 718 | } 719 | 720 | LPCWSTR GetRankingDataBaseFilePath() 721 | { 722 | static WCHAR szFilePath[MAX_PATH] = {}; 723 | if (szFilePath[0] == L'\0') 724 | { 725 | GetAppFolderPath(szFilePath); 726 | PathAppend(szFilePath, L"ranking.mdb"); 727 | } 728 | return szFilePath; 729 | } 730 | 731 | 732 | BOOL SQLExecute(HWND hWnd, LPCWSTR lpszMDBFilePath, LPCWSTR lpszSQL) 733 | { 734 | BOOL bRet = FALSE; 735 | HRESULT hr; 736 | _ConnectionPtr pCon(NULL); 737 | hr = pCon.CreateInstance(__uuidof(Connection)); 738 | if (SUCCEEDED(hr)) 739 | { 740 | TCHAR szString[1024]; 741 | wsprintf(szString, L"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=%s;", lpszMDBFilePath); 742 | hr = pCon->Open(szString, _bstr_t(""), _bstr_t(""), adOpenUnspecified); 743 | if (SUCCEEDED(hr)) 744 | { 745 | bRet = TRUE; 746 | try 747 | { 748 | _CommandPtr pCommand(NULL); 749 | pCommand.CreateInstance(__uuidof(Command)); 750 | pCommand->ActiveConnection = pCon; 751 | pCommand->CommandText = lpszSQL; 752 | pCommand->Execute(NULL, NULL, adCmdText); 753 | } 754 | catch (_com_error& e) 755 | { 756 | MessageBox(hWnd, e.Description(), 0, 0); 757 | bRet = FALSE; 758 | } 759 | pCon->Close(); 760 | } 761 | pCon = NULL; 762 | } 763 | return bRet; 764 | } 765 | 766 | void CreateKeysDatabaseFile(HWND hWnd) 767 | { 768 | // データベースファイルがない場合は作成。 769 | LPCWSTR lpszDataBaseFilePath = GetKeysDataBaseFilePath(); 770 | if (!PathFileExists(lpszDataBaseFilePath)) 771 | { 772 | BOOL bCreateDBError = FALSE; 773 | WCHAR szAttributes[1024]; 774 | wsprintf(szAttributes, L"CREATE_DB=\"%s\" General\0", lpszDataBaseFilePath); 775 | if (!SQLConfigDataSource(hWnd, ODBC_ADD_DSN, L"Microsoft Access Driver (*.mdb)", szAttributes)) 776 | { 777 | bCreateDBError = TRUE; 778 | } 779 | 780 | if (bCreateDBError) 781 | { 782 | DeleteFile(lpszDataBaseFilePath); 783 | return; 784 | } 785 | 786 | // テーブル作成 787 | if (!SQLExecute(hWnd, lpszDataBaseFilePath, L"CREATE TABLE item(rome VARCHAR NOT NULL PRIMARY KEY, kana VARCHAR NOT NULL, priority DATETIME NOT NULL);")) 788 | { 789 | DeleteFile(lpszDataBaseFilePath); 790 | return; 791 | } 792 | 793 | for (auto i : g_rome) 794 | { 795 | WCHAR szSQL[1024]; 796 | swprintf_s(szSQL, L"INSERT INTO item(rome, kana, priority) VALUES ('%s', '%s', %lf);", i.first.c_str(), i.second.kana1.c_str(), i.second.priority); 797 | if (!SQLExecute(hWnd, lpszDataBaseFilePath, szSQL)) 798 | { 799 | DeleteFile(lpszDataBaseFilePath); 800 | break; 801 | } 802 | } 803 | } 804 | 805 | { 806 | g_kana.clear(); 807 | 808 | _ConnectionPtr pCon(NULL); 809 | HRESULT hr = pCon.CreateInstance(__uuidof(Connection)); 810 | if (SUCCEEDED(hr)) 811 | { 812 | TCHAR szString[1024]; 813 | wsprintf(szString, L"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=%s;", GetKeysDataBaseFilePath()); 814 | hr = pCon->Open(szString, _bstr_t(""), _bstr_t(""), adOpenUnspecified); 815 | if (SUCCEEDED(hr)) 816 | { 817 | try 818 | { 819 | _RecordsetPtr pRecordset(NULL); 820 | hr = pRecordset.CreateInstance(__uuidof(Recordset)); 821 | if (SUCCEEDED(hr)) 822 | { 823 | _CommandPtr pCommand(NULL); 824 | pCommand.CreateInstance(__uuidof(Command)); 825 | pCommand->ActiveConnection = pCon; 826 | 827 | { 828 | WCHAR szSQL[256]; 829 | lstrcpy(szSQL, L"select * from item order by priority;"); 830 | pCommand->CommandText = szSQL; 831 | pRecordset = pCommand->Execute(NULL, NULL, adCmdText); 832 | if (!pRecordset->EndOfFile) 833 | { 834 | pRecordset->MoveFirst(); 835 | while (!pRecordset->EndOfFile) 836 | { 837 | _variant_t rome = pRecordset->Fields->GetItem((long)0)->Value; 838 | _variant_t kana = pRecordset->Fields->GetItem((long)1)->Value; 839 | g_kana[kana.bstrVal] = rome.bstrVal; 840 | pRecordset->MoveNext(); 841 | } 842 | } 843 | pRecordset->Close(); 844 | } 845 | } 846 | pRecordset = NULL; 847 | } 848 | catch (_com_error& e) 849 | { 850 | MessageBox(hWnd, e.Description(), 0, 0); 851 | } 852 | pCon->Close(); 853 | } 854 | pCon = NULL; 855 | } 856 | } 857 | } 858 | 859 | void InsertRanking(HWND hWnd, DWORD category, LPSYSTEMTIME date, double score, double typecount, double misscount) 860 | { 861 | LPCWSTR lpszDataBaseFilePath = GetRankingDataBaseFilePath(); 862 | if (PathFileExists(lpszDataBaseFilePath)) 863 | { 864 | WCHAR szSQL[1024]; 865 | double date1; 866 | SystemTimeToVariantTime(date, &date1); 867 | swprintf_s(szSQL, L"INSERT INTO item(category, date1, score1, typecount1, misscount1) VALUES (%d, %lf, %lf, %lf, %lf);", 868 | category, date1, score, typecount, misscount); 869 | SQLExecute(hWnd, lpszDataBaseFilePath, szSQL); 870 | } 871 | } 872 | 873 | void CreateRankingDatabaseFile(HWND hWnd) 874 | { 875 | // データベースファイルがない場合は作成。 876 | LPCWSTR lpszDataBaseFilePath = GetRankingDataBaseFilePath(); 877 | if (!PathFileExists(lpszDataBaseFilePath)) 878 | { 879 | BOOL bCreateDBError = FALSE; 880 | WCHAR szAttributes[1024]; 881 | wsprintf(szAttributes, L"CREATE_DB=\"%s\" General\0", lpszDataBaseFilePath); 882 | if (!SQLConfigDataSource(hWnd, ODBC_ADD_DSN, L"Microsoft Access Driver (*.mdb)", szAttributes)) 883 | { 884 | bCreateDBError = TRUE; 885 | } 886 | 887 | if (bCreateDBError) 888 | { 889 | DeleteFile(lpszDataBaseFilePath); 890 | return; 891 | } 892 | 893 | // テーブル作成 894 | if (!SQLExecute(hWnd, lpszDataBaseFilePath, L"CREATE TABLE item(id COUNTER NOT NULL PRIMARY KEY, category LONG NOT NULL, date1 DATETIME NOT NULL, score1 DOUBLE NOT NULL, typecount1 DOUBLE NOT NULL, misscount1 DOUBLE NOT NULL);")) 895 | { 896 | DeleteFile(lpszDataBaseFilePath); 897 | return; 898 | } 899 | } 900 | } 901 | 902 | BOOL IsAlphabet(WCHAR c) 903 | { 904 | if ('A' <= c && c <= 'Z' || 905 | 'a' <= c && c <= 'z') 906 | { 907 | return TRUE; 908 | } 909 | return FALSE; 910 | } 911 | 912 | LPWSTR game::GetRomeFromKana(LPCWSTR lpszKana) 913 | { 914 | static WCHAR szRome[1024]; 915 | LPCWSTR p = lpszKana; 916 | szRome[0] = 0; 917 | while (*p != L'\0') 918 | { 919 | if (IsAlphabet(*p)) 920 | { 921 | WCHAR c[2] = { towupper(*p) }; 922 | lstrcat(szRome, c); 923 | p++; 924 | continue; 925 | } 926 | 927 | switch (*p) 928 | { 929 | case L' ': 930 | case L' ': 931 | lstrcat(szRome, L" "); 932 | p++; 933 | continue; 934 | case L'0': 935 | lstrcat(szRome, L"0"); 936 | p++; 937 | continue; 938 | case L'1': 939 | lstrcat(szRome, L"1"); 940 | p++; 941 | continue; 942 | case L'2': 943 | lstrcat(szRome, L"2"); 944 | p++; 945 | continue; 946 | case L'3': 947 | lstrcat(szRome, L"3"); 948 | p++; 949 | continue; 950 | case L'4': 951 | lstrcat(szRome, L"4"); 952 | p++; 953 | continue; 954 | case L'5': 955 | lstrcat(szRome, L"5"); 956 | p++; 957 | continue; 958 | case L'6': 959 | lstrcat(szRome, L"6"); 960 | p++; 961 | continue; 962 | case L'7': 963 | lstrcat(szRome, L"7"); 964 | p++; 965 | continue; 966 | case L'8': 967 | lstrcat(szRome, L"8"); 968 | p++; 969 | continue; 970 | case L'9': 971 | lstrcat(szRome, L"9"); 972 | p++; 973 | continue; 974 | break; 975 | case L'ー': 976 | lstrcat(szRome, L"-"); 977 | p++; 978 | continue; 979 | case L'、': 980 | lstrcat(szRome, L","); 981 | p++; 982 | continue; 983 | case L'。': 984 | lstrcat(szRome, L"."); 985 | p++; 986 | continue; 987 | case L'0': 988 | case L'1': 989 | case L'2': 990 | case L'3': 991 | case L'4': 992 | case L'5': 993 | case L'6': 994 | case L'7': 995 | case L'8': 996 | case L'9': 997 | case L',': 998 | case L'-': 999 | case L'+': 1000 | case L'?': 1001 | case L'/': 1002 | case L':': 1003 | case L';': 1004 | case L'`': 1005 | case L'~': 1006 | case L'.': 1007 | { 1008 | WCHAR szKigo[2] = { *p, 0 }; 1009 | lstrcat(szRome, szKigo); 1010 | p++; 1011 | continue; 1012 | } 1013 | break; 1014 | } 1015 | 1016 | int nStep = 0; 1017 | 1018 | if (*(p + 1) != 0 && *(p + 2) != 0) 1019 | { 1020 | WCHAR szKana[4] = { *p, *(p + 1), *(p + 2), 0 }; 1021 | auto it = g_kana.find(szKana); 1022 | if (it != g_kana.end()) 1023 | { 1024 | lstrcat(szRome, (*it).second.c_str()); 1025 | nStep = 3; 1026 | } 1027 | } 1028 | 1029 | // 2文字探す 1030 | if (nStep == 0 && *(p + 1) != 0) 1031 | { 1032 | WCHAR szKana[3] = { *p, *(p + 1), 0 }; 1033 | auto it = g_kana.find(szKana); 1034 | if (it != g_kana.end()) 1035 | { 1036 | lstrcat(szRome, (*it).second.c_str()); 1037 | nStep = 2; 1038 | } 1039 | } 1040 | 1041 | // 1文字探す 1042 | if (nStep == 0) 1043 | { 1044 | WCHAR szKana[2] = { *p, 0 }; 1045 | auto it = g_kana.find(szKana); 1046 | if (it != g_kana.end()) 1047 | { 1048 | lstrcat(szRome, (*it).second.c_str()); 1049 | nStep = 1; 1050 | } 1051 | } 1052 | 1053 | if (nStep > 0) 1054 | { 1055 | p += nStep; 1056 | continue; 1057 | } 1058 | 1059 | break; 1060 | } 1061 | return szRome; 1062 | } 1063 | 1064 | BOOL game::LoadWordsFromDatabase() 1065 | { 1066 | BOOL bRet = FALSE; 1067 | _ConnectionPtr pCon(NULL); 1068 | HRESULT hr = pCon.CreateInstance(__uuidof(Connection)); 1069 | if (SUCCEEDED(hr)) 1070 | { 1071 | WCHAR szString[1024]; 1072 | wsprintf(szString, L"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=%s;", GetWordsDataBaseFilePath()); 1073 | hr = pCon->Open(szString, _bstr_t(""), _bstr_t(""), adOpenUnspecified); 1074 | if (SUCCEEDED(hr)) 1075 | { 1076 | try 1077 | { 1078 | _RecordsetPtr pRecordset(NULL); 1079 | hr = pRecordset.CreateInstance(__uuidof(Recordset)); 1080 | if (SUCCEEDED(hr)) 1081 | { 1082 | _CommandPtr pCommand(NULL); 1083 | pCommand.CreateInstance(__uuidof(Command)); 1084 | pCommand->ActiveConnection = pCon; 1085 | WCHAR szSQL[256]; 1086 | wsprintf(szSQL, L"select top %d * from item where category = %d order by Rnd(INT(NOW*id)-NOW*id);", nMaxQuestionCount, nCategory); 1087 | pCommand->CommandText = szSQL; 1088 | pRecordset = pCommand->Execute(NULL, NULL, adCmdText); 1089 | if (!pRecordset->EndOfFile) 1090 | { 1091 | try 1092 | { 1093 | // 先頭のレコードへ移動 1094 | pRecordset->MoveFirst(); 1095 | while (!pRecordset->EndOfFile) 1096 | { 1097 | sentence data; 1098 | 1099 | _variant_t words = pRecordset->Fields->GetItem((long)2)->Value; 1100 | data.words = std::wstring(words.bstrVal, SysStringLen(words.bstrVal)); 1101 | 1102 | _variant_t kana = pRecordset->Fields->GetItem((long)3)->Value; 1103 | data.kana = std::wstring(kana.bstrVal, SysStringLen(kana.bstrVal)); 1104 | 1105 | list.push_back(data); 1106 | 1107 | pRecordset->MoveNext(); 1108 | } 1109 | bRet = TRUE; 1110 | } 1111 | catch (_com_error& e) 1112 | { 1113 | OutputDebugString(e.Description()); 1114 | bRet = FALSE; 1115 | } 1116 | } 1117 | pRecordset->Close(); 1118 | } 1119 | pRecordset = NULL; 1120 | } 1121 | catch (_com_error& e) 1122 | { 1123 | OutputDebugString(e.Description()); 1124 | bRet = FALSE; 1125 | } 1126 | pCon->Close(); 1127 | } 1128 | pCon = NULL; 1129 | } 1130 | 1131 | return bRet; 1132 | } 1133 | 1134 | BOOL GetRankingFromDatabase(std::wstring& ranking, int nCategory) 1135 | { 1136 | ranking = L"[ランキング]\r\n"; 1137 | BOOL bRet = FALSE; 1138 | _ConnectionPtr pCon(NULL); 1139 | HRESULT hr = pCon.CreateInstance(__uuidof(Connection)); 1140 | if (SUCCEEDED(hr)) 1141 | { 1142 | WCHAR szString[1024]; 1143 | wsprintf(szString, L"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=%s;", GetRankingDataBaseFilePath()); 1144 | hr = pCon->Open(szString, _bstr_t(""), _bstr_t(""), adOpenUnspecified); 1145 | if (SUCCEEDED(hr)) 1146 | { 1147 | try 1148 | { 1149 | _RecordsetPtr pRecordset(NULL); 1150 | hr = pRecordset.CreateInstance(__uuidof(Recordset)); 1151 | if (SUCCEEDED(hr)) 1152 | { 1153 | _CommandPtr pCommand(NULL); 1154 | pCommand.CreateInstance(__uuidof(Command)); 1155 | pCommand->ActiveConnection = pCon; 1156 | WCHAR szSQL[256]; 1157 | int id = 0; 1158 | wsprintf(szSQL, L"select top 1 * from item where category = %d order by date1 desc;", nCategory); 1159 | pCommand->CommandText = szSQL; 1160 | pRecordset = pCommand->Execute(NULL, NULL, adCmdText); 1161 | if (!pRecordset->EndOfFile) 1162 | { 1163 | try 1164 | { 1165 | pRecordset->MoveFirst(); 1166 | id = pRecordset->Fields->GetItem((long)0)->Value; 1167 | } 1168 | catch (_com_error& e) 1169 | { 1170 | OutputDebugString(e.Description()); 1171 | bRet = FALSE; 1172 | } 1173 | pRecordset->Close(); 1174 | } 1175 | if (id > 0) 1176 | { 1177 | wsprintf(szSQL, L"select top %d * from item where category = %d order by score1 desc;", 10, nCategory); 1178 | pCommand->CommandText = szSQL; 1179 | pRecordset = pCommand->Execute(NULL, NULL, adCmdText); 1180 | if (!pRecordset->EndOfFile) 1181 | { 1182 | try 1183 | { 1184 | pRecordset->MoveFirst(); 1185 | int i = 0; 1186 | while (!pRecordset->EndOfFile) 1187 | { 1188 | const int id_ = pRecordset->Fields->GetItem((long)0)->Value; 1189 | double date = pRecordset->Fields->GetItem((long)2)->Value; 1190 | double score = pRecordset->Fields->GetItem((long)3)->Value; 1191 | double typecount = pRecordset->Fields->GetItem((long)4)->Value; 1192 | double misscount = pRecordset->Fields->GetItem((long)5)->Value; 1193 | WCHAR szText[1024]; 1194 | SYSTEMTIME st; 1195 | VariantTimeToSystemTime(date, &st); 1196 | wsprintf(szText, L"%d位: %d (%04d/%02d/%02d %02d:%02d:%02d)", i + 1, (int)score, st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond); 1197 | if (id == id_) { 1198 | lstrcat(szText, L" ☚ 直近"); 1199 | } 1200 | lstrcat(szText, L"\r\n"); 1201 | ranking += szText; 1202 | i++; 1203 | pRecordset->MoveNext(); 1204 | } 1205 | bRet = TRUE; 1206 | } 1207 | catch (_com_error& e) 1208 | { 1209 | OutputDebugString(e.Description()); 1210 | bRet = FALSE; 1211 | } 1212 | } 1213 | pRecordset->Close(); 1214 | } 1215 | } 1216 | pRecordset = NULL; 1217 | } 1218 | catch (_com_error& e) 1219 | { 1220 | OutputDebugString(e.Description()); 1221 | bRet = FALSE; 1222 | } 1223 | pCon->Close(); 1224 | } 1225 | pCon = NULL; 1226 | } 1227 | ranking += L"\r\n[SPACE]キーでタイトルへ"; 1228 | return bRet; 1229 | } 1230 | 1231 | BOOL GetScaling(HWND hWnd, UINT* pnX, UINT* pnY) 1232 | { 1233 | BOOL bSetScaling = FALSE; 1234 | const HMONITOR hMonitor = MonitorFromWindow(hWnd, MONITOR_DEFAULTTONEAREST); 1235 | if (hMonitor) 1236 | { 1237 | HMODULE hShcore = LoadLibrary(L"shcore"); 1238 | if (hShcore) 1239 | { 1240 | typedef HRESULT __stdcall GetDpiForMonitor(HMONITOR, int, UINT*, UINT*); 1241 | GetDpiForMonitor* fnGetDpiForMonitor = reinterpret_cast(GetProcAddress(hShcore, "GetDpiForMonitor")); 1242 | if (fnGetDpiForMonitor) 1243 | { 1244 | UINT uDpiX, uDpiY; 1245 | if (SUCCEEDED(fnGetDpiForMonitor(hMonitor, 0, &uDpiX, &uDpiY)) && uDpiX > 0 && uDpiY > 0) 1246 | { 1247 | *pnX = uDpiX; 1248 | *pnY = uDpiY; 1249 | bSetScaling = TRUE; 1250 | } 1251 | } 1252 | FreeLibrary(hShcore); 1253 | } 1254 | } 1255 | if (!bSetScaling) 1256 | { 1257 | HDC hdc = GetDC(NULL); 1258 | if (hdc) 1259 | { 1260 | *pnX = GetDeviceCaps(hdc, LOGPIXELSX); 1261 | *pnY = GetDeviceCaps(hdc, LOGPIXELSY); 1262 | ReleaseDC(NULL, hdc); 1263 | bSetScaling = TRUE; 1264 | } 1265 | } 1266 | if (!bSetScaling) 1267 | { 1268 | *pnX = DEFAULT_DPI; 1269 | *pnY = DEFAULT_DPI; 1270 | bSetScaling = TRUE; 1271 | } 1272 | return bSetScaling; 1273 | } 1274 | 1275 | BOOL JudgeFromKigou(DWORD dwKeyCode, LPCWSTR lpszKana, int nCursorKana) 1276 | { 1277 | switch (lpszKana[nCursorKana]) 1278 | { 1279 | case L'0': 1280 | case L'0': 1281 | if (dwKeyCode == L'0') return TRUE; 1282 | break; 1283 | case L'1': 1284 | case L'1': 1285 | if (dwKeyCode == L'1') return TRUE; 1286 | break; 1287 | case L'2': 1288 | case L'2': 1289 | if (dwKeyCode == L'2') return TRUE; 1290 | break; 1291 | case L'3': 1292 | case L'3': 1293 | if (dwKeyCode == L'3') return TRUE; 1294 | break; 1295 | case L'4': 1296 | case L'4': 1297 | if (dwKeyCode == L'4') return TRUE; 1298 | break; 1299 | case L'5': 1300 | case L'5': 1301 | if (dwKeyCode == L'5') return TRUE; 1302 | break; 1303 | case L'6': 1304 | case L'6': 1305 | if (dwKeyCode == L'6') return TRUE; 1306 | break; 1307 | case L'7': 1308 | case L'7': 1309 | if (dwKeyCode == L'7') return TRUE; 1310 | break; 1311 | case L'8': 1312 | case L'8': 1313 | if (dwKeyCode == L'8') return TRUE; 1314 | break; 1315 | case L'9': 1316 | case L'9': 1317 | if (dwKeyCode == L'9') return TRUE; 1318 | break; 1319 | case L'。': 1320 | case L'.': 1321 | case L'.': 1322 | if (dwKeyCode == VK_OEM_PERIOD) return TRUE; 1323 | break; 1324 | case L',': 1325 | case L'、': 1326 | if (dwKeyCode == VK_OEM_COMMA) return TRUE; 1327 | break; 1328 | case L'-': 1329 | case L'ー': 1330 | if (dwKeyCode == VK_OEM_MINUS) return TRUE; 1331 | break; 1332 | case L'+': 1333 | case L'+': 1334 | if (dwKeyCode == VK_OEM_PLUS) return TRUE; 1335 | break; 1336 | case L'?': 1337 | case L'?': 1338 | if (dwKeyCode == VK_OEM_2) return TRUE; 1339 | break; 1340 | case L'/': 1341 | case L'/': 1342 | if (dwKeyCode == VK_OEM_2) return TRUE; 1343 | break; 1344 | case L':': 1345 | case L':': 1346 | if (dwKeyCode == VK_OEM_1) return TRUE; 1347 | break; 1348 | case L';': 1349 | case L';': 1350 | if (dwKeyCode == VK_OEM_1) return TRUE; 1351 | break; 1352 | case L'`': 1353 | case L'‘': 1354 | if (dwKeyCode == VK_OEM_3) return TRUE; 1355 | break; 1356 | case L'~': 1357 | case L'~': 1358 | if (dwKeyCode == VK_OEM_3) return TRUE; 1359 | break; 1360 | } 1361 | return FALSE; 1362 | } 1363 | 1364 | BOOL JudgeFromKana(IN LPCWSTR lpszInputAlphabet, IN LPCWSTR lpszKana, IN int nCursorKana, OUT LPWSTR lpszOutputKana, OUT LPWSTR lpszOutputRome) 1365 | { 1366 | std::map::const_iterator i = g_rome.lower_bound(lpszInputAlphabet); 1367 | while (i != g_rome.end()) 1368 | { 1369 | const std::wstring& rome = i->first; 1370 | if (rome.compare(0, lstrlenW(lpszInputAlphabet), lpszInputAlphabet) != 0) 1371 | { 1372 | return FALSE; 1373 | } 1374 | const std::wstring& kana = i->second.kana1; 1375 | if (StrCmpN(lpszKana + nCursorKana, kana.c_str(), (int)kana.length()) == 0) 1376 | { 1377 | lstrcpy(lpszOutputKana, kana.c_str()); 1378 | lstrcpy(lpszOutputRome, i->first.c_str()); 1379 | return TRUE; 1380 | } 1381 | 1382 | i++; 1383 | } 1384 | return FALSE; 1385 | } 1386 | 1387 | struct question 1388 | { 1389 | std::wstring words; 1390 | std::vector rome; 1391 | std::vector time; 1392 | }; 1393 | 1394 | BOOL IsKigo(WPARAM wParam) 1395 | { 1396 | switch (wParam) 1397 | { 1398 | case L'0': 1399 | case L'1': 1400 | case L'2': 1401 | case L'3': 1402 | case L'4': 1403 | case L'5': 1404 | case L'6': 1405 | case L'7': 1406 | case L'8': 1407 | case L'9': 1408 | case VK_OEM_PERIOD: 1409 | case VK_OEM_COMMA: 1410 | case VK_OEM_MINUS: 1411 | case VK_OEM_PLUS: 1412 | case VK_OEM_1: 1413 | case VK_OEM_2: 1414 | case VK_OEM_3: 1415 | return TRUE; 1416 | } 1417 | return FALSE; 1418 | } 1419 | 1420 | BOOL IsKigo(WCHAR c) 1421 | { 1422 | switch (c) 1423 | { 1424 | case L'0': 1425 | case L'1': 1426 | case L'2': 1427 | case L'3': 1428 | case L'4': 1429 | case L'5': 1430 | case L'6': 1431 | case L'7': 1432 | case L'8': 1433 | case L'9': 1434 | case L'ー': 1435 | case L'、': 1436 | case L'。': 1437 | case L'0': 1438 | case L'1': 1439 | case L'2': 1440 | case L'3': 1441 | case L'4': 1442 | case L'5': 1443 | case L'6': 1444 | case L'7': 1445 | case L'8': 1446 | case L'9': 1447 | case L',': 1448 | case L'-': 1449 | case L'+': 1450 | case L'?': 1451 | case L'/': 1452 | case L':': 1453 | case L';': 1454 | case L'`': 1455 | case L'~': 1456 | case L'.': 1457 | return TRUE; 1458 | } 1459 | return FALSE; 1460 | } 1461 | 1462 | BOOL IsBoin(WCHAR c) 1463 | { 1464 | switch (c) 1465 | { 1466 | case L'A': 1467 | case L'I': 1468 | case L'U': 1469 | case L'E': 1470 | case L'O': 1471 | return TRUE; 1472 | } 1473 | return FALSE; 1474 | } 1475 | 1476 | HRESULT LoadResourceBitmap( 1477 | ID2D1RenderTarget* pRenderTarget, 1478 | IWICImagingFactory* pIWICFactory, 1479 | PCWSTR resourceName, 1480 | PCWSTR resourceType, 1481 | UINT destinationWidth, 1482 | UINT destinationHeight, 1483 | ID2D1Bitmap** ppBitmap 1484 | ) 1485 | { 1486 | IWICBitmapDecoder* pDecoder = NULL; 1487 | IWICBitmapFrameDecode* pSource = NULL; 1488 | IWICStream* pStream = NULL; 1489 | IWICFormatConverter* pConverter = NULL; 1490 | IWICBitmapScaler* pScaler = NULL; 1491 | 1492 | HRSRC imageResHandle = NULL; 1493 | HGLOBAL imageResDataHandle = NULL; 1494 | void* pImageFile = NULL; 1495 | DWORD imageFileSize = 0; 1496 | 1497 | // Locate the resource. 1498 | imageResHandle = FindResourceW(GetModuleHandle(0), resourceName, resourceType); 1499 | HRESULT hr = imageResHandle ? S_OK : E_FAIL; 1500 | if (SUCCEEDED(hr)) 1501 | { 1502 | // Load the resource. 1503 | imageResDataHandle = LoadResource(GetModuleHandle(0), imageResHandle); 1504 | 1505 | hr = imageResDataHandle ? S_OK : E_FAIL; 1506 | } 1507 | 1508 | if (SUCCEEDED(hr)) 1509 | { 1510 | // Lock it to get a system memory pointer. 1511 | pImageFile = LockResource(imageResDataHandle); 1512 | 1513 | hr = pImageFile ? S_OK : E_FAIL; 1514 | } 1515 | if (SUCCEEDED(hr)) 1516 | { 1517 | // Calculate the size. 1518 | imageFileSize = SizeofResource(GetModuleHandle(0), imageResHandle); 1519 | 1520 | hr = imageFileSize ? S_OK : E_FAIL; 1521 | 1522 | } 1523 | 1524 | if (SUCCEEDED(hr)) 1525 | { 1526 | // Create a WIC stream to map onto the memory. 1527 | hr = pIWICFactory->CreateStream(&pStream); 1528 | } 1529 | if (SUCCEEDED(hr)) 1530 | { 1531 | // Initialize the stream with the memory pointer and size. 1532 | hr = pStream->InitializeFromMemory( 1533 | reinterpret_cast(pImageFile), 1534 | imageFileSize 1535 | ); 1536 | } 1537 | 1538 | if (SUCCEEDED(hr)) 1539 | { 1540 | // Create a decoder for the stream. 1541 | hr = pIWICFactory->CreateDecoderFromStream( 1542 | pStream, 1543 | NULL, 1544 | WICDecodeMetadataCacheOnLoad, 1545 | &pDecoder 1546 | ); 1547 | } 1548 | 1549 | if (SUCCEEDED(hr)) 1550 | { 1551 | // Create the initial frame. 1552 | hr = pDecoder->GetFrame(0, &pSource); 1553 | } 1554 | 1555 | if (SUCCEEDED(hr)) 1556 | { 1557 | // Convert the image format to 32bppPBGRA 1558 | // (DXGI_FORMAT_B8G8R8A8_UNORM + D2D1_ALPHA_MODE_PREMULTIPLIED). 1559 | hr = pIWICFactory->CreateFormatConverter(&pConverter); 1560 | } 1561 | 1562 | if (SUCCEEDED(hr)) 1563 | { 1564 | hr = pConverter->Initialize( 1565 | pSource, 1566 | GUID_WICPixelFormat32bppPBGRA, 1567 | WICBitmapDitherTypeNone, 1568 | NULL, 1569 | 0.f, 1570 | WICBitmapPaletteTypeMedianCut 1571 | ); 1572 | 1573 | if (SUCCEEDED(hr)) 1574 | { 1575 | //create a Direct2D bitmap from the WIC bitmap. 1576 | hr = pRenderTarget->CreateBitmapFromWicBitmap( 1577 | pConverter, 1578 | NULL, 1579 | ppBitmap 1580 | ); 1581 | 1582 | } 1583 | } 1584 | 1585 | SafeRelease(&pDecoder); 1586 | SafeRelease(&pSource); 1587 | SafeRelease(&pStream); 1588 | SafeRelease(&pConverter); 1589 | SafeRelease(&pScaler); 1590 | 1591 | return hr; 1592 | } 1593 | 1594 | void GetLocalFont(HMODULE hModule, LPCWSTR lpName, LPCWSTR lpType, LPVOID* ppFontMemory, LPINT pFontMemorySize) 1595 | { 1596 | HRSRC hRsrc = FindResource(hModule, lpName, lpType); 1597 | if (hRsrc) { 1598 | HGLOBAL hResource = LoadResource(hModule, hRsrc); 1599 | *ppFontMemory = LockResource(hResource); 1600 | *pFontMemorySize = SizeofResource(hModule, hRsrc); 1601 | } 1602 | } 1603 | 1604 | LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) 1605 | { 1606 | static ID2D1Factory* m_pD2DFactory; 1607 | static IWICImagingFactory* m_pWICFactory; 1608 | static IDWriteFactory5* m_pDWriteFactory; 1609 | static ID2D1HwndRenderTarget* m_pRenderTarget; 1610 | static IDWriteTextFormat* m_pTextFormat; 1611 | static ID2D1SolidColorBrush* m_pBlackBrush; 1612 | static ID2D1SolidColorBrush* m_pGrayBrush; 1613 | static ID2D1SolidColorBrush* m_pRedBrush; 1614 | 1615 | static IDWriteInMemoryFontFileLoader* pInMemoryFontFileLoader; 1616 | static IDWriteFontFile* pFontFile; 1617 | static IDWriteFontCollection1* pFontCollection; 1618 | static IDWriteFontSetBuilder1* fontSetBuilder; 1619 | static IDWriteFontSet* pFontSet; 1620 | 1621 | static LPVOID pFontMemory; 1622 | static INT nFontMemorySize; 1623 | static UINT uDpiX = DEFAULT_DPI, uDpiY = DEFAULT_DPI; 1624 | static std::wstring ranking; 1625 | 1626 | static game g; 1627 | 1628 | switch (msg) 1629 | { 1630 | case WM_CREATE: 1631 | { 1632 | (void)CoInitialize(NULL); 1633 | CreateKeysDatabaseFile(hWnd); 1634 | CreateRankingDatabaseFile(hWnd); 1635 | static const FLOAT msc_fontSize = 32; 1636 | HRESULT hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &m_pD2DFactory); 1637 | if (SUCCEEDED(hr)) 1638 | hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, __uuidof(m_pDWriteFactory), reinterpret_cast(&m_pDWriteFactory)); 1639 | if (SUCCEEDED(hr)) 1640 | hr = m_pDWriteFactory->CreateInMemoryFontFileLoader(&pInMemoryFontFileLoader); 1641 | if (SUCCEEDED(hr)) 1642 | hr = m_pDWriteFactory->RegisterFontFileLoader(pInMemoryFontFileLoader); 1643 | if (SUCCEEDED(hr)) 1644 | { 1645 | GetLocalFont(GetModuleHandle(0), MAKEINTRESOURCE(IDR_FONT1), RT_FONT, &pFontMemory, &nFontMemorySize); 1646 | hr = pInMemoryFontFileLoader->CreateInMemoryFontFileReference(m_pDWriteFactory, pFontMemory, nFontMemorySize, nullptr, &pFontFile); 1647 | } 1648 | if (SUCCEEDED(hr)) 1649 | hr = m_pDWriteFactory->CreateFontSetBuilder(&fontSetBuilder); 1650 | if (SUCCEEDED(hr)) 1651 | hr = fontSetBuilder->AddFontFile(pFontFile); 1652 | if (SUCCEEDED(hr)) 1653 | hr = fontSetBuilder->CreateFontSet(&pFontSet); 1654 | if (SUCCEEDED(hr)) 1655 | hr = m_pDWriteFactory->CreateFontCollectionFromFontSet(pFontSet, &pFontCollection); 1656 | WCHAR szFontFamilyName[256] = {}; 1657 | UINT32 uFontCount = pFontCollection->GetFontFamilyCount(); 1658 | if (uFontCount > 0) 1659 | { 1660 | IDWriteFontFamily1* pFontFamily = nullptr; 1661 | hr = pFontCollection->GetFontFamily(0, &pFontFamily); 1662 | if (SUCCEEDED(hr)) 1663 | { 1664 | IDWriteLocalizedStrings* string = nullptr; 1665 | hr = pFontFamily->GetFamilyNames(&string); 1666 | if (SUCCEEDED(hr)) 1667 | { 1668 | string->GetString(0, szFontFamilyName, _countof(szFontFamilyName)); 1669 | } 1670 | SafeRelease(&string); 1671 | } 1672 | SafeRelease(&pFontFamily); 1673 | } 1674 | if (SUCCEEDED(hr)) 1675 | hr = m_pDWriteFactory->CreateTextFormat(szFontFamilyName, pFontCollection, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, msc_fontSize, L"", &m_pTextFormat); 1676 | if (SUCCEEDED(hr)) 1677 | hr = CoCreateInstance(CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER, IID_IWICImagingFactory, reinterpret_cast(&m_pWICFactory)); 1678 | if (FAILED(hr)) 1679 | return -1; 1680 | } 1681 | SendMessage(hWnd, WM_APP, 0, 0); 1682 | 1683 | // タイトル画面を表示 1684 | g.nGameState = GS_TITLE; 1685 | 1686 | break; 1687 | case WM_TIMER: 1688 | debuglog(L"WM_TIMER %d", wParam); 1689 | if (wParam == 1000) // ゲーム中のタイマ 1690 | { 1691 | if (g.nTimeCount <= 1) 1692 | { 1693 | KillTimer(hWnd, 1000); 1694 | g.nGameState = GS_GAMEEND; 1695 | { 1696 | // ここでRankingに登録 1697 | SYSTEMTIME time; 1698 | GetLocalTime(&time); 1699 | double dCorrectAnswerRate = 1.0 * (g.nTypeCountRome - g.nMissCount) / g.nTypeCountRome; 1700 | InsertRanking(hWnd, 1, &time, g.nTypeCountRome * pow(dCorrectAnswerRate, 3.0), g.nTypeCountRome, g.nMissCount); 1701 | } 1702 | SetTimer(hWnd, 1001, 2000, NULL); 1703 | } 1704 | else 1705 | { 1706 | g.nTimeCount--; 1707 | } 1708 | InvalidateRect(hWnd, 0, 0); 1709 | } 1710 | else if (wParam == 1001) // GameEndから来たとき 1711 | { 1712 | KillTimer(hWnd, 1001); 1713 | g.nGameState = GS_GAMESTATUS; 1714 | PlaySound(5); 1715 | InvalidateRect(hWnd, 0, 0); 1716 | } 1717 | else if (wParam == 1002) 1718 | { 1719 | if (g.nCountDown <= 1) 1720 | { 1721 | KillTimer(hWnd, 1002); 1722 | PlaySound(4); 1723 | g.start(); 1724 | SetTimer(hWnd, 1000, 1000, NULL); 1725 | } 1726 | else 1727 | { 1728 | PlaySound(3); 1729 | g.nCountDown--; 1730 | } 1731 | InvalidateRect(hWnd, 0, 0); 1732 | } 1733 | break; 1734 | case WM_SIZE: 1735 | if (m_pRenderTarget) 1736 | { 1737 | D2D1_SIZE_U size = { LOWORD(lParam), HIWORD(lParam) }; 1738 | m_pRenderTarget->Resize(size); 1739 | } 1740 | break; 1741 | case WM_DISPLAYCHANGE: 1742 | InvalidateRect(hWnd, 0, 0); 1743 | break; 1744 | case WM_ERASEBKGND: 1745 | return 1; 1746 | case WM_PAINT: 1747 | { 1748 | HRESULT hr = S_OK; 1749 | if (!m_pRenderTarget) 1750 | { 1751 | RECT rect; 1752 | GetClientRect(hWnd, &rect); 1753 | D2D1_SIZE_U size = D2D1::SizeU(rect.right, rect.bottom); 1754 | 1755 | hr = m_pD2DFactory->CreateHwndRenderTarget(D2D1::RenderTargetProperties(D2D1_RENDER_TARGET_TYPE_DEFAULT, D2D1::PixelFormat(), DEFAULT_DPI, DEFAULT_DPI, D2D1_RENDER_TARGET_USAGE_NONE, D2D1_FEATURE_LEVEL_DEFAULT), D2D1::HwndRenderTargetProperties(hWnd, size), &m_pRenderTarget); 1756 | if (SUCCEEDED(hr)) 1757 | hr = m_pRenderTarget->CreateSolidColorBrush(D2D1::ColorF(D2D1::ColorF::DimGray), &m_pBlackBrush); 1758 | if (SUCCEEDED(hr)) 1759 | hr = m_pRenderTarget->CreateSolidColorBrush(D2D1::ColorF(D2D1::ColorF::LightGray), &m_pGrayBrush); 1760 | if (SUCCEEDED(hr)) 1761 | hr = m_pRenderTarget->CreateSolidColorBrush(D2D1::ColorF(D2D1::ColorF::Red), &m_pRedBrush); 1762 | } 1763 | if (SUCCEEDED(hr)) 1764 | { 1765 | D2D1_SIZE_F renderTargetSize = m_pRenderTarget->GetSize(); 1766 | m_pRenderTarget->BeginDraw(); 1767 | m_pRenderTarget->SetTransform(D2D1::Matrix3x2F::Identity()); 1768 | m_pRenderTarget->Clear(D2D1::ColorF(D2D1::ColorF::WhiteSmoke)); 1769 | 1770 | if (g.nGameState == GAME_STATE::GS_GAMESTART) 1771 | { 1772 | if (0) 1773 | { 1774 | // スコアを表示 1775 | WCHAR szText[1024]; 1776 | wsprintf(szText, L"%d秒 %d打鍵 %dミス", g.nTimeCount, g.nTypeCountRome, g.nMissCount); 1777 | DWRITE_TEXT_METRICS tTextMetrics; 1778 | { 1779 | IDWriteTextLayout* pTextLayout = NULL; 1780 | hr = m_pDWriteFactory->CreateTextLayout( 1781 | szText 1782 | , lstrlenW(szText) 1783 | , m_pTextFormat 1784 | , renderTargetSize.width 1785 | , renderTargetSize.height 1786 | , &pTextLayout 1787 | ); 1788 | pTextLayout->GetMetrics(&tTextMetrics); 1789 | 1790 | m_pRenderTarget->DrawTextLayout(D2D1::Point2F(0.0F, 0.0F), 1791 | pTextLayout, 1792 | m_pBlackBrush, 1793 | D2D1_DRAW_TEXT_OPTIONS_NO_SNAP); 1794 | 1795 | SafeRelease(&pTextLayout); 1796 | } 1797 | 1798 | } 1799 | 1800 | {// 問題文を表示 1801 | LPCWSTR lpszText = g.list[g.nQuestionCount % g.list.size()].words.c_str(); 1802 | DWRITE_TEXT_METRICS tTextMetrics; 1803 | { 1804 | IDWriteTextLayout* pTextLayout = NULL; 1805 | hr = m_pDWriteFactory->CreateTextLayout( 1806 | lpszText 1807 | , lstrlenW(lpszText) 1808 | , m_pTextFormat 1809 | , renderTargetSize.width 1810 | , renderTargetSize.height 1811 | , &pTextLayout 1812 | ); 1813 | pTextLayout->GetMetrics(&tTextMetrics); 1814 | 1815 | m_pRenderTarget->DrawTextLayout(D2D1::Point2F(renderTargetSize.width / 2 - tTextMetrics.width / 2 1816 | , renderTargetSize.height / 2 - tTextMetrics.height / 2 - 2 * tTextMetrics.height), 1817 | pTextLayout, 1818 | m_pBlackBrush, 1819 | D2D1_DRAW_TEXT_OPTIONS_NO_SNAP); 1820 | 1821 | SafeRelease(&pTextLayout); 1822 | } 1823 | } 1824 | 1825 | {// カタカナを表示 1826 | LPCWSTR lpszText = g.list[g.nQuestionCount % g.list.size()].kana.c_str(); 1827 | DWRITE_TEXT_METRICS tTextMetrics; 1828 | { 1829 | IDWriteTextLayout* pTextLayout = NULL; 1830 | hr = m_pDWriteFactory->CreateTextLayout( 1831 | lpszText 1832 | , lstrlenW(lpszText) 1833 | , m_pTextFormat 1834 | , renderTargetSize.width 1835 | , renderTargetSize.height 1836 | , &pTextLayout 1837 | ); 1838 | pTextLayout->GetMetrics(&tTextMetrics); 1839 | 1840 | DWRITE_TEXT_RANGE textRange = { 0, (UINT32)g.nCursorKana }; 1841 | pTextLayout->SetDrawingEffect(m_pGrayBrush, textRange); 1842 | 1843 | m_pRenderTarget->DrawTextLayout(D2D1::Point2F(renderTargetSize.width / 2 - tTextMetrics.width / 2 1844 | , renderTargetSize.height / 2 - tTextMetrics.height / 2), 1845 | pTextLayout, 1846 | m_pBlackBrush, 1847 | D2D1_DRAW_TEXT_OPTIONS_NO_SNAP); 1848 | 1849 | SafeRelease(&pTextLayout); 1850 | } 1851 | } 1852 | 1853 | {// ローマ字を表示 1854 | DWRITE_TEXT_METRICS tTextMetrics; 1855 | { 1856 | IDWriteTextLayout* pTextLayout = NULL; 1857 | hr = m_pDWriteFactory->CreateTextLayout( 1858 | g.szQuestionRome 1859 | , lstrlenW(g.szQuestionRome) 1860 | , m_pTextFormat 1861 | , renderTargetSize.width 1862 | , renderTargetSize.height 1863 | , &pTextLayout 1864 | ); 1865 | pTextLayout->GetMetrics(&tTextMetrics); 1866 | DWRITE_TEXT_RANGE textRange = { 0, (UINT32)g.nCursorRome }; 1867 | pTextLayout->SetDrawingEffect(m_pGrayBrush, textRange); 1868 | if (g.bMiss) 1869 | { 1870 | DWRITE_TEXT_RANGE textRange = { (UINT32)g.nCursorRome, 1 }; 1871 | pTextLayout->SetDrawingEffect(m_pRedBrush, textRange); 1872 | } 1873 | m_pRenderTarget->DrawTextLayout(D2D1::Point2F(renderTargetSize.width / 2 - tTextMetrics.width / 2 1874 | , renderTargetSize.height / 2 - tTextMetrics.height / 2 + tTextMetrics.height), 1875 | pTextLayout, 1876 | m_pBlackBrush, 1877 | D2D1_DRAW_TEXT_OPTIONS_NO_SNAP); 1878 | 1879 | SafeRelease(&pTextLayout); 1880 | } 1881 | } 1882 | } 1883 | else if (g.nGameState == GAME_STATE::GS_GAMEEND) 1884 | { 1885 | LPCWSTR lpszText = L"終了"; 1886 | DWRITE_TEXT_METRICS tTextMetrics; 1887 | { 1888 | IDWriteTextLayout* pTextLayout = NULL; 1889 | hr = m_pDWriteFactory->CreateTextLayout( 1890 | lpszText 1891 | , lstrlenW(lpszText) 1892 | , m_pTextFormat 1893 | , renderTargetSize.width 1894 | , renderTargetSize.height 1895 | , &pTextLayout 1896 | ); 1897 | pTextLayout->GetMetrics(&tTextMetrics); 1898 | 1899 | m_pRenderTarget->DrawTextLayout(D2D1::Point2F(renderTargetSize.width / 2 - tTextMetrics.width / 2 1900 | , renderTargetSize.height / 2 - tTextMetrics.height / 2), 1901 | pTextLayout, 1902 | m_pBlackBrush, 1903 | D2D1_DRAW_TEXT_OPTIONS_NO_SNAP); 1904 | 1905 | SafeRelease(&pTextLayout); 1906 | } 1907 | } 1908 | else if (g.nGameState == GAME_STATE::GS_GAMESTATUS) 1909 | { 1910 | // スコアを表示 1911 | WCHAR szText[1024]; 1912 | double dCorrectAnswerRate = 1.0 * (g.nTypeCountRome - g.nMissCount) / g.nTypeCountRome; 1913 | swprintf_s(szText, L"[結果]\r\nスコア:%.0f\r\n平均タイプ数:%.2f(回/秒)\r\n正確性:%.2f%\r\n打鍵数:%d回\r\nミスタイプ数:%d回\r\n\r\n[SPACE]キーでタイトルへ\r\n[R]キーでランキング\r\n[X]キーで終了", 1914 | g.nTypeCountRome * pow(dCorrectAnswerRate, 3.0), g.nTypeCountRome / 60.0, 100.0 * dCorrectAnswerRate, g.nTypeCountRome, g.nMissCount); 1915 | DWRITE_TEXT_METRICS tTextMetrics; 1916 | { 1917 | IDWriteTextLayout* pTextLayout = NULL; 1918 | hr = m_pDWriteFactory->CreateTextLayout( 1919 | szText 1920 | , lstrlenW(szText) 1921 | , m_pTextFormat 1922 | , renderTargetSize.width 1923 | , renderTargetSize.height 1924 | , &pTextLayout 1925 | ); 1926 | pTextLayout->GetMetrics(&tTextMetrics); 1927 | 1928 | m_pRenderTarget->DrawTextLayout(D2D1::Point2F(renderTargetSize.width / 2 - tTextMetrics.width / 2 1929 | , renderTargetSize.height / 2 - tTextMetrics.height / 2), 1930 | pTextLayout, 1931 | m_pBlackBrush, 1932 | D2D1_DRAW_TEXT_OPTIONS_NO_SNAP); 1933 | 1934 | SafeRelease(&pTextLayout); 1935 | } 1936 | } 1937 | else if (g.nGameState == GAME_STATE::GS_TITLE) 1938 | { 1939 | LPCWSTR lpszText = L"タイトル画面\r\n\r\n[SPACE]キーで開始\r\n[R]キーでランキング\r\n[X]キーで終了"; 1940 | DWRITE_TEXT_METRICS tTextMetrics; 1941 | { 1942 | IDWriteTextLayout* pTextLayout = NULL; 1943 | hr = m_pDWriteFactory->CreateTextLayout( 1944 | lpszText 1945 | , lstrlenW(lpszText) 1946 | , m_pTextFormat 1947 | , renderTargetSize.width 1948 | , renderTargetSize.height 1949 | , &pTextLayout 1950 | ); 1951 | pTextLayout->GetMetrics(&tTextMetrics); 1952 | 1953 | m_pRenderTarget->DrawTextLayout(D2D1::Point2F(renderTargetSize.width / 2 - tTextMetrics.width / 2 1954 | , renderTargetSize.height / 2 - tTextMetrics.height / 2), 1955 | pTextLayout, 1956 | m_pBlackBrush, 1957 | D2D1_DRAW_TEXT_OPTIONS_NO_SNAP); 1958 | 1959 | SafeRelease(&pTextLayout); 1960 | } 1961 | } 1962 | else if (g.nGameState == GAME_STATE::GS_COUNTDOWN) 1963 | { 1964 | if (g.nCountDown <= 3) 1965 | { 1966 | WCHAR szText[256]; 1967 | wsprintf(szText, L"%d", g.nCountDown); 1968 | DWRITE_TEXT_METRICS tTextMetrics; 1969 | { 1970 | IDWriteTextLayout* pTextLayout = NULL; 1971 | hr = m_pDWriteFactory->CreateTextLayout( 1972 | szText 1973 | , lstrlenW(szText) 1974 | , m_pTextFormat 1975 | , renderTargetSize.width 1976 | , renderTargetSize.height 1977 | , &pTextLayout 1978 | ); 1979 | pTextLayout->GetMetrics(&tTextMetrics); 1980 | 1981 | m_pRenderTarget->DrawTextLayout(D2D1::Point2F(renderTargetSize.width / 2 - tTextMetrics.width / 2 1982 | , renderTargetSize.height / 2 - tTextMetrics.height / 2), 1983 | pTextLayout, 1984 | m_pBlackBrush, 1985 | D2D1_DRAW_TEXT_OPTIONS_NO_SNAP); 1986 | 1987 | SafeRelease(&pTextLayout); 1988 | } 1989 | } 1990 | } 1991 | else if (g.nGameState == GAME_STATE::GS_RANKING) 1992 | { 1993 | DWRITE_TEXT_METRICS tTextMetrics; 1994 | { 1995 | IDWriteTextLayout* pTextLayout = NULL; 1996 | hr = m_pDWriteFactory->CreateTextLayout( 1997 | ranking.c_str() 1998 | , (UINT32)ranking.length() 1999 | , m_pTextFormat 2000 | , renderTargetSize.width 2001 | , renderTargetSize.height 2002 | , &pTextLayout 2003 | ); 2004 | if (pTextLayout != nullptr) { 2005 | pTextLayout->GetMetrics(&tTextMetrics); 2006 | m_pRenderTarget->DrawTextLayout(D2D1::Point2F(renderTargetSize.width / 2 - tTextMetrics.width / 2 2007 | , renderTargetSize.height / 2 - tTextMetrics.height / 2), 2008 | pTextLayout, 2009 | m_pBlackBrush, 2010 | D2D1_DRAW_TEXT_OPTIONS_NO_SNAP); 2011 | SafeRelease(&pTextLayout); 2012 | } 2013 | } 2014 | } 2015 | hr = m_pRenderTarget->EndDraw(); 2016 | if (hr == D2DERR_RECREATE_TARGET) 2017 | { 2018 | SafeRelease(&m_pRenderTarget); 2019 | SafeRelease(&m_pBlackBrush); 2020 | SafeRelease(&m_pGrayBrush); 2021 | SafeRelease(&m_pRedBrush); 2022 | } 2023 | } 2024 | } 2025 | ValidateRect(hWnd, NULL); 2026 | break; 2027 | case WM_KEYDOWN: 2028 | if (g.nGameState == GAME_STATE::GS_GAMESTART) 2029 | { 2030 | if (IsKigo(wParam)) 2031 | { 2032 | g.nTypeCountRome++; 2033 | if (g.szQuestionKana[g.nCursorKana] == L'ン' && g.szQuestionKana[g.nCursorKana] != L'\0' && 2034 | g.szInputRome[0] == L'N' && g.szInputRome[1] == L'\0') 2035 | { 2036 | g.nCursorKana++; 2037 | g.nCursorRome++; 2038 | g.nTypeCountKana++; 2039 | g.szInputRome[0] = g.szInputRome[1]; 2040 | g.szInputRome[1] = 0; 2041 | } 2042 | if (JudgeFromKigou((DWORD)wParam, g.szQuestionKana, g.nCursorKana)) 2043 | { 2044 | g.bMiss = FALSE; 2045 | g.nCursorKana++; 2046 | g.nCursorRome++; 2047 | g.nTypeCountKana++; 2048 | PlaySound(0); 2049 | if (g.szQuestionKana[g.nCursorKana] == L'\0') 2050 | { 2051 | g.next(); 2052 | } 2053 | } 2054 | else 2055 | { 2056 | g.bMiss = TRUE; 2057 | g.nMissCount++; 2058 | PlaySound(1); 2059 | g.szInputRome[lstrlen(g.szInputRome) - 1] = 0; 2060 | } 2061 | InvalidateRect(hWnd, 0, 0); 2062 | } 2063 | else if (IsAlphabet((WCHAR)wParam)) 2064 | { 2065 | WCHAR szInput[2]; 2066 | wsprintf(szInput, L"%c", wParam); 2067 | lstrcat(g.szInputRome, szInput); 2068 | debuglog(L"szInputRome = %s\r\n", g.szInputRome); 2069 | 2070 | g.nTypeCountRome++; 2071 | 2072 | if (g.szQuestionKana[g.nCursorKana] == g.szInputRome[0]) // 英字 2073 | { 2074 | g.bMiss = FALSE; 2075 | g.nCursorKana++; 2076 | g.nCursorRome++; 2077 | g.nTypeCountKana++; 2078 | g.szInputRome[0] = 0; 2079 | PlaySound(0); 2080 | if (g.szQuestionKana[g.nCursorKana] == L'\0') 2081 | { 2082 | g.next(); 2083 | } 2084 | } 2085 | else 2086 | { 2087 | if (g.szQuestionKana[g.nCursorKana] == L'ン' && g.szQuestionKana[g.nCursorKana] != L'\0' && 2088 | lstrlen(g.szInputRome) == 2 && g.szInputRome[0] == L'N' && g.szInputRome[1] != L'N' && g.szInputRome[1] != L'Y' && IsBoin(g.szInputRome[1]) == FALSE) 2089 | { 2090 | // ンは2文字目に関係なく確定 2091 | g.nCursorKana++; 2092 | g.nCursorRome++; 2093 | g.nTypeCountKana++; 2094 | g.szInputRome[0] = g.szInputRome[1]; 2095 | g.szInputRome[1] = 0; 2096 | debuglog(L"szInputRome(after) = %s\r\n", g.szInputRome); 2097 | } 2098 | 2099 | WCHAR szOutputKana[4] = {}; 2100 | WCHAR szOutputRome[5] = {}; 2101 | BOOL bRet = JudgeFromKana(g.szInputRome, g.szQuestionKana, g.nCursorKana, szOutputKana, szOutputRome); 2102 | if (bRet) 2103 | { 2104 | g.bMiss = FALSE; 2105 | 2106 | if (g.szQuestionRome[g.nCursorRome] != szInput[0]) 2107 | { 2108 | lstrcpy(&(g.szQuestionRome[g.nCursorRome - lstrlen(g.szInputRome) + 1]), szOutputRome); 2109 | lstrcat(g.szQuestionRome, g.GetRomeFromKana(&(g.szQuestionKana[g.nCursorKana + lstrlen(szOutputKana)]))); 2110 | } 2111 | 2112 | g.nCursorRome++; 2113 | PlaySound(0); 2114 | 2115 | debuglog(L"szOutput = %s\r\n", szOutputKana); 2116 | if (L'A' == wParam || L'I' == wParam || L'U' == wParam || L'E' == wParam || L'O' == wParam || (g.szInputRome[0] == L'N' && g.szInputRome[1] == L'N')) 2117 | { 2118 | // 母音またはNを2回入力した場合は、ローマ字入力を確定させ次の文字に移る。 2119 | g.nCursorKana += lstrlen(szOutputKana); 2120 | g.nTypeCountKana += lstrlen(szOutputKana); 2121 | 2122 | g.szInputRome[0] = 0; 2123 | if (g.szQuestionKana[g.nCursorKana] == L'\0') 2124 | { 2125 | g.next(); 2126 | } 2127 | } 2128 | } 2129 | else 2130 | { 2131 | g.bMiss = TRUE; 2132 | g.nMissCount++; 2133 | PlaySound(1); 2134 | g.szInputRome[lstrlen(g.szInputRome) - 1] = 0; 2135 | } 2136 | } 2137 | InvalidateRect(hWnd, 0, 0); 2138 | } 2139 | else if (wParam == VK_ESCAPE) 2140 | { 2141 | KillTimer(hWnd, 1000); 2142 | g.nGameState = GS_TITLE; 2143 | PlaySound(5); 2144 | InvalidateRect(hWnd, 0, 0); 2145 | } 2146 | } 2147 | else if (g.nGameState == GS_GAMEEND) 2148 | { 2149 | if (wParam == VK_SPACE) 2150 | { 2151 | KillTimer(hWnd, 1001); 2152 | g.nGameState = GS_GAMESTATUS; 2153 | PlaySound(5); 2154 | InvalidateRect(hWnd, 0, 0); 2155 | } 2156 | } 2157 | else if (g.nGameState == GS_GAMESTATUS) 2158 | { 2159 | if (wParam == VK_SPACE) 2160 | { 2161 | g.nGameState = GS_TITLE; 2162 | PlaySound(5); 2163 | InvalidateRect(hWnd, 0, 0); 2164 | } 2165 | else if (wParam == 'R') 2166 | { 2167 | GetRankingFromDatabase(ranking, 1); 2168 | g.nGameState = GS_RANKING; 2169 | PlaySound(5); 2170 | InvalidateRect(hWnd, 0, 0); 2171 | } 2172 | else if (wParam == 'X') 2173 | { 2174 | PostMessage(hWnd, WM_CLOSE, 0, 0); 2175 | } 2176 | } 2177 | else if (g.nGameState == GAME_STATE::GS_TITLE) 2178 | { 2179 | if (wParam == VK_SPACE) 2180 | { 2181 | g.nCountDown = 4; 2182 | g.nGameState = GS_COUNTDOWN; 2183 | SetTimer(hWnd, 1002, 1000, NULL); 2184 | PlaySound(5); 2185 | InvalidateRect(hWnd, 0, 0); 2186 | } 2187 | else if (wParam == 'R') 2188 | { 2189 | GetRankingFromDatabase(ranking, 1); 2190 | g.nGameState = GS_RANKING; 2191 | PlaySound(5); 2192 | InvalidateRect(hWnd, 0, 0); 2193 | } 2194 | else if (wParam == 'X') 2195 | { 2196 | PostMessage(hWnd, WM_CLOSE, 0, 0); 2197 | } 2198 | } 2199 | else if (g.nGameState == GAME_STATE::GS_RANKING) 2200 | { 2201 | if (wParam == VK_SPACE) 2202 | { 2203 | g.nGameState = GS_TITLE; 2204 | PlaySound(5); 2205 | InvalidateRect(hWnd, 0, 0); 2206 | } 2207 | } 2208 | break; 2209 | case WM_NCCREATE: 2210 | { 2211 | const HMODULE hModUser32 = GetModuleHandle(L"user32"); 2212 | if (hModUser32) 2213 | { 2214 | typedef BOOL(WINAPI* fnTypeEnableNCScaling)(HWND); 2215 | const fnTypeEnableNCScaling fnEnableNCScaling = (fnTypeEnableNCScaling)GetProcAddress(hModUser32, "EnableNonClientDpiScaling"); 2216 | if (fnEnableNCScaling) 2217 | { 2218 | fnEnableNCScaling(hWnd); 2219 | } 2220 | } 2221 | } 2222 | return DefWindowProc(hWnd, msg, wParam, lParam); 2223 | case WM_APP: 2224 | GetScaling(hWnd, &uDpiX, &uDpiY); 2225 | break; 2226 | case WM_DPICHANGED: 2227 | SendMessage(hWnd, WM_APP, 0, 0); 2228 | break; 2229 | case WM_DESTROY: 2230 | SafeRelease(&pFontSet); 2231 | SafeRelease(&fontSetBuilder); 2232 | SafeRelease(&pFontCollection); 2233 | SafeRelease(&pFontFile); 2234 | SafeRelease(&pInMemoryFontFileLoader); 2235 | SafeRelease(&m_pD2DFactory); 2236 | SafeRelease(&m_pDWriteFactory); 2237 | SafeRelease(&m_pRenderTarget); 2238 | SafeRelease(&m_pTextFormat); 2239 | SafeRelease(&m_pBlackBrush); 2240 | SafeRelease(&m_pGrayBrush); 2241 | SafeRelease(&m_pRedBrush); 2242 | SafeRelease(&m_pWICFactory); 2243 | CoUninitialize(); 2244 | PostQuitMessage(0); 2245 | break; 2246 | default: 2247 | return DefWindowProc(hWnd, msg, wParam, lParam); 2248 | } 2249 | return 0; 2250 | } 2251 | 2252 | int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPWSTR lpCmdLine, _In_ int nShowCmd) 2253 | { 2254 | // グローバル文字列を初期化する 2255 | LoadStringW(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING); 2256 | LoadStringW(hInstance, IDS_CLASS_NAME, szWindowClass, MAX_LOADSTRING); 2257 | MSG msg; 2258 | WNDCLASS wndclass = { 2259 | CS_HREDRAW | CS_VREDRAW, 2260 | WndProc, 2261 | 0, 2262 | 0, 2263 | hInstance, 2264 | LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON1)), 2265 | LoadCursor(0,IDC_ARROW), 2266 | (HBRUSH)(COLOR_WINDOW + 1), 2267 | 0, 2268 | szWindowClass 2269 | }; 2270 | RegisterClass(&wndclass); 2271 | HWND hWnd = CreateWindow( 2272 | szWindowClass, 2273 | szTitle, 2274 | WS_OVERLAPPEDWINDOW, 2275 | CW_USEDEFAULT, 2276 | 0, 2277 | CW_USEDEFAULT, 2278 | 0, 2279 | 0, 2280 | 0, 2281 | hInstance, 2282 | 0 2283 | ); 2284 | DSBUFFERDESC dsbd = {}; 2285 | IDirectSound* ds[MAX_SOUND_COUNT]; 2286 | for (int i = 0; i < MAX_SOUND_COUNT; i++) 2287 | { 2288 | DirectSoundCreate(NULL, &(ds[i]), NULL); 2289 | (ds[i])->SetCooperativeLevel(hWnd, DSSCL_NORMAL); 2290 | dsbd.dwSize = sizeof(DSBUFFERDESC); 2291 | dsbd.dwFlags = DSBCAPS_STATIC | DSBCAPS_CTRLPAN | DSBCAPS_CTRLVOLUME | DSBCAPS_CTRLFREQUENCY; 2292 | HRSRC hrsrc = FindResource(hInstance, MAKEINTRESOURCE(nSoundResourceID[i]), TEXT("WAVE")); 2293 | if (hrsrc) 2294 | { 2295 | HGLOBAL hRData = LoadResource(hInstance, hrsrc); 2296 | if (hRData) 2297 | { 2298 | DWORD* pRData = (DWORD*)LockResource(hRData); 2299 | if (pRData) 2300 | { 2301 | LPBYTE pMem1, pMem2; 2302 | DWORD dwSize1, dwSize2; 2303 | dsbd.dwBufferBytes = *(pRData + 10); 2304 | dsbd.lpwfxFormat = (LPWAVEFORMATEX)(pRData + 5); 2305 | (ds[i])->CreateSoundBuffer(&dsbd, &(dsb1[i]), NULL); 2306 | (dsb1[i])->Lock(0, dsbd.dwBufferBytes, (void**)&pMem1, &dwSize1, (void**)&pMem2, &dwSize2, 0); 2307 | memcpy(pMem1, (LPBYTE)(pRData + 11), dwSize1); 2308 | if (dwSize2 != 0) memcpy(pMem2, (LPBYTE)(pRData + 11) + dwSize1, dwSize2); 2309 | (dsb1[i])->Unlock(pMem1, dwSize1, pMem2, dwSize2); 2310 | } 2311 | } 2312 | } 2313 | } 2314 | ShowWindow(hWnd, SW_SHOWDEFAULT); 2315 | UpdateWindow(hWnd); 2316 | while (GetMessage(&msg, 0, 0, 0)) 2317 | { 2318 | TranslateMessage(&msg); 2319 | DispatchMessage(&msg); 2320 | } 2321 | for (auto i : ds) 2322 | { 2323 | i->Release(); 2324 | } 2325 | return (int)msg.wParam; 2326 | } 2327 | --------------------------------------------------------------------------------