-\r
-Microsoft Visual Studio Solution File, Format Version 9.00\r
-# Visual C++ Express 2005\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moflib", "moflib\moflib.vcproj", "{04CD4817-1559-4830-BCB0-C5AE997CD904}"\r
-EndProject\r
-Global\r
- GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
- Debug|Win32 = Debug|Win32\r
- Release|Win32 = Release|Win32\r
- EndGlobalSection\r
- GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
- {04CD4817-1559-4830-BCB0-C5AE997CD904}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {04CD4817-1559-4830-BCB0-C5AE997CD904}.Debug|Win32.Build.0 = Debug|Win32\r
- {04CD4817-1559-4830-BCB0-C5AE997CD904}.Release|Win32.ActiveCfg = Release|Win32\r
- {04CD4817-1559-4830-BCB0-C5AE997CD904}.Release|Win32.Build.0 = Release|Win32\r
- EndGlobalSection\r
- GlobalSection(SolutionProperties) = preSolution\r
- HideSolutionNode = FALSE\r
- EndGlobalSection\r
-EndGlobal\r
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual C++ Express 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moflib", "moflib\moflib.vcproj", "{04CD4817-1559-4830-BCB0-C5AE997CD904}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {04CD4817-1559-4830-BCB0-C5AE997CD904}.Debug|Win32.ActiveCfg = Debug|Win32
+ {04CD4817-1559-4830-BCB0-C5AE997CD904}.Debug|Win32.Build.0 = Debug|Win32
+ {04CD4817-1559-4830-BCB0-C5AE997CD904}.Release|Win32.ActiveCfg = Release|Win32
+ {04CD4817-1559-4830-BCB0-C5AE997CD904}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>\r
-<?fileVersion 4.0.0?>\r
-\r
-<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">\r
- <storageModule moduleId="org.eclipse.cdt.core.settings">\r
- <cconfiguration id="cdt.managedbuild.toolchain.gnu.base.2088091048">\r
- <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.base.2088091048" moduleId="org.eclipse.cdt.core.settings" name="Default">\r
- <externalSettings/>\r
- <extensions>\r
- <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>\r
- <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
- <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>\r
- <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
- <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
- <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
- </extensions>\r
- </storageModule>\r
- <storageModule moduleId="cdtBuildSystem" version="4.0.0">\r
- <configuration buildProperties="" id="cdt.managedbuild.toolchain.gnu.base.2088091048" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">\r
- <folderInfo id="cdt.managedbuild.toolchain.gnu.base.2088091048.627154026" name="/" resourcePath="">\r
- <toolChain id="cdt.managedbuild.toolchain.gnu.base.1234399051" name="cdt.managedbuild.toolchain.gnu.base" superClass="cdt.managedbuild.toolchain.gnu.base">\r
- <targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.base.1480634265" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>\r
- <builder id="cdt.managedbuild.target.gnu.builder.base.1128209932" managedBuildOn="false" name="Gnu Make Builder.Default" superClass="cdt.managedbuild.target.gnu.builder.base"/>\r
- <tool id="cdt.managedbuild.tool.gnu.archiver.base.108021082" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>\r
- <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.1498657607" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base"/>\r
- <tool id="cdt.managedbuild.tool.gnu.c.compiler.base.716898585" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base"/>\r
- <tool id="cdt.managedbuild.tool.gnu.c.linker.base.896029158" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/>\r
- <tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.1460953488" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base"/>\r
- <tool id="cdt.managedbuild.tool.gnu.assembler.base.509325063" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base"/>\r
- </toolChain>\r
- </folderInfo>\r
- </configuration>\r
- </storageModule>\r
- <storageModule moduleId="scannerConfiguration">\r
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>\r
- <profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">\r
- <buildOutputProvider>\r
- <openAction enabled="true" filePath=""/>\r
- <parser enabled="true"/>\r
- </buildOutputProvider>\r
- <scannerInfoProvider id="specsFile">\r
- <runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>\r
- <parser enabled="true"/>\r
- </scannerInfoProvider>\r
- </profile>\r
- <profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">\r
- <buildOutputProvider>\r
- <openAction enabled="true" filePath=""/>\r
- <parser enabled="true"/>\r
- </buildOutputProvider>\r
- <scannerInfoProvider id="makefileGenerator">\r
- <runAction arguments="-E -P -v -dD" command="" useDefault="true"/>\r
- <parser enabled="true"/>\r
- </scannerInfoProvider>\r
- </profile>\r
- <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">\r
- <buildOutputProvider>\r
- <openAction enabled="true" filePath=""/>\r
- <parser enabled="true"/>\r
- </buildOutputProvider>\r
- <scannerInfoProvider id="specsFile">\r
- <runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>\r
- <parser enabled="true"/>\r
- </scannerInfoProvider>\r
- </profile>\r
- <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">\r
- <buildOutputProvider>\r
- <openAction enabled="true" filePath=""/>\r
- <parser enabled="true"/>\r
- </buildOutputProvider>\r
- <scannerInfoProvider id="specsFile">\r
- <runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>\r
- <parser enabled="true"/>\r
- </scannerInfoProvider>\r
- </profile>\r
- <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">\r
- <buildOutputProvider>\r
- <openAction enabled="true" filePath=""/>\r
- <parser enabled="true"/>\r
- </buildOutputProvider>\r
- <scannerInfoProvider id="specsFile">\r
- <runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>\r
- <parser enabled="true"/>\r
- </scannerInfoProvider>\r
- </profile>\r
- <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">\r
- <buildOutputProvider>\r
- <openAction enabled="true" filePath=""/>\r
- <parser enabled="true"/>\r
- </buildOutputProvider>\r
- <scannerInfoProvider id="specsFile">\r
- <runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'" command="sh" useDefault="true"/>\r
- <parser enabled="true"/>\r
- </scannerInfoProvider>\r
- </profile>\r
- <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">\r
- <buildOutputProvider>\r
- <openAction enabled="true" filePath=""/>\r
- <parser enabled="true"/>\r
- </buildOutputProvider>\r
- <scannerInfoProvider id="specsFile">\r
- <runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>\r
- <parser enabled="true"/>\r
- </scannerInfoProvider>\r
- </profile>\r
- <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">\r
- <buildOutputProvider>\r
- <openAction enabled="true" filePath=""/>\r
- <parser enabled="true"/>\r
- </buildOutputProvider>\r
- <scannerInfoProvider id="specsFile">\r
- <runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>\r
- <parser enabled="true"/>\r
- </scannerInfoProvider>\r
- </profile>\r
- </storageModule>\r
- <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>\r
- </cconfiguration>\r
- </storageModule>\r
- <storageModule moduleId="cdtBuildSystem" version="4.0.0">\r
- <project id="moflib.null.1505356407" name="moflib"/>\r
- </storageModule>\r
-</cproject>\r
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?>
+
+<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+ <storageModule moduleId="org.eclipse.cdt.core.settings">
+ <cconfiguration id="cdt.managedbuild.toolchain.gnu.base.2088091048">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.base.2088091048" moduleId="org.eclipse.cdt.core.settings" name="Default">
+ <externalSettings/>
+ <extensions>
+ <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+ <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration buildProperties="" id="cdt.managedbuild.toolchain.gnu.base.2088091048" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
+ <folderInfo id="cdt.managedbuild.toolchain.gnu.base.2088091048.627154026" name="/" resourcePath="">
+ <toolChain id="cdt.managedbuild.toolchain.gnu.base.1234399051" name="cdt.managedbuild.toolchain.gnu.base" superClass="cdt.managedbuild.toolchain.gnu.base">
+ <targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.base.1480634265" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
+ <builder id="cdt.managedbuild.target.gnu.builder.base.1128209932" managedBuildOn="false" name="Gnu Make Builder.Default" superClass="cdt.managedbuild.target.gnu.builder.base"/>
+ <tool id="cdt.managedbuild.tool.gnu.archiver.base.108021082" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
+ <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.1498657607" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base"/>
+ <tool id="cdt.managedbuild.tool.gnu.c.compiler.base.716898585" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base"/>
+ <tool id="cdt.managedbuild.tool.gnu.c.linker.base.896029158" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/>
+ <tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.1460953488" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base"/>
+ <tool id="cdt.managedbuild.tool.gnu.assembler.base.509325063" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base"/>
+ </toolChain>
+ </folderInfo>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="scannerConfiguration">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+ <profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+ <buildOutputProvider>
+ <openAction enabled="true" filePath=""/>
+ <parser enabled="true"/>
+ </buildOutputProvider>
+ <scannerInfoProvider id="specsFile">
+ <runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+ <parser enabled="true"/>
+ </scannerInfoProvider>
+ </profile>
+ <profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+ <buildOutputProvider>
+ <openAction enabled="true" filePath=""/>
+ <parser enabled="true"/>
+ </buildOutputProvider>
+ <scannerInfoProvider id="makefileGenerator">
+ <runAction arguments="-E -P -v -dD" command="" useDefault="true"/>
+ <parser enabled="true"/>
+ </scannerInfoProvider>
+ </profile>
+ <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+ <buildOutputProvider>
+ <openAction enabled="true" filePath=""/>
+ <parser enabled="true"/>
+ </buildOutputProvider>
+ <scannerInfoProvider id="specsFile">
+ <runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+ <parser enabled="true"/>
+ </scannerInfoProvider>
+ </profile>
+ <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+ <buildOutputProvider>
+ <openAction enabled="true" filePath=""/>
+ <parser enabled="true"/>
+ </buildOutputProvider>
+ <scannerInfoProvider id="specsFile">
+ <runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+ <parser enabled="true"/>
+ </scannerInfoProvider>
+ </profile>
+ <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+ <buildOutputProvider>
+ <openAction enabled="true" filePath=""/>
+ <parser enabled="true"/>
+ </buildOutputProvider>
+ <scannerInfoProvider id="specsFile">
+ <runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+ <parser enabled="true"/>
+ </scannerInfoProvider>
+ </profile>
+ <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+ <buildOutputProvider>
+ <openAction enabled="true" filePath=""/>
+ <parser enabled="true"/>
+ </buildOutputProvider>
+ <scannerInfoProvider id="specsFile">
+ <runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'" command="sh" useDefault="true"/>
+ <parser enabled="true"/>
+ </scannerInfoProvider>
+ </profile>
+ <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+ <buildOutputProvider>
+ <openAction enabled="true" filePath=""/>
+ <parser enabled="true"/>
+ </buildOutputProvider>
+ <scannerInfoProvider id="specsFile">
+ <runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>
+ <parser enabled="true"/>
+ </scannerInfoProvider>
+ </profile>
+ <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+ <buildOutputProvider>
+ <openAction enabled="true" filePath=""/>
+ <parser enabled="true"/>
+ </buildOutputProvider>
+ <scannerInfoProvider id="specsFile">
+ <runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>
+ <parser enabled="true"/>
+ </scannerInfoProvider>
+ </profile>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <project id="moflib.null.1505356407" name="moflib"/>
+ </storageModule>
+</cproject>
-<?xml version="1.0" encoding="UTF-8"?>\r
-<projectDescription>\r
- <name>moflib</name>\r
- <comment></comment>\r
- <projects>\r
- </projects>\r
- <buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>\r
- <triggers>clean,full,incremental,</triggers>\r
- <arguments>\r
- <dictionary>\r
- <key>?name?</key>\r
- <value></value>\r
- </dictionary>\r
- <dictionary>\r
- <key>org.eclipse.cdt.make.core.append_environment</key>\r
- <value>true</value>\r
- </dictionary>\r
- <dictionary>\r
- <key>org.eclipse.cdt.make.core.autoBuildTarget</key>\r
- <value>all</value>\r
- </dictionary>\r
- <dictionary>\r
- <key>org.eclipse.cdt.make.core.buildArguments</key>\r
- <value></value>\r
- </dictionary>\r
- <dictionary>\r
- <key>org.eclipse.cdt.make.core.buildCommand</key>\r
- <value>make</value>\r
- </dictionary>\r
- <dictionary>\r
- <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>\r
- <value>clean</value>\r
- </dictionary>\r
- <dictionary>\r
- <key>org.eclipse.cdt.make.core.contents</key>\r
- <value>org.eclipse.cdt.make.core.activeConfigSettings</value>\r
- </dictionary>\r
- <dictionary>\r
- <key>org.eclipse.cdt.make.core.enableAutoBuild</key>\r
- <value>false</value>\r
- </dictionary>\r
- <dictionary>\r
- <key>org.eclipse.cdt.make.core.enableCleanBuild</key>\r
- <value>true</value>\r
- </dictionary>\r
- <dictionary>\r
- <key>org.eclipse.cdt.make.core.enableFullBuild</key>\r
- <value>true</value>\r
- </dictionary>\r
- <dictionary>\r
- <key>org.eclipse.cdt.make.core.fullBuildTarget</key>\r
- <value>all</value>\r
- </dictionary>\r
- <dictionary>\r
- <key>org.eclipse.cdt.make.core.stopOnError</key>\r
- <value>true</value>\r
- </dictionary>\r
- <dictionary>\r
- <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>\r
- <value>true</value>\r
- </dictionary>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>\r
- <triggers>full,incremental,</triggers>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- </buildSpec>\r
- <natures>\r
- <nature>org.eclipse.cdt.core.cnature</nature>\r
- <nature>org.eclipse.cdt.core.ccnature</nature>\r
- <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>\r
- <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>\r
- </natures>\r
-</projectDescription>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>moflib</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+ <triggers>clean,full,incremental,</triggers>
+ <arguments>
+ <dictionary>
+ <key>?name?</key>
+ <value></value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.append_environment</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.autoBuildTarget</key>
+ <value>all</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildArguments</key>
+ <value></value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildCommand</key>
+ <value>make</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
+ <value>clean</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.contents</key>
+ <value>org.eclipse.cdt.make.core.activeConfigSettings</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+ <value>false</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableCleanBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableFullBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.fullBuildTarget</key>
+ <value>all</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.stopOnError</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
+ <value>true</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+ <triggers>full,incremental,</triggers>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ <nature>org.eclipse.cdt.core.ccnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+ </natures>
+</projectDescription>
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\AmbientLight.obj\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\APPLICATION.OBJ\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\BOARD.OBJ\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\Cache.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\Camera.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\Captor.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1000.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1000.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1124.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1124.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1224.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1224.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1228.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1228.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1240.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1240.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1268.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1268.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1316.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1316.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1352.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1352.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.144.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.144.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.156.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.156.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.160.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.160.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1616.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1616.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1648.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1648.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1748.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1748.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1832.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1832.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1852.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1852.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1860.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1860.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1880.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1880.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1924.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1924.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1972.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1972.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2128.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2128.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2140.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2140.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2220.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2220.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2372.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2372.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2388.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2388.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2432.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2432.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2436.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2436.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2492.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2492.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2552.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2552.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2628.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2628.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2636.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2636.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2736.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2736.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2812.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2812.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2820.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2820.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2856.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2856.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2864.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2864.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2896.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2896.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2944.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2944.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2952.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2952.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2972.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2972.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3056.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3056.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3076.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3076.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3088.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3088.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3264.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3264.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3308.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3308.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.348.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.348.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3480.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3480.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3492.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3492.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3576.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3576.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3664.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3664.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3676.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3676.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3680.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3680.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3712.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3712.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3748.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3748.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3812.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3812.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3856.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3856.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3984.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3984.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4144.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4144.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4168.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4168.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4184.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4184.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4232.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4232.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4236.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4236.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4272.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4272.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4292.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4292.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4300.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4300.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4308.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4308.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.436.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.436.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4448.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4448.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4500.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4500.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4504.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4504.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4548.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4548.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4628.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4628.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4680.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4680.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4684.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4684.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4704.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4704.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.472.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.472.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4752.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4752.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4756.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4756.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4800.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4800.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4804.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4804.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4824.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4824.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4956.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4956.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4984.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4984.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4988.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4988.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5008.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5008.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5012.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5012.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5040.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5040.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5092.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5092.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5096.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5096.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5124.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5124.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5164.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5164.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5176.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5176.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5280.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5280.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5300.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5300.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5304.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5304.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5320.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5320.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5360.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5360.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5452.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5452.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5468.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5468.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5488.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5488.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5492.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5492.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5500.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5500.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5504.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5504.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5520.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5520.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5580.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5580.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5656.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5656.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5664.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5664.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5720.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5720.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5744.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5744.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5764.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5764.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5772.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5772.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5800.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5800.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5904.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5904.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5916.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5916.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5968.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5968.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6020.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6020.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6028.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6028.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6072.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6072.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6188.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6188.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6228.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6228.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6232.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6232.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6296.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6296.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6324.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6324.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6480.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6480.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6484.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6484.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6512.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6512.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6584.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6584.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6588.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6588.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6596.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6596.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6612.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6612.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6664.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6664.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.676.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.676.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6764.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6764.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6796.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6796.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6900.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6900.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7016.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7016.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7036.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7036.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7080.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7080.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7112.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7112.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7124.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7124.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7200.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7200.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7240.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7240.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7300.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7300.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7376.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7376.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7388.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7388.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7428.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7428.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7464.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7464.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7476.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7476.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7536.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7536.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7560.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7560.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7576.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7576.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7636.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7636.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7700.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7700.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7744.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7744.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.776.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.776.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7780.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7780.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7848.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7848.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7860.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7860.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7884.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7884.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7900.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7900.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7940.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7940.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.8004.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.8004.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.8020.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.8020.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.8092.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.8092.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.8124.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.8124.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.884.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.884.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.892.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.892.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\cl.command.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\cl.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\class.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\class_info.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\class_registry.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\class_rep.obj\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\CLIPPINGVIEW.OBJ\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\Color.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\Component3D.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\ConsoleIO.obj\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\CONTAINER.OBJ\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\create_class.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CWaveFile.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\DeviceInputReceiver.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\DirectionalLight.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\DirectSoundDevice.obj\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\EFFECT.OBJ\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\ENVIRONMENT.OBJ\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\error.obj\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\EVENTSCHEDULER.OBJ\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\exception_handler.obj\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\EXPATJP.OBJ\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\FilePath.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\FileTextureBuilder.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\find_best_match.obj\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\FLOW_LAYOUT.OBJ\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\FONT.OBJ\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\FRAME.OBJ\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\function.obj\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\GRAPHICSDEVICE.OBJ\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\GRIDLAYOUT.OBJ\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\HORIZONTALCLIPPING.OBJ\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\IMAGEVIEW.OBJ\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\implicit_cast.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\InputDevice.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\InputEventCondition.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\KeyPressedEventCondition.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\lib.command.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\Lib-link.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\Lib-link.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\Light.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\link_compatibility.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\LoggedInputReceiver.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\LoggingInputReceiver.obj\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\LUA_STATE.OBJ\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\LuaInterpreter.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\MaterialBuilder.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\Matrix2D.obj\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\MATRIX3D.OBJ\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\MENU.OBJ\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\MESH.OBJ\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\MESHBUILDER.OBJ\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\Message.obj\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\MOFML_PARSER.OBJ\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\NullView.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\object_rep.obj\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\OBJECTDATA.OBJ\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\OggVorbisFile.obj\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\ONCEEVENTCONDITION.OBJ\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\open.obj\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\OVERLAPLAYOUT.OBJ\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\overload_rep.obj\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\PAGER.OBJ\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\pcall.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\PixelMapTextureBuilder.obj\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\RECTANGLEVIEW.OBJ\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\ref.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\scope.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\SoundBuffer.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\SoundDevice.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\SoundFile.obj\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\SPRITE.OBJ\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\stack_content_by_name.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\StaticSoundBuffer.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\StreamingSoundLoader.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\StreamSoundBuffer.obj\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\TEXTCOMPILER.OBJ\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\TEXTURE.OBJ\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\Timer.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\utilities.obj\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\UTILITIES1.OBJ\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\VC100.PDB\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\Vector2D.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\Vector3D.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\VertexBuffer.obj\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\VERTICALCLIPPING.OBJ\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\WaveFile.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\weak_ref.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\Window.obj\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\wrapper_base.obj\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\RPG\DEBUG\MOFLIB.LIB\r
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\AmbientLight.obj
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\APPLICATION.OBJ
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\BOARD.OBJ
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\Cache.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\Camera.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\Captor.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1000.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1000.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1124.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1124.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1224.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1224.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1228.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1228.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1240.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1240.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1268.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1268.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1316.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1316.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1352.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1352.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.144.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.144.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.156.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.156.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.160.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.160.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1616.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1616.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1648.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1648.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1748.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1748.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1832.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1832.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1852.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1852.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1860.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1860.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1880.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1880.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1924.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1924.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1972.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.1972.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2128.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2128.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2140.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2140.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2220.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2220.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2372.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2372.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2388.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2388.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2432.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2432.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2436.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2436.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2492.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2492.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2552.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2552.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2628.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2628.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2636.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2636.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2736.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2736.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2812.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2812.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2820.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2820.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2856.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2856.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2864.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2864.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2896.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2896.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2944.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2944.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2952.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2952.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2972.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.2972.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3056.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3056.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3076.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3076.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3088.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3088.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3264.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3264.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3308.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3308.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.348.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.348.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3480.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3480.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3492.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3492.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3576.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3576.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3664.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3664.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3676.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3676.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3680.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3680.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3712.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3712.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3748.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3748.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3812.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3812.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3856.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3856.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3984.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.3984.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4144.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4144.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4168.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4168.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4184.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4184.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4232.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4232.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4236.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4236.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4272.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4272.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4292.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4292.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4300.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4300.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4308.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4308.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.436.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.436.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4448.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4448.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4500.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4500.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4504.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4504.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4548.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4548.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4628.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4628.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4680.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4680.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4684.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4684.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4704.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4704.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.472.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.472.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4752.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4752.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4756.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4756.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4800.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4800.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4804.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4804.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4824.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4824.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4956.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4956.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4984.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4984.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4988.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.4988.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5008.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5008.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5012.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5012.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5040.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5040.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5092.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5092.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5096.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5096.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5124.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5124.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5164.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5164.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5176.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5176.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5280.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5280.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5300.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5300.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5304.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5304.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5320.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5320.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5360.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5360.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5452.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5452.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5468.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5468.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5488.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5488.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5492.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5492.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5500.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5500.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5504.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5504.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5520.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5520.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5580.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5580.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5656.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5656.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5664.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5664.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5720.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5720.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5744.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5744.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5764.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5764.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5772.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5772.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5800.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5800.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5904.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5904.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5916.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5916.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5968.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.5968.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6020.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6020.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6028.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6028.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6072.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6072.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6188.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6188.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6228.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6228.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6232.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6232.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6296.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6296.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6324.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6324.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6480.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6480.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6484.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6484.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6512.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6512.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6584.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6584.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6588.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6588.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6596.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6596.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6612.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6612.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6664.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6664.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.676.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.676.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6764.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6764.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6796.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6796.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6900.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.6900.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7016.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7016.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7036.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7036.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7080.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7080.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7112.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7112.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7124.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7124.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7200.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7200.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7240.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7240.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7300.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7300.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7376.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7376.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7388.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7388.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7428.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7428.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7464.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7464.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7476.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7476.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7536.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7536.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7560.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7560.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7576.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7576.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7636.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7636.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7700.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7700.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7744.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7744.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.776.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.776.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7780.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7780.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7848.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7848.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7860.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7860.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7884.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7884.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7900.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7900.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7940.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.7940.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.8004.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.8004.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.8020.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.8020.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.8092.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.8092.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.8124.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.8124.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.884.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.884.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.892.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.892.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\cl.command.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CL.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\cl.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\class.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\class_info.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\class_registry.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\class_rep.obj
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\CLIPPINGVIEW.OBJ
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\Color.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\Component3D.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\ConsoleIO.obj
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\CONTAINER.OBJ
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\create_class.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\CWaveFile.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\DeviceInputReceiver.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\DirectionalLight.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\DirectSoundDevice.obj
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\EFFECT.OBJ
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\ENVIRONMENT.OBJ
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\error.obj
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\EVENTSCHEDULER.OBJ
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\exception_handler.obj
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\EXPATJP.OBJ
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\FilePath.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\FileTextureBuilder.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\find_best_match.obj
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\FLOW_LAYOUT.OBJ
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\FONT.OBJ
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\FRAME.OBJ
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\function.obj
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\GRAPHICSDEVICE.OBJ
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\GRIDLAYOUT.OBJ
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\HORIZONTALCLIPPING.OBJ
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\IMAGEVIEW.OBJ
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\implicit_cast.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\InputDevice.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\InputEventCondition.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\KeyPressedEventCondition.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\lib.command.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\Lib-link.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\Lib-link.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\Light.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\link_compatibility.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\LoggedInputReceiver.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\LoggingInputReceiver.obj
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\LUA_STATE.OBJ
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\LuaInterpreter.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\MaterialBuilder.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\Matrix2D.obj
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\MATRIX3D.OBJ
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\MENU.OBJ
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\MESH.OBJ
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\MESHBUILDER.OBJ
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\Message.obj
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\MOFML_PARSER.OBJ
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\NullView.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\object_rep.obj
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\OBJECTDATA.OBJ
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\OggVorbisFile.obj
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\ONCEEVENTCONDITION.OBJ
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\open.obj
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\OVERLAPLAYOUT.OBJ
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\overload_rep.obj
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\PAGER.OBJ
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\pcall.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\PixelMapTextureBuilder.obj
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\RECTANGLEVIEW.OBJ
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\ref.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\scope.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\SoundBuffer.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\SoundDevice.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\SoundFile.obj
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\SPRITE.OBJ
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\stack_content_by_name.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\StaticSoundBuffer.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\StreamingSoundLoader.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\StreamSoundBuffer.obj
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\TEXTCOMPILER.OBJ
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\TEXTURE.OBJ
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\Timer.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\utilities.obj
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\UTILITIES1.OBJ
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\VC100.PDB
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\Vector2D.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\Vector3D.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\VertexBuffer.obj
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\MOFLIB\MOFLIB\DEBUG\VERTICALCLIPPING.OBJ
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\WaveFile.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\weak_ref.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\Window.obj
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\Debug\wrapper_base.obj
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\RPG\DEBUG\MOFLIB.LIB
-#v4.0:v100\r
-Debug|Win32|C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\|\r
+#v4.0:v100
+Debug|Win32|C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\|
-2010/10/14 5:07:31 にビルドを開始しました。\r
- 1>ノード 2 上のプロジェクト "C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\moflib.vcxproj" (build ターゲット)。\r
- 1>InitializeBuildStatus:\r
- "Debug\moflib.unsuccessfulbuild" のタッチ タスクを実行しています。\r
- ClCompile:\r
- C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\CL.exe /c /I"C:\Program Files\luabind-0.8" /I"C:\Program Files\Lua\5.1\include" /I"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib" /I"C:\Program Files\boost\boost_1_40_0" /I"C:\Program Files\Microsoft DirectX SDK (February 2010)\Include" /I"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\extlib\oggvorbis\include" /I"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\extlib\expat\include" /Zi /nologo /W4 /WX- /MP /O2 /Oy- /Gm- /EHsc /MTd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"Debug\\" /Fd"Debug\vc100.pdb" /Gd /TP /analyze- /errorReport:prompt mof\GraphicsDevice.cpp\r
- GraphicsDevice.cpp\r
- すべての出力が最新のものです。\r
- すべての出力が最新のものです。\r
- Lib:\r
- C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\Lib.exe /OUT:"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\Debug\moflib.lib" libexpat.lib lua5.1.lib dsound.lib ogg.lib vorbis.lib vorbisfile.lib /LIBPATH:"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\extlib\oggvorbis\lib" /LIBPATH:"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\extlib\expat\lib" /NOLOGO Debug\AmbientLight.obj\r
- Debug\Board.obj\r
- Debug\Camera.obj\r
- Debug\Component3D.obj\r
- Debug\DirectionalLight.obj\r
- Debug\Light.obj\r
- Debug\MaterialBuilder.obj\r
- Debug\Mesh.obj\r
- Debug\MeshBuilder.obj\r
- Debug\particlegen.obj\r
- Debug\FileTextureBuilder.obj\r
- Debug\Environment.obj\r
- Debug\LuaInterpreter.obj\r
- Debug\lua_state.obj\r
- Debug\ObjectData.obj\r
- Debug\CWaveFile.obj\r
- Debug\DirectSoundDevice.obj\r
- Debug\OggVorbisFile.obj\r
- Debug\SoundBuffer.obj\r
- Debug\SoundDevice.obj\r
- Debug\SoundFile.obj\r
- Debug\sound_recoder.obj\r
- Debug\StaticSoundBuffer.obj\r
- Debug\StreamingSoundLoader.obj\r
- Debug\StreamSoundBuffer.obj\r
- Debug\WaveFile.obj\r
- Debug\Cache.obj\r
- Debug\utilities.obj\r
- Debug\class.obj\r
- Debug\class_info.obj\r
- Debug\class_registry.obj\r
- Debug\class_rep.obj\r
- Debug\Color.obj\r
- Debug\create_class.obj\r
- Debug\error.obj\r
- Debug\exception_handler.obj\r
- Debug\find_best_match.obj\r
- Debug\function.obj\r
- Debug\implicit_cast.obj\r
- Debug\link_compatibility.obj\r
- Debug\object_rep.obj\r
- Debug\open.obj\r
- Debug\overload_rep.obj\r
- Debug\pcall.obj\r
- Debug\ref.obj\r
- Debug\scope.obj\r
- Debug\stack_content_by_name.obj\r
- Debug\weak_ref.obj\r
- Debug\wrapper_base.obj\r
- Debug\Matrix2D.obj\r
- Debug\Matrix3D.obj\r
- Debug\Vector2D.obj\r
- Debug\Vector3D.obj\r
- Debug\Captor.obj\r
- Debug\GraphicsDevice.obj\r
- Debug\Texture.obj\r
- Debug\VertexBuffer.obj\r
- Debug\ClippingView.obj\r
- Debug\Container.obj\r
- Debug\Effect.obj\r
- Debug\expatJP.obj\r
- Debug\flow_layout.obj\r
- Debug\Frame.obj\r
- Debug\GridLayout.obj\r
- Debug\HorizontalClipping.obj\r
- Debug\ImageView.obj\r
- Debug\Menu.obj\r
- Debug\Message.obj\r
- Debug\mofml_parser.obj\r
- Debug\NullView.obj\r
- Debug\OverlapLayout.obj\r
- Debug\Pager.obj\r
- Debug\RectangleView.obj\r
- Debug\TextCompiler.obj\r
- Debug\DeviceInputReceiver.obj\r
- Debug\InputDevice.obj\r
- Debug\InputEventCondition.obj\r
- Debug\KeyPressedEventCondition.obj\r
- Debug\LoggedInputReceiver.obj\r
- Debug\LoggingInputReceiver.obj\r
- Debug\Application.obj\r
- Debug\ConsoleIO.obj\r
- Debug\EventScheduler.obj\r
- Debug\FilePath.obj\r
- Debug\Font.obj\r
- Debug\OnceEventCondition.obj\r
- Debug\Sprite.obj\r
- Debug\Timer.obj\r
- Debug\VerticalClipping.obj\r
- Debug\Window.obj\r
- Debug\PixelMapTextureBuilder.obj\r
- Debug\utilities1.obj /NODEFAULTLIB:library \r
- 1>lua5.1.lib(lua5.1.dll) : warning LNK4006: __NULL_IMPORT_DESCRIPTOR は libexpat.lib(libexpat.dll) で定義されています。2 つ目以降の定義は無視されます。\r
- 1>lua5.1.lib(lua5.1.dll) : warning LNK4221: このオブジェクト ファイルは、以前に未定義であったパブリック シンボルを定義していないため、このライブラリを使用するリンク操作では使用されません\r
- 1>dsound.lib(DSOUND.dll) : warning LNK4006: __NULL_IMPORT_DESCRIPTOR は libexpat.lib(libexpat.dll) で定義されています。2 つ目以降の定義は無視されます。\r
- 1>dsound.lib(DSOUND.dll) : warning LNK4221: このオブジェクト ファイルは、以前に未定義であったパブリック シンボルを定義していないため、このライブラリを使用するリンク操作では使用されません\r
- 1>ogg.lib(ogg.dll) : warning LNK4006: __NULL_IMPORT_DESCRIPTOR は libexpat.lib(libexpat.dll) で定義されています。2 つ目以降の定義は無視されます。\r
- 1>ogg.lib(ogg.dll) : warning LNK4221: このオブジェクト ファイルは、以前に未定義であったパブリック シンボルを定義していないため、このライブラリを使用するリンク操作では使用されません\r
- 1>vorbis.lib(vorbis.dll) : warning LNK4006: __NULL_IMPORT_DESCRIPTOR は libexpat.lib(libexpat.dll) で定義されています。2 つ目以降の定義は無視されます。\r
- 1>vorbis.lib(vorbis.dll) : warning LNK4221: このオブジェクト ファイルは、以前に未定義であったパブリック シンボルを定義していないため、このライブラリを使用するリンク操作では使用されません\r
- 1>vorbisfile.lib(vorbisfile.dll) : warning LNK4006: __NULL_IMPORT_DESCRIPTOR は libexpat.lib(libexpat.dll) で定義されています。2 つ目以降の定義は無視されます。\r
- 1>vorbisfile.lib(vorbisfile.dll) : warning LNK4221: このオブジェクト ファイルは、以前に未定義であったパブリック シンボルを定義していないため、このライブラリを使用するリンク操作では使用されません\r
- moflib.vcxproj -> C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\Debug\moflib.lib\r
- FinalizeBuildStatus:\r
- ファイル "Debug\moflib.unsuccessfulbuild" を削除しています。\r
- "Debug\moflib.lastbuildstate" のタッチ タスクを実行しています。\r
- 1>プロジェクト "C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\moflib.vcxproj" (build ターゲット) のビルドが完了しました。\r
-\r
-ビルドに成功しました。\r
-\r
-経過時間 00:00:04.06\r
+2010/10/14 5:07:31 にビルドを開始しました。
+ 1>ノード 2 上のプロジェクト "C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\moflib.vcxproj" (build ターゲット)。
+ 1>InitializeBuildStatus:
+ "Debug\moflib.unsuccessfulbuild" のタッチ タスクを実行しています。
+ ClCompile:
+ C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\CL.exe /c /I"C:\Program Files\luabind-0.8" /I"C:\Program Files\Lua\5.1\include" /I"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib" /I"C:\Program Files\boost\boost_1_40_0" /I"C:\Program Files\Microsoft DirectX SDK (February 2010)\Include" /I"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\extlib\oggvorbis\include" /I"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\extlib\expat\include" /Zi /nologo /W4 /WX- /MP /O2 /Oy- /Gm- /EHsc /MTd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"Debug\\" /Fd"Debug\vc100.pdb" /Gd /TP /analyze- /errorReport:prompt mof\GraphicsDevice.cpp
+ GraphicsDevice.cpp
+ すべての出力が最新のものです。
+ すべての出力が最新のものです。
+ Lib:
+ C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\Lib.exe /OUT:"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\Debug\moflib.lib" libexpat.lib lua5.1.lib dsound.lib ogg.lib vorbis.lib vorbisfile.lib /LIBPATH:"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\extlib\oggvorbis\lib" /LIBPATH:"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\extlib\expat\lib" /NOLOGO Debug\AmbientLight.obj
+ Debug\Board.obj
+ Debug\Camera.obj
+ Debug\Component3D.obj
+ Debug\DirectionalLight.obj
+ Debug\Light.obj
+ Debug\MaterialBuilder.obj
+ Debug\Mesh.obj
+ Debug\MeshBuilder.obj
+ Debug\particlegen.obj
+ Debug\FileTextureBuilder.obj
+ Debug\Environment.obj
+ Debug\LuaInterpreter.obj
+ Debug\lua_state.obj
+ Debug\ObjectData.obj
+ Debug\CWaveFile.obj
+ Debug\DirectSoundDevice.obj
+ Debug\OggVorbisFile.obj
+ Debug\SoundBuffer.obj
+ Debug\SoundDevice.obj
+ Debug\SoundFile.obj
+ Debug\sound_recoder.obj
+ Debug\StaticSoundBuffer.obj
+ Debug\StreamingSoundLoader.obj
+ Debug\StreamSoundBuffer.obj
+ Debug\WaveFile.obj
+ Debug\Cache.obj
+ Debug\utilities.obj
+ Debug\class.obj
+ Debug\class_info.obj
+ Debug\class_registry.obj
+ Debug\class_rep.obj
+ Debug\Color.obj
+ Debug\create_class.obj
+ Debug\error.obj
+ Debug\exception_handler.obj
+ Debug\find_best_match.obj
+ Debug\function.obj
+ Debug\implicit_cast.obj
+ Debug\link_compatibility.obj
+ Debug\object_rep.obj
+ Debug\open.obj
+ Debug\overload_rep.obj
+ Debug\pcall.obj
+ Debug\ref.obj
+ Debug\scope.obj
+ Debug\stack_content_by_name.obj
+ Debug\weak_ref.obj
+ Debug\wrapper_base.obj
+ Debug\Matrix2D.obj
+ Debug\Matrix3D.obj
+ Debug\Vector2D.obj
+ Debug\Vector3D.obj
+ Debug\Captor.obj
+ Debug\GraphicsDevice.obj
+ Debug\Texture.obj
+ Debug\VertexBuffer.obj
+ Debug\ClippingView.obj
+ Debug\Container.obj
+ Debug\Effect.obj
+ Debug\expatJP.obj
+ Debug\flow_layout.obj
+ Debug\Frame.obj
+ Debug\GridLayout.obj
+ Debug\HorizontalClipping.obj
+ Debug\ImageView.obj
+ Debug\Menu.obj
+ Debug\Message.obj
+ Debug\mofml_parser.obj
+ Debug\NullView.obj
+ Debug\OverlapLayout.obj
+ Debug\Pager.obj
+ Debug\RectangleView.obj
+ Debug\TextCompiler.obj
+ Debug\DeviceInputReceiver.obj
+ Debug\InputDevice.obj
+ Debug\InputEventCondition.obj
+ Debug\KeyPressedEventCondition.obj
+ Debug\LoggedInputReceiver.obj
+ Debug\LoggingInputReceiver.obj
+ Debug\Application.obj
+ Debug\ConsoleIO.obj
+ Debug\EventScheduler.obj
+ Debug\FilePath.obj
+ Debug\Font.obj
+ Debug\OnceEventCondition.obj
+ Debug\Sprite.obj
+ Debug\Timer.obj
+ Debug\VerticalClipping.obj
+ Debug\Window.obj
+ Debug\PixelMapTextureBuilder.obj
+ Debug\utilities1.obj /NODEFAULTLIB:library
+ 1>lua5.1.lib(lua5.1.dll) : warning LNK4006: __NULL_IMPORT_DESCRIPTOR は libexpat.lib(libexpat.dll) で定義されています。2 つ目以降の定義は無視されます。
+ 1>lua5.1.lib(lua5.1.dll) : warning LNK4221: このオブジェクト ファイルは、以前に未定義であったパブリック シンボルを定義していないため、このライブラリを使用するリンク操作では使用されません
+ 1>dsound.lib(DSOUND.dll) : warning LNK4006: __NULL_IMPORT_DESCRIPTOR は libexpat.lib(libexpat.dll) で定義されています。2 つ目以降の定義は無視されます。
+ 1>dsound.lib(DSOUND.dll) : warning LNK4221: このオブジェクト ファイルは、以前に未定義であったパブリック シンボルを定義していないため、このライブラリを使用するリンク操作では使用されません
+ 1>ogg.lib(ogg.dll) : warning LNK4006: __NULL_IMPORT_DESCRIPTOR は libexpat.lib(libexpat.dll) で定義されています。2 つ目以降の定義は無視されます。
+ 1>ogg.lib(ogg.dll) : warning LNK4221: このオブジェクト ファイルは、以前に未定義であったパブリック シンボルを定義していないため、このライブラリを使用するリンク操作では使用されません
+ 1>vorbis.lib(vorbis.dll) : warning LNK4006: __NULL_IMPORT_DESCRIPTOR は libexpat.lib(libexpat.dll) で定義されています。2 つ目以降の定義は無視されます。
+ 1>vorbis.lib(vorbis.dll) : warning LNK4221: このオブジェクト ファイルは、以前に未定義であったパブリック シンボルを定義していないため、このライブラリを使用するリンク操作では使用されません
+ 1>vorbisfile.lib(vorbisfile.dll) : warning LNK4006: __NULL_IMPORT_DESCRIPTOR は libexpat.lib(libexpat.dll) で定義されています。2 つ目以降の定義は無視されます。
+ 1>vorbisfile.lib(vorbisfile.dll) : warning LNK4221: このオブジェクト ファイルは、以前に未定義であったパブリック シンボルを定義していないため、このライブラリを使用するリンク操作では使用されません
+ moflib.vcxproj -> C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\Debug\moflib.lib
+ FinalizeBuildStatus:
+ ファイル "Debug\moflib.unsuccessfulbuild" を削除しています。
+ "Debug\moflib.lastbuildstate" のタッチ タスクを実行しています。
+ 1>プロジェクト "C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\moflib.vcxproj" (build ターゲット) のビルドが完了しました。
+
+ビルドに成功しました。
+
+経過時間 00:00:04.06
-Copyright (c) 2002-2008 Xiph.org Foundation\r
-\r
-Redistribution and use in source and binary forms, with or without\r
-modification, are permitted provided that the following conditions\r
-are met:\r
-\r
-- Redistributions of source code must retain the above copyright\r
-notice, this list of conditions and the following disclaimer.\r
-\r
-- Redistributions in binary form must reproduce the above copyright\r
-notice, this list of conditions and the following disclaimer in the\r
-documentation and/or other materials provided with the distribution.\r
-\r
-- Neither the name of the Xiph.org Foundation nor the names of its\r
-contributors may be used to endorse or promote products derived from\r
-this software without specific prior written permission.\r
-\r
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
-``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION\r
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+Copyright (c) 2002-2008 Xiph.org Foundation
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+- Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+
+- Neither the name of the Xiph.org Foundation nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "mof/AbstractScene.h"\r
-#include "mof/ConsoleIO.h"\r
-\r
-\r
-\r
-\r
-mof::AbstractScene::AbstractScene() {\r
- //m_state = mof::AbstractScene::UNINITIALIZED;\r
- //m_beginEffect = NULL;\r
- //m_endEffect = NULL;\r
- m_active = true;\r
- //m_initialized = false;\r
-}\r
-\r
-\r
-mof::AbstractScene::~AbstractScene(){\r
- //delete m_beginEffect;\r
- //delete m_endEffect;\r
- \r
-}\r
-/*\r
-bool mof::AbstractScene::isInitialized(){\r
- return (m_state != mof::AbstractScene::UNINITIALIZED);\r
-}*/\r
-\r
-\r
-bool mof::AbstractScene::isActive(){\r
- return m_active;//(m_state == mof::AbstractScene::ACTIVE || m_state == mof::AbstractScene::OPENING || m_state == mof::AbstractScene::CLOSING);\r
-}\r
-\r
-/*\r
-bool mof::AbstractScene::isClosing(){\r
- return m_state == mof::AbstractScene::CLOSING;\r
-}\r
-\r
-\r
-bool mof::AbstractScene::isOpening(){\r
- return m_state == mof::AbstractScene::OPENING;\r
-}*/\r
-/*\r
-void mof::AbstractScene::setBeginEffect(Effect* effect){\r
- delete m_beginEffect;\r
- m_beginEffect = effect;\r
- if(effect != NULL)effect->addEffectListener(this);\r
-}\r
-\r
-mof::Effect* mof::AbstractScene::getBeginEffect(){\r
- return m_beginEffect;\r
-}\r
-\r
-\r
-void mof::AbstractScene::setEndEffect(Effect* effect){\r
- delete m_endEffect;\r
- m_endEffect = effect;\r
- if(effect != NULL)effect->addEffectListener(this);\r
-}\r
-\r
-mof::Effect* mof::AbstractScene::getEndEffect(){\r
- return m_endEffect;\r
-}*/\r
-\r
-/*\r
-bool mof::AbstractScene::initialize(){\r
- m_state = mof::AbstractScene::INITIALIZED;\r
- //Activate(true);\r
- return true;\r
-}*/\r
-\r
-void mof::AbstractScene::activate(bool activate){\r
- m_active = activate;\r
- /*if(activate){\r
- m_state = mof::AbstractScene::ACTIVE;\r
- //playBeginEffect();\r
- //InputCore::getInstance()->addListener(this);\r
- }\r
- else {\r
- m_state = mof::AbstractScene::UNACTIVE;\r
- //playEndEffect();\r
- ////InputCore::getInstance()->removeListener(this);\r
- \r
- }*/\r
-}\r
-\r
-/*\r
-void mof::AbstractScene::notifyEffectEvent(EffectEvent& effectEvent){\r
- if(effectEvent.object == m_beginEffect && effectEvent.type == EffectEvent::FINISHED){\r
- m_state = mof::AbstractScene::ACTIVE;\r
- }\r
- if(effectEvent.object == m_endEffect && effectEvent.type == EffectEvent::FINISHED){\r
- m_state = mof::AbstractScene::UNACTIVE;\r
- }\r
-}\r
-\r
-\r
-void mof::AbstractScene::playBeginEffect(){\r
- if(m_beginEffect == NULL){\r
- m_state = mof::AbstractScene::ACTIVE;\r
- return;\r
- }\r
- m_state = mof::AbstractScene::OPENING;\r
- m_beginEffect->play();\r
-}\r
-\r
-\r
-void mof::AbstractScene::playEndEffect(){\r
- if(m_endEffect == NULL){\r
- m_state = mof::AbstractScene::UNACTIVE;\r
- return;\r
- }\r
- m_state = mof::AbstractScene::CLOSING;\r
- m_endEffect->play();\r
-}*/\r
+#include "mof/AbstractScene.h"
+#include "mof/ConsoleIO.h"
+
+
+
+
+mof::AbstractScene::AbstractScene() {
+ //m_state = mof::AbstractScene::UNINITIALIZED;
+ //m_beginEffect = NULL;
+ //m_endEffect = NULL;
+ m_active = true;
+ //m_initialized = false;
+}
+
+
+mof::AbstractScene::~AbstractScene(){
+ //delete m_beginEffect;
+ //delete m_endEffect;
+
+}
+/*
+bool mof::AbstractScene::isInitialized(){
+ return (m_state != mof::AbstractScene::UNINITIALIZED);
+}*/
+
+
+bool mof::AbstractScene::isActive(){
+ return m_active;//(m_state == mof::AbstractScene::ACTIVE || m_state == mof::AbstractScene::OPENING || m_state == mof::AbstractScene::CLOSING);
+}
+
+/*
+bool mof::AbstractScene::isClosing(){
+ return m_state == mof::AbstractScene::CLOSING;
+}
+
+
+bool mof::AbstractScene::isOpening(){
+ return m_state == mof::AbstractScene::OPENING;
+}*/
+/*
+void mof::AbstractScene::setBeginEffect(Effect* effect){
+ delete m_beginEffect;
+ m_beginEffect = effect;
+ if(effect != NULL)effect->addEffectListener(this);
+}
+
+mof::Effect* mof::AbstractScene::getBeginEffect(){
+ return m_beginEffect;
+}
+
+
+void mof::AbstractScene::setEndEffect(Effect* effect){
+ delete m_endEffect;
+ m_endEffect = effect;
+ if(effect != NULL)effect->addEffectListener(this);
+}
+
+mof::Effect* mof::AbstractScene::getEndEffect(){
+ return m_endEffect;
+}*/
+
+/*
+bool mof::AbstractScene::initialize(){
+ m_state = mof::AbstractScene::INITIALIZED;
+ //Activate(true);
+ return true;
+}*/
+
+void mof::AbstractScene::activate(bool activate){
+ m_active = activate;
+ /*if(activate){
+ m_state = mof::AbstractScene::ACTIVE;
+ //playBeginEffect();
+ //InputCore::getInstance()->addListener(this);
+ }
+ else {
+ m_state = mof::AbstractScene::UNACTIVE;
+ //playEndEffect();
+ ////InputCore::getInstance()->removeListener(this);
+
+ }*/
+}
+
+/*
+void mof::AbstractScene::notifyEffectEvent(EffectEvent& effectEvent){
+ if(effectEvent.object == m_beginEffect && effectEvent.type == EffectEvent::FINISHED){
+ m_state = mof::AbstractScene::ACTIVE;
+ }
+ if(effectEvent.object == m_endEffect && effectEvent.type == EffectEvent::FINISHED){
+ m_state = mof::AbstractScene::UNACTIVE;
+ }
+}
+
+
+void mof::AbstractScene::playBeginEffect(){
+ if(m_beginEffect == NULL){
+ m_state = mof::AbstractScene::ACTIVE;
+ return;
+ }
+ m_state = mof::AbstractScene::OPENING;
+ m_beginEffect->play();
+}
+
+
+void mof::AbstractScene::playEndEffect(){
+ if(m_endEffect == NULL){
+ m_state = mof::AbstractScene::UNACTIVE;
+ return;
+ }
+ m_state = mof::AbstractScene::CLOSING;
+ m_endEffect->play();
+}*/
-#include "mof/AmbientLight.hpp"\r
-#include "mof/ConsoleIO.hpp"\r
-#include "mof/private/GraphicsDeviceImpl.hpp"\r
-\r
-struct mof::AmbientLight::Impl{\r
- mof::Color lastAmbient;\r
- bool enable;\r
-\r
- Impl();\r
- ~Impl();\r
- void reflect( mof::Color color , bool force = false);\r
-};\r
-\r
-mof::AmbientLight::Impl::Impl()\r
-: enable(true)\r
-{\r
-}\r
-\r
-mof::AmbientLight::Impl::~Impl(){\r
- \r
-}\r
-\r
-mof::AmbientLight::AmbientLight( mof::Color4f color )\r
-: m_pImpl( new Impl() ) , mof::Light() \r
-{\r
- setDiffuseColor(color);\r
- m_pImpl->reflect( m_diffuseColor->value(m_frame).toColorCode() , true);\r
-}\r
-\r
-\r
-mof::AmbientLight::~AmbientLight(){\r
- try{\r
- setEnable(false);//\97á\8aO\82ð\93\8a\82°\82é\82©\82à\r
- }catch(std::exception& ){\r
- }\r
-}\r
-\r
-void mof::AmbientLight::setFrameNumber(mof::FrameNumber frame){\r
- m_frame = frame;\r
- m_pImpl->reflect( m_diffuseColor->value(m_frame).toColorCode() );\r
- \r
-}\r
-\r
-void mof::AmbientLight::nextFrame(){\r
- setFrameNumber(m_frame + 1);\r
-}\r
-\r
-void mof::AmbientLight::prevFrame(){\r
- if(m_frame > 0)setFrameNumber(m_frame - 1);\r
-}\r
-\r
-\r
-void mof::AmbientLight::setEnable(bool enable){\r
- if(!m_pImpl->enable && enable){\r
- m_pImpl->enable = enable;\r
- m_pImpl->reflect( m_diffuseColor->value(m_frame).toColorCode() );\r
- }\r
- else if(m_pImpl->enable && !enable){\r
- m_pImpl->enable = enable;\r
- m_pImpl->reflect( m_diffuseColor->value(m_frame).toColorCode() );\r
- }\r
-}\r
-\r
-\r
-void mof::AmbientLight::Impl::reflect(mof::Color color , bool force){\r
- //\95¡\90\94\82Ì\83A\83\93\83r\83G\83\93\83g\82ð\83T\83|\81[\83g\82·\82é\82×\82«\r
- mof::Color ambient = color;\r
- if(!enable)ambient = mof::createColor(0 , 0 , 0);\r
-\r
- if(ambient != lastAmbient || force){\r
- mof::GraphicsDevice::getRawDevice()->SetRenderState(D3DRS_AMBIENT , ambient);\r
- lastAmbient = ambient;\r
- }\r
-}\r
+#include "mof/AmbientLight.hpp"
+#include "mof/ConsoleIO.hpp"
+#include "mof/private/GraphicsDeviceImpl.hpp"
+
+struct mof::AmbientLight::Impl{
+ mof::Color lastAmbient;
+ bool enable;
+
+ Impl();
+ ~Impl();
+ void reflect( mof::Color color , bool force = false);
+};
+
+mof::AmbientLight::Impl::Impl()
+: enable(true)
+{
+}
+
+mof::AmbientLight::Impl::~Impl(){
+
+}
+
+mof::AmbientLight::AmbientLight( mof::Color4f color )
+: m_pImpl( new Impl() ) , mof::Light()
+{
+ setDiffuseColor(color);
+ m_pImpl->reflect( m_diffuseColor->value(m_frame).toColorCode() , true);
+}
+
+
+mof::AmbientLight::~AmbientLight(){
+ try{
+ setEnable(false);//\97á\8aO\82ð\93\8a\82°\82é\82©\82à
+ }catch(std::exception& ){
+ }
+}
+
+void mof::AmbientLight::setFrameNumber(mof::FrameNumber frame){
+ m_frame = frame;
+ m_pImpl->reflect( m_diffuseColor->value(m_frame).toColorCode() );
+
+}
+
+void mof::AmbientLight::nextFrame(){
+ setFrameNumber(m_frame + 1);
+}
+
+void mof::AmbientLight::prevFrame(){
+ if(m_frame > 0)setFrameNumber(m_frame - 1);
+}
+
+
+void mof::AmbientLight::setEnable(bool enable){
+ if(!m_pImpl->enable && enable){
+ m_pImpl->enable = enable;
+ m_pImpl->reflect( m_diffuseColor->value(m_frame).toColorCode() );
+ }
+ else if(m_pImpl->enable && !enable){
+ m_pImpl->enable = enable;
+ m_pImpl->reflect( m_diffuseColor->value(m_frame).toColorCode() );
+ }
+}
+
+
+void mof::AmbientLight::Impl::reflect(mof::Color color , bool force){
+ //\95¡\90\94\82Ì\83A\83\93\83r\83G\83\93\83g\82ð\83T\83|\81[\83g\82·\82é\82×\82«
+ mof::Color ambient = color;
+ if(!enable)ambient = mof::createColor(0 , 0 , 0);
+
+ if(ambient != lastAmbient || force){
+ mof::GraphicsDevice::getRawDevice()->SetRenderState(D3DRS_AMBIENT , ambient);
+ lastAmbient = ambient;
+ }
+}
-#ifndef MOF_AMBIENT_LIGHT\r
-#define MOF_AMBIENT_LIGHT\r
-\r
-#include "mof/Light.hpp"\r
-#include "mof/Color.hpp"\r
-#include <boost/scoped_ptr.hpp>\r
-\r
-\r
-namespace mof{\r
-\r
-\r
-\r
-class AmbientLight : public Light{\r
- struct Impl;\r
- boost::scoped_ptr<Impl> m_pImpl;\r
-\r
-public:\r
- AmbientLight( mof::Color4f color = mof::Color4f(1 , 1 , 1));\r
- virtual ~AmbientLight();\r
-\r
- virtual void setEnable(bool enable);\r
-\r
- virtual void setFrameNumber(mof::FrameNumber frame);\r
- virtual void nextFrame();\r
- virtual void prevFrame();\r
-\r
-};\r
-\r
-}\r
-\r
-\r
-#endif\r
+#ifndef MOF_AMBIENT_LIGHT
+#define MOF_AMBIENT_LIGHT
+
+#include "mof/Light.hpp"
+#include "mof/Color.hpp"
+#include <boost/scoped_ptr.hpp>
+
+
+namespace mof{
+
+
+
+class AmbientLight : public Light{
+ struct Impl;
+ boost::scoped_ptr<Impl> m_pImpl;
+
+public:
+ AmbientLight( mof::Color4f color = mof::Color4f(1 , 1 , 1));
+ virtual ~AmbientLight();
+
+ virtual void setEnable(bool enable);
+
+ virtual void setFrameNumber(mof::FrameNumber frame);
+ virtual void nextFrame();
+ virtual void prevFrame();
+
+};
+
+}
+
+
+#endif
-#include "mof/Application.hpp"\r
-#include "mof/GraphicsDevice.hpp"\r
-#include "mof/Window.hpp"\r
-#include "mof/SceneGraph.hpp"\r
-#include "mof/ConsoleIO.hpp"\r
-#include "mof/Timer.hpp"\r
-#include <stdexcept>\r
-#include "mof/Captor.hpp"\r
-#include "mof/InputDevice.hpp"\r
-#include "mof/private/GraphicsDeviceImpl.hpp"\r
-#include "mof/utilities.hpp"\r
-#include "mof/Finalizer.hpp"\r
-\r
-#include "mof/sound/SoundDevice.hpp"\r
-\r
-namespace \r
-{\r
- int m_frameInterval;\r
- int m_nUpdatingPerFrame;\r
- mof::Window* m_pWindow = NULL;\r
- bool enable_output_frame_;\r
- bool enable_output_audio_;\r
- mof::Application::InputMode input_mode_;\r
-}\r
-\r
-namespace mof\r
-{\r
- void Application::initialize\r
- ( \r
- const mof::tstring& appname , \r
- int width , \r
- int height ,\r
- bool fullscreen ,\r
- int frameInterval , \r
- int nUpdatingPerFrame,\r
- InputMode input_mode,\r
- bool enable_output_frame,\r
- bool enable_output_audio\r
- )\r
- {\r
- m_frameInterval = frameInterval;\r
- m_nUpdatingPerFrame = nUpdatingPerFrame; \r
- enable_output_frame_ = enable_output_frame;\r
- enable_output_audio_ = enable_output_audio;\r
- input_mode_ = input_mode;\r
-\r
- m_pWindow = new mof::Window( appname , width , height , fullscreen );\r
- mof::GraphicsDevice::initialize( m_pWindow->getHandler(), 0, width , height , fullscreen );\r
- mof::InputDevice::initialize();\r
- mof::sound::SoundDevice::initialize(m_pWindow->getHandler(), enable_output_audio_);\r
- \r
- }\r
- \r
- void Application::finalize( )\r
- {\r
- mof::GraphicsDevice::finalize();\r
- mof::InputDevice::finalize();\r
- mof::sound::SoundDevice::finalize();\r
- delete m_pWindow;\r
- }\r
- \r
- \r
- void Application::run( Scene& scene ) \r
- {\r
- scene.initialize();\r
- mof::Finalizer finalizer( scene.finalize ); //run\82ð\94²\82¯\82é\82Æ\82«\82É\89ð\95ú\8f\88\97\9d\82ð\8ds\82¤\r
- MSG msg;\r
- ZeroMemory( &msg, sizeof(msg) );\r
- mof::Timer timer;\r
- mof::Timer fpsTimer;\r
- int frameCount = 0;\r
-\r
- mof::Captor Captor( _T("output"));\r
- int sleepingTime = 0;\r
- for( ; ; )\r
- {\r
- while( PeekMessage( &msg, NULL, 0U, 0U, PM_NOREMOVE ) )\r
- {\r
- if( msg.message == WM_QUIT )return;\r
- GetMessage( &msg , NULL , 0 , 0 );\r
- TranslateMessage( &msg );\r
- DispatchMessage( &msg );\r
- }\r
- \r
- for( int i = 0 ; i < m_nUpdatingPerFrame ; i++ )scene.update();//\83V\81[\83\93\82Ì\8f\88\97\9d\r
-\r
- \r
- mof::GraphicsDevice::beginScene();\r
- scene.draw();//\83V\81[\83\93\82Ì\95`\89æ\r
- if (enable_output_frame_) Captor.capture();\r
- mof::GraphicsDevice::endScene();\r
- \r
- \r
-\r
- //FPS\82Ì\8cv\91ª\r
- int frameTime = timer.getTime();\r
- if(m_frameInterval > frameTime)\r
- {\r
- Sleep(m_frameInterval - frameTime);\r
- sleepingTime += m_frameInterval - frameTime;\r
- }\r
- \r
- timer.reset();\r
- \r
- if(++frameCount % 500 == 0)\r
- {\r
- float fps = 500.0f / static_cast<float>(fpsTimer.getTime() - sleepingTime) * 1000;\r
- fpsTimer.reset();\r
- sleepingTime = 0;\r
- DEBUG_PRINT( "FPS --- " << fps );\r
- }\r
- } // for\r
- \r
-\r
- } // function run\r
- \r
- void Application::quit( )\r
- {\r
- PostQuitMessage(0);\r
- }\r
-\r
-\r
- Application::InputMode Application::input_mode() {\r
- return input_mode_;\r
- }\r
-}\r
-\r
-\r
+#include "mof/Application.hpp"
+#include "mof/GraphicsDevice.hpp"
+#include "mof/Window.hpp"
+#include "mof/SceneGraph.hpp"
+#include "mof/ConsoleIO.hpp"
+#include "mof/Timer.hpp"
+#include <stdexcept>
+#include "mof/Captor.hpp"
+#include "mof/InputDevice.hpp"
+#include "mof/private/GraphicsDeviceImpl.hpp"
+#include "mof/utilities.hpp"
+#include "mof/Finalizer.hpp"
+
+#include "mof/sound/SoundDevice.hpp"
+
+namespace
+{
+ int m_frameInterval;
+ int m_nUpdatingPerFrame;
+ mof::Window* m_pWindow = NULL;
+ bool enable_output_frame_;
+ bool enable_output_audio_;
+ mof::Application::InputMode input_mode_;
+}
+
+namespace mof
+{
+ void Application::initialize
+ (
+ const mof::tstring& appname ,
+ int width ,
+ int height ,
+ bool fullscreen ,
+ int frameInterval ,
+ int nUpdatingPerFrame,
+ InputMode input_mode,
+ bool enable_output_frame,
+ bool enable_output_audio
+ )
+ {
+ m_frameInterval = frameInterval;
+ m_nUpdatingPerFrame = nUpdatingPerFrame;
+ enable_output_frame_ = enable_output_frame;
+ enable_output_audio_ = enable_output_audio;
+ input_mode_ = input_mode;
+
+ m_pWindow = new mof::Window( appname , width , height , fullscreen );
+ mof::GraphicsDevice::initialize( m_pWindow->getHandler(), 0, width , height , fullscreen );
+ mof::InputDevice::initialize();
+ mof::sound::SoundDevice::initialize(m_pWindow->getHandler(), enable_output_audio_);
+
+ }
+
+ void Application::finalize( )
+ {
+ mof::GraphicsDevice::finalize();
+ mof::InputDevice::finalize();
+ mof::sound::SoundDevice::finalize();
+ delete m_pWindow;
+ }
+
+
+ void Application::run( Scene& scene )
+ {
+ scene.initialize();
+ mof::Finalizer finalizer( scene.finalize ); //run\82ð\94²\82¯\82é\82Æ\82«\82É\89ð\95ú\8f\88\97\9d\82ð\8ds\82¤
+ MSG msg;
+ ZeroMemory( &msg, sizeof(msg) );
+ mof::Timer timer;
+ mof::Timer fpsTimer;
+ int frameCount = 0;
+
+ mof::Captor Captor( _T("output"));
+ int sleepingTime = 0;
+ for( ; ; )
+ {
+ while( PeekMessage( &msg, NULL, 0U, 0U, PM_NOREMOVE ) )
+ {
+ if( msg.message == WM_QUIT )return;
+ GetMessage( &msg , NULL , 0 , 0 );
+ TranslateMessage( &msg );
+ DispatchMessage( &msg );
+ }
+
+ for( int i = 0 ; i < m_nUpdatingPerFrame ; i++ )scene.update();//\83V\81[\83\93\82Ì\8f\88\97\9d
+
+
+ mof::GraphicsDevice::beginScene();
+ scene.draw();//\83V\81[\83\93\82Ì\95`\89æ
+ if (enable_output_frame_) Captor.capture();
+ mof::GraphicsDevice::endScene();
+
+
+
+ //FPS\82Ì\8cv\91ª
+ int frameTime = timer.getTime();
+ if(m_frameInterval > frameTime)
+ {
+ Sleep(m_frameInterval - frameTime);
+ sleepingTime += m_frameInterval - frameTime;
+ }
+
+ timer.reset();
+
+ if(++frameCount % 500 == 0)
+ {
+ float fps = 500.0f / static_cast<float>(fpsTimer.getTime() - sleepingTime) * 1000;
+ fpsTimer.reset();
+ sleepingTime = 0;
+ DEBUG_PRINT( "FPS --- " << fps );
+ }
+ } // for
+
+
+ } // function run
+
+ void Application::quit( )
+ {
+ PostQuitMessage(0);
+ }
+
+
+ Application::InputMode Application::input_mode() {
+ return input_mode_;
+ }
+}
+
+
-#pragma once\r
-#include "mof/tstring.hpp"\r
-\r
-namespace mof{\r
-\r
- struct Scene\r
- {\r
- void ( *initialize ) ();\r
- void ( *finalize ) ();\r
- void ( *update ) ();\r
- void ( *draw ) ();\r
- };\r
-\r
-\r
- \r
- namespace Application\r
- {\r
- //private\r
- \r
- enum InputMode\r
- {\r
- INPUT_MODE_DEVICE = 0,\r
- INPUT_MODE_LOGGING,\r
- INPUT_MODE_LOGGED,\r
- };\r
- //public\r
- void initialize\r
- ( \r
- const mof::tstring& appname , \r
- int width , \r
- int height ,\r
- bool fullscreen ,\r
- int frameInterval , \r
- int nUpdatingPerFrame,\r
- InputMode input_mode,\r
- bool enable_output_frame,\r
- bool enable_output_audio\r
- );\r
- void finalize();\r
- void run( Scene& scene );\r
- InputMode input_mode();\r
- void quit();\r
- }\r
-\r
-\r
-}\r
+#pragma once
+#include "mof/tstring.hpp"
+
+namespace mof{
+
+ struct Scene
+ {
+ void ( *initialize ) ();
+ void ( *finalize ) ();
+ void ( *update ) ();
+ void ( *draw ) ();
+ };
+
+
+
+ namespace Application
+ {
+ //private
+
+ enum InputMode
+ {
+ INPUT_MODE_DEVICE = 0,
+ INPUT_MODE_LOGGING,
+ INPUT_MODE_LOGGED,
+ };
+ //public
+ void initialize
+ (
+ const mof::tstring& appname ,
+ int width ,
+ int height ,
+ bool fullscreen ,
+ int frameInterval ,
+ int nUpdatingPerFrame,
+ InputMode input_mode,
+ bool enable_output_frame,
+ bool enable_output_audio
+ );
+ void finalize();
+ void run( Scene& scene );
+ InputMode input_mode();
+ void quit();
+ }
+
+
+}
-#include "mof/Board.hpp"\r
-#include "mof/Camera.hpp"\r
-#include "mof/private/GraphicsDeviceImpl.hpp"\r
-#include "mof/ConsoleIO.hpp"\r
-#include "mof/stream/Constant.hpp"\r
-\r
-struct mof::Board::Impl{\r
- std::shared_ptr<mof::Texture> pTexture;\r
- mof::Manipulator<mof::Matrix3D>::Handler worldMatrix;\r
- mof::Manipulator<mof::Color4f>::Handler color;\r
- mof::Manipulator<mof::Rectangle<float>>::Handler textureCoordinates;\r
- FrameNumber m_frame;\r
-\r
- Impl( )\r
- : \r
- worldMatrix(mof::makeConstantHandler(mof::Matrix3D::createIdentity())) ,\r
- textureCoordinates(mof::makeConstantHandler(mof::Rectangle<float>(0 , 0 , 1 , 1))) ,\r
- color(mof::makeConstantHandler(mof::Color4f(1 , 1 , 1))),\r
- m_frame(0)\r
- {\r
- }\r
-\r
- ~Impl(){}\r
-};\r
-\r
-\r
-\r
-mof::Board::Board() : m_pImpl(new Impl()){\r
-}\r
-\r
-mof::Board::~Board(){\r
-}\r
- \r
-\r
-\r
-\r
-void mof::Board::setWorldMatrix(const mof::Manipulator<mof::Matrix3D>::Handler& handler){\r
- m_pImpl->worldMatrix = handler;\r
-\r
-}\r
-\r
-mof::Matrix3D mof::Board::getWorldMatrix() const\r
-{\r
- return m_pImpl->worldMatrix->value(m_pImpl->m_frame);\r
-}\r
-\r
-mof::Vector3D mof::Board::getPosition() const\r
-{\r
- mof::Matrix3D m = getWorldMatrix();\r
- return mof::Vector3D(m.at(3, 0), m.at(3, 1), m.at(3, 2) );\r
-}\r
-\r
-\r
-\r
-void mof::Board::setColor(const mof::Manipulator<mof::Color4f>::Handler& handler){\r
- m_pImpl->color = handler;\r
-}\r
-\r
-\r
-\r
-\r
-void mof::Board::setTextureCoordinates(const mof::Manipulator<mof::Rectangle<float>>::Handler& handler){\r
- m_pImpl->textureCoordinates = handler;\r
-}\r
-\r
-void mof::Board::setTextureCoordinates(const mof::Rectangle<float>& coordinates){\r
- setTextureCoordinates(mof::makeConstantHandler(coordinates));\r
-}\r
-\r
-void mof::Board::setTexture( const std::shared_ptr<mof::Texture>& pTexture ){\r
- m_pImpl->pTexture = pTexture;\r
-}\r
-\r
-\r
-bool mof::Board::isVisible() const{\r
- return true;\r
-}\r
-\r
-void mof::Board::update(){\r
- m_pImpl->m_frame++;\r
-}\r
-\r
-\r
-void mof::Board::draw() const{\r
- mof::FrameNumber frame = m_pImpl->m_frame;\r
- mof::Rectangle<float> textureCoordinates = m_pImpl->textureCoordinates->value(frame);\r
- mof::Color color = m_pImpl->color->value(frame).toColorCode();\r
- static mof::VertexXYZCUV vertices[4];\r
- vertices[0].x = -0.5f;\r
- vertices[0].y = 0.5f;\r
- vertices[0].z = 0;\r
- vertices[0].color = color;\r
- vertices[0].tu = textureCoordinates.beginX;\r
- vertices[0].tv = textureCoordinates.beginY;\r
-\r
- vertices[1].x = 0.5f;\r
- vertices[1].y = 0.5f;\r
- vertices[1].z = 0;\r
- vertices[1].color = color;\r
- vertices[1].tu = textureCoordinates.endX;\r
- vertices[1].tv = textureCoordinates.beginY;\r
-\r
- vertices[2].x = -0.5f;\r
- vertices[2].y = -0.5f;\r
- vertices[2].z = 0;\r
- vertices[2].color = color;\r
- vertices[2].tu = textureCoordinates.beginX;\r
- vertices[2].tv = textureCoordinates.endY;\r
-\r
- vertices[3].x = 0.5f;\r
- vertices[3].y = -0.5f;\r
- vertices[3].z = 0;\r
- vertices[3].color = color;\r
- vertices[3].tu = textureCoordinates.endX;\r
- vertices[3].tv = textureCoordinates.endY;\r
-\r
- mof::GraphicsDevice::setTexture(m_pImpl->pTexture.get());\r
- mof::GraphicsDevice::setWorldTransform(m_pImpl->worldMatrix->value(frame));\r
- mof::GraphicsDevice::drawVertexArray(vertices[0] , vertices[3] , PRIMITIVE_TYPE_TRIANGLESTRIP);\r
- \r
-}\r
-\r
-void mof::Board::setVisible(bool)\r
-{\r
- // TODO\r
-}\r
-\r
-void mof::Board::setFrameNumber(mof::FrameNumber fn)\r
-{\r
- m_pImpl->m_frame = fn;\r
-}\r
-\r
+#include "mof/Board.hpp"
+#include "mof/Camera.hpp"
+#include "mof/private/GraphicsDeviceImpl.hpp"
+#include "mof/ConsoleIO.hpp"
+#include "mof/stream/Constant.hpp"
+
+struct mof::Board::Impl{
+ std::shared_ptr<mof::Texture> pTexture;
+ mof::Manipulator<mof::Matrix3D>::Handler worldMatrix;
+ mof::Manipulator<mof::Color4f>::Handler color;
+ mof::Manipulator<mof::Rectangle<float>>::Handler textureCoordinates;
+ FrameNumber m_frame;
+
+ Impl( )
+ :
+ worldMatrix(mof::makeConstantHandler(mof::Matrix3D::createIdentity())) ,
+ textureCoordinates(mof::makeConstantHandler(mof::Rectangle<float>(0 , 0 , 1 , 1))) ,
+ color(mof::makeConstantHandler(mof::Color4f(1 , 1 , 1))),
+ m_frame(0)
+ {
+ }
+
+ ~Impl(){}
+};
+
+
+
+mof::Board::Board() : m_pImpl(new Impl()){
+}
+
+mof::Board::~Board(){
+}
+
+
+
+
+void mof::Board::setWorldMatrix(const mof::Manipulator<mof::Matrix3D>::Handler& handler){
+ m_pImpl->worldMatrix = handler;
+
+}
+
+mof::Matrix3D mof::Board::getWorldMatrix() const
+{
+ return m_pImpl->worldMatrix->value(m_pImpl->m_frame);
+}
+
+mof::Vector3D mof::Board::getPosition() const
+{
+ mof::Matrix3D m = getWorldMatrix();
+ return mof::Vector3D(m.at(3, 0), m.at(3, 1), m.at(3, 2) );
+}
+
+
+
+void mof::Board::setColor(const mof::Manipulator<mof::Color4f>::Handler& handler){
+ m_pImpl->color = handler;
+}
+
+
+
+
+void mof::Board::setTextureCoordinates(const mof::Manipulator<mof::Rectangle<float>>::Handler& handler){
+ m_pImpl->textureCoordinates = handler;
+}
+
+void mof::Board::setTextureCoordinates(const mof::Rectangle<float>& coordinates){
+ setTextureCoordinates(mof::makeConstantHandler(coordinates));
+}
+
+void mof::Board::setTexture( const std::shared_ptr<mof::Texture>& pTexture ){
+ m_pImpl->pTexture = pTexture;
+}
+
+
+bool mof::Board::isVisible() const{
+ return true;
+}
+
+void mof::Board::update(){
+ m_pImpl->m_frame++;
+}
+
+
+void mof::Board::draw() const{
+ mof::FrameNumber frame = m_pImpl->m_frame;
+ mof::Rectangle<float> textureCoordinates = m_pImpl->textureCoordinates->value(frame);
+ mof::Color color = m_pImpl->color->value(frame).toColorCode();
+ static mof::VertexXYZCUV vertices[4];
+ vertices[0].x = -0.5f;
+ vertices[0].y = 0.5f;
+ vertices[0].z = 0;
+ vertices[0].color = color;
+ vertices[0].tu = textureCoordinates.beginX;
+ vertices[0].tv = textureCoordinates.beginY;
+
+ vertices[1].x = 0.5f;
+ vertices[1].y = 0.5f;
+ vertices[1].z = 0;
+ vertices[1].color = color;
+ vertices[1].tu = textureCoordinates.endX;
+ vertices[1].tv = textureCoordinates.beginY;
+
+ vertices[2].x = -0.5f;
+ vertices[2].y = -0.5f;
+ vertices[2].z = 0;
+ vertices[2].color = color;
+ vertices[2].tu = textureCoordinates.beginX;
+ vertices[2].tv = textureCoordinates.endY;
+
+ vertices[3].x = 0.5f;
+ vertices[3].y = -0.5f;
+ vertices[3].z = 0;
+ vertices[3].color = color;
+ vertices[3].tu = textureCoordinates.endX;
+ vertices[3].tv = textureCoordinates.endY;
+
+ mof::GraphicsDevice::setTexture(m_pImpl->pTexture.get());
+ mof::GraphicsDevice::setWorldTransform(m_pImpl->worldMatrix->value(frame));
+ mof::GraphicsDevice::drawVertexArray(vertices[0] , vertices[3] , PRIMITIVE_TYPE_TRIANGLESTRIP);
+
+}
+
+void mof::Board::setVisible(bool)
+{
+ // TODO
+}
+
+void mof::Board::setFrameNumber(mof::FrameNumber fn)
+{
+ m_pImpl->m_frame = fn;
+}
+
-#ifndef BILLBOARD_HPP\r
-#define BILLBOARD_HPP\r
-\r
-#include "mof/Component3D.hpp"\r
-#include "mof/SceneGraph.hpp"\r
-#include "mof/Rectangle.hpp"\r
-#include "mof/Drawable.hpp"\r
-#include <boost/scoped_ptr.hpp>\r
-#include <memory>\r
-#include "mof/Texture.hpp"\r
-\r
-namespace mof{\r
- \r
-\r
-class Camera;\r
-\r
-class Board : public Component3D , public Drawable\r
- {\r
- struct Impl;\r
- boost::scoped_ptr<Impl> m_pImpl;\r
-\r
-public :\r
- typedef std::shared_ptr<Board> ptr;\r
- \r
- Board( );\r
- virtual ~Board();\r
-\r
- \r
- virtual void setWorldMatrix(const mof::Manipulator<mof::Matrix3D>::Handler& handler);\r
- mof::Matrix3D getWorldMatrix() const;\r
- mof::Vector3D getPosition() const;\r
- virtual void setTextureCoordinates(const mof::Manipulator<mof::Rectangle<float>>::Handler& handler);\r
- virtual void setTextureCoordinates(const mof::Rectangle<float>& coordinates);\r
- virtual void setTexture( const std::shared_ptr<mof::Texture>& pTexture );\r
-\r
- void setColor(const mof::Manipulator<mof::Color4f>::Handler& handler);\r
-\r
- virtual bool isVisible() const;\r
- virtual void update();\r
- virtual void draw() const;\r
- virtual void setVisible(bool visible);\r
- void setFrameNumber(FrameNumber fn);\r
-};\r
-\r
-}\r
-\r
-#endif\r
+#ifndef BILLBOARD_HPP
+#define BILLBOARD_HPP
+
+#include "mof/Component3D.hpp"
+#include "mof/SceneGraph.hpp"
+#include "mof/Rectangle.hpp"
+#include "mof/Drawable.hpp"
+#include <boost/scoped_ptr.hpp>
+#include <memory>
+#include "mof/Texture.hpp"
+
+namespace mof{
+
+
+class Camera;
+
+class Board : public Component3D , public Drawable
+ {
+ struct Impl;
+ boost::scoped_ptr<Impl> m_pImpl;
+
+public :
+ typedef std::shared_ptr<Board> ptr;
+
+ Board( );
+ virtual ~Board();
+
+
+ virtual void setWorldMatrix(const mof::Manipulator<mof::Matrix3D>::Handler& handler);
+ mof::Matrix3D getWorldMatrix() const;
+ mof::Vector3D getPosition() const;
+ virtual void setTextureCoordinates(const mof::Manipulator<mof::Rectangle<float>>::Handler& handler);
+ virtual void setTextureCoordinates(const mof::Rectangle<float>& coordinates);
+ virtual void setTexture( const std::shared_ptr<mof::Texture>& pTexture );
+
+ void setColor(const mof::Manipulator<mof::Color4f>::Handler& handler);
+
+ virtual bool isVisible() const;
+ virtual void update();
+ virtual void draw() const;
+ virtual void setVisible(bool visible);
+ void setFrameNumber(FrameNumber fn);
+};
+
+}
+
+#endif
-#include "mof/CSVFile.h"\r
-#include <exception>\r
-#include <stdlib.h>\r
-#include "mof/ConsoleIO.h"\r
-\r
-mof::CSVFile::CSVFile(mof::tstring& filename)\r
-: m_ifs(filename.c_str() , std::ios::in) , m_bufferSize(1024){\r
- if(!m_ifs)throw std::invalid_argument("can't open file");\r
- m_buffer = new TCHAR[m_bufferSize+1];//\92Ç\89Á\83k\83\8b\95¶\8e\9a\82Ì\82½\82ß\82É\82P\82Â\97]\95ª\82É\8am\95Û\r
- m_buffer[m_bufferSize] = '\0';\r
- m_topOfBuffer = m_bufferSize-1;\r
- m_hasBufferedValue = false;\r
- m_ignoreNL = true;\r
- m_pBufferedValue = NULL;\r
- nextLine();\r
-}\r
-\r
-\r
-\r
-mof::CSVFile::CSVFile(const TCHAR* filename)\r
-: m_ifs(filename , std::ios::in) , m_bufferSize(1024){\r
- if(!m_ifs)throw std::invalid_argument("can't open file");\r
- m_buffer = new TCHAR[m_bufferSize+1];//\92Ç\89Á\83k\83\8b\95¶\8e\9a\82Ì\82½\82ß\82É\82P\82Â\97]\95ª\82É\8am\95Û\r
- m_buffer[m_bufferSize] = '\0';\r
- m_topOfBuffer = m_bufferSize-1;\r
- m_hasBufferedValue = false;\r
- m_ignoreNL = true;\r
- m_pBufferedValue = NULL;\r
-\r
-\r
- nextLine();\r
-}\r
-\r
-\r
-mof::CSVFile::~CSVFile(){\r
- delete[] m_buffer;\r
- \r
-}\r
-\r
-bool mof::CSVFile::hasNextValue(){\r
- if(m_hasBufferedValue)return true;//Value\82Ì\83o\83b\83t\83@\82ª\82 \82é\r
- \r
- //if(m_topOfBuffer == m_bufferSize && !nextLine())return false;//\82±\82ê\82ª\82È\82¢\82Æ\83o\83O\82é\82ª\81A\89º\82Ì\83\8b\81[\83`\83\93\82Æ\88ê\96{\89»\82Å\82«\82È\82¢\82©\r
-\r
- while(!updateNextValue() && m_ignoreNL){\r
- if( m_topOfBuffer >= m_bufferSize || m_buffer[m_topOfBuffer] == '\0'){\r
- //\83o\83b\83t\83@\82ð\93Ç\82Ý\8d\9e\82Þ\r
- m_topOfBuffer = m_ifs.getline(m_buffer , m_bufferSize) ? 0 : m_bufferSize;\r
- if(m_topOfBuffer >= m_bufferSize)return false;\r
- }\r
- }\r
- return m_pBufferedValue != NULL;\r
-\r
- //if(m_topOfBuffer == m_bufferSize)\r
-}\r
-\r
-\r
-\r
-const TCHAR* mof::CSVFile::getNextValue(){\r
- if(m_hasBufferedValue && hasNextValue()){//Value\82Ì\83o\83b\83t\83@\82ª\82 \82ê\82Î\82»\82ê\82ð\8eg\82¤\r
- m_hasBufferedValue = false;\r
- return m_pBufferedValue;\r
- }\r
-\r
- //\8e\9f\82Ì\92l\82ª\82È\82¢\8fê\8d\87\r
- return NULL;\r
-\r
-}\r
-\r
-\r
-\r
-\r
-bool mof::CSVFile::nextLine(){\r
- m_hasBufferedValue = false;\r
- m_topOfBuffer = m_ifs.getline(m_buffer , m_bufferSize) ? 0 : m_bufferSize;\r
- return m_topOfBuffer == 0;\r
-}\r
-\r
-\r
-void mof::CSVFile::setIgnoreNL(bool ignore){\r
- m_ignoreNL = ignore;\r
-}\r
-\r
-\r
-\r
-bool mof::CSVFile::updateNextValue(){\r
-\r
- if(m_topOfBuffer == m_bufferSize){\r
- //\92l\82È\82µ\r
- m_pBufferedValue = NULL;\r
- m_hasBufferedValue = false;\r
- return false;\r
- }\r
-\r
- enum{\r
- ISPACE , ICOMMA , IQUOTE , IWORD , IEOF\r
- };\r
- enum{\r
- S , NQV , QV , NQE , QE , QVQ ,\r
- //\8f\89\8aú\8fó\91Ô\81A\94ñ\83N\83H\81[\83g\92l\81A\83N\83H\81[\83g\92l\81A\94ñ\83N\83H\81[\83g\83G\83X\83P\81[\83v\81A\83N\83H\81[\83g\83G\83X\83P\81[\83v\81A\83N\83H\81[\83g\82Å\88Í\82Ü\82ê\82½\92l\r
- _NULL , _EMP , _V , _ERR , _QVQ\r
- //\92l\82È\82µ\81A\8bó\95¶\8e\9a\97ñ\81A\92l\81A\83G\83\89\81[\81A\83N\83H\81[\83g\82Å\88Í\82Ü\82ê\82½\92l\r
- };\r
- static const int stateChangeTable[][5] = {\r
- { S , _EMP , QV , NQV , _NULL } ,\r
- { NQV , _V , NQE , NQV , _V} ,\r
- { QV , QV , QE , QV , _ERR} ,\r
- { _ERR , _ERR , NQV , _ERR , _ERR} ,\r
- { QVQ , _QVQ , QV , _ERR , _QVQ} ,\r
- { QVQ , _QVQ , _ERR , _ERR , _QVQ}\r
- \r
- };\r
- \r
-\r
- int state = S;\r
- int lastInput = IEOF;\r
- int begin = m_topOfBuffer;\r
- while( state < _NULL ){//\8fI\97¹\8fó\91Ô\82É\82È\82Á\82½\82ç\94²\82¯\82é\r
- lastInput = IWORD;\r
- if( m_buffer[m_topOfBuffer] == '\0'){\r
- lastInput = IEOF;\r
- }\r
- else if( m_buffer[m_topOfBuffer] == ' ')lastInput = ISPACE;\r
- else if(m_buffer[m_topOfBuffer] == '"')lastInput = IQUOTE;\r
- else if(m_buffer[m_topOfBuffer] == ',')lastInput = ICOMMA;\r
- state = stateChangeTable[state][lastInput];\r
- m_topOfBuffer++;\r
- }\r
- m_hasBufferedValue = true;\r
-\r
- if(state == _NULL){\r
- //\92l\82È\82µ\r
- m_pBufferedValue = NULL;\r
- m_topOfBuffer = m_bufferSize;\r
- m_hasBufferedValue = false;\r
- return false;\r
- }\r
- else if(state == _EMP){\r
- m_pBufferedValue = "";\r
- return true;\r
- }\r
- else if(state == _V || state == _QVQ){\r
- int end = m_topOfBuffer-2;\r
- //\91O\8cã\82©\82ç\83g\83\8a\83~\83\93\83O\r
- while(m_buffer[begin] == ' ')begin++;\r
- while(m_buffer[end] == ' ' )end--;\r
-\r
- if(state == _QVQ){\r
- //\97¼\92[\82Ì\81h\82ð\8f\9c\8b\8e\r
- begin++;\r
- end--;\r
- }\r
- \r
- //"\82Ì\83G\83X\83P\81[\83v\8f\88\97\9d\r
- //\8cã\82ë\82©\82ç\8c©\82Ä\82¢\82Á\82Ä"\82ª\82 \82ê\82Î\83R\83s\81[\82·\82é\r
- m_buffer[end+1] = '\0';\r
- for(int tmp = end ; begin < tmp ; tmp--){\r
- if(m_buffer[tmp] == '"'){\r
- memmove(m_buffer + tmp-1 , m_buffer+ tmp , sizeof(TCHAR)*(end-tmp+2));\r
- tmp--;\r
- }\r
-\r
- }\r
- m_pBufferedValue = m_buffer + begin;\r
- return true;\r
- }\r
- else {\r
- //\83G\83\89\81[(\8e\9f\82Ì,\82Ü\82Å\93Ç\82Ý\90i\82ß\82é) m_buffer\82Ì\96\96\94ö\82Í\83k\83\8b\95¶\8e\9a\82È\82Ì\82Å\95K\82¸\92â\8e~\82·\82é\r
- while(lastInput != ',' && lastInput != '\0'){\r
- lastInput = m_buffer[++m_topOfBuffer];\r
- }\r
- m_topOfBuffer++;\r
- m_pBufferedValue = "ERROR";\r
- return true;\r
- }\r
- \r
-}\r
+#include "mof/CSVFile.h"
+#include <exception>
+#include <stdlib.h>
+#include "mof/ConsoleIO.h"
+
+mof::CSVFile::CSVFile(mof::tstring& filename)
+: m_ifs(filename.c_str() , std::ios::in) , m_bufferSize(1024){
+ if(!m_ifs)throw std::invalid_argument("can't open file");
+ m_buffer = new TCHAR[m_bufferSize+1];//\92Ç\89Á\83k\83\8b\95¶\8e\9a\82Ì\82½\82ß\82É\82P\82Â\97]\95ª\82É\8am\95Û
+ m_buffer[m_bufferSize] = '\0';
+ m_topOfBuffer = m_bufferSize-1;
+ m_hasBufferedValue = false;
+ m_ignoreNL = true;
+ m_pBufferedValue = NULL;
+ nextLine();
+}
+
+
+
+mof::CSVFile::CSVFile(const TCHAR* filename)
+: m_ifs(filename , std::ios::in) , m_bufferSize(1024){
+ if(!m_ifs)throw std::invalid_argument("can't open file");
+ m_buffer = new TCHAR[m_bufferSize+1];//\92Ç\89Á\83k\83\8b\95¶\8e\9a\82Ì\82½\82ß\82É\82P\82Â\97]\95ª\82É\8am\95Û
+ m_buffer[m_bufferSize] = '\0';
+ m_topOfBuffer = m_bufferSize-1;
+ m_hasBufferedValue = false;
+ m_ignoreNL = true;
+ m_pBufferedValue = NULL;
+
+
+ nextLine();
+}
+
+
+mof::CSVFile::~CSVFile(){
+ delete[] m_buffer;
+
+}
+
+bool mof::CSVFile::hasNextValue(){
+ if(m_hasBufferedValue)return true;//Value\82Ì\83o\83b\83t\83@\82ª\82 \82é
+
+ //if(m_topOfBuffer == m_bufferSize && !nextLine())return false;//\82±\82ê\82ª\82È\82¢\82Æ\83o\83O\82é\82ª\81A\89º\82Ì\83\8b\81[\83`\83\93\82Æ\88ê\96{\89»\82Å\82«\82È\82¢\82©
+
+ while(!updateNextValue() && m_ignoreNL){
+ if( m_topOfBuffer >= m_bufferSize || m_buffer[m_topOfBuffer] == '\0'){
+ //\83o\83b\83t\83@\82ð\93Ç\82Ý\8d\9e\82Þ
+ m_topOfBuffer = m_ifs.getline(m_buffer , m_bufferSize) ? 0 : m_bufferSize;
+ if(m_topOfBuffer >= m_bufferSize)return false;
+ }
+ }
+ return m_pBufferedValue != NULL;
+
+ //if(m_topOfBuffer == m_bufferSize)
+}
+
+
+
+const TCHAR* mof::CSVFile::getNextValue(){
+ if(m_hasBufferedValue && hasNextValue()){//Value\82Ì\83o\83b\83t\83@\82ª\82 \82ê\82Î\82»\82ê\82ð\8eg\82¤
+ m_hasBufferedValue = false;
+ return m_pBufferedValue;
+ }
+
+ //\8e\9f\82Ì\92l\82ª\82È\82¢\8fê\8d\87
+ return NULL;
+
+}
+
+
+
+
+bool mof::CSVFile::nextLine(){
+ m_hasBufferedValue = false;
+ m_topOfBuffer = m_ifs.getline(m_buffer , m_bufferSize) ? 0 : m_bufferSize;
+ return m_topOfBuffer == 0;
+}
+
+
+void mof::CSVFile::setIgnoreNL(bool ignore){
+ m_ignoreNL = ignore;
+}
+
+
+
+bool mof::CSVFile::updateNextValue(){
+
+ if(m_topOfBuffer == m_bufferSize){
+ //\92l\82È\82µ
+ m_pBufferedValue = NULL;
+ m_hasBufferedValue = false;
+ return false;
+ }
+
+ enum{
+ ISPACE , ICOMMA , IQUOTE , IWORD , IEOF
+ };
+ enum{
+ S , NQV , QV , NQE , QE , QVQ ,
+ //\8f\89\8aú\8fó\91Ô\81A\94ñ\83N\83H\81[\83g\92l\81A\83N\83H\81[\83g\92l\81A\94ñ\83N\83H\81[\83g\83G\83X\83P\81[\83v\81A\83N\83H\81[\83g\83G\83X\83P\81[\83v\81A\83N\83H\81[\83g\82Å\88Í\82Ü\82ê\82½\92l
+ _NULL , _EMP , _V , _ERR , _QVQ
+ //\92l\82È\82µ\81A\8bó\95¶\8e\9a\97ñ\81A\92l\81A\83G\83\89\81[\81A\83N\83H\81[\83g\82Å\88Í\82Ü\82ê\82½\92l
+ };
+ static const int stateChangeTable[][5] = {
+ { S , _EMP , QV , NQV , _NULL } ,
+ { NQV , _V , NQE , NQV , _V} ,
+ { QV , QV , QE , QV , _ERR} ,
+ { _ERR , _ERR , NQV , _ERR , _ERR} ,
+ { QVQ , _QVQ , QV , _ERR , _QVQ} ,
+ { QVQ , _QVQ , _ERR , _ERR , _QVQ}
+
+ };
+
+
+ int state = S;
+ int lastInput = IEOF;
+ int begin = m_topOfBuffer;
+ while( state < _NULL ){//\8fI\97¹\8fó\91Ô\82É\82È\82Á\82½\82ç\94²\82¯\82é
+ lastInput = IWORD;
+ if( m_buffer[m_topOfBuffer] == '\0'){
+ lastInput = IEOF;
+ }
+ else if( m_buffer[m_topOfBuffer] == ' ')lastInput = ISPACE;
+ else if(m_buffer[m_topOfBuffer] == '"')lastInput = IQUOTE;
+ else if(m_buffer[m_topOfBuffer] == ',')lastInput = ICOMMA;
+ state = stateChangeTable[state][lastInput];
+ m_topOfBuffer++;
+ }
+ m_hasBufferedValue = true;
+
+ if(state == _NULL){
+ //\92l\82È\82µ
+ m_pBufferedValue = NULL;
+ m_topOfBuffer = m_bufferSize;
+ m_hasBufferedValue = false;
+ return false;
+ }
+ else if(state == _EMP){
+ m_pBufferedValue = "";
+ return true;
+ }
+ else if(state == _V || state == _QVQ){
+ int end = m_topOfBuffer-2;
+ //\91O\8cã\82©\82ç\83g\83\8a\83~\83\93\83O
+ while(m_buffer[begin] == ' ')begin++;
+ while(m_buffer[end] == ' ' )end--;
+
+ if(state == _QVQ){
+ //\97¼\92[\82Ì\81h\82ð\8f\9c\8b\8e
+ begin++;
+ end--;
+ }
+
+ //"\82Ì\83G\83X\83P\81[\83v\8f\88\97\9d
+ //\8cã\82ë\82©\82ç\8c©\82Ä\82¢\82Á\82Ä"\82ª\82 \82ê\82Î\83R\83s\81[\82·\82é
+ m_buffer[end+1] = '\0';
+ for(int tmp = end ; begin < tmp ; tmp--){
+ if(m_buffer[tmp] == '"'){
+ memmove(m_buffer + tmp-1 , m_buffer+ tmp , sizeof(TCHAR)*(end-tmp+2));
+ tmp--;
+ }
+
+ }
+ m_pBufferedValue = m_buffer + begin;
+ return true;
+ }
+ else {
+ //\83G\83\89\81[(\8e\9f\82Ì,\82Ü\82Å\93Ç\82Ý\90i\82ß\82é) m_buffer\82Ì\96\96\94ö\82Í\83k\83\8b\95¶\8e\9a\82È\82Ì\82Å\95K\82¸\92â\8e~\82·\82é
+ while(lastInput != ',' && lastInput != '\0'){
+ lastInput = m_buffer[++m_topOfBuffer];
+ }
+ m_topOfBuffer++;
+ m_pBufferedValue = "ERROR";
+ return true;
+ }
+
+}
-#pragma once\r
-#include "mof/tstring.h"\r
-#include <fstream>\r
-\r
-namespace mof{\r
-\r
- class CSVFile{\r
- //bool m_trimming;\r
- std::basic_ifstream<TCHAR> m_ifs;\r
- TCHAR* m_buffer;\r
- const int m_bufferSize;\r
- int m_topOfBuffer;\r
- bool m_hasBufferedValue;\r
- TCHAR* m_pBufferedValue;\r
- bool m_ignoreNL;\r
- bool updateNextValue();\r
- public:\r
- CSVFile(mof::tstring& filename);\r
- CSVFile(const TCHAR* filename);\r
- ~CSVFile();\r
- \r
- bool hasNextValue();\r
- const TCHAR* getNextValue();\r
- bool nextLine();\r
- void setIgnoreNL(bool ignore);\r
- };\r
-\r
+#pragma once
+#include "mof/tstring.h"
+#include <fstream>
+
+namespace mof{
+
+ class CSVFile{
+ //bool m_trimming;
+ std::basic_ifstream<TCHAR> m_ifs;
+ TCHAR* m_buffer;
+ const int m_bufferSize;
+ int m_topOfBuffer;
+ bool m_hasBufferedValue;
+ TCHAR* m_pBufferedValue;
+ bool m_ignoreNL;
+ bool updateNextValue();
+ public:
+ CSVFile(mof::tstring& filename);
+ CSVFile(const TCHAR* filename);
+ ~CSVFile();
+
+ bool hasNextValue();
+ const TCHAR* getNextValue();
+ bool nextLine();
+ void setIgnoreNL(bool ignore);
+ };
+
};
\ No newline at end of file
-#include "mof/Camera.hpp"\r
-#include "mof/streams.hpp"\r
-#include "mof/ConsoleIO.hpp"\r
-#include <d3d9.h>\r
-\r
-struct mof::Camera::Impl{\r
- mof::Manipulator<mof::Vector3D>::Handler eye;\r
- mof::Manipulator<mof::Vector3D>::Handler center;\r
- mof::Manipulator<mof::Vector3D>::Handler up;\r
- mof::FrameNumber frame;\r
-\r
- Impl(\r
- const mof::Manipulator<mof::Vector3D>::Handler& eye_ ,\r
- const mof::Manipulator<mof::Vector3D>::Handler& center_ ,\r
- const mof::Manipulator<mof::Vector3D>::Handler& up_ \r
- ) : eye(eye_) , center(center_) , up(up_) , frame(0){}\r
-\r
- ~Impl(){}\r
-};\r
-\r
-\r
-mof::Camera::Camera(\r
- const mof::Manipulator<mof::Vector3D>::Handler& eye , \r
- const mof::Manipulator<mof::Vector3D>::Handler& center ,\r
- const mof::Manipulator<mof::Vector3D>::Handler& up \r
- ) : m_pImpl(new Impl(eye , center , up)){\r
-}\r
-\r
-mof::Camera::Camera(\r
- const mof::Vector3D& eye , \r
- const mof::Vector3D& center , \r
- const mof::Vector3D& up\r
- ) : m_pImpl(new Impl(\r
- mof::makeConstantHandler(eye) ,\r
- mof::makeConstantHandler(center) ,\r
- mof::makeConstantHandler(up) \r
- )){\r
-}\r
-\r
-mof::Camera::~Camera(){\r
-}\r
-\r
-mof::Matrix3D mof::Camera::getViewMatrix() const{\r
- return mof::Matrix3D::createLookAtLH(\r
- m_pImpl->eye->value(m_pImpl->frame) ,\r
- m_pImpl->center->value(m_pImpl->frame) ,\r
- m_pImpl->up->value(m_pImpl->frame) \r
- );\r
-}\r
-\r
-void mof::Camera::setEye(const mof::Manipulator<mof::Vector3D>::Handler& eye){\r
- m_pImpl->eye = eye;\r
-}\r
-\r
-\r
-void mof::Camera::setEye(const mof::Vector3D& eye){\r
- m_pImpl->eye = mof::makeConstantHandler(eye);\r
-}\r
-\r
-void mof::Camera::setCenter(const mof::Manipulator<mof::Vector3D>::Handler& center){\r
- m_pImpl->center = center;\r
-}\r
-\r
-\r
-void mof::Camera::setCenter(const mof::Vector3D& center){\r
- m_pImpl->center = mof::makeConstantHandler(center);\r
-}\r
-\r
-\r
-void mof::Camera::setUp(const mof::Manipulator<mof::Vector3D>::Handler& up){\r
- m_pImpl->up = up;\r
-}\r
-\r
-\r
-void mof::Camera::setUp(const mof::Vector3D& up){\r
- m_pImpl->up = mof::makeConstantHandler(up);\r
-}\r
-\r
- \r
-mof::Vector3D mof::Camera::getEye() const{\r
- return m_pImpl->eye->value(m_pImpl->frame);\r
-}\r
-\r
- \r
-mof::Vector3D mof::Camera::getCenter() const{\r
- return m_pImpl->center->value(m_pImpl->frame);\r
-}\r
-\r
- \r
-mof::Vector3D mof::Camera::getUp() const{\r
- return m_pImpl->up->value(m_pImpl->frame);\r
-}\r
-\r
-\r
-\r
-\r
-void mof::Camera::setFrameNumber(mof::FrameNumber frame){\r
- m_pImpl->frame = frame;\r
-}\r
-\r
-\r
-void mof::Camera::update(){\r
- m_pImpl->frame++;\r
-}\r
-\r
-\r
+#include "mof/Camera.hpp"
+#include "mof/streams.hpp"
+#include "mof/ConsoleIO.hpp"
+#include <d3d9.h>
+
+struct mof::Camera::Impl{
+ mof::Manipulator<mof::Vector3D>::Handler eye;
+ mof::Manipulator<mof::Vector3D>::Handler center;
+ mof::Manipulator<mof::Vector3D>::Handler up;
+ mof::FrameNumber frame;
+
+ Impl(
+ const mof::Manipulator<mof::Vector3D>::Handler& eye_ ,
+ const mof::Manipulator<mof::Vector3D>::Handler& center_ ,
+ const mof::Manipulator<mof::Vector3D>::Handler& up_
+ ) : eye(eye_) , center(center_) , up(up_) , frame(0){}
+
+ ~Impl(){}
+};
+
+
+mof::Camera::Camera(
+ const mof::Manipulator<mof::Vector3D>::Handler& eye ,
+ const mof::Manipulator<mof::Vector3D>::Handler& center ,
+ const mof::Manipulator<mof::Vector3D>::Handler& up
+ ) : m_pImpl(new Impl(eye , center , up)){
+}
+
+mof::Camera::Camera(
+ const mof::Vector3D& eye ,
+ const mof::Vector3D& center ,
+ const mof::Vector3D& up
+ ) : m_pImpl(new Impl(
+ mof::makeConstantHandler(eye) ,
+ mof::makeConstantHandler(center) ,
+ mof::makeConstantHandler(up)
+ )){
+}
+
+mof::Camera::~Camera(){
+}
+
+mof::Matrix3D mof::Camera::getViewMatrix() const{
+ return mof::Matrix3D::createLookAtLH(
+ m_pImpl->eye->value(m_pImpl->frame) ,
+ m_pImpl->center->value(m_pImpl->frame) ,
+ m_pImpl->up->value(m_pImpl->frame)
+ );
+}
+
+void mof::Camera::setEye(const mof::Manipulator<mof::Vector3D>::Handler& eye){
+ m_pImpl->eye = eye;
+}
+
+
+void mof::Camera::setEye(const mof::Vector3D& eye){
+ m_pImpl->eye = mof::makeConstantHandler(eye);
+}
+
+void mof::Camera::setCenter(const mof::Manipulator<mof::Vector3D>::Handler& center){
+ m_pImpl->center = center;
+}
+
+
+void mof::Camera::setCenter(const mof::Vector3D& center){
+ m_pImpl->center = mof::makeConstantHandler(center);
+}
+
+
+void mof::Camera::setUp(const mof::Manipulator<mof::Vector3D>::Handler& up){
+ m_pImpl->up = up;
+}
+
+
+void mof::Camera::setUp(const mof::Vector3D& up){
+ m_pImpl->up = mof::makeConstantHandler(up);
+}
+
+
+mof::Vector3D mof::Camera::getEye() const{
+ return m_pImpl->eye->value(m_pImpl->frame);
+}
+
+
+mof::Vector3D mof::Camera::getCenter() const{
+ return m_pImpl->center->value(m_pImpl->frame);
+}
+
+
+mof::Vector3D mof::Camera::getUp() const{
+ return m_pImpl->up->value(m_pImpl->frame);
+}
+
+
+
+
+void mof::Camera::setFrameNumber(mof::FrameNumber frame){
+ m_pImpl->frame = frame;
+}
+
+
+void mof::Camera::update(){
+ m_pImpl->frame++;
+}
+
+
-#ifndef MOF_CAMERA_HPP\r
-#define mOF_CAMERA_HPP\r
-#include "mof/Vector3D.hpp"\r
-#include "mof/stream/Manipulator.hpp"\r
-#include <boost/scoped_ptr.hpp>\r
-#include "mof/Matrix3D.hpp"\r
-\r
-\r
-namespace mof{\r
-\r
-\r
- class Camera\r
- {\r
- struct Impl;\r
- boost::scoped_ptr<Impl> m_pImpl;\r
-\r
- public:\r
- typedef std::shared_ptr<Camera> ptr;\r
- Camera(\r
- const mof::Manipulator<mof::Vector3D>::Handler& eye , \r
- const mof::Manipulator<mof::Vector3D>::Handler& center ,\r
- const mof::Manipulator<mof::Vector3D>::Handler& up );\r
- Camera(const mof::Vector3D& eye , const mof::Vector3D& center , const mof::Vector3D& up);\r
- virtual ~Camera();\r
-\r
- mof::Matrix3D getViewMatrix() const;\r
-\r
- void setEye(const mof::Manipulator<mof::Vector3D>::Handler& eye);\r
- void setEye(const mof::Vector3D& eye);\r
- void setCenter(const mof::Manipulator<mof::Vector3D>::Handler& center);\r
- void setCenter(const mof::Vector3D& center);\r
- void setUp(const mof::Manipulator<mof::Vector3D>::Handler& up);\r
- void setUp(const mof::Vector3D& up);\r
-\r
- mof::Vector3D getEye() const; \r
- mof::Vector3D getCenter() const; \r
- mof::Vector3D getUp() const; \r
-\r
- virtual void setFrameNumber(mof::FrameNumber frame);\r
- virtual void update();\r
-\r
- };\r
-\r
-}\r
-\r
-#endif\r
+#ifndef MOF_CAMERA_HPP
+#define mOF_CAMERA_HPP
+#include "mof/Vector3D.hpp"
+#include "mof/stream/Manipulator.hpp"
+#include <boost/scoped_ptr.hpp>
+#include "mof/Matrix3D.hpp"
+
+
+namespace mof{
+
+
+ class Camera
+ {
+ struct Impl;
+ boost::scoped_ptr<Impl> m_pImpl;
+
+ public:
+ typedef std::shared_ptr<Camera> ptr;
+ Camera(
+ const mof::Manipulator<mof::Vector3D>::Handler& eye ,
+ const mof::Manipulator<mof::Vector3D>::Handler& center ,
+ const mof::Manipulator<mof::Vector3D>::Handler& up );
+ Camera(const mof::Vector3D& eye , const mof::Vector3D& center , const mof::Vector3D& up);
+ virtual ~Camera();
+
+ mof::Matrix3D getViewMatrix() const;
+
+ void setEye(const mof::Manipulator<mof::Vector3D>::Handler& eye);
+ void setEye(const mof::Vector3D& eye);
+ void setCenter(const mof::Manipulator<mof::Vector3D>::Handler& center);
+ void setCenter(const mof::Vector3D& center);
+ void setUp(const mof::Manipulator<mof::Vector3D>::Handler& up);
+ void setUp(const mof::Vector3D& up);
+
+ mof::Vector3D getEye() const;
+ mof::Vector3D getCenter() const;
+ mof::Vector3D getUp() const;
+
+ virtual void setFrameNumber(mof::FrameNumber frame);
+ virtual void update();
+
+ };
+
+}
+
+#endif
-#include "mof/Captor.hpp"\r
-#include "mof/private/GraphicsDeviceImpl.hpp"\r
-#include "mof/FilePath.hpp"\r
-#include "mof/ConsoleIO.hpp"\r
-#include <sstream>\r
-\r
-\r
-mof::Captor::Captor(const mof::tstring& output)\r
-: m_output(output) \r
-{\r
- m_num = 0;\r
-}\r
-\r
-mof::Captor::~Captor(){\r
-\r
-}\r
-\r
-bool mof::Captor::capture(){\r
- mof::otstringstream os;\r
- os << m_output.c_str() << _T("/") << m_num << _T(".jpg");\r
- return capture(os.str().c_str());\r
-}\r
-\r
-\r
-\r
-bool mof::Captor::capture(const mof::tstring& filename){\r
- \r
- LPDIRECT3DDEVICE9 pDevice = mof::GraphicsDevice::getRawDevice();\r
- \r
- LPDIRECT3DSURFACE9 pBackBuffer;\r
- HRESULT hr = pDevice->GetBackBuffer(0 , 0 , D3DBACKBUFFER_TYPE_MONO , &pBackBuffer);\r
- if(FAILED(hr))throw std::runtime_error("Failed --- GetBackBuffer");\r
- D3DSURFACE_DESC desc;\r
- pBackBuffer->GetDesc(&desc);\r
-\r
- hr = D3DXSaveSurfaceToFile(\r
- filename.c_str() , D3DXIFF_JPG , pBackBuffer ,\r
- NULL , NULL);\r
- pBackBuffer->Release();\r
- if(FAILED(hr)){\r
- \r
- throw std::runtime_error("Failed -- D3DXSaveSurfaceToFile");\r
- }\r
- m_num++;\r
- return true;\r
- \r
-\r
-}\r
+#include "mof/Captor.hpp"
+#include "mof/private/GraphicsDeviceImpl.hpp"
+#include "mof/FilePath.hpp"
+#include "mof/ConsoleIO.hpp"
+#include <sstream>
+
+
+mof::Captor::Captor(const mof::tstring& output)
+: m_output(output)
+{
+ m_num = 0;
+}
+
+mof::Captor::~Captor(){
+
+}
+
+bool mof::Captor::capture(){
+ mof::otstringstream os;
+ os << m_output.c_str() << _T("/") << m_num << _T(".jpg");
+ return capture(os.str().c_str());
+}
+
+
+
+bool mof::Captor::capture(const mof::tstring& filename){
+
+ LPDIRECT3DDEVICE9 pDevice = mof::GraphicsDevice::getRawDevice();
+
+ LPDIRECT3DSURFACE9 pBackBuffer;
+ HRESULT hr = pDevice->GetBackBuffer(0 , 0 , D3DBACKBUFFER_TYPE_MONO , &pBackBuffer);
+ if(FAILED(hr))throw std::runtime_error("Failed --- GetBackBuffer");
+ D3DSURFACE_DESC desc;
+ pBackBuffer->GetDesc(&desc);
+
+ hr = D3DXSaveSurfaceToFile(
+ filename.c_str() , D3DXIFF_JPG , pBackBuffer ,
+ NULL , NULL);
+ pBackBuffer->Release();
+ if(FAILED(hr)){
+
+ throw std::runtime_error("Failed -- D3DXSaveSurfaceToFile");
+ }
+ m_num++;
+ return true;
+
+
+}
-#pragma once\r
-#include "mof/tstring.hpp"\r
-namespace mof{\r
-\r
- class Captor\r
- {\r
- mof::tstring m_output;\r
- int m_num;\r
-\r
- public :\r
- Captor( const mof::tstring& output);\r
- ~Captor();\r
- bool capture();\r
- bool capture(const mof::tstring& filename);\r
-\r
- };\r
-\r
-}\r
+#pragma once
+#include "mof/tstring.hpp"
+namespace mof{
+
+ class Captor
+ {
+ mof::tstring m_output;
+ int m_num;
+
+ public :
+ Captor( const mof::tstring& output);
+ ~Captor();
+ bool capture();
+ bool capture(const mof::tstring& filename);
+
+ };
+
+}
-#include "mof/Color.hpp"\r
-#include <d3dx9.h>\r
-#include "mof/ConsoleIO.hpp"\r
-#include "mof/tstring.hpp"\r
-\r
-\r
-mof::Color4f::Color4f() : \r
- alpha(0) , red(1) , green(1) , blue(1)\r
-{\r
-}\r
-\r
-mof::Color4f::Color4f(float alpha_ , float red_ , float green_ , float blue_) : \r
- alpha(alpha_) , red(red_) , green(green_) , blue(blue_)\r
-{\r
-}\r
-\r
-mof::Color4f::Color4f( float red_ , float green_ , float blue_) : \r
- alpha(1) , red(red_) , green(green_) , blue(blue_) \r
-{\r
-}\r
-\r
-mof::Color4f::Color4f(mof::Color color) : \r
- alpha(static_cast<float>(getAlpha(color)) / 255) ,\r
- red(static_cast<float>(getRed(color)) / 255) , \r
- green(static_cast<float>(getGreen(color)) / 255) ,\r
- blue(static_cast<float>(getBlue(color)) / 255 )\r
-{\r
-}\r
-\r
-mof::Color mof::Color4f::toColorCode() const{\r
- return createColor(\r
- static_cast<ColorChannel>(alpha * 255) ,\r
- static_cast<ColorChannel>(red * 255) ,\r
- static_cast<ColorChannel>(green * 255) ,\r
- static_cast<ColorChannel>(blue * 255) \r
- );\r
-}\r
-\r
-mof::Color4f mof::Color4f::operator +(const mof::Color4f& rhs) const{\r
- return mof::Color4f(\r
- alpha + rhs.alpha , \r
- red + rhs.red ,\r
- green + rhs.green ,\r
- blue + rhs.blue );\r
-}\r
-\r
-mof::Color4f mof::Color4f::operator -(const mof::Color4f& rhs) const{\r
- return mof::Color4f(\r
- alpha - rhs.alpha , \r
- red - rhs.red ,\r
- green - rhs.green ,\r
- blue - rhs.blue );\r
-}\r
-\r
-mof::Color4f mof::Color4f::operator *(const Color4f& color ) const\r
-{\r
- return mof::Color4f(color.alpha * alpha , color.red * red , color.green * green , color.blue * blue );\r
-}\r
-\r
-mof::Color4f mof::operator *(const Color4f& color , float f){\r
- return mof::Color4f(color.alpha * f , color.red * f , color.green * f , color.blue * f);\r
-}\r
- \r
-mof::Color4f mof::operator *(float f , const mof::Color4f & color){\r
- return mof::Color4f(color.alpha * f , color.red * f , color.green * f , color.blue * f);\r
-}\r
-\r
-\r
-\r
-unsigned char hex2Decimal(const TCHAR* code){\r
- unsigned char a = *code;\r
- if(a < '0')return 0;//error\r
- else if( a <= '9')return a - '0';\r
- else if( a < 'A')return 0;//error\r
- else if( a <= 'Z')return a - 'A'+10;\r
- else if( a < 'a')return 0;//error\r
- else if( a <= 'z')return a - 'a'+10;\r
- else return 0;//error\r
-}\r
-\r
-char decimal2hex(unsigned char n){\r
- if( n >= 16)return '-';//error\r
- return "0123456789abcdef"[n];\r
-}\r
-\r
-mof::Color mof::createColor(unsigned char r , unsigned char g , unsigned char b){\r
- return D3DCOLOR_XRGB(r , g , b);\r
-}\r
-\r
-mof::Color mof::createColor(unsigned char a , unsigned char r , unsigned char g , unsigned char b){\r
- return D3DCOLOR_ARGB(a , r , g , b);\r
-}\r
-\r
-\r
-mof::Color mof::createColor(const mof::tstring& code){\r
- const TCHAR* pBuffer = code.c_str();\r
- unsigned char a , r , g , b;\r
- if(code.size() == 8)a = ( hex2Decimal(pBuffer++) << 4 ) + hex2Decimal(pBuffer++);\r
- else if(code.size() != 6)return 0;//error\r
- else a = 0xff;\r
- r = (hex2Decimal(pBuffer++) << 4) + hex2Decimal(pBuffer++);\r
- g = (hex2Decimal(pBuffer++) << 4) + hex2Decimal(pBuffer++);\r
- b = (hex2Decimal(pBuffer++) << 4) + hex2Decimal(pBuffer++);\r
- return createColor(a , r , g , b);\r
-}\r
-\r
-unsigned char mof::getAlpha(const mof::Color& color){\r
- return (unsigned char)((color >> 24) & 0xff);\r
-}\r
-\r
-\r
-unsigned char mof::getRed(const mof::Color& color){\r
- return (unsigned char)((color >> 16) & 0xff);\r
-}\r
-\r
-unsigned char mof::getGreen(const mof::Color& color){\r
- return (unsigned char)((color >> 8) & 0xff);\r
-}\r
-\r
-\r
-unsigned char mof::getBlue(const mof::Color& color){\r
- return (unsigned char)(color & 0xff);\r
-}\r
-\r
-\r
-mof::Color mof::blendColor( mof::Color a , mof::Color b , float rate ){\r
- return createColor(\r
- static_cast<unsigned char>(getAlpha(a) * rate + getAlpha(b) * (1 - rate)) , //alpha\r
- static_cast<unsigned char>(getRed(a) * rate + getRed(b) * (1 - rate)) , //red\r
- static_cast<unsigned char>(getGreen(a) * rate + getGreen(b) * (1 - rate)) , //green\r
- static_cast<unsigned char>(getBlue(a) * rate + getBlue(b) * (1 - rate)) ); //blue\r
-}\r
-\r
-mof::Color mof::inverseColor(mof::Color src){\r
- return createColor(\r
- 255 - getAlpha(src) , //alpha\r
- 255 - getRed(src) , //red\r
- 255 - getGreen(src) , //green\r
- 255 - getBlue(src) ); //blue\r
-}\r
-\r
-\r
-mof::tstring mof::toColorCode(mof::Color color){\r
- mof::otstringstream os;\r
- unsigned char a = getAlpha(color);\r
- unsigned char r = getRed(color);\r
- unsigned char g = getGreen(color);\r
- unsigned char b = getBlue(color);\r
- os << decimal2hex(a >> 4) << decimal2hex(a & 0x0f) \r
- << decimal2hex(r >> 4) << decimal2hex(r & 0x0f) \r
- << decimal2hex(g >> 4) << decimal2hex(g & 0x0f) \r
- << decimal2hex(b >> 4) << decimal2hex(b & 0x0f) ;\r
- return os.str();\r
-\r
-}\r
-\r
-\r
-std::ostream& mof::operator <<(std::ostream& os, const mof::Color4f& color) \r
-{\r
- mof::Color code = color.toColorCode();\r
- os \r
- << "(" \r
- << static_cast<int>(mof::getAlpha(code)) << ", "\r
- << static_cast<int>(mof::getRed(code)) << ", "\r
- << static_cast<int>(mof::getGreen(code)) << ", "\r
- << static_cast<int>(mof::getBlue(code))\r
- << ")";\r
- return os;\r
-}\r
+#include "mof/Color.hpp"
+#include <d3dx9.h>
+#include "mof/ConsoleIO.hpp"
+#include "mof/tstring.hpp"
+
+
+mof::Color4f::Color4f() :
+ alpha(0) , red(1) , green(1) , blue(1)
+{
+}
+
+mof::Color4f::Color4f(float alpha_ , float red_ , float green_ , float blue_) :
+ alpha(alpha_) , red(red_) , green(green_) , blue(blue_)
+{
+}
+
+mof::Color4f::Color4f( float red_ , float green_ , float blue_) :
+ alpha(1) , red(red_) , green(green_) , blue(blue_)
+{
+}
+
+mof::Color4f::Color4f(mof::Color color) :
+ alpha(static_cast<float>(getAlpha(color)) / 255) ,
+ red(static_cast<float>(getRed(color)) / 255) ,
+ green(static_cast<float>(getGreen(color)) / 255) ,
+ blue(static_cast<float>(getBlue(color)) / 255 )
+{
+}
+
+mof::Color mof::Color4f::toColorCode() const{
+ return createColor(
+ static_cast<ColorChannel>(alpha * 255) ,
+ static_cast<ColorChannel>(red * 255) ,
+ static_cast<ColorChannel>(green * 255) ,
+ static_cast<ColorChannel>(blue * 255)
+ );
+}
+
+mof::Color4f mof::Color4f::operator +(const mof::Color4f& rhs) const{
+ return mof::Color4f(
+ alpha + rhs.alpha ,
+ red + rhs.red ,
+ green + rhs.green ,
+ blue + rhs.blue );
+}
+
+mof::Color4f mof::Color4f::operator -(const mof::Color4f& rhs) const{
+ return mof::Color4f(
+ alpha - rhs.alpha ,
+ red - rhs.red ,
+ green - rhs.green ,
+ blue - rhs.blue );
+}
+
+mof::Color4f mof::Color4f::operator *(const Color4f& color ) const
+{
+ return mof::Color4f(color.alpha * alpha , color.red * red , color.green * green , color.blue * blue );
+}
+
+mof::Color4f mof::operator *(const Color4f& color , float f){
+ return mof::Color4f(color.alpha * f , color.red * f , color.green * f , color.blue * f);
+}
+
+mof::Color4f mof::operator *(float f , const mof::Color4f & color){
+ return mof::Color4f(color.alpha * f , color.red * f , color.green * f , color.blue * f);
+}
+
+
+
+unsigned char hex2Decimal(const TCHAR* code){
+ unsigned char a = *code;
+ if(a < '0')return 0;//error
+ else if( a <= '9')return a - '0';
+ else if( a < 'A')return 0;//error
+ else if( a <= 'Z')return a - 'A'+10;
+ else if( a < 'a')return 0;//error
+ else if( a <= 'z')return a - 'a'+10;
+ else return 0;//error
+}
+
+char decimal2hex(unsigned char n){
+ if( n >= 16)return '-';//error
+ return "0123456789abcdef"[n];
+}
+
+mof::Color mof::createColor(unsigned char r , unsigned char g , unsigned char b){
+ return D3DCOLOR_XRGB(r , g , b);
+}
+
+mof::Color mof::createColor(unsigned char a , unsigned char r , unsigned char g , unsigned char b){
+ return D3DCOLOR_ARGB(a , r , g , b);
+}
+
+
+mof::Color mof::createColor(const mof::tstring& code){
+ const TCHAR* pBuffer = code.c_str();
+ unsigned char a , r , g , b;
+ if(code.size() == 8)a = ( hex2Decimal(pBuffer++) << 4 ) + hex2Decimal(pBuffer++);
+ else if(code.size() != 6)return 0;//error
+ else a = 0xff;
+ r = (hex2Decimal(pBuffer++) << 4) + hex2Decimal(pBuffer++);
+ g = (hex2Decimal(pBuffer++) << 4) + hex2Decimal(pBuffer++);
+ b = (hex2Decimal(pBuffer++) << 4) + hex2Decimal(pBuffer++);
+ return createColor(a , r , g , b);
+}
+
+unsigned char mof::getAlpha(const mof::Color& color){
+ return (unsigned char)((color >> 24) & 0xff);
+}
+
+
+unsigned char mof::getRed(const mof::Color& color){
+ return (unsigned char)((color >> 16) & 0xff);
+}
+
+unsigned char mof::getGreen(const mof::Color& color){
+ return (unsigned char)((color >> 8) & 0xff);
+}
+
+
+unsigned char mof::getBlue(const mof::Color& color){
+ return (unsigned char)(color & 0xff);
+}
+
+
+mof::Color mof::blendColor( mof::Color a , mof::Color b , float rate ){
+ return createColor(
+ static_cast<unsigned char>(getAlpha(a) * rate + getAlpha(b) * (1 - rate)) , //alpha
+ static_cast<unsigned char>(getRed(a) * rate + getRed(b) * (1 - rate)) , //red
+ static_cast<unsigned char>(getGreen(a) * rate + getGreen(b) * (1 - rate)) , //green
+ static_cast<unsigned char>(getBlue(a) * rate + getBlue(b) * (1 - rate)) ); //blue
+}
+
+mof::Color mof::inverseColor(mof::Color src){
+ return createColor(
+ 255 - getAlpha(src) , //alpha
+ 255 - getRed(src) , //red
+ 255 - getGreen(src) , //green
+ 255 - getBlue(src) ); //blue
+}
+
+
+mof::tstring mof::toColorCode(mof::Color color){
+ mof::otstringstream os;
+ unsigned char a = getAlpha(color);
+ unsigned char r = getRed(color);
+ unsigned char g = getGreen(color);
+ unsigned char b = getBlue(color);
+ os << decimal2hex(a >> 4) << decimal2hex(a & 0x0f)
+ << decimal2hex(r >> 4) << decimal2hex(r & 0x0f)
+ << decimal2hex(g >> 4) << decimal2hex(g & 0x0f)
+ << decimal2hex(b >> 4) << decimal2hex(b & 0x0f) ;
+ return os.str();
+
+}
+
+
+std::ostream& mof::operator <<(std::ostream& os, const mof::Color4f& color)
+{
+ mof::Color code = color.toColorCode();
+ os
+ << "("
+ << static_cast<int>(mof::getAlpha(code)) << ", "
+ << static_cast<int>(mof::getRed(code)) << ", "
+ << static_cast<int>(mof::getGreen(code)) << ", "
+ << static_cast<int>(mof::getBlue(code))
+ << ")";
+ return os;
+}
-#pragma once\r
-#include "mof/tstring.hpp"\r
-#include "mof/real.hpp"\r
-\r
-namespace mof{\r
- typedef unsigned int Color;\r
- typedef unsigned char ColorChannel;\r
- Color createColor(ColorChannel r , ColorChannel g , ColorChannel b);\r
- Color createColor(ColorChannel a , ColorChannel r , ColorChannel g , ColorChannel b);\r
- Color createColor(const mof::tstring& code);\r
- ColorChannel getRed(const Color& color);\r
- ColorChannel getGreen(const Color& color);\r
- ColorChannel getBlue(const Color& color);\r
- ColorChannel getAlpha(const Color& color);\r
- Color blendColor( Color a , Color b , real rate );\r
- Color inverseColor( Color color );\r
- mof::tstring toColorCode( Color color );\r
-\r
- struct Color4f{\r
- real red;\r
- real green;\r
- real blue;\r
- real alpha;\r
-\r
- Color4f();\r
- Color4f(real alpha_ , real red_ , real green_ , real blue_);\r
- Color4f( real red_ , real green_ , real blue_);\r
- explicit Color4f(mof::Color color);\r
- mof::Color toColorCode() const;\r
-\r
- mof::Color4f operator +( const mof::Color4f& rhs ) const ;\r
- mof::Color4f operator -( const mof::Color4f& rhs ) const ;\r
- mof::Color4f operator *( const Color4f& rhs ) const;\r
-\r
- friend mof::Color4f operator *(const Color4f& color , real f);\r
- friend mof::Color4f operator *(real f , const mof::Color4f & color);\r
- friend std::ostream& operator <<(std::ostream& os , const mof::Color4f& obj );\r
-\r
- };\r
-\r
- \r
-\r
- \r
-};\r
+#pragma once
+#include "mof/tstring.hpp"
+#include "mof/real.hpp"
+
+namespace mof{
+ typedef unsigned int Color;
+ typedef unsigned char ColorChannel;
+ Color createColor(ColorChannel r , ColorChannel g , ColorChannel b);
+ Color createColor(ColorChannel a , ColorChannel r , ColorChannel g , ColorChannel b);
+ Color createColor(const mof::tstring& code);
+ ColorChannel getRed(const Color& color);
+ ColorChannel getGreen(const Color& color);
+ ColorChannel getBlue(const Color& color);
+ ColorChannel getAlpha(const Color& color);
+ Color blendColor( Color a , Color b , real rate );
+ Color inverseColor( Color color );
+ mof::tstring toColorCode( Color color );
+
+ struct Color4f{
+ real red;
+ real green;
+ real blue;
+ real alpha;
+
+ Color4f();
+ Color4f(real alpha_ , real red_ , real green_ , real blue_);
+ Color4f( real red_ , real green_ , real blue_);
+ explicit Color4f(mof::Color color);
+ mof::Color toColorCode() const;
+
+ mof::Color4f operator +( const mof::Color4f& rhs ) const ;
+ mof::Color4f operator -( const mof::Color4f& rhs ) const ;
+ mof::Color4f operator *( const Color4f& rhs ) const;
+
+ friend mof::Color4f operator *(const Color4f& color , real f);
+ friend mof::Color4f operator *(real f , const mof::Color4f & color);
+ friend std::ostream& operator <<(std::ostream& os , const mof::Color4f& obj );
+
+ };
+
+
+
+
+};
-#pragma once\r
-#include "mof/stream/utilities.hpp"\r
-\r
-namespace mof\r
-{\r
-\r
- class ColorComponent\r
- {\r
- public:\r
- virtual ~ColorComponent( ){}\r
-\r
- virtual void setColorStream( const ColorStream& stream )\r
- {\r
- m_colorStream = stream;\r
- }\r
-\r
- virtual const ColorStream& getColorStream( ) const\r
- {\r
- return m_colorStream;\r
- }\r
- \r
- virtual ColorStream& getColorStream( )\r
- {\r
- return m_colorStream;\r
- }\r
-\r
- \r
- protected:\r
- ColorStream m_colorStream;\r
-\r
- ColorComponent( )\r
- : \r
- m_colorStream( makeConstantHandler( Color4f( 1 , 1 , 1 ) ) ) \r
- {\r
- }\r
- \r
- ColorComponent( const Color4f& color )\r
- : \r
- m_colorStream( makeConstantHandler( color ) ) \r
- {\r
- }\r
-\r
- ColorComponent( const ColorStream& stream )\r
- : \r
- m_colorStream( stream ) \r
- {\r
- }\r
-\r
- };\r
-} // namespace mof\r
+#pragma once
+#include "mof/stream/utilities.hpp"
+
+namespace mof
+{
+
+ class ColorComponent
+ {
+ public:
+ virtual ~ColorComponent( ){}
+
+ virtual void setColorStream( const ColorStream& stream )
+ {
+ m_colorStream = stream;
+ }
+
+ virtual const ColorStream& getColorStream( ) const
+ {
+ return m_colorStream;
+ }
+
+ virtual ColorStream& getColorStream( )
+ {
+ return m_colorStream;
+ }
+
+
+ protected:
+ ColorStream m_colorStream;
+
+ ColorComponent( )
+ :
+ m_colorStream( makeConstantHandler( Color4f( 1 , 1 , 1 ) ) )
+ {
+ }
+
+ ColorComponent( const Color4f& color )
+ :
+ m_colorStream( makeConstantHandler( color ) )
+ {
+ }
+
+ ColorComponent( const ColorStream& stream )
+ :
+ m_colorStream( stream )
+ {
+ }
+
+ };
+} // namespace mof
-#pragma once\r
-#include "mof/stream/utilities.hpp"\r
-\r
-namespace mof\r
-{\r
-\r
- class Component2D\r
- {\r
- public:\r
- virtual ~Component2D( ){}\r
-\r
- /** コンポーネントの左上の位置を得る\r
- * @note このメソッドで得られるハンドラとsetPosition()で\r
- * 指定したハンドラは同一であると扱える\r
- * @retval このウィジェットの左上の位置を得るためのハンドラ \r
- */\r
- virtual const Vector2DStream& getPositionStream( ) const\r
- {\r
- return m_positionStream;\r
- }\r
- \r
- /** コンポーネントの左上の位置を得る\r
- * @note このメソッドで得られるハンドラとsetPosition()で\r
- * 指定したハンドラは同一であると扱える\r
- * @retval このウィジェットの左上の位置を得るためのハンドラ \r
- */\r
- virtual Vector2DStream& getPositionStream( ) \r
- {\r
- return m_positionStream;\r
- }\r
-\r
-\r
- /** コンポーネントの左上の位置を指定する\r
- * @note このメソッドで指定するハンドラとgetPosition()で\r
- * 得られるハンドラは同一であると扱える\r
- * @retval このウィジェットの左上の位置を得るためのハンドラ \r
- */\r
- /*virtual void setSizeStream( const Vector2DStream& stream )\r
- {\r
- m_sizeStream = stream;\r
- }*/\r
- \r
- /** コンポーネントの大きさを得る\r
- * @note このメソッドで得られるハンドラとsetSize()で\r
- * 指定したハンドラは同一であると扱える\r
- * @retval このウィジェットの大きさを得るためのハンドラ \r
- */\r
- virtual const Vector2DStream& getSizeStream( ) const\r
- {\r
- return m_sizeStream;\r
- }\r
- \r
- /** コンポーネントの大きさを得る\r
- * @note このメソッドで得られるハンドラとsetSize()で\r
- * 指定したハンドラは同一であると扱える\r
- * @retval このウィジェットの大きさを得るためのハンドラ \r
- */\r
- virtual Vector2DStream& getSizeStream( ) \r
- {\r
- return m_sizeStream;\r
- }\r
-\r
-\r
- protected:\r
- Vector2DStream m_positionStream;\r
- Vector2DStream m_sizeStream;\r
-\r
- Component2D( )\r
- : \r
- m_positionStream( makeConstantHandler( Vector2D( 0 , 0 ) ) ) ,\r
- m_sizeStream( makeConstantHandler( Vector2D( 0 , 0 ) ) ) \r
- {\r
- }\r
- \r
- Component2D( const Rectangle< int >& region )\r
- : \r
- m_positionStream\r
- (\r
- makeConstantHandler\r
- ( \r
- Vector2D(region.beginX , region.beginY)\r
- )\r
- ) ,\r
- m_sizeStream\r
- (\r
- makeConstantHandler\r
- (\r
- Vector2D(region.getWidth() , region.getHeight())\r
- )\r
- ) \r
- {}\r
-\r
- };\r
-} // namespace mof\r
+#pragma once
+#include "mof/stream/utilities.hpp"
+
+namespace mof
+{
+
+ class Component2D
+ {
+ public:
+ virtual ~Component2D( ){}
+
+ /** コンポーネントの左上の位置を得る
+ * @note このメソッドで得られるハンドラとsetPosition()で
+ * 指定したハンドラは同一であると扱える
+ * @retval このウィジェットの左上の位置を得るためのハンドラ
+ */
+ virtual const Vector2DStream& getPositionStream( ) const
+ {
+ return m_positionStream;
+ }
+
+ /** コンポーネントの左上の位置を得る
+ * @note このメソッドで得られるハンドラとsetPosition()で
+ * 指定したハンドラは同一であると扱える
+ * @retval このウィジェットの左上の位置を得るためのハンドラ
+ */
+ virtual Vector2DStream& getPositionStream( )
+ {
+ return m_positionStream;
+ }
+
+
+ /** コンポーネントの左上の位置を指定する
+ * @note このメソッドで指定するハンドラとgetPosition()で
+ * 得られるハンドラは同一であると扱える
+ * @retval このウィジェットの左上の位置を得るためのハンドラ
+ */
+ /*virtual void setSizeStream( const Vector2DStream& stream )
+ {
+ m_sizeStream = stream;
+ }*/
+
+ /** コンポーネントの大きさを得る
+ * @note このメソッドで得られるハンドラとsetSize()で
+ * 指定したハンドラは同一であると扱える
+ * @retval このウィジェットの大きさを得るためのハンドラ
+ */
+ virtual const Vector2DStream& getSizeStream( ) const
+ {
+ return m_sizeStream;
+ }
+
+ /** コンポーネントの大きさを得る
+ * @note このメソッドで得られるハンドラとsetSize()で
+ * 指定したハンドラは同一であると扱える
+ * @retval このウィジェットの大きさを得るためのハンドラ
+ */
+ virtual Vector2DStream& getSizeStream( )
+ {
+ return m_sizeStream;
+ }
+
+
+ protected:
+ Vector2DStream m_positionStream;
+ Vector2DStream m_sizeStream;
+
+ Component2D( )
+ :
+ m_positionStream( makeConstantHandler( Vector2D( 0 , 0 ) ) ) ,
+ m_sizeStream( makeConstantHandler( Vector2D( 0 , 0 ) ) )
+ {
+ }
+
+ Component2D( const Rectangle< int >& region )
+ :
+ m_positionStream
+ (
+ makeConstantHandler
+ (
+ Vector2D(region.beginX , region.beginY)
+ )
+ ) ,
+ m_sizeStream
+ (
+ makeConstantHandler
+ (
+ Vector2D(region.getWidth() , region.getHeight())
+ )
+ )
+ {}
+
+ };
+} // namespace mof
-#include "mof/Component3D.hpp"\r
-#include "mof/stream/Constant.hpp"\r
-#include "mof/Matrix3D.hpp"\r
-\r
-void mof::Component3D::setWorldMatrix(const mof::Matrix3D& matrix){\r
- setWorldMatrix(mof::makeConstantHandler(matrix));\r
-}\r
+#include "mof/Component3D.hpp"
+#include "mof/stream/Constant.hpp"
+#include "mof/Matrix3D.hpp"
+
+void mof::Component3D::setWorldMatrix(const mof::Matrix3D& matrix){
+ setWorldMatrix(mof::makeConstantHandler(matrix));
+}
-#pragma once\r
-#include "mof/stream/utilities.hpp"\r
-\r
-namespace mof\r
-{\r
- class Matrix3D;\r
-\r
- class Component3D \r
- {\r
- \r
- public:\r
- virtual ~Component3D(){}\r
-\r
- virtual void setWorldMatrix(const mof::Manipulator<mof::Matrix3D>::Handler& handler) = 0;\r
- virtual void setWorldMatrix(const mof::Matrix3D& matrix);\r
- \r
- };\r
-\r
-}\r
-\r
+#pragma once
+#include "mof/stream/utilities.hpp"
+
+namespace mof
+{
+ class Matrix3D;
+
+ class Component3D
+ {
+
+ public:
+ virtual ~Component3D(){}
+
+ virtual void setWorldMatrix(const mof::Manipulator<mof::Matrix3D>::Handler& handler) = 0;
+ virtual void setWorldMatrix(const mof::Matrix3D& matrix);
+
+ };
+
+}
+
-#include "mof/ConsoleIO.hpp"\r
-\r
+#include "mof/ConsoleIO.hpp"
+
ConsoleOut* ConsoleOut::obj = NULL;
\ No newline at end of file
-\r
-#ifndef CONSOLE_H\r
-#define CONSOLE_H\r
-\r
-#include <iostream>\r
-#include <windows.h>\r
-#include <tchar.h>\r
-\r
-//--------------------------------------------\r
-// class ConsoleIO\r
-//\r
-// \83R\83\93\83\\81[\83\8b\82ð\8cÄ\82Ñ\8fo\82µ\81A\93ü\8fo\97Í\82ð\8ds\82¤\81B\r
-// C++\82Ì\93ü\8fo\97Í\83X\83g\83\8a\81[\83\80\83N\83\89\83X\81Astd::basic_stream\r
-// \82ð\8cp\8f³\82·\82é\81B\r
-//--------------------------------------------\r
-template <class CharT , class Tr = std::char_traits<CharT> >\r
-class ConsoleIO : public std::basic_streambuf<CharT , Tr>{\r
-\r
-protected:\r
- std::streampos seekoff( \r
- std::streamoff off, \r
- std::ios::seek_dir dir, \r
- int nMode = std::ios::in | std::ios::out ){\r
- return EOF;\r
- }\r
- \r
- std::streampos seekpos( std::streampos , int ){\r
- return EOF;\r
- }\r
-\r
- int_type overflow( int_type nCh = EOF ){\r
- DWORD size;\r
- WriteConsole(GetStdHandle(STD_OUTPUT_HANDLE),(WCHAR*)&nCh,1,&size,NULL);\r
- return 0;\r
- }\r
-\r
- int_type underflow(void){\r
- return EOF;\r
- }\r
-\r
-\r
-public:\r
- ConsoleIO(){\r
- setbuf(0,0);\r
- AllocConsole();\r
- }\r
- \r
- ~ConsoleIO(){\r
- FreeConsole();\r
- }\r
-\r
-};\r
-\r
-\r
-\r
-//--------------------------------------------\r
-// class ConsoleOut\r
-//\r
-// \83R\83\93\83\\81[\83\8b\8fo\97Í\82É\82Í\81A\82±\82Ì\83N\83\89\83X\82Ì\83I\83u\83W\83F\83N\83g\82ð\8dì\82é\r
-//--------------------------------------------\r
-class ConsoleOut : public std::basic_iostream<TCHAR> {\r
- static ConsoleOut* obj;\r
- \r
- ConsoleOut(void) \r
- : std::basic_iostream<TCHAR>(new ConsoleIO<TCHAR>() ){\r
- }\r
-\r
-public:\r
- static ConsoleOut* getInstance(){\r
- if(obj == NULL)obj = new ConsoleOut();\r
- return obj;\r
- }\r
-\r
-\r
-};\r
-\r
-#define DEBUG_PRINT(x) (*ConsoleOut::getInstance() << x << std::endl)\r
-//#define DEBUG_PRINT(x)\r
-\r
-#endif \r
+
+#ifndef CONSOLE_H
+#define CONSOLE_H
+
+#include <iostream>
+#include <windows.h>
+#include <tchar.h>
+
+//--------------------------------------------
+// class ConsoleIO
+//
+// \83R\83\93\83\\81[\83\8b\82ð\8cÄ\82Ñ\8fo\82µ\81A\93ü\8fo\97Í\82ð\8ds\82¤\81B
+// C++\82Ì\93ü\8fo\97Í\83X\83g\83\8a\81[\83\80\83N\83\89\83X\81Astd::basic_stream
+// \82ð\8cp\8f³\82·\82é\81B
+//--------------------------------------------
+template <class CharT , class Tr = std::char_traits<CharT> >
+class ConsoleIO : public std::basic_streambuf<CharT , Tr>{
+
+protected:
+ std::streampos seekoff(
+ std::streamoff off,
+ std::ios::seek_dir dir,
+ int nMode = std::ios::in | std::ios::out ){
+ return EOF;
+ }
+
+ std::streampos seekpos( std::streampos , int ){
+ return EOF;
+ }
+
+ int_type overflow( int_type nCh = EOF ){
+ DWORD size;
+ WriteConsole(GetStdHandle(STD_OUTPUT_HANDLE),(WCHAR*)&nCh,1,&size,NULL);
+ return 0;
+ }
+
+ int_type underflow(void){
+ return EOF;
+ }
+
+
+public:
+ ConsoleIO(){
+ setbuf(0,0);
+ AllocConsole();
+ }
+
+ ~ConsoleIO(){
+ FreeConsole();
+ }
+
+};
+
+
+
+//--------------------------------------------
+// class ConsoleOut
+//
+// \83R\83\93\83\\81[\83\8b\8fo\97Í\82É\82Í\81A\82±\82Ì\83N\83\89\83X\82Ì\83I\83u\83W\83F\83N\83g\82ð\8dì\82é
+//--------------------------------------------
+class ConsoleOut : public std::basic_iostream<TCHAR> {
+ static ConsoleOut* obj;
+
+ ConsoleOut(void)
+ : std::basic_iostream<TCHAR>(new ConsoleIO<TCHAR>() ){
+ }
+
+public:
+ static ConsoleOut* getInstance(){
+ if(obj == NULL)obj = new ConsoleOut();
+ return obj;
+ }
+
+
+};
+
+#define DEBUG_PRINT(x) (*ConsoleOut::getInstance() << x << std::endl)
+//#define DEBUG_PRINT(x)
+
+#endif
-#include "mof/Container2D.h"\r
-#include "mof/ConsoleIO.h"\r
-\r
-\r
-\r
-mof::Container2D::Container2D(int nColumns)\r
-: mof::Component2D() , m_margin(0) , m_paddingX(0) , m_paddingY(0)\r
-{\r
- m_nColumns = nColumns;\r
-}\r
-\r
-\r
-mof::Container2D::~Container2D(){\r
-\r
- for(int i = 0 ; i < m_children.size() ; i ++){\r
- delete m_children.at(i);\r
- }\r
-}\r
-\r
-bool mof::Container2D::update(){\r
-\r
- for(int i = 0 ; i < m_children.size() ; i ++){\r
- m_children.at(i)->update();\r
- }\r
-\r
-\r
- //setPosition(getAnimationSet()->getPosition(getPosition()));\r
- setPosition(getAnimationSet()->getPosition());\r
- getAnimationSet()->update();\r
- return true;\r
-}\r
-\r
-\r
-bool mof::Container2D::draw(){\r
- \r
- for(int i = 0 ; i < m_children.size() ; i ++){\r
- m_children.at(i)->draw();\r
- }\r
- return true;\r
-}\r
-\r
-\r
-/*\r
-bool mof::Container2D::draw(mof::Matrix3D& transform){\r
- transform = m_worldTransform * transform;\r
- for(int i = 0 ; i < m_children.size() ; i ++){\r
- m_children.at(i)->draw(transform);\r
- }\r
- return true;\r
-}*/\r
-\r
-\r
-void mof::Container2D::add(mof::Component2D* component){\r
- m_children.push_back(component);\r
-}\r
-\r
-bool mof::Container2D::remove(mof::Component2D* component){\r
- for(std::vector<mof::Component2D*>::iterator itr = m_children.begin() ; itr !=m_children.end() ; ++itr){\r
- if((*itr) == component){\r
- delete component;\r
- return true;\r
- }\r
- }\r
- return false;\r
-}\r
-\r
-int mof::Container2D::indexOf(mof::Component2D* component){\r
- for(int i = 0 ; i < m_children.size() ; ++i){\r
- if(m_children.at(i) == component)return i;\r
- }\r
- return -1;\r
-}\r
-\r
-void mof::Container2D::set(int index , mof::Component2D* component){\r
- delete m_children.at(index);\r
- m_children.at(index) = component;\r
-}\r
-\r
-mof::Component2D* mof::Container2D::get(int index){\r
- return m_children.at(index);\r
-}\r
-\r
-mof::Vector2D mof::Container2D::getPositionOf(int index){\r
- return get(index)->getPosition();/* * m_worldTransform;*/\r
- //return get(index)->getPosition();\r
-}\r
-\r
-void mof::Container2D::setPosition(Vector2D& _position){\r
- mof::Vector2D position = _position;\r
- m_position = position;\r
- position.x += m_margin;\r
- position.y += m_margin;\r
- \r
- int* maxWidthArray = new int[m_nColumns];\r
- \r
- //\97ñ\96\88\82É\8dÅ\91å\95\9d\82ð\8b\81\82ß\82é\r
- for(int i = 0 ; i < m_nColumns ; i++){\r
- maxWidthArray[i] = 0 ;\r
- for(int j = i ; j < m_children.size() ; j += m_nColumns){\r
- int width = get(j)->getWidth();\r
- if(maxWidthArray[i] < width)maxWidthArray[i] = width;\r
- }\r
- }\r
-\r
- for(int i = 0 ; i < m_children.size() ; i++){\r
- get(i)->setPosition(position);\r
- if(i % m_nColumns == m_nColumns -1){\r
- position.y += get(i)->getHeight() + m_paddingY;\r
- position.x = m_position.x + m_margin;\r
- }\r
- else position.x += maxWidthArray[i % m_nColumns] + m_paddingX;\r
- }\r
- \r
- delete[] maxWidthArray;\r
-}\r
-\r
-mof::Vector2D mof::Container2D::getPosition(){\r
- return m_position;\r
-}\r
- \r
-void mof::Container2D::setVisible(bool visible){\r
-\r
-\r
-}\r
-\r
-int mof::Container2D::getWidth(){\r
- int* maxWidthArray = new int[m_nColumns];\r
- //\97ñ\96\88\82É\8dÅ\91å\95\9d\82ð\8b\81\82ß\82é\r
- for(int i = 0 ; i < m_nColumns ; i++){\r
- maxWidthArray[i] = 0 ;\r
- for(int j = i ; j < m_children.size() ; j += m_nColumns){\r
- int width = get(j)->getWidth();\r
- if(maxWidthArray[i] < width)maxWidthArray[i] = width;\r
- }\r
- }\r
- int sumWidth = 0;\r
- for(int i = 0 ; i < m_nColumns ; i++)sumWidth += maxWidthArray[i];\r
- delete[] maxWidthArray;\r
- return sumWidth + (m_nColumns-1)* m_paddingX + getMargin()*2;\r
-}\r
-\r
-int mof::Container2D::getHeight(){\r
- int sumHeight = 0;\r
- for(int i = 0 ; i < m_children.size() ; i++){\r
- if(i % m_nColumns == 0)sumHeight += m_children.at(i)->getHeight() + m_paddingY;\r
- }\r
- return sumHeight + getMargin() *2;\r
-}\r
- \r
-\r
-mof::RectangleModel mof::Container2D::getBounds(){\r
- return mof::RectangleModel(getPosition().x , getPosition().y , getWidth() , getHeight());\r
-}\r
-\r
-void mof::Container2D::setLayout(){\r
- mof::Vector2D position = getPosition();\r
- position.x += m_margin;\r
- position.y += m_margin;\r
- //DEBUG_PRINT(position.x << _T(",") << position.y);\r
- setPosition(getPosition());\r
-}\r
+#include "mof/Container2D.h"
+#include "mof/ConsoleIO.h"
+
+
+
+mof::Container2D::Container2D(int nColumns)
+: mof::Component2D() , m_margin(0) , m_paddingX(0) , m_paddingY(0)
+{
+ m_nColumns = nColumns;
+}
+
+
+mof::Container2D::~Container2D(){
+
+ for(int i = 0 ; i < m_children.size() ; i ++){
+ delete m_children.at(i);
+ }
+}
+
+bool mof::Container2D::update(){
+
+ for(int i = 0 ; i < m_children.size() ; i ++){
+ m_children.at(i)->update();
+ }
+
+
+ //setPosition(getAnimationSet()->getPosition(getPosition()));
+ setPosition(getAnimationSet()->getPosition());
+ getAnimationSet()->update();
+ return true;
+}
+
+
+bool mof::Container2D::draw(){
+
+ for(int i = 0 ; i < m_children.size() ; i ++){
+ m_children.at(i)->draw();
+ }
+ return true;
+}
+
+
+/*
+bool mof::Container2D::draw(mof::Matrix3D& transform){
+ transform = m_worldTransform * transform;
+ for(int i = 0 ; i < m_children.size() ; i ++){
+ m_children.at(i)->draw(transform);
+ }
+ return true;
+}*/
+
+
+void mof::Container2D::add(mof::Component2D* component){
+ m_children.push_back(component);
+}
+
+bool mof::Container2D::remove(mof::Component2D* component){
+ for(std::vector<mof::Component2D*>::iterator itr = m_children.begin() ; itr !=m_children.end() ; ++itr){
+ if((*itr) == component){
+ delete component;
+ return true;
+ }
+ }
+ return false;
+}
+
+int mof::Container2D::indexOf(mof::Component2D* component){
+ for(int i = 0 ; i < m_children.size() ; ++i){
+ if(m_children.at(i) == component)return i;
+ }
+ return -1;
+}
+
+void mof::Container2D::set(int index , mof::Component2D* component){
+ delete m_children.at(index);
+ m_children.at(index) = component;
+}
+
+mof::Component2D* mof::Container2D::get(int index){
+ return m_children.at(index);
+}
+
+mof::Vector2D mof::Container2D::getPositionOf(int index){
+ return get(index)->getPosition();/* * m_worldTransform;*/
+ //return get(index)->getPosition();
+}
+
+void mof::Container2D::setPosition(Vector2D& _position){
+ mof::Vector2D position = _position;
+ m_position = position;
+ position.x += m_margin;
+ position.y += m_margin;
+
+ int* maxWidthArray = new int[m_nColumns];
+
+ //\97ñ\96\88\82É\8dÅ\91å\95\9d\82ð\8b\81\82ß\82é
+ for(int i = 0 ; i < m_nColumns ; i++){
+ maxWidthArray[i] = 0 ;
+ for(int j = i ; j < m_children.size() ; j += m_nColumns){
+ int width = get(j)->getWidth();
+ if(maxWidthArray[i] < width)maxWidthArray[i] = width;
+ }
+ }
+
+ for(int i = 0 ; i < m_children.size() ; i++){
+ get(i)->setPosition(position);
+ if(i % m_nColumns == m_nColumns -1){
+ position.y += get(i)->getHeight() + m_paddingY;
+ position.x = m_position.x + m_margin;
+ }
+ else position.x += maxWidthArray[i % m_nColumns] + m_paddingX;
+ }
+
+ delete[] maxWidthArray;
+}
+
+mof::Vector2D mof::Container2D::getPosition(){
+ return m_position;
+}
+
+void mof::Container2D::setVisible(bool visible){
+
+
+}
+
+int mof::Container2D::getWidth(){
+ int* maxWidthArray = new int[m_nColumns];
+ //\97ñ\96\88\82É\8dÅ\91å\95\9d\82ð\8b\81\82ß\82é
+ for(int i = 0 ; i < m_nColumns ; i++){
+ maxWidthArray[i] = 0 ;
+ for(int j = i ; j < m_children.size() ; j += m_nColumns){
+ int width = get(j)->getWidth();
+ if(maxWidthArray[i] < width)maxWidthArray[i] = width;
+ }
+ }
+ int sumWidth = 0;
+ for(int i = 0 ; i < m_nColumns ; i++)sumWidth += maxWidthArray[i];
+ delete[] maxWidthArray;
+ return sumWidth + (m_nColumns-1)* m_paddingX + getMargin()*2;
+}
+
+int mof::Container2D::getHeight(){
+ int sumHeight = 0;
+ for(int i = 0 ; i < m_children.size() ; i++){
+ if(i % m_nColumns == 0)sumHeight += m_children.at(i)->getHeight() + m_paddingY;
+ }
+ return sumHeight + getMargin() *2;
+}
+
+
+mof::RectangleModel mof::Container2D::getBounds(){
+ return mof::RectangleModel(getPosition().x , getPosition().y , getWidth() , getHeight());
+}
+
+void mof::Container2D::setLayout(){
+ mof::Vector2D position = getPosition();
+ position.x += m_margin;
+ position.y += m_margin;
+ //DEBUG_PRINT(position.x << _T(",") << position.y);
+ setPosition(getPosition());
+}
\ No newline at end of file
-#pragma once\r
-#include "mof/Component2D.h"\r
-#include <vector>\r
-\r
-namespace mof{\r
- \r
- class Container2D : public Component2D{\r
- std::vector<mof::Component2D*> m_children;\r
- mof::Vector2D m_position;\r
- int m_margin;\r
- int m_paddingX;\r
- int m_paddingY;\r
- int m_nColumns;\r
- public:\r
- Container2D(int nColumns = 1);\r
- ~Container2D();\r
-\r
- virtual bool update();\r
- virtual bool draw();\r
- \r
- void add(mof::Component2D* component);\r
- bool remove(mof::Component2D* component);\r
- mof::Component2D* get(int index);\r
- void set(int index , mof::Component2D* component);\r
- int indexOf(mof::Component2D* component);\r
- int size(){return m_children.size();}\r
- \r
- mof::Vector2D getPositionOf(int index);\r
- \r
- virtual void setPosition(Vector2D& position);\r
- void setMargin(int margin){m_margin = margin;}\r
- void setColumn(int nColumns){m_nColumns = nColumns;}\r
- void setPaddingX(int paddingX){m_paddingX = paddingX;}\r
- void setPaddingY(int paddingY){m_paddingY = paddingY;}\r
- int getMargin(){return m_margin;}\r
- virtual mof::Vector2D getPosition();\r
- virtual int getWidth();\r
- virtual int getHeight();\r
- \r
- virtual void setVisible(bool visible);\r
- virtual RectangleModel getBounds();\r
- virtual void setLayout();\r
- \r
- };\r
+#pragma once
+#include "mof/Component2D.h"
+#include <vector>
+
+namespace mof{
+
+ class Container2D : public Component2D{
+ std::vector<mof::Component2D*> m_children;
+ mof::Vector2D m_position;
+ int m_margin;
+ int m_paddingX;
+ int m_paddingY;
+ int m_nColumns;
+ public:
+ Container2D(int nColumns = 1);
+ ~Container2D();
+
+ virtual bool update();
+ virtual bool draw();
+
+ void add(mof::Component2D* component);
+ bool remove(mof::Component2D* component);
+ mof::Component2D* get(int index);
+ void set(int index , mof::Component2D* component);
+ int indexOf(mof::Component2D* component);
+ int size(){return m_children.size();}
+
+ mof::Vector2D getPositionOf(int index);
+
+ virtual void setPosition(Vector2D& position);
+ void setMargin(int margin){m_margin = margin;}
+ void setColumn(int nColumns){m_nColumns = nColumns;}
+ void setPaddingX(int paddingX){m_paddingX = paddingX;}
+ void setPaddingY(int paddingY){m_paddingY = paddingY;}
+ int getMargin(){return m_margin;}
+ virtual mof::Vector2D getPosition();
+ virtual int getWidth();
+ virtual int getHeight();
+
+ virtual void setVisible(bool visible);
+ virtual RectangleModel getBounds();
+ virtual void setLayout();
+
+ };
};
\ No newline at end of file
-#include "mof/Container3D.h"\r
-\r
-\r
-\r
-mof::Container3D::Container3D()\r
-: mof::Component3D() \r
-{\r
-}\r
-\r
-\r
-mof::Container3D::~Container3D(){\r
-\r
- for(int i = 0 ; i < m_children.size() ; i ++){\r
- delete m_children.at(i);\r
- }\r
-}\r
-\r
-bool mof::Container3D::draw(){\r
- for(int i = 0 ; i < m_children.size() ; i ++){\r
- if(m_children.at(i) == NULL)continue;\r
- m_children.at(i)->draw(m_worldTransform);\r
- }\r
- return true;\r
-}\r
-\r
-\r
-bool mof::Container3D::draw(mof::Matrix3D& transform){\r
- transform = m_worldTransform * transform;\r
- for(int i = 0 ; i < m_children.size() ; i ++){\r
- if(m_children.at(i) == NULL)continue;\r
- m_children.at(i)->draw(transform);\r
- }\r
- return true;\r
-} \r
-\r
-bool mof::Container3D::update(){\r
- for(int i = 0 ; i < m_children.size() ; i ++){\r
- if(m_children.at(i) == NULL)continue;\r
- m_children.at(i)->update();\r
- }\r
- return mof::Component3D::update();\r
-}\r
-\r
-\r
-void mof::Container3D::add(mof::Component3D* component){\r
- for(int i = 0 ; i < m_children.size() ; i ++){\r
- if(m_children.at(i) == NULL){\r
- m_children.at(i) = component;\r
- return;\r
- }\r
- }\r
- m_children.push_back(component);\r
-}\r
-\r
-mof::Component3D* mof::Container3D::get(int index){\r
- return m_children.at(index);\r
-}\r
-\r
-mof::Vector3D mof::Container3D::getPositionOf(int index){\r
- return get(index)->getPosition() * m_worldTransform;\r
- //return get(index)->getPosition();\r
+#include "mof/Container3D.h"
+
+
+
+mof::Container3D::Container3D()
+: mof::Component3D()
+{
+}
+
+
+mof::Container3D::~Container3D(){
+
+ for(int i = 0 ; i < m_children.size() ; i ++){
+ delete m_children.at(i);
+ }
+}
+
+bool mof::Container3D::draw(){
+ for(int i = 0 ; i < m_children.size() ; i ++){
+ if(m_children.at(i) == NULL)continue;
+ m_children.at(i)->draw(m_worldTransform);
+ }
+ return true;
+}
+
+
+bool mof::Container3D::draw(mof::Matrix3D& transform){
+ transform = m_worldTransform * transform;
+ for(int i = 0 ; i < m_children.size() ; i ++){
+ if(m_children.at(i) == NULL)continue;
+ m_children.at(i)->draw(transform);
+ }
+ return true;
+}
+
+bool mof::Container3D::update(){
+ for(int i = 0 ; i < m_children.size() ; i ++){
+ if(m_children.at(i) == NULL)continue;
+ m_children.at(i)->update();
+ }
+ return mof::Component3D::update();
+}
+
+
+void mof::Container3D::add(mof::Component3D* component){
+ for(int i = 0 ; i < m_children.size() ; i ++){
+ if(m_children.at(i) == NULL){
+ m_children.at(i) = component;
+ return;
+ }
+ }
+ m_children.push_back(component);
+}
+
+mof::Component3D* mof::Container3D::get(int index){
+ return m_children.at(index);
+}
+
+mof::Vector3D mof::Container3D::getPositionOf(int index){
+ return get(index)->getPosition() * m_worldTransform;
+ //return get(index)->getPosition();
}
\ No newline at end of file
-#pragma once\r
-#include "mof/Component3D.h"\r
-#include <vector>\r
-\r
-namespace mof{\r
- \r
- class Container3D : public Component3D{\r
- protected:\r
- std::vector<mof::Component3D*> m_children;\r
- public:\r
- Container3D();\r
- ~Container3D();\r
-\r
- \r
- virtual bool draw();\r
- virtual bool draw(mof::Matrix3D& transform);\r
- virtual bool update();\r
- \r
- void add(mof::Component3D* component);\r
- mof::Component3D* get(int index);\r
- \r
- mof::Vector3D getPositionOf(int index);\r
- \r
- //void deleteAll();\r
- \r
- };\r
+#pragma once
+#include "mof/Component3D.h"
+#include <vector>
+
+namespace mof{
+
+ class Container3D : public Component3D{
+ protected:
+ std::vector<mof::Component3D*> m_children;
+ public:
+ Container3D();
+ ~Container3D();
+
+
+ virtual bool draw();
+ virtual bool draw(mof::Matrix3D& transform);
+ virtual bool update();
+
+ void add(mof::Component3D* component);
+ mof::Component3D* get(int index);
+
+ mof::Vector3D getPositionOf(int index);
+
+ //void deleteAll();
+
+ };
};
\ No newline at end of file
-#include "DataRow.h"\r
-\r
-mof::DataRow::DataRow( const DataResource& data , const TCHAR* const pRowName)\r
-: m_data(data){\r
- m_rowIndex = m_data->getRowIndex(pRowName);\r
-}\r
-\r
-mof::DataRow::DataRow( const DataResource& data , int index)\r
-: m_data(data) , m_rowIndex(index){\r
- \r
-}\r
-\r
+#include "DataRow.h"
+
+mof::DataRow::DataRow( const DataResource& data , const TCHAR* const pRowName)
+: m_data(data){
+ m_rowIndex = m_data->getRowIndex(pRowName);
+}
+
+mof::DataRow::DataRow( const DataResource& data , int index)
+: m_data(data) , m_rowIndex(index){
+
+}
+
-#pragma once\r
-#include "mof/DataTable.h"\r
-\r
-namespace mof{\r
- class DataRow\r
- {\r
- int m_rowIndex;\r
- DataResource m_data;\r
- public:\r
- DataRow(){;}\r
- DataRow( const DataResource& data , const TCHAR * const pRowName);\r
- DataRow( const DataResource& data , int index);\r
-\r
- inline mof::tstring& getData( const TCHAR * const pColumnName);\r
- inline mof::tstring& getData( int columnIndex);\r
-\r
- inline int getIntegerData( const TCHAR * const pColumnName);\r
- inline int getIntegerData( int columnIndex);\r
- };\r
-\r
-\r
-}\r
-\r
-\r
-mof::tstring& mof::DataRow::getData( const TCHAR * const pColumnName){\r
- return m_data->getData(m_rowIndex , pColumnName);\r
-}\r
-\r
-\r
-\r
-mof::tstring& mof::DataRow::getData( int columnIndex){\r
- return m_data->getData(m_rowIndex , columnIndex);\r
-}\r
-\r
-\r
-\r
-int mof::DataRow::getIntegerData( const TCHAR * const pColumnName){\r
- return m_data->getIntegerData(m_rowIndex , pColumnName);\r
-}\r
-\r
-\r
-\r
-int mof::DataRow::getIntegerData( int columnIndex){\r
- return m_data->getIntegerData(m_rowIndex , columnIndex);\r
-}\r
-\r
-\r
+#pragma once
+#include "mof/DataTable.h"
+
+namespace mof{
+ class DataRow
+ {
+ int m_rowIndex;
+ DataResource m_data;
+ public:
+ DataRow(){;}
+ DataRow( const DataResource& data , const TCHAR * const pRowName);
+ DataRow( const DataResource& data , int index);
+
+ inline mof::tstring& getData( const TCHAR * const pColumnName);
+ inline mof::tstring& getData( int columnIndex);
+
+ inline int getIntegerData( const TCHAR * const pColumnName);
+ inline int getIntegerData( int columnIndex);
+ };
+
+
+}
+
+
+mof::tstring& mof::DataRow::getData( const TCHAR * const pColumnName){
+ return m_data->getData(m_rowIndex , pColumnName);
+}
+
+
+
+mof::tstring& mof::DataRow::getData( int columnIndex){
+ return m_data->getData(m_rowIndex , columnIndex);
+}
+
+
+
+int mof::DataRow::getIntegerData( const TCHAR * const pColumnName){
+ return m_data->getIntegerData(m_rowIndex , pColumnName);
+}
+
+
+
+int mof::DataRow::getIntegerData( int columnIndex){
+ return m_data->getIntegerData(m_rowIndex , columnIndex);
+}
+
+
-#include "mof/ConsoleIO.h"\r
-#include "mof/DataTable.h"\r
-#include "mof/CSVFile.h"\r
-#include <boost/lexical_cast.hpp>\r
-#include <assert.h>\r
-#include <stdexcept>\r
-\r
-mof::DataTable::DataTable(tstring& name )\r
- : mof::Resource(name){\r
-}\r
-\r
-mof::DataTable::DataTable(const TCHAR * const name)\r
- : mof::Resource(mof::tstring(name)){\r
-}\r
-\r
- \r
-void mof::DataTable::load(){\r
- if(isAvailable())return;\r
- //CVS\83t\83@\83C\83\8b\82©\82ç\83f\81[\83^\82ð\83\8d\81[\83h\r
- mof::CSVFile csvFile(getName().c_str());\r
- csvFile.setIgnoreNL(false);\r
-\r
- //column\8fî\95ñ\82Ì\83\8d\81[\83h\r
- for(int i = 0 ; csvFile.hasNextValue() ; i++){\r
- m_columnMap.insert(std::pair<mof::tstring , int>( mof::tstring(csvFile.getNextValue()) , i));\r
- }\r
- \r
- while(csvFile.nextLine()){\r
- m_dataList.push_back(std::vector<mof::tstring>());\r
- while(csvFile.hasNextValue()){\r
- m_dataList.back().push_back(mof::tstring(csvFile.getNextValue()));\r
- }\r
- \r
- }\r
- setAvailable(true);\r
- \r
-}\r
-\r
-void mof::DataTable::unload(){\r
- if(!isAvailable())return;\r
- m_dataList.clear();\r
- m_columnMap.clear();\r
- setAvailable(false);\r
- }\r
-\r
-\r
-int mof::DataTable::getRowIndex(const TCHAR * const pRowName){\r
- if(!isAvailable())load();\r
- for(int i = 0 ; i < m_dataList.size() ; ++i){\r
- if(!m_dataList.at(i).empty() && m_dataList.at(i).at(0) == pRowName)return i;\r
- }\r
- return -1;\r
-}\r
-\r
-\r
-int mof::DataTable::getColumnIndex(const TCHAR * const pColumnName){\r
- if(!isAvailable())load();\r
- mof::tstring tmp(pColumnName);\r
- std::map<mof::tstring , int>::iterator itr = m_columnMap.find(tmp);\r
- return itr != m_columnMap.end() ? itr->second : -1;\r
-}\r
-\r
-\r
-mof::tstring& mof::DataTable::getData(const TCHAR * const pRowName , const TCHAR * const pColumnName){\r
- if(!isAvailable())load();\r
- int columnIndex = getColumnIndex(pColumnName);\r
- int rowIndex = getRowIndex(pRowName);\r
- return m_dataList.at(rowIndex).at(columnIndex);\r
- \r
-}\r
-\r
-\r
-mof::tstring& mof::DataTable::getData(int rowIndex , const TCHAR *const pColumnName){\r
- if(!isAvailable())load();\r
- int columnIndex = getColumnIndex(pColumnName);\r
- return m_dataList.at(rowIndex).at(columnIndex);\r
-}\r
-\r
-\r
-mof::tstring& mof::DataTable::getData(int rowIndex , int columnIndex){\r
- if(!isAvailable())load();\r
- return m_dataList.at(rowIndex).at(columnIndex);\r
-}\r
-\r
-int mof::DataTable::getIntegerData(const TCHAR *const pRowName ,const TCHAR * const pColumnName){\r
- if(!isAvailable())load();\r
- return boost::lexical_cast<int>(getData(pRowName , pColumnName));\r
-}\r
-\r
-int mof::DataTable::getIntegerData(int rowIndex , const TCHAR *const pColumnName){\r
- if(!isAvailable())load();\r
- return boost::lexical_cast<int>(getData(rowIndex , pColumnName));\r
-}\r
-\r
-int mof::DataTable::getIntegerData(int rowIndex , int columnIndex){\r
- if(!isAvailable())load();\r
- return boost::lexical_cast<int>(getData(rowIndex , columnIndex));\r
-}\r
-\r
-\r
-int mof::DataTable::getNumberOfRows(){\r
- if(!isAvailable())load();\r
- return m_dataList.size();\r
+#include "mof/ConsoleIO.h"
+#include "mof/DataTable.h"
+#include "mof/CSVFile.h"
+#include <boost/lexical_cast.hpp>
+#include <assert.h>
+#include <stdexcept>
+
+mof::DataTable::DataTable(tstring& name )
+ : mof::Resource(name){
+}
+
+mof::DataTable::DataTable(const TCHAR * const name)
+ : mof::Resource(mof::tstring(name)){
+}
+
+
+void mof::DataTable::load(){
+ if(isAvailable())return;
+ //CVS\83t\83@\83C\83\8b\82©\82ç\83f\81[\83^\82ð\83\8d\81[\83h
+ mof::CSVFile csvFile(getName().c_str());
+ csvFile.setIgnoreNL(false);
+
+ //column\8fî\95ñ\82Ì\83\8d\81[\83h
+ for(int i = 0 ; csvFile.hasNextValue() ; i++){
+ m_columnMap.insert(std::pair<mof::tstring , int>( mof::tstring(csvFile.getNextValue()) , i));
+ }
+
+ while(csvFile.nextLine()){
+ m_dataList.push_back(std::vector<mof::tstring>());
+ while(csvFile.hasNextValue()){
+ m_dataList.back().push_back(mof::tstring(csvFile.getNextValue()));
+ }
+
+ }
+ setAvailable(true);
+
+}
+
+void mof::DataTable::unload(){
+ if(!isAvailable())return;
+ m_dataList.clear();
+ m_columnMap.clear();
+ setAvailable(false);
+ }
+
+
+int mof::DataTable::getRowIndex(const TCHAR * const pRowName){
+ if(!isAvailable())load();
+ for(int i = 0 ; i < m_dataList.size() ; ++i){
+ if(!m_dataList.at(i).empty() && m_dataList.at(i).at(0) == pRowName)return i;
+ }
+ return -1;
+}
+
+
+int mof::DataTable::getColumnIndex(const TCHAR * const pColumnName){
+ if(!isAvailable())load();
+ mof::tstring tmp(pColumnName);
+ std::map<mof::tstring , int>::iterator itr = m_columnMap.find(tmp);
+ return itr != m_columnMap.end() ? itr->second : -1;
+}
+
+
+mof::tstring& mof::DataTable::getData(const TCHAR * const pRowName , const TCHAR * const pColumnName){
+ if(!isAvailable())load();
+ int columnIndex = getColumnIndex(pColumnName);
+ int rowIndex = getRowIndex(pRowName);
+ return m_dataList.at(rowIndex).at(columnIndex);
+
+}
+
+
+mof::tstring& mof::DataTable::getData(int rowIndex , const TCHAR *const pColumnName){
+ if(!isAvailable())load();
+ int columnIndex = getColumnIndex(pColumnName);
+ return m_dataList.at(rowIndex).at(columnIndex);
+}
+
+
+mof::tstring& mof::DataTable::getData(int rowIndex , int columnIndex){
+ if(!isAvailable())load();
+ return m_dataList.at(rowIndex).at(columnIndex);
+}
+
+int mof::DataTable::getIntegerData(const TCHAR *const pRowName ,const TCHAR * const pColumnName){
+ if(!isAvailable())load();
+ return boost::lexical_cast<int>(getData(pRowName , pColumnName));
+}
+
+int mof::DataTable::getIntegerData(int rowIndex , const TCHAR *const pColumnName){
+ if(!isAvailable())load();
+ return boost::lexical_cast<int>(getData(rowIndex , pColumnName));
+}
+
+int mof::DataTable::getIntegerData(int rowIndex , int columnIndex){
+ if(!isAvailable())load();
+ return boost::lexical_cast<int>(getData(rowIndex , columnIndex));
+}
+
+
+int mof::DataTable::getNumberOfRows(){
+ if(!isAvailable())load();
+ return m_dataList.size();
}
\ No newline at end of file
-#pragma once\r
-#include "mof/Resource.h"\r
-#include "mof/tstring.h"\r
-#include <vector>\r
-#include <map>\r
-#include "mof/ResourceManager.h"\r
-\r
-\r
-namespace mof{\r
-\r
- \r
- class DataTable : public Resource\r
- {\r
- std::map<mof::tstring , int> m_columnMap;\r
- std::vector<std::vector<mof::tstring>> m_dataList;\r
-\r
- public:\r
- DataTable(tstring& name );\r
- DataTable(const TCHAR * const name);\r
- \r
- virtual void load();\r
- virtual void unload();\r
-\r
- int getRowIndex(const TCHAR * const pRowName);\r
- int getColumnIndex(const TCHAR * const pRowName);\r
- mof::tstring& getData(const TCHAR * const pRowName , const TCHAR * const pColumnName);\r
- mof::tstring& getData(int rowIndex , const TCHAR * const pColumnName);\r
- mof::tstring& getData(int rowIndex , int columnIndex);\r
-\r
- int getIntegerData(const TCHAR * const pRowName , const TCHAR * const pColumnName);\r
- int getIntegerData(int rowIndex , const TCHAR * const pColumnName);\r
- int getIntegerData(int rowIndex , int columnIndex);\r
- \r
- int getNumberOfRows();\r
- };\r
-\r
-\r
-\r
- typedef mof::ResourceManager<DataTable> DataResourceManager;\r
- typedef boost::shared_ptr<DataTable> DataResource;\r
-};\r
+#pragma once
+#include "mof/Resource.h"
+#include "mof/tstring.h"
+#include <vector>
+#include <map>
+#include "mof/ResourceManager.h"
+
+
+namespace mof{
+
+
+ class DataTable : public Resource
+ {
+ std::map<mof::tstring , int> m_columnMap;
+ std::vector<std::vector<mof::tstring>> m_dataList;
+
+ public:
+ DataTable(tstring& name );
+ DataTable(const TCHAR * const name);
+
+ virtual void load();
+ virtual void unload();
+
+ int getRowIndex(const TCHAR * const pRowName);
+ int getColumnIndex(const TCHAR * const pRowName);
+ mof::tstring& getData(const TCHAR * const pRowName , const TCHAR * const pColumnName);
+ mof::tstring& getData(int rowIndex , const TCHAR * const pColumnName);
+ mof::tstring& getData(int rowIndex , int columnIndex);
+
+ int getIntegerData(const TCHAR * const pRowName , const TCHAR * const pColumnName);
+ int getIntegerData(int rowIndex , const TCHAR * const pColumnName);
+ int getIntegerData(int rowIndex , int columnIndex);
+
+ int getNumberOfRows();
+ };
+
+
+
+ typedef mof::ResourceManager<DataTable> DataResourceManager;
+ typedef boost::shared_ptr<DataTable> DataResource;
+};
-#include <memory>\r
-#include <boost/weak_ptr.hpp>\r
-#include "mof/EventScheduler.hpp"\r
-\r
-namespace mof{\r
- \r
- template <class T>\r
- class Deleter{\r
- std::shared_ptr<T> m_p;\r
- public:\r
- Deleter(T* p) : m_p(p) {}\r
- Deleter( typename std::shared_ptr<T>& p) : m_p(p) {}\r
-\r
- void operator ()(){\r
- m_p = std::shared_ptr<T>();\r
- }\r
-\r
- boost::weak_ptr<T> getWeak(){\r
- return m_p;\r
- }\r
- };\r
-\r
-};\r
+#include <memory>
+#include <boost/weak_ptr.hpp>
+#include "mof/EventScheduler.hpp"
+
+namespace mof{
+
+ template <class T>
+ class Deleter{
+ std::shared_ptr<T> m_p;
+ public:
+ Deleter(T* p) : m_p(p) {}
+ Deleter( typename std::shared_ptr<T>& p) : m_p(p) {}
+
+ void operator ()(){
+ m_p = std::shared_ptr<T>();
+ }
+
+ boost::weak_ptr<T> getWeak(){
+ return m_p;
+ }
+ };
+
+};
-#include "mof/private/DirectInput.hpp"\r
-#include "mof/private/DeviceInputReceiver.hpp"\r
-#include "mof/InputDevice.hpp"\r
-#include "mof/ConsoleIO.hpp"\r
-#include "mof/InputEventCondition.hpp"\r
-\r
-\r
-mof::DeviceInputReceiver::DeviceInputReceiver()\r
-: mof::InputReceiver(){\r
- m_pKeyStates = new bool[mof::DeviceInputReceiver::END];\r
- for(int i = 0 ; i < mof::DeviceInputReceiver::END ; i++)m_pKeyStates[i] = false;\r
-}\r
-\r
-mof::DeviceInputReceiver::~DeviceInputReceiver(){\r
- delete[] m_pKeyStates;\r
- \r
-}\r
-\r
-bool mof::DeviceInputReceiver::testKeyState(mof::InputReceiver::Key key){\r
-\r
- return m_pKeyStates[key];\r
- \r
-}\r
-\r
-void mof::DeviceInputReceiver::update(){\r
- mof::InputDevice::update();\r
-}\r
-\r
-\r
-void mof::DeviceInputReceiver::notifyInputEvent(mof::InputEvent& inputEvent){\r
- mof::DeviceInputReceiver::Key key;\r
-\r
- \r
- switch(inputEvent.dwOfs){\r
- case DIK_UP :\r
- key = mof::DeviceInputReceiver::UP;\r
- break;\r
- case DIK_DOWN :\r
- key = mof::DeviceInputReceiver::DOWN;\r
- break;\r
- case DIK_LEFT :\r
- key = mof::DeviceInputReceiver::LEFT;\r
- break;\r
- case DIK_RIGHT :\r
- key = mof::DeviceInputReceiver::RIGHT;\r
- break;\r
- case DIK_A :\r
- key = mof::DeviceInputReceiver::A;\r
- break;\r
- case DIK_B :\r
- key = mof::DeviceInputReceiver::B;\r
- break;\r
- case DIK_C :\r
- key = mof::DeviceInputReceiver::C;\r
- break;\r
- case DIK_D :\r
- key = mof::DeviceInputReceiver::D;\r
- break;\r
- case DIK_E :\r
- key = mof::DeviceInputReceiver::E;\r
- break;\r
- case DIK_F :\r
- key = mof::DeviceInputReceiver::F;\r
- break;\r
- case DIK_G :\r
- key = mof::DeviceInputReceiver::G;\r
- break;\r
- case DIK_H :\r
- key = mof::DeviceInputReceiver::H;\r
- break;\r
- case DIK_I :\r
- key = mof::DeviceInputReceiver::I;\r
- break;\r
- case DIK_J :\r
- key = mof::DeviceInputReceiver::J;\r
- break;\r
- case DIK_K :\r
- key = mof::DeviceInputReceiver::K;\r
- break;\r
- case DIK_L :\r
- key = mof::DeviceInputReceiver::L;\r
- break;\r
- case DIK_M :\r
- key = mof::DeviceInputReceiver::M;\r
- break;\r
- case DIK_N :\r
- key = mof::DeviceInputReceiver::N;\r
- break;\r
- case DIK_O :\r
- key = mof::DeviceInputReceiver::O;\r
- break;\r
- case DIK_P :\r
- key = mof::DeviceInputReceiver::P;\r
- break;\r
- case DIK_Q :\r
- key = mof::DeviceInputReceiver::Q;\r
- break;\r
- case DIK_R :\r
- key = mof::DeviceInputReceiver::R;\r
- break;\r
- case DIK_S :\r
- key = mof::DeviceInputReceiver::S;\r
- break;\r
- case DIK_T :\r
- key = mof::DeviceInputReceiver::T;\r
- break;\r
- case DIK_U :\r
- key = mof::DeviceInputReceiver::U;\r
- break;\r
- case DIK_V :\r
- key = mof::DeviceInputReceiver::V;\r
- break;\r
- case DIK_W :\r
- key = mof::DeviceInputReceiver::W;\r
- break;\r
- case DIK_X :\r
- key = mof::DeviceInputReceiver::X;\r
- break;\r
- case DIK_Y :\r
- key = mof::DeviceInputReceiver::Y;\r
- break;\r
- case DIK_Z :\r
- key = mof::DeviceInputReceiver::Z;\r
- break;\r
- case DIK_ESCAPE :\r
- key = mof::DeviceInputReceiver::ESCAPE;\r
- break;\r
- default : \r
- return;\r
- }\r
- m_pKeyStates[key] = (inputEvent.dwData & 0x80) != 0;\r
- m_pKeyStates[mof::DeviceInputReceiver::ANY] = (inputEvent.dwData & 0x80) != 0;\r
- \r
-}\r
+#include "mof/private/DirectInput.hpp"
+#include "mof/private/DeviceInputReceiver.hpp"
+#include "mof/InputDevice.hpp"
+#include "mof/ConsoleIO.hpp"
+#include "mof/InputEventCondition.hpp"
+
+
+mof::DeviceInputReceiver::DeviceInputReceiver()
+: mof::InputReceiver(){
+ m_pKeyStates = new bool[mof::DeviceInputReceiver::END];
+ for(int i = 0 ; i < mof::DeviceInputReceiver::END ; i++)m_pKeyStates[i] = false;
+}
+
+mof::DeviceInputReceiver::~DeviceInputReceiver(){
+ delete[] m_pKeyStates;
+
+}
+
+bool mof::DeviceInputReceiver::testKeyState(mof::InputReceiver::Key key){
+
+ return m_pKeyStates[key];
+
+}
+
+void mof::DeviceInputReceiver::update(){
+ mof::InputDevice::update();
+}
+
+
+void mof::DeviceInputReceiver::notifyInputEvent(mof::InputEvent& inputEvent){
+ mof::DeviceInputReceiver::Key key;
+
+
+ switch(inputEvent.dwOfs){
+ case DIK_UP :
+ key = mof::DeviceInputReceiver::UP;
+ break;
+ case DIK_DOWN :
+ key = mof::DeviceInputReceiver::DOWN;
+ break;
+ case DIK_LEFT :
+ key = mof::DeviceInputReceiver::LEFT;
+ break;
+ case DIK_RIGHT :
+ key = mof::DeviceInputReceiver::RIGHT;
+ break;
+ case DIK_A :
+ key = mof::DeviceInputReceiver::A;
+ break;
+ case DIK_B :
+ key = mof::DeviceInputReceiver::B;
+ break;
+ case DIK_C :
+ key = mof::DeviceInputReceiver::C;
+ break;
+ case DIK_D :
+ key = mof::DeviceInputReceiver::D;
+ break;
+ case DIK_E :
+ key = mof::DeviceInputReceiver::E;
+ break;
+ case DIK_F :
+ key = mof::DeviceInputReceiver::F;
+ break;
+ case DIK_G :
+ key = mof::DeviceInputReceiver::G;
+ break;
+ case DIK_H :
+ key = mof::DeviceInputReceiver::H;
+ break;
+ case DIK_I :
+ key = mof::DeviceInputReceiver::I;
+ break;
+ case DIK_J :
+ key = mof::DeviceInputReceiver::J;
+ break;
+ case DIK_K :
+ key = mof::DeviceInputReceiver::K;
+ break;
+ case DIK_L :
+ key = mof::DeviceInputReceiver::L;
+ break;
+ case DIK_M :
+ key = mof::DeviceInputReceiver::M;
+ break;
+ case DIK_N :
+ key = mof::DeviceInputReceiver::N;
+ break;
+ case DIK_O :
+ key = mof::DeviceInputReceiver::O;
+ break;
+ case DIK_P :
+ key = mof::DeviceInputReceiver::P;
+ break;
+ case DIK_Q :
+ key = mof::DeviceInputReceiver::Q;
+ break;
+ case DIK_R :
+ key = mof::DeviceInputReceiver::R;
+ break;
+ case DIK_S :
+ key = mof::DeviceInputReceiver::S;
+ break;
+ case DIK_T :
+ key = mof::DeviceInputReceiver::T;
+ break;
+ case DIK_U :
+ key = mof::DeviceInputReceiver::U;
+ break;
+ case DIK_V :
+ key = mof::DeviceInputReceiver::V;
+ break;
+ case DIK_W :
+ key = mof::DeviceInputReceiver::W;
+ break;
+ case DIK_X :
+ key = mof::DeviceInputReceiver::X;
+ break;
+ case DIK_Y :
+ key = mof::DeviceInputReceiver::Y;
+ break;
+ case DIK_Z :
+ key = mof::DeviceInputReceiver::Z;
+ break;
+ case DIK_ESCAPE :
+ key = mof::DeviceInputReceiver::ESCAPE;
+ break;
+ default :
+ return;
+ }
+ m_pKeyStates[key] = (inputEvent.dwData & 0x80) != 0;
+ m_pKeyStates[mof::DeviceInputReceiver::ANY] = (inputEvent.dwData & 0x80) != 0;
+
+}
-#include "mof/DirectionalLight.hpp"\r
-#include <d3dx9.h>\r
-#include "mof/GraphicsDevice.hpp"\r
-#include "mof/private/GraphicsDeviceImpl.hpp"\r
-\r
-\r
-mof::DirectionalLight::DirectionalLight(mof::Color diffuse , mof::Color ambient , mof::Vector3D& direction)\r
-: mof::Light()\r
-{\r
- setDiffuseColor(diffuse);\r
- setAmbientColor(ambient);\r
- setDirection(direction);\r
-\r
-}\r
-\r
-\r
-void mof::DirectionalLight::update(){\r
- //mof::Animation* pAnimation = getAnimation();\r
- //if(pAnimation == NULL)return;\r
- //pAnimation->update();\r
- //mof::Color color = pAnimation->get();\r
- //set(pAnimation->getColor());\r
-}\r
-\r
-void mof::DirectionalLight::reflect(){\r
- LPDIRECT3DDEVICE9 pDevice = mof::GraphicsDevice::getRawDevice();\r
- D3DLIGHT9 light;\r
- ZeroMemory(&light , sizeof(light));\r
- light.Type = D3DLIGHT_DIRECTIONAL;\r
- light.Diffuse.a = (float)mof::getAlpha(m_diffuse) / 255.0f;\r
- light.Diffuse.r = (float)mof::getRed(m_diffuse) / 255.0f;\r
- light.Diffuse.g = (float)mof::getGreen(m_diffuse) / 255.0f;\r
- light.Diffuse.b = (float)mof::getBlue(m_diffuse) / 255.0f;\r
-\r
- light.Ambient.a = (float)mof::getAlpha(m_ambient) / 255.0f;\r
- light.Ambient.r = (float)mof::getRed(m_ambient) / 255.0f;\r
- light.Ambient.g = (float)mof::getGreen(m_ambient) / 255.0f;\r
- light.Ambient.b = (float)mof::getBlue(m_ambient) / 255.0f;\r
-\r
- light.Direction = D3DXVECTOR3(m_direction.x , m_direction.y , m_direction.z);\r
- \r
- \r
- pDevice->SetLight(0 , &light);\r
- pDevice->LightEnable(0 , TRUE);\r
-}\r
+#include "mof/DirectionalLight.hpp"
+#include <d3dx9.h>
+#include "mof/GraphicsDevice.hpp"
+#include "mof/private/GraphicsDeviceImpl.hpp"
+
+
+mof::DirectionalLight::DirectionalLight(mof::Color diffuse , mof::Color ambient , mof::Vector3D& direction)
+: mof::Light()
+{
+ setDiffuseColor(diffuse);
+ setAmbientColor(ambient);
+ setDirection(direction);
+
+}
+
+
+void mof::DirectionalLight::update(){
+ //mof::Animation* pAnimation = getAnimation();
+ //if(pAnimation == NULL)return;
+ //pAnimation->update();
+ //mof::Color color = pAnimation->get();
+ //set(pAnimation->getColor());
+}
+
+void mof::DirectionalLight::reflect(){
+ LPDIRECT3DDEVICE9 pDevice = mof::GraphicsDevice::getRawDevice();
+ D3DLIGHT9 light;
+ ZeroMemory(&light , sizeof(light));
+ light.Type = D3DLIGHT_DIRECTIONAL;
+ light.Diffuse.a = (float)mof::getAlpha(m_diffuse) / 255.0f;
+ light.Diffuse.r = (float)mof::getRed(m_diffuse) / 255.0f;
+ light.Diffuse.g = (float)mof::getGreen(m_diffuse) / 255.0f;
+ light.Diffuse.b = (float)mof::getBlue(m_diffuse) / 255.0f;
+
+ light.Ambient.a = (float)mof::getAlpha(m_ambient) / 255.0f;
+ light.Ambient.r = (float)mof::getRed(m_ambient) / 255.0f;
+ light.Ambient.g = (float)mof::getGreen(m_ambient) / 255.0f;
+ light.Ambient.b = (float)mof::getBlue(m_ambient) / 255.0f;
+
+ light.Direction = D3DXVECTOR3(m_direction.x , m_direction.y , m_direction.z);
+
+
+ pDevice->SetLight(0 , &light);
+ pDevice->LightEnable(0 , TRUE);
+}
-#pragma once\r
-#include "mof/Light.hpp"\r
-#include "mof/Color.hpp"\r
-#include "mof/Vector3D.hpp"\r
-\r
-namespace mof{\r
-\r
- class DirectionalLight : public Light{\r
- mof::Color m_diffuse;\r
- mof::Color m_ambient;\r
- mof::Vector3D m_direction;\r
- public:\r
- DirectionalLight(mof::Color diffuse , mof::Color ambient , mof::Vector3D& direction);\r
- void setDiffuseColor(mof::Color diffuse){m_diffuse = diffuse;}\r
- void setAmbientColor(mof::Color ambient){m_ambient = ambient;}\r
- void setDirection(mof::Vector3D& direction){m_direction = direction;}\r
-\r
- virtual void update();\r
- virtual void reflect();\r
-\r
- };\r
-\r
-};\r
+#pragma once
+#include "mof/Light.hpp"
+#include "mof/Color.hpp"
+#include "mof/Vector3D.hpp"
+
+namespace mof{
+
+ class DirectionalLight : public Light{
+ mof::Color m_diffuse;
+ mof::Color m_ambient;
+ mof::Vector3D m_direction;
+ public:
+ DirectionalLight(mof::Color diffuse , mof::Color ambient , mof::Vector3D& direction);
+ void setDiffuseColor(mof::Color diffuse){m_diffuse = diffuse;}
+ void setAmbientColor(mof::Color ambient){m_ambient = ambient;}
+ void setDirection(mof::Vector3D& direction){m_direction = direction;}
+
+ virtual void update();
+ virtual void reflect();
+
+ };
+
+};
-#pragma once\r
-\r
-namespace mof\r
-{\r
- class Drawable\r
- {\r
- public:\r
- virtual ~Drawable(){}\r
- virtual void draw() const = 0;\r
- virtual void setVisible(bool visible) = 0;\r
- };\r
-}\r
+#pragma once
+
+namespace mof
+{
+ class Drawable
+ {
+ public:
+ virtual ~Drawable(){}
+ virtual void draw() const = 0;
+ virtual void setVisible(bool visible) = 0;
+ };
+}
-#pragma once\r
-\r
-namespace mof{\r
-\r
- class EventCondition{\r
- public:\r
- virtual ~EventCondition(){}\r
- virtual bool test() = 0;\r
- virtual void update() = 0;\r
- virtual bool isDisposable() = 0;\r
- };\r
-\r
-}\r
-\r
+#pragma once
+
+namespace mof{
+
+ class EventCondition{
+ public:
+ virtual ~EventCondition(){}
+ virtual bool test() = 0;
+ virtual void update() = 0;
+ virtual bool isDisposable() = 0;
+ };
+
+}
+
-#include "mof/EventScheduler.hpp"\r
-#include "mof/EventCondition.hpp"\r
-#include <list>\r
-#include <utility>\r
-#include "mof/utilities.hpp"\r
-\r
-\r
-class TimeEventCondition : public mof::EventCondition{\r
- mof::FrameNumber limit;\r
- mof::FrameNumber count;\r
-\r
-public:\r
- TimeEventCondition(mof::FrameNumber limit)\r
- : limit(limit) , count(0)\r
- {\r
- }\r
-\r
- virtual ~TimeEventCondition(){}\r
-\r
- virtual bool test(){\r
- return count == limit;\r
- }\r
-\r
- virtual bool isDisposable(){\r
- return count > limit;\r
- }\r
-\r
- virtual void update(){\r
- if(limit >= count)count++;\r
- }\r
-};\r
-\r
-struct mof::EventScheduler::Impl{\r
- typedef std::pair<mof::EventCondition* , boost::function0<void>> Schedule; \r
- typedef std::list<std::pair<mof::EventCondition* , boost::function0<void>>> EventList; \r
- EventList eventList;\r
-\r
- Impl(){\r
- }\r
-\r
- ~Impl(){\r
- foreach( Impl::Schedule &value , eventList ){\r
- delete value.first;\r
- }\r
- }\r
-\r
-};\r
-\r
-mof::EventScheduler::EventScheduler()\r
-: m_pImpl(new Impl())\r
-{\r
-}\r
-\r
-mof::EventScheduler::~EventScheduler(){\r
- \r
-}\r
-\r
-void mof::EventScheduler::addEvent( mof::EventCondition* pCondition , const boost::function0<void> &action){\r
- m_pImpl->eventList.push_back(std::pair<mof::EventCondition* , boost::function0<void>>(pCondition , action));\r
-}\r
-\r
-void mof::EventScheduler::addEvent(mof::FrameNumber frame, const boost::function0<void> &action){\r
- addEvent(new TimeEventCondition(frame) , action);\r
-}\r
-\r
-void mof::EventScheduler::update(){\r
- for( Impl::EventList::iterator itr = m_pImpl->eventList.begin() ;\r
- itr != m_pImpl->eventList.end() ; \r
- ){\r
- itr->first->update();\r
- if(itr->first->test()){\r
- itr->second();\r
- }\r
- if(itr->first->isDisposable()){\r
- delete itr->first;\r
- itr = m_pImpl->eventList.erase(itr);\r
- }\r
- else ++itr;\r
- }\r
-}\r
-\r
-\r
-void mof::EventScheduler::clear(){\r
- for( Impl::EventList::iterator itr = m_pImpl->eventList.begin() ;\r
- itr != m_pImpl->eventList.end() ; \r
- ){\r
- delete itr->first;\r
- itr = m_pImpl->eventList.erase(itr);\r
- }\r
-\r
-}\r
-\r
+#include "mof/EventScheduler.hpp"
+#include "mof/EventCondition.hpp"
+#include <list>
+#include <utility>
+#include "mof/utilities.hpp"
+
+
+class TimeEventCondition : public mof::EventCondition{
+ mof::FrameNumber limit;
+ mof::FrameNumber count;
+
+public:
+ TimeEventCondition(mof::FrameNumber limit)
+ : limit(limit) , count(0)
+ {
+ }
+
+ virtual ~TimeEventCondition(){}
+
+ virtual bool test(){
+ return count == limit;
+ }
+
+ virtual bool isDisposable(){
+ return count > limit;
+ }
+
+ virtual void update(){
+ if(limit >= count)count++;
+ }
+};
+
+struct mof::EventScheduler::Impl{
+ typedef std::pair<mof::EventCondition* , boost::function0<void>> Schedule;
+ typedef std::list<std::pair<mof::EventCondition* , boost::function0<void>>> EventList;
+ EventList eventList;
+
+ Impl(){
+ }
+
+ ~Impl(){
+ foreach( Impl::Schedule &value , eventList ){
+ delete value.first;
+ }
+ }
+
+};
+
+mof::EventScheduler::EventScheduler()
+: m_pImpl(new Impl())
+{
+}
+
+mof::EventScheduler::~EventScheduler(){
+
+}
+
+void mof::EventScheduler::addEvent( mof::EventCondition* pCondition , const boost::function0<void> &action){
+ m_pImpl->eventList.push_back(std::pair<mof::EventCondition* , boost::function0<void>>(pCondition , action));
+}
+
+void mof::EventScheduler::addEvent(mof::FrameNumber frame, const boost::function0<void> &action){
+ addEvent(new TimeEventCondition(frame) , action);
+}
+
+void mof::EventScheduler::update(){
+ for( Impl::EventList::iterator itr = m_pImpl->eventList.begin() ;
+ itr != m_pImpl->eventList.end() ;
+ ){
+ itr->first->update();
+ if(itr->first->test()){
+ itr->second();
+ }
+ if(itr->first->isDisposable()){
+ delete itr->first;
+ itr = m_pImpl->eventList.erase(itr);
+ }
+ else ++itr;
+ }
+}
+
+
+void mof::EventScheduler::clear(){
+ for( Impl::EventList::iterator itr = m_pImpl->eventList.begin() ;
+ itr != m_pImpl->eventList.end() ;
+ ){
+ delete itr->first;
+ itr = m_pImpl->eventList.erase(itr);
+ }
+
+}
+
-#ifndef MOF_EVENT_SCHEDULER_HPP\r
-#define MOF_EVENT_SCHEDULER_HPP\r
-#include <boost/scoped_ptr.hpp>\r
-#include <boost/function/function0.hpp>\r
-#include "mof/stream/Manipulator.hpp"\r
-\r
-namespace mof{\r
-\r
-class EventCondition;\r
-\r
-class EventScheduler{\r
- struct Impl;\r
- boost::scoped_ptr<Impl> m_pImpl;\r
-\r
-public:\r
- typedef boost::function0<void> Action;\r
- EventScheduler();\r
- ~EventScheduler();\r
-\r
- void addEvent(mof::EventCondition* pCondition , const Action& action);\r
- void addEvent(mof::FrameNumber interval , const Action& action);\r
- void update();\r
- void clear();\r
-};\r
-\r
-}\r
-\r
-\r
-\r
-\r
-#endif\r
+#ifndef MOF_EVENT_SCHEDULER_HPP
+#define MOF_EVENT_SCHEDULER_HPP
+#include <boost/scoped_ptr.hpp>
+#include <boost/function/function0.hpp>
+#include "mof/stream/Manipulator.hpp"
+
+namespace mof{
+
+class EventCondition;
+
+class EventScheduler{
+ struct Impl;
+ boost::scoped_ptr<Impl> m_pImpl;
+
+public:
+ typedef boost::function0<void> Action;
+ EventScheduler();
+ ~EventScheduler();
+
+ void addEvent(mof::EventCondition* pCondition , const Action& action);
+ void addEvent(mof::FrameNumber interval , const Action& action);
+ void update();
+ void clear();
+};
+
+}
+
+
+
+
+#endif
-#pragma once\r
-#include <boost/function/function0.hpp>\r
-\r
-namespace mof\r
-{\r
- //TODO タイプリストとかで、そのままのインタフェースでより汎用的にする\r
- //非const参照を渡したい場合は?(constructorにそれはありえない)\r
-\r
-\r
-//{{{ FactoryMethod\r
- template < class T > \r
- class FactoryMethod\r
- {\r
- public: \r
- FactoryMethod( const boost::function<T* (void)>& factory)\r
- : m_factory(factory){}\r
-\r
- T* operator() () const{ return m_factory(); }\r
- \r
- template<class T>\r
- operator FactoryMethod<T>( ) const\r
- {\r
- return FactoryMethod<T>(m_factory); \r
- }\r
-\r
-\r
-\r
- private: \r
- boost::function<T* (void)> m_factory;\r
- };\r
-\r
- \r
-//}}}\r
-//{{{ Constructor0\r
- template < class T > \r
- class Constructor0\r
- {\r
- public: \r
- T* operator() ( ) const {return new T();}\r
- };\r
-//}}}\r
-//{{{ Constructor1\r
- template <class T , class P1> \r
- class Constructor1 : protected Constructor0<T>\r
- {\r
- protected:\r
- P1 p1;\r
- public: \r
- Constructor1(const P1& p1_)\r
- : p1(p1_)\r
- {}\r
-\r
- T* operator() ( ) const {return new T(p1);}\r
- };\r
-//}}}\r
-//{{{ Constructor2\r
- template <class T , class P1 , class P2> \r
- class Constructor2 : protected Constructor1<T , P1>\r
- {\r
- protected:\r
- P2 p2;\r
- public: \r
- Constructor2(const P1& p1_ , const P2& p2_)\r
- : Constructor1(p1_) , p2(p2_)\r
- {}\r
-\r
- T* operator() ( ) const {return new T(p1 , p2);}\r
- };\r
-//}}}\r
-//{{{ Constructor3\r
- template <class T , class P1 , class P2 , class P3> \r
- class Constructor3 : protected Constructor2<T , P1 , P2>\r
- {\r
- protected:\r
- P3 p3;\r
- public: \r
- Constructor3(const P1& p1_ , const P2& p2_ , const P3& p3_)\r
- : Constructor2(p1_ , p2_) , p3(p3_)\r
- {}\r
-\r
- T* operator() ( ) const {return new T(p1 , p2 , p3);}\r
- };\r
-//}}}\r
-//{{{ Constructor4\r
- template <class T , class P1 , class P2 , class P3 , class P4> \r
- class Constructor4 : protected Constructor3<T , P1 , P2 , P3>\r
- {\r
- protected:\r
- P4 p4;\r
- public: \r
- Constructor4(const P1& p1_ , const P2& p2_ , const P3& p3_ , const P4& p4_)\r
- : Constructor3(p1_ , p2_ , p3_) , p4(p4_)\r
- {}\r
-\r
- T* operator() ( ) const {return new T(p1 , p2 , p3 , p4);}\r
- };\r
-//}}}\r
-//{{{ Constructor5\r
- template <class T , class P1 , class P2 , class P3 , class P4, class P5> \r
- class Constructor5 : protected Constructor4<T , P1 , P2 , P3, P4>\r
- {\r
- protected:\r
- P5 p5;\r
- public: \r
- Constructor5(const P1& p1_ , const P2& p2_ , const P3& p3_ , const P4& p4_, const P5& p5_)\r
- : Constructor4(p1_ , p2_ , p3_, p4_), p5(p5_)\r
- {}\r
-\r
- T* operator() ( ) const {return new T(p1 , p2 , p3 , p4, p5);}\r
- };\r
-//}}}\r
- \r
-//{{{ makeFactoryMethod\r
- template<class T>\r
- FactoryMethod<T>\r
- makeFactoryMethod()\r
- {\r
- return FactoryMethod<T>( Constructor0<T>() );\r
- }\r
- \r
- template<class T , class P1>\r
- FactoryMethod<T>\r
- makeFactoryMethod(const P1& p1)\r
- {\r
- return FactoryMethod<T>( Constructor1<T , P1>(p1) );\r
- }\r
- \r
- template<class T , class P1 , class P2>\r
- FactoryMethod<T>\r
- makeFactoryMethod(const P1& p1 , const P2& p2)\r
- {\r
- return FactoryMethod<T>( Constructor2<T , P1 , P2>(p1 , p2) );\r
- }\r
- \r
- template<class T , class P1 , class P2 , class P3>\r
- FactoryMethod<T>\r
- makeFactoryMethod(const P1& p1 , const P2& p2 , const P3& p3)\r
- {\r
- return FactoryMethod<T>( Constructor3<T , P1 , P2 , P3>(p1 , p2 , p3) );\r
- }\r
- \r
- template<class T , class P1 , class P2 , class P3 , class P4>\r
- FactoryMethod<T>\r
- makeFactoryMethod(const P1& p1 , const P2& p2 , const P3& p3 , const P4& p4)\r
- {\r
- return FactoryMethod<T>( Constructor4<T , P1 , P2 , P3 , P4>(p1 , p2 , p3 , p4) );\r
- }\r
- \r
- template<class T , class P1 , class P2 , class P3 , class P4, class P5>\r
- FactoryMethod<T>\r
- makeFactoryMethod(const P1& p1 , const P2& p2 , const P3& p3 , const P4& p4, const P5& p5)\r
- {\r
- return FactoryMethod<T>( Constructor5<T , P1 , P2 , P3 , P4 , P5>(p1 , p2 , p3 , p4, p5) );\r
- }\r
-\r
-//}}}\r
-\r
-\r
-}\r
+#pragma once
+#include <boost/function/function0.hpp>
+
+namespace mof
+{
+ //TODO タイプリストとかで、そのままのインタフェースでより汎用的にする
+ //非const参照を渡したい場合は?(constructorにそれはありえない)
+
+
+//{{{ FactoryMethod
+ template < class T >
+ class FactoryMethod
+ {
+ public:
+ FactoryMethod( const boost::function<T* (void)>& factory)
+ : m_factory(factory){}
+
+ T* operator() () const{ return m_factory(); }
+
+ template<class T>
+ operator FactoryMethod<T>( ) const
+ {
+ return FactoryMethod<T>(m_factory);
+ }
+
+
+
+ private:
+ boost::function<T* (void)> m_factory;
+ };
+
+
+//}}}
+//{{{ Constructor0
+ template < class T >
+ class Constructor0
+ {
+ public:
+ T* operator() ( ) const {return new T();}
+ };
+//}}}
+//{{{ Constructor1
+ template <class T , class P1>
+ class Constructor1 : protected Constructor0<T>
+ {
+ protected:
+ P1 p1;
+ public:
+ Constructor1(const P1& p1_)
+ : p1(p1_)
+ {}
+
+ T* operator() ( ) const {return new T(p1);}
+ };
+//}}}
+//{{{ Constructor2
+ template <class T , class P1 , class P2>
+ class Constructor2 : protected Constructor1<T , P1>
+ {
+ protected:
+ P2 p2;
+ public:
+ Constructor2(const P1& p1_ , const P2& p2_)
+ : Constructor1(p1_) , p2(p2_)
+ {}
+
+ T* operator() ( ) const {return new T(p1 , p2);}
+ };
+//}}}
+//{{{ Constructor3
+ template <class T , class P1 , class P2 , class P3>
+ class Constructor3 : protected Constructor2<T , P1 , P2>
+ {
+ protected:
+ P3 p3;
+ public:
+ Constructor3(const P1& p1_ , const P2& p2_ , const P3& p3_)
+ : Constructor2(p1_ , p2_) , p3(p3_)
+ {}
+
+ T* operator() ( ) const {return new T(p1 , p2 , p3);}
+ };
+//}}}
+//{{{ Constructor4
+ template <class T , class P1 , class P2 , class P3 , class P4>
+ class Constructor4 : protected Constructor3<T , P1 , P2 , P3>
+ {
+ protected:
+ P4 p4;
+ public:
+ Constructor4(const P1& p1_ , const P2& p2_ , const P3& p3_ , const P4& p4_)
+ : Constructor3(p1_ , p2_ , p3_) , p4(p4_)
+ {}
+
+ T* operator() ( ) const {return new T(p1 , p2 , p3 , p4);}
+ };
+//}}}
+//{{{ Constructor5
+ template <class T , class P1 , class P2 , class P3 , class P4, class P5>
+ class Constructor5 : protected Constructor4<T , P1 , P2 , P3, P4>
+ {
+ protected:
+ P5 p5;
+ public:
+ Constructor5(const P1& p1_ , const P2& p2_ , const P3& p3_ , const P4& p4_, const P5& p5_)
+ : Constructor4(p1_ , p2_ , p3_, p4_), p5(p5_)
+ {}
+
+ T* operator() ( ) const {return new T(p1 , p2 , p3 , p4, p5);}
+ };
+//}}}
+
+//{{{ makeFactoryMethod
+ template<class T>
+ FactoryMethod<T>
+ makeFactoryMethod()
+ {
+ return FactoryMethod<T>( Constructor0<T>() );
+ }
+
+ template<class T , class P1>
+ FactoryMethod<T>
+ makeFactoryMethod(const P1& p1)
+ {
+ return FactoryMethod<T>( Constructor1<T , P1>(p1) );
+ }
+
+ template<class T , class P1 , class P2>
+ FactoryMethod<T>
+ makeFactoryMethod(const P1& p1 , const P2& p2)
+ {
+ return FactoryMethod<T>( Constructor2<T , P1 , P2>(p1 , p2) );
+ }
+
+ template<class T , class P1 , class P2 , class P3>
+ FactoryMethod<T>
+ makeFactoryMethod(const P1& p1 , const P2& p2 , const P3& p3)
+ {
+ return FactoryMethod<T>( Constructor3<T , P1 , P2 , P3>(p1 , p2 , p3) );
+ }
+
+ template<class T , class P1 , class P2 , class P3 , class P4>
+ FactoryMethod<T>
+ makeFactoryMethod(const P1& p1 , const P2& p2 , const P3& p3 , const P4& p4)
+ {
+ return FactoryMethod<T>( Constructor4<T , P1 , P2 , P3 , P4>(p1 , p2 , p3 , p4) );
+ }
+
+ template<class T , class P1 , class P2 , class P3 , class P4, class P5>
+ FactoryMethod<T>
+ makeFactoryMethod(const P1& p1 , const P2& p2 , const P3& p3 , const P4& p4, const P5& p5)
+ {
+ return FactoryMethod<T>( Constructor5<T , P1 , P2 , P3 , P4 , P5>(p1 , p2 , p3 , p4, p5) );
+ }
+
+//}}}
+
+
+}
-#include "mof/FilePath.hpp"\r
-#include <boost/regex.hpp>\r
-#include "mof/ConsoleIO.hpp"\r
-\r
-\r
-mof::FilePath::FilePath(const mof::tstring& path){\r
- m_path = path;\r
-}\r
-\r
-\r
-mof::tstring mof::FilePath::getFormat(){\r
- try {\r
- boost::regex regex("(.*)\\.(.*)");//name . format\r
- boost::smatch match;\r
- //\8a¿\8e\9a\82É\82Í\91Î\89\9e\82µ\82Ä\82¢\82È\82¢\r
- if(!boost::regex_search(m_path , match , regex)){\r
- DEBUG_PRINT(_T("FormatError --- ") << m_path);\r
- return mof::tstring();\r
- }\r
- return match.str(2); \r
- }\r
- catch (std::exception &e) {\r
- throw e;\r
- }\r
- return mof::tstring();\r
-}\r
- \r
-\r
-mof::tstring& mof::FilePath::getPath(){\r
- return m_path;\r
-}\r
-\r
-mof::tstring mof::FilePath::dir(){\r
- try {\r
- boost::regex regex("(.*)/[^/]*\\.(.*)");//name . format\r
- boost::smatch match;\r
- //\8a¿\8e\9a\82É\82Í\91Î\89\9e\82µ\82Ä\82¢\82È\82¢\r
- if(!boost::regex_search(m_path , match , regex)){\r
- DEBUG_PRINT(_T("FormatError --- ") << m_path);\r
- return mof::tstring();\r
- }\r
- return match.str(1); \r
- }\r
- catch (std::exception &e) {\r
- throw e;\r
- }\r
- return mof::tstring();\r
-\r
-}\r
- \r
-mof::tstring mof::FilePath::basename(){\r
- try {\r
- boost::regex regex("(.*)/([^/]*)");//name . format\r
- boost::smatch match;\r
- //\8a¿\8e\9a\82É\82Í\91Î\89\9e\82µ\82Ä\82¢\82È\82¢\r
- if(!boost::regex_search(m_path , match , regex)){\r
- DEBUG_PRINT(_T("FormatError --- ") << m_path);\r
- return mof::tstring();\r
- }\r
- return match.str(2); \r
- }\r
- catch (std::exception &e) {\r
- throw e;\r
- }\r
- return mof::tstring();\r
-\r
-}\r
-\r
+#include "mof/FilePath.hpp"
+#include <boost/regex.hpp>
+#include "mof/ConsoleIO.hpp"
+
+
+mof::FilePath::FilePath(const mof::tstring& path){
+ m_path = path;
+}
+
+
+mof::tstring mof::FilePath::getFormat(){
+ try {
+ boost::regex regex("(.*)\\.(.*)");//name . format
+ boost::smatch match;
+ //\8a¿\8e\9a\82É\82Í\91Î\89\9e\82µ\82Ä\82¢\82È\82¢
+ if(!boost::regex_search(m_path , match , regex)){
+ DEBUG_PRINT(_T("FormatError --- ") << m_path);
+ return mof::tstring();
+ }
+ return match.str(2);
+ }
+ catch (std::exception &e) {
+ throw e;
+ }
+ return mof::tstring();
+}
+
+
+mof::tstring& mof::FilePath::getPath(){
+ return m_path;
+}
+
+mof::tstring mof::FilePath::dir(){
+ try {
+ boost::regex regex("(.*)/[^/]*\\.(.*)");//name . format
+ boost::smatch match;
+ //\8a¿\8e\9a\82É\82Í\91Î\89\9e\82µ\82Ä\82¢\82È\82¢
+ if(!boost::regex_search(m_path , match , regex)){
+ DEBUG_PRINT(_T("FormatError --- ") << m_path);
+ return mof::tstring();
+ }
+ return match.str(1);
+ }
+ catch (std::exception &e) {
+ throw e;
+ }
+ return mof::tstring();
+
+}
+
+mof::tstring mof::FilePath::basename(){
+ try {
+ boost::regex regex("(.*)/([^/]*)");//name . format
+ boost::smatch match;
+ //\8a¿\8e\9a\82É\82Í\91Î\89\9e\82µ\82Ä\82¢\82È\82¢
+ if(!boost::regex_search(m_path , match , regex)){
+ DEBUG_PRINT(_T("FormatError --- ") << m_path);
+ return mof::tstring();
+ }
+ return match.str(2);
+ }
+ catch (std::exception &e) {
+ throw e;
+ }
+ return mof::tstring();
+
+}
+
-#ifndef MOF_FILE_PATH_HPP\r
-#define MOF_FILE_PATH_HPP\r
-\r
-#include "mof/tstring.hpp"\r
-\r
-namespace mof{\r
-\r
-class FilePath{\r
- mof::tstring m_path;\r
-\r
-public:\r
- FilePath(const mof::tstring& path);\r
-\r
- mof::tstring getFormat();\r
- mof::tstring& getPath();\r
- mof::tstring dir();\r
- mof::tstring basename();\r
-};\r
-\r
-}\r
-\r
-#endif\r
+#ifndef MOF_FILE_PATH_HPP
+#define MOF_FILE_PATH_HPP
+
+#include "mof/tstring.hpp"
+
+namespace mof{
+
+class FilePath{
+ mof::tstring m_path;
+
+public:
+ FilePath(const mof::tstring& path);
+
+ mof::tstring getFormat();
+ mof::tstring& getPath();
+ mof::tstring dir();
+ mof::tstring basename();
+};
+
+}
+
+#endif
-\r
-#include "mof/FileTextureBuilder.h"\r
-#include <d3dx9.h>\r
-#include <dxerr9.h>\r
-#include "GraphicsDevice.h"\r
-#include "mof/ConsoleIO.h"\r
-\r
-mof::FileTextureBuilder::FileTextureBuilder(mof::tstring& path)\r
-{\r
- m_path = path;\r
-}\r
-\r
-mof::FileTextureBuilder::~FileTextureBuilder(void)\r
-{\r
-}\r
-\r
-\r
-mof::TextureRecord mof::FileTextureBuilder::create(){\r
- LPDIRECT3DTEXTURE9 texture;\r
- mof::GRAPHICS_DEVICE pDevice = mof::GraphicsDevice::getInstance()->getGraphicsDevice();\r
- HRESULT hr = D3DXCreateTextureFromFileEx(pDevice , m_path.c_str() , \r
- 0 , 0 , 1 , 0/*RENDER*/ , D3DFMT_UNKNOWN , D3DPOOL_MANAGED ,\r
- D3DX_DEFAULT , D3DX_DEFAULT , mof::createColor(0 , 0 , 0) , NULL , NULL , &texture);\r
-\r
- if(FAILED(hr)){\r
- *ConsoleOut::getInstance() << "CreateTexture --- " << DXGetErrorDescription9(hr) << std::endl;\r
- TextureRecord record;\r
- record.pTexture = NULL;\r
- return record;\r
- }\r
-\r
- TextureRecord record;\r
- record.pTexture = texture;\r
- record.validRect = mof::RectangleModel(0 , 0 , 0 , 0);//\91S\94Í\88Í\r
- return record;\r
-\r
+
+#include "mof/FileTextureBuilder.h"
+#include <d3dx9.h>
+#include <dxerr9.h>
+#include "GraphicsDevice.h"
+#include "mof/ConsoleIO.h"
+
+mof::FileTextureBuilder::FileTextureBuilder(mof::tstring& path)
+{
+ m_path = path;
+}
+
+mof::FileTextureBuilder::~FileTextureBuilder(void)
+{
+}
+
+
+mof::TextureRecord mof::FileTextureBuilder::create(){
+ LPDIRECT3DTEXTURE9 texture;
+ mof::GRAPHICS_DEVICE pDevice = mof::GraphicsDevice::getInstance()->getGraphicsDevice();
+ HRESULT hr = D3DXCreateTextureFromFileEx(pDevice , m_path.c_str() ,
+ 0 , 0 , 1 , 0/*RENDER*/ , D3DFMT_UNKNOWN , D3DPOOL_MANAGED ,
+ D3DX_DEFAULT , D3DX_DEFAULT , mof::createColor(0 , 0 , 0) , NULL , NULL , &texture);
+
+ if(FAILED(hr)){
+ *ConsoleOut::getInstance() << "CreateTexture --- " << DXGetErrorDescription9(hr) << std::endl;
+ TextureRecord record;
+ record.pTexture = NULL;
+ return record;
+ }
+
+ TextureRecord record;
+ record.pTexture = texture;
+ record.validRect = mof::RectangleModel(0 , 0 , 0 , 0);//\91S\94Í\88Í
+ return record;
+
}
\ No newline at end of file
-#pragma once\r
-\r
-\r
-namespace mof\r
-{\r
- \r
- \r
- //TODO \83R\83\93\83e\83i\82É\91ã\93ü\82Å\82«\82È\82¢\82æ\82¤\82É\82·\82é\r
- class Finalizer \r
- {\r
- mutable void (*m_finalize)( );\r
- \r
- public:\r
- Finalizer( )\r
- : m_finalize(NULL)\r
- {\r
- // do nothing\r
- }\r
- \r
- Finalizer( void (*finalize_)() )\r
- : m_finalize(finalize_)\r
- {\r
- // do nothing\r
- }\r
- \r
- Finalizer( const Finalizer& obj){\r
- if( this == &obj)return;\r
- m_finalize = obj.m_finalize;\r
- obj.m_finalize = NULL;\r
- }\r
- \r
- ~Finalizer( )\r
- {\r
- if( m_finalize )m_finalize();\r
- }\r
- \r
- void cancel( )\r
- {\r
- m_finalize = NULL;\r
- }\r
- \r
- Finalizer& operator = ( const Finalizer& obj )\r
- {\r
- if( this == &obj)return *this;\r
- if( m_finalize )m_finalize();\r
- m_finalize = obj.m_finalize;\r
- obj.m_finalize = NULL;\r
- return *this;\r
- }\r
- \r
- \r
- };\r
+#pragma once
+
+
+namespace mof
+{
+
+
+ //TODO \83R\83\93\83e\83i\82É\91ã\93ü\82Å\82«\82È\82¢\82æ\82¤\82É\82·\82é
+ class Finalizer
+ {
+ mutable void (*m_finalize)( );
+
+ public:
+ Finalizer( )
+ : m_finalize(NULL)
+ {
+ // do nothing
+ }
+
+ Finalizer( void (*finalize_)() )
+ : m_finalize(finalize_)
+ {
+ // do nothing
+ }
+
+ Finalizer( const Finalizer& obj){
+ if( this == &obj)return;
+ m_finalize = obj.m_finalize;
+ obj.m_finalize = NULL;
+ }
+
+ ~Finalizer( )
+ {
+ if( m_finalize )m_finalize();
+ }
+
+ void cancel( )
+ {
+ m_finalize = NULL;
+ }
+
+ Finalizer& operator = ( const Finalizer& obj )
+ {
+ if( this == &obj)return *this;
+ if( m_finalize )m_finalize();
+ m_finalize = obj.m_finalize;
+ obj.m_finalize = NULL;
+ return *this;
+ }
+
+
+ };
}
\ No newline at end of file
-#include "mof/Font.hpp"\r
-#include <list>\r
-#include <windows.h>\r
-#include "mof/ConsoleIO.hpp"\r
-#include <vector>\r
-#include "mof/utilities.hpp"\r
-\r
-#pragma comment(lib, "gdi32.lib")\r
-\r
-const TCHAR* mof::Font::MS_GOTHIC = _T("\82l\82r \83S\83V\83b\83N");\r
-const TCHAR* mof::Font::MS_P_GOTHIC = _T("\82l\82r \82o\83S\83V\83b\83N");\r
-\r
-\r
-namespace\r
-{\r
- struct FontManager \r
- {\r
- std::vector<mof::tstring> additionalFontResources;\r
- \r
- ~FontManager()\r
- {\r
- foreach( mof::tstring& filename , additionalFontResources )\r
- {\r
- RemoveFontResource( filename.c_str() );\r
- }\r
- }\r
- } g_fontManager;\r
-}\r
-\r
-struct GlyphData{\r
- int iOfs_x , iOfs_y , iBmp_w , iBmp_h , level , width;\r
- BYTE* pBmpBuffer;\r
- bool valid;\r
-\r
- GlyphData(GLYPHMETRICS& GM , TEXTMETRIC& TM , int _level , int bufSize){\r
- iOfs_x = GM.gmptGlyphOrigin.x;\r
- iOfs_y = TM.tmAscent - GM.gmptGlyphOrigin.y;\r
- iBmp_w = GM.gmBlackBoxX + (4-(GM.gmBlackBoxX%4))%4;\r
- iBmp_h = GM.gmBlackBoxY;\r
- level = _level;\r
- width = GM.gmCellIncX;\r
- pBmpBuffer = new BYTE[bufSize];\r
- valid = true;\r
- }\r
-\r
- ~GlyphData(){\r
- delete[] pBmpBuffer;\r
- }\r
-};\r
-\r
-struct mof::Font::Impl{\r
- HFONT hFont;\r
- size_t fontSize;\r
- mof::tstring font_name_;\r
- mof::font_context context_;\r
-\r
- Impl(const TCHAR* font_name, size_t fontSize_, const mof::font_context& context)\r
- : font_name_(font_name), hFont(NULL) ,fontSize(fontSize_), context_(context)\r
- {\r
- }\r
-\r
- ~Impl(){\r
- DeleteObject(hFont);\r
- }\r
-\r
-};\r
-\r
-mof::Font::Font(const TCHAR* fontName , size_t size)\r
-: m_pImpl(new Impl(fontName, size, mof::font_context()))\r
-{\r
- LOGFONT lf = {m_pImpl->fontSize , 0, 0, 0, FW_REGULAR, 0, 0, 0, SHIFTJIS_CHARSET, OUT_DEFAULT_PRECIS,\r
- CLIP_DEFAULT_PRECIS , DEFAULT_QUALITY, DEFAULT_PITCH, "" };\r
- //LOGFONT lf = {m_pImpl->fontSize , 0, 0, 0, 0, 0, 0, 0, SHIFTJIS_CHARSET, OUT_TT_ONLY_PRECIS,\r
- // CLIP_DEFAULT_PRECIS , PROOF_QUALITY, FIXED_PITCH | FF_MODERN , "" };\r
- strcpy_s(lf.lfFaceName , fontName );\r
-\r
- if(!(m_pImpl->hFont = CreateFontIndirect(&lf))){\r
- throw std::runtime_error("Failed --- CreateFontIndirect");\r
- }\r
-}\r
-\r
-\r
-mof::Font::Font(const TCHAR* fontName , size_t size, const mof::font_context& context)\r
-: m_pImpl(new Impl(fontName, size, context))\r
-{\r
- LOGFONT lf = {m_pImpl->fontSize , 0, 0, 0, FW_REGULAR, 0, 0, 0, SHIFTJIS_CHARSET, OUT_DEFAULT_PRECIS,\r
- CLIP_DEFAULT_PRECIS , DEFAULT_QUALITY, DEFAULT_PITCH, "" };\r
- //LOGFONT lf = {m_pImpl->fontSize , 0, 0, 0, 0, 0, 0, 0, SHIFTJIS_CHARSET, OUT_TT_ONLY_PRECIS,\r
- // CLIP_DEFAULT_PRECIS , PROOF_QUALITY, FIXED_PITCH | FF_MODERN , "" };\r
- strcpy_s(lf.lfFaceName , fontName );\r
-\r
- if(!(m_pImpl->hFont = CreateFontIndirect(&lf))){\r
- throw std::runtime_error("Failed --- CreateFontIndirect");\r
- }\r
-}\r
-\r
-mof::Font::~Font(){\r
- \r
-}\r
-\r
-mof::tstring mof::Font::name() const { return m_pImpl->font_name_; }\r
-size_t mof::Font::size() const { return m_pImpl->fontSize; }\r
-mof::font_context mof::Font::context() const { return m_pImpl->context_; }\r
-\r
-mof::PixelMap* mof::Font::createText(const mof::tstring& text) const{\r
-\r
- // \83f\83o\83C\83X\83R\83\93\83e\83L\83X\83g\8eæ\93¾\r
- // \83f\83o\83C\83X\82É\83t\83H\83\93\83g\82ð\8e\9d\82½\82¹\82È\82¢\82ÆGetGlyphOutline\8aÖ\90\94\82Í\83G\83\89\81[\82Æ\82È\82é\r
- HDC hdc = GetDC(NULL);\r
- HFONT oldFont = static_cast<HFONT>(SelectObject(hdc , m_pImpl->hFont));\r
- TEXTMETRIC TM;\r
- GetTextMetrics( hdc, &TM );\r
-\r
- int sumWidth = 0;\r
- int maxHeight = 0;\r
- typedef std::list<GlyphData*>::iterator GDITR;\r
- std::list<GlyphData*> glyphDataList;\r
- for(int i = 0 ; text.c_str()[i] ; ){\r
-\r
-\r
- // \95¶\8e\9a\83R\81[\83h\8eæ\93¾\r
- UINT code = 0;\r
- #if _UNICODE\r
- // unicode\82Ì\8fê\8d\87\81A\95¶\8e\9a\83R\81[\83h\82Í\92P\8f\83\82É\83\8f\83C\83h\95¶\8e\9a\82ÌUINT\95Ï\8a·\82Å\82·\r
- code = (UINT)str[i++];\r
- #else\r
- // \83}\83\8b\83`\83o\83C\83g\95¶\8e\9a\82Ì\8fê\8d\87\81A\r
- // 1\83o\83C\83g\95¶\8e\9a\82Ì\83R\81[\83h\82Í1\83o\83C\83g\96Ú\82ÌUINT\95Ï\8a·\81A\r
- // 2\83o\83C\83g\95¶\8e\9a\82Ì\83R\81[\83h\82Í[\90æ\93±\83R\81[\83h]*256 + [\95¶\8e\9a\83R\81[\83h]\82Å\82·\r
- if(IsDBCSLeadByte(text[i])){\r
- code = (text[i] << 8) | (text[i+1] & 0xff); // \95¶\8e\9a\r
- code &= 0x0000ffff;\r
- i += 2;\r
- }\r
- else{\r
- code = text[i++];\r
- }\r
- #endif\r
-\r
- unsigned int spaceCode = (_T(" ")[0]);\r
- unsigned int wSpaceCode = (_T("\81@")[0] << 8) | (_T("\81@")[1] & 0xff);\r
- wSpaceCode &= 0x0000ffff;\r
-\r
-\r
- // \83t\83H\83\93\83g\83r\83b\83g\83}\83b\83v\8eæ\93¾\r
- GLYPHMETRICS GM;\r
- CONST MAT2 Mat = {{0,1},{0,0},{0,0},{0,1}};\r
- DWORD size = GetGlyphOutline(hdc, code , GGO_GRAY8_BITMAP, &GM, 0, NULL, &Mat);\r
- GlyphData* pGD = new GlyphData(GM , TM , 65 , size);\r
- GetGlyphOutline(hdc, code, GGO_GRAY8_BITMAP, &GM, size, pGD->pBmpBuffer , &Mat);\r
-\r
- if(code == spaceCode || code == wSpaceCode){\r
- //\8bó\94\92\82Í\89½\8cÌ\82©\82¤\82Ü\82\8f\91\82«\8d\9e\82ß\82È\82¢\82±\82Æ\82Ö\82Ì\91Î\8f\88\r
- pGD->valid = false;\r
- }\r
- glyphDataList.push_back(pGD);\r
- sumWidth += pGD->width;//\91S\91Ì\82Ì\95\9d\r
- maxHeight = max(maxHeight , TM.tmHeight);\r
- }\r
-\r
- \r
- // \83f\83o\83C\83X\83R\83\93\83e\83L\83X\83g\82Æ\83t\83H\83\93\83g\83n\83\93\83h\83\8b\82Ì\8aJ\95ú\r
- SelectObject(hdc, oldFont);\r
- ReleaseDC(NULL, hdc);\r
-\r
- typedef mof::PixelMap::size_type size_type;\r
- boost::array<size_type , 2> sizes = {{ sumWidth , maxHeight }};\r
- mof::PixelMap* pPixelMap = new mof::PixelMap(sizes);\r
-\r
- // \83t\83H\83\93\83g\8fî\95ñ\82Ì\8f\91\82«\8d\9e\82Ý\r
- // iOfs_x, iOfs_y : \8f\91\82«\8fo\82µ\88Ê\92u(\8d¶\8fã)\r
- // iBmp_w, iBmp_h : \83t\83H\83\93\83g\83r\83b\83g\83}\83b\83v\82Ì\95\9d\8d\82\r
- // Level : \83¿\92l\82Ì\92i\8aK (GGO_GRAY4_BITMAP\82È\82Ì\82Å17\92i\8aK)\r
-\r
- DWORD Alpha, Color;\r
- int hoseiX = 0;\r
- for(int y = 0 ; y < maxHeight ; y++){\r
- for(int x = 0 ; x < sumWidth ; x++){\r
- (*pPixelMap)[x][y] = 0;\r
- }\r
- }\r
-\r
- mof::Color4f color = context().font_color;\r
- color.alpha = 0;\r
- mof::Color code = color.toColorCode();\r
- for(GDITR itr = glyphDataList.begin() ; itr != glyphDataList.end() ; ++itr){\r
- for(int y = (*itr)->iOfs_y; y < (*itr)->iOfs_y + (*itr)->iBmp_h; y++){\r
- if(!(*itr)->valid)break;//\8bó\94\92\95¶\8e\9a\82È\82ç\8f\91\82«\8d\9e\82Ý\82ð\96³\8e\8b\82·\82é\r
- for(int x = (*itr)->iOfs_x + hoseiX ; x < (*itr)->iOfs_x + (*itr)->iBmp_w + hoseiX && x < sumWidth ; x++){\r
- Alpha = (255 * (*itr)->pBmpBuffer[x - ((*itr)->iOfs_x + hoseiX) + (*itr)->iBmp_w * ( y - (*itr)->iOfs_y ) ] ) / ((*itr)->level-1);\r
- //Color = 0x00ffffff | (Alpha<<24);\r
- Color = code | (Alpha<<24);\r
- \r
- (*pPixelMap)[x][y] = Color;\r
- \r
- }\r
- }\r
- hoseiX += (*itr)->width;\r
- delete *itr;\r
- }\r
-\r
- return pPixelMap;\r
-}\r
-\r
-\r
-bool mof::Font::addFontResource(const mof::tstring& filename ){\r
- g_fontManager.additionalFontResources.push_back(filename);\r
- return AddFontResource( filename.c_str() ) ? true : false ;\r
-}\r
+#include "mof/Font.hpp"
+#include <list>
+#include <windows.h>
+#include "mof/ConsoleIO.hpp"
+#include <vector>
+#include "mof/utilities.hpp"
+
+#pragma comment(lib, "gdi32.lib")
+
+const TCHAR* mof::Font::MS_GOTHIC = _T("\82l\82r \83S\83V\83b\83N");
+const TCHAR* mof::Font::MS_P_GOTHIC = _T("\82l\82r \82o\83S\83V\83b\83N");
+
+
+namespace
+{
+ struct FontManager
+ {
+ std::vector<mof::tstring> additionalFontResources;
+
+ ~FontManager()
+ {
+ foreach( mof::tstring& filename , additionalFontResources )
+ {
+ RemoveFontResource( filename.c_str() );
+ }
+ }
+ } g_fontManager;
+}
+
+struct GlyphData{
+ int iOfs_x , iOfs_y , iBmp_w , iBmp_h , level , width;
+ BYTE* pBmpBuffer;
+ bool valid;
+
+ GlyphData(GLYPHMETRICS& GM , TEXTMETRIC& TM , int _level , int bufSize){
+ iOfs_x = GM.gmptGlyphOrigin.x;
+ iOfs_y = TM.tmAscent - GM.gmptGlyphOrigin.y;
+ iBmp_w = GM.gmBlackBoxX + (4-(GM.gmBlackBoxX%4))%4;
+ iBmp_h = GM.gmBlackBoxY;
+ level = _level;
+ width = GM.gmCellIncX;
+ pBmpBuffer = new BYTE[bufSize];
+ valid = true;
+ }
+
+ ~GlyphData(){
+ delete[] pBmpBuffer;
+ }
+};
+
+struct mof::Font::Impl{
+ HFONT hFont;
+ size_t fontSize;
+ mof::tstring font_name_;
+ mof::font_context context_;
+
+ Impl(const TCHAR* font_name, size_t fontSize_, const mof::font_context& context)
+ : font_name_(font_name), hFont(NULL) ,fontSize(fontSize_), context_(context)
+ {
+ }
+
+ ~Impl(){
+ DeleteObject(hFont);
+ }
+
+};
+
+mof::Font::Font(const TCHAR* fontName , size_t size)
+: m_pImpl(new Impl(fontName, size, mof::font_context()))
+{
+ LOGFONT lf = {m_pImpl->fontSize , 0, 0, 0, FW_REGULAR, 0, 0, 0, SHIFTJIS_CHARSET, OUT_DEFAULT_PRECIS,
+ CLIP_DEFAULT_PRECIS , DEFAULT_QUALITY, DEFAULT_PITCH, "" };
+ //LOGFONT lf = {m_pImpl->fontSize , 0, 0, 0, 0, 0, 0, 0, SHIFTJIS_CHARSET, OUT_TT_ONLY_PRECIS,
+ // CLIP_DEFAULT_PRECIS , PROOF_QUALITY, FIXED_PITCH | FF_MODERN , "" };
+ strcpy_s(lf.lfFaceName , fontName );
+
+ if(!(m_pImpl->hFont = CreateFontIndirect(&lf))){
+ throw std::runtime_error("Failed --- CreateFontIndirect");
+ }
+}
+
+
+mof::Font::Font(const TCHAR* fontName , size_t size, const mof::font_context& context)
+: m_pImpl(new Impl(fontName, size, context))
+{
+ LOGFONT lf = {m_pImpl->fontSize , 0, 0, 0, FW_REGULAR, 0, 0, 0, SHIFTJIS_CHARSET, OUT_DEFAULT_PRECIS,
+ CLIP_DEFAULT_PRECIS , DEFAULT_QUALITY, DEFAULT_PITCH, "" };
+ //LOGFONT lf = {m_pImpl->fontSize , 0, 0, 0, 0, 0, 0, 0, SHIFTJIS_CHARSET, OUT_TT_ONLY_PRECIS,
+ // CLIP_DEFAULT_PRECIS , PROOF_QUALITY, FIXED_PITCH | FF_MODERN , "" };
+ strcpy_s(lf.lfFaceName , fontName );
+
+ if(!(m_pImpl->hFont = CreateFontIndirect(&lf))){
+ throw std::runtime_error("Failed --- CreateFontIndirect");
+ }
+}
+
+mof::Font::~Font(){
+
+}
+
+mof::tstring mof::Font::name() const { return m_pImpl->font_name_; }
+size_t mof::Font::size() const { return m_pImpl->fontSize; }
+mof::font_context mof::Font::context() const { return m_pImpl->context_; }
+
+mof::PixelMap* mof::Font::createText(const mof::tstring& text) const{
+
+ // \83f\83o\83C\83X\83R\83\93\83e\83L\83X\83g\8eæ\93¾
+ // \83f\83o\83C\83X\82É\83t\83H\83\93\83g\82ð\8e\9d\82½\82¹\82È\82¢\82ÆGetGlyphOutline\8aÖ\90\94\82Í\83G\83\89\81[\82Æ\82È\82é
+ HDC hdc = GetDC(NULL);
+ HFONT oldFont = static_cast<HFONT>(SelectObject(hdc , m_pImpl->hFont));
+ TEXTMETRIC TM;
+ GetTextMetrics( hdc, &TM );
+
+ int sumWidth = 0;
+ int maxHeight = 0;
+ typedef std::list<GlyphData*>::iterator GDITR;
+ std::list<GlyphData*> glyphDataList;
+ for(int i = 0 ; text.c_str()[i] ; ){
+
+
+ // \95¶\8e\9a\83R\81[\83h\8eæ\93¾
+ UINT code = 0;
+ #if _UNICODE
+ // unicode\82Ì\8fê\8d\87\81A\95¶\8e\9a\83R\81[\83h\82Í\92P\8f\83\82É\83\8f\83C\83h\95¶\8e\9a\82ÌUINT\95Ï\8a·\82Å\82·
+ code = (UINT)str[i++];
+ #else
+ // \83}\83\8b\83`\83o\83C\83g\95¶\8e\9a\82Ì\8fê\8d\87\81A
+ // 1\83o\83C\83g\95¶\8e\9a\82Ì\83R\81[\83h\82Í1\83o\83C\83g\96Ú\82ÌUINT\95Ï\8a·\81A
+ // 2\83o\83C\83g\95¶\8e\9a\82Ì\83R\81[\83h\82Í[\90æ\93±\83R\81[\83h]*256 + [\95¶\8e\9a\83R\81[\83h]\82Å\82·
+ if(IsDBCSLeadByte(text[i])){
+ code = (text[i] << 8) | (text[i+1] & 0xff); // \95¶\8e\9a
+ code &= 0x0000ffff;
+ i += 2;
+ }
+ else{
+ code = text[i++];
+ }
+ #endif
+
+ unsigned int spaceCode = (_T(" ")[0]);
+ unsigned int wSpaceCode = (_T("\81@")[0] << 8) | (_T("\81@")[1] & 0xff);
+ wSpaceCode &= 0x0000ffff;
+
+
+ // \83t\83H\83\93\83g\83r\83b\83g\83}\83b\83v\8eæ\93¾
+ GLYPHMETRICS GM;
+ CONST MAT2 Mat = {{0,1},{0,0},{0,0},{0,1}};
+ DWORD size = GetGlyphOutline(hdc, code , GGO_GRAY8_BITMAP, &GM, 0, NULL, &Mat);
+ GlyphData* pGD = new GlyphData(GM , TM , 65 , size);
+ GetGlyphOutline(hdc, code, GGO_GRAY8_BITMAP, &GM, size, pGD->pBmpBuffer , &Mat);
+
+ if(code == spaceCode || code == wSpaceCode){
+ //\8bó\94\92\82Í\89½\8cÌ\82©\82¤\82Ü\82\8f\91\82«\8d\9e\82ß\82È\82¢\82±\82Æ\82Ö\82Ì\91Î\8f\88
+ pGD->valid = false;
+ }
+ glyphDataList.push_back(pGD);
+ sumWidth += pGD->width;//\91S\91Ì\82Ì\95\9d
+ maxHeight = max(maxHeight , TM.tmHeight);
+ }
+
+
+ // \83f\83o\83C\83X\83R\83\93\83e\83L\83X\83g\82Æ\83t\83H\83\93\83g\83n\83\93\83h\83\8b\82Ì\8aJ\95ú
+ SelectObject(hdc, oldFont);
+ ReleaseDC(NULL, hdc);
+
+ typedef mof::PixelMap::size_type size_type;
+ boost::array<size_type , 2> sizes = {{ sumWidth , maxHeight }};
+ mof::PixelMap* pPixelMap = new mof::PixelMap(sizes);
+
+ // \83t\83H\83\93\83g\8fî\95ñ\82Ì\8f\91\82«\8d\9e\82Ý
+ // iOfs_x, iOfs_y : \8f\91\82«\8fo\82µ\88Ê\92u(\8d¶\8fã)
+ // iBmp_w, iBmp_h : \83t\83H\83\93\83g\83r\83b\83g\83}\83b\83v\82Ì\95\9d\8d\82
+ // Level : \83¿\92l\82Ì\92i\8aK (GGO_GRAY4_BITMAP\82È\82Ì\82Å17\92i\8aK)
+
+ DWORD Alpha, Color;
+ int hoseiX = 0;
+ for(int y = 0 ; y < maxHeight ; y++){
+ for(int x = 0 ; x < sumWidth ; x++){
+ (*pPixelMap)[x][y] = 0;
+ }
+ }
+
+ mof::Color4f color = context().font_color;
+ color.alpha = 0;
+ mof::Color code = color.toColorCode();
+ for(GDITR itr = glyphDataList.begin() ; itr != glyphDataList.end() ; ++itr){
+ for(int y = (*itr)->iOfs_y; y < (*itr)->iOfs_y + (*itr)->iBmp_h; y++){
+ if(!(*itr)->valid)break;//\8bó\94\92\95¶\8e\9a\82È\82ç\8f\91\82«\8d\9e\82Ý\82ð\96³\8e\8b\82·\82é
+ for(int x = (*itr)->iOfs_x + hoseiX ; x < (*itr)->iOfs_x + (*itr)->iBmp_w + hoseiX && x < sumWidth ; x++){
+ Alpha = (255 * (*itr)->pBmpBuffer[x - ((*itr)->iOfs_x + hoseiX) + (*itr)->iBmp_w * ( y - (*itr)->iOfs_y ) ] ) / ((*itr)->level-1);
+ //Color = 0x00ffffff | (Alpha<<24);
+ Color = code | (Alpha<<24);
+
+ (*pPixelMap)[x][y] = Color;
+
+ }
+ }
+ hoseiX += (*itr)->width;
+ delete *itr;
+ }
+
+ return pPixelMap;
+}
+
+
+bool mof::Font::addFontResource(const mof::tstring& filename ){
+ g_fontManager.additionalFontResources.push_back(filename);
+ return AddFontResource( filename.c_str() ) ? true : false ;
+}
-#ifndef MOF_FONT_HPP\r
-#define MOF_FONT_HPP\r
-#include <memory>\r
-#include "mof/tstring.hpp"\r
-#include "mof/PixelMap.hpp"\r
-\r
-namespace mof{\r
-\r
- struct font_context\r
- {\r
- mof::Color4f font_color; \r
-\r
- font_context()\r
- : font_color(1, 1, 1, 1)\r
- {\r
- }\r
- };\r
-\r
-class Font{\r
- struct Impl;\r
- std::shared_ptr<Impl> m_pImpl;\r
-\r
-public:\r
- Font(const TCHAR* fontName , size_t size);\r
- Font(const TCHAR* fontName , size_t size, const font_context& context);\r
- ~Font();\r
- mof::tstring name() const;\r
- size_t size() const;\r
- mof::font_context context() const;\r
-\r
- mof::PixelMap* createText(const mof::tstring& text) const;\r
-\r
- static const TCHAR* MS_GOTHIC;\r
- static const TCHAR* MS_P_GOTHIC;\r
- \r
- static bool addFontResource(const mof::tstring& filename );\r
-};\r
-\r
-}\r
-\r
-\r
-\r
-#endif\r
+#ifndef MOF_FONT_HPP
+#define MOF_FONT_HPP
+#include <memory>
+#include "mof/tstring.hpp"
+#include "mof/PixelMap.hpp"
+
+namespace mof{
+
+ struct font_context
+ {
+ mof::Color4f font_color;
+
+ font_context()
+ : font_color(1, 1, 1, 1)
+ {
+ }
+ };
+
+class Font{
+ struct Impl;
+ std::shared_ptr<Impl> m_pImpl;
+
+public:
+ Font(const TCHAR* fontName , size_t size);
+ Font(const TCHAR* fontName , size_t size, const font_context& context);
+ ~Font();
+ mof::tstring name() const;
+ size_t size() const;
+ mof::font_context context() const;
+
+ mof::PixelMap* createText(const mof::tstring& text) const;
+
+ static const TCHAR* MS_GOTHIC;
+ static const TCHAR* MS_P_GOTHIC;
+
+ static bool addFontResource(const mof::tstring& filename );
+};
+
+}
+
+
+
+#endif
-#ifndef MOF_GRAPHICS3D_HPP\r
-#define MOF_GRAPHICS3D_HPP\r
-#include "mof/Component3D.hpp"\r
-#include "mof/SceneGraph.hpp"\r
-#include "mof/Texture.hpp"\r
-#include <memory>\r
-\r
-namespace mof{\r
-\r
-\r
-class Graphics3D : public Component3D , public SceneGraph {\r
-public :\r
- typedef std::shared_ptr<Graphics3D> ptr;\r
- virtual ~Graphics3D(){}\r
- //virtual const mof::GraphicsUnit& getUnit() = 0;\r
- virtual void setTexture( \r
- unsigned int num , const std::shared_ptr<mof::Texture>& pTexture) = 0;\r
-\r
-};\r
-\r
-}\r
-\r
-#endif\r
+#ifndef MOF_GRAPHICS3D_HPP
+#define MOF_GRAPHICS3D_HPP
+#include "mof/Component3D.hpp"
+#include "mof/SceneGraph.hpp"
+#include "mof/Texture.hpp"
+#include <memory>
+
+namespace mof{
+
+
+class Graphics3D : public Component3D , public SceneGraph {
+public :
+ typedef std::shared_ptr<Graphics3D> ptr;
+ virtual ~Graphics3D(){}
+ //virtual const mof::GraphicsUnit& getUnit() = 0;
+ virtual void setTexture(
+ unsigned int num , const std::shared_ptr<mof::Texture>& pTexture) = 0;
+
+};
+
+}
+
+#endif
-#pragma comment(lib,"d3d9.lib")\r
-#pragma comment(lib,"d3dx9.lib")\r
-#pragma comment(lib,"d3dxof.lib")\r
-#pragma comment(lib,"d3dx9d.lib")\r
-#pragma comment(lib,"dxguid.lib")\r
-\r
-#include "mof/private/GraphicsDeviceImpl.hpp"\r
-#include "mof/ConsoleIO.hpp"\r
-#include <list>\r
-#include <stdexcept>\r
-#include "mof/private/VertexFVF.hpp"\r
-#include "mof/Material.hpp"\r
-#include "mof/private/TextureImpl.hpp"\r
-\r
-namespace \r
-{\r
- \r
- HWND m_hWnd = NULL;\r
- int m_width;\r
- int m_height;\r
- LPDIRECT3DDEVICE9 m_pDevice = NULL;\r
- LPDIRECT3D9 m_pD3D = NULL;\r
- D3DPRESENT_PARAMETERS* m_pParam = NULL;\r
- IDirect3DStateBlock9* m_pNormalBlendingBlock = NULL;\r
- IDirect3DStateBlock9* m_pAddBlendingBlock = NULL;\r
- IDirect3DStateBlock9* m_pAlphaBlendingBlock = NULL;\r
- int m_currentStateBlock;\r
- mof::Matrix3D m_worldTransform;\r
- mof::Matrix3D m_viewTransform;\r
- mof::Matrix3D m_projectionTransform;\r
- bool m_flagActive;\r
- bool m_flagDeviceLost;\r
- bool ignore_drawing_ = false;///< viewport\82ª\90§\8cä\r
-}\r
-\r
-\r
-inline bool isOK(HRESULT hr){\r
- return hr == S_OK;\r
-}\r
-\r
-\r
-namespace mof\r
-{\r
- template void GraphicsDevice::drawVertexArray( const VertexXYZRHWCUV& , const VertexXYZRHWCUV& , PRIMITIVE_TYPE );\r
- template void GraphicsDevice::drawVertexArray( const VertexXYZRHWC& , const VertexXYZRHWC& , PRIMITIVE_TYPE);\r
- template void GraphicsDevice::drawVertexArray( const VertexXYZCUV& , const VertexXYZCUV& , PRIMITIVE_TYPE);\r
- template void GraphicsDevice::drawVertexArray( const VertexXYZNUV& , const VertexXYZNUV& , PRIMITIVE_TYPE);\r
- template void GraphicsDevice::drawVertexArray( const VertexXYZC& , const VertexXYZC& , PRIMITIVE_TYPE);\r
-\r
-\r
-//{{{ initialize\r
- //TODO \8aÖ\90\94\95ª\8a\84\r
- void GraphicsDevice::initialize( HWND hWnd, int adapter_id, int width , int height , bool fullscreen )\r
- {\r
- \r
- HRESULT hr;\r
- m_hWnd = hWnd;\r
- m_width = width;\r
- m_height = height;\r
-\r
- if( NULL == ( m_pD3D = Direct3DCreate9( D3D_SDK_VERSION ) ) )\r
- {\r
- throw std::runtime_error( "Failed --- Direct3DCreate9" );\r
- }\r
-\r
- m_pParam = new D3DPRESENT_PARAMETERS;\r
- ZeroMemory( m_pParam, sizeof(D3DPRESENT_PARAMETERS) );\r
- m_pParam->Windowed = (fullscreen)? FALSE : TRUE; //TRUE=Window,FALSE=FULLSCREEN\r
- m_pParam->BackBufferCount = 1;\r
- m_pParam->PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;\r
-\r
- if( fullscreen )\r
- {\r
- //\83t\83\8b\83X\83N\83\8a\81[\83\93\8e\9e\82Í\83o\83b\83N\83o\83b\83t\83@\82Ì\95\9d\81A\8d\82\82³\82ð\8dÄ\8ew\92è\r
- m_pParam->BackBufferWidth = width; //\95\9d\r
- m_pParam->BackBufferHeight = height; //\8d\82\82³\r
- m_pParam->BackBufferFormat = D3DFMT_X8R8G8B8; //16bit\r
- //m_pParam->BackBufferFormat = D3DFMT_R5G6B5; //16bit\r
- m_pParam->FullScreen_RefreshRateInHz = D3DPRESENT_RATE_DEFAULT;\r
- }\r
- else\r
- {\r
- m_pParam->BackBufferFormat = D3DFMT_UNKNOWN; //\8c»\8dÝ\82Ì\89æ\96Ê\83\82\81[\83h\82ð\97\98\97p\r
- }\r
- m_pParam->SwapEffect = D3DSWAPEFFECT_DISCARD;\r
- // Z \83o\83b\83t\83@\82Ì\8e©\93®\8dì\90¬\r
- m_pParam->EnableAutoDepthStencil = 1;\r
- m_pParam->AutoDepthStencilFormat = D3DFMT_D16;\r
- \r
-\r
- \r
-\r
- //HAL(pure vp)\r
- if\r
- ( \r
- FAILED\r
- ( \r
- hr = \r
- m_pD3D->CreateDevice\r
- (\r
- adapter_id, D3DDEVTYPE_HAL , m_hWnd ,\r
- D3DCREATE_HARDWARE_VERTEXPROCESSING , m_pParam , &m_pDevice\r
- )\r
- )\r
- )\r
- {\r
- //HAL(soft vp)\r
- if\r
- (\r
- FAILED\r
- ( \r
- hr =\r
- m_pD3D->CreateDevice\r
- (\r
- adapter_id, D3DDEVTYPE_HAL , m_hWnd ,\r
- D3DCREATE_SOFTWARE_VERTEXPROCESSING , m_pParam , &(m_pDevice) \r
- )\r
- )\r
- )\r
- {\r
- //REF\r
- if\r
- ( \r
- FAILED(\r
- hr = \r
- m_pD3D->CreateDevice\r
- (\r
- adapter_id, D3DDEVTYPE_REF , m_hWnd ,\r
- D3DCREATE_HARDWARE_VERTEXPROCESSING , m_pParam , &m_pDevice\r
- )\r
- )\r
- )\r
- {\r
- delete m_pParam;\r
- m_pD3D->Release();\r
- throw std::runtime_error(std::string("Failed --- CreateDevice"));\r
- }\r
- } // if\r
- } // if\r
- \r
- setViewport( mof::Rectangle<int>(0 , 0 , width , height) );\r
- \r
- //\r
- m_pDevice->SetSamplerState(0 , D3DSAMP_MAGFILTER , D3DTEXF_LINEAR ); //D3DTEXF_POINT \r
- m_pDevice->SetSamplerState(0 , D3DSAMP_MINFILTER , D3DTEXF_LINEAR ); //D3DTEXF_POINT \r
- \r
- \r
- m_pDevice->SetSamplerState(0, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP);\r
- m_pDevice->BeginStateBlock( );\r
- m_pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE , TRUE );\r
- m_pDevice->SetRenderState( D3DRS_SRCBLEND,D3DBLEND_SRCALPHA );\r
- m_pDevice->SetRenderState( D3DRS_DESTBLEND,D3DBLEND_ONE );\r
- m_pDevice->SetTextureStageState( 0 , D3DTSS_ALPHAOP,D3DTOP_MODULATE ); //ARG1\82ÆARG2\82Ì\83¿\92l\82ð\8fæ\8eZ\82µ\82Ä\83¿\92l\82ð\8eæ\93¾\82µ\82Ü\82·\81B\r
- m_pDevice->SetTextureStageState( 0 , D3DTSS_ALPHAARG1,D3DTA_DIFFUSE ); //\83e\83N\83X\83`\83\83\82Ì\83¿\92l\r
- m_pDevice->SetTextureStageState( 0 , D3DTSS_ALPHAARG2,D3DTA_TEXTURE ); //\92¸\93_\82Ì\83¿\r
- m_pDevice->SetTextureStageState( 0 , D3DTSS_COLOROP,D3DTOP_MODULATE ); //ARG1\82ÆARG2\82Ì\83J\83\89\81[\82Ì\92l\82ð\8fæ\8eZ\82µ\82Ü\82·\81B\r
- m_pDevice->SetTextureStageState( 0 , D3DTSS_COLORARG1,D3DTA_TEXTURE ); //\83e\83N\83X\83`\83\83\82Ì\83J\83\89\81[\r
- m_pDevice->SetTextureStageState( 0 , D3DTSS_COLORARG2,D3DTA_DIFFUSE ); //\92¸\93_\82Ì\83J\83\89\81[\r
- m_pDevice->EndStateBlock( &m_pAddBlendingBlock );\r
-\r
- m_pDevice->BeginStateBlock( );\r
- m_pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE , TRUE );\r
- m_pDevice->SetRenderState( D3DRS_SRCBLEND , D3DBLEND_SRCALPHA );\r
- m_pDevice->SetRenderState( D3DRS_DESTBLEND , D3DBLEND_INVSRCALPHA );\r
- m_pDevice->SetTextureStageState( 0 ,D3DTSS_ALPHAOP , D3DTOP_SELECTARG2 ); //ARG1\82ÆARG2\82Ì\83¿\92l\82ð\8fæ\8eZ\82µ\82Ä\83¿\92l\82ð\8eæ\93¾\82µ\82Ü\82·\81B\r
- m_pDevice->SetTextureStageState( 0 ,D3DTSS_ALPHAARG1 , D3DTA_DIFFUSE ); //\83e\83N\83X\83`\83\83\82Ì\83¿\92l\r
- m_pDevice->SetTextureStageState( 0 ,D3DTSS_ALPHAARG2 , D3DTA_TEXTURE ); //\92¸\93_\82Ì\83¿\92l\r
- m_pDevice->SetTextureStageState( 0 ,D3DTSS_COLOROP , D3DTOP_MODULATE ); //ARG1\82ÆARG2\82Ì\83J\83\89\81[\82Ì\92l\82ð\8fæ\8eZ\82µ\82Ü\82·\81B\r
- m_pDevice->SetTextureStageState( 0 ,D3DTSS_COLORARG1 , D3DTA_DIFFUSE ); //\83e\83N\83X\83`\83\83\82Ì\83J\83\89\81[\r
- m_pDevice->SetTextureStageState( 0 ,D3DTSS_COLORARG2 , D3DTA_TEXTURE ); //\92¸\93_\82Ì\83J\83\89\81[\r
- m_pDevice->EndStateBlock( &m_pNormalBlendingBlock );\r
-\r
- m_pDevice->BeginStateBlock( );\r
- m_pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE , TRUE );\r
- m_pDevice->SetRenderState( D3DRS_SRCBLEND , D3DBLEND_SRCALPHA );\r
- m_pDevice->SetRenderState( D3DRS_DESTBLEND , D3DBLEND_INVSRCALPHA );\r
- m_pDevice->SetTextureStageState( 0,D3DTSS_ALPHAOP , D3DTOP_MODULATE ); //ARG1\82ÆARG2\82Ì\83¿\92l\82ð\8fæ\8eZ\82µ\82Ä\83¿\92l\82ð\8eæ\93¾\82µ\82Ü\82·\81B\r
- m_pDevice->SetTextureStageState( 0,D3DTSS_ALPHAARG1 , D3DTA_DIFFUSE ); //\83e\83N\83X\83`\83\83\82Ì\83¿\92l\r
- m_pDevice->SetTextureStageState( 0,D3DTSS_ALPHAARG2 , D3DTA_TEXTURE ); //\92¸\93_\82Ì\83¿\92l\r
- m_pDevice->SetTextureStageState( 0,D3DTSS_COLOROP , D3DTOP_MODULATE ); //ARG1\82ÆARG2\82Ì\83J\83\89\81[\82Ì\92l\82ð\8fæ\8eZ\82µ\82Ü\82·\81B\r
- m_pDevice->SetTextureStageState( 0,D3DTSS_COLORARG1 , D3DTA_DIFFUSE ); //\83e\83N\83X\83`\83\83\82Ì\83J\83\89\81[\r
- m_pDevice->SetTextureStageState( 0,D3DTSS_COLORARG2 , D3DTA_TEXTURE ); //\92¸\93_\82Ì\83J\83\89\81[\r
- m_pDevice->EndStateBlock( &m_pAlphaBlendingBlock );\r
- \r
- setProjectionTransform(0.1f , 100);\r
- setWorldTransform(m_worldTransform);\r
- } // function initialize\r
-//}}}\r
-//{{{ finalize\r
- void GraphicsDevice::finalize( )\r
- {\r
- m_pAddBlendingBlock->Release();\r
- m_pNormalBlendingBlock->Release();\r
- m_pAlphaBlendingBlock->Release();\r
- if(m_pDevice != NULL)m_pDevice->Release();\r
- if(m_pD3D != NULL)m_pD3D->Release();\r
- delete m_pParam;\r
- }\r
-//}}}\r
-//{{{ beginScene\r
- void GraphicsDevice::beginScene( )\r
- {\r
- \r
-\r
- if(true == m_flagDeviceLost)\r
- { \r
- Sleep(100); // 0.1\95b\91Ò\82Â\r
- if(/*m_flagActive == true &&*/ m_pDevice->TestCooperativeLevel() == D3DERR_DEVICENOTRESET )\r
- {\r
- //---\83f\83o\83C\83X\95\9c\8bA\82ð\8e\8e\82Ý\82é\r
- \r
- if( FAILED( m_pDevice->Reset( m_pParam) ) )return;\r
- \r
- //\83f\83o\83C\83X\82Ì\95\9c\8bA\82É\90¬\8c÷\r
- m_flagDeviceLost = false;\r
- //---\83X\83e\81[\83g\82ð\95\9c\8bA\r
- DEBUG_PRINT( "DeviceRecovered!" );\r
- }\r
- else return;\r
- }\r
- \r
- \r
-\r
- if( !isOK( m_pDevice->BeginScene( ) ) )\r
- {\r
- throw std::runtime_error("Failed --- BeginScene");\r
- }\r
-\r
-\r
- } // function beginScene\r
-//}}} \r
-//{{{ endScene\r
- void GraphicsDevice::endScene( )\r
- {\r
- \r
- if( !isOK( m_pDevice->EndScene() ) )\r
- {\r
- throw std::runtime_error("Failed --- EndScene");\r
- }\r
-\r
- //\83o\83b\83N\83o\83b\83t\83@\82©\82ç\83v\83\89\83C\83}\83\8a\83o\83b\83t\83@\82Ö\93]\91\97\r
- HRESULT hr = m_pDevice->Present( NULL, NULL, NULL, NULL );\r
- \r
- if( hr == D3DERR_DEVICELOST && false == m_flagDeviceLost )\r
- {\r
- DEBUG_PRINT( "DeviceLost!" );\r
- m_flagDeviceLost = true;\r
- //\83\8a\83\\81[\83X\82Ì\89ð\95ú\8f\88\97\9d\r
-\r
- }\r
-\r
- \r
- if( !isOK( hr ) )throw std::runtime_error("Present");\r
- \r
-\r
- } // function endScene\r
-//}}}\r
-//{{{ setWorldTransform\r
- void GraphicsDevice::setWorldTransform( const mof::Matrix3D& matrix )\r
- {\r
- m_worldTransform = matrix;\r
- D3DXMATRIX mat;\r
- for(int i = 0 ; i < 4 ; ++i ){\r
- for(int j = 0 ; j < 4 ; ++j){\r
- mat(i , j) = matrix.at(i , j);\r
- }\r
- }\r
- m_pDevice->SetTransform( D3DTS_WORLD, &mat );\r
- }\r
-//}}}\r
-//{{{ setProjectionTransform\r
- void GraphicsDevice::setProjectionTransform( real min , real max )\r
- {\r
- D3DXMATRIX matProj;\r
- D3DXMatrixPerspectiveFovLH\r
- ( \r
- &matProj, D3DX_PI / 4.0f, \r
- static_cast<float>(getViewportWidth()) / static_cast<float>(getViewportHeight()) , min, max\r
- );\r
-\r
- mof::Matrix3D::Array arry;\r
- for(int i = 0 ; i < 4 ; ++i ){\r
- for(int j = 0 ; j < 4 ; ++j){\r
- arry.elements[i][j] = matProj( i , j );\r
- }\r
- }\r
- m_projectionTransform = mof::Matrix3D( arry );\r
- m_pDevice->SetTransform( D3DTS_PROJECTION , &matProj );\r
-\r
- } \r
-//}}}\r
-//{{{ setViewTransform\r
- void GraphicsDevice::setViewTransform( const mof::Matrix3D& matrix )\r
- {\r
- m_viewTransform = matrix;\r
- D3DXMATRIX mat;\r
- for(int i = 0 ; i < 4 ; ++i ){\r
- for(int j = 0 ; j < 4 ; ++j){\r
- mat(i , j) = matrix.at(i , j);\r
- }\r
- }\r
- m_pDevice->SetTransform( D3DTS_VIEW , &mat );\r
- }\r
-//}}}\r
-//{{{ getWorldTransform\r
- const mof::Matrix3D& GraphicsDevice::getWorldTransform( ) \r
- {\r
- return m_worldTransform;\r
- }\r
-//}}}\r
-//{{{ getProjectionTransform\r
- const mof::Matrix3D& GraphicsDevice::getProjectionTransform() \r
- {\r
- return m_projectionTransform;\r
- }\r
-//}}} \r
-//{{{ getViewTransform\r
- const mof::Matrix3D& GraphicsDevice::getViewTransform()\r
- {\r
- return m_viewTransform;\r
- }\r
-//}}}\r
-//{{{ get_num_of_displays\r
- int GraphicsDevice::get_num_of_displays()\r
- {\r
- // TODO\r
- return 0;\r
- }\r
-//}}}\r
-//{{{ get_caps\r
- std::vector<mof::Vector2D> GraphicsDevice::get_caps(int adapter_id)\r
- {\r
-\r
- LPDIRECT3D9 tmp_pD3D = NULL;\r
- if (m_pD3D != NULL) tmp_pD3D = m_pD3D;\r
- else tmp_pD3D = Direct3DCreate9( D3D_SDK_VERSION );\r
- \r
- std::vector<mof::Vector2D> resolutions; \r
- int num = tmp_pD3D->GetAdapterModeCount(adapter_id, D3DFMT_X8R8G8B8);\r
- D3DDISPLAYMODE mode = {0, 0, 0, D3DFMT_UNKNOWN};\r
- for (int i = 0; i < num; i++) {\r
- tmp_pD3D->EnumAdapterModes(adapter_id, D3DFMT_X8R8G8B8, i, &mode);\r
- if (mode.RefreshRate == 60) {\r
- resolutions.push_back(mof::Vector2D(static_cast<float>(mode.Width), static_cast<float>(mode.Height)));\r
- }\r
- }\r
- if (m_pD3D == NULL) tmp_pD3D->Release();\r
- return resolutions;\r
- }\r
-//}}}\r
-//{{{ setZBuffer \r
- void GraphicsDevice::setZBuffer( bool available )\r
- {\r
- if( available )m_pDevice->SetRenderState( D3DRS_ZENABLE, D3DZB_TRUE );\r
- else m_pDevice->SetRenderState( D3DRS_ZENABLE , D3DZB_FALSE ); \r
- }\r
-//}}}\r
-//{{{ lightEnable\r
- void GraphicsDevice::lightEnable( bool available )\r
- {\r
- m_pDevice->SetRenderState( D3DRS_LIGHTING , available );\r
- }\r
-//}}}\r
-//{{{ clearZBuffer\r
- void GraphicsDevice::clearZBuffer()\r
- {\r
- m_pDevice->Clear( 0 , NULL , D3DCLEAR_ZBUFFER , 0 , 1.0f, 0 );\r
- }\r
-//}}}\r
-//{{{ clearRenderTarget\r
- void GraphicsDevice::clearRenderTarget( mof::Color color )\r
- {\r
- m_pDevice->Clear( 0 , 0 , D3DCLEAR_TARGET , color , 0 , 0 );\r
- }\r
-//}}}\r
-//{{{ setAlphaBlendingMode\r
- void GraphicsDevice::setAlphaBlendingMode( const int flag )\r
- {\r
- if(flag == m_currentStateBlock )return;\r
-\r
- if( flag == mof::GraphicsDevice::BLENDING_MODE_ADD ){\r
- m_pAddBlendingBlock->Apply();\r
- }\r
- else if(flag == mof::GraphicsDevice::BLENDING_MODE_BASIC)\r
- {\r
- m_pNormalBlendingBlock->Apply();\r
- }\r
- else if( flag == mof::GraphicsDevice::BLENDING_MODE_ALPHA )\r
- {\r
- m_pAlphaBlendingBlock->Apply();\r
- }\r
-\r
- m_currentStateBlock = flag;\r
- }\r
-//}}}\r
-//{{{ to2DPosition\r
- Vector2D GraphicsDevice::to2DPosition( const mof::Vector3D& position )\r
- {\r
- mof::Matrix3D matrix = m_worldTransform;\r
- matrix = m_viewTransform * m_projectionTransform;\r
- int hWidth = getViewportWidth() / 2;\r
- int hHeight = getViewportHeight() / 2;\r
- mof::Vector3D tmpPosition = position * matrix;\r
- \r
- return mof::Vector2D\r
- (\r
- static_cast<int>(tmpPosition.x * hWidth + hWidth ) , \r
- static_cast<int>(-tmpPosition.y * hHeight + hHeight)\r
- );\r
- }\r
-//}}}\r
-//{{{ setViewport\r
- void GraphicsDevice::setViewport( const mof::Rectangle<int>& area )\r
- {\r
- Rectangle<int> client_region = getClientRegion();\r
- client_region = Rectangle<int>(0, 0, client_region.getWidth(), client_region.getHeight());\r
- Rectangle<int> required_region = area;\r
-\r
- ignore_drawing_ = true;\r
-\r
- // viewport \82ª\8a®\91S\82É\83N\83\89\83C\83A\83\93\83g\97Ì\88æ\8aO\82È\82ç\81A\82±\82Ì\8aÖ\90\94\82Í\89½\82à\82µ\82È\82¢\r
- if (required_region.beginX > client_region.endX) return;\r
- if (required_region.beginY > client_region.endY) return;\r
- if (required_region.endX < client_region.beginX) return;\r
- if (required_region.endY < client_region.beginY) return;\r
-\r
-\r
- // viewport \82ª\83N\83\89\83C\83A\83\93\83g\97Ì\88æ\82ð\82Í\82Ý\8fo\82³\82È\82¢\82æ\82¤\82É\92²\90®\82·\82é\r
- if (required_region.beginX < client_region.beginX) required_region.beginX = client_region.beginX;\r
- if (required_region.beginY < client_region.beginY) required_region.beginY = client_region.beginY;\r
- if (required_region.endX > client_region.endX) required_region.endX = client_region.endX;\r
- if (required_region.endY > client_region.endY) required_region.endY = client_region.endY;\r
- \r
- if (0 == required_region.getWidth() || 0 == required_region.getHeight()) return;\r
-\r
- ignore_drawing_ = false;\r
- D3DVIEWPORT9 vp;\r
- vp.X = required_region.beginX;\r
- vp.Y = required_region.beginY;\r
- vp.Width = required_region.getWidth( );\r
- vp.Height = required_region.getHeight( );\r
- vp.MinZ = 0.0f;\r
- vp.MaxZ = 1.0f;\r
- if( FAILED( m_pDevice->SetViewport( &vp ) ) )\r
- {\r
- throw std::runtime_error( "Failed --- SetViewport" );\r
- }\r
- }\r
-//}}}\r
-//{{{ getViewportWidth\r
- int GraphicsDevice::getViewportWidth( ) \r
- {\r
- D3DVIEWPORT9 vp;\r
- if( FAILED(m_pDevice->GetViewport( &vp ) ) )\r
- {\r
- throw std::runtime_error("Failed --- getViewportWidth");\r
- }\r
- return vp.Width;\r
- }\r
-//}}}\r
-//{{{ getViewportHeight\r
- int GraphicsDevice::getViewportHeight() {\r
- D3DVIEWPORT9 vp;\r
- if( FAILED( m_pDevice->GetViewport( &vp ) ) )\r
- {\r
- throw std::runtime_error("Failed --- getViewportHeight");\r
- }\r
- return vp.Height;\r
- }\r
-//}}}\r
-//{{{ drawVertexArray\r
- template <class T>\r
- void GraphicsDevice::drawVertexArray( const T& front , const T& last , mof::PRIMITIVE_TYPE type )\r
- {\r
- HRESULT hr = E_FAIL;\r
- if (&last < &front) return;\r
- int length = &last - &front + 1; //\92¸\93_\90\94\r
- if (ignore_drawing_) return;\r
-\r
- m_pDevice->SetFVF( mof::getFVF<T>() );\r
-\r
- if(type == mof::PRIMITIVE_TYPE_TRIANGLESTRIP)\r
- {\r
- hr = m_pDevice->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP , length > 3 ? length - 2 : 1 , (const void*)&front , sizeof(T) );\r
- }\r
- else if( type == PRIMITIVE_TYPE_TRIANGLELIST )\r
- {\r
- hr = m_pDevice->DrawPrimitiveUP( D3DPT_TRIANGLELIST , length / 3 , (const void*)&front , sizeof(T) );\r
- }\r
- else if( type == mof::PRIMITIVE_TYPE_LINELIST )\r
- {\r
- hr = m_pDevice->DrawPrimitiveUP(D3DPT_LINELIST , length / 2 , (const void*)&front , sizeof(T) );\r
- }\r
- \r
- if( FAILED( hr ) )\r
- {\r
- throw std::runtime_error("Failed -- DrawPrimitiveUP");\r
- }\r
-\r
- } // function drawVertexArray\r
-//}}}\r
-//{{{ setMaterial\r
- void GraphicsDevice::setMaterial(const mof::Material& material){\r
- D3DMATERIAL9 mat;\r
-\r
- memcpy(static_cast<void*>(&mat) , static_cast<const void*>(&material) , sizeof(D3DMATERIAL9));\r
-\r
- if( FAILED( m_pDevice->SetMaterial( &mat ) ) )\r
- {\r
- throw std::runtime_error("Faild --- SetMaterial");\r
- }\r
- }\r
-//}}}\r
-//{{{ setTexture\r
- void GraphicsDevice::setTexture( const mof::Texture* pTexture )\r
- {\r
- if( pTexture == NULL )m_pDevice->SetTexture( 0 , NULL );\r
- else m_pDevice->SetTexture( 0 , pTexture->m_pImpl->pTexture );\r
- }\r
-//}}}\r
-//{{{ getClientRegion\r
- mof::Rectangle<int> GraphicsDevice::getClientRegion() \r
- {\r
- RECT rect;\r
- GetWindowRect(m_hWnd , &rect);\r
- POINT point;\r
- point.x = rect.left;\r
- point.y = rect.top;\r
- ScreenToClient(m_hWnd , &point);\r
- int beginX = rect.left - point.x;\r
- int beginY = rect.top - point.y;\r
- return mof::Rectangle<int>(beginX , beginY , beginX + m_width , beginY + m_height);\r
- }\r
-//}}} \r
-//{{{ getRawDevice\r
- LPDIRECT3DDEVICE9 GraphicsDevice::getRawDevice( )\r
- {\r
- return m_pDevice;\r
- }\r
-//}}} \r
-} // namespace GraphicsDevice\r
+#pragma comment(lib,"d3d9.lib")
+#pragma comment(lib,"d3dx9.lib")
+#pragma comment(lib,"d3dxof.lib")
+#pragma comment(lib,"d3dx9d.lib")
+#pragma comment(lib,"dxguid.lib")
+
+#include "mof/private/GraphicsDeviceImpl.hpp"
+#include "mof/ConsoleIO.hpp"
+#include <list>
+#include <stdexcept>
+#include "mof/private/VertexFVF.hpp"
+#include "mof/Material.hpp"
+#include "mof/private/TextureImpl.hpp"
+
+namespace
+{
+
+ HWND m_hWnd = NULL;
+ int m_width;
+ int m_height;
+ LPDIRECT3DDEVICE9 m_pDevice = NULL;
+ LPDIRECT3D9 m_pD3D = NULL;
+ D3DPRESENT_PARAMETERS* m_pParam = NULL;
+ IDirect3DStateBlock9* m_pNormalBlendingBlock = NULL;
+ IDirect3DStateBlock9* m_pAddBlendingBlock = NULL;
+ IDirect3DStateBlock9* m_pAlphaBlendingBlock = NULL;
+ int m_currentStateBlock;
+ mof::Matrix3D m_worldTransform;
+ mof::Matrix3D m_viewTransform;
+ mof::Matrix3D m_projectionTransform;
+ bool m_flagActive;
+ bool m_flagDeviceLost;
+ bool ignore_drawing_ = false;///< viewport\82ª\90§\8cä
+}
+
+
+inline bool isOK(HRESULT hr){
+ return hr == S_OK;
+}
+
+
+namespace mof
+{
+ template void GraphicsDevice::drawVertexArray( const VertexXYZRHWCUV& , const VertexXYZRHWCUV& , PRIMITIVE_TYPE );
+ template void GraphicsDevice::drawVertexArray( const VertexXYZRHWC& , const VertexXYZRHWC& , PRIMITIVE_TYPE);
+ template void GraphicsDevice::drawVertexArray( const VertexXYZCUV& , const VertexXYZCUV& , PRIMITIVE_TYPE);
+ template void GraphicsDevice::drawVertexArray( const VertexXYZNUV& , const VertexXYZNUV& , PRIMITIVE_TYPE);
+ template void GraphicsDevice::drawVertexArray( const VertexXYZC& , const VertexXYZC& , PRIMITIVE_TYPE);
+
+
+//{{{ initialize
+ //TODO \8aÖ\90\94\95ª\8a\84
+ void GraphicsDevice::initialize( HWND hWnd, int adapter_id, int width , int height , bool fullscreen )
+ {
+
+ HRESULT hr;
+ m_hWnd = hWnd;
+ m_width = width;
+ m_height = height;
+
+ if( NULL == ( m_pD3D = Direct3DCreate9( D3D_SDK_VERSION ) ) )
+ {
+ throw std::runtime_error( "Failed --- Direct3DCreate9" );
+ }
+
+ m_pParam = new D3DPRESENT_PARAMETERS;
+ ZeroMemory( m_pParam, sizeof(D3DPRESENT_PARAMETERS) );
+ m_pParam->Windowed = (fullscreen)? FALSE : TRUE; //TRUE=Window,FALSE=FULLSCREEN
+ m_pParam->BackBufferCount = 1;
+ m_pParam->PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
+
+ if( fullscreen )
+ {
+ //\83t\83\8b\83X\83N\83\8a\81[\83\93\8e\9e\82Í\83o\83b\83N\83o\83b\83t\83@\82Ì\95\9d\81A\8d\82\82³\82ð\8dÄ\8ew\92è
+ m_pParam->BackBufferWidth = width; //\95\9d
+ m_pParam->BackBufferHeight = height; //\8d\82\82³
+ m_pParam->BackBufferFormat = D3DFMT_X8R8G8B8; //16bit
+ //m_pParam->BackBufferFormat = D3DFMT_R5G6B5; //16bit
+ m_pParam->FullScreen_RefreshRateInHz = D3DPRESENT_RATE_DEFAULT;
+ }
+ else
+ {
+ m_pParam->BackBufferFormat = D3DFMT_UNKNOWN; //\8c»\8dÝ\82Ì\89æ\96Ê\83\82\81[\83h\82ð\97\98\97p
+ }
+ m_pParam->SwapEffect = D3DSWAPEFFECT_DISCARD;
+ // Z \83o\83b\83t\83@\82Ì\8e©\93®\8dì\90¬
+ m_pParam->EnableAutoDepthStencil = 1;
+ m_pParam->AutoDepthStencilFormat = D3DFMT_D16;
+
+
+
+
+ //HAL(pure vp)
+ if
+ (
+ FAILED
+ (
+ hr =
+ m_pD3D->CreateDevice
+ (
+ adapter_id, D3DDEVTYPE_HAL , m_hWnd ,
+ D3DCREATE_HARDWARE_VERTEXPROCESSING , m_pParam , &m_pDevice
+ )
+ )
+ )
+ {
+ //HAL(soft vp)
+ if
+ (
+ FAILED
+ (
+ hr =
+ m_pD3D->CreateDevice
+ (
+ adapter_id, D3DDEVTYPE_HAL , m_hWnd ,
+ D3DCREATE_SOFTWARE_VERTEXPROCESSING , m_pParam , &(m_pDevice)
+ )
+ )
+ )
+ {
+ //REF
+ if
+ (
+ FAILED(
+ hr =
+ m_pD3D->CreateDevice
+ (
+ adapter_id, D3DDEVTYPE_REF , m_hWnd ,
+ D3DCREATE_HARDWARE_VERTEXPROCESSING , m_pParam , &m_pDevice
+ )
+ )
+ )
+ {
+ delete m_pParam;
+ m_pD3D->Release();
+ throw std::runtime_error(std::string("Failed --- CreateDevice"));
+ }
+ } // if
+ } // if
+
+ setViewport( mof::Rectangle<int>(0 , 0 , width , height) );
+
+ //
+ m_pDevice->SetSamplerState(0 , D3DSAMP_MAGFILTER , D3DTEXF_LINEAR ); //D3DTEXF_POINT
+ m_pDevice->SetSamplerState(0 , D3DSAMP_MINFILTER , D3DTEXF_LINEAR ); //D3DTEXF_POINT
+
+
+ m_pDevice->SetSamplerState(0, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP);
+ m_pDevice->BeginStateBlock( );
+ m_pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE , TRUE );
+ m_pDevice->SetRenderState( D3DRS_SRCBLEND,D3DBLEND_SRCALPHA );
+ m_pDevice->SetRenderState( D3DRS_DESTBLEND,D3DBLEND_ONE );
+ m_pDevice->SetTextureStageState( 0 , D3DTSS_ALPHAOP,D3DTOP_MODULATE ); //ARG1\82ÆARG2\82Ì\83¿\92l\82ð\8fæ\8eZ\82µ\82Ä\83¿\92l\82ð\8eæ\93¾\82µ\82Ü\82·\81B
+ m_pDevice->SetTextureStageState( 0 , D3DTSS_ALPHAARG1,D3DTA_DIFFUSE ); //\83e\83N\83X\83`\83\83\82Ì\83¿\92l
+ m_pDevice->SetTextureStageState( 0 , D3DTSS_ALPHAARG2,D3DTA_TEXTURE ); //\92¸\93_\82Ì\83¿
+ m_pDevice->SetTextureStageState( 0 , D3DTSS_COLOROP,D3DTOP_MODULATE ); //ARG1\82ÆARG2\82Ì\83J\83\89\81[\82Ì\92l\82ð\8fæ\8eZ\82µ\82Ü\82·\81B
+ m_pDevice->SetTextureStageState( 0 , D3DTSS_COLORARG1,D3DTA_TEXTURE ); //\83e\83N\83X\83`\83\83\82Ì\83J\83\89\81[
+ m_pDevice->SetTextureStageState( 0 , D3DTSS_COLORARG2,D3DTA_DIFFUSE ); //\92¸\93_\82Ì\83J\83\89\81[
+ m_pDevice->EndStateBlock( &m_pAddBlendingBlock );
+
+ m_pDevice->BeginStateBlock( );
+ m_pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE , TRUE );
+ m_pDevice->SetRenderState( D3DRS_SRCBLEND , D3DBLEND_SRCALPHA );
+ m_pDevice->SetRenderState( D3DRS_DESTBLEND , D3DBLEND_INVSRCALPHA );
+ m_pDevice->SetTextureStageState( 0 ,D3DTSS_ALPHAOP , D3DTOP_SELECTARG2 ); //ARG1\82ÆARG2\82Ì\83¿\92l\82ð\8fæ\8eZ\82µ\82Ä\83¿\92l\82ð\8eæ\93¾\82µ\82Ü\82·\81B
+ m_pDevice->SetTextureStageState( 0 ,D3DTSS_ALPHAARG1 , D3DTA_DIFFUSE ); //\83e\83N\83X\83`\83\83\82Ì\83¿\92l
+ m_pDevice->SetTextureStageState( 0 ,D3DTSS_ALPHAARG2 , D3DTA_TEXTURE ); //\92¸\93_\82Ì\83¿\92l
+ m_pDevice->SetTextureStageState( 0 ,D3DTSS_COLOROP , D3DTOP_MODULATE ); //ARG1\82ÆARG2\82Ì\83J\83\89\81[\82Ì\92l\82ð\8fæ\8eZ\82µ\82Ü\82·\81B
+ m_pDevice->SetTextureStageState( 0 ,D3DTSS_COLORARG1 , D3DTA_DIFFUSE ); //\83e\83N\83X\83`\83\83\82Ì\83J\83\89\81[
+ m_pDevice->SetTextureStageState( 0 ,D3DTSS_COLORARG2 , D3DTA_TEXTURE ); //\92¸\93_\82Ì\83J\83\89\81[
+ m_pDevice->EndStateBlock( &m_pNormalBlendingBlock );
+
+ m_pDevice->BeginStateBlock( );
+ m_pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE , TRUE );
+ m_pDevice->SetRenderState( D3DRS_SRCBLEND , D3DBLEND_SRCALPHA );
+ m_pDevice->SetRenderState( D3DRS_DESTBLEND , D3DBLEND_INVSRCALPHA );
+ m_pDevice->SetTextureStageState( 0,D3DTSS_ALPHAOP , D3DTOP_MODULATE ); //ARG1\82ÆARG2\82Ì\83¿\92l\82ð\8fæ\8eZ\82µ\82Ä\83¿\92l\82ð\8eæ\93¾\82µ\82Ü\82·\81B
+ m_pDevice->SetTextureStageState( 0,D3DTSS_ALPHAARG1 , D3DTA_DIFFUSE ); //\83e\83N\83X\83`\83\83\82Ì\83¿\92l
+ m_pDevice->SetTextureStageState( 0,D3DTSS_ALPHAARG2 , D3DTA_TEXTURE ); //\92¸\93_\82Ì\83¿\92l
+ m_pDevice->SetTextureStageState( 0,D3DTSS_COLOROP , D3DTOP_MODULATE ); //ARG1\82ÆARG2\82Ì\83J\83\89\81[\82Ì\92l\82ð\8fæ\8eZ\82µ\82Ü\82·\81B
+ m_pDevice->SetTextureStageState( 0,D3DTSS_COLORARG1 , D3DTA_DIFFUSE ); //\83e\83N\83X\83`\83\83\82Ì\83J\83\89\81[
+ m_pDevice->SetTextureStageState( 0,D3DTSS_COLORARG2 , D3DTA_TEXTURE ); //\92¸\93_\82Ì\83J\83\89\81[
+ m_pDevice->EndStateBlock( &m_pAlphaBlendingBlock );
+
+ setProjectionTransform(0.1f , 100);
+ setWorldTransform(m_worldTransform);
+ } // function initialize
+//}}}
+//{{{ finalize
+ void GraphicsDevice::finalize( )
+ {
+ m_pAddBlendingBlock->Release();
+ m_pNormalBlendingBlock->Release();
+ m_pAlphaBlendingBlock->Release();
+ if(m_pDevice != NULL)m_pDevice->Release();
+ if(m_pD3D != NULL)m_pD3D->Release();
+ delete m_pParam;
+ }
+//}}}
+//{{{ beginScene
+ void GraphicsDevice::beginScene( )
+ {
+
+
+ if(true == m_flagDeviceLost)
+ {
+ Sleep(100); // 0.1\95b\91Ò\82Â
+ if(/*m_flagActive == true &&*/ m_pDevice->TestCooperativeLevel() == D3DERR_DEVICENOTRESET )
+ {
+ //---\83f\83o\83C\83X\95\9c\8bA\82ð\8e\8e\82Ý\82é
+
+ if( FAILED( m_pDevice->Reset( m_pParam) ) )return;
+
+ //\83f\83o\83C\83X\82Ì\95\9c\8bA\82É\90¬\8c÷
+ m_flagDeviceLost = false;
+ //---\83X\83e\81[\83g\82ð\95\9c\8bA
+ DEBUG_PRINT( "DeviceRecovered!" );
+ }
+ else return;
+ }
+
+
+
+ if( !isOK( m_pDevice->BeginScene( ) ) )
+ {
+ throw std::runtime_error("Failed --- BeginScene");
+ }
+
+
+ } // function beginScene
+//}}}
+//{{{ endScene
+ void GraphicsDevice::endScene( )
+ {
+
+ if( !isOK( m_pDevice->EndScene() ) )
+ {
+ throw std::runtime_error("Failed --- EndScene");
+ }
+
+ //\83o\83b\83N\83o\83b\83t\83@\82©\82ç\83v\83\89\83C\83}\83\8a\83o\83b\83t\83@\82Ö\93]\91\97
+ HRESULT hr = m_pDevice->Present( NULL, NULL, NULL, NULL );
+
+ if( hr == D3DERR_DEVICELOST && false == m_flagDeviceLost )
+ {
+ DEBUG_PRINT( "DeviceLost!" );
+ m_flagDeviceLost = true;
+ //\83\8a\83\\81[\83X\82Ì\89ð\95ú\8f\88\97\9d
+
+ }
+
+
+ if( !isOK( hr ) )throw std::runtime_error("Present");
+
+
+ } // function endScene
+//}}}
+//{{{ setWorldTransform
+ void GraphicsDevice::setWorldTransform( const mof::Matrix3D& matrix )
+ {
+ m_worldTransform = matrix;
+ D3DXMATRIX mat;
+ for(int i = 0 ; i < 4 ; ++i ){
+ for(int j = 0 ; j < 4 ; ++j){
+ mat(i , j) = matrix.at(i , j);
+ }
+ }
+ m_pDevice->SetTransform( D3DTS_WORLD, &mat );
+ }
+//}}}
+//{{{ setProjectionTransform
+ void GraphicsDevice::setProjectionTransform( real min , real max )
+ {
+ D3DXMATRIX matProj;
+ D3DXMatrixPerspectiveFovLH
+ (
+ &matProj, D3DX_PI / 4.0f,
+ static_cast<float>(getViewportWidth()) / static_cast<float>(getViewportHeight()) , min, max
+ );
+
+ mof::Matrix3D::Array arry;
+ for(int i = 0 ; i < 4 ; ++i ){
+ for(int j = 0 ; j < 4 ; ++j){
+ arry.elements[i][j] = matProj( i , j );
+ }
+ }
+ m_projectionTransform = mof::Matrix3D( arry );
+ m_pDevice->SetTransform( D3DTS_PROJECTION , &matProj );
+
+ }
+//}}}
+//{{{ setViewTransform
+ void GraphicsDevice::setViewTransform( const mof::Matrix3D& matrix )
+ {
+ m_viewTransform = matrix;
+ D3DXMATRIX mat;
+ for(int i = 0 ; i < 4 ; ++i ){
+ for(int j = 0 ; j < 4 ; ++j){
+ mat(i , j) = matrix.at(i , j);
+ }
+ }
+ m_pDevice->SetTransform( D3DTS_VIEW , &mat );
+ }
+//}}}
+//{{{ getWorldTransform
+ const mof::Matrix3D& GraphicsDevice::getWorldTransform( )
+ {
+ return m_worldTransform;
+ }
+//}}}
+//{{{ getProjectionTransform
+ const mof::Matrix3D& GraphicsDevice::getProjectionTransform()
+ {
+ return m_projectionTransform;
+ }
+//}}}
+//{{{ getViewTransform
+ const mof::Matrix3D& GraphicsDevice::getViewTransform()
+ {
+ return m_viewTransform;
+ }
+//}}}
+//{{{ get_num_of_displays
+ int GraphicsDevice::get_num_of_displays()
+ {
+ // TODO
+ return 0;
+ }
+//}}}
+//{{{ get_caps
+ std::vector<mof::Vector2D> GraphicsDevice::get_caps(int adapter_id)
+ {
+
+ LPDIRECT3D9 tmp_pD3D = NULL;
+ if (m_pD3D != NULL) tmp_pD3D = m_pD3D;
+ else tmp_pD3D = Direct3DCreate9( D3D_SDK_VERSION );
+
+ std::vector<mof::Vector2D> resolutions;
+ int num = tmp_pD3D->GetAdapterModeCount(adapter_id, D3DFMT_X8R8G8B8);
+ D3DDISPLAYMODE mode = {0, 0, 0, D3DFMT_UNKNOWN};
+ for (int i = 0; i < num; i++) {
+ tmp_pD3D->EnumAdapterModes(adapter_id, D3DFMT_X8R8G8B8, i, &mode);
+ if (mode.RefreshRate == 60) {
+ resolutions.push_back(mof::Vector2D(static_cast<float>(mode.Width), static_cast<float>(mode.Height)));
+ }
+ }
+ if (m_pD3D == NULL) tmp_pD3D->Release();
+ return resolutions;
+ }
+//}}}
+//{{{ setZBuffer
+ void GraphicsDevice::setZBuffer( bool available )
+ {
+ if( available )m_pDevice->SetRenderState( D3DRS_ZENABLE, D3DZB_TRUE );
+ else m_pDevice->SetRenderState( D3DRS_ZENABLE , D3DZB_FALSE );
+ }
+//}}}
+//{{{ lightEnable
+ void GraphicsDevice::lightEnable( bool available )
+ {
+ m_pDevice->SetRenderState( D3DRS_LIGHTING , available );
+ }
+//}}}
+//{{{ clearZBuffer
+ void GraphicsDevice::clearZBuffer()
+ {
+ m_pDevice->Clear( 0 , NULL , D3DCLEAR_ZBUFFER , 0 , 1.0f, 0 );
+ }
+//}}}
+//{{{ clearRenderTarget
+ void GraphicsDevice::clearRenderTarget( mof::Color color )
+ {
+ m_pDevice->Clear( 0 , 0 , D3DCLEAR_TARGET , color , 0 , 0 );
+ }
+//}}}
+//{{{ setAlphaBlendingMode
+ void GraphicsDevice::setAlphaBlendingMode( const int flag )
+ {
+ if(flag == m_currentStateBlock )return;
+
+ if( flag == mof::GraphicsDevice::BLENDING_MODE_ADD ){
+ m_pAddBlendingBlock->Apply();
+ }
+ else if(flag == mof::GraphicsDevice::BLENDING_MODE_BASIC)
+ {
+ m_pNormalBlendingBlock->Apply();
+ }
+ else if( flag == mof::GraphicsDevice::BLENDING_MODE_ALPHA )
+ {
+ m_pAlphaBlendingBlock->Apply();
+ }
+
+ m_currentStateBlock = flag;
+ }
+//}}}
+//{{{ to2DPosition
+ Vector2D GraphicsDevice::to2DPosition( const mof::Vector3D& position )
+ {
+ mof::Matrix3D matrix = m_worldTransform;
+ matrix = m_viewTransform * m_projectionTransform;
+ int hWidth = getViewportWidth() / 2;
+ int hHeight = getViewportHeight() / 2;
+ mof::Vector3D tmpPosition = position * matrix;
+
+ return mof::Vector2D
+ (
+ static_cast<int>(tmpPosition.x * hWidth + hWidth ) ,
+ static_cast<int>(-tmpPosition.y * hHeight + hHeight)
+ );
+ }
+//}}}
+//{{{ setViewport
+ void GraphicsDevice::setViewport( const mof::Rectangle<int>& area )
+ {
+ Rectangle<int> client_region = getClientRegion();
+ client_region = Rectangle<int>(0, 0, client_region.getWidth(), client_region.getHeight());
+ Rectangle<int> required_region = area;
+
+ ignore_drawing_ = true;
+
+ // viewport \82ª\8a®\91S\82É\83N\83\89\83C\83A\83\93\83g\97Ì\88æ\8aO\82È\82ç\81A\82±\82Ì\8aÖ\90\94\82Í\89½\82à\82µ\82È\82¢
+ if (required_region.beginX > client_region.endX) return;
+ if (required_region.beginY > client_region.endY) return;
+ if (required_region.endX < client_region.beginX) return;
+ if (required_region.endY < client_region.beginY) return;
+
+
+ // viewport \82ª\83N\83\89\83C\83A\83\93\83g\97Ì\88æ\82ð\82Í\82Ý\8fo\82³\82È\82¢\82æ\82¤\82É\92²\90®\82·\82é
+ if (required_region.beginX < client_region.beginX) required_region.beginX = client_region.beginX;
+ if (required_region.beginY < client_region.beginY) required_region.beginY = client_region.beginY;
+ if (required_region.endX > client_region.endX) required_region.endX = client_region.endX;
+ if (required_region.endY > client_region.endY) required_region.endY = client_region.endY;
+
+ if (0 == required_region.getWidth() || 0 == required_region.getHeight()) return;
+
+ ignore_drawing_ = false;
+ D3DVIEWPORT9 vp;
+ vp.X = required_region.beginX;
+ vp.Y = required_region.beginY;
+ vp.Width = required_region.getWidth( );
+ vp.Height = required_region.getHeight( );
+ vp.MinZ = 0.0f;
+ vp.MaxZ = 1.0f;
+ if( FAILED( m_pDevice->SetViewport( &vp ) ) )
+ {
+ throw std::runtime_error( "Failed --- SetViewport" );
+ }
+ }
+//}}}
+//{{{ getViewportWidth
+ int GraphicsDevice::getViewportWidth( )
+ {
+ D3DVIEWPORT9 vp;
+ if( FAILED(m_pDevice->GetViewport( &vp ) ) )
+ {
+ throw std::runtime_error("Failed --- getViewportWidth");
+ }
+ return vp.Width;
+ }
+//}}}
+//{{{ getViewportHeight
+ int GraphicsDevice::getViewportHeight() {
+ D3DVIEWPORT9 vp;
+ if( FAILED( m_pDevice->GetViewport( &vp ) ) )
+ {
+ throw std::runtime_error("Failed --- getViewportHeight");
+ }
+ return vp.Height;
+ }
+//}}}
+//{{{ drawVertexArray
+ template <class T>
+ void GraphicsDevice::drawVertexArray( const T& front , const T& last , mof::PRIMITIVE_TYPE type )
+ {
+ HRESULT hr = E_FAIL;
+ if (&last < &front) return;
+ int length = &last - &front + 1; //\92¸\93_\90\94
+ if (ignore_drawing_) return;
+
+ m_pDevice->SetFVF( mof::getFVF<T>() );
+
+ if(type == mof::PRIMITIVE_TYPE_TRIANGLESTRIP)
+ {
+ hr = m_pDevice->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP , length > 3 ? length - 2 : 1 , (const void*)&front , sizeof(T) );
+ }
+ else if( type == PRIMITIVE_TYPE_TRIANGLELIST )
+ {
+ hr = m_pDevice->DrawPrimitiveUP( D3DPT_TRIANGLELIST , length / 3 , (const void*)&front , sizeof(T) );
+ }
+ else if( type == mof::PRIMITIVE_TYPE_LINELIST )
+ {
+ hr = m_pDevice->DrawPrimitiveUP(D3DPT_LINELIST , length / 2 , (const void*)&front , sizeof(T) );
+ }
+
+ if( FAILED( hr ) )
+ {
+ throw std::runtime_error("Failed -- DrawPrimitiveUP");
+ }
+
+ } // function drawVertexArray
+//}}}
+//{{{ setMaterial
+ void GraphicsDevice::setMaterial(const mof::Material& material){
+ D3DMATERIAL9 mat;
+
+ memcpy(static_cast<void*>(&mat) , static_cast<const void*>(&material) , sizeof(D3DMATERIAL9));
+
+ if( FAILED( m_pDevice->SetMaterial( &mat ) ) )
+ {
+ throw std::runtime_error("Faild --- SetMaterial");
+ }
+ }
+//}}}
+//{{{ setTexture
+ void GraphicsDevice::setTexture( const mof::Texture* pTexture )
+ {
+ if( pTexture == NULL )m_pDevice->SetTexture( 0 , NULL );
+ else m_pDevice->SetTexture( 0 , pTexture->m_pImpl->pTexture );
+ }
+//}}}
+//{{{ getClientRegion
+ mof::Rectangle<int> GraphicsDevice::getClientRegion()
+ {
+ RECT rect;
+ GetWindowRect(m_hWnd , &rect);
+ POINT point;
+ point.x = rect.left;
+ point.y = rect.top;
+ ScreenToClient(m_hWnd , &point);
+ int beginX = rect.left - point.x;
+ int beginY = rect.top - point.y;
+ return mof::Rectangle<int>(beginX , beginY , beginX + m_width , beginY + m_height);
+ }
+//}}}
+//{{{ getRawDevice
+ LPDIRECT3DDEVICE9 GraphicsDevice::getRawDevice( )
+ {
+ return m_pDevice;
+ }
+//}}}
+} // namespace GraphicsDevice
-#pragma once\r
-#include "mof/real.hpp"\r
-#include "mof/Color.hpp"\r
-#include "mof/Matrix3D.hpp"\r
-#include "mof/VertexTypes.hpp"\r
-#include <boost/utility.hpp>\r
-#include <boost/scoped_ptr.hpp>\r
-#include <vector>\r
-#include "mof/Rectangle.hpp"\r
-\r
-\r
-\r
-namespace mof{\r
- struct Material;\r
- class Texture;\r
-\r
- namespace GraphicsDevice \r
- {\r
-\r
- // public \r
- \r
- enum BlendingMode\r
- {\r
- BLENDING_MODE_ADD ,\r
- BLENDING_MODE_BASIC ,\r
- BLENDING_MODE_ALPHA\r
- };\r
- \r
- void setWorldTransform( const mof::Matrix3D& matrix );\r
- void setProjectionTransform( real min , real max );\r
- void setViewTransform( const mof::Matrix3D& matrix );\r
- const mof::Matrix3D& getWorldTransform( );\r
- const mof::Matrix3D& getProjectionTransform( );\r
- const mof::Matrix3D& getViewTransform( );\r
- void setZBuffer( bool flag );\r
- void lightEnable( bool enable );\r
- void clearZBuffer( );\r
- void clearRenderTarget( mof::Color color );\r
- void setAlphaBlendingMode( const int flag );\r
- mof::Vector2D to2DPosition( const mof::Vector3D& position );\r
- void setViewport( const mof::Rectangle<int>& area );\r
- int getViewportWidth( );\r
- int getViewportHeight( );\r
- int get_num_of_displays();\r
- std::vector<mof::Vector2D> get_caps(int adapter_id);\r
-\r
- template <class T> void drawVertexArray\r
- (\r
- const T& front , const T& last , \r
- mof::PRIMITIVE_TYPE type = PRIMITIVE_TYPE_TRIANGLELIST \r
- ); \r
- void setMaterial( const mof::Material& material );\r
- void setTexture( const mof::Texture* pTexture );\r
- mof::Rectangle<int> getClientRegion( );\r
- \r
- } // namespace GraphicsDevice\r
-\r
-\r
-} // namespace mof\r
+#pragma once
+#include "mof/real.hpp"
+#include "mof/Color.hpp"
+#include "mof/Matrix3D.hpp"
+#include "mof/VertexTypes.hpp"
+#include <boost/utility.hpp>
+#include <boost/scoped_ptr.hpp>
+#include <vector>
+#include "mof/Rectangle.hpp"
+
+
+
+namespace mof{
+ struct Material;
+ class Texture;
+
+ namespace GraphicsDevice
+ {
+
+ // public
+
+ enum BlendingMode
+ {
+ BLENDING_MODE_ADD ,
+ BLENDING_MODE_BASIC ,
+ BLENDING_MODE_ALPHA
+ };
+
+ void setWorldTransform( const mof::Matrix3D& matrix );
+ void setProjectionTransform( real min , real max );
+ void setViewTransform( const mof::Matrix3D& matrix );
+ const mof::Matrix3D& getWorldTransform( );
+ const mof::Matrix3D& getProjectionTransform( );
+ const mof::Matrix3D& getViewTransform( );
+ void setZBuffer( bool flag );
+ void lightEnable( bool enable );
+ void clearZBuffer( );
+ void clearRenderTarget( mof::Color color );
+ void setAlphaBlendingMode( const int flag );
+ mof::Vector2D to2DPosition( const mof::Vector3D& position );
+ void setViewport( const mof::Rectangle<int>& area );
+ int getViewportWidth( );
+ int getViewportHeight( );
+ int get_num_of_displays();
+ std::vector<mof::Vector2D> get_caps(int adapter_id);
+
+ template <class T> void drawVertexArray
+ (
+ const T& front , const T& last ,
+ mof::PRIMITIVE_TYPE type = PRIMITIVE_TYPE_TRIANGLELIST
+ );
+ void setMaterial( const mof::Material& material );
+ void setTexture( const mof::Texture* pTexture );
+ mof::Rectangle<int> getClientRegion( );
+
+ } // namespace GraphicsDevice
+
+
+} // namespace mof
-\r
-#include "mof/GraphicsObject.h"\r
-#include <iostream>\r
-\r
-mof::GraphicsObject::GraphicsObject(void)\r
-: m_pAnimations( new mof::CascadeAnimation())\r
-{\r
- \r
-}\r
-\r
-mof::GraphicsObject::~GraphicsObject(void)\r
-{\r
-\r
-}\r
-\r
+
+#include "mof/GraphicsObject.h"
+#include <iostream>
+
+mof::GraphicsObject::GraphicsObject(void)
+: m_pAnimations( new mof::CascadeAnimation())
+{
+
+}
+
+mof::GraphicsObject::~GraphicsObject(void)
+{
+
+}
+
-#include "mof/GraphicsSchedule.h"\r
-#include "mof/ConsoleIO.h"\r
-\r
-\r
-\r
-\r
-\r
-mof::GraphicsSchedule::GraphicsSchedule(){\r
- m_key = 0;\r
-\r
-}\r
-\r
-mof::GraphicsSchedule::~GraphicsSchedule(){\r
- \r
-}\r
-\r
-void mof::GraphicsSchedule::update(){\r
- \r
- std::pair<MapItr , MapItr> range = m_map.equal_range(m_key);\r
- for(MapItr itr = range.first ; itr != range.second ; ++itr){\r
- if((*itr).second.pAnimation.get() != NULL){\r
- (*itr).second.pObject->setAnimation(0 , (*itr).second.pAnimation);\r
- (*itr).second.pAnimation->start();\r
- }\r
- }\r
- \r
- m_key++;\r
-}\r
-\r
-void mof::GraphicsSchedule::add(int index , mof::GraphicsModelPtr& pObject , mof::AnimationResource& pAnimation){\r
- if(pObject.get() == NULL)return;\r
- if(pAnimation.get() != NULL)pAnimation->stop();\r
- mof::GraphicsSchedule::Element element = {pObject , pAnimation };\r
- m_modelList.push_back(pObject);\r
- m_map.insert(std::multimap<mof::AnimationKey , mof::GraphicsSchedule::Element>::value_type(index , element));\r
-}\r
- \r
-std::list<mof::GraphicsModelPtr>& mof::GraphicsSchedule::appendModelList( std::list<mof::GraphicsModelPtr>& modelList){\r
- modelList.insert(modelList.end() , m_modelList.begin() , m_modelList.end());\r
- return modelList;\r
-}\r
- \r
-\r
-\r
- \r
-bool mof::GraphicsSchedule::isFinalized(){\r
- if(m_map.size() == 0)return true;\r
- for(MapItr itr = m_map.begin() ; itr != m_map.end() ; ++itr){\r
- if(!itr->second.pAnimation->isFinalized() )return false;\r
- }\r
- return true;\r
-}\r
-\r
- \r
-bool mof::GraphicsSchedule::isPlaying(){\r
- for(MapItr itr = m_map.begin() ; itr != m_map.end() ; ++itr){\r
- if(itr->second.pAnimation->isPlaying() || itr->second.pAnimation->isFinalized())return true;\r
- }\r
- return false;\r
-}\r
-\r
-\r
-void mof::GraphicsSchedule::clear(){\r
- m_key = 0;\r
- m_map.clear();\r
+#include "mof/GraphicsSchedule.h"
+#include "mof/ConsoleIO.h"
+
+
+
+
+
+mof::GraphicsSchedule::GraphicsSchedule(){
+ m_key = 0;
+
+}
+
+mof::GraphicsSchedule::~GraphicsSchedule(){
+
+}
+
+void mof::GraphicsSchedule::update(){
+
+ std::pair<MapItr , MapItr> range = m_map.equal_range(m_key);
+ for(MapItr itr = range.first ; itr != range.second ; ++itr){
+ if((*itr).second.pAnimation.get() != NULL){
+ (*itr).second.pObject->setAnimation(0 , (*itr).second.pAnimation);
+ (*itr).second.pAnimation->start();
+ }
+ }
+
+ m_key++;
+}
+
+void mof::GraphicsSchedule::add(int index , mof::GraphicsModelPtr& pObject , mof::AnimationResource& pAnimation){
+ if(pObject.get() == NULL)return;
+ if(pAnimation.get() != NULL)pAnimation->stop();
+ mof::GraphicsSchedule::Element element = {pObject , pAnimation };
+ m_modelList.push_back(pObject);
+ m_map.insert(std::multimap<mof::AnimationKey , mof::GraphicsSchedule::Element>::value_type(index , element));
+}
+
+std::list<mof::GraphicsModelPtr>& mof::GraphicsSchedule::appendModelList( std::list<mof::GraphicsModelPtr>& modelList){
+ modelList.insert(modelList.end() , m_modelList.begin() , m_modelList.end());
+ return modelList;
+}
+
+
+
+
+bool mof::GraphicsSchedule::isFinalized(){
+ if(m_map.size() == 0)return true;
+ for(MapItr itr = m_map.begin() ; itr != m_map.end() ; ++itr){
+ if(!itr->second.pAnimation->isFinalized() )return false;
+ }
+ return true;
+}
+
+
+bool mof::GraphicsSchedule::isPlaying(){
+ for(MapItr itr = m_map.begin() ; itr != m_map.end() ; ++itr){
+ if(itr->second.pAnimation->isPlaying() || itr->second.pAnimation->isFinalized())return true;
+ }
+ return false;
+}
+
+
+void mof::GraphicsSchedule::clear(){
+ m_key = 0;
+ m_map.clear();
}
\ No newline at end of file
-#pragma once\r
-#include "mof/GraphicsObject.h"\r
-#include <map>\r
-#include <list>\r
-#include <boost/shared_ptr.hpp>\r
-\r
-namespace mof{\r
-\r
- typedef boost::shared_ptr<mof::GraphicsObject> GraphicsModelPtr;\r
-\r
- class GraphicsSchedule{\r
- \r
- struct Element{\r
- mof::GraphicsModelPtr pObject;\r
- mof::AnimationResource pAnimation;\r
- };\r
- typedef std::multimap<int , mof::GraphicsSchedule::Element>::iterator MapItr;\r
-\r
- std::multimap<int , Element> m_map;\r
- std::list<mof::GraphicsModelPtr> m_modelList;\r
- int m_key;\r
- public:\r
- GraphicsSchedule();\r
- ~GraphicsSchedule();\r
-\r
- void update();\r
- void add(int index , mof::GraphicsModelPtr& pObject , mof::AnimationResource& pAnimation);\r
- bool isFinalized();\r
- bool isPlaying();\r
- void clear();\r
- bool isEmpty(){return m_map.empty();}\r
-\r
- std::list<mof::GraphicsModelPtr>& appendModelList( std::list<mof::GraphicsModelPtr>& modelList);\r
-\r
- };\r
-\r
+#pragma once
+#include "mof/GraphicsObject.h"
+#include <map>
+#include <list>
+#include <boost/shared_ptr.hpp>
+
+namespace mof{
+
+ typedef boost::shared_ptr<mof::GraphicsObject> GraphicsModelPtr;
+
+ class GraphicsSchedule{
+
+ struct Element{
+ mof::GraphicsModelPtr pObject;
+ mof::AnimationResource pAnimation;
+ };
+ typedef std::multimap<int , mof::GraphicsSchedule::Element>::iterator MapItr;
+
+ std::multimap<int , Element> m_map;
+ std::list<mof::GraphicsModelPtr> m_modelList;
+ int m_key;
+ public:
+ GraphicsSchedule();
+ ~GraphicsSchedule();
+
+ void update();
+ void add(int index , mof::GraphicsModelPtr& pObject , mof::AnimationResource& pAnimation);
+ bool isFinalized();
+ bool isPlaying();
+ void clear();
+ bool isEmpty(){return m_map.empty();}
+
+ std::list<mof::GraphicsModelPtr>& appendModelList( std::list<mof::GraphicsModelPtr>& modelList);
+
+ };
+
};
\ No newline at end of file
-#pragma once\r
-#include <memory>\r
-#include "mof/Material.hpp"\r
-#include "mof/Texture.hpp"\r
-#include "mof/VertexBuffer.hpp"\r
-#include "mof/VertexTypes.hpp"\r
-\r
-namespace mof{\r
-\r
- struct GraphicsUnit\r
- {\r
- std::shared_ptr<mof::Material> pMaterial;\r
- std::shared_ptr<mof::Texture> pTexture;\r
- std::shared_ptr<mof::VertexBuffer<mof::VertexXYZNUV> > pModel;\r
- };\r
-\r
-}\r
+#pragma once
+#include <memory>
+#include "mof/Material.hpp"
+#include "mof/Texture.hpp"
+#include "mof/VertexBuffer.hpp"
+#include "mof/VertexTypes.hpp"
+
+namespace mof{
+
+ struct GraphicsUnit
+ {
+ std::shared_ptr<mof::Material> pMaterial;
+ std::shared_ptr<mof::Texture> pTexture;
+ std::shared_ptr<mof::VertexBuffer<mof::VertexXYZNUV> > pModel;
+ };
+
+}
-#include "mof/private/DirectInput.hpp"\r
-#include <vector>\r
-#include "mof/InputReceiver.hpp"\r
-#include "mof/InputDevice.hpp"\r
-#include "mof/ConsoleIO.hpp"\r
-#include "mof/private/DeviceInputReceiver.hpp"\r
-#include "memory"\r
-\r
-namespace {\r
- LPDIRECTINPUT8 pInput;\r
- LPDIRECTINPUTDEVICE8A pDevice;\r
- std::shared_ptr<mof::InputReceiver> pInputReceiver;//\8aO\95\94\82É\93n\82·\82½\82ß\r
- mof::DeviceInputReceiver* pDeviceInputReceiver;//\8fã\8bL\82Æ\93¯\82¶\83C\83\93\83X\83^\83\93\83X\r
-}\r
-\r
-//--- \83v\83\8d\83g\83^\83C\83v\90é\8c¾\r
-BOOL CALLBACK enumJoyCallback(const DIDEVICEINSTANCE* pInstance , VOID* pContext);\r
-\r
-/**\r
- * mof::InputDevice::initialize\r
- *\r
- */\r
-void mof::InputDevice::initialize( ){\r
- HINSTANCE hInst = GetModuleHandle(NULL);\r
- HRESULT hr;\r
- hr = DirectInput8Create(hInst , DIRECTINPUT_VERSION ,IID_IDirectInput8 , (void**)&pInput , NULL);\r
- if(FAILED(hr)){\r
- switch(hr){\r
- case DIERR_BETADIRECTINPUTVERSION :\r
- DEBUG_PRINT("DIERR_BETADIRECTINPUTVERSION");\r
- break;\r
- case DIERR_INVALIDPARAM :\r
- DEBUG_PRINT("DIERR_INVALIDPARAM");\r
- break;\r
- case DIERR_OLDDIRECTINPUTVERSION : \r
- DEBUG_PRINT("DIERR_OLDDIRECTINPUTVERSION");\r
- break;\r
- case DIERR_OUTOFMEMORY :\r
- DEBUG_PRINT("DIERR_OUTOFMEMORY");\r
- break;\r
- }\r
- throw std::runtime_error("Failed --- create direct input");\r
- }\r
- \r
- LPCDIDATAFORMAT dataFmt = &c_dfDIJoystick;//\83W\83\87\83C\83X\83e\83B\83b\83N\82ª\8eæ\93¾\82Å\82«\82½\82Æ\89¼\92è\r
- //---\83f\83o\83C\83X\82Ì\90Ý\92è\r
- //\83Q\81[\83\80\83p\83b\83h\83f\83o\83C\83X\82ð\92T\82·\r
- hr = pInput->EnumDevices(DI8DEVCLASS_GAMECTRL , enumJoyCallback , NULL , DIEDFL_ATTACHEDONLY);\r
- if(FAILED(hr) || pDevice == NULL){\r
- //\83Q\81[\83\80\83p\83b\83h\82ª\82È\82¯\82ê\82Î\83L\81[\83{\81[\83h\r
- hr = pInput->CreateDevice(GUID_SysKeyboard , &pDevice , NULL);\r
- if(FAILED(hr)){\r
- pInput->Release();\r
- pInput = NULL;\r
- throw std::runtime_error("Failed --- create device");\r
- }\r
- dataFmt = &c_dfDIKeyboard;//\83L\81[\83{\81[\83h\82ð\83f\83o\83C\83X\82Æ\82µ\82Ä\8eæ\93¾\r
- DEBUG_PRINT("Select --- keyboard as input device");\r
- }\r
- else DEBUG_PRINT("Select --- joystick as input device");\r
- \r
- hr = pDevice->SetDataFormat(dataFmt);\r
- if(FAILED(hr)){\r
- pDevice->Release();\r
- pDevice = NULL;\r
- pInput->Release();\r
- pInput = NULL;\r
- throw std::runtime_error("Failed --- set data format");\r
- }\r
-\r
-\r
- DIPROPDWORD diprop;\r
- diprop.diph.dwSize = sizeof(diprop);\r
- diprop.diph.dwHeaderSize = sizeof(diprop.diph);\r
- diprop.diph.dwObj = 0;\r
- diprop.diph.dwHow = DIPH_DEVICE;\r
- diprop.dwData = 1000;\r
- pDevice->SetProperty(DIPROP_BUFFERSIZE , &diprop.diph);\r
- setActivation(true);\r
- \r
- pDeviceInputReceiver = new mof::DeviceInputReceiver();\r
- pInputReceiver = std::shared_ptr<mof::InputReceiver>(pDeviceInputReceiver);\r
-}\r
-\r
-\r
-\r
-/**\r
- * mof::InputDevice::finalize\r
- *\r
- */\r
-void mof::InputDevice::finalize(void)\r
-{\r
- mof::InputDevice::setActivation(false);\r
- if(pDevice != NULL)pDevice->Release();\r
- if(pInput != NULL)pInput->Release();\r
-}\r
-\r
-\r
-void mof::InputDevice::setActivation(bool active){\r
- if(pDevice == NULL)return;\r
-\r
- if(active == false)pDevice->Unacquire();\r
- else pDevice->Acquire();\r
-}\r
-\r
-\r
-\r
-BOOL CALLBACK enumJoyCallback(const DIDEVICEINSTANCE* pInstance , VOID* /*pContext*/ ){\r
- HRESULT hr;\r
- \r
- hr = pInput->CreateDevice(pInstance->guidInstance , &(pDevice) , NULL);\r
- if(FAILED(hr))return DIENUM_CONTINUE;\r
-\r
- DIDEVICEINSTANCE deviceInstance;\r
- deviceInstance.dwSize = sizeof(DIDEVCAPS);\r
- hr = pDevice->GetCapabilities((LPDIDEVCAPS)&deviceInstance);\r
- if(FAILED(hr)){\r
- pDevice->Release();\r
- pDevice = NULL;\r
- return DIENUM_CONTINUE;\r
- }\r
-\r
- *ConsoleOut::getInstance() << "Found InputDevice --- " << deviceInstance.tszInstanceName \r
- << ":" << deviceInstance.tszProductName << std::endl;\r
- return DIENUM_STOP;//\89½\82Å\82à\82¢\82¢\82©\82ç\8dÌ\97p\r
-}\r
-\r
- \r
-void mof::InputDevice::update(){\r
- \r
- HRESULT hr;\r
- while(true){\r
- DIDEVICEOBJECTDATA od;\r
- DWORD dwItems = 1;\r
- hr = pDevice->GetDeviceData(sizeof(DIDEVICEOBJECTDATA) , &od , &dwItems , 0);\r
- if(hr == DIERR_INPUTLOST)pDevice->Acquire();\r
- else if(FAILED(hr) || dwItems == 0)return;\r
- \r
- InputEvent iEvent(od.dwOfs , od.dwData);\r
- //inputSignal(iEvent);\r
- pDeviceInputReceiver->notifyInputEvent(iEvent);\r
-\r
- /*for(int i = 0 ; i < listenerList.size() ; ++i){\r
- int tmpSize = listenerList.size();\r
- listenerList.at(i)->notifyInputEvent(iEvent);\r
- if(tmpSize != listenerList.size())i--;//NotifyInputEvent\82ÅRemove\82³\82ê\82½\82©\82ð\83`\83F\83b\83N\r
- }*/\r
- \r
- }\r
-\r
-\r
-}\r
-\r
-\r
-\r
-std::shared_ptr<mof::InputReceiver> mof::InputDevice::getInputReceiver(){\r
- return pInputReceiver;\r
-}\r
-\r
-\r
-/*\r
-namespace mof{\r
-\r
- class DeviceInputReceiver;\r
-\r
- class InputDevice\r
- {\r
- \r
-\r
- std::vector<DeviceInputReceiver*> listenerList;\r
- \r
- void addReceiver(DeviceInputReceiver* pReceiver);\r
- public:\r
- InputDevice(void);\r
- ~InputDevice(void);\r
- \r
-\r
- bool initialize( HINSTANCE hInst);\r
- static BOOL CALLBACK enumJoyCallback(const DIDEVICEINSTANCE* pInstance , VOID* pContext);\r
-\r
- void activate(bool);\r
- void updateInputData();\r
- InputReceiver* getInputReceiver();\r
- void removeReceiver(DeviceInputReceiver* pReceiver);\r
- //void clearListenerList();\r
-\r
-\r
- };\r
-\r
-};\r
-\r
-typedef std::vector<mof::DeviceInputReceiver*>::iterator LISTENERITR;\r
-\r
-mof::InputDevice::InputDevice(void)\r
-{\r
- m_pInput = NULL;\r
- m_pDevice = NULL;\r
-}\r
-\r
-mof::InputDevice::~InputDevice(void)\r
-{\r
- activate(false);\r
- if(m_pDevice != NULL)m_pDevice->Release();\r
- if(m_pInput != NULL)m_pInput->Release();\r
-}\r
-\r
-\r
-bool mof::InputDevice::initialize( HINSTANCE hInst){\r
- HRESULT hr;\r
- hr = DirectInput8Create(hInst , DIRECTINPUT_VERSION ,IID_IDirectInput8 , (void**)&m_pInput , NULL);\r
- if(FAILED(hr))return false;\r
- \r
- LPCDIDATAFORMAT dataFmt = &c_dfDIJoystick;//\83W\83\87\83C\83X\83e\83B\83b\83N\82ª\8eæ\93¾\82Å\82«\82½\82Æ\89¼\92è\r
- //---\83f\83o\83C\83X\82Ì\90Ý\92è\r
- //\83Q\81[\83\80\83p\83b\83h\83f\83o\83C\83X\82ð\92T\82·\r
- hr = m_pInput->EnumDevices(DI8DEVCLASS_GAMECTRL , enumJoyCallback , NULL , DIEDFL_ATTACHEDONLY);\r
- if(FAILED(hr) || m_pDevice == NULL){\r
- //\83Q\81[\83\80\83p\83b\83h\82ª\82È\82¯\82ê\82Î\83L\81[\83{\81[\83h\r
- hr = m_pInput->CreateDevice(GUID_SysKeyboard , &m_pDevice , NULL);\r
- if(FAILED(hr)){\r
- m_pInput->Release();\r
- m_pInput = NULL;\r
- return false;\r
- }\r
- else dataFmt = &c_dfDIKeyboard;//\83L\81[\83{\81[\83h\82ð\83f\83o\83C\83X\82Æ\82µ\82Ä\8eæ\93¾\r
- }\r
-\r
- \r
- hr = m_pDevice->SetDataFormat(dataFmt);\r
- if(FAILED(hr)){\r
- *ConsoleOut::getInstance() << "SetDataFormat --- ERROR" << std::endl;\r
- m_pDevice->Release();\r
- m_pDevice = NULL;\r
- m_pInput->Release();\r
- m_pInput = NULL;\r
- return false;\r
- }\r
-\r
- //m_pDevice->SetCooperativeLevel( hWnd , DISCL_FOREGROUND);\r
-\r
- DIPROPDWORD diprop;\r
- diprop.diph.dwSize = sizeof(diprop);\r
- diprop.diph.dwHeaderSize = sizeof(diprop.diph);\r
- diprop.diph.dwObj = 0;\r
- diprop.diph.dwHow = DIPH_DEVICE;\r
- diprop.dwData = 1000;\r
- m_pDevice->SetProperty(DIPROP_BUFFERSIZE , &diprop.diph);\r
- activate(true);\r
- return true;\r
-}\r
- \r
-\r
-void mof::InputDevice::activate(bool active){\r
- if(m_pDevice == NULL)return;\r
-\r
- if(active == false)m_pDevice->Unacquire();\r
- else m_pDevice->Acquire();\r
-}\r
-\r
-void mof::InputDevice::updateInputData(){\r
- \r
- HRESULT hr;\r
- while(true){\r
- DIDEVICEOBJECTDATA od;\r
- DWORD dwItems = 1;\r
- hr = m_pDevice->GetDeviceData(sizeof(DIDEVICEOBJECTDATA) , &od , &dwItems , 0);\r
- if(hr == DIERR_INPUTLOST)m_pDevice->Acquire();\r
- else if(FAILED(hr) || dwItems == 0)return;\r
- \r
- InputEvent iEvent(od.dwOfs , od.dwData);\r
- //inputSignal(iEvent);\r
- \r
- for(int i = 0 ; i < listenerList.size() ; ++i){\r
- int tmpSize = listenerList.size();\r
- listenerList.at(i)->notifyInputEvent(iEvent);\r
- if(tmpSize != listenerList.size())i--;//NotifyInputEvent\82ÅRemove\82³\82ê\82½\82©\82ð\83`\83F\83b\83N\r
- }\r
- \r
- }\r
-\r
-\r
-}\r
-\r
-\r
-\r
-mof::InputReceiver* mof::InputDevice::getInputReceiver(){\r
- mof::DeviceInputReceiver* pReceiver = new mof::DeviceInputReceiver();\r
- addReceiver(pReceiver);\r
- return pReceiver;\r
-\r
-}\r
-\r
-\r
-void mof::InputDevice::addReceiver(mof::DeviceInputReceiver* pReceiver){\r
- for(LISTENERITR itr = listenerList.begin() ; itr != listenerList.end() ; ++itr){\r
- if((*itr) == pReceiver)return;//\8aù\82É\93o\98^\8dÏ\82Ý\r
- }\r
- listenerList.push_back(pReceiver);\r
-}\r
-\r
-void mof::InputDevice::removeReceiver(mof::DeviceInputReceiver* pReceiver){\r
- for(LISTENERITR itr = listenerList.begin() ; itr != listenerList.end() ; ++itr){\r
- if((*itr) == pReceiver){\r
- listenerList.erase(itr);\r
- return;\r
- }\r
- }\r
- \r
-}\r
-*/\r
+#include "mof/private/DirectInput.hpp"
+#include <vector>
+#include "mof/InputReceiver.hpp"
+#include "mof/InputDevice.hpp"
+#include "mof/ConsoleIO.hpp"
+#include "mof/private/DeviceInputReceiver.hpp"
+#include "memory"
+
+namespace {
+ LPDIRECTINPUT8 pInput;
+ LPDIRECTINPUTDEVICE8A pDevice;
+ std::shared_ptr<mof::InputReceiver> pInputReceiver;//\8aO\95\94\82É\93n\82·\82½\82ß
+ mof::DeviceInputReceiver* pDeviceInputReceiver;//\8fã\8bL\82Æ\93¯\82¶\83C\83\93\83X\83^\83\93\83X
+}
+
+//--- \83v\83\8d\83g\83^\83C\83v\90é\8c¾
+BOOL CALLBACK enumJoyCallback(const DIDEVICEINSTANCE* pInstance , VOID* pContext);
+
+/**
+ * mof::InputDevice::initialize
+ *
+ */
+void mof::InputDevice::initialize( ){
+ HINSTANCE hInst = GetModuleHandle(NULL);
+ HRESULT hr;
+ hr = DirectInput8Create(hInst , DIRECTINPUT_VERSION ,IID_IDirectInput8 , (void**)&pInput , NULL);
+ if(FAILED(hr)){
+ switch(hr){
+ case DIERR_BETADIRECTINPUTVERSION :
+ DEBUG_PRINT("DIERR_BETADIRECTINPUTVERSION");
+ break;
+ case DIERR_INVALIDPARAM :
+ DEBUG_PRINT("DIERR_INVALIDPARAM");
+ break;
+ case DIERR_OLDDIRECTINPUTVERSION :
+ DEBUG_PRINT("DIERR_OLDDIRECTINPUTVERSION");
+ break;
+ case DIERR_OUTOFMEMORY :
+ DEBUG_PRINT("DIERR_OUTOFMEMORY");
+ break;
+ }
+ throw std::runtime_error("Failed --- create direct input");
+ }
+
+ LPCDIDATAFORMAT dataFmt = &c_dfDIJoystick;//\83W\83\87\83C\83X\83e\83B\83b\83N\82ª\8eæ\93¾\82Å\82«\82½\82Æ\89¼\92è
+ //---\83f\83o\83C\83X\82Ì\90Ý\92è
+ //\83Q\81[\83\80\83p\83b\83h\83f\83o\83C\83X\82ð\92T\82·
+ hr = pInput->EnumDevices(DI8DEVCLASS_GAMECTRL , enumJoyCallback , NULL , DIEDFL_ATTACHEDONLY);
+ if(FAILED(hr) || pDevice == NULL){
+ //\83Q\81[\83\80\83p\83b\83h\82ª\82È\82¯\82ê\82Î\83L\81[\83{\81[\83h
+ hr = pInput->CreateDevice(GUID_SysKeyboard , &pDevice , NULL);
+ if(FAILED(hr)){
+ pInput->Release();
+ pInput = NULL;
+ throw std::runtime_error("Failed --- create device");
+ }
+ dataFmt = &c_dfDIKeyboard;//\83L\81[\83{\81[\83h\82ð\83f\83o\83C\83X\82Æ\82µ\82Ä\8eæ\93¾
+ DEBUG_PRINT("Select --- keyboard as input device");
+ }
+ else DEBUG_PRINT("Select --- joystick as input device");
+
+ hr = pDevice->SetDataFormat(dataFmt);
+ if(FAILED(hr)){
+ pDevice->Release();
+ pDevice = NULL;
+ pInput->Release();
+ pInput = NULL;
+ throw std::runtime_error("Failed --- set data format");
+ }
+
+
+ DIPROPDWORD diprop;
+ diprop.diph.dwSize = sizeof(diprop);
+ diprop.diph.dwHeaderSize = sizeof(diprop.diph);
+ diprop.diph.dwObj = 0;
+ diprop.diph.dwHow = DIPH_DEVICE;
+ diprop.dwData = 1000;
+ pDevice->SetProperty(DIPROP_BUFFERSIZE , &diprop.diph);
+ setActivation(true);
+
+ pDeviceInputReceiver = new mof::DeviceInputReceiver();
+ pInputReceiver = std::shared_ptr<mof::InputReceiver>(pDeviceInputReceiver);
+}
+
+
+
+/**
+ * mof::InputDevice::finalize
+ *
+ */
+void mof::InputDevice::finalize(void)
+{
+ mof::InputDevice::setActivation(false);
+ if(pDevice != NULL)pDevice->Release();
+ if(pInput != NULL)pInput->Release();
+}
+
+
+void mof::InputDevice::setActivation(bool active){
+ if(pDevice == NULL)return;
+
+ if(active == false)pDevice->Unacquire();
+ else pDevice->Acquire();
+}
+
+
+
+BOOL CALLBACK enumJoyCallback(const DIDEVICEINSTANCE* pInstance , VOID* /*pContext*/ ){
+ HRESULT hr;
+
+ hr = pInput->CreateDevice(pInstance->guidInstance , &(pDevice) , NULL);
+ if(FAILED(hr))return DIENUM_CONTINUE;
+
+ DIDEVICEINSTANCE deviceInstance;
+ deviceInstance.dwSize = sizeof(DIDEVCAPS);
+ hr = pDevice->GetCapabilities((LPDIDEVCAPS)&deviceInstance);
+ if(FAILED(hr)){
+ pDevice->Release();
+ pDevice = NULL;
+ return DIENUM_CONTINUE;
+ }
+
+ *ConsoleOut::getInstance() << "Found InputDevice --- " << deviceInstance.tszInstanceName
+ << ":" << deviceInstance.tszProductName << std::endl;
+ return DIENUM_STOP;//\89½\82Å\82à\82¢\82¢\82©\82ç\8dÌ\97p
+}
+
+
+void mof::InputDevice::update(){
+
+ HRESULT hr;
+ while(true){
+ DIDEVICEOBJECTDATA od;
+ DWORD dwItems = 1;
+ hr = pDevice->GetDeviceData(sizeof(DIDEVICEOBJECTDATA) , &od , &dwItems , 0);
+ if(hr == DIERR_INPUTLOST)pDevice->Acquire();
+ else if(FAILED(hr) || dwItems == 0)return;
+
+ InputEvent iEvent(od.dwOfs , od.dwData);
+ //inputSignal(iEvent);
+ pDeviceInputReceiver->notifyInputEvent(iEvent);
+
+ /*for(int i = 0 ; i < listenerList.size() ; ++i){
+ int tmpSize = listenerList.size();
+ listenerList.at(i)->notifyInputEvent(iEvent);
+ if(tmpSize != listenerList.size())i--;//NotifyInputEvent\82ÅRemove\82³\82ê\82½\82©\82ð\83`\83F\83b\83N
+ }*/
+
+ }
+
+
+}
+
+
+
+std::shared_ptr<mof::InputReceiver> mof::InputDevice::getInputReceiver(){
+ return pInputReceiver;
+}
+
+
+/*
+namespace mof{
+
+ class DeviceInputReceiver;
+
+ class InputDevice
+ {
+
+
+ std::vector<DeviceInputReceiver*> listenerList;
+
+ void addReceiver(DeviceInputReceiver* pReceiver);
+ public:
+ InputDevice(void);
+ ~InputDevice(void);
+
+
+ bool initialize( HINSTANCE hInst);
+ static BOOL CALLBACK enumJoyCallback(const DIDEVICEINSTANCE* pInstance , VOID* pContext);
+
+ void activate(bool);
+ void updateInputData();
+ InputReceiver* getInputReceiver();
+ void removeReceiver(DeviceInputReceiver* pReceiver);
+ //void clearListenerList();
+
+
+ };
+
+};
+
+typedef std::vector<mof::DeviceInputReceiver*>::iterator LISTENERITR;
+
+mof::InputDevice::InputDevice(void)
+{
+ m_pInput = NULL;
+ m_pDevice = NULL;
+}
+
+mof::InputDevice::~InputDevice(void)
+{
+ activate(false);
+ if(m_pDevice != NULL)m_pDevice->Release();
+ if(m_pInput != NULL)m_pInput->Release();
+}
+
+
+bool mof::InputDevice::initialize( HINSTANCE hInst){
+ HRESULT hr;
+ hr = DirectInput8Create(hInst , DIRECTINPUT_VERSION ,IID_IDirectInput8 , (void**)&m_pInput , NULL);
+ if(FAILED(hr))return false;
+
+ LPCDIDATAFORMAT dataFmt = &c_dfDIJoystick;//\83W\83\87\83C\83X\83e\83B\83b\83N\82ª\8eæ\93¾\82Å\82«\82½\82Æ\89¼\92è
+ //---\83f\83o\83C\83X\82Ì\90Ý\92è
+ //\83Q\81[\83\80\83p\83b\83h\83f\83o\83C\83X\82ð\92T\82·
+ hr = m_pInput->EnumDevices(DI8DEVCLASS_GAMECTRL , enumJoyCallback , NULL , DIEDFL_ATTACHEDONLY);
+ if(FAILED(hr) || m_pDevice == NULL){
+ //\83Q\81[\83\80\83p\83b\83h\82ª\82È\82¯\82ê\82Î\83L\81[\83{\81[\83h
+ hr = m_pInput->CreateDevice(GUID_SysKeyboard , &m_pDevice , NULL);
+ if(FAILED(hr)){
+ m_pInput->Release();
+ m_pInput = NULL;
+ return false;
+ }
+ else dataFmt = &c_dfDIKeyboard;//\83L\81[\83{\81[\83h\82ð\83f\83o\83C\83X\82Æ\82µ\82Ä\8eæ\93¾
+ }
+
+
+ hr = m_pDevice->SetDataFormat(dataFmt);
+ if(FAILED(hr)){
+ *ConsoleOut::getInstance() << "SetDataFormat --- ERROR" << std::endl;
+ m_pDevice->Release();
+ m_pDevice = NULL;
+ m_pInput->Release();
+ m_pInput = NULL;
+ return false;
+ }
+
+ //m_pDevice->SetCooperativeLevel( hWnd , DISCL_FOREGROUND);
+
+ DIPROPDWORD diprop;
+ diprop.diph.dwSize = sizeof(diprop);
+ diprop.diph.dwHeaderSize = sizeof(diprop.diph);
+ diprop.diph.dwObj = 0;
+ diprop.diph.dwHow = DIPH_DEVICE;
+ diprop.dwData = 1000;
+ m_pDevice->SetProperty(DIPROP_BUFFERSIZE , &diprop.diph);
+ activate(true);
+ return true;
+}
+
+
+void mof::InputDevice::activate(bool active){
+ if(m_pDevice == NULL)return;
+
+ if(active == false)m_pDevice->Unacquire();
+ else m_pDevice->Acquire();
+}
+
+void mof::InputDevice::updateInputData(){
+
+ HRESULT hr;
+ while(true){
+ DIDEVICEOBJECTDATA od;
+ DWORD dwItems = 1;
+ hr = m_pDevice->GetDeviceData(sizeof(DIDEVICEOBJECTDATA) , &od , &dwItems , 0);
+ if(hr == DIERR_INPUTLOST)m_pDevice->Acquire();
+ else if(FAILED(hr) || dwItems == 0)return;
+
+ InputEvent iEvent(od.dwOfs , od.dwData);
+ //inputSignal(iEvent);
+
+ for(int i = 0 ; i < listenerList.size() ; ++i){
+ int tmpSize = listenerList.size();
+ listenerList.at(i)->notifyInputEvent(iEvent);
+ if(tmpSize != listenerList.size())i--;//NotifyInputEvent\82ÅRemove\82³\82ê\82½\82©\82ð\83`\83F\83b\83N
+ }
+
+ }
+
+
+}
+
+
+
+mof::InputReceiver* mof::InputDevice::getInputReceiver(){
+ mof::DeviceInputReceiver* pReceiver = new mof::DeviceInputReceiver();
+ addReceiver(pReceiver);
+ return pReceiver;
+
+}
+
+
+void mof::InputDevice::addReceiver(mof::DeviceInputReceiver* pReceiver){
+ for(LISTENERITR itr = listenerList.begin() ; itr != listenerList.end() ; ++itr){
+ if((*itr) == pReceiver)return;//\8aù\82É\93o\98^\8dÏ\82Ý
+ }
+ listenerList.push_back(pReceiver);
+}
+
+void mof::InputDevice::removeReceiver(mof::DeviceInputReceiver* pReceiver){
+ for(LISTENERITR itr = listenerList.begin() ; itr != listenerList.end() ; ++itr){
+ if((*itr) == pReceiver){
+ listenerList.erase(itr);
+ return;
+ }
+ }
+
+}
+*/
-#pragma once\r
-#include <memory>\r
-#include <windows.h>\r
-\r
-//TODO private\82Í\95Ê\83t\83@\83C\83\8b\82É\r
-namespace mof {\r
- class InputReceiver;\r
-\r
- namespace InputDevice{\r
-\r
- // --- private\r
- void initialize();\r
- void finalize();\r
- void setActivation(bool active);\r
- void update();\r
-\r
- // -- public\r
- std::shared_ptr<mof::InputReceiver> getInputReceiver();\r
- \r
-\r
- \r
- }\r
-}\r
+#pragma once
+#include <memory>
+#include <windows.h>
+
+//TODO private\82Í\95Ê\83t\83@\83C\83\8b\82É
+namespace mof {
+ class InputReceiver;
+
+ namespace InputDevice{
+
+ // --- private
+ void initialize();
+ void finalize();
+ void setActivation(bool active);
+ void update();
+
+ // -- public
+ std::shared_ptr<mof::InputReceiver> getInputReceiver();
+
+
+
+ }
+}
-#include "mof/InputEventCondition.hpp"\r
-\r
-mof::InputEventCondition::InputEventCondition(\r
- mof::InputReceiver::Key key, \r
- const std::shared_ptr<mof::InputReceiver> &pInputReceiver)\r
- : m_key(key) , m_pInputReceiver(pInputReceiver)\r
-{\r
- update();\r
-}\r
-\r
-mof::InputEventCondition::~InputEventCondition(){\r
-}\r
-\r
-bool mof::InputEventCondition::test(){\r
- return m_state;\r
-}\r
-\r
-void mof::InputEventCondition::update(){\r
- m_state = m_pInputReceiver->testKeyState(m_key);\r
-}\r
-\r
-bool mof::InputEventCondition::isDisposable(){\r
- return false;\r
-}\r
+#include "mof/InputEventCondition.hpp"
+
+mof::InputEventCondition::InputEventCondition(
+ mof::InputReceiver::Key key,
+ const std::shared_ptr<mof::InputReceiver> &pInputReceiver)
+ : m_key(key) , m_pInputReceiver(pInputReceiver)
+{
+ update();
+}
+
+mof::InputEventCondition::~InputEventCondition(){
+}
+
+bool mof::InputEventCondition::test(){
+ return m_state;
+}
+
+void mof::InputEventCondition::update(){
+ m_state = m_pInputReceiver->testKeyState(m_key);
+}
+
+bool mof::InputEventCondition::isDisposable(){
+ return false;
+}
-#pragma once\r
-#include "mof/EventCondition.hpp"\r
-#include "mof/InputReceiver.hpp"\r
-#include "memory"\r
-\r
-namespace mof{\r
-\r
-\r
- class InputEventCondition : public EventCondition{\r
- mof::InputReceiver::Key m_key;\r
- std::shared_ptr<mof::InputReceiver> m_pInputReceiver;\r
- bool m_state;\r
- public:\r
- InputEventCondition(\r
- mof::InputReceiver::Key key , \r
- const std::shared_ptr<mof::InputReceiver>& pInputReceiver\r
- );\r
-\r
- virtual ~InputEventCondition();\r
- virtual bool test();\r
- virtual void update();\r
- virtual bool isDisposable();\r
- };\r
-\r
-\r
-}\r
-\r
+#pragma once
+#include "mof/EventCondition.hpp"
+#include "mof/InputReceiver.hpp"
+#include "memory"
+
+namespace mof{
+
+
+ class InputEventCondition : public EventCondition{
+ mof::InputReceiver::Key m_key;
+ std::shared_ptr<mof::InputReceiver> m_pInputReceiver;
+ bool m_state;
+ public:
+ InputEventCondition(
+ mof::InputReceiver::Key key ,
+ const std::shared_ptr<mof::InputReceiver>& pInputReceiver
+ );
+
+ virtual ~InputEventCondition();
+ virtual bool test();
+ virtual void update();
+ virtual bool isDisposable();
+ };
+
+
+}
+
-#pragma once\r
-\r
-\r
-namespace mof{\r
- \r
- class InputReceiver{\r
- public:\r
- typedef enum{\r
- BEGIN = 0,\r
- UP, DOWN, LEFT, RIGHT,\r
- A , B , C , D , E , F , G , H , I ,\r
- J , K , L , M , N , O , P , Q , R ,\r
- S , T , U , V , W , X , Y , Z ,\r
- ESCAPE , ANY,\r
- END //\8dÅ\8cã\82Í\95K\82¸\82±\82ê\82Å\8fI\82í\82é\82æ\82¤\82É\r
- } Key;\r
-\r
- \r
- virtual ~InputReceiver(){}\r
- virtual bool testKeyState(Key key) = 0;\r
-\r
- /**\r
- * \95s\93Á\92è\91½\90\94\82Ì\83I\83u\83W\83F\83N\83g\82ª\82±\82Ì\83\81\83\\83b\83h\82ð\8cÄ\82Ñ\8fo\82·\82Æ\81A\r
- * \88Ó\90}\82µ\82½\93ü\97Í\8f\88\97\9d\82ª\82Å\82«\82È\82¢\89Â\94\\90«\82ª\82 \82è\82Ü\82·\81B\r
- */\r
- virtual void update() = 0;\r
- \r
- };\r
-};\r
+#pragma once
+
+
+namespace mof{
+
+ class InputReceiver{
+ public:
+ typedef enum{
+ BEGIN = 0,
+ UP, DOWN, LEFT, RIGHT,
+ A , B , C , D , E , F , G , H , I ,
+ J , K , L , M , N , O , P , Q , R ,
+ S , T , U , V , W , X , Y , Z ,
+ ESCAPE , ANY,
+ END //\8dÅ\8cã\82Í\95K\82¸\82±\82ê\82Å\8fI\82í\82é\82æ\82¤\82É
+ } Key;
+
+
+ virtual ~InputReceiver(){}
+ virtual bool testKeyState(Key key) = 0;
+
+ /**
+ * \95s\93Á\92è\91½\90\94\82Ì\83I\83u\83W\83F\83N\83g\82ª\82±\82Ì\83\81\83\\83b\83h\82ð\8cÄ\82Ñ\8fo\82·\82Æ\81A
+ * \88Ó\90}\82µ\82½\93ü\97Í\8f\88\97\9d\82ª\82Å\82«\82È\82¢\89Â\94\\90«\82ª\82 \82è\82Ü\82·\81B
+ */
+ virtual void update() = 0;
+
+ };
+};
- #pragma once\r
- #include "mof/Vector2D.hpp"\r
- #include "mof/stream/Manipulator.hpp"\r
- #include <map>\r
- #include <algorithm>\r
- \r
- namespace mof{\r
- \r
- template <typename T>\r
- T stepInterpolate(const std::map<mof::FrameNumber , T>& map , mof::FrameNumber current ){\r
- if(map.empty())throw std::invalid_argument("the map is empty");\r
- for(\r
- typename std::map<mof::FrameNumber , T>::const_reverse_iterator itr = map.rbegin() ;\r
- itr != map.rend() ; \r
- ++itr\r
- ){\r
- if(itr->first <= current)return itr->second;\r
- }\r
- return map.begin()->second;//default\r
- }\r
- \r
- template<class T> inline\r
- T calcLinerInterpolationValue( float blending , const T& prevObj , const T& nextObj){\r
- return (1 - blending) * prevObj + blending * nextObj;\r
- } \r
- \r
- //\8cë\8d·\92á\8c¸\82Ì\82½\82ß\82Ì\93Á\8eê\89»\r
- /*template<> inline\r
- Vector2D calcLinerInterpolationValue( float blending , const Vector2D& prev , const Vector2D& next )\r
- {\r
- return mof::Vector2D\r
- (\r
- prev.x != next.x ? (1 - blending) * prev.x + blending * next.x : prev.x , \r
- prev.y != next.y ? (1 - blending) * prev.y + blending * next.y : prev.y \r
- );\r
- }*/ \r
-\r
- template <typename T>\r
- T linerInterpolate(const std::map<mof::FrameNumber , T>& map , mof::FrameNumber current ){\r
- if(map.empty())throw std::invalid_argument("the map is empty");\r
- typename std::map<mof::FrameNumber , T>::const_iterator n = map.find(current);\r
- if(n != map.end())return n->second;// just key frame\r
- \r
- //\92¼\91O\81A\92¼\8cã\82Ì\83L\81[\82ð\8c\9f\8dõ\r
- mof::FrameNumber prevKeyFrame = current;\r
- bool foundPrev = false;\r
- T prevObj;\r
- mof::FrameNumber nextKeyFrame = current;\r
- bool foundNext = false;\r
- T nextObj;\r
- \r
- for(\r
- typename std::map<mof::FrameNumber , T>::const_iterator itr = map.begin() ;\r
- itr != map.end() ;\r
- ++itr\r
- ){\r
- if(itr->first < current && (!foundPrev || itr->first > prevKeyFrame)){\r
- foundPrev = true;\r
- prevKeyFrame = itr->first;\r
- prevObj = itr->second;\r
- }\r
- else if(itr->first > current && (!foundNext || itr->first < nextKeyFrame)){\r
- foundNext = true;\r
- nextKeyFrame = itr->first;\r
- nextObj = itr->second;\r
- }\r
- \r
- }\r
- \r
- assert(foundPrev || foundNext);\r
- if(!foundPrev && foundNext)return nextObj;//\92¼\91O\82Ì\83L\81[\82Í\8c©\82Â\82©\82ç\82È\82©\82Á\82½\r
- else if(foundPrev && !foundNext)return prevObj;//\92¼\8cã\82Ì\83L\81[\82Í\8c©\82Â\82©\82ç\82È\82©\82Á\82½\r
- float blending = static_cast<float>(current - prevKeyFrame) / static_cast<float>(nextKeyFrame - prevKeyFrame);\r
- return calcLinerInterpolationValue<T>(blending , prevObj , nextObj);\r
- }\r
- \r
- } //namespace mof\r
- \r
- \r
+ #pragma once
+ #include "mof/Vector2D.hpp"
+ #include "mof/stream/Manipulator.hpp"
+ #include <map>
+ #include <algorithm>
+
+ namespace mof{
+
+ template <typename T>
+ T stepInterpolate(const std::map<mof::FrameNumber , T>& map , mof::FrameNumber current ){
+ if(map.empty())throw std::invalid_argument("the map is empty");
+ for(
+ typename std::map<mof::FrameNumber , T>::const_reverse_iterator itr = map.rbegin() ;
+ itr != map.rend() ;
+ ++itr
+ ){
+ if(itr->first <= current)return itr->second;
+ }
+ return map.begin()->second;//default
+ }
+
+ template<class T> inline
+ T calcLinerInterpolationValue( float blending , const T& prevObj , const T& nextObj){
+ return (1 - blending) * prevObj + blending * nextObj;
+ }
+
+ //\8cë\8d·\92á\8c¸\82Ì\82½\82ß\82Ì\93Á\8eê\89»
+ /*template<> inline
+ Vector2D calcLinerInterpolationValue( float blending , const Vector2D& prev , const Vector2D& next )
+ {
+ return mof::Vector2D
+ (
+ prev.x != next.x ? (1 - blending) * prev.x + blending * next.x : prev.x ,
+ prev.y != next.y ? (1 - blending) * prev.y + blending * next.y : prev.y
+ );
+ }*/
+
+ template <typename T>
+ T linerInterpolate(const std::map<mof::FrameNumber , T>& map , mof::FrameNumber current ){
+ if(map.empty())throw std::invalid_argument("the map is empty");
+ typename std::map<mof::FrameNumber , T>::const_iterator n = map.find(current);
+ if(n != map.end())return n->second;// just key frame
+
+ //\92¼\91O\81A\92¼\8cã\82Ì\83L\81[\82ð\8c\9f\8dõ
+ mof::FrameNumber prevKeyFrame = current;
+ bool foundPrev = false;
+ T prevObj;
+ mof::FrameNumber nextKeyFrame = current;
+ bool foundNext = false;
+ T nextObj;
+
+ for(
+ typename std::map<mof::FrameNumber , T>::const_iterator itr = map.begin() ;
+ itr != map.end() ;
+ ++itr
+ ){
+ if(itr->first < current && (!foundPrev || itr->first > prevKeyFrame)){
+ foundPrev = true;
+ prevKeyFrame = itr->first;
+ prevObj = itr->second;
+ }
+ else if(itr->first > current && (!foundNext || itr->first < nextKeyFrame)){
+ foundNext = true;
+ nextKeyFrame = itr->first;
+ nextObj = itr->second;
+ }
+
+ }
+
+ assert(foundPrev || foundNext);
+ if(!foundPrev && foundNext)return nextObj;//\92¼\91O\82Ì\83L\81[\82Í\8c©\82Â\82©\82ç\82È\82©\82Á\82½
+ else if(foundPrev && !foundNext)return prevObj;//\92¼\8cã\82Ì\83L\81[\82Í\8c©\82Â\82©\82ç\82È\82©\82Á\82½
+ float blending = static_cast<float>(current - prevKeyFrame) / static_cast<float>(nextKeyFrame - prevKeyFrame);
+ return calcLinerInterpolationValue<T>(blending , prevObj , nextObj);
+ }
+
+ } //namespace mof
+
+
-#include "mof/Interpreter.hpp"\r
-#include "mof/private/Interpreter.hpp"\r
-#include "mof/private/regist.hpp"\r
-#include "mof/EventScheduler.hpp"\r
-#include "mof/OnceEventCondition.hpp"\r
-#include "mof/InputReceiver.hpp"\r
-#include "mof/MessageWidget.hpp"\r
-#include "mof/LuaScript.hpp"\r
-#include "mof/KeyPressedEventCondition.hpp"\r
-#include "mof/ConsoleIO.hpp"\r
-#include "mof/utilities.hpp"\r
-#include <boost/bind.hpp>\r
- \r
-typedef std::shared_ptr< mof::MessageWidget > MessageWidgetHandler;\r
-\r
-//{{{ \83\82\83W\83\85\81[\83\8b\95Ï\90\94\r
-namespace\r
-{\r
- \r
- std::vector<MessageWidgetHandler> m_messages;\r
- mof::EventScheduler m_scheduler;\r
- mof::LuaScript* m_pLua;\r
- std::shared_ptr<mof::InputReceiver> m_pInput;\r
- mof::InstructionSet* m_pInstructionSet;\r
- mof::Interpreter::State m_state;\r
-} // namepsace \r
-//}}}\r
-namespace mof\r
-{\r
-//{{{ _setState\r
- void _setState( Interpreter::State state )\r
- {\r
- m_state = state;\r
- /*switch( m_state )\r
- {\r
- case mof::Interpreter::WAITING : \r
- throw std::runtime_error("waiting on taskFinished");//\82±\82±\82É\97\88\82é\82±\82Æ\82Í\82 \82è\82¦\82È\82¢\r
- break;\r
- case mof::Interpreter::RUNNING :\r
- m_state = mof::Interpreter::WAITING;\r
- break;\r
- case mof::Interpreter::BUSY :\r
- m_state = mof::Interpreter::RUNNING;\r
- mof::Interpreter::doNextCommand();\r
- break;\r
- case mof::Interpreter::FREE :\r
- throw std::runtime_error("waiting on taskFinished");//\82±\82±\82É\97\88\82é\82±\82Æ\82Í\82 \82è\82¦\82È\82¢\r
- break;\r
- }*/\r
- }\r
-//}}} \r
-//{{{ _createMessageWidget \r
- int Interpreter::_createMessageWidget()\r
- {\r
- m_messages.push_back( m_pInstructionSet->createMessageWidget( ) );\r
- return m_messages.size() -1;\r
- }\r
-//}}}\r
-//{{{ _addMessageWidgetPage \r
- int Interpreter::_addMessageWidgetPage\r
- ( \r
- int id ,\r
- const mof::tstring& title ,\r
- const mof::tstring& text \r
- )\r
- {\r
- int frame = m_pInstructionSet->addMessageWidgetPage( m_messages.at(id) , title , text ) ;\r
- m_messages.at(id)->nextPage();\r
- return frame;\r
- }\r
-//}}}\r
-//{{{ _hideMessageWidget\r
- int Interpreter::_hideMessageWidget( int id ){\r
- m_messages.at( id )->close();\r
- return 10;\r
- }\r
-//}}}\r
-//{{{ _waitKey\r
- void Interpreter::_waitKey( const mof::tstring& keystring ){\r
- mof::InputReceiver::Key key;\r
- if( keystring == "z" || keystring == "Z")key = mof::InputReceiver::Z;\r
- else return;\r
-\r
- m_scheduler.addEvent\r
- (\r
- new mof::OnceEventCondition( new mof::KeyPressedEventCondition( key , m_pInput ) ) , \r
- boost::bind( &mof::_setState , mof::Interpreter::WAITING )\r
- );\r
- _setState( mof::Interpreter::RUNNING );\r
- }\r
-//}}}\r
-//{{{ _waitFrame\r
- void Interpreter::_waitFrame( int frame ){\r
- m_scheduler.addEvent\r
- (\r
- frame , \r
- boost::bind( &mof::_setState , mof::Interpreter::WAITING )\r
- );\r
- _setState( mof::Interpreter::RUNNING );\r
- }\r
-//}}}\r
-//{{{ initialize \r
- void Interpreter::initialize\r
- ( \r
- const boost::shared_ptr<mof::InputReceiver>& pInput ,\r
- InstructionSet& implementation \r
- )\r
- {\r
- m_pLua = NULL;\r
- m_pInput = pInput;\r
- m_pInstructionSet = &implementation;\r
- m_state = WAITING;\r
- \r
- }\r
-//}}} \r
-//{{{ finalize\r
- void Interpreter::finalize() \r
- {\r
- mof::safe_delete( m_pLua );\r
- } \r
-//}}} \r
-//{{{ getState\r
- Interpreter::State Interpreter::getState( ) \r
- {\r
- return m_state;\r
- }\r
-//}}}\r
-//{{{ doNextCommand\r
- void Interpreter::doNextCommand( )\r
- {\r
- switch( m_state )\r
- {\r
- case WAITING : \r
- m_pLua->nextCommand();\r
- break;\r
- case RUNNING :\r
- m_state = BUSY;\r
- break;\r
- case BUSY :\r
- break;\r
- case FREE :\r
- break;\r
- }\r
- }\r
-//}}} \r
-//{{{ open \r
- void Interpreter::open( const tstring& filename )\r
- {\r
- if( !m_pLua )m_pLua = new LuaScript(filename);\r
- //---\8aÖ\90\94\82Ì\8a\84\82è\93\96\82Ä\r
- mof::regist::registMessage( m_pLua->getLuaState() );\r
- mof::regist::registWait( m_pLua->getLuaState() );\r
- }\r
-//}}}\r
-//{{{ update\r
- void Interpreter::update()\r
- {\r
- \r
- m_scheduler.update();\r
-\r
- foreach( MessageWidgetHandler& handler , m_messages )\r
- {\r
- if( handler.get() )handler->update();\r
- }\r
- }\r
-//}}} \r
-} //namespace mof\r
+#include "mof/Interpreter.hpp"
+#include "mof/private/Interpreter.hpp"
+#include "mof/private/regist.hpp"
+#include "mof/EventScheduler.hpp"
+#include "mof/OnceEventCondition.hpp"
+#include "mof/InputReceiver.hpp"
+#include "mof/MessageWidget.hpp"
+#include "mof/LuaScript.hpp"
+#include "mof/KeyPressedEventCondition.hpp"
+#include "mof/ConsoleIO.hpp"
+#include "mof/utilities.hpp"
+#include <boost/bind.hpp>
+
+typedef std::shared_ptr< mof::MessageWidget > MessageWidgetHandler;
+
+//{{{ \83\82\83W\83\85\81[\83\8b\95Ï\90\94
+namespace
+{
+
+ std::vector<MessageWidgetHandler> m_messages;
+ mof::EventScheduler m_scheduler;
+ mof::LuaScript* m_pLua;
+ std::shared_ptr<mof::InputReceiver> m_pInput;
+ mof::InstructionSet* m_pInstructionSet;
+ mof::Interpreter::State m_state;
+} // namepsace
+//}}}
+namespace mof
+{
+//{{{ _setState
+ void _setState( Interpreter::State state )
+ {
+ m_state = state;
+ /*switch( m_state )
+ {
+ case mof::Interpreter::WAITING :
+ throw std::runtime_error("waiting on taskFinished");//\82±\82±\82É\97\88\82é\82±\82Æ\82Í\82 \82è\82¦\82È\82¢
+ break;
+ case mof::Interpreter::RUNNING :
+ m_state = mof::Interpreter::WAITING;
+ break;
+ case mof::Interpreter::BUSY :
+ m_state = mof::Interpreter::RUNNING;
+ mof::Interpreter::doNextCommand();
+ break;
+ case mof::Interpreter::FREE :
+ throw std::runtime_error("waiting on taskFinished");//\82±\82±\82É\97\88\82é\82±\82Æ\82Í\82 \82è\82¦\82È\82¢
+ break;
+ }*/
+ }
+//}}}
+//{{{ _createMessageWidget
+ int Interpreter::_createMessageWidget()
+ {
+ m_messages.push_back( m_pInstructionSet->createMessageWidget( ) );
+ return m_messages.size() -1;
+ }
+//}}}
+//{{{ _addMessageWidgetPage
+ int Interpreter::_addMessageWidgetPage
+ (
+ int id ,
+ const mof::tstring& title ,
+ const mof::tstring& text
+ )
+ {
+ int frame = m_pInstructionSet->addMessageWidgetPage( m_messages.at(id) , title , text ) ;
+ m_messages.at(id)->nextPage();
+ return frame;
+ }
+//}}}
+//{{{ _hideMessageWidget
+ int Interpreter::_hideMessageWidget( int id ){
+ m_messages.at( id )->close();
+ return 10;
+ }
+//}}}
+//{{{ _waitKey
+ void Interpreter::_waitKey( const mof::tstring& keystring ){
+ mof::InputReceiver::Key key;
+ if( keystring == "z" || keystring == "Z")key = mof::InputReceiver::Z;
+ else return;
+
+ m_scheduler.addEvent
+ (
+ new mof::OnceEventCondition( new mof::KeyPressedEventCondition( key , m_pInput ) ) ,
+ boost::bind( &mof::_setState , mof::Interpreter::WAITING )
+ );
+ _setState( mof::Interpreter::RUNNING );
+ }
+//}}}
+//{{{ _waitFrame
+ void Interpreter::_waitFrame( int frame ){
+ m_scheduler.addEvent
+ (
+ frame ,
+ boost::bind( &mof::_setState , mof::Interpreter::WAITING )
+ );
+ _setState( mof::Interpreter::RUNNING );
+ }
+//}}}
+//{{{ initialize
+ void Interpreter::initialize
+ (
+ const boost::shared_ptr<mof::InputReceiver>& pInput ,
+ InstructionSet& implementation
+ )
+ {
+ m_pLua = NULL;
+ m_pInput = pInput;
+ m_pInstructionSet = &implementation;
+ m_state = WAITING;
+
+ }
+//}}}
+//{{{ finalize
+ void Interpreter::finalize()
+ {
+ mof::safe_delete( m_pLua );
+ }
+//}}}
+//{{{ getState
+ Interpreter::State Interpreter::getState( )
+ {
+ return m_state;
+ }
+//}}}
+//{{{ doNextCommand
+ void Interpreter::doNextCommand( )
+ {
+ switch( m_state )
+ {
+ case WAITING :
+ m_pLua->nextCommand();
+ break;
+ case RUNNING :
+ m_state = BUSY;
+ break;
+ case BUSY :
+ break;
+ case FREE :
+ break;
+ }
+ }
+//}}}
+//{{{ open
+ void Interpreter::open( const tstring& filename )
+ {
+ if( !m_pLua )m_pLua = new LuaScript(filename);
+ //---\8aÖ\90\94\82Ì\8a\84\82è\93\96\82Ä
+ mof::regist::registMessage( m_pLua->getLuaState() );
+ mof::regist::registWait( m_pLua->getLuaState() );
+ }
+//}}}
+//{{{ update
+ void Interpreter::update()
+ {
+
+ m_scheduler.update();
+
+ foreach( MessageWidgetHandler& handler , m_messages )
+ {
+ if( handler.get() )handler->update();
+ }
+ }
+//}}}
+} //namespace mof
-#pragma once\r
-#include "mof/script/CommandSet.hpp"\r
-#include <memory>\r
-\r
-namespace mof\r
-{\r
- class InputReceiver;\r
- \r
- namespace Interpreter\r
- {\r
- enum State\r
- {\r
- WAITING , /** doNextCommand\82Å\8e\9f\82Ì\83R\83}\83\93\83h\82ð\89ð\90Í\82·\82é */\r
- BUSY , /** \83R\83}\83\93\83h\82ð\8f\88\97\9d\92\86(doNextCommand\82Í\8cÄ\82Î\82ê\82Ä\82¢\82é) */\r
- RUNNING , /** \83R\83}\83\93\83h\82ð\8f\88\97\9d\92\86(doNextCommand\82Í\8cÄ\82Î\82ê\82Ä\82¢\82È\82¢) */\r
- FREE /** \83X\83N\83\8a\83v\83g\82ð\8dÅ\8cã\82Ü\82Å\8f\88\97\9d\82µ\82½ */\r
- };\r
- \r
- /**\r
- * @note \88ø\90\94\82Å\93n\82µ\82½\93ü\97Í\83\8c\83V\81[\83o\82É\82æ\82Á\82Ä\81A\83R\83}\83\93\83h\82Ì\8f\88\97\9d\82ª\8ds\82í\82ê\82é\r
- * @param[in] \83R\83}\83\93\83h\8f\88\97\9d\97p\83C\83\93\83v\83b\83g\83\8c\83V\81[\83o\r
- * @param[in] \96½\97ß\82Ì\8eÀ\91\95\r
- */\r
- void initialize\r
- ( \r
- const std::shared_ptr<InputReceiver> & pInput ,\r
- std::shared_ptr<mof::script::CommandSet> cs\r
- );\r
-\r
- void finalize( );\r
- \r
- \r
- /**\r
- * @brief \82±\82Ì\83N\83\89\83X\82Ì\83I\83u\83W\83F\83N\83g\82É\82æ\82è\89ð\90Í\82³\82ê\82é\83X\83N\83\8a\83v\83g\82ð\92Ç\89Á\82·\82é\r
- * @param[in] \83X\83N\83\8a\83v\83g\83t\83@\83C\83\8b\96¼\r
- */\r
- void open( const tstring& filename );\r
- \r
- /**\r
- * @brief \8c»\8dÝ\82Ì\83C\83\93\83^\83v\83\8a\83^\82Ì\8fó\91Ô\82ð\93¾\82é\r
- * @return \8c»\8dÝ\82Ì\8fó\91Ô\r
- */\r
- State getState();\r
- \r
- /**\r
- * @brief \83R\83}\83\93\83h\82Ì\8f\88\97\9d\82ð\8ds\82¤\r
- * @note create\8cn\83\81\83\\83b\83h\82Å\90¶\90¬\82³\82ê\82½\83\8a\83\\81[\83X\82Ì\8dX\90V\83\81\83\\83b\83h\82ª\8cÄ\82Î\82ê\82é\81B\r
- * @note \82½\82¾\82µ\81Ainactive\8cn\83\81\83\\83b\83h\82Å\93n\82³\82ê\82½\83\8a\83\\81[\83X\82É\82Â\82¢\82Ä\82Í\82±\82Ì\8cÀ\82è\82Å\82È\82¢\81B\r
- */\r
- void update();\r
- \r
- /**\r
- * @brief \83C\83\93\83^\83v\83\8a\83^\82É\8e\9f\82Ì\83R\83}\83\93\83h\82Ì\8eÀ\8ds\82ð\91£\82·\r
- * @note \83C\83\93\83^\83v\83\8a\83^\82ªWAITING\8fó\91Ô\82Ì\8fê\8d\87\81A\92¼\82¿\82É\8e\9f\82Ì\83R\83}\83\93\83h\82ª\89ð\90Í\82³\82ê\82é\81BRUNNING\81ABUSY\8fó\91Ô\r
- * @note \82Ì\8fê\8d\87\82Íupdate\8cÄ\82Ñ\8fo\82µ\82É\82æ\82è\83C\83\93\83^\83v\83\8a\83^\82ª\8c»\8dÝ\82Ì\83R\83}\83\93\83h\82Ì\8f\88\97\9d\82ð\8a®\97¹\82µ\82½\8cã\82Å\8e\9f\82Ì\r
- * @note \89ð\90Í\82ª\8aJ\8en\82³\82ê\82é\81B\r
- */\r
- void doNextCommand();\r
- \r
- \r
- };\r
-\r
-}\r
-\r
+#pragma once
+#include "mof/script/CommandSet.hpp"
+#include <memory>
+
+namespace mof
+{
+ class InputReceiver;
+
+ namespace Interpreter
+ {
+ enum State
+ {
+ WAITING , /** doNextCommand\82Å\8e\9f\82Ì\83R\83}\83\93\83h\82ð\89ð\90Í\82·\82é */
+ BUSY , /** \83R\83}\83\93\83h\82ð\8f\88\97\9d\92\86(doNextCommand\82Í\8cÄ\82Î\82ê\82Ä\82¢\82é) */
+ RUNNING , /** \83R\83}\83\93\83h\82ð\8f\88\97\9d\92\86(doNextCommand\82Í\8cÄ\82Î\82ê\82Ä\82¢\82È\82¢) */
+ FREE /** \83X\83N\83\8a\83v\83g\82ð\8dÅ\8cã\82Ü\82Å\8f\88\97\9d\82µ\82½ */
+ };
+
+ /**
+ * @note \88ø\90\94\82Å\93n\82µ\82½\93ü\97Í\83\8c\83V\81[\83o\82É\82æ\82Á\82Ä\81A\83R\83}\83\93\83h\82Ì\8f\88\97\9d\82ª\8ds\82í\82ê\82é
+ * @param[in] \83R\83}\83\93\83h\8f\88\97\9d\97p\83C\83\93\83v\83b\83g\83\8c\83V\81[\83o
+ * @param[in] \96½\97ß\82Ì\8eÀ\91\95
+ */
+ void initialize
+ (
+ const std::shared_ptr<InputReceiver> & pInput ,
+ std::shared_ptr<mof::script::CommandSet> cs
+ );
+
+ void finalize( );
+
+
+ /**
+ * @brief \82±\82Ì\83N\83\89\83X\82Ì\83I\83u\83W\83F\83N\83g\82É\82æ\82è\89ð\90Í\82³\82ê\82é\83X\83N\83\8a\83v\83g\82ð\92Ç\89Á\82·\82é
+ * @param[in] \83X\83N\83\8a\83v\83g\83t\83@\83C\83\8b\96¼
+ */
+ void open( const tstring& filename );
+
+ /**
+ * @brief \8c»\8dÝ\82Ì\83C\83\93\83^\83v\83\8a\83^\82Ì\8fó\91Ô\82ð\93¾\82é
+ * @return \8c»\8dÝ\82Ì\8fó\91Ô
+ */
+ State getState();
+
+ /**
+ * @brief \83R\83}\83\93\83h\82Ì\8f\88\97\9d\82ð\8ds\82¤
+ * @note create\8cn\83\81\83\\83b\83h\82Å\90¶\90¬\82³\82ê\82½\83\8a\83\\81[\83X\82Ì\8dX\90V\83\81\83\\83b\83h\82ª\8cÄ\82Î\82ê\82é\81B
+ * @note \82½\82¾\82µ\81Ainactive\8cn\83\81\83\\83b\83h\82Å\93n\82³\82ê\82½\83\8a\83\\81[\83X\82É\82Â\82¢\82Ä\82Í\82±\82Ì\8cÀ\82è\82Å\82È\82¢\81B
+ */
+ void update();
+
+ /**
+ * @brief \83C\83\93\83^\83v\83\8a\83^\82É\8e\9f\82Ì\83R\83}\83\93\83h\82Ì\8eÀ\8ds\82ð\91£\82·
+ * @note \83C\83\93\83^\83v\83\8a\83^\82ªWAITING\8fó\91Ô\82Ì\8fê\8d\87\81A\92¼\82¿\82É\8e\9f\82Ì\83R\83}\83\93\83h\82ª\89ð\90Í\82³\82ê\82é\81BRUNNING\81ABUSY\8fó\91Ô
+ * @note \82Ì\8fê\8d\87\82Íupdate\8cÄ\82Ñ\8fo\82µ\82É\82æ\82è\83C\83\93\83^\83v\83\8a\83^\82ª\8c»\8dÝ\82Ì\83R\83}\83\93\83h\82Ì\8f\88\97\9d\82ð\8a®\97¹\82µ\82½\8cã\82Å\8e\9f\82Ì
+ * @note \89ð\90Í\82ª\8aJ\8en\82³\82ê\82é\81B
+ */
+ void doNextCommand();
+
+
+ };
+
+}
+
-#include "mof/KeyPressedEventCondition.hpp"\r
-\r
-mof::KeyPressedEventCondition::KeyPressedEventCondition\r
-(\r
- mof::InputReceiver::Key key, \r
- const std::shared_ptr<mof::InputReceiver> &pInputReceiver \r
-)\r
-: m_key(key) , m_pInputReceiver(pInputReceiver) , m_currentState(false) \r
-{\r
- update();\r
-}\r
-\r
-mof::KeyPressedEventCondition::~KeyPressedEventCondition(){\r
-}\r
-\r
-bool mof::KeyPressedEventCondition::test(){\r
- return m_oldState == false && m_currentState == true ;\r
-}\r
-\r
-void mof::KeyPressedEventCondition::update(){\r
- m_oldState = m_currentState;\r
- m_currentState = m_pInputReceiver->testKeyState(m_key);\r
-}\r
-\r
-bool mof::KeyPressedEventCondition::isDisposable(){\r
- return false;\r
-}\r
-\r
-\r
+#include "mof/KeyPressedEventCondition.hpp"
+
+mof::KeyPressedEventCondition::KeyPressedEventCondition
+(
+ mof::InputReceiver::Key key,
+ const std::shared_ptr<mof::InputReceiver> &pInputReceiver
+)
+: m_key(key) , m_pInputReceiver(pInputReceiver) , m_currentState(false)
+{
+ update();
+}
+
+mof::KeyPressedEventCondition::~KeyPressedEventCondition(){
+}
+
+bool mof::KeyPressedEventCondition::test(){
+ return m_oldState == false && m_currentState == true ;
+}
+
+void mof::KeyPressedEventCondition::update(){
+ m_oldState = m_currentState;
+ m_currentState = m_pInputReceiver->testKeyState(m_key);
+}
+
+bool mof::KeyPressedEventCondition::isDisposable(){
+ return false;
+}
+
+
-#pragma once\r
-#include "mof/EventCondition.hpp"\r
-#include "mof/InputReceiver.hpp"\r
-#include "memory"\r
-\r
-namespace mof{\r
-\r
-\r
- class KeyPressedEventCondition : public EventCondition{\r
- mof::InputReceiver::Key m_key;\r
- std::shared_ptr<mof::InputReceiver> m_pInputReceiver;\r
- bool m_oldState;\r
- bool m_currentState;\r
- public:\r
- KeyPressedEventCondition\r
- (\r
- mof::InputReceiver::Key key , \r
- const std::shared_ptr<mof::InputReceiver>& pInputReceiver \r
- );\r
-\r
- virtual ~KeyPressedEventCondition();\r
- virtual bool test();\r
- virtual void update();\r
- virtual bool isDisposable();\r
- };\r
-\r
-\r
-}\r
-\r
+#pragma once
+#include "mof/EventCondition.hpp"
+#include "mof/InputReceiver.hpp"
+#include "memory"
+
+namespace mof{
+
+
+ class KeyPressedEventCondition : public EventCondition{
+ mof::InputReceiver::Key m_key;
+ std::shared_ptr<mof::InputReceiver> m_pInputReceiver;
+ bool m_oldState;
+ bool m_currentState;
+ public:
+ KeyPressedEventCondition
+ (
+ mof::InputReceiver::Key key ,
+ const std::shared_ptr<mof::InputReceiver>& pInputReceiver
+ );
+
+ virtual ~KeyPressedEventCondition();
+ virtual bool test();
+ virtual void update();
+ virtual bool isDisposable();
+ };
+
+
+}
+
-#include "mof/Light.hpp"\r
-#include "mof/stream/Constant.hpp"\r
-\r
-mof::Light::Light()\r
-: m_diffuseColor(mof::makeConstantHandler(mof::Color4f(1 , 1 , 1))) , m_frame(0){\r
- \r
-}\r
-\r
-\r
-mof::Light::~Light(){\r
-}\r
-\r
-void mof::Light::setDiffuseColor(mof::Color4f color){\r
- mof::Manipulator<mof::Color4f>::Handler f = mof::makeConstantHandler(color);\r
- setDiffuseColor(f);\r
-}\r
-\r
-void mof::Light::setDiffuseColor(const mof::Manipulator<mof::Color4f>::Handler& f){\r
- m_diffuseColor = f;\r
- m_frame = 0;\r
-}\r
-\r
+#include "mof/Light.hpp"
+#include "mof/stream/Constant.hpp"
+
+mof::Light::Light()
+: m_diffuseColor(mof::makeConstantHandler(mof::Color4f(1 , 1 , 1))) , m_frame(0){
+
+}
+
+
+mof::Light::~Light(){
+}
+
+void mof::Light::setDiffuseColor(mof::Color4f color){
+ mof::Manipulator<mof::Color4f>::Handler f = mof::makeConstantHandler(color);
+ setDiffuseColor(f);
+}
+
+void mof::Light::setDiffuseColor(const mof::Manipulator<mof::Color4f>::Handler& f){
+ m_diffuseColor = f;
+ m_frame = 0;
+}
+
-#ifndef MOF_ANIMATION\r
-#define MOF_ANIMATION\r
-#include <boost/utility.hpp>\r
-#include "mof/Color.hpp"\r
-#include "mof/streams.hpp"\r
-\r
-namespace mof{\r
-\r
-class Light : public boost::noncopyable{\r
- \r
-protected:\r
- mof::Manipulator<mof::Color4f>::Handler m_diffuseColor;\r
- FrameNumber m_frame;\r
-public:\r
- typedef std::shared_ptr<Light> ptr;\r
- Light();\r
- virtual ~Light();\r
- void setDiffuseColor(mof::Color4f color);\r
- void setDiffuseColor(const mof::Manipulator<mof::Color4f>::Handler& f);\r
-\r
- virtual void setEnable(bool enable) = 0;\r
-\r
-};\r
-\r
-};\r
-\r
-#endif\r
+#ifndef MOF_ANIMATION
+#define MOF_ANIMATION
+#include <boost/utility.hpp>
+#include "mof/Color.hpp"
+#include "mof/streams.hpp"
+
+namespace mof{
+
+class Light : public boost::noncopyable{
+
+protected:
+ mof::Manipulator<mof::Color4f>::Handler m_diffuseColor;
+ FrameNumber m_frame;
+public:
+ typedef std::shared_ptr<Light> ptr;
+ Light();
+ virtual ~Light();
+ void setDiffuseColor(mof::Color4f color);
+ void setDiffuseColor(const mof::Manipulator<mof::Color4f>::Handler& f);
+
+ virtual void setEnable(bool enable) = 0;
+
+};
+
+};
+
+#endif
-#include "Line3D.h"\r
-\r
-mof::Line3D::Line3D(float beginX , float beginY , float beginZ , float endX , float endY , float endZ)\r
-{\r
- m_begin = mof::Vector3D(beginX , beginY , beginZ);\r
- m_end = mof::Vector3D(endX , endY , endZ);\r
-}\r
-\r
-\r
-mof::Line3D::Line3D(mof::Vector3D& begin , mof::Vector3D& end){\r
- m_begin = begin;\r
- m_end = end;\r
-}\r
-\r
-mof::Line3D::~Line3D(void)\r
-{\r
-}\r
-\r
- \r
-\r
+#include "Line3D.h"
+
+mof::Line3D::Line3D(float beginX , float beginY , float beginZ , float endX , float endY , float endZ)
+{
+ m_begin = mof::Vector3D(beginX , beginY , beginZ);
+ m_end = mof::Vector3D(endX , endY , endZ);
+}
+
+
+mof::Line3D::Line3D(mof::Vector3D& begin , mof::Vector3D& end){
+ m_begin = begin;
+ m_end = end;
+}
+
+mof::Line3D::~Line3D(void)
+{
+}
+
+
+
-#pragma once\r
-#include "mof/Vector3D.h"\r
-\r
-namespace mof{\r
- class Line3D\r
- {\r
-\r
- mof::Vector3D m_begin;\r
- mof::Vector3D m_end;\r
- public:\r
- Line3D(float beginX , float beginY , float beginZ , float endX , float endY , float endZ);\r
- Line3D(mof::Vector3D& begin , mof::Vector3D& end);\r
- ~Line3D(void);\r
-\r
- mof::Vector3D& getBegin(){return m_begin;}\r
- mof::Vector3D& getEnd(){return m_end;}\r
-\r
- \r
- };\r
-\r
-\r
+#pragma once
+#include "mof/Vector3D.h"
+
+namespace mof{
+ class Line3D
+ {
+
+ mof::Vector3D m_begin;
+ mof::Vector3D m_end;
+ public:
+ Line3D(float beginX , float beginY , float beginZ , float endX , float endY , float endZ);
+ Line3D(mof::Vector3D& begin , mof::Vector3D& end);
+ ~Line3D(void);
+
+ mof::Vector3D& getBegin(){return m_begin;}
+ mof::Vector3D& getEnd(){return m_end;}
+
+
+ };
+
+
};
\ No newline at end of file
-#include "mof/LoggedInputReceiver.hpp"\r
-#include "mof/InputDevice.hpp"\r
-\r
-mof::LoggedInputReceiver::LoggedInputReceiver(TCHAR* filename )\r
-: mof::InputReceiver() , m_log(filename){\r
-}\r
-\r
-mof::LoggedInputReceiver::~LoggedInputReceiver(){\r
- \r
-}\r
-\r
-bool mof::LoggedInputReceiver::testKeyState(mof::InputReceiver::Key){\r
- bool result = false;\r
- m_log >> result;\r
- return result;\r
- \r
-}\r
-\r
-void mof::LoggedInputReceiver::update(){\r
-}\r
-\r
+#include "mof/LoggedInputReceiver.hpp"
+#include "mof/InputDevice.hpp"
+
+mof::LoggedInputReceiver::LoggedInputReceiver(TCHAR* filename )
+: mof::InputReceiver() , m_log(filename){
+}
+
+mof::LoggedInputReceiver::~LoggedInputReceiver(){
+
+}
+
+bool mof::LoggedInputReceiver::testKeyState(mof::InputReceiver::Key){
+ bool result = false;
+ m_log >> result;
+ return result;
+
+}
+
+void mof::LoggedInputReceiver::update(){
+}
+
-#pragma once\r
-#include "mof/InputReceiver.hpp"\r
-#include "mof/tstring.hpp"\r
-#include <fstream>\r
-\r
-\r
-\r
-namespace mof{\r
- \r
-\r
- class LoggedInputReceiver : public InputReceiver\r
- {\r
- std::ifstream m_log;\r
- \r
- public:\r
- \r
- LoggedInputReceiver(TCHAR* filename );\r
- virtual ~LoggedInputReceiver();\r
- virtual bool testKeyState(mof::InputReceiver::Key key);\r
- virtual void update();\r
- \r
- };\r
-\r
-};\r
+#pragma once
+#include "mof/InputReceiver.hpp"
+#include "mof/tstring.hpp"
+#include <fstream>
+
+
+
+namespace mof{
+
+
+ class LoggedInputReceiver : public InputReceiver
+ {
+ std::ifstream m_log;
+
+ public:
+
+ LoggedInputReceiver(TCHAR* filename );
+ virtual ~LoggedInputReceiver();
+ virtual bool testKeyState(mof::InputReceiver::Key key);
+ virtual void update();
+
+ };
+
+};
-#include "mof/LoggingInputReceiver.hpp"\r
-#include "mof/InputDevice.hpp"\r
-#include <fstream>\r
-\r
-\r
-mof::LoggingInputReceiver::LoggingInputReceiver(TCHAR* filename )\r
-: m_filename(filename){\r
-}\r
-\r
-mof::LoggingInputReceiver::~LoggingInputReceiver(){\r
- output();\r
-}\r
-\r
-bool mof::LoggingInputReceiver::testKeyState(mof::InputReceiver::Key key){\r
- bool result = mof::InputDevice::getInputReceiver()->testKeyState(key);\r
- m_log.push_back(result);\r
- return result;\r
- \r
-}\r
-\r
-void mof::LoggingInputReceiver::update(){\r
- mof::InputDevice::getInputReceiver()->update();\r
-}\r
-\r
-\r
-\r
-void mof::LoggingInputReceiver::output(){\r
- std::ofstream ofs( m_filename.c_str() );\r
- for(std::list<bool>::iterator itr = m_log.begin() ; itr != m_log.end() ; ++itr){\r
- ofs << *itr << std::endl;\r
- }\r
-\r
+#include "mof/LoggingInputReceiver.hpp"
+#include "mof/InputDevice.hpp"
+#include <fstream>
+
+
+mof::LoggingInputReceiver::LoggingInputReceiver(TCHAR* filename )
+: m_filename(filename){
+}
+
+mof::LoggingInputReceiver::~LoggingInputReceiver(){
+ output();
+}
+
+bool mof::LoggingInputReceiver::testKeyState(mof::InputReceiver::Key key){
+ bool result = mof::InputDevice::getInputReceiver()->testKeyState(key);
+ m_log.push_back(result);
+ return result;
+
+}
+
+void mof::LoggingInputReceiver::update(){
+ mof::InputDevice::getInputReceiver()->update();
+}
+
+
+
+void mof::LoggingInputReceiver::output(){
+ std::ofstream ofs( m_filename.c_str() );
+ for(std::list<bool>::iterator itr = m_log.begin() ; itr != m_log.end() ; ++itr){
+ ofs << *itr << std::endl;
+ }
+
}
\ No newline at end of file
-#pragma once\r
-#include "mof/InputReceiver.hpp"\r
-#include "mof/tstring.hpp"\r
-#include <list>\r
-\r
-namespace mof{\r
- \r
-\r
- class LoggingInputReceiver : public InputReceiver\r
- {\r
- std::list<bool> m_log;\r
- mof::tstring m_filename;\r
- public:\r
- \r
- LoggingInputReceiver(TCHAR* filename );\r
- virtual ~LoggingInputReceiver();\r
- virtual bool testKeyState(Key key);\r
- virtual void update();\r
- void output();\r
- };\r
-\r
-};\r
+#pragma once
+#include "mof/InputReceiver.hpp"
+#include "mof/tstring.hpp"
+#include <list>
+
+namespace mof{
+
+
+ class LoggingInputReceiver : public InputReceiver
+ {
+ std::list<bool> m_log;
+ mof::tstring m_filename;
+ public:
+
+ LoggingInputReceiver(TCHAR* filename );
+ virtual ~LoggingInputReceiver();
+ virtual bool testKeyState(Key key);
+ virtual void update();
+ void output();
+ };
+
+};
-#ifndef MOF_MATERIAL_HPP\r
-#define MOF_MATERIAL_HPP\r
-#include "Color.hpp"\r
-\r
-namespace mof{\r
-\r
-struct Material{\r
- mof::Color4f diffuseColor;\r
- mof::Color4f ambientColor;\r
- mof::Color4f specularColor;\r
- float power;\r
- mof::Color4f emissiveColor;\r
-\r
- Material()\r
- : ambientColor(0 , 0 , 0) , \r
- diffuseColor(0 , 0 , 0) ,\r
- specularColor(0 , 0 , 0),\r
- power(0),\r
- emissiveColor(0 , 0 , 0)\r
- {\r
- \r
- }\r
-\r
- Material(\r
- mof::Color4f ambient_ ,\r
- mof::Color4f diffuse_ ,\r
- mof::Color4f specular_ ,\r
- real power_ ,\r
- mof::Color4f emissive_\r
- )\r
- : ambientColor(ambient_) , \r
- diffuseColor(diffuse_) ,\r
- specularColor(specular_),\r
- power(power_),\r
- emissiveColor(emissive_)\r
- {\r
- \r
- }\r
-\r
-\r
-};\r
-\r
-}\r
-\r
-#endif\r
+#ifndef MOF_MATERIAL_HPP
+#define MOF_MATERIAL_HPP
+#include "Color.hpp"
+
+namespace mof{
+
+struct Material{
+ mof::Color4f diffuseColor;
+ mof::Color4f ambientColor;
+ mof::Color4f specularColor;
+ float power;
+ mof::Color4f emissiveColor;
+
+ Material()
+ : ambientColor(0 , 0 , 0) ,
+ diffuseColor(0 , 0 , 0) ,
+ specularColor(0 , 0 , 0),
+ power(0),
+ emissiveColor(0 , 0 , 0)
+ {
+
+ }
+
+ Material(
+ mof::Color4f ambient_ ,
+ mof::Color4f diffuse_ ,
+ mof::Color4f specular_ ,
+ real power_ ,
+ mof::Color4f emissive_
+ )
+ : ambientColor(ambient_) ,
+ diffuseColor(diffuse_) ,
+ specularColor(specular_),
+ power(power_),
+ emissiveColor(emissive_)
+ {
+
+ }
+
+
+};
+
+}
+
+#endif
-#include "mof/MaterialBuilder.hpp"\r
-#include "mof/Material.hpp"\r
-#include "mof/private/GraphicsDeviceImpl.hpp"\r
-#include "mof/stream/Constant.hpp"\r
-\r
-struct mof::MaterialBuilder::Impl{\r
-\r
- Impl(\r
- const mof::Manipulator<mof::Color4f>::Handler& ambient_ ,\r
- const mof::Manipulator<mof::Color4f>::Handler& diffuse_ ,\r
- const mof::Manipulator<mof::Color4f>::Handler& specular_ ,\r
- const mof::Manipulator<float>::Handler& specularPower_ ,\r
- const mof::Manipulator<mof::Color4f>::Handler& emissive_)\r
- : diffuse(diffuse_) , ambient(ambient_) , specular(specular_) ,\r
- specularPower(specularPower_) , emissive(emissive_) , pMaterial(NULL) , frame(0) {\r
- }\r
-\r
- ~Impl(){\r
- delete pMaterial;\r
- }\r
-\r
- mof::Material* pMaterial;\r
- FrameNumber frame;\r
- mof::Manipulator<mof::Color4f>::Handler diffuse;\r
- mof::Manipulator<mof::Color4f>::Handler ambient;\r
- mof::Manipulator<mof::Color4f>::Handler specular;\r
- mof::Manipulator<float>::Handler specularPower;\r
- mof::Manipulator<mof::Color4f>::Handler emissive;\r
-\r
- \r
-};\r
-\r
-\r
-\r
- \r
-mof::MaterialBuilder::MaterialBuilder( )\r
-: m_pImpl(new Impl( \r
- mof::makeConstantHandler(mof::Color4f(0 , 0 , 0)) ,\r
- mof::makeConstantHandler(mof::Color4f(0 , 0 , 0)) ,\r
- mof::makeConstantHandler(mof::Color4f(0 , 0 , 0)) ,\r
- mof::makeConstantHandler(0.0f) , \r
- mof::makeConstantHandler(mof::Color4f(0 , 0 , 0)) \r
- ) )\r
-{\r
- m_pImpl->pMaterial = new Material;\r
-}\r
-\r
-\r
-mof::MaterialBuilder::MaterialBuilder( mof::Color4f ambient )\r
-: m_pImpl(new Impl( \r
- mof::makeConstantHandler(ambient) ,\r
- mof::makeConstantHandler(mof::Color4f(0 , 0 , 0)) ,\r
- mof::makeConstantHandler(mof::Color4f(0 , 0 , 0)) ,\r
- mof::makeConstantHandler(0.0f) , \r
- mof::makeConstantHandler(mof::Color4f(0 , 0 , 0)) ))\r
-{\r
- m_pImpl->pMaterial = new Material;\r
- construct();\r
-}\r
-\r
-\r
-mof::MaterialBuilder::MaterialBuilder( mof::Color4f ambient , mof::Color4f diffuse , \r
- mof::Color4f specular , float power , mof::Color4f emissive )\r
-: m_pImpl(new Impl(\r
- mof::makeConstantHandler(ambient) ,\r
- mof::makeConstantHandler(diffuse) ,\r
- mof::makeConstantHandler(specular) ,\r
- mof::makeConstantHandler(power) , \r
- mof::makeConstantHandler(emissive) ))\r
-{\r
- m_pImpl->pMaterial = new Material;\r
- construct();\r
-}\r
-\r
-mof::MaterialBuilder::MaterialBuilder(\r
- const mof::Manipulator<mof::Color4f>::Handler& ambient_ , \r
- const mof::Manipulator<mof::Color4f>::Handler& diffuse_ ,\r
- const mof::Manipulator<mof::Color4f>::Handler& specular_ ,\r
- const mof::Manipulator<float>::Handler& power_ ,\r
- const mof::Manipulator<mof::Color4f>::Handler& emissive_ )\r
-: m_pImpl(new Impl( ambient_ , diffuse_ , specular_ , power_ , emissive_ ))\r
-{\r
- m_pImpl->pMaterial = new Material;\r
- construct();\r
-}\r
-\r
-mof::MaterialBuilder::~MaterialBuilder(){\r
-}\r
-\r
-void mof::MaterialBuilder::setFrameNumber(mof::FrameNumber frame){\r
- m_pImpl->frame = frame;\r
-}\r
-\r
-void mof::MaterialBuilder::nextFrame(){\r
- setFrameNumber(m_pImpl->frame + 1 );\r
-}\r
-\r
-void mof::MaterialBuilder::prevFrame(){\r
- if(m_pImpl->frame > 0)setFrameNumber(m_pImpl->frame - 1);\r
-}\r
-\r
-\r
-\r
-mof::Color4f mof::MaterialBuilder::getDiffuseColor() const{\r
- return m_pImpl->diffuse->value(m_pImpl->frame);\r
-}\r
-\r
-mof::Color4f mof::MaterialBuilder::getAmbientColor() const{\r
- return m_pImpl->ambient->value(m_pImpl->frame);\r
-}\r
-\r
-mof::Color4f mof::MaterialBuilder::getSpecularColor() const{\r
- return m_pImpl->specular->value(m_pImpl->frame);\r
-}\r
-\r
-mof::Color4f mof::MaterialBuilder::getEmissiveColor() const{\r
- return m_pImpl->emissive->value(m_pImpl->frame);\r
-}\r
-\r
-float mof::MaterialBuilder::getSpecularPower() const{\r
- return m_pImpl->specularPower->value(m_pImpl->frame);\r
-}\r
-\r
-\r
-const mof::Material& mof::MaterialBuilder::construct() const{\r
- \r
- m_pImpl->pMaterial->diffuseColor = m_pImpl->diffuse->value(m_pImpl->frame);\r
- m_pImpl->pMaterial->ambientColor = m_pImpl->ambient->value(m_pImpl->frame);\r
- m_pImpl->pMaterial->specularColor = m_pImpl->specular->value(m_pImpl->frame);\r
- m_pImpl->pMaterial->power = m_pImpl->specularPower->value(m_pImpl->frame);\r
- m_pImpl->pMaterial->emissiveColor = m_pImpl->emissive->value(m_pImpl->frame);\r
-\r
- return *(m_pImpl->pMaterial);\r
-}\r
+#include "mof/MaterialBuilder.hpp"
+#include "mof/Material.hpp"
+#include "mof/private/GraphicsDeviceImpl.hpp"
+#include "mof/stream/Constant.hpp"
+
+struct mof::MaterialBuilder::Impl{
+
+ Impl(
+ const mof::Manipulator<mof::Color4f>::Handler& ambient_ ,
+ const mof::Manipulator<mof::Color4f>::Handler& diffuse_ ,
+ const mof::Manipulator<mof::Color4f>::Handler& specular_ ,
+ const mof::Manipulator<float>::Handler& specularPower_ ,
+ const mof::Manipulator<mof::Color4f>::Handler& emissive_)
+ : diffuse(diffuse_) , ambient(ambient_) , specular(specular_) ,
+ specularPower(specularPower_) , emissive(emissive_) , pMaterial(NULL) , frame(0) {
+ }
+
+ ~Impl(){
+ delete pMaterial;
+ }
+
+ mof::Material* pMaterial;
+ FrameNumber frame;
+ mof::Manipulator<mof::Color4f>::Handler diffuse;
+ mof::Manipulator<mof::Color4f>::Handler ambient;
+ mof::Manipulator<mof::Color4f>::Handler specular;
+ mof::Manipulator<float>::Handler specularPower;
+ mof::Manipulator<mof::Color4f>::Handler emissive;
+
+
+};
+
+
+
+
+mof::MaterialBuilder::MaterialBuilder( )
+: m_pImpl(new Impl(
+ mof::makeConstantHandler(mof::Color4f(0 , 0 , 0)) ,
+ mof::makeConstantHandler(mof::Color4f(0 , 0 , 0)) ,
+ mof::makeConstantHandler(mof::Color4f(0 , 0 , 0)) ,
+ mof::makeConstantHandler(0.0f) ,
+ mof::makeConstantHandler(mof::Color4f(0 , 0 , 0))
+ ) )
+{
+ m_pImpl->pMaterial = new Material;
+}
+
+
+mof::MaterialBuilder::MaterialBuilder( mof::Color4f ambient )
+: m_pImpl(new Impl(
+ mof::makeConstantHandler(ambient) ,
+ mof::makeConstantHandler(mof::Color4f(0 , 0 , 0)) ,
+ mof::makeConstantHandler(mof::Color4f(0 , 0 , 0)) ,
+ mof::makeConstantHandler(0.0f) ,
+ mof::makeConstantHandler(mof::Color4f(0 , 0 , 0)) ))
+{
+ m_pImpl->pMaterial = new Material;
+ construct();
+}
+
+
+mof::MaterialBuilder::MaterialBuilder( mof::Color4f ambient , mof::Color4f diffuse ,
+ mof::Color4f specular , float power , mof::Color4f emissive )
+: m_pImpl(new Impl(
+ mof::makeConstantHandler(ambient) ,
+ mof::makeConstantHandler(diffuse) ,
+ mof::makeConstantHandler(specular) ,
+ mof::makeConstantHandler(power) ,
+ mof::makeConstantHandler(emissive) ))
+{
+ m_pImpl->pMaterial = new Material;
+ construct();
+}
+
+mof::MaterialBuilder::MaterialBuilder(
+ const mof::Manipulator<mof::Color4f>::Handler& ambient_ ,
+ const mof::Manipulator<mof::Color4f>::Handler& diffuse_ ,
+ const mof::Manipulator<mof::Color4f>::Handler& specular_ ,
+ const mof::Manipulator<float>::Handler& power_ ,
+ const mof::Manipulator<mof::Color4f>::Handler& emissive_ )
+: m_pImpl(new Impl( ambient_ , diffuse_ , specular_ , power_ , emissive_ ))
+{
+ m_pImpl->pMaterial = new Material;
+ construct();
+}
+
+mof::MaterialBuilder::~MaterialBuilder(){
+}
+
+void mof::MaterialBuilder::setFrameNumber(mof::FrameNumber frame){
+ m_pImpl->frame = frame;
+}
+
+void mof::MaterialBuilder::nextFrame(){
+ setFrameNumber(m_pImpl->frame + 1 );
+}
+
+void mof::MaterialBuilder::prevFrame(){
+ if(m_pImpl->frame > 0)setFrameNumber(m_pImpl->frame - 1);
+}
+
+
+
+mof::Color4f mof::MaterialBuilder::getDiffuseColor() const{
+ return m_pImpl->diffuse->value(m_pImpl->frame);
+}
+
+mof::Color4f mof::MaterialBuilder::getAmbientColor() const{
+ return m_pImpl->ambient->value(m_pImpl->frame);
+}
+
+mof::Color4f mof::MaterialBuilder::getSpecularColor() const{
+ return m_pImpl->specular->value(m_pImpl->frame);
+}
+
+mof::Color4f mof::MaterialBuilder::getEmissiveColor() const{
+ return m_pImpl->emissive->value(m_pImpl->frame);
+}
+
+float mof::MaterialBuilder::getSpecularPower() const{
+ return m_pImpl->specularPower->value(m_pImpl->frame);
+}
+
+
+const mof::Material& mof::MaterialBuilder::construct() const{
+
+ m_pImpl->pMaterial->diffuseColor = m_pImpl->diffuse->value(m_pImpl->frame);
+ m_pImpl->pMaterial->ambientColor = m_pImpl->ambient->value(m_pImpl->frame);
+ m_pImpl->pMaterial->specularColor = m_pImpl->specular->value(m_pImpl->frame);
+ m_pImpl->pMaterial->power = m_pImpl->specularPower->value(m_pImpl->frame);
+ m_pImpl->pMaterial->emissiveColor = m_pImpl->emissive->value(m_pImpl->frame);
+
+ return *(m_pImpl->pMaterial);
+}
-#ifndef MOF_MATERIAL_BUILDER_HPP\r
-#define MOF_MATERIAL_BUILDER_HPP\r
-\r
-#include "mof/Color.hpp"\r
-#include <boost/scoped_ptr.hpp>\r
-#include <boost/utility.hpp>\r
-#include "mof/stream/Manipulator.hpp"\r
-\r
-//struct _D3DMATERIAL9;\r
-//typedef _D3DMATERIAL9 D3DMATERIAL9;\r
-namespace mof{\r
-\r
-\r
-struct Material;\r
-\r
-class MaterialBuilder : boost::noncopyable{\r
-\r
- struct Impl;\r
- boost::scoped_ptr<Impl> m_pImpl;\r
-\r
-public:\r
- MaterialBuilder();\r
- MaterialBuilder( mof::Color4f ambient );\r
- MaterialBuilder( mof::Color4f ambient , mof::Color4f diffuse , mof::Color4f specular , float power , mof::Color4f emissive );\r
- MaterialBuilder\r
- (\r
- const mof::Manipulator<mof::Color4f>::Handler& ambient , \r
- const mof::Manipulator<mof::Color4f>::Handler& diffuse ,\r
- const mof::Manipulator<mof::Color4f>::Handler& specular ,\r
- const mof::Manipulator<float>::Handler& power ,\r
- const mof::Manipulator<mof::Color4f>::Handler& emissive \r
- );\r
- ~MaterialBuilder();\r
-\r
- void setFrameNumber(mof::FrameNumber frame);\r
- void nextFrame();\r
- void prevFrame();\r
-\r
- mof::Color4f getDiffuseColor() const;\r
- mof::Color4f getAmbientColor() const;\r
- mof::Color4f getSpecularColor() const;\r
- float getSpecularPower() const;\r
- mof::Color4f getEmissiveColor() const;\r
-\r
- const mof::Material& construct() const;\r
-};\r
-\r
-}\r
-\r
-#endif \r
+#ifndef MOF_MATERIAL_BUILDER_HPP
+#define MOF_MATERIAL_BUILDER_HPP
+
+#include "mof/Color.hpp"
+#include <boost/scoped_ptr.hpp>
+#include <boost/utility.hpp>
+#include "mof/stream/Manipulator.hpp"
+
+//struct _D3DMATERIAL9;
+//typedef _D3DMATERIAL9 D3DMATERIAL9;
+namespace mof{
+
+
+struct Material;
+
+class MaterialBuilder : boost::noncopyable{
+
+ struct Impl;
+ boost::scoped_ptr<Impl> m_pImpl;
+
+public:
+ MaterialBuilder();
+ MaterialBuilder( mof::Color4f ambient );
+ MaterialBuilder( mof::Color4f ambient , mof::Color4f diffuse , mof::Color4f specular , float power , mof::Color4f emissive );
+ MaterialBuilder
+ (
+ const mof::Manipulator<mof::Color4f>::Handler& ambient ,
+ const mof::Manipulator<mof::Color4f>::Handler& diffuse ,
+ const mof::Manipulator<mof::Color4f>::Handler& specular ,
+ const mof::Manipulator<float>::Handler& power ,
+ const mof::Manipulator<mof::Color4f>::Handler& emissive
+ );
+ ~MaterialBuilder();
+
+ void setFrameNumber(mof::FrameNumber frame);
+ void nextFrame();
+ void prevFrame();
+
+ mof::Color4f getDiffuseColor() const;
+ mof::Color4f getAmbientColor() const;
+ mof::Color4f getSpecularColor() const;
+ float getSpecularPower() const;
+ mof::Color4f getEmissiveColor() const;
+
+ const mof::Material& construct() const;
+};
+
+}
+
+#endif
-#include <d3dx9.h>\r
-#include <string.h>\r
-#include "mof/Matrix2D.hpp"\r
-#include "mof/ConsoleIO.hpp"\r
-\r
-const int DIMENSION = 2;\r
-\r
-\r
-mof::Matrix2D::Matrix2D()\r
-: m_pImpl(new Array)\r
-{\r
- for(int i = 0 ; i <= DIMENSION ; ++i){\r
- for(int j = 0 ; j <= DIMENSION ; ++j){\r
- if(i == j)m_pImpl->elements[i][j] = 1;\r
- else m_pImpl->elements[i][j] = 0;\r
- }\r
- }\r
-}\r
-\r
-mof::Matrix2D::Matrix2D(const Matrix2D& obj )\r
-: m_pImpl(new Array)\r
-{\r
- *m_pImpl = *obj.m_pImpl;\r
-}\r
-\r
-mof::Matrix2D::Matrix2D(const mof::Matrix2D::Array & arr)\r
-: m_pImpl(new Array)\r
-{\r
- *m_pImpl = arr;\r
-}\r
-\r
-\r
-mof::Matrix2D::~Matrix2D(){\r
-}\r
-\r
-\r
-mof::real mof::Matrix2D::at(int row , int column) const{\r
- return m_pImpl->elements[row][column];\r
-}\r
-\r
-mof::Matrix2D::Array mof::Matrix2D::getArray() const{\r
- return *m_pImpl;\r
-}\r
-\r
-\r
-mof::Matrix2D mof::Matrix2D::createIdentity(){\r
- return mof::Matrix2D();\r
-}\r
-\r
-\r
-mof::Matrix2D mof::Matrix2D::createTransposed(mof::Matrix2D& matrix){\r
- Matrix2D transposed;\r
- for(int i = 0 ; i <= DIMENSION ; i++){\r
- for(int j = 0 ; j <= DIMENSION ; j++){\r
- transposed.m_pImpl->elements[j][i] = matrix.m_pImpl->elements[i][j];\r
- }\r
- }\r
- return transposed;\r
-}\r
-\r
-\r
-\r
-mof::Matrix2D mof::Matrix2D::createRotation(const mof::Vector2D& position){\r
- Matrix2D matrix;\r
- matrix.m_pImpl->elements[DIMENSION][0] = position.x;\r
- matrix.m_pImpl->elements[DIMENSION][1] = position.y;\r
- return matrix;\r
-}\r
-\r
-\r
-mof::Matrix2D mof::Matrix2D::createTranslation(const mof::Vector2D& position){\r
- Matrix2D matrix;\r
- matrix.m_pImpl->elements[DIMENSION][0] = position.x;\r
- matrix.m_pImpl->elements[DIMENSION][1] = position.y;\r
- return matrix;\r
-}\r
-\r
-mof::Matrix2D mof::Matrix2D::createScaling(const mof::Vector2D& scaling){\r
- Matrix2D matrix;\r
- matrix.m_pImpl->elements[0][0] = scaling.x;\r
- matrix.m_pImpl->elements[1][1] = scaling.y;\r
- return matrix;\r
-}\r
-\r
-\r
-mof::Vector2D mof::Matrix2D::getTranslation(const mof::Matrix2D& matrix){\r
- return mof::Vector2D(\r
- matrix.m_pImpl->elements[DIMENSION][0] ,\r
- matrix.m_pImpl->elements[DIMENSION][1]\r
- );\r
-}\r
-\r
-mof::Vector2D mof::Matrix2D::getDiagonal() const{\r
- return mof::Vector2D(\r
- m_pImpl->elements[0][0] ,\r
- m_pImpl->elements[1][1]\r
- );\r
-}\r
-\r
- \r
-mof::Matrix2D mof::Matrix2D::operator *(const mof::Matrix2D& matrix) const{\r
- mof::Matrix2D multiplied;\r
- for(int i = 0 ; i <= DIMENSION ; i++){\r
- for(int j = 0 ; j <= DIMENSION ; j++){\r
- mof::real sum = 0;\r
- for(int k = 0 ; k <= DIMENSION ; k++){\r
- sum += m_pImpl->elements[i][k] * matrix.m_pImpl->elements[k][j];\r
- }\r
- multiplied.m_pImpl->elements[i][j] = sum;\r
- }\r
- }\r
- return multiplied;\r
-}\r
-\r
-\r
-mof::Matrix2D mof::Matrix2D::operator +(const mof::Matrix2D& matrix) const{\r
- mof::Matrix2D result;\r
- for(int i = 0 ; i <= DIMENSION ; i++){\r
- for(int j = 0 ; j <= DIMENSION ; j++){\r
- result.m_pImpl->elements[i][j] = \r
- m_pImpl->elements[i][j] + matrix.m_pImpl->elements[i][j];\r
- }\r
- }\r
- return result;\r
-}\r
-\r
-\r
-mof::Matrix2D mof::Matrix2D::operator -(const mof::Matrix2D& matrix) const{\r
- mof::Matrix2D result;\r
- for(int i = 0 ; i <= DIMENSION ; i++){\r
- for(int j = 0 ; j <= DIMENSION ; j++){\r
- result.m_pImpl->elements[i][j] = \r
- m_pImpl->elements[i][j] - matrix.m_pImpl->elements[i][j];\r
- }\r
- }\r
- return result;\r
-}\r
-\r
-\r
-mof::Matrix2D mof::operator *(const mof::Matrix2D& matrix , mof::real f){\r
- mof::Matrix2D result;\r
- for(int i = 0 ; i <= DIMENSION ; i++){\r
- for(int j = 0 ; j <= DIMENSION ; j++){\r
- result.m_pImpl->elements[i][j] = \r
- matrix.m_pImpl->elements[i][j] * f;\r
- }\r
- }\r
- return result;\r
-}\r
- \r
-mof::Matrix2D mof::operator *(mof::real f , mof::Matrix2D const& matrix){\r
- return matrix * f;\r
-}\r
-\r
-\r
-mof::Vector2D mof::operator *(const mof::Vector2D& vec , const mof::Matrix2D& matrix) {\r
- mof::real input[3] = {vec.x , vec.y , 1};\r
- mof::real output[3];\r
- for(int i = 0 ; i < DIMENSION ; i++){\r
- mof::real sum = 0;\r
- for(int k = 0 ; k <= DIMENSION ; k++){\r
- sum += input[k] * matrix.at(k , i);\r
- }\r
- output[i] = sum;\r
- \r
- }\r
- return mof::Vector2D(output[0] , output[1]);\r
-}\r
-\r
-\r
-mof::Rectangle<int> mof::Matrix2D::toBoundingBox(){\r
- mof::Vector2D begin = mof::Vector2D(0 , 0) * (*this);\r
- mof::Vector2D end = mof::Vector2D(1 , 1) * (*this);\r
- return mof::Rectangle<int>( (int)begin.x , (int)begin.y , (int)end.x , (int)end.y );\r
-}\r
+#include <d3dx9.h>
+#include <string.h>
+#include "mof/Matrix2D.hpp"
+#include "mof/ConsoleIO.hpp"
+
+const int DIMENSION = 2;
+
+
+mof::Matrix2D::Matrix2D()
+: m_pImpl(new Array)
+{
+ for(int i = 0 ; i <= DIMENSION ; ++i){
+ for(int j = 0 ; j <= DIMENSION ; ++j){
+ if(i == j)m_pImpl->elements[i][j] = 1;
+ else m_pImpl->elements[i][j] = 0;
+ }
+ }
+}
+
+mof::Matrix2D::Matrix2D(const Matrix2D& obj )
+: m_pImpl(new Array)
+{
+ *m_pImpl = *obj.m_pImpl;
+}
+
+mof::Matrix2D::Matrix2D(const mof::Matrix2D::Array & arr)
+: m_pImpl(new Array)
+{
+ *m_pImpl = arr;
+}
+
+
+mof::Matrix2D::~Matrix2D(){
+}
+
+
+mof::real mof::Matrix2D::at(int row , int column) const{
+ return m_pImpl->elements[row][column];
+}
+
+mof::Matrix2D::Array mof::Matrix2D::getArray() const{
+ return *m_pImpl;
+}
+
+
+mof::Matrix2D mof::Matrix2D::createIdentity(){
+ return mof::Matrix2D();
+}
+
+
+mof::Matrix2D mof::Matrix2D::createTransposed(mof::Matrix2D& matrix){
+ Matrix2D transposed;
+ for(int i = 0 ; i <= DIMENSION ; i++){
+ for(int j = 0 ; j <= DIMENSION ; j++){
+ transposed.m_pImpl->elements[j][i] = matrix.m_pImpl->elements[i][j];
+ }
+ }
+ return transposed;
+}
+
+
+
+mof::Matrix2D mof::Matrix2D::createRotation(const mof::Vector2D& position){
+ Matrix2D matrix;
+ matrix.m_pImpl->elements[DIMENSION][0] = position.x;
+ matrix.m_pImpl->elements[DIMENSION][1] = position.y;
+ return matrix;
+}
+
+
+mof::Matrix2D mof::Matrix2D::createTranslation(const mof::Vector2D& position){
+ Matrix2D matrix;
+ matrix.m_pImpl->elements[DIMENSION][0] = position.x;
+ matrix.m_pImpl->elements[DIMENSION][1] = position.y;
+ return matrix;
+}
+
+mof::Matrix2D mof::Matrix2D::createScaling(const mof::Vector2D& scaling){
+ Matrix2D matrix;
+ matrix.m_pImpl->elements[0][0] = scaling.x;
+ matrix.m_pImpl->elements[1][1] = scaling.y;
+ return matrix;
+}
+
+
+mof::Vector2D mof::Matrix2D::getTranslation(const mof::Matrix2D& matrix){
+ return mof::Vector2D(
+ matrix.m_pImpl->elements[DIMENSION][0] ,
+ matrix.m_pImpl->elements[DIMENSION][1]
+ );
+}
+
+mof::Vector2D mof::Matrix2D::getDiagonal() const{
+ return mof::Vector2D(
+ m_pImpl->elements[0][0] ,
+ m_pImpl->elements[1][1]
+ );
+}
+
+
+mof::Matrix2D mof::Matrix2D::operator *(const mof::Matrix2D& matrix) const{
+ mof::Matrix2D multiplied;
+ for(int i = 0 ; i <= DIMENSION ; i++){
+ for(int j = 0 ; j <= DIMENSION ; j++){
+ mof::real sum = 0;
+ for(int k = 0 ; k <= DIMENSION ; k++){
+ sum += m_pImpl->elements[i][k] * matrix.m_pImpl->elements[k][j];
+ }
+ multiplied.m_pImpl->elements[i][j] = sum;
+ }
+ }
+ return multiplied;
+}
+
+
+mof::Matrix2D mof::Matrix2D::operator +(const mof::Matrix2D& matrix) const{
+ mof::Matrix2D result;
+ for(int i = 0 ; i <= DIMENSION ; i++){
+ for(int j = 0 ; j <= DIMENSION ; j++){
+ result.m_pImpl->elements[i][j] =
+ m_pImpl->elements[i][j] + matrix.m_pImpl->elements[i][j];
+ }
+ }
+ return result;
+}
+
+
+mof::Matrix2D mof::Matrix2D::operator -(const mof::Matrix2D& matrix) const{
+ mof::Matrix2D result;
+ for(int i = 0 ; i <= DIMENSION ; i++){
+ for(int j = 0 ; j <= DIMENSION ; j++){
+ result.m_pImpl->elements[i][j] =
+ m_pImpl->elements[i][j] - matrix.m_pImpl->elements[i][j];
+ }
+ }
+ return result;
+}
+
+
+mof::Matrix2D mof::operator *(const mof::Matrix2D& matrix , mof::real f){
+ mof::Matrix2D result;
+ for(int i = 0 ; i <= DIMENSION ; i++){
+ for(int j = 0 ; j <= DIMENSION ; j++){
+ result.m_pImpl->elements[i][j] =
+ matrix.m_pImpl->elements[i][j] * f;
+ }
+ }
+ return result;
+}
+
+mof::Matrix2D mof::operator *(mof::real f , mof::Matrix2D const& matrix){
+ return matrix * f;
+}
+
+
+mof::Vector2D mof::operator *(const mof::Vector2D& vec , const mof::Matrix2D& matrix) {
+ mof::real input[3] = {vec.x , vec.y , 1};
+ mof::real output[3];
+ for(int i = 0 ; i < DIMENSION ; i++){
+ mof::real sum = 0;
+ for(int k = 0 ; k <= DIMENSION ; k++){
+ sum += input[k] * matrix.at(k , i);
+ }
+ output[i] = sum;
+
+ }
+ return mof::Vector2D(output[0] , output[1]);
+}
+
+
+mof::Rectangle<int> mof::Matrix2D::toBoundingBox(){
+ mof::Vector2D begin = mof::Vector2D(0 , 0) * (*this);
+ mof::Vector2D end = mof::Vector2D(1 , 1) * (*this);
+ return mof::Rectangle<int>( (int)begin.x , (int)begin.y , (int)end.x , (int)end.y );
+}
-#ifndef MATRIX2D_HPP\r
-#define MATRIX2D_HPP\r
-#include <mof/real.hpp>\r
-#include "mof/Vector2D.hpp"\r
-#include "mof/Rectangle.hpp"\r
-#include <memory>\r
-\r
-\r
-namespace mof{\r
- class Matrix2D{\r
- public:\r
- struct Array{\r
- real elements[3][3];\r
- };\r
- private:\r
- std::shared_ptr<Array> m_pImpl;\r
- public:\r
- \r
- Matrix2D();\r
- Matrix2D(const Matrix2D& );\r
- explicit Matrix2D(const mof::Matrix2D::Array &);\r
- ~Matrix2D();\r
- real at(int row , int column) const;\r
- Array getArray() const;\r
-\r
- static Matrix2D createIdentity();\r
- static Matrix2D createTransposed(Matrix2D& matrix);\r
- static Matrix2D createRotation(const mof::Vector2D& angle);\r
- static Matrix2D createTranslation(const mof::Vector2D& position);\r
- static Matrix2D createScaling(const mof::Vector2D& scale);\r
- static Vector2D getTranslation(const mof::Matrix2D& matrix);\r
- Vector2D getDiagonal() const;\r
-\r
-\r
- Matrix2D operator *(const mof::Matrix2D& matrix ) const;\r
- Matrix2D operator +(const mof::Matrix2D& matrix ) const;\r
- Matrix2D operator -(const mof::Matrix2D& matrix ) const;\r
-\r
- friend Vector2D operator *(const mof::Vector2D& vec , const mof::Matrix2D& matrix);\r
- friend Matrix2D operator *(const mof::Matrix2D& matrix , real f);\r
- friend Matrix2D operator *(real f , const mof::Matrix2D & matrix);\r
-\r
- mof::Rectangle<int> toBoundingBox();\r
- \r
- \r
- };\r
-} // namespace mof\r
-\r
-\r
-#endif\r
+#ifndef MATRIX2D_HPP
+#define MATRIX2D_HPP
+#include <mof/real.hpp>
+#include "mof/Vector2D.hpp"
+#include "mof/Rectangle.hpp"
+#include <memory>
+
+
+namespace mof{
+ class Matrix2D{
+ public:
+ struct Array{
+ real elements[3][3];
+ };
+ private:
+ std::shared_ptr<Array> m_pImpl;
+ public:
+
+ Matrix2D();
+ Matrix2D(const Matrix2D& );
+ explicit Matrix2D(const mof::Matrix2D::Array &);
+ ~Matrix2D();
+ real at(int row , int column) const;
+ Array getArray() const;
+
+ static Matrix2D createIdentity();
+ static Matrix2D createTransposed(Matrix2D& matrix);
+ static Matrix2D createRotation(const mof::Vector2D& angle);
+ static Matrix2D createTranslation(const mof::Vector2D& position);
+ static Matrix2D createScaling(const mof::Vector2D& scale);
+ static Vector2D getTranslation(const mof::Matrix2D& matrix);
+ Vector2D getDiagonal() const;
+
+
+ Matrix2D operator *(const mof::Matrix2D& matrix ) const;
+ Matrix2D operator +(const mof::Matrix2D& matrix ) const;
+ Matrix2D operator -(const mof::Matrix2D& matrix ) const;
+
+ friend Vector2D operator *(const mof::Vector2D& vec , const mof::Matrix2D& matrix);
+ friend Matrix2D operator *(const mof::Matrix2D& matrix , real f);
+ friend Matrix2D operator *(real f , const mof::Matrix2D & matrix);
+
+ mof::Rectangle<int> toBoundingBox();
+
+
+ };
+} // namespace mof
+
+
+#endif
-#include <string.h>\r
-#include <iostream>\r
-#include "mof/Matrix3D.hpp"\r
-#include "mof/utilities.hpp"\r
-#include <d3dx9.h>\r
-#include <mof/ConsoleIO.hpp>\r
-\r
-const int DIMENSION = 3;\r
-\r
-\r
-mof::Matrix3D::Matrix3D()\r
-: m_pImpl(new Array)\r
-{\r
- for(int i = 0 ; i <= DIMENSION ; ++i){\r
- for(int j = 0 ; j <= DIMENSION ; ++j){\r
- if(i == j)m_pImpl->elements[i][j] = 1;\r
- else m_pImpl->elements[i][j] = 0;\r
- }\r
- }\r
-}\r
-\r
-mof::Matrix3D::Matrix3D(const mof::Matrix3D::Array & arr)\r
-: m_pImpl(new Array)\r
-{\r
- *m_pImpl = arr;\r
-}\r
-\r
-\r
-mof::Matrix3D::~Matrix3D(){\r
-}\r
-\r
-\r
-mof::real mof::Matrix3D::at(int row , int column) const{\r
- return m_pImpl->elements[row][column];\r
-}\r
-\r
-mof::Matrix3D::Array mof::Matrix3D::getArray() const{\r
- return *m_pImpl;\r
-}\r
-\r
-\r
-mof::Matrix3D mof::Matrix3D::createIdentity(){\r
- return mof::Matrix3D();\r
-}\r
-\r
-\r
-mof::Matrix3D mof::Matrix3D::createTransposed(const mof::Matrix3D& matrix){\r
- Matrix3D transposed;\r
- for(int i = 0 ; i <= DIMENSION ; i++){\r
- for(int j = 0 ; j <= DIMENSION ; j++){\r
- transposed.m_pImpl->elements[j][i] = matrix.m_pImpl->elements[i][j];\r
- }\r
- }\r
- return transposed;\r
-}\r
-\r
-\r
-mof::Matrix3D mof::Matrix3D::createRotation(const mof::Vector3D& radians){\r
- mof::real cosx = cosf(radians.x);\r
- mof::real sinx = sinf(radians.x);\r
- mof::real cosy = cosf(radians.y);\r
- mof::real siny = sinf(radians.y);\r
- mof::real cosz = cosf(radians.z);\r
- mof::real sinz = sinf(radians.z);\r
- mof::Matrix3D::Array x = \r
- {{\r
- { 1.f , 0.f , 0.f , 0.f } ,\r
- { 0.f , cosx , sinx , 0.f } ,\r
- { 0.f , -sinx , cosx , 0.f } ,\r
- { 0.f , 0.f , 0.f , 1.f } \r
- }};\r
- mof::Matrix3D::Array y = \r
- {{\r
- { cosy , 0.f , -siny , 0.f } ,\r
- { 0.f , 1.f , 0.f , 0.f } ,\r
- { siny , 0.f , cosy , 0.f } ,\r
- { 0.f , 0.f , 0.f , 1.f }\r
- }};\r
- mof::Matrix3D::Array z = \r
- {{\r
- { cosz , sinz , 0.f , 0.f } ,\r
- { -sinz , cosz , 0.f , 0.f } ,\r
- { 0.f , 0.f , 1.f , 0.f } ,\r
- { 0.f , 0.f , 0.f , 1.f } \r
- }};\r
- return mof::Matrix3D(x) * mof::Matrix3D(y) * mof::Matrix3D(z); //TODO \90Ï\82ð\83n\81[\83h\83R\81[\83f\83B\83\93\83O\r
-}\r
-\r
-\r
-mof::Matrix3D mof::Matrix3D::createTranslation(const mof::Vector3D& position){\r
- Matrix3D matrix;\r
- matrix.m_pImpl->elements[DIMENSION][0] = position.x;\r
- matrix.m_pImpl->elements[DIMENSION][1] = position.y;\r
- matrix.m_pImpl->elements[DIMENSION][2] = position.z;\r
- return matrix;\r
-}\r
-\r
-mof::Matrix3D mof::Matrix3D::createScaling(const mof::Vector3D& scaling){\r
- Matrix3D matrix;\r
- matrix.m_pImpl->elements[0][0] = scaling.x;\r
- matrix.m_pImpl->elements[1][1] = scaling.y;\r
- matrix.m_pImpl->elements[2][2] = scaling.z;\r
- return matrix;\r
-}\r
-\r
-\r
-\r
-mof::Matrix3D mof::Matrix3D::createLookAtLH\r
-(\r
- const mof::Vector3D& eye ,\r
- const mof::Vector3D& lookAt ,\r
- const mof::Vector3D& up\r
-)\r
-{\r
- D3DXVECTOR3 vEye(eye.x , eye.y , eye.z);\r
- D3DXVECTOR3 vLookAt(lookAt.x , lookAt.y , lookAt.z);\r
- D3DXVECTOR3 vUp(up.x , up.y , up.z);\r
- D3DXMATRIX m;\r
- mof::Matrix3D::Array array;\r
- D3DXMatrixLookAtLH( &m , &vEye , &vLookAt , &vUp );\r
- for( int i = 0 ; i <= DIMENSION ; i++ )\r
- {\r
- for( int j = 0 ; j <= DIMENSION ; j++ )\r
- {\r
- array.elements[i][j] = m.m[i][j];\r
- }\r
- }\r
- return mof::Matrix3D( array );\r
-}\r
-\r
-mof::Vector3D mof::Matrix3D::getTranslation(const mof::Matrix3D& matrix){\r
- return mof::Vector3D(\r
- matrix.m_pImpl->elements[DIMENSION][0] ,\r
- matrix.m_pImpl->elements[DIMENSION][1] ,\r
- matrix.m_pImpl->elements[DIMENSION][2]\r
- );\r
-}\r
- \r
-mof::Vector3D mof::Matrix3D::getDiagonal() const{\r
- return mof::Vector3D(\r
- m_pImpl->elements[0][0] ,\r
- m_pImpl->elements[1][1] ,\r
- m_pImpl->elements[2][2]\r
- );\r
-}\r
- \r
-\r
-\r
-mof::Matrix3D mof::Matrix3D::operator *(const mof::Matrix3D& matrix) const{\r
- mof::Matrix3D multiplied;\r
- for(int i = 0 ; i <= DIMENSION ; i++){\r
- for(int j = 0 ; j <= DIMENSION ; j++){\r
- mof::real sum = 0;\r
- for(int k = 0 ; k <= DIMENSION ; k++){\r
- sum += m_pImpl->elements[i][k] * matrix.m_pImpl->elements[k][j];\r
- }\r
- multiplied.m_pImpl->elements[i][j] = sum;\r
- }\r
- }\r
- return multiplied;\r
-}\r
-\r
-\r
-mof::Matrix3D mof::Matrix3D::operator +(const mof::Matrix3D& matrix) const{\r
- mof::Matrix3D result;\r
- for(int i = 0 ; i <= DIMENSION ; i++){\r
- for(int j = 0 ; j <= DIMENSION ; j++){\r
- result.m_pImpl->elements[i][j] = \r
- m_pImpl->elements[i][j] + matrix.m_pImpl->elements[i][j];\r
- }\r
- }\r
- return result;\r
-}\r
-\r
-\r
-mof::Matrix3D mof::Matrix3D::operator -(const mof::Matrix3D& matrix) const{\r
- mof::Matrix3D result;\r
- for(int i = 0 ; i <= DIMENSION ; i++){\r
- for(int j = 0 ; j <= DIMENSION ; j++){\r
- result.m_pImpl->elements[i][j] = \r
- m_pImpl->elements[i][j] - matrix.m_pImpl->elements[i][j];\r
- }\r
- }\r
- return result;\r
-}\r
-\r
-\r
-mof::Matrix3D mof::operator *(const mof::Matrix3D& matrix , mof::real f){\r
- mof::Matrix3D result;\r
- for(int i = 0 ; i <= DIMENSION ; i++){\r
- for(int j = 0 ; j <= DIMENSION ; j++){\r
- result.m_pImpl->elements[i][j] = \r
- matrix.m_pImpl->elements[i][j] * f;\r
- }\r
- }\r
- return result;\r
-}\r
- \r
-mof::Matrix3D mof::operator *(mof::real f , mof::Matrix3D const& matrix){\r
- return matrix * f;\r
-}\r
-\r
-\r
-mof::Vector3D mof::operator *(const mof::Vector3D& vec , const mof::Matrix3D& matrix) {\r
- mof::real input[4] = {vec.x , vec.y , vec.z , 1};\r
- mof::real output[4];\r
- for(int i = 0 ; i < DIMENSION ; i++){\r
- mof::real sum = 0;\r
- for(int k = 0 ; k <= DIMENSION ; k++){\r
- sum += input[k] * matrix.at(k , i);\r
- }\r
- output[i] = sum;\r
- \r
- }\r
- return mof::Vector3D(output[0] , output[1] , output[2]);\r
-}\r
-\r
-\r
-std::ostream& mof::operator <<(std::ostream& os , const mof::Matrix3D& mat){\r
- for(int i = 0 ; i <= DIMENSION ; i++){\r
- for(int j = 0 ; j <= DIMENSION ; j++){\r
- if(j != 0)os << " , ";\r
- os << mat.m_pImpl->elements[i][j];\r
- }\r
- os << '\n';\r
- }\r
- return os;\r
-}\r
+#include <string.h>
+#include <iostream>
+#include "mof/Matrix3D.hpp"
+#include "mof/utilities.hpp"
+#include <d3dx9.h>
+#include <mof/ConsoleIO.hpp>
+
+const int DIMENSION = 3;
+
+
+mof::Matrix3D::Matrix3D()
+: m_pImpl(new Array)
+{
+ for(int i = 0 ; i <= DIMENSION ; ++i){
+ for(int j = 0 ; j <= DIMENSION ; ++j){
+ if(i == j)m_pImpl->elements[i][j] = 1;
+ else m_pImpl->elements[i][j] = 0;
+ }
+ }
+}
+
+mof::Matrix3D::Matrix3D(const mof::Matrix3D::Array & arr)
+: m_pImpl(new Array)
+{
+ *m_pImpl = arr;
+}
+
+
+mof::Matrix3D::~Matrix3D(){
+}
+
+
+mof::real mof::Matrix3D::at(int row , int column) const{
+ return m_pImpl->elements[row][column];
+}
+
+mof::Matrix3D::Array mof::Matrix3D::getArray() const{
+ return *m_pImpl;
+}
+
+
+mof::Matrix3D mof::Matrix3D::createIdentity(){
+ return mof::Matrix3D();
+}
+
+
+mof::Matrix3D mof::Matrix3D::createTransposed(const mof::Matrix3D& matrix){
+ Matrix3D transposed;
+ for(int i = 0 ; i <= DIMENSION ; i++){
+ for(int j = 0 ; j <= DIMENSION ; j++){
+ transposed.m_pImpl->elements[j][i] = matrix.m_pImpl->elements[i][j];
+ }
+ }
+ return transposed;
+}
+
+
+mof::Matrix3D mof::Matrix3D::createRotation(const mof::Vector3D& radians){
+ mof::real cosx = cosf(radians.x);
+ mof::real sinx = sinf(radians.x);
+ mof::real cosy = cosf(radians.y);
+ mof::real siny = sinf(radians.y);
+ mof::real cosz = cosf(radians.z);
+ mof::real sinz = sinf(radians.z);
+ mof::Matrix3D::Array x =
+ {{
+ { 1.f , 0.f , 0.f , 0.f } ,
+ { 0.f , cosx , sinx , 0.f } ,
+ { 0.f , -sinx , cosx , 0.f } ,
+ { 0.f , 0.f , 0.f , 1.f }
+ }};
+ mof::Matrix3D::Array y =
+ {{
+ { cosy , 0.f , -siny , 0.f } ,
+ { 0.f , 1.f , 0.f , 0.f } ,
+ { siny , 0.f , cosy , 0.f } ,
+ { 0.f , 0.f , 0.f , 1.f }
+ }};
+ mof::Matrix3D::Array z =
+ {{
+ { cosz , sinz , 0.f , 0.f } ,
+ { -sinz , cosz , 0.f , 0.f } ,
+ { 0.f , 0.f , 1.f , 0.f } ,
+ { 0.f , 0.f , 0.f , 1.f }
+ }};
+ return mof::Matrix3D(x) * mof::Matrix3D(y) * mof::Matrix3D(z); //TODO \90Ï\82ð\83n\81[\83h\83R\81[\83f\83B\83\93\83O
+}
+
+
+mof::Matrix3D mof::Matrix3D::createTranslation(const mof::Vector3D& position){
+ Matrix3D matrix;
+ matrix.m_pImpl->elements[DIMENSION][0] = position.x;
+ matrix.m_pImpl->elements[DIMENSION][1] = position.y;
+ matrix.m_pImpl->elements[DIMENSION][2] = position.z;
+ return matrix;
+}
+
+mof::Matrix3D mof::Matrix3D::createScaling(const mof::Vector3D& scaling){
+ Matrix3D matrix;
+ matrix.m_pImpl->elements[0][0] = scaling.x;
+ matrix.m_pImpl->elements[1][1] = scaling.y;
+ matrix.m_pImpl->elements[2][2] = scaling.z;
+ return matrix;
+}
+
+
+
+mof::Matrix3D mof::Matrix3D::createLookAtLH
+(
+ const mof::Vector3D& eye ,
+ const mof::Vector3D& lookAt ,
+ const mof::Vector3D& up
+)
+{
+ D3DXVECTOR3 vEye(eye.x , eye.y , eye.z);
+ D3DXVECTOR3 vLookAt(lookAt.x , lookAt.y , lookAt.z);
+ D3DXVECTOR3 vUp(up.x , up.y , up.z);
+ D3DXMATRIX m;
+ mof::Matrix3D::Array array;
+ D3DXMatrixLookAtLH( &m , &vEye , &vLookAt , &vUp );
+ for( int i = 0 ; i <= DIMENSION ; i++ )
+ {
+ for( int j = 0 ; j <= DIMENSION ; j++ )
+ {
+ array.elements[i][j] = m.m[i][j];
+ }
+ }
+ return mof::Matrix3D( array );
+}
+
+mof::Vector3D mof::Matrix3D::getTranslation(const mof::Matrix3D& matrix){
+ return mof::Vector3D(
+ matrix.m_pImpl->elements[DIMENSION][0] ,
+ matrix.m_pImpl->elements[DIMENSION][1] ,
+ matrix.m_pImpl->elements[DIMENSION][2]
+ );
+}
+
+mof::Vector3D mof::Matrix3D::getDiagonal() const{
+ return mof::Vector3D(
+ m_pImpl->elements[0][0] ,
+ m_pImpl->elements[1][1] ,
+ m_pImpl->elements[2][2]
+ );
+}
+
+
+
+mof::Matrix3D mof::Matrix3D::operator *(const mof::Matrix3D& matrix) const{
+ mof::Matrix3D multiplied;
+ for(int i = 0 ; i <= DIMENSION ; i++){
+ for(int j = 0 ; j <= DIMENSION ; j++){
+ mof::real sum = 0;
+ for(int k = 0 ; k <= DIMENSION ; k++){
+ sum += m_pImpl->elements[i][k] * matrix.m_pImpl->elements[k][j];
+ }
+ multiplied.m_pImpl->elements[i][j] = sum;
+ }
+ }
+ return multiplied;
+}
+
+
+mof::Matrix3D mof::Matrix3D::operator +(const mof::Matrix3D& matrix) const{
+ mof::Matrix3D result;
+ for(int i = 0 ; i <= DIMENSION ; i++){
+ for(int j = 0 ; j <= DIMENSION ; j++){
+ result.m_pImpl->elements[i][j] =
+ m_pImpl->elements[i][j] + matrix.m_pImpl->elements[i][j];
+ }
+ }
+ return result;
+}
+
+
+mof::Matrix3D mof::Matrix3D::operator -(const mof::Matrix3D& matrix) const{
+ mof::Matrix3D result;
+ for(int i = 0 ; i <= DIMENSION ; i++){
+ for(int j = 0 ; j <= DIMENSION ; j++){
+ result.m_pImpl->elements[i][j] =
+ m_pImpl->elements[i][j] - matrix.m_pImpl->elements[i][j];
+ }
+ }
+ return result;
+}
+
+
+mof::Matrix3D mof::operator *(const mof::Matrix3D& matrix , mof::real f){
+ mof::Matrix3D result;
+ for(int i = 0 ; i <= DIMENSION ; i++){
+ for(int j = 0 ; j <= DIMENSION ; j++){
+ result.m_pImpl->elements[i][j] =
+ matrix.m_pImpl->elements[i][j] * f;
+ }
+ }
+ return result;
+}
+
+mof::Matrix3D mof::operator *(mof::real f , mof::Matrix3D const& matrix){
+ return matrix * f;
+}
+
+
+mof::Vector3D mof::operator *(const mof::Vector3D& vec , const mof::Matrix3D& matrix) {
+ mof::real input[4] = {vec.x , vec.y , vec.z , 1};
+ mof::real output[4];
+ for(int i = 0 ; i < DIMENSION ; i++){
+ mof::real sum = 0;
+ for(int k = 0 ; k <= DIMENSION ; k++){
+ sum += input[k] * matrix.at(k , i);
+ }
+ output[i] = sum;
+
+ }
+ return mof::Vector3D(output[0] , output[1] , output[2]);
+}
+
+
+std::ostream& mof::operator <<(std::ostream& os , const mof::Matrix3D& mat){
+ for(int i = 0 ; i <= DIMENSION ; i++){
+ for(int j = 0 ; j <= DIMENSION ; j++){
+ if(j != 0)os << " , ";
+ os << mat.m_pImpl->elements[i][j];
+ }
+ os << '\n';
+ }
+ return os;
+}
-#pragma once\r
-#include "mof/Vector3D.hpp"\r
-#include <mof/real.hpp>\r
-#include <memory>\r
-\r
-\r
-namespace mof{\r
-\r
- class Matrix3D\r
- {\r
- public:\r
- struct Array\r
- {\r
- real elements[4][4];\r
- };\r
- private:\r
- std::shared_ptr<Array> m_pImpl;\r
- public:\r
- \r
- Matrix3D();\r
- explicit Matrix3D(const Array &);\r
- ~Matrix3D();\r
- real at(int row , int column) const;\r
- Array getArray() const;\r
-\r
- static Matrix3D createIdentity();\r
- static Matrix3D createTransposed(const Matrix3D& matrix);\r
- static Matrix3D createRotation(const mof::Vector3D& angle);\r
- static Matrix3D createTranslation(const mof::Vector3D& position);\r
- static Matrix3D createScaling(const mof::Vector3D& scale);\r
- static Matrix3D createLookAtLH( const Vector3D& eye , const Vector3D& lookAt , const Vector3D& up );\r
- static Vector3D getTranslation(const mof::Matrix3D& matrix);\r
- Vector3D getDiagonal() const;\r
-\r
-\r
- Matrix3D operator *(const mof::Matrix3D& matrix ) const;\r
- Matrix3D operator +(const mof::Matrix3D& matrix ) const;\r
- Matrix3D operator -(const mof::Matrix3D& matrix ) const;\r
-\r
- friend Vector3D operator *(const mof::Vector3D& vec , const mof::Matrix3D& matrix);\r
- friend Matrix3D operator *(const mof::Matrix3D& matrix , real f);\r
- friend Matrix3D operator *(real f , const mof::Matrix3D & matrix);\r
- friend std::ostream& operator <<(std::ostream& os , const mof::Matrix3D& mat);\r
- }; // class Matrix3D\r
- \r
- std::ostream& operator <<(std::ostream& os , const mof::Matrix3D& mat);\r
-\r
-} // namespace mof\r
-\r
+#pragma once
+#include "mof/Vector3D.hpp"
+#include <mof/real.hpp>
+#include <memory>
+
+
+namespace mof{
+
+ class Matrix3D
+ {
+ public:
+ struct Array
+ {
+ real elements[4][4];
+ };
+ private:
+ std::shared_ptr<Array> m_pImpl;
+ public:
+
+ Matrix3D();
+ explicit Matrix3D(const Array &);
+ ~Matrix3D();
+ real at(int row , int column) const;
+ Array getArray() const;
+
+ static Matrix3D createIdentity();
+ static Matrix3D createTransposed(const Matrix3D& matrix);
+ static Matrix3D createRotation(const mof::Vector3D& angle);
+ static Matrix3D createTranslation(const mof::Vector3D& position);
+ static Matrix3D createScaling(const mof::Vector3D& scale);
+ static Matrix3D createLookAtLH( const Vector3D& eye , const Vector3D& lookAt , const Vector3D& up );
+ static Vector3D getTranslation(const mof::Matrix3D& matrix);
+ Vector3D getDiagonal() const;
+
+
+ Matrix3D operator *(const mof::Matrix3D& matrix ) const;
+ Matrix3D operator +(const mof::Matrix3D& matrix ) const;
+ Matrix3D operator -(const mof::Matrix3D& matrix ) const;
+
+ friend Vector3D operator *(const mof::Vector3D& vec , const mof::Matrix3D& matrix);
+ friend Matrix3D operator *(const mof::Matrix3D& matrix , real f);
+ friend Matrix3D operator *(real f , const mof::Matrix3D & matrix);
+ friend std::ostream& operator <<(std::ostream& os , const mof::Matrix3D& mat);
+ }; // class Matrix3D
+
+ std::ostream& operator <<(std::ostream& os , const mof::Matrix3D& mat);
+
+} // namespace mof
+
-#include "mof/private/Mesh.hpp"\r
-#include "mof/GraphicsDevice.hpp"\r
-#include "mof/private/MeshDisposer.hpp"\r
-#include "mof/stream/Constant.hpp"\r
-#include "mof/ConsoleIO.hpp"\r
-\r
-struct mof::Mesh::Impl{\r
- \r
- std::shared_ptr<mof::MeshDisposer> pMeshDisposer;\r
- unsigned long nMaterials;\r
- std::shared_ptr<Material>* materials; \r
- std::shared_ptr<Texture>* textures;\r
- mof::Manipulator<mof::Matrix3D>::Handler worldMatrix;\r
- mof::FrameNumber m_frame;\r
- \r
-\r
- Impl(\r
- std::shared_ptr<mof::MeshDisposer> pMeshDisposer_ ,\r
- unsigned long nMaterials_ \r
- ) : \r
- pMeshDisposer(pMeshDisposer_) , \r
- nMaterials(nMaterials_) , materials(NULL) , textures(NULL) ,\r
- worldMatrix(mof::makeConstantHandler(mof::Matrix3D::createIdentity()))\r
- {}\r
-\r
- ~Impl(){\r
- delete[] materials;\r
- delete[] textures;\r
- }\r
-}; \r
-\r
-mof::Mesh::Mesh(\r
- std::shared_ptr<mof::MeshDisposer> pMeshDisposer ,\r
- unsigned long nMaterials ,\r
- const std::shared_ptr<Material>* materials , \r
- const std::shared_ptr<Texture>* textures \r
- ) : m_pImpl(new Impl(pMeshDisposer , nMaterials )){\r
-\r
- m_pImpl->materials = new std::shared_ptr<mof::Material>[nMaterials];\r
- m_pImpl->textures = new std::shared_ptr<mof::Texture>[nMaterials]; \r
-\r
- for(unsigned long i = 0 ; i < nMaterials ; i++ ){\r
- m_pImpl->materials[i] = materials[i];\r
- m_pImpl->textures[i] = textures[i];\r
- }\r
-}\r
-\r
-mof::Mesh::~Mesh(){\r
-}\r
- \r
-\r
-\r
-void mof::Mesh::setWorldMatrix(const mof::Manipulator<mof::Matrix3D>::Handler& handler){\r
- m_pImpl->worldMatrix = handler;\r
-}\r
-\r
-\r
-\r
-\r
-\r
-void mof::Mesh::setTexture( \r
- unsigned int num ,\r
- const std::shared_ptr<mof::Texture>& pTexture){\r
-\r
- if(num < m_pImpl->nMaterials)m_pImpl->textures[num] = pTexture; \r
-\r
-}\r
-\r
-\r
-bool mof::Mesh::isVisible() const{\r
- return true;\r
-}\r
-\r
-\r
-void mof::Mesh::update(){\r
- m_pImpl->m_frame++;\r
-}\r
-\r
-void mof::Mesh::draw() const{\r
- \r
-\r
- for( DWORD i = 0; i < m_pImpl->nMaterials ; i++ )\r
- {\r
- mof::GraphicsDevice::setMaterial(*m_pImpl->materials[i].get()); \r
- mof::GraphicsDevice::setTexture(m_pImpl->textures[i].get());\r
- mof::GraphicsDevice::setWorldTransform(m_pImpl->worldMatrix->value(m_pImpl->m_frame));\r
-\r
- HRESULT hr = m_pImpl->pMeshDisposer->pMesh->DrawSubset( i );\r
- if(FAILED(hr))throw std::runtime_error("Failed --- DrawSubset");\r
- }\r
-}\r
-\r
+#include "mof/private/Mesh.hpp"
+#include "mof/GraphicsDevice.hpp"
+#include "mof/private/MeshDisposer.hpp"
+#include "mof/stream/Constant.hpp"
+#include "mof/ConsoleIO.hpp"
+
+struct mof::Mesh::Impl{
+
+ std::shared_ptr<mof::MeshDisposer> pMeshDisposer;
+ unsigned long nMaterials;
+ std::shared_ptr<Material>* materials;
+ std::shared_ptr<Texture>* textures;
+ mof::Manipulator<mof::Matrix3D>::Handler worldMatrix;
+ mof::FrameNumber m_frame;
+
+
+ Impl(
+ std::shared_ptr<mof::MeshDisposer> pMeshDisposer_ ,
+ unsigned long nMaterials_
+ ) :
+ pMeshDisposer(pMeshDisposer_) ,
+ nMaterials(nMaterials_) , materials(NULL) , textures(NULL) ,
+ worldMatrix(mof::makeConstantHandler(mof::Matrix3D::createIdentity()))
+ {}
+
+ ~Impl(){
+ delete[] materials;
+ delete[] textures;
+ }
+};
+
+mof::Mesh::Mesh(
+ std::shared_ptr<mof::MeshDisposer> pMeshDisposer ,
+ unsigned long nMaterials ,
+ const std::shared_ptr<Material>* materials ,
+ const std::shared_ptr<Texture>* textures
+ ) : m_pImpl(new Impl(pMeshDisposer , nMaterials )){
+
+ m_pImpl->materials = new std::shared_ptr<mof::Material>[nMaterials];
+ m_pImpl->textures = new std::shared_ptr<mof::Texture>[nMaterials];
+
+ for(unsigned long i = 0 ; i < nMaterials ; i++ ){
+ m_pImpl->materials[i] = materials[i];
+ m_pImpl->textures[i] = textures[i];
+ }
+}
+
+mof::Mesh::~Mesh(){
+}
+
+
+
+void mof::Mesh::setWorldMatrix(const mof::Manipulator<mof::Matrix3D>::Handler& handler){
+ m_pImpl->worldMatrix = handler;
+}
+
+
+
+
+
+void mof::Mesh::setTexture(
+ unsigned int num ,
+ const std::shared_ptr<mof::Texture>& pTexture){
+
+ if(num < m_pImpl->nMaterials)m_pImpl->textures[num] = pTexture;
+
+}
+
+
+bool mof::Mesh::isVisible() const{
+ return true;
+}
+
+
+void mof::Mesh::update(){
+ m_pImpl->m_frame++;
+}
+
+void mof::Mesh::draw() const{
+
+
+ for( DWORD i = 0; i < m_pImpl->nMaterials ; i++ )
+ {
+ mof::GraphicsDevice::setMaterial(*m_pImpl->materials[i].get());
+ mof::GraphicsDevice::setTexture(m_pImpl->textures[i].get());
+ mof::GraphicsDevice::setWorldTransform(m_pImpl->worldMatrix->value(m_pImpl->m_frame));
+
+ HRESULT hr = m_pImpl->pMeshDisposer->pMesh->DrawSubset( i );
+ if(FAILED(hr))throw std::runtime_error("Failed --- DrawSubset");
+ }
+}
+
-#include "MeshBuilder.hpp"\r
-#include "mof/private/GraphicsDeviceImpl.hpp"\r
-#include "mof/ConsoleIO.hpp"\r
-#include <stdexcept>\r
-#include "mof/private/MeshDisposer.hpp"\r
-#include <memory>\r
-#include <stdlib.h>\r
-#include "mof/FilePath.hpp"\r
-#include "mof/private/VertexFVF.hpp"\r
-#include "mof/Material.hpp"\r
-#include "mof/Texture.hpp"\r
-#include "mof/private/Mesh.hpp"\r
-\r
-struct mof::MeshBuilder::Impl{\r
- std::shared_ptr<mof::MeshDisposer> pMeshDisposer;\r
- unsigned long nMaterials;\r
- std::shared_ptr<Material>* materials;\r
- std::shared_ptr<Texture>* textures;\r
-\r
-\r
- Impl()\r
- : pMeshDisposer() , nMaterials(0) ,\r
- materials(NULL) , textures(NULL){\r
- }\r
-\r
- ~Impl(){\r
- delete[] materials;\r
- delete[] textures;\r
- }\r
-\r
-};\r
-\r
-mof::MeshBuilder::MeshBuilder(const mof::tstring& path )\r
-: m_pImpl(new Impl())\r
-{\r
-\r
- LPDIRECT3DDEVICE9 pDevice = mof::GraphicsDevice::getRawDevice();\r
- HRESULT hr;\r
- LPD3DXBUFFER pD3DXMtrlBuffer; //\83}\83e\83\8a\83A\83\8b\97p\83o\83b\83t\83@\r
- m_pImpl->pMeshDisposer = std::shared_ptr<mof::MeshDisposer>( new mof::MeshDisposer() );\r
-\r
- //\83t\83@\83C\83\8b\83\8d\81[\83h\r
- hr = D3DXLoadMeshFromX(path.c_str() , D3DXMESH_MANAGED, pDevice,\r
- &(m_pImpl->pMeshDisposer->pAdjacency) ,\r
- &pD3DXMtrlBuffer , NULL, \r
- &(m_pImpl->nMaterials) , \r
- &(m_pImpl->pMeshDisposer->pMesh) );\r
- if(hr != D3D_OK)throw std::invalid_argument("Failed --- D3DXLoadMeshFromX");\r
-\r
- //\8ae\8eí\83C\83\93\83X\83^\83\93\83X\8eæ\93¾\r
- D3DXMATERIAL* d3dxMaterials = (D3DXMATERIAL*)pD3DXMtrlBuffer->GetBufferPointer();\r
- try{\r
- m_pImpl->materials = new std::shared_ptr<mof::Material>[m_pImpl->nMaterials];\r
- m_pImpl->textures = new std::shared_ptr<mof::Texture>[m_pImpl->nMaterials];\r
- \r
- \r
- for( DWORD i = 0; i< m_pImpl->nMaterials; i++ )\r
- {\r
- //\83}\83e\83\8a\83A\83\8b\82Ì\83R\83s\81[\r
- D3DMATERIAL9 mat = d3dxMaterials[i].MatD3D;\r
- mat.Ambient = mat.Diffuse;\r
- mof::Material tmp;\r
- memcpy(\r
- static_cast<void*>(&tmp) , \r
- static_cast<const void*>(&mat) ,\r
- sizeof(D3DMATERIAL9)\r
- );\r
- \r
- std::shared_ptr<mof::Material> p(new mof::Material(tmp));\r
- m_pImpl->materials[i] = p;\r
-\r
- //\83e\83N\83X\83`\83\83\83t\83@\83C\83\8b\82Ì\93Ç\82Ý\8d\9e\82Ý\r
- if( d3dxMaterials[i].pTextureFilename != NULL && \r
- lstrlen(d3dxMaterials[i].pTextureFilename) > 0 )\r
- {\r
- mof::otstringstream os;\r
- mof::FilePath path(path);\r
- os << path.dir().c_str() << _T("/") << d3dxMaterials[i].pTextureFilename;\r
- m_pImpl->textures[i] = std::shared_ptr<mof::Texture>(new mof::Texture( os.str()));\r
- }\r
- }\r
-\r
- }\r
- catch( std::exception& e){\r
- pD3DXMtrlBuffer->Release(); //\83o\83b\83t\83@\89ð\95ú\r
- throw e;\r
- }\r
- pD3DXMtrlBuffer->Release(); //\83o\83b\83t\83@\89ð\95ú\r
-\r
- LPD3DXMESH pMesh = NULL;\r
- if(m_pImpl->pMeshDisposer->pMesh->GetFVF() != mof::getFVF<VertexXYZNUV>())\r
- {\r
- //\83\81\83b\83V\83\85\82É\96@\90ü\82ª\82È\82¢\8fê\8d\87\8f\91\82«\8d\9e\82Þ\r
- m_pImpl->pMeshDisposer->pMesh->CloneMeshFVF(\r
- m_pImpl->pMeshDisposer->pMesh->GetOptions() ,\r
- mof::getFVF<VertexXYZNUV>() ,\r
- pDevice , &pMesh );\r
- \r
- LPD3DXMESH tmp = m_pImpl->pMeshDisposer->pMesh;\r
- m_pImpl->pMeshDisposer->pMesh = pMesh;\r
- tmp->Release();\r
- }\r
-\r
-}\r
- \r
-mof::MeshBuilder::~MeshBuilder(){}\r
-\r
-mof::Graphics3D* mof::MeshBuilder::construct() const{\r
- return new mof::Mesh(\r
- m_pImpl->pMeshDisposer ,\r
- m_pImpl->nMaterials , \r
- m_pImpl->materials ,\r
- m_pImpl->textures \r
- );\r
-}\r
+#include "MeshBuilder.hpp"
+#include "mof/private/GraphicsDeviceImpl.hpp"
+#include "mof/ConsoleIO.hpp"
+#include <stdexcept>
+#include "mof/private/MeshDisposer.hpp"
+#include <memory>
+#include <stdlib.h>
+#include "mof/FilePath.hpp"
+#include "mof/private/VertexFVF.hpp"
+#include "mof/Material.hpp"
+#include "mof/Texture.hpp"
+#include "mof/private/Mesh.hpp"
+
+struct mof::MeshBuilder::Impl{
+ std::shared_ptr<mof::MeshDisposer> pMeshDisposer;
+ unsigned long nMaterials;
+ std::shared_ptr<Material>* materials;
+ std::shared_ptr<Texture>* textures;
+
+
+ Impl()
+ : pMeshDisposer() , nMaterials(0) ,
+ materials(NULL) , textures(NULL){
+ }
+
+ ~Impl(){
+ delete[] materials;
+ delete[] textures;
+ }
+
+};
+
+mof::MeshBuilder::MeshBuilder(const mof::tstring& path )
+: m_pImpl(new Impl())
+{
+
+ LPDIRECT3DDEVICE9 pDevice = mof::GraphicsDevice::getRawDevice();
+ HRESULT hr;
+ LPD3DXBUFFER pD3DXMtrlBuffer; //\83}\83e\83\8a\83A\83\8b\97p\83o\83b\83t\83@
+ m_pImpl->pMeshDisposer = std::shared_ptr<mof::MeshDisposer>( new mof::MeshDisposer() );
+
+ //\83t\83@\83C\83\8b\83\8d\81[\83h
+ hr = D3DXLoadMeshFromX(path.c_str() , D3DXMESH_MANAGED, pDevice,
+ &(m_pImpl->pMeshDisposer->pAdjacency) ,
+ &pD3DXMtrlBuffer , NULL,
+ &(m_pImpl->nMaterials) ,
+ &(m_pImpl->pMeshDisposer->pMesh) );
+ if(hr != D3D_OK)throw std::invalid_argument("Failed --- D3DXLoadMeshFromX");
+
+ //\8ae\8eí\83C\83\93\83X\83^\83\93\83X\8eæ\93¾
+ D3DXMATERIAL* d3dxMaterials = (D3DXMATERIAL*)pD3DXMtrlBuffer->GetBufferPointer();
+ try{
+ m_pImpl->materials = new std::shared_ptr<mof::Material>[m_pImpl->nMaterials];
+ m_pImpl->textures = new std::shared_ptr<mof::Texture>[m_pImpl->nMaterials];
+
+
+ for( DWORD i = 0; i< m_pImpl->nMaterials; i++ )
+ {
+ //\83}\83e\83\8a\83A\83\8b\82Ì\83R\83s\81[
+ D3DMATERIAL9 mat = d3dxMaterials[i].MatD3D;
+ mat.Ambient = mat.Diffuse;
+ mof::Material tmp;
+ memcpy(
+ static_cast<void*>(&tmp) ,
+ static_cast<const void*>(&mat) ,
+ sizeof(D3DMATERIAL9)
+ );
+
+ std::shared_ptr<mof::Material> p(new mof::Material(tmp));
+ m_pImpl->materials[i] = p;
+
+ //\83e\83N\83X\83`\83\83\83t\83@\83C\83\8b\82Ì\93Ç\82Ý\8d\9e\82Ý
+ if( d3dxMaterials[i].pTextureFilename != NULL &&
+ lstrlen(d3dxMaterials[i].pTextureFilename) > 0 )
+ {
+ mof::otstringstream os;
+ mof::FilePath path(path);
+ os << path.dir().c_str() << _T("/") << d3dxMaterials[i].pTextureFilename;
+ m_pImpl->textures[i] = std::shared_ptr<mof::Texture>(new mof::Texture( os.str()));
+ }
+ }
+
+ }
+ catch( std::exception& e){
+ pD3DXMtrlBuffer->Release(); //\83o\83b\83t\83@\89ð\95ú
+ throw e;
+ }
+ pD3DXMtrlBuffer->Release(); //\83o\83b\83t\83@\89ð\95ú
+
+ LPD3DXMESH pMesh = NULL;
+ if(m_pImpl->pMeshDisposer->pMesh->GetFVF() != mof::getFVF<VertexXYZNUV>())
+ {
+ //\83\81\83b\83V\83\85\82É\96@\90ü\82ª\82È\82¢\8fê\8d\87\8f\91\82«\8d\9e\82Þ
+ m_pImpl->pMeshDisposer->pMesh->CloneMeshFVF(
+ m_pImpl->pMeshDisposer->pMesh->GetOptions() ,
+ mof::getFVF<VertexXYZNUV>() ,
+ pDevice , &pMesh );
+
+ LPD3DXMESH tmp = m_pImpl->pMeshDisposer->pMesh;
+ m_pImpl->pMeshDisposer->pMesh = pMesh;
+ tmp->Release();
+ }
+
+}
+
+mof::MeshBuilder::~MeshBuilder(){}
+
+mof::Graphics3D* mof::MeshBuilder::construct() const{
+ return new mof::Mesh(
+ m_pImpl->pMeshDisposer ,
+ m_pImpl->nMaterials ,
+ m_pImpl->materials ,
+ m_pImpl->textures
+ );
+}
-#ifndef MOF_MESH_BUILDER_HPP\r
-#define MOF_MESH_BUILDER_HPP\r
-#include <boost/scoped_ptr.hpp>\r
-#include <boost/utility.hpp>\r
-#include <memory>\r
-#include "mof/tstring.hpp"\r
-\r
-\r
-namespace mof{\r
- class Graphics3D;\r
- \r
- class MeshBuilder : boost::noncopyable\r
- {\r
- struct Impl;\r
- boost::scoped_ptr<Impl> m_pImpl;\r
- public:\r
- typedef std::shared_ptr<MeshBuilder> ptr;\r
- MeshBuilder( const mof::tstring& path );\r
- ~MeshBuilder();\r
-\r
- mof::Graphics3D* construct() const;\r
- };\r
-}\r
-\r
-#endif\r
+#ifndef MOF_MESH_BUILDER_HPP
+#define MOF_MESH_BUILDER_HPP
+#include <boost/scoped_ptr.hpp>
+#include <boost/utility.hpp>
+#include <memory>
+#include "mof/tstring.hpp"
+
+
+namespace mof{
+ class Graphics3D;
+
+ class MeshBuilder : boost::noncopyable
+ {
+ struct Impl;
+ boost::scoped_ptr<Impl> m_pImpl;
+ public:
+ typedef std::shared_ptr<MeshBuilder> ptr;
+ MeshBuilder( const mof::tstring& path );
+ ~MeshBuilder();
+
+ mof::Graphics3D* construct() const;
+ };
+}
+
+#endif
-#pragma once\r
-\r
-#include "mof/ResourceManager.h"\r
-#include "mof/Mesh.h"\r
-#include <boost/shared_ptr.hpp>\r
-\r
-namespace mof{\r
- \r
- typedef boost::shared_ptr<mof::Mesh> MeshResource;\r
- typedef mof::ResourceManager<mof::Mesh> MeshManager;\r
- \r
+#pragma once
+
+#include "mof/ResourceManager.h"
+#include "mof/Mesh.h"
+#include <boost/shared_ptr.hpp>
+
+namespace mof{
+
+ typedef boost::shared_ptr<mof::Mesh> MeshResource;
+ typedef mof::ResourceManager<mof::Mesh> MeshManager;
+
};
\ No newline at end of file
-#include "mof/OnceEventCondition.hpp"\r
-#include "mof/utilities.hpp"\r
-\r
-namespace mof\r
-{\r
- OnceEventCondition::OnceEventCondition( EventCondition* pBody )\r
- : m_disposable( false ) , m_pBody( pBody )\r
- {\r
- }\r
-\r
- OnceEventCondition::~OnceEventCondition( )\r
- {\r
- mof::safe_delete( m_pBody );\r
- }\r
-\r
- bool OnceEventCondition::test( )\r
- {\r
- bool result = m_pBody->test();\r
- if( !m_disposable && result )m_disposable = true;\r
- return result;\r
- }\r
-\r
- void OnceEventCondition::update( )\r
- {\r
- m_pBody->update();\r
- }\r
-\r
- bool OnceEventCondition::isDisposable( )\r
- {\r
- return m_disposable;\r
- }\r
-\r
-\r
-\r
-}\r
-\r
+#include "mof/OnceEventCondition.hpp"
+#include "mof/utilities.hpp"
+
+namespace mof
+{
+ OnceEventCondition::OnceEventCondition( EventCondition* pBody )
+ : m_disposable( false ) , m_pBody( pBody )
+ {
+ }
+
+ OnceEventCondition::~OnceEventCondition( )
+ {
+ mof::safe_delete( m_pBody );
+ }
+
+ bool OnceEventCondition::test( )
+ {
+ bool result = m_pBody->test();
+ if( !m_disposable && result )m_disposable = true;
+ return result;
+ }
+
+ void OnceEventCondition::update( )
+ {
+ m_pBody->update();
+ }
+
+ bool OnceEventCondition::isDisposable( )
+ {
+ return m_disposable;
+ }
+
+
+
+}
+
-#pragma once\r
-#include "mof/EventCondition.hpp"\r
-\r
-namespace mof\r
-{\r
-\r
- class OnceEventCondition : public EventCondition\r
- {\r
- bool m_disposable;\r
- EventCondition* m_pBody;\r
- public:\r
- OnceEventCondition( EventCondition* pBody );\r
- virtual ~OnceEventCondition();\r
- virtual bool test();\r
- virtual void update();\r
- virtual bool isDisposable();\r
- };\r
-\r
-}\r
-\r
+#pragma once
+#include "mof/EventCondition.hpp"
+
+namespace mof
+{
+
+ class OnceEventCondition : public EventCondition
+ {
+ bool m_disposable;
+ EventCondition* m_pBody;
+ public:
+ OnceEventCondition( EventCondition* pBody );
+ virtual ~OnceEventCondition();
+ virtual bool test();
+ virtual void update();
+ virtual bool isDisposable();
+ };
+
+}
+
-#ifndef MOF_PIXEL_MAP_HPP\r
-#define MOF_PIXEL_MAP_HPP\r
-\r
-#include "mof/Color.hpp"\r
-#include <boost/multi_array.hpp>\r
-\r
-namespace mof{\r
- typedef boost::multi_array<mof::Color , 2> PixelMap;\r
-}\r
-\r
-#endif \r
+#ifndef MOF_PIXEL_MAP_HPP
+#define MOF_PIXEL_MAP_HPP
+
+#include "mof/Color.hpp"
+#include <boost/multi_array.hpp>
+
+namespace mof{
+ typedef boost::multi_array<mof::Color , 2> PixelMap;
+}
+
+#endif
-#include "mof/private/PixelMapTextureBuilder.hpp"\r
-#include "mof/private/GraphicsDeviceImpl.hpp"\r
-#include <list>\r
-#include <memory>\r
-#include "mof/ConsoleIO.hpp"\r
-#include "mof/Font.hpp"\r
-\r
-\r
-mof::PixelMapTextureBuilder::PixelMapTextureBuilder( const std::shared_ptr<mof::PixelMap>& pixelMap)\r
-: m_pPixelMap(pixelMap)\r
-{\r
-}\r
-\r
-mof::PixelMapTextureBuilder::~PixelMapTextureBuilder(void)\r
-{\r
- \r
-}\r
-\r
-\r
-LPDIRECT3DTEXTURE9 mof::PixelMapTextureBuilder::create(){\r
- HRESULT hr;\r
- LPDIRECT3DDEVICE9 pDevice = mof::GraphicsDevice::getRawDevice();\r
-\r
- unsigned int tWidth = 2;\r
- while(tWidth < m_pPixelMap->shape()[0])tWidth *= 2;\r
- unsigned int tHeight = 2;\r
- while(tHeight < m_pPixelMap->shape()[1])tHeight *= 2;\r
- \r
- \r
- // \83e\83N\83X\83`\83\83\8dì\90¬\r
- LPDIRECT3DTEXTURE9 texture;\r
- if\r
- (\r
- FAILED\r
- (\r
- hr = D3DXCreateTexture\r
- (\r
- pDevice , tWidth , tHeight ,\r
- 1 , D3DUSAGE_DYNAMIC, D3DFMT_A8R8G8B8, \r
- D3DPOOL_DEFAULT, &texture\r
- )\r
- )\r
- )\r
- {\r
- throw std::runtime_error("Failed --- D3DXCreateTexture");\r
- }\r
-\r
- \r
-\r
- // \83e\83N\83X\83`\83\83\82É\83t\83H\83\93\83g\83r\83b\83g\83}\83b\83v\8f\91\82«\8d\9e\82Ý\r
- D3DLOCKED_RECT LockedRect;\r
- if(FAILED(hr = texture->LockRect(0, &LockedRect, NULL, D3DLOCK_DISCARD))){\r
- throw std::runtime_error("Failed --- LockRect");\r
- }\r
-\r
- // \83t\83H\83\93\83g\8fî\95ñ\82Ì\8f\91\82«\8d\9e\82Ý\r
- \r
- FillMemory(LockedRect.pBits , LockedRect.Pitch * tHeight , 0);\r
- for(unsigned int y = 0 ; y < m_pPixelMap->shape()[1] ; y++){\r
- for(unsigned int x = 0 ; x < m_pPixelMap->shape()[0] ; x++){\r
- memcpy((BYTE*)LockedRect.pBits + LockedRect.Pitch * y + 4 * x , &((*m_pPixelMap)[x][y]) , sizeof(DWORD));\r
- }\r
- }\r
-\r
- \r
- texture->UnlockRect(0);\r
- return texture;\r
-\r
-\r
-}\r
-\r
+#include "mof/private/PixelMapTextureBuilder.hpp"
+#include "mof/private/GraphicsDeviceImpl.hpp"
+#include <list>
+#include <memory>
+#include "mof/ConsoleIO.hpp"
+#include "mof/Font.hpp"
+
+
+mof::PixelMapTextureBuilder::PixelMapTextureBuilder( const std::shared_ptr<mof::PixelMap>& pixelMap)
+: m_pPixelMap(pixelMap)
+{
+}
+
+mof::PixelMapTextureBuilder::~PixelMapTextureBuilder(void)
+{
+
+}
+
+
+LPDIRECT3DTEXTURE9 mof::PixelMapTextureBuilder::create(){
+ HRESULT hr;
+ LPDIRECT3DDEVICE9 pDevice = mof::GraphicsDevice::getRawDevice();
+
+ unsigned int tWidth = 2;
+ while(tWidth < m_pPixelMap->shape()[0])tWidth *= 2;
+ unsigned int tHeight = 2;
+ while(tHeight < m_pPixelMap->shape()[1])tHeight *= 2;
+
+
+ // \83e\83N\83X\83`\83\83\8dì\90¬
+ LPDIRECT3DTEXTURE9 texture;
+ if
+ (
+ FAILED
+ (
+ hr = D3DXCreateTexture
+ (
+ pDevice , tWidth , tHeight ,
+ 1 , D3DUSAGE_DYNAMIC, D3DFMT_A8R8G8B8,
+ D3DPOOL_DEFAULT, &texture
+ )
+ )
+ )
+ {
+ throw std::runtime_error("Failed --- D3DXCreateTexture");
+ }
+
+
+
+ // \83e\83N\83X\83`\83\83\82É\83t\83H\83\93\83g\83r\83b\83g\83}\83b\83v\8f\91\82«\8d\9e\82Ý
+ D3DLOCKED_RECT LockedRect;
+ if(FAILED(hr = texture->LockRect(0, &LockedRect, NULL, D3DLOCK_DISCARD))){
+ throw std::runtime_error("Failed --- LockRect");
+ }
+
+ // \83t\83H\83\93\83g\8fî\95ñ\82Ì\8f\91\82«\8d\9e\82Ý
+
+ FillMemory(LockedRect.pBits , LockedRect.Pitch * tHeight , 0);
+ for(unsigned int y = 0 ; y < m_pPixelMap->shape()[1] ; y++){
+ for(unsigned int x = 0 ; x < m_pPixelMap->shape()[0] ; x++){
+ memcpy((BYTE*)LockedRect.pBits + LockedRect.Pitch * y + 4 * x , &((*m_pPixelMap)[x][y]) , sizeof(DWORD));
+ }
+ }
+
+
+ texture->UnlockRect(0);
+ return texture;
+
+
+}
+
-#include "mof/PlainWidgetView.hpp"\r
-#include "mof/GraphicsDevice.hpp"\r
-#include "mof/Sprite.hpp"\r
-#include "mof/mofAnimations.hpp"\r
-#include "mof/Font.hpp"\r
-\r
-\r
-struct mof::PlainWidgetView::Impl{\r
- mof::Animation<mof::Matrix2D>::Handler transform;\r
- mof::Animation<bool>::Handler visible;\r
- mof::FrameNumber frame;\r
- mof::Rectangle<int> bounds;\r
- mof::Sprite* pCaption;\r
- \r
-\r
- Impl()\r
- : frame(0) , \r
- bounds(mof::Rectangle<int>(0 , 0 , 0 , 0)) , pCaption(NULL)\r
- {\r
- }\r
-\r
- ~Impl(){\r
- delete pCaption;\r
- }\r
-};\r
-\r
-\r
-mof::PlainWidgetView::PlainWidgetView\r
-(\r
- mof::Color begin , mof::Color end\r
-)\r
-: m_pImpl( new Impl( ) )\r
-{\r
-\r
- \r
- //m_pImpl->pFrame = new mof::Frame(m_pImpl->pGraphicsDevice , pTexture);\r
- m_pImpl->transform = mof::makeConstantHandler(mof::Matrix2D::createIdentity());\r
- {\r
- //visible\82Ì\90Ý\92è\r
- m_pImpl->visible = mof::makeConstantHandler(false);\r
- }\r
-\r
- //m_pImpl->pCaption = mof::Sprite::createTextSprite(pGraphicsDevice , mof::Font(mof::Font::MS_P_GOTHIC , 25) , title );\r
-}\r
- \r
-mof::PlainWidgetView::~PlainWidgetView(){\r
-\r
-}\r
-\r
-\r
-\r
-void mof::PlainWidgetView::setBounds(const mof::Rectangle<int>& bounds){\r
- m_pImpl->bounds = bounds;\r
-}\r
-\r
-mof::Rectangle<int> mof::PlainWidgetView::getBounds() const{\r
- return m_pImpl->transform->getValue(m_pImpl->frame).toBoundingBox();\r
-}\r
-\r
-\r
-\r
-void mof::PlainWidgetView::focus(){\r
-\r
-}\r
- \r
-void mof::PlainWidgetView::blur(){\r
-\r
-}\r
-\r
-\r
-void mof::PlainWidgetView::show(){\r
- const int width = m_pImpl->bounds.endX - m_pImpl->bounds.beginX;\r
- const int height = m_pImpl->bounds.endY - m_pImpl->bounds.beginY;\r
-\r
- mof::Animation<mof::Matrix2D>::Handler list[] = {\r
- mof::Animation<mof::Matrix2D>::Handler(mof::makeConstantHandler(mof::Matrix2D::createScaling(mof::Vector2D(width , height)))) ,\r
- mof::Animation<mof::Matrix2D>::Handler(mof::makeConstantHandler(\r
- mof::Matrix2D::createTranslation(mof::Vector2D(m_pImpl->bounds.beginX , m_pImpl->bounds.beginY))\r
- )) \r
- };\r
- m_pImpl->transform = mof::Animation<mof::Matrix2D>::Handler(new mof::CascadingAnimation<mof::Matrix2D>(list[0] , list[1]));\r
- \r
- {\r
- //visible\82Ì\90Ý\92è\r
- m_pImpl->visible = mof::makeConstantHandler(true);\r
- }\r
- m_pImpl->frame = 0;\r
-\r
-}\r
- \r
-void mof::PlainWidgetView::close(){\r
- const int width = m_pImpl->bounds.endX - m_pImpl->bounds.beginX;\r
- const int height = m_pImpl->bounds.endY - m_pImpl->bounds.beginY;\r
-\r
- mof::Animation<mof::Matrix2D>::Handler list[] = {\r
- mof::Animation<mof::Matrix2D>::Handler(mof::makeConstantHandler(mof::Matrix2D::createScaling(mof::Vector2D(width , height)))) ,\r
- mof::Animation<mof::Matrix2D>::Handler(mof::makeConstantHandler(\r
- mof::Matrix2D::createTranslation(mof::Vector2D(m_pImpl->bounds.beginX , m_pImpl->bounds.beginY))\r
- )) \r
- };\r
- m_pImpl->transform = mof::Animation<mof::Matrix2D>::Handler(new mof::CascadingAnimation<mof::Matrix2D>(list[0] , list[1]));\r
- \r
- {\r
- //visible\82Ì\90Ý\92è\r
- mof::KeyFrameAnimation<bool>::KeyFrame keyFrames[] = {\r
- mof::makeKeyFrame(0 , true) ,\r
- mof::makeKeyFrame(20 , false) \r
- };\r
- m_pImpl->visible = mof::Animation<bool>::Handler(\r
- new mof::KeyFrameAnimation<bool>(keyFrames[0] , keyFrames[1] , &mof::stepInterpolate<bool> )\r
- );\r
- }\r
- m_pImpl->frame = 0;\r
-}\r
-\r
-\r
-\r
-void mof::PlainWidgetView::update(){\r
- m_pImpl->frame++;\r
- //m_pImpl->pCaption->update();\r
- \r
-}\r
- \r
-void mof::PlainWidgetView::draw(){\r
- if(m_pImpl->visible->getValue(m_pImpl->frame)){\r
- //m_pImpl->pCaption->draw();\r
- }\r
-}\r
+#include "mof/PlainWidgetView.hpp"
+#include "mof/GraphicsDevice.hpp"
+#include "mof/Sprite.hpp"
+#include "mof/mofAnimations.hpp"
+#include "mof/Font.hpp"
+
+
+struct mof::PlainWidgetView::Impl{
+ mof::Animation<mof::Matrix2D>::Handler transform;
+ mof::Animation<bool>::Handler visible;
+ mof::FrameNumber frame;
+ mof::Rectangle<int> bounds;
+ mof::Sprite* pCaption;
+
+
+ Impl()
+ : frame(0) ,
+ bounds(mof::Rectangle<int>(0 , 0 , 0 , 0)) , pCaption(NULL)
+ {
+ }
+
+ ~Impl(){
+ delete pCaption;
+ }
+};
+
+
+mof::PlainWidgetView::PlainWidgetView
+(
+ mof::Color begin , mof::Color end
+)
+: m_pImpl( new Impl( ) )
+{
+
+
+ //m_pImpl->pFrame = new mof::Frame(m_pImpl->pGraphicsDevice , pTexture);
+ m_pImpl->transform = mof::makeConstantHandler(mof::Matrix2D::createIdentity());
+ {
+ //visible\82Ì\90Ý\92è
+ m_pImpl->visible = mof::makeConstantHandler(false);
+ }
+
+ //m_pImpl->pCaption = mof::Sprite::createTextSprite(pGraphicsDevice , mof::Font(mof::Font::MS_P_GOTHIC , 25) , title );
+}
+
+mof::PlainWidgetView::~PlainWidgetView(){
+
+}
+
+
+
+void mof::PlainWidgetView::setBounds(const mof::Rectangle<int>& bounds){
+ m_pImpl->bounds = bounds;
+}
+
+mof::Rectangle<int> mof::PlainWidgetView::getBounds() const{
+ return m_pImpl->transform->getValue(m_pImpl->frame).toBoundingBox();
+}
+
+
+
+void mof::PlainWidgetView::focus(){
+
+}
+
+void mof::PlainWidgetView::blur(){
+
+}
+
+
+void mof::PlainWidgetView::show(){
+ const int width = m_pImpl->bounds.endX - m_pImpl->bounds.beginX;
+ const int height = m_pImpl->bounds.endY - m_pImpl->bounds.beginY;
+
+ mof::Animation<mof::Matrix2D>::Handler list[] = {
+ mof::Animation<mof::Matrix2D>::Handler(mof::makeConstantHandler(mof::Matrix2D::createScaling(mof::Vector2D(width , height)))) ,
+ mof::Animation<mof::Matrix2D>::Handler(mof::makeConstantHandler(
+ mof::Matrix2D::createTranslation(mof::Vector2D(m_pImpl->bounds.beginX , m_pImpl->bounds.beginY))
+ ))
+ };
+ m_pImpl->transform = mof::Animation<mof::Matrix2D>::Handler(new mof::CascadingAnimation<mof::Matrix2D>(list[0] , list[1]));
+
+ {
+ //visible\82Ì\90Ý\92è
+ m_pImpl->visible = mof::makeConstantHandler(true);
+ }
+ m_pImpl->frame = 0;
+
+}
+
+void mof::PlainWidgetView::close(){
+ const int width = m_pImpl->bounds.endX - m_pImpl->bounds.beginX;
+ const int height = m_pImpl->bounds.endY - m_pImpl->bounds.beginY;
+
+ mof::Animation<mof::Matrix2D>::Handler list[] = {
+ mof::Animation<mof::Matrix2D>::Handler(mof::makeConstantHandler(mof::Matrix2D::createScaling(mof::Vector2D(width , height)))) ,
+ mof::Animation<mof::Matrix2D>::Handler(mof::makeConstantHandler(
+ mof::Matrix2D::createTranslation(mof::Vector2D(m_pImpl->bounds.beginX , m_pImpl->bounds.beginY))
+ ))
+ };
+ m_pImpl->transform = mof::Animation<mof::Matrix2D>::Handler(new mof::CascadingAnimation<mof::Matrix2D>(list[0] , list[1]));
+
+ {
+ //visible\82Ì\90Ý\92è
+ mof::KeyFrameAnimation<bool>::KeyFrame keyFrames[] = {
+ mof::makeKeyFrame(0 , true) ,
+ mof::makeKeyFrame(20 , false)
+ };
+ m_pImpl->visible = mof::Animation<bool>::Handler(
+ new mof::KeyFrameAnimation<bool>(keyFrames[0] , keyFrames[1] , &mof::stepInterpolate<bool> )
+ );
+ }
+ m_pImpl->frame = 0;
+}
+
+
+
+void mof::PlainWidgetView::update(){
+ m_pImpl->frame++;
+ //m_pImpl->pCaption->update();
+
+}
+
+void mof::PlainWidgetView::draw(){
+ if(m_pImpl->visible->getValue(m_pImpl->frame)){
+ //m_pImpl->pCaption->draw();
+ }
+}
-#pragma once\r
-#include <boost/scoped_ptr.hpp>\r
-#include "mof/WidgetView.hpp"\r
-#include "mof/tstring.hpp"\r
-#include "mof/Color.hpp"\r
-\r
-namespace mof{\r
- \r
- \r
- class PlainWidgetView : public WidgetView{\r
- struct Impl;\r
- boost::scoped_ptr<Impl> m_pImpl;\r
- public:\r
- PlainWidgetView( mof::Color begin , mof::Color end);\r
- ~PlainWidgetView();\r
-\r
- virtual void setBounds(const mof::Rectangle<int>& bounds);\r
- virtual mof::Rectangle<int> getBounds() const;\r
-\r
- virtual void show();\r
- virtual void close();\r
- virtual void focus();\r
- virtual void blur();\r
-\r
- virtual void update();\r
- virtual void draw();\r
- };\r
-\r
-}\r
+#pragma once
+#include <boost/scoped_ptr.hpp>
+#include "mof/WidgetView.hpp"
+#include "mof/tstring.hpp"
+#include "mof/Color.hpp"
+
+namespace mof{
+
+
+ class PlainWidgetView : public WidgetView{
+ struct Impl;
+ boost::scoped_ptr<Impl> m_pImpl;
+ public:
+ PlainWidgetView( mof::Color begin , mof::Color end);
+ ~PlainWidgetView();
+
+ virtual void setBounds(const mof::Rectangle<int>& bounds);
+ virtual mof::Rectangle<int> getBounds() const;
+
+ virtual void show();
+ virtual void close();
+ virtual void focus();
+ virtual void blur();
+
+ virtual void update();
+ virtual void draw();
+ };
+
+}
-#pragma once\r
-#include <iostream>\r
-#include <mof/Vector2D.hpp>\r
-\r
-namespace mof\r
-{\r
- template<typename E>\r
- struct Rectangle\r
- {\r
- E beginX;\r
- E beginY;\r
- E endX;\r
- E endY;\r
-\r
- Rectangle(){}\r
-\r
- template< typename T >\r
- Rectangle(const Rectangle<T>& obj)\r
- { \r
- beginX = obj.beginX;\r
- beginY = obj.beginY;\r
- endX = obj.endX;\r
- endY = obj.endY;\r
- }\r
-\r
- Rectangle(const E& beginX_ , const E& beginY_ , const E& endX_ , const E& endY_)\r
- : beginX(beginX_) , beginY(beginY_) , endX(endX_) , endY(endY_)\r
- {}\r
-\r
- template< typename T >\r
- Rectangle& operator = ( const Rectangle<T>& obj )\r
- { \r
- beginX = obj.beginX;\r
- beginY = obj.beginY;\r
- endX = obj.endX;\r
- endY = obj.endY;\r
- return *this;\r
- }\r
-\r
- E getWidth( ) const\r
- {\r
- E width = endX - beginX;\r
- return width < 0 ? -width : width;\r
- }\r
- \r
- E getHeight( ) const\r
- {\r
- E height = endY - beginY;\r
- return height < 0 ? -height : height;\r
- }\r
-\r
- void setPosition(const Vector2D& position)\r
- {\r
- E width = getWidth(); \r
- E height = getHeight(); \r
- beginX = position.x;\r
- beginY = position.y;\r
- endX = width + beginX; \r
- endY = height + beginY;\r
- }\r
-\r
- void setScale(const Vector2D& scale)\r
- {\r
- endX = scale.x + beginX;\r
- endY = scale.y + beginY;\r
- }\r
- \r
-\r
- bool operator ==(const mof::Rectangle<E>& rect){\r
- if(\r
- beginX == rect.beginX &&\r
- beginY == rect.beginY &&\r
- endX == rect.endX &&\r
- endY == rect.endY )return true;\r
- else return false;\r
- }\r
-\r
- \r
- };\r
-\r
- template<typename E>\r
- std::ostream& operator <<(std::ostream& os , const mof::Rectangle<E>& rect){\r
- os << '(' << rect.beginX << ',' << rect.beginY << ','\r
- << rect.endX << ',' << rect.endY << ')';\r
- return os; \r
- }\r
- \r
-}\r
+#pragma once
+#include <iostream>
+#include <mof/Vector2D.hpp>
+
+namespace mof
+{
+ template<typename E>
+ struct Rectangle
+ {
+ E beginX;
+ E beginY;
+ E endX;
+ E endY;
+
+ Rectangle(){}
+
+ template< typename T >
+ Rectangle(const Rectangle<T>& obj)
+ {
+ beginX = obj.beginX;
+ beginY = obj.beginY;
+ endX = obj.endX;
+ endY = obj.endY;
+ }
+
+ Rectangle(const E& beginX_ , const E& beginY_ , const E& endX_ , const E& endY_)
+ : beginX(beginX_) , beginY(beginY_) , endX(endX_) , endY(endY_)
+ {}
+
+ template< typename T >
+ Rectangle& operator = ( const Rectangle<T>& obj )
+ {
+ beginX = obj.beginX;
+ beginY = obj.beginY;
+ endX = obj.endX;
+ endY = obj.endY;
+ return *this;
+ }
+
+ E getWidth( ) const
+ {
+ E width = endX - beginX;
+ return width < 0 ? -width : width;
+ }
+
+ E getHeight( ) const
+ {
+ E height = endY - beginY;
+ return height < 0 ? -height : height;
+ }
+
+ void setPosition(const Vector2D& position)
+ {
+ E width = getWidth();
+ E height = getHeight();
+ beginX = position.x;
+ beginY = position.y;
+ endX = width + beginX;
+ endY = height + beginY;
+ }
+
+ void setScale(const Vector2D& scale)
+ {
+ endX = scale.x + beginX;
+ endY = scale.y + beginY;
+ }
+
+
+ bool operator ==(const mof::Rectangle<E>& rect){
+ if(
+ beginX == rect.beginX &&
+ beginY == rect.beginY &&
+ endX == rect.endX &&
+ endY == rect.endY )return true;
+ else return false;
+ }
+
+
+ };
+
+ template<typename E>
+ std::ostream& operator <<(std::ostream& os , const mof::Rectangle<E>& rect){
+ os << '(' << rect.beginX << ',' << rect.beginY << ','
+ << rect.endX << ',' << rect.endY << ')';
+ return os;
+ }
+
+}
-#pragma once\r
-#include "mof/tstring.hpp"\r
-#include <map>\r
-#include <list>\r
-#include <memory>\r
-#include "mof/ConsoleIO.hpp"\r
-\r
-namespace mof{\r
- \r
- \r
-\r
- /** \83\8a\83\\81[\83X\82Ì\83v\81[\83\8b\81A\92x\89\84\83\8d\81[\83h\8b@\94\\82ð\92ñ\8b\9f\82·\82é\83e\83\93\83v\83\8c\81[\83g\r
- *\r
- *\r
- */\r
- template <class T >\r
- class ResourceManager\r
- {\r
- typedef std::list<std::shared_ptr<ResourceManager<T > > > MANAGER_LIST;\r
- typedef std::map<mof::tstring , std::shared_ptr<T>> RESOURCE_MAP;\r
- \r
-\r
- ResourceManager<T>* m_pParent;\r
- RESOURCE_MAP m_resources;\r
- MANAGER_LIST m_children;\r
- \r
- static std::shared_ptr<T> nullPtr;\r
- //void addResouce(Resouce* pResource);\r
- public:\r
- ResourceManager();\r
- virtual ~ResourceManager(void);\r
-\r
- std::shared_ptr<T> getResource(const tstring& name );\r
- std::shared_ptr<T> getResource(const TCHAR * const name );\r
- void addResource(const TCHAR * const name , std::shared_ptr<T>& resource);\r
- std::shared_ptr< ResourceManager<T> > createChild();\r
- };\r
-\r
-\r
-\r
- template <class T>\r
- std::shared_ptr<T> ResourceManager<T>::nullPtr = std::shared_ptr<T>();\r
-\r
-\r
-\r
- /** \90e\82È\82µ\82Æ\82µ\82Ä\83I\83u\83W\83F\83N\83g\90¶\90¬\r
- *\r
- */\r
- template <class T >\r
- ResourceManager<T >::ResourceManager( ){\r
- m_pParent = NULL;\r
- }\r
-\r
- /** \8e©\90g\82Ì\83\8a\83\\81[\83X\82Æ\8eq\82ð\89ð\95ú\82µ\81A\90e\82Ì\8eq\83\8a\83X\83g\82©\82ç\8e©\90g\82ð\8dí\8f\9c\r
- */\r
- template <class T >\r
- ResourceManager<T >::~ResourceManager(){\r
- //\8e©\90g\82Ì\8aÇ\97\9d\82·\82é\83\8a\83\\81[\83X\82ð\83A\83\93\83\8d\81[\83h\r
- m_resources.clear();\r
-\r
- //\8eq\83I\83u\83W\83F\83N\83g\82ð\8dí\8f\9c\r
- m_children.clear();\r
- \r
- //\90e\82©\82ç\8e©\90g\82ð\8dí\8f\9c\r
- if(m_pParent != NULL){\r
- for(MANAGER_LIST::iterator itr = m_pParent->m_children.begin() ; itr != m_pParent->m_children.end() ; ++itr){\r
- if(this == itr->get() ){\r
- m_pParent->m_children.erase(itr);\r
- return;\r
- }\r
- }\r
- }\r
- }\r
-\r
- \r
-\r
- /** \90V\82½\82È\8eq\82ð\92Ç\89Á\82µ\81A\95Ô\82·\r
- * @return \90¶\90¬\82µ\82½\8eq\r
- */\r
- template <class T >\r
- std::shared_ptr< ResourceManager<T> > ResourceManager<T >::createChild(){\r
- std::shared_ptr< ResourceManager<T > > manager(new ResourceManager<T>( ));\r
- manager->m_pParent = this;\r
- m_children.push_back(manager);\r
- return manager;\r
- }\r
-\r
- \r
- /** \96Ø\8d\\91¢\91S\91Ì\82©\82ç\8ew\92è\82³\82ê\82½\96¼\91O\82Ì\83\8a\83\\81[\83X\82ð\8c\9f\8dõ\81E\8eæ\93¾<br>\r
- * \8c©\82Â\82©\82ç\82È\82¯\82ê\82Î\81A\88ø\90\94\82ð\8c³\82É\90V\82½\82É\90¶\90¬\82·\82é\81B\r
- * @param name \83\8a\83\\81[\83X\96¼\r
- * @param parameter \83\8a\83\\81[\83X\8dì\90¬\8e\9e\82Ì\88ø\90\94\81i\8ew\92è\82µ\82È\82\82Ä\82à\82æ\82¢\81j \r
- * @return \97v\8b\81\82³\82ê\82½\83\8a\83\\81[\83X\r
- */\r
- template <class T >\r
- std::shared_ptr<T> ResourceManager<T >::getResource(const mof::tstring& name){\r
- //\8e©\95ª\82Ì\83\8a\83X\83g\82©\82ç\92T\82·\r
- RESOURCE_MAP::const_iterator n = m_resources.find(name);\r
- if (n != m_resources.end()){\r
- return n->second;\r
- //return (std::shared_ptr<T>&)n->second;\r
- }\r
- \r
- //\8eq\82Ì\83\8a\83X\83g\82©\82ç\92T\82·\r
-\r
- //\90e\82Ì\83\8a\83X\83g\82©\82ç\92T\82·\r
-\r
- //\82È\82¯\82ê\82Î\8dì\90¬\82·\82é\r
- std::shared_ptr<T> resource( new T( name ) );\r
- //DEBUG_PRINT(resource->getName() << _T("\82ª\90¶\90¬\82³\82ê\82Ü\82µ\82½") );\r
- m_resources.insert(RESOURCE_MAP::value_type(name , resource));\r
- n = m_resources.find(name);\r
- return n->second;\r
- //return (std::shared_ptr<T>&)n->second;\r
- }\r
-\r
- \r
-\r
- template <class T >\r
- std::shared_ptr<T> ResourceManager<T >::getResource(const TCHAR* const name){\r
- return getResource(mof::tstring(name));\r
- }\r
- \r
- template <class T>\r
- void ResourceManager<T>::addResource(const TCHAR* const name , std::shared_ptr<T>& resource){\r
- m_resources.insert(RESOURCE_MAP::value_type(mof::tstring(name) , resource));\r
- }\r
-\r
-\r
- /*template <class T , typename K >\r
- std::shared_ptr<T>& ResourceManager<T , K>::findResource(mof::tstring& name , K parameter){\r
-\r
- }*/\r
-\r
-\r
-};\r
+#pragma once
+#include "mof/tstring.hpp"
+#include <map>
+#include <list>
+#include <memory>
+#include "mof/ConsoleIO.hpp"
+
+namespace mof{
+
+
+
+ /** \83\8a\83\\81[\83X\82Ì\83v\81[\83\8b\81A\92x\89\84\83\8d\81[\83h\8b@\94\\82ð\92ñ\8b\9f\82·\82é\83e\83\93\83v\83\8c\81[\83g
+ *
+ *
+ */
+ template <class T >
+ class ResourceManager
+ {
+ typedef std::list<std::shared_ptr<ResourceManager<T > > > MANAGER_LIST;
+ typedef std::map<mof::tstring , std::shared_ptr<T>> RESOURCE_MAP;
+
+
+ ResourceManager<T>* m_pParent;
+ RESOURCE_MAP m_resources;
+ MANAGER_LIST m_children;
+
+ static std::shared_ptr<T> nullPtr;
+ //void addResouce(Resouce* pResource);
+ public:
+ ResourceManager();
+ virtual ~ResourceManager(void);
+
+ std::shared_ptr<T> getResource(const tstring& name );
+ std::shared_ptr<T> getResource(const TCHAR * const name );
+ void addResource(const TCHAR * const name , std::shared_ptr<T>& resource);
+ std::shared_ptr< ResourceManager<T> > createChild();
+ };
+
+
+
+ template <class T>
+ std::shared_ptr<T> ResourceManager<T>::nullPtr = std::shared_ptr<T>();
+
+
+
+ /** \90e\82È\82µ\82Æ\82µ\82Ä\83I\83u\83W\83F\83N\83g\90¶\90¬
+ *
+ */
+ template <class T >
+ ResourceManager<T >::ResourceManager( ){
+ m_pParent = NULL;
+ }
+
+ /** \8e©\90g\82Ì\83\8a\83\\81[\83X\82Æ\8eq\82ð\89ð\95ú\82µ\81A\90e\82Ì\8eq\83\8a\83X\83g\82©\82ç\8e©\90g\82ð\8dí\8f\9c
+ */
+ template <class T >
+ ResourceManager<T >::~ResourceManager(){
+ //\8e©\90g\82Ì\8aÇ\97\9d\82·\82é\83\8a\83\\81[\83X\82ð\83A\83\93\83\8d\81[\83h
+ m_resources.clear();
+
+ //\8eq\83I\83u\83W\83F\83N\83g\82ð\8dí\8f\9c
+ m_children.clear();
+
+ //\90e\82©\82ç\8e©\90g\82ð\8dí\8f\9c
+ if(m_pParent != NULL){
+ for(MANAGER_LIST::iterator itr = m_pParent->m_children.begin() ; itr != m_pParent->m_children.end() ; ++itr){
+ if(this == itr->get() ){
+ m_pParent->m_children.erase(itr);
+ return;
+ }
+ }
+ }
+ }
+
+
+
+ /** \90V\82½\82È\8eq\82ð\92Ç\89Á\82µ\81A\95Ô\82·
+ * @return \90¶\90¬\82µ\82½\8eq
+ */
+ template <class T >
+ std::shared_ptr< ResourceManager<T> > ResourceManager<T >::createChild(){
+ std::shared_ptr< ResourceManager<T > > manager(new ResourceManager<T>( ));
+ manager->m_pParent = this;
+ m_children.push_back(manager);
+ return manager;
+ }
+
+
+ /** \96Ø\8d\\91¢\91S\91Ì\82©\82ç\8ew\92è\82³\82ê\82½\96¼\91O\82Ì\83\8a\83\\81[\83X\82ð\8c\9f\8dõ\81E\8eæ\93¾<br>
+ * \8c©\82Â\82©\82ç\82È\82¯\82ê\82Î\81A\88ø\90\94\82ð\8c³\82É\90V\82½\82É\90¶\90¬\82·\82é\81B
+ * @param name \83\8a\83\\81[\83X\96¼
+ * @param parameter \83\8a\83\\81[\83X\8dì\90¬\8e\9e\82Ì\88ø\90\94\81i\8ew\92è\82µ\82È\82\82Ä\82à\82æ\82¢\81j
+ * @return \97v\8b\81\82³\82ê\82½\83\8a\83\\81[\83X
+ */
+ template <class T >
+ std::shared_ptr<T> ResourceManager<T >::getResource(const mof::tstring& name){
+ //\8e©\95ª\82Ì\83\8a\83X\83g\82©\82ç\92T\82·
+ RESOURCE_MAP::const_iterator n = m_resources.find(name);
+ if (n != m_resources.end()){
+ return n->second;
+ //return (std::shared_ptr<T>&)n->second;
+ }
+
+ //\8eq\82Ì\83\8a\83X\83g\82©\82ç\92T\82·
+
+ //\90e\82Ì\83\8a\83X\83g\82©\82ç\92T\82·
+
+ //\82È\82¯\82ê\82Î\8dì\90¬\82·\82é
+ std::shared_ptr<T> resource( new T( name ) );
+ //DEBUG_PRINT(resource->getName() << _T("\82ª\90¶\90¬\82³\82ê\82Ü\82µ\82½") );
+ m_resources.insert(RESOURCE_MAP::value_type(name , resource));
+ n = m_resources.find(name);
+ return n->second;
+ //return (std::shared_ptr<T>&)n->second;
+ }
+
+
+
+ template <class T >
+ std::shared_ptr<T> ResourceManager<T >::getResource(const TCHAR* const name){
+ return getResource(mof::tstring(name));
+ }
+
+ template <class T>
+ void ResourceManager<T>::addResource(const TCHAR* const name , std::shared_ptr<T>& resource){
+ m_resources.insert(RESOURCE_MAP::value_type(mof::tstring(name) , resource));
+ }
+
+
+ /*template <class T , typename K >
+ std::shared_ptr<T>& ResourceManager<T , K>::findResource(mof::tstring& name , K parameter){
+
+ }*/
+
+
+};
-#ifndef SCENE_GRAPH_HPP\r
-#define SCENE_GRAPH_HPP\r
-\r
-\r
-\r
-namespace mof{\r
-\r
-\r
-\r
-class SceneGraph \r
-{\r
-public:\r
- virtual ~SceneGraph(){}\r
- virtual bool isVisible() const = 0;\r
- virtual void update() = 0;\r
- virtual void draw() const = 0;\r
- //virtual bool isDisposable() const = 0;\r
-\r
-};\r
-\r
-}\r
-\r
-#endif\r
+#ifndef SCENE_GRAPH_HPP
+#define SCENE_GRAPH_HPP
+
+
+
+namespace mof{
+
+
+
+class SceneGraph
+{
+public:
+ virtual ~SceneGraph(){}
+ virtual bool isVisible() const = 0;
+ virtual void update() = 0;
+ virtual void draw() const = 0;
+ //virtual bool isDisposable() const = 0;
+
+};
+
+}
+
+#endif
-#pragma once\r
-#include "mof/Window.h"\r
-#include <vector>\r
-\r
-namespace mof{\r
- \r
- class SelectionModel {\r
- \r
- mof::AnimationResource m_pMenuAnimation;\r
- std::vector<mof::Window*> m_selectables;\r
- int m_selectingIndex;\r
- int m_nColumns;\r
- public:\r
- SelectionModel( std::vector<mof::Window*>& selectables , mof::AnimationResource& pOpenedAnimation , int nColumn = 1);\r
- ~SelectionModel();\r
-\r
-\r
- void next();\r
- void previous();\r
-\r
- void up();\r
- void down();\r
- void left();\r
- void right();\r
-\r
- int getSelectingIndex();\r
- Window* getSelectingItem();\r
- void setMenuAnimation(mof::AnimationResource& pMenuAnimation);\r
- \r
-\r
- \r
- };\r
-\r
+#pragma once
+#include "mof/Window.h"
+#include <vector>
+
+namespace mof{
+
+ class SelectionModel {
+
+ mof::AnimationResource m_pMenuAnimation;
+ std::vector<mof::Window*> m_selectables;
+ int m_selectingIndex;
+ int m_nColumns;
+ public:
+ SelectionModel( std::vector<mof::Window*>& selectables , mof::AnimationResource& pOpenedAnimation , int nColumn = 1);
+ ~SelectionModel();
+
+
+ void next();
+ void previous();
+
+ void up();
+ void down();
+ void left();
+ void right();
+
+ int getSelectingIndex();
+ Window* getSelectingItem();
+ void setMenuAnimation(mof::AnimationResource& pMenuAnimation);
+
+
+
+ };
+
};
\ No newline at end of file
-#include "mof/Sprite.hpp"\r
-#include "mof/private/GraphicsDeviceImpl.hpp"\r
-#include "mof/stream/Constant.hpp"\r
-#include "mof/ConsoleIO.hpp"\r
-#include "mof/Font.hpp"\r
-\r
-namespace mof\r
-{\r
- struct Sprite::Impl{\r
- std::shared_ptr<Texture> pTexture;\r
- mof::Vector2D preferred_size_;\r
- bool visible_;\r
-\r
- Impl()\r
- : visible_(true)\r
- {\r
- }\r
-\r
- ~Impl(){\r
- }\r
- };\r
-\r
- Sprite::Sprite\r
- (\r
- const Rectangle<int>& rect ,\r
- const std::shared_ptr<Texture>& pTexture , \r
- const Rectangle<float>& tRect \r
- )\r
- : \r
- m_pImpl( new Impl( ) ) ,\r
- Component2D( rect ) ,\r
- TextureComponent( tRect ) \r
- {\r
- m_pImpl->pTexture = pTexture;\r
- m_pImpl->preferred_size_ = mof::Vector2D(rect.getWidth(), rect.getHeight());\r
- }\r
-\r
-\r
- Sprite::Sprite\r
- (\r
- const std::shared_ptr<Texture>& pTexture , \r
- const Rectangle<float>& tRect \r
- )\r
- : \r
- m_pImpl(new Impl()) ,\r
- Component2D( Rectangle<int>( 0 , 0 , pTexture->getWidth() , pTexture->getHeight() ) ) ,\r
- TextureComponent( tRect ) \r
- {\r
- m_pImpl->pTexture = pTexture;\r
- m_pImpl->preferred_size_ = mof::Vector2D(pTexture->getWidth(), pTexture->getHeight());\r
- }\r
-\r
-\r
- Sprite::~Sprite()\r
- {\r
- } \r
-\r
- void Sprite::update()\r
- {\r
- m_textureStream.update();\r
- m_colorStream.update();\r
- m_sizeStream.update();\r
- m_positionStream.update();\r
- }\r
-\r
- void Sprite::setVisible(bool visible)\r
- {\r
- m_pImpl->visible_ = visible;\r
- }\r
-\r
- void Sprite::draw() const\r
- {\r
- if (!m_pImpl->visible_) return;\r
- static VertexXYZRHWCUV vertices[4];\r
- \r
- Rectangle<float> textureCoordinates = m_textureStream.value( );\r
- Color color = m_colorStream.value( ).toColorCode( );\r
- \r
- Vector2D position = m_positionStream.value( );\r
- Vector2D size = m_sizeStream.value( );\r
- Vector2D begin = Vector2D( position.x , position.y );\r
- Vector2D end = begin + Vector2D( size.x , size.y );\r
- \r
- vertices[0].x = begin.x -0.5f;\r
- vertices[0].y = begin.y -0.5f;\r
- vertices[0].z = 0;\r
- vertices[0].rhw = 1;\r
- vertices[0].color = color;\r
- vertices[0].tu = textureCoordinates.beginX;\r
- vertices[0].tv = textureCoordinates.beginY;\r
-\r
- vertices[1].x = end.x -0.5f;\r
- vertices[1].y = begin.y -0.5f;\r
- vertices[1].z = 0;\r
- vertices[1].rhw = 1;\r
- vertices[1].color = color;\r
- vertices[1].tu = textureCoordinates.endX;\r
- vertices[1].tv = textureCoordinates.beginY;\r
-\r
- vertices[2].x = begin.x -0.5f;\r
- vertices[2].y = end.y -0.5f;\r
- vertices[2].z = 0;\r
- vertices[2].rhw = 1;\r
- vertices[2].color = color;\r
- vertices[2].tu = textureCoordinates.beginX;\r
- vertices[2].tv = textureCoordinates.endY;\r
-\r
- vertices[3].x = end.x -0.5f;\r
- vertices[3].y = end.y -0.5f;\r
- vertices[3].z = 0;\r
- vertices[3].rhw = 1;\r
- vertices[3].color = color;\r
- vertices[3].tu = textureCoordinates.endX;\r
- vertices[3].tv = textureCoordinates.endY;\r
-\r
- GraphicsDevice::setTexture(m_pImpl->pTexture.get());\r
- GraphicsDevice::drawVertexArray(vertices[0] , vertices[3] , PRIMITIVE_TYPE_TRIANGLESTRIP);\r
- \r
- }\r
-\r
- void Sprite::setPositionStream( const Vector2DStream& stream )\r
- {\r
- m_positionStream = stream;\r
- }\r
- \r
- void Sprite::setSizeStream( const Vector2DStream& stream )\r
- {\r
- m_sizeStream = stream;\r
- }\r
- \r
- void Sprite::setColorStream( const ColorStream& stream )\r
- {\r
- m_colorStream = stream;\r
- }\r
-\r
-\r
- mof::Vector2D Sprite::getPreferredSize() const\r
- {\r
- return m_pImpl->preferred_size_;\r
- }\r
-\r
- void Sprite::append\r
- (\r
- std::vector<VertexXYZRHWCUV>& list ,\r
- const Rectangle<float>& region , \r
- Color color , \r
- const Rectangle<float>& textureCoordinates\r
- )\r
- {\r
- list.push_back\r
- (\r
- VertexXYZRHWCUV(Vector2D(region.beginX , region.beginY) , \r
- color , textureCoordinates.beginX , textureCoordinates.beginY)\r
- );\r
-\r
- list.push_back\r
- (\r
- VertexXYZRHWCUV(Vector2D(region.endX , region.beginY) , \r
- color , textureCoordinates.endX , textureCoordinates.beginY)\r
- );\r
-\r
- list.push_back\r
- (\r
- VertexXYZRHWCUV(Vector2D(region.beginX , region.endY) , \r
- color , textureCoordinates.beginX , textureCoordinates.endY)\r
- );\r
-\r
- list.push_back\r
- (\r
- VertexXYZRHWCUV(Vector2D(region.beginX , region.endY) , \r
- color , textureCoordinates.beginX , textureCoordinates.endY)\r
- );\r
-\r
- list.push_back\r
- (\r
- VertexXYZRHWCUV(Vector2D(region.endX , region.beginY) , \r
- color , textureCoordinates.endX , textureCoordinates.beginY)\r
- );\r
-\r
-\r
- list.push_back\r
- (\r
- VertexXYZRHWCUV(Vector2D(region.endX , region.endY) , \r
- color , textureCoordinates.endX , textureCoordinates.endY)\r
- );\r
-\r
- }\r
-\r
- Sprite* Sprite::createTextSprite( const Font& font , const tstring& text)\r
- {\r
- std::shared_ptr<PixelMap> pPixelMap( font.createText(text) );\r
- std::shared_ptr<Texture> pTexture(new Texture( pPixelMap));\r
-\r
- return new Sprite\r
- (\r
- Rectangle<int>( 0 , 0 , pPixelMap->shape()[0] , pPixelMap->shape()[1]) ,\r
- pTexture ,\r
- Rectangle<real>\r
- (\r
- 0 , 0 , \r
- static_cast<real>(pPixelMap->shape()[0]) / pTexture->getWidth() ,\r
- static_cast<real>(pPixelMap->shape()[1]) / pTexture->getHeight() \r
- )\r
- );\r
-\r
- }\r
-\r
-\r
-} // namespace mof\r
-\r
-\r
-\r
+#include "mof/Sprite.hpp"
+#include "mof/private/GraphicsDeviceImpl.hpp"
+#include "mof/stream/Constant.hpp"
+#include "mof/ConsoleIO.hpp"
+#include "mof/Font.hpp"
+
+namespace mof
+{
+ struct Sprite::Impl{
+ std::shared_ptr<Texture> pTexture;
+ mof::Vector2D preferred_size_;
+ bool visible_;
+
+ Impl()
+ : visible_(true)
+ {
+ }
+
+ ~Impl(){
+ }
+ };
+
+ Sprite::Sprite
+ (
+ const Rectangle<int>& rect ,
+ const std::shared_ptr<Texture>& pTexture ,
+ const Rectangle<float>& tRect
+ )
+ :
+ m_pImpl( new Impl( ) ) ,
+ Component2D( rect ) ,
+ TextureComponent( tRect )
+ {
+ m_pImpl->pTexture = pTexture;
+ m_pImpl->preferred_size_ = mof::Vector2D(rect.getWidth(), rect.getHeight());
+ }
+
+
+ Sprite::Sprite
+ (
+ const std::shared_ptr<Texture>& pTexture ,
+ const Rectangle<float>& tRect
+ )
+ :
+ m_pImpl(new Impl()) ,
+ Component2D( Rectangle<int>( 0 , 0 , pTexture->getWidth() , pTexture->getHeight() ) ) ,
+ TextureComponent( tRect )
+ {
+ m_pImpl->pTexture = pTexture;
+ m_pImpl->preferred_size_ = mof::Vector2D(pTexture->getWidth(), pTexture->getHeight());
+ }
+
+
+ Sprite::~Sprite()
+ {
+ }
+
+ void Sprite::update()
+ {
+ m_textureStream.update();
+ m_colorStream.update();
+ m_sizeStream.update();
+ m_positionStream.update();
+ }
+
+ void Sprite::setVisible(bool visible)
+ {
+ m_pImpl->visible_ = visible;
+ }
+
+ void Sprite::draw() const
+ {
+ if (!m_pImpl->visible_) return;
+ static VertexXYZRHWCUV vertices[4];
+
+ Rectangle<float> textureCoordinates = m_textureStream.value( );
+ Color color = m_colorStream.value( ).toColorCode( );
+
+ Vector2D position = m_positionStream.value( );
+ Vector2D size = m_sizeStream.value( );
+ Vector2D begin = Vector2D( position.x , position.y );
+ Vector2D end = begin + Vector2D( size.x , size.y );
+
+ vertices[0].x = begin.x -0.5f;
+ vertices[0].y = begin.y -0.5f;
+ vertices[0].z = 0;
+ vertices[0].rhw = 1;
+ vertices[0].color = color;
+ vertices[0].tu = textureCoordinates.beginX;
+ vertices[0].tv = textureCoordinates.beginY;
+
+ vertices[1].x = end.x -0.5f;
+ vertices[1].y = begin.y -0.5f;
+ vertices[1].z = 0;
+ vertices[1].rhw = 1;
+ vertices[1].color = color;
+ vertices[1].tu = textureCoordinates.endX;
+ vertices[1].tv = textureCoordinates.beginY;
+
+ vertices[2].x = begin.x -0.5f;
+ vertices[2].y = end.y -0.5f;
+ vertices[2].z = 0;
+ vertices[2].rhw = 1;
+ vertices[2].color = color;
+ vertices[2].tu = textureCoordinates.beginX;
+ vertices[2].tv = textureCoordinates.endY;
+
+ vertices[3].x = end.x -0.5f;
+ vertices[3].y = end.y -0.5f;
+ vertices[3].z = 0;
+ vertices[3].rhw = 1;
+ vertices[3].color = color;
+ vertices[3].tu = textureCoordinates.endX;
+ vertices[3].tv = textureCoordinates.endY;
+
+ GraphicsDevice::setTexture(m_pImpl->pTexture.get());
+ GraphicsDevice::drawVertexArray(vertices[0] , vertices[3] , PRIMITIVE_TYPE_TRIANGLESTRIP);
+
+ }
+
+ void Sprite::setPositionStream( const Vector2DStream& stream )
+ {
+ m_positionStream = stream;
+ }
+
+ void Sprite::setSizeStream( const Vector2DStream& stream )
+ {
+ m_sizeStream = stream;
+ }
+
+ void Sprite::setColorStream( const ColorStream& stream )
+ {
+ m_colorStream = stream;
+ }
+
+
+ mof::Vector2D Sprite::getPreferredSize() const
+ {
+ return m_pImpl->preferred_size_;
+ }
+
+ void Sprite::append
+ (
+ std::vector<VertexXYZRHWCUV>& list ,
+ const Rectangle<float>& region ,
+ Color color ,
+ const Rectangle<float>& textureCoordinates
+ )
+ {
+ list.push_back
+ (
+ VertexXYZRHWCUV(Vector2D(region.beginX , region.beginY) ,
+ color , textureCoordinates.beginX , textureCoordinates.beginY)
+ );
+
+ list.push_back
+ (
+ VertexXYZRHWCUV(Vector2D(region.endX , region.beginY) ,
+ color , textureCoordinates.endX , textureCoordinates.beginY)
+ );
+
+ list.push_back
+ (
+ VertexXYZRHWCUV(Vector2D(region.beginX , region.endY) ,
+ color , textureCoordinates.beginX , textureCoordinates.endY)
+ );
+
+ list.push_back
+ (
+ VertexXYZRHWCUV(Vector2D(region.beginX , region.endY) ,
+ color , textureCoordinates.beginX , textureCoordinates.endY)
+ );
+
+ list.push_back
+ (
+ VertexXYZRHWCUV(Vector2D(region.endX , region.beginY) ,
+ color , textureCoordinates.endX , textureCoordinates.beginY)
+ );
+
+
+ list.push_back
+ (
+ VertexXYZRHWCUV(Vector2D(region.endX , region.endY) ,
+ color , textureCoordinates.endX , textureCoordinates.endY)
+ );
+
+ }
+
+ Sprite* Sprite::createTextSprite( const Font& font , const tstring& text)
+ {
+ std::shared_ptr<PixelMap> pPixelMap( font.createText(text) );
+ std::shared_ptr<Texture> pTexture(new Texture( pPixelMap));
+
+ return new Sprite
+ (
+ Rectangle<int>( 0 , 0 , pPixelMap->shape()[0] , pPixelMap->shape()[1]) ,
+ pTexture ,
+ Rectangle<real>
+ (
+ 0 , 0 ,
+ static_cast<real>(pPixelMap->shape()[0]) / pTexture->getWidth() ,
+ static_cast<real>(pPixelMap->shape()[1]) / pTexture->getHeight()
+ )
+ );
+
+ }
+
+
+} // namespace mof
+
+
+
-#pragma once\r
-#include "mof/Rectangle.hpp"\r
-#include <memory>\r
-#include "mof/Texture.hpp"\r
-#include "mof/VertexTypes.hpp"\r
-#include "mof/stream/Manipulator.hpp"\r
-#include "mof/Matrix2D.hpp"\r
-#include "mof/Component2D.hpp"\r
-#include "mof/ColorComponent.hpp"\r
-#include "mof/TextureComponent.hpp"\r
-#include "mof/Drawable.hpp"\r
-#include <vector>\r
-\r
-\r
-namespace mof{\r
- \r
- class Font;\r
-\r
- class Sprite\r
- : \r
- public Component2D ,\r
- public ColorComponent ,\r
- public TextureComponent ,\r
- public Drawable\r
- {\r
-\r
- public : \r
- typedef std::shared_ptr<Sprite> ptr;\r
-\r
- Sprite\r
- (\r
- const Rectangle<int>& rect ,\r
- const std::shared_ptr<Texture>& pTexture ,\r
- const Rectangle<real>& tRect\r
- );\r
-\r
- Sprite\r
- (\r
- const std::shared_ptr<Texture>& pTexture ,\r
- const Rectangle<real>& tRect\r
- );\r
-\r
- virtual ~Sprite();\r
- virtual void update();\r
- virtual void draw() const;\r
- virtual void setVisible(bool visible);\r
- virtual void setPositionStream( const Vector2DStream& stream );\r
- virtual void setSizeStream( const Vector2DStream& stream );\r
- virtual void setColorStream( const ColorStream& stream );\r
- mof::Vector2D getPreferredSize() const;\r
-\r
-\r
-\r
- static void append\r
- (\r
- std::vector<VertexXYZRHWCUV>& list ,\r
- const Rectangle<float>& region , \r
- Color color ,\r
- const Rectangle<real>& textureCoordinates\r
- );\r
-\r
- static Sprite* createTextSprite\r
- (\r
- const Font& font , \r
- const tstring& text\r
- );\r
- private:\r
- struct Impl;\r
- boost::scoped_ptr<Impl> m_pImpl;\r
- };\r
-\r
-\r
-} // namespace mof\r
+#pragma once
+#include "mof/Rectangle.hpp"
+#include <memory>
+#include "mof/Texture.hpp"
+#include "mof/VertexTypes.hpp"
+#include "mof/stream/Manipulator.hpp"
+#include "mof/Matrix2D.hpp"
+#include "mof/Component2D.hpp"
+#include "mof/ColorComponent.hpp"
+#include "mof/TextureComponent.hpp"
+#include "mof/Drawable.hpp"
+#include <vector>
+
+
+namespace mof{
+
+ class Font;
+
+ class Sprite
+ :
+ public Component2D ,
+ public ColorComponent ,
+ public TextureComponent ,
+ public Drawable
+ {
+
+ public :
+ typedef std::shared_ptr<Sprite> ptr;
+
+ Sprite
+ (
+ const Rectangle<int>& rect ,
+ const std::shared_ptr<Texture>& pTexture ,
+ const Rectangle<real>& tRect
+ );
+
+ Sprite
+ (
+ const std::shared_ptr<Texture>& pTexture ,
+ const Rectangle<real>& tRect
+ );
+
+ virtual ~Sprite();
+ virtual void update();
+ virtual void draw() const;
+ virtual void setVisible(bool visible);
+ virtual void setPositionStream( const Vector2DStream& stream );
+ virtual void setSizeStream( const Vector2DStream& stream );
+ virtual void setColorStream( const ColorStream& stream );
+ mof::Vector2D getPreferredSize() const;
+
+
+
+ static void append
+ (
+ std::vector<VertexXYZRHWCUV>& list ,
+ const Rectangle<float>& region ,
+ Color color ,
+ const Rectangle<real>& textureCoordinates
+ );
+
+ static Sprite* createTextSprite
+ (
+ const Font& font ,
+ const tstring& text
+ );
+ private:
+ struct Impl;
+ boost::scoped_ptr<Impl> m_pImpl;
+ };
+
+
+} // namespace mof
-#include "mof/TextView.hpp"\r
-#include "mof/MenuItemInfo.hpp"\r
-#include "mof/Sprite.hpp"\r
-#include "mof/Effect.hpp"\r
-#include "mof/Frame.hpp"\r
-#include "mof/mofAnimations.hpp"\r
-#include "mof/utilities.hpp"\r
-\r
-namespace mof\r
-{\r
- struct TextView::Impl\r
- {\r
- mof::Font font;\r
- mof::tstring caption;\r
- mof::Effect* pEffect;\r
- mof::Vector2D scaling;\r
- mof::Frame* pFrame;\r
-\r
- Impl(const mof::tstring& _caption , const mof::Font& _font)\r
- : font(_font) , caption(_caption) , pEffect(NULL) , pFrame( NULL )\r
- {\r
-\r
- }\r
-\r
-\r
- ~Impl(){\r
- delete pEffect;\r
- }\r
- };\r
-//{{{ TextView\r
- TextView::TextView(const mof::tstring& caption , const mof::Font& font)\r
- : m_pImpl(new Impl(caption , font))\r
- {\r
- m_pImpl->pEffect = new mof::Effect();\r
- }\r
-//}}}\r
-//{{{ ~TextView \r
- TextView::~TextView( )\r
- {\r
- }\r
-//}}}\r
-//{{{ initialize\r
- mof::Rectangle<int> TextView::initialize( )\r
- {\r
-\r
- \r
- mof::Sprite* pSprite = mof::Sprite::createTextSprite\r
- (\r
- m_pImpl->font , m_pImpl->caption\r
- );\r
-\r
- m_pImpl->pEffect->addSprite(_T("text") , pSprite);\r
- m_pImpl->scaling = pSprite->getWorldTransform().mof::Matrix2D::getDiagonal();\r
-\r
- {\r
- //color\r
- pSprite->setColor( mof::makeConstantHandler(mof::Color4f(0 , 1 , 1 , 1)) );\r
- }\r
- mof::Rectangle<int> bounds = pSprite->getWorldTransform().toBoundingBox();\r
- \r
- std::shared_ptr<mof::Texture> pTexture(new mof::Texture( _T("image/frame3.png") ));\r
- m_pImpl->pFrame = new mof::Frame( pTexture );\r
- m_pImpl->pEffect->addDrawable( _T("bg") , m_pImpl->pFrame );\r
- m_pImpl->pFrame->setRegion( mof::Rectangle<int>( 100 , 100 , 200 , 132 ) );\r
- return bounds;\r
- }\r
-//}}}\r
-//{{{ show\r
- void TextView::show( )\r
- {\r
- mof::Sprite* pText = m_pImpl->pEffect->getSpriteByName(_T("text"));\r
- {\r
- //color\r
- mof::KeyFrameAnimation<mof::Color4f>::KeyFrame keyFrames[] =\r
- {\r
- mof::makeKeyFrame( 0 , mof::Color4f(0 , 1, 1 , 1) ),\r
- mof::makeKeyFrame( 30 , mof::Color4f(1 , 1, 1 , 1) )\r
- };\r
- mof::Animation<mof::Color4f>::Handler handler\r
- (\r
- new mof::KeyFrameAnimation<mof::Color4f>\r
- (\r
- keyFrames[0] , keyFrames[1] \r
- )\r
- );\r
- pText->setColor( handler );\r
- pText->setFrameNumber( 0 );\r
- }\r
-\r
- }\r
-//}}}\r
-//{{{ close\r
- void mof::TextView::close(){\r
- mof::Sprite* pText = m_pImpl->pEffect->getSpriteByName(_T("text"));\r
- {\r
- //color\r
- mof::Sprite* pText = m_pImpl->pEffect->getSpriteByName(_T("text"));\r
- mof::KeyFrameAnimation<mof::Color4f>::KeyFrame keyFrames[] = {\r
- mof::makeKeyFrame( 0 , mof::Color4f(1 , 1, 1 , 1) ),\r
- mof::makeKeyFrame( 10 , mof::Color4f(0 , 1, 1 , 1) )\r
- };\r
- mof::Animation<mof::Color4f>::Handler handler(new mof::KeyFrameAnimation<mof::Color4f>(\r
- keyFrames[0] , keyFrames[1] \r
- ));\r
- pText->setColor( handler );\r
- pText->setFrameNumber(0);\r
- }\r
- }\r
-//}}}\r
-//{{{ focus\r
- void mof::TextView::focus( ) \r
- {\r
- }\r
-//}}}\r
-//{{{ blur\r
- void mof::TextView::blur()\r
- {\r
- }\r
-//}}}\r
-//{{{ setPosition\r
- void mof::TextView::setPosition\r
- (\r
- const mof::Animation<mof::Matrix2D>::Handler& handler \r
- ) \r
- {\r
- mof::Sprite* pText = m_pImpl->pEffect->getSpriteByName(_T("text"));\r
- mof::Animation<mof::Matrix2D>::Handler cascading[] = {\r
- mof::makeConstantHandler<mof::Matrix2D>(mof::Matrix2D::createScaling(m_pImpl->scaling)) , \r
- handler\r
- };\r
- mof::Animation<mof::Matrix2D>::Handler pAnimation(\r
- new mof::CascadingAnimation<mof::Matrix2D>(cascading[0] , cascading[1])\r
- );\r
- pText->setWorldTransform(pAnimation);\r
- /*pText->setWorldTransform(\r
- mof::cascadingHandler2(\r
- mof::Multiply<mof::Matrix2D> cascaor ,\r
- mof::makeConstantHandler<mof::Matrix2D>(mof::Matrix2D::createScaling(m_pImpl->scaling)) , \r
- handler\r
- ));*/\r
- }\r
-//}}}\r
-//{{{ setWorldTransform\r
- void mof::TextView::setWorldTransform\r
- (\r
- const mof::Animation<mof::Matrix2D>::Handler& handler \r
- ) \r
- {\r
- mof::Sprite* pText = m_pImpl->pEffect->getSpriteByName(_T("text"));\r
- pText->setWorldTransform( handler );\r
- \r
- }\r
-//}}}\r
-//{{{ setBounds\r
- void mof::TextView::setBounds( const mof::Rectangle<int>& bounds )\r
- {\r
- mof::Sprite* pText = m_pImpl->pEffect->getSpriteByName(_T("text"));\r
- //m_pImpl->scaling = mof::Vector2D( bounds.endX - bounds.beginX , bounds.endY - bounds.beginY );\r
- mof::Vector2D translation( bounds.beginX , bounds.beginY );\r
- mof::Animation<mof::Matrix2D>::Handler cascading[] = \r
- {\r
- mof::makeConstantHandler( mof::Matrix2D::createScaling( m_pImpl->scaling ) ) ,\r
- mof::makeConstantHandler( mof::Matrix2D::createTranslation( translation ) ) ,\r
- };\r
- mof::Animation<mof::Matrix2D>::Handler pAnimation(\r
- new mof::CascadingAnimation<mof::Matrix2D>(cascading[0] , mof::lastOf( cascading ) )\r
- );\r
- pText->setWorldTransform(pAnimation);\r
- }\r
-//}}}\r
-//{{{ getEffect\r
- const mof::Effect* TextView::getEffect() const\r
- {\r
- return m_pImpl->pEffect;\r
- }\r
-//}}}\r
-//{{{ update\r
- void mof::TextView::update()\r
- {\r
- m_pImpl->pEffect->update();\r
-\r
- }\r
-//}}}\r
-}\r
+#include "mof/TextView.hpp"
+#include "mof/MenuItemInfo.hpp"
+#include "mof/Sprite.hpp"
+#include "mof/Effect.hpp"
+#include "mof/Frame.hpp"
+#include "mof/mofAnimations.hpp"
+#include "mof/utilities.hpp"
+
+namespace mof
+{
+ struct TextView::Impl
+ {
+ mof::Font font;
+ mof::tstring caption;
+ mof::Effect* pEffect;
+ mof::Vector2D scaling;
+ mof::Frame* pFrame;
+
+ Impl(const mof::tstring& _caption , const mof::Font& _font)
+ : font(_font) , caption(_caption) , pEffect(NULL) , pFrame( NULL )
+ {
+
+ }
+
+
+ ~Impl(){
+ delete pEffect;
+ }
+ };
+//{{{ TextView
+ TextView::TextView(const mof::tstring& caption , const mof::Font& font)
+ : m_pImpl(new Impl(caption , font))
+ {
+ m_pImpl->pEffect = new mof::Effect();
+ }
+//}}}
+//{{{ ~TextView
+ TextView::~TextView( )
+ {
+ }
+//}}}
+//{{{ initialize
+ mof::Rectangle<int> TextView::initialize( )
+ {
+
+
+ mof::Sprite* pSprite = mof::Sprite::createTextSprite
+ (
+ m_pImpl->font , m_pImpl->caption
+ );
+
+ m_pImpl->pEffect->addSprite(_T("text") , pSprite);
+ m_pImpl->scaling = pSprite->getWorldTransform().mof::Matrix2D::getDiagonal();
+
+ {
+ //color
+ pSprite->setColor( mof::makeConstantHandler(mof::Color4f(0 , 1 , 1 , 1)) );
+ }
+ mof::Rectangle<int> bounds = pSprite->getWorldTransform().toBoundingBox();
+
+ std::shared_ptr<mof::Texture> pTexture(new mof::Texture( _T("image/frame3.png") ));
+ m_pImpl->pFrame = new mof::Frame( pTexture );
+ m_pImpl->pEffect->addDrawable( _T("bg") , m_pImpl->pFrame );
+ m_pImpl->pFrame->setRegion( mof::Rectangle<int>( 100 , 100 , 200 , 132 ) );
+ return bounds;
+ }
+//}}}
+//{{{ show
+ void TextView::show( )
+ {
+ mof::Sprite* pText = m_pImpl->pEffect->getSpriteByName(_T("text"));
+ {
+ //color
+ mof::KeyFrameAnimation<mof::Color4f>::KeyFrame keyFrames[] =
+ {
+ mof::makeKeyFrame( 0 , mof::Color4f(0 , 1, 1 , 1) ),
+ mof::makeKeyFrame( 30 , mof::Color4f(1 , 1, 1 , 1) )
+ };
+ mof::Animation<mof::Color4f>::Handler handler
+ (
+ new mof::KeyFrameAnimation<mof::Color4f>
+ (
+ keyFrames[0] , keyFrames[1]
+ )
+ );
+ pText->setColor( handler );
+ pText->setFrameNumber( 0 );
+ }
+
+ }
+//}}}
+//{{{ close
+ void mof::TextView::close(){
+ mof::Sprite* pText = m_pImpl->pEffect->getSpriteByName(_T("text"));
+ {
+ //color
+ mof::Sprite* pText = m_pImpl->pEffect->getSpriteByName(_T("text"));
+ mof::KeyFrameAnimation<mof::Color4f>::KeyFrame keyFrames[] = {
+ mof::makeKeyFrame( 0 , mof::Color4f(1 , 1, 1 , 1) ),
+ mof::makeKeyFrame( 10 , mof::Color4f(0 , 1, 1 , 1) )
+ };
+ mof::Animation<mof::Color4f>::Handler handler(new mof::KeyFrameAnimation<mof::Color4f>(
+ keyFrames[0] , keyFrames[1]
+ ));
+ pText->setColor( handler );
+ pText->setFrameNumber(0);
+ }
+ }
+//}}}
+//{{{ focus
+ void mof::TextView::focus( )
+ {
+ }
+//}}}
+//{{{ blur
+ void mof::TextView::blur()
+ {
+ }
+//}}}
+//{{{ setPosition
+ void mof::TextView::setPosition
+ (
+ const mof::Animation<mof::Matrix2D>::Handler& handler
+ )
+ {
+ mof::Sprite* pText = m_pImpl->pEffect->getSpriteByName(_T("text"));
+ mof::Animation<mof::Matrix2D>::Handler cascading[] = {
+ mof::makeConstantHandler<mof::Matrix2D>(mof::Matrix2D::createScaling(m_pImpl->scaling)) ,
+ handler
+ };
+ mof::Animation<mof::Matrix2D>::Handler pAnimation(
+ new mof::CascadingAnimation<mof::Matrix2D>(cascading[0] , cascading[1])
+ );
+ pText->setWorldTransform(pAnimation);
+ /*pText->setWorldTransform(
+ mof::cascadingHandler2(
+ mof::Multiply<mof::Matrix2D> cascaor ,
+ mof::makeConstantHandler<mof::Matrix2D>(mof::Matrix2D::createScaling(m_pImpl->scaling)) ,
+ handler
+ ));*/
+ }
+//}}}
+//{{{ setWorldTransform
+ void mof::TextView::setWorldTransform
+ (
+ const mof::Animation<mof::Matrix2D>::Handler& handler
+ )
+ {
+ mof::Sprite* pText = m_pImpl->pEffect->getSpriteByName(_T("text"));
+ pText->setWorldTransform( handler );
+
+ }
+//}}}
+//{{{ setBounds
+ void mof::TextView::setBounds( const mof::Rectangle<int>& bounds )
+ {
+ mof::Sprite* pText = m_pImpl->pEffect->getSpriteByName(_T("text"));
+ //m_pImpl->scaling = mof::Vector2D( bounds.endX - bounds.beginX , bounds.endY - bounds.beginY );
+ mof::Vector2D translation( bounds.beginX , bounds.beginY );
+ mof::Animation<mof::Matrix2D>::Handler cascading[] =
+ {
+ mof::makeConstantHandler( mof::Matrix2D::createScaling( m_pImpl->scaling ) ) ,
+ mof::makeConstantHandler( mof::Matrix2D::createTranslation( translation ) ) ,
+ };
+ mof::Animation<mof::Matrix2D>::Handler pAnimation(
+ new mof::CascadingAnimation<mof::Matrix2D>(cascading[0] , mof::lastOf( cascading ) )
+ );
+ pText->setWorldTransform(pAnimation);
+ }
+//}}}
+//{{{ getEffect
+ const mof::Effect* TextView::getEffect() const
+ {
+ return m_pImpl->pEffect;
+ }
+//}}}
+//{{{ update
+ void mof::TextView::update()
+ {
+ m_pImpl->pEffect->update();
+
+ }
+//}}}
+}
-#pragma once\r
-#include <boost/scoped_ptr.hpp>\r
-#include "mof/MenuView.hpp"\r
-#include "mof/tstring.hpp"\r
-#include "mof/Font.hpp"\r
-\r
-namespace mof\r
-{\r
-\r
-\r
- class TextView : public MenuView \r
- {\r
- public:\r
- TextView( const mof::tstring& caption , const mof::Font& font );\r
- virtual ~TextView();\r
- virtual mof::Rectangle<int> initialize();\r
- virtual void show();\r
- virtual void close();\r
- virtual void focus();\r
- virtual void blur();\r
- /* diprecated */\r
- virtual void setPosition\r
- (\r
- const mof::Animation<mof::Matrix2D>::Handler& handler \r
- );\r
- void setBounds( const mof::Rectangle<int>& bounds );\r
-\r
- /* candidate */\r
- virtual void setWorldTransform\r
- (\r
- const mof::Animation<mof::Matrix2D>::Handler& handler \r
- );\r
-\r
- virtual const mof::Effect* getEffect() const;\r
- virtual void update();\r
- private:\r
- struct Impl;\r
- boost::scoped_ptr<Impl> m_pImpl;\r
- \r
- };\r
-\r
-\r
-} // namespace mof\r
-\r
+#pragma once
+#include <boost/scoped_ptr.hpp>
+#include "mof/MenuView.hpp"
+#include "mof/tstring.hpp"
+#include "mof/Font.hpp"
+
+namespace mof
+{
+
+
+ class TextView : public MenuView
+ {
+ public:
+ TextView( const mof::tstring& caption , const mof::Font& font );
+ virtual ~TextView();
+ virtual mof::Rectangle<int> initialize();
+ virtual void show();
+ virtual void close();
+ virtual void focus();
+ virtual void blur();
+ /* diprecated */
+ virtual void setPosition
+ (
+ const mof::Animation<mof::Matrix2D>::Handler& handler
+ );
+ void setBounds( const mof::Rectangle<int>& bounds );
+
+ /* candidate */
+ virtual void setWorldTransform
+ (
+ const mof::Animation<mof::Matrix2D>::Handler& handler
+ );
+
+ virtual const mof::Effect* getEffect() const;
+ virtual void update();
+ private:
+ struct Impl;
+ boost::scoped_ptr<Impl> m_pImpl;
+
+ };
+
+
+} // namespace mof
+
-#include "mof/private/TextureImpl.hpp"\r
-#include "mof/ConsoleIO.hpp"\r
-#include "mof/private/FileTextureBuilder.hpp"\r
-#include "mof/private/PixelMapTextureBuilder.hpp"\r
-\r
-mof::Texture::Texture( const tstring& filename)\r
-: m_pImpl(new Impl())\r
-{\r
- m_pImpl->pTexture = mof::FileTextureBuilder( filename).create();\r
- D3DSURFACE_DESC desc;\r
- m_pImpl->pTexture->GetLevelDesc(0 , &desc);\r
- m_pImpl->width = desc.Width;\r
- m_pImpl->height = desc.Height;\r
-}\r
-\r
-mof::Texture::Texture( const std::shared_ptr<mof::PixelMap>& pPixelMap)\r
-: m_pImpl(new Impl())\r
-{\r
- m_pImpl->pTexture = mof::PixelMapTextureBuilder(pPixelMap).create();\r
- D3DSURFACE_DESC desc;\r
- m_pImpl->pTexture->GetLevelDesc(0 , &desc);\r
- m_pImpl->width = desc.Width;\r
- m_pImpl->height = desc.Height;\r
-}\r
-\r
-mof::Texture::~Texture(){}\r
-\r
-std::shared_ptr<mof::PixelMap> mof::Texture::getPixelMap(){\r
- typedef mof::PixelMap::size_type size_type;\r
- boost::array<size_type , 2> sizes = {{getWidth() , getHeight()}};\r
- \r
- std::shared_ptr<mof::PixelMap> pMap(new mof::PixelMap(sizes));\r
- D3DLOCKED_RECT rect;\r
- m_pImpl->pTexture->LockRect(0 , &rect , NULL , 0);\r
- for(int y = 0 ; y < getHeight() ; y++){ \r
- for(int x = 0 ; x < getWidth() ; x++){\r
- BYTE* pPixel = (BYTE*)rect.pBits + x * 4 + y * rect.Pitch;\r
- (*pMap)[x][y] = mof::createColor(*(pPixel + 3) , *(pPixel+2) , *(pPixel+1) , *(pPixel));\r
- }\r
- }\r
- m_pImpl->pTexture->UnlockRect(0);\r
- return pMap;\r
-}\r
-\r
-int mof::Texture::getWidth(){\r
- return m_pImpl->width;\r
-}\r
-\r
-int mof::Texture::getHeight(){\r
- return m_pImpl->height;\r
-}\r
-\r
-\r
+#include "mof/private/TextureImpl.hpp"
+#include "mof/ConsoleIO.hpp"
+#include "mof/private/FileTextureBuilder.hpp"
+#include "mof/private/PixelMapTextureBuilder.hpp"
+
+mof::Texture::Texture( const tstring& filename)
+: m_pImpl(new Impl())
+{
+ m_pImpl->pTexture = mof::FileTextureBuilder( filename).create();
+ D3DSURFACE_DESC desc;
+ m_pImpl->pTexture->GetLevelDesc(0 , &desc);
+ m_pImpl->width = desc.Width;
+ m_pImpl->height = desc.Height;
+}
+
+mof::Texture::Texture( const std::shared_ptr<mof::PixelMap>& pPixelMap)
+: m_pImpl(new Impl())
+{
+ m_pImpl->pTexture = mof::PixelMapTextureBuilder(pPixelMap).create();
+ D3DSURFACE_DESC desc;
+ m_pImpl->pTexture->GetLevelDesc(0 , &desc);
+ m_pImpl->width = desc.Width;
+ m_pImpl->height = desc.Height;
+}
+
+mof::Texture::~Texture(){}
+
+std::shared_ptr<mof::PixelMap> mof::Texture::getPixelMap(){
+ typedef mof::PixelMap::size_type size_type;
+ boost::array<size_type , 2> sizes = {{getWidth() , getHeight()}};
+
+ std::shared_ptr<mof::PixelMap> pMap(new mof::PixelMap(sizes));
+ D3DLOCKED_RECT rect;
+ m_pImpl->pTexture->LockRect(0 , &rect , NULL , 0);
+ for(int y = 0 ; y < getHeight() ; y++){
+ for(int x = 0 ; x < getWidth() ; x++){
+ BYTE* pPixel = (BYTE*)rect.pBits + x * 4 + y * rect.Pitch;
+ (*pMap)[x][y] = mof::createColor(*(pPixel + 3) , *(pPixel+2) , *(pPixel+1) , *(pPixel));
+ }
+ }
+ m_pImpl->pTexture->UnlockRect(0);
+ return pMap;
+}
+
+int mof::Texture::getWidth(){
+ return m_pImpl->width;
+}
+
+int mof::Texture::getHeight(){
+ return m_pImpl->height;
+}
+
+
-#pragma once\r
-\r
-#include "mof/PixelMap.hpp"\r
-#include <memory>\r
-#include <boost/noncopyable.hpp>\r
-#include "mof/GraphicsDevice.hpp"\r
-\r
-namespace mof{\r
- \r
- class Texture : boost::noncopyable\r
- {\r
- friend void GraphicsDevice::setTexture( const Texture* );\r
- struct Impl;\r
- std::unique_ptr<Impl> m_pImpl;\r
- \r
- public:\r
- typedef std::shared_ptr<Texture> ptr;\r
- Texture( const tstring& filename );\r
- Texture( const std::shared_ptr<mof::PixelMap>& pPixelMap);\r
- ~Texture();\r
- \r
- std::shared_ptr<mof::PixelMap> getPixelMap();\r
-\r
- int getWidth();\r
- int getHeight();\r
- \r
- };\r
-}\r
+#pragma once
+
+#include "mof/PixelMap.hpp"
+#include <memory>
+#include <boost/noncopyable.hpp>
+#include "mof/GraphicsDevice.hpp"
+
+namespace mof{
+
+ class Texture : boost::noncopyable
+ {
+ friend void GraphicsDevice::setTexture( const Texture* );
+ struct Impl;
+ std::unique_ptr<Impl> m_pImpl;
+
+ public:
+ typedef std::shared_ptr<Texture> ptr;
+ Texture( const tstring& filename );
+ Texture( const std::shared_ptr<mof::PixelMap>& pPixelMap);
+ ~Texture();
+
+ std::shared_ptr<mof::PixelMap> getPixelMap();
+
+ int getWidth();
+ int getHeight();
+
+ };
+}
-#pragma once\r
-#include "mof/stream/utilities.hpp"\r
-\r
-namespace mof\r
-{\r
-\r
- class TextureComponent\r
- {\r
- public:\r
- virtual ~TextureComponent( ){}\r
-\r
- virtual void setRectangleCoordinatesStream( const RectangleStream& stream )\r
- {\r
- m_textureStream = stream;\r
- }\r
-\r
- virtual const RectangleStream& getRectangleCoordinatesStream( ) const\r
- {\r
- return m_textureStream;\r
- }\r
- \r
- virtual RectangleStream& getRectangleCoordinatesStream( ) \r
- {\r
- return m_textureStream;\r
- }\r
-\r
-\r
- protected:\r
- RectangleStream m_textureStream;\r
-\r
- TextureComponent( )\r
- : \r
- m_textureStream( makeConstantHandler( Rectangle< real >( 0 , 0 , 1 , 1 ) ) ) \r
- {\r
- }\r
-\r
- TextureComponent( const Rectangle< real >& rect )\r
- : \r
- m_textureStream( makeConstantHandler( rect ) ) \r
- {\r
- }\r
-\r
- TextureComponent( const RectangleStream& stream )\r
- : \r
- m_textureStream( stream ) \r
- {\r
- }\r
-\r
- };\r
-\r
-} // namespace mof\r
+#pragma once
+#include "mof/stream/utilities.hpp"
+
+namespace mof
+{
+
+ class TextureComponent
+ {
+ public:
+ virtual ~TextureComponent( ){}
+
+ virtual void setRectangleCoordinatesStream( const RectangleStream& stream )
+ {
+ m_textureStream = stream;
+ }
+
+ virtual const RectangleStream& getRectangleCoordinatesStream( ) const
+ {
+ return m_textureStream;
+ }
+
+ virtual RectangleStream& getRectangleCoordinatesStream( )
+ {
+ return m_textureStream;
+ }
+
+
+ protected:
+ RectangleStream m_textureStream;
+
+ TextureComponent( )
+ :
+ m_textureStream( makeConstantHandler( Rectangle< real >( 0 , 0 , 1 , 1 ) ) )
+ {
+ }
+
+ TextureComponent( const Rectangle< real >& rect )
+ :
+ m_textureStream( makeConstantHandler( rect ) )
+ {
+ }
+
+ TextureComponent( const RectangleStream& stream )
+ :
+ m_textureStream( stream )
+ {
+ }
+
+ };
+
+} // namespace mof
-#pragma once\r
-\r
-#include "mof/ResourceManager.h"\r
-#include "mof/Texture.h"\r
-#include "mof/Animation.h"\r
-//#include "mof/MultipleAnimation.h"\r
-#include <boost/shared_ptr.hpp>\r
-\r
-namespace mof{\r
- typedef boost::shared_ptr<mof::Texture> TextureResource;\r
- typedef mof::ResourceManager<mof::Texture> TextureManager;\r
-\r
- \r
- \r
- //typedef boost::shared_ptr<mof::MultipleAnimation> MultipleAnimation;\r
-\r
-\r
+#pragma once
+
+#include "mof/ResourceManager.h"
+#include "mof/Texture.h"
+#include "mof/Animation.h"
+//#include "mof/MultipleAnimation.h"
+#include <boost/shared_ptr.hpp>
+
+namespace mof{
+ typedef boost::shared_ptr<mof::Texture> TextureResource;
+ typedef mof::ResourceManager<mof::Texture> TextureManager;
+
+
+
+ //typedef boost::shared_ptr<mof::MultipleAnimation> MultipleAnimation;
+
+
};
\ No newline at end of file
-#include "mof/Timer.hpp"\r
-#include <windows.h>\r
-\r
-bool mof::Timer::initialized = false;\r
-\r
-\r
-\r
-mof::Timer::Timer() : m_startTime(timeGetTime()){\r
- if(!initialized){\r
- TIMECAPS caps;\r
- timeGetDevCaps(&caps, sizeof(TIMECAPS)); \r
- timeBeginPeriod(caps.wPeriodMin);//\8dÅ\8d\82\90«\94\\82Å\8cv\91ª\r
- initialized = true;\r
- }\r
-}\r
-\r
-void mof::Timer::reset(){\r
- m_startTime = timeGetTime();\r
-}\r
-\r
-int mof::Timer::getTime() const{\r
- return timeGetTime() - m_startTime;\r
-}\r
-\r
-unsigned long mof::Timer::getSystemTime()\r
-{\r
- return timeGetTime();\r
-}\r
-\r
-/*\r
-//-----------------------------------------------\r
-// Clock::Clock\r
-// \r
-//-----------------------------------------------\r
-mof::Clock::Clock()\r
-\r
-{\r
- \r
- m_begintime = 0;\r
- \r
-\r
-}\r
-\r
-//-----------------------------------------------\r
-// Clock::SetTimer\r
-// \r
-//-----------------------------------------------\r
-void mof::Clock::setTimer(){\r
- \r
- m_begintime = timeGetTime();\r
- \r
-\r
-}\r
-\r
-\r
-//-----------------------------------------------\r
-// Clock::GetBetweenTime\r
-// \r
-//-----------------------------------------------\r
-DWORD mof::Clock::getBetweenTime(){\r
- DWORD temp_time = m_begintime;\r
- m_begintime = timeGetTime(); \r
- return m_begintime - temp_time;\r
-\r
-}\r
-\r
-\r
-\r
-// void StopTimer();\r
-// DWORD GetAvgTime();\r
-\r
-\r
-//-----------------------------------------------\r
-// Clock::GetFPS\r
-// \82 \82é\83t\83\8c\81[\83\80\90\94\82É\82©\82©\82Á\82½\8e\9e\8aÔ\82©\82ç\81AFPS\82ð\8eZ\8fo\82·\82é\r
-//-----------------------------------------------\r
-float mof::Clock::getFPS(DWORD in_time , UINT in_cnt_frame){\r
- if(in_time == 0)return 0.0f;//\82O\82Å\8f\9c\8eZ\82ð\89ñ\94ð\r
- return (float)in_cnt_frame / (float)in_time * 1000.0f;\r
-\r
-}*/\r
+#include "mof/Timer.hpp"
+#include <windows.h>
+
+bool mof::Timer::initialized = false;
+
+
+
+mof::Timer::Timer() : m_startTime(timeGetTime()){
+ if(!initialized){
+ TIMECAPS caps;
+ timeGetDevCaps(&caps, sizeof(TIMECAPS));
+ timeBeginPeriod(caps.wPeriodMin);//\8dÅ\8d\82\90«\94\\82Å\8cv\91ª
+ initialized = true;
+ }
+}
+
+void mof::Timer::reset(){
+ m_startTime = timeGetTime();
+}
+
+int mof::Timer::getTime() const{
+ return timeGetTime() - m_startTime;
+}
+
+unsigned long mof::Timer::getSystemTime()
+{
+ return timeGetTime();
+}
+
+/*
+//-----------------------------------------------
+// Clock::Clock
+//
+//-----------------------------------------------
+mof::Clock::Clock()
+
+{
+
+ m_begintime = 0;
+
+
+}
+
+//-----------------------------------------------
+// Clock::SetTimer
+//
+//-----------------------------------------------
+void mof::Clock::setTimer(){
+
+ m_begintime = timeGetTime();
+
+
+}
+
+
+//-----------------------------------------------
+// Clock::GetBetweenTime
+//
+//-----------------------------------------------
+DWORD mof::Clock::getBetweenTime(){
+ DWORD temp_time = m_begintime;
+ m_begintime = timeGetTime();
+ return m_begintime - temp_time;
+
+}
+
+
+
+// void StopTimer();
+// DWORD GetAvgTime();
+
+
+//-----------------------------------------------
+// Clock::GetFPS
+// \82 \82é\83t\83\8c\81[\83\80\90\94\82É\82©\82©\82Á\82½\8e\9e\8aÔ\82©\82ç\81AFPS\82ð\8eZ\8fo\82·\82é
+//-----------------------------------------------
+float mof::Clock::getFPS(DWORD in_time , UINT in_cnt_frame){
+ if(in_time == 0)return 0.0f;//\82O\82Å\8f\9c\8eZ\82ð\89ñ\94ð
+ return (float)in_cnt_frame / (float)in_time * 1000.0f;
+
+}*/
-#ifndef TIMER_HPP\r
-#define TIMER_HPP\r
-\r
-#pragma comment(lib , "winmm.lib")\r
-\r
-namespace mof{\r
-\r
-\r
-class Timer{\r
- int m_startTime;\r
- static bool initialized;\r
-public:\r
- Timer();\r
-\r
- void reset();\r
- int getTime() const;\r
- static unsigned long getSystemTime();\r
-\r
-};\r
-\r
-}\r
-\r
-#endif\r
+#ifndef TIMER_HPP
+#define TIMER_HPP
+
+#pragma comment(lib , "winmm.lib")
+
+namespace mof{
+
+
+class Timer{
+ int m_startTime;
+ static bool initialized;
+public:
+ Timer();
+
+ void reset();
+ int getTime() const;
+ static unsigned long getSystemTime();
+
+};
+
+}
+
+#endif
-\r
-#include "mof/Vector2D.hpp"\r
-\r
-mof::Vector2D::Vector2D(real x_ , real y_)\r
-: x(x_) , y(y_)\r
-{}\r
-\r
-mof::Vector2D::Vector2D(int x_ , int y_)\r
-: x(mof::int2real(x_)) , y(mof::int2real(y_))\r
-{}\r
-\r
-\r
-mof::Vector2D::Vector2D(){\r
- x = y = 0;\r
-}\r
-\r
-mof::Vector2D::~Vector2D(void)\r
-{\r
-}\r
-\r
-\r
-bool mof::Vector2D::operator == (const mof::Vector2D& obj) const{\r
- if(x == obj.x && y == obj.y)return true;\r
- else return false;\r
-}\r
-\r
-bool mof::Vector2D::operator != (const mof::Vector2D& obj) const{\r
- return !(*this == obj);\r
-}\r
- \r
-mof::Vector2D mof::Vector2D::operator - () const{\r
- return mof::Vector2D( -x , -y);\r
-}\r
- \r
-\r
-\r
-mof::Vector2D mof::Vector2D::operator +( const mof::Vector2D& rhs) const{\r
- return mof::Vector2D(this->x + rhs.x , this->y + rhs.y);\r
-}\r
-\r
-\r
-mof::Vector2D mof::Vector2D::operator -( const mof::Vector2D& rhs) const{\r
- return mof::Vector2D(this->x - rhs.x , this->y - rhs.y);\r
-}\r
- \r
-mof::Vector2D mof::Vector2D::operator *(float rhs) const{\r
- return mof::Vector2D(this->x * rhs , this->y * rhs);\r
-}\r
-\r
-\r
-mof::Vector2D mof::Vector2D::operator /(float rhs) const{\r
- return mof::Vector2D(this->x / rhs , this->y / rhs);\r
-}\r
-\r
-\r
-mof::Vector2D mof::operator *(const mof::Vector2D& vec , float f){\r
- mof::Vector2D obj;\r
- obj.x = vec.x * f;\r
- obj.y = vec.y * f;\r
- return obj;\r
-}\r
- \r
-mof::Vector2D mof::operator *(float f , const mof::Vector2D& vec ){\r
- mof::Vector2D obj;\r
- obj.x = vec.x * f;\r
- obj.y = vec.y * f;\r
- return obj;\r
-}\r
-\r
-std::ostream& mof::operator <<(std::ostream& os , const mof::Vector2D& obj)\r
-{\r
- os << '(' << obj.x << ',' << obj.y << ')';\r
- return os; \r
-}\r
-\r
+
+#include "mof/Vector2D.hpp"
+
+mof::Vector2D::Vector2D(real x_ , real y_)
+: x(x_) , y(y_)
+{}
+
+mof::Vector2D::Vector2D(int x_ , int y_)
+: x(mof::int2real(x_)) , y(mof::int2real(y_))
+{}
+
+
+mof::Vector2D::Vector2D(){
+ x = y = 0;
+}
+
+mof::Vector2D::~Vector2D(void)
+{
+}
+
+
+bool mof::Vector2D::operator == (const mof::Vector2D& obj) const{
+ if(x == obj.x && y == obj.y)return true;
+ else return false;
+}
+
+bool mof::Vector2D::operator != (const mof::Vector2D& obj) const{
+ return !(*this == obj);
+}
+
+mof::Vector2D mof::Vector2D::operator - () const{
+ return mof::Vector2D( -x , -y);
+}
+
+
+
+mof::Vector2D mof::Vector2D::operator +( const mof::Vector2D& rhs) const{
+ return mof::Vector2D(this->x + rhs.x , this->y + rhs.y);
+}
+
+
+mof::Vector2D mof::Vector2D::operator -( const mof::Vector2D& rhs) const{
+ return mof::Vector2D(this->x - rhs.x , this->y - rhs.y);
+}
+
+mof::Vector2D mof::Vector2D::operator *(float rhs) const{
+ return mof::Vector2D(this->x * rhs , this->y * rhs);
+}
+
+
+mof::Vector2D mof::Vector2D::operator /(float rhs) const{
+ return mof::Vector2D(this->x / rhs , this->y / rhs);
+}
+
+
+mof::Vector2D mof::operator *(const mof::Vector2D& vec , float f){
+ mof::Vector2D obj;
+ obj.x = vec.x * f;
+ obj.y = vec.y * f;
+ return obj;
+}
+
+mof::Vector2D mof::operator *(float f , const mof::Vector2D& vec ){
+ mof::Vector2D obj;
+ obj.x = vec.x * f;
+ obj.y = vec.y * f;
+ return obj;
+}
+
+std::ostream& mof::operator <<(std::ostream& os , const mof::Vector2D& obj)
+{
+ os << '(' << obj.x << ',' << obj.y << ')';
+ return os;
+}
+
-#ifndef VECTOR2D_HPP\r
-#define VECTOR2D_HPP\r
-#include <mof/real.hpp>\r
-#include <iostream>\r
-\r
-namespace mof{\r
-\r
- struct Vector2D\r
- {\r
- real x , y;\r
- \r
- Vector2D(real x_ , real y_);\r
- Vector2D(int x_ , int y_);\r
- Vector2D();\r
- ~Vector2D(void);\r
- \r
- mof::Vector2D operator +(const mof::Vector2D& rhs) const;\r
- mof::Vector2D operator -(const mof::Vector2D& rhs) const;\r
- mof::Vector2D operator *(float rhs) const;\r
- mof::Vector2D operator /(float rhs) const;\r
-\r
- bool operator ==(const mof::Vector2D& obj) const;\r
- bool operator !=(const mof::Vector2D& obj) const;\r
- mof::Vector2D operator -( ) const;\r
-\r
- friend mof::Vector2D operator *(const mof::Vector2D& vec , real f);\r
- friend mof::Vector2D operator *(real f , const mof::Vector2D & vec);\r
- friend std::ostream& operator <<(std::ostream& os , const Vector2D& obj );\r
-\r
- };\r
-\r
-}\r
-\r
-#endif\r
+#ifndef VECTOR2D_HPP
+#define VECTOR2D_HPP
+#include <mof/real.hpp>
+#include <iostream>
+
+namespace mof{
+
+ struct Vector2D
+ {
+ real x , y;
+
+ Vector2D(real x_ , real y_);
+ Vector2D(int x_ , int y_);
+ Vector2D();
+ ~Vector2D(void);
+
+ mof::Vector2D operator +(const mof::Vector2D& rhs) const;
+ mof::Vector2D operator -(const mof::Vector2D& rhs) const;
+ mof::Vector2D operator *(float rhs) const;
+ mof::Vector2D operator /(float rhs) const;
+
+ bool operator ==(const mof::Vector2D& obj) const;
+ bool operator !=(const mof::Vector2D& obj) const;
+ mof::Vector2D operator -( ) const;
+
+ friend mof::Vector2D operator *(const mof::Vector2D& vec , real f);
+ friend mof::Vector2D operator *(real f , const mof::Vector2D & vec);
+ friend std::ostream& operator <<(std::ostream& os , const Vector2D& obj );
+
+ };
+
+}
+
+#endif
-#include "mof/Vector3D.hpp"\r
-#include <math.h>\r
-\r
-mof::Vector3D::Vector3D(real _x , float _y , float _z)\r
-{\r
- x = _x;\r
- y = _y;\r
- z = _z;\r
-}\r
-\r
-mof::Vector3D::Vector3D(){\r
- x = y = z = 0.0f;\r
-}\r
-\r
-mof::Vector3D::~Vector3D(void)\r
-{\r
-}\r
-\r
-\r
-void mof::Vector3D::normalize(){\r
- real norm = sqrt(x*x + y*y + z*z);\r
- if(norm < 1E-7 )return ;\r
- x = x / norm;\r
- y = y / norm;\r
- z = z / norm;\r
-}\r
-\r
-\r
-bool mof::Vector3D::operator ==(const mof::Vector3D& rhs) const{\r
- if(x == rhs.x && y == rhs.y && rhs.z == z)return true;\r
- else return false;\r
-}\r
-\r
-bool mof::Vector3D::operator != (const mof::Vector3D& obj) const{\r
- return !(*this == obj);\r
-}\r
- \r
-\r
-mof::Vector3D mof::Vector3D::operator +(const mof::Vector3D& rhs) const{\r
- return mof::Vector3D(this->x + rhs.x , this->y + rhs.y , this->z + rhs.z);\r
-}\r
-\r
-\r
-mof::Vector3D mof::Vector3D::operator -(const mof::Vector3D& rhs) const{\r
- return mof::Vector3D(this->x - rhs.x , this->y - rhs.y , this->z - rhs.z);\r
-}\r
- \r
-mof::Vector3D mof::Vector3D::operator *(real rhs) const{\r
- return mof::Vector3D(this->x * rhs , this->y * rhs ,this->z * rhs);\r
-}\r
-\r
-\r
-mof::Vector3D mof::Vector3D::operator /(real rhs) const{\r
- return mof::Vector3D(this->x / rhs , this->y / rhs , this->z / rhs);\r
-}\r
- \r
- /*\r
-mof::Vector3D mof::operator *(const mof::Vector3D& vec , real f){\r
- mof::Vector3D obj;\r
- obj.x = vec.x * f;\r
- obj.y = vec.y * f;\r
- obj.z = vec.z * f;\r
- return obj;\r
-}*/\r
- \r
-mof::Vector3D mof::operator *(real f , const mof::Vector3D& vec ){\r
- mof::Vector3D obj;\r
- obj.x = vec.x * f;\r
- obj.y = vec.y * f;\r
- obj.z = vec.z * f;\r
- return obj;\r
-}\r
-\r
-std::ostream& mof::operator <<(std::ostream& os , const mof::Vector3D& obj)\r
-{\r
- os << '(' << obj.x << ',' << obj.y << ',' << obj.z << ')';\r
- return os; \r
-}\r
-\r
+#include "mof/Vector3D.hpp"
+#include <math.h>
+
+mof::Vector3D::Vector3D(real _x , float _y , float _z)
+{
+ x = _x;
+ y = _y;
+ z = _z;
+}
+
+mof::Vector3D::Vector3D(){
+ x = y = z = 0.0f;
+}
+
+mof::Vector3D::~Vector3D(void)
+{
+}
+
+
+void mof::Vector3D::normalize(){
+ real norm = sqrt(x*x + y*y + z*z);
+ if(norm < 1E-7 )return ;
+ x = x / norm;
+ y = y / norm;
+ z = z / norm;
+}
+
+
+bool mof::Vector3D::operator ==(const mof::Vector3D& rhs) const{
+ if(x == rhs.x && y == rhs.y && rhs.z == z)return true;
+ else return false;
+}
+
+bool mof::Vector3D::operator != (const mof::Vector3D& obj) const{
+ return !(*this == obj);
+}
+
+
+mof::Vector3D mof::Vector3D::operator +(const mof::Vector3D& rhs) const{
+ return mof::Vector3D(this->x + rhs.x , this->y + rhs.y , this->z + rhs.z);
+}
+
+
+mof::Vector3D mof::Vector3D::operator -(const mof::Vector3D& rhs) const{
+ return mof::Vector3D(this->x - rhs.x , this->y - rhs.y , this->z - rhs.z);
+}
+
+mof::Vector3D mof::Vector3D::operator *(real rhs) const{
+ return mof::Vector3D(this->x * rhs , this->y * rhs ,this->z * rhs);
+}
+
+
+mof::Vector3D mof::Vector3D::operator /(real rhs) const{
+ return mof::Vector3D(this->x / rhs , this->y / rhs , this->z / rhs);
+}
+
+ /*
+mof::Vector3D mof::operator *(const mof::Vector3D& vec , real f){
+ mof::Vector3D obj;
+ obj.x = vec.x * f;
+ obj.y = vec.y * f;
+ obj.z = vec.z * f;
+ return obj;
+}*/
+
+mof::Vector3D mof::operator *(real f , const mof::Vector3D& vec ){
+ mof::Vector3D obj;
+ obj.x = vec.x * f;
+ obj.y = vec.y * f;
+ obj.z = vec.z * f;
+ return obj;
+}
+
+std::ostream& mof::operator <<(std::ostream& os , const mof::Vector3D& obj)
+{
+ os << '(' << obj.x << ',' << obj.y << ',' << obj.z << ')';
+ return os;
+}
+
- #pragma once \r
-#include <mof/real.hpp>\r
-#include <iostream>\r
-\r
- namespace mof{\r
- struct Vector3D\r
- {\r
- real x , y , z;\r
- Vector3D(real _x , real _y , real _z);\r
- Vector3D();\r
- ~Vector3D(void);\r
- void normalize();\r
- \r
- mof::Vector3D operator +(const mof::Vector3D& rhs) const ;\r
- mof::Vector3D operator -(const mof::Vector3D& rhs) const ;\r
- mof::Vector3D operator *(real rhs) const;\r
- mof::Vector3D operator /(real rhs) const;\r
- \r
- //friend mof::Vector3D operator *(const mof::Vector3D& vec , real f);\r
- friend mof::Vector3D operator *(real f , const mof::Vector3D & vec);\r
- \r
- \r
- bool operator ==(const mof::Vector3D& rhs) const;\r
- bool operator !=(const mof::Vector3D& rhs) const;\r
-\r
- friend std::ostream& operator <<(std::ostream& os , const Vector3D& obj );\r
- };\r
- \r
- Vector3D operator *(real f , const mof::Vector3D & vec);\r
- } //namespace mof\r
- \r
+ #pragma once
+#include <mof/real.hpp>
+#include <iostream>
+
+ namespace mof{
+ struct Vector3D
+ {
+ real x , y , z;
+ Vector3D(real _x , real _y , real _z);
+ Vector3D();
+ ~Vector3D(void);
+ void normalize();
+
+ mof::Vector3D operator +(const mof::Vector3D& rhs) const ;
+ mof::Vector3D operator -(const mof::Vector3D& rhs) const ;
+ mof::Vector3D operator *(real rhs) const;
+ mof::Vector3D operator /(real rhs) const;
+
+ //friend mof::Vector3D operator *(const mof::Vector3D& vec , real f);
+ friend mof::Vector3D operator *(real f , const mof::Vector3D & vec);
+
+
+ bool operator ==(const mof::Vector3D& rhs) const;
+ bool operator !=(const mof::Vector3D& rhs) const;
+
+ friend std::ostream& operator <<(std::ostream& os , const Vector3D& obj );
+ };
+
+ Vector3D operator *(real f , const mof::Vector3D & vec);
+ } //namespace mof
+
-#pragma once\r
-#include "mof/VertexBuffer.hpp"\r
-#include "mof/private/GraphicsDeviceImpl.hpp"\r
-#include <d3dx9.h>\r
-#include "mof/VertexTypes.hpp"\r
-#include "mof/private/VertexFVF.hpp"\r
-#include <stdlib.h>\r
-\r
-template class mof::VertexBuffer<mof::VertexXYZRHWCUV>;\r
-template class mof::VertexBuffer<mof::VertexXYZRHWC>;\r
-template class mof::VertexBuffer<mof::VertexXYZCUV>;\r
-template class mof::VertexBuffer<mof::VertexXYZNUV>;\r
-template class mof::VertexBuffer<mof::VertexXYZC>;\r
-\r
-\r
-template <class T>\r
-struct mof::VertexBuffer<T>::Impl{\r
- IDirect3DVertexBuffer9* pBuffer;\r
- mof::PRIMITIVE_TYPE primitiveType;\r
- \r
- \r
- Impl(mof::PRIMITIVE_TYPE primitiveType_);\r
- ~Impl();\r
-};\r
-\r
-\r
-template <class T>\r
-mof::VertexBuffer<T>::Impl::Impl(mof::PRIMITIVE_TYPE primitiveType_ )\r
-: pBuffer(NULL) , primitiveType(primitiveType_) \r
-{ \r
-}\r
-\r
-template <class T>\r
-mof::VertexBuffer<T>::Impl::~Impl()\r
-{ \r
- if(pBuffer != NULL)pBuffer->Release();\r
-}\r
-\r
-\r
-template <class T>\r
-mof::VertexBuffer<T>::VertexBuffer(const T& front , const T& back , mof::PRIMITIVE_TYPE primitiveType )\r
-: m_pImpl(new Impl( primitiveType ))\r
-{\r
- int length = &back - &front + 1;\r
- if(length <= 0)throw std::invalid_argument("\95s\90³\82È\92¸\93_\94z\97ñ\8ew\92è");\r
- \r
- const LPDIRECT3DDEVICE9 pDevice = mof::GraphicsDevice::getRawDevice();\r
- HRESULT hr = pDevice->CreateVertexBuffer( sizeof(T) * length , 0 , mof::getFVF<T>() , D3DPOOL_DEFAULT , &m_pImpl->pBuffer , NULL);\r
- if(FAILED(hr))throw std::runtime_error("Failed -- CreateVertexBuffer");\r
- \r
- T* pBuffer;\r
- hr = m_pImpl->pBuffer->Lock( 0, 0 ,(LPVOID*)&pBuffer , 0);\r
- if(FAILED(hr))throw std::invalid_argument(std::string("\92¸\93_\83o\83b\83t\83@\82Ì\83\8d\83b\83N\82É\8e¸\94s\82µ\82Ü\82µ\82½"));\r
- \r
- memcpy( pBuffer , &front , sizeof(T) * length );\r
- m_pImpl->pBuffer->Unlock();\r
-}\r
-\r
-\r
-\r
-template<class T>\r
-mof::VertexBuffer<T>::~VertexBuffer(){\r
-}\r
-\r
-\r
-template<class T>\r
-int mof::VertexBuffer<T>::getLength() const{\r
- D3DVERTEXBUFFER_DESC desc;\r
- m_pImpl->pBuffer->GetDesc(&desc);\r
- return desc.Size / sizeof(T);\r
-}\r
-\r
-\r
-template<class T>\r
-mof::PRIMITIVE_TYPE mof::VertexBuffer<T>::getPrimitiveType() const{\r
- return m_pImpl->primitiveType;\r
-}\r
-\r
-\r
-template<class T>\r
-void mof::VertexBuffer<T>::draw() const{\r
- HRESULT hr = E_FAIL;\r
-\r
- const LPDIRECT3DDEVICE9 pDevice = mof::GraphicsDevice::getRawDevice();\r
-\r
- pDevice->SetFVF(mof::getFVF<T>());\r
- pDevice->SetStreamSource(0 , m_pImpl->pBuffer , 0 , sizeof(T));\r
-\r
- \r
- int length = getLength();\r
-\r
- if(m_pImpl->primitiveType == mof::PRIMITIVE_TYPE_TRIANGLESTRIP){\r
- hr = pDevice->DrawPrimitive( D3DPT_TRIANGLESTRIP , 0 , length -2 );\r
- }\r
- else if(m_pImpl->primitiveType == mof::PRIMITIVE_TYPE_TRIANGLELIST){\r
- hr = pDevice->DrawPrimitive( D3DPT_TRIANGLELIST , 0 , length /3 );\r
- }\r
- \r
- if(FAILED(hr))throw std::runtime_error("Failed -- DrawPrimitive");\r
-\r
-}\r
-\r
+#pragma once
+#include "mof/VertexBuffer.hpp"
+#include "mof/private/GraphicsDeviceImpl.hpp"
+#include <d3dx9.h>
+#include "mof/VertexTypes.hpp"
+#include "mof/private/VertexFVF.hpp"
+#include <stdlib.h>
+
+template class mof::VertexBuffer<mof::VertexXYZRHWCUV>;
+template class mof::VertexBuffer<mof::VertexXYZRHWC>;
+template class mof::VertexBuffer<mof::VertexXYZCUV>;
+template class mof::VertexBuffer<mof::VertexXYZNUV>;
+template class mof::VertexBuffer<mof::VertexXYZC>;
+
+
+template <class T>
+struct mof::VertexBuffer<T>::Impl{
+ IDirect3DVertexBuffer9* pBuffer;
+ mof::PRIMITIVE_TYPE primitiveType;
+
+
+ Impl(mof::PRIMITIVE_TYPE primitiveType_);
+ ~Impl();
+};
+
+
+template <class T>
+mof::VertexBuffer<T>::Impl::Impl(mof::PRIMITIVE_TYPE primitiveType_ )
+: pBuffer(NULL) , primitiveType(primitiveType_)
+{
+}
+
+template <class T>
+mof::VertexBuffer<T>::Impl::~Impl()
+{
+ if(pBuffer != NULL)pBuffer->Release();
+}
+
+
+template <class T>
+mof::VertexBuffer<T>::VertexBuffer(const T& front , const T& back , mof::PRIMITIVE_TYPE primitiveType )
+: m_pImpl(new Impl( primitiveType ))
+{
+ int length = &back - &front + 1;
+ if(length <= 0)throw std::invalid_argument("\95s\90³\82È\92¸\93_\94z\97ñ\8ew\92è");
+
+ const LPDIRECT3DDEVICE9 pDevice = mof::GraphicsDevice::getRawDevice();
+ HRESULT hr = pDevice->CreateVertexBuffer( sizeof(T) * length , 0 , mof::getFVF<T>() , D3DPOOL_DEFAULT , &m_pImpl->pBuffer , NULL);
+ if(FAILED(hr))throw std::runtime_error("Failed -- CreateVertexBuffer");
+
+ T* pBuffer;
+ hr = m_pImpl->pBuffer->Lock( 0, 0 ,(LPVOID*)&pBuffer , 0);
+ if(FAILED(hr))throw std::invalid_argument(std::string("\92¸\93_\83o\83b\83t\83@\82Ì\83\8d\83b\83N\82É\8e¸\94s\82µ\82Ü\82µ\82½"));
+
+ memcpy( pBuffer , &front , sizeof(T) * length );
+ m_pImpl->pBuffer->Unlock();
+}
+
+
+
+template<class T>
+mof::VertexBuffer<T>::~VertexBuffer(){
+}
+
+
+template<class T>
+int mof::VertexBuffer<T>::getLength() const{
+ D3DVERTEXBUFFER_DESC desc;
+ m_pImpl->pBuffer->GetDesc(&desc);
+ return desc.Size / sizeof(T);
+}
+
+
+template<class T>
+mof::PRIMITIVE_TYPE mof::VertexBuffer<T>::getPrimitiveType() const{
+ return m_pImpl->primitiveType;
+}
+
+
+template<class T>
+void mof::VertexBuffer<T>::draw() const{
+ HRESULT hr = E_FAIL;
+
+ const LPDIRECT3DDEVICE9 pDevice = mof::GraphicsDevice::getRawDevice();
+
+ pDevice->SetFVF(mof::getFVF<T>());
+ pDevice->SetStreamSource(0 , m_pImpl->pBuffer , 0 , sizeof(T));
+
+
+ int length = getLength();
+
+ if(m_pImpl->primitiveType == mof::PRIMITIVE_TYPE_TRIANGLESTRIP){
+ hr = pDevice->DrawPrimitive( D3DPT_TRIANGLESTRIP , 0 , length -2 );
+ }
+ else if(m_pImpl->primitiveType == mof::PRIMITIVE_TYPE_TRIANGLELIST){
+ hr = pDevice->DrawPrimitive( D3DPT_TRIANGLELIST , 0 , length /3 );
+ }
+
+ if(FAILED(hr))throw std::runtime_error("Failed -- DrawPrimitive");
+
+}
+
-#pragma once\r
-#include <boost/scoped_ptr.hpp>\r
-#include "mof/VertexTypes.hpp"\r
-#include <boost/utility.hpp>\r
-\r
-namespace mof{\r
-\r
-\r
-\r
-template <class T>\r
-class VertexBuffer : boost::noncopyable{\r
- \r
- struct Impl;\r
- boost::scoped_ptr<Impl> m_pImpl;\r
-public:\r
- VertexBuffer\r
- (\r
- const T& front , const T& back , \r
- mof::PRIMITIVE_TYPE primitiveType = PRIMITIVE_TYPE_TRIANGLELIST \r
- );\r
- ~VertexBuffer();\r
-\r
- int getLength() const;\r
- mof::PRIMITIVE_TYPE getPrimitiveType() const;\r
- void draw() const;\r
-\r
-};\r
-\r
- \r
-}\r
+#pragma once
+#include <boost/scoped_ptr.hpp>
+#include "mof/VertexTypes.hpp"
+#include <boost/utility.hpp>
+
+namespace mof{
+
+
+
+template <class T>
+class VertexBuffer : boost::noncopyable{
+
+ struct Impl;
+ boost::scoped_ptr<Impl> m_pImpl;
+public:
+ VertexBuffer
+ (
+ const T& front , const T& back ,
+ mof::PRIMITIVE_TYPE primitiveType = PRIMITIVE_TYPE_TRIANGLELIST
+ );
+ ~VertexBuffer();
+
+ int getLength() const;
+ mof::PRIMITIVE_TYPE getPrimitiveType() const;
+ void draw() const;
+
+};
+
+
+}
-#pragma once\r
-#include "mof/Color.hpp"\r
-#include "mof/Vector2D.hpp"\r
-#include "mof/Vector3D.hpp"\r
-namespace mof{\r
-\r
-\r
-struct VertexXYZRHWCUV{\r
- float x , y , z , rhw;\r
- mof::Color color;\r
- float tu , tv; \r
-\r
- VertexXYZRHWCUV(){\r
- }\r
-\r
- VertexXYZRHWCUV(const mof::Vector2D& position , mof::Color color , float tu , float tv){\r
- x = static_cast<float>(position.x);\r
- y = static_cast<float>(position.y);\r
- z = 0.0f;\r
- rhw = 1.0f;\r
- this->color = color;\r
- this->tu = tu;\r
- this->tv = tv;\r
- }\r
-};\r
-\r
-struct VertexXYZRHWC{\r
- float x , y , z , rhw;\r
- mof::Color color;\r
-\r
- VertexXYZRHWC(){\r
- }\r
-\r
- VertexXYZRHWC(const mof::Vector2D& position , mof::Color color){\r
- x = static_cast<float>(position.x);\r
- y = static_cast<float>(position.y);\r
- z = 0.0f;\r
- rhw = 1.0f;\r
- this->color = color;\r
- }\r
-};\r
-\r
-\r
-struct VertexXYZCUV{\r
- float x , y , z;\r
- mof::Color color;\r
- float tu , tv;\r
-\r
- VertexXYZCUV(){\r
- }\r
-\r
- VertexXYZCUV(const mof::Vector3D& position , mof::Color color ,float tu , float tv){\r
- x = position.x;\r
- y = position.y;\r
- z = position.z;\r
- this->color = color;\r
- this->tu = tu;\r
- this->tv = tv;\r
- }\r
-};\r
-\r
-struct VertexXYZNUV{\r
- float x , y , z;\r
- float nx , ny , nz;\r
- float tu , tv;\r
-\r
- VertexXYZNUV(){\r
- }\r
-\r
- VertexXYZNUV(const mof::Vector3D& position , const mof::Vector3D& normal , float tu , float tv){\r
- x = position.x;\r
- y = position.y;\r
- z = position.z;\r
- nx = normal.x; \r
- ny = normal.y;\r
- nz = normal.z;\r
- this->tu = tu;\r
- this->tv = tv;\r
- }\r
-};\r
-\r
-struct VertexXYZC{\r
- float x , y , z;\r
- mof::Color color;\r
-\r
- VertexXYZC(){\r
- }\r
-\r
- VertexXYZC(const mof::Vector3D& position , const mof::Color _color){\r
- x = position.x;\r
- y = position.y;\r
- z = position.z;\r
- color = _color;\r
- }\r
-};\r
-\r
-enum PRIMITIVE_TYPE{\r
- PRIMITIVE_TYPE_TRIANGLESTRIP,\r
- PRIMITIVE_TYPE_TRIANGLELIST ,\r
- PRIMITIVE_TYPE_LINELIST\r
-};\r
-\r
-\r
-}\r
+#pragma once
+#include "mof/Color.hpp"
+#include "mof/Vector2D.hpp"
+#include "mof/Vector3D.hpp"
+namespace mof{
+
+
+struct VertexXYZRHWCUV{
+ float x , y , z , rhw;
+ mof::Color color;
+ float tu , tv;
+
+ VertexXYZRHWCUV(){
+ }
+
+ VertexXYZRHWCUV(const mof::Vector2D& position , mof::Color color , float tu , float tv){
+ x = static_cast<float>(position.x);
+ y = static_cast<float>(position.y);
+ z = 0.0f;
+ rhw = 1.0f;
+ this->color = color;
+ this->tu = tu;
+ this->tv = tv;
+ }
+};
+
+struct VertexXYZRHWC{
+ float x , y , z , rhw;
+ mof::Color color;
+
+ VertexXYZRHWC(){
+ }
+
+ VertexXYZRHWC(const mof::Vector2D& position , mof::Color color){
+ x = static_cast<float>(position.x);
+ y = static_cast<float>(position.y);
+ z = 0.0f;
+ rhw = 1.0f;
+ this->color = color;
+ }
+};
+
+
+struct VertexXYZCUV{
+ float x , y , z;
+ mof::Color color;
+ float tu , tv;
+
+ VertexXYZCUV(){
+ }
+
+ VertexXYZCUV(const mof::Vector3D& position , mof::Color color ,float tu , float tv){
+ x = position.x;
+ y = position.y;
+ z = position.z;
+ this->color = color;
+ this->tu = tu;
+ this->tv = tv;
+ }
+};
+
+struct VertexXYZNUV{
+ float x , y , z;
+ float nx , ny , nz;
+ float tu , tv;
+
+ VertexXYZNUV(){
+ }
+
+ VertexXYZNUV(const mof::Vector3D& position , const mof::Vector3D& normal , float tu , float tv){
+ x = position.x;
+ y = position.y;
+ z = position.z;
+ nx = normal.x;
+ ny = normal.y;
+ nz = normal.z;
+ this->tu = tu;
+ this->tv = tv;
+ }
+};
+
+struct VertexXYZC{
+ float x , y , z;
+ mof::Color color;
+
+ VertexXYZC(){
+ }
+
+ VertexXYZC(const mof::Vector3D& position , const mof::Color _color){
+ x = position.x;
+ y = position.y;
+ z = position.z;
+ color = _color;
+ }
+};
+
+enum PRIMITIVE_TYPE{
+ PRIMITIVE_TYPE_TRIANGLESTRIP,
+ PRIMITIVE_TYPE_TRIANGLELIST ,
+ PRIMITIVE_TYPE_LINELIST
+};
+
+
+}
-#include "mof/Window.hpp"\r
-#include "mof/InputDevice.hpp"\r
-#include "mof/ConsoleIO.hpp"\r
-#include <stdexcept>\r
-\r
-LRESULT WINAPI wndProc( HWND hWnd , UINT msg, WPARAM wParam, LPARAM lParam)\r
-{\r
- switch(msg)\r
- {\r
- case WM_ACTIVATEAPP:\r
- if(LOWORD(wParam) == 0)\r
- {\r
- /* *ConsoleOut::getInstance() << "Window\82ª\94ñ\83A\83N\83e\83B\83u\82É\82È\82è\82Ü\82µ\82½" << std::endl;\r
- mof::System::getInstance()->activate(false);\r
- mof::InputDevice::getInstance()->activate(false);*/\r
- mof::InputDevice::setActivation(false);\r
- }\r
- else \r
- {\r
- /* *ConsoleOut::getInstance() << "Window\82ª\83A\83N\83e\83B\83u\82É\82È\82è\82Ü\82µ\82½" << std::endl;\r
- mof::System::getInstance()->activate(true);\r
- mof::InputDevice::getInstance()->activate(true);*/\r
- mof::InputDevice::setActivation(true);\r
- }\r
- break;\r
- case WM_DESTROY:\r
- PostQuitMessage(0);\r
- break;\r
- case WM_SETCURSOR:\r
- SetCursor(NULL);\r
- break;\r
- }\r
- \r
- return DefWindowProc( hWnd, msg, wParam, lParam );\r
-}\r
-\r
-\r
-\r
-\r
-namespace mof\r
-{\r
- \r
- struct Window::Impl\r
- {\r
- mof::tstring appName;\r
- HINSTANCE hInstance;\r
- HWND hWindow;\r
- \r
- Impl(const mof::tstring& appname , HINSTANCE hInstance );\r
- };\r
-\r
- Window::Impl::Impl(const mof::tstring &appname, HINSTANCE hInstance )\r
- : appName( appname ) , hInstance( hInstance ) , hWindow( NULL )\r
- {\r
- // do nothing\r
- } \r
-\r
- Window::Window( const mof::tstring &appname , int width , int height , bool fullscreen )\r
- : m_pImpl( new mof::Window::Impl( appname , GetModuleHandle(NULL) ) )\r
- {\r
-\r
- // \83E\83B\83\93\83h\83E\83N\83\89\83X\90Ý\92è\r
- WNDCLASSEX wc = \r
- { \r
- sizeof(WNDCLASSEX), CS_CLASSDC, wndProc, 0L, 0L, \r
- m_pImpl->hInstance , NULL, NULL, NULL, NULL,\r
- m_pImpl->appName.c_str() , NULL\r
- };\r
- RegisterClassEx( &wc );\r
-\r
- // \83E\83B\83\93\83h\83E\90¶\90¬\r
- if( !fullscreen )\r
- {\r
- // \8ew\92è\82³\82ê\82½\83N\83\89\83C\83A\83\93\83g\97Ì\88æ\82ð\8am\95Û\82·\82é\82½\82ß\82É\95K\97v\82È\83E\83B\83\93\83h\83E\83T\83C\83Y\82ð\93¾\82é\r
- RECT rect_win;\r
- SetRect( &rect_win , 0 , 0 , width , height );\r
- AdjustWindowRect( &rect_win , WS_OVERLAPPEDWINDOW , false );\r
- \r
- //Window\83\82\81[\83h\r
- m_pImpl->hWindow = \r
- CreateWindow\r
- ( \r
- m_pImpl->appName.c_str() , m_pImpl->appName.c_str() , \r
- WS_OVERLAPPEDWINDOW , CW_USEDEFAULT, CW_USEDEFAULT, (rect_win.right - rect_win.left) ,\r
- (rect_win.bottom - rect_win.top) , GetDesktopWindow() , NULL , wc.hInstance , NULL\r
- );\r
- }\r
- else\r
- {\r
- //\83t\83\8b\83X\83N\83\8a\81[\83\93\r
- m_pImpl->hWindow = \r
- CreateWindow\r
- (\r
- m_pImpl->appName.c_str() , m_pImpl->appName.c_str() , \r
- WS_VISIBLE , CW_USEDEFAULT , CW_USEDEFAULT , width , height ,\r
- HWND_DESKTOP , NULL , wc.hInstance , NULL\r
- );\r
- }\r
- \r
- \r
- // \83E\83B\83\93\83h\83E\95`\89æ\r
- ShowWindow( m_pImpl->hWindow , SW_SHOWDEFAULT );\r
- UpdateWindow( m_pImpl->hWindow );\r
-\r
-\r
- } // function constructor \r
-\r
-\r
-\r
- Window::~Window( )\r
- {\r
- try\r
- {\r
- \r
- //\97á\8aO\82È\82°\82é\81H\r
- UnregisterClass(m_pImpl->appName.c_str() , m_pImpl->hInstance );\r
- }\r
- catch(...)\r
- {\r
- }\r
- \r
- }\r
- \r
- HWND Window::getHandler() const {\r
- return m_pImpl->hWindow;\r
- }\r
-\r
+#include "mof/Window.hpp"
+#include "mof/InputDevice.hpp"
+#include "mof/ConsoleIO.hpp"
+#include <stdexcept>
+
+LRESULT WINAPI wndProc( HWND hWnd , UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ switch(msg)
+ {
+ case WM_ACTIVATEAPP:
+ if(LOWORD(wParam) == 0)
+ {
+ /* *ConsoleOut::getInstance() << "Window\82ª\94ñ\83A\83N\83e\83B\83u\82É\82È\82è\82Ü\82µ\82½" << std::endl;
+ mof::System::getInstance()->activate(false);
+ mof::InputDevice::getInstance()->activate(false);*/
+ mof::InputDevice::setActivation(false);
+ }
+ else
+ {
+ /* *ConsoleOut::getInstance() << "Window\82ª\83A\83N\83e\83B\83u\82É\82È\82è\82Ü\82µ\82½" << std::endl;
+ mof::System::getInstance()->activate(true);
+ mof::InputDevice::getInstance()->activate(true);*/
+ mof::InputDevice::setActivation(true);
+ }
+ break;
+ case WM_DESTROY:
+ PostQuitMessage(0);
+ break;
+ case WM_SETCURSOR:
+ SetCursor(NULL);
+ break;
+ }
+
+ return DefWindowProc( hWnd, msg, wParam, lParam );
+}
+
+
+
+
+namespace mof
+{
+
+ struct Window::Impl
+ {
+ mof::tstring appName;
+ HINSTANCE hInstance;
+ HWND hWindow;
+
+ Impl(const mof::tstring& appname , HINSTANCE hInstance );
+ };
+
+ Window::Impl::Impl(const mof::tstring &appname, HINSTANCE hInstance )
+ : appName( appname ) , hInstance( hInstance ) , hWindow( NULL )
+ {
+ // do nothing
+ }
+
+ Window::Window( const mof::tstring &appname , int width , int height , bool fullscreen )
+ : m_pImpl( new mof::Window::Impl( appname , GetModuleHandle(NULL) ) )
+ {
+
+ // \83E\83B\83\93\83h\83E\83N\83\89\83X\90Ý\92è
+ WNDCLASSEX wc =
+ {
+ sizeof(WNDCLASSEX), CS_CLASSDC, wndProc, 0L, 0L,
+ m_pImpl->hInstance , NULL, NULL, NULL, NULL,
+ m_pImpl->appName.c_str() , NULL
+ };
+ RegisterClassEx( &wc );
+
+ // \83E\83B\83\93\83h\83E\90¶\90¬
+ if( !fullscreen )
+ {
+ // \8ew\92è\82³\82ê\82½\83N\83\89\83C\83A\83\93\83g\97Ì\88æ\82ð\8am\95Û\82·\82é\82½\82ß\82É\95K\97v\82È\83E\83B\83\93\83h\83E\83T\83C\83Y\82ð\93¾\82é
+ RECT rect_win;
+ SetRect( &rect_win , 0 , 0 , width , height );
+ AdjustWindowRect( &rect_win , WS_OVERLAPPEDWINDOW , false );
+
+ //Window\83\82\81[\83h
+ m_pImpl->hWindow =
+ CreateWindow
+ (
+ m_pImpl->appName.c_str() , m_pImpl->appName.c_str() ,
+ WS_OVERLAPPEDWINDOW , CW_USEDEFAULT, CW_USEDEFAULT, (rect_win.right - rect_win.left) ,
+ (rect_win.bottom - rect_win.top) , GetDesktopWindow() , NULL , wc.hInstance , NULL
+ );
+ }
+ else
+ {
+ //\83t\83\8b\83X\83N\83\8a\81[\83\93
+ m_pImpl->hWindow =
+ CreateWindow
+ (
+ m_pImpl->appName.c_str() , m_pImpl->appName.c_str() ,
+ WS_VISIBLE , CW_USEDEFAULT , CW_USEDEFAULT , width , height ,
+ HWND_DESKTOP , NULL , wc.hInstance , NULL
+ );
+ }
+
+
+ // \83E\83B\83\93\83h\83E\95`\89æ
+ ShowWindow( m_pImpl->hWindow , SW_SHOWDEFAULT );
+ UpdateWindow( m_pImpl->hWindow );
+
+
+ } // function constructor
+
+
+
+ Window::~Window( )
+ {
+ try
+ {
+
+ //\97á\8aO\82È\82°\82é\81H
+ UnregisterClass(m_pImpl->appName.c_str() , m_pImpl->hInstance );
+ }
+ catch(...)
+ {
+ }
+
+ }
+
+ HWND Window::getHandler() const {
+ return m_pImpl->hWindow;
+ }
+
} // namespace mof
\ No newline at end of file
-#pragma once\r
-\r
-#include "mof/tstring.hpp"\r
-#include <boost/scoped_ptr.hpp>\r
-#include <boost/utility.hpp>\r
-#include <windows.h>\r
-\r
-namespace mof\r
-{\r
- \r
- \r
- class Window : boost::noncopyable\r
- {\r
- \r
- struct Impl;\r
- boost::scoped_ptr<Impl> m_pImpl;\r
- \r
- public:\r
- Window( const mof::tstring& appname , int width , int height , bool fullscreen );\r
- ~Window( );\r
- HWND getHandler() const;\r
- \r
- \r
- };\r
-\r
-\r
-}\r
+#pragma once
+
+#include "mof/tstring.hpp"
+#include <boost/scoped_ptr.hpp>
+#include <boost/utility.hpp>
+#include <windows.h>
+
+namespace mof
+{
+
+
+ class Window : boost::noncopyable
+ {
+
+ struct Impl;
+ boost::scoped_ptr<Impl> m_pImpl;
+
+ public:
+ Window( const mof::tstring& appname , int width , int height , bool fullscreen );
+ ~Window( );
+ HWND getHandler() const;
+
+
+ };
+
+
+}
-#pragma once\r
-#include <memory>\r
-#include <mof/Texture.hpp>\r
-#include <mof/ResourceManager.hpp>\r
-\r
-namespace mof\r
-{\r
- typedef std::shared_ptr< Texture > TextureHandler;\r
- typedef ResourceManager< Texture > TextureManager;\r
- typedef std::shared_ptr< TextureManager > TextureManagerHandler;\r
-}\r
+#pragma once
+#include <memory>
+#include <mof/Texture.hpp>
+#include <mof/ResourceManager.hpp>
+
+namespace mof
+{
+ typedef std::shared_ptr< Texture > TextureHandler;
+ typedef ResourceManager< Texture > TextureManager;
+ typedef std::shared_ptr< TextureManager > TextureManagerHandler;
+}
-#pragma once\r
-#include "mof/AmbientLight.hpp"\r
-#include "mof/DirectionalLight.hpp"\r
-#include "mof/GraphicsDevice.hpp"\r
-#include "mof/Graphics3D.hpp"\r
-#include "mof/Camera.hpp"\r
-#include "mof/Captor.hpp"\r
-#include "mof/Color.hpp"\r
-#include "mof/GraphicsUnit.hpp"\r
-#include "mof/Light.hpp"\r
-#include "mof/Material.hpp"\r
-#include "mof/MaterialBuilder.hpp"\r
-#include "mof/MeshBuilder.hpp"\r
-#include "mof/PixelMap.hpp"\r
-#include "mof/Texture.hpp"\r
-#include "mof/VertexBuffer.hpp"\r
-#include "mof/VertexTypes.hpp"\r
-#include "mof/graphics/utilities.hpp"\r
+#pragma once
+#include "mof/AmbientLight.hpp"
+#include "mof/DirectionalLight.hpp"
+#include "mof/GraphicsDevice.hpp"
+#include "mof/Graphics3D.hpp"
+#include "mof/Camera.hpp"
+#include "mof/Captor.hpp"
+#include "mof/Color.hpp"
+#include "mof/GraphicsUnit.hpp"
+#include "mof/Light.hpp"
+#include "mof/Material.hpp"
+#include "mof/MaterialBuilder.hpp"
+#include "mof/MeshBuilder.hpp"
+#include "mof/PixelMap.hpp"
+#include "mof/Texture.hpp"
+#include "mof/VertexBuffer.hpp"
+#include "mof/VertexTypes.hpp"
+#include "mof/graphics/utilities.hpp"
-#pragma\r
-#include "mof/InputDevice.hpp"\r
-#include "mof/InputEventCondition.hpp"\r
-#include "mof/KeyPressedEventCondition.hpp"\r
-#include "mof/private/DeviceInputReceiver.hpp"\r
-#include "mof/LoggedInputReceiver.hpp"\r
-#include "mof/LoggingInputReceiver.hpp"\r
+#pragma
+#include "mof/InputDevice.hpp"
+#include "mof/InputEventCondition.hpp"
+#include "mof/KeyPressedEventCondition.hpp"
+#include "mof/private/DeviceInputReceiver.hpp"
+#include "mof/LoggedInputReceiver.hpp"
+#include "mof/LoggingInputReceiver.hpp"
-<?xml version="1.0" encoding="shift_jis"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="8.00"\r
- Name="moflib"\r
- ProjectGUID="{04CD4817-1559-4830-BCB0-C5AE997CD904}"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="4"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="\83\\81[\83X \83t\83@\83C\83\8b"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
- >\r
- <File\r
- RelativePath=".\AbstractScene.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\AmbientLight.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Animation.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\AnimationScheduler.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\BackGroundModel.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Billboard.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Button.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Camera.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Capturer.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\CascadeAnimation.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Color.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Component2D.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Component3D.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\ConsoleIO.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Container2D.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Container3D.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\CSVFile.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\DataTable.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\DeviceInputReceiver.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\DirectionalLight.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\FileMeshBuilder.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\FilePath.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\FileTextureBuilder.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Frame.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\GraphicsDevice.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\GraphicsObject.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\GraphicsSchedule.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\InputDevice.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\KeyFrameAnimation.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\LayoutManager.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Light.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Line2D.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Line3D.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\List.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\LoggedInputReceiver.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\LoggingInputReceiver.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Material.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Matrix3D.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Mesh.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\PixelMap.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\PixelMapTextureBuilder.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\RectangleModel.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Resource.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\SelectionModel.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Sprite.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\System.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\TextTextureBuilder.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Texture.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Timer.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\VBMeshBuilder.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Vector2D.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Vector3D.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Window.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\WindowSystem.cpp"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="\83w\83b\83_\81[ \83t\83@\83C\83\8b"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- <File\r
- RelativePath=".\AbstractScene.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\AmbientLight.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Animation.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\AnimationScheduler.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\BackGroundModel.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Billboard.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Button.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\ButtonListener.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Camera.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Capturer.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\CascadeAnimation.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Color.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Component2D.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Component3D.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\ConsoleIO.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Container2D.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Container3D.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\CSVFile.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\DataTable.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\DeviceInputReceiver.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\DirectionalLight.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\FileMeshBuilder.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\FilePath.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\FileTextureBuilder.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Frame.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\GeneralMap.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Graphics.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\GraphicsDevice.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\GraphicsObject.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\GraphicsSchedule.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\HardVertexBuffer.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\HardVertexBufferImpl.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\InputDevice.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\InputReceiver.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Interpolation.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\InterpolationImpl.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\KeyFrameAnimation.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\LayoutManager.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Light.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Line2D.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Line3D.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\List.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\LoggedInputReceiver.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\LoggingInputReceiver.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Material.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Matrix3D.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Mesh.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\MeshBuilder.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\MeshResource.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\PixelMap.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\PixelMapTextureBuilder.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\RectangleModel.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Resource.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\ResourceManager.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\SelectionModel.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\SoftVertexBuffer.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\SoftVertexBufferImpl.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Sprite.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\SquareMap.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\System.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\TextTextureBuilder.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Texture.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\TextureBuilder.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\TextureResource.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Timer.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\tstring.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\VBMeshBuilder.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Vector2D.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Vector3D.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\VertexBuffer.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\VertexFVF.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\VertexTypes.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Window.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\WindowSystem.h"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="\83\8a\83\\81[\83X \83t\83@\83C\83\8b"\r
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"\r
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
- >\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
+<?xml version="1.0" encoding="shift_jis"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="moflib"
+ ProjectGUID="{04CD4817-1559-4830-BCB0-C5AE997CD904}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="4"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="\83\\81[\83X \83t\83@\83C\83\8b"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\AbstractScene.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\AmbientLight.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Animation.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\AnimationScheduler.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\BackGroundModel.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Billboard.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Button.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Camera.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Capturer.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\CascadeAnimation.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Color.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Component2D.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Component3D.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\ConsoleIO.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Container2D.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Container3D.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\CSVFile.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\DataTable.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\DeviceInputReceiver.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\DirectionalLight.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\FileMeshBuilder.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\FilePath.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\FileTextureBuilder.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Frame.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\GraphicsDevice.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\GraphicsObject.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\GraphicsSchedule.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\InputDevice.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\KeyFrameAnimation.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\LayoutManager.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Light.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Line2D.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Line3D.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\List.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\LoggedInputReceiver.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\LoggingInputReceiver.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Material.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Matrix3D.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Mesh.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\PixelMap.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\PixelMapTextureBuilder.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\RectangleModel.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Resource.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\SelectionModel.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Sprite.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\System.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\TextTextureBuilder.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Texture.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Timer.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\VBMeshBuilder.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Vector2D.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Vector3D.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Window.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\WindowSystem.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="\83w\83b\83_\81[ \83t\83@\83C\83\8b"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\AbstractScene.h"
+ >
+ </File>
+ <File
+ RelativePath=".\AmbientLight.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Animation.h"
+ >
+ </File>
+ <File
+ RelativePath=".\AnimationScheduler.h"
+ >
+ </File>
+ <File
+ RelativePath=".\BackGroundModel.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Billboard.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Button.h"
+ >
+ </File>
+ <File
+ RelativePath=".\ButtonListener.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Camera.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Capturer.h"
+ >
+ </File>
+ <File
+ RelativePath=".\CascadeAnimation.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Color.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Component2D.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Component3D.h"
+ >
+ </File>
+ <File
+ RelativePath=".\ConsoleIO.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Container2D.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Container3D.h"
+ >
+ </File>
+ <File
+ RelativePath=".\CSVFile.h"
+ >
+ </File>
+ <File
+ RelativePath=".\DataTable.h"
+ >
+ </File>
+ <File
+ RelativePath=".\DeviceInputReceiver.h"
+ >
+ </File>
+ <File
+ RelativePath=".\DirectionalLight.h"
+ >
+ </File>
+ <File
+ RelativePath=".\FileMeshBuilder.h"
+ >
+ </File>
+ <File
+ RelativePath=".\FilePath.h"
+ >
+ </File>
+ <File
+ RelativePath=".\FileTextureBuilder.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Frame.h"
+ >
+ </File>
+ <File
+ RelativePath=".\GeneralMap.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Graphics.h"
+ >
+ </File>
+ <File
+ RelativePath=".\GraphicsDevice.h"
+ >
+ </File>
+ <File
+ RelativePath=".\GraphicsObject.h"
+ >
+ </File>
+ <File
+ RelativePath=".\GraphicsSchedule.h"
+ >
+ </File>
+ <File
+ RelativePath=".\HardVertexBuffer.h"
+ >
+ </File>
+ <File
+ RelativePath=".\HardVertexBufferImpl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\InputDevice.h"
+ >
+ </File>
+ <File
+ RelativePath=".\InputReceiver.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Interpolation.h"
+ >
+ </File>
+ <File
+ RelativePath=".\InterpolationImpl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\KeyFrameAnimation.h"
+ >
+ </File>
+ <File
+ RelativePath=".\LayoutManager.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Light.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Line2D.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Line3D.h"
+ >
+ </File>
+ <File
+ RelativePath=".\List.h"
+ >
+ </File>
+ <File
+ RelativePath=".\LoggedInputReceiver.h"
+ >
+ </File>
+ <File
+ RelativePath=".\LoggingInputReceiver.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Material.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Matrix3D.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Mesh.h"
+ >
+ </File>
+ <File
+ RelativePath=".\MeshBuilder.h"
+ >
+ </File>
+ <File
+ RelativePath=".\MeshResource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\PixelMap.h"
+ >
+ </File>
+ <File
+ RelativePath=".\PixelMapTextureBuilder.h"
+ >
+ </File>
+ <File
+ RelativePath=".\RectangleModel.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\ResourceManager.h"
+ >
+ </File>
+ <File
+ RelativePath=".\SelectionModel.h"
+ >
+ </File>
+ <File
+ RelativePath=".\SoftVertexBuffer.h"
+ >
+ </File>
+ <File
+ RelativePath=".\SoftVertexBufferImpl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Sprite.h"
+ >
+ </File>
+ <File
+ RelativePath=".\SquareMap.h"
+ >
+ </File>
+ <File
+ RelativePath=".\System.h"
+ >
+ </File>
+ <File
+ RelativePath=".\TextTextureBuilder.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Texture.h"
+ >
+ </File>
+ <File
+ RelativePath=".\TextureBuilder.h"
+ >
+ </File>
+ <File
+ RelativePath=".\TextureResource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Timer.h"
+ >
+ </File>
+ <File
+ RelativePath=".\tstring.h"
+ >
+ </File>
+ <File
+ RelativePath=".\VBMeshBuilder.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Vector2D.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Vector3D.h"
+ >
+ </File>
+ <File
+ RelativePath=".\VertexBuffer.h"
+ >
+ </File>
+ <File
+ RelativePath=".\VertexFVF.h"
+ >
+ </File>
+ <File
+ RelativePath=".\VertexTypes.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Window.h"
+ >
+ </File>
+ <File
+ RelativePath=".\WindowSystem.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="\83\8a\83\\81[\83X \83t\83@\83C\83\8b"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
-<?xml version="1.0" encoding="shift_jis"?>\r
-<VisualStudioUserFile\r
- ProjectType="Visual C++"\r
- Version="8.00"\r
- ShowAllFiles="false"\r
- >\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- >\r
- <DebugSettings\r
- Command="$(TargetPath)"\r
- WorkingDirectory=""\r
- CommandArguments=""\r
- Attach="false"\r
- DebuggerType="3"\r
- Remote="1"\r
- RemoteMachine="TOMOHIRO"\r
- RemoteCommand=""\r
- HttpUrl=""\r
- PDBPath=""\r
- SQLDebugging=""\r
- Environment=""\r
- EnvironmentMerge="true"\r
- DebuggerFlavor=""\r
- MPIRunCommand=""\r
- MPIRunArguments=""\r
- MPIRunWorkingDirectory=""\r
- ApplicationCommand=""\r
- ApplicationArguments=""\r
- ShimCommand=""\r
- MPIAcceptMode=""\r
- MPIAcceptFilter=""\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- >\r
- <DebugSettings\r
- Command="$(TargetPath)"\r
- WorkingDirectory=""\r
- CommandArguments=""\r
- Attach="false"\r
- DebuggerType="3"\r
- Remote="1"\r
- RemoteMachine="TOMOHIRO"\r
- RemoteCommand=""\r
- HttpUrl=""\r
- PDBPath=""\r
- SQLDebugging=""\r
- Environment=""\r
- EnvironmentMerge="true"\r
- DebuggerFlavor=""\r
- MPIRunCommand=""\r
- MPIRunArguments=""\r
- MPIRunWorkingDirectory=""\r
- ApplicationCommand=""\r
- ApplicationArguments=""\r
- ShimCommand=""\r
- MPIAcceptMode=""\r
- MPIAcceptFilter=""\r
- />\r
- </Configuration>\r
- </Configurations>\r
-</VisualStudioUserFile>\r
+<?xml version="1.0" encoding="shift_jis"?>
+<VisualStudioUserFile
+ ProjectType="Visual C++"
+ Version="8.00"
+ ShowAllFiles="false"
+ >
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ >
+ <DebugSettings
+ Command="$(TargetPath)"
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="TOMOHIRO"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ >
+ <DebugSettings
+ Command="$(TargetPath)"
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="TOMOHIRO"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ </Configurations>
+</VisualStudioUserFile>
-#pragma once\r
-#include "mof/RectangleModel.h"\r
-#include "mof/Vector2D.h"\r
-#include "mof/GraphicsObject.h"\r
-\r
-namespace mof{\r
-\r
- class Component2D : public GraphicsObject\r
- {\r
- \r
- public:\r
- Component2D(void);\r
- virtual ~Component2D(void);\r
- \r
- virtual void setPosition(Vector2D& position) = 0;\r
- virtual int getWidth() = 0;\r
- virtual int getHeight() = 0;\r
- virtual mof::Vector2D getPosition() = 0;\r
- \r
- virtual void setVisible(bool visible) = 0;\r
- virtual RectangleModel getBounds() = 0;\r
- };\r
-\r
+#pragma once
+#include "mof/RectangleModel.h"
+#include "mof/Vector2D.h"
+#include "mof/GraphicsObject.h"
+
+namespace mof{
+
+ class Component2D : public GraphicsObject
+ {
+
+ public:
+ Component2D(void);
+ virtual ~Component2D(void);
+
+ virtual void setPosition(Vector2D& position) = 0;
+ virtual int getWidth() = 0;
+ virtual int getHeight() = 0;
+ virtual mof::Vector2D getPosition() = 0;
+
+ virtual void setVisible(bool visible) = 0;
+ virtual RectangleModel getBounds() = 0;
+ };
+
};
\ No newline at end of file
-#pragma once\r
-#include "mof/InputReceiver.hpp"\r
-\r
-\r
-namespace mof{\r
- struct InputEvent{\r
- InputEvent(unsigned int _dwOfs , unsigned int _dwData){\r
- dwOfs = _dwOfs;\r
- dwData = _dwData;\r
- }\r
- unsigned int dwOfs;\r
- unsigned int dwData;\r
- };\r
-\r
- class DeviceInputReceiver : public InputReceiver\r
- {\r
- bool* m_pKeyStates;\r
- public:\r
- \r
- DeviceInputReceiver();\r
- virtual ~DeviceInputReceiver();\r
- virtual bool testKeyState(mof::InputReceiver::Key key);\r
- virtual void update();\r
- void notifyInputEvent(InputEvent& iEvent);\r
- };\r
-\r
+#pragma once
+#include "mof/InputReceiver.hpp"
+
+
+namespace mof{
+ struct InputEvent{
+ InputEvent(unsigned int _dwOfs , unsigned int _dwData){
+ dwOfs = _dwOfs;
+ dwData = _dwData;
+ }
+ unsigned int dwOfs;
+ unsigned int dwData;
+ };
+
+ class DeviceInputReceiver : public InputReceiver
+ {
+ bool* m_pKeyStates;
+ public:
+
+ DeviceInputReceiver();
+ virtual ~DeviceInputReceiver();
+ virtual bool testKeyState(mof::InputReceiver::Key key);
+ virtual void update();
+ void notifyInputEvent(InputEvent& iEvent);
+ };
+
};
\ No newline at end of file
-#pragma\r
-\r
-#pragma comment(lib , "dinput8.lib")\r
-#pragma comment(lib , "dxguid.lib")\r
-\r
-#define DIRECTINPUT_VERSION 0x0800\r
-#include <windows.h>\r
+#pragma
+
+#pragma comment(lib , "dinput8.lib")
+#pragma comment(lib , "dxguid.lib")
+
+#define DIRECTINPUT_VERSION 0x0800
+#include <windows.h>
#include <dinput.h>
\ No newline at end of file
-\r
-#include "mof/private/FileTextureBuilder.hpp"\r
-#include <d3dx9.h>\r
-#include <DxErr.h>\r
-#include "mof/private/GraphicsDeviceImpl.hpp"\r
-#include "mof/ConsoleIO.hpp"\r
-\r
-mof::FileTextureBuilder::FileTextureBuilder( const mof::tstring& path)\r
-{\r
- m_path = path;\r
- \r
-}\r
-\r
-mof::FileTextureBuilder::~FileTextureBuilder(void)\r
-{\r
-}\r
-\r
-\r
-LPDIRECT3DTEXTURE9 mof::FileTextureBuilder::create(){\r
- LPDIRECT3DTEXTURE9 texture;\r
- LPDIRECT3DDEVICE9 pDevice = mof::GraphicsDevice::getRawDevice();\r
- HRESULT hr = D3DXCreateTextureFromFileEx(pDevice , m_path.c_str() , \r
- 0 , 0 , 1 , 0/*RENDER*/ , D3DFMT_UNKNOWN , D3DPOOL_MANAGED ,\r
- D3DX_DEFAULT , D3DX_DEFAULT , mof::createColor(0 , 0 , 0) , NULL , NULL , &texture);\r
-\r
- if(FAILED(hr))throw std::runtime_error("Failed --- CreateTextureFromFileEx");\r
- \r
- return texture; \r
-\r
- \r
-\r
+
+#include "mof/private/FileTextureBuilder.hpp"
+#include <d3dx9.h>
+#include <DxErr.h>
+#include "mof/private/GraphicsDeviceImpl.hpp"
+#include "mof/ConsoleIO.hpp"
+
+mof::FileTextureBuilder::FileTextureBuilder( const mof::tstring& path)
+{
+ m_path = path;
+
+}
+
+mof::FileTextureBuilder::~FileTextureBuilder(void)
+{
+}
+
+
+LPDIRECT3DTEXTURE9 mof::FileTextureBuilder::create(){
+ LPDIRECT3DTEXTURE9 texture;
+ LPDIRECT3DDEVICE9 pDevice = mof::GraphicsDevice::getRawDevice();
+ HRESULT hr = D3DXCreateTextureFromFileEx(pDevice , m_path.c_str() ,
+ 0 , 0 , 1 , 0/*RENDER*/ , D3DFMT_UNKNOWN , D3DPOOL_MANAGED ,
+ D3DX_DEFAULT , D3DX_DEFAULT , mof::createColor(0 , 0 , 0) , NULL , NULL , &texture);
+
+ if(FAILED(hr))throw std::runtime_error("Failed --- CreateTextureFromFileEx");
+
+ return texture;
+
+
+
}
\ No newline at end of file
-#ifndef MOF_FILE_TEXTURE_BUILDER_HPP\r
-#define MOF_FILE_TEXTURE_BUILDER_HPP\r
-\r
-#include "mof/private/TextureBuilder.hpp"\r
-#include "mof/tstring.hpp"\r
-\r
-namespace mof{\r
- \r
- class FileTextureBuilder : public TextureBuilder\r
- {\r
- mof::tstring m_path;\r
- public:\r
- FileTextureBuilder( const mof::tstring& path);\r
- virtual ~FileTextureBuilder(void);\r
- virtual LPDIRECT3DTEXTURE9 create();\r
- };\r
-\r
-\r
-};\r
-\r
+#ifndef MOF_FILE_TEXTURE_BUILDER_HPP
+#define MOF_FILE_TEXTURE_BUILDER_HPP
+
+#include "mof/private/TextureBuilder.hpp"
+#include "mof/tstring.hpp"
+
+namespace mof{
+
+ class FileTextureBuilder : public TextureBuilder
+ {
+ mof::tstring m_path;
+ public:
+ FileTextureBuilder( const mof::tstring& path);
+ virtual ~FileTextureBuilder(void);
+ virtual LPDIRECT3DTEXTURE9 create();
+ };
+
+
+};
+
#endif
\ No newline at end of file
-#pragma once\r
-\r
-#include <windows.h>\r
-#include "mof/GraphicsDevice.hpp"\r
-\r
-#include <d3dx9.h>\r
-\r
-\r
-namespace mof\r
-{\r
- class Window;\r
- \r
- namespace GraphicsDevice\r
- {\r
- // private\r
- void initialize(HWND hWnd, int adapter_id, int width, int height, bool fullscreen);\r
- void finalize();\r
- void beginScene();\r
- void endScene();\r
- LPDIRECT3DDEVICE9 getRawDevice( );\r
- }\r
-}\r
+#pragma once
+
+#include <windows.h>
+#include "mof/GraphicsDevice.hpp"
+
+#include <d3dx9.h>
+
+
+namespace mof
+{
+ class Window;
+
+ namespace GraphicsDevice
+ {
+ // private
+ void initialize(HWND hWnd, int adapter_id, int width, int height, bool fullscreen);
+ void finalize();
+ void beginScene();
+ void endScene();
+ LPDIRECT3DDEVICE9 getRawDevice( );
+ }
+}
-#pragma once\r
-#include "../Interpreter.hpp"\r
-\r
-namespace mof\r
-{\r
- namespace Interpreter\r
- {\r
- \r
- int _createMessageWidget( );\r
- \r
- int _addMessageWidgetPage\r
- ( \r
- int id ,\r
- const tstring& title ,\r
- const tstring& text \r
- );\r
- \r
- int _hideMessageWidget( int id );\r
- \r
- void _waitKey( const tstring& keystring );\r
-\r
- void _waitFrame( int frame );\r
- }\r
-}\r
-\r
-\r
+#pragma once
+#include "../Interpreter.hpp"
+
+namespace mof
+{
+ namespace Interpreter
+ {
+
+ int _createMessageWidget( );
+
+ int _addMessageWidgetPage
+ (
+ int id ,
+ const tstring& title ,
+ const tstring& text
+ );
+
+ int _hideMessageWidget( int id );
+
+ void _waitKey( const tstring& keystring );
+
+ void _waitFrame( int frame );
+ }
+}
+
+
-#ifndef MOF_MESH_HPP\r
-#define MOF_MESH_HPP\r
-#include <d3d9.h>\r
-#include "mof/Graphics3D.hpp"\r
-#include <boost/scoped_ptr.hpp>\r
-#include "mof/Material.hpp"\r
-#include "mof/Texture.hpp"\r
-\r
-namespace mof{\r
-\r
-struct MeshDisposer;\r
-\r
-class Mesh : public Graphics3D \r
-{\r
- struct Impl;\r
- boost::scoped_ptr<Impl> m_pImpl;\r
-\r
-public :\r
- Mesh(\r
- std::shared_ptr<mof::MeshDisposer> pMeshDisposer ,\r
- unsigned long nMaterials ,\r
- const std::shared_ptr<mof::Material>* pMaterials , \r
- const std::shared_ptr<mof::Texture>* pTextures );\r
- virtual ~Mesh();\r
-\r
- virtual void setWorldMatrix(const mof::Manipulator<mof::Matrix3D>::Handler& handler);\r
- virtual void setTexture( \r
- unsigned int num ,\r
- const std::shared_ptr<mof::Texture>& pTexture);\r
-\r
- virtual bool isVisible() const;\r
- virtual void update();\r
- virtual void draw() const;\r
- //virtual bool isDisposable() const;\r
-\r
-};\r
-\r
-}\r
-\r
-#endif\r
+#ifndef MOF_MESH_HPP
+#define MOF_MESH_HPP
+#include <d3d9.h>
+#include "mof/Graphics3D.hpp"
+#include <boost/scoped_ptr.hpp>
+#include "mof/Material.hpp"
+#include "mof/Texture.hpp"
+
+namespace mof{
+
+struct MeshDisposer;
+
+class Mesh : public Graphics3D
+{
+ struct Impl;
+ boost::scoped_ptr<Impl> m_pImpl;
+
+public :
+ Mesh(
+ std::shared_ptr<mof::MeshDisposer> pMeshDisposer ,
+ unsigned long nMaterials ,
+ const std::shared_ptr<mof::Material>* pMaterials ,
+ const std::shared_ptr<mof::Texture>* pTextures );
+ virtual ~Mesh();
+
+ virtual void setWorldMatrix(const mof::Manipulator<mof::Matrix3D>::Handler& handler);
+ virtual void setTexture(
+ unsigned int num ,
+ const std::shared_ptr<mof::Texture>& pTexture);
+
+ virtual bool isVisible() const;
+ virtual void update();
+ virtual void draw() const;
+ //virtual bool isDisposable() const;
+
+};
+
+}
+
+#endif
-#pragma once\r
-#include <d3d9.h>\r
-#include <d3dx9.h>\r
-\r
-namespace mof{\r
-\r
-struct MeshDisposer{\r
- \r
- LPD3DXMESH pMesh; //\83\81\83b\83V\83\85\r
- LPD3DXBUFFER pAdjacency; //\83\81\83b\83V\83\85\82É\8aÜ\82Ü\82ê\82é\8ae\96Ê\82Ì\97×\90Ú\96Ê\82ð\8ai\94[\82·\82é\83|\83C\83\93\83^\r
-\r
- ~MeshDisposer(){\r
- if(pAdjacency != NULL)pAdjacency->Release();\r
- if(pMesh != NULL)pMesh->Release();\r
- }\r
-};\r
-\r
-}\r
+#pragma once
+#include <d3d9.h>
+#include <d3dx9.h>
+
+namespace mof{
+
+struct MeshDisposer{
+
+ LPD3DXMESH pMesh; //\83\81\83b\83V\83\85
+ LPD3DXBUFFER pAdjacency; //\83\81\83b\83V\83\85\82É\8aÜ\82Ü\82ê\82é\8ae\96Ê\82Ì\97×\90Ú\96Ê\82ð\8ai\94[\82·\82é\83|\83C\83\93\83^
+
+ ~MeshDisposer(){
+ if(pAdjacency != NULL)pAdjacency->Release();
+ if(pMesh != NULL)pMesh->Release();
+ }
+};
+
+}
-#ifndef MOF_PIXEL_TEXTURE_BUILDER_HPP\r
-#define MOF_PIXEL_TEXTURE_BUILDER_HPP\r
-\r
-#include "mof/private/TextureBuilder.hpp"\r
-#include "mof/tstring.hpp"\r
-#include <memory>\r
-#include "mof/PixelMap.hpp"\r
-\r
-namespace mof{\r
-\r
- class PixelMapTextureBuilder : public TextureBuilder\r
- {\r
- std::shared_ptr<mof::PixelMap> m_pPixelMap;\r
- public:\r
- PixelMapTextureBuilder( const std::shared_ptr<mof::PixelMap>& pPixelMap);\r
- virtual ~PixelMapTextureBuilder();\r
- virtual LPDIRECT3DTEXTURE9 create();\r
- };\r
-\r
-\r
-};\r
-\r
+#ifndef MOF_PIXEL_TEXTURE_BUILDER_HPP
+#define MOF_PIXEL_TEXTURE_BUILDER_HPP
+
+#include "mof/private/TextureBuilder.hpp"
+#include "mof/tstring.hpp"
+#include <memory>
+#include "mof/PixelMap.hpp"
+
+namespace mof{
+
+ class PixelMapTextureBuilder : public TextureBuilder
+ {
+ std::shared_ptr<mof::PixelMap> m_pPixelMap;
+ public:
+ PixelMapTextureBuilder( const std::shared_ptr<mof::PixelMap>& pPixelMap);
+ virtual ~PixelMapTextureBuilder();
+ virtual LPDIRECT3DTEXTURE9 create();
+ };
+
+
+};
+
#endif
\ No newline at end of file
-#ifndef MOF_TEXTURE_BUILDER_HPP\r
-#define MOF_TEXTURE_BUILDER_HPP\r
-#include <d3d9.h>\r
-\r
-namespace mof{\r
- \r
- class TextureBuilder\r
- {\r
- public:\r
- virtual ~TextureBuilder(){}\r
- virtual LPDIRECT3DTEXTURE9 create() = 0;\r
- };\r
-\r
-\r
-}\r
-\r
+#ifndef MOF_TEXTURE_BUILDER_HPP
+#define MOF_TEXTURE_BUILDER_HPP
+#include <d3d9.h>
+
+namespace mof{
+
+ class TextureBuilder
+ {
+ public:
+ virtual ~TextureBuilder(){}
+ virtual LPDIRECT3DTEXTURE9 create() = 0;
+ };
+
+
+}
+
#endif
\ No newline at end of file
-#ifndef MOF_TEXTURE_IMPL_HPP\r
-#define MOF_TEXTURE_IMPL_HPP\r
-#include "Texture.hpp"\r
-\r
-\r
-#include "mof/GraphicsDevice.hpp"\r
-#include <d3dx9.h>\r
-\r
-\r
-struct mof::Texture::Impl{\r
- LPDIRECT3DTEXTURE9 pTexture;\r
- int width , height;\r
-\r
- Impl() : pTexture(NULL) , width(0) , height(0){}\r
- ~Impl(){\r
- if(pTexture != NULL)pTexture->Release();\r
- }\r
-};\r
-\r
+#ifndef MOF_TEXTURE_IMPL_HPP
+#define MOF_TEXTURE_IMPL_HPP
+#include "Texture.hpp"
+
+
+#include "mof/GraphicsDevice.hpp"
+#include <d3dx9.h>
+
+
+struct mof::Texture::Impl{
+ LPDIRECT3DTEXTURE9 pTexture;
+ int width , height;
+
+ Impl() : pTexture(NULL) , width(0) , height(0){}
+ ~Impl(){
+ if(pTexture != NULL)pTexture->Release();
+ }
+};
+
#endif
\ No newline at end of file
-#pragma once\r
-#include "VertexTypes.hpp"\r
-#include <d3dx9.h>\r
-\r
-\r
-namespace mof{\r
-\r
-template<class T>\r
-DWORD getFVF();\r
-\r
-template<>\r
-inline DWORD getFVF<VertexXYZRHWCUV>(){\r
- return D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1;\r
-}\r
-\r
-template<>\r
-inline DWORD getFVF<VertexXYZRHWC>(){\r
- return D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX0;\r
-}\r
-\r
-template<>\r
-inline DWORD getFVF<VertexXYZCUV>(){\r
- return D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_TEX1;\r
-}\r
-\r
-template<>\r
-inline DWORD getFVF<VertexXYZNUV>(){\r
- return D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_TEX1;\r
-}\r
-\r
-template<>\r
-inline DWORD getFVF<VertexXYZC>(){\r
- return D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_TEX0;\r
-}\r
-\r
-\r
+#pragma once
+#include "VertexTypes.hpp"
+#include <d3dx9.h>
+
+
+namespace mof{
+
+template<class T>
+DWORD getFVF();
+
+template<>
+inline DWORD getFVF<VertexXYZRHWCUV>(){
+ return D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1;
+}
+
+template<>
+inline DWORD getFVF<VertexXYZRHWC>(){
+ return D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX0;
+}
+
+template<>
+inline DWORD getFVF<VertexXYZCUV>(){
+ return D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_TEX1;
+}
+
+template<>
+inline DWORD getFVF<VertexXYZNUV>(){
+ return D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_TEX1;
+}
+
+template<>
+inline DWORD getFVF<VertexXYZC>(){
+ return D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_TEX0;
+}
+
+
};
\ No newline at end of file
-#pragma once \r
-#include "mof/tstring.hpp"\r
-\r
-struct lua_State;\r
-\r
-namespace mof\r
-{\r
- namespace regist\r
- {\r
- void registMessage( lua_State* l );\r
- void registWait( lua_State* l );\r
- }\r
-}\r
+#pragma once
+#include "mof/tstring.hpp"
+
+struct lua_State;
+
+namespace mof
+{
+ namespace regist
+ {
+ void registMessage( lua_State* l );
+ void registWait( lua_State* l );
+ }
+}
-#pragma once\r
-\r
-namespace mof\r
-{\r
- typedef float real;\r
-\r
- inline real int2real(int v)\r
- {\r
- return static_cast<real>(v);\r
- }\r
- \r
- inline int real2int(real v)\r
- {\r
- return static_cast<int>(v);\r
- }\r
-}\r
+#pragma once
+
+namespace mof
+{
+ typedef float real;
+
+ inline real int2real(int v)
+ {
+ return static_cast<real>(v);
+ }
+
+ inline int real2int(real v)
+ {
+ return static_cast<int>(v);
+ }
+}
-#pragma once\r
-#include "mof/tstring.hpp"\r
-#include "mof/InputReceiver.hpp"\r
-#include "mof/script/ObjectData.hpp"\r
-#include <vector>\r
-#include <mof/stream/Manipulator.hpp>\r
-#include <mof/Color.hpp>\r
-#include <mof/Vector2D.hpp>\r
-#include <mof/Vector3D.hpp>\r
- \r
-namespace mof\r
-{\r
-namespace script\r
-{\r
-\r
- class CommandSet\r
- {\r
- public:\r
- enum MoveDirection\r
- {\r
- MOVE_UP = 0,\r
- MOVE_DOWN,\r
- MOVE_LEFT,\r
- MOVE_RIGHT,\r
- };\r
-\r
-\r
- /** \r
- * @brief \83\81\83b\83Z\81[\83W\83E\83B\83\93\83h\83E\82ð\90¶\90¬\82·\82é\82½\82ß\82Ì\83R\81[\83\8b\83o\83b\83N\r
- * @return \90¶\90¬\82µ\82½\83\81\83b\83Z\81[\83W\83E\83B\83\93\83h\83E\r
- */\r
- virtual int message_create(const mof::tstring& title, const GameData::entry_t& style) = 0;\r
- \r
- virtual int menu_create(const mof::tstring& title, const std::vector<mof::tstring>& items, const GameData::entry_t& style) = 0;\r
-\r
- virtual int sound_create(const mof::tstring& filepath) = 0;\r
- \r
- virtual void sound_play(int id) = 0;\r
- \r
- virtual int picture_create(const mof::tstring& filepath) = 0;\r
- \r
- virtual int particlegen_create() = 0;\r
-\r
- /** \r
- * @brief \83\81\83b\83Z\81[\83W\83E\83B\83\93\83h\83E\82É\83y\81[\83W\82ð\92Ç\89Á\82·\82é\82½\82ß\82Ì\83R\81[\83\8b\83o\83b\83N\r
- * @param[in] \83\81\83b\83Z\81[\83W\82Ì\83^\83C\83g\83\8b\r
- * @param[in] \83\81\83b\83Z\81[\83W\93à\97e\r
- * @return \90¶\90¬\82µ\82½\83\81\83b\83Z\81[\83W\83E\83B\83\93\83h\83E\r
- */\r
- virtual int message_next(int id, const tstring& text) = 0;\r
- \r
- virtual void wait_for_key(mof::InputReceiver::Key key) = 0;\r
- \r
- virtual mof::InputReceiver::Key get_last_key() = 0;\r
- \r
- virtual void wait_frame(size_t frame) = 0;\r
-\r
- virtual int menu_move_cursor(int id, MoveDirection direction) = 0;\r
- \r
- virtual int menu_select(int id) = 0;\r
- \r
- virtual int menu_get_current(int id) = 0;\r
- \r
- virtual GameData::ptr load_game_data(const mof::tstring& resource_path) = 0;\r
-\r
- virtual void print_debug(const mof::tstring& message) = 0;\r
- \r
- // \8b¤\92Ê\82Ì\83\81\83\\83b\83h\r
- virtual int show(int id, const mof::tstring& class_path) = 0;\r
- \r
- virtual int hide(int id, const mof::tstring& class_path) = 0;\r
- \r
- virtual void dispose(int id, const mof::tstring& class_path) = 0;\r
- \r
- virtual GameData::ptr get_properties(int id, const mof::tstring& class_path) = 0;\r
-\r
- /**\r
- * @brief \83I\83u\83W\83F\83N\83g\82É\83r\83w\83C\83r\83A\82ð\90Ý\92è\r
- * @param[in] id \83I\83u\83W\83F\83N\83gID\r
- * @param[in] target \83^\81[\83Q\83b\83g\8e¯\95Ê\96¼\r
- * @param[in] seq \8ew\92è\82·\82é\83V\81[\83P\83\93\83X\r
- * @param[in] period \83V\81[\83P\83\93\83X\82Ì\83s\83\8a\83I\83h\r
- */\r
- virtual void set_color_behavior(int id, const mof::tstring& class_path, const Manipulator<Color4f>::ptr& seq, FrameNumber period) = 0;\r
- \r
- virtual void set_position_behavior(int id, const mof::tstring& class_path, const Manipulator<Vector2D>::ptr& seq, FrameNumber period) = 0;\r
- \r
- virtual void set_position_behavior(int id, const mof::tstring& class_path, const Manipulator<Vector3D>::ptr& seq, FrameNumber period) = 0;\r
- \r
- virtual void set_size_behavior(int id, const mof::tstring& class_path, const Manipulator<Vector2D>::ptr& seq, FrameNumber period) = 0;\r
- \r
- virtual ~CommandSet(){}\r
-\r
- };\r
-\r
-}\r
-}\r
-\r
+#pragma once
+#include "mof/tstring.hpp"
+#include "mof/InputReceiver.hpp"
+#include "mof/script/ObjectData.hpp"
+#include <vector>
+#include <mof/stream/Manipulator.hpp>
+#include <mof/Color.hpp>
+#include <mof/Vector2D.hpp>
+#include <mof/Vector3D.hpp>
+
+namespace mof
+{
+namespace script
+{
+
+ class CommandSet
+ {
+ public:
+ enum MoveDirection
+ {
+ MOVE_UP = 0,
+ MOVE_DOWN,
+ MOVE_LEFT,
+ MOVE_RIGHT,
+ };
+
+
+ /**
+ * @brief \83\81\83b\83Z\81[\83W\83E\83B\83\93\83h\83E\82ð\90¶\90¬\82·\82é\82½\82ß\82Ì\83R\81[\83\8b\83o\83b\83N
+ * @return \90¶\90¬\82µ\82½\83\81\83b\83Z\81[\83W\83E\83B\83\93\83h\83E
+ */
+ virtual int message_create(const mof::tstring& title, const GameData::entry_t& style) = 0;
+
+ virtual int menu_create(const mof::tstring& title, const std::vector<mof::tstring>& items, const GameData::entry_t& style) = 0;
+
+ virtual int sound_create(const mof::tstring& filepath) = 0;
+
+ virtual void sound_play(int id) = 0;
+
+ virtual int picture_create(const mof::tstring& filepath) = 0;
+
+ virtual int particlegen_create() = 0;
+
+ /**
+ * @brief \83\81\83b\83Z\81[\83W\83E\83B\83\93\83h\83E\82É\83y\81[\83W\82ð\92Ç\89Á\82·\82é\82½\82ß\82Ì\83R\81[\83\8b\83o\83b\83N
+ * @param[in] \83\81\83b\83Z\81[\83W\82Ì\83^\83C\83g\83\8b
+ * @param[in] \83\81\83b\83Z\81[\83W\93à\97e
+ * @return \90¶\90¬\82µ\82½\83\81\83b\83Z\81[\83W\83E\83B\83\93\83h\83E
+ */
+ virtual int message_next(int id, const tstring& text) = 0;
+
+ virtual void wait_for_key(mof::InputReceiver::Key key) = 0;
+
+ virtual mof::InputReceiver::Key get_last_key() = 0;
+
+ virtual void wait_frame(size_t frame) = 0;
+
+ virtual int menu_move_cursor(int id, MoveDirection direction) = 0;
+
+ virtual int menu_select(int id) = 0;
+
+ virtual int menu_get_current(int id) = 0;
+
+ virtual GameData::ptr load_game_data(const mof::tstring& resource_path) = 0;
+
+ virtual void print_debug(const mof::tstring& message) = 0;
+
+ // \8b¤\92Ê\82Ì\83\81\83\\83b\83h
+ virtual int show(int id, const mof::tstring& class_path) = 0;
+
+ virtual int hide(int id, const mof::tstring& class_path) = 0;
+
+ virtual void dispose(int id, const mof::tstring& class_path) = 0;
+
+ virtual GameData::ptr get_properties(int id, const mof::tstring& class_path) = 0;
+
+ /**
+ * @brief \83I\83u\83W\83F\83N\83g\82É\83r\83w\83C\83r\83A\82ð\90Ý\92è
+ * @param[in] id \83I\83u\83W\83F\83N\83gID
+ * @param[in] target \83^\81[\83Q\83b\83g\8e¯\95Ê\96¼
+ * @param[in] seq \8ew\92è\82·\82é\83V\81[\83P\83\93\83X
+ * @param[in] period \83V\81[\83P\83\93\83X\82Ì\83s\83\8a\83I\83h
+ */
+ virtual void set_color_behavior(int id, const mof::tstring& class_path, const Manipulator<Color4f>::ptr& seq, FrameNumber period) = 0;
+
+ virtual void set_position_behavior(int id, const mof::tstring& class_path, const Manipulator<Vector2D>::ptr& seq, FrameNumber period) = 0;
+
+ virtual void set_position_behavior(int id, const mof::tstring& class_path, const Manipulator<Vector3D>::ptr& seq, FrameNumber period) = 0;
+
+ virtual void set_size_behavior(int id, const mof::tstring& class_path, const Manipulator<Vector2D>::ptr& seq, FrameNumber period) = 0;
+
+ virtual ~CommandSet(){}
+
+ };
+
+}
+}
+
-#pragma once\r
-#include <mof/script/Environment.hpp>\r
-#include <mof/ConsoleIO.hpp>\r
-#include "mof/EventScheduler.hpp"\r
-#include "mof/OnceEventCondition.hpp"\r
-#include "mof/KeyPressedEventCondition.hpp"\r
-#include <mof/widgets.hpp>\r
-#include <mof/streams.hpp>\r
-#include <mof/Matrix3D.hpp>\r
-#include <mof/Sprite.hpp>\r
-#include <mof/script/ObjectData.hpp>\r
-#include <mof/utilities.hpp>\r
-#include <boost/bind.hpp>\r
-#include <boost/format.hpp>\r
-#include <boost/algorithm/string.hpp>\r
-#include <mof/sound/SoundDevice.hpp>\r
-#include <vector>\r
-#include <memory>\r
- \r
-namespace mof\r
-{\r
-namespace script\r
-{\r
-//{{{ Impl\r
- struct Environment::Impl\r
- {\r
- bool waiting_; ///< Interpreterにコマンド実行の停止を伝えるための状態変数\r
- mof::EventScheduler scheduler_; ///< キー入力待機など\r
- std::shared_ptr<mof::InputReceiver> input_;\r
- std::vector<std::shared_ptr<mof::script::MessageData>> message_data_list_;\r
- std::vector<std::shared_ptr<mof::script::MenuData>> menu_data_list_;\r
- std::vector<std::shared_ptr<mof::script::SoundData>> sound_data_list_;\r
- std::vector<mof::script::PictureData::ptr> picture_data_list_;\r
- std::vector<mof::script::ParticlegenData::ptr> particlegen_data_list_;\r
- std::map<std::string, int> property_map_;\r
- \r
- Impl(std::shared_ptr<mof::InputReceiver> input)\r
- : waiting_(false), input_(input)\r
- {\r
- }\r
-\r
- void setWaiting(bool waiting)\r
- {\r
- waiting_ = waiting;\r
- }\r
-\r
- };\r
-//}}}\r
-//{{{ constructor\r
- Environment::Environment(std::shared_ptr<mof::InputReceiver> input)\r
- : impl_(new Impl(input))\r
- {\r
- impl_->property_map_["system.menu.move_cursor_sound"] = sound_create(_T("sound/move_cursor.wav"));\r
- }\r
-//}}}\r
-//{{{ destructor\r
- Environment::~Environment()\r
- {\r
- }\r
-//}}}\r
-//{{{ message_create\r
- int Environment::message_create(const mof::tstring& title, const GameData::entry_t& style)\r
- {\r
- using namespace mof::script;\r
- using namespace boost;\r
-\r
- DEBUG_PRINT("message_create(" << title << ")");\r
- std::shared_ptr<MessageData> data = std::shared_ptr<MessageData>(create_message_data(title, style).release());\r
- impl_->message_data_list_.push_back(data);// TODO 再利用\r
- return impl_->message_data_list_.size() -1;\r
- }\r
-//}}} \r
-//{{{ massage_next\r
- int Environment::message_next(int id, const tstring& text)\r
- {\r
- DEBUG_PRINT("message_next(" << id << "," << text << ")");\r
- std::shared_ptr<mof::script::MessageData>& data = impl_->message_data_list_.at(id);\r
- data->message_->addPage(text);\r
- return data->message_->nextPage();\r
- }\r
-//}}}\r
-//{{{ menu_create\r
- int Environment::menu_create\r
- (\r
- const mof::tstring& title,\r
- const std::vector<mof::tstring>& items,\r
- const GameData::entry_t& style\r
- )\r
- {\r
- using namespace mof::script;\r
- using namespace boost;\r
-\r
- DEBUG_PRINT("menu_create(" << title << ")");\r
- std::shared_ptr<MenuData> data = std::shared_ptr<MenuData>(create_menu_data(title, items, style).release());\r
- impl_->menu_data_list_.push_back(data);\r
- return impl_->menu_data_list_.size() -1;\r
- }\r
-//}}} \r
-//{{{ menu_move_cursor\r
- int Environment::menu_move_cursor(int id, MoveDirection direction)\r
- {\r
- using namespace mof::script;\r
- using namespace boost;\r
-\r
- DEBUG_PRINT(format("menu_move_cursor(%d, %d)") % id % direction);\r
- auto& data = impl_->menu_data_list_.at(id);\r
- auto& sound_data = impl_->sound_data_list_.at(impl_->property_map_["system.menu.move_cursor_sound"]);\r
- int prev_index = data->menu_->getSelectedIndex();\r
- mof::FrameNumber period;\r
- switch (direction) {\r
- case MOVE_UP : \r
- period = data->menu_->up();\r
- break;\r
- case MOVE_DOWN : \r
- period = data->menu_->down();\r
- break;\r
- case MOVE_LEFT : \r
- period = data->menu_->left();\r
- break;\r
- case MOVE_RIGHT : \r
- period = data->menu_->right();\r
- break;\r
- default:\r
- return 0;\r
- }\r
- if (data->menu_->getSelectedIndex() != prev_index) {\r
- sound_data->sound_->stop();\r
- sound_data->sound_->play(sound_data->streaming_);\r
- }\r
- return period;\r
- }\r
-//}}} \r
-//{{{ menu_select\r
- int Environment::menu_select(int id)\r
- {\r
- using namespace mof::script;\r
- using namespace boost;\r
-\r
- DEBUG_PRINT(format("menu_select(%d)") % id);\r
- auto& data = impl_->menu_data_list_.at(id);\r
- return data->menu_->performAction();\r
- }\r
-//}}} \r
-//{{{ menu_get_current\r
- int Environment::menu_get_current(int id)\r
- {\r
- using namespace mof::script;\r
- using namespace boost;\r
-\r
- DEBUG_PRINT(format("menu_get_current(%d)") % id);\r
- auto& data = impl_->menu_data_list_.at(id);\r
- DEBUG_PRINT(data->menu_->getSelectedIndex());\r
- return data->menu_->getSelectedIndex();\r
- }\r
-//}}} \r
-//{{{ wait_for_key\r
- void Environment::wait_for_key(mof::InputReceiver::Key key)\r
- {\r
- DEBUG_PRINT("wait_for_key(" << key << ")");\r
- bool& waiting = impl_->waiting_;\r
- impl_->scheduler_.addEvent\r
- (\r
- new mof::OnceEventCondition(new mof::KeyPressedEventCondition(key, impl_->input_)), \r
- [&waiting](){waiting = false;}\r
- );\r
- impl_->waiting_ = true;\r
- }\r
-//}}}\r
-//{{{ wait_frame\r
- void Environment::wait_frame(size_t frame)\r
- {\r
- DEBUG_PRINT("wait_frame(" << frame << ")");\r
- if (frame == 0)return;\r
- bool& waiting = impl_->waiting_;\r
- impl_->scheduler_.addEvent(frame, [&waiting](){waiting = false;});// set waiting_ false after 'frame' \r
- impl_->waiting_ = true;\r
- }\r
-//}}}\r
-//{{{ get_last_key\r
- mof::InputReceiver::Key Environment::get_last_key()\r
- {\r
- //TODO 複数同時をtimestampで識別\r
- DEBUG_PRINT("get_last_key()");\r
- for (int key = mof::InputReceiver::BEGIN + 1; key < mof::InputReceiver::ANY; ++key) {\r
- if (impl_->input_->testKeyState(static_cast<mof::InputReceiver::Key>(key))) {\r
- return static_cast<mof::InputReceiver::Key>(key);// 最初に見つかったものを選ぶ\r
- }\r
- }\r
- return mof::InputReceiver::END;// 何も入力されていないとき\r
- }\r
-//}}}\r
-//{{{ sound_create\r
- int Environment::sound_create(const mof::tstring& filepath)\r
- {\r
- using namespace mof::script;\r
- using namespace boost;\r
-\r
- //TODO キャッシュ\r
- \r
- DEBUG_PRINT("sound_create(" << filepath << ")");\r
- auto ptr = mof::sound::SoundDevice::create_static_sound(filepath);\r
- //TODO 分岐\r
- auto data = std::make_shared<SoundData>();\r
- data->sound_ = std::shared_ptr<mof::SoundBuffer>(ptr.release());\r
- data->streaming_ = false;\r
- impl_->sound_data_list_.push_back(data);\r
- return impl_->sound_data_list_.size() -1;\r
- }\r
-//}}} \r
-//{{{ sound_play\r
- void Environment::sound_play(int id)\r
- {\r
- using namespace mof::script;\r
- using namespace boost;\r
-\r
- DEBUG_PRINT("sound_play(" << id << ")");\r
- impl_->sound_data_list_.at(id)->sound_->play(false);\r
- }\r
-//}}} \r
-//{{{ load_game_data\r
- GameData::ptr Environment::load_game_data(const mof::tstring& resource_path)\r
- {\r
- return get_game_data(resource_path);\r
- }\r
-//}}} \r
-//{{{ print_debug\r
- void Environment::print_debug(const mof::tstring& message)\r
- {\r
- DEBUG_PRINT(message);\r
- }\r
-//}}}\r
-//{{{ picture_create\r
- int Environment::picture_create(const mof::tstring& filepath)\r
- {\r
- using namespace mof::script;\r
- using namespace boost;\r
-\r
- DEBUG_PRINT("picture_create(" << filepath << ")");\r
- auto data = std::make_shared<PictureData>();\r
- data->sprite_ = \r
- std::make_shared<Sprite>\r
- (\r
- std::make_shared<mof::Texture>(filepath),\r
- mof::Rectangle<mof::real>(0, 0, 1, 1)\r
- );\r
- impl_->picture_data_list_.push_back(data);// TODO 再利用\r
- return impl_->picture_data_list_.size() -1;\r
-\r
- }\r
-//}}} \r
-//{{{ particlegen_create\r
- int Environment::particlegen_create()\r
- {\r
- using namespace mof::script;\r
- using namespace boost;\r
-\r
- DEBUG_PRINT("particlegen_create()");\r
- //DEBUG_PRINT("picture_create(" << filepath << ")");\r
- auto data = std::make_shared<ParticlegenData>();\r
- data->particlegen_ = std::make_shared<mof::particlegen>();\r
- data->particlegen_->world_transform() << data->position_ref_.makeRef(Matrix3D::createIdentity());\r
- impl_->particlegen_data_list_.push_back(data);// TODO 再利用\r
- return impl_->particlegen_data_list_.size() -1;\r
-\r
- }\r
-//}}} \r
-// methods for common objects \r
-//{{{ show\r
-int Environment::show(int id, const mof::tstring& class_path)\r
-{\r
- using namespace mof::script;\r
- using namespace boost;\r
-\r
- if (class_path == "menu") {\r
- DEBUG_PRINT("menu_show(" << id << ")");\r
- std::shared_ptr<MenuData>& data = impl_->menu_data_list_.at(id);\r
- return data->frame_->show();\r
- }\r
- else if (class_path == "message") {\r
- DEBUG_PRINT("message_show(" << id << ")");\r
- std::shared_ptr<mof::script::MessageData>& data = impl_->message_data_list_.at(id);\r
- return data->frame_->show();\r
- }\r
- else throw std::invalid_argument("unknown class path:" + class_path);\r
-}\r
-//}}}\r
-//{{{ hide\r
-int Environment::hide(int id, const mof::tstring& class_path)\r
-{\r
- using namespace mof::script;\r
- using namespace boost;\r
-\r
- if (class_path == "menu") {\r
- DEBUG_PRINT("menu_hide(" << id << ")");\r
- std::shared_ptr<MenuData>& data = impl_->menu_data_list_.at(id);\r
- return data->frame_->hide();\r
- }\r
- else if (class_path == "message") {\r
- DEBUG_PRINT("message_hide(" << id << ")");\r
- std::shared_ptr<mof::script::MessageData>& data = impl_->message_data_list_.at(id);\r
- return data->frame_->hide();\r
- }\r
- else throw std::invalid_argument("unknown class path:" + class_path);\r
-}\r
-//}}}\r
-//{{{ dispose\r
-void Environment::dispose(int id, const mof::tstring& class_path)\r
-{\r
- using namespace mof::script;\r
- using namespace boost;\r
-\r
- if (class_path == "menu") {\r
- DEBUG_PRINT("menu_dispose(" << id << ")");\r
- impl_->menu_data_list_.at(id) = std::shared_ptr<MenuData>();// NULLに設定\r
- }\r
- else if (class_path == "message") {\r
- DEBUG_PRINT("message_dispose(" << id << ")");\r
- impl_->message_data_list_.at(id) = std::shared_ptr<MessageData>();// NULLに設定\r
- }\r
- else if (class_path == "picture") {\r
- DEBUG_PRINT("picture_dispose(" << id << ")");\r
- impl_->picture_data_list_.at(id) = std::shared_ptr<PictureData>();// NULLに設定\r
- }\r
- else if (class_path == "particlegen") {\r
- DEBUG_PRINT("particlegen_dispose(" << id << ")");\r
- impl_->particlegen_data_list_.at(id) = std::shared_ptr<ParticlegenData>();// NULLに設定\r
- }\r
- else if (class_path == "sound") {\r
- DEBUG_PRINT("sound_dispose(" << id << ")");\r
- impl_->sound_data_list_.at(id) = std::shared_ptr<SoundData>();// NULLに設定\r
- }\r
- else throw std::invalid_argument("unknown class path:" + class_path);\r
-}\r
-//}}}\r
-//{{{ get_properties\r
- GameData::ptr Environment::get_properties(int id, const mof::tstring& class_path)\r
- {\r
- using namespace mof::script;\r
- using namespace boost;\r
- GameData::ptr game_data = std::make_shared<GameData>();\r
- game_data->data_.resize(1);\r
- GameData::entry_t& e = game_data->data_.front();\r
-\r
- if (class_path == "menu") {\r
- DEBUG_PRINT("get_property(" << id << class_path << ")");\r
- std::shared_ptr<MenuData>& data = impl_->menu_data_list_.at(id);\r
- Vector2D v = data->frame_->getView()->getPreferredSize();\r
- e["preferred_size"] = (format("%d,%d") % v.x % v.y).str();\r
- Vector2D pos = data->frame_->getView()->getPositionStream().value();\r
- e["position2"] = (format("%d,%d") % pos.x % pos.y).str();\r
- }\r
- else if (class_path == "message") {\r
- DEBUG_PRINT("get_property(" << id << class_path << ")");\r
- std::shared_ptr<MessageData>& data = impl_->message_data_list_.at(id);\r
- Vector2D v = data->frame_->getView()->getPreferredSize();\r
- e["preferred_size"] = (format("%d,%d") % v.x % v.y).str();\r
- Vector2D pos = data->frame_->getView()->getPositionStream().value();\r
- e["position2"] = (format("%d,%d") % pos.x % pos.y).str();\r
- }\r
- else if (class_path == "picture") {\r
- DEBUG_PRINT("get_property(" << id << class_path << ")");\r
- std::shared_ptr<PictureData>& data = impl_->picture_data_list_.at(id);\r
- Vector2D v = data->sprite_->getPreferredSize();\r
- e["preferred_size"] = (format("%d,%d") % v.x % v.y).str();\r
- Vector2D pos = data->sprite_->getPositionStream().value();\r
- e["position2"] = (format("%d,%d") % pos.x % pos.y).str();\r
- }\r
-\r
- else throw std::invalid_argument("unknown class path:" + class_path);\r
-\r
- return game_data;\r
- }\r
-//}}}\r
-//{{{ set_color_behavior\r
- void Environment::set_color_behavior(int id, const mof::tstring& class_path, const Manipulator<Color4f>::ptr& seq, mof::FrameNumber period)\r
- {\r
- using namespace boost::algorithm;\r
- DEBUG_PRINT("set_color_behavior(" << ")"); \r
-\r
- std::vector<mof::tstring> splited_list;\r
- split(splited_list, class_path, is_any_of("."));\r
- if (splited_list.front() == "picture") {\r
- auto picture = impl_->picture_data_list_.at(id);\r
- picture->sprite_->setColorStream(ColorStream(seq));\r
- return;\r
- }\r
- else if (splited_list.front() == "menu") {\r
- if (splited_list.at(1) == "open") {\r
- auto menu = impl_->menu_data_list_.at(id);\r
- menu->frame_->setBehaviorOnColor(mof::widget::Frame::FRAME_OPEN, seq, period);\r
- return;\r
- }\r
- else if (splited_list.at(1) == "close") {\r
- auto menu = impl_->menu_data_list_.at(id);\r
- menu->frame_->setBehaviorOnColor(mof::widget::Frame::FRAME_CLOSE, seq, period);\r
- return;\r
- }\r
-\r
- }\r
- else if (splited_list.front() == "message") {\r
- if (splited_list.at(1) == "open") {\r
- auto message = impl_->message_data_list_.at(id);\r
- message->frame_->setBehaviorOnColor(mof::widget::Frame::FRAME_OPEN, seq, period);\r
- return;\r
- }\r
- else if (splited_list.at(1) == "close") {\r
- auto message = impl_->message_data_list_.at(id);\r
- message->frame_->setBehaviorOnColor(mof::widget::Frame::FRAME_CLOSE, seq, period);\r
- return;\r
- }\r
-\r
- }\r
-\r
-\r
-\r
- throw std::logic_error("unknown class_path:" + class_path);\r
- }\r
-//}}}\r
-//{{{ set_position_behavior\r
- void Environment::set_position_behavior(int id, const mof::tstring& class_path, const Manipulator<Vector2D>::ptr& seq, mof::FrameNumber period)\r
- {\r
- using namespace boost::algorithm;\r
- DEBUG_PRINT("set_position_behavior(" << ")"); \r
-\r
- std::vector<mof::tstring> splited_list;\r
- split(splited_list, class_path, is_any_of("."));\r
- if (splited_list.front() == "picture") {\r
- auto picture = impl_->picture_data_list_.at(id);\r
- picture->sprite_->setPositionStream(Vector2DStream(seq));\r
- return;\r
- }\r
- else if (splited_list.front() == "menu") {\r
- if (splited_list.at(1) == "open") {\r
- auto menu = impl_->menu_data_list_.at(id);\r
- menu->frame_->setBehaviorOnPosition(mof::widget::Frame::FRAME_OPEN, seq, period);\r
- return;\r
- }\r
- else if (splited_list.at(1) == "close") {\r
- auto menu = impl_->menu_data_list_.at(id);\r
- menu->frame_->setBehaviorOnPosition(mof::widget::Frame::FRAME_CLOSE, seq, period);\r
- return;\r
- }\r
-\r
- }\r
- else if (splited_list.front() == "message") {\r
- if (splited_list.at(1) == "open") {\r
- auto message = impl_->message_data_list_.at(id);\r
- message->frame_->setBehaviorOnPosition(mof::widget::Frame::FRAME_OPEN, seq, period);\r
- return;\r
- }\r
- else if (splited_list.at(1) == "close") {\r
- auto message = impl_->message_data_list_.at(id);\r
- message->frame_->setBehaviorOnPosition(mof::widget::Frame::FRAME_CLOSE, seq, period);\r
- return;\r
- }\r
- }\r
-\r
-\r
- throw std::logic_error("unknown class_path:" + class_path);\r
- }\r
-//}}}\r
-//{{{ set_position_behavior\r
- void Environment::set_position_behavior(int id, const mof::tstring& class_path, const Manipulator<Vector3D>::ptr& seq, mof::FrameNumber period)\r
- {\r
- using namespace boost::algorithm;\r
- using namespace mof;\r
- DEBUG_PRINT("set_position_behavior(" << ")"); \r
-\r
- std::vector<mof::tstring> splited_list;\r
- split(splited_list, class_path, is_any_of("."));\r
- if (splited_list.front() == "particlegen") {\r
- auto p = impl_->particlegen_data_list_.at(id);\r
- p->position_ref_.replace(0, std::make_shared<Translation3D>(seq));\r
- return;\r
- }\r
-\r
-\r
- throw std::logic_error("unknown class_path:" + class_path);\r
- }\r
-//}}}\r
-//{{{ set_size_behavior\r
- void Environment::set_size_behavior(int id, const mof::tstring& class_path, const Manipulator<Vector2D>::ptr& seq, mof::FrameNumber period)\r
- {\r
- using namespace boost::algorithm;\r
- DEBUG_PRINT("set_position_behavior(" << ")"); \r
-\r
- std::vector<mof::tstring> splited_list;\r
- split(splited_list, class_path, is_any_of("."));\r
- if (splited_list.front() == "picture") {\r
- auto picture = impl_->picture_data_list_.at(id);\r
- picture->sprite_->setSizeStream(Vector2DStream(seq));\r
- return;\r
- }\r
- else if (splited_list.front() == "menu") {\r
- if (splited_list.at(1) == "open") {\r
- auto menu = impl_->menu_data_list_.at(id);\r
- menu->frame_->setBehaviorOnSize(mof::widget::Frame::FRAME_OPEN, seq, period);\r
- return;\r
- }\r
- else if (splited_list.at(1) == "close") {\r
- auto menu = impl_->menu_data_list_.at(id);\r
- menu->frame_->setBehaviorOnSize(mof::widget::Frame::FRAME_CLOSE, seq, period);\r
- return;\r
- }\r
-\r
- }\r
- else if (splited_list.front() == "message") {\r
- if (splited_list.at(1) == "open") {\r
- auto message = impl_->message_data_list_.at(id);\r
- message->frame_->setBehaviorOnSize(mof::widget::Frame::FRAME_OPEN, seq, period);\r
- return;\r
- }\r
- else if (splited_list.at(1) == "close") {\r
- auto message = impl_->message_data_list_.at(id);\r
- message->frame_->setBehaviorOnSize(mof::widget::Frame::FRAME_CLOSE, seq, period);\r
- return;\r
- }\r
- }\r
-\r
- throw std::logic_error("unknown class_path:" + class_path);\r
- }\r
-//}}}\r
-\r
-//{{{ update\r
- void Environment::update()\r
- {\r
- using namespace mof::script;\r
- using namespace std;\r
- impl_->scheduler_.update();\r
- foreach (auto data, impl_->message_data_list_) {\r
- if (data.get()) data->frame_->update();\r
- }\r
- foreach (auto data, impl_->menu_data_list_) {\r
- if (data.get()) data->frame_->update(); \r
- }\r
- foreach (auto data, impl_->sound_data_list_) {\r
- if (data.get()) data->sound_->update(); \r
- }\r
-\r
- foreach (auto data, impl_->picture_data_list_) {\r
- if (data.get()) data->sprite_->update(); \r
- }\r
-\r
- foreach (auto data, impl_->particlegen_data_list_) {\r
- if (data) data->particlegen_->update(); \r
- }\r
-\r
-\r
- }\r
-//}}}\r
-//{{{ draw\r
- void Environment::draw() const\r
- {\r
- using namespace mof::script;\r
- using namespace std;\r
- \r
- mof::GraphicsDevice::setAlphaBlendingMode(mof::GraphicsDevice::BLENDING_MODE_ADD);\r
- mof::GraphicsDevice::setZBuffer(false);\r
- foreach (auto& data, impl_->particlegen_data_list_) {\r
- if (data) {\r
- auto& list = data->particlegen_->drawables(); \r
- foreach (auto p, list) p->draw();\r
- }\r
-\r
- }\r
- mof::GraphicsDevice::setZBuffer(true);\r
- mof::GraphicsDevice::setAlphaBlendingMode(mof::GraphicsDevice::BLENDING_MODE_ALPHA);\r
-\r
- foreach (auto data, impl_->picture_data_list_) {\r
- if (data.get()) data->sprite_->draw();\r
- }\r
-\r
-\r
- foreach (auto data, impl_->message_data_list_) {\r
- if (data.get()) data->frame_->getView()->draw();\r
- }\r
- \r
- foreach (auto data, impl_->menu_data_list_) {\r
- if (data.get()) data->frame_->getView()->draw();\r
- }//TODO ソート\r
- \r
- \r
- }\r
-//}}}\r
-//{{{ isWaiting\r
- bool Environment::isWaiting() const\r
- {\r
- return impl_->waiting_;\r
- }\r
-//}}}\r
-}\r
-}\r
+#pragma once
+#include <mof/script/Environment.hpp>
+#include <mof/ConsoleIO.hpp>
+#include "mof/EventScheduler.hpp"
+#include "mof/OnceEventCondition.hpp"
+#include "mof/KeyPressedEventCondition.hpp"
+#include <mof/widgets.hpp>
+#include <mof/streams.hpp>
+#include <mof/Matrix3D.hpp>
+#include <mof/Sprite.hpp>
+#include <mof/script/ObjectData.hpp>
+#include <mof/utilities.hpp>
+#include <boost/bind.hpp>
+#include <boost/format.hpp>
+#include <boost/algorithm/string.hpp>
+#include <mof/sound/SoundDevice.hpp>
+#include <vector>
+#include <memory>
+
+namespace mof
+{
+namespace script
+{
+//{{{ Impl
+ struct Environment::Impl
+ {
+ bool waiting_; ///< Interpreterにコマンド実行の停止を伝えるための状態変数
+ mof::EventScheduler scheduler_; ///< キー入力待機など
+ std::shared_ptr<mof::InputReceiver> input_;
+ std::vector<std::shared_ptr<mof::script::MessageData>> message_data_list_;
+ std::vector<std::shared_ptr<mof::script::MenuData>> menu_data_list_;
+ std::vector<std::shared_ptr<mof::script::SoundData>> sound_data_list_;
+ std::vector<mof::script::PictureData::ptr> picture_data_list_;
+ std::vector<mof::script::ParticlegenData::ptr> particlegen_data_list_;
+ std::map<std::string, int> property_map_;
+
+ Impl(std::shared_ptr<mof::InputReceiver> input)
+ : waiting_(false), input_(input)
+ {
+ }
+
+ void setWaiting(bool waiting)
+ {
+ waiting_ = waiting;
+ }
+
+ };
+//}}}
+//{{{ constructor
+ Environment::Environment(std::shared_ptr<mof::InputReceiver> input)
+ : impl_(new Impl(input))
+ {
+ impl_->property_map_["system.menu.move_cursor_sound"] = sound_create(_T("sound/move_cursor.wav"));
+ }
+//}}}
+//{{{ destructor
+ Environment::~Environment()
+ {
+ }
+//}}}
+//{{{ message_create
+ int Environment::message_create(const mof::tstring& title, const GameData::entry_t& style)
+ {
+ using namespace mof::script;
+ using namespace boost;
+
+ DEBUG_PRINT("message_create(" << title << ")");
+ std::shared_ptr<MessageData> data = std::shared_ptr<MessageData>(create_message_data(title, style).release());
+ impl_->message_data_list_.push_back(data);// TODO 再利用
+ return impl_->message_data_list_.size() -1;
+ }
+//}}}
+//{{{ massage_next
+ int Environment::message_next(int id, const tstring& text)
+ {
+ DEBUG_PRINT("message_next(" << id << "," << text << ")");
+ std::shared_ptr<mof::script::MessageData>& data = impl_->message_data_list_.at(id);
+ data->message_->addPage(text);
+ return data->message_->nextPage();
+ }
+//}}}
+//{{{ menu_create
+ int Environment::menu_create
+ (
+ const mof::tstring& title,
+ const std::vector<mof::tstring>& items,
+ const GameData::entry_t& style
+ )
+ {
+ using namespace mof::script;
+ using namespace boost;
+
+ DEBUG_PRINT("menu_create(" << title << ")");
+ std::shared_ptr<MenuData> data = std::shared_ptr<MenuData>(create_menu_data(title, items, style).release());
+ impl_->menu_data_list_.push_back(data);
+ return impl_->menu_data_list_.size() -1;
+ }
+//}}}
+//{{{ menu_move_cursor
+ int Environment::menu_move_cursor(int id, MoveDirection direction)
+ {
+ using namespace mof::script;
+ using namespace boost;
+
+ DEBUG_PRINT(format("menu_move_cursor(%d, %d)") % id % direction);
+ auto& data = impl_->menu_data_list_.at(id);
+ auto& sound_data = impl_->sound_data_list_.at(impl_->property_map_["system.menu.move_cursor_sound"]);
+ int prev_index = data->menu_->getSelectedIndex();
+ mof::FrameNumber period;
+ switch (direction) {
+ case MOVE_UP :
+ period = data->menu_->up();
+ break;
+ case MOVE_DOWN :
+ period = data->menu_->down();
+ break;
+ case MOVE_LEFT :
+ period = data->menu_->left();
+ break;
+ case MOVE_RIGHT :
+ period = data->menu_->right();
+ break;
+ default:
+ return 0;
+ }
+ if (data->menu_->getSelectedIndex() != prev_index) {
+ sound_data->sound_->stop();
+ sound_data->sound_->play(sound_data->streaming_);
+ }
+ return period;
+ }
+//}}}
+//{{{ menu_select
+ int Environment::menu_select(int id)
+ {
+ using namespace mof::script;
+ using namespace boost;
+
+ DEBUG_PRINT(format("menu_select(%d)") % id);
+ auto& data = impl_->menu_data_list_.at(id);
+ return data->menu_->performAction();
+ }
+//}}}
+//{{{ menu_get_current
+ int Environment::menu_get_current(int id)
+ {
+ using namespace mof::script;
+ using namespace boost;
+
+ DEBUG_PRINT(format("menu_get_current(%d)") % id);
+ auto& data = impl_->menu_data_list_.at(id);
+ DEBUG_PRINT(data->menu_->getSelectedIndex());
+ return data->menu_->getSelectedIndex();
+ }
+//}}}
+//{{{ wait_for_key
+ void Environment::wait_for_key(mof::InputReceiver::Key key)
+ {
+ DEBUG_PRINT("wait_for_key(" << key << ")");
+ bool& waiting = impl_->waiting_;
+ impl_->scheduler_.addEvent
+ (
+ new mof::OnceEventCondition(new mof::KeyPressedEventCondition(key, impl_->input_)),
+ [&waiting](){waiting = false;}
+ );
+ impl_->waiting_ = true;
+ }
+//}}}
+//{{{ wait_frame
+ void Environment::wait_frame(size_t frame)
+ {
+ DEBUG_PRINT("wait_frame(" << frame << ")");
+ if (frame == 0)return;
+ bool& waiting = impl_->waiting_;
+ impl_->scheduler_.addEvent(frame, [&waiting](){waiting = false;});// set waiting_ false after 'frame'
+ impl_->waiting_ = true;
+ }
+//}}}
+//{{{ get_last_key
+ mof::InputReceiver::Key Environment::get_last_key()
+ {
+ //TODO 複数同時をtimestampで識別
+ DEBUG_PRINT("get_last_key()");
+ for (int key = mof::InputReceiver::BEGIN + 1; key < mof::InputReceiver::ANY; ++key) {
+ if (impl_->input_->testKeyState(static_cast<mof::InputReceiver::Key>(key))) {
+ return static_cast<mof::InputReceiver::Key>(key);// 最初に見つかったものを選ぶ
+ }
+ }
+ return mof::InputReceiver::END;// 何も入力されていないとき
+ }
+//}}}
+//{{{ sound_create
+ int Environment::sound_create(const mof::tstring& filepath)
+ {
+ using namespace mof::script;
+ using namespace boost;
+
+ //TODO キャッシュ
+
+ DEBUG_PRINT("sound_create(" << filepath << ")");
+ auto ptr = mof::sound::SoundDevice::create_static_sound(filepath);
+ //TODO 分岐
+ auto data = std::make_shared<SoundData>();
+ data->sound_ = std::shared_ptr<mof::SoundBuffer>(ptr.release());
+ data->streaming_ = false;
+ impl_->sound_data_list_.push_back(data);
+ return impl_->sound_data_list_.size() -1;
+ }
+//}}}
+//{{{ sound_play
+ void Environment::sound_play(int id)
+ {
+ using namespace mof::script;
+ using namespace boost;
+
+ DEBUG_PRINT("sound_play(" << id << ")");
+ impl_->sound_data_list_.at(id)->sound_->play(false);
+ }
+//}}}
+//{{{ load_game_data
+ GameData::ptr Environment::load_game_data(const mof::tstring& resource_path)
+ {
+ return get_game_data(resource_path);
+ }
+//}}}
+//{{{ print_debug
+ void Environment::print_debug(const mof::tstring& message)
+ {
+ DEBUG_PRINT(message);
+ }
+//}}}
+//{{{ picture_create
+ int Environment::picture_create(const mof::tstring& filepath)
+ {
+ using namespace mof::script;
+ using namespace boost;
+
+ DEBUG_PRINT("picture_create(" << filepath << ")");
+ auto data = std::make_shared<PictureData>();
+ data->sprite_ =
+ std::make_shared<Sprite>
+ (
+ std::make_shared<mof::Texture>(filepath),
+ mof::Rectangle<mof::real>(0, 0, 1, 1)
+ );
+ impl_->picture_data_list_.push_back(data);// TODO 再利用
+ return impl_->picture_data_list_.size() -1;
+
+ }
+//}}}
+//{{{ particlegen_create
+ int Environment::particlegen_create()
+ {
+ using namespace mof::script;
+ using namespace boost;
+
+ DEBUG_PRINT("particlegen_create()");
+ //DEBUG_PRINT("picture_create(" << filepath << ")");
+ auto data = std::make_shared<ParticlegenData>();
+ data->particlegen_ = std::make_shared<mof::particlegen>();
+ data->particlegen_->world_transform() << data->position_ref_.makeRef(Matrix3D::createIdentity());
+ impl_->particlegen_data_list_.push_back(data);// TODO 再利用
+ return impl_->particlegen_data_list_.size() -1;
+
+ }
+//}}}
+// methods for common objects
+//{{{ show
+int Environment::show(int id, const mof::tstring& class_path)
+{
+ using namespace mof::script;
+ using namespace boost;
+
+ if (class_path == "menu") {
+ DEBUG_PRINT("menu_show(" << id << ")");
+ std::shared_ptr<MenuData>& data = impl_->menu_data_list_.at(id);
+ return data->frame_->show();
+ }
+ else if (class_path == "message") {
+ DEBUG_PRINT("message_show(" << id << ")");
+ std::shared_ptr<mof::script::MessageData>& data = impl_->message_data_list_.at(id);
+ return data->frame_->show();
+ }
+ else throw std::invalid_argument("unknown class path:" + class_path);
+}
+//}}}
+//{{{ hide
+int Environment::hide(int id, const mof::tstring& class_path)
+{
+ using namespace mof::script;
+ using namespace boost;
+
+ if (class_path == "menu") {
+ DEBUG_PRINT("menu_hide(" << id << ")");
+ std::shared_ptr<MenuData>& data = impl_->menu_data_list_.at(id);
+ return data->frame_->hide();
+ }
+ else if (class_path == "message") {
+ DEBUG_PRINT("message_hide(" << id << ")");
+ std::shared_ptr<mof::script::MessageData>& data = impl_->message_data_list_.at(id);
+ return data->frame_->hide();
+ }
+ else throw std::invalid_argument("unknown class path:" + class_path);
+}
+//}}}
+//{{{ dispose
+void Environment::dispose(int id, const mof::tstring& class_path)
+{
+ using namespace mof::script;
+ using namespace boost;
+
+ if (class_path == "menu") {
+ DEBUG_PRINT("menu_dispose(" << id << ")");
+ impl_->menu_data_list_.at(id) = std::shared_ptr<MenuData>();// NULLに設定
+ }
+ else if (class_path == "message") {
+ DEBUG_PRINT("message_dispose(" << id << ")");
+ impl_->message_data_list_.at(id) = std::shared_ptr<MessageData>();// NULLに設定
+ }
+ else if (class_path == "picture") {
+ DEBUG_PRINT("picture_dispose(" << id << ")");
+ impl_->picture_data_list_.at(id) = std::shared_ptr<PictureData>();// NULLに設定
+ }
+ else if (class_path == "particlegen") {
+ DEBUG_PRINT("particlegen_dispose(" << id << ")");
+ impl_->particlegen_data_list_.at(id) = std::shared_ptr<ParticlegenData>();// NULLに設定
+ }
+ else if (class_path == "sound") {
+ DEBUG_PRINT("sound_dispose(" << id << ")");
+ impl_->sound_data_list_.at(id) = std::shared_ptr<SoundData>();// NULLに設定
+ }
+ else throw std::invalid_argument("unknown class path:" + class_path);
+}
+//}}}
+//{{{ get_properties
+ GameData::ptr Environment::get_properties(int id, const mof::tstring& class_path)
+ {
+ using namespace mof::script;
+ using namespace boost;
+ GameData::ptr game_data = std::make_shared<GameData>();
+ game_data->data_.resize(1);
+ GameData::entry_t& e = game_data->data_.front();
+
+ if (class_path == "menu") {
+ DEBUG_PRINT("get_property(" << id << class_path << ")");
+ std::shared_ptr<MenuData>& data = impl_->menu_data_list_.at(id);
+ Vector2D v = data->frame_->getView()->getPreferredSize();
+ e["preferred_size"] = (format("%d,%d") % v.x % v.y).str();
+ Vector2D pos = data->frame_->getView()->getPositionStream().value();
+ e["position2"] = (format("%d,%d") % pos.x % pos.y).str();
+ }
+ else if (class_path == "message") {
+ DEBUG_PRINT("get_property(" << id << class_path << ")");
+ std::shared_ptr<MessageData>& data = impl_->message_data_list_.at(id);
+ Vector2D v = data->frame_->getView()->getPreferredSize();
+ e["preferred_size"] = (format("%d,%d") % v.x % v.y).str();
+ Vector2D pos = data->frame_->getView()->getPositionStream().value();
+ e["position2"] = (format("%d,%d") % pos.x % pos.y).str();
+ }
+ else if (class_path == "picture") {
+ DEBUG_PRINT("get_property(" << id << class_path << ")");
+ std::shared_ptr<PictureData>& data = impl_->picture_data_list_.at(id);
+ Vector2D v = data->sprite_->getPreferredSize();
+ e["preferred_size"] = (format("%d,%d") % v.x % v.y).str();
+ Vector2D pos = data->sprite_->getPositionStream().value();
+ e["position2"] = (format("%d,%d") % pos.x % pos.y).str();
+ }
+
+ else throw std::invalid_argument("unknown class path:" + class_path);
+
+ return game_data;
+ }
+//}}}
+//{{{ set_color_behavior
+ void Environment::set_color_behavior(int id, const mof::tstring& class_path, const Manipulator<Color4f>::ptr& seq, mof::FrameNumber period)
+ {
+ using namespace boost::algorithm;
+ DEBUG_PRINT("set_color_behavior(" << ")");
+
+ std::vector<mof::tstring> splited_list;
+ split(splited_list, class_path, is_any_of("."));
+ if (splited_list.front() == "picture") {
+ auto picture = impl_->picture_data_list_.at(id);
+ picture->sprite_->setColorStream(ColorStream(seq));
+ return;
+ }
+ else if (splited_list.front() == "menu") {
+ if (splited_list.at(1) == "open") {
+ auto menu = impl_->menu_data_list_.at(id);
+ menu->frame_->setBehaviorOnColor(mof::widget::Frame::FRAME_OPEN, seq, period);
+ return;
+ }
+ else if (splited_list.at(1) == "close") {
+ auto menu = impl_->menu_data_list_.at(id);
+ menu->frame_->setBehaviorOnColor(mof::widget::Frame::FRAME_CLOSE, seq, period);
+ return;
+ }
+
+ }
+ else if (splited_list.front() == "message") {
+ if (splited_list.at(1) == "open") {
+ auto message = impl_->message_data_list_.at(id);
+ message->frame_->setBehaviorOnColor(mof::widget::Frame::FRAME_OPEN, seq, period);
+ return;
+ }
+ else if (splited_list.at(1) == "close") {
+ auto message = impl_->message_data_list_.at(id);
+ message->frame_->setBehaviorOnColor(mof::widget::Frame::FRAME_CLOSE, seq, period);
+ return;
+ }
+
+ }
+
+
+
+ throw std::logic_error("unknown class_path:" + class_path);
+ }
+//}}}
+//{{{ set_position_behavior
+ void Environment::set_position_behavior(int id, const mof::tstring& class_path, const Manipulator<Vector2D>::ptr& seq, mof::FrameNumber period)
+ {
+ using namespace boost::algorithm;
+ DEBUG_PRINT("set_position_behavior(" << ")");
+
+ std::vector<mof::tstring> splited_list;
+ split(splited_list, class_path, is_any_of("."));
+ if (splited_list.front() == "picture") {
+ auto picture = impl_->picture_data_list_.at(id);
+ picture->sprite_->setPositionStream(Vector2DStream(seq));
+ return;
+ }
+ else if (splited_list.front() == "menu") {
+ if (splited_list.at(1) == "open") {
+ auto menu = impl_->menu_data_list_.at(id);
+ menu->frame_->setBehaviorOnPosition(mof::widget::Frame::FRAME_OPEN, seq, period);
+ return;
+ }
+ else if (splited_list.at(1) == "close") {
+ auto menu = impl_->menu_data_list_.at(id);
+ menu->frame_->setBehaviorOnPosition(mof::widget::Frame::FRAME_CLOSE, seq, period);
+ return;
+ }
+
+ }
+ else if (splited_list.front() == "message") {
+ if (splited_list.at(1) == "open") {
+ auto message = impl_->message_data_list_.at(id);
+ message->frame_->setBehaviorOnPosition(mof::widget::Frame::FRAME_OPEN, seq, period);
+ return;
+ }
+ else if (splited_list.at(1) == "close") {
+ auto message = impl_->message_data_list_.at(id);
+ message->frame_->setBehaviorOnPosition(mof::widget::Frame::FRAME_CLOSE, seq, period);
+ return;
+ }
+ }
+
+
+ throw std::logic_error("unknown class_path:" + class_path);
+ }
+//}}}
+//{{{ set_position_behavior
+ void Environment::set_position_behavior(int id, const mof::tstring& class_path, const Manipulator<Vector3D>::ptr& seq, mof::FrameNumber period)
+ {
+ using namespace boost::algorithm;
+ using namespace mof;
+ DEBUG_PRINT("set_position_behavior(" << ")");
+
+ std::vector<mof::tstring> splited_list;
+ split(splited_list, class_path, is_any_of("."));
+ if (splited_list.front() == "particlegen") {
+ auto p = impl_->particlegen_data_list_.at(id);
+ p->position_ref_.replace(0, std::make_shared<Translation3D>(seq));
+ return;
+ }
+
+
+ throw std::logic_error("unknown class_path:" + class_path);
+ }
+//}}}
+//{{{ set_size_behavior
+ void Environment::set_size_behavior(int id, const mof::tstring& class_path, const Manipulator<Vector2D>::ptr& seq, mof::FrameNumber period)
+ {
+ using namespace boost::algorithm;
+ DEBUG_PRINT("set_position_behavior(" << ")");
+
+ std::vector<mof::tstring> splited_list;
+ split(splited_list, class_path, is_any_of("."));
+ if (splited_list.front() == "picture") {
+ auto picture = impl_->picture_data_list_.at(id);
+ picture->sprite_->setSizeStream(Vector2DStream(seq));
+ return;
+ }
+ else if (splited_list.front() == "menu") {
+ if (splited_list.at(1) == "open") {
+ auto menu = impl_->menu_data_list_.at(id);
+ menu->frame_->setBehaviorOnSize(mof::widget::Frame::FRAME_OPEN, seq, period);
+ return;
+ }
+ else if (splited_list.at(1) == "close") {
+ auto menu = impl_->menu_data_list_.at(id);
+ menu->frame_->setBehaviorOnSize(mof::widget::Frame::FRAME_CLOSE, seq, period);
+ return;
+ }
+
+ }
+ else if (splited_list.front() == "message") {
+ if (splited_list.at(1) == "open") {
+ auto message = impl_->message_data_list_.at(id);
+ message->frame_->setBehaviorOnSize(mof::widget::Frame::FRAME_OPEN, seq, period);
+ return;
+ }
+ else if (splited_list.at(1) == "close") {
+ auto message = impl_->message_data_list_.at(id);
+ message->frame_->setBehaviorOnSize(mof::widget::Frame::FRAME_CLOSE, seq, period);
+ return;
+ }
+ }
+
+ throw std::logic_error("unknown class_path:" + class_path);
+ }
+//}}}
+
+//{{{ update
+ void Environment::update()
+ {
+ using namespace mof::script;
+ using namespace std;
+ impl_->scheduler_.update();
+ foreach (auto data, impl_->message_data_list_) {
+ if (data.get()) data->frame_->update();
+ }
+ foreach (auto data, impl_->menu_data_list_) {
+ if (data.get()) data->frame_->update();
+ }
+ foreach (auto data, impl_->sound_data_list_) {
+ if (data.get()) data->sound_->update();
+ }
+
+ foreach (auto data, impl_->picture_data_list_) {
+ if (data.get()) data->sprite_->update();
+ }
+
+ foreach (auto data, impl_->particlegen_data_list_) {
+ if (data) data->particlegen_->update();
+ }
+
+
+ }
+//}}}
+//{{{ draw
+ void Environment::draw() const
+ {
+ using namespace mof::script;
+ using namespace std;
+
+ mof::GraphicsDevice::setAlphaBlendingMode(mof::GraphicsDevice::BLENDING_MODE_ADD);
+ mof::GraphicsDevice::setZBuffer(false);
+ foreach (auto& data, impl_->particlegen_data_list_) {
+ if (data) {
+ auto& list = data->particlegen_->drawables();
+ foreach (auto p, list) p->draw();
+ }
+
+ }
+ mof::GraphicsDevice::setZBuffer(true);
+ mof::GraphicsDevice::setAlphaBlendingMode(mof::GraphicsDevice::BLENDING_MODE_ALPHA);
+
+ foreach (auto data, impl_->picture_data_list_) {
+ if (data.get()) data->sprite_->draw();
+ }
+
+
+ foreach (auto data, impl_->message_data_list_) {
+ if (data.get()) data->frame_->getView()->draw();
+ }
+
+ foreach (auto data, impl_->menu_data_list_) {
+ if (data.get()) data->frame_->getView()->draw();
+ }//TODO ソート
+
+
+ }
+//}}}
+//{{{ isWaiting
+ bool Environment::isWaiting() const
+ {
+ return impl_->waiting_;
+ }
+//}}}
+}
+}
-#pragma once\r
-#include <mof/script/CommandSet.hpp>\r
-#include <mof/script/ObjectData.hpp>\r
-#include <memory>\r
-#include <vector>\r
- \r
-namespace mof\r
-{\r
- class InputReceiver;\r
-namespace script\r
-{\r
-\r
- class Environment : public CommandSet\r
- {\r
- public:\r
- \r
- Environment(std::shared_ptr<mof::InputReceiver> input);\r
- virtual ~Environment();\r
-\r
- virtual int message_create(const mof::tstring& title, const GameData::entry_t& style);\r
- \r
- virtual int message_next(int id, const tstring& text);\r
- \r
- virtual void wait_for_key(mof::InputReceiver::Key key);\r
- \r
- virtual mof::InputReceiver::Key get_last_key();\r
- \r
- virtual void wait_frame(size_t frame);\r
-\r
- virtual int menu_create(const mof::tstring& title, const std::vector<mof::tstring>& items, const GameData::entry_t& style);\r
-\r
- virtual int menu_move_cursor(int id, MoveDirection direction);\r
- \r
- virtual int menu_select(int id);\r
- \r
- virtual int menu_get_current(int id);\r
- \r
- virtual int sound_create(const mof::tstring& filepath);\r
- \r
- virtual void sound_play(int id);\r
- \r
- virtual GameData::ptr load_game_data(const mof::tstring& resource_path);\r
- virtual void print_debug(const mof::tstring& message);\r
-\r
- virtual int picture_create(const mof::tstring& filepath);\r
- \r
- virtual int particlegen_create();\r
- \r
- // 共通のメソッド\r
- virtual int show(int id, const mof::tstring& class_path);\r
- \r
- virtual int hide(int id, const mof::tstring& class_path);\r
- \r
- virtual void dispose(int id, const mof::tstring& class_path);\r
- \r
- virtual GameData::ptr get_properties(int id, const mof::tstring& class_path);\r
-\r
- virtual void set_color_behavior(int id, const mof::tstring& class_path, const Manipulator<Color4f>::ptr& seq, mof::FrameNumber period);\r
- \r
- virtual void set_position_behavior(int id, const mof::tstring& class_path, const Manipulator<Vector2D>::ptr& seq, mof::FrameNumber period);\r
- \r
- virtual void set_position_behavior(int id, const mof::tstring& class_path, const Manipulator<Vector3D>::ptr& seq, FrameNumber period);\r
- \r
- virtual void set_size_behavior(int id, const mof::tstring& class_path, const Manipulator<Vector2D>::ptr& seq, mof::FrameNumber period);\r
-\r
- void update();\r
-\r
- void draw() const;\r
-\r
- bool isWaiting() const;\r
-\r
- protected: \r
- virtual std::unique_ptr<MessageData> \r
- create_message_data\r
- (\r
- const mof::tstring& title, const GameData::entry_t& style\r
- ) = 0;\r
-\r
- virtual std::unique_ptr<MenuData> \r
- create_menu_data\r
- (\r
- const mof::tstring& title, const std::vector<mof::tstring>& items, const GameData::entry_t& style\r
- ) = 0;\r
-\r
- virtual GameData::ptr get_game_data(const mof::tstring& resource_path) = 0;\r
-\r
- private:\r
- struct Impl;\r
- std::unique_ptr<Impl> impl_;\r
- };\r
-\r
-}\r
-}\r
-\r
+#pragma once
+#include <mof/script/CommandSet.hpp>
+#include <mof/script/ObjectData.hpp>
+#include <memory>
+#include <vector>
+
+namespace mof
+{
+ class InputReceiver;
+namespace script
+{
+
+ class Environment : public CommandSet
+ {
+ public:
+
+ Environment(std::shared_ptr<mof::InputReceiver> input);
+ virtual ~Environment();
+
+ virtual int message_create(const mof::tstring& title, const GameData::entry_t& style);
+
+ virtual int message_next(int id, const tstring& text);
+
+ virtual void wait_for_key(mof::InputReceiver::Key key);
+
+ virtual mof::InputReceiver::Key get_last_key();
+
+ virtual void wait_frame(size_t frame);
+
+ virtual int menu_create(const mof::tstring& title, const std::vector<mof::tstring>& items, const GameData::entry_t& style);
+
+ virtual int menu_move_cursor(int id, MoveDirection direction);
+
+ virtual int menu_select(int id);
+
+ virtual int menu_get_current(int id);
+
+ virtual int sound_create(const mof::tstring& filepath);
+
+ virtual void sound_play(int id);
+
+ virtual GameData::ptr load_game_data(const mof::tstring& resource_path);
+ virtual void print_debug(const mof::tstring& message);
+
+ virtual int picture_create(const mof::tstring& filepath);
+
+ virtual int particlegen_create();
+
+ // 共通のメソッド
+ virtual int show(int id, const mof::tstring& class_path);
+
+ virtual int hide(int id, const mof::tstring& class_path);
+
+ virtual void dispose(int id, const mof::tstring& class_path);
+
+ virtual GameData::ptr get_properties(int id, const mof::tstring& class_path);
+
+ virtual void set_color_behavior(int id, const mof::tstring& class_path, const Manipulator<Color4f>::ptr& seq, mof::FrameNumber period);
+
+ virtual void set_position_behavior(int id, const mof::tstring& class_path, const Manipulator<Vector2D>::ptr& seq, mof::FrameNumber period);
+
+ virtual void set_position_behavior(int id, const mof::tstring& class_path, const Manipulator<Vector3D>::ptr& seq, FrameNumber period);
+
+ virtual void set_size_behavior(int id, const mof::tstring& class_path, const Manipulator<Vector2D>::ptr& seq, mof::FrameNumber period);
+
+ void update();
+
+ void draw() const;
+
+ bool isWaiting() const;
+
+ protected:
+ virtual std::unique_ptr<MessageData>
+ create_message_data
+ (
+ const mof::tstring& title, const GameData::entry_t& style
+ ) = 0;
+
+ virtual std::unique_ptr<MenuData>
+ create_menu_data
+ (
+ const mof::tstring& title, const std::vector<mof::tstring>& items, const GameData::entry_t& style
+ ) = 0;
+
+ virtual GameData::ptr get_game_data(const mof::tstring& resource_path) = 0;
+
+ private:
+ struct Impl;
+ std::unique_ptr<Impl> impl_;
+ };
+
+}
+}
+
-#pragma once\r
-#include <memory>\r
-#include <vector>\r
-#include <list>\r
-#include <map>\r
-#include <mof/tstring.hpp>\r
-#include <mof/Board.hpp>\r
-#include <mof/particlegen.hpp>\r
-#include <mof/stream/ReferenceWrapper.hpp>\r
-\r
-namespace mof\r
-{\r
- class Sprite;\r
- class particlegen;\r
-namespace widget\r
-{\r
- class Message;\r
- class Menu;\r
- class Frame;\r
-}\r
- class SoundBuffer;\r
-\r
-namespace script\r
-{\r
-\r
- struct MessageData\r
- {\r
- std::shared_ptr<mof::widget::Message> message_;\r
- std::shared_ptr<mof::widget::Frame> frame_;// Drawer\r
- };\r
- \r
- struct MenuData\r
- {\r
- std::shared_ptr<mof::widget::Menu> menu_;\r
- std::shared_ptr<mof::widget::Frame> frame_;// Drawer\r
-\r
- };\r
-\r
- struct PictureData\r
- {\r
- std::shared_ptr<mof::Sprite> sprite_;\r
- typedef std::shared_ptr<PictureData> ptr;\r
- };\r
- \r
- struct ParticlegenData\r
- {\r
- mof::particlegen::ptr particlegen_;\r
- ReferenceWrapper<Matrix3D> position_ref_;\r
- typedef std::shared_ptr<ParticlegenData> ptr;\r
- };\r
-\r
-\r
- struct SoundData\r
- {\r
- std::shared_ptr<mof::SoundBuffer> sound_;\r
- bool streaming_;\r
- };\r
-\r
- struct GameData // TODO rename\r
- {\r
- std::vector<std::map<mof::tstring, mof::tstring>> data_;\r
- typedef std::shared_ptr<GameData> ptr;\r
- typedef std::map<mof::tstring, mof::tstring> entry_t;\r
- typedef std::pair<mof::tstring, mof::tstring> pair_t;\r
-\r
- friend std::ostream& operator <<(std::ostream& os , const GameData& obj);\r
- };\r
-\r
-\r
-}// namespace script\r
-}// namespace mof\r
+#pragma once
+#include <memory>
+#include <vector>
+#include <list>
+#include <map>
+#include <mof/tstring.hpp>
+#include <mof/Board.hpp>
+#include <mof/particlegen.hpp>
+#include <mof/stream/ReferenceWrapper.hpp>
+
+namespace mof
+{
+ class Sprite;
+ class particlegen;
+namespace widget
+{
+ class Message;
+ class Menu;
+ class Frame;
+}
+ class SoundBuffer;
+
+namespace script
+{
+
+ struct MessageData
+ {
+ std::shared_ptr<mof::widget::Message> message_;
+ std::shared_ptr<mof::widget::Frame> frame_;// Drawer
+ };
+
+ struct MenuData
+ {
+ std::shared_ptr<mof::widget::Menu> menu_;
+ std::shared_ptr<mof::widget::Frame> frame_;// Drawer
+
+ };
+
+ struct PictureData
+ {
+ std::shared_ptr<mof::Sprite> sprite_;
+ typedef std::shared_ptr<PictureData> ptr;
+ };
+
+ struct ParticlegenData
+ {
+ mof::particlegen::ptr particlegen_;
+ ReferenceWrapper<Matrix3D> position_ref_;
+ typedef std::shared_ptr<ParticlegenData> ptr;
+ };
+
+
+ struct SoundData
+ {
+ std::shared_ptr<mof::SoundBuffer> sound_;
+ bool streaming_;
+ };
+
+ struct GameData // TODO rename
+ {
+ std::vector<std::map<mof::tstring, mof::tstring>> data_;
+ typedef std::shared_ptr<GameData> ptr;
+ typedef std::map<mof::tstring, mof::tstring> entry_t;
+ typedef std::pair<mof::tstring, mof::tstring> pair_t;
+
+ friend std::ostream& operator <<(std::ostream& os , const GameData& obj);
+ };
+
+
+}// namespace script
+}// namespace mof
-#include <mof/script/lua_state.hpp>\r
-#include <mof/script/CommandSet.hpp>\r
-#include <mof/ConsoleIO.hpp>\r
-#include <mof/streams.hpp>\r
-#include <mof/utilities.hpp>\r
-#include <mof/script/seq_parser.hpp>\r
-#include <boost/algorithm/string.hpp>\r
-\r
-namespace mof\r
-{\r
-namespace script\r
-{\r
- lua_state lua_state::singleton_lua;\r
-//{{{ unpack_style\r
- GameData::entry_t unpack_style(const mof::tstring& style)\r
- {\r
- using namespace boost::algorithm;\r
- using namespace std;\r
-\r
- GameData::entry_t entry;\r
- vector<mof::tstring> style_items;\r
- split(style_items, style, is_any_of(";"));\r
- vector<mof::tstring> key_value;\r
- foreach (mof::tstring& item, style_items) {\r
- key_value.clear();\r
- split(key_value, item, is_any_of("="));\r
- if (key_value.size() != 2) continue;\r
- entry[key_value[0]] = key_value[1];\r
- }\r
- return entry;\r
- }\r
-//}}}\r
-//{{{ binders *\r
- int message_create(const tstring& title, const tstring& style)\r
- { \r
- return lua_state::instance().command_set()->message_create(title, unpack_style(style));\r
- }\r
- int message_next(int id, const tstring& text){ return lua_state::instance().command_set()->message_next(id, text); }\r
- void wait_for_key(mof::InputReceiver::Key key){ return lua_state::instance().command_set()->wait_for_key(key); }\r
- void wait_frame(size_t frame){ return lua_state::instance().command_set()->wait_frame(frame); }\r
- int get_last_key(){ return lua_state::instance().command_set()->get_last_key(); }\r
- //{{{ menu_create\r
- int menu_create(lua_State* l)\r
- {\r
- int n = lua_gettop(l);\r
- if(!lua_isstring(l , 1))throw std::runtime_error("invalid call");\r
- if(!lua_istable(l , 2))throw std::runtime_error("invalid call");\r
- if(!lua_isstring(l , 3))throw std::runtime_error("invalid call");\r
- mof::tstring title = lua_tostring(l , 1);\r
- mof::tstring style = lua_tostring(l , 3);\r
- \r
- std::vector<mof::tstring> items;\r
- for (int i = 1 ; ; i++) {\r
- lua_pushnumber(l , i);\r
- lua_gettable(l , 2);\r
- if (lua_isnil(l , -1)) break;\r
- if (!lua_isstring(l , -1)) throw std::runtime_error("invalid call");\r
- items.push_back(lua_tostring(l , -1));\r
- lua_pop(l , 1);\r
- }\r
- lua_pop(l , n);\r
- if (items.empty()) items.push_back("aaa");\r
-\r
- int id = lua_state::instance().command_set()->menu_create(title, items, unpack_style(style));\r
- lua_pushnumber(l, id);\r
- return 1;\r
- } \r
- //}}}\r
- int menu_move_cursor(int id, CommandSet::MoveDirection direction){ return lua_state::instance().command_set()->menu_move_cursor(id, direction); }\r
- int menu_get_current(int id){ return lua_state::instance().command_set()->menu_get_current(id); }\r
- int menu_select(int id){ return lua_state::instance().command_set()->menu_select(id); }\r
- int sound_create(const mof::tstring& filepath){ return lua_state::instance().command_set()->sound_create(mof::tstring(filepath)); }\r
- void sound_play(int id){ return lua_state::instance().command_set()->sound_play(id); }\r
- //{{{ load_game_data\r
- int load_game_data(lua_State* l)\r
- {\r
- int n = lua_gettop(l);\r
- if(!lua_isstring(l , 1))throw std::runtime_error("invalid call");\r
- GameData::ptr p = lua_state::instance().command_set()->load_game_data(lua_tostring(l, 1));\r
- lua_pop(l, n);\r
- \r
- \r
- lua_newtable(l);\r
- int tab_index1 = lua_gettop(l);\r
- std::vector<mof::tstring> items;\r
- for (int i = 0; i < p->data_.size(); ++i) {\r
- lua_pushnumber(l, i+1);// lua配列の添え字は1から\r
- lua_newtable(l);\r
- int tab_index2 = lua_gettop(l);\r
- for (auto itr = p->data_[i].begin(); itr != p->data_[i].end(); ++itr) {\r
- lua_pushstring(l, itr->first.c_str());\r
- lua_pushstring(l, itr->second.c_str());\r
- lua_settable(l , tab_index2);\r
- }\r
- lua_settable(l , tab_index1);\r
- }\r
- return 1;\r
-\r
- }\r
- //}}}\r
- void print_debug(const mof::tstring& filepath){ lua_state::instance().command_set()->print_debug(mof::tstring(filepath)); }\r
- int picture_create(const mof::tstring& filepath){ return lua_state::instance().command_set()->picture_create(filepath); }\r
- int particlegen_create(){ return lua_state::instance().command_set()->particlegen_create(); }\r
- //{{{ object_set_behavior\r
- int object_set_behavior(lua_State* l)\r
- {\r
- int n = lua_gettop(l);\r
- if (!lua_isnumber(l , 1)) throw std::runtime_error("invalid call");\r
- if (!lua_isstring(l , 2)) throw std::runtime_error("invalid call");\r
- if (!lua_istable(l , 3)) throw std::runtime_error("invalid call");\r
- if (!lua_isnumber(l , 4)) throw std::runtime_error("invalid call");\r
- int id = lua_tonumber(l , 1);\r
- mof::tstring target = lua_tostring(l , 2);\r
- int period = lua_tonumber(l, 4);\r
- \r
- using namespace boost::algorithm;\r
- std::vector<mof::tstring> splited_list;\r
- split(splited_list, target, is_any_of("."));\r
- if (splited_list.back() == "color") {\r
- seq_parser<Color4f> parser;\r
- lua_state::instance().command_set()->set_color_behavior(id, target, parser.parse(l, 3), period);\r
- }\r
- else if (splited_list.back() == "position2") {\r
- seq_parser<Vector2D> parser;\r
- lua_state::instance().command_set()->set_position_behavior(id, target, parser.parse(l, 3), period);\r
- }\r
- else if (splited_list.back() == "position3") {\r
- seq_parser<Vector3D> parser;\r
- lua_state::instance().command_set()->set_position_behavior(id, target, parser.parse(l, 3), period);\r
- }\r
- else if (splited_list.back() == "size2") {\r
- seq_parser<Vector2D> parser;\r
- lua_state::instance().command_set()->set_size_behavior(id, target, parser.parse(l, 3), period);\r
- }\r
-\r
-\r
- else {\r
- throw std::logic_error("unknown target:" + target);\r
- }\r
-\r
- return 0;\r
- }\r
- //}}}\r
- int show(int id, const tstring& class_path){ return lua_state::instance().command_set()->show(id, class_path); }\r
- int hide(int id, const tstring& class_path){ return lua_state::instance().command_set()->hide(id, class_path); }\r
- void dispose(int id, const tstring& class_path){ lua_state::instance().command_set()->dispose(id, class_path); }\r
- void get_property(int id, const tstring& class_path){ lua_state::instance().command_set()->dispose(id, class_path); }\r
- //{{{ get_properties\r
- int get_properties(lua_State* l)\r
- {\r
- int n = lua_gettop(l);\r
- if (!lua_isnumber(l , 1)) throw std::runtime_error("invalid call");\r
- if(!lua_isstring(l , 2))throw std::runtime_error("invalid call");\r
- int id = lua_tonumber(l , 1);\r
- mof::tstring class_path = lua_tostring(l , 2);\r
-\r
- GameData::ptr p = lua_state::instance().command_set()->get_properties(id, class_path);\r
- lua_pop(l, n);\r
- \r
- assert(p->data_.size() == 1);\r
- lua_newtable(l);\r
- int tab_index1 = lua_gettop(l);\r
- std::vector<mof::tstring> items;\r
-\r
- for (auto itr = p->data_[0].begin(); itr != p->data_[0].end(); ++itr) {\r
- lua_pushstring(l, itr->first.c_str());\r
- lua_pushstring(l, itr->second.c_str());\r
- lua_settable(l , tab_index1);\r
- }\r
- return 1;\r
- }\r
- //}}}\r
-//}}}\r
-//{{{ Impl\r
- struct lua_state::Impl\r
- {\r
- lua_State* l_;\r
- std::shared_ptr<mof::script::CommandSet> commands_;\r
-\r
- Impl()\r
- : l_(NULL)\r
- {\r
- }\r
-\r
- ~Impl()\r
- {\r
- if(l_)lua_close(l_);\r
- }\r
- };\r
-//}}}\r
-//{{{ constructor\r
- lua_state::lua_state()\r
- : impl_(new Impl())\r
- { \r
- impl_->l_ = lua_open();\r
- luaL_openlibs(impl_->l_);\r
- luabind::open(impl_->l_);\r
- }\r
-//}}}\r
-//{{{ destructor\r
- lua_state::~lua_state(){}\r
-//}}} destructor\r
-//{{{ bind *\r
- void lua_state::bind(std::shared_ptr<mof::script::CommandSet> commands)\r
- {\r
- impl_->commands_ = commands;\r
- luabind::module(impl_->l_)[luabind::def("messageNewImpl", &message_create)];\r
- luabind::module(impl_->l_)[luabind::def("messageNextImpl", &message_next)];\r
- luabind::module(impl_->l_)[luabind::def("waitFrameImpl", &wait_frame)];\r
- luabind::module(impl_->l_)[luabind::def("waitForKeyImpl", &wait_for_key)];\r
- luabind::module(impl_->l_)[luabind::def("getLastKeyImpl", &get_last_key)];\r
- lua_register(impl_->l_, "menuNewImpl", &menu_create);\r
- luabind::module(impl_->l_)[luabind::def("menuMoveCursorImpl", &menu_move_cursor)];\r
- luabind::module(impl_->l_)[luabind::def("menuGetCurrentImpl", &menu_get_current)];\r
- luabind::module(impl_->l_)[luabind::def("menuSelectImpl", &menu_select)];\r
- luabind::module(impl_->l_)[luabind::def("soundCreateImpl", &sound_create)];\r
- luabind::module(impl_->l_)[luabind::def("soundPlayImpl", &sound_play)];\r
- lua_register(impl_->l_, "loadGameDataImpl", &load_game_data);\r
- luabind::module(impl_->l_)[luabind::def("printDebugImpl", &print_debug)];\r
- luabind::module(impl_->l_)[luabind::def("pictureCreateImpl", &picture_create)];\r
- luabind::module(impl_->l_)[luabind::def("particlegenCreateImpl", &particlegen_create)];\r
- lua_register(impl_->l_, "objectSetBehaviorImpl", &object_set_behavior);\r
- luabind::module(impl_->l_)[luabind::def("showImpl", &show)];\r
- luabind::module(impl_->l_)[luabind::def("hideImpl", &hide)];\r
- luabind::module(impl_->l_)[luabind::def("disposeImpl", &dispose)];\r
- lua_register(impl_->l_, "objectGetPropertiesImpl", &get_properties);\r
- }\r
-//}}}\r
-//{{{ raw_lua\r
- lua_State* lua_state::raw_lua() const\r
- {\r
- return impl_->l_;\r
- }\r
-//}}}\r
-//{{{ command_set\r
- std::shared_ptr<mof::script::CommandSet>& const lua_state::command_set() const\r
- {\r
- return impl_->commands_;\r
- }\r
-//}}}\r
-//{{{ instance\r
- lua_state& lua_state::instance()\r
- {\r
- return singleton_lua;\r
- }\r
-//}}}\r
-\r
-}\r
-}\r
+#include <mof/script/lua_state.hpp>
+#include <mof/script/CommandSet.hpp>
+#include <mof/ConsoleIO.hpp>
+#include <mof/streams.hpp>
+#include <mof/utilities.hpp>
+#include <mof/script/seq_parser.hpp>
+#include <boost/algorithm/string.hpp>
+
+namespace mof
+{
+namespace script
+{
+ lua_state lua_state::singleton_lua;
+//{{{ unpack_style
+ GameData::entry_t unpack_style(const mof::tstring& style)
+ {
+ using namespace boost::algorithm;
+ using namespace std;
+
+ GameData::entry_t entry;
+ vector<mof::tstring> style_items;
+ split(style_items, style, is_any_of(";"));
+ vector<mof::tstring> key_value;
+ foreach (mof::tstring& item, style_items) {
+ key_value.clear();
+ split(key_value, item, is_any_of("="));
+ if (key_value.size() != 2) continue;
+ entry[key_value[0]] = key_value[1];
+ }
+ return entry;
+ }
+//}}}
+//{{{ binders *
+ int message_create(const tstring& title, const tstring& style)
+ {
+ return lua_state::instance().command_set()->message_create(title, unpack_style(style));
+ }
+ int message_next(int id, const tstring& text){ return lua_state::instance().command_set()->message_next(id, text); }
+ void wait_for_key(mof::InputReceiver::Key key){ return lua_state::instance().command_set()->wait_for_key(key); }
+ void wait_frame(size_t frame){ return lua_state::instance().command_set()->wait_frame(frame); }
+ int get_last_key(){ return lua_state::instance().command_set()->get_last_key(); }
+ //{{{ menu_create
+ int menu_create(lua_State* l)
+ {
+ int n = lua_gettop(l);
+ if(!lua_isstring(l , 1))throw std::runtime_error("invalid call");
+ if(!lua_istable(l , 2))throw std::runtime_error("invalid call");
+ if(!lua_isstring(l , 3))throw std::runtime_error("invalid call");
+ mof::tstring title = lua_tostring(l , 1);
+ mof::tstring style = lua_tostring(l , 3);
+
+ std::vector<mof::tstring> items;
+ for (int i = 1 ; ; i++) {
+ lua_pushnumber(l , i);
+ lua_gettable(l , 2);
+ if (lua_isnil(l , -1)) break;
+ if (!lua_isstring(l , -1)) throw std::runtime_error("invalid call");
+ items.push_back(lua_tostring(l , -1));
+ lua_pop(l , 1);
+ }
+ lua_pop(l , n);
+ if (items.empty()) items.push_back("aaa");
+
+ int id = lua_state::instance().command_set()->menu_create(title, items, unpack_style(style));
+ lua_pushnumber(l, id);
+ return 1;
+ }
+ //}}}
+ int menu_move_cursor(int id, CommandSet::MoveDirection direction){ return lua_state::instance().command_set()->menu_move_cursor(id, direction); }
+ int menu_get_current(int id){ return lua_state::instance().command_set()->menu_get_current(id); }
+ int menu_select(int id){ return lua_state::instance().command_set()->menu_select(id); }
+ int sound_create(const mof::tstring& filepath){ return lua_state::instance().command_set()->sound_create(mof::tstring(filepath)); }
+ void sound_play(int id){ return lua_state::instance().command_set()->sound_play(id); }
+ //{{{ load_game_data
+ int load_game_data(lua_State* l)
+ {
+ int n = lua_gettop(l);
+ if(!lua_isstring(l , 1))throw std::runtime_error("invalid call");
+ GameData::ptr p = lua_state::instance().command_set()->load_game_data(lua_tostring(l, 1));
+ lua_pop(l, n);
+
+
+ lua_newtable(l);
+ int tab_index1 = lua_gettop(l);
+ std::vector<mof::tstring> items;
+ for (int i = 0; i < p->data_.size(); ++i) {
+ lua_pushnumber(l, i+1);// lua配列の添え字は1から
+ lua_newtable(l);
+ int tab_index2 = lua_gettop(l);
+ for (auto itr = p->data_[i].begin(); itr != p->data_[i].end(); ++itr) {
+ lua_pushstring(l, itr->first.c_str());
+ lua_pushstring(l, itr->second.c_str());
+ lua_settable(l , tab_index2);
+ }
+ lua_settable(l , tab_index1);
+ }
+ return 1;
+
+ }
+ //}}}
+ void print_debug(const mof::tstring& filepath){ lua_state::instance().command_set()->print_debug(mof::tstring(filepath)); }
+ int picture_create(const mof::tstring& filepath){ return lua_state::instance().command_set()->picture_create(filepath); }
+ int particlegen_create(){ return lua_state::instance().command_set()->particlegen_create(); }
+ //{{{ object_set_behavior
+ int object_set_behavior(lua_State* l)
+ {
+ int n = lua_gettop(l);
+ if (!lua_isnumber(l , 1)) throw std::runtime_error("invalid call");
+ if (!lua_isstring(l , 2)) throw std::runtime_error("invalid call");
+ if (!lua_istable(l , 3)) throw std::runtime_error("invalid call");
+ if (!lua_isnumber(l , 4)) throw std::runtime_error("invalid call");
+ int id = lua_tonumber(l , 1);
+ mof::tstring target = lua_tostring(l , 2);
+ int period = lua_tonumber(l, 4);
+
+ using namespace boost::algorithm;
+ std::vector<mof::tstring> splited_list;
+ split(splited_list, target, is_any_of("."));
+ if (splited_list.back() == "color") {
+ seq_parser<Color4f> parser;
+ lua_state::instance().command_set()->set_color_behavior(id, target, parser.parse(l, 3), period);
+ }
+ else if (splited_list.back() == "position2") {
+ seq_parser<Vector2D> parser;
+ lua_state::instance().command_set()->set_position_behavior(id, target, parser.parse(l, 3), period);
+ }
+ else if (splited_list.back() == "position3") {
+ seq_parser<Vector3D> parser;
+ lua_state::instance().command_set()->set_position_behavior(id, target, parser.parse(l, 3), period);
+ }
+ else if (splited_list.back() == "size2") {
+ seq_parser<Vector2D> parser;
+ lua_state::instance().command_set()->set_size_behavior(id, target, parser.parse(l, 3), period);
+ }
+
+
+ else {
+ throw std::logic_error("unknown target:" + target);
+ }
+
+ return 0;
+ }
+ //}}}
+ int show(int id, const tstring& class_path){ return lua_state::instance().command_set()->show(id, class_path); }
+ int hide(int id, const tstring& class_path){ return lua_state::instance().command_set()->hide(id, class_path); }
+ void dispose(int id, const tstring& class_path){ lua_state::instance().command_set()->dispose(id, class_path); }
+ void get_property(int id, const tstring& class_path){ lua_state::instance().command_set()->dispose(id, class_path); }
+ //{{{ get_properties
+ int get_properties(lua_State* l)
+ {
+ int n = lua_gettop(l);
+ if (!lua_isnumber(l , 1)) throw std::runtime_error("invalid call");
+ if(!lua_isstring(l , 2))throw std::runtime_error("invalid call");
+ int id = lua_tonumber(l , 1);
+ mof::tstring class_path = lua_tostring(l , 2);
+
+ GameData::ptr p = lua_state::instance().command_set()->get_properties(id, class_path);
+ lua_pop(l, n);
+
+ assert(p->data_.size() == 1);
+ lua_newtable(l);
+ int tab_index1 = lua_gettop(l);
+ std::vector<mof::tstring> items;
+
+ for (auto itr = p->data_[0].begin(); itr != p->data_[0].end(); ++itr) {
+ lua_pushstring(l, itr->first.c_str());
+ lua_pushstring(l, itr->second.c_str());
+ lua_settable(l , tab_index1);
+ }
+ return 1;
+ }
+ //}}}
+//}}}
+//{{{ Impl
+ struct lua_state::Impl
+ {
+ lua_State* l_;
+ std::shared_ptr<mof::script::CommandSet> commands_;
+
+ Impl()
+ : l_(NULL)
+ {
+ }
+
+ ~Impl()
+ {
+ if(l_)lua_close(l_);
+ }
+ };
+//}}}
+//{{{ constructor
+ lua_state::lua_state()
+ : impl_(new Impl())
+ {
+ impl_->l_ = lua_open();
+ luaL_openlibs(impl_->l_);
+ luabind::open(impl_->l_);
+ }
+//}}}
+//{{{ destructor
+ lua_state::~lua_state(){}
+//}}} destructor
+//{{{ bind *
+ void lua_state::bind(std::shared_ptr<mof::script::CommandSet> commands)
+ {
+ impl_->commands_ = commands;
+ luabind::module(impl_->l_)[luabind::def("messageNewImpl", &message_create)];
+ luabind::module(impl_->l_)[luabind::def("messageNextImpl", &message_next)];
+ luabind::module(impl_->l_)[luabind::def("waitFrameImpl", &wait_frame)];
+ luabind::module(impl_->l_)[luabind::def("waitForKeyImpl", &wait_for_key)];
+ luabind::module(impl_->l_)[luabind::def("getLastKeyImpl", &get_last_key)];
+ lua_register(impl_->l_, "menuNewImpl", &menu_create);
+ luabind::module(impl_->l_)[luabind::def("menuMoveCursorImpl", &menu_move_cursor)];
+ luabind::module(impl_->l_)[luabind::def("menuGetCurrentImpl", &menu_get_current)];
+ luabind::module(impl_->l_)[luabind::def("menuSelectImpl", &menu_select)];
+ luabind::module(impl_->l_)[luabind::def("soundCreateImpl", &sound_create)];
+ luabind::module(impl_->l_)[luabind::def("soundPlayImpl", &sound_play)];
+ lua_register(impl_->l_, "loadGameDataImpl", &load_game_data);
+ luabind::module(impl_->l_)[luabind::def("printDebugImpl", &print_debug)];
+ luabind::module(impl_->l_)[luabind::def("pictureCreateImpl", &picture_create)];
+ luabind::module(impl_->l_)[luabind::def("particlegenCreateImpl", &particlegen_create)];
+ lua_register(impl_->l_, "objectSetBehaviorImpl", &object_set_behavior);
+ luabind::module(impl_->l_)[luabind::def("showImpl", &show)];
+ luabind::module(impl_->l_)[luabind::def("hideImpl", &hide)];
+ luabind::module(impl_->l_)[luabind::def("disposeImpl", &dispose)];
+ lua_register(impl_->l_, "objectGetPropertiesImpl", &get_properties);
+ }
+//}}}
+//{{{ raw_lua
+ lua_State* lua_state::raw_lua() const
+ {
+ return impl_->l_;
+ }
+//}}}
+//{{{ command_set
+ std::shared_ptr<mof::script::CommandSet>& const lua_state::command_set() const
+ {
+ return impl_->commands_;
+ }
+//}}}
+//{{{ instance
+ lua_state& lua_state::instance()
+ {
+ return singleton_lua;
+ }
+//}}}
+
+}
+}
-#include "CWaveFile.h"\r
-#define DXTRACE_ERR(a , b) (FALSE)\r
-\r
-//-----------------------------------------------------------------------------\r
-// Name: CWaveFile::CWaveFile()\r
-// Desc: Constructs the class. Call Open() to open a wave file for reading. \r
-// Then call Read() as needed. Calling the destructor or Close() \r
-// will close the file. \r
-//-----------------------------------------------------------------------------\r
-mof::CWaveFile::CWaveFile()\r
-{\r
- m_pwfx = NULL;\r
- m_hmmio = NULL;\r
- m_pResourceBuffer = NULL;\r
- m_dwSize = 0;\r
- m_bIsReadingFromMemory = FALSE;\r
-}\r
-\r
-\r
-\r
-\r
-//-----------------------------------------------------------------------------\r
-// Name: CWaveFile::~CWaveFile()\r
-// Desc: Destructs the class\r
-//-----------------------------------------------------------------------------\r
-mof::CWaveFile::~CWaveFile()\r
-{\r
- close();\r
-\r
- if( !m_bIsReadingFromMemory )\r
- SAFE_DELETE_ARRAY( m_pwfx );\r
-}\r
-\r
-\r
-\r
-\r
-//-----------------------------------------------------------------------------\r
-// Name: CWaveFile::Open()\r
-// Desc: Opens a wave file for reading\r
-//-----------------------------------------------------------------------------\r
-HRESULT mof::CWaveFile::open( LPTSTR strFileName, WAVEFORMATEX* pwfx, DWORD dwFlags )\r
-{\r
- HRESULT hr;\r
-\r
- m_dwFlags = dwFlags;\r
- m_bIsReadingFromMemory = FALSE;\r
-\r
- if( m_dwFlags == WAVEFILE_READ )\r
- {\r
- if( strFileName == NULL )\r
- return E_INVALIDARG;\r
- SAFE_DELETE_ARRAY( m_pwfx );\r
-\r
- m_hmmio = mmioOpen( strFileName, NULL, MMIO_ALLOCBUF | MMIO_READ );\r
-\r
- if( NULL == m_hmmio )\r
- {\r
- HRSRC hResInfo;\r
- HGLOBAL hResData;\r
- DWORD dwSize;\r
- VOID* pvRes;\r
-\r
- // Loading it as a file failed, so try it as a resource\r
- if( NULL == ( hResInfo = FindResource( NULL, strFileName, TEXT("WAVE") ) ) )\r
- {\r
- if( NULL == ( hResInfo = FindResource( NULL, strFileName, TEXT("WAV") ) ) )\r
- return DXTRACE_ERR( TEXT("FindResource"), E_FAIL );\r
- }\r
-\r
- if( NULL == ( hResData = LoadResource( NULL, hResInfo ) ) )\r
- return DXTRACE_ERR( TEXT("LoadResource"), E_FAIL );\r
-\r
- if( 0 == ( dwSize = SizeofResource( NULL, hResInfo ) ) ) \r
- return DXTRACE_ERR( TEXT("SizeofResource"), E_FAIL );\r
-\r
- if( NULL == ( pvRes = LockResource( hResData ) ) )\r
- return DXTRACE_ERR( TEXT("LockResource"), E_FAIL );\r
-\r
- m_pResourceBuffer = new CHAR[ dwSize ];\r
- memcpy( m_pResourceBuffer, pvRes, dwSize );\r
-\r
- MMIOINFO mmioInfo;\r
- ZeroMemory( &mmioInfo, sizeof(mmioInfo) );\r
- mmioInfo.fccIOProc = FOURCC_MEM;\r
- mmioInfo.cchBuffer = dwSize;\r
- mmioInfo.pchBuffer = (CHAR*) m_pResourceBuffer;\r
-\r
- m_hmmio = mmioOpen( NULL, &mmioInfo, MMIO_ALLOCBUF | MMIO_READ );\r
- }\r
-\r
- if( FAILED( hr = readMMIO() ) )\r
- {\r
- // ReadMMIO will fail if its an not a wave file\r
- mmioClose( m_hmmio, 0 );\r
- return DXTRACE_ERR( TEXT("ReadMMIO"), hr );\r
- }\r
-\r
- if( FAILED( hr = resetFile() ) )\r
- return DXTRACE_ERR( TEXT("ResetFile"), hr );\r
-\r
- // After the reset, the size of the wav file is m_ck.cksize so store it now\r
- m_dwSize = m_ck.cksize;\r
- }\r
- else\r
- {\r
- m_hmmio = mmioOpen( strFileName, NULL, MMIO_ALLOCBUF | \r
- MMIO_READWRITE | \r
- MMIO_CREATE );\r
- if( NULL == m_hmmio )\r
- return DXTRACE_ERR( TEXT("mmioOpen"), E_FAIL );\r
-\r
- if( FAILED( hr = writeMMIO( pwfx ) ) )\r
- {\r
- mmioClose( m_hmmio, 0 );\r
- return DXTRACE_ERR( TEXT("WriteMMIO"), hr );\r
- }\r
- \r
- if( FAILED( hr = resetFile() ) )\r
- return DXTRACE_ERR( TEXT("ResetFile"), hr );\r
- }\r
-\r
- return hr;\r
-}\r
-\r
-\r
-\r
-\r
-//-----------------------------------------------------------------------------\r
-// Name: CWaveFile::OpenFromMemory()\r
-// Desc: copy data to CWaveFile member variable from memory\r
-//-----------------------------------------------------------------------------\r
-HRESULT mof::CWaveFile::openFromMemory( BYTE* pbData, ULONG ulDataSize, \r
- WAVEFORMATEX* pwfx, DWORD dwFlags )\r
-{\r
- m_pwfx = pwfx;\r
- m_ulDataSize = ulDataSize;\r
- m_pbData = pbData;\r
- m_pbDataCur = m_pbData;\r
- m_bIsReadingFromMemory = TRUE;\r
- \r
- if( dwFlags != WAVEFILE_READ )\r
- return E_NOTIMPL; \r
- \r
- return S_OK;\r
-}\r
-\r
-\r
-\r
-\r
-//-----------------------------------------------------------------------------\r
-// Name: CWaveFile::ReadMMIO()\r
-// Desc: Support function for reading from a multimedia I/O stream.\r
-// m_hmmio must be valid before calling. This function uses it to\r
-// update m_ckRiff, and m_pwfx. \r
-//-----------------------------------------------------------------------------\r
-HRESULT mof::CWaveFile::readMMIO()\r
-{\r
- MMCKINFO ckIn; // chunk info. for general use.\r
- PCMWAVEFORMAT pcmWaveFormat; // Temp PCM structure to load in. \r
-\r
- m_pwfx = NULL;\r
-\r
- if( ( 0 != mmioDescend( m_hmmio, &m_ckRiff, NULL, 0 ) ) )\r
- return DXTRACE_ERR( TEXT("mmioDescend"), E_FAIL );\r
-\r
- // Check to make sure this is a valid wave file\r
- if( (m_ckRiff.ckid != FOURCC_RIFF) ||\r
- (m_ckRiff.fccType != mmioFOURCC('W', 'A', 'V', 'E') ) )\r
- return DXTRACE_ERR( TEXT("mmioFOURCC"), E_FAIL ); \r
-\r
- // Search the input file for for the 'fmt ' chunk.\r
- ckIn.ckid = mmioFOURCC('f', 'm', 't', ' ');\r
- if( 0 != mmioDescend( m_hmmio, &ckIn, &m_ckRiff, MMIO_FINDCHUNK ) )\r
- return DXTRACE_ERR( TEXT("mmioDescend"), E_FAIL );\r
-\r
- // Expect the 'fmt' chunk to be at least as large as <PCMWAVEFORMAT>;\r
- // if there are extra parameters at the end, we'll ignore them\r
- if( ckIn.cksize < (LONG) sizeof(PCMWAVEFORMAT) )\r
- return DXTRACE_ERR( TEXT("sizeof(PCMWAVEFORMAT)"), E_FAIL );\r
-\r
- // Read the 'fmt ' chunk into <pcmWaveFormat>.\r
- if( mmioRead( m_hmmio, (HPSTR) &pcmWaveFormat, \r
- sizeof(pcmWaveFormat)) != sizeof(pcmWaveFormat) )\r
- return DXTRACE_ERR( TEXT("mmioRead"), E_FAIL );\r
-\r
- // Allocate the waveformatex, but if its not pcm format, read the next\r
- // word, and thats how many extra bytes to allocate.\r
- if( pcmWaveFormat.wf.wFormatTag == WAVE_FORMAT_PCM )\r
- {\r
- m_pwfx = (WAVEFORMATEX*)new CHAR[ sizeof(WAVEFORMATEX) ];\r
- if( NULL == m_pwfx )\r
- return DXTRACE_ERR( TEXT("m_pwfx"), E_FAIL );\r
-\r
- // Copy the bytes from the pcm structure to the waveformatex structure\r
- memcpy( m_pwfx, &pcmWaveFormat, sizeof(pcmWaveFormat) );\r
- m_pwfx->cbSize = 0;\r
- }\r
- else\r
- {\r
- // Read in length of extra bytes.\r
- WORD cbExtraBytes = 0L;\r
- if( mmioRead( m_hmmio, (CHAR*)&cbExtraBytes, sizeof(WORD)) != sizeof(WORD) )\r
- return DXTRACE_ERR( TEXT("mmioRead"), E_FAIL );\r
-\r
- m_pwfx = (WAVEFORMATEX*)new CHAR[ sizeof(WAVEFORMATEX) + cbExtraBytes ];\r
- if( NULL == m_pwfx )\r
- return DXTRACE_ERR( TEXT("new"), E_FAIL );\r
-\r
- // Copy the bytes from the pcm structure to the waveformatex structure\r
- memcpy( m_pwfx, &pcmWaveFormat, sizeof(pcmWaveFormat) );\r
- m_pwfx->cbSize = cbExtraBytes;\r
-\r
- // Now, read those extra bytes into the structure, if cbExtraAlloc != 0.\r
- if( mmioRead( m_hmmio, (CHAR*)(((BYTE*)&(m_pwfx->cbSize))+sizeof(WORD)),\r
- cbExtraBytes ) != cbExtraBytes )\r
- {\r
- SAFE_DELETE( m_pwfx );\r
- return DXTRACE_ERR( TEXT("mmioRead"), E_FAIL );\r
- }\r
- }\r
-\r
- // Ascend the input file out of the 'fmt ' chunk.\r
- if( 0 != mmioAscend( m_hmmio, &ckIn, 0 ) )\r
- {\r
- SAFE_DELETE( m_pwfx );\r
- return DXTRACE_ERR( TEXT("mmioAscend"), E_FAIL );\r
- }\r
-\r
- return S_OK;\r
-}\r
-\r
-\r
-\r
-\r
-//-----------------------------------------------------------------------------\r
-// Name: CWaveFile::GetSize()\r
-// Desc: Retuns the size of the read access wave file \r
-//-----------------------------------------------------------------------------\r
-DWORD mof::CWaveFile::getSize()\r
-{\r
- return m_dwSize;\r
-}\r
-\r
-\r
-\r
-\r
-//-----------------------------------------------------------------------------\r
-// Name: CWaveFile::ResetFile()\r
-// Desc: Resets the internal m_ck pointer so reading starts from the \r
-// beginning of the file again \r
-//-----------------------------------------------------------------------------\r
-HRESULT mof::CWaveFile::resetFile()\r
-{\r
- if( m_bIsReadingFromMemory )\r
- {\r
- m_pbDataCur = m_pbData;\r
- }\r
- else \r
- {\r
- if( m_hmmio == NULL )\r
- return CO_E_NOTINITIALIZED;\r
-\r
- if( m_dwFlags == WAVEFILE_READ )\r
- {\r
- // Seek to the data\r
- if( -1 == mmioSeek( m_hmmio, m_ckRiff.dwDataOffset + sizeof(FOURCC),\r
- SEEK_SET ) )\r
- return DXTRACE_ERR( TEXT("mmioSeek"), E_FAIL );\r
-\r
- // Search the input file for the 'data' chunk.\r
- m_ck.ckid = mmioFOURCC('d', 'a', 't', 'a');\r
- if( 0 != mmioDescend( m_hmmio, &m_ck, &m_ckRiff, MMIO_FINDCHUNK ) )\r
- return DXTRACE_ERR( TEXT("mmioDescend"), E_FAIL );\r
- }\r
- else\r
- {\r
- // Create the 'data' chunk that holds the waveform samples. \r
- m_ck.ckid = mmioFOURCC('d', 'a', 't', 'a');\r
- m_ck.cksize = 0;\r
-\r
- if( 0 != mmioCreateChunk( m_hmmio, &m_ck, 0 ) ) \r
- return DXTRACE_ERR( TEXT("mmioCreateChunk"), E_FAIL );\r
-\r
- if( 0 != mmioGetInfo( m_hmmio, &m_mmioinfoOut, 0 ) )\r
- return DXTRACE_ERR( TEXT("mmioGetInfo"), E_FAIL );\r
- }\r
- }\r
- \r
- return S_OK;\r
-}\r
-\r
-\r
-\r
-\r
-//-----------------------------------------------------------------------------\r
-// Name: CWaveFile::Read()\r
-// Desc: Reads section of data from a wave file into pBuffer and returns \r
-// how much read in pdwSizeRead, reading not more than dwSizeToRead.\r
-// This uses m_ck to determine where to start reading from. So \r
-// subsequent calls will be continue where the last left off unless \r
-// Reset() is called.\r
-//-----------------------------------------------------------------------------\r
-HRESULT mof::CWaveFile::read( BYTE* pBuffer, DWORD dwSizeToRead, DWORD* pdwSizeRead )\r
-{\r
- \r
- if( m_bIsReadingFromMemory )\r
- {\r
- \r
- if( m_pbDataCur == NULL )\r
- return CO_E_NOTINITIALIZED;\r
- if( pdwSizeRead != NULL )\r
- *pdwSizeRead = 0;\r
-\r
- if( (BYTE*)(m_pbDataCur + dwSizeToRead) > \r
- (BYTE*)(m_pbData + m_ulDataSize) )\r
- {\r
- dwSizeToRead = m_ulDataSize - (DWORD)(m_pbDataCur - m_pbData);\r
- }\r
- \r
- CopyMemory( pBuffer, m_pbDataCur, dwSizeToRead );\r
- \r
- if( pdwSizeRead != NULL )\r
- *pdwSizeRead = dwSizeToRead;\r
-\r
- return S_OK;\r
- }\r
- else \r
- {\r
- MMIOINFO mmioinfoIn; // current status of m_hmmio\r
-\r
- if( m_hmmio == NULL )\r
- return CO_E_NOTINITIALIZED;\r
- if( pBuffer == NULL || pdwSizeRead == NULL )\r
- return E_INVALIDARG;\r
- if( pdwSizeRead != NULL )\r
- *pdwSizeRead = 0;\r
- \r
- if( 0 != mmioGetInfo( m_hmmio, &mmioinfoIn, 0 ) )\r
- return DXTRACE_ERR( TEXT("mmioGetInfo"), E_FAIL );\r
- \r
- UINT cbDataIn = dwSizeToRead;\r
- if( cbDataIn > m_ck.cksize ) \r
- cbDataIn = m_ck.cksize; \r
-\r
- m_ck.cksize -= cbDataIn;\r
- \r
- for( DWORD cT = 0; cT < cbDataIn; cT++ )\r
- {\r
- // Copy the bytes from the io to the buffer.\r
- if( mmioinfoIn.pchNext == mmioinfoIn.pchEndRead )\r
- {\r
- if( 0 != mmioAdvance( m_hmmio, &mmioinfoIn, MMIO_READ ) )\r
- return DXTRACE_ERR( TEXT("mmioAdvance"), E_FAIL );\r
-\r
- if( mmioinfoIn.pchNext == mmioinfoIn.pchEndRead )\r
- return DXTRACE_ERR( TEXT("mmioinfoIn.pchNext"), E_FAIL );\r
- }\r
-\r
- // Actual copy.\r
- *((BYTE*)pBuffer+cT) = *((BYTE*)mmioinfoIn.pchNext);\r
- mmioinfoIn.pchNext++;\r
- }\r
-\r
- if( 0 != mmioSetInfo( m_hmmio, &mmioinfoIn, 0 ) )\r
- return DXTRACE_ERR( TEXT("mmioSetInfo"), E_FAIL );\r
-\r
- if( pdwSizeRead != NULL )\r
- *pdwSizeRead = cbDataIn;\r
-\r
- return S_OK;\r
- }\r
-}\r
-\r
-\r
-\r
-\r
-//-----------------------------------------------------------------------------\r
-// Name: CWaveFile::Close()\r
-// Desc: Closes the wave file \r
-//-----------------------------------------------------------------------------\r
-HRESULT mof::CWaveFile::close()\r
-{\r
- if( m_dwFlags == WAVEFILE_READ )\r
- {\r
- mmioClose( m_hmmio, 0 );\r
- m_hmmio = NULL;\r
- SAFE_DELETE_ARRAY( m_pResourceBuffer );\r
- }\r
- else\r
- {\r
- m_mmioinfoOut.dwFlags |= MMIO_DIRTY;\r
-\r
- if( m_hmmio == NULL )\r
- return CO_E_NOTINITIALIZED;\r
-\r
- if( 0 != mmioSetInfo( m_hmmio, &m_mmioinfoOut, 0 ) )\r
- return DXTRACE_ERR( TEXT("mmioSetInfo"), E_FAIL );\r
- \r
- // Ascend the output file out of the 'data' chunk -- this will cause\r
- // the chunk size of the 'data' chunk to be written.\r
- if( 0 != mmioAscend( m_hmmio, &m_ck, 0 ) )\r
- return DXTRACE_ERR( TEXT("mmioAscend"), E_FAIL );\r
- \r
- // Do this here instead...\r
- if( 0 != mmioAscend( m_hmmio, &m_ckRiff, 0 ) )\r
- return DXTRACE_ERR( TEXT("mmioAscend"), E_FAIL );\r
- \r
- mmioSeek( m_hmmio, 0, SEEK_SET );\r
-\r
- if( 0 != (INT)mmioDescend( m_hmmio, &m_ckRiff, NULL, 0 ) )\r
- return DXTRACE_ERR( TEXT("mmioDescend"), E_FAIL );\r
- \r
- m_ck.ckid = mmioFOURCC('f', 'a', 'c', 't');\r
-\r
- if( 0 == mmioDescend( m_hmmio, &m_ck, &m_ckRiff, MMIO_FINDCHUNK ) ) \r
- {\r
- DWORD dwSamples = 0;\r
- mmioWrite( m_hmmio, (HPSTR)&dwSamples, sizeof(DWORD) );\r
- mmioAscend( m_hmmio, &m_ck, 0 ); \r
- }\r
- \r
- // Ascend the output file out of the 'RIFF' chunk -- this will cause\r
- // the chunk size of the 'RIFF' chunk to be written.\r
- if( 0 != mmioAscend( m_hmmio, &m_ckRiff, 0 ) )\r
- return DXTRACE_ERR( TEXT("mmioAscend"), E_FAIL );\r
- \r
- mmioClose( m_hmmio, 0 );\r
- m_hmmio = NULL;\r
- }\r
-\r
- return S_OK;\r
-}\r
-\r
-\r
-\r
-\r
-//-----------------------------------------------------------------------------\r
-// Name: CWaveFile::WriteMMIO()\r
-// Desc: Support function for reading from a multimedia I/O stream\r
-// pwfxDest is the WAVEFORMATEX for this new wave file. \r
-// m_hmmio must be valid before calling. This function uses it to\r
-// update m_ckRiff, and m_ck. \r
-//-----------------------------------------------------------------------------\r
-HRESULT mof::CWaveFile::writeMMIO( WAVEFORMATEX *pwfxDest )\r
-{\r
- DWORD dwFactChunk; // Contains the actual fact chunk. Garbage until WaveCloseWriteFile.\r
- MMCKINFO ckOut1;\r
- \r
- dwFactChunk = (DWORD)-1;\r
-\r
- // Create the output file RIFF chunk of form type 'WAVE'.\r
- m_ckRiff.fccType = mmioFOURCC('W', 'A', 'V', 'E'); \r
- m_ckRiff.cksize = 0;\r
-\r
- if( 0 != mmioCreateChunk( m_hmmio, &m_ckRiff, MMIO_CREATERIFF ) )\r
- return DXTRACE_ERR( TEXT("mmioCreateChunk"), E_FAIL );\r
- \r
- // We are now descended into the 'RIFF' chunk we just created.\r
- // Now create the 'fmt ' chunk. Since we know the size of this chunk,\r
- // specify it in the MMCKINFO structure so MMIO doesn't have to seek\r
- // back and set the chunk size after ascending from the chunk.\r
- m_ck.ckid = mmioFOURCC('f', 'm', 't', ' ');\r
- m_ck.cksize = sizeof(PCMWAVEFORMAT); \r
-\r
- if( 0 != mmioCreateChunk( m_hmmio, &m_ck, 0 ) )\r
- return DXTRACE_ERR( TEXT("mmioCreateChunk"), E_FAIL );\r
- \r
- // Write the PCMWAVEFORMAT structure to the 'fmt ' chunk if its that type. \r
- if( pwfxDest->wFormatTag == WAVE_FORMAT_PCM )\r
- {\r
- if( mmioWrite( m_hmmio, (HPSTR) pwfxDest, \r
- sizeof(PCMWAVEFORMAT)) != sizeof(PCMWAVEFORMAT))\r
- return DXTRACE_ERR( TEXT("mmioWrite"), E_FAIL );\r
- } \r
- else \r
- {\r
- // Write the variable length size.\r
- if( (UINT)mmioWrite( m_hmmio, (HPSTR) pwfxDest, \r
- sizeof(*pwfxDest) + pwfxDest->cbSize ) != \r
- ( sizeof(*pwfxDest) + pwfxDest->cbSize ) )\r
- return DXTRACE_ERR( TEXT("mmioWrite"), E_FAIL );\r
- } \r
- \r
- // Ascend out of the 'fmt ' chunk, back into the 'RIFF' chunk.\r
- if( 0 != mmioAscend( m_hmmio, &m_ck, 0 ) )\r
- return DXTRACE_ERR( TEXT("mmioAscend"), E_FAIL );\r
- \r
- // Now create the fact chunk, not required for PCM but nice to have. This is filled\r
- // in when the close routine is called.\r
- ckOut1.ckid = mmioFOURCC('f', 'a', 'c', 't');\r
- ckOut1.cksize = 0;\r
-\r
- if( 0 != mmioCreateChunk( m_hmmio, &ckOut1, 0 ) )\r
- return DXTRACE_ERR( TEXT("mmioCreateChunk"), E_FAIL );\r
- \r
- if( mmioWrite( m_hmmio, (HPSTR)&dwFactChunk, sizeof(dwFactChunk)) != \r
- sizeof(dwFactChunk) )\r
- return DXTRACE_ERR( TEXT("mmioWrite"), E_FAIL );\r
- \r
- // Now ascend out of the fact chunk...\r
- if( 0 != mmioAscend( m_hmmio, &ckOut1, 0 ) )\r
- return DXTRACE_ERR( TEXT("mmioAscend"), E_FAIL );\r
- \r
- return S_OK;\r
-}\r
-\r
-\r
-\r
-\r
-//-----------------------------------------------------------------------------\r
-// Name: CWaveFile::Write()\r
-// Desc: Writes data to the open wave file\r
-//-----------------------------------------------------------------------------\r
-HRESULT mof::CWaveFile::write( UINT nSizeToWrite, BYTE* pbSrcData, UINT* pnSizeWrote )\r
-{\r
- UINT cT;\r
-\r
- if( m_bIsReadingFromMemory )\r
- return E_NOTIMPL;\r
- if( m_hmmio == NULL )\r
- return CO_E_NOTINITIALIZED;\r
- if( pnSizeWrote == NULL || pbSrcData == NULL )\r
- return E_INVALIDARG;\r
-\r
- *pnSizeWrote = 0;\r
- \r
- for( cT = 0; cT < nSizeToWrite; cT++ )\r
- { \r
- if( m_mmioinfoOut.pchNext == m_mmioinfoOut.pchEndWrite )\r
- {\r
- m_mmioinfoOut.dwFlags |= MMIO_DIRTY;\r
- if( 0 != mmioAdvance( m_hmmio, &m_mmioinfoOut, MMIO_WRITE ) )\r
- return DXTRACE_ERR( TEXT("mmioAdvance"), E_FAIL );\r
- }\r
-\r
- *((BYTE*)m_mmioinfoOut.pchNext) = *((BYTE*)pbSrcData+cT);\r
- (BYTE*)m_mmioinfoOut.pchNext++;\r
-\r
- (*pnSizeWrote)++;\r
- }\r
-\r
- return S_OK;\r
-}\r
-\r
-\r
-\r
-\r
+#include "CWaveFile.h"
+#define DXTRACE_ERR(a , b) (FALSE)
+
+//-----------------------------------------------------------------------------
+// Name: CWaveFile::CWaveFile()
+// Desc: Constructs the class. Call Open() to open a wave file for reading.
+// Then call Read() as needed. Calling the destructor or Close()
+// will close the file.
+//-----------------------------------------------------------------------------
+mof::CWaveFile::CWaveFile()
+{
+ m_pwfx = NULL;
+ m_hmmio = NULL;
+ m_pResourceBuffer = NULL;
+ m_dwSize = 0;
+ m_bIsReadingFromMemory = FALSE;
+}
+
+
+
+
+//-----------------------------------------------------------------------------
+// Name: CWaveFile::~CWaveFile()
+// Desc: Destructs the class
+//-----------------------------------------------------------------------------
+mof::CWaveFile::~CWaveFile()
+{
+ close();
+
+ if( !m_bIsReadingFromMemory )
+ SAFE_DELETE_ARRAY( m_pwfx );
+}
+
+
+
+
+//-----------------------------------------------------------------------------
+// Name: CWaveFile::Open()
+// Desc: Opens a wave file for reading
+//-----------------------------------------------------------------------------
+HRESULT mof::CWaveFile::open( LPTSTR strFileName, WAVEFORMATEX* pwfx, DWORD dwFlags )
+{
+ HRESULT hr;
+
+ m_dwFlags = dwFlags;
+ m_bIsReadingFromMemory = FALSE;
+
+ if( m_dwFlags == WAVEFILE_READ )
+ {
+ if( strFileName == NULL )
+ return E_INVALIDARG;
+ SAFE_DELETE_ARRAY( m_pwfx );
+
+ m_hmmio = mmioOpen( strFileName, NULL, MMIO_ALLOCBUF | MMIO_READ );
+
+ if( NULL == m_hmmio )
+ {
+ HRSRC hResInfo;
+ HGLOBAL hResData;
+ DWORD dwSize;
+ VOID* pvRes;
+
+ // Loading it as a file failed, so try it as a resource
+ if( NULL == ( hResInfo = FindResource( NULL, strFileName, TEXT("WAVE") ) ) )
+ {
+ if( NULL == ( hResInfo = FindResource( NULL, strFileName, TEXT("WAV") ) ) )
+ return DXTRACE_ERR( TEXT("FindResource"), E_FAIL );
+ }
+
+ if( NULL == ( hResData = LoadResource( NULL, hResInfo ) ) )
+ return DXTRACE_ERR( TEXT("LoadResource"), E_FAIL );
+
+ if( 0 == ( dwSize = SizeofResource( NULL, hResInfo ) ) )
+ return DXTRACE_ERR( TEXT("SizeofResource"), E_FAIL );
+
+ if( NULL == ( pvRes = LockResource( hResData ) ) )
+ return DXTRACE_ERR( TEXT("LockResource"), E_FAIL );
+
+ m_pResourceBuffer = new CHAR[ dwSize ];
+ memcpy( m_pResourceBuffer, pvRes, dwSize );
+
+ MMIOINFO mmioInfo;
+ ZeroMemory( &mmioInfo, sizeof(mmioInfo) );
+ mmioInfo.fccIOProc = FOURCC_MEM;
+ mmioInfo.cchBuffer = dwSize;
+ mmioInfo.pchBuffer = (CHAR*) m_pResourceBuffer;
+
+ m_hmmio = mmioOpen( NULL, &mmioInfo, MMIO_ALLOCBUF | MMIO_READ );
+ }
+
+ if( FAILED( hr = readMMIO() ) )
+ {
+ // ReadMMIO will fail if its an not a wave file
+ mmioClose( m_hmmio, 0 );
+ return DXTRACE_ERR( TEXT("ReadMMIO"), hr );
+ }
+
+ if( FAILED( hr = resetFile() ) )
+ return DXTRACE_ERR( TEXT("ResetFile"), hr );
+
+ // After the reset, the size of the wav file is m_ck.cksize so store it now
+ m_dwSize = m_ck.cksize;
+ }
+ else
+ {
+ m_hmmio = mmioOpen( strFileName, NULL, MMIO_ALLOCBUF |
+ MMIO_READWRITE |
+ MMIO_CREATE );
+ if( NULL == m_hmmio )
+ return DXTRACE_ERR( TEXT("mmioOpen"), E_FAIL );
+
+ if( FAILED( hr = writeMMIO( pwfx ) ) )
+ {
+ mmioClose( m_hmmio, 0 );
+ return DXTRACE_ERR( TEXT("WriteMMIO"), hr );
+ }
+
+ if( FAILED( hr = resetFile() ) )
+ return DXTRACE_ERR( TEXT("ResetFile"), hr );
+ }
+
+ return hr;
+}
+
+
+
+
+//-----------------------------------------------------------------------------
+// Name: CWaveFile::OpenFromMemory()
+// Desc: copy data to CWaveFile member variable from memory
+//-----------------------------------------------------------------------------
+HRESULT mof::CWaveFile::openFromMemory( BYTE* pbData, ULONG ulDataSize,
+ WAVEFORMATEX* pwfx, DWORD dwFlags )
+{
+ m_pwfx = pwfx;
+ m_ulDataSize = ulDataSize;
+ m_pbData = pbData;
+ m_pbDataCur = m_pbData;
+ m_bIsReadingFromMemory = TRUE;
+
+ if( dwFlags != WAVEFILE_READ )
+ return E_NOTIMPL;
+
+ return S_OK;
+}
+
+
+
+
+//-----------------------------------------------------------------------------
+// Name: CWaveFile::ReadMMIO()
+// Desc: Support function for reading from a multimedia I/O stream.
+// m_hmmio must be valid before calling. This function uses it to
+// update m_ckRiff, and m_pwfx.
+//-----------------------------------------------------------------------------
+HRESULT mof::CWaveFile::readMMIO()
+{
+ MMCKINFO ckIn; // chunk info. for general use.
+ PCMWAVEFORMAT pcmWaveFormat; // Temp PCM structure to load in.
+
+ m_pwfx = NULL;
+
+ if( ( 0 != mmioDescend( m_hmmio, &m_ckRiff, NULL, 0 ) ) )
+ return DXTRACE_ERR( TEXT("mmioDescend"), E_FAIL );
+
+ // Check to make sure this is a valid wave file
+ if( (m_ckRiff.ckid != FOURCC_RIFF) ||
+ (m_ckRiff.fccType != mmioFOURCC('W', 'A', 'V', 'E') ) )
+ return DXTRACE_ERR( TEXT("mmioFOURCC"), E_FAIL );
+
+ // Search the input file for for the 'fmt ' chunk.
+ ckIn.ckid = mmioFOURCC('f', 'm', 't', ' ');
+ if( 0 != mmioDescend( m_hmmio, &ckIn, &m_ckRiff, MMIO_FINDCHUNK ) )
+ return DXTRACE_ERR( TEXT("mmioDescend"), E_FAIL );
+
+ // Expect the 'fmt' chunk to be at least as large as <PCMWAVEFORMAT>;
+ // if there are extra parameters at the end, we'll ignore them
+ if( ckIn.cksize < (LONG) sizeof(PCMWAVEFORMAT) )
+ return DXTRACE_ERR( TEXT("sizeof(PCMWAVEFORMAT)"), E_FAIL );
+
+ // Read the 'fmt ' chunk into <pcmWaveFormat>.
+ if( mmioRead( m_hmmio, (HPSTR) &pcmWaveFormat,
+ sizeof(pcmWaveFormat)) != sizeof(pcmWaveFormat) )
+ return DXTRACE_ERR( TEXT("mmioRead"), E_FAIL );
+
+ // Allocate the waveformatex, but if its not pcm format, read the next
+ // word, and thats how many extra bytes to allocate.
+ if( pcmWaveFormat.wf.wFormatTag == WAVE_FORMAT_PCM )
+ {
+ m_pwfx = (WAVEFORMATEX*)new CHAR[ sizeof(WAVEFORMATEX) ];
+ if( NULL == m_pwfx )
+ return DXTRACE_ERR( TEXT("m_pwfx"), E_FAIL );
+
+ // Copy the bytes from the pcm structure to the waveformatex structure
+ memcpy( m_pwfx, &pcmWaveFormat, sizeof(pcmWaveFormat) );
+ m_pwfx->cbSize = 0;
+ }
+ else
+ {
+ // Read in length of extra bytes.
+ WORD cbExtraBytes = 0L;
+ if( mmioRead( m_hmmio, (CHAR*)&cbExtraBytes, sizeof(WORD)) != sizeof(WORD) )
+ return DXTRACE_ERR( TEXT("mmioRead"), E_FAIL );
+
+ m_pwfx = (WAVEFORMATEX*)new CHAR[ sizeof(WAVEFORMATEX) + cbExtraBytes ];
+ if( NULL == m_pwfx )
+ return DXTRACE_ERR( TEXT("new"), E_FAIL );
+
+ // Copy the bytes from the pcm structure to the waveformatex structure
+ memcpy( m_pwfx, &pcmWaveFormat, sizeof(pcmWaveFormat) );
+ m_pwfx->cbSize = cbExtraBytes;
+
+ // Now, read those extra bytes into the structure, if cbExtraAlloc != 0.
+ if( mmioRead( m_hmmio, (CHAR*)(((BYTE*)&(m_pwfx->cbSize))+sizeof(WORD)),
+ cbExtraBytes ) != cbExtraBytes )
+ {
+ SAFE_DELETE( m_pwfx );
+ return DXTRACE_ERR( TEXT("mmioRead"), E_FAIL );
+ }
+ }
+
+ // Ascend the input file out of the 'fmt ' chunk.
+ if( 0 != mmioAscend( m_hmmio, &ckIn, 0 ) )
+ {
+ SAFE_DELETE( m_pwfx );
+ return DXTRACE_ERR( TEXT("mmioAscend"), E_FAIL );
+ }
+
+ return S_OK;
+}
+
+
+
+
+//-----------------------------------------------------------------------------
+// Name: CWaveFile::GetSize()
+// Desc: Retuns the size of the read access wave file
+//-----------------------------------------------------------------------------
+DWORD mof::CWaveFile::getSize()
+{
+ return m_dwSize;
+}
+
+
+
+
+//-----------------------------------------------------------------------------
+// Name: CWaveFile::ResetFile()
+// Desc: Resets the internal m_ck pointer so reading starts from the
+// beginning of the file again
+//-----------------------------------------------------------------------------
+HRESULT mof::CWaveFile::resetFile()
+{
+ if( m_bIsReadingFromMemory )
+ {
+ m_pbDataCur = m_pbData;
+ }
+ else
+ {
+ if( m_hmmio == NULL )
+ return CO_E_NOTINITIALIZED;
+
+ if( m_dwFlags == WAVEFILE_READ )
+ {
+ // Seek to the data
+ if( -1 == mmioSeek( m_hmmio, m_ckRiff.dwDataOffset + sizeof(FOURCC),
+ SEEK_SET ) )
+ return DXTRACE_ERR( TEXT("mmioSeek"), E_FAIL );
+
+ // Search the input file for the 'data' chunk.
+ m_ck.ckid = mmioFOURCC('d', 'a', 't', 'a');
+ if( 0 != mmioDescend( m_hmmio, &m_ck, &m_ckRiff, MMIO_FINDCHUNK ) )
+ return DXTRACE_ERR( TEXT("mmioDescend"), E_FAIL );
+ }
+ else
+ {
+ // Create the 'data' chunk that holds the waveform samples.
+ m_ck.ckid = mmioFOURCC('d', 'a', 't', 'a');
+ m_ck.cksize = 0;
+
+ if( 0 != mmioCreateChunk( m_hmmio, &m_ck, 0 ) )
+ return DXTRACE_ERR( TEXT("mmioCreateChunk"), E_FAIL );
+
+ if( 0 != mmioGetInfo( m_hmmio, &m_mmioinfoOut, 0 ) )
+ return DXTRACE_ERR( TEXT("mmioGetInfo"), E_FAIL );
+ }
+ }
+
+ return S_OK;
+}
+
+
+
+
+//-----------------------------------------------------------------------------
+// Name: CWaveFile::Read()
+// Desc: Reads section of data from a wave file into pBuffer and returns
+// how much read in pdwSizeRead, reading not more than dwSizeToRead.
+// This uses m_ck to determine where to start reading from. So
+// subsequent calls will be continue where the last left off unless
+// Reset() is called.
+//-----------------------------------------------------------------------------
+HRESULT mof::CWaveFile::read( BYTE* pBuffer, DWORD dwSizeToRead, DWORD* pdwSizeRead )
+{
+
+ if( m_bIsReadingFromMemory )
+ {
+
+ if( m_pbDataCur == NULL )
+ return CO_E_NOTINITIALIZED;
+ if( pdwSizeRead != NULL )
+ *pdwSizeRead = 0;
+
+ if( (BYTE*)(m_pbDataCur + dwSizeToRead) >
+ (BYTE*)(m_pbData + m_ulDataSize) )
+ {
+ dwSizeToRead = m_ulDataSize - (DWORD)(m_pbDataCur - m_pbData);
+ }
+
+ CopyMemory( pBuffer, m_pbDataCur, dwSizeToRead );
+
+ if( pdwSizeRead != NULL )
+ *pdwSizeRead = dwSizeToRead;
+
+ return S_OK;
+ }
+ else
+ {
+ MMIOINFO mmioinfoIn; // current status of m_hmmio
+
+ if( m_hmmio == NULL )
+ return CO_E_NOTINITIALIZED;
+ if( pBuffer == NULL || pdwSizeRead == NULL )
+ return E_INVALIDARG;
+ if( pdwSizeRead != NULL )
+ *pdwSizeRead = 0;
+
+ if( 0 != mmioGetInfo( m_hmmio, &mmioinfoIn, 0 ) )
+ return DXTRACE_ERR( TEXT("mmioGetInfo"), E_FAIL );
+
+ UINT cbDataIn = dwSizeToRead;
+ if( cbDataIn > m_ck.cksize )
+ cbDataIn = m_ck.cksize;
+
+ m_ck.cksize -= cbDataIn;
+
+ for( DWORD cT = 0; cT < cbDataIn; cT++ )
+ {
+ // Copy the bytes from the io to the buffer.
+ if( mmioinfoIn.pchNext == mmioinfoIn.pchEndRead )
+ {
+ if( 0 != mmioAdvance( m_hmmio, &mmioinfoIn, MMIO_READ ) )
+ return DXTRACE_ERR( TEXT("mmioAdvance"), E_FAIL );
+
+ if( mmioinfoIn.pchNext == mmioinfoIn.pchEndRead )
+ return DXTRACE_ERR( TEXT("mmioinfoIn.pchNext"), E_FAIL );
+ }
+
+ // Actual copy.
+ *((BYTE*)pBuffer+cT) = *((BYTE*)mmioinfoIn.pchNext);
+ mmioinfoIn.pchNext++;
+ }
+
+ if( 0 != mmioSetInfo( m_hmmio, &mmioinfoIn, 0 ) )
+ return DXTRACE_ERR( TEXT("mmioSetInfo"), E_FAIL );
+
+ if( pdwSizeRead != NULL )
+ *pdwSizeRead = cbDataIn;
+
+ return S_OK;
+ }
+}
+
+
+
+
+//-----------------------------------------------------------------------------
+// Name: CWaveFile::Close()
+// Desc: Closes the wave file
+//-----------------------------------------------------------------------------
+HRESULT mof::CWaveFile::close()
+{
+ if( m_dwFlags == WAVEFILE_READ )
+ {
+ mmioClose( m_hmmio, 0 );
+ m_hmmio = NULL;
+ SAFE_DELETE_ARRAY( m_pResourceBuffer );
+ }
+ else
+ {
+ m_mmioinfoOut.dwFlags |= MMIO_DIRTY;
+
+ if( m_hmmio == NULL )
+ return CO_E_NOTINITIALIZED;
+
+ if( 0 != mmioSetInfo( m_hmmio, &m_mmioinfoOut, 0 ) )
+ return DXTRACE_ERR( TEXT("mmioSetInfo"), E_FAIL );
+
+ // Ascend the output file out of the 'data' chunk -- this will cause
+ // the chunk size of the 'data' chunk to be written.
+ if( 0 != mmioAscend( m_hmmio, &m_ck, 0 ) )
+ return DXTRACE_ERR( TEXT("mmioAscend"), E_FAIL );
+
+ // Do this here instead...
+ if( 0 != mmioAscend( m_hmmio, &m_ckRiff, 0 ) )
+ return DXTRACE_ERR( TEXT("mmioAscend"), E_FAIL );
+
+ mmioSeek( m_hmmio, 0, SEEK_SET );
+
+ if( 0 != (INT)mmioDescend( m_hmmio, &m_ckRiff, NULL, 0 ) )
+ return DXTRACE_ERR( TEXT("mmioDescend"), E_FAIL );
+
+ m_ck.ckid = mmioFOURCC('f', 'a', 'c', 't');
+
+ if( 0 == mmioDescend( m_hmmio, &m_ck, &m_ckRiff, MMIO_FINDCHUNK ) )
+ {
+ DWORD dwSamples = 0;
+ mmioWrite( m_hmmio, (HPSTR)&dwSamples, sizeof(DWORD) );
+ mmioAscend( m_hmmio, &m_ck, 0 );
+ }
+
+ // Ascend the output file out of the 'RIFF' chunk -- this will cause
+ // the chunk size of the 'RIFF' chunk to be written.
+ if( 0 != mmioAscend( m_hmmio, &m_ckRiff, 0 ) )
+ return DXTRACE_ERR( TEXT("mmioAscend"), E_FAIL );
+
+ mmioClose( m_hmmio, 0 );
+ m_hmmio = NULL;
+ }
+
+ return S_OK;
+}
+
+
+
+
+//-----------------------------------------------------------------------------
+// Name: CWaveFile::WriteMMIO()
+// Desc: Support function for reading from a multimedia I/O stream
+// pwfxDest is the WAVEFORMATEX for this new wave file.
+// m_hmmio must be valid before calling. This function uses it to
+// update m_ckRiff, and m_ck.
+//-----------------------------------------------------------------------------
+HRESULT mof::CWaveFile::writeMMIO( WAVEFORMATEX *pwfxDest )
+{
+ DWORD dwFactChunk; // Contains the actual fact chunk. Garbage until WaveCloseWriteFile.
+ MMCKINFO ckOut1;
+
+ dwFactChunk = (DWORD)-1;
+
+ // Create the output file RIFF chunk of form type 'WAVE'.
+ m_ckRiff.fccType = mmioFOURCC('W', 'A', 'V', 'E');
+ m_ckRiff.cksize = 0;
+
+ if( 0 != mmioCreateChunk( m_hmmio, &m_ckRiff, MMIO_CREATERIFF ) )
+ return DXTRACE_ERR( TEXT("mmioCreateChunk"), E_FAIL );
+
+ // We are now descended into the 'RIFF' chunk we just created.
+ // Now create the 'fmt ' chunk. Since we know the size of this chunk,
+ // specify it in the MMCKINFO structure so MMIO doesn't have to seek
+ // back and set the chunk size after ascending from the chunk.
+ m_ck.ckid = mmioFOURCC('f', 'm', 't', ' ');
+ m_ck.cksize = sizeof(PCMWAVEFORMAT);
+
+ if( 0 != mmioCreateChunk( m_hmmio, &m_ck, 0 ) )
+ return DXTRACE_ERR( TEXT("mmioCreateChunk"), E_FAIL );
+
+ // Write the PCMWAVEFORMAT structure to the 'fmt ' chunk if its that type.
+ if( pwfxDest->wFormatTag == WAVE_FORMAT_PCM )
+ {
+ if( mmioWrite( m_hmmio, (HPSTR) pwfxDest,
+ sizeof(PCMWAVEFORMAT)) != sizeof(PCMWAVEFORMAT))
+ return DXTRACE_ERR( TEXT("mmioWrite"), E_FAIL );
+ }
+ else
+ {
+ // Write the variable length size.
+ if( (UINT)mmioWrite( m_hmmio, (HPSTR) pwfxDest,
+ sizeof(*pwfxDest) + pwfxDest->cbSize ) !=
+ ( sizeof(*pwfxDest) + pwfxDest->cbSize ) )
+ return DXTRACE_ERR( TEXT("mmioWrite"), E_FAIL );
+ }
+
+ // Ascend out of the 'fmt ' chunk, back into the 'RIFF' chunk.
+ if( 0 != mmioAscend( m_hmmio, &m_ck, 0 ) )
+ return DXTRACE_ERR( TEXT("mmioAscend"), E_FAIL );
+
+ // Now create the fact chunk, not required for PCM but nice to have. This is filled
+ // in when the close routine is called.
+ ckOut1.ckid = mmioFOURCC('f', 'a', 'c', 't');
+ ckOut1.cksize = 0;
+
+ if( 0 != mmioCreateChunk( m_hmmio, &ckOut1, 0 ) )
+ return DXTRACE_ERR( TEXT("mmioCreateChunk"), E_FAIL );
+
+ if( mmioWrite( m_hmmio, (HPSTR)&dwFactChunk, sizeof(dwFactChunk)) !=
+ sizeof(dwFactChunk) )
+ return DXTRACE_ERR( TEXT("mmioWrite"), E_FAIL );
+
+ // Now ascend out of the fact chunk...
+ if( 0 != mmioAscend( m_hmmio, &ckOut1, 0 ) )
+ return DXTRACE_ERR( TEXT("mmioAscend"), E_FAIL );
+
+ return S_OK;
+}
+
+
+
+
+//-----------------------------------------------------------------------------
+// Name: CWaveFile::Write()
+// Desc: Writes data to the open wave file
+//-----------------------------------------------------------------------------
+HRESULT mof::CWaveFile::write( UINT nSizeToWrite, BYTE* pbSrcData, UINT* pnSizeWrote )
+{
+ UINT cT;
+
+ if( m_bIsReadingFromMemory )
+ return E_NOTIMPL;
+ if( m_hmmio == NULL )
+ return CO_E_NOTINITIALIZED;
+ if( pnSizeWrote == NULL || pbSrcData == NULL )
+ return E_INVALIDARG;
+
+ *pnSizeWrote = 0;
+
+ for( cT = 0; cT < nSizeToWrite; cT++ )
+ {
+ if( m_mmioinfoOut.pchNext == m_mmioinfoOut.pchEndWrite )
+ {
+ m_mmioinfoOut.dwFlags |= MMIO_DIRTY;
+ if( 0 != mmioAdvance( m_hmmio, &m_mmioinfoOut, MMIO_WRITE ) )
+ return DXTRACE_ERR( TEXT("mmioAdvance"), E_FAIL );
+ }
+
+ *((BYTE*)m_mmioinfoOut.pchNext) = *((BYTE*)pbSrcData+cT);
+ (BYTE*)m_mmioinfoOut.pchNext++;
+
+ (*pnSizeWrote)++;
+ }
+
+ return S_OK;
+}
+
+
+
+
-//-----------------------------------------------------------------------------\r
-// File: DSUtil.h\r
-//\r
-// Desc: \r
-//\r
-// Copyright (c) 1999-2000 Microsoft Corp. All rights reserved.\r
-//-----------------------------------------------------------------------------\r
-#ifndef DSUTIL_H\r
-#define DSUTIL_H\r
-\r
-#include <windows.h>\r
-#include <mmsystem.h>\r
-//#include <mmreg.h>\r
-#include <dsound.h>\r
-\r
-\r
-\r
-namespace mof{\r
-\r
-\r
- //-----------------------------------------------------------------------------\r
- // Typing macros \r
- //-----------------------------------------------------------------------------\r
- #define WAVEFILE_READ 1\r
- #define WAVEFILE_WRITE 2\r
-\r
- #define DSUtil_StopSound(s) { if(s) s->Stop(); }\r
- #define DSUtil_PlaySound(s) { if(s) s->Play( 0, 0 ); }\r
- #define DSUtil_PlaySoundLooping(s) { if(s) s->Play( 0, DSBPLAY_LOOPING ); }\r
-\r
-\r
- #define SAFE_DELETE(p) { if(p) { delete (p); (p)=NULL; } }\r
- #define SAFE_DELETE_ARRAY(p) { if(p) { delete[] (p); (p)=NULL; } }\r
- #define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } }\r
-\r
- //-----------------------------------------------------------------------------\r
- // Name: class CWaveFile\r
- // Desc: Encapsulates reading or writing sound data to or from a wave file\r
- //-----------------------------------------------------------------------------\r
- class CWaveFile\r
- {\r
- public:\r
- WAVEFORMATEX* m_pwfx; // Pointer to WAVEFORMATEX structure\r
- HMMIO m_hmmio; // MM I/O handle for the WAVE\r
- MMCKINFO m_ck; // Multimedia RIFF chunk\r
- MMCKINFO m_ckRiff; // Use in opening a WAVE file\r
- DWORD m_dwSize; // The size of the wave file\r
- MMIOINFO m_mmioinfoOut;\r
- \r
- BOOL m_bIsReadingFromMemory;\r
- BYTE* m_pbData;\r
- BYTE* m_pbDataCur;\r
- ULONG m_ulDataSize;\r
-\r
- //WAVEFORMATEX* m_pwfx;\r
- //HMMIO m_hmmio;\r
- char* m_pResourceBuffer;\r
- //DWORD m_dwSize;\r
- //BOOL m_bIsReadingFromMemory;\r
- DWORD m_dwFlags;\r
-\r
- protected:\r
- HRESULT readMMIO();\r
- HRESULT writeMMIO( WAVEFORMATEX *pwfxDest );\r
-\r
- public:\r
- CWaveFile();\r
- ~CWaveFile();\r
-\r
- HRESULT open( LPTSTR strFileName, WAVEFORMATEX* pwfx, DWORD dwFlags );\r
- HRESULT openFromMemory( BYTE* pbData, ULONG ulDataSize, WAVEFORMATEX* pwfx, DWORD dwFlags );\r
- HRESULT close();\r
-\r
- HRESULT read( BYTE* pBuffer, DWORD dwSizeToRead, DWORD* pdwSizeRead );\r
- HRESULT write( UINT nSizeToWrite, BYTE* pbData, UINT* pnSizeWrote );\r
-\r
- DWORD getSize();\r
- HRESULT resetFile();\r
- WAVEFORMATEX* getFormat() { return m_pwfx; };\r
- };\r
-\r
-};\r
-\r
-\r
+//-----------------------------------------------------------------------------
+// File: DSUtil.h
+//
+// Desc:
+//
+// Copyright (c) 1999-2000 Microsoft Corp. All rights reserved.
+//-----------------------------------------------------------------------------
+#ifndef DSUTIL_H
+#define DSUTIL_H
+
+#include <windows.h>
+#include <mmsystem.h>
+//#include <mmreg.h>
+#include <dsound.h>
+
+
+
+namespace mof{
+
+
+ //-----------------------------------------------------------------------------
+ // Typing macros
+ //-----------------------------------------------------------------------------
+ #define WAVEFILE_READ 1
+ #define WAVEFILE_WRITE 2
+
+ #define DSUtil_StopSound(s) { if(s) s->Stop(); }
+ #define DSUtil_PlaySound(s) { if(s) s->Play( 0, 0 ); }
+ #define DSUtil_PlaySoundLooping(s) { if(s) s->Play( 0, DSBPLAY_LOOPING ); }
+
+
+ #define SAFE_DELETE(p) { if(p) { delete (p); (p)=NULL; } }
+ #define SAFE_DELETE_ARRAY(p) { if(p) { delete[] (p); (p)=NULL; } }
+ #define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } }
+
+ //-----------------------------------------------------------------------------
+ // Name: class CWaveFile
+ // Desc: Encapsulates reading or writing sound data to or from a wave file
+ //-----------------------------------------------------------------------------
+ class CWaveFile
+ {
+ public:
+ WAVEFORMATEX* m_pwfx; // Pointer to WAVEFORMATEX structure
+ HMMIO m_hmmio; // MM I/O handle for the WAVE
+ MMCKINFO m_ck; // Multimedia RIFF chunk
+ MMCKINFO m_ckRiff; // Use in opening a WAVE file
+ DWORD m_dwSize; // The size of the wave file
+ MMIOINFO m_mmioinfoOut;
+
+ BOOL m_bIsReadingFromMemory;
+ BYTE* m_pbData;
+ BYTE* m_pbDataCur;
+ ULONG m_ulDataSize;
+
+ //WAVEFORMATEX* m_pwfx;
+ //HMMIO m_hmmio;
+ char* m_pResourceBuffer;
+ //DWORD m_dwSize;
+ //BOOL m_bIsReadingFromMemory;
+ DWORD m_dwFlags;
+
+ protected:
+ HRESULT readMMIO();
+ HRESULT writeMMIO( WAVEFORMATEX *pwfxDest );
+
+ public:
+ CWaveFile();
+ ~CWaveFile();
+
+ HRESULT open( LPTSTR strFileName, WAVEFORMATEX* pwfx, DWORD dwFlags );
+ HRESULT openFromMemory( BYTE* pbData, ULONG ulDataSize, WAVEFORMATEX* pwfx, DWORD dwFlags );
+ HRESULT close();
+
+ HRESULT read( BYTE* pBuffer, DWORD dwSizeToRead, DWORD* pdwSizeRead );
+ HRESULT write( UINT nSizeToWrite, BYTE* pbData, UINT* pnSizeWrote );
+
+ DWORD getSize();
+ HRESULT resetFile();
+ WAVEFORMATEX* getFormat() { return m_pwfx; };
+ };
+
+};
+
+
#endif // DSUTIL_H
\ No newline at end of file
-#pragma once\r
-#include <mof/sound/DirectSoundDevice.hpp>\r
-#include <dsound.h>\r
-#include <mof/ConsoleIO.hpp>\r
-\r
-\r
-namespace mof\r
-{\r
-namespace sound\r
-{\r
-//{{{ constructor\r
- DirectSoundDevice::DirectSoundDevice(HWND hWnd)\r
- : pSound_(NULL), primary_buffer_(NULL)\r
- {\r
- HRESULT hr;\r
-\r
- hr = DirectSoundCreate8( NULL, &pSound_, NULL );\r
- if( FAILED( hr ) ){\r
- *ConsoleOut::getInstance() << _T("Failed --- CreateDirectSound"); \r
- return; \r
- }\r
- \r
- if( FAILED(hr = pSound_->SetCooperativeLevel( hWnd, DSSCL_PRIORITY ))) {\r
- throw std::runtime_error("failed to set cooperative level");\r
- }\r
-\r
- DSBUFFERDESC desc;\r
- ZeroMemory(&desc, sizeof(desc));\r
- desc.dwSize = sizeof(desc);\r
- desc.dwFlags = DSBCAPS_PRIMARYBUFFER;\r
- desc.dwBufferBytes = 0;// バッファサイズは自動設定される\r
- desc.lpwfxFormat = NULL;\r
- if (FAILED(hr = pSound_->CreateSoundBuffer(&desc, &primary_buffer_, NULL))) {\r
- throw std::runtime_error("failed to create a primary buffer");\r
- }\r
- \r
- // バッファサイズを得る\r
- DSBCAPS caps;\r
- caps.dwSize = sizeof(DSBCAPS);\r
- primary_buffer_->GetCaps(&caps);\r
- DEBUG_PRINT("primary size" << caps.dwBufferBytes);\r
-\r
- primary_buffer_->Play(0, 0xffffffff, DSBPLAY_LOOPING);\r
- }\r
-//}}}\r
-//{{{ destructor\r
- DirectSoundDevice::~DirectSoundDevice()\r
- {\r
- primary_buffer_->Release();\r
- pSound_->Release();\r
- }\r
-//}}} \r
-//{{{ raw\r
- LPDIRECTSOUND8 DirectSoundDevice::raw() const {return pSound_;}\r
-//}}}\r
-//{{{ primary_buffer_\r
- LPDIRECTSOUNDBUFFER DirectSoundDevice::primary_buffer() const {return primary_buffer_;}\r
-//}}}\r
-}// sound\r
-}// mof\r
+#pragma once
+#include <mof/sound/DirectSoundDevice.hpp>
+#include <dsound.h>
+#include <mof/ConsoleIO.hpp>
+
+
+namespace mof
+{
+namespace sound
+{
+//{{{ constructor
+ DirectSoundDevice::DirectSoundDevice(HWND hWnd)
+ : pSound_(NULL), primary_buffer_(NULL)
+ {
+ HRESULT hr;
+
+ hr = DirectSoundCreate8( NULL, &pSound_, NULL );
+ if( FAILED( hr ) ){
+ *ConsoleOut::getInstance() << _T("Failed --- CreateDirectSound");
+ return;
+ }
+
+ if( FAILED(hr = pSound_->SetCooperativeLevel( hWnd, DSSCL_PRIORITY ))) {
+ throw std::runtime_error("failed to set cooperative level");
+ }
+
+ DSBUFFERDESC desc;
+ ZeroMemory(&desc, sizeof(desc));
+ desc.dwSize = sizeof(desc);
+ desc.dwFlags = DSBCAPS_PRIMARYBUFFER;
+ desc.dwBufferBytes = 0;// バッファサイズは自動設定される
+ desc.lpwfxFormat = NULL;
+ if (FAILED(hr = pSound_->CreateSoundBuffer(&desc, &primary_buffer_, NULL))) {
+ throw std::runtime_error("failed to create a primary buffer");
+ }
+
+ // バッファサイズを得る
+ DSBCAPS caps;
+ caps.dwSize = sizeof(DSBCAPS);
+ primary_buffer_->GetCaps(&caps);
+ DEBUG_PRINT("primary size" << caps.dwBufferBytes);
+
+ primary_buffer_->Play(0, 0xffffffff, DSBPLAY_LOOPING);
+ }
+//}}}
+//{{{ destructor
+ DirectSoundDevice::~DirectSoundDevice()
+ {
+ primary_buffer_->Release();
+ pSound_->Release();
+ }
+//}}}
+//{{{ raw
+ LPDIRECTSOUND8 DirectSoundDevice::raw() const {return pSound_;}
+//}}}
+//{{{ primary_buffer_
+ LPDIRECTSOUNDBUFFER DirectSoundDevice::primary_buffer() const {return primary_buffer_;}
+//}}}
+}// sound
+}// mof
-#pragma once\r
-#include <dsound.h>\r
-#include <memory>\r
-\r
-\r
-namespace mof\r
-{\r
-namespace sound\r
-{\r
- class DirectSoundDevice\r
- {\r
- LPDIRECTSOUND8 pSound_;\r
- LPDIRECTSOUNDBUFFER primary_buffer_;\r
- public:\r
- typedef std::shared_ptr<DirectSoundDevice> ptr;\r
- DirectSoundDevice(HWND hWnd);\r
- ~DirectSoundDevice();\r
- LPDIRECTSOUND8 raw() const;\r
- LPDIRECTSOUNDBUFFER primary_buffer() const;\r
- };\r
-\r
-}// soudn\r
-}// mof\r
+#pragma once
+#include <dsound.h>
+#include <memory>
+
+
+namespace mof
+{
+namespace sound
+{
+ class DirectSoundDevice
+ {
+ LPDIRECTSOUND8 pSound_;
+ LPDIRECTSOUNDBUFFER primary_buffer_;
+ public:
+ typedef std::shared_ptr<DirectSoundDevice> ptr;
+ DirectSoundDevice(HWND hWnd);
+ ~DirectSoundDevice();
+ LPDIRECTSOUND8 raw() const;
+ LPDIRECTSOUNDBUFFER primary_buffer() const;
+ };
+
+}// soudn
+}// mof
-#include "mof/sound/OggVorbisFile.hpp"\r
-#include "mof/ConsoleIO.hpp"\r
-#include <math.h>\r
-\r
-\r
-static int _fseek64_wrap(FILE* f, __int64 off, int whence) \r
-{\r
- if (f == NULL) return -1;\r
- return fseek(f, off, whence);\r
-}\r
-\r
-\r
-mof::OggVorbisFile::OggVorbisFile(void)\r
-{\r
- m_fp = NULL;\r
- m_pFormat = NULL;\r
- m_vorbisInfo = NULL;\r
-}\r
-\r
-\r
-\r
-\r
-\r
-mof::OggVorbisFile::~OggVorbisFile(void)\r
-{\r
- close();\r
-}\r
-\r
-\r
-\r
-bool mof::OggVorbisFile::open(const mof::tstring& filename){\r
- \r
- m_fp = fopen(filename.c_str() , "rb");\r
- if(m_fp == NULL){\r
- *ConsoleOut::getInstance() << _T("Can't Open File --- ") << filename << std::endl;\r
- return false;\r
- }\r
-\r
- ov_callbacks callbacks = \r
- {\r
- (size_t (*)(void *, size_t, size_t, void *)) fread,\r
- (int (*)(void *, __int64, int)) _fseek64_wrap,\r
- (int (*)(void *)) fclose,\r
- (long (*)(void *)) ftell\r
- };\r
- //int result = ov_open(m_fp, &m_vorbisFile , NULL, 0);\r
- int result = ov_open_callbacks(m_fp, &m_vorbisFile, NULL, 0, callbacks);\r
- if (result < 0) { \r
- *ConsoleOut::getInstance() << _T("This is not OggVorbis file --- ") << filename << std::endl;\r
- ov_clear(&m_vorbisFile);\r
- fclose(m_fp);\r
- m_fp = NULL;\r
- return false;\r
- }\r
-\r
- m_vorbisInfo = ov_info(&m_vorbisFile , -1);\r
-\r
- m_pFormat = new WAVEFORMATEX;\r
- m_pFormat->cbSize = 0;\r
- m_pFormat->wFormatTag = WAVE_FORMAT_PCM;\r
- m_pFormat->nChannels = m_vorbisInfo->channels;\r
- m_pFormat->nSamplesPerSec = m_vorbisInfo->rate;\r
- m_pFormat->wBitsPerSample = 16;\r
- m_pFormat->nBlockAlign = m_pFormat->nChannels * 2;\r
- m_pFormat->nAvgBytesPerSec = m_pFormat->nSamplesPerSec * m_pFormat->nBlockAlign; \r
- return true;\r
-\r
-}\r
-\r
-\r
-bool mof::OggVorbisFile::close(){\r
- delete m_pFormat;\r
- ov_clear(&m_vorbisFile);\r
- fclose(m_fp);\r
- m_fp = NULL;\r
- return true;\r
-}\r
-\r
-\r
-\r
-long mof::OggVorbisFile::read( BYTE* pBuffer1, long bufferSize1 , BYTE* pBuffer2 , long bufferSize2 ){\r
- int bitstream;\r
- long offset;\r
- long readSize;\r
- for(offset = 0 ; offset < bufferSize1 ; offset += readSize){\r
- readSize = ov_read(&m_vorbisFile , (char*)pBuffer1 + offset , bufferSize1 - offset , 0 , 2 , 1, &bitstream);\r
- if (readSize <= 0)resetFile(); \r
- }\r
-\r
- if(bufferSize2 == 0)return 0;\r
-\r
- for(offset = 0 ; offset < bufferSize2 ; offset += readSize){\r
- readSize = ov_read(&m_vorbisFile , (char*)pBuffer2 + offset , bufferSize2 - offset , 0 , 2 , 1, &bitstream);\r
- if (readSize <= 0)resetFile();\r
- }\r
- \r
- return 1;\r
-}\r
-\r
-\r
-long mof::OggVorbisFile::getSize(){\r
- return (long)ceil(m_vorbisInfo->channels * m_vorbisInfo->rate * ov_time_total(&m_vorbisFile , -1) * 2);\r
-}\r
-\r
-\r
-\r
-bool mof::OggVorbisFile::resetFile(){\r
- ov_pcm_seek(&m_vorbisFile , 0);\r
- return true;\r
-}\r
-\r
-\r
-WAVEFORMATEX* mof::OggVorbisFile::getFormat(){\r
- return m_pFormat;\r
-}\r
-\r
-\r
-\r
+#include "mof/sound/OggVorbisFile.hpp"
+#include "mof/ConsoleIO.hpp"
+#include <math.h>
+
+
+static int _fseek64_wrap(FILE* f, __int64 off, int whence)
+{
+ if (f == NULL) return -1;
+ return fseek(f, off, whence);
+}
+
+
+mof::OggVorbisFile::OggVorbisFile(void)
+{
+ m_fp = NULL;
+ m_pFormat = NULL;
+ m_vorbisInfo = NULL;
+}
+
+
+
+
+
+mof::OggVorbisFile::~OggVorbisFile(void)
+{
+ close();
+}
+
+
+
+bool mof::OggVorbisFile::open(const mof::tstring& filename){
+
+ m_fp = fopen(filename.c_str() , "rb");
+ if(m_fp == NULL){
+ *ConsoleOut::getInstance() << _T("Can't Open File --- ") << filename << std::endl;
+ return false;
+ }
+
+ ov_callbacks callbacks =
+ {
+ (size_t (*)(void *, size_t, size_t, void *)) fread,
+ (int (*)(void *, __int64, int)) _fseek64_wrap,
+ (int (*)(void *)) fclose,
+ (long (*)(void *)) ftell
+ };
+ //int result = ov_open(m_fp, &m_vorbisFile , NULL, 0);
+ int result = ov_open_callbacks(m_fp, &m_vorbisFile, NULL, 0, callbacks);
+ if (result < 0) {
+ *ConsoleOut::getInstance() << _T("This is not OggVorbis file --- ") << filename << std::endl;
+ ov_clear(&m_vorbisFile);
+ fclose(m_fp);
+ m_fp = NULL;
+ return false;
+ }
+
+ m_vorbisInfo = ov_info(&m_vorbisFile , -1);
+
+ m_pFormat = new WAVEFORMATEX;
+ m_pFormat->cbSize = 0;
+ m_pFormat->wFormatTag = WAVE_FORMAT_PCM;
+ m_pFormat->nChannels = m_vorbisInfo->channels;
+ m_pFormat->nSamplesPerSec = m_vorbisInfo->rate;
+ m_pFormat->wBitsPerSample = 16;
+ m_pFormat->nBlockAlign = m_pFormat->nChannels * 2;
+ m_pFormat->nAvgBytesPerSec = m_pFormat->nSamplesPerSec * m_pFormat->nBlockAlign;
+ return true;
+
+}
+
+
+bool mof::OggVorbisFile::close(){
+ delete m_pFormat;
+ ov_clear(&m_vorbisFile);
+ fclose(m_fp);
+ m_fp = NULL;
+ return true;
+}
+
+
+
+long mof::OggVorbisFile::read( BYTE* pBuffer1, long bufferSize1 , BYTE* pBuffer2 , long bufferSize2 ){
+ int bitstream;
+ long offset;
+ long readSize;
+ for(offset = 0 ; offset < bufferSize1 ; offset += readSize){
+ readSize = ov_read(&m_vorbisFile , (char*)pBuffer1 + offset , bufferSize1 - offset , 0 , 2 , 1, &bitstream);
+ if (readSize <= 0)resetFile();
+ }
+
+ if(bufferSize2 == 0)return 0;
+
+ for(offset = 0 ; offset < bufferSize2 ; offset += readSize){
+ readSize = ov_read(&m_vorbisFile , (char*)pBuffer2 + offset , bufferSize2 - offset , 0 , 2 , 1, &bitstream);
+ if (readSize <= 0)resetFile();
+ }
+
+ return 1;
+}
+
+
+long mof::OggVorbisFile::getSize(){
+ return (long)ceil(m_vorbisInfo->channels * m_vorbisInfo->rate * ov_time_total(&m_vorbisFile , -1) * 2);
+}
+
+
+
+bool mof::OggVorbisFile::resetFile(){
+ ov_pcm_seek(&m_vorbisFile , 0);
+ return true;
+}
+
+
+WAVEFORMATEX* mof::OggVorbisFile::getFormat(){
+ return m_pFormat;
+}
+
+
+
-#pragma once\r
-#include <stdio.h>\r
-#include "mof/sound/SoundFile.hpp"\r
-#include <vorbis/vorbisfile.h>\r
-#include <mof/tstring.hpp>\r
-\r
-namespace mof{\r
- class OggVorbisFile : public SoundFile\r
- {\r
- FILE* m_fp;\r
- OggVorbis_File m_vorbisFile;\r
- WAVEFORMATEX* m_pFormat;\r
- vorbis_info* m_vorbisInfo;\r
-\r
- public:\r
- OggVorbisFile(void);\r
- virtual ~OggVorbisFile(void);\r
-\r
- virtual bool open(const mof::tstring& filename);\r
- virtual bool close();\r
- virtual long read( BYTE* pBuffer1, long bufferSize1 , BYTE* pBuffer2 , long bufferSize2 );\r
- virtual long getSize();\r
- virtual bool resetFile();\r
- virtual WAVEFORMATEX* getFormat();\r
- };\r
-\r
-};\r
+#pragma once
+#include <stdio.h>
+#include "mof/sound/SoundFile.hpp"
+#include <vorbis/vorbisfile.h>
+#include <mof/tstring.hpp>
+
+namespace mof{
+ class OggVorbisFile : public SoundFile
+ {
+ FILE* m_fp;
+ OggVorbis_File m_vorbisFile;
+ WAVEFORMATEX* m_pFormat;
+ vorbis_info* m_vorbisInfo;
+
+ public:
+ OggVorbisFile(void);
+ virtual ~OggVorbisFile(void);
+
+ virtual bool open(const mof::tstring& filename);
+ virtual bool close();
+ virtual long read( BYTE* pBuffer1, long bufferSize1 , BYTE* pBuffer2 , long bufferSize2 );
+ virtual long getSize();
+ virtual bool resetFile();
+ virtual WAVEFORMATEX* getFormat();
+ };
+
+};
-#include "SoundBuffer.hpp"\r
-#include "SoundFile.hpp"\r
-#include <mof/ConsoleIO.hpp>\r
-\r
-mof::SoundBuffer::SoundBuffer\r
-(\r
- std::shared_ptr<mof::sound::DirectSoundDevice> pDevice,\r
- LPDIRECTSOUNDBUFFER8 pBuffer,\r
- SoundFile* pResouce\r
-)\r
- : m_pBuffer(pBuffer), m_pResource(pResouce), pDevice_(pDevice)\r
-{\r
- m_pBuffer->AddRef();\r
- pBuffer->GetFrequency(&default_frequency_);\r
-}\r
-\r
-mof::SoundBuffer::~SoundBuffer(void){\r
- m_pBuffer->Release();\r
- delete m_pResource;\r
-}\r
-\r
-//{{{ update\r
-void mof::SoundBuffer::update()\r
-{\r
- volume_stream_.update();\r
- frequency_stream_.update();\r
-\r
- mof::real volume = volume_stream_.value();\r
- if (volume > 1) volume = 1;\r
- else if (volume < 0) volume = 0;\r
- int converted_volume = (1.0f - volume) * DSBVOLUME_MIN;\r
- converted_volume = converted_volume < DSBVOLUME_MIN\r
- ? DSBVOLUME_MIN\r
- : converted_volume > DSBVOLUME_MAX\r
- ? DSBVOLUME_MAX\r
- : converted_volume;\r
- LONG prev_volume;\r
- getSoundBuffer()->GetVolume(&prev_volume);\r
- if (converted_volume != prev_volume) {\r
- getSoundBuffer()->SetVolume(converted_volume);// 必要ない場合は変更を行わない\r
- }\r
- \r
- mof::real frequency = frequency_stream_.value();\r
- int converted_frequency = default_frequency_ * frequency;\r
- converted_frequency = converted_frequency < DSBFREQUENCY_MIN \r
- ? DSBFREQUENCY_MIN \r
- : converted_frequency > DSBFREQUENCY_MAX \r
- ? DSBFREQUENCY_MAX\r
- : converted_frequency;\r
- DWORD prev_frequency;\r
- getSoundBuffer()->GetFrequency(&prev_frequency);\r
- if (converted_frequency != prev_frequency) {\r
- getSoundBuffer()->SetFrequency(converted_frequency);// 必要ない場合は変更を行わない\r
- }\r
- \r
-}\r
-//}}}\r
+#include "SoundBuffer.hpp"
+#include "SoundFile.hpp"
+#include <mof/ConsoleIO.hpp>
+
+mof::SoundBuffer::SoundBuffer
+(
+ std::shared_ptr<mof::sound::DirectSoundDevice> pDevice,
+ LPDIRECTSOUNDBUFFER8 pBuffer,
+ SoundFile* pResouce
+)
+ : m_pBuffer(pBuffer), m_pResource(pResouce), pDevice_(pDevice)
+{
+ m_pBuffer->AddRef();
+ pBuffer->GetFrequency(&default_frequency_);
+}
+
+mof::SoundBuffer::~SoundBuffer(void){
+ m_pBuffer->Release();
+ delete m_pResource;
+}
+
+//{{{ update
+void mof::SoundBuffer::update()
+{
+ volume_stream_.update();
+ frequency_stream_.update();
+
+ mof::real volume = volume_stream_.value();
+ if (volume > 1) volume = 1;
+ else if (volume < 0) volume = 0;
+ int converted_volume = (1.0f - volume) * DSBVOLUME_MIN;
+ converted_volume = converted_volume < DSBVOLUME_MIN
+ ? DSBVOLUME_MIN
+ : converted_volume > DSBVOLUME_MAX
+ ? DSBVOLUME_MAX
+ : converted_volume;
+ LONG prev_volume;
+ getSoundBuffer()->GetVolume(&prev_volume);
+ if (converted_volume != prev_volume) {
+ getSoundBuffer()->SetVolume(converted_volume);// 必要ない場合は変更を行わない
+ }
+
+ mof::real frequency = frequency_stream_.value();
+ int converted_frequency = default_frequency_ * frequency;
+ converted_frequency = converted_frequency < DSBFREQUENCY_MIN
+ ? DSBFREQUENCY_MIN
+ : converted_frequency > DSBFREQUENCY_MAX
+ ? DSBFREQUENCY_MAX
+ : converted_frequency;
+ DWORD prev_frequency;
+ getSoundBuffer()->GetFrequency(&prev_frequency);
+ if (converted_frequency != prev_frequency) {
+ getSoundBuffer()->SetFrequency(converted_frequency);// 必要ない場合は変更を行わない
+ }
+
+}
+//}}}
-#pragma once\r
-#include <dsound.h>\r
-#include <memory>\r
-#include "mof/sound/SoundFile.hpp"\r
-#include <mof/sound/component_sound.hpp>\r
-\r
-namespace mof{\r
-namespace sound\r
-{\r
- class DirectSoundDevice;\r
-}\r
- class SoundBuffer : public mof::sound::component_sound\r
- {\r
- LPDIRECTSOUNDBUFFER8 m_pBuffer;\r
- SoundFile* m_pResource;\r
- DWORD default_frequency_;\r
- protected:\r
- std::shared_ptr<sound::DirectSoundDevice> pDevice_;\r
- LPDIRECTSOUNDBUFFER8 getSoundBuffer(){return m_pBuffer;}\r
- SoundFile* getResource(){return m_pResource;}\r
- public:\r
- SoundBuffer(std::shared_ptr<sound::DirectSoundDevice> pDevice, LPDIRECTSOUNDBUFFER8 pBuffer , SoundFile* pResouce);\r
- virtual ~SoundBuffer();\r
-\r
- virtual bool initialize() = 0;\r
- virtual bool play(bool looping) = 0;\r
- virtual void stop() = 0;\r
- virtual void update();\r
- };\r
-\r
-};\r
+#pragma once
+#include <dsound.h>
+#include <memory>
+#include "mof/sound/SoundFile.hpp"
+#include <mof/sound/component_sound.hpp>
+
+namespace mof{
+namespace sound
+{
+ class DirectSoundDevice;
+}
+ class SoundBuffer : public mof::sound::component_sound
+ {
+ LPDIRECTSOUNDBUFFER8 m_pBuffer;
+ SoundFile* m_pResource;
+ DWORD default_frequency_;
+ protected:
+ std::shared_ptr<sound::DirectSoundDevice> pDevice_;
+ LPDIRECTSOUNDBUFFER8 getSoundBuffer(){return m_pBuffer;}
+ SoundFile* getResource(){return m_pResource;}
+ public:
+ SoundBuffer(std::shared_ptr<sound::DirectSoundDevice> pDevice, LPDIRECTSOUNDBUFFER8 pBuffer , SoundFile* pResouce);
+ virtual ~SoundBuffer();
+
+ virtual bool initialize() = 0;
+ virtual bool play(bool looping) = 0;
+ virtual void stop() = 0;
+ virtual void update();
+ };
+
+};
-#include "mof/sound/SoundDevice.hpp"\r
-#include "mof/ConsoleIO.hpp"\r
-#include <stdio.h>\r
-#include <boost/regex.hpp>\r
-#include "mof/sound/WaveFile.hpp"\r
-#include "mof/sound/OggVorbisFile.hpp"\r
-#include <stdlib.h>\r
-#include <mof/tstring.hpp>\r
-#include "mof/sound/StaticSoundBuffer.hpp"\r
-#include "mof/sound/StreamSoundBuffer.hpp"\r
-#include "mof/sound/DirectSoundDevice.hpp"\r
-#include "mof/sound/sound_recoder.hpp"\r
-#include <dsound.h>\r
-\r
-#define CTRL_FLAGS DSBCAPS_CTRLPAN | DSBCAPS_CTRLFREQUENCY | DSBCAPS_CTRLVOLUME\r
-\r
-namespace\r
-{\r
- const int WORDSIZE = 2;//\97Ê\8eq\89»\83o\83C\83g\90\94\r
- std::shared_ptr<mof::sound::DirectSoundDevice> pDevice_;\r
- mof::sound::sound_recoder rec_;\r
-\r
-//{{{ loadStaticSound\r
-mof::SoundBuffer* loadStaticSound(const mof::tstring& filename , mof::SoundFile* soundFile){\r
- \r
- if(!soundFile->open(filename.c_str())){\r
- *ConsoleOut::getInstance() << _T("Can't Open File --- ") << filename << std::endl; \r
- return NULL;\r
- }\r
- \r
- //---\83Z\83J\83\93\83_\83\8a\83o\83b\83t\83@\82Ì\90¶\90¬\r
- DSBUFFERDESC dsbdesc;\r
- ZeroMemory( &dsbdesc , sizeof(DSBUFFERDESC));\r
- dsbdesc.dwSize = sizeof(DSBUFFERDESC);\r
- dsbdesc.dwFlags = CTRL_FLAGS | DSBCAPS_GETCURRENTPOSITION2 | DSBCAPS_GLOBALFOCUS | DSBCAPS_LOCDEFER | DSBCAPS_STATIC;\r
- dsbdesc.dwBufferBytes = soundFile->getSize();\r
- dsbdesc.lpwfxFormat = soundFile->getFormat();\r
-\r
- LPDIRECTSOUNDBUFFER pTempBuffer;\r
- LPDIRECTSOUNDBUFFER8 pSecondaryBuffer;\r
-\r
- HRESULT hr = pDevice_->raw()->CreateSoundBuffer(&dsbdesc , &pTempBuffer , NULL);\r
- if(FAILED(hr)){\r
- *ConsoleOut::getInstance() << _T("Failed --- CreateSecondarySoundBuffer") << std::endl;\r
- return NULL;\r
- }\r
-\r
- hr = pTempBuffer->QueryInterface(IID_IDirectSoundBuffer8 , (LPVOID*)&pSecondaryBuffer);\r
- pTempBuffer->Release();\r
- if (FAILED(hr)){\r
- *ConsoleOut::getInstance() << _T("Failed --- QueryInterface") << std::endl;\r
- return NULL;\r
- }\r
-\r
-\r
- mof::SoundBuffer* soundBuffer = new mof::StaticSoundBuffer(pDevice_, pSecondaryBuffer , soundFile);\r
- pSecondaryBuffer->Release();\r
- if(soundBuffer->initialize())return soundBuffer;\r
- delete soundBuffer;\r
- return NULL;\r
-\r
-}\r
-//}}}\r
-//{{{ loadStreamSound\r
-mof::SoundBuffer* loadStreamSound(const mof::tstring& filename , mof::SoundFile* soundFile){\r
- \r
- if(!soundFile->open(filename.c_str())){\r
- *ConsoleOut::getInstance() << _T("Can't Open File --- ") << filename << std::endl; \r
- return NULL;\r
- }\r
- \r
- //---\83Z\83J\83\93\83_\83\8a\83o\83b\83t\83@\82Ì\90¶\90¬\r
- WAVEFORMATEX* format = soundFile->getFormat();\r
- DSBUFFERDESC dsbdesc;\r
- ZeroMemory( &dsbdesc , sizeof(DSBUFFERDESC));\r
- dsbdesc.dwSize = sizeof(DSBUFFERDESC);\r
- dsbdesc.dwFlags = CTRL_FLAGS | DSBCAPS_LOCSOFTWARE | DSBCAPS_GLOBALFOCUS | DSBCAPS_CTRLPOSITIONNOTIFY | DSBCAPS_GETCURRENTPOSITION2;\r
- dsbdesc.dwBufferBytes = format->nChannels * format->nAvgBytesPerSec * 2;//2\95b\95ª\r
- dsbdesc.dwBufferBytes -= dsbdesc.dwBufferBytes % 2;//2\82Å\8a\84\82è\90Ø\82ê\82é\82æ\82¤\82É\r
- dsbdesc.lpwfxFormat = format;\r
-\r
- LPDIRECTSOUNDBUFFER pTempBuffer;\r
- LPDIRECTSOUNDBUFFER8 pSecondaryBuffer;\r
- LPDIRECTSOUNDNOTIFY8 pSoundNotify;\r
-\r
- HRESULT hr = pDevice_->raw()->CreateSoundBuffer(&dsbdesc , &pTempBuffer , NULL);\r
- if(FAILED(hr)){\r
- *ConsoleOut::getInstance() << _T("Failed --- CreateSecondarySoundBuffer") << std::endl;\r
- return NULL;\r
- }\r
-\r
- hr = pTempBuffer->QueryInterface(IID_IDirectSoundBuffer8 , (LPVOID*)&pSecondaryBuffer);\r
- if (FAILED(hr)){\r
- pTempBuffer->Release();\r
- *ConsoleOut::getInstance() << _T("Failed --- QueryInterface") << std::endl;\r
- return NULL;\r
- }\r
-\r
- hr = pTempBuffer->QueryInterface(IID_IDirectSoundNotify8 , (LPVOID*)&pSoundNotify);\r
- pTempBuffer->Release();\r
- if (FAILED(hr)){\r
- pSecondaryBuffer->Release();\r
- *ConsoleOut::getInstance() << _T("Failed --- QueryInterface") << std::endl;\r
- return NULL;\r
- }\r
-\r
-\r
- mof::SoundBuffer* soundBuffer = new mof::StreamSoundBuffer(pDevice_, pSecondaryBuffer , pSoundNotify , soundFile);\r
- pSecondaryBuffer->Release();\r
- pSoundNotify->Release();\r
- if(soundBuffer->initialize())return soundBuffer;\r
- delete soundBuffer;\r
- return NULL;\r
-\r
-}\r
-//}}}\r
-}\r
-\r
-\r
-namespace mof\r
-{\r
-namespace sound\r
-{\r
-//{{{ initialize\r
- bool SoundDevice::initialize(HWND hWnd, bool enable_output)\r
- {\r
- pDevice_ = std::make_shared<DirectSoundDevice>(hWnd); \r
- if (enable_output) rec_.open("sound_output/rect.wav");// \83T\83E\83\93\83h\83\8c\83R\81[\83_\82Ì\8f\89\8aú\89»\r
- return true;\r
- }\r
-//}}}\r
-//{{{ finalize\r
- void SoundDevice::finalize()\r
- {\r
- pDevice_ = std::shared_ptr<DirectSoundDevice>();// NULL\82ð\90Ý\92è\r
- }\r
-//}}}\r
-//{{{ create_static_sound\r
-std::unique_ptr<mof::SoundBuffer> SoundDevice::create_static_sound(const mof::tstring& filename)\r
-{\r
- //---\83t\83H\81[\83}\83b\83g\82ð\92²\82×\82é\r
- // TODO \8aÖ\90\94\89»\r
- tstring format;\r
- try {\r
- boost::regex regex("(.*)\\.(.*)");//name . format\r
- boost::smatch match;\r
- //\8a¿\8e\9a\82É\82Í\91Î\89\9e\82µ\82Ä\82¢\82È\82¢\r
- if(!boost::regex_search(filename , match , regex)){\r
- *ConsoleOut::getInstance() << _T("FormatError --- ") << filename;\r
- throw std::invalid_argument("format error");\r
- }\r
- format = match.str(2); \r
- }\r
- catch (std::exception &e) {\r
- exit(0);\r
- }\r
-\r
- SoundBuffer* buffer = NULL;\r
- if(format == "ogg")buffer = loadStaticSound(filename , new OggVorbisFile());\r
- else if(format == "wav")buffer = loadStaticSound( filename , new WaveFile());\r
- \r
- if(buffer == NULL){\r
- *ConsoleOut::getInstance() << _T("UnKnownFileFormat ---") << format;\r
- throw std::invalid_argument("unknown file format");\r
- }\r
- return std::unique_ptr<SoundBuffer>(buffer);\r
-}\r
-//}}}\r
-//{{{ create_streaming_sound\r
-std::unique_ptr<mof::SoundBuffer> SoundDevice::create_streaming_sound(const mof::tstring& filename)\r
-{\r
- //---\83t\83H\81[\83}\83b\83g\82ð\92²\82×\82é\r
- // TODO \8aÖ\90\94\89»\r
- tstring format;\r
- try {\r
- boost::regex regex("(.*)\\.(.*)");//name . format\r
- boost::smatch match;\r
- //\8a¿\8e\9a\82É\82Í\91Î\89\9e\82µ\82Ä\82¢\82È\82¢\r
- if(!boost::regex_search(filename , match , regex)){\r
- *ConsoleOut::getInstance() << _T("FormatError --- ") << filename;\r
- throw std::invalid_argument("format error");\r
- }\r
- format = match.str(2); \r
- }\r
- catch (std::exception &e) {\r
- exit(0);\r
- }\r
-\r
- SoundBuffer* buffer = NULL;\r
- \r
- if(format == "ogg")buffer = loadStreamSound(filename , new OggVorbisFile());\r
- else if(format == "wav")buffer = loadStreamSound( filename , new WaveFile());\r
- \r
- if(buffer == NULL){\r
- *ConsoleOut::getInstance() << _T("UnKnownFileFormat ---") << format;\r
- throw std::invalid_argument("unknown file format");\r
- }\r
- return std::unique_ptr<SoundBuffer>(buffer);\r
-}\r
-//}}}\r
-}\r
-}\r
-\r
+#include "mof/sound/SoundDevice.hpp"
+#include "mof/ConsoleIO.hpp"
+#include <stdio.h>
+#include <boost/regex.hpp>
+#include "mof/sound/WaveFile.hpp"
+#include "mof/sound/OggVorbisFile.hpp"
+#include <stdlib.h>
+#include <mof/tstring.hpp>
+#include "mof/sound/StaticSoundBuffer.hpp"
+#include "mof/sound/StreamSoundBuffer.hpp"
+#include "mof/sound/DirectSoundDevice.hpp"
+#include "mof/sound/sound_recoder.hpp"
+#include <dsound.h>
+
+#define CTRL_FLAGS DSBCAPS_CTRLPAN | DSBCAPS_CTRLFREQUENCY | DSBCAPS_CTRLVOLUME
+
+namespace
+{
+ const int WORDSIZE = 2;//\97Ê\8eq\89»\83o\83C\83g\90\94
+ std::shared_ptr<mof::sound::DirectSoundDevice> pDevice_;
+ mof::sound::sound_recoder rec_;
+
+//{{{ loadStaticSound
+mof::SoundBuffer* loadStaticSound(const mof::tstring& filename , mof::SoundFile* soundFile){
+
+ if(!soundFile->open(filename.c_str())){
+ *ConsoleOut::getInstance() << _T("Can't Open File --- ") << filename << std::endl;
+ return NULL;
+ }
+
+ //---\83Z\83J\83\93\83_\83\8a\83o\83b\83t\83@\82Ì\90¶\90¬
+ DSBUFFERDESC dsbdesc;
+ ZeroMemory( &dsbdesc , sizeof(DSBUFFERDESC));
+ dsbdesc.dwSize = sizeof(DSBUFFERDESC);
+ dsbdesc.dwFlags = CTRL_FLAGS | DSBCAPS_GETCURRENTPOSITION2 | DSBCAPS_GLOBALFOCUS | DSBCAPS_LOCDEFER | DSBCAPS_STATIC;
+ dsbdesc.dwBufferBytes = soundFile->getSize();
+ dsbdesc.lpwfxFormat = soundFile->getFormat();
+
+ LPDIRECTSOUNDBUFFER pTempBuffer;
+ LPDIRECTSOUNDBUFFER8 pSecondaryBuffer;
+
+ HRESULT hr = pDevice_->raw()->CreateSoundBuffer(&dsbdesc , &pTempBuffer , NULL);
+ if(FAILED(hr)){
+ *ConsoleOut::getInstance() << _T("Failed --- CreateSecondarySoundBuffer") << std::endl;
+ return NULL;
+ }
+
+ hr = pTempBuffer->QueryInterface(IID_IDirectSoundBuffer8 , (LPVOID*)&pSecondaryBuffer);
+ pTempBuffer->Release();
+ if (FAILED(hr)){
+ *ConsoleOut::getInstance() << _T("Failed --- QueryInterface") << std::endl;
+ return NULL;
+ }
+
+
+ mof::SoundBuffer* soundBuffer = new mof::StaticSoundBuffer(pDevice_, pSecondaryBuffer , soundFile);
+ pSecondaryBuffer->Release();
+ if(soundBuffer->initialize())return soundBuffer;
+ delete soundBuffer;
+ return NULL;
+
+}
+//}}}
+//{{{ loadStreamSound
+mof::SoundBuffer* loadStreamSound(const mof::tstring& filename , mof::SoundFile* soundFile){
+
+ if(!soundFile->open(filename.c_str())){
+ *ConsoleOut::getInstance() << _T("Can't Open File --- ") << filename << std::endl;
+ return NULL;
+ }
+
+ //---\83Z\83J\83\93\83_\83\8a\83o\83b\83t\83@\82Ì\90¶\90¬
+ WAVEFORMATEX* format = soundFile->getFormat();
+ DSBUFFERDESC dsbdesc;
+ ZeroMemory( &dsbdesc , sizeof(DSBUFFERDESC));
+ dsbdesc.dwSize = sizeof(DSBUFFERDESC);
+ dsbdesc.dwFlags = CTRL_FLAGS | DSBCAPS_LOCSOFTWARE | DSBCAPS_GLOBALFOCUS | DSBCAPS_CTRLPOSITIONNOTIFY | DSBCAPS_GETCURRENTPOSITION2;
+ dsbdesc.dwBufferBytes = format->nChannels * format->nAvgBytesPerSec * 2;//2\95b\95ª
+ dsbdesc.dwBufferBytes -= dsbdesc.dwBufferBytes % 2;//2\82Å\8a\84\82è\90Ø\82ê\82é\82æ\82¤\82É
+ dsbdesc.lpwfxFormat = format;
+
+ LPDIRECTSOUNDBUFFER pTempBuffer;
+ LPDIRECTSOUNDBUFFER8 pSecondaryBuffer;
+ LPDIRECTSOUNDNOTIFY8 pSoundNotify;
+
+ HRESULT hr = pDevice_->raw()->CreateSoundBuffer(&dsbdesc , &pTempBuffer , NULL);
+ if(FAILED(hr)){
+ *ConsoleOut::getInstance() << _T("Failed --- CreateSecondarySoundBuffer") << std::endl;
+ return NULL;
+ }
+
+ hr = pTempBuffer->QueryInterface(IID_IDirectSoundBuffer8 , (LPVOID*)&pSecondaryBuffer);
+ if (FAILED(hr)){
+ pTempBuffer->Release();
+ *ConsoleOut::getInstance() << _T("Failed --- QueryInterface") << std::endl;
+ return NULL;
+ }
+
+ hr = pTempBuffer->QueryInterface(IID_IDirectSoundNotify8 , (LPVOID*)&pSoundNotify);
+ pTempBuffer->Release();
+ if (FAILED(hr)){
+ pSecondaryBuffer->Release();
+ *ConsoleOut::getInstance() << _T("Failed --- QueryInterface") << std::endl;
+ return NULL;
+ }
+
+
+ mof::SoundBuffer* soundBuffer = new mof::StreamSoundBuffer(pDevice_, pSecondaryBuffer , pSoundNotify , soundFile);
+ pSecondaryBuffer->Release();
+ pSoundNotify->Release();
+ if(soundBuffer->initialize())return soundBuffer;
+ delete soundBuffer;
+ return NULL;
+
+}
+//}}}
+}
+
+
+namespace mof
+{
+namespace sound
+{
+//{{{ initialize
+ bool SoundDevice::initialize(HWND hWnd, bool enable_output)
+ {
+ pDevice_ = std::make_shared<DirectSoundDevice>(hWnd);
+ if (enable_output) rec_.open("sound_output/rect.wav");// \83T\83E\83\93\83h\83\8c\83R\81[\83_\82Ì\8f\89\8aú\89»
+ return true;
+ }
+//}}}
+//{{{ finalize
+ void SoundDevice::finalize()
+ {
+ pDevice_ = std::shared_ptr<DirectSoundDevice>();// NULL\82ð\90Ý\92è
+ }
+//}}}
+//{{{ create_static_sound
+std::unique_ptr<mof::SoundBuffer> SoundDevice::create_static_sound(const mof::tstring& filename)
+{
+ //---\83t\83H\81[\83}\83b\83g\82ð\92²\82×\82é
+ // TODO \8aÖ\90\94\89»
+ tstring format;
+ try {
+ boost::regex regex("(.*)\\.(.*)");//name . format
+ boost::smatch match;
+ //\8a¿\8e\9a\82É\82Í\91Î\89\9e\82µ\82Ä\82¢\82È\82¢
+ if(!boost::regex_search(filename , match , regex)){
+ *ConsoleOut::getInstance() << _T("FormatError --- ") << filename;
+ throw std::invalid_argument("format error");
+ }
+ format = match.str(2);
+ }
+ catch (std::exception &e) {
+ exit(0);
+ }
+
+ SoundBuffer* buffer = NULL;
+ if(format == "ogg")buffer = loadStaticSound(filename , new OggVorbisFile());
+ else if(format == "wav")buffer = loadStaticSound( filename , new WaveFile());
+
+ if(buffer == NULL){
+ *ConsoleOut::getInstance() << _T("UnKnownFileFormat ---") << format;
+ throw std::invalid_argument("unknown file format");
+ }
+ return std::unique_ptr<SoundBuffer>(buffer);
+}
+//}}}
+//{{{ create_streaming_sound
+std::unique_ptr<mof::SoundBuffer> SoundDevice::create_streaming_sound(const mof::tstring& filename)
+{
+ //---\83t\83H\81[\83}\83b\83g\82ð\92²\82×\82é
+ // TODO \8aÖ\90\94\89»
+ tstring format;
+ try {
+ boost::regex regex("(.*)\\.(.*)");//name . format
+ boost::smatch match;
+ //\8a¿\8e\9a\82É\82Í\91Î\89\9e\82µ\82Ä\82¢\82È\82¢
+ if(!boost::regex_search(filename , match , regex)){
+ *ConsoleOut::getInstance() << _T("FormatError --- ") << filename;
+ throw std::invalid_argument("format error");
+ }
+ format = match.str(2);
+ }
+ catch (std::exception &e) {
+ exit(0);
+ }
+
+ SoundBuffer* buffer = NULL;
+
+ if(format == "ogg")buffer = loadStreamSound(filename , new OggVorbisFile());
+ else if(format == "wav")buffer = loadStreamSound( filename , new WaveFile());
+
+ if(buffer == NULL){
+ *ConsoleOut::getInstance() << _T("UnKnownFileFormat ---") << format;
+ throw std::invalid_argument("unknown file format");
+ }
+ return std::unique_ptr<SoundBuffer>(buffer);
+}
+//}}}
+}
+}
+
-#pragma once\r
-#include <mof/tstring.hpp>\r
-#include "mof/sound/SoundBuffer.hpp"\r
-#include <memory>\r
-\r
-namespace mof\r
-{\r
-namespace sound\r
-{\r
- namespace SoundDevice\r
- {\r
- bool initialize(HWND hWnd, bool enable_output);\r
- void finalize();\r
- std::unique_ptr<SoundBuffer> create_static_sound(const mof::tstring& filename);\r
- std::unique_ptr<SoundBuffer> create_streaming_sound(const mof::tstring& filename);\r
- }\r
-}\r
-}\r
+#pragma once
+#include <mof/tstring.hpp>
+#include "mof/sound/SoundBuffer.hpp"
+#include <memory>
+
+namespace mof
+{
+namespace sound
+{
+ namespace SoundDevice
+ {
+ bool initialize(HWND hWnd, bool enable_output);
+ void finalize();
+ std::unique_ptr<SoundBuffer> create_static_sound(const mof::tstring& filename);
+ std::unique_ptr<SoundBuffer> create_streaming_sound(const mof::tstring& filename);
+ }
+}
+}
-#include "mof/sound/SoundFile.hpp"\r
-\r
-mof::SoundFile::SoundFile(void)\r
-{\r
-}\r
-\r
-mof::SoundFile::~SoundFile(void)\r
-{\r
-}\r
+#include "mof/sound/SoundFile.hpp"
+
+mof::SoundFile::SoundFile(void)
+{
+}
+
+mof::SoundFile::~SoundFile(void)
+{
+}
-#pragma once\r
-#include <windows.h>\r
-#include <dsound.h>\r
-#include <mof/tstring.hpp>\r
-\r
-namespace mof{\r
- class SoundFile\r
- {\r
- public:\r
- SoundFile(void);\r
- virtual ~SoundFile(void) = 0;\r
-\r
- virtual bool open(const mof::tstring& filename) = 0;\r
- virtual bool close() = 0;\r
- virtual long read( BYTE* pBuffer1, long bufferSize1 , BYTE* pBuffer2 , long bufferSize2 ) = 0;\r
- virtual long getSize() = 0;\r
- virtual bool resetFile() = 0;\r
- virtual WAVEFORMATEX* getFormat() = 0;\r
- };\r
-\r
-};\r
+#pragma once
+#include <windows.h>
+#include <dsound.h>
+#include <mof/tstring.hpp>
+
+namespace mof{
+ class SoundFile
+ {
+ public:
+ SoundFile(void);
+ virtual ~SoundFile(void) = 0;
+
+ virtual bool open(const mof::tstring& filename) = 0;
+ virtual bool close() = 0;
+ virtual long read( BYTE* pBuffer1, long bufferSize1 , BYTE* pBuffer2 , long bufferSize2 ) = 0;
+ virtual long getSize() = 0;
+ virtual bool resetFile() = 0;
+ virtual WAVEFORMATEX* getFormat() = 0;
+ };
+
+};
-#include "mof/sound/StaticSoundBuffer.hpp"\r
-#include "mof/ConsoleIO.hpp"\r
-\r
-mof::StaticSoundBuffer::StaticSoundBuffer\r
-(\r
- std::shared_ptr<mof::sound::DirectSoundDevice> pDevice,\r
- LPDIRECTSOUNDBUFFER8 pBuffer,\r
- SoundFile* pResource\r
-)\r
-: mof::SoundBuffer(pDevice, pBuffer , pResource)\r
-{\r
-}\r
-\r
-mof::StaticSoundBuffer::~StaticSoundBuffer(void)\r
-{\r
- \r
-}\r
-\r
-\r
-bool mof::StaticSoundBuffer::initialize(){\r
- LPVOID pMem1 , pMem2;\r
- DWORD dwSize1 , dwSize2;\r
- HRESULT hr = getSoundBuffer()->Lock(0 , getResource()->getSize() , &pMem1 , &dwSize1 , &pMem2 , &dwSize2 , 0);\r
- if(FAILED(hr)){\r
- *ConsoleOut::getInstance() << _T("Failed --- LockSoundBuffer") << std::endl;\r
- return false;\r
- }\r
-\r
- getResource()->resetFile();\r
- getResource()->read((BYTE*)pMem1 , dwSize1 , (BYTE*)pMem2 , dwSize2);\r
- getSoundBuffer()->Unlock(pMem1 , dwSize1 , pMem2 , dwSize2);\r
- return true;\r
-}\r
-\r
-\r
-bool mof::StaticSoundBuffer::play(bool looping){\r
- getSoundBuffer()->SetCurrentPosition(0);\r
- HRESULT hr = getSoundBuffer()->Play( 0 , 0 , (looping)?DSBPLAY_LOOPING : 0);\r
- if(hr == DSERR_BUFFERLOST){\r
- *ConsoleOut::getInstance() << _T("Failed --- PlaySound") << std::endl;\r
- return false;\r
- }\r
- return true;\r
-}\r
-\r
-void mof::StaticSoundBuffer::stop(){\r
- getSoundBuffer()->Stop();\r
-}\r
-\r
+#include "mof/sound/StaticSoundBuffer.hpp"
+#include "mof/ConsoleIO.hpp"
+
+mof::StaticSoundBuffer::StaticSoundBuffer
+(
+ std::shared_ptr<mof::sound::DirectSoundDevice> pDevice,
+ LPDIRECTSOUNDBUFFER8 pBuffer,
+ SoundFile* pResource
+)
+: mof::SoundBuffer(pDevice, pBuffer , pResource)
+{
+}
+
+mof::StaticSoundBuffer::~StaticSoundBuffer(void)
+{
+
+}
+
+
+bool mof::StaticSoundBuffer::initialize(){
+ LPVOID pMem1 , pMem2;
+ DWORD dwSize1 , dwSize2;
+ HRESULT hr = getSoundBuffer()->Lock(0 , getResource()->getSize() , &pMem1 , &dwSize1 , &pMem2 , &dwSize2 , 0);
+ if(FAILED(hr)){
+ *ConsoleOut::getInstance() << _T("Failed --- LockSoundBuffer") << std::endl;
+ return false;
+ }
+
+ getResource()->resetFile();
+ getResource()->read((BYTE*)pMem1 , dwSize1 , (BYTE*)pMem2 , dwSize2);
+ getSoundBuffer()->Unlock(pMem1 , dwSize1 , pMem2 , dwSize2);
+ return true;
+}
+
+
+bool mof::StaticSoundBuffer::play(bool looping){
+ getSoundBuffer()->SetCurrentPosition(0);
+ HRESULT hr = getSoundBuffer()->Play( 0 , 0 , (looping)?DSBPLAY_LOOPING : 0);
+ if(hr == DSERR_BUFFERLOST){
+ *ConsoleOut::getInstance() << _T("Failed --- PlaySound") << std::endl;
+ return false;
+ }
+ return true;
+}
+
+void mof::StaticSoundBuffer::stop(){
+ getSoundBuffer()->Stop();
+}
+
-#pragma once\r
-#include "mof/sound/SoundBuffer.hpp"\r
-\r
-\r
-namespace mof{\r
-namespace sound\r
-{\r
- class DirectSoundDevice;\r
-}\r
- class StaticSoundBuffer : public SoundBuffer\r
- {\r
- public:\r
- StaticSoundBuffer(std::shared_ptr<sound::DirectSoundDevice> pDevice, LPDIRECTSOUNDBUFFER8 pBuffer , SoundFile* pResource);\r
- virtual ~StaticSoundBuffer(void);\r
- virtual bool initialize();\r
- virtual bool play(bool looping);\r
- virtual void stop();\r
- };\r
-\r
-};\r
+#pragma once
+#include "mof/sound/SoundBuffer.hpp"
+
+
+namespace mof{
+namespace sound
+{
+ class DirectSoundDevice;
+}
+ class StaticSoundBuffer : public SoundBuffer
+ {
+ public:
+ StaticSoundBuffer(std::shared_ptr<sound::DirectSoundDevice> pDevice, LPDIRECTSOUNDBUFFER8 pBuffer , SoundFile* pResource);
+ virtual ~StaticSoundBuffer(void);
+ virtual bool initialize();
+ virtual bool play(bool looping);
+ virtual void stop();
+ };
+
+};
-#include "mof/sound/StreamSoundBuffer.hpp"\r
-#include "mof/ConsoleIO.hpp"\r
-#include "mof/sound/StreamingSoundLoader.hpp"\r
-#include "mof/sound/DirectSoundDevice.hpp"\r
-\r
-\r
-mof::StreamSoundBuffer::StreamSoundBuffer\r
-(\r
- std::shared_ptr<mof::sound::DirectSoundDevice> pDevice,\r
- LPDIRECTSOUNDBUFFER8 pBuffer,\r
- LPDIRECTSOUNDNOTIFY8 pSoundNotify,\r
- SoundFile* pResource\r
-)\r
-: mof::SoundBuffer(pDevice, pBuffer , pResource)\r
-{\r
- m_pSoundNotify = pSoundNotify;\r
- m_pSoundNotify->AddRef();\r
- m_pLoadingThread = NULL;\r
- m_pLoadingFunction = NULL;\r
-\r
- \r
-}\r
-\r
-\r
-\r
-mof::StreamSoundBuffer::~StreamSoundBuffer(void)\r
-{\r
- //boost::mutex::scoped_lock lock(m_pLoadingFunction->getMutex()); TODO これ付けてるとエラーになる\r
- getSoundBuffer()->Stop();\r
- m_pLoadingThread->join();\r
- delete m_pLoadingThread;\r
- delete m_pLoadingFunction;\r
- m_pSoundNotify->Release();\r
-}\r
-\r
-\r
-bool mof::StreamSoundBuffer::initialize(){\r
- \r
- m_pLoadingFunction = new StreamingSoundLoader( getSoundBuffer() , m_pSoundNotify , getResource() );\r
- m_pLoadingFunction->initialize();\r
- //m_pLoadingFunction->CopyBlock(0);\r
- m_pLoadingThread = new boost::thread( boost::ref<StreamingSoundLoader>(*m_pLoadingFunction) );\r
- return true;\r
-}\r
-\r
-\r
-bool mof::StreamSoundBuffer::play(bool looping){\r
- boost::mutex::scoped_lock lock(m_pLoadingFunction->getMutex());\r
- \r
- HRESULT hr = getSoundBuffer()->Play( 0 , 0 , (looping)?DSBPLAY_LOOPING : 0);\r
- if(hr == DSERR_BUFFERLOST){\r
- *ConsoleOut::getInstance() << _T("Failed --- PlaySound") << std::endl;\r
- return false;\r
- }\r
- return true;\r
-}\r
-\r
-void mof::StreamSoundBuffer::stop(){\r
- //boost::mutex::scoped_lock lock(m_pLoadingFunction->GetMutex());\r
- getSoundBuffer()->Stop();\r
- getSoundBuffer()->SetCurrentPosition(0);\r
- getResource()->resetFile();\r
- //try{\r
- m_pLoadingThread->join();\r
- //}catch(exception e){DEBUG_PRINT(_T("dd"));}\r
- delete m_pLoadingThread;\r
- delete m_pLoadingFunction;\r
- m_pLoadingFunction = new StreamingSoundLoader( getSoundBuffer() , m_pSoundNotify , getResource() );\r
- m_pLoadingFunction->initialize();\r
- //m_pLoadingFunction->CopyBlock(0);\r
- m_pLoadingThread = new boost::thread( boost::ref<StreamingSoundLoader>(*m_pLoadingFunction) );\r
- \r
- \r
-}\r
+#include "mof/sound/StreamSoundBuffer.hpp"
+#include "mof/ConsoleIO.hpp"
+#include "mof/sound/StreamingSoundLoader.hpp"
+#include "mof/sound/DirectSoundDevice.hpp"
+
+
+mof::StreamSoundBuffer::StreamSoundBuffer
+(
+ std::shared_ptr<mof::sound::DirectSoundDevice> pDevice,
+ LPDIRECTSOUNDBUFFER8 pBuffer,
+ LPDIRECTSOUNDNOTIFY8 pSoundNotify,
+ SoundFile* pResource
+)
+: mof::SoundBuffer(pDevice, pBuffer , pResource)
+{
+ m_pSoundNotify = pSoundNotify;
+ m_pSoundNotify->AddRef();
+ m_pLoadingThread = NULL;
+ m_pLoadingFunction = NULL;
+
+
+}
+
+
+
+mof::StreamSoundBuffer::~StreamSoundBuffer(void)
+{
+ //boost::mutex::scoped_lock lock(m_pLoadingFunction->getMutex()); TODO これ付けてるとエラーになる
+ getSoundBuffer()->Stop();
+ m_pLoadingThread->join();
+ delete m_pLoadingThread;
+ delete m_pLoadingFunction;
+ m_pSoundNotify->Release();
+}
+
+
+bool mof::StreamSoundBuffer::initialize(){
+
+ m_pLoadingFunction = new StreamingSoundLoader( getSoundBuffer() , m_pSoundNotify , getResource() );
+ m_pLoadingFunction->initialize();
+ //m_pLoadingFunction->CopyBlock(0);
+ m_pLoadingThread = new boost::thread( boost::ref<StreamingSoundLoader>(*m_pLoadingFunction) );
+ return true;
+}
+
+
+bool mof::StreamSoundBuffer::play(bool looping){
+ boost::mutex::scoped_lock lock(m_pLoadingFunction->getMutex());
+
+ HRESULT hr = getSoundBuffer()->Play( 0 , 0 , (looping)?DSBPLAY_LOOPING : 0);
+ if(hr == DSERR_BUFFERLOST){
+ *ConsoleOut::getInstance() << _T("Failed --- PlaySound") << std::endl;
+ return false;
+ }
+ return true;
+}
+
+void mof::StreamSoundBuffer::stop(){
+ //boost::mutex::scoped_lock lock(m_pLoadingFunction->GetMutex());
+ getSoundBuffer()->Stop();
+ getSoundBuffer()->SetCurrentPosition(0);
+ getResource()->resetFile();
+ //try{
+ m_pLoadingThread->join();
+ //}catch(exception e){DEBUG_PRINT(_T("dd"));}
+ delete m_pLoadingThread;
+ delete m_pLoadingFunction;
+ m_pLoadingFunction = new StreamingSoundLoader( getSoundBuffer() , m_pSoundNotify , getResource() );
+ m_pLoadingFunction->initialize();
+ //m_pLoadingFunction->CopyBlock(0);
+ m_pLoadingThread = new boost::thread( boost::ref<StreamingSoundLoader>(*m_pLoadingFunction) );
+
+
+}
-#pragma once\r
-#include "mof/sound/SoundBuffer.hpp"\r
-#include <boost/thread.hpp>\r
-#include "mof/sound/StreamingSoundLoader.hpp"\r
-\r
-namespace mof{\r
-namespace sound\r
-{\r
- class DirectSoundDevice;\r
-}\r
- class StreamSoundBuffer : public SoundBuffer\r
- {\r
- LPDIRECTSOUNDNOTIFY8 m_pSoundNotify;\r
- boost::thread* m_pLoadingThread;\r
- StreamingSoundLoader* m_pLoadingFunction;\r
- public:\r
- StreamSoundBuffer(std::shared_ptr<mof::sound::DirectSoundDevice> pDevice, LPDIRECTSOUNDBUFFER8 pBuffer , LPDIRECTSOUNDNOTIFY8 pSoundNotify , SoundFile* pResource);\r
- virtual ~StreamSoundBuffer(void);\r
- virtual bool initialize();\r
- virtual bool play(bool looping);\r
- virtual void stop();\r
- };\r
-\r
-};\r
+#pragma once
+#include "mof/sound/SoundBuffer.hpp"
+#include <boost/thread.hpp>
+#include "mof/sound/StreamingSoundLoader.hpp"
+
+namespace mof{
+namespace sound
+{
+ class DirectSoundDevice;
+}
+ class StreamSoundBuffer : public SoundBuffer
+ {
+ LPDIRECTSOUNDNOTIFY8 m_pSoundNotify;
+ boost::thread* m_pLoadingThread;
+ StreamingSoundLoader* m_pLoadingFunction;
+ public:
+ StreamSoundBuffer(std::shared_ptr<mof::sound::DirectSoundDevice> pDevice, LPDIRECTSOUNDBUFFER8 pBuffer , LPDIRECTSOUNDNOTIFY8 pSoundNotify , SoundFile* pResource);
+ virtual ~StreamSoundBuffer(void);
+ virtual bool initialize();
+ virtual bool play(bool looping);
+ virtual void stop();
+ };
+
+};
-#include "mof/sound/StreamingSoundLoader.hpp"\r
-#include "mof/ConsoleIO.hpp"\r
-\r
-\r
-mof::StreamingSoundLoader::StreamingSoundLoader(LPDIRECTSOUNDBUFFER8 pBuffer , LPDIRECTSOUNDNOTIFY8 pNotify , SoundFile* pResource){\r
- m_pBuffer = pBuffer;\r
- DSBCAPS caps;\r
- ZeroMemory(&caps, sizeof(DSBCAPS));\r
- caps.dwSize = sizeof(DSBCAPS);\r
- m_pBuffer->GetCaps(&caps);\r
- m_bufferSize = caps.dwBufferBytes;\r
- m_pNotify = pNotify;\r
- m_hEvents = NULL;\r
- m_pResource = pResource;\r
-}\r
-\r
-mof::StreamingSoundLoader::StreamingSoundLoader(const StreamingSoundLoader& obj){\r
-\r
- m_pBuffer = obj.m_pBuffer;\r
- m_bufferSize = obj.m_bufferSize;\r
- m_hEvents = NULL;\r
- m_pNotify = obj.m_pNotify;\r
- initialize();\r
- \r
-}\r
-\r
-mof::StreamingSoundLoader::~StreamingSoundLoader(void)\r
-{\r
- for(int i = 0 ; i < 3 ; i++)CloseHandle(m_hEvents[i]);\r
- delete m_hEvents;\r
-}\r
-\r
-bool mof::StreamingSoundLoader::initialize(){\r
-\r
- m_hEvents = new HANDLE[3];\r
- for(int i = 0 ; i < 3 ; i++){\r
- m_hEvents[i] = CreateEvent(NULL , FALSE , FALSE , NULL);\r
- }\r
-\r
- DSBPOSITIONNOTIFY pn[3];\r
- pn[0].dwOffset = 0;\r
- pn[0].hEventNotify = m_hEvents[0];\r
- pn[1].dwOffset = m_bufferSize / 2;\r
- pn[1].hEventNotify = m_hEvents[1];\r
- pn[2].dwOffset = DSBPN_OFFSETSTOP;\r
- pn[2].hEventNotify = m_hEvents[2];\r
-\r
-\r
- HRESULT hr = m_pNotify->SetNotificationPositions(3 , pn);\r
- if(FAILED(hr)){\r
- if(hr == DSERR_INVALIDPARAM)*ConsoleOut::getInstance() << m_pNotify << std::endl;\r
- *ConsoleOut::getInstance() << "Failed --- SetNotificationPosition" << std::endl;\r
- return false;\r
- }\r
- //CopyBlock(1);\r
- return true;\r
-\r
-}\r
-\r
-\r
-\r
-\r
-void mof::StreamingSoundLoader::operator()(){\r
- copyBlock(0);\r
- \r
- while(true){\r
- DWORD i = WaitForMultipleObjects(3 , m_hEvents , FALSE , INFINITE);\r
- //m_pBuffer->GetCurrentPosition(\r
- switch(i){\r
- case WAIT_OBJECT_0:\r
- copyBlock(1);\r
- break;\r
- case WAIT_OBJECT_0 + 1:\r
- copyBlock(0);\r
- break;\r
- case WAIT_OBJECT_0 + 2:\r
- return;\r
- }\r
-\r
- }\r
-\r
-\r
- return;\r
-\r
-}\r
-\r
-\r
-void mof::StreamingSoundLoader::copyBlock(int blockID){\r
- boost::mutex::scoped_lock lock(m_mutex);\r
- HRESULT hr;\r
- long updateSize = m_bufferSize / 2;\r
-\r
- LPVOID pMem1 , pMem2;\r
- DWORD dwSize1 , dwSize2;\r
- //*ConsoleOut::getInstance() << blockID << "\82ð\8dX\90V" << std::endl;\r
- hr = m_pBuffer->Lock(blockID * updateSize , updateSize , &pMem1 , &dwSize1 , &pMem2 , &dwSize2 , 0);\r
- if(FAILED(hr)){\r
- *ConsoleOut::getInstance() << _T("Failed --- LockSoundBuffer") << std::endl;\r
- return;\r
- }\r
- \r
- m_pResource->read((BYTE*)pMem1 , dwSize1 , (BYTE*)pMem2 , dwSize2);\r
- m_pBuffer->Unlock(pMem1 , dwSize1 , pMem2 , dwSize2);\r
-}\r
-\r
+#include "mof/sound/StreamingSoundLoader.hpp"
+#include "mof/ConsoleIO.hpp"
+
+
+mof::StreamingSoundLoader::StreamingSoundLoader(LPDIRECTSOUNDBUFFER8 pBuffer , LPDIRECTSOUNDNOTIFY8 pNotify , SoundFile* pResource){
+ m_pBuffer = pBuffer;
+ DSBCAPS caps;
+ ZeroMemory(&caps, sizeof(DSBCAPS));
+ caps.dwSize = sizeof(DSBCAPS);
+ m_pBuffer->GetCaps(&caps);
+ m_bufferSize = caps.dwBufferBytes;
+ m_pNotify = pNotify;
+ m_hEvents = NULL;
+ m_pResource = pResource;
+}
+
+mof::StreamingSoundLoader::StreamingSoundLoader(const StreamingSoundLoader& obj){
+
+ m_pBuffer = obj.m_pBuffer;
+ m_bufferSize = obj.m_bufferSize;
+ m_hEvents = NULL;
+ m_pNotify = obj.m_pNotify;
+ initialize();
+
+}
+
+mof::StreamingSoundLoader::~StreamingSoundLoader(void)
+{
+ for(int i = 0 ; i < 3 ; i++)CloseHandle(m_hEvents[i]);
+ delete m_hEvents;
+}
+
+bool mof::StreamingSoundLoader::initialize(){
+
+ m_hEvents = new HANDLE[3];
+ for(int i = 0 ; i < 3 ; i++){
+ m_hEvents[i] = CreateEvent(NULL , FALSE , FALSE , NULL);
+ }
+
+ DSBPOSITIONNOTIFY pn[3];
+ pn[0].dwOffset = 0;
+ pn[0].hEventNotify = m_hEvents[0];
+ pn[1].dwOffset = m_bufferSize / 2;
+ pn[1].hEventNotify = m_hEvents[1];
+ pn[2].dwOffset = DSBPN_OFFSETSTOP;
+ pn[2].hEventNotify = m_hEvents[2];
+
+
+ HRESULT hr = m_pNotify->SetNotificationPositions(3 , pn);
+ if(FAILED(hr)){
+ if(hr == DSERR_INVALIDPARAM)*ConsoleOut::getInstance() << m_pNotify << std::endl;
+ *ConsoleOut::getInstance() << "Failed --- SetNotificationPosition" << std::endl;
+ return false;
+ }
+ //CopyBlock(1);
+ return true;
+
+}
+
+
+
+
+void mof::StreamingSoundLoader::operator()(){
+ copyBlock(0);
+
+ while(true){
+ DWORD i = WaitForMultipleObjects(3 , m_hEvents , FALSE , INFINITE);
+ //m_pBuffer->GetCurrentPosition(
+ switch(i){
+ case WAIT_OBJECT_0:
+ copyBlock(1);
+ break;
+ case WAIT_OBJECT_0 + 1:
+ copyBlock(0);
+ break;
+ case WAIT_OBJECT_0 + 2:
+ return;
+ }
+
+ }
+
+
+ return;
+
+}
+
+
+void mof::StreamingSoundLoader::copyBlock(int blockID){
+ boost::mutex::scoped_lock lock(m_mutex);
+ HRESULT hr;
+ long updateSize = m_bufferSize / 2;
+
+ LPVOID pMem1 , pMem2;
+ DWORD dwSize1 , dwSize2;
+ //*ConsoleOut::getInstance() << blockID << "\82ð\8dX\90V" << std::endl;
+ hr = m_pBuffer->Lock(blockID * updateSize , updateSize , &pMem1 , &dwSize1 , &pMem2 , &dwSize2 , 0);
+ if(FAILED(hr)){
+ *ConsoleOut::getInstance() << _T("Failed --- LockSoundBuffer") << std::endl;
+ return;
+ }
+
+ m_pResource->read((BYTE*)pMem1 , dwSize1 , (BYTE*)pMem2 , dwSize2);
+ m_pBuffer->Unlock(pMem1 , dwSize1 , pMem2 , dwSize2);
+}
+
-#pragma once\r
-#include <dsound.h>\r
-#include "mof/sound/SoundFile.hpp"\r
-#include <boost/thread.hpp>\r
-\r
-namespace mof{\r
- class StreamingSoundLoader\r
- {\r
- LPDIRECTSOUNDBUFFER8 m_pBuffer;\r
- DWORD m_bufferSize;\r
- HANDLE* m_hEvents;\r
- SoundFile* m_pResource;\r
- boost::mutex m_mutex;\r
-\r
- \r
- //\8f\89\8aú\89»\97p\95Ï\90\94\r
- LPDIRECTSOUNDNOTIFY8 m_pNotify;\r
- void copyBlock(int blockID);\r
- public:\r
- StreamingSoundLoader(LPDIRECTSOUNDBUFFER8 m_pBuffer , LPDIRECTSOUNDNOTIFY8 pNotify , SoundFile* pResource );\r
- StreamingSoundLoader(const StreamingSoundLoader& obj);\r
- ~StreamingSoundLoader(void);\r
- bool initialize( );\r
- boost::mutex& getMutex(){return m_mutex;}\r
- \r
- void operator()();\r
- \r
- };\r
-\r
-\r
-};\r
+#pragma once
+#include <dsound.h>
+#include "mof/sound/SoundFile.hpp"
+#include <boost/thread.hpp>
+
+namespace mof{
+ class StreamingSoundLoader
+ {
+ LPDIRECTSOUNDBUFFER8 m_pBuffer;
+ DWORD m_bufferSize;
+ HANDLE* m_hEvents;
+ SoundFile* m_pResource;
+ boost::mutex m_mutex;
+
+
+ //\8f\89\8aú\89»\97p\95Ï\90\94
+ LPDIRECTSOUNDNOTIFY8 m_pNotify;
+ void copyBlock(int blockID);
+ public:
+ StreamingSoundLoader(LPDIRECTSOUNDBUFFER8 m_pBuffer , LPDIRECTSOUNDNOTIFY8 pNotify , SoundFile* pResource );
+ StreamingSoundLoader(const StreamingSoundLoader& obj);
+ ~StreamingSoundLoader(void);
+ bool initialize( );
+ boost::mutex& getMutex(){return m_mutex;}
+
+ void operator()();
+
+ };
+
+
+};
-#include "mof/sound/WaveFile.hpp"\r
-#include "mof/ConsoleIO.hpp"\r
-\r
-mof::WaveFile::WaveFile(void)\r
-{\r
- m_impl = new mof::CWaveFile();\r
-}\r
-\r
-mof::WaveFile::~WaveFile(void)\r
-{\r
- m_impl->close();\r
- delete m_impl;\r
-}\r
-\r
-\r
-bool mof::WaveFile::open(const mof::tstring& filename){\r
- WAVEFORMATEX format;\r
- if(FAILED(m_impl->open((LPTSTR)filename.c_str() , &format , WAVEFILE_READ)))return false;\r
- return true;\r
-\r
-}\r
-\r
-\r
-bool mof::WaveFile::close(){\r
- \r
- if(FAILED(m_impl->close()))return false;\r
- return true;\r
-\r
-\r
-}\r
-\r
-\r
-long mof::WaveFile::read( BYTE* pBuffer1, long bufferSize1 , BYTE* pBuffer2 , long bufferSize2 ){\r
- \r
-\r
- DWORD actualReadSize1 = 0;\r
- DWORD offset = 0;\r
- for(offset = 0 ; offset < bufferSize1 ; offset += actualReadSize1){\r
- if(FAILED(m_impl->read(pBuffer1 + offset , bufferSize1 - offset , &actualReadSize1)))return -1;\r
- else if(actualReadSize1 == 0)break;\r
- else if(bufferSize1 - offset != actualReadSize1)resetFile();\r
- \r
- }\r
-\r
- if(bufferSize2 < 0)return actualReadSize1;\r
-\r
- DWORD actualReadSize2 = 0;\r
- for(offset = 0 ; offset < bufferSize2 ; offset += actualReadSize2){\r
- if(FAILED(m_impl->read(pBuffer2 + offset , bufferSize2 - offset, &actualReadSize2)))return -1;\r
- else if(actualReadSize2 == 0)break;\r
- else if(bufferSize2 - offset != actualReadSize2)resetFile();\r
- }\r
-\r
- return actualReadSize1 + actualReadSize2;\r
-\r
-}\r
-\r
-\r
-long mof::WaveFile::getSize(){\r
- return m_impl->getSize();\r
-}\r
-\r
-\r
-\r
-bool mof::WaveFile::resetFile(){\r
- if(FAILED(m_impl->resetFile()))return false;\r
- return true;\r
-}\r
-\r
-\r
-WAVEFORMATEX* mof::WaveFile::getFormat(){\r
- return m_impl->getFormat();\r
-}\r
-\r
-\r
+#include "mof/sound/WaveFile.hpp"
+#include "mof/ConsoleIO.hpp"
+
+mof::WaveFile::WaveFile(void)
+{
+ m_impl = new mof::CWaveFile();
+}
+
+mof::WaveFile::~WaveFile(void)
+{
+ m_impl->close();
+ delete m_impl;
+}
+
+
+bool mof::WaveFile::open(const mof::tstring& filename){
+ WAVEFORMATEX format;
+ if(FAILED(m_impl->open((LPTSTR)filename.c_str() , &format , WAVEFILE_READ)))return false;
+ return true;
+
+}
+
+
+bool mof::WaveFile::close(){
+
+ if(FAILED(m_impl->close()))return false;
+ return true;
+
+
+}
+
+
+long mof::WaveFile::read( BYTE* pBuffer1, long bufferSize1 , BYTE* pBuffer2 , long bufferSize2 ){
+
+
+ DWORD actualReadSize1 = 0;
+ DWORD offset = 0;
+ for(offset = 0 ; offset < bufferSize1 ; offset += actualReadSize1){
+ if(FAILED(m_impl->read(pBuffer1 + offset , bufferSize1 - offset , &actualReadSize1)))return -1;
+ else if(actualReadSize1 == 0)break;
+ else if(bufferSize1 - offset != actualReadSize1)resetFile();
+
+ }
+
+ if(bufferSize2 < 0)return actualReadSize1;
+
+ DWORD actualReadSize2 = 0;
+ for(offset = 0 ; offset < bufferSize2 ; offset += actualReadSize2){
+ if(FAILED(m_impl->read(pBuffer2 + offset , bufferSize2 - offset, &actualReadSize2)))return -1;
+ else if(actualReadSize2 == 0)break;
+ else if(bufferSize2 - offset != actualReadSize2)resetFile();
+ }
+
+ return actualReadSize1 + actualReadSize2;
+
+}
+
+
+long mof::WaveFile::getSize(){
+ return m_impl->getSize();
+}
+
+
+
+bool mof::WaveFile::resetFile(){
+ if(FAILED(m_impl->resetFile()))return false;
+ return true;
+}
+
+
+WAVEFORMATEX* mof::WaveFile::getFormat(){
+ return m_impl->getFormat();
+}
+
+
-#pragma once\r
-#include "mof/sound/SoundFile.hpp"\r
-#include "mof/sound/CWaveFile.h"\r
-#include <mmsystem.h>\r
-#include <mof/tstring.hpp>\r
-\r
-namespace mof{\r
- class WaveFile : public SoundFile\r
- {\r
- CWaveFile* m_impl;\r
- public:\r
- WaveFile(void);\r
- virtual ~WaveFile(void);\r
-\r
- virtual bool open(const mof::tstring& filename);\r
- virtual bool close();\r
- virtual long read( BYTE* pBuffer1, long bufferSize1 , BYTE* pBuffer2 , long bufferSize2 );\r
- virtual long getSize();\r
- virtual bool resetFile();\r
- virtual WAVEFORMATEX* getFormat();\r
- };\r
-\r
-};\r
+#pragma once
+#include "mof/sound/SoundFile.hpp"
+#include "mof/sound/CWaveFile.h"
+#include <mmsystem.h>
+#include <mof/tstring.hpp>
+
+namespace mof{
+ class WaveFile : public SoundFile
+ {
+ CWaveFile* m_impl;
+ public:
+ WaveFile(void);
+ virtual ~WaveFile(void);
+
+ virtual bool open(const mof::tstring& filename);
+ virtual bool close();
+ virtual long read( BYTE* pBuffer1, long bufferSize1 , BYTE* pBuffer2 , long bufferSize2 );
+ virtual long getSize();
+ virtual bool resetFile();
+ virtual WAVEFORMATEX* getFormat();
+ };
+
+};
-#pragma once\r
-#include "mof/stream/utilities.hpp"\r
-\r
-namespace mof\r
-{\r
- typedef TypeStream<mof::real, Multiply<mof::real>> volume_stream;\r
- typedef TypeStream<mof::real, Overwrite<mof::real>> frequency_stream;\r
-\r
-namespace sound\r
-{\r
-\r
- class component_sound\r
- {\r
- public:\r
- virtual ~component_sound(){}\r
-\r
- const mof::volume_stream& volume_stream() const { return volume_stream_; }\r
- mof::volume_stream& volume_stream() { return volume_stream_; }\r
-\r
- const mof::frequency_stream& frequency_stream() const { return frequency_stream_; }\r
- mof::frequency_stream& frequency_stream() { return frequency_stream_; }\r
- \r
- protected:\r
- mof::volume_stream volume_stream_;///< 0 - 1.0\r
- mof::frequency_stream frequency_stream_;///< 0 - \r
-\r
- component_sound()\r
- : \r
- volume_stream_(makeConstantHandler(1.0f)),\r
- frequency_stream_(makeConstantHandler(1.0f)) \r
- {}\r
- \r
- component_sound(mof::real volume, mof::real frequency)\r
- : \r
- volume_stream_(makeConstantHandler(volume)),\r
- frequency_stream_(makeConstantHandler(frequency))\r
- {}\r
-\r
- };\r
-\r
-}// namespace sound \r
-}// namespace mof\r
+#pragma once
+#include "mof/stream/utilities.hpp"
+
+namespace mof
+{
+ typedef TypeStream<mof::real, Multiply<mof::real>> volume_stream;
+ typedef TypeStream<mof::real, Overwrite<mof::real>> frequency_stream;
+
+namespace sound
+{
+
+ class component_sound
+ {
+ public:
+ virtual ~component_sound(){}
+
+ const mof::volume_stream& volume_stream() const { return volume_stream_; }
+ mof::volume_stream& volume_stream() { return volume_stream_; }
+
+ const mof::frequency_stream& frequency_stream() const { return frequency_stream_; }
+ mof::frequency_stream& frequency_stream() { return frequency_stream_; }
+
+ protected:
+ mof::volume_stream volume_stream_;///< 0 - 1.0
+ mof::frequency_stream frequency_stream_;///< 0 -
+
+ component_sound()
+ :
+ volume_stream_(makeConstantHandler(1.0f)),
+ frequency_stream_(makeConstantHandler(1.0f))
+ {}
+
+ component_sound(mof::real volume, mof::real frequency)
+ :
+ volume_stream_(makeConstantHandler(volume)),
+ frequency_stream_(makeConstantHandler(frequency))
+ {}
+
+ };
+
+}// namespace sound
+}// namespace mof
-#ifndef MOF_ANIMATION_PLAYER_HPP\r
-#define MOF_ANIMATION_PLAYER_HPP\r
-#include "mof/Animation.hpp"\r
-\r
-namespace mof{\r
-\r
-\r
-class AnimationPlayer{\r
-\r
-public:\r
- virtual void setFrameNumber(mof::FrameNumber frame) = 0;\r
- virtual void nextFrame() = 0;\r
- virtual void prevFrame() = 0;\r
- //virtual void reset(){setFrameNumber(0);}\r
-};\r
-\r
-}\r
-\r
-\r
-#endif\r
+#ifndef MOF_ANIMATION_PLAYER_HPP
+#define MOF_ANIMATION_PLAYER_HPP
+#include "mof/Animation.hpp"
+
+namespace mof{
+
+
+class AnimationPlayer{
+
+public:
+ virtual void setFrameNumber(mof::FrameNumber frame) = 0;
+ virtual void nextFrame() = 0;
+ virtual void prevFrame() = 0;
+ //virtual void reset(){setFrameNumber(0);}
+};
+
+}
+
+
+#endif
-#include "mof/AnimationScheduler.h"\r
-#include "mof/ConsoleIO.h"\r
-\r
-typedef std::multimap<mof::AnimationKey , mof::AnimationResource>::iterator MapItr;\r
-\r
-mof::AnimationScheduler::AnimationScheduler(){\r
- m_key = 0;\r
-\r
-}\r
-\r
-mof::AnimationScheduler::~AnimationScheduler(){\r
-\r
-}\r
-\r
-void mof::AnimationScheduler::update(){\r
- \r
- std::pair<MapItr , MapItr> range(m_map.begin() , m_map.upper_bound(m_key));\r
- for(MapItr itr = range.first ; itr != range.second ; ++itr){\r
- if(itr->second.get() != NULL && !itr->second->isPlaying())itr->second->start();\r
- }\r
- \r
- m_key++;\r
-}\r
-\r
-void mof::AnimationScheduler::add(int index , mof::AnimationResource pAnimation){\r
- if(pAnimation.get() != NULL)pAnimation->stop();\r
- m_map.insert(std::multimap<mof::AnimationKey , mof::AnimationResource>::value_type(index , pAnimation));\r
-\r
-}\r
- \r
-bool mof::AnimationScheduler::isFinalized(){\r
- for(MapItr itr = m_map.begin() ; itr != m_map.end() ; ++itr){\r
- if(!itr->second->isFinalized())return false;\r
- }\r
- return true;\r
-}\r
-\r
-void mof::AnimationScheduler::clear(){\r
- m_key = 0;\r
- m_map.clear();\r
+#include "mof/AnimationScheduler.h"
+#include "mof/ConsoleIO.h"
+
+typedef std::multimap<mof::AnimationKey , mof::AnimationResource>::iterator MapItr;
+
+mof::AnimationScheduler::AnimationScheduler(){
+ m_key = 0;
+
+}
+
+mof::AnimationScheduler::~AnimationScheduler(){
+
+}
+
+void mof::AnimationScheduler::update(){
+
+ std::pair<MapItr , MapItr> range(m_map.begin() , m_map.upper_bound(m_key));
+ for(MapItr itr = range.first ; itr != range.second ; ++itr){
+ if(itr->second.get() != NULL && !itr->second->isPlaying())itr->second->start();
+ }
+
+ m_key++;
+}
+
+void mof::AnimationScheduler::add(int index , mof::AnimationResource pAnimation){
+ if(pAnimation.get() != NULL)pAnimation->stop();
+ m_map.insert(std::multimap<mof::AnimationKey , mof::AnimationResource>::value_type(index , pAnimation));
+
+}
+
+bool mof::AnimationScheduler::isFinalized(){
+ for(MapItr itr = m_map.begin() ; itr != m_map.end() ; ++itr){
+ if(!itr->second->isFinalized())return false;
+ }
+ return true;
+}
+
+void mof::AnimationScheduler::clear(){
+ m_key = 0;
+ m_map.clear();
}
\ No newline at end of file
-#pragma once\r
-#include "mof/KeyFrameAnimation.hpp"\r
-#include "mof/Rectangle.hpp"\r
-#include "mof/Vector2D.hpp"\r
-\r
-namespace mof\r
-{\r
- class BoundsAnimation : public mof::Animation< mof::Rectangle<int> >\r
- {\r
- public:\r
-\r
- BoundsAnimation\r
- (\r
- const mof::Animation<mof::Vector2D>::Handler& position ,\r
- const mof::Animation<mof::Vector2D>::Handler& scale \r
- )\r
- : m_position( position) , m_scale( scale )\r
- {\r
- }\r
-\r
- mof::Rectangle<int> getValue( mof::FrameNumber frame ) const\r
- {\r
- mof::Vector2D position = m_position->getValue( frame );\r
- mof::Vector2D scale = m_scale->getValue( frame );\r
- return mof::Rectangle<int>\r
- (\r
- position.x , position.y ,\r
- position.x + scale.x ,\r
- position.y + scale.y \r
- );\r
- }\r
-\r
- private:\r
-\r
- mof::Animation<mof::Vector2D>::Handler m_position;\r
- mof::Animation<mof::Vector2D>::Handler m_scale;\r
- };\r
-}\r
+#pragma once
+#include "mof/KeyFrameAnimation.hpp"
+#include "mof/Rectangle.hpp"
+#include "mof/Vector2D.hpp"
+
+namespace mof
+{
+ class BoundsAnimation : public mof::Animation< mof::Rectangle<int> >
+ {
+ public:
+
+ BoundsAnimation
+ (
+ const mof::Animation<mof::Vector2D>::Handler& position ,
+ const mof::Animation<mof::Vector2D>::Handler& scale
+ )
+ : m_position( position) , m_scale( scale )
+ {
+ }
+
+ mof::Rectangle<int> getValue( mof::FrameNumber frame ) const
+ {
+ mof::Vector2D position = m_position->getValue( frame );
+ mof::Vector2D scale = m_scale->getValue( frame );
+ return mof::Rectangle<int>
+ (
+ position.x , position.y ,
+ position.x + scale.x ,
+ position.y + scale.y
+ );
+ }
+
+ private:
+
+ mof::Animation<mof::Vector2D>::Handler m_position;
+ mof::Animation<mof::Vector2D>::Handler m_scale;
+ };
+}
-#pragma once\r
-#include "mof/stream/Manipulator.hpp"\r
-#include <mof/Timer.hpp>\r
-\r
-namespace mof{\r
- void state_changed();\r
- unsigned long get_global_ts();\r
-\r
- template< typename T >\r
- class Cache : public Manipulator< T >\r
- {\r
- \r
- public:\r
- typedef typename std::shared_ptr<Cache> Handler;\r
-\r
- virtual ~Cache( ){}\r
-\r
- virtual T value( FrameNumber frame ) const\r
- {\r
- if (local_ts_ < mof::get_global_ts() || m_lastFrame != frame) {\r
- // キャッシュが無効になっている可能性\r
- local_ts_ = mof::Timer::getSystemTime();\r
- m_lastFrame = frame;\r
- m_cached = m_pBody->value(frame);\r
- }\r
- return m_cached;\r
- }\r
-\r
- \r
- private:\r
- typename Manipulator<T>::Handler m_pBody;\r
- mutable FrameNumber m_lastFrame;\r
- mutable T m_cached;\r
- mutable unsigned long local_ts_;\r
-\r
- Cache(const typename Manipulator<T>::Handler& pBody)\r
- : m_pBody(pBody) , m_lastFrame(0), local_ts_(0)\r
- {\r
- }\r
-\r
- template<typename T > friend\r
- typename std::shared_ptr< Cache<T> > makeCacheHandler\r
- (\r
- const typename Manipulator<T>::Handler& pBody \r
- );\r
-\r
- };\r
-\r
-\r
-\r
- template< typename T >\r
- std::shared_ptr< Cache< T > > makeCacheHandler\r
- (\r
- const typename Manipulator< T >::Handler& pBody \r
- )\r
- {\r
- return typename Cache< T >::Handler(\r
- new Cache< T >( pBody )\r
- );\r
- }\r
-\r
-\r
-} //namespace mof\r
-\r
+#pragma once
+#include "mof/stream/Manipulator.hpp"
+#include <mof/Timer.hpp>
+
+namespace mof{
+ void state_changed();
+ unsigned long get_global_ts();
+
+ template< typename T >
+ class Cache : public Manipulator< T >
+ {
+
+ public:
+ typedef typename std::shared_ptr<Cache> Handler;
+
+ virtual ~Cache( ){}
+
+ virtual T value( FrameNumber frame ) const
+ {
+ if (local_ts_ < mof::get_global_ts() || m_lastFrame != frame) {
+ // キャッシュが無効になっている可能性
+ local_ts_ = mof::Timer::getSystemTime();
+ m_lastFrame = frame;
+ m_cached = m_pBody->value(frame);
+ }
+ return m_cached;
+ }
+
+
+ private:
+ typename Manipulator<T>::Handler m_pBody;
+ mutable FrameNumber m_lastFrame;
+ mutable T m_cached;
+ mutable unsigned long local_ts_;
+
+ Cache(const typename Manipulator<T>::Handler& pBody)
+ : m_pBody(pBody) , m_lastFrame(0), local_ts_(0)
+ {
+ }
+
+ template<typename T > friend
+ typename std::shared_ptr< Cache<T> > makeCacheHandler
+ (
+ const typename Manipulator<T>::Handler& pBody
+ );
+
+ };
+
+
+
+ template< typename T >
+ std::shared_ptr< Cache< T > > makeCacheHandler
+ (
+ const typename Manipulator< T >::Handler& pBody
+ )
+ {
+ return typename Cache< T >::Handler(
+ new Cache< T >( pBody )
+ );
+ }
+
+
+} //namespace mof
+
-#pragma once\r
-#include "mof/stream/Manipulator.hpp"\r
-#include "mof/stream/Cache.hpp"\r
-#include <vector> \r
-\r
-namespace mof\r
-{\r
- #define DEFAULT_CASCADOR Multiply\r
-//{{{ struct Add\r
- template<typename T>\r
- struct Add\r
- {\r
- inline static T apply(const T& a , const T& b)\r
- {\r
- return a + b;\r
- }\r
- };\r
-//}}}\r
-//{{{ struct Multiply\r
- template<typename T>\r
- struct Multiply\r
- {\r
- inline static T apply(const T& a , const T& b)\r
- {\r
- return a * b;\r
- }\r
- };\r
-//}}}\r
-//{{{ struct Overwrite\r
- template<typename T>\r
- struct Overwrite\r
- {\r
- inline static T apply(const T& , const T& b)\r
- {\r
- return b;\r
- }\r
- };\r
-//}}}\r
-//{{{ class Cascade\r
- template< typename T , class Cascador = DEFAULT_CASCADOR< T > >\r
- class Cascade : public Manipulator< T >{\r
- public:\r
- typedef typename std::shared_ptr< Cascade > Handler;\r
-\r
- virtual ~Cascade()\r
- {\r
- }\r
-\r
- virtual T value( FrameNumber frame) const\r
- {\r
- T obj = m_list[0]->value(frame);\r
- for(unsigned int i = 1 ; i < m_list.size() ; i++)\r
- {\r
- obj = Cascador::apply(obj , m_list[i]->value(frame));\r
- }\r
- return obj;\r
- }\r
-\r
- void clear()\r
- {\r
- m_list.clear();\r
- mof::state_changed();\r
- }\r
-\r
- void add( const typename Manipulator<T>::Handler& handler )\r
- {\r
- m_list.push_back( handler );\r
- mof::state_changed();\r
- }\r
-\r
- private: \r
- typedef std::vector< typename Manipulator< T >::Handler > List;\r
- List m_list;\r
- \r
- Cascade\r
- (\r
- const typename Manipulator< T >::Handler& front , \r
- const typename Manipulator< T >::Handler& back \r
- )\r
- {\r
- int length = &back - &front + 1;\r
- if(length <= 0)throw std::invalid_argument("list size is 0");\r
-\r
- for( int i = 0 ; i < length ; i++)\r
- {\r
- m_list.push_back( (&front)[i] );\r
- }\r
- }\r
- \r
-\r
- Cascade(){}\r
- \r
- template< typename T , class Cascador >\r
- friend typename std::shared_ptr< Cascade< T , Cascador > >\r
- makeCascadeHandler\r
- (\r
- const typename Manipulator< T >::Handler& front , \r
- const typename Manipulator< T >::Handler& back \r
- );\r
-\r
- template< typename T , class Cascador >\r
- friend typename std::shared_ptr< Cascade< T , Cascador > > makeCascadeHandler();\r
-\r
-\r
- };\r
-//}}}\r
-//{{{ ヘルパ関数 \r
- template< typename T , class Cascador >\r
- std::shared_ptr< Cascade< T , Cascador > >\r
- makeCascadeHandler\r
- (\r
- const typename Manipulator< T >::Handler& front , \r
- const typename Manipulator< T >::Handler& back \r
- )\r
- {\r
- return typename Cascade< T , Cascador >::Handler\r
- (\r
- new Cascade< T , Cascador >( front , back ) \r
- );\r
- }\r
- \r
- template< typename T , class Cascador >\r
- typename std::shared_ptr< Cascade< T , Cascador > >\r
- makeCascadeHandler( )\r
- {\r
- return typename Cascade< T , Cascador >::Handler\r
- (\r
- new Cascade< T , Cascador >\r
- );\r
- }\r
-\r
- template<typename T >\r
- typename std::shared_ptr< Cascade< T , DEFAULT_CASCADOR< T > > >\r
- makeCascadeHandler\r
- (\r
- const typename Manipulator< T >::Handler& front , \r
- const typename Manipulator< T >::Handler& back \r
- )\r
- {\r
- return makeCascadeHandler< T , DEFAULT_CASCADOR< T > >( front , back );\r
- }\r
- \r
- template<typename T >\r
- typename std::shared_ptr< Cascade< T , DEFAULT_CASCADOR< T > > >\r
- makeCascadeHandler( )\r
- {\r
- return makeCascadeHandler< T , DEFAULT_CASCADOR< T > >();\r
- }\r
-//}}}\r
-//{{{ ストリーム演算子\r
- template< typename T , class Cascador >\r
- std::shared_ptr< Cascade< T , Cascador > >& \r
- operator << \r
- (\r
- std::shared_ptr< Cascade< T , Cascador > >& a ,\r
- const typename Manipulator< T >::Handler& b \r
- )\r
- {\r
- a->add( b );\r
- return a;\r
- }\r
-\r
- template< typename T , class Cascador >\r
- typename std::shared_ptr< Cascade< T , Cascador > >& \r
- operator << \r
- (\r
- std::shared_ptr< Cascade< T , Cascador > >& a ,\r
- const T& b \r
- )\r
- {\r
- a->add( mof::makeConstantHandler( b ) );\r
- return a;\r
- }\r
-//}}}\r
-} //namespace mof\r
-\r
+#pragma once
+#include "mof/stream/Manipulator.hpp"
+#include "mof/stream/Cache.hpp"
+#include <vector>
+
+namespace mof
+{
+ #define DEFAULT_CASCADOR Multiply
+//{{{ struct Add
+ template<typename T>
+ struct Add
+ {
+ inline static T apply(const T& a , const T& b)
+ {
+ return a + b;
+ }
+ };
+//}}}
+//{{{ struct Multiply
+ template<typename T>
+ struct Multiply
+ {
+ inline static T apply(const T& a , const T& b)
+ {
+ return a * b;
+ }
+ };
+//}}}
+//{{{ struct Overwrite
+ template<typename T>
+ struct Overwrite
+ {
+ inline static T apply(const T& , const T& b)
+ {
+ return b;
+ }
+ };
+//}}}
+//{{{ class Cascade
+ template< typename T , class Cascador = DEFAULT_CASCADOR< T > >
+ class Cascade : public Manipulator< T >{
+ public:
+ typedef typename std::shared_ptr< Cascade > Handler;
+
+ virtual ~Cascade()
+ {
+ }
+
+ virtual T value( FrameNumber frame) const
+ {
+ T obj = m_list[0]->value(frame);
+ for(unsigned int i = 1 ; i < m_list.size() ; i++)
+ {
+ obj = Cascador::apply(obj , m_list[i]->value(frame));
+ }
+ return obj;
+ }
+
+ void clear()
+ {
+ m_list.clear();
+ mof::state_changed();
+ }
+
+ void add( const typename Manipulator<T>::Handler& handler )
+ {
+ m_list.push_back( handler );
+ mof::state_changed();
+ }
+
+ private:
+ typedef std::vector< typename Manipulator< T >::Handler > List;
+ List m_list;
+
+ Cascade
+ (
+ const typename Manipulator< T >::Handler& front ,
+ const typename Manipulator< T >::Handler& back
+ )
+ {
+ int length = &back - &front + 1;
+ if(length <= 0)throw std::invalid_argument("list size is 0");
+
+ for( int i = 0 ; i < length ; i++)
+ {
+ m_list.push_back( (&front)[i] );
+ }
+ }
+
+
+ Cascade(){}
+
+ template< typename T , class Cascador >
+ friend typename std::shared_ptr< Cascade< T , Cascador > >
+ makeCascadeHandler
+ (
+ const typename Manipulator< T >::Handler& front ,
+ const typename Manipulator< T >::Handler& back
+ );
+
+ template< typename T , class Cascador >
+ friend typename std::shared_ptr< Cascade< T , Cascador > > makeCascadeHandler();
+
+
+ };
+//}}}
+//{{{ ヘルパ関数
+ template< typename T , class Cascador >
+ std::shared_ptr< Cascade< T , Cascador > >
+ makeCascadeHandler
+ (
+ const typename Manipulator< T >::Handler& front ,
+ const typename Manipulator< T >::Handler& back
+ )
+ {
+ return typename Cascade< T , Cascador >::Handler
+ (
+ new Cascade< T , Cascador >( front , back )
+ );
+ }
+
+ template< typename T , class Cascador >
+ typename std::shared_ptr< Cascade< T , Cascador > >
+ makeCascadeHandler( )
+ {
+ return typename Cascade< T , Cascador >::Handler
+ (
+ new Cascade< T , Cascador >
+ );
+ }
+
+ template<typename T >
+ typename std::shared_ptr< Cascade< T , DEFAULT_CASCADOR< T > > >
+ makeCascadeHandler
+ (
+ const typename Manipulator< T >::Handler& front ,
+ const typename Manipulator< T >::Handler& back
+ )
+ {
+ return makeCascadeHandler< T , DEFAULT_CASCADOR< T > >( front , back );
+ }
+
+ template<typename T >
+ typename std::shared_ptr< Cascade< T , DEFAULT_CASCADOR< T > > >
+ makeCascadeHandler( )
+ {
+ return makeCascadeHandler< T , DEFAULT_CASCADOR< T > >();
+ }
+//}}}
+//{{{ ストリーム演算子
+ template< typename T , class Cascador >
+ std::shared_ptr< Cascade< T , Cascador > >&
+ operator <<
+ (
+ std::shared_ptr< Cascade< T , Cascador > >& a ,
+ const typename Manipulator< T >::Handler& b
+ )
+ {
+ a->add( b );
+ return a;
+ }
+
+ template< typename T , class Cascador >
+ typename std::shared_ptr< Cascade< T , Cascador > >&
+ operator <<
+ (
+ std::shared_ptr< Cascade< T , Cascador > >& a ,
+ const T& b
+ )
+ {
+ a->add( mof::makeConstantHandler( b ) );
+ return a;
+ }
+//}}}
+} //namespace mof
+
-\r
-#include "mof/CascadeAnimation.h"\r
-\r
-\r
-\r
-mof::CascadeAnimation::CascadeAnimation()\r
-: mof::Animation(false)\r
-{\r
- m_key = 0;\r
- m_maxKey = m_finalKey = 0;\r
-}\r
-\r
-mof::CascadeAnimation::~CascadeAnimation(){\r
-\r
-}\r
-\r
-void mof::CascadeAnimation::setElement(int index , mof::AnimationResource& pAnimation){\r
- if(m_pAnimations.size() <= index)m_pAnimations.resize(index+1);\r
- m_pAnimations.at(index) = pAnimation;\r
- \r
-}\r
-\r
-mof::AnimationResource mof::CascadeAnimation::getElement(int index){\r
- if(m_pAnimations.size() <= index)return mof::AnimationResource();\r
- else return m_pAnimations.at(index);\r
-}\r
-\r
-\r
-\r
-bool mof::CascadeAnimation::update(){\r
- if(!isPlaying())return false;\r
- m_key++;\r
- for(int i = 0 ; i < m_pAnimations.size() ; i++){\r
- if(m_pAnimations.at(i).get() != NULL)m_pAnimations.at(i)->update();\r
- }\r
- return true;\r
-}\r
-\r
-bool mof::CascadeAnimation::isFinalized(){\r
-\r
- for(int i = 0 ; i < m_pAnimations.size() ; i++){\r
- if(m_pAnimations.at(i).get() == NULL)continue;\r
- if(!m_pAnimations.at(i)->isFinalized())return false;\r
- }\r
- return true;\r
-}\r
-\r
-void mof::CascadeAnimation::setFinalKey(mof::AnimationKey key){\r
- if(key > m_maxKey)m_finalKey = m_maxKey;\r
- else m_finalKey = key;\r
-}\r
-\r
-/*\r
-mof::Vector2D mof::CascadeAnimation::getPosition(mof::Vector2D& position){\r
- for(int i = 0 ; i < m_pAnimations.size() ; i++){\r
- if(m_pAnimations.at(i).get() == NULL)continue;\r
- position = m_pAnimations.at(i)->getPosition(position);\r
- }\r
- return position;\r
-\r
-}*/\r
-\r
-mof::Vector2D mof::CascadeAnimation::getPosition(){\r
- mof::Vector2D position;\r
- for(int i = 0 ; i < m_pAnimations.size() ; i++){\r
- if(m_pAnimations.at(i).get() == NULL)continue;\r
- position = position + m_pAnimations.at(i)->getPosition();\r
- }\r
- return position;\r
-\r
-}\r
- \r
-float mof::CascadeAnimation::getWidth(){\r
- float result = 1.0f;\r
- for(int i = 0 ; i < m_pAnimations.size() ; i++){\r
- if(m_pAnimations.at(i).get() == NULL)continue;\r
- result *= m_pAnimations.at(i)->getWidth();\r
- }\r
- return result;\r
-}\r
-\r
-float mof::CascadeAnimation::getHeight(){\r
- float result = 1.0f;\r
- for(int i = 0 ; i < m_pAnimations.size() ; i++){\r
- if(m_pAnimations.at(i).get() == NULL)continue;\r
- result *= m_pAnimations.at(i)->getHeight();\r
- }\r
- return result;\r
-}\r
-\r
-\r
-float mof::CascadeAnimation::getDepth(){\r
- float result = 1.0f;\r
- for(int i = 0 ; i < m_pAnimations.size() ; i++){\r
- if(m_pAnimations.at(i).get() == NULL)continue;\r
- result *= m_pAnimations.at(i)->getDepth();\r
- }\r
- return result;\r
-}\r
-\r
-\r
- \r
-mof::Color mof::CascadeAnimation::getColor(){\r
- float a = 1.0f , r = 1.0f, g = 1.0f, b = 1.0f;\r
- for(int i = 0 ; i < m_pAnimations.size() ; i++){\r
- if(m_pAnimations.at(i).get() == NULL)continue;\r
- mof::Color tmp = m_pAnimations.at(i)->getColor();\r
- a = a * ((float)mof::getAlpha(tmp) / 255);\r
- r = r * ((float)mof::getRed(tmp) / 255);\r
- g = g * ((float)mof::getGreen(tmp) / 255);\r
- b = b * ((float)mof::getBlue(tmp) / 255);\r
- }\r
- return mof::createColor(a * 255 , r * 255 , g * 255 , b * 255);\r
-}\r
-\r
-\r
-mof::Matrix3D mof::CascadeAnimation::getWorldTransform(mof::Matrix3D& matrix){\r
- for(int i = 0 ; i < m_pAnimations.size() ; i++){\r
- if(m_pAnimations.at(i).get() == NULL)continue;\r
- matrix = m_pAnimations.at(i)->getWorldTransform(matrix);\r
- }\r
- return matrix;\r
-}\r
-\r
-\r
-mof::Line2D mof::CascadeAnimation::getTextureRectangle(){\r
- mof::Line2D result;\r
- for(int i = 0 ; i < m_pAnimations.size() ; i++){\r
- if(m_pAnimations.at(i).get() == NULL)continue;\r
- mof::Line2D tmp = m_pAnimations.at(i)->getTextureRectangle();\r
- if(tmp != mof::Line2D())result = tmp;\r
- }\r
- return result;\r
-}\r
-\r
-\r
-void mof::CascadeAnimation::start(){\r
- for(int i = 0 ; i < getLength() ; i++){\r
- if(m_pAnimations.at(i).get() == NULL)continue;\r
- if(!m_pAnimations.at(i)->isPlaying())m_pAnimations.at(i)->start();\r
- }\r
-}\r
- \r
-void mof::CascadeAnimation::stop(){\r
- for(int i = 0 ; i < getLength() ; i++){\r
- if(m_pAnimations.at(i).get() == NULL)continue;\r
- if(m_pAnimations.at(i)->isPlaying())m_pAnimations.at(i)->stop();\r
- }\r
-}\r
-\r
-bool mof::CascadeAnimation::isPlaying(){\r
- if(getLength() == 0)return true;\r
- bool hasAnimation = false;\r
-\r
- for(int i = 0 ; i < getLength() ; i++){\r
- if(m_pAnimations.at(i).get() == NULL)continue;\r
- if(m_pAnimations.at(i)->isPlaying())return true;\r
- else hasAnimation = true;\r
- }\r
- return !hasAnimation;//\91S\97v\91f\82ªNULL\82È\82çtrue\r
+
+#include "mof/CascadeAnimation.h"
+
+
+
+mof::CascadeAnimation::CascadeAnimation()
+: mof::Animation(false)
+{
+ m_key = 0;
+ m_maxKey = m_finalKey = 0;
+}
+
+mof::CascadeAnimation::~CascadeAnimation(){
+
+}
+
+void mof::CascadeAnimation::setElement(int index , mof::AnimationResource& pAnimation){
+ if(m_pAnimations.size() <= index)m_pAnimations.resize(index+1);
+ m_pAnimations.at(index) = pAnimation;
+
+}
+
+mof::AnimationResource mof::CascadeAnimation::getElement(int index){
+ if(m_pAnimations.size() <= index)return mof::AnimationResource();
+ else return m_pAnimations.at(index);
+}
+
+
+
+bool mof::CascadeAnimation::update(){
+ if(!isPlaying())return false;
+ m_key++;
+ for(int i = 0 ; i < m_pAnimations.size() ; i++){
+ if(m_pAnimations.at(i).get() != NULL)m_pAnimations.at(i)->update();
+ }
+ return true;
+}
+
+bool mof::CascadeAnimation::isFinalized(){
+
+ for(int i = 0 ; i < m_pAnimations.size() ; i++){
+ if(m_pAnimations.at(i).get() == NULL)continue;
+ if(!m_pAnimations.at(i)->isFinalized())return false;
+ }
+ return true;
+}
+
+void mof::CascadeAnimation::setFinalKey(mof::AnimationKey key){
+ if(key > m_maxKey)m_finalKey = m_maxKey;
+ else m_finalKey = key;
+}
+
+/*
+mof::Vector2D mof::CascadeAnimation::getPosition(mof::Vector2D& position){
+ for(int i = 0 ; i < m_pAnimations.size() ; i++){
+ if(m_pAnimations.at(i).get() == NULL)continue;
+ position = m_pAnimations.at(i)->getPosition(position);
+ }
+ return position;
+
+}*/
+
+mof::Vector2D mof::CascadeAnimation::getPosition(){
+ mof::Vector2D position;
+ for(int i = 0 ; i < m_pAnimations.size() ; i++){
+ if(m_pAnimations.at(i).get() == NULL)continue;
+ position = position + m_pAnimations.at(i)->getPosition();
+ }
+ return position;
+
+}
+
+float mof::CascadeAnimation::getWidth(){
+ float result = 1.0f;
+ for(int i = 0 ; i < m_pAnimations.size() ; i++){
+ if(m_pAnimations.at(i).get() == NULL)continue;
+ result *= m_pAnimations.at(i)->getWidth();
+ }
+ return result;
+}
+
+float mof::CascadeAnimation::getHeight(){
+ float result = 1.0f;
+ for(int i = 0 ; i < m_pAnimations.size() ; i++){
+ if(m_pAnimations.at(i).get() == NULL)continue;
+ result *= m_pAnimations.at(i)->getHeight();
+ }
+ return result;
+}
+
+
+float mof::CascadeAnimation::getDepth(){
+ float result = 1.0f;
+ for(int i = 0 ; i < m_pAnimations.size() ; i++){
+ if(m_pAnimations.at(i).get() == NULL)continue;
+ result *= m_pAnimations.at(i)->getDepth();
+ }
+ return result;
+}
+
+
+
+mof::Color mof::CascadeAnimation::getColor(){
+ float a = 1.0f , r = 1.0f, g = 1.0f, b = 1.0f;
+ for(int i = 0 ; i < m_pAnimations.size() ; i++){
+ if(m_pAnimations.at(i).get() == NULL)continue;
+ mof::Color tmp = m_pAnimations.at(i)->getColor();
+ a = a * ((float)mof::getAlpha(tmp) / 255);
+ r = r * ((float)mof::getRed(tmp) / 255);
+ g = g * ((float)mof::getGreen(tmp) / 255);
+ b = b * ((float)mof::getBlue(tmp) / 255);
+ }
+ return mof::createColor(a * 255 , r * 255 , g * 255 , b * 255);
+}
+
+
+mof::Matrix3D mof::CascadeAnimation::getWorldTransform(mof::Matrix3D& matrix){
+ for(int i = 0 ; i < m_pAnimations.size() ; i++){
+ if(m_pAnimations.at(i).get() == NULL)continue;
+ matrix = m_pAnimations.at(i)->getWorldTransform(matrix);
+ }
+ return matrix;
+}
+
+
+mof::Line2D mof::CascadeAnimation::getTextureRectangle(){
+ mof::Line2D result;
+ for(int i = 0 ; i < m_pAnimations.size() ; i++){
+ if(m_pAnimations.at(i).get() == NULL)continue;
+ mof::Line2D tmp = m_pAnimations.at(i)->getTextureRectangle();
+ if(tmp != mof::Line2D())result = tmp;
+ }
+ return result;
+}
+
+
+void mof::CascadeAnimation::start(){
+ for(int i = 0 ; i < getLength() ; i++){
+ if(m_pAnimations.at(i).get() == NULL)continue;
+ if(!m_pAnimations.at(i)->isPlaying())m_pAnimations.at(i)->start();
+ }
+}
+
+void mof::CascadeAnimation::stop(){
+ for(int i = 0 ; i < getLength() ; i++){
+ if(m_pAnimations.at(i).get() == NULL)continue;
+ if(m_pAnimations.at(i)->isPlaying())m_pAnimations.at(i)->stop();
+ }
+}
+
+bool mof::CascadeAnimation::isPlaying(){
+ if(getLength() == 0)return true;
+ bool hasAnimation = false;
+
+ for(int i = 0 ; i < getLength() ; i++){
+ if(m_pAnimations.at(i).get() == NULL)continue;
+ if(m_pAnimations.at(i)->isPlaying())return true;
+ else hasAnimation = true;
+ }
+ return !hasAnimation;//\91S\97v\91f\82ªNULL\82È\82çtrue
}
\ No newline at end of file
-#pragma once\r
-#include <mof/stream/Manipulator.hpp>\r
-\r
-namespace mof\r
-{\r
- template< typename T > class Constant;\r
-\r
- template< typename T >\r
- std::shared_ptr< Constant<T> > makeConstantHandler(const T&);\r
-\r
-\r
- template< typename T >\r
- class Constant : public Manipulator< T >{\r
- public:\r
- typedef typename std::shared_ptr< Constant< T > > Handler;\r
-\r
- virtual ~Constant( ){}\r
- \r
- virtual T value( FrameNumber ) const\r
- {\r
- return m_value;\r
- }\r
-\r
-\r
- private:\r
- T m_value;\r
- \r
- Constant(const T& value) : m_value(value)\r
- {\r
- }\r
-\r
- template< typename T >\r
- friend std::shared_ptr< Constant<T> > makeConstantHandler(const T&);\r
- };\r
-\r
-//{{{ ヘルパ関数\r
- template<typename T>\r
- std::shared_ptr< Constant<T> > makeConstantHandler( const T& value)\r
- {\r
- return typename Constant<T>::Handler(new Constant<T>(value));\r
- }\r
-//}}}\r
-\r
-} // namespace mof\r
-\r
-\r
+#pragma once
+#include <mof/stream/Manipulator.hpp>
+
+namespace mof
+{
+ template< typename T > class Constant;
+
+ template< typename T >
+ std::shared_ptr< Constant<T> > makeConstantHandler(const T&);
+
+
+ template< typename T >
+ class Constant : public Manipulator< T >{
+ public:
+ typedef typename std::shared_ptr< Constant< T > > Handler;
+
+ virtual ~Constant( ){}
+
+ virtual T value( FrameNumber ) const
+ {
+ return m_value;
+ }
+
+
+ private:
+ T m_value;
+
+ Constant(const T& value) : m_value(value)
+ {
+ }
+
+ template< typename T >
+ friend std::shared_ptr< Constant<T> > makeConstantHandler(const T&);
+ };
+
+//{{{ ヘルパ関数
+ template<typename T>
+ std::shared_ptr< Constant<T> > makeConstantHandler( const T& value)
+ {
+ return typename Constant<T>::Handler(new Constant<T>(value));
+ }
+//}}}
+
+} // namespace mof
+
+
-#include "mof/DataBasedAnimation.h"\r
-#include "mof/KeyFrameAnimation.h"\r
-#include "mof/CSVFile.h"\r
-#include <boost/lexical_cast.hpp>\r
-\r
-\r
-mof::DataBasedAnimation::DataBasedAnimation(const TCHAR * const pPath , mof::Vector3D& denormalizeScale , bool isLooping )\r
-: mof::Animation(isLooping) , m_denormalizeScale(denormalizeScale){\r
- m_pBody = new KeyFrameAnimation(isLooping);\r
- m_pFile = new CSVFile(pPath);\r
- m_pFile->setIgnoreNL(false);\r
- m_pFile->nextLine();//1\8ds\96Ú\82Í\97ñ\92è\8b`\82È\82Ì\82Å\8eÌ\82Ä\82é\r
- loadNextKeyFrame();\r
- \r
-}\r
-\r
-mof::DataBasedAnimation::DataBasedAnimation(const TCHAR * const pPath , bool isLooping )\r
-: mof::Animation(isLooping) , m_denormalizeScale(1 , 1 , 1){\r
- m_pBody = new KeyFrameAnimation(isLooping);\r
- m_pFile = new CSVFile(pPath);\r
- m_pFile->setIgnoreNL(false);\r
- m_pFile->nextLine();//1\8ds\96Ú\82Í\97ñ\92è\8b`\82È\82Ì\82Å\8eÌ\82Ä\82é\r
- loadNextKeyFrame();\r
- \r
-}\r
-\r
-void mof::DataBasedAnimation::loadNextKeyFrame(){\r
- if(!m_pFile->hasNextValue())return;\r
- \r
- //KeyFrame\r
- int keyFrame = boost::lexical_cast<int>(m_pFile->getNextValue());\r
-\r
- //Position\r
- {\r
- if(!m_pFile->hasNextValue())goto END;\r
- mof::tstring buf1 = m_pFile->getNextValue();\r
- if(!m_pFile->hasNextValue())goto END;\r
- mof::tstring buf2 = m_pFile->getNextValue();\r
- if(buf1 != _T("") && buf2 != _T("")){\r
- mof::tstring buf3;\r
- if(m_pFile->hasNextValue())buf3 = m_pFile->getNextValue();\r
- if(buf3 != _T("")){\r
- //z\8dÀ\95W\82à\97L\8cø\82È\8fê\8d\87\82Í\82R\8e\9f\8c³\8dÀ\95W\82Æ\82µ\82Ä\88µ\82¤\r
- mof::Vector3D pos(\r
- boost::lexical_cast<float>(buf1) , boost::lexical_cast<float>(buf2) , boost::lexical_cast<float>(buf3));\r
- pos.x = pos.x * m_denormalizeScale.x;\r
- pos.y = pos.y * m_denormalizeScale.y;\r
- pos.z = pos.z * m_denormalizeScale.z;\r
- m_pBody->setPosition(keyFrame , pos);\r
- }\r
- else m_pBody->setPosition(keyFrame , mof::Vector2D(boost::lexical_cast<int>(buf1) , boost::lexical_cast<int>(buf2)));\r
- }\r
- else if(m_pFile->hasNextValue())m_pFile->getNextValue();//PositionZ\82ð\8eÌ\82Ä\82é\r
- }\r
-\r
- //Color\r
- {\r
- if(!m_pFile->hasNextValue())goto END;\r
- mof::tstring buf1 = m_pFile->getNextValue();\r
- if(buf1 != _T("")){\r
- m_pBody->setColor(keyFrame , mof::createColor(buf1));\r
- }\r
- }\r
-\r
- //Texture\r
- {\r
- if(!m_pFile->hasNextValue())goto END;\r
- mof::tstring tux = m_pFile->getNextValue();\r
- if(!m_pFile->hasNextValue())goto END;\r
- mof::tstring tuy = m_pFile->getNextValue();\r
- if(!m_pFile->hasNextValue())goto END;\r
- mof::tstring tvx = m_pFile->getNextValue();\r
- if(!m_pFile->hasNextValue())goto END;\r
- mof::tstring tvy = m_pFile->getNextValue();\r
- if(tux != _T("") && tuy != _T("") && tvx != _T("") && tvy != _T("")){\r
- m_pBody->setTextureRectangle(keyFrame , mof::Line2D(\r
- boost::lexical_cast<int>(tux) , boost::lexical_cast<int>(tuy) ,\r
- boost::lexical_cast<int>(tvx) , boost::lexical_cast<int>(tvy)));\r
- }\r
- }\r
-\r
- //Scale\r
- {\r
- if(!m_pFile->hasNextValue())goto END;\r
- mof::tstring buf1 = m_pFile->getNextValue();\r
- if(!m_pFile->hasNextValue())goto END;\r
- mof::tstring buf2 = m_pFile->getNextValue();\r
- if(buf1 != _T("") && buf2 != _T("")){\r
- mof::tstring buf3;\r
- if(m_pFile->hasNextValue())buf3 = m_pFile->getNextValue();\r
- if(buf3 != _T("")){\r
- //\89\9c\8ds\82«\82à\97L\8cø\82È\8fê\8d\87\82Í\82R\8e\9f\8c³\8dÀ\95W\82Æ\82µ\82Ä\88µ\82¤\r
- m_pBody->setScale(keyFrame , mof::Vector3D(\r
- boost::lexical_cast<float>(buf1) , boost::lexical_cast<float>(buf2) , boost::lexical_cast<float>(buf3)));\r
- }\r
- else {\r
- //ToDo \82Q\8e\9f\8c³\82Ì\83X\83P\81[\83\8b\r
- //m_pBody->set(keyFrame , mof::Vector2D(boost::lexical_cast<int>(buf1) , boost::lexical_cast<int>(buf2)));\r
- }\r
- }\r
- else if(m_pFile->hasNextValue())m_pFile->getNextValue();//Depth\82ð\8eÌ\82Ä\82é\r
- }\r
-\r
- //Rotate\r
- {\r
- if(!m_pFile->hasNextValue())goto END;\r
- mof::tstring buf1 = m_pFile->getNextValue();\r
- if(!m_pFile->hasNextValue())goto END;\r
- mof::tstring buf2 = m_pFile->getNextValue();\r
- if(buf1 != _T("") && buf2 != _T("")){\r
- mof::tstring buf3;\r
- if(m_pFile->hasNextValue())buf3 = m_pFile->getNextValue();\r
- if(buf3 != _T("")){\r
- //Z\8e²\92\86\90S\82à\97L\8cø\82È\8fê\8d\87\82Í\82R\8e\9f\8c³\8dÀ\95W\82Æ\82µ\82Ä\88µ\82¤\r
- m_pBody->setRotation(keyFrame , mof::Vector3D(\r
- boost::lexical_cast<float>(buf1) , boost::lexical_cast<float>(buf2) , boost::lexical_cast<float>(buf3)));\r
- }\r
- else {\r
- //ToDo \82Q\8e\9f\8c³\82Ì\89ñ\93]\r
- //m_pBody->set(keyFrame , mof::Vector2D(boost::lexical_cast<int>(buf1) , boost::lexical_cast<int>(buf2)));\r
- }\r
- }\r
- else if(m_pFile->hasNextValue())m_pFile->getNextValue();//RotZ\82ð\8eÌ\82Ä\82é\r
- }\r
-\r
-\r
- //finalize\83V\83O\83i\83\8b\r
- {\r
- if(!m_pFile->hasNextValue())goto END;\r
- mof::tstring buf1 = m_pFile->getNextValue();\r
- if(buf1 != _T("")){\r
- m_pBody->setFinalKey(boost::lexical_cast<int>(buf1));\r
- }\r
- }\r
-\r
-\r
-END:\r
- m_pFile->nextLine();\r
-}\r
-\r
-\r
-mof::DataBasedAnimation::~DataBasedAnimation(void){\r
- delete m_pBody;\r
- delete m_pFile;\r
-}\r
-\r
-\r
-bool mof::DataBasedAnimation::update(){\r
- if(!isPlaying())return false;\r
- m_pBody->update();\r
-\r
- loadNextKeyFrame();\r
- return false;\r
-}\r
-\r
-\r
-bool mof::DataBasedAnimation::isFinalized(){\r
- return m_pBody->isFinalized();\r
-}\r
-\r
-\r
-mof::Vector2D mof::DataBasedAnimation::getPosition(){\r
- return m_pBody->getPosition();\r
-}\r
-\r
- \r
-float mof::DataBasedAnimation::getWidth(){\r
- return m_pBody->getWidth();\r
-}\r
-\r
-\r
-float mof::DataBasedAnimation::getHeight(){\r
- return m_pBody->getHeight();\r
-}\r
-\r
-\r
-float mof::DataBasedAnimation::getDepth(){\r
- return m_pBody->getDepth();\r
-}\r
-\r
-mof::Color mof::DataBasedAnimation::getColor(){\r
- return m_pBody->getColor();\r
-}\r
-\r
- \r
-mof::Matrix3D mof::DataBasedAnimation::getWorldTransform(mof::Matrix3D& matrix){\r
- return m_pBody->getWorldTransform(matrix);\r
-}\r
-\r
- \r
-mof::Line2D mof::DataBasedAnimation::getTextureRectangle(){\r
- return m_pBody->getTextureRectangle();\r
-}\r
+#include "mof/DataBasedAnimation.h"
+#include "mof/KeyFrameAnimation.h"
+#include "mof/CSVFile.h"
+#include <boost/lexical_cast.hpp>
+
+
+mof::DataBasedAnimation::DataBasedAnimation(const TCHAR * const pPath , mof::Vector3D& denormalizeScale , bool isLooping )
+: mof::Animation(isLooping) , m_denormalizeScale(denormalizeScale){
+ m_pBody = new KeyFrameAnimation(isLooping);
+ m_pFile = new CSVFile(pPath);
+ m_pFile->setIgnoreNL(false);
+ m_pFile->nextLine();//1\8ds\96Ú\82Í\97ñ\92è\8b`\82È\82Ì\82Å\8eÌ\82Ä\82é
+ loadNextKeyFrame();
+
+}
+
+mof::DataBasedAnimation::DataBasedAnimation(const TCHAR * const pPath , bool isLooping )
+: mof::Animation(isLooping) , m_denormalizeScale(1 , 1 , 1){
+ m_pBody = new KeyFrameAnimation(isLooping);
+ m_pFile = new CSVFile(pPath);
+ m_pFile->setIgnoreNL(false);
+ m_pFile->nextLine();//1\8ds\96Ú\82Í\97ñ\92è\8b`\82È\82Ì\82Å\8eÌ\82Ä\82é
+ loadNextKeyFrame();
+
+}
+
+void mof::DataBasedAnimation::loadNextKeyFrame(){
+ if(!m_pFile->hasNextValue())return;
+
+ //KeyFrame
+ int keyFrame = boost::lexical_cast<int>(m_pFile->getNextValue());
+
+ //Position
+ {
+ if(!m_pFile->hasNextValue())goto END;
+ mof::tstring buf1 = m_pFile->getNextValue();
+ if(!m_pFile->hasNextValue())goto END;
+ mof::tstring buf2 = m_pFile->getNextValue();
+ if(buf1 != _T("") && buf2 != _T("")){
+ mof::tstring buf3;
+ if(m_pFile->hasNextValue())buf3 = m_pFile->getNextValue();
+ if(buf3 != _T("")){
+ //z\8dÀ\95W\82à\97L\8cø\82È\8fê\8d\87\82Í\82R\8e\9f\8c³\8dÀ\95W\82Æ\82µ\82Ä\88µ\82¤
+ mof::Vector3D pos(
+ boost::lexical_cast<float>(buf1) , boost::lexical_cast<float>(buf2) , boost::lexical_cast<float>(buf3));
+ pos.x = pos.x * m_denormalizeScale.x;
+ pos.y = pos.y * m_denormalizeScale.y;
+ pos.z = pos.z * m_denormalizeScale.z;
+ m_pBody->setPosition(keyFrame , pos);
+ }
+ else m_pBody->setPosition(keyFrame , mof::Vector2D(boost::lexical_cast<int>(buf1) , boost::lexical_cast<int>(buf2)));
+ }
+ else if(m_pFile->hasNextValue())m_pFile->getNextValue();//PositionZ\82ð\8eÌ\82Ä\82é
+ }
+
+ //Color
+ {
+ if(!m_pFile->hasNextValue())goto END;
+ mof::tstring buf1 = m_pFile->getNextValue();
+ if(buf1 != _T("")){
+ m_pBody->setColor(keyFrame , mof::createColor(buf1));
+ }
+ }
+
+ //Texture
+ {
+ if(!m_pFile->hasNextValue())goto END;
+ mof::tstring tux = m_pFile->getNextValue();
+ if(!m_pFile->hasNextValue())goto END;
+ mof::tstring tuy = m_pFile->getNextValue();
+ if(!m_pFile->hasNextValue())goto END;
+ mof::tstring tvx = m_pFile->getNextValue();
+ if(!m_pFile->hasNextValue())goto END;
+ mof::tstring tvy = m_pFile->getNextValue();
+ if(tux != _T("") && tuy != _T("") && tvx != _T("") && tvy != _T("")){
+ m_pBody->setTextureRectangle(keyFrame , mof::Line2D(
+ boost::lexical_cast<int>(tux) , boost::lexical_cast<int>(tuy) ,
+ boost::lexical_cast<int>(tvx) , boost::lexical_cast<int>(tvy)));
+ }
+ }
+
+ //Scale
+ {
+ if(!m_pFile->hasNextValue())goto END;
+ mof::tstring buf1 = m_pFile->getNextValue();
+ if(!m_pFile->hasNextValue())goto END;
+ mof::tstring buf2 = m_pFile->getNextValue();
+ if(buf1 != _T("") && buf2 != _T("")){
+ mof::tstring buf3;
+ if(m_pFile->hasNextValue())buf3 = m_pFile->getNextValue();
+ if(buf3 != _T("")){
+ //\89\9c\8ds\82«\82à\97L\8cø\82È\8fê\8d\87\82Í\82R\8e\9f\8c³\8dÀ\95W\82Æ\82µ\82Ä\88µ\82¤
+ m_pBody->setScale(keyFrame , mof::Vector3D(
+ boost::lexical_cast<float>(buf1) , boost::lexical_cast<float>(buf2) , boost::lexical_cast<float>(buf3)));
+ }
+ else {
+ //ToDo \82Q\8e\9f\8c³\82Ì\83X\83P\81[\83\8b
+ //m_pBody->set(keyFrame , mof::Vector2D(boost::lexical_cast<int>(buf1) , boost::lexical_cast<int>(buf2)));
+ }
+ }
+ else if(m_pFile->hasNextValue())m_pFile->getNextValue();//Depth\82ð\8eÌ\82Ä\82é
+ }
+
+ //Rotate
+ {
+ if(!m_pFile->hasNextValue())goto END;
+ mof::tstring buf1 = m_pFile->getNextValue();
+ if(!m_pFile->hasNextValue())goto END;
+ mof::tstring buf2 = m_pFile->getNextValue();
+ if(buf1 != _T("") && buf2 != _T("")){
+ mof::tstring buf3;
+ if(m_pFile->hasNextValue())buf3 = m_pFile->getNextValue();
+ if(buf3 != _T("")){
+ //Z\8e²\92\86\90S\82à\97L\8cø\82È\8fê\8d\87\82Í\82R\8e\9f\8c³\8dÀ\95W\82Æ\82µ\82Ä\88µ\82¤
+ m_pBody->setRotation(keyFrame , mof::Vector3D(
+ boost::lexical_cast<float>(buf1) , boost::lexical_cast<float>(buf2) , boost::lexical_cast<float>(buf3)));
+ }
+ else {
+ //ToDo \82Q\8e\9f\8c³\82Ì\89ñ\93]
+ //m_pBody->set(keyFrame , mof::Vector2D(boost::lexical_cast<int>(buf1) , boost::lexical_cast<int>(buf2)));
+ }
+ }
+ else if(m_pFile->hasNextValue())m_pFile->getNextValue();//RotZ\82ð\8eÌ\82Ä\82é
+ }
+
+
+ //finalize\83V\83O\83i\83\8b
+ {
+ if(!m_pFile->hasNextValue())goto END;
+ mof::tstring buf1 = m_pFile->getNextValue();
+ if(buf1 != _T("")){
+ m_pBody->setFinalKey(boost::lexical_cast<int>(buf1));
+ }
+ }
+
+
+END:
+ m_pFile->nextLine();
+}
+
+
+mof::DataBasedAnimation::~DataBasedAnimation(void){
+ delete m_pBody;
+ delete m_pFile;
+}
+
+
+bool mof::DataBasedAnimation::update(){
+ if(!isPlaying())return false;
+ m_pBody->update();
+
+ loadNextKeyFrame();
+ return false;
+}
+
+
+bool mof::DataBasedAnimation::isFinalized(){
+ return m_pBody->isFinalized();
+}
+
+
+mof::Vector2D mof::DataBasedAnimation::getPosition(){
+ return m_pBody->getPosition();
+}
+
+
+float mof::DataBasedAnimation::getWidth(){
+ return m_pBody->getWidth();
+}
+
+
+float mof::DataBasedAnimation::getHeight(){
+ return m_pBody->getHeight();
+}
+
+
+float mof::DataBasedAnimation::getDepth(){
+ return m_pBody->getDepth();
+}
+
+mof::Color mof::DataBasedAnimation::getColor(){
+ return m_pBody->getColor();
+}
+
+
+mof::Matrix3D mof::DataBasedAnimation::getWorldTransform(mof::Matrix3D& matrix){
+ return m_pBody->getWorldTransform(matrix);
+}
+
+
+mof::Line2D mof::DataBasedAnimation::getTextureRectangle(){
+ return m_pBody->getTextureRectangle();
+}
-\r
-#pragma once\r
-#include "mof/Animation.h"\r
-#include "mof/tstring.h"\r
-\r
-namespace mof{\r
- \r
- class KeyFrameAnimation;\r
- class CSVFile;\r
-\r
- class DataBasedAnimation : public Animation\r
- {\r
- KeyFrameAnimation* m_pBody;\r
- CSVFile* m_pFile;\r
- mof::Vector3D m_denormalizeScale;\r
- \r
- void loadNextKeyFrame();\r
- public:\r
- DataBasedAnimation(const TCHAR * const pPath , bool isLooping = false);\r
- DataBasedAnimation(const TCHAR * const pPath , mof::Vector3D& denormalizePositionScale , bool isLooping = false);\r
- virtual ~DataBasedAnimation(void);\r
-\r
- virtual bool update();\r
- virtual bool isFinalized();\r
-\r
- virtual mof::Vector2D getPosition();\r
- virtual float getWidth();\r
- virtual float getHeight();\r
- virtual float getDepth();\r
- virtual mof::Color getColor();\r
- virtual mof::Matrix3D getWorldTransform(mof::Matrix3D& matrix);\r
- virtual mof::Line2D getTextureRectangle();\r
- \r
- \r
- };\r
-\r
+
+#pragma once
+#include "mof/Animation.h"
+#include "mof/tstring.h"
+
+namespace mof{
+
+ class KeyFrameAnimation;
+ class CSVFile;
+
+ class DataBasedAnimation : public Animation
+ {
+ KeyFrameAnimation* m_pBody;
+ CSVFile* m_pFile;
+ mof::Vector3D m_denormalizeScale;
+
+ void loadNextKeyFrame();
+ public:
+ DataBasedAnimation(const TCHAR * const pPath , bool isLooping = false);
+ DataBasedAnimation(const TCHAR * const pPath , mof::Vector3D& denormalizePositionScale , bool isLooping = false);
+ virtual ~DataBasedAnimation(void);
+
+ virtual bool update();
+ virtual bool isFinalized();
+
+ virtual mof::Vector2D getPosition();
+ virtual float getWidth();
+ virtual float getHeight();
+ virtual float getDepth();
+ virtual mof::Color getColor();
+ virtual mof::Matrix3D getWorldTransform(mof::Matrix3D& matrix);
+ virtual mof::Line2D getTextureRectangle();
+
+
+ };
+
};
\ No newline at end of file
-#include "DefaultAnimationPlayer.hpp"\r
-\r
-\r
-\r
-\r
-mof::DefaultAnimationPlayer::DefaultAnimationPlayer()\r
-: m_frame(0)\r
-{\r
-}\r
-\r
-void mof::DefaultAnimationPlayer::setFrameNumber(mof::FrameNumber frame){\r
- m_frame = frame;\r
-}\r
-\r
-void mof::DefaultAnimationPlayer::nextFrame(){\r
- m_frame++;\r
-}\r
-\r
-void mof::DefaultAnimationPlayer::prevFrame(){\r
- if(m_frame > 0)m_frame--;\r
+#include "DefaultAnimationPlayer.hpp"
+
+
+
+
+mof::DefaultAnimationPlayer::DefaultAnimationPlayer()
+: m_frame(0)
+{
+}
+
+void mof::DefaultAnimationPlayer::setFrameNumber(mof::FrameNumber frame){
+ m_frame = frame;
+}
+
+void mof::DefaultAnimationPlayer::nextFrame(){
+ m_frame++;
+}
+
+void mof::DefaultAnimationPlayer::prevFrame(){
+ if(m_frame > 0)m_frame--;
}
\ No newline at end of file
-#ifndef MOF_DEFAULT_ANIMATION_PLAYER_HPP\r
-#define MOF_DEFAULT_ANIMATION_PLAYER_HPP\r
-#include "mof/AnimationPlayer.hpp"\r
-\r
-namespace mof{\r
-\r
-\r
-class DefaultAnimationPlayer : AnimationPlayer{\r
-protected:\r
- mof::FrameNumber m_frame;\r
-public:\r
- DefaultAnimationPlayer();\r
- virtual void setFrameNumber(mof::FrameNumber frame);\r
- virtual void nextFrame();\r
- virtual void prevFrame();\r
- \r
-};\r
-\r
-}\r
-\r
-\r
-#endif\r
+#ifndef MOF_DEFAULT_ANIMATION_PLAYER_HPP
+#define MOF_DEFAULT_ANIMATION_PLAYER_HPP
+#include "mof/AnimationPlayer.hpp"
+
+namespace mof{
+
+
+class DefaultAnimationPlayer : AnimationPlayer{
+protected:
+ mof::FrameNumber m_frame;
+public:
+ DefaultAnimationPlayer();
+ virtual void setFrameNumber(mof::FrameNumber frame);
+ virtual void nextFrame();
+ virtual void prevFrame();
+
+};
+
+}
+
+
+#endif
-#pragma once\r
-#include "mof/Vector2D.hpp"\r
-#include "mof/stream/Manipulator.hpp"\r
-\r
-\r
-namespace mof{\r
-\r
- class Filter : public Manipulator< Vector2D >\r
- {\r
- public:\r
- typedef std::shared_ptr<Filter> Handler;\r
- \r
- Filter\r
- (\r
- const Manipulator<Vector2D>::Handler& body ,\r
- const mof::Vector2D& filter\r
- )\r
- : m_body( body ) , m_filter( filter)\r
- {\r
- }\r
-\r
- virtual Vector2D value( FrameNumber frame ) const\r
- {\r
- mof::Vector2D value = m_body->value(frame);\r
- return mof::Vector2D( value.x * m_filter.x , value.y * m_filter.y);\r
- }\r
-\r
-\r
- private:\r
- Manipulator< Vector2D >::Handler m_body;\r
- Vector2D m_filter;\r
-\r
-\r
- };\r
-\r
-//{{{ ヘルパ関数\r
- inline Filter::Handler makeFilterHandler\r
- (\r
- const Manipulator< Vector2D >::Handler& body ,\r
- const Vector2D& filter\r
- )\r
- {\r
- return Filter::Handler\r
- (\r
- new Filter( body , filter )\r
- );\r
- }\r
-//}}}\r
-\r
-} // namespace mof\r
-\r
+#pragma once
+#include "mof/Vector2D.hpp"
+#include "mof/stream/Manipulator.hpp"
+
+
+namespace mof{
+
+ class Filter : public Manipulator< Vector2D >
+ {
+ public:
+ typedef std::shared_ptr<Filter> Handler;
+
+ Filter
+ (
+ const Manipulator<Vector2D>::Handler& body ,
+ const mof::Vector2D& filter
+ )
+ : m_body( body ) , m_filter( filter)
+ {
+ }
+
+ virtual Vector2D value( FrameNumber frame ) const
+ {
+ mof::Vector2D value = m_body->value(frame);
+ return mof::Vector2D( value.x * m_filter.x , value.y * m_filter.y);
+ }
+
+
+ private:
+ Manipulator< Vector2D >::Handler m_body;
+ Vector2D m_filter;
+
+
+ };
+
+//{{{ ヘルパ関数
+ inline Filter::Handler makeFilterHandler
+ (
+ const Manipulator< Vector2D >::Handler& body ,
+ const Vector2D& filter
+ )
+ {
+ return Filter::Handler
+ (
+ new Filter( body , filter )
+ );
+ }
+//}}}
+
+} // namespace mof
+
-#pragma once\r
-#include "mof/stream/Manipulator.hpp"\r
-#include "mof/stream/Cache.hpp"\r
-\r
-namespace mof\r
-{\r
- template< typename T , typename K >\r
- class Joint : public Manipulator< T >\r
- {\r
- public:\r
- typedef typename std::shared_ptr< mof::Joint< T , K > > Handler;\r
-\r
- \r
- virtual ~Joint( )\r
- {\r
- }\r
-\r
- virtual T value( FrameNumber frame ) const\r
- {\r
- return m_converter( m_body->value( frame ) );\r
- }\r
-\r
- \r
- typename Manipulator< K >::Handler get( ) const { return m_body; }\r
-\r
- void set( const typename Manipulator< K >::Handler& handler )\r
- {\r
- m_body = handler; \r
- mof::state_changed();\r
- }\r
-\r
- private:\r
- typename Manipulator<K>::Handler m_body;\r
- T (*m_converter)( const K& );\r
-\r
- Joint( const typename Manipulator< K >::Handler& handler , T (*converter)( const K& ) )\r
- : m_body( handler) , m_converter( converter )\r
- {\r
- }\r
-\r
- template< typename T , typename K > friend\r
- typename Joint< T , K >::Handler makeJointHandler\r
- ( \r
- const typename Manipulator< K >::Handler& handler ,\r
- T (*converter)( const K& )\r
- );\r
-\r
- }; // class Joint\r
-\r
- /** \8c^\95Ï\8a·\82ð\8ds\82í\82È\82¢Joint */\r
- template< typename T >\r
- class Joint< T , T > : public Manipulator< T >\r
- {\r
- public:\r
- typedef typename std::shared_ptr< mof::Joint< T , T > > Handler;\r
-\r
- \r
- virtual T getValue( mof::FrameNumber frame ) const\r
- {\r
- return m_body->getValue( frame );\r
- }\r
-\r
- typename mof::Manipulator< T >::Handler get( ) const { return m_body; }\r
- void set( const typename mof::Manipulator< T >::Handler& handler ){ m_body = handler; }\r
- \r
- private:\r
- typename mof::Manipulator< T >::Handler m_body;\r
-\r
- Joint( const typename Manipulator< T >::Handler& handler )\r
- : m_body( handler)\r
- {\r
- }\r
-\r
- template< typename T > friend\r
- typename Joint< T , T >::Handler makeJointHandler\r
- ( \r
- const typename Manipulator< T >::Handler& handler \r
- );\r
-\r
- }; // class Joint \r
-\r
- \r
- template< typename T , typename K >\r
- typename Joint< T , K >::Handler makeJointHandler\r
- ( \r
- const typename Manipulator< K >::Handler& handler ,\r
- T (*converter)( const K& )\r
- )\r
- {\r
- return typename Joint< T , K >::Handler( new Joint< T , K >( handler , converter ) );\r
- }\r
-\r
- /** \8c^\95Ï\8a·\82ð\8ds\82í\82È\82¢Joint\82Ì\90¶\90¬ */\r
- // TODO \8c^\90\84\98_\82ª\8cø\82©\82È\82¢\r
- template< typename T >\r
- typename Joint< T , T >::Handler makeJointHandler\r
- ( \r
- const typename Manipulator< T >::Handler& handler \r
- )\r
- {\r
- return typename Joint< T , T >::Handler( new Joint< T , T >( handler ) );\r
- }\r
-\r
- \r
-} // namespace mof\r
+#pragma once
+#include "mof/stream/Manipulator.hpp"
+#include "mof/stream/Cache.hpp"
+
+namespace mof
+{
+ template< typename T , typename K >
+ class Joint : public Manipulator< T >
+ {
+ public:
+ typedef typename std::shared_ptr< mof::Joint< T , K > > Handler;
+
+
+ virtual ~Joint( )
+ {
+ }
+
+ virtual T value( FrameNumber frame ) const
+ {
+ return m_converter( m_body->value( frame ) );
+ }
+
+
+ typename Manipulator< K >::Handler get( ) const { return m_body; }
+
+ void set( const typename Manipulator< K >::Handler& handler )
+ {
+ m_body = handler;
+ mof::state_changed();
+ }
+
+ private:
+ typename Manipulator<K>::Handler m_body;
+ T (*m_converter)( const K& );
+
+ Joint( const typename Manipulator< K >::Handler& handler , T (*converter)( const K& ) )
+ : m_body( handler) , m_converter( converter )
+ {
+ }
+
+ template< typename T , typename K > friend
+ typename Joint< T , K >::Handler makeJointHandler
+ (
+ const typename Manipulator< K >::Handler& handler ,
+ T (*converter)( const K& )
+ );
+
+ }; // class Joint
+
+ /** \8c^\95Ï\8a·\82ð\8ds\82í\82È\82¢Joint */
+ template< typename T >
+ class Joint< T , T > : public Manipulator< T >
+ {
+ public:
+ typedef typename std::shared_ptr< mof::Joint< T , T > > Handler;
+
+
+ virtual T getValue( mof::FrameNumber frame ) const
+ {
+ return m_body->getValue( frame );
+ }
+
+ typename mof::Manipulator< T >::Handler get( ) const { return m_body; }
+ void set( const typename mof::Manipulator< T >::Handler& handler ){ m_body = handler; }
+
+ private:
+ typename mof::Manipulator< T >::Handler m_body;
+
+ Joint( const typename Manipulator< T >::Handler& handler )
+ : m_body( handler)
+ {
+ }
+
+ template< typename T > friend
+ typename Joint< T , T >::Handler makeJointHandler
+ (
+ const typename Manipulator< T >::Handler& handler
+ );
+
+ }; // class Joint
+
+
+ template< typename T , typename K >
+ typename Joint< T , K >::Handler makeJointHandler
+ (
+ const typename Manipulator< K >::Handler& handler ,
+ T (*converter)( const K& )
+ )
+ {
+ return typename Joint< T , K >::Handler( new Joint< T , K >( handler , converter ) );
+ }
+
+ /** \8c^\95Ï\8a·\82ð\8ds\82í\82È\82¢Joint\82Ì\90¶\90¬ */
+ // TODO \8c^\90\84\98_\82ª\8cø\82©\82È\82¢
+ template< typename T >
+ typename Joint< T , T >::Handler makeJointHandler
+ (
+ const typename Manipulator< T >::Handler& handler
+ )
+ {
+ return typename Joint< T , T >::Handler( new Joint< T , T >( handler ) );
+ }
+
+
+} // namespace mof
-#pragma once\r
-#include "mof/stream/Manipulator.hpp"\r
-#include <map>\r
-#include <stdexcept>\r
-#include <boost/function/function2.hpp>\r
-#include "mof/Interpolation.hpp"\r
-\r
-namespace mof{\r
-\r
- template<typename T >\r
- class KeyFrameAnimation : public Manipulator< T >\r
- {\r
- public:\r
- typedef std::shared_ptr<KeyFrameAnimation<T>> Handler;\r
- typedef std::pair< FrameNumber , T > KeyFrame;\r
- typedef typename std::map< FrameNumber , T> KeyMap;\r
-\r
- virtual ~KeyFrameAnimation(){}\r
-\r
- virtual T value( mof::FrameNumber frame) const\r
- {\r
- return m_interpolator(m_map , frame);\r
- }\r
-\r
- mof::FrameNumber getFinalKeyFrameNumber()\r
- {\r
- return m_maxKeyFrameNumber;\r
- }\r
-\r
- private:\r
- KeyMap m_map;\r
- FrameNumber m_maxKeyFrameNumber;\r
- boost::function2<T , const KeyMap& , mof::FrameNumber> m_interpolator;\r
-\r
- KeyFrameAnimation\r
- (\r
- const KeyFrame& front ,\r
- const KeyFrame& back , \r
- const boost::function2< T , const KeyMap& , FrameNumber > & interpolator\r
- )\r
- : m_interpolator(interpolator)\r
- {\r
- int length = &back - &front + 1;\r
- if(length < 1)throw std::invalid_argument("length < 1");\r
- m_maxKeyFrameNumber = 0;\r
- for(int i = 0 ; i < length ; i++)\r
- {\r
- if((&front)[i].first > m_maxKeyFrameNumber)m_maxKeyFrameNumber = (&front)[i].first;\r
- m_map.insert( std::make_pair((&front)[i].first , (&front)[i].second ) );\r
- }\r
- }\r
-\r
- KeyFrameAnimation\r
- (\r
- const KeyFrame& front , const KeyFrame& back \r
- )\r
- : m_interpolator(&mof::linerInterpolate<T>)\r
- {\r
- int length = &back - &front + 1;\r
- if(length < 1)throw std::invalid_argument("length < 1");\r
- m_maxKeyFrameNumber = 0;\r
- for(int i = 0 ; i < length ; i++)\r
- {\r
- if((&front)[i].first > m_maxKeyFrameNumber)m_maxKeyFrameNumber = (&front)[i].first;\r
- m_map.insert( std::make_pair((&front)[i].first , (&front)[i].second ) );\r
- }\r
- }\r
-\r
- template< typename T > friend\r
- typename KeyFrameAnimation< T >::KeyFrame \r
- makeKeyFrame( mof::FrameNumber frame , const T & obj );\r
-\r
- template< typename T > friend\r
- typename KeyFrameAnimation< T >::Handler \r
- makeKeyFrameAnimationHandler\r
- (\r
- const std::pair< FrameNumber , T >& front ,\r
- const std::pair< FrameNumber , T >& back ,\r
- const boost::function2< T , const std::map< FrameNumber , T >& , FrameNumber> & interpolator\r
- );\r
-\r
- template< typename T > friend\r
- typename KeyFrameAnimation< T >::Handler \r
- makeKeyFrameAnimationHandler\r
- (\r
- const std::pair< FrameNumber , T >& front ,\r
- const std::pair< FrameNumber , T >& back \r
- );\r
-\r
- };\r
-//{{{ ヘルパ関数\r
- template< typename T >\r
- typename KeyFrameAnimation< T >::KeyFrame \r
- makeKeyFrame( mof::FrameNumber frame , const T & obj )\r
- {\r
- return std::make_pair< FrameNumber , T>(frame , obj);\r
- }\r
-\r
- template< typename T >\r
- typename KeyFrameAnimation< T >::Handler \r
- makeKeyFrameAnimationHandler\r
- (\r
- const std::pair< FrameNumber , T >& front ,\r
- const std::pair< FrameNumber , T >& back ,\r
- const boost::function2< T , const std::map< FrameNumber , T >& , FrameNumber> & interpolator\r
- )\r
- {\r
- return KeyFrameAnimation< T >::Handler\r
- (\r
- new KeyFrameAnimation< T >( front , back , interpolator )\r
- );\r
- }\r
-\r
- template< typename T >\r
- typename KeyFrameAnimation< T >::Handler\r
- makeKeyFrameAnimationHandler\r
- (\r
- const std::pair< FrameNumber, T>& front,\r
- const std::pair< FrameNumber, T>& back \r
- )\r
- {\r
- return KeyFrameAnimation< T >::Handler\r
- (\r
- new KeyFrameAnimation< T >( front , back ) \r
- );\r
- }\r
-\r
- template< typename T >\r
- typename std::shared_ptr<KeyFrameAnimation<T>> \r
- makeKeyFrameAnimationHandler\r
- (\r
- FrameNumber fn1 , const T& v1 ,\r
- FrameNumber fn2 , const T& v2 \r
- )\r
- {\r
- KeyFrameAnimation<T>::KeyFrame keyFrames[] =\r
- {\r
- makeKeyFrame(fn1 , v1) ,\r
- makeKeyFrame(fn2 , v2) \r
- };\r
- return makeKeyFrameAnimationHandler(keyFrames[0] , lastOf(keyFrames));\r
- }\r
- \r
- template< typename T >\r
- typename std::shared_ptr<KeyFrameAnimation< T >> \r
- makeKeyFrameAnimationHandler\r
- (\r
- FrameNumber fn1 , const T& v1 ,\r
- FrameNumber fn2 , const T& v2 ,\r
- const boost::function2< T , const std::map< FrameNumber , T >& , FrameNumber> & interpolator\r
- )\r
- {\r
- KeyFrameAnimation<T>::KeyFrame keyFrames[] =\r
- {\r
- makeKeyFrame(fn1 , v1) ,\r
- makeKeyFrame(fn2 , v2) \r
- };\r
- return makeKeyFrameAnimationHandler(keyFrames[0] , lastOf(keyFrames) , interpolator);\r
- }\r
-\r
-\r
-\r
-//}}}\r
-} //namespace mof\r
-\r
+#pragma once
+#include "mof/stream/Manipulator.hpp"
+#include <map>
+#include <stdexcept>
+#include <boost/function/function2.hpp>
+#include "mof/Interpolation.hpp"
+
+namespace mof{
+
+ template<typename T >
+ class KeyFrameAnimation : public Manipulator< T >
+ {
+ public:
+ typedef std::shared_ptr<KeyFrameAnimation<T>> Handler;
+ typedef std::pair< FrameNumber , T > KeyFrame;
+ typedef typename std::map< FrameNumber , T> KeyMap;
+
+ virtual ~KeyFrameAnimation(){}
+
+ virtual T value( mof::FrameNumber frame) const
+ {
+ return m_interpolator(m_map , frame);
+ }
+
+ mof::FrameNumber getFinalKeyFrameNumber()
+ {
+ return m_maxKeyFrameNumber;
+ }
+
+ private:
+ KeyMap m_map;
+ FrameNumber m_maxKeyFrameNumber;
+ boost::function2<T , const KeyMap& , mof::FrameNumber> m_interpolator;
+
+ KeyFrameAnimation
+ (
+ const KeyFrame& front ,
+ const KeyFrame& back ,
+ const boost::function2< T , const KeyMap& , FrameNumber > & interpolator
+ )
+ : m_interpolator(interpolator)
+ {
+ int length = &back - &front + 1;
+ if(length < 1)throw std::invalid_argument("length < 1");
+ m_maxKeyFrameNumber = 0;
+ for(int i = 0 ; i < length ; i++)
+ {
+ if((&front)[i].first > m_maxKeyFrameNumber)m_maxKeyFrameNumber = (&front)[i].first;
+ m_map.insert( std::make_pair((&front)[i].first , (&front)[i].second ) );
+ }
+ }
+
+ KeyFrameAnimation
+ (
+ const KeyFrame& front , const KeyFrame& back
+ )
+ : m_interpolator(&mof::linerInterpolate<T>)
+ {
+ int length = &back - &front + 1;
+ if(length < 1)throw std::invalid_argument("length < 1");
+ m_maxKeyFrameNumber = 0;
+ for(int i = 0 ; i < length ; i++)
+ {
+ if((&front)[i].first > m_maxKeyFrameNumber)m_maxKeyFrameNumber = (&front)[i].first;
+ m_map.insert( std::make_pair((&front)[i].first , (&front)[i].second ) );
+ }
+ }
+
+ template< typename T > friend
+ typename KeyFrameAnimation< T >::KeyFrame
+ makeKeyFrame( mof::FrameNumber frame , const T & obj );
+
+ template< typename T > friend
+ typename KeyFrameAnimation< T >::Handler
+ makeKeyFrameAnimationHandler
+ (
+ const std::pair< FrameNumber , T >& front ,
+ const std::pair< FrameNumber , T >& back ,
+ const boost::function2< T , const std::map< FrameNumber , T >& , FrameNumber> & interpolator
+ );
+
+ template< typename T > friend
+ typename KeyFrameAnimation< T >::Handler
+ makeKeyFrameAnimationHandler
+ (
+ const std::pair< FrameNumber , T >& front ,
+ const std::pair< FrameNumber , T >& back
+ );
+
+ };
+//{{{ ヘルパ関数
+ template< typename T >
+ typename KeyFrameAnimation< T >::KeyFrame
+ makeKeyFrame( mof::FrameNumber frame , const T & obj )
+ {
+ return std::make_pair< FrameNumber , T>(frame , obj);
+ }
+
+ template< typename T >
+ typename KeyFrameAnimation< T >::Handler
+ makeKeyFrameAnimationHandler
+ (
+ const std::pair< FrameNumber , T >& front ,
+ const std::pair< FrameNumber , T >& back ,
+ const boost::function2< T , const std::map< FrameNumber , T >& , FrameNumber> & interpolator
+ )
+ {
+ return KeyFrameAnimation< T >::Handler
+ (
+ new KeyFrameAnimation< T >( front , back , interpolator )
+ );
+ }
+
+ template< typename T >
+ typename KeyFrameAnimation< T >::Handler
+ makeKeyFrameAnimationHandler
+ (
+ const std::pair< FrameNumber, T>& front,
+ const std::pair< FrameNumber, T>& back
+ )
+ {
+ return KeyFrameAnimation< T >::Handler
+ (
+ new KeyFrameAnimation< T >( front , back )
+ );
+ }
+
+ template< typename T >
+ typename std::shared_ptr<KeyFrameAnimation<T>>
+ makeKeyFrameAnimationHandler
+ (
+ FrameNumber fn1 , const T& v1 ,
+ FrameNumber fn2 , const T& v2
+ )
+ {
+ KeyFrameAnimation<T>::KeyFrame keyFrames[] =
+ {
+ makeKeyFrame(fn1 , v1) ,
+ makeKeyFrame(fn2 , v2)
+ };
+ return makeKeyFrameAnimationHandler(keyFrames[0] , lastOf(keyFrames));
+ }
+
+ template< typename T >
+ typename std::shared_ptr<KeyFrameAnimation< T >>
+ makeKeyFrameAnimationHandler
+ (
+ FrameNumber fn1 , const T& v1 ,
+ FrameNumber fn2 , const T& v2 ,
+ const boost::function2< T , const std::map< FrameNumber , T >& , FrameNumber> & interpolator
+ )
+ {
+ KeyFrameAnimation<T>::KeyFrame keyFrames[] =
+ {
+ makeKeyFrame(fn1 , v1) ,
+ makeKeyFrame(fn2 , v2)
+ };
+ return makeKeyFrameAnimationHandler(keyFrames[0] , lastOf(keyFrames) , interpolator);
+ }
+
+
+
+//}}}
+} //namespace mof
+
-#pragma once\r
-#include "mof/stream/Manipulator.hpp"\r
-\r
-\r
-namespace mof{\r
-\r
- template< typename T >\r
- class Loop : public Manipulator< T >\r
- {\r
- \r
- public:\r
-\r
- virtual ~Loop( ){} \r
-\r
- virtual T value( FrameNumber frame) const\r
- {\r
- return m_pBody->value( getInnerFrameNumber( frame ) );\r
- }\r
-\r
-\r
- Loop(const typename Manipulator<T>::Handler& pBody , FrameNumber endLoopFrameNumber)\r
- : m_pBody(pBody) , m_beginLoopFrameNumber(0) , m_endLoopFrameNumber(endLoopFrameNumber)\r
- {\r
- }\r
-\r
- Loop\r
- (\r
- const typename Manipulator<T>::Handler& pBody ,\r
- FrameNumber beginLoopFrameNumber ,\r
- FrameNumber endLoopFrameNumber\r
- ) \r
- : m_pBody(pBody) , m_beginLoopFrameNumber(beginLoopFrameNumber) , m_endLoopFrameNumber(endLoopFrameNumber)\r
- {\r
- if(m_endLoopFrameNumber < m_beginLoopFrameNumber)throw std::invalid_argument("endLoop < beginLoop");\r
- }\r
-\r
-\r
- private:\r
-\r
- typename Manipulator<T>::Handler m_pBody;\r
- FrameNumber m_beginLoopFrameNumber;\r
- FrameNumber m_endLoopFrameNumber;\r
-\r
- FrameNumber getInnerFrameNumber(FrameNumber frame) const\r
- {\r
- if(frame < m_beginLoopFrameNumber)return frame;\r
- FrameNumber d = m_endLoopFrameNumber - m_beginLoopFrameNumber;\r
- return (frame - m_beginLoopFrameNumber) % d + m_beginLoopFrameNumber;\r
- }\r
-\r
- template<typename T > friend\r
- typename std::shared_ptr< Loop< T> >\r
- makeLoopHandler\r
- (\r
- const typename Manipulator<T>::Handler& pBody ,\r
- FrameNumber beginLoopFrameNumber ,\r
- FrameNumber endLoopFrameNumber\r
- );\r
-\r
- template<typename T > friend\r
- typename std::shared_ptr< Loop< T> >\r
- makeLoopHandler\r
- (\r
- const typename Manipulator<T>::Handler& pBody ,\r
- FrameNumber endLoopFrameNumber\r
- );\r
-\r
- };\r
-//{{{ ヘルパ関数\r
- template<typename T >\r
- typename std::shared_ptr< Loop< T> >\r
- makeLoopHandler\r
- (\r
- const typename Manipulator<T>::Handler& pBody ,\r
- FrameNumber beginLoopFrameNumber ,\r
- FrameNumber endLoopFrameNumber\r
- )\r
- {\r
- return typename Manipulator< T >::Handler\r
- (\r
- new Loop< T >(pBody , beginLoopFrameNumber , endLoopFrameNumber)\r
- );\r
- }\r
-\r
- template<typename T >\r
- typename std::shared_ptr< Loop< T> >\r
- makeLoopHandler\r
- (\r
- const typename Manipulator<T>::Handler& pBody ,\r
- FrameNumber endLoopFrameNumber\r
- )\r
- {\r
- return typename Manipulator< T >::Handler\r
- (\r
- new Loop< T >(pBody , endLoopFrameNumber)\r
- );\r
- }\r
-//}}}\r
-} //namespace mof\r
-\r
+#pragma once
+#include "mof/stream/Manipulator.hpp"
+
+
+namespace mof{
+
+ template< typename T >
+ class Loop : public Manipulator< T >
+ {
+
+ public:
+
+ virtual ~Loop( ){}
+
+ virtual T value( FrameNumber frame) const
+ {
+ return m_pBody->value( getInnerFrameNumber( frame ) );
+ }
+
+
+ Loop(const typename Manipulator<T>::Handler& pBody , FrameNumber endLoopFrameNumber)
+ : m_pBody(pBody) , m_beginLoopFrameNumber(0) , m_endLoopFrameNumber(endLoopFrameNumber)
+ {
+ }
+
+ Loop
+ (
+ const typename Manipulator<T>::Handler& pBody ,
+ FrameNumber beginLoopFrameNumber ,
+ FrameNumber endLoopFrameNumber
+ )
+ : m_pBody(pBody) , m_beginLoopFrameNumber(beginLoopFrameNumber) , m_endLoopFrameNumber(endLoopFrameNumber)
+ {
+ if(m_endLoopFrameNumber < m_beginLoopFrameNumber)throw std::invalid_argument("endLoop < beginLoop");
+ }
+
+
+ private:
+
+ typename Manipulator<T>::Handler m_pBody;
+ FrameNumber m_beginLoopFrameNumber;
+ FrameNumber m_endLoopFrameNumber;
+
+ FrameNumber getInnerFrameNumber(FrameNumber frame) const
+ {
+ if(frame < m_beginLoopFrameNumber)return frame;
+ FrameNumber d = m_endLoopFrameNumber - m_beginLoopFrameNumber;
+ return (frame - m_beginLoopFrameNumber) % d + m_beginLoopFrameNumber;
+ }
+
+ template<typename T > friend
+ typename std::shared_ptr< Loop< T> >
+ makeLoopHandler
+ (
+ const typename Manipulator<T>::Handler& pBody ,
+ FrameNumber beginLoopFrameNumber ,
+ FrameNumber endLoopFrameNumber
+ );
+
+ template<typename T > friend
+ typename std::shared_ptr< Loop< T> >
+ makeLoopHandler
+ (
+ const typename Manipulator<T>::Handler& pBody ,
+ FrameNumber endLoopFrameNumber
+ );
+
+ };
+//{{{ ヘルパ関数
+ template<typename T >
+ typename std::shared_ptr< Loop< T> >
+ makeLoopHandler
+ (
+ const typename Manipulator<T>::Handler& pBody ,
+ FrameNumber beginLoopFrameNumber ,
+ FrameNumber endLoopFrameNumber
+ )
+ {
+ return typename Manipulator< T >::Handler
+ (
+ new Loop< T >(pBody , beginLoopFrameNumber , endLoopFrameNumber)
+ );
+ }
+
+ template<typename T >
+ typename std::shared_ptr< Loop< T> >
+ makeLoopHandler
+ (
+ const typename Manipulator<T>::Handler& pBody ,
+ FrameNumber endLoopFrameNumber
+ )
+ {
+ return typename Manipulator< T >::Handler
+ (
+ new Loop< T >(pBody , endLoopFrameNumber)
+ );
+ }
+//}}}
+} //namespace mof
+
-#pragma once\r
-#include <memory>\r
-\r
-namespace mof\r
-{\r
- typedef unsigned int FrameNumber;\r
- typedef FrameNumber frame_t;\r
-\r
- template<typename T>\r
- class Manipulator \r
- {\r
- public:\r
- typedef typename std::shared_ptr< Manipulator > Handler;\r
- typedef typename std::shared_ptr< Manipulator > ptr;\r
- virtual ~Manipulator(){} \r
- virtual T value( FrameNumber fn ) const = 0;\r
-\r
- };\r
-\r
-\r
-} // namespace mof\r
+#pragma once
+#include <memory>
+
+namespace mof
+{
+ typedef unsigned int FrameNumber;
+ typedef FrameNumber frame_t;
+
+ template<typename T>
+ class Manipulator
+ {
+ public:
+ typedef typename std::shared_ptr< Manipulator > Handler;
+ typedef typename std::shared_ptr< Manipulator > ptr;
+ virtual ~Manipulator(){}
+ virtual T value( FrameNumber fn ) const = 0;
+
+ };
+
+
+} // namespace mof
-#pragma once\r
-#include "mof/stream/Manipulator.hpp"\r
-\r
-namespace mof\r
-{\r
- template< typename T >\r
- class Minimum : public Manipulator< T >\r
- {\r
- public:\r
- typedef typename std::shared_ptr< mof::Minimum<T> > Handler;\r
-\r
- Minimum() {}\r
- \r
- virtual ~Minimum() {}\r
-\r
- virtual T value( FrameNumber frame ) const\r
- {\r
- T min;\r
- if(list_.empty())return min;\r
- min = list_.at(0)->value(frame);\r
- for (size_t i = 1; i < list_.size(); ++i)\r
- {\r
- T current = list_.at(i)->value(frame);\r
- if (min > current)min = current;\r
- }\r
- return min;\r
- }\r
-\r
- \r
- const std::vector<Handler>& getList( ) const { return list_; }\r
-\r
- void add( const typename Handler& handler ){ list_.push_back(handler); }\r
-\r
- private:\r
- std::vector<Handler> list_;\r
-\r
- }; // class Minimum\r
-\r
-\r
-} // namespace mof\r
+#pragma once
+#include "mof/stream/Manipulator.hpp"
+
+namespace mof
+{
+ template< typename T >
+ class Minimum : public Manipulator< T >
+ {
+ public:
+ typedef typename std::shared_ptr< mof::Minimum<T> > Handler;
+
+ Minimum() {}
+
+ virtual ~Minimum() {}
+
+ virtual T value( FrameNumber frame ) const
+ {
+ T min;
+ if(list_.empty())return min;
+ min = list_.at(0)->value(frame);
+ for (size_t i = 1; i < list_.size(); ++i)
+ {
+ T current = list_.at(i)->value(frame);
+ if (min > current)min = current;
+ }
+ return min;
+ }
+
+
+ const std::vector<Handler>& getList( ) const { return list_; }
+
+ void add( const typename Handler& handler ){ list_.push_back(handler); }
+
+ private:
+ std::vector<Handler> list_;
+
+ }; // class Minimum
+
+
+} // namespace mof
-#pragma once\r
-#include "mof/stream/Manipulator.hpp"\r
-\r
-namespace mof{\r
-\r
- template< typename T >\r
- class Offset : public Manipulator< T >\r
- {\r
- \r
- public:\r
- typedef typename std::shared_ptr< Offset > Handler;\r
- \r
- virtual ~Offset( ){}\r
-\r
- virtual T value( FrameNumber frame ) const\r
- {\r
- if( m_offset + frame < 0)return m_pBody->value( 0 );\r
- else return m_pBody->value( frame + m_offset );\r
- }\r
-\r
-\r
- private:\r
- typename Manipulator<T>::Handler m_pBody;\r
- int m_offset;\r
-\r
-\r
- Offset( const typename Manipulator<T>::Handler& pBody , int offset )\r
- : m_pBody(pBody) , m_offset(offset) \r
- {\r
- }\r
-\r
- template<typename T > friend\r
- typename std::shared_ptr< Offset< T > > makeOffsetHandler\r
- (\r
- const typename Manipulator<T>::Handler& pBody ,\r
- int offset\r
- );\r
-\r
- };\r
-\r
-\r
- template< typename T >\r
- std::shared_ptr< Offset< T > > makeOffsetHandler\r
- (\r
- const typename Manipulator< T >::Handler& pBody ,\r
- int offset\r
- )\r
- {\r
- return typename Offset< T >::Handler(\r
- new Offset< T >( pBody , offset )\r
- );\r
- }\r
-\r
-\r
-} //namespace mof\r
-\r
+#pragma once
+#include "mof/stream/Manipulator.hpp"
+
+namespace mof{
+
+ template< typename T >
+ class Offset : public Manipulator< T >
+ {
+
+ public:
+ typedef typename std::shared_ptr< Offset > Handler;
+
+ virtual ~Offset( ){}
+
+ virtual T value( FrameNumber frame ) const
+ {
+ if( m_offset + frame < 0)return m_pBody->value( 0 );
+ else return m_pBody->value( frame + m_offset );
+ }
+
+
+ private:
+ typename Manipulator<T>::Handler m_pBody;
+ int m_offset;
+
+
+ Offset( const typename Manipulator<T>::Handler& pBody , int offset )
+ : m_pBody(pBody) , m_offset(offset)
+ {
+ }
+
+ template<typename T > friend
+ typename std::shared_ptr< Offset< T > > makeOffsetHandler
+ (
+ const typename Manipulator<T>::Handler& pBody ,
+ int offset
+ );
+
+ };
+
+
+ template< typename T >
+ std::shared_ptr< Offset< T > > makeOffsetHandler
+ (
+ const typename Manipulator< T >::Handler& pBody ,
+ int offset
+ )
+ {
+ return typename Offset< T >::Handler(
+ new Offset< T >( pBody , offset )
+ );
+ }
+
+
+} //namespace mof
+
- #pragma once\r
- \r
- #include <mof/Animation.hpp>\r
- \r
- namespace mof{\r
- \r
- \r
- \r
- template<typename T>\r
- class ParametricAnimation : public mof::Animation<T>{\r
- const boost::shared_ptr<T>& m_parameter;\r
- public:\r
- \r
- ParametricAnimation(const boost::shared_ptr<T>& parameter) \r
- : m_parameter(parameter){\r
- }\r
- \r
- virtual T getValue(mof::FrameNumber ) const{\r
- return *m_parameter;\r
- }\r
- \r
- };\r
- \r
- template<class T>\r
- typename mof::Animation<T>::Handler makeParametricHandler(const boost::shared_ptr<T>& parameter){\r
- return mof::Animation<T>::Handler(new mof::ParametricAnimation<T>(parameter));\r
- }\r
- \r
- } //namespace mof\r
- \r
+ #pragma once
+
+ #include <mof/Animation.hpp>
+
+ namespace mof{
+
+
+
+ template<typename T>
+ class ParametricAnimation : public mof::Animation<T>{
+ const boost::shared_ptr<T>& m_parameter;
+ public:
+
+ ParametricAnimation(const boost::shared_ptr<T>& parameter)
+ : m_parameter(parameter){
+ }
+
+ virtual T getValue(mof::FrameNumber ) const{
+ return *m_parameter;
+ }
+
+ };
+
+ template<class T>
+ typename mof::Animation<T>::Handler makeParametricHandler(const boost::shared_ptr<T>& parameter){
+ return mof::Animation<T>::Handler(new mof::ParametricAnimation<T>(parameter));
+ }
+
+ } //namespace mof
+
-#pragma once\r
-#include <mof/stream/Manipulator.hpp>\r
-#include <mof/stream/Cache.hpp>\r
-\r
-namespace mof\r
-{\r
- template< typename T > class Reference;\r
-\r
- template< typename T > \r
- std::shared_ptr< Reference<T> >\r
- makeReferenceHandler(const typename Manipulator<T>::Handler&);\r
-\r
-//{{{ Reference\r
- template<typename T>\r
- class Reference : public Manipulator<T>\r
- {\r
- public:\r
- typedef typename std::shared_ptr<Reference> Handler;\r
- \r
- virtual ~Reference(){} \r
- \r
- virtual T value(FrameNumber fn) const\r
- {\r
- return m_body->value(fn);\r
- }\r
-\r
- void replace(const typename Manipulator<T>::Handler& body)\r
- {\r
- m_body = body;\r
- mof::state_changed();\r
- }\r
-\r
- private:\r
- Manipulator<T>::Handler m_body;\r
-\r
- Reference(const Manipulator<T>::Handler& body) : m_body(body)\r
- {}\r
- \r
- template< typename T >\r
- friend typename std::shared_ptr< Reference<T> > \r
- makeReferenceHandler(const typename Manipulator<T>::Handler&);\r
-\r
- };\r
-//}}}\r
-//{{{ ヘルパ関数\r
- template<typename T>\r
- std::shared_ptr< Reference<T> >\r
- makeReferenceHandler(const typename Manipulator<T>::Handler& body)\r
- {\r
- return typename Reference<T>::Handler(new Reference<T>(body));\r
- }\r
-//}}}\r
-\r
-} // namespace mof\r
+#pragma once
+#include <mof/stream/Manipulator.hpp>
+#include <mof/stream/Cache.hpp>
+
+namespace mof
+{
+ template< typename T > class Reference;
+
+ template< typename T >
+ std::shared_ptr< Reference<T> >
+ makeReferenceHandler(const typename Manipulator<T>::Handler&);
+
+//{{{ Reference
+ template<typename T>
+ class Reference : public Manipulator<T>
+ {
+ public:
+ typedef typename std::shared_ptr<Reference> Handler;
+
+ virtual ~Reference(){}
+
+ virtual T value(FrameNumber fn) const
+ {
+ return m_body->value(fn);
+ }
+
+ void replace(const typename Manipulator<T>::Handler& body)
+ {
+ m_body = body;
+ mof::state_changed();
+ }
+
+ private:
+ Manipulator<T>::Handler m_body;
+
+ Reference(const Manipulator<T>::Handler& body) : m_body(body)
+ {}
+
+ template< typename T >
+ friend typename std::shared_ptr< Reference<T> >
+ makeReferenceHandler(const typename Manipulator<T>::Handler&);
+
+ };
+//}}}
+//{{{ ヘルパ関数
+ template<typename T>
+ std::shared_ptr< Reference<T> >
+ makeReferenceHandler(const typename Manipulator<T>::Handler& body)
+ {
+ return typename Reference<T>::Handler(new Reference<T>(body));
+ }
+//}}}
+
+} // namespace mof
-#pragma once\r
-#include <mof/stream/Reference.hpp>\r
-#include <mof/stream/Offset.hpp>\r
-#include <mof/stream/TypeStream.hpp>\r
-#include <vector>\r
-\r
-namespace mof\r
-{\r
-//{{{ ReferenceWrapper\r
- template<typename T>\r
- class ReferenceWrapper\r
- {\r
- public:\r
- \r
- typename Reference<T>::Handler makeRef(const typename Manipulator<T>::Handler& body)\r
- {\r
- m_list.push_back(makeReferenceHandler(body));\r
- return m_list.back();\r
- }\r
- \r
- typename Reference<T>::Handler makeRef(const T& body)\r
- {\r
- m_list.push_back(makeReferenceHandler<T>(makeConstantHandler(body)));\r
- return m_list.back();\r
- }\r
-\r
-\r
- void replace(int index , const typename Manipulator<T>::Handler& body)\r
- {\r
- m_list[index]->replace(body);\r
- //m_list[index]->replace(makeOffsetHandler(body , -1 * (int)m_stream.getCurrentFrameNumber()));\r
- }\r
- \r
- void replace(int index , const T& body)\r
- {\r
- m_list[index]->replace(makeConstantHandler(body));\r
- //m_list[index]->replace(makeOffsetHandler(makeConstantHandler(body) , -1 * (int)m_stream.getCurrentFrameNumber()));\r
- }\r
-\r
- template<typename T, typename K>\r
- void replace(int index , const TypeStream<T, K>& stream , const typename Manipulator<T>::Handler& body)\r
- {\r
- m_list[index]->replace(makeOffsetHandler<T>(body , -1 * stream.getCurrentFrameNumber()));\r
- }\r
- \r
-\r
- typename Reference<T>::Handler getRef(int index) const\r
- {\r
- return m_list[index];\r
- }\r
-\r
- private:\r
- std::vector<typename Reference<T>::Handler> m_list;\r
- };\r
-//}}}\r
-} // namespace mof\r
-\r
+#pragma once
+#include <mof/stream/Reference.hpp>
+#include <mof/stream/Offset.hpp>
+#include <mof/stream/TypeStream.hpp>
+#include <vector>
+
+namespace mof
+{
+//{{{ ReferenceWrapper
+ template<typename T>
+ class ReferenceWrapper
+ {
+ public:
+
+ typename Reference<T>::Handler makeRef(const typename Manipulator<T>::Handler& body)
+ {
+ m_list.push_back(makeReferenceHandler(body));
+ return m_list.back();
+ }
+
+ typename Reference<T>::Handler makeRef(const T& body)
+ {
+ m_list.push_back(makeReferenceHandler<T>(makeConstantHandler(body)));
+ return m_list.back();
+ }
+
+
+ void replace(int index , const typename Manipulator<T>::Handler& body)
+ {
+ m_list[index]->replace(body);
+ //m_list[index]->replace(makeOffsetHandler(body , -1 * (int)m_stream.getCurrentFrameNumber()));
+ }
+
+ void replace(int index , const T& body)
+ {
+ m_list[index]->replace(makeConstantHandler(body));
+ //m_list[index]->replace(makeOffsetHandler(makeConstantHandler(body) , -1 * (int)m_stream.getCurrentFrameNumber()));
+ }
+
+ template<typename T, typename K>
+ void replace(int index , const TypeStream<T, K>& stream , const typename Manipulator<T>::Handler& body)
+ {
+ m_list[index]->replace(makeOffsetHandler<T>(body , -1 * stream.getCurrentFrameNumber()));
+ }
+
+
+ typename Reference<T>::Handler getRef(int index) const
+ {
+ return m_list[index];
+ }
+
+ private:
+ std::vector<typename Reference<T>::Handler> m_list;
+ };
+//}}}
+} // namespace mof
+
-#pragma once\r
-#include "mof/stream/KeyFrameAnimation.hpp"\r
-#include "mof/Matrix2D.hpp"\r
-\r
-\r
-namespace mof{\r
-\r
- class Rotation2D : public Manipulator< Matrix2D >\r
- {\r
- public:\r
- typedef std::shared_ptr< Rotation2D > Handler;\r
- \r
- Rotation2D\r
- (\r
- const std::pair< FrameNumber , mof::Vector2D >& front , \r
- const std::pair< FrameNumber , mof::Vector2D >& back \r
- )\r
- {\r
- m_body = makeKeyFrameAnimationHandler< Vector2D >\r
- (\r
- front , back , &linerInterpolate< Vector2D >\r
- );\r
- }\r
- \r
- Rotation2D\r
- (\r
- const Manipulator< Vector2D >::Handler& body\r
- )\r
- : m_body( body )\r
- {\r
- }\r
-\r
- virtual Matrix2D value( FrameNumber frame ) const\r
- {\r
- return Matrix2D::createRotation( m_body->value(frame) );\r
- }\r
-\r
- Manipulator<mof::Vector2D>::Handler get( ) const\r
- {\r
- return m_body;\r
- }\r
- \r
- void set( const Manipulator< Vector2D >::Handler& handler ) \r
- {\r
- m_body = handler;\r
- }\r
-\r
- private:\r
- Manipulator< Vector2D >::Handler m_body;\r
-\r
- };\r
-//{{{ ヘルパ関数\r
- inline Rotation2D::Handler makeRotation2DHandler\r
- (\r
- const std::pair< FrameNumber , Vector2D >& front ,\r
- const std::pair< FrameNumber , Vector2D >& back \r
- )\r
- {\r
- return Rotation2D::Handler\r
- (\r
- new Rotation2D( front , back )\r
- );\r
- }\r
-\r
- inline Rotation2D::Handler makeRotation2DHandler\r
- (\r
- const Manipulator< Vector2D >::Handler& body\r
- )\r
- {\r
- return Rotation2D::Handler\r
- (\r
- new Rotation2D( body )\r
- );\r
- }\r
-//}}}\r
-} // namespace mof\r
+#pragma once
+#include "mof/stream/KeyFrameAnimation.hpp"
+#include "mof/Matrix2D.hpp"
+
+
+namespace mof{
+
+ class Rotation2D : public Manipulator< Matrix2D >
+ {
+ public:
+ typedef std::shared_ptr< Rotation2D > Handler;
+
+ Rotation2D
+ (
+ const std::pair< FrameNumber , mof::Vector2D >& front ,
+ const std::pair< FrameNumber , mof::Vector2D >& back
+ )
+ {
+ m_body = makeKeyFrameAnimationHandler< Vector2D >
+ (
+ front , back , &linerInterpolate< Vector2D >
+ );
+ }
+
+ Rotation2D
+ (
+ const Manipulator< Vector2D >::Handler& body
+ )
+ : m_body( body )
+ {
+ }
+
+ virtual Matrix2D value( FrameNumber frame ) const
+ {
+ return Matrix2D::createRotation( m_body->value(frame) );
+ }
+
+ Manipulator<mof::Vector2D>::Handler get( ) const
+ {
+ return m_body;
+ }
+
+ void set( const Manipulator< Vector2D >::Handler& handler )
+ {
+ m_body = handler;
+ }
+
+ private:
+ Manipulator< Vector2D >::Handler m_body;
+
+ };
+//{{{ ヘルパ関数
+ inline Rotation2D::Handler makeRotation2DHandler
+ (
+ const std::pair< FrameNumber , Vector2D >& front ,
+ const std::pair< FrameNumber , Vector2D >& back
+ )
+ {
+ return Rotation2D::Handler
+ (
+ new Rotation2D( front , back )
+ );
+ }
+
+ inline Rotation2D::Handler makeRotation2DHandler
+ (
+ const Manipulator< Vector2D >::Handler& body
+ )
+ {
+ return Rotation2D::Handler
+ (
+ new Rotation2D( body )
+ );
+ }
+//}}}
+} // namespace mof
- #pragma once\r
- #include <map>\r
- #include <stdexcept>\r
- #include <boost/function/function2.hpp>\r
- #include "mof/stream/KeyFrameAnimation.hpp"\r
- #include "mof/Matrix3D.hpp"\r
- \r
- \r
- \r
- namespace mof{\r
- \r
- \r
- class Rotation3D : public mof::Manipulator<mof::Matrix3D>{\r
- mof::Manipulator<mof::Vector3D>::Handler m_body;\r
- public:\r
- typedef std::pair<mof::frame_t, mof::Vector3D> keyframe_t;\r
- \r
- Rotation3D(\r
- const std::pair<mof::FrameNumber , mof::Vector3D>& front , \r
- const std::pair<mof::FrameNumber , mof::Vector3D>& back \r
- )\r
- {\r
- m_body = mof::makeKeyFrameAnimationHandler<mof::Vector3D>\r
- (\r
- front , back , &mof::linerInterpolate<mof::Vector3D> \r
- );\r
- }\r
- \r
- Rotation3D\r
- (\r
- const mof::Manipulator<mof::Vector3D>::Handler& body\r
- )\r
- : m_body( body )\r
- {\r
- }\r
- \r
- virtual mof::Matrix3D value( mof::FrameNumber frame) const{\r
- return mof::Matrix3D::createRotation(m_body->value(frame));\r
- }\r
- \r
- \r
- /*mof::FrameNumber getFinalKeyFrameNumber(){\r
- return m_pBody->getFinalKeyFrameNumber();\r
- }*/\r
- \r
- \r
- };\r
- \r
- \r
- \r
- \r
- } //namespace mof\r
- \r
+ #pragma once
+ #include <map>
+ #include <stdexcept>
+ #include <boost/function/function2.hpp>
+ #include "mof/stream/KeyFrameAnimation.hpp"
+ #include "mof/Matrix3D.hpp"
+
+
+
+ namespace mof{
+
+
+ class Rotation3D : public mof::Manipulator<mof::Matrix3D>{
+ mof::Manipulator<mof::Vector3D>::Handler m_body;
+ public:
+ typedef std::pair<mof::frame_t, mof::Vector3D> keyframe_t;
+
+ Rotation3D(
+ const std::pair<mof::FrameNumber , mof::Vector3D>& front ,
+ const std::pair<mof::FrameNumber , mof::Vector3D>& back
+ )
+ {
+ m_body = mof::makeKeyFrameAnimationHandler<mof::Vector3D>
+ (
+ front , back , &mof::linerInterpolate<mof::Vector3D>
+ );
+ }
+
+ Rotation3D
+ (
+ const mof::Manipulator<mof::Vector3D>::Handler& body
+ )
+ : m_body( body )
+ {
+ }
+
+ virtual mof::Matrix3D value( mof::FrameNumber frame) const{
+ return mof::Matrix3D::createRotation(m_body->value(frame));
+ }
+
+
+ /*mof::FrameNumber getFinalKeyFrameNumber(){
+ return m_pBody->getFinalKeyFrameNumber();
+ }*/
+
+
+ };
+
+
+
+
+ } //namespace mof
+
-#pragma once\r
-#include "mof/stream/KeyFrameAnimation.hpp"\r
-#include "mof/Matrix2D.hpp"\r
-\r
-\r
-namespace mof{\r
-\r
- class Scaling2D : public Manipulator< Matrix2D >\r
- {\r
- public:\r
- typedef std::shared_ptr< Scaling2D > Handler;\r
- \r
- Scaling2D\r
- (\r
- const std::pair< FrameNumber , mof::Vector2D >& front , \r
- const std::pair< FrameNumber , mof::Vector2D >& back \r
- )\r
- {\r
- m_body = makeKeyFrameAnimationHandler< Vector2D >\r
- (\r
- front , back , &linerInterpolate< Vector2D >\r
- );\r
- }\r
- \r
- Scaling2D\r
- (\r
- const Manipulator< Vector2D >::Handler& body\r
- )\r
- : m_body( body )\r
- {\r
- }\r
-\r
- virtual Matrix2D value( FrameNumber frame ) const\r
- {\r
- return Matrix2D::createScaling( m_body->value(frame) );\r
- }\r
-\r
- Manipulator<mof::Vector2D>::Handler get( ) const\r
- {\r
- return m_body;\r
- }\r
- \r
- void set( const Manipulator< Vector2D >::Handler& handler ) \r
- {\r
- m_body = handler;\r
- }\r
-\r
- private:\r
- Manipulator< Vector2D >::Handler m_body;\r
-\r
-\r
- };\r
-//{{{ ヘルパ関数\r
- inline Scaling2D::Handler makeScaling2DHandler\r
- (\r
- const std::pair< FrameNumber , Vector2D >& front ,\r
- const std::pair< FrameNumber , Vector2D >& back \r
- )\r
- {\r
- return Scaling2D::Handler\r
- (\r
- new Scaling2D( front , back )\r
- );\r
- }\r
-\r
- inline Scaling2D::Handler makeScaling2DHandler\r
- (\r
- const Manipulator< Vector2D >::Handler& body\r
- )\r
- {\r
- return Scaling2D::Handler\r
- (\r
- new Scaling2D( body )\r
- );\r
- }\r
-//}}}\r
-} // namespace mof\r
-\r
+#pragma once
+#include "mof/stream/KeyFrameAnimation.hpp"
+#include "mof/Matrix2D.hpp"
+
+
+namespace mof{
+
+ class Scaling2D : public Manipulator< Matrix2D >
+ {
+ public:
+ typedef std::shared_ptr< Scaling2D > Handler;
+
+ Scaling2D
+ (
+ const std::pair< FrameNumber , mof::Vector2D >& front ,
+ const std::pair< FrameNumber , mof::Vector2D >& back
+ )
+ {
+ m_body = makeKeyFrameAnimationHandler< Vector2D >
+ (
+ front , back , &linerInterpolate< Vector2D >
+ );
+ }
+
+ Scaling2D
+ (
+ const Manipulator< Vector2D >::Handler& body
+ )
+ : m_body( body )
+ {
+ }
+
+ virtual Matrix2D value( FrameNumber frame ) const
+ {
+ return Matrix2D::createScaling( m_body->value(frame) );
+ }
+
+ Manipulator<mof::Vector2D>::Handler get( ) const
+ {
+ return m_body;
+ }
+
+ void set( const Manipulator< Vector2D >::Handler& handler )
+ {
+ m_body = handler;
+ }
+
+ private:
+ Manipulator< Vector2D >::Handler m_body;
+
+
+ };
+//{{{ ヘルパ関数
+ inline Scaling2D::Handler makeScaling2DHandler
+ (
+ const std::pair< FrameNumber , Vector2D >& front ,
+ const std::pair< FrameNumber , Vector2D >& back
+ )
+ {
+ return Scaling2D::Handler
+ (
+ new Scaling2D( front , back )
+ );
+ }
+
+ inline Scaling2D::Handler makeScaling2DHandler
+ (
+ const Manipulator< Vector2D >::Handler& body
+ )
+ {
+ return Scaling2D::Handler
+ (
+ new Scaling2D( body )
+ );
+ }
+//}}}
+} // namespace mof
+
- #pragma once\r
- #include <map>\r
- #include <stdexcept>\r
- #include <boost/function/function2.hpp>\r
- #include "mof/stream/KeyFrameAnimation.hpp"\r
- #include "mof/Matrix3D.hpp"\r
-#include <memory>\r
- \r
- \r
- namespace mof{\r
- \r
- \r
- class Scaling3D : public mof::Manipulator<mof::Matrix3D>{\r
- std::shared_ptr<mof::KeyFrameAnimation<mof::Vector3D>> m_pBody;\r
- public:\r
- typedef std::pair<mof::frame_t, mof::Vector3D> keyframe_t;\r
- \r
- Scaling3D(\r
- const std::pair<mof::FrameNumber , mof::Vector3D>& front , \r
- const std::pair<mof::FrameNumber , mof::Vector3D>& back \r
- )\r
- {\r
- m_pBody = mof::makeKeyFrameAnimationHandler<mof::Vector3D >\r
- (\r
- front, back, &mof::linerInterpolate<mof::Vector3D>\r
- );\r
- }\r
- \r
- virtual mof::Matrix3D value( mof::FrameNumber frame) const{\r
- return mof::Matrix3D::createScaling(m_pBody->value(frame));\r
- }\r
- \r
- mof::FrameNumber getFinalKeyFrameNumber(){\r
- return m_pBody->getFinalKeyFrameNumber();\r
- }\r
- \r
- \r
- };\r
- \r
- } //namespace mof\r
- \r
+ #pragma once
+ #include <map>
+ #include <stdexcept>
+ #include <boost/function/function2.hpp>
+ #include "mof/stream/KeyFrameAnimation.hpp"
+ #include "mof/Matrix3D.hpp"
+#include <memory>
+
+
+ namespace mof{
+
+
+ class Scaling3D : public mof::Manipulator<mof::Matrix3D>{
+ std::shared_ptr<mof::KeyFrameAnimation<mof::Vector3D>> m_pBody;
+ public:
+ typedef std::pair<mof::frame_t, mof::Vector3D> keyframe_t;
+
+ Scaling3D(
+ const std::pair<mof::FrameNumber , mof::Vector3D>& front ,
+ const std::pair<mof::FrameNumber , mof::Vector3D>& back
+ )
+ {
+ m_pBody = mof::makeKeyFrameAnimationHandler<mof::Vector3D >
+ (
+ front, back, &mof::linerInterpolate<mof::Vector3D>
+ );
+ }
+
+ virtual mof::Matrix3D value( mof::FrameNumber frame) const{
+ return mof::Matrix3D::createScaling(m_pBody->value(frame));
+ }
+
+ mof::FrameNumber getFinalKeyFrameNumber(){
+ return m_pBody->getFinalKeyFrameNumber();
+ }
+
+
+ };
+
+ } //namespace mof
+
-#pragma once\r
-#include "mof/stream/KeyFrameAnimation.hpp"\r
-#include "mof/Matrix2D.hpp"\r
-\r
-\r
-namespace mof{\r
-\r
- class Translation2D : public Manipulator< Matrix2D >\r
- {\r
- public:\r
- typedef std::shared_ptr< Translation2D > Handler;\r
- \r
- Translation2D\r
- (\r
- const std::pair< FrameNumber , mof::Vector2D >& front , \r
- const std::pair< FrameNumber , mof::Vector2D >& back \r
- )\r
- {\r
- m_body = makeKeyFrameAnimationHandler< Vector2D >\r
- (\r
- front , back , &linerInterpolate< Vector2D >\r
- );\r
- }\r
- \r
- Translation2D\r
- (\r
- const Manipulator< Vector2D >::Handler& body\r
- )\r
- : m_body( body )\r
- {\r
- }\r
-\r
- virtual Matrix2D value( FrameNumber frame ) const\r
- {\r
- return Matrix2D::createTranslation( m_body->value(frame) );\r
- }\r
-\r
- Manipulator<mof::Vector2D>::Handler get( ) const\r
- {\r
- return m_body;\r
- }\r
- \r
- void set( const Manipulator< Vector2D >::Handler& handler ) \r
- {\r
- m_body = handler;\r
- }\r
-\r
- private:\r
- Manipulator< Vector2D >::Handler m_body;\r
-\r
-\r
- };\r
-\r
-//{{{ ヘルパ関数\r
- inline Translation2D::Handler makeTranslation2DHandler\r
- (\r
- const std::pair< FrameNumber , Vector2D >& front ,\r
- const std::pair< FrameNumber , Vector2D >& back \r
- )\r
- {\r
- return Translation2D::Handler\r
- (\r
- new Translation2D( front , back )\r
- );\r
- }\r
-\r
- inline Translation2D::Handler makeTranslation2DHandler\r
- (\r
- const Manipulator< Vector2D >::Handler& body\r
- )\r
- {\r
- return Translation2D::Handler\r
- (\r
- new Translation2D( body )\r
- );\r
- }\r
-//}}}\r
-\r
-} // namespace mof\r
-\r
+#pragma once
+#include "mof/stream/KeyFrameAnimation.hpp"
+#include "mof/Matrix2D.hpp"
+
+
+namespace mof{
+
+ class Translation2D : public Manipulator< Matrix2D >
+ {
+ public:
+ typedef std::shared_ptr< Translation2D > Handler;
+
+ Translation2D
+ (
+ const std::pair< FrameNumber , mof::Vector2D >& front ,
+ const std::pair< FrameNumber , mof::Vector2D >& back
+ )
+ {
+ m_body = makeKeyFrameAnimationHandler< Vector2D >
+ (
+ front , back , &linerInterpolate< Vector2D >
+ );
+ }
+
+ Translation2D
+ (
+ const Manipulator< Vector2D >::Handler& body
+ )
+ : m_body( body )
+ {
+ }
+
+ virtual Matrix2D value( FrameNumber frame ) const
+ {
+ return Matrix2D::createTranslation( m_body->value(frame) );
+ }
+
+ Manipulator<mof::Vector2D>::Handler get( ) const
+ {
+ return m_body;
+ }
+
+ void set( const Manipulator< Vector2D >::Handler& handler )
+ {
+ m_body = handler;
+ }
+
+ private:
+ Manipulator< Vector2D >::Handler m_body;
+
+
+ };
+
+//{{{ ヘルパ関数
+ inline Translation2D::Handler makeTranslation2DHandler
+ (
+ const std::pair< FrameNumber , Vector2D >& front ,
+ const std::pair< FrameNumber , Vector2D >& back
+ )
+ {
+ return Translation2D::Handler
+ (
+ new Translation2D( front , back )
+ );
+ }
+
+ inline Translation2D::Handler makeTranslation2DHandler
+ (
+ const Manipulator< Vector2D >::Handler& body
+ )
+ {
+ return Translation2D::Handler
+ (
+ new Translation2D( body )
+ );
+ }
+//}}}
+
+} // namespace mof
+
- #pragma once\r
- #include <map>\r
- #include <stdexcept>\r
- #include <boost/function/function2.hpp>\r
- #include "mof/stream/KeyFrameAnimation.hpp"\r
- #include "mof/Matrix3D.hpp"\r
- \r
- \r
- \r
- namespace mof{\r
- \r
- \r
- class Translation3D : public mof::Manipulator<mof::Matrix3D>{\r
- mof::Manipulator<mof::Vector3D>::Handler m_body;\r
- public:\r
- typedef std::pair<mof::frame_t, mof::Vector3D> keyframe_t;\r
- \r
- Translation3D\r
- (\r
- const std::pair<mof::FrameNumber , mof::Vector3D>& front , \r
- const std::pair<mof::FrameNumber , mof::Vector3D>& back \r
- )\r
- {\r
- m_body = mof::makeKeyFrameAnimationHandler<mof::Vector3D>\r
- (\r
- front , back , &mof::linerInterpolate<mof::Vector3D>\r
- );\r
- }\r
- \r
- Translation3D\r
- (\r
- const mof::Manipulator<mof::Vector3D>::Handler& body\r
- )\r
- : m_body( body )\r
- {\r
- }\r
-\r
- virtual mof::Matrix3D value( mof::FrameNumber frame) const{\r
- return mof::Matrix3D::createTranslation(m_body->value(frame));\r
- }\r
- \r
- /*mof::FrameNumber getFinalKeyFrameNumber(){\r
- return m_pBody->getFinalKeyFrameNumber();\r
- }*/\r
-\r
- \r
- };\r
- \r
- \r
- \r
- \r
- } //namespace mof\r
- \r
+ #pragma once
+ #include <map>
+ #include <stdexcept>
+ #include <boost/function/function2.hpp>
+ #include "mof/stream/KeyFrameAnimation.hpp"
+ #include "mof/Matrix3D.hpp"
+
+
+
+ namespace mof{
+
+
+ class Translation3D : public mof::Manipulator<mof::Matrix3D>{
+ mof::Manipulator<mof::Vector3D>::Handler m_body;
+ public:
+ typedef std::pair<mof::frame_t, mof::Vector3D> keyframe_t;
+
+ Translation3D
+ (
+ const std::pair<mof::FrameNumber , mof::Vector3D>& front ,
+ const std::pair<mof::FrameNumber , mof::Vector3D>& back
+ )
+ {
+ m_body = mof::makeKeyFrameAnimationHandler<mof::Vector3D>
+ (
+ front , back , &mof::linerInterpolate<mof::Vector3D>
+ );
+ }
+
+ Translation3D
+ (
+ const mof::Manipulator<mof::Vector3D>::Handler& body
+ )
+ : m_body( body )
+ {
+ }
+
+ virtual mof::Matrix3D value( mof::FrameNumber frame) const{
+ return mof::Matrix3D::createTranslation(m_body->value(frame));
+ }
+
+ /*mof::FrameNumber getFinalKeyFrameNumber(){
+ return m_pBody->getFinalKeyFrameNumber();
+ }*/
+
+
+ };
+
+
+
+
+ } //namespace mof
+
-#pragma once\r
-#include <memory>\r
-#include "mof/stream/Cascade.hpp"\r
-#include "mof/stream/Cache.hpp"\r
-#include "mof/stream/Constant.hpp"\r
-#include "mof/stream/Offset.hpp"\r
-\r
-namespace mof\r
-{\r
- \r
- template< typename T , class Cascador = DEFAULT_CASCADOR< T > >\r
- class TypeStream\r
- {\r
- public:\r
- TypeStream( )\r
- : m_frameNumber( 0 ) , m_cascade( mof::makeCascadeHandler< T , Cascador >() )\r
- {}\r
- \r
-\r
- TypeStream( const typename Manipulator< T >::Handler& handler )\r
- : m_frameNumber( 0 ) , m_cascade( mof::makeCascadeHandler< T , Cascador >() )\r
- {\r
- m_cascade << handler;\r
- }\r
- \r
- TypeStream( const T& value )\r
- : m_frameNumber( 0 ) , m_cascade( mof::makeCascadeHandler< T , Cascador >() )\r
- {\r
- m_cascade << value;\r
- }\r
-\r
- ~TypeStream( )\r
- {}\r
- \r
- TypeStream< T , Cascador >&\r
- operator << \r
- (\r
- const typename Manipulator< T >::Handler& b \r
- )\r
- {\r
- m_cascade->add\r
- (\r
- makeOffsetHandler< T >( b , -1 * (int)m_frameNumber)\r
- );\r
- return *this;\r
- }\r
- \r
- TypeStream< T , Cascador >&\r
- operator << \r
- (\r
- const TypeStream< T , Cascador >& obj \r
- )\r
- {\r
- //m_cascade->add( obj.m_cascade );\r
- m_cascade->add( makeCacheHandler<T>(makeOffsetHandler< T >( obj.m_cascade , obj.m_frameNumber - m_frameNumber) ) );\r
- return *this;\r
- }\r
-\r
-\r
- TypeStream< T , Cascador >&\r
- operator << \r
- (\r
- const T& b \r
- )\r
- {\r
- m_cascade->add( mof::makeConstantHandler( b ) );\r
- return *this;\r
- }\r
-\r
- T value( ) const\r
- {\r
- return m_cascade->value( m_frameNumber );\r
- }\r
-\r
- typename Manipulator<T>::Handler toManipulator()\r
- {\r
- return m_cascade;\r
- }\r
- \r
- void update( )\r
- {\r
- m_frameNumber++;\r
- }\r
-\r
- FrameNumber getCurrentFrameNumber() const\r
- {\r
- return m_frameNumber;\r
- }\r
-\r
- private:\r
- FrameNumber m_frameNumber;\r
- typename Cascade< T , Cascador >::Handler m_cascade;\r
- };\r
-\r
-} // namespace mof\r
+#pragma once
+#include <memory>
+#include "mof/stream/Cascade.hpp"
+#include "mof/stream/Cache.hpp"
+#include "mof/stream/Constant.hpp"
+#include "mof/stream/Offset.hpp"
+
+namespace mof
+{
+
+ template< typename T , class Cascador = DEFAULT_CASCADOR< T > >
+ class TypeStream
+ {
+ public:
+ TypeStream( )
+ : m_frameNumber( 0 ) , m_cascade( mof::makeCascadeHandler< T , Cascador >() )
+ {}
+
+
+ TypeStream( const typename Manipulator< T >::Handler& handler )
+ : m_frameNumber( 0 ) , m_cascade( mof::makeCascadeHandler< T , Cascador >() )
+ {
+ m_cascade << handler;
+ }
+
+ TypeStream( const T& value )
+ : m_frameNumber( 0 ) , m_cascade( mof::makeCascadeHandler< T , Cascador >() )
+ {
+ m_cascade << value;
+ }
+
+ ~TypeStream( )
+ {}
+
+ TypeStream< T , Cascador >&
+ operator <<
+ (
+ const typename Manipulator< T >::Handler& b
+ )
+ {
+ m_cascade->add
+ (
+ makeOffsetHandler< T >( b , -1 * (int)m_frameNumber)
+ );
+ return *this;
+ }
+
+ TypeStream< T , Cascador >&
+ operator <<
+ (
+ const TypeStream< T , Cascador >& obj
+ )
+ {
+ //m_cascade->add( obj.m_cascade );
+ m_cascade->add( makeCacheHandler<T>(makeOffsetHandler< T >( obj.m_cascade , obj.m_frameNumber - m_frameNumber) ) );
+ return *this;
+ }
+
+
+ TypeStream< T , Cascador >&
+ operator <<
+ (
+ const T& b
+ )
+ {
+ m_cascade->add( mof::makeConstantHandler( b ) );
+ return *this;
+ }
+
+ T value( ) const
+ {
+ return m_cascade->value( m_frameNumber );
+ }
+
+ typename Manipulator<T>::Handler toManipulator()
+ {
+ return m_cascade;
+ }
+
+ void update( )
+ {
+ m_frameNumber++;
+ }
+
+ FrameNumber getCurrentFrameNumber() const
+ {
+ return m_frameNumber;
+ }
+
+ private:
+ FrameNumber m_frameNumber;
+ typename Cascade< T , Cascador >::Handler m_cascade;
+ };
+
+} // namespace mof
-#pragma once\r
-#include "mof/Animation.hpp"\r
-#include "mof/Vector3D.hpp"\r
- \r
-namespace mof{\r
-\r
- class UniformAnimation : public mof::Animation<mof::Vector3D>\r
- {\r
- \r
- mof::Vector3D m_initialValue;\r
- mof::Vector3D m_targetValue; \r
- double m_speed; \r
- public:\r
- \r
- UniformAnimation\r
- (\r
- const mof::Vector3D& initialValue ,\r
- const mof::Vector3D& targetValue ,\r
- double speed \r
- ) \r
- : m_initialValue(initialValue) , m_targetValue(targetValue) , m_speed(speed)\r
- {\r
- }\r
- \r
- \r
- virtual mof::Vector3D getValue( mof::FrameNumber frame) const\r
- {\r
- \r
- mof::Vector3D direction = ( m_targetValue - m_initialValue );\r
- direction.normalize();\r
- mof::Vector3D result = m_initialValue + direction * m_speed * frame;//\91\9d\95ª \r
- if( direction.x > 0 && result.x > m_targetValue.x )result.x = m_targetValue.x; \r
- else if( direction.x < 0 && result.x < m_targetValue.x )result.x = m_targetValue.x; \r
- if( direction.y > 0 && result.y > m_targetValue.y )result.y = m_targetValue.y; \r
- else if( direction.y < 0 && result.y < m_targetValue.y )result.y = m_targetValue.y; \r
- if( direction.z > 0 && result.z > m_targetValue.z )result.z = m_targetValue.z; \r
- else if( direction.z < 0 && result.z < m_targetValue.z )result.z = m_targetValue.z; \r
- \r
- return result;\r
- }\r
-\r
- \r
- };\r
- \r
- \r
- \r
-} //namespace mof\r
- \r
+#pragma once
+#include "mof/Animation.hpp"
+#include "mof/Vector3D.hpp"
+
+namespace mof{
+
+ class UniformAnimation : public mof::Animation<mof::Vector3D>
+ {
+
+ mof::Vector3D m_initialValue;
+ mof::Vector3D m_targetValue;
+ double m_speed;
+ public:
+
+ UniformAnimation
+ (
+ const mof::Vector3D& initialValue ,
+ const mof::Vector3D& targetValue ,
+ double speed
+ )
+ : m_initialValue(initialValue) , m_targetValue(targetValue) , m_speed(speed)
+ {
+ }
+
+
+ virtual mof::Vector3D getValue( mof::FrameNumber frame) const
+ {
+
+ mof::Vector3D direction = ( m_targetValue - m_initialValue );
+ direction.normalize();
+ mof::Vector3D result = m_initialValue + direction * m_speed * frame;//\91\9d\95ª
+ if( direction.x > 0 && result.x > m_targetValue.x )result.x = m_targetValue.x;
+ else if( direction.x < 0 && result.x < m_targetValue.x )result.x = m_targetValue.x;
+ if( direction.y > 0 && result.y > m_targetValue.y )result.y = m_targetValue.y;
+ else if( direction.y < 0 && result.y < m_targetValue.y )result.y = m_targetValue.y;
+ if( direction.z > 0 && result.z > m_targetValue.z )result.z = m_targetValue.z;
+ else if( direction.z < 0 && result.z < m_targetValue.z )result.z = m_targetValue.z;
+
+ return result;
+ }
+
+
+ };
+
+
+
+} //namespace mof
+
-#include "mof/stream/utilities.hpp"\r
-#include "mof/stream/Joint.hpp"\r
-#include <boost/bind.hpp>\r
-\r
-namespace\r
-{\r
- mof::Vector2D matrix2translation( const mof::Matrix2D& matrix )\r
- {\r
- return mof::Matrix2D::getTranslation( matrix );\r
- }\r
- \r
- mof::Vector2D matrix2scaling( const mof::Matrix2D& matrix )\r
- {\r
- return matrix.getDiagonal( );\r
- }\r
-\r
- mof::Vector2D matrix2rotation( const mof::Matrix2D& matrix )\r
- {\r
- //TODO implementation\r
- return matrix.getDiagonal( );\r
- }\r
-\r
-}\r
-\r
-\r
-namespace mof\r
-{\r
-\r
- Manipulator< Vector2D >::Handler \r
- makeTranslation2DHandler( const Manipulator< Matrix2D >::Handler& handler )\r
- {\r
- return makeJointHandler( handler , &matrix2translation );\r
- //return makeJointHandler( handler , boost::bind( &matrix2translation ) );\r
- }\r
-\r
- Manipulator< Vector2D >::Handler \r
- makeScaling2DHandler( const Manipulator< Matrix2D >::Handler& handler )\r
- {\r
- return makeJointHandler( handler , &matrix2scaling );\r
- //return makeJointHandler( handler , boost::bind( &matrix2scaling ) );\r
- }\r
-\r
-\r
- Manipulator< Vector2D >::Handler \r
- makeRotation2DHandler( const Manipulator< Matrix2D >::Handler& handler )\r
- {\r
- return makeJointHandler( handler , &matrix2rotation );\r
- //return makeJointHandler( handler , boost::bind( &matrix2rotation ) );\r
- }\r
-\r
-\r
-\r
-} // namespace mof\r
-\r
+#include "mof/stream/utilities.hpp"
+#include "mof/stream/Joint.hpp"
+#include <boost/bind.hpp>
+
+namespace
+{
+ mof::Vector2D matrix2translation( const mof::Matrix2D& matrix )
+ {
+ return mof::Matrix2D::getTranslation( matrix );
+ }
+
+ mof::Vector2D matrix2scaling( const mof::Matrix2D& matrix )
+ {
+ return matrix.getDiagonal( );
+ }
+
+ mof::Vector2D matrix2rotation( const mof::Matrix2D& matrix )
+ {
+ //TODO implementation
+ return matrix.getDiagonal( );
+ }
+
+}
+
+
+namespace mof
+{
+
+ Manipulator< Vector2D >::Handler
+ makeTranslation2DHandler( const Manipulator< Matrix2D >::Handler& handler )
+ {
+ return makeJointHandler( handler , &matrix2translation );
+ //return makeJointHandler( handler , boost::bind( &matrix2translation ) );
+ }
+
+ Manipulator< Vector2D >::Handler
+ makeScaling2DHandler( const Manipulator< Matrix2D >::Handler& handler )
+ {
+ return makeJointHandler( handler , &matrix2scaling );
+ //return makeJointHandler( handler , boost::bind( &matrix2scaling ) );
+ }
+
+
+ Manipulator< Vector2D >::Handler
+ makeRotation2DHandler( const Manipulator< Matrix2D >::Handler& handler )
+ {
+ return makeJointHandler( handler , &matrix2rotation );
+ //return makeJointHandler( handler , boost::bind( &matrix2rotation ) );
+ }
+
+
+
+} // namespace mof
+
-#pragma once\r
-#include "mof/stream/Manipulator.hpp"\r
-#include "mof/stream/TypeStream.hpp"\r
-#include "mof/Vector2D.hpp"\r
-#include "mof/Vector3D.hpp"\r
-#include "mof/Matrix2D.hpp"\r
-#include "mof/Matrix3D.hpp"\r
-#include "mof/Color.hpp"\r
-#include "mof/Rectangle.hpp"\r
-\r
-namespace mof\r
-{\r
- typedef TypeStream< Vector2D , Add< Vector2D > > Vector2DStream;\r
- typedef TypeStream< Vector3D , Add< Vector3D > > Vector3DStream;\r
- typedef TypeStream<Matrix3D, Multiply<Matrix3D>> Matrix3DStream;\r
- typedef TypeStream< Color4f , Multiply< Color4f > > ColorStream;\r
- typedef TypeStream< Rectangle< float > , Overwrite< Rectangle< float > > > RectangleStream;\r
-\r
-\r
- Manipulator< Vector2D >::Handler \r
- makeTranslation2DHandler( const Manipulator< Matrix2D >::Handler& handler );\r
-\r
- Manipulator< Vector2D >::Handler \r
- makeScaling2DHandler( const Manipulator< Matrix2D >::Handler& handler );\r
-\r
- Manipulator< Vector2D >::Handler \r
- makeRotation2DHandler( const Manipulator< Matrix2D >::Handler& handler );\r
-\r
-\r
-} // namespace mof\r
+#pragma once
+#include "mof/stream/Manipulator.hpp"
+#include "mof/stream/TypeStream.hpp"
+#include "mof/Vector2D.hpp"
+#include "mof/Vector3D.hpp"
+#include "mof/Matrix2D.hpp"
+#include "mof/Matrix3D.hpp"
+#include "mof/Color.hpp"
+#include "mof/Rectangle.hpp"
+
+namespace mof
+{
+ typedef TypeStream< Vector2D , Add< Vector2D > > Vector2DStream;
+ typedef TypeStream< Vector3D , Add< Vector3D > > Vector3DStream;
+ typedef TypeStream<Matrix3D, Multiply<Matrix3D>> Matrix3DStream;
+ typedef TypeStream< Color4f , Multiply< Color4f > > ColorStream;
+ typedef TypeStream< Rectangle< float > , Overwrite< Rectangle< float > > > RectangleStream;
+
+
+ Manipulator< Vector2D >::Handler
+ makeTranslation2DHandler( const Manipulator< Matrix2D >::Handler& handler );
+
+ Manipulator< Vector2D >::Handler
+ makeScaling2DHandler( const Manipulator< Matrix2D >::Handler& handler );
+
+ Manipulator< Vector2D >::Handler
+ makeRotation2DHandler( const Manipulator< Matrix2D >::Handler& handler );
+
+
+} // namespace mof
-#pragma once\r
-\r
-\r
-#include "mof/stream/TypeStream.hpp"\r
-#include "mof/stream/Manipulator.hpp"\r
-#include "mof/stream/Cascade.hpp"\r
-#include "mof/stream/Constant.hpp"\r
-#include "mof/stream/KeyFrameAnimation.hpp"\r
-#include "mof/stream/Translation2D.hpp"\r
-#include "mof/stream/Rotation2D.hpp"\r
-#include "mof/stream/Scaling2D.hpp"\r
-#include "mof/stream/Rotation3D.hpp"\r
-#include "mof/stream/Scaling3D.hpp"\r
-#include "mof/stream/Translation3D.hpp"\r
-#include "mof/stream/Loop.hpp"\r
-#include "mof/stream/Joint.hpp"\r
-#include "mof/stream/Offset.hpp"\r
-#include "mof/stream/Reference.hpp"\r
-#include "mof/stream/Filter.hpp"\r
-#include "mof/stream/ReferenceWrapper.hpp"\r
-#include "mof/stream/Cache.hpp"\r
-#include "mof/stream/Minimum.hpp"\r
-#include "mof/stream/utilities.hpp"\r
-\r
-/*\r
-#include "mof/ParametricAnimation.hpp"\r
-#include "mof/RotationAnimation3D.hpp"\r
-#include "mof/TranslationAnimation3D.hpp"\r
-#include "mof/ScalingAnimation3D.hpp"\r
-#include "mof/BoundsAnimation.hpp"\r
-*/\r
+#pragma once
+
+
+#include "mof/stream/TypeStream.hpp"
+#include "mof/stream/Manipulator.hpp"
+#include "mof/stream/Cascade.hpp"
+#include "mof/stream/Constant.hpp"
+#include "mof/stream/KeyFrameAnimation.hpp"
+#include "mof/stream/Translation2D.hpp"
+#include "mof/stream/Rotation2D.hpp"
+#include "mof/stream/Scaling2D.hpp"
+#include "mof/stream/Rotation3D.hpp"
+#include "mof/stream/Scaling3D.hpp"
+#include "mof/stream/Translation3D.hpp"
+#include "mof/stream/Loop.hpp"
+#include "mof/stream/Joint.hpp"
+#include "mof/stream/Offset.hpp"
+#include "mof/stream/Reference.hpp"
+#include "mof/stream/Filter.hpp"
+#include "mof/stream/ReferenceWrapper.hpp"
+#include "mof/stream/Cache.hpp"
+#include "mof/stream/Minimum.hpp"
+#include "mof/stream/utilities.hpp"
+
+/*
+#include "mof/ParametricAnimation.hpp"
+#include "mof/RotationAnimation3D.hpp"
+#include "mof/TranslationAnimation3D.hpp"
+#include "mof/ScalingAnimation3D.hpp"
+#include "mof/BoundsAnimation.hpp"
+*/
-#pragma once\r
-#include <mof/widget/WidgetView.hpp>\r
-\r
-class WidgetViewMock : public mof::widget::WidgetView\r
-{\r
-public:\r
-\r
- WidgetViewMock(){}\r
- virtual ~WidgetViewMock(){}\r
-\r
- virtual mof::FrameNumber show(bool imidiately = false){ return 100; }\r
- virtual mof::FrameNumber hide(bool imidiately = false){ return 100; }\r
- virtual mof::FrameNumber focus(bool imidiately = false){ return 100; }\r
- virtual mof::FrameNumber blur(bool imidiately = false){ return 100; }\r
- virtual mof::FrameNumber click(bool imidiately = false){ return 100; }\r
- \r
- virtual void update(){}\r
- virtual void draw() const {}\r
-\r
-};\r
+#pragma once
+#include <mof/widget/WidgetView.hpp>
+
+class WidgetViewMock : public mof::widget::WidgetView
+{
+public:
+
+ WidgetViewMock(){}
+ virtual ~WidgetViewMock(){}
+
+ virtual mof::FrameNumber show(bool imidiately = false){ return 100; }
+ virtual mof::FrameNumber hide(bool imidiately = false){ return 100; }
+ virtual mof::FrameNumber focus(bool imidiately = false){ return 100; }
+ virtual mof::FrameNumber blur(bool imidiately = false){ return 100; }
+ virtual mof::FrameNumber click(bool imidiately = false){ return 100; }
+
+ virtual void update(){}
+ virtual void draw() const {}
+
+};
-#ifndef TSTRING_HPP\r
-#define TSTRING_HPP\r
-\r
-#include <string>\r
-#include <tchar.h>\r
-#include <sstream>\r
-\r
-namespace mof {\r
- typedef std::basic_string<TCHAR> tstring;\r
- typedef std::basic_ostringstream<TCHAR> otstringstream;\r
-};\r
-\r
-#endif\r
+#ifndef TSTRING_HPP
+#define TSTRING_HPP
+
+#include <string>
+#include <tchar.h>
+#include <sstream>
+
+namespace mof {
+ typedef std::basic_string<TCHAR> tstring;
+ typedef std::basic_ostringstream<TCHAR> otstringstream;
+};
+
+#endif
-#pragma once\r
-#define _USE_MATH_DEFINES\r
-#include <math.h>\r
-#include <boost/foreach.hpp>\r
-#define foreach BOOST_FOREACH \r
-\r
-namespace mof{\r
- \r
- inline float deg2rad( float deg )\r
- {\r
- return deg / 180.0f * static_cast<float>(M_PI);\r
- }\r
-\r
- inline float rad2deg( float rad )\r
- {\r
- return rad / static_cast<float>(M_PI) * 180.0f;\r
- }\r
-\r
- template< typename T , int N >\r
- int lengthOf( T (&)[N] )\r
- {\r
- return N;\r
- }\r
- \r
- template< typename T , int N >\r
- T& lastOf( T(&arr)[N] )\r
- {\r
- return arr[N-1];\r
- }\r
-\r
- template< typename T >\r
- void safe_delete( T* (&p) )\r
- {\r
- delete p;\r
- p = NULL;\r
- }\r
-\r
- template< typename T >\r
- void safe_delete_array( T* (&p) )\r
- {\r
- delete[] p;\r
- p = NULL;\r
- }\r
-\r
- inline int rotation_mod(int a , unsigned int b)\r
- {\r
- return a >= 0 \r
- ? a % b \r
- : b - (-a % b);\r
- }\r
-\r
-\r
-\r
-} // namespace mof\r
-\r
+#pragma once
+#define _USE_MATH_DEFINES
+#include <math.h>
+#include <boost/foreach.hpp>
+#define foreach BOOST_FOREACH
+
+namespace mof{
+
+ inline float deg2rad( float deg )
+ {
+ return deg / 180.0f * static_cast<float>(M_PI);
+ }
+
+ inline float rad2deg( float rad )
+ {
+ return rad / static_cast<float>(M_PI) * 180.0f;
+ }
+
+ template< typename T , int N >
+ int lengthOf( T (&)[N] )
+ {
+ return N;
+ }
+
+ template< typename T , int N >
+ T& lastOf( T(&arr)[N] )
+ {
+ return arr[N-1];
+ }
+
+ template< typename T >
+ void safe_delete( T* (&p) )
+ {
+ delete p;
+ p = NULL;
+ }
+
+ template< typename T >
+ void safe_delete_array( T* (&p) )
+ {
+ delete[] p;
+ p = NULL;
+ }
+
+ inline int rotation_mod(int a , unsigned int b)
+ {
+ return a >= 0
+ ? a % b
+ : b - (-a % b);
+ }
+
+
+
+} // namespace mof
+
-#pragma once\r
-#include <memory>\r
-#include <boost/utility.hpp>\r
-#include <memory>\r
-#include "mof/tstring.hpp"\r
-#include <mof/stream/Manipulator.hpp>\r
-#include <mof/Vector2D.hpp>\r
-#include <mof/Color.hpp>\r
-#include <mof/widget/WidgetView.hpp>\r
-\r
-namespace mof\r
-{\r
-namespace widget\r
-{\r
- struct Page;\r
-\r
- class AbstractTextCompiler : boost::noncopyable\r
- {\r
- public:\r
- enum BehaviorTarget\r
- {\r
- PAGE_OPEN,\r
- PAGE_CLOSE,\r
- };\r
-\r
- virtual ~AbstractTextCompiler(){}\r
- virtual std::auto_ptr<mof::widget::Page> compile(const mof::tstring& text) = 0;// deprecate\r
- virtual std::auto_ptr<mof::widget::WidgetView> compile_d(const mof::tstring& text) = 0; // \82±\82Á\82¿\82ª\96{\97\88\82Ìcompile\r
- virtual void setBehaviorOnPosition(BehaviorTarget target, mof::Manipulator<mof::Vector2D>::Handler position, FrameNumber period) = 0;\r
- virtual void setBehaviorOnColor(BehaviorTarget target, mof::Manipulator<mof::Color4f>::Handler color, FrameNumber period) = 0;\r
-\r
- };//class AbstractTextCompiler\r
-\r
-}// namespace widget\r
-}// namespace mof\r
+#pragma once
+#include <memory>
+#include <boost/utility.hpp>
+#include <memory>
+#include "mof/tstring.hpp"
+#include <mof/stream/Manipulator.hpp>
+#include <mof/Vector2D.hpp>
+#include <mof/Color.hpp>
+#include <mof/widget/WidgetView.hpp>
+
+namespace mof
+{
+namespace widget
+{
+ struct Page;
+
+ class AbstractTextCompiler : boost::noncopyable
+ {
+ public:
+ enum BehaviorTarget
+ {
+ PAGE_OPEN,
+ PAGE_CLOSE,
+ };
+
+ virtual ~AbstractTextCompiler(){}
+ virtual std::auto_ptr<mof::widget::Page> compile(const mof::tstring& text) = 0;// deprecate
+ virtual std::auto_ptr<mof::widget::WidgetView> compile_d(const mof::tstring& text) = 0; // \82±\82Á\82¿\82ª\96{\97\88\82Ìcompile
+ virtual void setBehaviorOnPosition(BehaviorTarget target, mof::Manipulator<mof::Vector2D>::Handler position, FrameNumber period) = 0;
+ virtual void setBehaviorOnColor(BehaviorTarget target, mof::Manipulator<mof::Color4f>::Handler color, FrameNumber period) = 0;
+
+ };//class AbstractTextCompiler
+
+}// namespace widget
+}// namespace mof
-#include <mof/widget/ClippingView.hpp>\r
-#include <mof/GraphicsDevice.hpp>\r
-#include <mof/ConsoleIO.hpp>\r
- \r
-namespace mof\r
-{\r
-namespace widget\r
-{\r
-//{{{ struct Impl\r
- struct ClippingView::Impl\r
- {\r
- std::shared_ptr<WidgetView> pBody_; \r
- mof::Vector2D preferredSize_;\r
-\r
- Impl(std::shared_ptr<WidgetView> pBody)\r
- : pBody_(pBody)\r
- {\r
- }\r
- \r
- ~Impl()\r
- {\r
- }\r
- \r
- };\r
-//}}}\r
-//{{{ constructor\r
- ClippingView::ClippingView(std::shared_ptr<WidgetView> pBody)\r
- : \r
- pImpl_(new Impl(pBody)) \r
- {\r
- pImpl_->pBody_->getPositionStream() << getPositionStream(); \r
- pImpl_->pBody_->getColorStream() << getColorStream(); \r
- pImpl_->preferredSize_ = pImpl_->pBody_->getPreferredSize();// the initial scale depends on the body.\r
- getSizeStream() << pImpl_->preferredSize_;\r
- pImpl_->pBody_->getSizeStream() << getSizeStream() << mof::makeConstantHandler(-pImpl_->preferredSize_); \r
- }\r
-//}}}\r
-//{{{ destructor\r
- ClippingView::~ClippingView()\r
- {\r
- }\r
-//}}}\r
-//{{{ update\r
- void ClippingView::update( )\r
- {\r
- m_positionStream.update( );\r
- m_sizeStream.update( );\r
- m_colorStream.update( );\r
- pImpl_->pBody_->update();\r
- }\r
-//}}}\r
-//{{{ draw\r
- void ClippingView::draw( ) const\r
- {\r
- int width = mof::GraphicsDevice::getViewportWidth();\r
- int height = mof::GraphicsDevice::getViewportHeight();\r
- mof::Vector2D position = m_positionStream.value();\r
- mof::Vector2D scale = m_sizeStream.value();\r
- if (0 == scale.x || 0 == scale.y) return;// prevent the area of viewport from vanishing. \r
- mof::GraphicsDevice::setViewport(mof::Rectangle<mof::real>(position.x, position.y, position.x + scale.x, position.y + scale.y));\r
- pImpl_->pBody_->draw( );\r
- mof::GraphicsDevice::setViewport(mof::Rectangle<mof::real>(0, 0, width, height));// restore the viewport.\r
- }\r
-//}}}\r
-//{{{ setVisible\r
- void ClippingView::setVisible(bool visible)\r
- {\r
- pImpl_->pBody_->setVisible(visible);\r
- }\r
-//}}}\r
-//{{{ show\r
- FrameNumber ClippingView::show(bool immediately) \r
- {\r
- return pImpl_->pBody_->show(immediately);\r
- }\r
-//}}}\r
-//{{{ hide\r
- FrameNumber ClippingView::hide(bool immediately)\r
- {\r
- return pImpl_->pBody_->hide(immediately);\r
- }\r
-//}}}\r
-//{{{ focus\r
- FrameNumber ClippingView::focus(bool immediately) \r
- {\r
- return pImpl_->pBody_->focus(immediately);\r
- }\r
-//}}}\r
-//{{{ blur\r
- FrameNumber ClippingView::blur(bool immediately)\r
- {\r
- return pImpl_->pBody_->blur(immediately);\r
- }\r
-//}}}\r
-//{{{ click\r
- FrameNumber ClippingView::click(bool immediately)\r
- {\r
- return pImpl_->pBody_->click(immediately);\r
- }\r
-//}}}\r
-//{{{ getPreferredSize\r
- mof::Vector2D ClippingView::getPreferredSize() const\r
- {\r
- return pImpl_->preferredSize_;\r
- }\r
-//}}}\r
-}\r
-} // namespace mof\r
+#include <mof/widget/ClippingView.hpp>
+#include <mof/GraphicsDevice.hpp>
+#include <mof/ConsoleIO.hpp>
+
+namespace mof
+{
+namespace widget
+{
+//{{{ struct Impl
+ struct ClippingView::Impl
+ {
+ std::shared_ptr<WidgetView> pBody_;
+ mof::Vector2D preferredSize_;
+
+ Impl(std::shared_ptr<WidgetView> pBody)
+ : pBody_(pBody)
+ {
+ }
+
+ ~Impl()
+ {
+ }
+
+ };
+//}}}
+//{{{ constructor
+ ClippingView::ClippingView(std::shared_ptr<WidgetView> pBody)
+ :
+ pImpl_(new Impl(pBody))
+ {
+ pImpl_->pBody_->getPositionStream() << getPositionStream();
+ pImpl_->pBody_->getColorStream() << getColorStream();
+ pImpl_->preferredSize_ = pImpl_->pBody_->getPreferredSize();// the initial scale depends on the body.
+ getSizeStream() << pImpl_->preferredSize_;
+ pImpl_->pBody_->getSizeStream() << getSizeStream() << mof::makeConstantHandler(-pImpl_->preferredSize_);
+ }
+//}}}
+//{{{ destructor
+ ClippingView::~ClippingView()
+ {
+ }
+//}}}
+//{{{ update
+ void ClippingView::update( )
+ {
+ m_positionStream.update( );
+ m_sizeStream.update( );
+ m_colorStream.update( );
+ pImpl_->pBody_->update();
+ }
+//}}}
+//{{{ draw
+ void ClippingView::draw( ) const
+ {
+ int width = mof::GraphicsDevice::getViewportWidth();
+ int height = mof::GraphicsDevice::getViewportHeight();
+ mof::Vector2D position = m_positionStream.value();
+ mof::Vector2D scale = m_sizeStream.value();
+ if (0 == scale.x || 0 == scale.y) return;// prevent the area of viewport from vanishing.
+ mof::GraphicsDevice::setViewport(mof::Rectangle<mof::real>(position.x, position.y, position.x + scale.x, position.y + scale.y));
+ pImpl_->pBody_->draw( );
+ mof::GraphicsDevice::setViewport(mof::Rectangle<mof::real>(0, 0, width, height));// restore the viewport.
+ }
+//}}}
+//{{{ setVisible
+ void ClippingView::setVisible(bool visible)
+ {
+ pImpl_->pBody_->setVisible(visible);
+ }
+//}}}
+//{{{ show
+ FrameNumber ClippingView::show(bool immediately)
+ {
+ return pImpl_->pBody_->show(immediately);
+ }
+//}}}
+//{{{ hide
+ FrameNumber ClippingView::hide(bool immediately)
+ {
+ return pImpl_->pBody_->hide(immediately);
+ }
+//}}}
+//{{{ focus
+ FrameNumber ClippingView::focus(bool immediately)
+ {
+ return pImpl_->pBody_->focus(immediately);
+ }
+//}}}
+//{{{ blur
+ FrameNumber ClippingView::blur(bool immediately)
+ {
+ return pImpl_->pBody_->blur(immediately);
+ }
+//}}}
+//{{{ click
+ FrameNumber ClippingView::click(bool immediately)
+ {
+ return pImpl_->pBody_->click(immediately);
+ }
+//}}}
+//{{{ getPreferredSize
+ mof::Vector2D ClippingView::getPreferredSize() const
+ {
+ return pImpl_->preferredSize_;
+ }
+//}}}
+}
+} // namespace mof
-#pragma once\r
-#include "mof/widget/Container.hpp"\r
-#include <memory>\r
-\r
-namespace mof\r
-{\r
- class Font;\r
-\r
-namespace widget\r
-{\r
-\r
- class ClippingView\r
- : \r
- public WidgetView\r
- {\r
- public:\r
- \r
- ClippingView\r
- (\r
- std::shared_ptr<WidgetView> body\r
- );\r
- virtual ~ClippingView( );\r
-\r
- virtual void update( );\r
- virtual void draw( ) const;\r
- virtual void setVisible(bool visible);\r
-\r
- virtual FrameNumber show( bool imidiately = false ); \r
- virtual FrameNumber hide( bool imidiately = false );\r
- virtual FrameNumber focus( bool imidiately = false ); \r
- virtual FrameNumber blur( bool imidiately = false );\r
- virtual FrameNumber click( bool imidiately = false );\r
- virtual mof::Vector2D getPreferredSize() const;\r
-\r
- const std::shared_ptr<WidgetView> getBody() const;\r
- std::shared_ptr<WidgetView> getBody();\r
- private:\r
- struct Impl;\r
- std::unique_ptr<Impl> pImpl_;\r
- \r
- };\r
-\r
-}\r
-}\r
+#pragma once
+#include "mof/widget/Container.hpp"
+#include <memory>
+
+namespace mof
+{
+ class Font;
+
+namespace widget
+{
+
+ class ClippingView
+ :
+ public WidgetView
+ {
+ public:
+
+ ClippingView
+ (
+ std::shared_ptr<WidgetView> body
+ );
+ virtual ~ClippingView( );
+
+ virtual void update( );
+ virtual void draw( ) const;
+ virtual void setVisible(bool visible);
+
+ virtual FrameNumber show( bool imidiately = false );
+ virtual FrameNumber hide( bool imidiately = false );
+ virtual FrameNumber focus( bool imidiately = false );
+ virtual FrameNumber blur( bool imidiately = false );
+ virtual FrameNumber click( bool imidiately = false );
+ virtual mof::Vector2D getPreferredSize() const;
+
+ const std::shared_ptr<WidgetView> getBody() const;
+ std::shared_ptr<WidgetView> getBody();
+ private:
+ struct Impl;
+ std::unique_ptr<Impl> pImpl_;
+
+ };
+
+}
+}
-#include <mof/widget/Container.hpp>\r
-#include "mof/mofGraphics.hpp"\r
-#include "mof/utilities.hpp"\r
-#include "mof/widgets.hpp"\r
-#include "mof/streams.hpp"\r
-#include <vector>\r
-#include <algorithm>\r
-#include <memory>\r
- \r
-using std::auto_ptr;\r
-\r
-namespace mof\r
-{\r
-namespace widget\r
-{\r
-//{{{ struct Impl\r
- struct Container::Impl\r
- {\r
- std::vector< std::shared_ptr<WidgetView> > children;\r
- auto_ptr<Layout> pLayout;\r
- \r
- \r
- Impl() : pLayout(NULL){}\r
- ~Impl(){}\r
- \r
- };\r
-//}}}\r
-//{{{ constructor\r
- Container::Container\r
- (\r
- const std::shared_ptr<WidgetView>& front ,\r
- const std::shared_ptr<WidgetView>& back ,\r
- const FactoryMethod<Layout>& layout\r
- )\r
- : \r
- m_pImpl( new Impl( ) ) \r
- {\r
- \r
- int length = (&back - &front) +1;\r
- for(int i = 0 ; i < length ; i++)\r
- {\r
- m_pImpl->children.push_back( (&front)[i] );\r
- }\r
-\r
- m_pImpl->pLayout = auto_ptr<Layout>( layout() );\r
- foreach(std::shared_ptr<WidgetView> pView, m_pImpl->children)\r
- {\r
- m_pImpl->pLayout->add(pView);\r
- }\r
- m_sizeStream << m_pImpl->pLayout->getPreferredSize();\r
- m_pImpl->pLayout->connect(this);\r
-\r
- for(int i = 0 ; i < length ; i++)\r
- {\r
- m_pImpl->children[i]->getColorStream() << getColorStream(); \r
- }\r
- }\r
-//}}}\r
-//{{{ destructor\r
- Container::~Container()\r
- {\r
- }\r
-//}}}\r
-//{{{ update\r
- void Container::update( )\r
- {\r
- m_positionStream.update( );\r
- m_sizeStream.update( );\r
- m_colorStream.update( );\r
- foreach(std::shared_ptr<WidgetView> value , m_pImpl->children)\r
- {\r
- value->update();\r
- }\r
- }\r
-//}}}\r
-//{{{ draw\r
- void Container::draw( ) const\r
- {\r
- foreach(std::shared_ptr<WidgetView> value , m_pImpl->children)\r
- {\r
- value->draw();\r
- }\r
-\r
- }\r
-//}}}\r
-//{{{ setVisible\r
- void Container::setVisible(bool visible)\r
- {\r
- foreach(std::shared_ptr<WidgetView> value , m_pImpl->children)\r
- {\r
- value->setVisible(visible);\r
- }\r
- }\r
-//}}}\r
-//{{{ show\r
- FrameNumber Container::show(bool imidiately) \r
- {\r
- unsigned int maxFrame = 0;\r
- foreach(std::shared_ptr<WidgetView> value , m_pImpl->children)\r
- {\r
- maxFrame = max(value->show(imidiately) , maxFrame);\r
- }\r
- return maxFrame;\r
- }\r
-//}}}\r
-//{{{ hide\r
- FrameNumber Container::hide(bool imidiately)\r
- {\r
- unsigned int maxFrame = 0;\r
- foreach(std::shared_ptr<WidgetView> value , m_pImpl->children)\r
- {\r
- maxFrame = max(value->hide(imidiately) , maxFrame);\r
- }\r
- return maxFrame;\r
-\r
- }\r
-//}}}\r
-//{{{ focus\r
- FrameNumber Container::focus(bool) \r
- {\r
- return 0;\r
- }\r
-//}}}\r
-//{{{ blur\r
- FrameNumber Container::blur(bool)\r
- {\r
- return 0;\r
- }\r
-//}}}\r
-//{{{ click\r
- FrameNumber Container::click(bool)\r
- {\r
- return 0;\r
- }\r
-//}}}\r
-//{{{ getPreferredSize\r
- mof::Vector2D Container::getPreferredSize() const\r
- {\r
- return m_pImpl->pLayout->getPreferredSize();\r
- }\r
-//}}}\r
-//{{{ getAt\r
- std::shared_ptr<WidgetView> Container::getAt(int index) const\r
- {\r
- return m_pImpl->children[index];\r
- }\r
-//}}}\r
-//{{{ getLength\r
- int Container::getLength() const\r
- {\r
- return m_pImpl->children.size();\r
- }\r
-//}}}\r
-//{{{ getAdjacentAsUp\r
- int Container::getAdjacencyAsUp(int index) const\r
- {\r
- return m_pImpl->pLayout->getAdjacencyAsUp(index);\r
- }\r
-//}}}\r
-//{{{ getAdjacentAsDown\r
- int Container::getAdjacencyAsDown(int index) const\r
- {\r
- return m_pImpl->pLayout->getAdjacencyAsDown(index);\r
- }\r
-//}}}\r
-//{{{ getAdjacentAsLeft\r
- int Container::getAdjacencyAsLeft(int index) const\r
- {\r
- return m_pImpl->pLayout->getAdjacencyAsLeft(index);\r
- }\r
-//}}}\r
-//{{{ getAdjacentAsRight\r
- int Container::getAdjacencyAsRight(int index) const\r
- {\r
- return m_pImpl->pLayout->getAdjacencyAsRight(index);\r
- }\r
-//}}}\r
-//{{{ add\r
- void Container::add(std::shared_ptr<WidgetView> pView)\r
- {\r
- //children.push_back( pView ); \r
- //m_pImpl->pLayout = adaptWidgetViewAndLayout( m_pImpl->children.begin( ) , m_pImpl->children.end( ) , layout);\r
- }\r
-//}}}\r
-\r
-}\r
-} // namespace mof\r
+#include <mof/widget/Container.hpp>
+#include "mof/mofGraphics.hpp"
+#include "mof/utilities.hpp"
+#include "mof/widgets.hpp"
+#include "mof/streams.hpp"
+#include <vector>
+#include <algorithm>
+#include <memory>
+
+using std::auto_ptr;
+
+namespace mof
+{
+namespace widget
+{
+//{{{ struct Impl
+ struct Container::Impl
+ {
+ std::vector< std::shared_ptr<WidgetView> > children;
+ auto_ptr<Layout> pLayout;
+
+
+ Impl() : pLayout(NULL){}
+ ~Impl(){}
+
+ };
+//}}}
+//{{{ constructor
+ Container::Container
+ (
+ const std::shared_ptr<WidgetView>& front ,
+ const std::shared_ptr<WidgetView>& back ,
+ const FactoryMethod<Layout>& layout
+ )
+ :
+ m_pImpl( new Impl( ) )
+ {
+
+ int length = (&back - &front) +1;
+ for(int i = 0 ; i < length ; i++)
+ {
+ m_pImpl->children.push_back( (&front)[i] );
+ }
+
+ m_pImpl->pLayout = auto_ptr<Layout>( layout() );
+ foreach(std::shared_ptr<WidgetView> pView, m_pImpl->children)
+ {
+ m_pImpl->pLayout->add(pView);
+ }
+ m_sizeStream << m_pImpl->pLayout->getPreferredSize();
+ m_pImpl->pLayout->connect(this);
+
+ for(int i = 0 ; i < length ; i++)
+ {
+ m_pImpl->children[i]->getColorStream() << getColorStream();
+ }
+ }
+//}}}
+//{{{ destructor
+ Container::~Container()
+ {
+ }
+//}}}
+//{{{ update
+ void Container::update( )
+ {
+ m_positionStream.update( );
+ m_sizeStream.update( );
+ m_colorStream.update( );
+ foreach(std::shared_ptr<WidgetView> value , m_pImpl->children)
+ {
+ value->update();
+ }
+ }
+//}}}
+//{{{ draw
+ void Container::draw( ) const
+ {
+ foreach(std::shared_ptr<WidgetView> value , m_pImpl->children)
+ {
+ value->draw();
+ }
+
+ }
+//}}}
+//{{{ setVisible
+ void Container::setVisible(bool visible)
+ {
+ foreach(std::shared_ptr<WidgetView> value , m_pImpl->children)
+ {
+ value->setVisible(visible);
+ }
+ }
+//}}}
+//{{{ show
+ FrameNumber Container::show(bool imidiately)
+ {
+ unsigned int maxFrame = 0;
+ foreach(std::shared_ptr<WidgetView> value , m_pImpl->children)
+ {
+ maxFrame = max(value->show(imidiately) , maxFrame);
+ }
+ return maxFrame;
+ }
+//}}}
+//{{{ hide
+ FrameNumber Container::hide(bool imidiately)
+ {
+ unsigned int maxFrame = 0;
+ foreach(std::shared_ptr<WidgetView> value , m_pImpl->children)
+ {
+ maxFrame = max(value->hide(imidiately) , maxFrame);
+ }
+ return maxFrame;
+
+ }
+//}}}
+//{{{ focus
+ FrameNumber Container::focus(bool)
+ {
+ return 0;
+ }
+//}}}
+//{{{ blur
+ FrameNumber Container::blur(bool)
+ {
+ return 0;
+ }
+//}}}
+//{{{ click
+ FrameNumber Container::click(bool)
+ {
+ return 0;
+ }
+//}}}
+//{{{ getPreferredSize
+ mof::Vector2D Container::getPreferredSize() const
+ {
+ return m_pImpl->pLayout->getPreferredSize();
+ }
+//}}}
+//{{{ getAt
+ std::shared_ptr<WidgetView> Container::getAt(int index) const
+ {
+ return m_pImpl->children[index];
+ }
+//}}}
+//{{{ getLength
+ int Container::getLength() const
+ {
+ return m_pImpl->children.size();
+ }
+//}}}
+//{{{ getAdjacentAsUp
+ int Container::getAdjacencyAsUp(int index) const
+ {
+ return m_pImpl->pLayout->getAdjacencyAsUp(index);
+ }
+//}}}
+//{{{ getAdjacentAsDown
+ int Container::getAdjacencyAsDown(int index) const
+ {
+ return m_pImpl->pLayout->getAdjacencyAsDown(index);
+ }
+//}}}
+//{{{ getAdjacentAsLeft
+ int Container::getAdjacencyAsLeft(int index) const
+ {
+ return m_pImpl->pLayout->getAdjacencyAsLeft(index);
+ }
+//}}}
+//{{{ getAdjacentAsRight
+ int Container::getAdjacencyAsRight(int index) const
+ {
+ return m_pImpl->pLayout->getAdjacencyAsRight(index);
+ }
+//}}}
+//{{{ add
+ void Container::add(std::shared_ptr<WidgetView> pView)
+ {
+ //children.push_back( pView );
+ //m_pImpl->pLayout = adaptWidgetViewAndLayout( m_pImpl->children.begin( ) , m_pImpl->children.end( ) , layout);
+ }
+//}}}
+
+}
+} // namespace mof
-#pragma once\r
-#include "mof/widget/WidgetView.hpp"\r
-#include <mof/widget/Layout.hpp>\r
-#include "mof/FactoryMethod.hpp"\r
-#include "mof/graphics/utilities.hpp"\r
-#include "mof/tstring.hpp"\r
-#include <memory>\r
-\r
-\r
-\r
-namespace mof\r
-{\r
- class Font;\r
-\r
-namespace widget\r
-{\r
-\r
- class Container\r
- : \r
- public WidgetView\r
- {\r
- public:\r
- \r
- Container\r
- (\r
- const std::shared_ptr<WidgetView>& front ,\r
- const std::shared_ptr<WidgetView>& back ,\r
- const FactoryMethod<Layout>& layout\r
- );\r
- virtual ~Container( );\r
-\r
- virtual FrameNumber show( bool imidiately = false );\r
- virtual FrameNumber hide( bool imidiately = false );\r
- virtual FrameNumber focus( bool imidiately = false );\r
- virtual FrameNumber blur( bool imidiately = false );\r
- virtual FrameNumber click( bool imidiately = false );\r
- virtual void update( );\r
- virtual void draw( ) const;\r
- virtual void setVisible(bool visible);\r
- virtual mof::Vector2D getPreferredSize() const;\r
- std::shared_ptr<WidgetView> getAt(int index) const;\r
- int getLength() const;\r
- int getAdjacencyAsUp(int index) const;\r
- int getAdjacencyAsDown(int index) const;\r
- int getAdjacencyAsLeft(int index) const;\r
- int getAdjacencyAsRight(int index) const;\r
- void add(std::shared_ptr<WidgetView> pView);\r
-\r
- private:\r
- struct Impl;\r
- std::unique_ptr<Impl> m_pImpl;\r
- \r
- };\r
-\r
-}\r
-}\r
+#pragma once
+#include "mof/widget/WidgetView.hpp"
+#include <mof/widget/Layout.hpp>
+#include "mof/FactoryMethod.hpp"
+#include "mof/graphics/utilities.hpp"
+#include "mof/tstring.hpp"
+#include <memory>
+
+
+
+namespace mof
+{
+ class Font;
+
+namespace widget
+{
+
+ class Container
+ :
+ public WidgetView
+ {
+ public:
+
+ Container
+ (
+ const std::shared_ptr<WidgetView>& front ,
+ const std::shared_ptr<WidgetView>& back ,
+ const FactoryMethod<Layout>& layout
+ );
+ virtual ~Container( );
+
+ virtual FrameNumber show( bool imidiately = false );
+ virtual FrameNumber hide( bool imidiately = false );
+ virtual FrameNumber focus( bool imidiately = false );
+ virtual FrameNumber blur( bool imidiately = false );
+ virtual FrameNumber click( bool imidiately = false );
+ virtual void update( );
+ virtual void draw( ) const;
+ virtual void setVisible(bool visible);
+ virtual mof::Vector2D getPreferredSize() const;
+ std::shared_ptr<WidgetView> getAt(int index) const;
+ int getLength() const;
+ int getAdjacencyAsUp(int index) const;
+ int getAdjacencyAsDown(int index) const;
+ int getAdjacencyAsLeft(int index) const;
+ int getAdjacencyAsRight(int index) const;
+ void add(std::shared_ptr<WidgetView> pView);
+
+ private:
+ struct Impl;
+ std::unique_ptr<Impl> m_pImpl;
+
+ };
+
+}
+}
-#include "mof/widget/Effect.hpp"\r
-#include <map>\r
-#include "mof/Sprite.hpp"\r
-#include "mof/Drawable.hpp"\r
-#include "mof/utilities.hpp"\r
-#include <stdexcept>\r
-\r
-typedef std::map<mof::tstring , mof::Sprite*> SpriteMap;\r
-typedef std::pair<mof::tstring , mof::Sprite*> SpriteMapPair;\r
-typedef std::map<mof::tstring , mof::Drawable*> DrawableMap;\r
-typedef std::pair<mof::tstring , mof::Drawable*> DrawableMapPair;\r
-\r
-\r
-struct mof::Effect::Impl\r
-{\r
- SpriteMap spriteMap;\r
- DrawableMap drawableMap;\r
-\r
- Impl(){\r
-\r
- }\r
-\r
- ~Impl(){\r
- deleteAll();\r
- }\r
-\r
- void deleteAll(){\r
- foreach(DrawableMapPair pair , drawableMap){\r
- delete pair.second;\r
- }\r
- drawableMap.clear();\r
-\r
- foreach(SpriteMapPair pair , spriteMap){\r
- delete pair.second;\r
- }\r
- spriteMap.clear();\r
- }\r
-};\r
-\r
-\r
-mof::Effect::Effect()\r
-: m_pImpl(new Impl())\r
-{\r
-}\r
-\r
-mof::Effect::~Effect(){\r
-}\r
-\r
-mof::Sprite* mof::Effect::getSpriteByName(const mof::tstring &name) {\r
- SpriteMap::iterator result = m_pImpl->spriteMap.find(name);\r
- if(result == m_pImpl->spriteMap.end())throw std::invalid_argument(name + "is not exists");\r
- return result->second;\r
-}\r
-\r
-void mof::Effect::addSprite(const mof::tstring& name , mof::Sprite* pSprite){\r
- SpriteMap::iterator result = m_pImpl->spriteMap.find(name);\r
- if(result != m_pImpl->spriteMap.end())throw std::invalid_argument(name + "is already exists");\r
- m_pImpl->spriteMap.insert(SpriteMapPair(name , pSprite));\r
-}\r
- \r
-void mof::Effect::addDrawable( const mof::tstring& name , mof::Drawable* pDrawable )\r
-{\r
- DrawableMap::iterator result = m_pImpl->drawableMap.find(name);\r
- if(result != m_pImpl->drawableMap.end())throw std::invalid_argument(name + "is already exists");\r
- m_pImpl->drawableMap.insert(DrawableMapPair(name , pDrawable));\r
-}\r
-\r
-void mof::Effect::remove(const mof::tstring& name ){\r
- {\r
- SpriteMap::iterator result = m_pImpl->spriteMap.find(name);\r
- if(result != m_pImpl->spriteMap.end())\r
- {\r
- m_pImpl->spriteMap.erase(name);\r
- return;\r
- }\r
- }\r
- {\r
- DrawableMap::iterator result = m_pImpl->drawableMap.find(name);\r
- if(result != m_pImpl->drawableMap.end())\r
- {\r
- m_pImpl->drawableMap.erase(name);\r
- return;\r
- }\r
- }\r
- throw std::invalid_argument(name + "is not exists");\r
-}\r
-\r
-void mof::Effect::deleteAll(){\r
- m_pImpl->deleteAll();\r
-}\r
-\r
-void mof::Effect::draw() const\r
-{\r
- foreach(DrawableMapPair pair , m_pImpl->drawableMap){\r
- pair.second->draw();\r
- }\r
- foreach(SpriteMapPair pair , m_pImpl->spriteMap){\r
- pair.second->draw();\r
- }\r
-}\r
-\r
-\r
-void mof::Effect::update(){\r
- foreach(SpriteMapPair pair , m_pImpl->spriteMap){\r
- pair.second->update();\r
- }\r
-}\r
-\r
-\r
+#include "mof/widget/Effect.hpp"
+#include <map>
+#include "mof/Sprite.hpp"
+#include "mof/Drawable.hpp"
+#include "mof/utilities.hpp"
+#include <stdexcept>
+
+typedef std::map<mof::tstring , mof::Sprite*> SpriteMap;
+typedef std::pair<mof::tstring , mof::Sprite*> SpriteMapPair;
+typedef std::map<mof::tstring , mof::Drawable*> DrawableMap;
+typedef std::pair<mof::tstring , mof::Drawable*> DrawableMapPair;
+
+
+struct mof::Effect::Impl
+{
+ SpriteMap spriteMap;
+ DrawableMap drawableMap;
+
+ Impl(){
+
+ }
+
+ ~Impl(){
+ deleteAll();
+ }
+
+ void deleteAll(){
+ foreach(DrawableMapPair pair , drawableMap){
+ delete pair.second;
+ }
+ drawableMap.clear();
+
+ foreach(SpriteMapPair pair , spriteMap){
+ delete pair.second;
+ }
+ spriteMap.clear();
+ }
+};
+
+
+mof::Effect::Effect()
+: m_pImpl(new Impl())
+{
+}
+
+mof::Effect::~Effect(){
+}
+
+mof::Sprite* mof::Effect::getSpriteByName(const mof::tstring &name) {
+ SpriteMap::iterator result = m_pImpl->spriteMap.find(name);
+ if(result == m_pImpl->spriteMap.end())throw std::invalid_argument(name + "is not exists");
+ return result->second;
+}
+
+void mof::Effect::addSprite(const mof::tstring& name , mof::Sprite* pSprite){
+ SpriteMap::iterator result = m_pImpl->spriteMap.find(name);
+ if(result != m_pImpl->spriteMap.end())throw std::invalid_argument(name + "is already exists");
+ m_pImpl->spriteMap.insert(SpriteMapPair(name , pSprite));
+}
+
+void mof::Effect::addDrawable( const mof::tstring& name , mof::Drawable* pDrawable )
+{
+ DrawableMap::iterator result = m_pImpl->drawableMap.find(name);
+ if(result != m_pImpl->drawableMap.end())throw std::invalid_argument(name + "is already exists");
+ m_pImpl->drawableMap.insert(DrawableMapPair(name , pDrawable));
+}
+
+void mof::Effect::remove(const mof::tstring& name ){
+ {
+ SpriteMap::iterator result = m_pImpl->spriteMap.find(name);
+ if(result != m_pImpl->spriteMap.end())
+ {
+ m_pImpl->spriteMap.erase(name);
+ return;
+ }
+ }
+ {
+ DrawableMap::iterator result = m_pImpl->drawableMap.find(name);
+ if(result != m_pImpl->drawableMap.end())
+ {
+ m_pImpl->drawableMap.erase(name);
+ return;
+ }
+ }
+ throw std::invalid_argument(name + "is not exists");
+}
+
+void mof::Effect::deleteAll(){
+ m_pImpl->deleteAll();
+}
+
+void mof::Effect::draw() const
+{
+ foreach(DrawableMapPair pair , m_pImpl->drawableMap){
+ pair.second->draw();
+ }
+ foreach(SpriteMapPair pair , m_pImpl->spriteMap){
+ pair.second->draw();
+ }
+}
+
+
+void mof::Effect::update(){
+ foreach(SpriteMapPair pair , m_pImpl->spriteMap){
+ pair.second->update();
+ }
+}
+
+
-#pragma once\r
-#include <boost/scoped_ptr.hpp>\r
-#include <boost/utility.hpp>\r
-#include "mof/tstring.hpp"\r
-\r
-namespace mof{\r
- class Sprite;\r
- class Drawable;\r
-\r
- class Effect : boost::noncopyable{\r
- struct Impl;\r
- boost::scoped_ptr<Impl> m_pImpl;\r
- public:\r
- Effect();\r
- ~Effect();\r
- mof::Sprite* getSpriteByName(const mof::tstring& name);\r
- void addSprite(const mof::tstring& name , mof::Sprite* pSprite);\r
- void addDrawable( const mof::tstring& name , mof::Drawable* pDrawable );\r
- void remove(const mof::tstring& name);\r
- void deleteAll();\r
-\r
- void draw() const;\r
- void update();\r
- };\r
-\r
- \r
-}\r
+#pragma once
+#include <boost/scoped_ptr.hpp>
+#include <boost/utility.hpp>
+#include "mof/tstring.hpp"
+
+namespace mof{
+ class Sprite;
+ class Drawable;
+
+ class Effect : boost::noncopyable{
+ struct Impl;
+ boost::scoped_ptr<Impl> m_pImpl;
+ public:
+ Effect();
+ ~Effect();
+ mof::Sprite* getSpriteByName(const mof::tstring& name);
+ void addSprite(const mof::tstring& name , mof::Sprite* pSprite);
+ void addDrawable( const mof::tstring& name , mof::Drawable* pDrawable );
+ void remove(const mof::tstring& name);
+ void deleteAll();
+
+ void draw() const;
+ void update();
+ };
+
+
+}
-#pragma once\r
-#include <mof/widgets.hpp>\r
-#include <mof/utilities.hpp>\r
-#include <mof/EventScheduler.hpp>\r
-#include <mof/streams.hpp>\r
-#include <boost/bind.hpp>\r
-#include <memory>\r
-#include <algorithm>\r
-\r
-using namespace mof::widget;\r
-using std::shared_ptr;\r
-using std::make_shared;\r
-using mof::lastOf;\r
-using std::vector;\r
-\r
-namespace\r
-{\r
-//{{{ FrameBehaviorSettings\r
- struct FrameBehaviorSettings\r
- {\r
- mof::Manipulator<mof::Vector2D>::Handler position;\r
- mof::Manipulator<mof::Vector2D>::Handler size;\r
- mof::Manipulator<mof::Color4f>::Handler color;\r
- //mof::Manipulator<bool>::Handler visible;\r
- mof::FrameNumber periodOfPosition;\r
- mof::FrameNumber periodOfSize;\r
- mof::FrameNumber periodOfColor;\r
-\r
- std::shared_ptr<FrameBehaviorSettings> clone()\r
- {\r
- std::shared_ptr<FrameBehaviorSettings> p = std::make_shared<FrameBehaviorSettings>();\r
- p->periodOfPosition = periodOfPosition;\r
- p->periodOfSize = periodOfSize;\r
- p->periodOfColor = periodOfColor;\r
- p->position = position;\r
- p->size = size;\r
- p->color = color;\r
- //p->visible = visible;\r
- return p;\r
- }\r
- };\r
-}\r
-//}}}\r
-namespace mof\r
-{\r
-namespace widget\r
-{\r
-//{{{ Impl\r
- struct Frame::Impl\r
- {\r
- shared_ptr<WidgetView> pCaptionView; \r
- shared_ptr<WidgetView> pContentBackgroundView; \r
- shared_ptr<WidgetView> pTitleBackgroundView; \r
- shared_ptr<Container> pContainer; \r
- FrameBehaviorSettings openSettings_; \r
- FrameBehaviorSettings closeSettings_; \r
- mof::ReferenceWrapper<mof::Vector2D> position_wrapper_;\r
- mof::ReferenceWrapper<mof::Vector2D> size_wrapper_;\r
- mof::ReferenceWrapper<mof::Color4f> color_wrapper_;\r
- mof::EventScheduler scheduler_;\r
- \r
-\r
- Impl()\r
- : \r
- pCaptionView( ) ,\r
- pContentBackgroundView( ) ,\r
- pContainer( )\r
- {\r
- openSettings_.periodOfPosition = 0; \r
- openSettings_.periodOfSize = 0; \r
- openSettings_.periodOfColor = 0; \r
- openSettings_.position = mof::makeConstantHandler(mof::Vector2D(0, 0));\r
- openSettings_.size = mof::makeConstantHandler(mof::Vector2D(0, 0));\r
- openSettings_.color = mof::makeConstantHandler(mof::Color4f(1, 1, 1, 1));\r
- \r
- closeSettings_.periodOfPosition = 0; \r
- closeSettings_.periodOfSize = 0; \r
- closeSettings_.periodOfColor = 0; \r
- closeSettings_.position = mof::makeConstantHandler(mof::Vector2D(0, 0));\r
- closeSettings_.size = mof::makeConstantHandler(mof::Vector2D(0, 0));\r
- closeSettings_.color = mof::makeConstantHandler(mof::Color4f(1, 1, 1, 1));\r
-\r
- }\r
- };\r
-//}}}\r
-//{{{ constructor\r
- Frame::Frame\r
- (\r
- const mof::tstring& caption,\r
- shared_ptr<WidgetView> pContentView,\r
- const FactoryMethod<WidgetView>& contentBackground, \r
- const FactoryMethod<WidgetView>& titleBackground,\r
- const FactoryMethod<AbstractTextCompiler>& text_compiler_factory\r
- )\r
- : m_pImpl(new Impl)\r
- {\r
- \r
- auto text_compiler = std::shared_ptr<AbstractTextCompiler>(text_compiler_factory());\r
- text_compiler->setBehaviorOnColor\r
- (\r
- AbstractTextCompiler::PAGE_CLOSE, \r
- mof::makeConstantHandler<mof::Color4f>(mof::Color4f(1, 1, 1, 1)),\r
- 0\r
- );\r
- m_pImpl->pCaptionView = text_compiler->compile(caption)->view();\r
- m_pImpl->pContentBackgroundView = shared_ptr<WidgetView>( contentBackground( ) );\r
- m_pImpl->pTitleBackgroundView = shared_ptr<WidgetView>( titleBackground( ) );\r
- \r
- {// タイトルバーの生成\r
- shared_ptr<WidgetView> children[] = {\r
- m_pImpl->pTitleBackgroundView ,\r
- make_shared<ClippingView>(m_pImpl->pCaptionView),// キャプションをクリッピング\r
- };\r
- m_pImpl->pContainer = make_shared<Container>( \r
- children[0] ,\r
- lastOf( children ) ,\r
- makeFactoryMethod<OverlapLayout>( m_pImpl->pCaptionView->getSizeStream().value() )\r
- );\r
- }\r
-\r
- std::shared_ptr<WidgetView> tmp; \r
- {\r
- shared_ptr<WidgetView> children[] = {\r
- m_pImpl->pContainer ,\r
- make_shared<ClippingView>(pContentView),// コンテンツをクリッピング\r
- };\r
- tmp = make_shared<Container>( \r
- children[0],\r
- lastOf(children),\r
- makeFactoryMethod<GridLayout>(GridLayout::VERTICAL, 0, 10)\r
- );\r
- }\r
-\r
- \r
- {\r
- shared_ptr<WidgetView> children[] = {\r
- m_pImpl->pContentBackgroundView ,\r
- tmp ,\r
- };\r
- m_pImpl->pContainer = make_shared<Container>( \r
- children[0] ,\r
- lastOf( children ) ,\r
- makeFactoryMethod<OverlapLayout>( tmp->getPreferredSize() )\r
- );\r
- m_pImpl->pContainer->setVisible(false);\r
- }\r
- m_pImpl->pContainer->getPositionStream() << m_pImpl->position_wrapper_.makeRef(mof::Vector2D(0, 0));\r
- m_pImpl->pContainer->getSizeStream() << m_pImpl->size_wrapper_.makeRef(mof::Vector2D(0, 0));\r
- m_pImpl->pContainer->getColorStream() << m_pImpl->color_wrapper_.makeRef(mof::Color4f(0, 1, 1, 1));\r
- }\r
-//}}}\r
-//{{{ destructor\r
- Frame::~Frame()\r
- {\r
- }\r
-//}}}\r
-//{{{ show\r
- mof::FrameNumber Frame::show(bool imidiately)\r
- {\r
- m_pImpl->scheduler_.clear();// hideのイベントが残っているなら消す\r
- m_pImpl->pContainer->setVisible(true);\r
- m_pImpl->position_wrapper_.replace(0, m_pImpl->pContainer->getPositionStream(), m_pImpl->openSettings_.position);\r
- m_pImpl->size_wrapper_.replace(0, m_pImpl->pContainer->getSizeStream(), m_pImpl->openSettings_.size);\r
- m_pImpl->color_wrapper_.replace(0, m_pImpl->pContainer->getColorStream(), m_pImpl->openSettings_.color);\r
- FrameNumber period = m_pImpl->pContainer->show(imidiately);\r
- period = max(period, m_pImpl->openSettings_.periodOfPosition);\r
- period = max(period, m_pImpl->openSettings_.periodOfSize);\r
- period = max(period, m_pImpl->openSettings_.periodOfColor);\r
- return period;\r
- }\r
-//}}}\r
-//{{{ hide\r
- mof::FrameNumber Frame::hide(bool imidiately)\r
- {\r
- m_pImpl->position_wrapper_.replace(0, m_pImpl->pContainer->getPositionStream(), m_pImpl->closeSettings_.position);\r
- m_pImpl->size_wrapper_.replace(0, m_pImpl->pContainer->getSizeStream(), m_pImpl->closeSettings_.size);\r
- m_pImpl->color_wrapper_.replace(0, m_pImpl->pContainer->getColorStream(), m_pImpl->closeSettings_.color);\r
- m_pImpl->pContainer->hide(imidiately);\r
- FrameNumber period = m_pImpl->closeSettings_.periodOfPosition;\r
- period = max(period, m_pImpl->closeSettings_.periodOfSize);\r
- period = max(period, m_pImpl->closeSettings_.periodOfColor);\r
- m_pImpl->scheduler_.addEvent(period, boost::bind(&WidgetView::setVisible, m_pImpl->pContainer.get(), false));\r
- return period;\r
- }\r
-//}}}\r
-//{{{ getView\r
- const std::shared_ptr<WidgetView> Frame::getView( ) const\r
- {\r
- return m_pImpl->pContainer;\r
- }\r
-//}}}\r
-//{{{ getView\r
- std::shared_ptr<WidgetView> Frame::getView( ) \r
- {\r
- return m_pImpl->pContainer;\r
- }\r
-//}}}\r
-//{{{ update\r
- void Frame::update()\r
- {\r
- m_pImpl->scheduler_.update();\r
- m_pImpl->pContainer->update();\r
- }\r
-//}}}\r
-//{{{ setCaption\r
- void Frame::setCaption(const tstring& title)\r
- {\r
- }\r
-//}}}\r
-//{{{ setBehaviorOnPosition\r
- void Frame::setBehaviorOnPosition(BehaviorTarget target, mof::Manipulator<mof::Vector2D>::Handler position, mof::FrameNumber period)\r
- {\r
- switch (target) {\r
- case Frame::FRAME_OPEN :\r
- m_pImpl->openSettings_.position = position;\r
- m_pImpl->openSettings_.periodOfPosition = period;\r
- break;\r
- case Frame::FRAME_CLOSE :\r
- m_pImpl->closeSettings_.position = position;\r
- m_pImpl->closeSettings_.periodOfPosition = period;\r
- break;\r
- }\r
- }\r
-//}}}\r
-//{{{ setBehaviorOnSize\r
- void Frame::setBehaviorOnSize(BehaviorTarget target, mof::Manipulator<mof::Vector2D>::Handler size, mof::FrameNumber period)\r
- {\r
- switch (target) {\r
- case Frame::FRAME_OPEN :\r
- m_pImpl->openSettings_.size = size;\r
- m_pImpl->openSettings_.periodOfSize = period;\r
- break;\r
- case Frame::FRAME_CLOSE :\r
- m_pImpl->closeSettings_.size = size;\r
- m_pImpl->closeSettings_.periodOfSize = period;\r
- break;\r
-\r
- }\r
- }\r
-//}}}\r
-//{{{ setBehaviorOnColor\r
- void Frame::setBehaviorOnColor(BehaviorTarget target, mof::Manipulator<mof::Color4f>::Handler color, mof::FrameNumber period)\r
- {\r
- switch (target) {\r
- case Frame::FRAME_OPEN :\r
- m_pImpl->openSettings_.color = color;\r
- m_pImpl->openSettings_.periodOfColor = period;\r
- break;\r
- case Frame::FRAME_CLOSE :\r
- m_pImpl->closeSettings_.color = color;\r
- m_pImpl->closeSettings_.periodOfColor = period;\r
- break;\r
- }\r
- }\r
-//}}}\r
-}\r
-}\r
+#pragma once
+#include <mof/widgets.hpp>
+#include <mof/utilities.hpp>
+#include <mof/EventScheduler.hpp>
+#include <mof/streams.hpp>
+#include <boost/bind.hpp>
+#include <memory>
+#include <algorithm>
+
+using namespace mof::widget;
+using std::shared_ptr;
+using std::make_shared;
+using mof::lastOf;
+using std::vector;
+
+namespace
+{
+//{{{ FrameBehaviorSettings
+ struct FrameBehaviorSettings
+ {
+ mof::Manipulator<mof::Vector2D>::Handler position;
+ mof::Manipulator<mof::Vector2D>::Handler size;
+ mof::Manipulator<mof::Color4f>::Handler color;
+ //mof::Manipulator<bool>::Handler visible;
+ mof::FrameNumber periodOfPosition;
+ mof::FrameNumber periodOfSize;
+ mof::FrameNumber periodOfColor;
+
+ std::shared_ptr<FrameBehaviorSettings> clone()
+ {
+ std::shared_ptr<FrameBehaviorSettings> p = std::make_shared<FrameBehaviorSettings>();
+ p->periodOfPosition = periodOfPosition;
+ p->periodOfSize = periodOfSize;
+ p->periodOfColor = periodOfColor;
+ p->position = position;
+ p->size = size;
+ p->color = color;
+ //p->visible = visible;
+ return p;
+ }
+ };
+}
+//}}}
+namespace mof
+{
+namespace widget
+{
+//{{{ Impl
+ struct Frame::Impl
+ {
+ shared_ptr<WidgetView> pCaptionView;
+ shared_ptr<WidgetView> pContentBackgroundView;
+ shared_ptr<WidgetView> pTitleBackgroundView;
+ shared_ptr<Container> pContainer;
+ FrameBehaviorSettings openSettings_;
+ FrameBehaviorSettings closeSettings_;
+ mof::ReferenceWrapper<mof::Vector2D> position_wrapper_;
+ mof::ReferenceWrapper<mof::Vector2D> size_wrapper_;
+ mof::ReferenceWrapper<mof::Color4f> color_wrapper_;
+ mof::EventScheduler scheduler_;
+
+
+ Impl()
+ :
+ pCaptionView( ) ,
+ pContentBackgroundView( ) ,
+ pContainer( )
+ {
+ openSettings_.periodOfPosition = 0;
+ openSettings_.periodOfSize = 0;
+ openSettings_.periodOfColor = 0;
+ openSettings_.position = mof::makeConstantHandler(mof::Vector2D(0, 0));
+ openSettings_.size = mof::makeConstantHandler(mof::Vector2D(0, 0));
+ openSettings_.color = mof::makeConstantHandler(mof::Color4f(1, 1, 1, 1));
+
+ closeSettings_.periodOfPosition = 0;
+ closeSettings_.periodOfSize = 0;
+ closeSettings_.periodOfColor = 0;
+ closeSettings_.position = mof::makeConstantHandler(mof::Vector2D(0, 0));
+ closeSettings_.size = mof::makeConstantHandler(mof::Vector2D(0, 0));
+ closeSettings_.color = mof::makeConstantHandler(mof::Color4f(1, 1, 1, 1));
+
+ }
+ };
+//}}}
+//{{{ constructor
+ Frame::Frame
+ (
+ const mof::tstring& caption,
+ shared_ptr<WidgetView> pContentView,
+ const FactoryMethod<WidgetView>& contentBackground,
+ const FactoryMethod<WidgetView>& titleBackground,
+ const FactoryMethod<AbstractTextCompiler>& text_compiler_factory
+ )
+ : m_pImpl(new Impl)
+ {
+
+ auto text_compiler = std::shared_ptr<AbstractTextCompiler>(text_compiler_factory());
+ text_compiler->setBehaviorOnColor
+ (
+ AbstractTextCompiler::PAGE_CLOSE,
+ mof::makeConstantHandler<mof::Color4f>(mof::Color4f(1, 1, 1, 1)),
+ 0
+ );
+ m_pImpl->pCaptionView = text_compiler->compile(caption)->view();
+ m_pImpl->pContentBackgroundView = shared_ptr<WidgetView>( contentBackground( ) );
+ m_pImpl->pTitleBackgroundView = shared_ptr<WidgetView>( titleBackground( ) );
+
+ {// タイトルバーの生成
+ shared_ptr<WidgetView> children[] = {
+ m_pImpl->pTitleBackgroundView ,
+ make_shared<ClippingView>(m_pImpl->pCaptionView),// キャプションをクリッピング
+ };
+ m_pImpl->pContainer = make_shared<Container>(
+ children[0] ,
+ lastOf( children ) ,
+ makeFactoryMethod<OverlapLayout>( m_pImpl->pCaptionView->getSizeStream().value() )
+ );
+ }
+
+ std::shared_ptr<WidgetView> tmp;
+ {
+ shared_ptr<WidgetView> children[] = {
+ m_pImpl->pContainer ,
+ make_shared<ClippingView>(pContentView),// コンテンツをクリッピング
+ };
+ tmp = make_shared<Container>(
+ children[0],
+ lastOf(children),
+ makeFactoryMethod<GridLayout>(GridLayout::VERTICAL, 0, 10)
+ );
+ }
+
+
+ {
+ shared_ptr<WidgetView> children[] = {
+ m_pImpl->pContentBackgroundView ,
+ tmp ,
+ };
+ m_pImpl->pContainer = make_shared<Container>(
+ children[0] ,
+ lastOf( children ) ,
+ makeFactoryMethod<OverlapLayout>( tmp->getPreferredSize() )
+ );
+ m_pImpl->pContainer->setVisible(false);
+ }
+ m_pImpl->pContainer->getPositionStream() << m_pImpl->position_wrapper_.makeRef(mof::Vector2D(0, 0));
+ m_pImpl->pContainer->getSizeStream() << m_pImpl->size_wrapper_.makeRef(mof::Vector2D(0, 0));
+ m_pImpl->pContainer->getColorStream() << m_pImpl->color_wrapper_.makeRef(mof::Color4f(0, 1, 1, 1));
+ }
+//}}}
+//{{{ destructor
+ Frame::~Frame()
+ {
+ }
+//}}}
+//{{{ show
+ mof::FrameNumber Frame::show(bool imidiately)
+ {
+ m_pImpl->scheduler_.clear();// hideのイベントが残っているなら消す
+ m_pImpl->pContainer->setVisible(true);
+ m_pImpl->position_wrapper_.replace(0, m_pImpl->pContainer->getPositionStream(), m_pImpl->openSettings_.position);
+ m_pImpl->size_wrapper_.replace(0, m_pImpl->pContainer->getSizeStream(), m_pImpl->openSettings_.size);
+ m_pImpl->color_wrapper_.replace(0, m_pImpl->pContainer->getColorStream(), m_pImpl->openSettings_.color);
+ FrameNumber period = m_pImpl->pContainer->show(imidiately);
+ period = max(period, m_pImpl->openSettings_.periodOfPosition);
+ period = max(period, m_pImpl->openSettings_.periodOfSize);
+ period = max(period, m_pImpl->openSettings_.periodOfColor);
+ return period;
+ }
+//}}}
+//{{{ hide
+ mof::FrameNumber Frame::hide(bool imidiately)
+ {
+ m_pImpl->position_wrapper_.replace(0, m_pImpl->pContainer->getPositionStream(), m_pImpl->closeSettings_.position);
+ m_pImpl->size_wrapper_.replace(0, m_pImpl->pContainer->getSizeStream(), m_pImpl->closeSettings_.size);
+ m_pImpl->color_wrapper_.replace(0, m_pImpl->pContainer->getColorStream(), m_pImpl->closeSettings_.color);
+ m_pImpl->pContainer->hide(imidiately);
+ FrameNumber period = m_pImpl->closeSettings_.periodOfPosition;
+ period = max(period, m_pImpl->closeSettings_.periodOfSize);
+ period = max(period, m_pImpl->closeSettings_.periodOfColor);
+ m_pImpl->scheduler_.addEvent(period, boost::bind(&WidgetView::setVisible, m_pImpl->pContainer.get(), false));
+ return period;
+ }
+//}}}
+//{{{ getView
+ const std::shared_ptr<WidgetView> Frame::getView( ) const
+ {
+ return m_pImpl->pContainer;
+ }
+//}}}
+//{{{ getView
+ std::shared_ptr<WidgetView> Frame::getView( )
+ {
+ return m_pImpl->pContainer;
+ }
+//}}}
+//{{{ update
+ void Frame::update()
+ {
+ m_pImpl->scheduler_.update();
+ m_pImpl->pContainer->update();
+ }
+//}}}
+//{{{ setCaption
+ void Frame::setCaption(const tstring& title)
+ {
+ }
+//}}}
+//{{{ setBehaviorOnPosition
+ void Frame::setBehaviorOnPosition(BehaviorTarget target, mof::Manipulator<mof::Vector2D>::Handler position, mof::FrameNumber period)
+ {
+ switch (target) {
+ case Frame::FRAME_OPEN :
+ m_pImpl->openSettings_.position = position;
+ m_pImpl->openSettings_.periodOfPosition = period;
+ break;
+ case Frame::FRAME_CLOSE :
+ m_pImpl->closeSettings_.position = position;
+ m_pImpl->closeSettings_.periodOfPosition = period;
+ break;
+ }
+ }
+//}}}
+//{{{ setBehaviorOnSize
+ void Frame::setBehaviorOnSize(BehaviorTarget target, mof::Manipulator<mof::Vector2D>::Handler size, mof::FrameNumber period)
+ {
+ switch (target) {
+ case Frame::FRAME_OPEN :
+ m_pImpl->openSettings_.size = size;
+ m_pImpl->openSettings_.periodOfSize = period;
+ break;
+ case Frame::FRAME_CLOSE :
+ m_pImpl->closeSettings_.size = size;
+ m_pImpl->closeSettings_.periodOfSize = period;
+ break;
+
+ }
+ }
+//}}}
+//{{{ setBehaviorOnColor
+ void Frame::setBehaviorOnColor(BehaviorTarget target, mof::Manipulator<mof::Color4f>::Handler color, mof::FrameNumber period)
+ {
+ switch (target) {
+ case Frame::FRAME_OPEN :
+ m_pImpl->openSettings_.color = color;
+ m_pImpl->openSettings_.periodOfColor = period;
+ break;
+ case Frame::FRAME_CLOSE :
+ m_pImpl->closeSettings_.color = color;
+ m_pImpl->closeSettings_.periodOfColor = period;
+ break;
+ }
+ }
+//}}}
+}
+}
-#pragma once\r
-#include <boost/scoped_ptr.hpp>\r
-#include <memory>\r
-#include <mof/widget/Widget.hpp>\r
-#include <mof/FactoryMethod.hpp>\r
-#include <mof/widget/AbstractTextCompiler.hpp>\r
-\r
-namespace mof\r
-{\r
- class Font;\r
-\r
-namespace widget\r
-{\r
-\r
- class Frame : public Widget\r
- {\r
- public:\r
- enum BehaviorTarget\r
- {\r
- FRAME_OPEN,\r
- FRAME_CLOSE,\r
- };\r
-\r
-\r
- Frame\r
- (\r
- const tstring& title ,\r
- std::shared_ptr<WidgetView> content ,\r
- const FactoryMethod<WidgetView>& contentBackground ,\r
- const FactoryMethod<WidgetView>& titleBackground,\r
- const FactoryMethod<AbstractTextCompiler>& text_compiler\r
- );\r
- virtual ~Frame();\r
- virtual FrameNumber show(bool imidiately = false);\r
- virtual FrameNumber hide(bool imidiately = false);\r
- virtual const std::shared_ptr<WidgetView> getView( ) const;\r
- virtual std::shared_ptr<WidgetView> getView( );\r
- virtual void update();\r
- \r
- void setCaption(const tstring& title);\r
- void setBehaviorOnPosition(BehaviorTarget, mof::Manipulator<mof::Vector2D>::Handler position, FrameNumber period);\r
- void setBehaviorOnSize(BehaviorTarget, mof::Manipulator<mof::Vector2D>::Handler size, FrameNumber period);\r
- void setBehaviorOnColor(BehaviorTarget, mof::Manipulator<mof::Color4f>::Handler color, FrameNumber period);\r
-\r
- \r
- protected:\r
- struct Impl;\r
- boost::scoped_ptr<Impl> m_pImpl;\r
-\r
- };\r
-\r
-\r
-} // namespace widget\r
-} // namespace mof\r
+#pragma once
+#include <boost/scoped_ptr.hpp>
+#include <memory>
+#include <mof/widget/Widget.hpp>
+#include <mof/FactoryMethod.hpp>
+#include <mof/widget/AbstractTextCompiler.hpp>
+
+namespace mof
+{
+ class Font;
+
+namespace widget
+{
+
+ class Frame : public Widget
+ {
+ public:
+ enum BehaviorTarget
+ {
+ FRAME_OPEN,
+ FRAME_CLOSE,
+ };
+
+
+ Frame
+ (
+ const tstring& title ,
+ std::shared_ptr<WidgetView> content ,
+ const FactoryMethod<WidgetView>& contentBackground ,
+ const FactoryMethod<WidgetView>& titleBackground,
+ const FactoryMethod<AbstractTextCompiler>& text_compiler
+ );
+ virtual ~Frame();
+ virtual FrameNumber show(bool imidiately = false);
+ virtual FrameNumber hide(bool imidiately = false);
+ virtual const std::shared_ptr<WidgetView> getView( ) const;
+ virtual std::shared_ptr<WidgetView> getView( );
+ virtual void update();
+
+ void setCaption(const tstring& title);
+ void setBehaviorOnPosition(BehaviorTarget, mof::Manipulator<mof::Vector2D>::Handler position, FrameNumber period);
+ void setBehaviorOnSize(BehaviorTarget, mof::Manipulator<mof::Vector2D>::Handler size, FrameNumber period);
+ void setBehaviorOnColor(BehaviorTarget, mof::Manipulator<mof::Color4f>::Handler color, FrameNumber period);
+
+
+ protected:
+ struct Impl;
+ boost::scoped_ptr<Impl> m_pImpl;
+
+ };
+
+
+} // namespace widget
+} // namespace mof
-#pragma once\r
-#include <boost/utility.hpp>\r
-#include <boost/scoped_ptr.hpp>\r
-#include <mof/tstring.hpp>\r
-#include <memory>\r
-#include <mof/widget/Frame.hpp>\r
-#include <mof/widget/WidgetView.hpp>\r
-#include <mof/FactoryMethod.hpp>\r
-\r
-namespace mof\r
-{\r
- class Font;\r
-namespace widget\r
-{\r
-\r
- class FrameBuilder : boost::noncopyable\r
- {\r
- public:\r
- FrameBuilder();\r
- ~FrameBuilder();\r
-\r
- void setTitle( const mof::tstring& title , const mof::Font& font );\r
- void setContentBackgroundView( const mof::FactoryMethod<WidgetView>& contentBackground );\r
- void setTitleBackgroundView( const mof::FactoryMethod<WidgetView>& titleBackground );\r
- std::auto_ptr<Frame> create( );\r
-\r
- private:\r
- struct Impl;\r
- boost::scoped_ptr<Impl> m_pImpl;\r
-\r
- }; // class FrameBuilder\r
-} // namespace widget\r
-} // namespace mof\r
+#pragma once
+#include <boost/utility.hpp>
+#include <boost/scoped_ptr.hpp>
+#include <mof/tstring.hpp>
+#include <memory>
+#include <mof/widget/Frame.hpp>
+#include <mof/widget/WidgetView.hpp>
+#include <mof/FactoryMethod.hpp>
+
+namespace mof
+{
+ class Font;
+namespace widget
+{
+
+ class FrameBuilder : boost::noncopyable
+ {
+ public:
+ FrameBuilder();
+ ~FrameBuilder();
+
+ void setTitle( const mof::tstring& title , const mof::Font& font );
+ void setContentBackgroundView( const mof::FactoryMethod<WidgetView>& contentBackground );
+ void setTitleBackgroundView( const mof::FactoryMethod<WidgetView>& titleBackground );
+ std::auto_ptr<Frame> create( );
+
+ private:
+ struct Impl;
+ boost::scoped_ptr<Impl> m_pImpl;
+
+ }; // class FrameBuilder
+} // namespace widget
+} // namespace mof
-#include <mof/widget/GridLayout.hpp>\r
-#include <mof/widget/WidgetView.hpp>\r
-#include <mof/widget/VerticalClipping.hpp>\r
-#include <mof/widget/HorizontalClipping.hpp>\r
-#include <mof/streams.hpp>\r
-#include <mof/utilities.hpp>\r
-#include "mof/ConsoleIO.hpp"\r
-#include <algorithm>\r
-#include <vector>\r
-#include <memory>\r
-\r
-using std::shared_ptr;\r
- \r
-\r
-//{{{ Impl\r
-struct mof::widget::GridLayout::Impl\r
-{\r
- \r
- mof::widget::GridLayout::Direction direction;\r
- int span , margin;\r
- int width , height;// preferredSize\r
- std::vector< shared_ptr<WidgetView> > views;\r
- std::vector<Vector2D> positions;\r
-\r
- Impl(Direction _direction , int span_ , int margin_ )\r
- : \r
- direction(_direction) , span(span_) , margin(margin_) ,\r
- width(0) , height(0)\r
- {}\r
- \r
-\r
- ~Impl()\r
- {\r
- }\r
-};\r
-//}}}\r
-//{{{ GridLayout\r
-mof::widget::GridLayout::GridLayout\r
-(\r
- Direction direction , int span , int margin\r
-)\r
-: m_pImpl( new Impl( direction , span , margin ) )\r
-{\r
-}\r
-//}}}\r
-//{{{ ~GridLayout\r
-mof::widget::GridLayout::~GridLayout( )\r
-{\r
-}\r
-//}}}\r
-//{{{ add\r
-void mof::widget::GridLayout::add(shared_ptr<WidgetView> pView)\r
-{\r
- mof::Vector2D size = pView->getPreferredSize();\r
- m_pImpl->views.push_back(pView);\r
- \r
- if(m_pImpl->direction == VERTICAL)\r
- {\r
- m_pImpl->positions.push_back( mof::Vector2D(0 , m_pImpl->height));\r
- if( !m_pImpl->views.empty( ) )m_pImpl->height += m_pImpl->margin;\r
- m_pImpl->width = m_pImpl->width < size.x \r
- ? mof::real2int(size.x) \r
- : m_pImpl->width;\r
- m_pImpl->height += mof::real2int(size.y);\r
- }\r
- else if(m_pImpl->direction == HORIZONTAL)\r
- {\r
- m_pImpl->positions.push_back( mof::Vector2D(m_pImpl->width , 0));\r
- if( !m_pImpl->views.empty( ) )m_pImpl->width += m_pImpl->margin;\r
- m_pImpl->width += mof::real2int(size.x);\r
- m_pImpl->height = m_pImpl->height < size.y \r
- ? mof::real2int(size.y) \r
- : m_pImpl->height;\r
- }\r
-}\r
-//}}}\r
-//{{{ getLength\r
-size_t mof::widget::GridLayout::getLength() const\r
-{\r
- return m_pImpl->positions.size();\r
-}\r
-//}}}\r
-//{{{ getPreferredSize\r
-mof::Vector2D mof::widget::GridLayout::getPreferredSize() const\r
-{\r
- return mof::Vector2D(m_pImpl->width , m_pImpl->height);\r
-}\r
-//}}}\r
-//{{{ connect\r
-void mof::widget::GridLayout::connect(WidgetView* pParentView) \r
-{\r
- size_t i = 0;\r
- if(m_pImpl->direction == VERTICAL)\r
- {\r
- float py = pParentView->getPositionStream().value().y + pParentView->getPreferredSize().y;\r
- foreach(WidgetView::ptr pView, m_pImpl->views) \r
- {\r
- pView->getPositionStream() << m_pImpl->positions[i++] << pParentView->getPositionStream();\r
- {\r
- // 幅は親のサイズに合わせる\r
- mof::Vector2D filter(1, 0);\r
- float cy = pView->getPositionStream().value().y + pView->getPreferredSize().y;\r
- float d = py - cy;// 親と子の終点の差\r
- pView->getSizeStream() \r
- << -pView->getPreferredSize()\r
- << mof::makeFilterHandler(pParentView->getSizeStream().toManipulator(), filter)//TODO この時点のフレームが非ゼロだと問題が起こるかも?\r
- << std::make_shared<VerticalClipping>(pParentView->getSizeStream().toManipulator(), pView->getPreferredSize().y, d);\r
- }\r
- }\r
- }\r
- else\r
- {\r
- float px = pParentView->getPositionStream().value().x + pParentView->getPreferredSize().x;\r
- foreach(WidgetView::ptr pView, m_pImpl->views) \r
- {\r
- pView->getPositionStream() << m_pImpl->positions[i++] << pParentView->getPositionStream();\r
- {\r
- // 高さは親のサイズに合わせる\r
- mof::Vector2D filter(0, 1);\r
- float cx = pView->getPositionStream().value().x + pView->getPreferredSize().x;\r
- float d = px - cx;// 親と子の終点の差\r
- pView->getSizeStream() \r
- << -pView->getPreferredSize()\r
- << mof::makeFilterHandler(pParentView->getSizeStream().toManipulator(), filter)//TODO この時点のフレームが非ゼロだと問題が起こるかも?\r
- << std::make_shared<HorizontalClipping>(pParentView->getSizeStream().toManipulator(), pView->getPreferredSize().x, d);\r
- }\r
-\r
- }\r
- }\r
-}\r
-//}}}\r
-//{{{ getAdjacencyAsUp\r
-int mof::widget::GridLayout::getAdjacencyAsUp(int index) const\r
-{\r
- if(m_pImpl->direction == VERTICAL)return mof::rotation_mod(index-1 , m_pImpl->positions.size());\r
- else return index;\r
-}\r
-//}}}\r
-//{{{ getAdjacencyAsDown\r
-int mof::widget::GridLayout::getAdjacencyAsDown(int index) const\r
-{\r
- if(m_pImpl->direction == VERTICAL)return mof::rotation_mod(index+1 , m_pImpl->positions.size());\r
- else return index;\r
-}\r
-//}}}\r
-//{{{ getAdjacencyAsLeft\r
-int mof::widget::GridLayout::getAdjacencyAsLeft(int index) const\r
-{\r
- if(m_pImpl->direction == HORIZONTAL)return mof::rotation_mod(index-1 , m_pImpl->positions.size());\r
- else return index;\r
-}\r
-//}}}\r
-//{{{ getAdjacencyAsRight\r
-int mof::widget::GridLayout::getAdjacencyAsRight(int index) const\r
-{\r
- if(m_pImpl->direction == HORIZONTAL)return mof::rotation_mod(index+1 , m_pImpl->positions.size());\r
- else return index;\r
-}\r
-//}}}\r
+#include <mof/widget/GridLayout.hpp>
+#include <mof/widget/WidgetView.hpp>
+#include <mof/widget/VerticalClipping.hpp>
+#include <mof/widget/HorizontalClipping.hpp>
+#include <mof/streams.hpp>
+#include <mof/utilities.hpp>
+#include "mof/ConsoleIO.hpp"
+#include <algorithm>
+#include <vector>
+#include <memory>
+
+using std::shared_ptr;
+
+
+//{{{ Impl
+struct mof::widget::GridLayout::Impl
+{
+
+ mof::widget::GridLayout::Direction direction;
+ int span , margin;
+ int width , height;// preferredSize
+ std::vector< shared_ptr<WidgetView> > views;
+ std::vector<Vector2D> positions;
+
+ Impl(Direction _direction , int span_ , int margin_ )
+ :
+ direction(_direction) , span(span_) , margin(margin_) ,
+ width(0) , height(0)
+ {}
+
+
+ ~Impl()
+ {
+ }
+};
+//}}}
+//{{{ GridLayout
+mof::widget::GridLayout::GridLayout
+(
+ Direction direction , int span , int margin
+)
+: m_pImpl( new Impl( direction , span , margin ) )
+{
+}
+//}}}
+//{{{ ~GridLayout
+mof::widget::GridLayout::~GridLayout( )
+{
+}
+//}}}
+//{{{ add
+void mof::widget::GridLayout::add(shared_ptr<WidgetView> pView)
+{
+ mof::Vector2D size = pView->getPreferredSize();
+ m_pImpl->views.push_back(pView);
+
+ if(m_pImpl->direction == VERTICAL)
+ {
+ m_pImpl->positions.push_back( mof::Vector2D(0 , m_pImpl->height));
+ if( !m_pImpl->views.empty( ) )m_pImpl->height += m_pImpl->margin;
+ m_pImpl->width = m_pImpl->width < size.x
+ ? mof::real2int(size.x)
+ : m_pImpl->width;
+ m_pImpl->height += mof::real2int(size.y);
+ }
+ else if(m_pImpl->direction == HORIZONTAL)
+ {
+ m_pImpl->positions.push_back( mof::Vector2D(m_pImpl->width , 0));
+ if( !m_pImpl->views.empty( ) )m_pImpl->width += m_pImpl->margin;
+ m_pImpl->width += mof::real2int(size.x);
+ m_pImpl->height = m_pImpl->height < size.y
+ ? mof::real2int(size.y)
+ : m_pImpl->height;
+ }
+}
+//}}}
+//{{{ getLength
+size_t mof::widget::GridLayout::getLength() const
+{
+ return m_pImpl->positions.size();
+}
+//}}}
+//{{{ getPreferredSize
+mof::Vector2D mof::widget::GridLayout::getPreferredSize() const
+{
+ return mof::Vector2D(m_pImpl->width , m_pImpl->height);
+}
+//}}}
+//{{{ connect
+void mof::widget::GridLayout::connect(WidgetView* pParentView)
+{
+ size_t i = 0;
+ if(m_pImpl->direction == VERTICAL)
+ {
+ float py = pParentView->getPositionStream().value().y + pParentView->getPreferredSize().y;
+ foreach(WidgetView::ptr pView, m_pImpl->views)
+ {
+ pView->getPositionStream() << m_pImpl->positions[i++] << pParentView->getPositionStream();
+ {
+ // 幅は親のサイズに合わせる
+ mof::Vector2D filter(1, 0);
+ float cy = pView->getPositionStream().value().y + pView->getPreferredSize().y;
+ float d = py - cy;// 親と子の終点の差
+ pView->getSizeStream()
+ << -pView->getPreferredSize()
+ << mof::makeFilterHandler(pParentView->getSizeStream().toManipulator(), filter)//TODO この時点のフレームが非ゼロだと問題が起こるかも?
+ << std::make_shared<VerticalClipping>(pParentView->getSizeStream().toManipulator(), pView->getPreferredSize().y, d);
+ }
+ }
+ }
+ else
+ {
+ float px = pParentView->getPositionStream().value().x + pParentView->getPreferredSize().x;
+ foreach(WidgetView::ptr pView, m_pImpl->views)
+ {
+ pView->getPositionStream() << m_pImpl->positions[i++] << pParentView->getPositionStream();
+ {
+ // 高さは親のサイズに合わせる
+ mof::Vector2D filter(0, 1);
+ float cx = pView->getPositionStream().value().x + pView->getPreferredSize().x;
+ float d = px - cx;// 親と子の終点の差
+ pView->getSizeStream()
+ << -pView->getPreferredSize()
+ << mof::makeFilterHandler(pParentView->getSizeStream().toManipulator(), filter)//TODO この時点のフレームが非ゼロだと問題が起こるかも?
+ << std::make_shared<HorizontalClipping>(pParentView->getSizeStream().toManipulator(), pView->getPreferredSize().x, d);
+ }
+
+ }
+ }
+}
+//}}}
+//{{{ getAdjacencyAsUp
+int mof::widget::GridLayout::getAdjacencyAsUp(int index) const
+{
+ if(m_pImpl->direction == VERTICAL)return mof::rotation_mod(index-1 , m_pImpl->positions.size());
+ else return index;
+}
+//}}}
+//{{{ getAdjacencyAsDown
+int mof::widget::GridLayout::getAdjacencyAsDown(int index) const
+{
+ if(m_pImpl->direction == VERTICAL)return mof::rotation_mod(index+1 , m_pImpl->positions.size());
+ else return index;
+}
+//}}}
+//{{{ getAdjacencyAsLeft
+int mof::widget::GridLayout::getAdjacencyAsLeft(int index) const
+{
+ if(m_pImpl->direction == HORIZONTAL)return mof::rotation_mod(index-1 , m_pImpl->positions.size());
+ else return index;
+}
+//}}}
+//{{{ getAdjacencyAsRight
+int mof::widget::GridLayout::getAdjacencyAsRight(int index) const
+{
+ if(m_pImpl->direction == HORIZONTAL)return mof::rotation_mod(index+1 , m_pImpl->positions.size());
+ else return index;
+}
+//}}}
-#pragma once\r
-#include <memory>\r
-#include <mof/widget/Layout.hpp>\r
-\r
-namespace mof\r
-{\r
-namespace widget\r
-{\r
-\r
- class GridLayout : public Layout\r
- {\r
-\r
- public:\r
- enum Direction\r
- {\r
- HORIZONTAL , VERTICAL\r
- };\r
-\r
- GridLayout(Direction direction , int span , int margin = 0 );\r
- virtual ~GridLayout();\r
- virtual void add(std::shared_ptr<WidgetView> pView);\r
- virtual Vector2D getPreferredSize() const;\r
- virtual void connect(WidgetView* pParentView);\r
- virtual size_t getLength( ) const;\r
- virtual int getAdjacencyAsUp(int index) const;\r
- virtual int getAdjacencyAsDown(int index) const;\r
- virtual int getAdjacencyAsLeft(int index) const;\r
- virtual int getAdjacencyAsRight(int index) const;\r
-\r
- private:\r
- struct Impl;\r
- std::unique_ptr<Impl> m_pImpl;\r
- };\r
-\r
-}\r
-} // namepsace mof\r
-\r
+#pragma once
+#include <memory>
+#include <mof/widget/Layout.hpp>
+
+namespace mof
+{
+namespace widget
+{
+
+ class GridLayout : public Layout
+ {
+
+ public:
+ enum Direction
+ {
+ HORIZONTAL , VERTICAL
+ };
+
+ GridLayout(Direction direction , int span , int margin = 0 );
+ virtual ~GridLayout();
+ virtual void add(std::shared_ptr<WidgetView> pView);
+ virtual Vector2D getPreferredSize() const;
+ virtual void connect(WidgetView* pParentView);
+ virtual size_t getLength( ) const;
+ virtual int getAdjacencyAsUp(int index) const;
+ virtual int getAdjacencyAsDown(int index) const;
+ virtual int getAdjacencyAsLeft(int index) const;
+ virtual int getAdjacencyAsRight(int index) const;
+
+ private:
+ struct Impl;
+ std::unique_ptr<Impl> m_pImpl;
+ };
+
+}
+} // namepsace mof
+
-#include <mof/widget/ImageView.hpp>\r
-#include "mof/mofGraphics.hpp"\r
-#include "mof/Font.hpp"\r
-#include "mof/Sprite.hpp"\r
-#include "mof/widget/Effect.hpp"\r
-#include "mof/utilities.hpp"\r
-#include "mof/widgets.hpp"\r
-#include "mof/streams.hpp"\r
- \r
-namespace mof\r
-{\r
-namespace widget\r
-{\r
-//{{{ struct Impl\r
- struct ImageView::Impl\r
- {\r
- Sprite* pSprite;\r
- mof::Vector2D preferredSize_;\r
- \r
- Impl( )\r
- : pSprite( NULL )\r
- {\r
- }\r
- \r
- ~Impl()\r
- {\r
- delete pSprite;\r
- }\r
- \r
- };\r
-//}}}\r
-//{{{ constructor\r
- ImageView::ImageView\r
- (\r
- const tstring& caption ,\r
- const Font& font\r
- )\r
- : \r
- m_pImpl( new Impl ) \r
- {\r
- { // 画像の生成\r
- m_pImpl->pSprite = Sprite::createTextSprite( font , caption );\r
- m_pImpl->pSprite->getPositionStream( ) << getPositionStream( ); \r
- m_pImpl->pSprite->getColorStream( ) << getColorStream( ); \r
- m_pImpl->preferredSize_ = m_pImpl->pSprite->getSizeStream().value();\r
- getSizeStream() << m_pImpl->preferredSize_;\r
- }\r
- }\r
-//}}}\r
-//{{{ constructor\r
- ImageView::ImageView\r
- (\r
- const TextureHandler& texture ,\r
- const Rectangle<float>& tRect\r
- )\r
- : \r
- m_pImpl( new Impl( ) ) \r
- {\r
- { // 画像の生成\r
- m_pImpl->pSprite = new Sprite( texture , tRect );\r
- m_pImpl->pSprite->getPositionStream( ) << getPositionStream( ); \r
- m_pImpl->pSprite->getColorStream( ) << getColorStream( ); \r
- m_pImpl->preferredSize_ = m_pImpl->pSprite->getSizeStream().value();\r
- getSizeStream() << m_pImpl->preferredSize_;\r
- }\r
- \r
- }\r
-//}}}\r
-//{{{ constructor\r
- ImageView::ImageView\r
- (\r
- const TextureHandler& texture \r
- )\r
- : \r
- m_pImpl( new Impl( ) ) \r
- {\r
- { // 画像の生成\r
- m_pImpl->pSprite = new Sprite( texture , Rectangle<float>(0 , 0 , 1 , 1) );\r
- m_pImpl->pSprite->getPositionStream( ) << getPositionStream( ); \r
- m_pImpl->pSprite->getColorStream( ) << getColorStream( ); \r
- m_pImpl->preferredSize_ = m_pImpl->pSprite->getSizeStream().value();\r
- getSizeStream() << m_pImpl->preferredSize_;\r
- }\r
- \r
- }\r
-//}}}\r
-//{{{ destructor\r
- ImageView::~ImageView()\r
- {\r
- }\r
-//}}}\r
-//{{{ update\r
- void ImageView::update( )\r
- {\r
- m_positionStream.update( );\r
- m_sizeStream.update( );\r
- m_colorStream.update( );\r
- m_pImpl->pSprite->update();\r
- }\r
-//}}}\r
-//{{{ draw\r
- void ImageView::draw( ) const\r
- {\r
- m_pImpl->pSprite->draw( );\r
- }\r
-//}}}\r
-//{{{ setVisible\r
- void ImageView::setVisible(bool visible)\r
- {\r
- m_pImpl->pSprite->setVisible(visible);\r
- }\r
-//}}}\r
-//{{{ show\r
- FrameNumber ImageView::show(bool) \r
- {\r
- return 0;\r
- }\r
-//}}}\r
-//{{{ hide\r
- FrameNumber ImageView::hide(bool)\r
- {\r
- return 0;\r
- }\r
-//}}}\r
-//{{{ focus\r
- FrameNumber ImageView::focus(bool) \r
- {\r
- return 0;\r
- }\r
-//}}}\r
-//{{{ blur\r
- FrameNumber ImageView::blur(bool imidiately)\r
- {\r
- return 0;\r
- }\r
-//}}}\r
-//{{{ click\r
- FrameNumber ImageView::click(bool)\r
- {\r
- return 0;\r
- }\r
-//}}}\r
-//{{{ getPreferredSize\r
- mof::Vector2D ImageView::getPreferredSize() const\r
- {\r
- return m_pImpl->preferredSize_;\r
- }\r
-//}}}\r
-}\r
-} // namespace mof\r
+#include <mof/widget/ImageView.hpp>
+#include "mof/mofGraphics.hpp"
+#include "mof/Font.hpp"
+#include "mof/Sprite.hpp"
+#include "mof/widget/Effect.hpp"
+#include "mof/utilities.hpp"
+#include "mof/widgets.hpp"
+#include "mof/streams.hpp"
+
+namespace mof
+{
+namespace widget
+{
+//{{{ struct Impl
+ struct ImageView::Impl
+ {
+ Sprite* pSprite;
+ mof::Vector2D preferredSize_;
+
+ Impl( )
+ : pSprite( NULL )
+ {
+ }
+
+ ~Impl()
+ {
+ delete pSprite;
+ }
+
+ };
+//}}}
+//{{{ constructor
+ ImageView::ImageView
+ (
+ const tstring& caption ,
+ const Font& font
+ )
+ :
+ m_pImpl( new Impl )
+ {
+ { // 画像の生成
+ m_pImpl->pSprite = Sprite::createTextSprite( font , caption );
+ m_pImpl->pSprite->getPositionStream( ) << getPositionStream( );
+ m_pImpl->pSprite->getColorStream( ) << getColorStream( );
+ m_pImpl->preferredSize_ = m_pImpl->pSprite->getSizeStream().value();
+ getSizeStream() << m_pImpl->preferredSize_;
+ }
+ }
+//}}}
+//{{{ constructor
+ ImageView::ImageView
+ (
+ const TextureHandler& texture ,
+ const Rectangle<float>& tRect
+ )
+ :
+ m_pImpl( new Impl( ) )
+ {
+ { // 画像の生成
+ m_pImpl->pSprite = new Sprite( texture , tRect );
+ m_pImpl->pSprite->getPositionStream( ) << getPositionStream( );
+ m_pImpl->pSprite->getColorStream( ) << getColorStream( );
+ m_pImpl->preferredSize_ = m_pImpl->pSprite->getSizeStream().value();
+ getSizeStream() << m_pImpl->preferredSize_;
+ }
+
+ }
+//}}}
+//{{{ constructor
+ ImageView::ImageView
+ (
+ const TextureHandler& texture
+ )
+ :
+ m_pImpl( new Impl( ) )
+ {
+ { // 画像の生成
+ m_pImpl->pSprite = new Sprite( texture , Rectangle<float>(0 , 0 , 1 , 1) );
+ m_pImpl->pSprite->getPositionStream( ) << getPositionStream( );
+ m_pImpl->pSprite->getColorStream( ) << getColorStream( );
+ m_pImpl->preferredSize_ = m_pImpl->pSprite->getSizeStream().value();
+ getSizeStream() << m_pImpl->preferredSize_;
+ }
+
+ }
+//}}}
+//{{{ destructor
+ ImageView::~ImageView()
+ {
+ }
+//}}}
+//{{{ update
+ void ImageView::update( )
+ {
+ m_positionStream.update( );
+ m_sizeStream.update( );
+ m_colorStream.update( );
+ m_pImpl->pSprite->update();
+ }
+//}}}
+//{{{ draw
+ void ImageView::draw( ) const
+ {
+ m_pImpl->pSprite->draw( );
+ }
+//}}}
+//{{{ setVisible
+ void ImageView::setVisible(bool visible)
+ {
+ m_pImpl->pSprite->setVisible(visible);
+ }
+//}}}
+//{{{ show
+ FrameNumber ImageView::show(bool)
+ {
+ return 0;
+ }
+//}}}
+//{{{ hide
+ FrameNumber ImageView::hide(bool)
+ {
+ return 0;
+ }
+//}}}
+//{{{ focus
+ FrameNumber ImageView::focus(bool)
+ {
+ return 0;
+ }
+//}}}
+//{{{ blur
+ FrameNumber ImageView::blur(bool imidiately)
+ {
+ return 0;
+ }
+//}}}
+//{{{ click
+ FrameNumber ImageView::click(bool)
+ {
+ return 0;
+ }
+//}}}
+//{{{ getPreferredSize
+ mof::Vector2D ImageView::getPreferredSize() const
+ {
+ return m_pImpl->preferredSize_;
+ }
+//}}}
+}
+} // namespace mof
-#pragma once\r
-#include "mof/widget/WidgetView.hpp"\r
-#include "mof/graphics/utilities.hpp"\r
-#include "mof/tstring.hpp"\r
-#include <boost/scoped_ptr.hpp>\r
-\r
-namespace mof\r
-{\r
- class Font;\r
-\r
-namespace widget\r
-{\r
-\r
- class ImageView \r
- : \r
- public WidgetView\r
- {\r
- public:\r
- ImageView( const tstring& caption , const Font& font );\r
- ImageView( const TextureHandler& texture , const Rectangle<float>& tRect );\r
- ImageView( const TextureHandler& texture );\r
- virtual ~ImageView( );\r
-\r
- virtual FrameNumber show( bool imidiately = false );\r
- virtual FrameNumber hide( bool imidiately = false );\r
- virtual FrameNumber focus( bool imidiately = false );\r
- virtual FrameNumber blur( bool imidiately = false );\r
- virtual FrameNumber click( bool imidiately = false );\r
- virtual mof::Vector2D getPreferredSize() const;\r
- virtual void update( );\r
- virtual void draw( ) const;\r
- virtual void setVisible(bool visible);\r
-\r
- private:\r
- struct Impl;\r
- boost::scoped_ptr<Impl> m_pImpl;\r
- \r
- };\r
-\r
-}\r
-}\r
+#pragma once
+#include "mof/widget/WidgetView.hpp"
+#include "mof/graphics/utilities.hpp"
+#include "mof/tstring.hpp"
+#include <boost/scoped_ptr.hpp>
+
+namespace mof
+{
+ class Font;
+
+namespace widget
+{
+
+ class ImageView
+ :
+ public WidgetView
+ {
+ public:
+ ImageView( const tstring& caption , const Font& font );
+ ImageView( const TextureHandler& texture , const Rectangle<float>& tRect );
+ ImageView( const TextureHandler& texture );
+ virtual ~ImageView( );
+
+ virtual FrameNumber show( bool imidiately = false );
+ virtual FrameNumber hide( bool imidiately = false );
+ virtual FrameNumber focus( bool imidiately = false );
+ virtual FrameNumber blur( bool imidiately = false );
+ virtual FrameNumber click( bool imidiately = false );
+ virtual mof::Vector2D getPreferredSize() const;
+ virtual void update( );
+ virtual void draw( ) const;
+ virtual void setVisible(bool visible);
+
+ private:
+ struct Impl;
+ boost::scoped_ptr<Impl> m_pImpl;
+
+ };
+
+}
+}
-#pragma once\r
-\r
-#include "mof/Vector2D.hpp"\r
-#include "mof/Rectangle.hpp"\r
-\r
-namespace mof\r
-{\r
-namespace widget\r
-{\r
- class WidgetView;\r
-\r
- class Layout\r
- {\r
-\r
- public:\r
- virtual ~Layout(){}\r
- virtual void add(std::shared_ptr<WidgetView> pView) = 0;\r
- virtual Vector2D getPreferredSize() const = 0;\r
- virtual void connect( WidgetView* pParentView) = 0;\r
- virtual size_t getLength() const = 0;\r
- virtual int getAdjacencyAsUp(int index) const = 0;\r
- virtual int getAdjacencyAsDown(int index) const = 0;\r
- virtual int getAdjacencyAsLeft(int index) const = 0;\r
- virtual int getAdjacencyAsRight(int index) const = 0;\r
- };\r
-}\r
-}\r
+#pragma once
+
+#include "mof/Vector2D.hpp"
+#include "mof/Rectangle.hpp"
+
+namespace mof
+{
+namespace widget
+{
+ class WidgetView;
+
+ class Layout
+ {
+
+ public:
+ virtual ~Layout(){}
+ virtual void add(std::shared_ptr<WidgetView> pView) = 0;
+ virtual Vector2D getPreferredSize() const = 0;
+ virtual void connect( WidgetView* pParentView) = 0;
+ virtual size_t getLength() const = 0;
+ virtual int getAdjacencyAsUp(int index) const = 0;
+ virtual int getAdjacencyAsDown(int index) const = 0;
+ virtual int getAdjacencyAsLeft(int index) const = 0;
+ virtual int getAdjacencyAsRight(int index) const = 0;
+ };
+}
+}
-#pragma once\r
-#include <mof/widget/Menu.hpp>\r
-#include <mof/widget/GridLayout.hpp>\r
-#include <mof/widget/Container.hpp>\r
-#include <memory>\r
-#include <algorithm>\r
-\r
-using mof::widget::Container;\r
-using mof::widget::WidgetView;\r
-using mof::widget::GridLayout;\r
-using mof::widget::MenuItem;\r
-\r
-namespace mof\r
-{\r
-namespace widget\r
-{\r
-//{{{ Impl\r
- struct Menu::Impl\r
- {\r
- std::vector< boost::function0<void> > actions;\r
- std::shared_ptr<Container> pView; \r
- int currentIndex;\r
- \r
- Impl()\r
- : pView() , currentIndex(0)\r
- {}\r
- };\r
-//}}}\r
-//{{{ constructor\r
- Menu::Menu\r
- (\r
- const MenuItem& front ,\r
- const MenuItem& back\r
- )\r
- : m_pImpl(new Impl)\r
- {\r
- int length = &back - &front + 1;\r
- std::vector< std::shared_ptr<mof::widget::WidgetView> > views;\r
- for(int i = 0 ; i < length ; i++)\r
- {\r
- views.push_back( std::shared_ptr<WidgetView>( (&front + i)->view( ) ) );\r
- m_pImpl->actions.push_back((&front + i)->action);\r
- }\r
- \r
- m_pImpl->pView = std::make_shared<Container>\r
- (\r
- views.front() , views.back() , \r
- makeFactoryMethod<GridLayout>(GridLayout::VERTICAL , 0)\r
- );\r
- \r
- m_pImpl->pView->getAt(m_pImpl->currentIndex)->focus();\r
- }\r
-//}}}\r
-//{{{ constructor\r
- Menu::Menu\r
- (\r
- const MenuItem& front ,\r
- const MenuItem& back ,\r
- const FactoryMethod<Layout>& layout\r
- )\r
- : m_pImpl(new Impl)\r
- {\r
- int length = &back - &front + 1;\r
- std::vector< std::shared_ptr<mof::widget::WidgetView> > views;\r
- for(int i = 0 ; i < length ; i++)\r
- {\r
- views.push_back( std::shared_ptr<WidgetView>( (&front + i)->view( ) ) );\r
- m_pImpl->actions.push_back((&front + i)->action);\r
- }\r
- \r
- m_pImpl->pView = std::make_shared<Container>\r
- (\r
- views.front() , views.back() , layout\r
- );\r
- \r
- m_pImpl->pView->getAt(m_pImpl->currentIndex)->focus();\r
- }\r
-//}}}\r
-//{{{ destructor\r
- Menu::~Menu()\r
- {\r
- }\r
-//}}}\r
-//{{{ show\r
- mof::FrameNumber Menu::show(bool imidiately)\r
- {\r
- return m_pImpl->pView->show(imidiately);\r
- }\r
-//}}}\r
-//{{{ hide\r
- mof::FrameNumber Menu::hide(bool imidiately)\r
- {\r
- return m_pImpl->pView->hide(imidiately);\r
- }\r
-//}}}\r
-//{{{ getView\r
- const std::shared_ptr<WidgetView> Menu::getView( ) const\r
- {\r
- return m_pImpl->pView;\r
- }\r
-//}}}\r
-//{{{ getView\r
- std::shared_ptr<WidgetView> Menu::getView( ) \r
- {\r
- return m_pImpl->pView;\r
- }\r
-//}}}\r
-//{{{ update\r
- void Menu::update()\r
- {\r
- m_pImpl->pView->update();\r
- }\r
-//}}}\r
-//{{{ up\r
- FrameNumber Menu::up()\r
- {\r
- int index = m_pImpl->pView->getAdjacencyAsUp(m_pImpl->currentIndex);\r
- if(index == m_pImpl->currentIndex)return 0;\r
- FrameNumber period_blured = m_pImpl->pView->getAt(m_pImpl->currentIndex)->blur();\r
- m_pImpl->currentIndex = index;\r
- FrameNumber period_focused = m_pImpl->pView->getAt(m_pImpl->currentIndex)->focus();\r
- return max(period_blured, period_focused);\r
- }\r
-//}}}\r
-//{{{ down\r
- FrameNumber Menu::down()\r
- {\r
- int index = m_pImpl->pView->getAdjacencyAsDown(m_pImpl->currentIndex);\r
- if(index == m_pImpl->currentIndex)return 0;\r
- FrameNumber period_blured = m_pImpl->pView->getAt(m_pImpl->currentIndex)->blur();\r
- m_pImpl->currentIndex = index;\r
- FrameNumber period_focused = m_pImpl->pView->getAt(m_pImpl->currentIndex)->focus();\r
- return max(period_blured, period_focused);\r
- }\r
-//}}}\r
-//{{{ left \r
- FrameNumber Menu::left()\r
- {\r
- int index = m_pImpl->pView->getAdjacencyAsLeft(m_pImpl->currentIndex);\r
- if(index == m_pImpl->currentIndex)return 0;\r
- FrameNumber period_blured = m_pImpl->pView->getAt(m_pImpl->currentIndex)->blur();\r
- m_pImpl->currentIndex = index;\r
- FrameNumber period_focused = m_pImpl->pView->getAt(m_pImpl->currentIndex)->focus();\r
- return max(period_blured, period_focused);\r
- }\r
-//}}}\r
-//{{{ right \r
- FrameNumber Menu::right()\r
- {\r
- int index = m_pImpl->pView->getAdjacencyAsRight(m_pImpl->currentIndex);\r
- if(index == m_pImpl->currentIndex)return 0;\r
- FrameNumber period_blured = m_pImpl->pView->getAt(m_pImpl->currentIndex)->blur();\r
- m_pImpl->currentIndex = index;\r
- FrameNumber period_focused = m_pImpl->pView->getAt(m_pImpl->currentIndex)->focus();\r
- return max(period_blured, period_focused);\r
- }\r
-//}}}\r
-//{{{ performAction\r
- FrameNumber Menu::performAction() const\r
- {\r
- m_pImpl->actions[m_pImpl->currentIndex]();\r
- return m_pImpl->pView->getAt(m_pImpl->currentIndex)->click();\r
- }\r
-//}}}\r
-//{{{ getSelectedIndex\r
- int Menu::getSelectedIndex() const\r
- {\r
- return m_pImpl->currentIndex;\r
- }\r
-//}}}\r
-}\r
-}\r
+#pragma once
+#include <mof/widget/Menu.hpp>
+#include <mof/widget/GridLayout.hpp>
+#include <mof/widget/Container.hpp>
+#include <memory>
+#include <algorithm>
+
+using mof::widget::Container;
+using mof::widget::WidgetView;
+using mof::widget::GridLayout;
+using mof::widget::MenuItem;
+
+namespace mof
+{
+namespace widget
+{
+//{{{ Impl
+ struct Menu::Impl
+ {
+ std::vector< boost::function0<void> > actions;
+ std::shared_ptr<Container> pView;
+ int currentIndex;
+
+ Impl()
+ : pView() , currentIndex(0)
+ {}
+ };
+//}}}
+//{{{ constructor
+ Menu::Menu
+ (
+ const MenuItem& front ,
+ const MenuItem& back
+ )
+ : m_pImpl(new Impl)
+ {
+ int length = &back - &front + 1;
+ std::vector< std::shared_ptr<mof::widget::WidgetView> > views;
+ for(int i = 0 ; i < length ; i++)
+ {
+ views.push_back( std::shared_ptr<WidgetView>( (&front + i)->view( ) ) );
+ m_pImpl->actions.push_back((&front + i)->action);
+ }
+
+ m_pImpl->pView = std::make_shared<Container>
+ (
+ views.front() , views.back() ,
+ makeFactoryMethod<GridLayout>(GridLayout::VERTICAL , 0)
+ );
+
+ m_pImpl->pView->getAt(m_pImpl->currentIndex)->focus();
+ }
+//}}}
+//{{{ constructor
+ Menu::Menu
+ (
+ const MenuItem& front ,
+ const MenuItem& back ,
+ const FactoryMethod<Layout>& layout
+ )
+ : m_pImpl(new Impl)
+ {
+ int length = &back - &front + 1;
+ std::vector< std::shared_ptr<mof::widget::WidgetView> > views;
+ for(int i = 0 ; i < length ; i++)
+ {
+ views.push_back( std::shared_ptr<WidgetView>( (&front + i)->view( ) ) );
+ m_pImpl->actions.push_back((&front + i)->action);
+ }
+
+ m_pImpl->pView = std::make_shared<Container>
+ (
+ views.front() , views.back() , layout
+ );
+
+ m_pImpl->pView->getAt(m_pImpl->currentIndex)->focus();
+ }
+//}}}
+//{{{ destructor
+ Menu::~Menu()
+ {
+ }
+//}}}
+//{{{ show
+ mof::FrameNumber Menu::show(bool imidiately)
+ {
+ return m_pImpl->pView->show(imidiately);
+ }
+//}}}
+//{{{ hide
+ mof::FrameNumber Menu::hide(bool imidiately)
+ {
+ return m_pImpl->pView->hide(imidiately);
+ }
+//}}}
+//{{{ getView
+ const std::shared_ptr<WidgetView> Menu::getView( ) const
+ {
+ return m_pImpl->pView;
+ }
+//}}}
+//{{{ getView
+ std::shared_ptr<WidgetView> Menu::getView( )
+ {
+ return m_pImpl->pView;
+ }
+//}}}
+//{{{ update
+ void Menu::update()
+ {
+ m_pImpl->pView->update();
+ }
+//}}}
+//{{{ up
+ FrameNumber Menu::up()
+ {
+ int index = m_pImpl->pView->getAdjacencyAsUp(m_pImpl->currentIndex);
+ if(index == m_pImpl->currentIndex)return 0;
+ FrameNumber period_blured = m_pImpl->pView->getAt(m_pImpl->currentIndex)->blur();
+ m_pImpl->currentIndex = index;
+ FrameNumber period_focused = m_pImpl->pView->getAt(m_pImpl->currentIndex)->focus();
+ return max(period_blured, period_focused);
+ }
+//}}}
+//{{{ down
+ FrameNumber Menu::down()
+ {
+ int index = m_pImpl->pView->getAdjacencyAsDown(m_pImpl->currentIndex);
+ if(index == m_pImpl->currentIndex)return 0;
+ FrameNumber period_blured = m_pImpl->pView->getAt(m_pImpl->currentIndex)->blur();
+ m_pImpl->currentIndex = index;
+ FrameNumber period_focused = m_pImpl->pView->getAt(m_pImpl->currentIndex)->focus();
+ return max(period_blured, period_focused);
+ }
+//}}}
+//{{{ left
+ FrameNumber Menu::left()
+ {
+ int index = m_pImpl->pView->getAdjacencyAsLeft(m_pImpl->currentIndex);
+ if(index == m_pImpl->currentIndex)return 0;
+ FrameNumber period_blured = m_pImpl->pView->getAt(m_pImpl->currentIndex)->blur();
+ m_pImpl->currentIndex = index;
+ FrameNumber period_focused = m_pImpl->pView->getAt(m_pImpl->currentIndex)->focus();
+ return max(period_blured, period_focused);
+ }
+//}}}
+//{{{ right
+ FrameNumber Menu::right()
+ {
+ int index = m_pImpl->pView->getAdjacencyAsRight(m_pImpl->currentIndex);
+ if(index == m_pImpl->currentIndex)return 0;
+ FrameNumber period_blured = m_pImpl->pView->getAt(m_pImpl->currentIndex)->blur();
+ m_pImpl->currentIndex = index;
+ FrameNumber period_focused = m_pImpl->pView->getAt(m_pImpl->currentIndex)->focus();
+ return max(period_blured, period_focused);
+ }
+//}}}
+//{{{ performAction
+ FrameNumber Menu::performAction() const
+ {
+ m_pImpl->actions[m_pImpl->currentIndex]();
+ return m_pImpl->pView->getAt(m_pImpl->currentIndex)->click();
+ }
+//}}}
+//{{{ getSelectedIndex
+ int Menu::getSelectedIndex() const
+ {
+ return m_pImpl->currentIndex;
+ }
+//}}}
+}
+}
-#pragma once\r
-#include <mof/widget/Widget.hpp>\r
-#include <boost/function/function0.hpp>\r
-#include <mof/FactoryMethod.hpp>\r
-#include <mof/widget/Layout.hpp>\r
-#include <memory>\r
-\r
-namespace mof\r
-{\r
-namespace widget\r
-{\r
-\r
- inline void emptyFunc(){}\r
-\r
- struct MenuItem\r
- {\r
- mof::FactoryMethod<WidgetView> view;\r
- boost::function0<void> action;\r
- \r
- MenuItem\r
- (\r
- const mof::FactoryMethod<WidgetView>& view_ ,\r
- const boost::function0<void>& action_\r
- )\r
- : view(view_) , action(action_)\r
- {\r
- }\r
- \r
- MenuItem\r
- (\r
- const mof::FactoryMethod<WidgetView>& view_ \r
- )\r
- : view(view_) , action(emptyFunc)\r
- {\r
- }\r
-\r
- };\r
-\r
- class Menu : public Widget\r
- {\r
- public:\r
- Menu(const MenuItem& front , const MenuItem& back );\r
- Menu\r
- (\r
- const MenuItem& front ,\r
- const MenuItem& back ,\r
- const FactoryMethod<Layout>& layout\r
- );\r
-\r
- virtual ~Menu();\r
- virtual FrameNumber show(bool imidiately = false);\r
- virtual FrameNumber hide(bool imidiately = false);\r
- virtual const std::shared_ptr<WidgetView> getView( ) const;\r
- virtual std::shared_ptr<WidgetView> getView( );\r
- virtual void update();\r
- \r
- virtual FrameNumber up();\r
- virtual FrameNumber down();\r
- virtual FrameNumber left();\r
- virtual FrameNumber right();\r
- virtual FrameNumber performAction() const;\r
- int getSelectedIndex() const;\r
- protected:\r
- struct Impl;\r
- std::unique_ptr<Impl> m_pImpl;\r
- };\r
-\r
-}\r
-} // namespace mof \r
+#pragma once
+#include <mof/widget/Widget.hpp>
+#include <boost/function/function0.hpp>
+#include <mof/FactoryMethod.hpp>
+#include <mof/widget/Layout.hpp>
+#include <memory>
+
+namespace mof
+{
+namespace widget
+{
+
+ inline void emptyFunc(){}
+
+ struct MenuItem
+ {
+ mof::FactoryMethod<WidgetView> view;
+ boost::function0<void> action;
+
+ MenuItem
+ (
+ const mof::FactoryMethod<WidgetView>& view_ ,
+ const boost::function0<void>& action_
+ )
+ : view(view_) , action(action_)
+ {
+ }
+
+ MenuItem
+ (
+ const mof::FactoryMethod<WidgetView>& view_
+ )
+ : view(view_) , action(emptyFunc)
+ {
+ }
+
+ };
+
+ class Menu : public Widget
+ {
+ public:
+ Menu(const MenuItem& front , const MenuItem& back );
+ Menu
+ (
+ const MenuItem& front ,
+ const MenuItem& back ,
+ const FactoryMethod<Layout>& layout
+ );
+
+ virtual ~Menu();
+ virtual FrameNumber show(bool imidiately = false);
+ virtual FrameNumber hide(bool imidiately = false);
+ virtual const std::shared_ptr<WidgetView> getView( ) const;
+ virtual std::shared_ptr<WidgetView> getView( );
+ virtual void update();
+
+ virtual FrameNumber up();
+ virtual FrameNumber down();
+ virtual FrameNumber left();
+ virtual FrameNumber right();
+ virtual FrameNumber performAction() const;
+ int getSelectedIndex() const;
+ protected:
+ struct Impl;
+ std::unique_ptr<Impl> m_pImpl;
+ };
+
+}
+} // namespace mof
-#include <memory>\r
-#include <algorithm>\r
-#include <mof/widget/NullView.hpp>\r
-#include <mof/widget/Message.hpp>\r
-#include <mof/widget/AbstractTextCompiler.hpp>\r
-#include <mof/widget/Page.hpp>\r
-#include <mof/widget/Pager.hpp>\r
-#include <mof/widget/WidgetView.hpp>\r
-#include <mof/ConsoleIO.hpp>\r
-//#include <queue>\r
-\r
-namespace mof\r
-{\r
-namespace widget\r
-{\r
-//{{{ MessageView\r
- class MessageView : public WidgetView\r
- {\r
- std::shared_ptr<mof::widget::WidgetView> view_;\r
- std::shared_ptr<mof::widget::WidgetView> old_view_;\r
- mof::Vector2D region_;\r
- //const mof::Vector2D& region_; なんでconstやったん?\r
- bool visible_;\r
- public:\r
-\r
- MessageView(const mof::Vector2D& region)\r
- : region_(region), visible_(true)\r
- {\r
- view_ = std::make_shared<mof::widget::NullView>();\r
- view_->getPositionStream() << getPositionStream();\r
- view_->getSizeStream() << getSizeStream();//TODO regionを入れる?\r
- view_->getColorStream() << getColorStream();\r
- }\r
-\r
- ~MessageView()\r
- {\r
-\r
- }\r
-\r
- FrameNumber show(bool imidiately)\r
- {\r
- \r
- return view_->show(imidiately);\r
- }\r
- \r
- FrameNumber hide(bool imidiately)\r
- {\r
- return view_->hide(imidiately);\r
- }\r
-\r
- FrameNumber focus(bool imidiately)\r
- {\r
- return show(imidiately);\r
- }\r
- \r
- FrameNumber blur(bool imidiately)\r
- {\r
- return hide(imidiately);\r
- }\r
- \r
- FrameNumber click(bool)\r
- {\r
- return 0;\r
- }\r
- \r
- void update()\r
- {\r
- getPositionStream().update();\r
- getSizeStream().update();\r
- getColorStream().update();\r
- if (old_view_.get()) old_view_->update();\r
- view_->update();\r
- }\r
- \r
- void draw() const\r
- {\r
- if (old_view_.get()) old_view_->draw();\r
- view_->draw();\r
- }\r
-\r
- void setVisible(bool visible)\r
- {\r
- visible_ = visible;\r
- if (old_view_.get()) old_view_->setVisible(visible);\r
- if (view_.get()) view_->setVisible(visible);\r
- }\r
-\r
- mof::Vector2D getPreferredSize() const\r
- {\r
- return region_;\r
- }\r
-\r
- FrameNumber swap(std::shared_ptr<mof::widget::WidgetView> view)\r
- {\r
- old_view_ = view_;\r
- view_ = view;\r
- view_->setVisible(visible_);\r
- FrameNumber period = view_->show();\r
- period = max(period, old_view_->hide());\r
-\r
- view_->getPositionStream() << getPositionStream();\r
- view_->getSizeStream() << view_->getSizeStream().value() << getSizeStream();\r
- view_->getColorStream() << getColorStream();\r
- return period;\r
- }\r
-\r
- \r
- };\r
-//}}}\r
-//{{{ Impl\r
- struct Message::Impl\r
- {\r
- std::shared_ptr<AbstractTextCompiler> pCompiler;\r
- std::shared_ptr<Pager> pPager;\r
- std::shared_ptr<MessageView> view_;\r
- \r
- Impl(const mof::Vector2D& region, const std::shared_ptr<AbstractTextCompiler>& pCompiler)\r
- : pCompiler(pCompiler), pPager(new Pager), view_(new MessageView(region))\r
- {\r
- }\r
- };\r
-//}}}\r
-//{{{ constructor\r
- Message::Message(const mof::Vector2D& region, const std::shared_ptr<AbstractTextCompiler>& pCompiler)\r
- : pImpl_(new Impl(region, pCompiler))\r
- {\r
- }\r
-//}}}\r
-//{{{ destructor\r
- Message::~Message()\r
- {\r
- }\r
-//}}}\r
-//{{{ show\r
- mof::FrameNumber Message::show(bool imidiately)\r
- {\r
- //return pImpl_->pPager->show();\r
- return 0;\r
- }\r
-//}}}\r
-//{{{ hide\r
- mof::FrameNumber Message::hide(bool imidiately)\r
- {\r
- //return pImpl_->pPager->hide();\r
- return 0;\r
- }\r
-//}}}\r
-//{{{ getView\r
- const std::shared_ptr<mof::widget::WidgetView> Message::getView() const\r
- {\r
- return pImpl_->view_;\r
- }\r
-//}}}\r
-//{{{ getView\r
- std::shared_ptr<mof::widget::WidgetView> Message::getView() \r
- {\r
- return pImpl_->view_;\r
- }\r
-//}}}\r
-//{{{ update \r
- void Message::update() \r
- {\r
- return pImpl_->view_->update();\r
- }\r
-//}}}\r
-//{{{ addPage\r
- void Message::addPage(const tstring& page) \r
- {\r
- pImpl_->pPager->addPage( *pImpl_->pCompiler->compile(page) );\r
- }\r
-//}}}\r
-//{{{ nextPage\r
- FrameNumber Message::nextPage() \r
- {\r
- pImpl_->pPager->next();\r
- return pImpl_->view_->swap(pImpl_->pPager->getPage().view());\r
- }\r
-//}}}\r
-\r
-}// namespace widget\r
-}// mof\r
+#include <memory>
+#include <algorithm>
+#include <mof/widget/NullView.hpp>
+#include <mof/widget/Message.hpp>
+#include <mof/widget/AbstractTextCompiler.hpp>
+#include <mof/widget/Page.hpp>
+#include <mof/widget/Pager.hpp>
+#include <mof/widget/WidgetView.hpp>
+#include <mof/ConsoleIO.hpp>
+//#include <queue>
+
+namespace mof
+{
+namespace widget
+{
+//{{{ MessageView
+ class MessageView : public WidgetView
+ {
+ std::shared_ptr<mof::widget::WidgetView> view_;
+ std::shared_ptr<mof::widget::WidgetView> old_view_;
+ mof::Vector2D region_;
+ //const mof::Vector2D& region_; なんでconstやったん?
+ bool visible_;
+ public:
+
+ MessageView(const mof::Vector2D& region)
+ : region_(region), visible_(true)
+ {
+ view_ = std::make_shared<mof::widget::NullView>();
+ view_->getPositionStream() << getPositionStream();
+ view_->getSizeStream() << getSizeStream();//TODO regionを入れる?
+ view_->getColorStream() << getColorStream();
+ }
+
+ ~MessageView()
+ {
+
+ }
+
+ FrameNumber show(bool imidiately)
+ {
+
+ return view_->show(imidiately);
+ }
+
+ FrameNumber hide(bool imidiately)
+ {
+ return view_->hide(imidiately);
+ }
+
+ FrameNumber focus(bool imidiately)
+ {
+ return show(imidiately);
+ }
+
+ FrameNumber blur(bool imidiately)
+ {
+ return hide(imidiately);
+ }
+
+ FrameNumber click(bool)
+ {
+ return 0;
+ }
+
+ void update()
+ {
+ getPositionStream().update();
+ getSizeStream().update();
+ getColorStream().update();
+ if (old_view_.get()) old_view_->update();
+ view_->update();
+ }
+
+ void draw() const
+ {
+ if (old_view_.get()) old_view_->draw();
+ view_->draw();
+ }
+
+ void setVisible(bool visible)
+ {
+ visible_ = visible;
+ if (old_view_.get()) old_view_->setVisible(visible);
+ if (view_.get()) view_->setVisible(visible);
+ }
+
+ mof::Vector2D getPreferredSize() const
+ {
+ return region_;
+ }
+
+ FrameNumber swap(std::shared_ptr<mof::widget::WidgetView> view)
+ {
+ old_view_ = view_;
+ view_ = view;
+ view_->setVisible(visible_);
+ FrameNumber period = view_->show();
+ period = max(period, old_view_->hide());
+
+ view_->getPositionStream() << getPositionStream();
+ view_->getSizeStream() << view_->getSizeStream().value() << getSizeStream();
+ view_->getColorStream() << getColorStream();
+ return period;
+ }
+
+
+ };
+//}}}
+//{{{ Impl
+ struct Message::Impl
+ {
+ std::shared_ptr<AbstractTextCompiler> pCompiler;
+ std::shared_ptr<Pager> pPager;
+ std::shared_ptr<MessageView> view_;
+
+ Impl(const mof::Vector2D& region, const std::shared_ptr<AbstractTextCompiler>& pCompiler)
+ : pCompiler(pCompiler), pPager(new Pager), view_(new MessageView(region))
+ {
+ }
+ };
+//}}}
+//{{{ constructor
+ Message::Message(const mof::Vector2D& region, const std::shared_ptr<AbstractTextCompiler>& pCompiler)
+ : pImpl_(new Impl(region, pCompiler))
+ {
+ }
+//}}}
+//{{{ destructor
+ Message::~Message()
+ {
+ }
+//}}}
+//{{{ show
+ mof::FrameNumber Message::show(bool imidiately)
+ {
+ //return pImpl_->pPager->show();
+ return 0;
+ }
+//}}}
+//{{{ hide
+ mof::FrameNumber Message::hide(bool imidiately)
+ {
+ //return pImpl_->pPager->hide();
+ return 0;
+ }
+//}}}
+//{{{ getView
+ const std::shared_ptr<mof::widget::WidgetView> Message::getView() const
+ {
+ return pImpl_->view_;
+ }
+//}}}
+//{{{ getView
+ std::shared_ptr<mof::widget::WidgetView> Message::getView()
+ {
+ return pImpl_->view_;
+ }
+//}}}
+//{{{ update
+ void Message::update()
+ {
+ return pImpl_->view_->update();
+ }
+//}}}
+//{{{ addPage
+ void Message::addPage(const tstring& page)
+ {
+ pImpl_->pPager->addPage( *pImpl_->pCompiler->compile(page) );
+ }
+//}}}
+//{{{ nextPage
+ FrameNumber Message::nextPage()
+ {
+ pImpl_->pPager->next();
+ return pImpl_->view_->swap(pImpl_->pPager->getPage().view());
+ }
+//}}}
+
+}// namespace widget
+}// mof
-#pragma once\r
-#include <mof/widget/WidgetView.hpp>\r
-#include <mof/widget/Widget.hpp>\r
-#include <mof/widget/Effect.hpp>\r
-#include <mof/stream/Manipulator.hpp>\r
-#include <boost/utility.hpp>\r
-#include <memory>\r
-\r
-namespace mof\r
-{\r
-namespace widget\r
-{\r
- class AbstractTextCompiler;\r
-\r
-\r
- class Message : public Widget\r
- {\r
- public:\r
- Message(const mof::Vector2D& region, const std::shared_ptr<AbstractTextCompiler>& pCompiler);\r
- virtual ~Message();\r
- virtual FrameNumber show(bool imidiately = false);\r
- virtual FrameNumber hide(bool imidiately = false);\r
- virtual const std::shared_ptr<WidgetView> getView() const;\r
- virtual std::shared_ptr<WidgetView> getView();\r
- virtual void update();\r
-\r
- void addPage(const tstring& page);\r
- FrameNumber nextPage();\r
- //void setPageShowAction(std::shared_ptr<mof::Vector2D> position, std::shared_ptr<mof::Vector2D> size, std::shared_ptr<mof::Vector2D> color);\r
- private:\r
- struct Impl;\r
- std::unique_ptr<Impl> pImpl_;\r
- }; \r
-\r
-}\r
-}\r
+#pragma once
+#include <mof/widget/WidgetView.hpp>
+#include <mof/widget/Widget.hpp>
+#include <mof/widget/Effect.hpp>
+#include <mof/stream/Manipulator.hpp>
+#include <boost/utility.hpp>
+#include <memory>
+
+namespace mof
+{
+namespace widget
+{
+ class AbstractTextCompiler;
+
+
+ class Message : public Widget
+ {
+ public:
+ Message(const mof::Vector2D& region, const std::shared_ptr<AbstractTextCompiler>& pCompiler);
+ virtual ~Message();
+ virtual FrameNumber show(bool imidiately = false);
+ virtual FrameNumber hide(bool imidiately = false);
+ virtual const std::shared_ptr<WidgetView> getView() const;
+ virtual std::shared_ptr<WidgetView> getView();
+ virtual void update();
+
+ void addPage(const tstring& page);
+ FrameNumber nextPage();
+ //void setPageShowAction(std::shared_ptr<mof::Vector2D> position, std::shared_ptr<mof::Vector2D> size, std::shared_ptr<mof::Vector2D> color);
+ private:
+ struct Impl;
+ std::unique_ptr<Impl> pImpl_;
+ };
+
+}
+}
-#include "mof/MessageWidget.hpp"\r
-#include "mof/Effect.hpp"\r
-#include "mof/utilities.hpp"\r
-#include "mof/LayoutManager.hpp"\r
-#include <boost/scoped_array.hpp>\r
-#include "mof/ConsoleIO.hpp"\r
-#include "mof/WidgetView.hpp"\r
-#include "mof/TextView.hpp"\r
-#include "mof/GraphicsDevice.hpp"\r
-#include "mof/mofAnimations.hpp"\r
-#include "mof/TextCompiler.hpp"\r
-#include "mof/widgets.hpp"\r
- \r
-namespace mof\r
-{\r
- \r
- struct MessageWidget::Impl\r
- {\r
- mof::WidgetView* pBackgroundView;\r
- mof::TextView* pTitleView;\r
- mof::LayoutManager* pLayout;\r
- //std::shared_ptr<mof::Matrix2D> pTranslation;\r
- mof::TranslationAnimation2D::Handler translation;\r
- mof::ScalingAnimation2D::Handler scaling;\r
- mof::Pager* pPager;\r
- mof::FrameNumber frame;\r
- //int width;\r
- //int height;\r
- \r
-//{{{ Impl \r
- Impl()\r
- : \r
- pBackgroundView(NULL) , \r
- pTitleView(NULL) , \r
- pLayout(NULL) ,\r
- pPager( NULL ) ,\r
- frame( 0 )\r
- {\r
- translation = mof::TranslationAnimation2D::Handler\r
- (\r
- new mof::TranslationAnimation2D\r
- (\r
- mof::makeConstantHandler\r
- (\r
- mof::Vector2D( 0 , 0 )\r
- )\r
- )\r
- );\r
-\r
- scaling = mof::ScalingAnimation2D::Handler\r
- (\r
- new mof::ScalingAnimation2D\r
- (\r
- mof::makeConstantHandler\r
- (\r
- mof::Vector2D( 0 , 0 )\r
- )\r
- )\r
- );\r
-\r
- }\r
-//}}}\r
-//{{{ ~Impl\r
- ~Impl()\r
- {\r
- delete pLayout;\r
- delete pBackgroundView;\r
- delete pTitleView;\r
- delete pPager;\r
- }\r
- \r
-//}}} \r
- };\r
-//{{{ MessageWidget\r
- MessageWidget::MessageWidget\r
- (\r
- mof::WidgetView* pBackgroundView ,\r
- const mof::Rectangle<int>& bounds ,\r
- mof::LayoutManager* pLayout\r
- )\r
- : m_pImpl( new Impl( ) )\r
- {\r
- m_pImpl->pLayout = pLayout;\r
- m_pImpl->pBackgroundView = pBackgroundView;\r
- m_pImpl->pBackgroundView->setBounds( bounds );\r
- m_pImpl->translation->set( m_pImpl->pBackgroundView->getPosition( ) );\r
- m_pImpl->scaling->set( m_pImpl->pBackgroundView->getSize( ) );\r
- \r
- { // \83^\83C\83g\83\8b\82Ì\8f\89\8aú\89»\r
- if( true )\r
- {\r
- m_pImpl->pTitleView = new mof::TextView\r
- (\r
- _T("Title") , mof::Font( mof::Font::MS_P_GOTHIC , 25 )\r
- );\r
- m_pImpl->pTitleView->initialize();\r
- mof::Rectangle<int> tmp( bounds.beginX , bounds.beginY , bounds.endX , bounds.beginY + 32 );\r
- m_pImpl->pTitleView->setBounds( tmp );\r
- \r
- }\r
- }\r
- { // \83y\81[\83W\83\83\82Ì\90¶\90¬\r
- mof::LayoutManager* pLayout = new mof::LayoutManager( mof::LayoutManager::HORIZONTAL , 1);\r
- m_pImpl->pPager = new mof::Pager( bounds , pLayout );\r
- }\r
- }\r
-//}}}\r
-//{{{ ~MessageWidget\r
- MessageWidget::~MessageWidget(){\r
- \r
- }\r
-//}}}\r
-//{{{ show\r
- void MessageWidget::show(){\r
- m_pImpl->pPager->show();\r
- m_pImpl->pBackgroundView->show();\r
- if( m_pImpl->pTitleView )m_pImpl->pTitleView->show();\r
- }\r
-//}}}\r
-//{{{ close\r
- void MessageWidget::close()\r
- {\r
- m_pImpl->pPager->close();\r
- m_pImpl->pBackgroundView->close();\r
- if( m_pImpl->pTitleView )m_pImpl->pTitleView->close();\r
- }\r
-//}}}\r
-//{{{ nextPage\r
- void MessageWidget::nextPage(){\r
- if( !m_pImpl->pPager->hasNextPage( ) )close();\r
- else if( !m_pImpl->pPager->hasPreviousPage() )show();\r
- else m_pImpl->pPager->nextPage();\r
- }\r
-//}}}\r
-//{{{ addPage\r
- void MessageWidget::addPage( const PageRequest& page ){\r
- \r
- m_pImpl->pPager->addPage( page );\r
- \r
- std::vector<mof::Rectangle<int> > boundList;\r
- if( m_pImpl->pTitleView )boundList.push_back( mof::Rectangle<int>( 0 , 0 , 1 , 32) );\r
- boundList.push_back( m_pImpl->pPager->getBounds( ) );\r
- \r
- mof::Vector2D scaling = m_pImpl->scaling->get( )->getValue( m_pImpl->frame );\r
- m_pImpl->pLayout->replace\r
- (\r
- scaling.x , scaling.y ,\r
- boundList.front() , boundList.back()\r
- );\r
-\r
- int i = 0;\r
- if( m_pImpl->pTitleView )\r
- {\r
- mof::Animation<mof::Matrix2D>::Handler children[] =\r
- {\r
- mof::makeConstantHandler\r
- ( \r
- mof::Matrix2D::createScaling\r
- (\r
- mof::Vector2D(boundList.at(i).getWidth( ) , boundList.at(i).getHeight( ) )\r
- )\r
- ) ,\r
- m_pImpl->translation ,\r
- mof::makeConstantHandler\r
- (\r
- mof::Matrix2D::createTranslation( m_pImpl->pLayout->getPosition(i) )\r
- )\r
- }; // array children\r
- \r
- mof::Animation<mof::Matrix2D>::Handler handler\r
- (\r
- new mof::CascadingAnimation<mof::Matrix2D>( children[0] , mof::lastOf( children ) )\r
- );\r
- i++;\r
- //m_pImpl->pTitleView->setWorldTransform( handler );\r
- //m_pImpl->pTitleView->setColor(mof::Color4f(0 , 1 , 1 , 1));\r
- \r
- } // if\r
- {\r
- const mof::Animation<mof::Vector2D>::Handler children[] =\r
- {\r
- //mof::makeConstantHandler( mof::Vector2D( 300 , 300) ) ,\r
- m_pImpl->translation->get( ) ,\r
- mof::makeConstantHandler\r
- (\r
- m_pImpl->pLayout->getPosition(i) \r
- )\r
- }; // array children\r
- \r
- mof::Animation<mof::Vector2D>::Handler handler\r
- (\r
- new mof::CascadingAnimation<mof::Vector2D , mof::Add<mof::Vector2D> >( children[0] , mof::lastOf( children ) )\r
- );\r
- m_pImpl->pPager->setPosition( handler );\r
- //m_pImpl->pTitleView->setWorldTransform( handler );\r
- //m_pImpl->pTitleView->setColor(mof::Color4f(0 , 1 , 1 , 1));\r
- \r
- } // for \r
- \r
- \r
- }\r
-//}}}\r
-//{{{ draw\r
- void MessageWidget::draw() const{\r
- m_pImpl->pBackgroundView->draw();\r
- \r
- { // \95`\89æ\97Ì\88æ\82ð\90§\8cÀ\r
- mof::Vector2D scaling = m_pImpl->scaling->get( )->getValue( m_pImpl->frame );\r
- mof::Vector2D translation = m_pImpl->translation->get( )->getValue( m_pImpl->frame );\r
- mof::GraphicsDevice::setViewport \r
- ( \r
- mof::Rectangle<int>( translation.x , translation.y , translation.x + scaling.x , translation.y + scaling.y )\r
- );\r
- }\r
-\r
- if( m_pImpl->pTitleView )m_pImpl->pTitleView->getEffect()->draw();\r
- m_pImpl->pPager->draw(); \r
- mof::GraphicsDevice::setViewport(mof::Rectangle<int>(0 , 0 , 640 , 480));//TODO\r
- \r
- }\r
-//}}}\r
-//{{{ update\r
- void MessageWidget::update() {\r
- \r
- m_pImpl->pBackgroundView->update();\r
- if( m_pImpl->pTitleView )m_pImpl->pTitleView->update();\r
- m_pImpl->pPager->update(); \r
- m_pImpl->frame++;\r
- }\r
-//}}}\r
-//{{{ hasNextPage\r
- bool MessageWidget::hasNextPage( ){\r
- return m_pImpl->pPager->hasNextPage( );\r
- \r
- }\r
-//}}}\r
-} //namespace mof\r
-\r
+#include "mof/MessageWidget.hpp"
+#include "mof/Effect.hpp"
+#include "mof/utilities.hpp"
+#include "mof/LayoutManager.hpp"
+#include <boost/scoped_array.hpp>
+#include "mof/ConsoleIO.hpp"
+#include "mof/WidgetView.hpp"
+#include "mof/TextView.hpp"
+#include "mof/GraphicsDevice.hpp"
+#include "mof/mofAnimations.hpp"
+#include "mof/TextCompiler.hpp"
+#include "mof/widgets.hpp"
+
+namespace mof
+{
+
+ struct MessageWidget::Impl
+ {
+ mof::WidgetView* pBackgroundView;
+ mof::TextView* pTitleView;
+ mof::LayoutManager* pLayout;
+ //std::shared_ptr<mof::Matrix2D> pTranslation;
+ mof::TranslationAnimation2D::Handler translation;
+ mof::ScalingAnimation2D::Handler scaling;
+ mof::Pager* pPager;
+ mof::FrameNumber frame;
+ //int width;
+ //int height;
+
+//{{{ Impl
+ Impl()
+ :
+ pBackgroundView(NULL) ,
+ pTitleView(NULL) ,
+ pLayout(NULL) ,
+ pPager( NULL ) ,
+ frame( 0 )
+ {
+ translation = mof::TranslationAnimation2D::Handler
+ (
+ new mof::TranslationAnimation2D
+ (
+ mof::makeConstantHandler
+ (
+ mof::Vector2D( 0 , 0 )
+ )
+ )
+ );
+
+ scaling = mof::ScalingAnimation2D::Handler
+ (
+ new mof::ScalingAnimation2D
+ (
+ mof::makeConstantHandler
+ (
+ mof::Vector2D( 0 , 0 )
+ )
+ )
+ );
+
+ }
+//}}}
+//{{{ ~Impl
+ ~Impl()
+ {
+ delete pLayout;
+ delete pBackgroundView;
+ delete pTitleView;
+ delete pPager;
+ }
+
+//}}}
+ };
+//{{{ MessageWidget
+ MessageWidget::MessageWidget
+ (
+ mof::WidgetView* pBackgroundView ,
+ const mof::Rectangle<int>& bounds ,
+ mof::LayoutManager* pLayout
+ )
+ : m_pImpl( new Impl( ) )
+ {
+ m_pImpl->pLayout = pLayout;
+ m_pImpl->pBackgroundView = pBackgroundView;
+ m_pImpl->pBackgroundView->setBounds( bounds );
+ m_pImpl->translation->set( m_pImpl->pBackgroundView->getPosition( ) );
+ m_pImpl->scaling->set( m_pImpl->pBackgroundView->getSize( ) );
+
+ { // \83^\83C\83g\83\8b\82Ì\8f\89\8aú\89»
+ if( true )
+ {
+ m_pImpl->pTitleView = new mof::TextView
+ (
+ _T("Title") , mof::Font( mof::Font::MS_P_GOTHIC , 25 )
+ );
+ m_pImpl->pTitleView->initialize();
+ mof::Rectangle<int> tmp( bounds.beginX , bounds.beginY , bounds.endX , bounds.beginY + 32 );
+ m_pImpl->pTitleView->setBounds( tmp );
+
+ }
+ }
+ { // \83y\81[\83W\83\83\82Ì\90¶\90¬
+ mof::LayoutManager* pLayout = new mof::LayoutManager( mof::LayoutManager::HORIZONTAL , 1);
+ m_pImpl->pPager = new mof::Pager( bounds , pLayout );
+ }
+ }
+//}}}
+//{{{ ~MessageWidget
+ MessageWidget::~MessageWidget(){
+
+ }
+//}}}
+//{{{ show
+ void MessageWidget::show(){
+ m_pImpl->pPager->show();
+ m_pImpl->pBackgroundView->show();
+ if( m_pImpl->pTitleView )m_pImpl->pTitleView->show();
+ }
+//}}}
+//{{{ close
+ void MessageWidget::close()
+ {
+ m_pImpl->pPager->close();
+ m_pImpl->pBackgroundView->close();
+ if( m_pImpl->pTitleView )m_pImpl->pTitleView->close();
+ }
+//}}}
+//{{{ nextPage
+ void MessageWidget::nextPage(){
+ if( !m_pImpl->pPager->hasNextPage( ) )close();
+ else if( !m_pImpl->pPager->hasPreviousPage() )show();
+ else m_pImpl->pPager->nextPage();
+ }
+//}}}
+//{{{ addPage
+ void MessageWidget::addPage( const PageRequest& page ){
+
+ m_pImpl->pPager->addPage( page );
+
+ std::vector<mof::Rectangle<int> > boundList;
+ if( m_pImpl->pTitleView )boundList.push_back( mof::Rectangle<int>( 0 , 0 , 1 , 32) );
+ boundList.push_back( m_pImpl->pPager->getBounds( ) );
+
+ mof::Vector2D scaling = m_pImpl->scaling->get( )->getValue( m_pImpl->frame );
+ m_pImpl->pLayout->replace
+ (
+ scaling.x , scaling.y ,
+ boundList.front() , boundList.back()
+ );
+
+ int i = 0;
+ if( m_pImpl->pTitleView )
+ {
+ mof::Animation<mof::Matrix2D>::Handler children[] =
+ {
+ mof::makeConstantHandler
+ (
+ mof::Matrix2D::createScaling
+ (
+ mof::Vector2D(boundList.at(i).getWidth( ) , boundList.at(i).getHeight( ) )
+ )
+ ) ,
+ m_pImpl->translation ,
+ mof::makeConstantHandler
+ (
+ mof::Matrix2D::createTranslation( m_pImpl->pLayout->getPosition(i) )
+ )
+ }; // array children
+
+ mof::Animation<mof::Matrix2D>::Handler handler
+ (
+ new mof::CascadingAnimation<mof::Matrix2D>( children[0] , mof::lastOf( children ) )
+ );
+ i++;
+ //m_pImpl->pTitleView->setWorldTransform( handler );
+ //m_pImpl->pTitleView->setColor(mof::Color4f(0 , 1 , 1 , 1));
+
+ } // if
+ {
+ const mof::Animation<mof::Vector2D>::Handler children[] =
+ {
+ //mof::makeConstantHandler( mof::Vector2D( 300 , 300) ) ,
+ m_pImpl->translation->get( ) ,
+ mof::makeConstantHandler
+ (
+ m_pImpl->pLayout->getPosition(i)
+ )
+ }; // array children
+
+ mof::Animation<mof::Vector2D>::Handler handler
+ (
+ new mof::CascadingAnimation<mof::Vector2D , mof::Add<mof::Vector2D> >( children[0] , mof::lastOf( children ) )
+ );
+ m_pImpl->pPager->setPosition( handler );
+ //m_pImpl->pTitleView->setWorldTransform( handler );
+ //m_pImpl->pTitleView->setColor(mof::Color4f(0 , 1 , 1 , 1));
+
+ } // for
+
+
+ }
+//}}}
+//{{{ draw
+ void MessageWidget::draw() const{
+ m_pImpl->pBackgroundView->draw();
+
+ { // \95`\89æ\97Ì\88æ\82ð\90§\8cÀ
+ mof::Vector2D scaling = m_pImpl->scaling->get( )->getValue( m_pImpl->frame );
+ mof::Vector2D translation = m_pImpl->translation->get( )->getValue( m_pImpl->frame );
+ mof::GraphicsDevice::setViewport
+ (
+ mof::Rectangle<int>( translation.x , translation.y , translation.x + scaling.x , translation.y + scaling.y )
+ );
+ }
+
+ if( m_pImpl->pTitleView )m_pImpl->pTitleView->getEffect()->draw();
+ m_pImpl->pPager->draw();
+ mof::GraphicsDevice::setViewport(mof::Rectangle<int>(0 , 0 , 640 , 480));//TODO
+
+ }
+//}}}
+//{{{ update
+ void MessageWidget::update() {
+
+ m_pImpl->pBackgroundView->update();
+ if( m_pImpl->pTitleView )m_pImpl->pTitleView->update();
+ m_pImpl->pPager->update();
+ m_pImpl->frame++;
+ }
+//}}}
+//{{{ hasNextPage
+ bool MessageWidget::hasNextPage( ){
+ return m_pImpl->pPager->hasNextPage( );
+
+ }
+//}}}
+} //namespace mof
+
-#pragma once\r
-#include <boost/function/function0.hpp>\r
-#include <boost/shared_ptr.hpp>\r
-#include <boost/scoped_ptr.hpp>\r
-//#include "mof/MenuView.hpp"\r
-#include "mof/widget/WidgetView.hpp"\r
-#include "mof/Font.hpp"\r
-\r
-namespace mof\r
-{\r
- struct PageRequest\r
- {\r
- tstring message;\r
- Font font;\r
- \r
- PageRequest(const tstring& message_ , const Font& font_ )\r
- : message(message_) , font(font_)\r
- {\r
- }\r
- };\r
-\r
- class LayoutManager;\r
- class WidgetView;\r
- class Pager;\r
- struct Page;\r
-\r
- class MessageWidget : boost::noncopyable{\r
- struct Impl;\r
- boost::scoped_ptr<Impl> m_pImpl;\r
- public:\r
- \r
- MessageWidget\r
- ( \r
- WidgetView* pBackgroundView , \r
- const Rectangle< int >& bounds , LayoutManager* pLayout\r
- );\r
-\r
- ~MessageWidget();\r
- void show();\r
- void close();\r
- void nextPage();\r
- void addPage( const PageRequest& page );\r
- void draw() const;\r
- void update();\r
- bool hasNextPage();\r
-\r
- };\r
-}\r
+#pragma once
+#include <boost/function/function0.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/scoped_ptr.hpp>
+//#include "mof/MenuView.hpp"
+#include "mof/widget/WidgetView.hpp"
+#include "mof/Font.hpp"
+
+namespace mof
+{
+ struct PageRequest
+ {
+ tstring message;
+ Font font;
+
+ PageRequest(const tstring& message_ , const Font& font_ )
+ : message(message_) , font(font_)
+ {
+ }
+ };
+
+ class LayoutManager;
+ class WidgetView;
+ class Pager;
+ struct Page;
+
+ class MessageWidget : boost::noncopyable{
+ struct Impl;
+ boost::scoped_ptr<Impl> m_pImpl;
+ public:
+
+ MessageWidget
+ (
+ WidgetView* pBackgroundView ,
+ const Rectangle< int >& bounds , LayoutManager* pLayout
+ );
+
+ ~MessageWidget();
+ void show();
+ void close();
+ void nextPage();
+ void addPage( const PageRequest& page );
+ void draw() const;
+ void update();
+ bool hasNextPage();
+
+ };
+}
-#include <mof/widget/NullView.hpp>\r
- \r
-namespace mof\r
-{\r
-namespace widget\r
-{\r
-//{{{ constructor\r
- NullView::NullView()\r
- {\r
- }\r
-//}}}\r
-//{{{ destructor\r
- NullView::~NullView()\r
- {\r
- }\r
-//}}}\r
-//{{{ update\r
- void NullView::update( )\r
- {\r
- }\r
-//}}}\r
-//{{{ draw\r
- void NullView::draw( ) const\r
- {\r
- }\r
-//}}}\r
-//{{{ setVisible\r
- void NullView::setVisible(bool)\r
- {\r
- }\r
-//}}}\r
-//{{{ show\r
- FrameNumber NullView::show(bool) \r
- {\r
- return 0;\r
- }\r
-//}}}\r
-//{{{ hide\r
- FrameNumber NullView::hide(bool)\r
- {\r
- return 0;\r
- }\r
-//}}}\r
-//{{{ focus\r
- FrameNumber NullView::focus(bool) \r
- {\r
- return 0;\r
- }\r
-//}}}\r
-//{{{ blur\r
- FrameNumber NullView::blur(bool imidiately)\r
- {\r
- return 0;\r
- }\r
-//}}}\r
-//{{{ click\r
- FrameNumber NullView::click(bool)\r
- {\r
- return 0;\r
- }\r
-//}}}\r
-//{{{ getPreferredSize\r
- mof::Vector2D NullView::getPreferredSize() const\r
- {\r
- return mof::Vector2D(0, 0);\r
- }\r
-//}}}\r
-\r
-}\r
-} // namespace mof\r
+#include <mof/widget/NullView.hpp>
+
+namespace mof
+{
+namespace widget
+{
+//{{{ constructor
+ NullView::NullView()
+ {
+ }
+//}}}
+//{{{ destructor
+ NullView::~NullView()
+ {
+ }
+//}}}
+//{{{ update
+ void NullView::update( )
+ {
+ }
+//}}}
+//{{{ draw
+ void NullView::draw( ) const
+ {
+ }
+//}}}
+//{{{ setVisible
+ void NullView::setVisible(bool)
+ {
+ }
+//}}}
+//{{{ show
+ FrameNumber NullView::show(bool)
+ {
+ return 0;
+ }
+//}}}
+//{{{ hide
+ FrameNumber NullView::hide(bool)
+ {
+ return 0;
+ }
+//}}}
+//{{{ focus
+ FrameNumber NullView::focus(bool)
+ {
+ return 0;
+ }
+//}}}
+//{{{ blur
+ FrameNumber NullView::blur(bool imidiately)
+ {
+ return 0;
+ }
+//}}}
+//{{{ click
+ FrameNumber NullView::click(bool)
+ {
+ return 0;
+ }
+//}}}
+//{{{ getPreferredSize
+ mof::Vector2D NullView::getPreferredSize() const
+ {
+ return mof::Vector2D(0, 0);
+ }
+//}}}
+
+}
+} // namespace mof
-#pragma once\r
-#include "mof/widget/WidgetView.hpp"\r
-\r
-namespace mof\r
-{\r
-\r
-namespace widget\r
-{\r
-\r
- class NullView \r
- : \r
- public WidgetView\r
- {\r
- public:\r
- NullView();\r
- virtual ~NullView( );\r
-\r
- virtual FrameNumber show( bool imidiately = false );\r
- virtual FrameNumber hide( bool imidiately = false );\r
- virtual FrameNumber focus( bool imidiately = false );\r
- virtual FrameNumber blur( bool imidiately = false );\r
- virtual FrameNumber click( bool imidiately = false );\r
- virtual mof::Vector2D getPreferredSize() const;\r
- virtual void update( );\r
- virtual void draw( ) const;\r
- virtual void setVisible(bool visible);\r
- };\r
-\r
-}\r
-}\r
+#pragma once
+#include "mof/widget/WidgetView.hpp"
+
+namespace mof
+{
+
+namespace widget
+{
+
+ class NullView
+ :
+ public WidgetView
+ {
+ public:
+ NullView();
+ virtual ~NullView( );
+
+ virtual FrameNumber show( bool imidiately = false );
+ virtual FrameNumber hide( bool imidiately = false );
+ virtual FrameNumber focus( bool imidiately = false );
+ virtual FrameNumber blur( bool imidiately = false );
+ virtual FrameNumber click( bool imidiately = false );
+ virtual mof::Vector2D getPreferredSize() const;
+ virtual void update( );
+ virtual void draw( ) const;
+ virtual void setVisible(bool visible);
+ };
+
+}
+}
-#include <mof/widget/OverlapLayout.hpp>\r
-#include <mof/utilities.hpp>\r
-#include <mof/widgets.hpp>\r
-#include <mof/streams.hpp>\r
-#include <algorithm>\r
-#include <vector>\r
-#include <mof/ConsoleIO.hpp>\r
-\r
-using std::shared_ptr;\r
-using mof::widget::WidgetView;\r
-//{{{ Impl\r
-struct mof::widget::OverlapLayout::Impl\r
-{\r
- \r
- int width , height;\r
- size_t length;\r
- std::vector< shared_ptr<WidgetView> > views;\r
-\r
- Impl( const mof::Vector2D& size )\r
- : \r
- width(size.x) , height(size.y) , length(0)\r
- {}\r
- \r
-\r
- ~Impl()\r
- {\r
- }\r
-};\r
-//}}}\r
-//{{{ OverlapLayout\r
-mof::widget::OverlapLayout::OverlapLayout( const mof::Vector2D& size )\r
-: m_pImpl( new Impl( size ) )\r
-{\r
-}\r
-//}}}\r
-//{{{ ~OverlapLayout\r
-mof::widget::OverlapLayout::~OverlapLayout( )\r
-{\r
-}\r
-//}}}\r
-//{{{ add\r
-void mof::widget::OverlapLayout::add(shared_ptr<WidgetView> pView)\r
-{\r
- /*if(m_pImpl->length == 0 ){\r
- m_pImpl->width = mof::real2int(size.x);\r
- m_pImpl->width = mof::real2int(size.y);\r
- }*/\r
- m_pImpl->length++;\r
- m_pImpl->views.push_back(pView);\r
-}\r
-//}}}\r
-//{{{ getLength\r
-size_t mof::widget::OverlapLayout::getLength() const\r
-{\r
- return m_pImpl->length;\r
-}\r
-//}}}\r
-//{{{ getPreferredSize\r
-mof::Vector2D mof::widget::OverlapLayout::getPreferredSize() const\r
-{\r
- return mof::Vector2D(m_pImpl->width , m_pImpl->height);\r
-}\r
-//}}}\r
-//{{{ connect\r
-void mof::widget::OverlapLayout::connect(WidgetView* pParentView) \r
-{\r
- size_t i = 0;\r
- foreach(shared_ptr<WidgetView> pView , m_pImpl->views) \r
- {\r
- pView->getPositionStream() << pParentView->getPositionStream();\r
- pView->getSizeStream() << pParentView->getSizeStream() << - pView->getSizeStream().value();\r
- }\r
-}\r
-//}}}\r
-//{{{ getAdjacencyAsUp\r
-int mof::widget::OverlapLayout::getAdjacencyAsUp(int index) const\r
-{\r
- return mof::rotation_mod(index-1 , m_pImpl->length);\r
-}\r
-//}}}\r
-//{{{ getAdjacencyAsDown\r
-int mof::widget::OverlapLayout::getAdjacencyAsDown(int index) const\r
-{\r
- return mof::rotation_mod(index+1 , m_pImpl->length );\r
-}\r
-//}}}\r
-//{{{ getAdjacencyAsLeft\r
-int mof::widget::OverlapLayout::getAdjacencyAsLeft(int index) const\r
-{\r
- return mof::rotation_mod(index-1 , m_pImpl->length );\r
-}\r
-//}}}\r
-//{{{ getAdjacencyAsRight\r
-int mof::widget::OverlapLayout::getAdjacencyAsRight(int index) const\r
-{\r
- return mof::rotation_mod(index+1 , m_pImpl->length );\r
-}\r
-//}}}\r
+#include <mof/widget/OverlapLayout.hpp>
+#include <mof/utilities.hpp>
+#include <mof/widgets.hpp>
+#include <mof/streams.hpp>
+#include <algorithm>
+#include <vector>
+#include <mof/ConsoleIO.hpp>
+
+using std::shared_ptr;
+using mof::widget::WidgetView;
+//{{{ Impl
+struct mof::widget::OverlapLayout::Impl
+{
+
+ int width , height;
+ size_t length;
+ std::vector< shared_ptr<WidgetView> > views;
+
+ Impl( const mof::Vector2D& size )
+ :
+ width(size.x) , height(size.y) , length(0)
+ {}
+
+
+ ~Impl()
+ {
+ }
+};
+//}}}
+//{{{ OverlapLayout
+mof::widget::OverlapLayout::OverlapLayout( const mof::Vector2D& size )
+: m_pImpl( new Impl( size ) )
+{
+}
+//}}}
+//{{{ ~OverlapLayout
+mof::widget::OverlapLayout::~OverlapLayout( )
+{
+}
+//}}}
+//{{{ add
+void mof::widget::OverlapLayout::add(shared_ptr<WidgetView> pView)
+{
+ /*if(m_pImpl->length == 0 ){
+ m_pImpl->width = mof::real2int(size.x);
+ m_pImpl->width = mof::real2int(size.y);
+ }*/
+ m_pImpl->length++;
+ m_pImpl->views.push_back(pView);
+}
+//}}}
+//{{{ getLength
+size_t mof::widget::OverlapLayout::getLength() const
+{
+ return m_pImpl->length;
+}
+//}}}
+//{{{ getPreferredSize
+mof::Vector2D mof::widget::OverlapLayout::getPreferredSize() const
+{
+ return mof::Vector2D(m_pImpl->width , m_pImpl->height);
+}
+//}}}
+//{{{ connect
+void mof::widget::OverlapLayout::connect(WidgetView* pParentView)
+{
+ size_t i = 0;
+ foreach(shared_ptr<WidgetView> pView , m_pImpl->views)
+ {
+ pView->getPositionStream() << pParentView->getPositionStream();
+ pView->getSizeStream() << pParentView->getSizeStream() << - pView->getSizeStream().value();
+ }
+}
+//}}}
+//{{{ getAdjacencyAsUp
+int mof::widget::OverlapLayout::getAdjacencyAsUp(int index) const
+{
+ return mof::rotation_mod(index-1 , m_pImpl->length);
+}
+//}}}
+//{{{ getAdjacencyAsDown
+int mof::widget::OverlapLayout::getAdjacencyAsDown(int index) const
+{
+ return mof::rotation_mod(index+1 , m_pImpl->length );
+}
+//}}}
+//{{{ getAdjacencyAsLeft
+int mof::widget::OverlapLayout::getAdjacencyAsLeft(int index) const
+{
+ return mof::rotation_mod(index-1 , m_pImpl->length );
+}
+//}}}
+//{{{ getAdjacencyAsRight
+int mof::widget::OverlapLayout::getAdjacencyAsRight(int index) const
+{
+ return mof::rotation_mod(index+1 , m_pImpl->length );
+}
+//}}}
-#pragma once\r
-#include <memory>\r
-#include <mof/widget/Layout.hpp>\r
-\r
-namespace mof\r
-{\r
-namespace widget\r
-{\r
-\r
- class OverlapLayout : public Layout\r
- {\r
- public:\r
-\r
- OverlapLayout( const mof::Vector2D& size );\r
- virtual ~OverlapLayout();\r
- virtual void add(std::shared_ptr<WidgetView> pView);\r
- virtual Vector2D getPreferredSize() const;\r
- virtual void connect(WidgetView* pParentView);\r
- virtual size_t getLength( ) const;\r
- virtual int getAdjacencyAsUp(int index) const;\r
- virtual int getAdjacencyAsDown(int index) const;\r
- virtual int getAdjacencyAsLeft(int index) const;\r
- virtual int getAdjacencyAsRight(int index) const;\r
-\r
- private:\r
- struct Impl;\r
- std::unique_ptr<Impl> m_pImpl;\r
- };\r
-\r
-}\r
-} // namepsace mof\r
-\r
+#pragma once
+#include <memory>
+#include <mof/widget/Layout.hpp>
+
+namespace mof
+{
+namespace widget
+{
+
+ class OverlapLayout : public Layout
+ {
+ public:
+
+ OverlapLayout( const mof::Vector2D& size );
+ virtual ~OverlapLayout();
+ virtual void add(std::shared_ptr<WidgetView> pView);
+ virtual Vector2D getPreferredSize() const;
+ virtual void connect(WidgetView* pParentView);
+ virtual size_t getLength( ) const;
+ virtual int getAdjacencyAsUp(int index) const;
+ virtual int getAdjacencyAsDown(int index) const;
+ virtual int getAdjacencyAsLeft(int index) const;
+ virtual int getAdjacencyAsRight(int index) const;
+
+ private:
+ struct Impl;
+ std::unique_ptr<Impl> m_pImpl;
+ };
+
+}
+} // namepsace mof
+
-#pragma once\r
-#include <memory>\r
-#include <vector>\r
-#include <mof/tstring.hpp>\r
-\r
-namespace mof\r
-{\r
-namespace widget\r
-{\r
- class WidgetView;\r
-\r
- /**\r
- * @note 継承禁止 , immutable\r
- */\r
- struct Page \r
- {\r
- private:\r
- std::shared_ptr<mof::widget::WidgetView> view_;\r
- tstring text_;\r
- \r
- public:\r
- Page\r
- (\r
- const std::shared_ptr<mof::widget::WidgetView>& view ,\r
- const tstring& text\r
- ) : view_(view) , text_(text)\r
- {}\r
-\r
- ~Page(){};\r
-\r
- const std::shared_ptr<mof::widget::WidgetView>& view() const { return view_; }\r
- const tstring& text() const { return text_; }\r
- \r
- };// struct Page\r
-\r
-}// namespace widget\r
-}// namespace mof\r
+#pragma once
+#include <memory>
+#include <vector>
+#include <mof/tstring.hpp>
+
+namespace mof
+{
+namespace widget
+{
+ class WidgetView;
+
+ /**
+ * @note 継承禁止 , immutable
+ */
+ struct Page
+ {
+ private:
+ std::shared_ptr<mof::widget::WidgetView> view_;
+ tstring text_;
+
+ public:
+ Page
+ (
+ const std::shared_ptr<mof::widget::WidgetView>& view ,
+ const tstring& text
+ ) : view_(view) , text_(text)
+ {}
+
+ ~Page(){};
+
+ const std::shared_ptr<mof::widget::WidgetView>& view() const { return view_; }
+ const tstring& text() const { return text_; }
+
+ };// struct Page
+
+}// namespace widget
+}// namespace mof
-#include <mof/widget/WidgetView.hpp>\r
-#include <mof/widget/Pager.hpp>\r
-#include <deque>\r
-#include <memory>\r
-#include <mof/widget/NullView.hpp>\r
-#include <mof/utilities.hpp>\r
-\r
-namespace mof\r
-{\r
-namespace widget\r
-{\r
- struct Pager::Impl\r
- {\r
- std::deque<Page> pageQueue; \r
-\r
- Impl()\r
- {\r
- pageQueue.push_back(Page(std::make_shared<NullView>(), ""));\r
- }\r
-\r
- ~Impl(){}\r
- };\r
-\r
-//{{{ constructor\r
- Pager::Pager()\r
- : pImpl_(new Impl)\r
- {\r
- }\r
-//}}}\r
-//{{{ destructor\r
- Pager::~Pager()\r
- {\r
- }\r
-//}}}\r
-//{{{ getPage\r
- const Page& Pager::getPage() const\r
- {\r
- return pImpl_->pageQueue.front();\r
- }\r
-//}}}\r
-//{{{ getPage\r
- Page& Pager::getPage()\r
- {\r
- return pImpl_->pageQueue.front();\r
- }\r
-//}}}\r
-//{{{ addPage\r
- void Pager::addPage( const Page& page )\r
- {\r
- pImpl_->pageQueue.push_back(page);\r
- }\r
-//}}}\r
-//{{{ next\r
- void Pager::next()\r
- {\r
- pImpl_->pageQueue.pop_front();\r
- }\r
-//}}}\r
-//{{{ size\r
- size_t Pager::size() const\r
- {\r
- return pImpl_->pageQueue.size();\r
- }\r
-//}}}\r
-\r
-}// namespace widget\r
-}// namespace mof\r
-\r
+#include <mof/widget/WidgetView.hpp>
+#include <mof/widget/Pager.hpp>
+#include <deque>
+#include <memory>
+#include <mof/widget/NullView.hpp>
+#include <mof/utilities.hpp>
+
+namespace mof
+{
+namespace widget
+{
+ struct Pager::Impl
+ {
+ std::deque<Page> pageQueue;
+
+ Impl()
+ {
+ pageQueue.push_back(Page(std::make_shared<NullView>(), ""));
+ }
+
+ ~Impl(){}
+ };
+
+//{{{ constructor
+ Pager::Pager()
+ : pImpl_(new Impl)
+ {
+ }
+//}}}
+//{{{ destructor
+ Pager::~Pager()
+ {
+ }
+//}}}
+//{{{ getPage
+ const Page& Pager::getPage() const
+ {
+ return pImpl_->pageQueue.front();
+ }
+//}}}
+//{{{ getPage
+ Page& Pager::getPage()
+ {
+ return pImpl_->pageQueue.front();
+ }
+//}}}
+//{{{ addPage
+ void Pager::addPage( const Page& page )
+ {
+ pImpl_->pageQueue.push_back(page);
+ }
+//}}}
+//{{{ next
+ void Pager::next()
+ {
+ pImpl_->pageQueue.pop_front();
+ }
+//}}}
+//{{{ size
+ size_t Pager::size() const
+ {
+ return pImpl_->pageQueue.size();
+ }
+//}}}
+
+}// namespace widget
+}// namespace mof
+
-#pragma once\r
-#include <mof/widget/Page.hpp>\r
-#include <boost/scoped_ptr.hpp>\r
-\r
-namespace mof\r
-{\r
-namespace widget\r
-{\r
-\r
-\r
- class Pager \r
- {\r
- public:\r
- Pager();\r
- virtual ~Pager();\r
- const Page& getPage( ) const;\r
- Page& getPage( );\r
- void addPage( const Page& page );\r
- void next();\r
- size_t size() const;\r
- protected:\r
- struct Impl;\r
- boost::scoped_ptr<Impl> pImpl_;\r
- };\r
-\r
-}\r
-} // namespace mof\r
+#pragma once
+#include <mof/widget/Page.hpp>
+#include <boost/scoped_ptr.hpp>
+
+namespace mof
+{
+namespace widget
+{
+
+
+ class Pager
+ {
+ public:
+ Pager();
+ virtual ~Pager();
+ const Page& getPage( ) const;
+ Page& getPage( );
+ void addPage( const Page& page );
+ void next();
+ size_t size() const;
+ protected:
+ struct Impl;
+ boost::scoped_ptr<Impl> pImpl_;
+ };
+
+}
+} // namespace mof
-#include <mof/widget/RectangleView.hpp>\r
-#include "mof/mofGraphics.hpp"\r
-#include "mof/Font.hpp"\r
-#include "mof/utilities.hpp"\r
-#include "mof/widgets.hpp"\r
-#include "mof/streams.hpp"\r
- \r
-namespace mof\r
-{\r
-namespace widget\r
-{\r
-//{{{ struct Impl\r
- struct RectangleView::Impl\r
- {\r
- mof::Vector2D preferredSize_;\r
- bool visible_;\r
- \r
- Impl( )\r
- : visible_(true)\r
- {\r
- }\r
- \r
- ~Impl()\r
- {\r
- }\r
- \r
- };\r
-//}}}\r
-//{{{ constructor\r
- RectangleView::RectangleView(const mof::Vector2D& scale, mof::Color color)\r
- : \r
- pImpl_( new Impl ) \r
- {\r
- pImpl_->preferredSize_ = scale;\r
- m_sizeStream << scale;\r
- m_colorStream << mof::Color4f(color);\r
- }\r
-//}}}\r
-//{{{ destructor\r
- RectangleView::~RectangleView()\r
- {\r
- }\r
-//}}}\r
-//{{{ update\r
- void RectangleView::update( )\r
- {\r
- m_positionStream.update( );\r
- m_sizeStream.update( );\r
- m_colorStream.update( );\r
- }\r
-//}}}\r
-//{{{ draw\r
- void RectangleView::draw( ) const\r
- {\r
- if (!pImpl_->visible_) return;\r
- static VertexXYZRHWC vertices[4];\r
- \r
- Color color = m_colorStream.value( ).toColorCode( );\r
- \r
- Vector2D position = m_positionStream.value( );\r
- Vector2D size = m_sizeStream.value( );\r
- Vector2D begin = Vector2D( position.x , position.y );\r
- Vector2D end = begin + Vector2D( size.x , size.y );\r
- \r
- vertices[0].x = static_cast<float>(begin.x);\r
- vertices[0].y = static_cast<float>(begin.y);\r
- vertices[0].z = 0;\r
- vertices[0].rhw = 1;\r
- vertices[0].color = color;\r
-\r
- vertices[1].x = static_cast<float>(end.x);\r
- vertices[1].y = static_cast<float>(begin.y);\r
- vertices[1].z = 0;\r
- vertices[1].rhw = 1;\r
- vertices[1].color = color;\r
-\r
- vertices[2].x = static_cast<float>(begin.x);\r
- vertices[2].y = static_cast<float>(end.y);\r
- vertices[2].z = 0;\r
- vertices[2].rhw = 1;\r
- vertices[2].color = color;\r
-\r
- vertices[3].x = static_cast<float>(end.x);\r
- vertices[3].y = static_cast<float>(end.y);\r
- vertices[3].z = 0;\r
- vertices[3].rhw = 1;\r
- vertices[3].color = color;\r
-\r
- GraphicsDevice::setTexture(NULL);\r
- GraphicsDevice::drawVertexArray(vertices[0] , vertices[3] , PRIMITIVE_TYPE_TRIANGLESTRIP);\r
- \r
- }\r
-//}}}\r
-//{{{ setVisible\r
- void RectangleView::setVisible(bool visible)\r
- {\r
- pImpl_->visible_ = visible;\r
- }\r
-//}}}\r
-//{{{ show\r
- FrameNumber RectangleView::show(bool) \r
- {\r
- return 0;\r
- }\r
-//}}}\r
-//{{{ hide\r
- FrameNumber RectangleView::hide(bool)\r
- {\r
- return 0;\r
- }\r
-//}}}\r
-//{{{ focus\r
- FrameNumber RectangleView::focus(bool) \r
- {\r
- return 0;\r
- }\r
-//}}}\r
-//{{{ blur\r
- FrameNumber RectangleView::blur(bool imidiately)\r
- {\r
- return 0;\r
- }\r
-//}}}\r
-//{{{ click\r
- FrameNumber RectangleView::click(bool)\r
- {\r
- return 0;\r
- }\r
-//}}}\r
-//{{{ click\r
- mof::Vector2D RectangleView::getPreferredSize() const\r
- {\r
- return pImpl_->preferredSize_;\r
- }\r
-//}}}\r
-}\r
-} // namespace mof\r
+#include <mof/widget/RectangleView.hpp>
+#include "mof/mofGraphics.hpp"
+#include "mof/Font.hpp"
+#include "mof/utilities.hpp"
+#include "mof/widgets.hpp"
+#include "mof/streams.hpp"
+
+namespace mof
+{
+namespace widget
+{
+//{{{ struct Impl
+ struct RectangleView::Impl
+ {
+ mof::Vector2D preferredSize_;
+ bool visible_;
+
+ Impl( )
+ : visible_(true)
+ {
+ }
+
+ ~Impl()
+ {
+ }
+
+ };
+//}}}
+//{{{ constructor
+ RectangleView::RectangleView(const mof::Vector2D& scale, mof::Color color)
+ :
+ pImpl_( new Impl )
+ {
+ pImpl_->preferredSize_ = scale;
+ m_sizeStream << scale;
+ m_colorStream << mof::Color4f(color);
+ }
+//}}}
+//{{{ destructor
+ RectangleView::~RectangleView()
+ {
+ }
+//}}}
+//{{{ update
+ void RectangleView::update( )
+ {
+ m_positionStream.update( );
+ m_sizeStream.update( );
+ m_colorStream.update( );
+ }
+//}}}
+//{{{ draw
+ void RectangleView::draw( ) const
+ {
+ if (!pImpl_->visible_) return;
+ static VertexXYZRHWC vertices[4];
+
+ Color color = m_colorStream.value( ).toColorCode( );
+
+ Vector2D position = m_positionStream.value( );
+ Vector2D size = m_sizeStream.value( );
+ Vector2D begin = Vector2D( position.x , position.y );
+ Vector2D end = begin + Vector2D( size.x , size.y );
+
+ vertices[0].x = static_cast<float>(begin.x);
+ vertices[0].y = static_cast<float>(begin.y);
+ vertices[0].z = 0;
+ vertices[0].rhw = 1;
+ vertices[0].color = color;
+
+ vertices[1].x = static_cast<float>(end.x);
+ vertices[1].y = static_cast<float>(begin.y);
+ vertices[1].z = 0;
+ vertices[1].rhw = 1;
+ vertices[1].color = color;
+
+ vertices[2].x = static_cast<float>(begin.x);
+ vertices[2].y = static_cast<float>(end.y);
+ vertices[2].z = 0;
+ vertices[2].rhw = 1;
+ vertices[2].color = color;
+
+ vertices[3].x = static_cast<float>(end.x);
+ vertices[3].y = static_cast<float>(end.y);
+ vertices[3].z = 0;
+ vertices[3].rhw = 1;
+ vertices[3].color = color;
+
+ GraphicsDevice::setTexture(NULL);
+ GraphicsDevice::drawVertexArray(vertices[0] , vertices[3] , PRIMITIVE_TYPE_TRIANGLESTRIP);
+
+ }
+//}}}
+//{{{ setVisible
+ void RectangleView::setVisible(bool visible)
+ {
+ pImpl_->visible_ = visible;
+ }
+//}}}
+//{{{ show
+ FrameNumber RectangleView::show(bool)
+ {
+ return 0;
+ }
+//}}}
+//{{{ hide
+ FrameNumber RectangleView::hide(bool)
+ {
+ return 0;
+ }
+//}}}
+//{{{ focus
+ FrameNumber RectangleView::focus(bool)
+ {
+ return 0;
+ }
+//}}}
+//{{{ blur
+ FrameNumber RectangleView::blur(bool imidiately)
+ {
+ return 0;
+ }
+//}}}
+//{{{ click
+ FrameNumber RectangleView::click(bool)
+ {
+ return 0;
+ }
+//}}}
+//{{{ click
+ mof::Vector2D RectangleView::getPreferredSize() const
+ {
+ return pImpl_->preferredSize_;
+ }
+//}}}
+}
+} // namespace mof
-#pragma once\r
-#include "mof/widget/WidgetView.hpp"\r
-#include <memory>\r
-\r
-namespace mof\r
-{\r
- class Font;\r
-\r
-namespace widget\r
-{\r
-\r
- class RectangleView \r
- : \r
- public WidgetView\r
- {\r
- public:\r
- RectangleView(const mof::Vector2D& scale, mof::Color color);\r
- virtual ~RectangleView( );\r
-\r
- virtual FrameNumber show( bool imidiately = false );\r
- virtual FrameNumber hide( bool imidiately = false );\r
- virtual FrameNumber focus( bool imidiately = false );\r
- virtual FrameNumber blur( bool imidiately = false );\r
- virtual FrameNumber click( bool imidiately = false );\r
- virtual mof::Vector2D getPreferredSize() const;\r
- virtual void update( );\r
- virtual void draw( ) const;\r
- virtual void setVisible(bool visible);\r
-\r
- private:\r
- struct Impl;\r
- std::unique_ptr<Impl> pImpl_;\r
- };\r
-\r
-}// namespace widget\r
-}// namespace mof\r
-\r
+#pragma once
+#include "mof/widget/WidgetView.hpp"
+#include <memory>
+
+namespace mof
+{
+ class Font;
+
+namespace widget
+{
+
+ class RectangleView
+ :
+ public WidgetView
+ {
+ public:
+ RectangleView(const mof::Vector2D& scale, mof::Color color);
+ virtual ~RectangleView( );
+
+ virtual FrameNumber show( bool imidiately = false );
+ virtual FrameNumber hide( bool imidiately = false );
+ virtual FrameNumber focus( bool imidiately = false );
+ virtual FrameNumber blur( bool imidiately = false );
+ virtual FrameNumber click( bool imidiately = false );
+ virtual mof::Vector2D getPreferredSize() const;
+ virtual void update( );
+ virtual void draw( ) const;
+ virtual void setVisible(bool visible);
+
+ private:
+ struct Impl;
+ std::unique_ptr<Impl> pImpl_;
+ };
+
+}// namespace widget
+}// namespace mof
+
-#include "mof/widget/TextCompiler.hpp"\r
-#include "mof/widget/WidgetView.hpp"\r
-#include <algorithm>\r
-#include <boost/regex.hpp>\r
-#include <memory>\r
-#include "mof/ConsoleIO.hpp"\r
-#include "mof/Sprite.hpp"\r
-#include "mof/Font.hpp"\r
-#include "mof/widget/Page.hpp"\r
-#include "mof/widget/GridLayout.hpp"\r
-#include "mof/widget/flow_layout.hpp"\r
-#include "mof/widget/Container.hpp"\r
-#include "mof/streams.hpp"\r
-#include "mof/widget/mofml_parser.hpp"\r
-\r
-namespace {\r
-//{{{ PageBehaviorSettings\r
- struct PageBehaviorSettings\r
- {\r
- mof::Manipulator<mof::Vector2D>::Handler position;\r
- mof::Manipulator<mof::Color4f>::Handler color;\r
- mof::FrameNumber periodOfPosition;\r
- mof::FrameNumber periodOfColor;\r
-\r
- std::shared_ptr<PageBehaviorSettings> clone()\r
- {\r
- std::shared_ptr<PageBehaviorSettings> p = std::make_shared<PageBehaviorSettings>();\r
- p->periodOfPosition = periodOfPosition;\r
- p->periodOfColor = periodOfColor;\r
- p->position = position;\r
- p->color = color;\r
- return p;\r
- }\r
- };\r
-//}}}\r
- class SpriteWidgetViewAdapter : public mof::widget::WidgetView\r
- {\r
- std::unique_ptr<mof::Sprite> pSprite_;\r
- mof::Vector2D preferredSize_;\r
- std::shared_ptr<const PageBehaviorSettings> openSettings_;\r
- std::shared_ptr<const PageBehaviorSettings> closeSettings_;\r
- mof::ReferenceWrapper<mof::Vector2D> positionWrapper_;\r
- mof::ReferenceWrapper<mof::Color4f> colorWrapper_;\r
- public:\r
-//{{{ constructor\r
- SpriteWidgetViewAdapter\r
- (\r
- std::unique_ptr<mof::Sprite>&& pSprite,\r
- std::shared_ptr<const PageBehaviorSettings> openSettings,\r
- std::shared_ptr<const PageBehaviorSettings> closeSettings\r
- )\r
- : pSprite_(std::move(pSprite)), openSettings_(openSettings), closeSettings_(closeSettings)\r
- {\r
- pSprite_->setVisible(true);\r
- pSprite_->getPositionStream() << m_positionStream << positionWrapper_.makeRef(mof::Vector2D(0, 0));\r
- pSprite_->getColorStream() << m_colorStream << colorWrapper_.makeRef(mof::Color4f(0, 1, 1, 1));\r
- preferredSize_ = pSprite_->getSizeStream().value();\r
- m_sizeStream << preferredSize_;\r
- }\r
-//}}}\r
-//{{{ destructor\r
- virtual ~SpriteWidgetViewAdapter(){}\r
-//}}}\r
-//{{{ show\r
- virtual mof::FrameNumber show(bool immidiately)\r
- {\r
- /*if (immidiately) {\r
- positionWrapper_.replace(openSettings_->periodOfPosition, openSettings_->position);\r
- colorWrapper_.replace(openSettings_->periodOfColor, openSettings_->color);\r
- return 0;\r
- }*/\r
- positionWrapper_.replace(0, getPositionStream(), openSettings_->position);\r
- colorWrapper_.replace(0, getColorStream(), openSettings_->color);\r
- return max(openSettings_->periodOfPosition, openSettings_->periodOfColor);\r
- }\r
-//}}}\r
-//{{{ hide\r
- virtual mof::FrameNumber hide(bool immidiately)\r
- {\r
- /*if (immidiately) {\r
- positionWrapper_.replace(closeSettings_->periodOfPosition, closeSettings_->position);\r
- colorWrapper_.replace(closeSettings_->periodOfColor, closeSettings_->color);\r
- return 0;\r
- }*/\r
- positionWrapper_.replace(0, getPositionStream(), closeSettings_->position);\r
- colorWrapper_.replace(0, getColorStream(), closeSettings_->color);\r
- return max(closeSettings_->periodOfPosition, closeSettings_->periodOfColor);\r
- }\r
-//}}}\r
-//{{{ focus\r
- virtual mof::FrameNumber focus(bool immidiately){ return show(immidiately); }\r
-//}}}\r
-//{{{ blur\r
- virtual mof::FrameNumber blur(bool immidiately){ return hide(immidiately); }\r
-//}}}\r
-//{{{ click\r
- virtual mof::FrameNumber click(bool){return 0;}\r
-//}}}\r
-//{{{ getPreferredSize\r
- virtual mof::Vector2D getPreferredSize() const { return preferredSize_; }\r
-//}}} \r
-//{{{ update\r
- void update()\r
- {\r
- m_positionStream.update();\r
- m_sizeStream.update();\r
- m_colorStream.update();\r
- pSprite_->getPositionStream().update();\r
- pSprite_->getSizeStream().update();\r
- pSprite_->getColorStream().update();\r
- pSprite_->getRectangleCoordinatesStream().update();\r
- }\r
-//}}}\r
-//{{{ draw\r
- void draw() const { pSprite_->draw(); }\r
-//}}} \r
-//{{{ setVisible\r
- void setVisible(bool visible) { pSprite_->setVisible(visible); }\r
-//}}} \r
- };\r
-\r
-\r
-}\r
-\r
-namespace mof\r
-{\r
-namespace widget\r
-{\r
-//{{{ Impl\r
- struct TextCompiler::Impl\r
- {\r
- mof::Font font_;\r
- std::shared_ptr<PageBehaviorSettings> openSettings_;\r
- std::shared_ptr<PageBehaviorSettings> closeSettings_;\r
- boost::function<mof::Texture::ptr (const mof::tstring&)> texture_factory_;\r
- mof::widget::mofml_parser parser;\r
-//{{{ constructor\r
- Impl(const mof::Font& font)\r
- : font_(font)\r
- {\r
- openSettings_ = std::make_shared<PageBehaviorSettings>();\r
- closeSettings_ = std::make_shared<PageBehaviorSettings>();\r
-\r
- openSettings_->position = closeSettings_->position = mof::makeConstantHandler(mof::Vector2D(0, 0));\r
- openSettings_->color = mof::makeConstantHandler(mof::Color4f(1, 1, 1, 1));\r
- closeSettings_->color = mof::makeConstantHandler(mof::Color4f(0, 1, 1, 1));\r
- openSettings_->periodOfPosition = openSettings_->periodOfColor = 0;\r
- closeSettings_->periodOfPosition = closeSettings_->periodOfColor = 0;\r
- }\r
-//}}}\r
-//{{{ make_line_widget_\r
- mof::widget::WidgetView::ptr make_line_widget_(const std::vector<mof::widget::WidgetView::ptr>& widgets_on_a_line) \r
- {\r
- if (widgets_on_a_line.size() == 1) {\r
- return widgets_on_a_line.front();\r
- }\r
- else {\r
- WidgetView::ptr p = std::make_shared<Container>\r
- (\r
- widgets_on_a_line.front(), widgets_on_a_line.back() ,\r
- mof::makeFactoryMethod<GridLayout>(GridLayout::HORIZONTAL , 0 )\r
- );\r
- return p;\r
- }\r
- }\r
-//}}}\r
-//{{{ make_layout_widget_\r
- mof::widget::WidgetView::ptr make_layout_widget_\r
- (\r
- const std::vector<mof::widget::WidgetView::ptr>& widgets_in_layout, \r
- const mof::widget::mofml_parser::layout_end_node& layout_node\r
- ) \r
- { \r
- using namespace mof::widget;\r
-\r
- flow_layout::xalign xa = layout_node.xalign;\r
- flow_layout::yalign ya = layout_node.yalign;\r
- size_t width = layout_node.width;\r
- size_t height = layout_node.height;\r
- WidgetView::ptr p = std::make_shared<Container>\r
- (\r
- widgets_in_layout.front(), widgets_in_layout.back() ,\r
- mof::makeFactoryMethod<flow_layout>(xa, ya, width, height)\r
- );\r
- return p;\r
- }\r
-//}}}\r
-//{{{ recursive\r
- void recursive // TODO 改名\r
- (\r
- const mof::tstring& text,\r
- std::vector<mof::widget::WidgetView::ptr>& result,\r
- const mof::Font& font\r
- )\r
- {\r
- using namespace std;\r
- using namespace mof::widget;\r
-\r
- parser.set_text(text);\r
- mof::font_context context;\r
- std::vector<std::vector<mof::widget::WidgetView::ptr>> layout_widgets(1);\r
-\r
- while (parser.has_next_node()) {\r
- mofml_parser::node node = parser.next_node();\r
- // ノードの内容を解釈してコンテキストに変換\r
- if (node.which() == mofml_parser::TEXT) {\r
- auto& text_node = boost::get<mofml_parser::text_node>(node);\r
- context.font_color = text_node.font_color;\r
- std::unique_ptr<mof::Sprite> pSprite\r
- (\r
- mof::Sprite::createTextSprite(mof::Font(font.name().c_str(), font.size(), context), text_node.text)\r
- );\r
- auto p = std::make_shared<SpriteWidgetViewAdapter>(std::move(pSprite), openSettings_, closeSettings_);\r
- layout_widgets.back().push_back(p);// 新しいノードを積む\r
- }\r
- else if (node.which() == mofml_parser::IMAGE) {\r
- auto& image_node = boost::get<mofml_parser::image_node>(node);\r
- std::unique_ptr<mof::Sprite> pSprite\r
- (\r
- new Sprite\r
- (\r
- Rectangle<int>(0, 0, image_node.width, image_node.height), \r
- texture_factory_(image_node.src),\r
- image_node.t_rect\r
- )\r
- );\r
- auto p = std::make_shared<SpriteWidgetViewAdapter>(std::move(pSprite), openSettings_, closeSettings_);\r
- layout_widgets.back().push_back(p);// 新しいノードを積む\r
- }\r
- else if (node.which() == mofml_parser::NEW_LINE || node.which() == mofml_parser::END) {\r
- if (!layout_widgets[0].empty()) {\r
- // 1行分のウィジェットをまとめて、横方向に配置\r
- result.push_back(make_line_widget_(layout_widgets[0]));\r
- layout_widgets[0].clear();\r
- }\r
- }\r
- else if (node.which() == mofml_parser::LAYOUT_START) {\r
- layout_widgets.push_back(std::vector<mof::widget::WidgetView::ptr>());\r
- }\r
- else if (node.which() == mofml_parser::LAYOUT_END) {\r
- auto& layout_node = boost::get<mofml_parser::layout_end_node>(node);\r
- auto& widgets = layout_widgets.back();\r
- if (!widgets.empty()) (++layout_widgets.rbegin())->push_back(make_layout_widget_(widgets, layout_node));\r
- layout_widgets.pop_back();\r
- }\r
-\r
- }\r
-\r
- }\r
-//}}} \r
- };\r
-//}}}\r
-//{{{ constructor\r
- TextCompiler::TextCompiler(const mof::Font& font)\r
- : pImpl_(new Impl(font))\r
- { \r
- pImpl_->texture_factory_ = [](const mof::tstring& path){ return std::make_shared<mof::Texture>(path); };\r
- }\r
-//}}}\r
-//{{{ constructor\r
- TextCompiler::TextCompiler(const mof::Font& font, const boost::function<mof::Texture::ptr (const mof::tstring&)>& factory)\r
- : pImpl_(new Impl(font))\r
- { \r
- pImpl_->texture_factory_ = factory;\r
- }\r
-//}}}\r
-//{{{ destructor\r
- TextCompiler::~TextCompiler()\r
- { \r
- }\r
-//}}}\r
-//{{{ set_texture_factory\r
- void TextCompiler::set_texture_factory\r
- (\r
- const boost::function<mof::Texture::ptr (const mof::tstring&)>& factory\r
- )\r
- {\r
- pImpl_->texture_factory_ = factory;\r
- }\r
-//}}}\r
-//{{{ compile\r
- std::auto_ptr<mof::widget::Page> TextCompiler::compile(const mof::tstring& text)\r
- {\r
- using namespace mof::widget;\r
- using namespace boost;\r
- using mof::Sprite;\r
- using mof::widget::GridLayout;\r
- \r
- std::vector< std::shared_ptr<WidgetView> > result;\r
- pImpl_->recursive(text, result, pImpl_->font_);\r
- \r
- \r
- return std::auto_ptr<Page>\r
- (\r
- new Page\r
- (\r
- std::make_shared<Container>\r
- (\r
- result.front(), result.back() ,\r
- mof::makeFactoryMethod<GridLayout>(GridLayout::VERTICAL , 0 )\r
- ) ,\r
- _T("not implemented")\r
- )\r
- );\r
- }\r
-//}}}\r
-//{{{ compile_d\r
- std::auto_ptr<mof::widget::WidgetView> TextCompiler::compile_d(const mof::tstring& text)\r
- {\r
- using namespace mof::widget;\r
- using namespace boost;\r
- using mof::Sprite;\r
- using mof::widget::GridLayout;\r
- \r
- std::vector<WidgetView::ptr> result;\r
- pImpl_->recursive(text, result, pImpl_->font_);\r
- \r
- return std::auto_ptr<WidgetView>\r
- (\r
- new Container\r
- (\r
- result.front(), result.back() ,\r
- mof::makeFactoryMethod<GridLayout>(GridLayout::VERTICAL , 0 )\r
- ) \r
- );\r
- }\r
-//}}}\r
-//{{{ setBehaviorOnPosition\r
- void TextCompiler::setBehaviorOnPosition\r
- (\r
- BehaviorTarget target,\r
- mof::Manipulator<mof::Vector2D>::Handler position,\r
- FrameNumber period\r
- )\r
- {\r
- switch (target) {\r
- case TextCompiler::PAGE_OPEN : \r
- {\r
- std::shared_ptr<PageBehaviorSettings> p = pImpl_->openSettings_; \r
- p->position = position;\r
- p->periodOfPosition = period;\r
- pImpl_->openSettings_ = p;\r
- break;\r
- }\r
- case TextCompiler::PAGE_CLOSE : \r
- {\r
- std::shared_ptr<PageBehaviorSettings> p = pImpl_->closeSettings_; \r
- p->position = position;\r
- p->periodOfPosition = period;\r
- pImpl_->closeSettings_ = p;\r
- break;\r
- }\r
-\r
- }\r
- }\r
-//}}} \r
-//{{{ setBehaviorOnColor\r
- void TextCompiler::setBehaviorOnColor\r
- (\r
- BehaviorTarget target,\r
- mof::Manipulator<mof::Color4f>::Handler color,\r
- FrameNumber period\r
- )\r
- {\r
- switch (target) {\r
- case TextCompiler::PAGE_OPEN : \r
- {\r
- std::shared_ptr<PageBehaviorSettings> p = pImpl_->openSettings_; \r
- p->color = color;\r
- p->periodOfColor = period;\r
- pImpl_->openSettings_ = p;\r
- break;\r
- }\r
- case TextCompiler::PAGE_CLOSE : \r
- {\r
- std::shared_ptr<PageBehaviorSettings> p = pImpl_->closeSettings_; \r
- p->color = color;\r
- p->periodOfColor = period;\r
- pImpl_->closeSettings_ = p;\r
- break;\r
- }\r
-\r
- }\r
-\r
- }\r
-///}}}\r
-}// namespace widget\r
-}// namespace mof\r
-\r
+#include "mof/widget/TextCompiler.hpp"
+#include "mof/widget/WidgetView.hpp"
+#include <algorithm>
+#include <boost/regex.hpp>
+#include <memory>
+#include "mof/ConsoleIO.hpp"
+#include "mof/Sprite.hpp"
+#include "mof/Font.hpp"
+#include "mof/widget/Page.hpp"
+#include "mof/widget/GridLayout.hpp"
+#include "mof/widget/flow_layout.hpp"
+#include "mof/widget/Container.hpp"
+#include "mof/streams.hpp"
+#include "mof/widget/mofml_parser.hpp"
+
+namespace {
+//{{{ PageBehaviorSettings
+ struct PageBehaviorSettings
+ {
+ mof::Manipulator<mof::Vector2D>::Handler position;
+ mof::Manipulator<mof::Color4f>::Handler color;
+ mof::FrameNumber periodOfPosition;
+ mof::FrameNumber periodOfColor;
+
+ std::shared_ptr<PageBehaviorSettings> clone()
+ {
+ std::shared_ptr<PageBehaviorSettings> p = std::make_shared<PageBehaviorSettings>();
+ p->periodOfPosition = periodOfPosition;
+ p->periodOfColor = periodOfColor;
+ p->position = position;
+ p->color = color;
+ return p;
+ }
+ };
+//}}}
+ class SpriteWidgetViewAdapter : public mof::widget::WidgetView
+ {
+ std::unique_ptr<mof::Sprite> pSprite_;
+ mof::Vector2D preferredSize_;
+ std::shared_ptr<const PageBehaviorSettings> openSettings_;
+ std::shared_ptr<const PageBehaviorSettings> closeSettings_;
+ mof::ReferenceWrapper<mof::Vector2D> positionWrapper_;
+ mof::ReferenceWrapper<mof::Color4f> colorWrapper_;
+ public:
+//{{{ constructor
+ SpriteWidgetViewAdapter
+ (
+ std::unique_ptr<mof::Sprite>&& pSprite,
+ std::shared_ptr<const PageBehaviorSettings> openSettings,
+ std::shared_ptr<const PageBehaviorSettings> closeSettings
+ )
+ : pSprite_(std::move(pSprite)), openSettings_(openSettings), closeSettings_(closeSettings)
+ {
+ pSprite_->setVisible(true);
+ pSprite_->getPositionStream() << m_positionStream << positionWrapper_.makeRef(mof::Vector2D(0, 0));
+ pSprite_->getColorStream() << m_colorStream << colorWrapper_.makeRef(mof::Color4f(0, 1, 1, 1));
+ preferredSize_ = pSprite_->getSizeStream().value();
+ m_sizeStream << preferredSize_;
+ }
+//}}}
+//{{{ destructor
+ virtual ~SpriteWidgetViewAdapter(){}
+//}}}
+//{{{ show
+ virtual mof::FrameNumber show(bool immidiately)
+ {
+ /*if (immidiately) {
+ positionWrapper_.replace(openSettings_->periodOfPosition, openSettings_->position);
+ colorWrapper_.replace(openSettings_->periodOfColor, openSettings_->color);
+ return 0;
+ }*/
+ positionWrapper_.replace(0, getPositionStream(), openSettings_->position);
+ colorWrapper_.replace(0, getColorStream(), openSettings_->color);
+ return max(openSettings_->periodOfPosition, openSettings_->periodOfColor);
+ }
+//}}}
+//{{{ hide
+ virtual mof::FrameNumber hide(bool immidiately)
+ {
+ /*if (immidiately) {
+ positionWrapper_.replace(closeSettings_->periodOfPosition, closeSettings_->position);
+ colorWrapper_.replace(closeSettings_->periodOfColor, closeSettings_->color);
+ return 0;
+ }*/
+ positionWrapper_.replace(0, getPositionStream(), closeSettings_->position);
+ colorWrapper_.replace(0, getColorStream(), closeSettings_->color);
+ return max(closeSettings_->periodOfPosition, closeSettings_->periodOfColor);
+ }
+//}}}
+//{{{ focus
+ virtual mof::FrameNumber focus(bool immidiately){ return show(immidiately); }
+//}}}
+//{{{ blur
+ virtual mof::FrameNumber blur(bool immidiately){ return hide(immidiately); }
+//}}}
+//{{{ click
+ virtual mof::FrameNumber click(bool){return 0;}
+//}}}
+//{{{ getPreferredSize
+ virtual mof::Vector2D getPreferredSize() const { return preferredSize_; }
+//}}}
+//{{{ update
+ void update()
+ {
+ m_positionStream.update();
+ m_sizeStream.update();
+ m_colorStream.update();
+ pSprite_->getPositionStream().update();
+ pSprite_->getSizeStream().update();
+ pSprite_->getColorStream().update();
+ pSprite_->getRectangleCoordinatesStream().update();
+ }
+//}}}
+//{{{ draw
+ void draw() const { pSprite_->draw(); }
+//}}}
+//{{{ setVisible
+ void setVisible(bool visible) { pSprite_->setVisible(visible); }
+//}}}
+ };
+
+
+}
+
+namespace mof
+{
+namespace widget
+{
+//{{{ Impl
+ struct TextCompiler::Impl
+ {
+ mof::Font font_;
+ std::shared_ptr<PageBehaviorSettings> openSettings_;
+ std::shared_ptr<PageBehaviorSettings> closeSettings_;
+ boost::function<mof::Texture::ptr (const mof::tstring&)> texture_factory_;
+ mof::widget::mofml_parser parser;
+//{{{ constructor
+ Impl(const mof::Font& font)
+ : font_(font)
+ {
+ openSettings_ = std::make_shared<PageBehaviorSettings>();
+ closeSettings_ = std::make_shared<PageBehaviorSettings>();
+
+ openSettings_->position = closeSettings_->position = mof::makeConstantHandler(mof::Vector2D(0, 0));
+ openSettings_->color = mof::makeConstantHandler(mof::Color4f(1, 1, 1, 1));
+ closeSettings_->color = mof::makeConstantHandler(mof::Color4f(0, 1, 1, 1));
+ openSettings_->periodOfPosition = openSettings_->periodOfColor = 0;
+ closeSettings_->periodOfPosition = closeSettings_->periodOfColor = 0;
+ }
+//}}}
+//{{{ make_line_widget_
+ mof::widget::WidgetView::ptr make_line_widget_(const std::vector<mof::widget::WidgetView::ptr>& widgets_on_a_line)
+ {
+ if (widgets_on_a_line.size() == 1) {
+ return widgets_on_a_line.front();
+ }
+ else {
+ WidgetView::ptr p = std::make_shared<Container>
+ (
+ widgets_on_a_line.front(), widgets_on_a_line.back() ,
+ mof::makeFactoryMethod<GridLayout>(GridLayout::HORIZONTAL , 0 )
+ );
+ return p;
+ }
+ }
+//}}}
+//{{{ make_layout_widget_
+ mof::widget::WidgetView::ptr make_layout_widget_
+ (
+ const std::vector<mof::widget::WidgetView::ptr>& widgets_in_layout,
+ const mof::widget::mofml_parser::layout_end_node& layout_node
+ )
+ {
+ using namespace mof::widget;
+
+ flow_layout::xalign xa = layout_node.xalign;
+ flow_layout::yalign ya = layout_node.yalign;
+ size_t width = layout_node.width;
+ size_t height = layout_node.height;
+ WidgetView::ptr p = std::make_shared<Container>
+ (
+ widgets_in_layout.front(), widgets_in_layout.back() ,
+ mof::makeFactoryMethod<flow_layout>(xa, ya, width, height)
+ );
+ return p;
+ }
+//}}}
+//{{{ recursive
+ void recursive // TODO 改名
+ (
+ const mof::tstring& text,
+ std::vector<mof::widget::WidgetView::ptr>& result,
+ const mof::Font& font
+ )
+ {
+ using namespace std;
+ using namespace mof::widget;
+
+ parser.set_text(text);
+ mof::font_context context;
+ std::vector<std::vector<mof::widget::WidgetView::ptr>> layout_widgets(1);
+
+ while (parser.has_next_node()) {
+ mofml_parser::node node = parser.next_node();
+ // ノードの内容を解釈してコンテキストに変換
+ if (node.which() == mofml_parser::TEXT) {
+ auto& text_node = boost::get<mofml_parser::text_node>(node);
+ context.font_color = text_node.font_color;
+ std::unique_ptr<mof::Sprite> pSprite
+ (
+ mof::Sprite::createTextSprite(mof::Font(font.name().c_str(), font.size(), context), text_node.text)
+ );
+ auto p = std::make_shared<SpriteWidgetViewAdapter>(std::move(pSprite), openSettings_, closeSettings_);
+ layout_widgets.back().push_back(p);// 新しいノードを積む
+ }
+ else if (node.which() == mofml_parser::IMAGE) {
+ auto& image_node = boost::get<mofml_parser::image_node>(node);
+ std::unique_ptr<mof::Sprite> pSprite
+ (
+ new Sprite
+ (
+ Rectangle<int>(0, 0, image_node.width, image_node.height),
+ texture_factory_(image_node.src),
+ image_node.t_rect
+ )
+ );
+ auto p = std::make_shared<SpriteWidgetViewAdapter>(std::move(pSprite), openSettings_, closeSettings_);
+ layout_widgets.back().push_back(p);// 新しいノードを積む
+ }
+ else if (node.which() == mofml_parser::NEW_LINE || node.which() == mofml_parser::END) {
+ if (!layout_widgets[0].empty()) {
+ // 1行分のウィジェットをまとめて、横方向に配置
+ result.push_back(make_line_widget_(layout_widgets[0]));
+ layout_widgets[0].clear();
+ }
+ }
+ else if (node.which() == mofml_parser::LAYOUT_START) {
+ layout_widgets.push_back(std::vector<mof::widget::WidgetView::ptr>());
+ }
+ else if (node.which() == mofml_parser::LAYOUT_END) {
+ auto& layout_node = boost::get<mofml_parser::layout_end_node>(node);
+ auto& widgets = layout_widgets.back();
+ if (!widgets.empty()) (++layout_widgets.rbegin())->push_back(make_layout_widget_(widgets, layout_node));
+ layout_widgets.pop_back();
+ }
+
+ }
+
+ }
+//}}}
+ };
+//}}}
+//{{{ constructor
+ TextCompiler::TextCompiler(const mof::Font& font)
+ : pImpl_(new Impl(font))
+ {
+ pImpl_->texture_factory_ = [](const mof::tstring& path){ return std::make_shared<mof::Texture>(path); };
+ }
+//}}}
+//{{{ constructor
+ TextCompiler::TextCompiler(const mof::Font& font, const boost::function<mof::Texture::ptr (const mof::tstring&)>& factory)
+ : pImpl_(new Impl(font))
+ {
+ pImpl_->texture_factory_ = factory;
+ }
+//}}}
+//{{{ destructor
+ TextCompiler::~TextCompiler()
+ {
+ }
+//}}}
+//{{{ set_texture_factory
+ void TextCompiler::set_texture_factory
+ (
+ const boost::function<mof::Texture::ptr (const mof::tstring&)>& factory
+ )
+ {
+ pImpl_->texture_factory_ = factory;
+ }
+//}}}
+//{{{ compile
+ std::auto_ptr<mof::widget::Page> TextCompiler::compile(const mof::tstring& text)
+ {
+ using namespace mof::widget;
+ using namespace boost;
+ using mof::Sprite;
+ using mof::widget::GridLayout;
+
+ std::vector< std::shared_ptr<WidgetView> > result;
+ pImpl_->recursive(text, result, pImpl_->font_);
+
+
+ return std::auto_ptr<Page>
+ (
+ new Page
+ (
+ std::make_shared<Container>
+ (
+ result.front(), result.back() ,
+ mof::makeFactoryMethod<GridLayout>(GridLayout::VERTICAL , 0 )
+ ) ,
+ _T("not implemented")
+ )
+ );
+ }
+//}}}
+//{{{ compile_d
+ std::auto_ptr<mof::widget::WidgetView> TextCompiler::compile_d(const mof::tstring& text)
+ {
+ using namespace mof::widget;
+ using namespace boost;
+ using mof::Sprite;
+ using mof::widget::GridLayout;
+
+ std::vector<WidgetView::ptr> result;
+ pImpl_->recursive(text, result, pImpl_->font_);
+
+ return std::auto_ptr<WidgetView>
+ (
+ new Container
+ (
+ result.front(), result.back() ,
+ mof::makeFactoryMethod<GridLayout>(GridLayout::VERTICAL , 0 )
+ )
+ );
+ }
+//}}}
+//{{{ setBehaviorOnPosition
+ void TextCompiler::setBehaviorOnPosition
+ (
+ BehaviorTarget target,
+ mof::Manipulator<mof::Vector2D>::Handler position,
+ FrameNumber period
+ )
+ {
+ switch (target) {
+ case TextCompiler::PAGE_OPEN :
+ {
+ std::shared_ptr<PageBehaviorSettings> p = pImpl_->openSettings_;
+ p->position = position;
+ p->periodOfPosition = period;
+ pImpl_->openSettings_ = p;
+ break;
+ }
+ case TextCompiler::PAGE_CLOSE :
+ {
+ std::shared_ptr<PageBehaviorSettings> p = pImpl_->closeSettings_;
+ p->position = position;
+ p->periodOfPosition = period;
+ pImpl_->closeSettings_ = p;
+ break;
+ }
+
+ }
+ }
+//}}}
+//{{{ setBehaviorOnColor
+ void TextCompiler::setBehaviorOnColor
+ (
+ BehaviorTarget target,
+ mof::Manipulator<mof::Color4f>::Handler color,
+ FrameNumber period
+ )
+ {
+ switch (target) {
+ case TextCompiler::PAGE_OPEN :
+ {
+ std::shared_ptr<PageBehaviorSettings> p = pImpl_->openSettings_;
+ p->color = color;
+ p->periodOfColor = period;
+ pImpl_->openSettings_ = p;
+ break;
+ }
+ case TextCompiler::PAGE_CLOSE :
+ {
+ std::shared_ptr<PageBehaviorSettings> p = pImpl_->closeSettings_;
+ p->color = color;
+ p->periodOfColor = period;
+ pImpl_->closeSettings_ = p;
+ break;
+ }
+
+ }
+
+ }
+///}}}
+}// namespace widget
+}// namespace mof
+
-#pragma once\r
-#include "mof/widget/AbstractTextCompiler.hpp"\r
-#include "boost/scoped_ptr.hpp"\r
-#include "boost/function.hpp"\r
-#include <mof/Texture.hpp>\r
-\r
-namespace mof\r
-{\r
- class Font;\r
-namespace widget\r
-{\r
-\r
- class TextCompiler : public AbstractTextCompiler\r
- {\r
- public:\r
- TextCompiler(const mof::Font& font);\r
- TextCompiler(const mof::Font& font, const boost::function<mof::Texture::ptr (const mof::tstring&)>& factory);\r
- virtual ~TextCompiler();\r
- virtual void set_texture_factory(const boost::function<mof::Texture::ptr (const mof::tstring&)>& factory);\r
- virtual std::auto_ptr<mof::widget::Page> compile(const mof::tstring& text);\r
- virtual std::auto_ptr<mof::widget::WidgetView> compile_d(const mof::tstring& text);\r
- virtual void setBehaviorOnPosition(BehaviorTarget target, mof::Manipulator<mof::Vector2D>::Handler position, FrameNumber period);\r
- virtual void setBehaviorOnColor(BehaviorTarget target, mof::Manipulator<mof::Color4f>::Handler color, FrameNumber period);\r
-\r
- private:\r
- struct Impl;\r
- boost::scoped_ptr<Impl> pImpl_;\r
- };//class TextCompiler \r
-\r
-}// namespace widget\r
-}// namespace mof\r
+#pragma once
+#include "mof/widget/AbstractTextCompiler.hpp"
+#include "boost/scoped_ptr.hpp"
+#include "boost/function.hpp"
+#include <mof/Texture.hpp>
+
+namespace mof
+{
+ class Font;
+namespace widget
+{
+
+ class TextCompiler : public AbstractTextCompiler
+ {
+ public:
+ TextCompiler(const mof::Font& font);
+ TextCompiler(const mof::Font& font, const boost::function<mof::Texture::ptr (const mof::tstring&)>& factory);
+ virtual ~TextCompiler();
+ virtual void set_texture_factory(const boost::function<mof::Texture::ptr (const mof::tstring&)>& factory);
+ virtual std::auto_ptr<mof::widget::Page> compile(const mof::tstring& text);
+ virtual std::auto_ptr<mof::widget::WidgetView> compile_d(const mof::tstring& text);
+ virtual void setBehaviorOnPosition(BehaviorTarget target, mof::Manipulator<mof::Vector2D>::Handler position, FrameNumber period);
+ virtual void setBehaviorOnColor(BehaviorTarget target, mof::Manipulator<mof::Color4f>::Handler color, FrameNumber period);
+
+ private:
+ struct Impl;
+ boost::scoped_ptr<Impl> pImpl_;
+ };//class TextCompiler
+
+}// namespace widget
+}// namespace mof
-#pragma once\r
-#include <mof/widget/WidgetView.hpp>\r
-#include <mof/stream/Manipulator.hpp>\r
-#include <boost/utility.hpp>\r
-#include <memory>\r
-\r
-namespace mof\r
-{\r
-namespace widget\r
-{\r
-\r
- class Widget : public boost::noncopyable \r
- {\r
- public:\r
- virtual ~Widget(){}\r
- virtual FrameNumber show(bool imidiately = false) = 0;\r
- virtual FrameNumber hide(bool imidiately = false) = 0;\r
- virtual const std::shared_ptr<WidgetView> getView() const = 0;\r
- virtual std::shared_ptr<WidgetView> getView() = 0;\r
- virtual void update() = 0;\r
- };\r
-\r
-}\r
-}\r
+#pragma once
+#include <mof/widget/WidgetView.hpp>
+#include <mof/stream/Manipulator.hpp>
+#include <boost/utility.hpp>
+#include <memory>
+
+namespace mof
+{
+namespace widget
+{
+
+ class Widget : public boost::noncopyable
+ {
+ public:
+ virtual ~Widget(){}
+ virtual FrameNumber show(bool imidiately = false) = 0;
+ virtual FrameNumber hide(bool imidiately = false) = 0;
+ virtual const std::shared_ptr<WidgetView> getView() const = 0;
+ virtual std::shared_ptr<WidgetView> getView() = 0;
+ virtual void update() = 0;
+ };
+
+}
+}
-#pragma once\r
-#include "mof/Component2D.hpp"\r
-#include "mof/ColorComponent.hpp"\r
-#include "mof/Drawable.hpp"\r
-#include <memory>\r
-\r
-namespace mof\r
-{\r
-namespace widget\r
-{\r
-\r
- class WidgetView \r
- :\r
- public Component2D ,\r
- public ColorComponent ,\r
- public Drawable \r
- {\r
- public:\r
- typedef std::shared_ptr<WidgetView> ptr;\r
- virtual ~WidgetView(){};\r
-\r
- // TODO \83\8c\83C\83A\83E\83g\82Ì\83A\83j\83\81\82Æ\83C\83x\83\93\83g\8e\9e\82Ì\83A\83j\83\81\81A\82»\82ê\82¼\82ê\82Ç\82±\82Å\82Ç\82Ì\82æ\82¤\82É\90Ý\92è\82·\82é\82©\r
- // TODO \83G\83t\83F\83N\83g\82ð\8aO\82©\82ç\90Ý\92è\82Å\82«\82é\82æ\82¤\82É\82·\82é\r
- // TODO \93Á\8eê\82È\83R\83\93\83|\81[\83l\83\93\83g\82à\8aO\82©\82ç\90Ý\92è\82Å\82«\82é\82æ\82¤\82É\r
- // TODO \83X\83v\83\89\83C\83g\82Í\82Ç\82±\82ª\8e\9d\82Â\82©\r
- virtual FrameNumber show( bool imidiately = false ) = 0; \r
- virtual FrameNumber hide( bool imidiately = false ) = 0;\r
- virtual FrameNumber focus( bool imidiately = false ) = 0; \r
- virtual FrameNumber blur( bool imidiately = false ) = 0;\r
- virtual FrameNumber click( bool imidiately = false ) = 0;\r
-\r
- /**\r
- * \82±\82Ì\83I\83u\83W\83F\83N\83g\82ª\90\84\8f§\82·\82é\8f\89\8aú\83T\83C\83Y\r
- */\r
- virtual mof::Vector2D getPreferredSize() const = 0;\r
-\r
- virtual void update() = 0;\r
- virtual void draw() const = 0;\r
- virtual void setVisible(bool visible) = 0;\r
- };\r
-\r
-}\r
-}\r
+#pragma once
+#include "mof/Component2D.hpp"
+#include "mof/ColorComponent.hpp"
+#include "mof/Drawable.hpp"
+#include <memory>
+
+namespace mof
+{
+namespace widget
+{
+
+ class WidgetView
+ :
+ public Component2D ,
+ public ColorComponent ,
+ public Drawable
+ {
+ public:
+ typedef std::shared_ptr<WidgetView> ptr;
+ virtual ~WidgetView(){};
+
+ // TODO \83\8c\83C\83A\83E\83g\82Ì\83A\83j\83\81\82Æ\83C\83x\83\93\83g\8e\9e\82Ì\83A\83j\83\81\81A\82»\82ê\82¼\82ê\82Ç\82±\82Å\82Ç\82Ì\82æ\82¤\82É\90Ý\92è\82·\82é\82©
+ // TODO \83G\83t\83F\83N\83g\82ð\8aO\82©\82ç\90Ý\92è\82Å\82«\82é\82æ\82¤\82É\82·\82é
+ // TODO \93Á\8eê\82È\83R\83\93\83|\81[\83l\83\93\83g\82à\8aO\82©\82ç\90Ý\92è\82Å\82«\82é\82æ\82¤\82É
+ // TODO \83X\83v\83\89\83C\83g\82Í\82Ç\82±\82ª\8e\9d\82Â\82©
+ virtual FrameNumber show( bool imidiately = false ) = 0;
+ virtual FrameNumber hide( bool imidiately = false ) = 0;
+ virtual FrameNumber focus( bool imidiately = false ) = 0;
+ virtual FrameNumber blur( bool imidiately = false ) = 0;
+ virtual FrameNumber click( bool imidiately = false ) = 0;
+
+ /**
+ * \82±\82Ì\83I\83u\83W\83F\83N\83g\82ª\90\84\8f§\82·\82é\8f\89\8aú\83T\83C\83Y
+ */
+ virtual mof::Vector2D getPreferredSize() const = 0;
+
+ virtual void update() = 0;
+ virtual void draw() const = 0;
+ virtual void setVisible(bool visible) = 0;
+ };
+
+}
+}
-/*\r
- * $Id: expatJP.c,v 1.3 2003/11/27 05:45:17 sugoroku Exp $\r
- * expat\82Ì\93ú\96{\8cê\95¶\8e\9a\83R\81[\83h\91Î\89\9e\81B\r
- * encoding\82ÉSHIFT_JIS\82ÆEUC-JP\82ð\8ew\92è\82³\82ê\82½XML\82Ì\8f\88\97\9d\82ð\89Â\94\\82É\82·\82é\81B\r
- * \82Ü\82½UTF-8\82©\82çSHIFT_JIS\81EEUC-JP\82Ö\82Ì\95Ï\8a·\83\8b\81[\83`\83\93\82à\92ñ\8b\9f\82·\82é\81B\r
- */\r
-\r
-#include <string.h>\r
-#include <expat.h>\r
-\r
-#include <expatJP.h>\r
-\r
-/* \8e©\93®\90¶\90¬\82µ\82½JIS<->UNICODE\95Ï\8a·\83e\81[\83u\83\8b */\r
-#include "jutable.c"\r
-\r
-/**\r
- * 1\95¶\8e\9a\82ÌJIS208\82ðUNICODE\82É\95Ï\8a·\82·\82é\81B\r
- * @param ch JIS208\82Ì\95¶\8e\9a\83R\81[\83h\81B\r
- * @return \91Î\89\9e\82·\82éUNICODE\82Ì\95¶\8e\9a\83R\81[\83h\81B\91Î\89\9e\82·\82é\82à\82Ì\82ª\82È\82¯\82ê\82Î0\81B\r
- */\r
-static int JIS208toUTF16(int ch) {\r
- int c1 = (ch >> 8) & 0x7f;\r
- int c2 = ch & 0x7f;\r
- if (0x21 <= c1 && c1 <= 0x7e && 0x21 <= c2 && c2 <= 0x7e)\r
- return j2u[c1 - 0x21][c2 - 0x21];\r
- return 0;\r
-}\r
-\r
-/**\r
- * UNICODE\82É\91Î\89\9e\82·\82éJIS208\82Ì\83R\81[\83h\82ð\8c\9f\8dõ\82·\82é\81B\r
- * @param ch UNICODE\82Ì\95¶\8e\9a\83R\81[\83h\81B\r
- * @param start \8c\9f\8dõ\83\8c\83R\81[\83h\82Ì\90æ\93ª\81B\r
- * @param end \8c\9f\8dõ\83\8c\83R\81[\83h\82Ì\8fI\92[\81B\r
- * @return \91Î\89\9e\82·\82éJIS208\82Ì\95¶\8e\9a\83R\81[\83h\81B\91Î\89\9e\82·\82é\82à\82Ì\82ª\82È\82¯\82ê\82Î0\81B\r
- */\r
-static int searchJIS208(int ch, int start, int end) {\r
- int center = (start + end) / 2;\r
- if (u2j[center * 2] == ch)\r
- return u2j[center * 2 + 1];\r
- if (center == start)\r
- return 0;\r
- if (u2j[center * 2] > ch)\r
- return searchJIS208(ch, start, center);\r
- return searchJIS208(ch, center, end);\r
-}\r
-\r
-/**\r
- * 1\95¶\8e\9a\82ÌUNICODE\82ðJIS208\82É\95Ï\8a·\82·\82é\81B\r
- * @param ch UNICODE\82Ì\95¶\8e\9a\83R\81[\83h\81B\r
- * @return \91Î\89\9e\82·\82éJIS208\82Ì\95¶\8e\9a\83R\81[\83h\81B\91Î\89\9e\82·\82é\82à\82Ì\82ª\82È\82¯\82ê\82Î0\81B\r
- */\r
-static int UTF16toJIS208(int ch) {\r
- return searchJIS208(ch, 0, sizeof(u2j) / sizeof(u2j[0]) / 2);\r
-}\r
-\r
-/**\r
- * JIS201\83J\83i\82ðUNICODE\82É\95Ï\8a·\82·\82é\81B\r
- * @param ch JIS201\83J\83i\82Ì\95¶\8e\9a\83R\81[\83h\81B\r
- * @return \91Î\89\9e\82·\82éUNICODE\82Ì\95¶\8e\9a\83R\81[\83h\81B\91Î\89\9e\82·\82é\82à\82Ì\82ª\82È\82¯\82ê\82Î0\81B\r
- */\r
-static int JIS201KANAtoUTF16(int ch) {\r
- if (0xa1 <= ch && ch <= 0xdf)\r
- return ch + 0xfec0;\r
- return 0;\r
-}\r
-\r
-/**\r
- * UNICODE\82ðJIS201\83J\83i\82É\95Ï\8a·\82·\82é\81B\r
- * @param ch UNICODE\82Ì\95¶\8e\9a\83R\81[\83h\81B\r
- * @return \91Î\89\9e\82·\82éJIS201\83J\83i\82Ì\95¶\8e\9a\83R\81[\83h\81B\91Î\89\9e\82·\82é\82à\82Ì\82ª\82È\82¯\82ê\82Î0\81B\r
- */\r
-static int UTF16toJIS201KANA(int ch) {\r
- ch &= 0xffff;\r
- if (0xff61 <= ch && ch <= 0xff9f)\r
- return ch - 0xfec0;\r
- return 0;\r
-}\r
-\r
-/**\r
- * EUC-JP\82Ì\95¶\8e\9a\97ñ\82©\82ç\88ê\95¶\8e\9a\8eæ\82è\82¾\82µUNICODE\82É\95Ï\8a·\82·\82é\81B\r
- * @param s EUC-JP\82Ì\95¶\8e\9a\97ñ\81B\r
- * @param next \8e\9f\82Ì\83X\83L\83\83\83\93\88Ê\92u\82ð\8ai\94[\82·\82é\83A\83h\83\8c\83X\81BNULL\82ª\8ew\92è\82³\82ê\82½\8fê\8d\87\82Í\8ai\94[\82µ\82È\82¢\81B\r
- * @return \91Î\89\9e\82·\82éUNICODE\82Ì\95¶\8e\9a\83R\81[\83h\81B\91Î\89\9e\82·\82é\82à\82Ì\82ª\82È\82¯\82ê\82Î0\81B\r
- */\r
-static int EUCJPtoUTF16(const char* s, const char** next) {\r
- int wc = 0;\r
- if ((*s & 0x80) == 0) {\r
- wc = *s++;\r
- }else if ((unsigned char) *s == 0x8e) {\r
- if ((wc = JIS201KANAtoUTF16((unsigned char) *(s + 1))) != 0)\r
- s += 2;\r
- }else if ((wc = JIS208toUTF16(((unsigned char) *s << 8) | (unsigned char) *(s + 1))) != 0) {\r
- s += 2;\r
- }\r
- if (next != NULL)\r
- *next = s;\r
- return wc;\r
-}\r
-\r
-/**\r
- * SHIFT_JIS\82Ì\95¶\8e\9a\97ñ\82©\82ç\88ê\95¶\8e\9a\8eæ\82è\82¾\82µUNICODE\82É\95Ï\8a·\82·\82é\81B\r
- * @param s SHIFT_JIS\82Ì\95¶\8e\9a\97ñ\81B\r
- * @param next \8e\9f\82Ì\83X\83L\83\83\83\93\88Ê\92u\82ð\8ai\94[\82·\82é\83A\83h\83\8c\83X\81BNULL\82ª\8ew\92è\82³\82ê\82½\8fê\8d\87\82Í\8ai\94[\82µ\82È\82¢\81B\r
- * @return \91Î\89\9e\82·\82éUNICODE\82Ì\95¶\8e\9a\83R\81[\83h\81B\91Î\89\9e\82·\82é\82à\82Ì\82ª\82È\82¯\82ê\82Î0\81B\r
- */\r
-static int SJIStoUTF16(const char* s, const char** next) {\r
- int wc = 0;\r
- int c1 = (unsigned char) *s;\r
- int c2 = (unsigned char) *(s + 1);\r
- if ((c1 & 0x80) == 0) {\r
- wc = c1;\r
- s++;\r
- }else if (0xa1 <= c1 && c1 <= 0xdf) {\r
- if ((wc = JIS201KANAtoUTF16(c1)) != 0)\r
- s++;\r
- }else{\r
- if (0x9f <= c2) {\r
- c1 = c1 * 2 - (c1 >= 0xe0 ? 0xe0 : 0x60);\r
- c2 += 2;\r
- }else{\r
- c1 = c1 * 2 - (c1 >= 0xe0 ? 0xe1 : 0x61);\r
- c2 += c2 < 0x7f ? 0x61 : 0x60;\r
- }\r
- if ((wc = JIS208toUTF16((c1 << 8) | c2)) != 0)\r
- s += 2;\r
- }\r
- if (next != NULL)\r
- *next = s;\r
- return wc;\r
-}\r
-\r
-/**\r
- * UTF8\82Ì\95¶\8e\9a\97ñ\82©\82ç\88ê\95¶\8e\9a\8eæ\82è\82¾\82µUNICODE\82É\95Ï\8a·\82·\82é\81B\r
- * @param p UTF8\82Ì\95¶\8e\9a\97ñ\81B\r
- * @param next \8e\9f\82Ì\83X\83L\83\83\83\93\88Ê\92u\82ð\8ai\94[\82·\82é\83A\83h\83\8c\83X\81BNULL\82ª\8ew\92è\82³\82ê\82½\8fê\8d\87\82Í\8ai\94[\82µ\82È\82¢\81B\r
- * @return \91Î\89\9e\82·\82éUNICODE\82Ì\95¶\8e\9a\83R\81[\83h\81B\91Î\89\9e\82·\82é\82à\82Ì\82ª\82È\82¯\82ê\82Î0\81B\r
- */\r
-static wchar_t UTF8toUTF16(const char* p, const char** next) {\r
- int wc = 0;\r
- int c1 = (unsigned char) *p;\r
- int c2 = (unsigned char) *(p + 1);\r
- int c3 = (unsigned char) *(p + 2);\r
- if (c1 <= 0x7f) {\r
- wc = c1;\r
- p++;\r
- }else if (0xc0 <= c1 && c1 <= 0xdf && 0x80 <= c2 && c2 <= 0xbf) {\r
- wc = ((c1 & 0x1f) << 6) | (c2 & 0x3f);\r
- p += 2;\r
- }else if (0xe0 <= c1 && c1 <= 0xef && 0x80 <= c2 && c2 <= 0xbf && 0x80 <= c3 && c3 <= 0xbf) {\r
- wc = ((c1 & 0x1f) << 12) | ((c2 & 0x3f) << 6) | (c3 & 0x3f);\r
- p += 3;\r
- }\r
- if (next != NULL)\r
- *next = p;\r
- return wc;\r
-}\r
-\r
-/**\r
- * UTF8\82Ì\95¶\8e\9a\97ñ\82©\82ç\88ê\95¶\8e\9a\8eæ\82è\82¾\82µEUC-JP\82É\95Ï\8a·\82·\82é\81B\r
- * @param p UTF8\82Ì\95¶\8e\9a\97ñ\81B\r
- * @param next \8e\9f\82Ì\83X\83L\83\83\83\93\88Ê\92u\82ð\8ai\94[\82·\82é\83A\83h\83\8c\83X\81BNULL\82ª\8ew\92è\82³\82ê\82½\8fê\8d\87\82Í\8ai\94[\82µ\82È\82¢\81B\r
- * @return \91Î\89\9e\82·\82éEUC-JP\82Ì\95¶\8e\9a\83R\81[\83h\81B\91Î\89\9e\82·\82é\82à\82Ì\82ª\82È\82¯\82ê\82Î0\81B\r
- */\r
-static int UTF8toEUCJPchar(const char* p, const char** next) {\r
- wchar_t wc = UTF8toUTF16(p, next);\r
- int ec = 0;\r
- if ((wc & 0xff80) == 0)\r
- return wc;\r
- if ((ec = UTF16toJIS201KANA(wc)) != 0)\r
- return ec | 0x8e00;\r
- if ((ec = UTF16toJIS208(wc)) != 0)\r
- return ec | 0x8080;\r
- return 0;\r
-}\r
-/**\r
- * UTF8\82Ì\95¶\8e\9a\97ñ\82©\82ç\88ê\95¶\8e\9a\8eæ\82è\82¾\82µSHIFT_JIS\82É\95Ï\8a·\82·\82é\81B\r
- * @param p UTF8\82Ì\95¶\8e\9a\97ñ\r
- * @param next \8e\9f\82Ì\83X\83L\83\83\83\93\88Ê\92u\82ð\8ai\94[\82·\82é\83A\83h\83\8c\83X\81BNULL\82ª\8ew\92è\82³\82ê\82½\8fê\8d\87\82Í\8ai\94[\82µ\82È\82¢\81B\r
- * @return \91Î\89\9e\82·\82éSHIFT_JIS\82Ì\95¶\8e\9a\83R\81[\83h\81B\91Î\89\9e\82·\82é\82à\82Ì\82ª\82È\82¯\82ê\82Î0\81B\r
- */\r
-static int UTF8toSJISchar(const char* p, const char** next) {\r
- wchar_t wc = UTF8toUTF16(p, next);\r
- int ec = 0;\r
- if ((wc & 0xff00) == 0)\r
- return wc;\r
- if ((ec = UTF16toJIS201KANA(wc)) != 0)\r
- return ec;\r
- if ((ec = UTF16toJIS208(wc)) != 0) {\r
- int c1 = (ec >> 8) & 0x7f | 0x80;\r
- int c2 = ec & 0x7f | 0x80;\r
- if ((c1 & 1) != 0) {\r
- c1 = (c1 >> 1) + (c1 < 0xdf ? 0x31 : 0x71);\r
- c2 -= c2 < 0xe0 ? 0x61 : 0x60;\r
- }else{\r
- c1 = (c1 >> 1) + (c1 < 0xdf ? 0x30 : 0x70);\r
- c2 -= 2;\r
- }\r
- return (c1 << 8) | c2;\r
- }\r
- return 0;\r
-}\r
-\r
-/**\r
- * UTF8\82Ì\95¶\8e\9a\97ñ\82ðEUC-JP\82É\95Ï\8a·\82·\82é\81B\r
- * @param utf8 UTF8\82Ì\95¶\8e\9a\97ñ\r
- * @param utf8len \95¶\8e\9a\97ñ\82Ì\92·\82³\81B-1\82ð\8ew\92è\82·\82é\82Æ\8fI\92[\95¶\8e\9a\82Ü\82Å\82ð\95Ï\8a·\82·\82é\81B\r
- * @param eucjp EUC-JP\82É\95Ï\8a·\82µ\82½\95¶\8e\9a\97ñ\82ð\8ai\94[\82·\82é\83o\83b\83t\83@\81B\r
- * @param eucjplen \83o\83b\83t\83@\82Ì\92·\82³\81B0\82ð\8ew\92è\82·\82é\82Æ\8eÀ\8dÛ\82É\82Í\95Ï\8a·\82ð\8ds\82í\82¸\81A\95Ï\8a·\8cã\82Ì\95¶\8e\9a\97ñ\92·\82ð\8eæ\93¾\82·\82é\81B\r
- * @return \95Ï\8a·\8cã\82Ì\95¶\8e\9a\97ñ\92·\81B\r
- */\r
-int UTF8toEUCJP(const char* utf8, int utf8len, char* eucjp, int eucjplen) {\r
- int len = 0;\r
- const char* lim = utf8;\r
- if (utf8len < 0) {\r
- while (*lim++ != '\0')\r
- ;\r
- }else{\r
- lim += utf8len;\r
- }\r
- while (utf8 < lim && (eucjplen == 0 || len < eucjplen)) {\r
- int ec = UTF8toEUCJPchar(utf8, &utf8);\r
- if ((ec & 0xff00) != 0) {\r
- if (eucjplen != 0 && len < eucjplen)\r
- *eucjp++ = (ec >> 8) & 0xff;\r
- len++;\r
- }\r
- if (eucjplen != 0 && len < eucjplen)\r
- *eucjp++ = ec & 0xff;\r
- len++;\r
- }\r
- return len;\r
-}\r
-\r
-/**\r
- * UTF8\82Ì\95¶\8e\9a\97ñ\82ðSHIFT_JIS\82É\95Ï\8a·\82·\82é\81B\r
- * @param utf8 UTF8\82Ì\95¶\8e\9a\97ñ\r
- * @param utf8len \95¶\8e\9a\97ñ\82Ì\92·\82³\81B-1\82ð\8ew\92è\82·\82é\82Æ\8fI\92[\95¶\8e\9a\82Ü\82Å\82ð\95Ï\8a·\82·\82é\81B\r
- * @param sjis SHIFT_JIS\82É\95Ï\8a·\82µ\82½\95¶\8e\9a\97ñ\82ð\8ai\94[\82·\82é\83o\83b\83t\83@\81B\r
- * @param sjislen \83o\83b\83t\83@\82Ì\92·\82³\81B0\82ð\8ew\92è\82·\82é\82Æ\8eÀ\8dÛ\82É\82Í\95Ï\8a·\82ð\8ds\82í\82¸\81A\95Ï\8a·\8cã\82Ì\95¶\8e\9a\97ñ\92·\82ð\8eæ\93¾\82·\82é\81B\r
- * @return \95Ï\8a·\8cã\82Ì\95¶\8e\9a\97ñ\92·\81B\r
- */\r
-int UTF8toSJIS(const char* utf8, int utf8len, char* sjis, int sjislen) {\r
- int len = 0;\r
- const char* lim = utf8;\r
- if (utf8len < 0) {\r
- while (*lim++ != '\0')\r
- ;\r
- }else{\r
- lim += utf8len;\r
- }\r
- while (utf8 < lim && (sjislen == 0 || len < sjislen)) {\r
- int ec = UTF8toSJISchar(utf8, &utf8);\r
- if ((ec & 0xff00) != 0) {\r
- if (sjislen != 0 && len < sjislen)\r
- *sjis++ = (ec >> 8) & 0xff;\r
- len++;\r
- }\r
- if (sjislen != 0 && len < sjislen)\r
- *sjis++ = ec & 0xff;\r
- len++;\r
- }\r
- return len;\r
-}\r
-\r
-/**\r
- * EUC-JP\82Ì\95¶\8e\9a\97ñ\82©\82ç1\95¶\8e\9a\8eæ\82è\82¾\82µUNICODE\82É\95Ï\8a·\82·\82é\81B\r
- * @param data \83\86\81[\83U\92è\8b`\83f\81[\83^(\96¢\8eg\97p)\r
- * @param s EUC-JP\82Ì\95¶\8e\9a\97ñ\81B\r
- * @return \91Î\89\9e\82·\82éUNICODE\82Ì\95¶\8e\9a\83R\81[\83h\81B\91Î\89\9e\82·\82é\82à\82Ì\82ª\82È\82¯\82ê\82Î0\81B\r
- */\r
-static int convertEUCJPtoUTF16(void *data, const char *s) {\r
- return EUCJPtoUTF16(s, NULL);\r
-}\r
-\r
-/**\r
- * SHIFT_JIS\82Ì\95¶\8e\9a\97ñ\82©\82ç1\95¶\8e\9a\8eæ\82è\82¾\82µUNICODE\82É\95Ï\8a·\82·\82é\81B\r
- * @param data \83\86\81[\83U\92è\8b`\83f\81[\83^(\96¢\8eg\97p)\r
- * @param s SHIFT_JIS\82Ì\95¶\8e\9a\97ñ\81B\r
- * @return \91Î\89\9e\82·\82éUNICODE\82Ì\95¶\8e\9a\83R\81[\83h\81B\91Î\89\9e\82·\82é\82à\82Ì\82ª\82È\82¯\82ê\82Î0\81B\r
- */\r
-static int convertSHIFTJIStoUTF16(void *data, const char *s) {\r
- return SJIStoUTF16(s, NULL);\r
-}\r
-\r
-/**\r
- * \95Ï\8a·\83e\81[\83u\83\8b\82ÌASCII\95\94\95ª\82ð\90Ý\92è\82·\82é\81B\r
- * @param map \95Ï\8a·\83e\81[\83u\83\8b\r
- */\r
-static void setAsciiMap(int map[]) {\r
- int i;\r
- map['\t'] = '\t';\r
- map['\r'] = '\r';\r
- map['\n'] = '\n';\r
- for (i = ' '; i <= '~'; i++)\r
- map[i] = i;\r
-}\r
-\r
-/**\r
- * \93ú\96{\8cê\95¶\8e\9a\83R\81[\83h\82ð\8f\88\97\9d\82·\82é\82½\82ß\82Ì\83n\83\93\83h\83\89\r
- * @param encodingHandlerData \82±\82Ì\83n\83\93\83h\83\89\82Ì\82½\82ß\82Ì\83\86\81[\83U\92è\8b`\83f\81[\83^(\96¢\8eg\97p)\r
- * @param name \95¶\8e\9a\83R\81[\83h\96¼(\82±\82Ì\83n\83\93\83h\83\89\82Å\82ÍSHIFT_JIS\82ÆEUC-JP\82Ì\82Ý\91Î\89\9e)\r
- * @param info \95¶\8e\9a\83R\81[\83h\95Ï\8a·\82Ì\82½\82ß\82Ì\8fî\95ñ\r
- * @return \82±\82Ì\83n\83\93\83h\83\89\82Å\8f\88\97\9d\82ð\8ds\82¤\82Ì\82Å\82 \82ê\82Î\94ñ0\81B\r
- */\r
-int XML_JapaneseEncodingHandler(void *encodingHandlerData, const XML_Char *name, XML_Encoding *info) {\r
- if (stricmp(name, "euc-jp") == 0) {\r
- int i;\r
- setAsciiMap(info->map);\r
- info->map[0x8e] = -2;\r
- for (i = 0xa1; i <= 0xfe; i++)\r
- info->map[i] = -2;\r
- info->convert = convertEUCJPtoUTF16;\r
- return 1;\r
- }else if(stricmp(name, "shift_jis") == 0) {\r
- int i;\r
- setAsciiMap(info->map);\r
- for (i = 0x81; i <= 0x9f; i++)\r
- info->map[i] = -2;\r
- for (i = 0xa1; i <= 0xdf; i++)\r
- info->map[i] = JIS201KANAtoUTF16(i);\r
- for (i = 0xe0; i <= 0xfc; i++)\r
- info->map[i] = -2;\r
- info->convert = convertSHIFTJIStoUTF16;\r
- return 1;\r
- }\r
- return 0;\r
-}\r
-\r
-/*\r
- * Changes:\r
- * $Log: expatJP.c,v $\r
- * Revision 1.3 2003/11/27 05:45:17 sugoroku\r
- * CVS\83L\81[\83\8f\81[\83h\82É\83t\83@\83C\83\8b\96¼\82ª\82 \82é\82Ì\82Å\83R\83\81\83\93\83g\82©\82ç\82Í\83t\83@\83C\83\8b\96¼\82ð\8dí\8f\9c\r
- *\r
- * Revision 1.2 2003/11/27 05:40:39 sugoroku\r
- * CVS\83L\81[\83\8f\81[\83h\82ð\83R\83\81\83\93\83g\82É\91}\93ü\r
- *\r
- */\r
+/*
+ * $Id: expatJP.c,v 1.3 2003/11/27 05:45:17 sugoroku Exp $
+ * expat\82Ì\93ú\96{\8cê\95¶\8e\9a\83R\81[\83h\91Î\89\9e\81B
+ * encoding\82ÉSHIFT_JIS\82ÆEUC-JP\82ð\8ew\92è\82³\82ê\82½XML\82Ì\8f\88\97\9d\82ð\89Â\94\\82É\82·\82é\81B
+ * \82Ü\82½UTF-8\82©\82çSHIFT_JIS\81EEUC-JP\82Ö\82Ì\95Ï\8a·\83\8b\81[\83`\83\93\82à\92ñ\8b\9f\82·\82é\81B
+ */
+
+#include <string.h>
+#include <expat.h>
+
+#include <expatJP.h>
+
+/* \8e©\93®\90¶\90¬\82µ\82½JIS<->UNICODE\95Ï\8a·\83e\81[\83u\83\8b */
+#include "jutable.c"
+
+/**
+ * 1\95¶\8e\9a\82ÌJIS208\82ðUNICODE\82É\95Ï\8a·\82·\82é\81B
+ * @param ch JIS208\82Ì\95¶\8e\9a\83R\81[\83h\81B
+ * @return \91Î\89\9e\82·\82éUNICODE\82Ì\95¶\8e\9a\83R\81[\83h\81B\91Î\89\9e\82·\82é\82à\82Ì\82ª\82È\82¯\82ê\82Î0\81B
+ */
+static int JIS208toUTF16(int ch) {
+ int c1 = (ch >> 8) & 0x7f;
+ int c2 = ch & 0x7f;
+ if (0x21 <= c1 && c1 <= 0x7e && 0x21 <= c2 && c2 <= 0x7e)
+ return j2u[c1 - 0x21][c2 - 0x21];
+ return 0;
+}
+
+/**
+ * UNICODE\82É\91Î\89\9e\82·\82éJIS208\82Ì\83R\81[\83h\82ð\8c\9f\8dõ\82·\82é\81B
+ * @param ch UNICODE\82Ì\95¶\8e\9a\83R\81[\83h\81B
+ * @param start \8c\9f\8dõ\83\8c\83R\81[\83h\82Ì\90æ\93ª\81B
+ * @param end \8c\9f\8dõ\83\8c\83R\81[\83h\82Ì\8fI\92[\81B
+ * @return \91Î\89\9e\82·\82éJIS208\82Ì\95¶\8e\9a\83R\81[\83h\81B\91Î\89\9e\82·\82é\82à\82Ì\82ª\82È\82¯\82ê\82Î0\81B
+ */
+static int searchJIS208(int ch, int start, int end) {
+ int center = (start + end) / 2;
+ if (u2j[center * 2] == ch)
+ return u2j[center * 2 + 1];
+ if (center == start)
+ return 0;
+ if (u2j[center * 2] > ch)
+ return searchJIS208(ch, start, center);
+ return searchJIS208(ch, center, end);
+}
+
+/**
+ * 1\95¶\8e\9a\82ÌUNICODE\82ðJIS208\82É\95Ï\8a·\82·\82é\81B
+ * @param ch UNICODE\82Ì\95¶\8e\9a\83R\81[\83h\81B
+ * @return \91Î\89\9e\82·\82éJIS208\82Ì\95¶\8e\9a\83R\81[\83h\81B\91Î\89\9e\82·\82é\82à\82Ì\82ª\82È\82¯\82ê\82Î0\81B
+ */
+static int UTF16toJIS208(int ch) {
+ return searchJIS208(ch, 0, sizeof(u2j) / sizeof(u2j[0]) / 2);
+}
+
+/**
+ * JIS201\83J\83i\82ðUNICODE\82É\95Ï\8a·\82·\82é\81B
+ * @param ch JIS201\83J\83i\82Ì\95¶\8e\9a\83R\81[\83h\81B
+ * @return \91Î\89\9e\82·\82éUNICODE\82Ì\95¶\8e\9a\83R\81[\83h\81B\91Î\89\9e\82·\82é\82à\82Ì\82ª\82È\82¯\82ê\82Î0\81B
+ */
+static int JIS201KANAtoUTF16(int ch) {
+ if (0xa1 <= ch && ch <= 0xdf)
+ return ch + 0xfec0;
+ return 0;
+}
+
+/**
+ * UNICODE\82ðJIS201\83J\83i\82É\95Ï\8a·\82·\82é\81B
+ * @param ch UNICODE\82Ì\95¶\8e\9a\83R\81[\83h\81B
+ * @return \91Î\89\9e\82·\82éJIS201\83J\83i\82Ì\95¶\8e\9a\83R\81[\83h\81B\91Î\89\9e\82·\82é\82à\82Ì\82ª\82È\82¯\82ê\82Î0\81B
+ */
+static int UTF16toJIS201KANA(int ch) {
+ ch &= 0xffff;
+ if (0xff61 <= ch && ch <= 0xff9f)
+ return ch - 0xfec0;
+ return 0;
+}
+
+/**
+ * EUC-JP\82Ì\95¶\8e\9a\97ñ\82©\82ç\88ê\95¶\8e\9a\8eæ\82è\82¾\82µUNICODE\82É\95Ï\8a·\82·\82é\81B
+ * @param s EUC-JP\82Ì\95¶\8e\9a\97ñ\81B
+ * @param next \8e\9f\82Ì\83X\83L\83\83\83\93\88Ê\92u\82ð\8ai\94[\82·\82é\83A\83h\83\8c\83X\81BNULL\82ª\8ew\92è\82³\82ê\82½\8fê\8d\87\82Í\8ai\94[\82µ\82È\82¢\81B
+ * @return \91Î\89\9e\82·\82éUNICODE\82Ì\95¶\8e\9a\83R\81[\83h\81B\91Î\89\9e\82·\82é\82à\82Ì\82ª\82È\82¯\82ê\82Î0\81B
+ */
+static int EUCJPtoUTF16(const char* s, const char** next) {
+ int wc = 0;
+ if ((*s & 0x80) == 0) {
+ wc = *s++;
+ }else if ((unsigned char) *s == 0x8e) {
+ if ((wc = JIS201KANAtoUTF16((unsigned char) *(s + 1))) != 0)
+ s += 2;
+ }else if ((wc = JIS208toUTF16(((unsigned char) *s << 8) | (unsigned char) *(s + 1))) != 0) {
+ s += 2;
+ }
+ if (next != NULL)
+ *next = s;
+ return wc;
+}
+
+/**
+ * SHIFT_JIS\82Ì\95¶\8e\9a\97ñ\82©\82ç\88ê\95¶\8e\9a\8eæ\82è\82¾\82µUNICODE\82É\95Ï\8a·\82·\82é\81B
+ * @param s SHIFT_JIS\82Ì\95¶\8e\9a\97ñ\81B
+ * @param next \8e\9f\82Ì\83X\83L\83\83\83\93\88Ê\92u\82ð\8ai\94[\82·\82é\83A\83h\83\8c\83X\81BNULL\82ª\8ew\92è\82³\82ê\82½\8fê\8d\87\82Í\8ai\94[\82µ\82È\82¢\81B
+ * @return \91Î\89\9e\82·\82éUNICODE\82Ì\95¶\8e\9a\83R\81[\83h\81B\91Î\89\9e\82·\82é\82à\82Ì\82ª\82È\82¯\82ê\82Î0\81B
+ */
+static int SJIStoUTF16(const char* s, const char** next) {
+ int wc = 0;
+ int c1 = (unsigned char) *s;
+ int c2 = (unsigned char) *(s + 1);
+ if ((c1 & 0x80) == 0) {
+ wc = c1;
+ s++;
+ }else if (0xa1 <= c1 && c1 <= 0xdf) {
+ if ((wc = JIS201KANAtoUTF16(c1)) != 0)
+ s++;
+ }else{
+ if (0x9f <= c2) {
+ c1 = c1 * 2 - (c1 >= 0xe0 ? 0xe0 : 0x60);
+ c2 += 2;
+ }else{
+ c1 = c1 * 2 - (c1 >= 0xe0 ? 0xe1 : 0x61);
+ c2 += c2 < 0x7f ? 0x61 : 0x60;
+ }
+ if ((wc = JIS208toUTF16((c1 << 8) | c2)) != 0)
+ s += 2;
+ }
+ if (next != NULL)
+ *next = s;
+ return wc;
+}
+
+/**
+ * UTF8\82Ì\95¶\8e\9a\97ñ\82©\82ç\88ê\95¶\8e\9a\8eæ\82è\82¾\82µUNICODE\82É\95Ï\8a·\82·\82é\81B
+ * @param p UTF8\82Ì\95¶\8e\9a\97ñ\81B
+ * @param next \8e\9f\82Ì\83X\83L\83\83\83\93\88Ê\92u\82ð\8ai\94[\82·\82é\83A\83h\83\8c\83X\81BNULL\82ª\8ew\92è\82³\82ê\82½\8fê\8d\87\82Í\8ai\94[\82µ\82È\82¢\81B
+ * @return \91Î\89\9e\82·\82éUNICODE\82Ì\95¶\8e\9a\83R\81[\83h\81B\91Î\89\9e\82·\82é\82à\82Ì\82ª\82È\82¯\82ê\82Î0\81B
+ */
+static wchar_t UTF8toUTF16(const char* p, const char** next) {
+ int wc = 0;
+ int c1 = (unsigned char) *p;
+ int c2 = (unsigned char) *(p + 1);
+ int c3 = (unsigned char) *(p + 2);
+ if (c1 <= 0x7f) {
+ wc = c1;
+ p++;
+ }else if (0xc0 <= c1 && c1 <= 0xdf && 0x80 <= c2 && c2 <= 0xbf) {
+ wc = ((c1 & 0x1f) << 6) | (c2 & 0x3f);
+ p += 2;
+ }else if (0xe0 <= c1 && c1 <= 0xef && 0x80 <= c2 && c2 <= 0xbf && 0x80 <= c3 && c3 <= 0xbf) {
+ wc = ((c1 & 0x1f) << 12) | ((c2 & 0x3f) << 6) | (c3 & 0x3f);
+ p += 3;
+ }
+ if (next != NULL)
+ *next = p;
+ return wc;
+}
+
+/**
+ * UTF8\82Ì\95¶\8e\9a\97ñ\82©\82ç\88ê\95¶\8e\9a\8eæ\82è\82¾\82µEUC-JP\82É\95Ï\8a·\82·\82é\81B
+ * @param p UTF8\82Ì\95¶\8e\9a\97ñ\81B
+ * @param next \8e\9f\82Ì\83X\83L\83\83\83\93\88Ê\92u\82ð\8ai\94[\82·\82é\83A\83h\83\8c\83X\81BNULL\82ª\8ew\92è\82³\82ê\82½\8fê\8d\87\82Í\8ai\94[\82µ\82È\82¢\81B
+ * @return \91Î\89\9e\82·\82éEUC-JP\82Ì\95¶\8e\9a\83R\81[\83h\81B\91Î\89\9e\82·\82é\82à\82Ì\82ª\82È\82¯\82ê\82Î0\81B
+ */
+static int UTF8toEUCJPchar(const char* p, const char** next) {
+ wchar_t wc = UTF8toUTF16(p, next);
+ int ec = 0;
+ if ((wc & 0xff80) == 0)
+ return wc;
+ if ((ec = UTF16toJIS201KANA(wc)) != 0)
+ return ec | 0x8e00;
+ if ((ec = UTF16toJIS208(wc)) != 0)
+ return ec | 0x8080;
+ return 0;
+}
+/**
+ * UTF8\82Ì\95¶\8e\9a\97ñ\82©\82ç\88ê\95¶\8e\9a\8eæ\82è\82¾\82µSHIFT_JIS\82É\95Ï\8a·\82·\82é\81B
+ * @param p UTF8\82Ì\95¶\8e\9a\97ñ
+ * @param next \8e\9f\82Ì\83X\83L\83\83\83\93\88Ê\92u\82ð\8ai\94[\82·\82é\83A\83h\83\8c\83X\81BNULL\82ª\8ew\92è\82³\82ê\82½\8fê\8d\87\82Í\8ai\94[\82µ\82È\82¢\81B
+ * @return \91Î\89\9e\82·\82éSHIFT_JIS\82Ì\95¶\8e\9a\83R\81[\83h\81B\91Î\89\9e\82·\82é\82à\82Ì\82ª\82È\82¯\82ê\82Î0\81B
+ */
+static int UTF8toSJISchar(const char* p, const char** next) {
+ wchar_t wc = UTF8toUTF16(p, next);
+ int ec = 0;
+ if ((wc & 0xff00) == 0)
+ return wc;
+ if ((ec = UTF16toJIS201KANA(wc)) != 0)
+ return ec;
+ if ((ec = UTF16toJIS208(wc)) != 0) {
+ int c1 = (ec >> 8) & 0x7f | 0x80;
+ int c2 = ec & 0x7f | 0x80;
+ if ((c1 & 1) != 0) {
+ c1 = (c1 >> 1) + (c1 < 0xdf ? 0x31 : 0x71);
+ c2 -= c2 < 0xe0 ? 0x61 : 0x60;
+ }else{
+ c1 = (c1 >> 1) + (c1 < 0xdf ? 0x30 : 0x70);
+ c2 -= 2;
+ }
+ return (c1 << 8) | c2;
+ }
+ return 0;
+}
+
+/**
+ * UTF8\82Ì\95¶\8e\9a\97ñ\82ðEUC-JP\82É\95Ï\8a·\82·\82é\81B
+ * @param utf8 UTF8\82Ì\95¶\8e\9a\97ñ
+ * @param utf8len \95¶\8e\9a\97ñ\82Ì\92·\82³\81B-1\82ð\8ew\92è\82·\82é\82Æ\8fI\92[\95¶\8e\9a\82Ü\82Å\82ð\95Ï\8a·\82·\82é\81B
+ * @param eucjp EUC-JP\82É\95Ï\8a·\82µ\82½\95¶\8e\9a\97ñ\82ð\8ai\94[\82·\82é\83o\83b\83t\83@\81B
+ * @param eucjplen \83o\83b\83t\83@\82Ì\92·\82³\81B0\82ð\8ew\92è\82·\82é\82Æ\8eÀ\8dÛ\82É\82Í\95Ï\8a·\82ð\8ds\82í\82¸\81A\95Ï\8a·\8cã\82Ì\95¶\8e\9a\97ñ\92·\82ð\8eæ\93¾\82·\82é\81B
+ * @return \95Ï\8a·\8cã\82Ì\95¶\8e\9a\97ñ\92·\81B
+ */
+int UTF8toEUCJP(const char* utf8, int utf8len, char* eucjp, int eucjplen) {
+ int len = 0;
+ const char* lim = utf8;
+ if (utf8len < 0) {
+ while (*lim++ != '\0')
+ ;
+ }else{
+ lim += utf8len;
+ }
+ while (utf8 < lim && (eucjplen == 0 || len < eucjplen)) {
+ int ec = UTF8toEUCJPchar(utf8, &utf8);
+ if ((ec & 0xff00) != 0) {
+ if (eucjplen != 0 && len < eucjplen)
+ *eucjp++ = (ec >> 8) & 0xff;
+ len++;
+ }
+ if (eucjplen != 0 && len < eucjplen)
+ *eucjp++ = ec & 0xff;
+ len++;
+ }
+ return len;
+}
+
+/**
+ * UTF8\82Ì\95¶\8e\9a\97ñ\82ðSHIFT_JIS\82É\95Ï\8a·\82·\82é\81B
+ * @param utf8 UTF8\82Ì\95¶\8e\9a\97ñ
+ * @param utf8len \95¶\8e\9a\97ñ\82Ì\92·\82³\81B-1\82ð\8ew\92è\82·\82é\82Æ\8fI\92[\95¶\8e\9a\82Ü\82Å\82ð\95Ï\8a·\82·\82é\81B
+ * @param sjis SHIFT_JIS\82É\95Ï\8a·\82µ\82½\95¶\8e\9a\97ñ\82ð\8ai\94[\82·\82é\83o\83b\83t\83@\81B
+ * @param sjislen \83o\83b\83t\83@\82Ì\92·\82³\81B0\82ð\8ew\92è\82·\82é\82Æ\8eÀ\8dÛ\82É\82Í\95Ï\8a·\82ð\8ds\82í\82¸\81A\95Ï\8a·\8cã\82Ì\95¶\8e\9a\97ñ\92·\82ð\8eæ\93¾\82·\82é\81B
+ * @return \95Ï\8a·\8cã\82Ì\95¶\8e\9a\97ñ\92·\81B
+ */
+int UTF8toSJIS(const char* utf8, int utf8len, char* sjis, int sjislen) {
+ int len = 0;
+ const char* lim = utf8;
+ if (utf8len < 0) {
+ while (*lim++ != '\0')
+ ;
+ }else{
+ lim += utf8len;
+ }
+ while (utf8 < lim && (sjislen == 0 || len < sjislen)) {
+ int ec = UTF8toSJISchar(utf8, &utf8);
+ if ((ec & 0xff00) != 0) {
+ if (sjislen != 0 && len < sjislen)
+ *sjis++ = (ec >> 8) & 0xff;
+ len++;
+ }
+ if (sjislen != 0 && len < sjislen)
+ *sjis++ = ec & 0xff;
+ len++;
+ }
+ return len;
+}
+
+/**
+ * EUC-JP\82Ì\95¶\8e\9a\97ñ\82©\82ç1\95¶\8e\9a\8eæ\82è\82¾\82µUNICODE\82É\95Ï\8a·\82·\82é\81B
+ * @param data \83\86\81[\83U\92è\8b`\83f\81[\83^(\96¢\8eg\97p)
+ * @param s EUC-JP\82Ì\95¶\8e\9a\97ñ\81B
+ * @return \91Î\89\9e\82·\82éUNICODE\82Ì\95¶\8e\9a\83R\81[\83h\81B\91Î\89\9e\82·\82é\82à\82Ì\82ª\82È\82¯\82ê\82Î0\81B
+ */
+static int convertEUCJPtoUTF16(void *data, const char *s) {
+ return EUCJPtoUTF16(s, NULL);
+}
+
+/**
+ * SHIFT_JIS\82Ì\95¶\8e\9a\97ñ\82©\82ç1\95¶\8e\9a\8eæ\82è\82¾\82µUNICODE\82É\95Ï\8a·\82·\82é\81B
+ * @param data \83\86\81[\83U\92è\8b`\83f\81[\83^(\96¢\8eg\97p)
+ * @param s SHIFT_JIS\82Ì\95¶\8e\9a\97ñ\81B
+ * @return \91Î\89\9e\82·\82éUNICODE\82Ì\95¶\8e\9a\83R\81[\83h\81B\91Î\89\9e\82·\82é\82à\82Ì\82ª\82È\82¯\82ê\82Î0\81B
+ */
+static int convertSHIFTJIStoUTF16(void *data, const char *s) {
+ return SJIStoUTF16(s, NULL);
+}
+
+/**
+ * \95Ï\8a·\83e\81[\83u\83\8b\82ÌASCII\95\94\95ª\82ð\90Ý\92è\82·\82é\81B
+ * @param map \95Ï\8a·\83e\81[\83u\83\8b
+ */
+static void setAsciiMap(int map[]) {
+ int i;
+ map['\t'] = '\t';
+ map['\r'] = '\r';
+ map['\n'] = '\n';
+ for (i = ' '; i <= '~'; i++)
+ map[i] = i;
+}
+
+/**
+ * \93ú\96{\8cê\95¶\8e\9a\83R\81[\83h\82ð\8f\88\97\9d\82·\82é\82½\82ß\82Ì\83n\83\93\83h\83\89
+ * @param encodingHandlerData \82±\82Ì\83n\83\93\83h\83\89\82Ì\82½\82ß\82Ì\83\86\81[\83U\92è\8b`\83f\81[\83^(\96¢\8eg\97p)
+ * @param name \95¶\8e\9a\83R\81[\83h\96¼(\82±\82Ì\83n\83\93\83h\83\89\82Å\82ÍSHIFT_JIS\82ÆEUC-JP\82Ì\82Ý\91Î\89\9e)
+ * @param info \95¶\8e\9a\83R\81[\83h\95Ï\8a·\82Ì\82½\82ß\82Ì\8fî\95ñ
+ * @return \82±\82Ì\83n\83\93\83h\83\89\82Å\8f\88\97\9d\82ð\8ds\82¤\82Ì\82Å\82 \82ê\82Î\94ñ0\81B
+ */
+int XML_JapaneseEncodingHandler(void *encodingHandlerData, const XML_Char *name, XML_Encoding *info) {
+ if (stricmp(name, "euc-jp") == 0) {
+ int i;
+ setAsciiMap(info->map);
+ info->map[0x8e] = -2;
+ for (i = 0xa1; i <= 0xfe; i++)
+ info->map[i] = -2;
+ info->convert = convertEUCJPtoUTF16;
+ return 1;
+ }else if(stricmp(name, "shift_jis") == 0) {
+ int i;
+ setAsciiMap(info->map);
+ for (i = 0x81; i <= 0x9f; i++)
+ info->map[i] = -2;
+ for (i = 0xa1; i <= 0xdf; i++)
+ info->map[i] = JIS201KANAtoUTF16(i);
+ for (i = 0xe0; i <= 0xfc; i++)
+ info->map[i] = -2;
+ info->convert = convertSHIFTJIStoUTF16;
+ return 1;
+ }
+ return 0;
+}
+
+/*
+ * Changes:
+ * $Log: expatJP.c,v $
+ * Revision 1.3 2003/11/27 05:45:17 sugoroku
+ * CVS\83L\81[\83\8f\81[\83h\82É\83t\83@\83C\83\8b\96¼\82ª\82 \82é\82Ì\82Å\83R\83\81\83\93\83g\82©\82ç\82Í\83t\83@\83C\83\8b\96¼\82ð\8dí\8f\9c
+ *
+ * Revision 1.2 2003/11/27 05:40:39 sugoroku
+ * CVS\83L\81[\83\8f\81[\83h\82ð\83R\83\81\83\93\83g\82É\91}\93ü
+ *
+ */
-#include <mof/widget/flow_layout.hpp>\r
-#include <mof/widget/WidgetView.hpp>\r
-#include <mof/widget/VerticalClipping.hpp>\r
-#include <mof/widget/HorizontalClipping.hpp>\r
-#include <mof/streams.hpp>\r
-#include <mof/utilities.hpp>\r
-#include "mof/ConsoleIO.hpp"\r
-#include <algorithm>\r
-#include <vector>\r
-#include <memory>\r
-\r
-using std::shared_ptr;\r
- \r
-\r
-//{{{ impl\r
-struct mof::widget::flow_layout::impl\r
-{\r
- \r
- xalign xalign_;\r
- yalign yalign_;\r
- size_t width_ , height_;// preferredSize\r
- std::vector<WidgetView::ptr> views_;\r
- size_t size_;\r
-\r
- impl(xalign xa, yalign ya, size_t w, size_t h)\r
- : \r
- size_(0), width_(w) , height_(h), xalign_(xa), yalign_(ya)\r
- {}\r
- \r
-\r
- ~impl()\r
- {\r
- }\r
-};\r
-//}}}\r
-//{{{ flow_layout\r
-mof::widget::flow_layout::flow_layout\r
-(\r
- xalign xa, yalign ya, size_t w, size_t h\r
-)\r
-: pimpl_(new impl(xa, ya, w, h))\r
-{\r
-}\r
-//}}}\r
-//{{{ ~flow_layout\r
-mof::widget::flow_layout::~flow_layout( )\r
-{\r
-}\r
-//}}}\r
-//{{{ add\r
-void mof::widget::flow_layout::add(WidgetView::ptr pView)\r
-{\r
- mof::Vector2D size = pView->getPreferredSize();\r
- pimpl_->views_.push_back(pView);\r
- pimpl_->size_++;\r
-}\r
-//}}}\r
-//{{{ getLength\r
-size_t mof::widget::flow_layout::getLength() const\r
-{\r
- return pimpl_->size_;\r
-}\r
-//}}}\r
-//{{{ getPreferredSize\r
-mof::Vector2D mof::widget::flow_layout::getPreferredSize() const\r
-{\r
- return mof::Vector2D\r
- (\r
- static_cast<float>(pimpl_->width_),\r
- static_cast<float>(pimpl_->height_)\r
- );\r
-}\r
-//}}}\r
-//{{{ connect\r
-void mof::widget::flow_layout::connect(WidgetView* pParentView) \r
-{\r
- \r
- size_t sum_of_width = 0;\r
- std::vector<float> x_positions; \r
- x_positions.reserve(pimpl_->views_.size());\r
- foreach (WidgetView::ptr pView, pimpl_->views_) {\r
- mof::Vector2D v = pView->getPreferredSize();\r
- x_positions.push_back(sum_of_width);\r
- sum_of_width += v.x;\r
- }\r
-\r
- size_t i = 0;\r
- float px = pParentView->getPositionStream().value().x + pParentView->getPreferredSize().x;\r
- foreach (WidgetView::ptr pView, pimpl_->views_) {\r
- // 位置の決定\r
- mof::Vector2D pos(x_positions[i++], 0.0);\r
- if (pimpl_->xalign_ == XALIGN_CENTER) {\r
- pos.x += (static_cast<float>(pimpl_->width_) - sum_of_width) / 2;\r
- }\r
- else if (pimpl_->xalign_ == XALIGN_RIGHT) {\r
- pos.x += pimpl_->width_ - sum_of_width;\r
- }\r
- if (pimpl_->yalign_ == YALIGN_CENTER) {\r
- pos.y += (static_cast<float>(pimpl_->height_) - pView->getPreferredSize().y) / 2;\r
- }\r
- else if (pimpl_->yalign_ == YALIGN_BOTTOM) {\r
- pos.y += pimpl_->height_ - pView->getPreferredSize().y;\r
- }\r
-\r
- pView->getPositionStream() << pos << pParentView->getPositionStream();\r
- {\r
- // 高さは親のサイズに合わせる\r
- mof::Vector2D filter(0, 1);\r
- float cx = pView->getPositionStream().value().x + pView->getPreferredSize().x;\r
- float d = px - cx;// 親と子の終点の差\r
- pView->getSizeStream() \r
- << -pView->getPreferredSize()\r
- << mof::makeFilterHandler(pParentView->getSizeStream().toManipulator(), filter)//TODO この時点のフレームが非ゼロだと問題が起こるかも?\r
- << std::make_shared<HorizontalClipping>(pParentView->getSizeStream().toManipulator(), pView->getPreferredSize().x, d);\r
- }\r
-\r
- }\r
-}\r
-//}}}\r
-//{{{ getAdjacencyAsUp\r
-int mof::widget::flow_layout::getAdjacencyAsUp(int index) const\r
-{\r
- return index;\r
-}\r
-//}}}\r
-//{{{ getAdjacencyAsDown\r
-int mof::widget::flow_layout::getAdjacencyAsDown(int index) const\r
-{\r
- return index;\r
-}\r
-//}}}\r
-//{{{ getAdjacencyAsLeft\r
-int mof::widget::flow_layout::getAdjacencyAsLeft(int index) const\r
-{\r
- return mof::rotation_mod(index-1 , pimpl_->size_);\r
-}\r
-//}}}\r
-//{{{ getAdjacencyAsRight\r
-int mof::widget::flow_layout::getAdjacencyAsRight(int index) const\r
-{\r
- return mof::rotation_mod(index+1 , pimpl_->size_);\r
-}\r
-//}}}\r
+#include <mof/widget/flow_layout.hpp>
+#include <mof/widget/WidgetView.hpp>
+#include <mof/widget/VerticalClipping.hpp>
+#include <mof/widget/HorizontalClipping.hpp>
+#include <mof/streams.hpp>
+#include <mof/utilities.hpp>
+#include "mof/ConsoleIO.hpp"
+#include <algorithm>
+#include <vector>
+#include <memory>
+
+using std::shared_ptr;
+
+
+//{{{ impl
+struct mof::widget::flow_layout::impl
+{
+
+ xalign xalign_;
+ yalign yalign_;
+ size_t width_ , height_;// preferredSize
+ std::vector<WidgetView::ptr> views_;
+ size_t size_;
+
+ impl(xalign xa, yalign ya, size_t w, size_t h)
+ :
+ size_(0), width_(w) , height_(h), xalign_(xa), yalign_(ya)
+ {}
+
+
+ ~impl()
+ {
+ }
+};
+//}}}
+//{{{ flow_layout
+mof::widget::flow_layout::flow_layout
+(
+ xalign xa, yalign ya, size_t w, size_t h
+)
+: pimpl_(new impl(xa, ya, w, h))
+{
+}
+//}}}
+//{{{ ~flow_layout
+mof::widget::flow_layout::~flow_layout( )
+{
+}
+//}}}
+//{{{ add
+void mof::widget::flow_layout::add(WidgetView::ptr pView)
+{
+ mof::Vector2D size = pView->getPreferredSize();
+ pimpl_->views_.push_back(pView);
+ pimpl_->size_++;
+}
+//}}}
+//{{{ getLength
+size_t mof::widget::flow_layout::getLength() const
+{
+ return pimpl_->size_;
+}
+//}}}
+//{{{ getPreferredSize
+mof::Vector2D mof::widget::flow_layout::getPreferredSize() const
+{
+ return mof::Vector2D
+ (
+ static_cast<float>(pimpl_->width_),
+ static_cast<float>(pimpl_->height_)
+ );
+}
+//}}}
+//{{{ connect
+void mof::widget::flow_layout::connect(WidgetView* pParentView)
+{
+
+ size_t sum_of_width = 0;
+ std::vector<float> x_positions;
+ x_positions.reserve(pimpl_->views_.size());
+ foreach (WidgetView::ptr pView, pimpl_->views_) {
+ mof::Vector2D v = pView->getPreferredSize();
+ x_positions.push_back(sum_of_width);
+ sum_of_width += v.x;
+ }
+
+ size_t i = 0;
+ float px = pParentView->getPositionStream().value().x + pParentView->getPreferredSize().x;
+ foreach (WidgetView::ptr pView, pimpl_->views_) {
+ // 位置の決定
+ mof::Vector2D pos(x_positions[i++], 0.0);
+ if (pimpl_->xalign_ == XALIGN_CENTER) {
+ pos.x += (static_cast<float>(pimpl_->width_) - sum_of_width) / 2;
+ }
+ else if (pimpl_->xalign_ == XALIGN_RIGHT) {
+ pos.x += pimpl_->width_ - sum_of_width;
+ }
+ if (pimpl_->yalign_ == YALIGN_CENTER) {
+ pos.y += (static_cast<float>(pimpl_->height_) - pView->getPreferredSize().y) / 2;
+ }
+ else if (pimpl_->yalign_ == YALIGN_BOTTOM) {
+ pos.y += pimpl_->height_ - pView->getPreferredSize().y;
+ }
+
+ pView->getPositionStream() << pos << pParentView->getPositionStream();
+ {
+ // 高さは親のサイズに合わせる
+ mof::Vector2D filter(0, 1);
+ float cx = pView->getPositionStream().value().x + pView->getPreferredSize().x;
+ float d = px - cx;// 親と子の終点の差
+ pView->getSizeStream()
+ << -pView->getPreferredSize()
+ << mof::makeFilterHandler(pParentView->getSizeStream().toManipulator(), filter)//TODO この時点のフレームが非ゼロだと問題が起こるかも?
+ << std::make_shared<HorizontalClipping>(pParentView->getSizeStream().toManipulator(), pView->getPreferredSize().x, d);
+ }
+
+ }
+}
+//}}}
+//{{{ getAdjacencyAsUp
+int mof::widget::flow_layout::getAdjacencyAsUp(int index) const
+{
+ return index;
+}
+//}}}
+//{{{ getAdjacencyAsDown
+int mof::widget::flow_layout::getAdjacencyAsDown(int index) const
+{
+ return index;
+}
+//}}}
+//{{{ getAdjacencyAsLeft
+int mof::widget::flow_layout::getAdjacencyAsLeft(int index) const
+{
+ return mof::rotation_mod(index-1 , pimpl_->size_);
+}
+//}}}
+//{{{ getAdjacencyAsRight
+int mof::widget::flow_layout::getAdjacencyAsRight(int index) const
+{
+ return mof::rotation_mod(index+1 , pimpl_->size_);
+}
+//}}}
-#pragma once\r
-#include <memory>\r
-#include <mof/widget/Layout.hpp>\r
-\r
-namespace mof\r
-{\r
-namespace widget\r
-{\r
-\r
- class flow_layout : public Layout\r
- {\r
-\r
- public:\r
- enum xalign\r
- {\r
- XALIGN_LEFT,\r
- XALIGN_CENTER,\r
- XALIGN_RIGHT,\r
- };\r
- enum yalign\r
- {\r
- YALIGN_TOP,\r
- YALIGN_CENTER,\r
- YALIGN_BOTTOM,\r
- };\r
-\r
- flow_layout(xalign xa, yalign ya, size_t w, size_t h);\r
- virtual ~flow_layout();\r
- virtual void add(std::shared_ptr<WidgetView> pView);\r
- virtual Vector2D getPreferredSize() const;\r
- virtual void connect(WidgetView* pParentView);\r
- virtual size_t getLength( ) const;\r
- virtual int getAdjacencyAsUp(int index) const;\r
- virtual int getAdjacencyAsDown(int index) const;\r
- virtual int getAdjacencyAsLeft(int index) const;\r
- virtual int getAdjacencyAsRight(int index) const;\r
-\r
- private:\r
- struct impl;\r
- std::unique_ptr<impl> pimpl_;\r
- };\r
-\r
-}// namepsace widget\r
-}// namepsace mof\r
-\r
+#pragma once
+#include <memory>
+#include <mof/widget/Layout.hpp>
+
+namespace mof
+{
+namespace widget
+{
+
+ class flow_layout : public Layout
+ {
+
+ public:
+ enum xalign
+ {
+ XALIGN_LEFT,
+ XALIGN_CENTER,
+ XALIGN_RIGHT,
+ };
+ enum yalign
+ {
+ YALIGN_TOP,
+ YALIGN_CENTER,
+ YALIGN_BOTTOM,
+ };
+
+ flow_layout(xalign xa, yalign ya, size_t w, size_t h);
+ virtual ~flow_layout();
+ virtual void add(std::shared_ptr<WidgetView> pView);
+ virtual Vector2D getPreferredSize() const;
+ virtual void connect(WidgetView* pParentView);
+ virtual size_t getLength( ) const;
+ virtual int getAdjacencyAsUp(int index) const;
+ virtual int getAdjacencyAsDown(int index) const;
+ virtual int getAdjacencyAsLeft(int index) const;
+ virtual int getAdjacencyAsRight(int index) const;
+
+ private:
+ struct impl;
+ std::unique_ptr<impl> pimpl_;
+ };
+
+}// namepsace widget
+}// namepsace mof
+
-#include "mof/widget/utilities.hpp"\r
-#include "mof/widget/WidgetView.hpp"\r
-#include "mof/Sprite.hpp"\r
-\r
-namespace mof\r
-{\r
-/*\r
- void setStreamAsChild( Sprite* sprite , const WidgetView* view )\r
- {\r
- sprite->getColorStream( ) << view->getColorStream( );\r
- sprite->getPositionStream() << view->getPositionStream( );\r
- }\r
- \r
- void setStreamAsChild( WidgetView* child , const WidgetView* parent )\r
- {\r
- child->getColorStream() << parent->getColorStream( );\r
- child->getPositionStream() << parent->getPositionStream( );\r
- }\r
-*/\r
-}\r
+#include "mof/widget/utilities.hpp"
+#include "mof/widget/WidgetView.hpp"
+#include "mof/Sprite.hpp"
+
+namespace mof
+{
+/*
+ void setStreamAsChild( Sprite* sprite , const WidgetView* view )
+ {
+ sprite->getColorStream( ) << view->getColorStream( );
+ sprite->getPositionStream() << view->getPositionStream( );
+ }
+
+ void setStreamAsChild( WidgetView* child , const WidgetView* parent )
+ {
+ child->getColorStream() << parent->getColorStream( );
+ child->getPositionStream() << parent->getPositionStream( );
+ }
+*/
+}
-#pragma once\r
-#include <boost/function.hpp>\r
-#include <mof/widget/WidgetView.hpp>\r
-\r
-\r
-namespace mof\r
-{\r
- class WidgetView;\r
- class Sprite;\r
-/*\r
- void setStreamAsChild( Sprite* spritem , const WidgetView* view );\r
-\r
- void setStreamAsChild( WidgetView* child , const WidgetView* parent );\r
-*/\r
-}\r
-\r
-\r
-\r
-\r
+#pragma once
+#include <boost/function.hpp>
+#include <mof/widget/WidgetView.hpp>
+
+
+namespace mof
+{
+ class WidgetView;
+ class Sprite;
+/*
+ void setStreamAsChild( Sprite* spritem , const WidgetView* view );
+
+ void setStreamAsChild( WidgetView* child , const WidgetView* parent );
+*/
+}
+
+
+
+
-#pragma once\r
-#include "mof/widget/Message.hpp"\r
-#include "mof/widget/Pager.hpp"\r
-#include "mof/widget/Page.hpp"\r
-//#include "mof/PlainWidgetView.hpp"\r
-#include "mof/widget/AbstractTextCompiler.hpp"\r
-#include "mof/widget/TextCompiler.hpp"\r
-#include "mof/widget/Widget.hpp"\r
-#include "mof/widget/Menu.hpp"\r
-#include "mof/widget/Frame.hpp"\r
-#include "mof/widget/FrameBuilder.hpp"\r
-#include "mof/widget/WidgetView.hpp"\r
-#include "mof/widget/ImageView.hpp"\r
-#include "mof/widget/NullView.hpp"\r
-#include "mof/widget/ClippingView.hpp"\r
-#include "mof/widget/RectangleView.hpp"\r
-#include "mof/widget/Container.hpp"\r
-#include "mof/widget/Layout.hpp"\r
-#include "mof/widget/VerticalClipping.hpp"\r
-#include "mof/widget/HorizontalClipping.hpp"\r
-#include "mof/widget/GridLayout.hpp"\r
-#include "mof/widget/flow_layout.hpp"\r
-#include "mof/widget/OverlapLayout.hpp"\r
-#include "mof/widget/Widget.hpp"\r
-#include "mof/widget/utilities.hpp"\r
+#pragma once
+#include "mof/widget/Message.hpp"
+#include "mof/widget/Pager.hpp"
+#include "mof/widget/Page.hpp"
+//#include "mof/PlainWidgetView.hpp"
+#include "mof/widget/AbstractTextCompiler.hpp"
+#include "mof/widget/TextCompiler.hpp"
+#include "mof/widget/Widget.hpp"
+#include "mof/widget/Menu.hpp"
+#include "mof/widget/Frame.hpp"
+#include "mof/widget/FrameBuilder.hpp"
+#include "mof/widget/WidgetView.hpp"
+#include "mof/widget/ImageView.hpp"
+#include "mof/widget/NullView.hpp"
+#include "mof/widget/ClippingView.hpp"
+#include "mof/widget/RectangleView.hpp"
+#include "mof/widget/Container.hpp"
+#include "mof/widget/Layout.hpp"
+#include "mof/widget/VerticalClipping.hpp"
+#include "mof/widget/HorizontalClipping.hpp"
+#include "mof/widget/GridLayout.hpp"
+#include "mof/widget/flow_layout.hpp"
+#include "mof/widget/OverlapLayout.hpp"
+#include "mof/widget/Widget.hpp"
+#include "mof/widget/utilities.hpp"
-<?xml version="1.0" encoding="shift_jis"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="8.00"\r
- Name="moflib"\r
- ProjectGUID="{04CD4817-1559-4830-BCB0-C5AE997CD904}"\r
- RootNamespace="moflib"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="4"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""C:\Program Files\luabind-0.8";"C:\Program Files\Lua\5.1\include";"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib""\r
- WarningLevel="4"\r
- DebugInformationFormat="3"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- AdditionalOptions="/NODEFAULTLIB:library"\r
- AdditionalLibraryDirectories=""C:\Program Files\Lua\5.1\lib""\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- CommandLine=""\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="4"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- WholeProgramOptimization="true"\r
- AdditionalIncludeDirectories="C:\cygwin\usr\include\cppunit;"C:\Program Files\Lua\5.1\include";"C:\Program Files\luabind-0.8";"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib""\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- AdditionalOptions="/NODEFAULTLIB:library"\r
- AdditionalDependencies="lua5.1.lib"\r
- AdditionalLibraryDirectories=""C:\Program Files\Lua\5.1\lib""\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="src"\r
- >\r
- <Filter\r
- Name="stream"\r
- >\r
- <File\r
- RelativePath=".\mof\stream\Cache.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\stream\utilities.cpp"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="luabind"\r
- >\r
- <File\r
- RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\class.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\class_info.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\class_registry.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\class_rep.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\Color.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\create_class.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\error.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\exception_handler.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\find_best_match.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\function.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\implicit_cast.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\link_compatibility.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\object_rep.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\open.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\overload_rep.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\pcall.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\ref.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\scope.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\stack_content_by_name.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\weak_ref.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\wrapper_base.cpp"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="math"\r
- >\r
- <File\r
- RelativePath=".\mof\Matrix2D.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\Matrix3D.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\Vector2D.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\Vector3D.cpp"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="graphics"\r
- >\r
- <File\r
- RelativePath=".\mof\Captor.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\GraphicsDevice.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\Texture.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\VertexBuffer.cpp"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="widget"\r
- >\r
- <File\r
- RelativePath=".\mof\widget\Container.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\widget\Effect.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\widget\Frame.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\widget\FrameBuilder.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\widget\GridLayout.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\widget\ImageView.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\widget\Menu.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\widget\Message.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\widget\OverlapLayout.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\widget\Pager.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\widget\TextCompiler.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\widget\utilities.cpp"\r
- >\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- ObjectFile="$(IntDir)\$(InputName)1.obj"\r
- XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- ObjectFile="$(IntDir)\$(InputName)1.obj"\r
- XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="input"\r
- >\r
- <File\r
- RelativePath=".\mof\DeviceInputReceiver.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\InputDevice.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\InputEventCondition.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\KeyPressedEventCondition.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\LoggedInputReceiver.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\LoggingInputReceiver.cpp"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="other"\r
- >\r
- <File\r
- RelativePath=".\mof\Application.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\ConsoleIO.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\Deleter.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\EventScheduler.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\FilePath.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\Font.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\OnceEventCondition.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\Sprite.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\Timer.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\Window.cpp"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="script"\r
- >\r
- <File\r
- RelativePath=".\mof\LuaScript.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\private\regist.cpp"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="private"\r
- >\r
- <File\r
- RelativePath=".\mof\private\FileTextureBuilder.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\PixelMapTextureBuilder.cpp"\r
- >\r
- </File>\r
- </Filter>\r
- </Filter>\r
- <Filter\r
- Name="header"\r
- >\r
- <Filter\r
- Name="private"\r
- >\r
- <File\r
- RelativePath=".\mof\private\DirectInput.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\private\FileTextureBuilder.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\private\GraphicsDeviceImpl.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\private\Mesh.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\private\MeshDisposer.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\private\PixelMapTextureBuilder.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\private\TextureBuilder.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\private\TextureImpl.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\private\VertexFVF.hpp"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="stream"\r
- >\r
- <File\r
- RelativePath=".\mof\stream\Cache.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\stream\Cascade.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\stream\Filter.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\Interpolation.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\stream\Joint.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\stream\KeyFrameAnimation.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\stream\Loop.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\stream\Manipulator.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\stream\Offset.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\stream\Reference.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\stream\ReferenceWrapper.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\stream\Rotation2D.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\stream\Scaling2D.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\streams.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\stream\Translation2D.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\stream\TypeStream.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\stream\utilities.hpp"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="math"\r
- >\r
- <File\r
- RelativePath=".\mof\Matrix2D.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\Matrix3D.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\real.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\Vector2D.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\Vector3D.hpp"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="graphics"\r
- >\r
- <File\r
- RelativePath=".\mof\Captor.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\Color.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\Drawable.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\Graphics3D.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\GraphicsDevice.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\GraphicsUnit.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\Material.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\mofGraphics.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\PixelMap.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\Texture.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\graphics\utilities.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\VertexBuffer.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\VertexTypes.hpp"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="widget"\r
- >\r
- <File\r
- RelativePath=".\mof\widget\AbstractTextCompiler.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\widget\ClippingView.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\widget\Container.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\widget\Effect.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\widget\Frame.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\widget\GridLayout.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\widget\ImageView.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\widget\Layout.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\widget\Menu.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\widget\Message.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\widget\OverlapLayout.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\widget\Page.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\widget\Pager.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\widget\TextCompiler.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\widget\utilities.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\widget\widget.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\widgets.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\widget\WidgetView.hpp"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="input"\r
- >\r
- <File\r
- RelativePath=".\mof\private\DeviceInputReceiver.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\InputDevice.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\InputEventCondition.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\InputReceiver.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\KeyPressedEventCondition.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\LoggedInputReceiver.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\LoggingInputReceiver.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\mofInput.hpp"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="other"\r
- >\r
- <File\r
- RelativePath=".\mof\Application.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\ColorComponent.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\Component2D.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\Component3D.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\ConsoleIO.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\EventCondition.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\EventScheduler.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\FactoryMethod.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\FilePath.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\Finalizer.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\Font.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\OnceEventCondition.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\Rectangle.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\ResourceManager.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\SceneGraph.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\Sprite.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\TextureComponent.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\Timer.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\tstring.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\utilities.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\Window.hpp"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="script"\r
- >\r
- <File\r
- RelativePath=".\mof\InstructionSet.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\Interpreter.hpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\LuaScript.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\mof\private\regist.hpp"\r
- >\r
- </File>\r
- </Filter>\r
- </Filter>\r
- <Filter\r
- Name="\83\8a\83\\81[\83X \83t\83@\83C\83\8b"\r
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"\r
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
- >\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
+<?xml version="1.0" encoding="shift_jis"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="moflib"
+ ProjectGUID="{04CD4817-1559-4830-BCB0-C5AE997CD904}"
+ RootNamespace="moflib"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="4"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""C:\Program Files\luabind-0.8";"C:\Program Files\Lua\5.1\include";"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib""
+ WarningLevel="4"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/NODEFAULTLIB:library"
+ AdditionalLibraryDirectories=""C:\Program Files\Lua\5.1\lib""
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="4"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="C:\cygwin\usr\include\cppunit;"C:\Program Files\Lua\5.1\include";"C:\Program Files\luabind-0.8";"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib""
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/NODEFAULTLIB:library"
+ AdditionalDependencies="lua5.1.lib"
+ AdditionalLibraryDirectories=""C:\Program Files\Lua\5.1\lib""
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="src"
+ >
+ <Filter
+ Name="stream"
+ >
+ <File
+ RelativePath=".\mof\stream\Cache.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\stream\utilities.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="luabind"
+ >
+ <File
+ RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\class.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\class_info.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\class_registry.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\class_rep.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\Color.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\create_class.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\error.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\exception_handler.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\find_best_match.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\function.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\implicit_cast.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\link_compatibility.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\object_rep.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\open.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\overload_rep.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\pcall.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\ref.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\scope.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\stack_content_by_name.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\weak_ref.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\wrapper_base.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="math"
+ >
+ <File
+ RelativePath=".\mof\Matrix2D.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\Matrix3D.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\Vector2D.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\Vector3D.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="graphics"
+ >
+ <File
+ RelativePath=".\mof\Captor.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\GraphicsDevice.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\Texture.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\VertexBuffer.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="widget"
+ >
+ <File
+ RelativePath=".\mof\widget\Container.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\widget\Effect.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\widget\Frame.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\widget\FrameBuilder.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\widget\GridLayout.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\widget\ImageView.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\widget\Menu.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\widget\Message.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\widget\OverlapLayout.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\widget\Pager.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\widget\TextCompiler.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\widget\utilities.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)\$(InputName)1.obj"
+ XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)\$(InputName)1.obj"
+ XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="input"
+ >
+ <File
+ RelativePath=".\mof\DeviceInputReceiver.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\InputDevice.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\InputEventCondition.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\KeyPressedEventCondition.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\LoggedInputReceiver.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\LoggingInputReceiver.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="other"
+ >
+ <File
+ RelativePath=".\mof\Application.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\ConsoleIO.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\Deleter.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\EventScheduler.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\FilePath.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\Font.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\OnceEventCondition.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\Sprite.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\Timer.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\Window.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="script"
+ >
+ <File
+ RelativePath=".\mof\LuaScript.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\private\regist.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="private"
+ >
+ <File
+ RelativePath=".\mof\private\FileTextureBuilder.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\PixelMapTextureBuilder.cpp"
+ >
+ </File>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="header"
+ >
+ <Filter
+ Name="private"
+ >
+ <File
+ RelativePath=".\mof\private\DirectInput.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\private\FileTextureBuilder.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\private\GraphicsDeviceImpl.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\private\Mesh.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\private\MeshDisposer.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\private\PixelMapTextureBuilder.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\private\TextureBuilder.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\private\TextureImpl.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\private\VertexFVF.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="stream"
+ >
+ <File
+ RelativePath=".\mof\stream\Cache.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\stream\Cascade.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\stream\Filter.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\Interpolation.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\stream\Joint.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\stream\KeyFrameAnimation.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\stream\Loop.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\stream\Manipulator.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\stream\Offset.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\stream\Reference.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\stream\ReferenceWrapper.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\stream\Rotation2D.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\stream\Scaling2D.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\streams.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\stream\Translation2D.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\stream\TypeStream.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\stream\utilities.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="math"
+ >
+ <File
+ RelativePath=".\mof\Matrix2D.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\Matrix3D.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\real.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\Vector2D.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\Vector3D.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="graphics"
+ >
+ <File
+ RelativePath=".\mof\Captor.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\Color.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\Drawable.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\Graphics3D.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\GraphicsDevice.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\GraphicsUnit.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\Material.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\mofGraphics.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\PixelMap.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\Texture.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\graphics\utilities.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\VertexBuffer.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\VertexTypes.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="widget"
+ >
+ <File
+ RelativePath=".\mof\widget\AbstractTextCompiler.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\widget\ClippingView.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\widget\Container.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\widget\Effect.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\widget\Frame.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\widget\GridLayout.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\widget\ImageView.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\widget\Layout.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\widget\Menu.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\widget\Message.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\widget\OverlapLayout.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\widget\Page.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\widget\Pager.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\widget\TextCompiler.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\widget\utilities.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\widget\widget.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\widgets.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\widget\WidgetView.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="input"
+ >
+ <File
+ RelativePath=".\mof\private\DeviceInputReceiver.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\InputDevice.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\InputEventCondition.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\InputReceiver.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\KeyPressedEventCondition.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\LoggedInputReceiver.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\LoggingInputReceiver.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\mofInput.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="other"
+ >
+ <File
+ RelativePath=".\mof\Application.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\ColorComponent.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\Component2D.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\Component3D.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\ConsoleIO.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\EventCondition.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\EventScheduler.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\FactoryMethod.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\FilePath.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\Finalizer.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\Font.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\OnceEventCondition.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\Rectangle.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\ResourceManager.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\SceneGraph.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\Sprite.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\TextureComponent.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\Timer.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\tstring.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\utilities.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\Window.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="script"
+ >
+ <File
+ RelativePath=".\mof\InstructionSet.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\Interpreter.hpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\LuaScript.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mof\private\regist.hpp"
+ >
+ </File>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="\83\8a\83\\81[\83X \83t\83@\83C\83\8b"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
-<?xml version="1.0" encoding="shift_jis"?>\r
-<VisualStudioUserFile\r
- ProjectType="Visual C++"\r
- Version="8.00"\r
- ShowAllFiles="false"\r
- >\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- >\r
- <DebugSettings\r
- Command=""\r
- WorkingDirectory=""\r
- CommandArguments=""\r
- Attach="false"\r
- DebuggerType="3"\r
- Remote="1"\r
- RemoteMachine="TOMOHIRO"\r
- RemoteCommand=""\r
- HttpUrl=""\r
- PDBPath=""\r
- SQLDebugging=""\r
- Environment=""\r
- EnvironmentMerge="true"\r
- DebuggerFlavor=""\r
- MPIRunCommand=""\r
- MPIRunArguments=""\r
- MPIRunWorkingDirectory=""\r
- ApplicationCommand=""\r
- ApplicationArguments=""\r
- ShimCommand=""\r
- MPIAcceptMode=""\r
- MPIAcceptFilter=""\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- >\r
- <DebugSettings\r
- Command="$(TargetPath)"\r
- WorkingDirectory=""\r
- CommandArguments=""\r
- Attach="false"\r
- DebuggerType="3"\r
- Remote="1"\r
- RemoteMachine="TOMOHIRO"\r
- RemoteCommand=""\r
- HttpUrl=""\r
- PDBPath=""\r
- SQLDebugging=""\r
- Environment=""\r
- EnvironmentMerge="true"\r
- DebuggerFlavor=""\r
- MPIRunCommand=""\r
- MPIRunArguments=""\r
- MPIRunWorkingDirectory=""\r
- ApplicationCommand=""\r
- ApplicationArguments=""\r
- ShimCommand=""\r
- MPIAcceptMode=""\r
- MPIAcceptFilter=""\r
- />\r
- </Configuration>\r
- </Configurations>\r
-</VisualStudioUserFile>\r
+<?xml version="1.0" encoding="shift_jis"?>
+<VisualStudioUserFile
+ ProjectType="Visual C++"
+ Version="8.00"
+ ShowAllFiles="false"
+ >
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ >
+ <DebugSettings
+ Command=""
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="TOMOHIRO"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ >
+ <DebugSettings
+ Command="$(TargetPath)"
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="TOMOHIRO"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ </Configurations>
+</VisualStudioUserFile>
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup Label="ProjectConfigurations">\r
- <ProjectConfiguration Include="Debug|Win32">\r
- <Configuration>Debug</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|Win32">\r
- <Configuration>Release</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- </ItemGroup>\r
- <PropertyGroup Label="Globals">\r
- <ProjectGuid>{04CD4817-1559-4830-BCB0-C5AE997CD904}</ProjectGuid>\r
- <RootNamespace>moflib</RootNamespace>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
- <ImportGroup Label="ExtensionSettings">\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- </ImportGroup>\r
- <PropertyGroup Label="UserMacros" />\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>\r
- <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\Program Files\Lua\5.1\lib;C:\Program Files\Microsoft DirectX SDK %28February 2010%29\Lib\x86;C:\Program Files\boost\boost_1_40_0\stage\lib;$(LibraryPath)</LibraryPath>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>C:\Program Files\luabind-0.8;C:\Program Files\Lua\5.1\include;C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib;C:\Program Files\boost\boost_1_40_0;C:\Program Files\Microsoft DirectX SDK %28February 2010%29\Include;C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\extlib\oggvorbis\include;C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\extlib\expat\include</AdditionalIncludeDirectories>\r
- <WarningLevel>Level4</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
- </ClCompile>\r
- <Lib>\r
- <AdditionalOptions>/NODEFAULTLIB:library %(AdditionalOptions)</AdditionalOptions>\r
- <AdditionalLibraryDirectories>C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\extlib\oggvorbis\lib;C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\extlib\expat\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
- <AdditionalDependencies>libexpat.lib;lua5.1.lib;dsound.lib;ogg.lib;vorbis.lib;vorbisfile.lib</AdditionalDependencies>\r
- </Lib>\r
- <PostBuildEvent>\r
- <Command>\r
- </Command>\r
- </PostBuildEvent>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
- <ClCompile>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- <AdditionalIncludeDirectories>C:\cygwin\usr\include\cppunit;C:\Program Files\Lua\5.1\include;C:\Program Files\luabind-0.8;C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- </ClCompile>\r
- <Lib>\r
- <AdditionalOptions>/NODEFAULTLIB:library %(AdditionalOptions)</AdditionalOptions>\r
- <AdditionalDependencies>lua5.1.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
- <AdditionalLibraryDirectories>C:\Program Files\Lua\5.1\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
- </Lib>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <ClCompile Include="mof\AmbientLight.cpp" />\r
- <ClCompile Include="mof\Board.cpp" />\r
- <ClCompile Include="mof\Camera.cpp" />\r
- <ClCompile Include="mof\Component3D.cpp" />\r
- <ClCompile Include="mof\DirectionalLight.cpp" />\r
- <ClCompile Include="mof\Light.cpp" />\r
- <ClCompile Include="mof\MaterialBuilder.cpp" />\r
- <ClCompile Include="mof\Mesh.cpp" />\r
- <ClCompile Include="mof\MeshBuilder.cpp" />\r
- <ClCompile Include="mof\particlegen.cpp" />\r
- <ClCompile Include="mof\private\FileTextureBuilder.cpp" />\r
- <ClCompile Include="mof\script\Environment.cpp" />\r
- <ClCompile Include="mof\script\LuaInterpreter.cpp" />\r
- <ClCompile Include="mof\script\lua_state.cpp" />\r
- <ClCompile Include="mof\script\ObjectData.cpp" />\r
- <ClCompile Include="mof\sound\CWaveFile.cpp" />\r
- <ClCompile Include="mof\sound\DirectSoundDevice.cpp" />\r
- <ClCompile Include="mof\sound\OggVorbisFile.cpp" />\r
- <ClCompile Include="mof\sound\SoundBuffer.cpp" />\r
- <ClCompile Include="mof\sound\SoundDevice.cpp" />\r
- <ClCompile Include="mof\sound\SoundFile.cpp" />\r
- <ClCompile Include="mof\sound\sound_recoder.cpp" />\r
- <ClCompile Include="mof\sound\StaticSoundBuffer.cpp" />\r
- <ClCompile Include="mof\sound\StreamingSoundLoader.cpp" />\r
- <ClCompile Include="mof\sound\StreamSoundBuffer.cpp" />\r
- <ClCompile Include="mof\sound\WaveFile.cpp" />\r
- <ClCompile Include="mof\stream\Cache.cpp" />\r
- <ClCompile Include="mof\stream\utilities.cpp" />\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\class.cpp" />\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\class_info.cpp" />\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\class_registry.cpp" />\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\class_rep.cpp" />\r
- <ClCompile Include="mof\Color.cpp" />\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\create_class.cpp" />\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\error.cpp" />\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\exception_handler.cpp" />\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\find_best_match.cpp" />\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\function.cpp" />\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\implicit_cast.cpp" />\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\link_compatibility.cpp" />\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\object_rep.cpp" />\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\open.cpp" />\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\overload_rep.cpp" />\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\pcall.cpp" />\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\ref.cpp" />\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\scope.cpp" />\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\stack_content_by_name.cpp" />\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\weak_ref.cpp" />\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\wrapper_base.cpp" />\r
- <ClCompile Include="mof\Matrix2D.cpp" />\r
- <ClCompile Include="mof\Matrix3D.cpp" />\r
- <ClCompile Include="mof\Vector2D.cpp" />\r
- <ClCompile Include="mof\Vector3D.cpp" />\r
- <ClCompile Include="mof\Captor.cpp" />\r
- <ClCompile Include="mof\GraphicsDevice.cpp" />\r
- <ClCompile Include="mof\Texture.cpp" />\r
- <ClCompile Include="mof\VertexBuffer.cpp" />\r
- <ClCompile Include="mof\widget\ClippingView.cpp" />\r
- <ClCompile Include="mof\widget\Container.cpp" />\r
- <ClCompile Include="mof\widget\Effect.cpp" />\r
- <ClCompile Include="mof\widget\expat\expatJP.c" />\r
- <ClCompile Include="mof\widget\flow_layout.cpp" />\r
- <ClCompile Include="mof\widget\Frame.cpp" />\r
- <ClCompile Include="mof\widget\GridLayout.cpp" />\r
- <ClCompile Include="mof\widget\HorizontalClipping.cpp" />\r
- <ClCompile Include="mof\widget\ImageView.cpp" />\r
- <ClCompile Include="mof\widget\Menu.cpp" />\r
- <ClCompile Include="mof\widget\Message.cpp" />\r
- <ClCompile Include="mof\widget\mofml_parser.cpp" />\r
- <ClCompile Include="mof\widget\NullView.cpp" />\r
- <ClCompile Include="mof\widget\OverlapLayout.cpp" />\r
- <ClCompile Include="mof\widget\Pager.cpp" />\r
- <ClCompile Include="mof\widget\RectangleView.cpp" />\r
- <ClCompile Include="mof\widget\TextCompiler.cpp" />\r
- <ClCompile Include="mof\widget\utilities.cpp">\r
- <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>\r
- <XMLDocumentationFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename)1.xdc</XMLDocumentationFileName>\r
- <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>\r
- <XMLDocumentationFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)1.xdc</XMLDocumentationFileName>\r
- </ClCompile>\r
- <ClCompile Include="mof\DeviceInputReceiver.cpp" />\r
- <ClCompile Include="mof\InputDevice.cpp" />\r
- <ClCompile Include="mof\InputEventCondition.cpp" />\r
- <ClCompile Include="mof\KeyPressedEventCondition.cpp" />\r
- <ClCompile Include="mof\LoggedInputReceiver.cpp" />\r
- <ClCompile Include="mof\LoggingInputReceiver.cpp" />\r
- <ClCompile Include="mof\Application.cpp" />\r
- <ClCompile Include="mof\ConsoleIO.cpp" />\r
- <ClCompile Include="mof\EventScheduler.cpp" />\r
- <ClCompile Include="mof\FilePath.cpp" />\r
- <ClCompile Include="mof\Font.cpp" />\r
- <ClCompile Include="mof\OnceEventCondition.cpp" />\r
- <ClCompile Include="mof\Sprite.cpp" />\r
- <ClCompile Include="mof\Timer.cpp" />\r
- <ClCompile Include="mof\widget\VerticalClipping.cpp" />\r
- <ClCompile Include="mof\Window.cpp" />\r
- <ClCompile Include="mof\PixelMapTextureBuilder.cpp" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClInclude Include="mof\AmbientLight.hpp" />\r
- <ClInclude Include="mof\Board.hpp" />\r
- <ClInclude Include="mof\Camera.hpp" />\r
- <ClInclude Include="mof\DirectionalLight.hpp" />\r
- <ClInclude Include="mof\Light.hpp" />\r
- <ClInclude Include="mof\MaterialBuilder.hpp" />\r
- <ClInclude Include="mof\MeshBuilder.hpp" />\r
- <ClInclude Include="mof\particlegen.hpp" />\r
- <ClInclude Include="mof\script\CommandSet.hpp" />\r
- <ClInclude Include="mof\script\Environment.hpp" />\r
- <ClInclude Include="mof\script\LuaInterpreter.hpp" />\r
- <ClInclude Include="mof\script\lua_state.hpp" />\r
- <ClInclude Include="mof\script\ObjectData.hpp" />\r
- <ClInclude Include="mof\script\seq_parser.hpp" />\r
- <ClInclude Include="mof\sound\component_sound.hpp" />\r
- <ClInclude Include="mof\sound\CWaveFile.h" />\r
- <ClInclude Include="mof\sound\DirectSoundDevice.hpp" />\r
- <ClInclude Include="mof\sound\OggVorbisFile.hpp" />\r
- <ClInclude Include="mof\sound\SoundBuffer.hpp" />\r
- <ClInclude Include="mof\sound\SoundDevice.hpp" />\r
- <ClInclude Include="mof\sound\SoundFile.hpp" />\r
- <ClInclude Include="mof\sound\sound_recoder.hpp" />\r
- <ClInclude Include="mof\sound\StaticSoundBuffer.hpp" />\r
- <ClInclude Include="mof\sound\StreamingSoundLoader.hpp" />\r
- <ClInclude Include="mof\sound\StreamSoundBuffer.hpp" />\r
- <ClInclude Include="mof\sound\WaveFile.hpp" />\r
- <ClInclude Include="mof\stream\Constant.hpp" />\r
- <ClInclude Include="mof\stream\Minimum.hpp" />\r
- <ClInclude Include="mof\stream\Rotation3D.hpp" />\r
- <ClInclude Include="mof\stream\Scaling3D.hpp" />\r
- <ClInclude Include="mof\stream\Translation3D.hpp" />\r
- <ClInclude Include="mof\widget\flow_layout.hpp" />\r
- <ClInclude Include="mof\widget\FrameBuilder.hpp" />\r
- <ClInclude Include="mof\Deleter.hpp" />\r
- <ClInclude Include="mof\private\DirectInput.hpp" />\r
- <ClInclude Include="mof\private\FileTextureBuilder.hpp" />\r
- <ClInclude Include="mof\private\GraphicsDeviceImpl.hpp" />\r
- <ClInclude Include="mof\private\Mesh.hpp" />\r
- <ClInclude Include="mof\private\MeshDisposer.hpp" />\r
- <ClInclude Include="mof\private\PixelMapTextureBuilder.hpp" />\r
- <ClInclude Include="mof\private\TextureBuilder.hpp" />\r
- <ClInclude Include="mof\private\TextureImpl.hpp" />\r
- <ClInclude Include="mof\private\VertexFVF.hpp" />\r
- <ClInclude Include="mof\stream\Cache.hpp" />\r
- <ClInclude Include="mof\stream\Cascade.hpp" />\r
- <ClInclude Include="mof\stream\Filter.hpp" />\r
- <ClInclude Include="mof\Interpolation.hpp" />\r
- <ClInclude Include="mof\stream\Joint.hpp" />\r
- <ClInclude Include="mof\stream\KeyFrameAnimation.hpp" />\r
- <ClInclude Include="mof\stream\Loop.hpp" />\r
- <ClInclude Include="mof\stream\Manipulator.hpp" />\r
- <ClInclude Include="mof\stream\Offset.hpp" />\r
- <ClInclude Include="mof\stream\Reference.hpp" />\r
- <ClInclude Include="mof\stream\ReferenceWrapper.hpp" />\r
- <ClInclude Include="mof\stream\Rotation2D.hpp" />\r
- <ClInclude Include="mof\stream\Scaling2D.hpp" />\r
- <ClInclude Include="mof\streams.hpp" />\r
- <ClInclude Include="mof\stream\Translation2D.hpp" />\r
- <ClInclude Include="mof\stream\TypeStream.hpp" />\r
- <ClInclude Include="mof\stream\utilities.hpp" />\r
- <ClInclude Include="mof\Matrix2D.hpp" />\r
- <ClInclude Include="mof\Matrix3D.hpp" />\r
- <ClInclude Include="mof\real.hpp" />\r
- <ClInclude Include="mof\Vector2D.hpp" />\r
- <ClInclude Include="mof\Vector3D.hpp" />\r
- <ClInclude Include="mof\Captor.hpp" />\r
- <ClInclude Include="mof\Color.hpp" />\r
- <ClInclude Include="mof\Drawable.hpp" />\r
- <ClInclude Include="mof\Graphics3D.hpp" />\r
- <ClInclude Include="mof\GraphicsDevice.hpp" />\r
- <ClInclude Include="mof\GraphicsUnit.hpp" />\r
- <ClInclude Include="mof\Material.hpp" />\r
- <ClInclude Include="mof\mofGraphics.hpp" />\r
- <ClInclude Include="mof\PixelMap.hpp" />\r
- <ClInclude Include="mof\Texture.hpp" />\r
- <ClInclude Include="mof\graphics\utilities.hpp" />\r
- <ClInclude Include="mof\VertexBuffer.hpp" />\r
- <ClInclude Include="mof\VertexTypes.hpp" />\r
- <ClInclude Include="mof\widget\AbstractTextCompiler.hpp" />\r
- <ClInclude Include="mof\widget\ClippingView.hpp" />\r
- <ClInclude Include="mof\widget\Container.hpp" />\r
- <ClInclude Include="mof\widget\Effect.hpp" />\r
- <ClInclude Include="mof\widget\Frame.hpp" />\r
- <ClInclude Include="mof\widget\GridLayout.hpp" />\r
- <ClInclude Include="mof\widget\HorizontalClipping.hpp" />\r
- <ClInclude Include="mof\widget\ImageView.hpp" />\r
- <ClInclude Include="mof\widget\Layout.hpp" />\r
- <ClInclude Include="mof\widget\Menu.hpp" />\r
- <ClInclude Include="mof\widget\Message.hpp" />\r
- <ClInclude Include="mof\widget\mofml_parser.hpp" />\r
- <ClInclude Include="mof\widget\NullView.hpp" />\r
- <ClInclude Include="mof\widget\OverlapLayout.hpp" />\r
- <ClInclude Include="mof\widget\Page.hpp" />\r
- <ClInclude Include="mof\widget\Pager.hpp" />\r
- <ClInclude Include="mof\widget\RectangleView.hpp" />\r
- <ClInclude Include="mof\widget\TextCompiler.hpp" />\r
- <ClInclude Include="mof\widget\utilities.hpp" />\r
- <ClInclude Include="mof\widget\VerticalClipping.hpp" />\r
- <ClInclude Include="mof\widget\widget.hpp" />\r
- <ClInclude Include="mof\widgets.hpp" />\r
- <ClInclude Include="mof\widget\WidgetView.hpp" />\r
- <ClInclude Include="mof\private\DeviceInputReceiver.hpp" />\r
- <ClInclude Include="mof\InputDevice.hpp" />\r
- <ClInclude Include="mof\InputEventCondition.hpp" />\r
- <ClInclude Include="mof\InputReceiver.hpp" />\r
- <ClInclude Include="mof\KeyPressedEventCondition.hpp" />\r
- <ClInclude Include="mof\LoggedInputReceiver.hpp" />\r
- <ClInclude Include="mof\LoggingInputReceiver.hpp" />\r
- <ClInclude Include="mof\mofInput.hpp" />\r
- <ClInclude Include="mof\Application.hpp" />\r
- <ClInclude Include="mof\ColorComponent.hpp" />\r
- <ClInclude Include="mof\Component2D.hpp" />\r
- <ClInclude Include="mof\Component3D.hpp" />\r
- <ClInclude Include="mof\ConsoleIO.hpp" />\r
- <ClInclude Include="mof\EventCondition.hpp" />\r
- <ClInclude Include="mof\EventScheduler.hpp" />\r
- <ClInclude Include="mof\FactoryMethod.hpp" />\r
- <ClInclude Include="mof\FilePath.hpp" />\r
- <ClInclude Include="mof\Finalizer.hpp" />\r
- <ClInclude Include="mof\Font.hpp" />\r
- <ClInclude Include="mof\OnceEventCondition.hpp" />\r
- <ClInclude Include="mof\Rectangle.hpp" />\r
- <ClInclude Include="mof\ResourceManager.hpp" />\r
- <ClInclude Include="mof\SceneGraph.hpp" />\r
- <ClInclude Include="mof\Sprite.hpp" />\r
- <ClInclude Include="mof\TextureComponent.hpp" />\r
- <ClInclude Include="mof\Timer.hpp" />\r
- <ClInclude Include="mof\tstring.hpp" />\r
- <ClInclude Include="mof\utilities.hpp" />\r
- <ClInclude Include="mof\Window.hpp" />\r
- <ClInclude Include="mof\Interpreter.hpp" />\r
- </ItemGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
- <ImportGroup Label="ExtensionTargets">\r
- </ImportGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{04CD4817-1559-4830-BCB0-C5AE997CD904}</ProjectGuid>
+ <RootNamespace>moflib</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\Program Files\Lua\5.1\lib;C:\Program Files\Microsoft DirectX SDK %28February 2010%29\Lib\x86;C:\Program Files\boost\boost_1_40_0\stage\lib;$(LibraryPath)</LibraryPath>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>C:\Program Files\luabind-0.8;C:\Program Files\Lua\5.1\include;C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib;C:\Program Files\boost\boost_1_40_0;C:\Program Files\Microsoft DirectX SDK %28February 2010%29\Include;C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\extlib\oggvorbis\include;C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\extlib\expat\include</AdditionalIncludeDirectories>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ </ClCompile>
+ <Lib>
+ <AdditionalOptions>/NODEFAULTLIB:library %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalLibraryDirectories>C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\extlib\oggvorbis\lib;C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\extlib\expat\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>libexpat.lib;lua5.1.lib;dsound.lib;ogg.lib;vorbis.lib;vorbisfile.lib</AdditionalDependencies>
+ </Lib>
+ <PostBuildEvent>
+ <Command>
+ </Command>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>C:\cygwin\usr\include\cppunit;C:\Program Files\Lua\5.1\include;C:\Program Files\luabind-0.8;C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Lib>
+ <AdditionalOptions>/NODEFAULTLIB:library %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>lua5.1.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>C:\Program Files\Lua\5.1\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="mof\AmbientLight.cpp" />
+ <ClCompile Include="mof\Board.cpp" />
+ <ClCompile Include="mof\Camera.cpp" />
+ <ClCompile Include="mof\Component3D.cpp" />
+ <ClCompile Include="mof\DirectionalLight.cpp" />
+ <ClCompile Include="mof\Light.cpp" />
+ <ClCompile Include="mof\MaterialBuilder.cpp" />
+ <ClCompile Include="mof\Mesh.cpp" />
+ <ClCompile Include="mof\MeshBuilder.cpp" />
+ <ClCompile Include="mof\particlegen.cpp" />
+ <ClCompile Include="mof\private\FileTextureBuilder.cpp" />
+ <ClCompile Include="mof\script\Environment.cpp" />
+ <ClCompile Include="mof\script\LuaInterpreter.cpp" />
+ <ClCompile Include="mof\script\lua_state.cpp" />
+ <ClCompile Include="mof\script\ObjectData.cpp" />
+ <ClCompile Include="mof\sound\CWaveFile.cpp" />
+ <ClCompile Include="mof\sound\DirectSoundDevice.cpp" />
+ <ClCompile Include="mof\sound\OggVorbisFile.cpp" />
+ <ClCompile Include="mof\sound\SoundBuffer.cpp" />
+ <ClCompile Include="mof\sound\SoundDevice.cpp" />
+ <ClCompile Include="mof\sound\SoundFile.cpp" />
+ <ClCompile Include="mof\sound\sound_recoder.cpp" />
+ <ClCompile Include="mof\sound\StaticSoundBuffer.cpp" />
+ <ClCompile Include="mof\sound\StreamingSoundLoader.cpp" />
+ <ClCompile Include="mof\sound\StreamSoundBuffer.cpp" />
+ <ClCompile Include="mof\sound\WaveFile.cpp" />
+ <ClCompile Include="mof\stream\Cache.cpp" />
+ <ClCompile Include="mof\stream\utilities.cpp" />
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\class.cpp" />
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\class_info.cpp" />
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\class_registry.cpp" />
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\class_rep.cpp" />
+ <ClCompile Include="mof\Color.cpp" />
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\create_class.cpp" />
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\error.cpp" />
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\exception_handler.cpp" />
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\find_best_match.cpp" />
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\function.cpp" />
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\implicit_cast.cpp" />
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\link_compatibility.cpp" />
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\object_rep.cpp" />
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\open.cpp" />
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\overload_rep.cpp" />
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\pcall.cpp" />
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\ref.cpp" />
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\scope.cpp" />
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\stack_content_by_name.cpp" />
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\weak_ref.cpp" />
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\wrapper_base.cpp" />
+ <ClCompile Include="mof\Matrix2D.cpp" />
+ <ClCompile Include="mof\Matrix3D.cpp" />
+ <ClCompile Include="mof\Vector2D.cpp" />
+ <ClCompile Include="mof\Vector3D.cpp" />
+ <ClCompile Include="mof\Captor.cpp" />
+ <ClCompile Include="mof\GraphicsDevice.cpp" />
+ <ClCompile Include="mof\Texture.cpp" />
+ <ClCompile Include="mof\VertexBuffer.cpp" />
+ <ClCompile Include="mof\widget\ClippingView.cpp" />
+ <ClCompile Include="mof\widget\Container.cpp" />
+ <ClCompile Include="mof\widget\Effect.cpp" />
+ <ClCompile Include="mof\widget\expat\expatJP.c" />
+ <ClCompile Include="mof\widget\flow_layout.cpp" />
+ <ClCompile Include="mof\widget\Frame.cpp" />
+ <ClCompile Include="mof\widget\GridLayout.cpp" />
+ <ClCompile Include="mof\widget\HorizontalClipping.cpp" />
+ <ClCompile Include="mof\widget\ImageView.cpp" />
+ <ClCompile Include="mof\widget\Menu.cpp" />
+ <ClCompile Include="mof\widget\Message.cpp" />
+ <ClCompile Include="mof\widget\mofml_parser.cpp" />
+ <ClCompile Include="mof\widget\NullView.cpp" />
+ <ClCompile Include="mof\widget\OverlapLayout.cpp" />
+ <ClCompile Include="mof\widget\Pager.cpp" />
+ <ClCompile Include="mof\widget\RectangleView.cpp" />
+ <ClCompile Include="mof\widget\TextCompiler.cpp" />
+ <ClCompile Include="mof\widget\utilities.cpp">
+ <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
+ <XMLDocumentationFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename)1.xdc</XMLDocumentationFileName>
+ <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
+ <XMLDocumentationFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)1.xdc</XMLDocumentationFileName>
+ </ClCompile>
+ <ClCompile Include="mof\DeviceInputReceiver.cpp" />
+ <ClCompile Include="mof\InputDevice.cpp" />
+ <ClCompile Include="mof\InputEventCondition.cpp" />
+ <ClCompile Include="mof\KeyPressedEventCondition.cpp" />
+ <ClCompile Include="mof\LoggedInputReceiver.cpp" />
+ <ClCompile Include="mof\LoggingInputReceiver.cpp" />
+ <ClCompile Include="mof\Application.cpp" />
+ <ClCompile Include="mof\ConsoleIO.cpp" />
+ <ClCompile Include="mof\EventScheduler.cpp" />
+ <ClCompile Include="mof\FilePath.cpp" />
+ <ClCompile Include="mof\Font.cpp" />
+ <ClCompile Include="mof\OnceEventCondition.cpp" />
+ <ClCompile Include="mof\Sprite.cpp" />
+ <ClCompile Include="mof\Timer.cpp" />
+ <ClCompile Include="mof\widget\VerticalClipping.cpp" />
+ <ClCompile Include="mof\Window.cpp" />
+ <ClCompile Include="mof\PixelMapTextureBuilder.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="mof\AmbientLight.hpp" />
+ <ClInclude Include="mof\Board.hpp" />
+ <ClInclude Include="mof\Camera.hpp" />
+ <ClInclude Include="mof\DirectionalLight.hpp" />
+ <ClInclude Include="mof\Light.hpp" />
+ <ClInclude Include="mof\MaterialBuilder.hpp" />
+ <ClInclude Include="mof\MeshBuilder.hpp" />
+ <ClInclude Include="mof\particlegen.hpp" />
+ <ClInclude Include="mof\script\CommandSet.hpp" />
+ <ClInclude Include="mof\script\Environment.hpp" />
+ <ClInclude Include="mof\script\LuaInterpreter.hpp" />
+ <ClInclude Include="mof\script\lua_state.hpp" />
+ <ClInclude Include="mof\script\ObjectData.hpp" />
+ <ClInclude Include="mof\script\seq_parser.hpp" />
+ <ClInclude Include="mof\sound\component_sound.hpp" />
+ <ClInclude Include="mof\sound\CWaveFile.h" />
+ <ClInclude Include="mof\sound\DirectSoundDevice.hpp" />
+ <ClInclude Include="mof\sound\OggVorbisFile.hpp" />
+ <ClInclude Include="mof\sound\SoundBuffer.hpp" />
+ <ClInclude Include="mof\sound\SoundDevice.hpp" />
+ <ClInclude Include="mof\sound\SoundFile.hpp" />
+ <ClInclude Include="mof\sound\sound_recoder.hpp" />
+ <ClInclude Include="mof\sound\StaticSoundBuffer.hpp" />
+ <ClInclude Include="mof\sound\StreamingSoundLoader.hpp" />
+ <ClInclude Include="mof\sound\StreamSoundBuffer.hpp" />
+ <ClInclude Include="mof\sound\WaveFile.hpp" />
+ <ClInclude Include="mof\stream\Constant.hpp" />
+ <ClInclude Include="mof\stream\Minimum.hpp" />
+ <ClInclude Include="mof\stream\Rotation3D.hpp" />
+ <ClInclude Include="mof\stream\Scaling3D.hpp" />
+ <ClInclude Include="mof\stream\Translation3D.hpp" />
+ <ClInclude Include="mof\widget\flow_layout.hpp" />
+ <ClInclude Include="mof\widget\FrameBuilder.hpp" />
+ <ClInclude Include="mof\Deleter.hpp" />
+ <ClInclude Include="mof\private\DirectInput.hpp" />
+ <ClInclude Include="mof\private\FileTextureBuilder.hpp" />
+ <ClInclude Include="mof\private\GraphicsDeviceImpl.hpp" />
+ <ClInclude Include="mof\private\Mesh.hpp" />
+ <ClInclude Include="mof\private\MeshDisposer.hpp" />
+ <ClInclude Include="mof\private\PixelMapTextureBuilder.hpp" />
+ <ClInclude Include="mof\private\TextureBuilder.hpp" />
+ <ClInclude Include="mof\private\TextureImpl.hpp" />
+ <ClInclude Include="mof\private\VertexFVF.hpp" />
+ <ClInclude Include="mof\stream\Cache.hpp" />
+ <ClInclude Include="mof\stream\Cascade.hpp" />
+ <ClInclude Include="mof\stream\Filter.hpp" />
+ <ClInclude Include="mof\Interpolation.hpp" />
+ <ClInclude Include="mof\stream\Joint.hpp" />
+ <ClInclude Include="mof\stream\KeyFrameAnimation.hpp" />
+ <ClInclude Include="mof\stream\Loop.hpp" />
+ <ClInclude Include="mof\stream\Manipulator.hpp" />
+ <ClInclude Include="mof\stream\Offset.hpp" />
+ <ClInclude Include="mof\stream\Reference.hpp" />
+ <ClInclude Include="mof\stream\ReferenceWrapper.hpp" />
+ <ClInclude Include="mof\stream\Rotation2D.hpp" />
+ <ClInclude Include="mof\stream\Scaling2D.hpp" />
+ <ClInclude Include="mof\streams.hpp" />
+ <ClInclude Include="mof\stream\Translation2D.hpp" />
+ <ClInclude Include="mof\stream\TypeStream.hpp" />
+ <ClInclude Include="mof\stream\utilities.hpp" />
+ <ClInclude Include="mof\Matrix2D.hpp" />
+ <ClInclude Include="mof\Matrix3D.hpp" />
+ <ClInclude Include="mof\real.hpp" />
+ <ClInclude Include="mof\Vector2D.hpp" />
+ <ClInclude Include="mof\Vector3D.hpp" />
+ <ClInclude Include="mof\Captor.hpp" />
+ <ClInclude Include="mof\Color.hpp" />
+ <ClInclude Include="mof\Drawable.hpp" />
+ <ClInclude Include="mof\Graphics3D.hpp" />
+ <ClInclude Include="mof\GraphicsDevice.hpp" />
+ <ClInclude Include="mof\GraphicsUnit.hpp" />
+ <ClInclude Include="mof\Material.hpp" />
+ <ClInclude Include="mof\mofGraphics.hpp" />
+ <ClInclude Include="mof\PixelMap.hpp" />
+ <ClInclude Include="mof\Texture.hpp" />
+ <ClInclude Include="mof\graphics\utilities.hpp" />
+ <ClInclude Include="mof\VertexBuffer.hpp" />
+ <ClInclude Include="mof\VertexTypes.hpp" />
+ <ClInclude Include="mof\widget\AbstractTextCompiler.hpp" />
+ <ClInclude Include="mof\widget\ClippingView.hpp" />
+ <ClInclude Include="mof\widget\Container.hpp" />
+ <ClInclude Include="mof\widget\Effect.hpp" />
+ <ClInclude Include="mof\widget\Frame.hpp" />
+ <ClInclude Include="mof\widget\GridLayout.hpp" />
+ <ClInclude Include="mof\widget\HorizontalClipping.hpp" />
+ <ClInclude Include="mof\widget\ImageView.hpp" />
+ <ClInclude Include="mof\widget\Layout.hpp" />
+ <ClInclude Include="mof\widget\Menu.hpp" />
+ <ClInclude Include="mof\widget\Message.hpp" />
+ <ClInclude Include="mof\widget\mofml_parser.hpp" />
+ <ClInclude Include="mof\widget\NullView.hpp" />
+ <ClInclude Include="mof\widget\OverlapLayout.hpp" />
+ <ClInclude Include="mof\widget\Page.hpp" />
+ <ClInclude Include="mof\widget\Pager.hpp" />
+ <ClInclude Include="mof\widget\RectangleView.hpp" />
+ <ClInclude Include="mof\widget\TextCompiler.hpp" />
+ <ClInclude Include="mof\widget\utilities.hpp" />
+ <ClInclude Include="mof\widget\VerticalClipping.hpp" />
+ <ClInclude Include="mof\widget\widget.hpp" />
+ <ClInclude Include="mof\widgets.hpp" />
+ <ClInclude Include="mof\widget\WidgetView.hpp" />
+ <ClInclude Include="mof\private\DeviceInputReceiver.hpp" />
+ <ClInclude Include="mof\InputDevice.hpp" />
+ <ClInclude Include="mof\InputEventCondition.hpp" />
+ <ClInclude Include="mof\InputReceiver.hpp" />
+ <ClInclude Include="mof\KeyPressedEventCondition.hpp" />
+ <ClInclude Include="mof\LoggedInputReceiver.hpp" />
+ <ClInclude Include="mof\LoggingInputReceiver.hpp" />
+ <ClInclude Include="mof\mofInput.hpp" />
+ <ClInclude Include="mof\Application.hpp" />
+ <ClInclude Include="mof\ColorComponent.hpp" />
+ <ClInclude Include="mof\Component2D.hpp" />
+ <ClInclude Include="mof\Component3D.hpp" />
+ <ClInclude Include="mof\ConsoleIO.hpp" />
+ <ClInclude Include="mof\EventCondition.hpp" />
+ <ClInclude Include="mof\EventScheduler.hpp" />
+ <ClInclude Include="mof\FactoryMethod.hpp" />
+ <ClInclude Include="mof\FilePath.hpp" />
+ <ClInclude Include="mof\Finalizer.hpp" />
+ <ClInclude Include="mof\Font.hpp" />
+ <ClInclude Include="mof\OnceEventCondition.hpp" />
+ <ClInclude Include="mof\Rectangle.hpp" />
+ <ClInclude Include="mof\ResourceManager.hpp" />
+ <ClInclude Include="mof\SceneGraph.hpp" />
+ <ClInclude Include="mof\Sprite.hpp" />
+ <ClInclude Include="mof\TextureComponent.hpp" />
+ <ClInclude Include="mof\Timer.hpp" />
+ <ClInclude Include="mof\tstring.hpp" />
+ <ClInclude Include="mof\utilities.hpp" />
+ <ClInclude Include="mof\Window.hpp" />
+ <ClInclude Include="mof\Interpreter.hpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup>\r
- <Filter Include="src">\r
- <UniqueIdentifier>{397428b0-889a-4f5a-b888-a5a373c5d931}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="src\stream">\r
- <UniqueIdentifier>{770aa3c6-2e48-4ead-af30-4fde5e9e9d4c}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="src\luabind">\r
- <UniqueIdentifier>{3374ab61-44b8-4f13-9574-4cfa328b3ed1}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="src\math">\r
- <UniqueIdentifier>{23e1ab38-df78-4655-b9cb-da8458ad0088}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="src\graphics">\r
- <UniqueIdentifier>{bb847d66-e0f4-4f53-9a50-0deca84fad49}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="src\widget">\r
- <UniqueIdentifier>{4b787978-3ac1-4b65-ad54-054574300335}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="src\input">\r
- <UniqueIdentifier>{4ce445b3-a269-47fe-badf-58571606f0c3}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="src\other">\r
- <UniqueIdentifier>{11d907f9-2451-4eb7-94a7-5b954c261a63}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="src\script">\r
- <UniqueIdentifier>{6ca2213b-e0e7-4b20-9ad1-01760342825e}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="src\private">\r
- <UniqueIdentifier>{a54a5e3b-9f7f-499c-913f-a3ec756e8567}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="header">\r
- <UniqueIdentifier>{5f4e233a-75d3-4fcb-bf54-3cacb59428eb}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="header\private">\r
- <UniqueIdentifier>{f608e8e8-407b-41d0-9cbe-1403d55187c6}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="header\stream">\r
- <UniqueIdentifier>{d809fd37-2b56-4f3e-85b0-2652f7289e0f}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="header\math">\r
- <UniqueIdentifier>{423f7d76-e9f5-448b-85e3-b76fb55a784c}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="header\graphics">\r
- <UniqueIdentifier>{1beed46d-bab3-466d-a2dc-72fdcd68015d}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="header\widget">\r
- <UniqueIdentifier>{e5c838c0-271f-4db3-8e6f-4cf8ef4f1170}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="header\input">\r
- <UniqueIdentifier>{ea1ee89d-6221-48f7-84b5-102317463b97}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="header\other">\r
- <UniqueIdentifier>{22253300-a660-4c38-8f16-5062ebec23e7}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="リソース ファイル">\r
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>\r
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>\r
- </Filter>\r
- <Filter Include="header\script">\r
- <UniqueIdentifier>{fb679753-401b-46cb-aed4-aab5682905d4}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="header\sound">\r
- <UniqueIdentifier>{e17f27a8-f936-4a47-a2cd-c0dc19daa5bd}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="src\sound">\r
- <UniqueIdentifier>{51355d59-a62d-4f10-8de2-dab135f201e2}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="src\widget\expat">\r
- <UniqueIdentifier>{79edc69d-c398-4546-b777-79f771a799af}</UniqueIdentifier>\r
- </Filter>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="mof\stream\utilities.cpp">\r
- <Filter>src\stream</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\class.cpp">\r
- <Filter>src\luabind</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\class_info.cpp">\r
- <Filter>src\luabind</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\class_registry.cpp">\r
- <Filter>src\luabind</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\class_rep.cpp">\r
- <Filter>src\luabind</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\Color.cpp">\r
- <Filter>src\luabind</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\create_class.cpp">\r
- <Filter>src\luabind</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\error.cpp">\r
- <Filter>src\luabind</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\exception_handler.cpp">\r
- <Filter>src\luabind</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\find_best_match.cpp">\r
- <Filter>src\luabind</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\function.cpp">\r
- <Filter>src\luabind</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\implicit_cast.cpp">\r
- <Filter>src\luabind</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\link_compatibility.cpp">\r
- <Filter>src\luabind</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\object_rep.cpp">\r
- <Filter>src\luabind</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\open.cpp">\r
- <Filter>src\luabind</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\overload_rep.cpp">\r
- <Filter>src\luabind</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\pcall.cpp">\r
- <Filter>src\luabind</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\ref.cpp">\r
- <Filter>src\luabind</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\scope.cpp">\r
- <Filter>src\luabind</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\stack_content_by_name.cpp">\r
- <Filter>src\luabind</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\weak_ref.cpp">\r
- <Filter>src\luabind</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\wrapper_base.cpp">\r
- <Filter>src\luabind</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\Matrix2D.cpp">\r
- <Filter>src\math</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\Matrix3D.cpp">\r
- <Filter>src\math</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\Vector2D.cpp">\r
- <Filter>src\math</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\Vector3D.cpp">\r
- <Filter>src\math</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\Captor.cpp">\r
- <Filter>src\graphics</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\GraphicsDevice.cpp">\r
- <Filter>src\graphics</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\Texture.cpp">\r
- <Filter>src\graphics</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\VertexBuffer.cpp">\r
- <Filter>src\graphics</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\widget\Container.cpp">\r
- <Filter>src\widget</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\widget\Effect.cpp">\r
- <Filter>src\widget</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\widget\Frame.cpp">\r
- <Filter>src\widget</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\widget\GridLayout.cpp">\r
- <Filter>src\widget</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\widget\ImageView.cpp">\r
- <Filter>src\widget</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\widget\Menu.cpp">\r
- <Filter>src\widget</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\widget\Message.cpp">\r
- <Filter>src\widget</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\widget\OverlapLayout.cpp">\r
- <Filter>src\widget</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\widget\Pager.cpp">\r
- <Filter>src\widget</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\widget\TextCompiler.cpp">\r
- <Filter>src\widget</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\widget\utilities.cpp">\r
- <Filter>src\widget</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\DeviceInputReceiver.cpp">\r
- <Filter>src\input</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\InputDevice.cpp">\r
- <Filter>src\input</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\InputEventCondition.cpp">\r
- <Filter>src\input</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\KeyPressedEventCondition.cpp">\r
- <Filter>src\input</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\LoggedInputReceiver.cpp">\r
- <Filter>src\input</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\LoggingInputReceiver.cpp">\r
- <Filter>src\input</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\Application.cpp">\r
- <Filter>src\other</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\ConsoleIO.cpp">\r
- <Filter>src\other</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\EventScheduler.cpp">\r
- <Filter>src\other</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\FilePath.cpp">\r
- <Filter>src\other</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\Font.cpp">\r
- <Filter>src\other</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\OnceEventCondition.cpp">\r
- <Filter>src\other</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\Sprite.cpp">\r
- <Filter>src\other</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\Timer.cpp">\r
- <Filter>src\other</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\Window.cpp">\r
- <Filter>src\other</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\PixelMapTextureBuilder.cpp">\r
- <Filter>src\private</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\private\FileTextureBuilder.cpp">\r
- <Filter>src\private</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\widget\ClippingView.cpp">\r
- <Filter>src\widget</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\widget\RectangleView.cpp">\r
- <Filter>src\widget</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\script\Environment.cpp">\r
- <Filter>src\script</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\script\LuaInterpreter.cpp">\r
- <Filter>src\script</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\script\lua_state.cpp">\r
- <Filter>src\script</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\widget\NullView.cpp">\r
- <Filter>src\widget</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\stream\Cache.cpp">\r
- <Filter>src\stream</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\DirectionalLight.cpp">\r
- <Filter>src\graphics</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\Light.cpp">\r
- <Filter>src\graphics</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\AmbientLight.cpp">\r
- <Filter>src\graphics</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\MaterialBuilder.cpp">\r
- <Filter>src\graphics</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\Camera.cpp">\r
- <Filter>src\graphics</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\Component3D.cpp">\r
- <Filter>src\other</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\Board.cpp">\r
- <Filter>src\other</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\MeshBuilder.cpp">\r
- <Filter>src\graphics</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\Mesh.cpp">\r
- <Filter>src\graphics</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\sound\CWaveFile.cpp">\r
- <Filter>src\sound</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\sound\SoundBuffer.cpp">\r
- <Filter>src\sound</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\sound\SoundFile.cpp">\r
- <Filter>src\sound</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\sound\StaticSoundBuffer.cpp">\r
- <Filter>src\sound</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\sound\StreamingSoundLoader.cpp">\r
- <Filter>src\sound</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\sound\StreamSoundBuffer.cpp">\r
- <Filter>src\sound</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\sound\WaveFile.cpp">\r
- <Filter>src\sound</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\sound\OggVorbisFile.cpp">\r
- <Filter>src\sound</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\sound\SoundDevice.cpp">\r
- <Filter>src\sound</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\sound\DirectSoundDevice.cpp">\r
- <Filter>src\sound</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\widget\mofml_parser.cpp">\r
- <Filter>src\widget</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\widget\expat\expatJP.c">\r
- <Filter>src\widget\expat</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\script\ObjectData.cpp">\r
- <Filter>src\script</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\widget\flow_layout.cpp">\r
- <Filter>src\widget</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\widget\VerticalClipping.cpp">\r
- <Filter>src\widget</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\widget\HorizontalClipping.cpp">\r
- <Filter>src\widget</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\particlegen.cpp">\r
- <Filter>src\other</Filter>\r
- </ClCompile>\r
- <ClCompile Include="mof\sound\sound_recoder.cpp">\r
- <Filter>src\sound</Filter>\r
- </ClCompile>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClInclude Include="mof\widget\FrameBuilder.hpp">\r
- <Filter>src\widget</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\Deleter.hpp">\r
- <Filter>src\other</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\private\DirectInput.hpp">\r
- <Filter>header\private</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\private\FileTextureBuilder.hpp">\r
- <Filter>header\private</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\private\GraphicsDeviceImpl.hpp">\r
- <Filter>header\private</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\private\Mesh.hpp">\r
- <Filter>header\private</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\private\MeshDisposer.hpp">\r
- <Filter>header\private</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\private\PixelMapTextureBuilder.hpp">\r
- <Filter>header\private</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\private\TextureBuilder.hpp">\r
- <Filter>header\private</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\private\TextureImpl.hpp">\r
- <Filter>header\private</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\private\VertexFVF.hpp">\r
- <Filter>header\private</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\stream\Cache.hpp">\r
- <Filter>header\stream</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\stream\Cascade.hpp">\r
- <Filter>header\stream</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\stream\Filter.hpp">\r
- <Filter>header\stream</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\Interpolation.hpp">\r
- <Filter>header\stream</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\stream\Joint.hpp">\r
- <Filter>header\stream</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\stream\KeyFrameAnimation.hpp">\r
- <Filter>header\stream</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\stream\Loop.hpp">\r
- <Filter>header\stream</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\stream\Manipulator.hpp">\r
- <Filter>header\stream</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\stream\Offset.hpp">\r
- <Filter>header\stream</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\stream\Reference.hpp">\r
- <Filter>header\stream</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\stream\ReferenceWrapper.hpp">\r
- <Filter>header\stream</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\stream\Rotation2D.hpp">\r
- <Filter>header\stream</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\stream\Scaling2D.hpp">\r
- <Filter>header\stream</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\streams.hpp">\r
- <Filter>header\stream</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\stream\Translation2D.hpp">\r
- <Filter>header\stream</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\stream\TypeStream.hpp">\r
- <Filter>header\stream</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\stream\utilities.hpp">\r
- <Filter>header\stream</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\Matrix2D.hpp">\r
- <Filter>header\math</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\Matrix3D.hpp">\r
- <Filter>header\math</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\real.hpp">\r
- <Filter>header\math</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\Vector2D.hpp">\r
- <Filter>header\math</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\Vector3D.hpp">\r
- <Filter>header\math</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\Captor.hpp">\r
- <Filter>header\graphics</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\Color.hpp">\r
- <Filter>header\graphics</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\Drawable.hpp">\r
- <Filter>header\graphics</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\Graphics3D.hpp">\r
- <Filter>header\graphics</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\GraphicsDevice.hpp">\r
- <Filter>header\graphics</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\GraphicsUnit.hpp">\r
- <Filter>header\graphics</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\Material.hpp">\r
- <Filter>header\graphics</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\mofGraphics.hpp">\r
- <Filter>header\graphics</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\PixelMap.hpp">\r
- <Filter>header\graphics</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\Texture.hpp">\r
- <Filter>header\graphics</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\graphics\utilities.hpp">\r
- <Filter>header\graphics</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\VertexBuffer.hpp">\r
- <Filter>header\graphics</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\VertexTypes.hpp">\r
- <Filter>header\graphics</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\widget\AbstractTextCompiler.hpp">\r
- <Filter>header\widget</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\widget\ClippingView.hpp">\r
- <Filter>header\widget</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\widget\Container.hpp">\r
- <Filter>header\widget</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\widget\Effect.hpp">\r
- <Filter>header\widget</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\widget\Frame.hpp">\r
- <Filter>header\widget</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\widget\GridLayout.hpp">\r
- <Filter>header\widget</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\widget\ImageView.hpp">\r
- <Filter>header\widget</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\widget\Layout.hpp">\r
- <Filter>header\widget</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\widget\Menu.hpp">\r
- <Filter>header\widget</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\widget\Message.hpp">\r
- <Filter>header\widget</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\widget\OverlapLayout.hpp">\r
- <Filter>header\widget</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\widget\Page.hpp">\r
- <Filter>header\widget</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\widget\Pager.hpp">\r
- <Filter>header\widget</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\widget\TextCompiler.hpp">\r
- <Filter>header\widget</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\widget\utilities.hpp">\r
- <Filter>header\widget</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\widget\widget.hpp">\r
- <Filter>header\widget</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\widgets.hpp">\r
- <Filter>header\widget</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\widget\WidgetView.hpp">\r
- <Filter>header\widget</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\private\DeviceInputReceiver.hpp">\r
- <Filter>header\input</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\InputDevice.hpp">\r
- <Filter>header\input</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\InputEventCondition.hpp">\r
- <Filter>header\input</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\InputReceiver.hpp">\r
- <Filter>header\input</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\KeyPressedEventCondition.hpp">\r
- <Filter>header\input</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\LoggedInputReceiver.hpp">\r
- <Filter>header\input</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\LoggingInputReceiver.hpp">\r
- <Filter>header\input</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\mofInput.hpp">\r
- <Filter>header\input</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\Application.hpp">\r
- <Filter>header\other</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\ColorComponent.hpp">\r
- <Filter>header\other</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\Component2D.hpp">\r
- <Filter>header\other</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\Component3D.hpp">\r
- <Filter>header\other</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\ConsoleIO.hpp">\r
- <Filter>header\other</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\EventCondition.hpp">\r
- <Filter>header\other</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\EventScheduler.hpp">\r
- <Filter>header\other</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\FactoryMethod.hpp">\r
- <Filter>header\other</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\FilePath.hpp">\r
- <Filter>header\other</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\Finalizer.hpp">\r
- <Filter>header\other</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\Font.hpp">\r
- <Filter>header\other</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\OnceEventCondition.hpp">\r
- <Filter>header\other</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\Rectangle.hpp">\r
- <Filter>header\other</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\ResourceManager.hpp">\r
- <Filter>header\other</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\SceneGraph.hpp">\r
- <Filter>header\other</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\Sprite.hpp">\r
- <Filter>header\other</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\TextureComponent.hpp">\r
- <Filter>header\other</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\Timer.hpp">\r
- <Filter>header\other</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\tstring.hpp">\r
- <Filter>header\other</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\utilities.hpp">\r
- <Filter>header\other</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\Window.hpp">\r
- <Filter>header\other</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\Interpreter.hpp">\r
- <Filter>header\script</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\stream\Minimum.hpp">\r
- <Filter>header\stream</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\widget\RectangleView.hpp">\r
- <Filter>header\widget</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\script\Environment.hpp">\r
- <Filter>header\script</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\script\CommandSet.hpp">\r
- <Filter>header\script</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\script\LuaInterpreter.hpp">\r
- <Filter>header\script</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\script\lua_state.hpp">\r
- <Filter>header\script</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\script\ObjectData.hpp">\r
- <Filter>header\script</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\widget\NullView.hpp">\r
- <Filter>header\widget</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\stream\Constant.hpp">\r
- <Filter>header\stream</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\Light.hpp">\r
- <Filter>header\graphics</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\DirectionalLight.hpp">\r
- <Filter>header\graphics</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\AmbientLight.hpp">\r
- <Filter>header\graphics</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\MaterialBuilder.hpp">\r
- <Filter>header\graphics</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\Camera.hpp">\r
- <Filter>header\graphics</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\Board.hpp">\r
- <Filter>header\other</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\stream\Rotation3D.hpp">\r
- <Filter>header\stream</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\stream\Translation3D.hpp">\r
- <Filter>header\stream</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\stream\Scaling3D.hpp">\r
- <Filter>header\stream</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\MeshBuilder.hpp">\r
- <Filter>header\graphics</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\sound\CWaveFile.h">\r
- <Filter>header\sound</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\sound\SoundBuffer.hpp">\r
- <Filter>header\sound</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\sound\SoundFile.hpp">\r
- <Filter>header\sound</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\sound\StaticSoundBuffer.hpp">\r
- <Filter>header\sound</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\sound\StreamingSoundLoader.hpp">\r
- <Filter>header\sound</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\sound\StreamSoundBuffer.hpp">\r
- <Filter>header\sound</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\sound\WaveFile.hpp">\r
- <Filter>header\sound</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\sound\OggVorbisFile.hpp">\r
- <Filter>header\sound</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\sound\SoundDevice.hpp">\r
- <Filter>header\sound</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\sound\DirectSoundDevice.hpp">\r
- <Filter>header\sound</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\sound\component_sound.hpp">\r
- <Filter>header\sound</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\widget\mofml_parser.hpp">\r
- <Filter>header\widget</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\script\seq_parser.hpp">\r
- <Filter>header\script</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\widget\flow_layout.hpp">\r
- <Filter>header\widget</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\widget\VerticalClipping.hpp">\r
- <Filter>header\widget</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\widget\HorizontalClipping.hpp">\r
- <Filter>header\widget</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\particlegen.hpp">\r
- <Filter>header\other</Filter>\r
- </ClInclude>\r
- <ClInclude Include="mof\sound\sound_recoder.hpp">\r
- <Filter>header\sound</Filter>\r
- </ClInclude>\r
- </ItemGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="src">
+ <UniqueIdentifier>{397428b0-889a-4f5a-b888-a5a373c5d931}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\stream">
+ <UniqueIdentifier>{770aa3c6-2e48-4ead-af30-4fde5e9e9d4c}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\luabind">
+ <UniqueIdentifier>{3374ab61-44b8-4f13-9574-4cfa328b3ed1}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\math">
+ <UniqueIdentifier>{23e1ab38-df78-4655-b9cb-da8458ad0088}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\graphics">
+ <UniqueIdentifier>{bb847d66-e0f4-4f53-9a50-0deca84fad49}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\widget">
+ <UniqueIdentifier>{4b787978-3ac1-4b65-ad54-054574300335}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\input">
+ <UniqueIdentifier>{4ce445b3-a269-47fe-badf-58571606f0c3}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\other">
+ <UniqueIdentifier>{11d907f9-2451-4eb7-94a7-5b954c261a63}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\script">
+ <UniqueIdentifier>{6ca2213b-e0e7-4b20-9ad1-01760342825e}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\private">
+ <UniqueIdentifier>{a54a5e3b-9f7f-499c-913f-a3ec756e8567}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="header">
+ <UniqueIdentifier>{5f4e233a-75d3-4fcb-bf54-3cacb59428eb}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="header\private">
+ <UniqueIdentifier>{f608e8e8-407b-41d0-9cbe-1403d55187c6}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="header\stream">
+ <UniqueIdentifier>{d809fd37-2b56-4f3e-85b0-2652f7289e0f}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="header\math">
+ <UniqueIdentifier>{423f7d76-e9f5-448b-85e3-b76fb55a784c}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="header\graphics">
+ <UniqueIdentifier>{1beed46d-bab3-466d-a2dc-72fdcd68015d}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="header\widget">
+ <UniqueIdentifier>{e5c838c0-271f-4db3-8e6f-4cf8ef4f1170}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="header\input">
+ <UniqueIdentifier>{ea1ee89d-6221-48f7-84b5-102317463b97}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="header\other">
+ <UniqueIdentifier>{22253300-a660-4c38-8f16-5062ebec23e7}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="リソース ファイル">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ <Filter Include="header\script">
+ <UniqueIdentifier>{fb679753-401b-46cb-aed4-aab5682905d4}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="header\sound">
+ <UniqueIdentifier>{e17f27a8-f936-4a47-a2cd-c0dc19daa5bd}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\sound">
+ <UniqueIdentifier>{51355d59-a62d-4f10-8de2-dab135f201e2}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\widget\expat">
+ <UniqueIdentifier>{79edc69d-c398-4546-b777-79f771a799af}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="mof\stream\utilities.cpp">
+ <Filter>src\stream</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\class.cpp">
+ <Filter>src\luabind</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\class_info.cpp">
+ <Filter>src\luabind</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\class_registry.cpp">
+ <Filter>src\luabind</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\class_rep.cpp">
+ <Filter>src\luabind</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\Color.cpp">
+ <Filter>src\luabind</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\create_class.cpp">
+ <Filter>src\luabind</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\error.cpp">
+ <Filter>src\luabind</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\exception_handler.cpp">
+ <Filter>src\luabind</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\find_best_match.cpp">
+ <Filter>src\luabind</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\function.cpp">
+ <Filter>src\luabind</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\implicit_cast.cpp">
+ <Filter>src\luabind</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\link_compatibility.cpp">
+ <Filter>src\luabind</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\object_rep.cpp">
+ <Filter>src\luabind</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\open.cpp">
+ <Filter>src\luabind</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\overload_rep.cpp">
+ <Filter>src\luabind</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\pcall.cpp">
+ <Filter>src\luabind</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\ref.cpp">
+ <Filter>src\luabind</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\scope.cpp">
+ <Filter>src\luabind</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\stack_content_by_name.cpp">
+ <Filter>src\luabind</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\weak_ref.cpp">
+ <Filter>src\luabind</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\..\..\Program Files\luabind-0.8\src\wrapper_base.cpp">
+ <Filter>src\luabind</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\Matrix2D.cpp">
+ <Filter>src\math</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\Matrix3D.cpp">
+ <Filter>src\math</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\Vector2D.cpp">
+ <Filter>src\math</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\Vector3D.cpp">
+ <Filter>src\math</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\Captor.cpp">
+ <Filter>src\graphics</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\GraphicsDevice.cpp">
+ <Filter>src\graphics</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\Texture.cpp">
+ <Filter>src\graphics</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\VertexBuffer.cpp">
+ <Filter>src\graphics</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\widget\Container.cpp">
+ <Filter>src\widget</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\widget\Effect.cpp">
+ <Filter>src\widget</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\widget\Frame.cpp">
+ <Filter>src\widget</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\widget\GridLayout.cpp">
+ <Filter>src\widget</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\widget\ImageView.cpp">
+ <Filter>src\widget</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\widget\Menu.cpp">
+ <Filter>src\widget</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\widget\Message.cpp">
+ <Filter>src\widget</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\widget\OverlapLayout.cpp">
+ <Filter>src\widget</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\widget\Pager.cpp">
+ <Filter>src\widget</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\widget\TextCompiler.cpp">
+ <Filter>src\widget</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\widget\utilities.cpp">
+ <Filter>src\widget</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\DeviceInputReceiver.cpp">
+ <Filter>src\input</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\InputDevice.cpp">
+ <Filter>src\input</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\InputEventCondition.cpp">
+ <Filter>src\input</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\KeyPressedEventCondition.cpp">
+ <Filter>src\input</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\LoggedInputReceiver.cpp">
+ <Filter>src\input</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\LoggingInputReceiver.cpp">
+ <Filter>src\input</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\Application.cpp">
+ <Filter>src\other</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\ConsoleIO.cpp">
+ <Filter>src\other</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\EventScheduler.cpp">
+ <Filter>src\other</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\FilePath.cpp">
+ <Filter>src\other</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\Font.cpp">
+ <Filter>src\other</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\OnceEventCondition.cpp">
+ <Filter>src\other</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\Sprite.cpp">
+ <Filter>src\other</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\Timer.cpp">
+ <Filter>src\other</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\Window.cpp">
+ <Filter>src\other</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\PixelMapTextureBuilder.cpp">
+ <Filter>src\private</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\private\FileTextureBuilder.cpp">
+ <Filter>src\private</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\widget\ClippingView.cpp">
+ <Filter>src\widget</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\widget\RectangleView.cpp">
+ <Filter>src\widget</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\script\Environment.cpp">
+ <Filter>src\script</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\script\LuaInterpreter.cpp">
+ <Filter>src\script</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\script\lua_state.cpp">
+ <Filter>src\script</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\widget\NullView.cpp">
+ <Filter>src\widget</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\stream\Cache.cpp">
+ <Filter>src\stream</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\DirectionalLight.cpp">
+ <Filter>src\graphics</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\Light.cpp">
+ <Filter>src\graphics</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\AmbientLight.cpp">
+ <Filter>src\graphics</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\MaterialBuilder.cpp">
+ <Filter>src\graphics</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\Camera.cpp">
+ <Filter>src\graphics</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\Component3D.cpp">
+ <Filter>src\other</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\Board.cpp">
+ <Filter>src\other</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\MeshBuilder.cpp">
+ <Filter>src\graphics</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\Mesh.cpp">
+ <Filter>src\graphics</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\sound\CWaveFile.cpp">
+ <Filter>src\sound</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\sound\SoundBuffer.cpp">
+ <Filter>src\sound</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\sound\SoundFile.cpp">
+ <Filter>src\sound</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\sound\StaticSoundBuffer.cpp">
+ <Filter>src\sound</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\sound\StreamingSoundLoader.cpp">
+ <Filter>src\sound</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\sound\StreamSoundBuffer.cpp">
+ <Filter>src\sound</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\sound\WaveFile.cpp">
+ <Filter>src\sound</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\sound\OggVorbisFile.cpp">
+ <Filter>src\sound</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\sound\SoundDevice.cpp">
+ <Filter>src\sound</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\sound\DirectSoundDevice.cpp">
+ <Filter>src\sound</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\widget\mofml_parser.cpp">
+ <Filter>src\widget</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\widget\expat\expatJP.c">
+ <Filter>src\widget\expat</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\script\ObjectData.cpp">
+ <Filter>src\script</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\widget\flow_layout.cpp">
+ <Filter>src\widget</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\widget\VerticalClipping.cpp">
+ <Filter>src\widget</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\widget\HorizontalClipping.cpp">
+ <Filter>src\widget</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\particlegen.cpp">
+ <Filter>src\other</Filter>
+ </ClCompile>
+ <ClCompile Include="mof\sound\sound_recoder.cpp">
+ <Filter>src\sound</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="mof\widget\FrameBuilder.hpp">
+ <Filter>src\widget</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\Deleter.hpp">
+ <Filter>src\other</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\private\DirectInput.hpp">
+ <Filter>header\private</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\private\FileTextureBuilder.hpp">
+ <Filter>header\private</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\private\GraphicsDeviceImpl.hpp">
+ <Filter>header\private</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\private\Mesh.hpp">
+ <Filter>header\private</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\private\MeshDisposer.hpp">
+ <Filter>header\private</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\private\PixelMapTextureBuilder.hpp">
+ <Filter>header\private</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\private\TextureBuilder.hpp">
+ <Filter>header\private</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\private\TextureImpl.hpp">
+ <Filter>header\private</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\private\VertexFVF.hpp">
+ <Filter>header\private</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\stream\Cache.hpp">
+ <Filter>header\stream</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\stream\Cascade.hpp">
+ <Filter>header\stream</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\stream\Filter.hpp">
+ <Filter>header\stream</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\Interpolation.hpp">
+ <Filter>header\stream</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\stream\Joint.hpp">
+ <Filter>header\stream</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\stream\KeyFrameAnimation.hpp">
+ <Filter>header\stream</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\stream\Loop.hpp">
+ <Filter>header\stream</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\stream\Manipulator.hpp">
+ <Filter>header\stream</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\stream\Offset.hpp">
+ <Filter>header\stream</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\stream\Reference.hpp">
+ <Filter>header\stream</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\stream\ReferenceWrapper.hpp">
+ <Filter>header\stream</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\stream\Rotation2D.hpp">
+ <Filter>header\stream</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\stream\Scaling2D.hpp">
+ <Filter>header\stream</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\streams.hpp">
+ <Filter>header\stream</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\stream\Translation2D.hpp">
+ <Filter>header\stream</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\stream\TypeStream.hpp">
+ <Filter>header\stream</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\stream\utilities.hpp">
+ <Filter>header\stream</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\Matrix2D.hpp">
+ <Filter>header\math</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\Matrix3D.hpp">
+ <Filter>header\math</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\real.hpp">
+ <Filter>header\math</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\Vector2D.hpp">
+ <Filter>header\math</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\Vector3D.hpp">
+ <Filter>header\math</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\Captor.hpp">
+ <Filter>header\graphics</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\Color.hpp">
+ <Filter>header\graphics</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\Drawable.hpp">
+ <Filter>header\graphics</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\Graphics3D.hpp">
+ <Filter>header\graphics</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\GraphicsDevice.hpp">
+ <Filter>header\graphics</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\GraphicsUnit.hpp">
+ <Filter>header\graphics</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\Material.hpp">
+ <Filter>header\graphics</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\mofGraphics.hpp">
+ <Filter>header\graphics</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\PixelMap.hpp">
+ <Filter>header\graphics</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\Texture.hpp">
+ <Filter>header\graphics</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\graphics\utilities.hpp">
+ <Filter>header\graphics</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\VertexBuffer.hpp">
+ <Filter>header\graphics</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\VertexTypes.hpp">
+ <Filter>header\graphics</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\widget\AbstractTextCompiler.hpp">
+ <Filter>header\widget</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\widget\ClippingView.hpp">
+ <Filter>header\widget</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\widget\Container.hpp">
+ <Filter>header\widget</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\widget\Effect.hpp">
+ <Filter>header\widget</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\widget\Frame.hpp">
+ <Filter>header\widget</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\widget\GridLayout.hpp">
+ <Filter>header\widget</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\widget\ImageView.hpp">
+ <Filter>header\widget</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\widget\Layout.hpp">
+ <Filter>header\widget</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\widget\Menu.hpp">
+ <Filter>header\widget</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\widget\Message.hpp">
+ <Filter>header\widget</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\widget\OverlapLayout.hpp">
+ <Filter>header\widget</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\widget\Page.hpp">
+ <Filter>header\widget</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\widget\Pager.hpp">
+ <Filter>header\widget</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\widget\TextCompiler.hpp">
+ <Filter>header\widget</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\widget\utilities.hpp">
+ <Filter>header\widget</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\widget\widget.hpp">
+ <Filter>header\widget</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\widgets.hpp">
+ <Filter>header\widget</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\widget\WidgetView.hpp">
+ <Filter>header\widget</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\private\DeviceInputReceiver.hpp">
+ <Filter>header\input</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\InputDevice.hpp">
+ <Filter>header\input</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\InputEventCondition.hpp">
+ <Filter>header\input</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\InputReceiver.hpp">
+ <Filter>header\input</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\KeyPressedEventCondition.hpp">
+ <Filter>header\input</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\LoggedInputReceiver.hpp">
+ <Filter>header\input</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\LoggingInputReceiver.hpp">
+ <Filter>header\input</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\mofInput.hpp">
+ <Filter>header\input</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\Application.hpp">
+ <Filter>header\other</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\ColorComponent.hpp">
+ <Filter>header\other</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\Component2D.hpp">
+ <Filter>header\other</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\Component3D.hpp">
+ <Filter>header\other</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\ConsoleIO.hpp">
+ <Filter>header\other</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\EventCondition.hpp">
+ <Filter>header\other</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\EventScheduler.hpp">
+ <Filter>header\other</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\FactoryMethod.hpp">
+ <Filter>header\other</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\FilePath.hpp">
+ <Filter>header\other</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\Finalizer.hpp">
+ <Filter>header\other</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\Font.hpp">
+ <Filter>header\other</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\OnceEventCondition.hpp">
+ <Filter>header\other</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\Rectangle.hpp">
+ <Filter>header\other</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\ResourceManager.hpp">
+ <Filter>header\other</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\SceneGraph.hpp">
+ <Filter>header\other</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\Sprite.hpp">
+ <Filter>header\other</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\TextureComponent.hpp">
+ <Filter>header\other</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\Timer.hpp">
+ <Filter>header\other</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\tstring.hpp">
+ <Filter>header\other</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\utilities.hpp">
+ <Filter>header\other</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\Window.hpp">
+ <Filter>header\other</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\Interpreter.hpp">
+ <Filter>header\script</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\stream\Minimum.hpp">
+ <Filter>header\stream</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\widget\RectangleView.hpp">
+ <Filter>header\widget</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\script\Environment.hpp">
+ <Filter>header\script</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\script\CommandSet.hpp">
+ <Filter>header\script</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\script\LuaInterpreter.hpp">
+ <Filter>header\script</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\script\lua_state.hpp">
+ <Filter>header\script</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\script\ObjectData.hpp">
+ <Filter>header\script</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\widget\NullView.hpp">
+ <Filter>header\widget</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\stream\Constant.hpp">
+ <Filter>header\stream</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\Light.hpp">
+ <Filter>header\graphics</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\DirectionalLight.hpp">
+ <Filter>header\graphics</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\AmbientLight.hpp">
+ <Filter>header\graphics</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\MaterialBuilder.hpp">
+ <Filter>header\graphics</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\Camera.hpp">
+ <Filter>header\graphics</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\Board.hpp">
+ <Filter>header\other</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\stream\Rotation3D.hpp">
+ <Filter>header\stream</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\stream\Translation3D.hpp">
+ <Filter>header\stream</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\stream\Scaling3D.hpp">
+ <Filter>header\stream</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\MeshBuilder.hpp">
+ <Filter>header\graphics</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\sound\CWaveFile.h">
+ <Filter>header\sound</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\sound\SoundBuffer.hpp">
+ <Filter>header\sound</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\sound\SoundFile.hpp">
+ <Filter>header\sound</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\sound\StaticSoundBuffer.hpp">
+ <Filter>header\sound</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\sound\StreamingSoundLoader.hpp">
+ <Filter>header\sound</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\sound\StreamSoundBuffer.hpp">
+ <Filter>header\sound</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\sound\WaveFile.hpp">
+ <Filter>header\sound</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\sound\OggVorbisFile.hpp">
+ <Filter>header\sound</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\sound\SoundDevice.hpp">
+ <Filter>header\sound</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\sound\DirectSoundDevice.hpp">
+ <Filter>header\sound</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\sound\component_sound.hpp">
+ <Filter>header\sound</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\widget\mofml_parser.hpp">
+ <Filter>header\widget</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\script\seq_parser.hpp">
+ <Filter>header\script</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\widget\flow_layout.hpp">
+ <Filter>header\widget</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\widget\VerticalClipping.hpp">
+ <Filter>header\widget</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\widget\HorizontalClipping.hpp">
+ <Filter>header\widget</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\particlegen.hpp">
+ <Filter>header\other</Filter>
+ </ClInclude>
+ <ClInclude Include="mof\sound\sound_recoder.hpp">
+ <Filter>header\sound</Filter>
+ </ClInclude>
+ </ItemGroup>
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
\ No newline at end of file
-all : expat.exe\r
-\r
-clean : \r
- del expat.exe obj\expat.obj \r
-\r
-expat.exe : expat.cpp\r
+all : expat.exe
+
+clean :
+ del expat.exe obj\expat.obj
+
+expat.exe : expat.cpp
cl /W4 /EHsc /Fo"obj\expat.obj" /Zc:wchar_t /MD /Fe"expat.exe" moflib.lib expat.cpp
\ No newline at end of file
-@echo off\r
-echo \83r\83\8b\83h\8aJ\8en\r
-\r
-rem C/C++\83C\83\93\83N\83\8b\81[\83h\83t\83@\83C\83\8b\r
-set INCLUDE="C:\Program Files\Microsoft Visual Studio 10.0\VC\include"\r
-\r
-rem moflib\83C\83\93\83N\83\8b\81[\83h\83t\83@\83C\83\8b\r
-set INCLUDE=%INCLUDE%;"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib"\r
-\r
-rem C/C++\83\89\83C\83u\83\89\83\8a\r
-set LIB="C:\Program Files\Microsoft Visual Studio 10.0\VC\lib"\r
-\r
-rem PlatfromSDK\83\89\83C\83u\83\89\83\8a\r
-set LIB=%LIB%;"C:\Program Files\Microsoft Platform SDK\Lib"\r
-\r
-rem moflib\83\89\83C\83u\83\89\83\8a\r
-set LIB=%LIB%;"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\debug"\r
-\r
-nmake\r
-\r
-echo \83r\83\8b\83h\8fI\97¹\r
+@echo off
+echo \83r\83\8b\83h\8aJ\8en
+
+rem C/C++\83C\83\93\83N\83\8b\81[\83h\83t\83@\83C\83\8b
+set INCLUDE="C:\Program Files\Microsoft Visual Studio 10.0\VC\include"
+
+rem moflib\83C\83\93\83N\83\8b\81[\83h\83t\83@\83C\83\8b
+set INCLUDE=%INCLUDE%;"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib"
+
+rem C/C++\83\89\83C\83u\83\89\83\8a
+set LIB="C:\Program Files\Microsoft Visual Studio 10.0\VC\lib"
+
+rem PlatfromSDK\83\89\83C\83u\83\89\83\8a
+set LIB=%LIB%;"C:\Program Files\Microsoft Platform SDK\Lib"
+
+rem moflib\83\89\83C\83u\83\89\83\8a
+set LIB=%LIB%;"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\debug"
+
+nmake
+
+echo \83r\83\8b\83h\8fI\97¹
pause
\ No newline at end of file
-@echo off\r
-echo \83N\83\8a\81[\83\93\8aJ\8en\r
-nmake clean\r
-echo \83N\83\8a\81[\83\93\8fI\97¹\r
+@echo off
+echo \83N\83\8a\81[\83\93\8aJ\8en
+nmake clean
+echo \83N\83\8a\81[\83\93\8fI\97¹
pause
\ No newline at end of file
list(APPEND CMAKE_MODULE_PATH ${MOF_ROOT_DIR}/cmake)
include(cmake/BoostUtils.cmake)
include(cmake/Macros.cmake)
-enable_testing()
# set compile flags
if (MSVC)
set(CMAKE_CXX_FLAGS "/EHsc /nologo /W4")
set(TEST_BIN_POSTFIX ".exe")
+ set(MOFLIB_BUILD_SAMPLES false)
+ #set(MOFLIB_BUILD_TESTS false)
elseif (CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_CXX_FLAGS "-Wall -O3 -DNDEBUG -std=c++0x")
#set(CMAKE_CXX_FLAGS "-Wall -g -DPSTSDK_VALIDATION_LEVEL_FULL -std=c++0x")
set(TEST_BIN_POSTFIX "")
+ set(MOFLIB_BUILD_SAMPLES true)
+ #set(MOFLIB_BUILD_TESTS true)
endif()
+if (${MOFLIB_BUILD_TESTS})
+ enable_testing()
+endif ()
+
# use some libraries
include(cmake/OtherLibs.cmake)
# build moflib
subdirs(src/)
-subdirs(sample/)
+if (${MOFLIB_BUILD_SAMPLES})
+ subdirs(sample/)
+endif ()
message("NOTICE:If you need more detail output on test failure, set environment variable CTEST_OUTPUT_ON_FAILURE to 1")
C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat
mkdir build
cd build
- cmake .. -G "Visual Studio 10"
+ cmake .. -G "Visual Studio 10" -DBOOST_ROOT="C:\Program Files\boost\boost_1_40_0"
\90¶\90¬\82³\82ê\82½\83v\83\8d\83W\83F\83N\83g\83t\83@\83C\83\8b\82©\82ç\83r\83\8b\83h
-# 各モジュールのCMakeLists.txtの記述を楽にするためのマクロ
-#
-#
-
-#{{{ mof_executable_project
+#{{{ mof_executable_project
macro(mof_executable_project exename)
parse_arguments(THIS_PROJECT "SRCDIRS;LIBRARIES" "" ${ARGN})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${MOFLIB_BIN_DIR} )
#{{{ mof_library_project
macro(mof_library_project libname)
parse_arguments(THIS_PROJECT "SRCDIRS" "" ${ARGN})
- message(STATUS ${MOFLIB_ARCHIVE_DIR})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${MOFLIB_ARCHIVE_DIR} )
foreach (srcdir ${THIS_PROJECT_SRCDIRS})
file(GLOB tmp FILES "${srcdir}/*.cc")
#{{{ mof_test_run
macro(mof_test_run testname testfile)
parse_arguments(THIS_PROJECT "LIBRARIES" "" ${ARGN})
- set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${MOFLIB_TESTBIN_DIR})
- add_executable(${testname} ${testfile})
- target_link_libraries(${testname} ${THIS_PROJECT_LIBRARIES})
- add_test(${testname} ${MOFLIB_TESTBIN_DIR}/${testname}${TEST_BIN_POSTFIX})
+ if (${MOFLIB_BUILD_TESTS})
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${MOFLIB_TESTBIN_DIR})
+ add_executable(${testname} ${testfile})
+ target_link_libraries(${testname} ${THIS_PROJECT_LIBRARIES})
+ add_test(${testname} ${MOFLIB_TESTBIN_DIR}/${testname}${TEST_BIN_POSTFIX})
+ endif ()
endmacro()
#}}}
+++ /dev/null
-# build our module
-# \90V\82½\82È\83\82\83W\83\85\81[\83\8b\82ð\93o\98^\82·\82é\82É\82Í\81A\82±\82±\82É\92Ç\8bL\82·\82é
-subdirs(base/)
-subdirs(util/)
-subdirs(math/)
-
-
"mofutil"
SRCDIRS
"."
- "linux/"
+ "windows/"
)
# test cases
-\r
-Microsoft Visual Studio Solution File, Format Version 11.00\r
-# Visual C# Express 2010\r
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SettingEditor", "SettingEditor\SettingEditor.csproj", "{8E3ECFC8-E3DD-4886-B6AE-D8B65FEDDCFF}"\r
-EndProject\r
-Global\r
- GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
- Debug|x86 = Debug|x86\r
- Release|x86 = Release|x86\r
- EndGlobalSection\r
- GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
- {8E3ECFC8-E3DD-4886-B6AE-D8B65FEDDCFF}.Debug|x86.ActiveCfg = Debug|x86\r
- {8E3ECFC8-E3DD-4886-B6AE-D8B65FEDDCFF}.Debug|x86.Build.0 = Debug|x86\r
- {8E3ECFC8-E3DD-4886-B6AE-D8B65FEDDCFF}.Release|x86.ActiveCfg = Release|x86\r
- {8E3ECFC8-E3DD-4886-B6AE-D8B65FEDDCFF}.Release|x86.Build.0 = Release|x86\r
- EndGlobalSection\r
- GlobalSection(SolutionProperties) = preSolution\r
- HideSolutionNode = FALSE\r
- EndGlobalSection\r
-EndGlobal\r
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual C# Express 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SettingEditor", "SettingEditor\SettingEditor.csproj", "{8E3ECFC8-E3DD-4886-B6AE-D8B65FEDDCFF}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|x86 = Debug|x86
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {8E3ECFC8-E3DD-4886-B6AE-D8B65FEDDCFF}.Debug|x86.ActiveCfg = Debug|x86
+ {8E3ECFC8-E3DD-4886-B6AE-D8B65FEDDCFF}.Debug|x86.Build.0 = Debug|x86
+ {8E3ECFC8-E3DD-4886-B6AE-D8B65FEDDCFF}.Release|x86.ActiveCfg = Release|x86
+ {8E3ECFC8-E3DD-4886-B6AE-D8B65FEDDCFF}.Release|x86.Build.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
-using System;\r
-using System.Collections.Generic;\r
-using System.ComponentModel;\r
-using System.Data;\r
-using System.Drawing;\r
-using System.Linq;\r
-using System.Text;\r
-using System.Windows.Forms;\r
-using System.Collections;\r
-namespace WindowsFormsApplication1\r
-{\r
- public partial class TopForm : Form\r
- {\r
-\r
- void setResolution()\r
- {\r
- // 解像度を反映\r
- for (int i = 0; i < this.resolutions.length; ++i)\r
- {\r
- StringBuilder sb = new StringBuilder();\r
- int width = this.resolutions.list[i].width;\r
- int height = this.resolutions.list[i].height;\r
-\r
- if (width == this.settings.screen.width && height == this.settings.screen.height)\r
- {\r
- this.resolution_combo_box.SelectedIndex = i;\r
- }\r
- }\r
-\r
- }\r
-\r
- void setScreenMode()\r
- {\r
- // 画面モードを反映\r
- if (this.settings.screen_mode == (int)ScreenMode.Window)\r
- {\r
- this.window_radio_button.Select();\r
- }\r
- else if (this.settings.screen_mode == (int)ScreenMode.FullScreen)\r
- {\r
- this.fullscreen_radio_button.Select();\r
- }\r
- }\r
-\r
- void setInputMode()\r
- {\r
- // 入力モードを反映\r
- if (this.settings.input_mode == (int)InputMode.Device)\r
- {\r
- this.device_radio_button.Select();\r
- }\r
- else if (this.settings.input_mode == (int)InputMode.Logging)\r
- {\r
- this.logging_radio_button.Select();\r
- }\r
- else if (this.settings.input_mode == (int)InputMode.Logged)\r
- {\r
- this.logged_radio_button.Select();\r
- }\r
- }\r
-\r
- void setFPS()\r
- {\r
- // FPSを反映\r
- if (this.settings.fps == 30)\r
- {\r
- this.radio_button_fps1.Select();\r
- }\r
- else if (this.settings.fps == 60)\r
- {\r
- this.radio_button_fps2.Select();\r
- }\r
- }\r
-\r
- void setEnableOutputFrame()\r
- {\r
- // ファイルの書き出しチェックを反映\r
- this.video_output_check_box.Checked = this.settings.enable_output_frame == 1;\r
- this.status_label.Text = "";\r
- }\r
-\r
- void setEnableOutputAudio()\r
- {\r
- // ファイルの書き出しチェックを反映\r
- this.audio_output_check_box.Checked = this.settings.enable_output_audio == 1;\r
- this.status_label.Text = "";\r
- }\r
-\r
- }\r
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.Collections;
+namespace WindowsFormsApplication1
+{
+ public partial class TopForm : Form
+ {
+
+ void setResolution()
+ {
+ // 解像度を反映
+ for (int i = 0; i < this.resolutions.length; ++i)
+ {
+ StringBuilder sb = new StringBuilder();
+ int width = this.resolutions.list[i].width;
+ int height = this.resolutions.list[i].height;
+
+ if (width == this.settings.screen.width && height == this.settings.screen.height)
+ {
+ this.resolution_combo_box.SelectedIndex = i;
+ }
+ }
+
+ }
+
+ void setScreenMode()
+ {
+ // 画面モードを反映
+ if (this.settings.screen_mode == (int)ScreenMode.Window)
+ {
+ this.window_radio_button.Select();
+ }
+ else if (this.settings.screen_mode == (int)ScreenMode.FullScreen)
+ {
+ this.fullscreen_radio_button.Select();
+ }
+ }
+
+ void setInputMode()
+ {
+ // 入力モードを反映
+ if (this.settings.input_mode == (int)InputMode.Device)
+ {
+ this.device_radio_button.Select();
+ }
+ else if (this.settings.input_mode == (int)InputMode.Logging)
+ {
+ this.logging_radio_button.Select();
+ }
+ else if (this.settings.input_mode == (int)InputMode.Logged)
+ {
+ this.logged_radio_button.Select();
+ }
+ }
+
+ void setFPS()
+ {
+ // FPSを反映
+ if (this.settings.fps == 30)
+ {
+ this.radio_button_fps1.Select();
+ }
+ else if (this.settings.fps == 60)
+ {
+ this.radio_button_fps2.Select();
+ }
+ }
+
+ void setEnableOutputFrame()
+ {
+ // ファイルの書き出しチェックを反映
+ this.video_output_check_box.Checked = this.settings.enable_output_frame == 1;
+ this.status_label.Text = "";
+ }
+
+ void setEnableOutputAudio()
+ {
+ // ファイルの書き出しチェックを反映
+ this.audio_output_check_box.Checked = this.settings.enable_output_audio == 1;
+ this.status_label.Text = "";
+ }
+
+ }
}
\ No newline at end of file
-namespace WindowsFormsApplication1\r
-{\r
- partial class TopForm\r
- {\r
- /// <summary>\r
- /// 必要なデザイナー変数です。\r
- /// </summary>\r
- private System.ComponentModel.IContainer components = null;\r
-\r
- /// <summary>\r
- /// 使用中のリソースをすべてクリーンアップします。\r
- /// </summary>\r
- /// <param name="disposing">マネージ リソースが破棄される場合 true、破棄されない場合は false です。</param>\r
- protected override void Dispose(bool disposing)\r
- {\r
- if (disposing && (components != null))\r
- {\r
- components.Dispose();\r
- }\r
- base.Dispose(disposing);\r
- }\r
-\r
- #region Windows フォーム デザイナーで生成されたコード\r
-\r
- /// <summary>\r
- /// デザイナー サポートに必要なメソッドです。このメソッドの内容を\r
- /// コード エディターで変更しないでください。\r
- /// </summary>\r
- private void InitializeComponent()\r
- {\r
- this.tabControl1 = new System.Windows.Forms.TabControl();\r
- this.tabPage1 = new System.Windows.Forms.TabPage();\r
- this.groupBox4 = new System.Windows.Forms.GroupBox();\r
- this.radio_button_fps2 = new System.Windows.Forms.RadioButton();\r
- this.radio_button_fps1 = new System.Windows.Forms.RadioButton();\r
- this.groupBox3 = new System.Windows.Forms.GroupBox();\r
- this.fullscreen_radio_button = new System.Windows.Forms.RadioButton();\r
- this.window_radio_button = new System.Windows.Forms.RadioButton();\r
- this.groupBox1 = new System.Windows.Forms.GroupBox();\r
- this.resolution_combo_box = new System.Windows.Forms.ComboBox();\r
- this.tabPage2 = new System.Windows.Forms.TabPage();\r
- this.audio_output_check_box = new System.Windows.Forms.CheckBox();\r
- this.video_output_check_box = new System.Windows.Forms.CheckBox();\r
- this.groupBox2 = new System.Windows.Forms.GroupBox();\r
- this.logged_radio_button = new System.Windows.Forms.RadioButton();\r
- this.logging_radio_button = new System.Windows.Forms.RadioButton();\r
- this.device_radio_button = new System.Windows.Forms.RadioButton();\r
- this.statusStrip1 = new System.Windows.Forms.StatusStrip();\r
- this.status_label = new System.Windows.Forms.ToolStripStatusLabel();\r
- this.menuStrip1 = new System.Windows.Forms.MenuStrip();\r
- this.ファイルToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
- this.save_menu_item = new System.Windows.Forms.ToolStripMenuItem();\r
- this.close_menu_item = new System.Windows.Forms.ToolStripMenuItem();\r
- this.編集ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
- this.undo_menu_item = new System.Windows.Forms.ToolStripMenuItem();\r
- this.redo_menu_item = new System.Windows.Forms.ToolStripMenuItem();\r
- this.tabControl1.SuspendLayout();\r
- this.tabPage1.SuspendLayout();\r
- this.groupBox4.SuspendLayout();\r
- this.groupBox3.SuspendLayout();\r
- this.groupBox1.SuspendLayout();\r
- this.tabPage2.SuspendLayout();\r
- this.groupBox2.SuspendLayout();\r
- this.statusStrip1.SuspendLayout();\r
- this.menuStrip1.SuspendLayout();\r
- this.SuspendLayout();\r
- // \r
- // tabControl1\r
- // \r
- this.tabControl1.Controls.Add(this.tabPage1);\r
- this.tabControl1.Controls.Add(this.tabPage2);\r
- this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;\r
- this.tabControl1.Location = new System.Drawing.Point(0, 24);\r
- this.tabControl1.Name = "tabControl1";\r
- this.tabControl1.SelectedIndex = 0;\r
- this.tabControl1.Size = new System.Drawing.Size(289, 275);\r
- this.tabControl1.TabIndex = 2;\r
- // \r
- // tabPage1\r
- // \r
- this.tabPage1.BackColor = System.Drawing.SystemColors.Control;\r
- this.tabPage1.Controls.Add(this.groupBox4);\r
- this.tabPage1.Controls.Add(this.groupBox3);\r
- this.tabPage1.Controls.Add(this.groupBox1);\r
- this.tabPage1.Location = new System.Drawing.Point(4, 21);\r
- this.tabPage1.Name = "tabPage1";\r
- this.tabPage1.Padding = new System.Windows.Forms.Padding(3);\r
- this.tabPage1.Size = new System.Drawing.Size(281, 250);\r
- this.tabPage1.TabIndex = 0;\r
- this.tabPage1.Text = "設定1";\r
- this.tabPage1.Click += new System.EventHandler(this.tabPage1_Click_1);\r
- // \r
- // groupBox4\r
- // \r
- this.groupBox4.Controls.Add(this.radio_button_fps2);\r
- this.groupBox4.Controls.Add(this.radio_button_fps1);\r
- this.groupBox4.Location = new System.Drawing.Point(22, 158);\r
- this.groupBox4.Name = "groupBox4";\r
- this.groupBox4.Size = new System.Drawing.Size(242, 47);\r
- this.groupBox4.TabIndex = 4;\r
- this.groupBox4.TabStop = false;\r
- this.groupBox4.Text = "フレームレート";\r
- this.groupBox4.Enter += new System.EventHandler(this.groupBox4_Enter);\r
- // \r
- // radio_button_fps2\r
- // \r
- this.radio_button_fps2.AutoSize = true;\r
- this.radio_button_fps2.Location = new System.Drawing.Point(116, 18);\r
- this.radio_button_fps2.Name = "radio_button_fps2";\r
- this.radio_button_fps2.Size = new System.Drawing.Size(56, 16);\r
- this.radio_button_fps2.TabIndex = 3;\r
- this.radio_button_fps2.TabStop = true;\r
- this.radio_button_fps2.Text = "60FPS";\r
- this.radio_button_fps2.UseVisualStyleBackColor = true;\r
- this.radio_button_fps2.CheckedChanged += new System.EventHandler(this.radio_button_fps2_CheckedChanged);\r
- // \r
- // radio_button_fps1\r
- // \r
- this.radio_button_fps1.AutoSize = true;\r
- this.radio_button_fps1.Location = new System.Drawing.Point(21, 18);\r
- this.radio_button_fps1.Name = "radio_button_fps1";\r
- this.radio_button_fps1.Size = new System.Drawing.Size(56, 16);\r
- this.radio_button_fps1.TabIndex = 2;\r
- this.radio_button_fps1.TabStop = true;\r
- this.radio_button_fps1.Text = "30FPS";\r
- this.radio_button_fps1.UseVisualStyleBackColor = true;\r
- this.radio_button_fps1.CheckedChanged += new System.EventHandler(this.radio_button_fps1_CheckedChanged);\r
- // \r
- // groupBox3\r
- // \r
- this.groupBox3.Controls.Add(this.fullscreen_radio_button);\r
- this.groupBox3.Controls.Add(this.window_radio_button);\r
- this.groupBox3.Location = new System.Drawing.Point(22, 73);\r
- this.groupBox3.Name = "groupBox3";\r
- this.groupBox3.Size = new System.Drawing.Size(242, 67);\r
- this.groupBox3.TabIndex = 3;\r
- this.groupBox3.TabStop = false;\r
- this.groupBox3.Text = "画面モード";\r
- // \r
- // fullscreen_radio_button\r
- // \r
- this.fullscreen_radio_button.AutoSize = true;\r
- this.fullscreen_radio_button.Location = new System.Drawing.Point(116, 29);\r
- this.fullscreen_radio_button.Name = "fullscreen_radio_button";\r
- this.fullscreen_radio_button.Size = new System.Drawing.Size(84, 16);\r
- this.fullscreen_radio_button.TabIndex = 1;\r
- this.fullscreen_radio_button.TabStop = true;\r
- this.fullscreen_radio_button.Text = "フルスクリーン";\r
- this.fullscreen_radio_button.UseVisualStyleBackColor = true;\r
- this.fullscreen_radio_button.CheckedChanged += new System.EventHandler(this.fullscreen_radio_button_CheckedChanged);\r
- // \r
- // window_radio_button\r
- // \r
- this.window_radio_button.AutoSize = true;\r
- this.window_radio_button.Location = new System.Drawing.Point(21, 29);\r
- this.window_radio_button.Name = "window_radio_button";\r
- this.window_radio_button.Size = new System.Drawing.Size(66, 16);\r
- this.window_radio_button.TabIndex = 0;\r
- this.window_radio_button.TabStop = true;\r
- this.window_radio_button.Text = "ウィンドウ";\r
- this.window_radio_button.UseVisualStyleBackColor = true;\r
- this.window_radio_button.CheckedChanged += new System.EventHandler(this.window_radio_button_CheckedChanged);\r
- // \r
- // groupBox1\r
- // \r
- this.groupBox1.BackColor = System.Drawing.SystemColors.Control;\r
- this.groupBox1.Controls.Add(this.resolution_combo_box);\r
- this.groupBox1.Location = new System.Drawing.Point(22, 6);\r
- this.groupBox1.Name = "groupBox1";\r
- this.groupBox1.Size = new System.Drawing.Size(242, 52);\r
- this.groupBox1.TabIndex = 2;\r
- this.groupBox1.TabStop = false;\r
- this.groupBox1.Text = "画面解像度";\r
- this.groupBox1.Enter += new System.EventHandler(this.groupBox1_Enter);\r
- // \r
- // resolution_combo_box\r
- // \r
- this.resolution_combo_box.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\r
- this.resolution_combo_box.FormattingEnabled = true;\r
- this.resolution_combo_box.Location = new System.Drawing.Point(21, 18);\r
- this.resolution_combo_box.Name = "resolution_combo_box";\r
- this.resolution_combo_box.Size = new System.Drawing.Size(179, 20);\r
- this.resolution_combo_box.TabIndex = 0;\r
- this.resolution_combo_box.SelectedIndexChanged += new System.EventHandler(this.resolution_combo_box_SelectedIndexChanged);\r
- // \r
- // tabPage2\r
- // \r
- this.tabPage2.BackColor = System.Drawing.SystemColors.Control;\r
- this.tabPage2.Controls.Add(this.audio_output_check_box);\r
- this.tabPage2.Controls.Add(this.video_output_check_box);\r
- this.tabPage2.Controls.Add(this.groupBox2);\r
- this.tabPage2.Location = new System.Drawing.Point(4, 21);\r
- this.tabPage2.Name = "tabPage2";\r
- this.tabPage2.Padding = new System.Windows.Forms.Padding(3);\r
- this.tabPage2.Size = new System.Drawing.Size(281, 250);\r
- this.tabPage2.TabIndex = 1;\r
- this.tabPage2.Text = "設定2";\r
- // \r
- // audio_output_check_box\r
- // \r
- this.audio_output_check_box.AutoSize = true;\r
- this.audio_output_check_box.Location = new System.Drawing.Point(35, 166);\r
- this.audio_output_check_box.Name = "audio_output_check_box";\r
- this.audio_output_check_box.Size = new System.Drawing.Size(100, 16);\r
- this.audio_output_check_box.TabIndex = 2;\r
- this.audio_output_check_box.Text = "音声を書き出す";\r
- this.audio_output_check_box.UseVisualStyleBackColor = true;\r
- this.audio_output_check_box.CheckedChanged += new System.EventHandler(this.audio_output_check_box_CheckedChanged_1);\r
- // \r
- // video_output_check_box\r
- // \r
- this.video_output_check_box.AutoSize = true;\r
- this.video_output_check_box.Location = new System.Drawing.Point(35, 144);\r
- this.video_output_check_box.Name = "video_output_check_box";\r
- this.video_output_check_box.Size = new System.Drawing.Size(137, 16);\r
- this.video_output_check_box.TabIndex = 1;\r
- this.video_output_check_box.Text = "フレーム画像を書き出す";\r
- this.video_output_check_box.UseVisualStyleBackColor = true;\r
- this.video_output_check_box.CheckedChanged += new System.EventHandler(this.video_output_check_box_CheckedChanged);\r
- // \r
- // groupBox2\r
- // \r
- this.groupBox2.Controls.Add(this.logged_radio_button);\r
- this.groupBox2.Controls.Add(this.logging_radio_button);\r
- this.groupBox2.Controls.Add(this.device_radio_button);\r
- this.groupBox2.Location = new System.Drawing.Point(17, 17);\r
- this.groupBox2.Name = "groupBox2";\r
- this.groupBox2.Size = new System.Drawing.Size(248, 100);\r
- this.groupBox2.TabIndex = 0;\r
- this.groupBox2.TabStop = false;\r
- this.groupBox2.Text = "入力モード";\r
- // \r
- // logged_radio_button\r
- // \r
- this.logged_radio_button.AutoSize = true;\r
- this.logged_radio_button.Location = new System.Drawing.Point(18, 65);\r
- this.logged_radio_button.Name = "logged_radio_button";\r
- this.logged_radio_button.Size = new System.Drawing.Size(120, 16);\r
- this.logged_radio_button.TabIndex = 2;\r
- this.logged_radio_button.TabStop = true;\r
- this.logged_radio_button.Text = "ファイルから読み込む";\r
- this.logged_radio_button.UseVisualStyleBackColor = true;\r
- this.logged_radio_button.CheckedChanged += new System.EventHandler(this.logged_radio_button_CheckedChanged);\r
- // \r
- // logging_radio_button\r
- // \r
- this.logging_radio_button.AutoSize = true;\r
- this.logging_radio_button.Location = new System.Drawing.Point(18, 42);\r
- this.logging_radio_button.Name = "logging_radio_button";\r
- this.logging_radio_button.Size = new System.Drawing.Size(109, 16);\r
- this.logging_radio_button.TabIndex = 1;\r
- this.logging_radio_button.TabStop = true;\r
- this.logging_radio_button.Text = "ファイルに書き出す";\r
- this.logging_radio_button.UseVisualStyleBackColor = true;\r
- this.logging_radio_button.CheckedChanged += new System.EventHandler(this.logging_radio_button_CheckedChanged);\r
- // \r
- // device_radio_button\r
- // \r
- this.device_radio_button.AutoSize = true;\r
- this.device_radio_button.Location = new System.Drawing.Point(18, 19);\r
- this.device_radio_button.Name = "device_radio_button";\r
- this.device_radio_button.Size = new System.Drawing.Size(47, 16);\r
- this.device_radio_button.TabIndex = 0;\r
- this.device_radio_button.TabStop = true;\r
- this.device_radio_button.Text = "通常";\r
- this.device_radio_button.UseVisualStyleBackColor = true;\r
- this.device_radio_button.CheckedChanged += new System.EventHandler(this.device_radio_button_CheckedChanged);\r
- // \r
- // statusStrip1\r
- // \r
- this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
- this.status_label});\r
- this.statusStrip1.Location = new System.Drawing.Point(0, 277);\r
- this.statusStrip1.Name = "statusStrip1";\r
- this.statusStrip1.Size = new System.Drawing.Size(289, 22);\r
- this.statusStrip1.TabIndex = 3;\r
- this.statusStrip1.Text = "statusStrip1";\r
- this.statusStrip1.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.statusStrip1_ItemClicked);\r
- // \r
- // status_label\r
- // \r
- this.status_label.Name = "status_label";\r
- this.status_label.Size = new System.Drawing.Size(23, 17);\r
- this.status_label.Text = "null";\r
- // \r
- // menuStrip1\r
- // \r
- this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
- this.ファイルToolStripMenuItem,\r
- this.編集ToolStripMenuItem});\r
- this.menuStrip1.Location = new System.Drawing.Point(0, 0);\r
- this.menuStrip1.Name = "menuStrip1";\r
- this.menuStrip1.Size = new System.Drawing.Size(289, 24);\r
- this.menuStrip1.TabIndex = 4;\r
- this.menuStrip1.Text = "menuStrip1";\r
- // \r
- // ファイルToolStripMenuItem\r
- // \r
- this.ファイルToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
- this.save_menu_item,\r
- this.close_menu_item});\r
- this.ファイルToolStripMenuItem.Name = "ファイルToolStripMenuItem";\r
- this.ファイルToolStripMenuItem.Size = new System.Drawing.Size(66, 20);\r
- this.ファイルToolStripMenuItem.Text = "ファイル(&F)";\r
- // \r
- // save_menu_item\r
- // \r
- this.save_menu_item.Name = "save_menu_item";\r
- this.save_menu_item.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));\r
- this.save_menu_item.Size = new System.Drawing.Size(148, 22);\r
- this.save_menu_item.Text = "保存(&S)";\r
- this.save_menu_item.Click += new System.EventHandler(this.save_menu_item_Click_1);\r
- // \r
- // close_menu_item\r
- // \r
- this.close_menu_item.Name = "close_menu_item";\r
- this.close_menu_item.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4)));\r
- this.close_menu_item.Size = new System.Drawing.Size(148, 22);\r
- this.close_menu_item.Text = "終了(&X)";\r
- this.close_menu_item.Click += new System.EventHandler(this.close_menu_item_Click);\r
- // \r
- // 編集ToolStripMenuItem\r
- // \r
- this.編集ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
- this.undo_menu_item,\r
- this.redo_menu_item});\r
- this.編集ToolStripMenuItem.Name = "編集ToolStripMenuItem";\r
- this.編集ToolStripMenuItem.Size = new System.Drawing.Size(56, 20);\r
- this.編集ToolStripMenuItem.Text = "編集(&E)";\r
- // \r
- // undo_menu_item\r
- // \r
- this.undo_menu_item.Name = "undo_menu_item";\r
- this.undo_menu_item.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Z)));\r
- this.undo_menu_item.Size = new System.Drawing.Size(166, 22);\r
- this.undo_menu_item.Text = "元に戻す(&U)";\r
- this.undo_menu_item.Click += new System.EventHandler(this.undo_menu_item_Click);\r
- // \r
- // redo_menu_item\r
- // \r
- this.redo_menu_item.Name = "redo_menu_item";\r
- this.redo_menu_item.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Y)));\r
- this.redo_menu_item.Size = new System.Drawing.Size(166, 22);\r
- this.redo_menu_item.Text = "やり直し(&R)";\r
- this.redo_menu_item.Click += new System.EventHandler(this.redo_menu_item_Click);\r
- // \r
- // TopForm\r
- // \r
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\r
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
- this.ClientSize = new System.Drawing.Size(289, 299);\r
- this.Controls.Add(this.statusStrip1);\r
- this.Controls.Add(this.tabControl1);\r
- this.Controls.Add(this.menuStrip1);\r
- this.MainMenuStrip = this.menuStrip1;\r
- this.Name = "TopForm";\r
- this.Text = "SettingEditor";\r
- this.Load += new System.EventHandler(this.Form1_Load);\r
- this.tabControl1.ResumeLayout(false);\r
- this.tabPage1.ResumeLayout(false);\r
- this.groupBox4.ResumeLayout(false);\r
- this.groupBox4.PerformLayout();\r
- this.groupBox3.ResumeLayout(false);\r
- this.groupBox3.PerformLayout();\r
- this.groupBox1.ResumeLayout(false);\r
- this.tabPage2.ResumeLayout(false);\r
- this.tabPage2.PerformLayout();\r
- this.groupBox2.ResumeLayout(false);\r
- this.groupBox2.PerformLayout();\r
- this.statusStrip1.ResumeLayout(false);\r
- this.statusStrip1.PerformLayout();\r
- this.menuStrip1.ResumeLayout(false);\r
- this.menuStrip1.PerformLayout();\r
- this.ResumeLayout(false);\r
- this.PerformLayout();\r
-\r
- }\r
-\r
- #endregion\r
-\r
- private System.Windows.Forms.TabControl tabControl1;\r
- private System.Windows.Forms.TabPage tabPage1;\r
- private System.Windows.Forms.TabPage tabPage2;\r
- private System.Windows.Forms.StatusStrip statusStrip1;\r
- private System.Windows.Forms.ToolStripStatusLabel status_label;\r
- private System.Windows.Forms.GroupBox groupBox1;\r
- private System.Windows.Forms.ComboBox resolution_combo_box;\r
- private System.Windows.Forms.CheckBox video_output_check_box;\r
- private System.Windows.Forms.GroupBox groupBox2;\r
- private System.Windows.Forms.RadioButton logged_radio_button;\r
- private System.Windows.Forms.RadioButton logging_radio_button;\r
- private System.Windows.Forms.RadioButton device_radio_button;\r
- private System.Windows.Forms.GroupBox groupBox3;\r
- private System.Windows.Forms.RadioButton fullscreen_radio_button;\r
- private System.Windows.Forms.RadioButton window_radio_button;\r
- private System.Windows.Forms.RadioButton radio_button_fps2;\r
- private System.Windows.Forms.RadioButton radio_button_fps1;\r
- private System.Windows.Forms.GroupBox groupBox4;\r
- private System.Windows.Forms.MenuStrip menuStrip1;\r
- private System.Windows.Forms.ToolStripMenuItem ファイルToolStripMenuItem;\r
- private System.Windows.Forms.ToolStripMenuItem save_menu_item;\r
- private System.Windows.Forms.ToolStripMenuItem close_menu_item;\r
- private System.Windows.Forms.ToolStripMenuItem 編集ToolStripMenuItem;\r
- private System.Windows.Forms.ToolStripMenuItem undo_menu_item;\r
- private System.Windows.Forms.ToolStripMenuItem redo_menu_item;\r
- private System.Windows.Forms.CheckBox audio_output_check_box;\r
-\r
-\r
- }\r
-}\r
-\r
+namespace WindowsFormsApplication1
+{
+ partial class TopForm
+ {
+ /// <summary>
+ /// 必要なデザイナー変数です。
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// 使用中のリソースをすべてクリーンアップします。
+ /// </summary>
+ /// <param name="disposing">マネージ リソースが破棄される場合 true、破棄されない場合は false です。</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows フォーム デザイナーで生成されたコード
+
+ /// <summary>
+ /// デザイナー サポートに必要なメソッドです。このメソッドの内容を
+ /// コード エディターで変更しないでください。
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.tabControl1 = new System.Windows.Forms.TabControl();
+ this.tabPage1 = new System.Windows.Forms.TabPage();
+ this.groupBox4 = new System.Windows.Forms.GroupBox();
+ this.radio_button_fps2 = new System.Windows.Forms.RadioButton();
+ this.radio_button_fps1 = new System.Windows.Forms.RadioButton();
+ this.groupBox3 = new System.Windows.Forms.GroupBox();
+ this.fullscreen_radio_button = new System.Windows.Forms.RadioButton();
+ this.window_radio_button = new System.Windows.Forms.RadioButton();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.resolution_combo_box = new System.Windows.Forms.ComboBox();
+ this.tabPage2 = new System.Windows.Forms.TabPage();
+ this.audio_output_check_box = new System.Windows.Forms.CheckBox();
+ this.video_output_check_box = new System.Windows.Forms.CheckBox();
+ this.groupBox2 = new System.Windows.Forms.GroupBox();
+ this.logged_radio_button = new System.Windows.Forms.RadioButton();
+ this.logging_radio_button = new System.Windows.Forms.RadioButton();
+ this.device_radio_button = new System.Windows.Forms.RadioButton();
+ this.statusStrip1 = new System.Windows.Forms.StatusStrip();
+ this.status_label = new System.Windows.Forms.ToolStripStatusLabel();
+ this.menuStrip1 = new System.Windows.Forms.MenuStrip();
+ this.ファイルToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.save_menu_item = new System.Windows.Forms.ToolStripMenuItem();
+ this.close_menu_item = new System.Windows.Forms.ToolStripMenuItem();
+ this.編集ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.undo_menu_item = new System.Windows.Forms.ToolStripMenuItem();
+ this.redo_menu_item = new System.Windows.Forms.ToolStripMenuItem();
+ this.tabControl1.SuspendLayout();
+ this.tabPage1.SuspendLayout();
+ this.groupBox4.SuspendLayout();
+ this.groupBox3.SuspendLayout();
+ this.groupBox1.SuspendLayout();
+ this.tabPage2.SuspendLayout();
+ this.groupBox2.SuspendLayout();
+ this.statusStrip1.SuspendLayout();
+ this.menuStrip1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // tabControl1
+ //
+ this.tabControl1.Controls.Add(this.tabPage1);
+ this.tabControl1.Controls.Add(this.tabPage2);
+ this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tabControl1.Location = new System.Drawing.Point(0, 24);
+ this.tabControl1.Name = "tabControl1";
+ this.tabControl1.SelectedIndex = 0;
+ this.tabControl1.Size = new System.Drawing.Size(289, 275);
+ this.tabControl1.TabIndex = 2;
+ //
+ // tabPage1
+ //
+ this.tabPage1.BackColor = System.Drawing.SystemColors.Control;
+ this.tabPage1.Controls.Add(this.groupBox4);
+ this.tabPage1.Controls.Add(this.groupBox3);
+ this.tabPage1.Controls.Add(this.groupBox1);
+ this.tabPage1.Location = new System.Drawing.Point(4, 21);
+ this.tabPage1.Name = "tabPage1";
+ this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPage1.Size = new System.Drawing.Size(281, 250);
+ this.tabPage1.TabIndex = 0;
+ this.tabPage1.Text = "設定1";
+ this.tabPage1.Click += new System.EventHandler(this.tabPage1_Click_1);
+ //
+ // groupBox4
+ //
+ this.groupBox4.Controls.Add(this.radio_button_fps2);
+ this.groupBox4.Controls.Add(this.radio_button_fps1);
+ this.groupBox4.Location = new System.Drawing.Point(22, 158);
+ this.groupBox4.Name = "groupBox4";
+ this.groupBox4.Size = new System.Drawing.Size(242, 47);
+ this.groupBox4.TabIndex = 4;
+ this.groupBox4.TabStop = false;
+ this.groupBox4.Text = "フレームレート";
+ this.groupBox4.Enter += new System.EventHandler(this.groupBox4_Enter);
+ //
+ // radio_button_fps2
+ //
+ this.radio_button_fps2.AutoSize = true;
+ this.radio_button_fps2.Location = new System.Drawing.Point(116, 18);
+ this.radio_button_fps2.Name = "radio_button_fps2";
+ this.radio_button_fps2.Size = new System.Drawing.Size(56, 16);
+ this.radio_button_fps2.TabIndex = 3;
+ this.radio_button_fps2.TabStop = true;
+ this.radio_button_fps2.Text = "60FPS";
+ this.radio_button_fps2.UseVisualStyleBackColor = true;
+ this.radio_button_fps2.CheckedChanged += new System.EventHandler(this.radio_button_fps2_CheckedChanged);
+ //
+ // radio_button_fps1
+ //
+ this.radio_button_fps1.AutoSize = true;
+ this.radio_button_fps1.Location = new System.Drawing.Point(21, 18);
+ this.radio_button_fps1.Name = "radio_button_fps1";
+ this.radio_button_fps1.Size = new System.Drawing.Size(56, 16);
+ this.radio_button_fps1.TabIndex = 2;
+ this.radio_button_fps1.TabStop = true;
+ this.radio_button_fps1.Text = "30FPS";
+ this.radio_button_fps1.UseVisualStyleBackColor = true;
+ this.radio_button_fps1.CheckedChanged += new System.EventHandler(this.radio_button_fps1_CheckedChanged);
+ //
+ // groupBox3
+ //
+ this.groupBox3.Controls.Add(this.fullscreen_radio_button);
+ this.groupBox3.Controls.Add(this.window_radio_button);
+ this.groupBox3.Location = new System.Drawing.Point(22, 73);
+ this.groupBox3.Name = "groupBox3";
+ this.groupBox3.Size = new System.Drawing.Size(242, 67);
+ this.groupBox3.TabIndex = 3;
+ this.groupBox3.TabStop = false;
+ this.groupBox3.Text = "画面モード";
+ //
+ // fullscreen_radio_button
+ //
+ this.fullscreen_radio_button.AutoSize = true;
+ this.fullscreen_radio_button.Location = new System.Drawing.Point(116, 29);
+ this.fullscreen_radio_button.Name = "fullscreen_radio_button";
+ this.fullscreen_radio_button.Size = new System.Drawing.Size(84, 16);
+ this.fullscreen_radio_button.TabIndex = 1;
+ this.fullscreen_radio_button.TabStop = true;
+ this.fullscreen_radio_button.Text = "フルスクリーン";
+ this.fullscreen_radio_button.UseVisualStyleBackColor = true;
+ this.fullscreen_radio_button.CheckedChanged += new System.EventHandler(this.fullscreen_radio_button_CheckedChanged);
+ //
+ // window_radio_button
+ //
+ this.window_radio_button.AutoSize = true;
+ this.window_radio_button.Location = new System.Drawing.Point(21, 29);
+ this.window_radio_button.Name = "window_radio_button";
+ this.window_radio_button.Size = new System.Drawing.Size(66, 16);
+ this.window_radio_button.TabIndex = 0;
+ this.window_radio_button.TabStop = true;
+ this.window_radio_button.Text = "ウィンドウ";
+ this.window_radio_button.UseVisualStyleBackColor = true;
+ this.window_radio_button.CheckedChanged += new System.EventHandler(this.window_radio_button_CheckedChanged);
+ //
+ // groupBox1
+ //
+ this.groupBox1.BackColor = System.Drawing.SystemColors.Control;
+ this.groupBox1.Controls.Add(this.resolution_combo_box);
+ this.groupBox1.Location = new System.Drawing.Point(22, 6);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(242, 52);
+ this.groupBox1.TabIndex = 2;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "画面解像度";
+ this.groupBox1.Enter += new System.EventHandler(this.groupBox1_Enter);
+ //
+ // resolution_combo_box
+ //
+ this.resolution_combo_box.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.resolution_combo_box.FormattingEnabled = true;
+ this.resolution_combo_box.Location = new System.Drawing.Point(21, 18);
+ this.resolution_combo_box.Name = "resolution_combo_box";
+ this.resolution_combo_box.Size = new System.Drawing.Size(179, 20);
+ this.resolution_combo_box.TabIndex = 0;
+ this.resolution_combo_box.SelectedIndexChanged += new System.EventHandler(this.resolution_combo_box_SelectedIndexChanged);
+ //
+ // tabPage2
+ //
+ this.tabPage2.BackColor = System.Drawing.SystemColors.Control;
+ this.tabPage2.Controls.Add(this.audio_output_check_box);
+ this.tabPage2.Controls.Add(this.video_output_check_box);
+ this.tabPage2.Controls.Add(this.groupBox2);
+ this.tabPage2.Location = new System.Drawing.Point(4, 21);
+ this.tabPage2.Name = "tabPage2";
+ this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPage2.Size = new System.Drawing.Size(281, 250);
+ this.tabPage2.TabIndex = 1;
+ this.tabPage2.Text = "設定2";
+ //
+ // audio_output_check_box
+ //
+ this.audio_output_check_box.AutoSize = true;
+ this.audio_output_check_box.Location = new System.Drawing.Point(35, 166);
+ this.audio_output_check_box.Name = "audio_output_check_box";
+ this.audio_output_check_box.Size = new System.Drawing.Size(100, 16);
+ this.audio_output_check_box.TabIndex = 2;
+ this.audio_output_check_box.Text = "音声を書き出す";
+ this.audio_output_check_box.UseVisualStyleBackColor = true;
+ this.audio_output_check_box.CheckedChanged += new System.EventHandler(this.audio_output_check_box_CheckedChanged_1);
+ //
+ // video_output_check_box
+ //
+ this.video_output_check_box.AutoSize = true;
+ this.video_output_check_box.Location = new System.Drawing.Point(35, 144);
+ this.video_output_check_box.Name = "video_output_check_box";
+ this.video_output_check_box.Size = new System.Drawing.Size(137, 16);
+ this.video_output_check_box.TabIndex = 1;
+ this.video_output_check_box.Text = "フレーム画像を書き出す";
+ this.video_output_check_box.UseVisualStyleBackColor = true;
+ this.video_output_check_box.CheckedChanged += new System.EventHandler(this.video_output_check_box_CheckedChanged);
+ //
+ // groupBox2
+ //
+ this.groupBox2.Controls.Add(this.logged_radio_button);
+ this.groupBox2.Controls.Add(this.logging_radio_button);
+ this.groupBox2.Controls.Add(this.device_radio_button);
+ this.groupBox2.Location = new System.Drawing.Point(17, 17);
+ this.groupBox2.Name = "groupBox2";
+ this.groupBox2.Size = new System.Drawing.Size(248, 100);
+ this.groupBox2.TabIndex = 0;
+ this.groupBox2.TabStop = false;
+ this.groupBox2.Text = "入力モード";
+ //
+ // logged_radio_button
+ //
+ this.logged_radio_button.AutoSize = true;
+ this.logged_radio_button.Location = new System.Drawing.Point(18, 65);
+ this.logged_radio_button.Name = "logged_radio_button";
+ this.logged_radio_button.Size = new System.Drawing.Size(120, 16);
+ this.logged_radio_button.TabIndex = 2;
+ this.logged_radio_button.TabStop = true;
+ this.logged_radio_button.Text = "ファイルから読み込む";
+ this.logged_radio_button.UseVisualStyleBackColor = true;
+ this.logged_radio_button.CheckedChanged += new System.EventHandler(this.logged_radio_button_CheckedChanged);
+ //
+ // logging_radio_button
+ //
+ this.logging_radio_button.AutoSize = true;
+ this.logging_radio_button.Location = new System.Drawing.Point(18, 42);
+ this.logging_radio_button.Name = "logging_radio_button";
+ this.logging_radio_button.Size = new System.Drawing.Size(109, 16);
+ this.logging_radio_button.TabIndex = 1;
+ this.logging_radio_button.TabStop = true;
+ this.logging_radio_button.Text = "ファイルに書き出す";
+ this.logging_radio_button.UseVisualStyleBackColor = true;
+ this.logging_radio_button.CheckedChanged += new System.EventHandler(this.logging_radio_button_CheckedChanged);
+ //
+ // device_radio_button
+ //
+ this.device_radio_button.AutoSize = true;
+ this.device_radio_button.Location = new System.Drawing.Point(18, 19);
+ this.device_radio_button.Name = "device_radio_button";
+ this.device_radio_button.Size = new System.Drawing.Size(47, 16);
+ this.device_radio_button.TabIndex = 0;
+ this.device_radio_button.TabStop = true;
+ this.device_radio_button.Text = "通常";
+ this.device_radio_button.UseVisualStyleBackColor = true;
+ this.device_radio_button.CheckedChanged += new System.EventHandler(this.device_radio_button_CheckedChanged);
+ //
+ // statusStrip1
+ //
+ this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.status_label});
+ this.statusStrip1.Location = new System.Drawing.Point(0, 277);
+ this.statusStrip1.Name = "statusStrip1";
+ this.statusStrip1.Size = new System.Drawing.Size(289, 22);
+ this.statusStrip1.TabIndex = 3;
+ this.statusStrip1.Text = "statusStrip1";
+ this.statusStrip1.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.statusStrip1_ItemClicked);
+ //
+ // status_label
+ //
+ this.status_label.Name = "status_label";
+ this.status_label.Size = new System.Drawing.Size(23, 17);
+ this.status_label.Text = "null";
+ //
+ // menuStrip1
+ //
+ this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.ファイルToolStripMenuItem,
+ this.編集ToolStripMenuItem});
+ this.menuStrip1.Location = new System.Drawing.Point(0, 0);
+ this.menuStrip1.Name = "menuStrip1";
+ this.menuStrip1.Size = new System.Drawing.Size(289, 24);
+ this.menuStrip1.TabIndex = 4;
+ this.menuStrip1.Text = "menuStrip1";
+ //
+ // ファイルToolStripMenuItem
+ //
+ this.ファイルToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.save_menu_item,
+ this.close_menu_item});
+ this.ファイルToolStripMenuItem.Name = "ファイルToolStripMenuItem";
+ this.ファイルToolStripMenuItem.Size = new System.Drawing.Size(66, 20);
+ this.ファイルToolStripMenuItem.Text = "ファイル(&F)";
+ //
+ // save_menu_item
+ //
+ this.save_menu_item.Name = "save_menu_item";
+ this.save_menu_item.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));
+ this.save_menu_item.Size = new System.Drawing.Size(148, 22);
+ this.save_menu_item.Text = "保存(&S)";
+ this.save_menu_item.Click += new System.EventHandler(this.save_menu_item_Click_1);
+ //
+ // close_menu_item
+ //
+ this.close_menu_item.Name = "close_menu_item";
+ this.close_menu_item.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4)));
+ this.close_menu_item.Size = new System.Drawing.Size(148, 22);
+ this.close_menu_item.Text = "終了(&X)";
+ this.close_menu_item.Click += new System.EventHandler(this.close_menu_item_Click);
+ //
+ // 編集ToolStripMenuItem
+ //
+ this.編集ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.undo_menu_item,
+ this.redo_menu_item});
+ this.編集ToolStripMenuItem.Name = "編集ToolStripMenuItem";
+ this.編集ToolStripMenuItem.Size = new System.Drawing.Size(56, 20);
+ this.編集ToolStripMenuItem.Text = "編集(&E)";
+ //
+ // undo_menu_item
+ //
+ this.undo_menu_item.Name = "undo_menu_item";
+ this.undo_menu_item.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Z)));
+ this.undo_menu_item.Size = new System.Drawing.Size(166, 22);
+ this.undo_menu_item.Text = "元に戻す(&U)";
+ this.undo_menu_item.Click += new System.EventHandler(this.undo_menu_item_Click);
+ //
+ // redo_menu_item
+ //
+ this.redo_menu_item.Name = "redo_menu_item";
+ this.redo_menu_item.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Y)));
+ this.redo_menu_item.Size = new System.Drawing.Size(166, 22);
+ this.redo_menu_item.Text = "やり直し(&R)";
+ this.redo_menu_item.Click += new System.EventHandler(this.redo_menu_item_Click);
+ //
+ // TopForm
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(289, 299);
+ this.Controls.Add(this.statusStrip1);
+ this.Controls.Add(this.tabControl1);
+ this.Controls.Add(this.menuStrip1);
+ this.MainMenuStrip = this.menuStrip1;
+ this.Name = "TopForm";
+ this.Text = "SettingEditor";
+ this.Load += new System.EventHandler(this.Form1_Load);
+ this.tabControl1.ResumeLayout(false);
+ this.tabPage1.ResumeLayout(false);
+ this.groupBox4.ResumeLayout(false);
+ this.groupBox4.PerformLayout();
+ this.groupBox3.ResumeLayout(false);
+ this.groupBox3.PerformLayout();
+ this.groupBox1.ResumeLayout(false);
+ this.tabPage2.ResumeLayout(false);
+ this.tabPage2.PerformLayout();
+ this.groupBox2.ResumeLayout(false);
+ this.groupBox2.PerformLayout();
+ this.statusStrip1.ResumeLayout(false);
+ this.statusStrip1.PerformLayout();
+ this.menuStrip1.ResumeLayout(false);
+ this.menuStrip1.PerformLayout();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TabControl tabControl1;
+ private System.Windows.Forms.TabPage tabPage1;
+ private System.Windows.Forms.TabPage tabPage2;
+ private System.Windows.Forms.StatusStrip statusStrip1;
+ private System.Windows.Forms.ToolStripStatusLabel status_label;
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.ComboBox resolution_combo_box;
+ private System.Windows.Forms.CheckBox video_output_check_box;
+ private System.Windows.Forms.GroupBox groupBox2;
+ private System.Windows.Forms.RadioButton logged_radio_button;
+ private System.Windows.Forms.RadioButton logging_radio_button;
+ private System.Windows.Forms.RadioButton device_radio_button;
+ private System.Windows.Forms.GroupBox groupBox3;
+ private System.Windows.Forms.RadioButton fullscreen_radio_button;
+ private System.Windows.Forms.RadioButton window_radio_button;
+ private System.Windows.Forms.RadioButton radio_button_fps2;
+ private System.Windows.Forms.RadioButton radio_button_fps1;
+ private System.Windows.Forms.GroupBox groupBox4;
+ private System.Windows.Forms.MenuStrip menuStrip1;
+ private System.Windows.Forms.ToolStripMenuItem ファイルToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem save_menu_item;
+ private System.Windows.Forms.ToolStripMenuItem close_menu_item;
+ private System.Windows.Forms.ToolStripMenuItem 編集ToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem undo_menu_item;
+ private System.Windows.Forms.ToolStripMenuItem redo_menu_item;
+ private System.Windows.Forms.CheckBox audio_output_check_box;
+
+
+ }
+}
+
-using System;\r
-using System.Collections.Generic;\r
-using System.ComponentModel;\r
-using System.Data;\r
-using System.Drawing;\r
-using System.Linq;\r
-using System.Text;\r
-using System.Windows.Forms;\r
-\r
-\r
-namespace WindowsFormsApplication1\r
-{\r
-\r
- public partial class TopForm : Form\r
- {\r
- private ResolutionList resolutions;\r
- private HistoryList hisotryList;\r
- private Settings settings;\r
- private bool ignorePostingHistory;\r
-\r
- public TopForm()\r
- {\r
- this.ignorePostingHistory = true;\r
- InitializeComponent();\r
- this.Closing += new System.ComponentModel.CancelEventHandler(this.Form1_Closing);\r
- this.settings = new Settings();\r
- this.resolutions = new ResolutionList();\r
- this.hisotryList = new HistoryList();\r
-\r
- SettingEditor.LoadSettings(ref this.settings);\r
- SettingEditor.EnumResolutionList(ref this.resolutions);\r
-\r
- // 解像度の初期化\r
- for (int i = 0; i < this.resolutions.length; ++i)\r
- {\r
- StringBuilder sb = new StringBuilder();\r
- int width = this.resolutions.list[i].width;\r
- int height = this.resolutions.list[i].height;\r
- sb.Append(width);\r
- sb.Append("x");\r
- sb.Append(height);\r
- this.resolution_combo_box.Items.Add(sb.ToString());\r
- }\r
- this.resolution_combo_box.Refresh();\r
-\r
- setResolution();\r
- setScreenMode();\r
- setInputMode();\r
- setFPS();\r
- setEnableOutputFrame();\r
- setEnableOutputAudio();\r
-\r
- this.ignorePostingHistory = false;\r
- }\r
-\r
- private void Form1_Load(object sender, EventArgs e)\r
- {\r
- \r
-\r
- }\r
- \r
- private void Form1_Closing(object sender, System.ComponentModel.CancelEventArgs e)\r
- {\r
-\r
- if (this.hisotryList.HasUndoHistory())\r
- {\r
- DialogResult result = MessageBox.Show(\r
- "編集中のデータがあります。\n設定を保存しますか?",\r
- "質問",\r
- MessageBoxButtons.YesNoCancel,\r
- MessageBoxIcon.Exclamation,\r
- MessageBoxDefaultButton.Button2\r
- );\r
- if (result == DialogResult.Yes) SettingEditor.SaveSettings(ref this.settings);\r
- else if (result == DialogResult.Cancel) e.Cancel = true;\r
- }\r
- }\r
- \r
- private void tabPage1_Click(object sender, EventArgs e)\r
- {\r
-\r
- }\r
-\r
- private void statusStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)\r
- {\r
-\r
- }\r
-\r
- private void tabPage1_Click_1(object sender, EventArgs e)\r
- {\r
-\r
- }\r
-\r
- private void groupBox1_Enter(object sender, EventArgs e)\r
- {\r
-\r
- }\r
-\r
- private void groupBox4_Enter(object sender, EventArgs e)\r
- {\r
-\r
- }\r
-\r
- \r
-\r
- private void save_menu_item_Click_1(object sender, EventArgs e)\r
- {\r
- SettingEditor.SaveSettings(ref this.settings);\r
- this.status_label.Text = "設定を保存しました。";\r
- this.hisotryList.Clear();\r
- }\r
-\r
- private void close_menu_item_Click(object sender, EventArgs e)\r
- {\r
- this.status_label.Text = "";\r
- this.Close(); \r
- }\r
-\r
- private void resolution_combo_box_SelectedIndexChanged(object sender, EventArgs e)\r
- {\r
- if (this.ignorePostingHistory) return;\r
- this.status_label.Text = "";\r
- int index = this.resolution_combo_box.SelectedIndex;\r
- int width = this.resolutions.list[index].width;\r
- int height = this.resolutions.list[index].height;\r
- int prevWidth = this.settings.screen.width;\r
- int prevHeight = this.settings.screen.height;\r
-\r
- this.hisotryList.AddHistory(\r
- delegate {\r
- this.ignorePostingHistory = true;\r
- this.settings.screen.width = width;\r
- this.settings.screen.height = height;\r
- setResolution();\r
- this.ignorePostingHistory = false;\r
- },\r
- delegate {\r
- this.ignorePostingHistory = true;\r
- this.settings.screen.width = prevWidth;\r
- this.settings.screen.height = prevHeight;\r
- setResolution();\r
- this.ignorePostingHistory = false;\r
- }\r
- );\r
-\r
- }\r
-\r
- private void AddScreenModeChangedHistory(int prev_mode, int next_mode)\r
- {\r
- this.hisotryList.AddHistory(\r
- delegate\r
- {\r
- this.ignorePostingHistory = true;\r
- this.settings.screen_mode = next_mode;\r
- setScreenMode();\r
- this.ignorePostingHistory = false;\r
- },\r
- delegate\r
- {\r
- this.ignorePostingHistory = true;\r
- this.settings.screen_mode = prev_mode;\r
- setScreenMode();\r
- this.ignorePostingHistory = false;\r
- }\r
- );\r
- }\r
-\r
- private void window_radio_button_CheckedChanged(object sender, EventArgs e)\r
- {\r
- if (this.ignorePostingHistory) return;\r
- this.status_label.Text = "";\r
- AddScreenModeChangedHistory(this.settings.screen_mode, (int)ScreenMode.Window);\r
- }\r
-\r
- private void fullscreen_radio_button_CheckedChanged(object sender, EventArgs e)\r
- {\r
- if (this.ignorePostingHistory) return;\r
- this.status_label.Text = "";\r
- AddScreenModeChangedHistory(this.settings.screen_mode, (int)ScreenMode.FullScreen);\r
- }\r
-\r
- \r
-\r
- private void AddFPSChangedHistory(int prev_fps, int next_fps)\r
- {\r
- \r
- this.hisotryList.AddHistory(\r
- delegate\r
- {\r
- this.ignorePostingHistory = true;\r
- this.settings.fps = next_fps;\r
- setFPS();\r
- this.ignorePostingHistory = false;\r
- },\r
- delegate\r
- {\r
- this.ignorePostingHistory = true;\r
- this.settings.fps = prev_fps;\r
- setFPS();\r
- this.ignorePostingHistory = false;\r
- }\r
- );\r
- }\r
-\r
- private void radio_button_fps1_CheckedChanged(object sender, EventArgs e)\r
- {\r
- if (this.ignorePostingHistory) return;\r
- this.status_label.Text = "";\r
- AddFPSChangedHistory(this.settings.fps, 30);\r
- }\r
-\r
- private void radio_button_fps2_CheckedChanged(object sender, EventArgs e)\r
- {\r
- if (this.ignorePostingHistory) return;\r
- this.status_label.Text = "";\r
- AddFPSChangedHistory(this.settings.fps, 60);\r
- }\r
-\r
- private void AddInputModeChangedHistory(int prev_mode, int next_mode)\r
- {\r
- \r
- this.hisotryList.AddHistory(\r
- delegate\r
- {\r
- this.ignorePostingHistory = true;\r
- this.settings.input_mode = next_mode;\r
- setInputMode();\r
- this.ignorePostingHistory = false;\r
- },\r
- delegate\r
- {\r
- this.ignorePostingHistory = true;\r
- this.settings.input_mode = prev_mode;\r
- setInputMode();\r
- this.ignorePostingHistory = false;\r
- }\r
- );\r
- }\r
-\r
-\r
- private void device_radio_button_CheckedChanged(object sender, EventArgs e)\r
- {\r
- if (this.ignorePostingHistory) return;\r
- this.status_label.Text = "";\r
- AddInputModeChangedHistory(this.settings.input_mode, (int)InputMode.Device);\r
- }\r
-\r
- private void logging_radio_button_CheckedChanged(object sender, EventArgs e)\r
- {\r
- if (this.ignorePostingHistory) return;\r
- this.status_label.Text = "";\r
- AddInputModeChangedHistory(this.settings.input_mode, (int)InputMode.Logging);\r
- }\r
-\r
- private void logged_radio_button_CheckedChanged(object sender, EventArgs e)\r
- {\r
- if (this.ignorePostingHistory) return;\r
- this.status_label.Text = "";\r
- AddInputModeChangedHistory(this.settings.input_mode, (int)InputMode.Logged);\r
- }\r
-\r
- private void video_output_check_box_CheckedChanged(object sender, EventArgs e)\r
- {\r
-\r
- if (this.ignorePostingHistory) return;\r
- this.status_label.Text = "";\r
- int next = this.video_output_check_box.Checked ? 1 : 0;\r
- int prev = this.settings.enable_output_frame;\r
- this.hisotryList.AddHistory(\r
- delegate\r
- {\r
- this.ignorePostingHistory = true;\r
- this.settings.enable_output_frame = next;\r
- setEnableOutputFrame();\r
- this.ignorePostingHistory = false;\r
- },\r
- delegate\r
- {\r
- this.ignorePostingHistory = true;\r
- this.settings.enable_output_frame = prev;\r
- setEnableOutputFrame();\r
- this.ignorePostingHistory = false;\r
- }\r
- );\r
- }\r
-\r
- \r
- private void undo_menu_item_Click(object sender, EventArgs e)\r
- {\r
- this.status_label.Text = "";\r
- this.hisotryList.Undo();\r
- }\r
-\r
- private void redo_menu_item_Click(object sender, EventArgs e)\r
- {\r
- this.status_label.Text = "";\r
- this.hisotryList.Redo();\r
- }\r
-\r
- private void audio_output_check_box_CheckedChanged_1(object sender, EventArgs e)\r
- {\r
- if (this.ignorePostingHistory) return;\r
- this.status_label.Text = "";\r
- int next = this.audio_output_check_box.Checked ? 1 : 0;\r
- int prev = this.settings.enable_output_audio;\r
- this.hisotryList.AddHistory(\r
- delegate\r
- {\r
- this.ignorePostingHistory = true;\r
- this.settings.enable_output_audio = next;\r
- setEnableOutputAudio();\r
- this.ignorePostingHistory = false;\r
- },\r
- delegate\r
- {\r
- this.ignorePostingHistory = true;\r
- this.settings.enable_output_audio = prev;\r
- setEnableOutputAudio();\r
- this.ignorePostingHistory = false;\r
- }\r
- );\r
- }\r
-\r
- \r
- }\r
-}\r
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+
+
+namespace WindowsFormsApplication1
+{
+
+ public partial class TopForm : Form
+ {
+ private ResolutionList resolutions;
+ private HistoryList hisotryList;
+ private Settings settings;
+ private bool ignorePostingHistory;
+
+ public TopForm()
+ {
+ this.ignorePostingHistory = true;
+ InitializeComponent();
+ this.Closing += new System.ComponentModel.CancelEventHandler(this.Form1_Closing);
+ this.settings = new Settings();
+ this.resolutions = new ResolutionList();
+ this.hisotryList = new HistoryList();
+
+ SettingEditor.LoadSettings(ref this.settings);
+ SettingEditor.EnumResolutionList(ref this.resolutions);
+
+ // 解像度の初期化
+ for (int i = 0; i < this.resolutions.length; ++i)
+ {
+ StringBuilder sb = new StringBuilder();
+ int width = this.resolutions.list[i].width;
+ int height = this.resolutions.list[i].height;
+ sb.Append(width);
+ sb.Append("x");
+ sb.Append(height);
+ this.resolution_combo_box.Items.Add(sb.ToString());
+ }
+ this.resolution_combo_box.Refresh();
+
+ setResolution();
+ setScreenMode();
+ setInputMode();
+ setFPS();
+ setEnableOutputFrame();
+ setEnableOutputAudio();
+
+ this.ignorePostingHistory = false;
+ }
+
+ private void Form1_Load(object sender, EventArgs e)
+ {
+
+
+ }
+
+ private void Form1_Closing(object sender, System.ComponentModel.CancelEventArgs e)
+ {
+
+ if (this.hisotryList.HasUndoHistory())
+ {
+ DialogResult result = MessageBox.Show(
+ "編集中のデータがあります。\n設定を保存しますか?",
+ "質問",
+ MessageBoxButtons.YesNoCancel,
+ MessageBoxIcon.Exclamation,
+ MessageBoxDefaultButton.Button2
+ );
+ if (result == DialogResult.Yes) SettingEditor.SaveSettings(ref this.settings);
+ else if (result == DialogResult.Cancel) e.Cancel = true;
+ }
+ }
+
+ private void tabPage1_Click(object sender, EventArgs e)
+ {
+
+ }
+
+ private void statusStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
+ {
+
+ }
+
+ private void tabPage1_Click_1(object sender, EventArgs e)
+ {
+
+ }
+
+ private void groupBox1_Enter(object sender, EventArgs e)
+ {
+
+ }
+
+ private void groupBox4_Enter(object sender, EventArgs e)
+ {
+
+ }
+
+
+
+ private void save_menu_item_Click_1(object sender, EventArgs e)
+ {
+ SettingEditor.SaveSettings(ref this.settings);
+ this.status_label.Text = "設定を保存しました。";
+ this.hisotryList.Clear();
+ }
+
+ private void close_menu_item_Click(object sender, EventArgs e)
+ {
+ this.status_label.Text = "";
+ this.Close();
+ }
+
+ private void resolution_combo_box_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (this.ignorePostingHistory) return;
+ this.status_label.Text = "";
+ int index = this.resolution_combo_box.SelectedIndex;
+ int width = this.resolutions.list[index].width;
+ int height = this.resolutions.list[index].height;
+ int prevWidth = this.settings.screen.width;
+ int prevHeight = this.settings.screen.height;
+
+ this.hisotryList.AddHistory(
+ delegate {
+ this.ignorePostingHistory = true;
+ this.settings.screen.width = width;
+ this.settings.screen.height = height;
+ setResolution();
+ this.ignorePostingHistory = false;
+ },
+ delegate {
+ this.ignorePostingHistory = true;
+ this.settings.screen.width = prevWidth;
+ this.settings.screen.height = prevHeight;
+ setResolution();
+ this.ignorePostingHistory = false;
+ }
+ );
+
+ }
+
+ private void AddScreenModeChangedHistory(int prev_mode, int next_mode)
+ {
+ this.hisotryList.AddHistory(
+ delegate
+ {
+ this.ignorePostingHistory = true;
+ this.settings.screen_mode = next_mode;
+ setScreenMode();
+ this.ignorePostingHistory = false;
+ },
+ delegate
+ {
+ this.ignorePostingHistory = true;
+ this.settings.screen_mode = prev_mode;
+ setScreenMode();
+ this.ignorePostingHistory = false;
+ }
+ );
+ }
+
+ private void window_radio_button_CheckedChanged(object sender, EventArgs e)
+ {
+ if (this.ignorePostingHistory) return;
+ this.status_label.Text = "";
+ AddScreenModeChangedHistory(this.settings.screen_mode, (int)ScreenMode.Window);
+ }
+
+ private void fullscreen_radio_button_CheckedChanged(object sender, EventArgs e)
+ {
+ if (this.ignorePostingHistory) return;
+ this.status_label.Text = "";
+ AddScreenModeChangedHistory(this.settings.screen_mode, (int)ScreenMode.FullScreen);
+ }
+
+
+
+ private void AddFPSChangedHistory(int prev_fps, int next_fps)
+ {
+
+ this.hisotryList.AddHistory(
+ delegate
+ {
+ this.ignorePostingHistory = true;
+ this.settings.fps = next_fps;
+ setFPS();
+ this.ignorePostingHistory = false;
+ },
+ delegate
+ {
+ this.ignorePostingHistory = true;
+ this.settings.fps = prev_fps;
+ setFPS();
+ this.ignorePostingHistory = false;
+ }
+ );
+ }
+
+ private void radio_button_fps1_CheckedChanged(object sender, EventArgs e)
+ {
+ if (this.ignorePostingHistory) return;
+ this.status_label.Text = "";
+ AddFPSChangedHistory(this.settings.fps, 30);
+ }
+
+ private void radio_button_fps2_CheckedChanged(object sender, EventArgs e)
+ {
+ if (this.ignorePostingHistory) return;
+ this.status_label.Text = "";
+ AddFPSChangedHistory(this.settings.fps, 60);
+ }
+
+ private void AddInputModeChangedHistory(int prev_mode, int next_mode)
+ {
+
+ this.hisotryList.AddHistory(
+ delegate
+ {
+ this.ignorePostingHistory = true;
+ this.settings.input_mode = next_mode;
+ setInputMode();
+ this.ignorePostingHistory = false;
+ },
+ delegate
+ {
+ this.ignorePostingHistory = true;
+ this.settings.input_mode = prev_mode;
+ setInputMode();
+ this.ignorePostingHistory = false;
+ }
+ );
+ }
+
+
+ private void device_radio_button_CheckedChanged(object sender, EventArgs e)
+ {
+ if (this.ignorePostingHistory) return;
+ this.status_label.Text = "";
+ AddInputModeChangedHistory(this.settings.input_mode, (int)InputMode.Device);
+ }
+
+ private void logging_radio_button_CheckedChanged(object sender, EventArgs e)
+ {
+ if (this.ignorePostingHistory) return;
+ this.status_label.Text = "";
+ AddInputModeChangedHistory(this.settings.input_mode, (int)InputMode.Logging);
+ }
+
+ private void logged_radio_button_CheckedChanged(object sender, EventArgs e)
+ {
+ if (this.ignorePostingHistory) return;
+ this.status_label.Text = "";
+ AddInputModeChangedHistory(this.settings.input_mode, (int)InputMode.Logged);
+ }
+
+ private void video_output_check_box_CheckedChanged(object sender, EventArgs e)
+ {
+
+ if (this.ignorePostingHistory) return;
+ this.status_label.Text = "";
+ int next = this.video_output_check_box.Checked ? 1 : 0;
+ int prev = this.settings.enable_output_frame;
+ this.hisotryList.AddHistory(
+ delegate
+ {
+ this.ignorePostingHistory = true;
+ this.settings.enable_output_frame = next;
+ setEnableOutputFrame();
+ this.ignorePostingHistory = false;
+ },
+ delegate
+ {
+ this.ignorePostingHistory = true;
+ this.settings.enable_output_frame = prev;
+ setEnableOutputFrame();
+ this.ignorePostingHistory = false;
+ }
+ );
+ }
+
+
+ private void undo_menu_item_Click(object sender, EventArgs e)
+ {
+ this.status_label.Text = "";
+ this.hisotryList.Undo();
+ }
+
+ private void redo_menu_item_Click(object sender, EventArgs e)
+ {
+ this.status_label.Text = "";
+ this.hisotryList.Redo();
+ }
+
+ private void audio_output_check_box_CheckedChanged_1(object sender, EventArgs e)
+ {
+ if (this.ignorePostingHistory) return;
+ this.status_label.Text = "";
+ int next = this.audio_output_check_box.Checked ? 1 : 0;
+ int prev = this.settings.enable_output_audio;
+ this.hisotryList.AddHistory(
+ delegate
+ {
+ this.ignorePostingHistory = true;
+ this.settings.enable_output_audio = next;
+ setEnableOutputAudio();
+ this.ignorePostingHistory = false;
+ },
+ delegate
+ {
+ this.ignorePostingHistory = true;
+ this.settings.enable_output_audio = prev;
+ setEnableOutputAudio();
+ this.ignorePostingHistory = false;
+ }
+ );
+ }
+
+
+ }
+}
-<?xml version="1.0" encoding="utf-8"?>\r
-<root>\r
- <!-- \r
- Microsoft ResX Schema \r
- \r
- Version 2.0\r
- \r
- The primary goals of this format is to allow a simple XML format \r
- that is mostly human readable. The generation and parsing of the \r
- various data types are done through the TypeConverter classes \r
- associated with the data types.\r
- \r
- Example:\r
- \r
- ... ado.net/XML headers & schema ...\r
- <resheader name="resmimetype">text/microsoft-resx</resheader>\r
- <resheader name="version">2.0</resheader>\r
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>\r
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>\r
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">\r
- <value>[base64 mime encoded serialized .NET Framework object]</value>\r
- </data>\r
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r
- <comment>This is a comment</comment>\r
- </data>\r
- \r
- There are any number of "resheader" rows that contain simple \r
- name/value pairs.\r
- \r
- Each data row contains a name, and value. The row also contains a \r
- type or mimetype. Type corresponds to a .NET class that support \r
- text/value conversion through the TypeConverter architecture. \r
- Classes that don't support this are serialized and stored with the \r
- mimetype set.\r
- \r
- The mimetype is used for serialized objects, and tells the \r
- ResXResourceReader how to depersist the object. This is currently not \r
- extensible. For a given mimetype the value must be set accordingly:\r
- \r
- Note - application/x-microsoft.net.object.binary.base64 is the format \r
- that the ResXResourceWriter will generate, however the reader can \r
- read any of the formats listed below.\r
- \r
- mimetype: application/x-microsoft.net.object.binary.base64\r
- value : The object must be serialized with \r
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r
- : and then encoded with base64 encoding.\r
- \r
- mimetype: application/x-microsoft.net.object.soap.base64\r
- value : The object must be serialized with \r
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r
- : and then encoded with base64 encoding.\r
-\r
- mimetype: application/x-microsoft.net.object.bytearray.base64\r
- value : The object must be serialized into a byte array \r
- : using a System.ComponentModel.TypeConverter\r
- : and then encoded with base64 encoding.\r
- -->\r
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">\r
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />\r
- <xsd:element name="root" msdata:IsDataSet="true">\r
- <xsd:complexType>\r
- <xsd:choice maxOccurs="unbounded">\r
- <xsd:element name="metadata">\r
- <xsd:complexType>\r
- <xsd:sequence>\r
- <xsd:element name="value" type="xsd:string" minOccurs="0" />\r
- </xsd:sequence>\r
- <xsd:attribute name="name" use="required" type="xsd:string" />\r
- <xsd:attribute name="type" type="xsd:string" />\r
- <xsd:attribute name="mimetype" type="xsd:string" />\r
- <xsd:attribute ref="xml:space" />\r
- </xsd:complexType>\r
- </xsd:element>\r
- <xsd:element name="assembly">\r
- <xsd:complexType>\r
- <xsd:attribute name="alias" type="xsd:string" />\r
- <xsd:attribute name="name" type="xsd:string" />\r
- </xsd:complexType>\r
- </xsd:element>\r
- <xsd:element name="data">\r
- <xsd:complexType>\r
- <xsd:sequence>\r
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />\r
- </xsd:sequence>\r
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />\r
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />\r
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />\r
- <xsd:attribute ref="xml:space" />\r
- </xsd:complexType>\r
- </xsd:element>\r
- <xsd:element name="resheader">\r
- <xsd:complexType>\r
- <xsd:sequence>\r
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
- </xsd:sequence>\r
- <xsd:attribute name="name" type="xsd:string" use="required" />\r
- </xsd:complexType>\r
- </xsd:element>\r
- </xsd:choice>\r
- </xsd:complexType>\r
- </xsd:element>\r
- </xsd:schema>\r
- <resheader name="resmimetype">\r
- <value>text/microsoft-resx</value>\r
- </resheader>\r
- <resheader name="version">\r
- <value>2.0</value>\r
- </resheader>\r
- <resheader name="reader">\r
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
- </resheader>\r
- <resheader name="writer">\r
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
- </resheader>\r
- <metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
- <value>119, 17</value>\r
- </metadata>\r
- <metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
- <value>234, 17</value>\r
- </metadata>\r
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>119, 17</value>
+ </metadata>
+ <metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>234, 17</value>
+ </metadata>
</root>
\ No newline at end of file
-using System;\r
-using System.Collections.Generic;\r
-using System.Linq;\r
-using System.Text;\r
-using System.Collections;\r
-\r
-namespace WindowsFormsApplication1\r
-{\r
- public delegate void HistoryCommand();\r
-\r
- public class History\r
- {\r
- public HistoryCommand doCommand;\r
- public HistoryCommand undoCommand;\r
-\r
- public History(HistoryCommand doCommand, HistoryCommand undoCommand)\r
- {\r
- this.doCommand = doCommand;\r
- this.undoCommand = undoCommand;\r
- }\r
- }\r
-\r
- public class HistoryList\r
- {\r
- private List<History> historyList;\r
- private int historyIndex;\r
-\r
- public HistoryList()\r
- {\r
- this.historyList = new List<History>();\r
- this.historyIndex = 0;\r
- }\r
-\r
- public void AddHistory(HistoryCommand doCommand, HistoryCommand undoCommand)\r
- {\r
- if (this.historyIndex != this.historyList.Count())\r
- {\r
- // Redoはできなくなる\r
- int num = this.historyList.Count() - this.historyIndex;\r
- this.historyList.RemoveRange(this.historyIndex, num);\r
- }\r
-\r
- this.historyList.Add(new History(doCommand, undoCommand));\r
- this.historyIndex = this.historyList.Count();\r
- this.historyList.Last().doCommand();\r
- \r
- }\r
-\r
- public bool Undo()\r
- {\r
- if (this.historyIndex == 0) return false;\r
- this.historyIndex--;\r
- this.historyList.ElementAt(this.historyIndex).undoCommand();\r
- return true; \r
- }\r
-\r
- public bool HasUndoHistory()\r
- {\r
- return this.historyIndex != 0;\r
- }\r
-\r
- public bool Redo()\r
- {\r
- if (this.historyIndex == this.historyList.Count()) return false;\r
- this.historyList.ElementAt(this.historyIndex).doCommand();\r
- this.historyIndex++;\r
- return true;\r
- }\r
-\r
- public bool HasRedoHistory()\r
- {\r
- return this.historyIndex != this.historyList.Count();\r
- }\r
-\r
- public void Clear()\r
- {\r
- this.historyList.Clear();\r
- this.historyIndex = 0;\r
- }\r
- }\r
-}\r
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Collections;
+
+namespace WindowsFormsApplication1
+{
+ public delegate void HistoryCommand();
+
+ public class History
+ {
+ public HistoryCommand doCommand;
+ public HistoryCommand undoCommand;
+
+ public History(HistoryCommand doCommand, HistoryCommand undoCommand)
+ {
+ this.doCommand = doCommand;
+ this.undoCommand = undoCommand;
+ }
+ }
+
+ public class HistoryList
+ {
+ private List<History> historyList;
+ private int historyIndex;
+
+ public HistoryList()
+ {
+ this.historyList = new List<History>();
+ this.historyIndex = 0;
+ }
+
+ public void AddHistory(HistoryCommand doCommand, HistoryCommand undoCommand)
+ {
+ if (this.historyIndex != this.historyList.Count())
+ {
+ // Redoはできなくなる
+ int num = this.historyList.Count() - this.historyIndex;
+ this.historyList.RemoveRange(this.historyIndex, num);
+ }
+
+ this.historyList.Add(new History(doCommand, undoCommand));
+ this.historyIndex = this.historyList.Count();
+ this.historyList.Last().doCommand();
+
+ }
+
+ public bool Undo()
+ {
+ if (this.historyIndex == 0) return false;
+ this.historyIndex--;
+ this.historyList.ElementAt(this.historyIndex).undoCommand();
+ return true;
+ }
+
+ public bool HasUndoHistory()
+ {
+ return this.historyIndex != 0;
+ }
+
+ public bool Redo()
+ {
+ if (this.historyIndex == this.historyList.Count()) return false;
+ this.historyList.ElementAt(this.historyIndex).doCommand();
+ this.historyIndex++;
+ return true;
+ }
+
+ public bool HasRedoHistory()
+ {
+ return this.historyIndex != this.historyList.Count();
+ }
+
+ public void Clear()
+ {
+ this.historyList.Clear();
+ this.historyIndex = 0;
+ }
+ }
+}
-using System;\r
-using System.Collections.Generic;\r
-using System.Linq;\r
-using System.Windows.Forms;\r
-\r
-namespace WindowsFormsApplication1\r
-{\r
- static class Program\r
- {\r
- /// <summary>\r
- /// アプリケーションのメイン エントリ ポイントです。\r
- /// </summary>\r
- [STAThread]\r
- static void Main()\r
- {\r
- Application.EnableVisualStyles();\r
- Application.SetCompatibleTextRenderingDefault(false);\r
- Application.Run(new TopForm());\r
- }\r
- }\r
-}\r
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Windows.Forms;
+
+namespace WindowsFormsApplication1
+{
+ static class Program
+ {
+ /// <summary>
+ /// アプリケーションのメイン エントリ ポイントです。
+ /// </summary>
+ [STAThread]
+ static void Main()
+ {
+ Application.EnableVisualStyles();
+ Application.SetCompatibleTextRenderingDefault(false);
+ Application.Run(new TopForm());
+ }
+ }
+}
-using System.Reflection;\r
-using System.Runtime.CompilerServices;\r
-using System.Runtime.InteropServices;\r
-\r
-// アセンブリに関する一般情報は以下の属性セットをとおして制御されます。\r
-// アセンブリに関連付けられている情報を変更するには、\r
-// これらの属性値を変更してください。\r
-[assembly: AssemblyTitle("WindowsFormsApplication1")]\r
-[assembly: AssemblyDescription("")]\r
-[assembly: AssemblyConfiguration("")]\r
-[assembly: AssemblyCompany("home")]\r
-[assembly: AssemblyProduct("WindowsFormsApplication1")]\r
-[assembly: AssemblyCopyright("Copyright © home 2010")]\r
-[assembly: AssemblyTrademark("")]\r
-[assembly: AssemblyCulture("")]\r
-\r
-// ComVisible を false に設定すると、その型はこのアセンブリ内で COM コンポーネントから \r
-// 参照不可能になります。COM からこのアセンブリ内の型にアクセスする場合は、\r
-// その型の ComVisible 属性を true に設定してください。\r
-[assembly: ComVisible(false)]\r
-\r
-// 次の GUID は、このプロジェクトが COM に公開される場合の、typelib の ID です\r
-[assembly: Guid("1a9bc481-f535-4b40-a067-1fcead90d8ca")]\r
-\r
-// アセンブリのバージョン情報は、以下の 4 つの値で構成されています:\r
-//\r
-// Major Version\r
-// Minor Version \r
-// Build Number\r
-// Revision\r
-//\r
-// すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を \r
-// 既定値にすることができます:\r
-// [assembly: AssemblyVersion("1.0.*")]\r
-[assembly: AssemblyVersion("1.0.0.0")]\r
-[assembly: AssemblyFileVersion("1.0.0.0")]\r
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// アセンブリに関する一般情報は以下の属性セットをとおして制御されます。
+// アセンブリに関連付けられている情報を変更するには、
+// これらの属性値を変更してください。
+[assembly: AssemblyTitle("WindowsFormsApplication1")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("home")]
+[assembly: AssemblyProduct("WindowsFormsApplication1")]
+[assembly: AssemblyCopyright("Copyright © home 2010")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// ComVisible を false に設定すると、その型はこのアセンブリ内で COM コンポーネントから
+// 参照不可能になります。COM からこのアセンブリ内の型にアクセスする場合は、
+// その型の ComVisible 属性を true に設定してください。
+[assembly: ComVisible(false)]
+
+// 次の GUID は、このプロジェクトが COM に公開される場合の、typelib の ID です
+[assembly: Guid("1a9bc481-f535-4b40-a067-1fcead90d8ca")]
+
+// アセンブリのバージョン情報は、以下の 4 つの値で構成されています:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を
+// 既定値にすることができます:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
-//------------------------------------------------------------------------------\r
-// <auto-generated>\r
-// このコードはツールによって生成されました。\r
-// ランタイム バージョン:4.0.30319.1\r
-//\r
-// このファイルへの変更は、以下の状況下で不正な動作の原因になったり、\r
-// コードが再生成されるときに損失したりします\r
-// </auto-generated>\r
-//------------------------------------------------------------------------------\r
-\r
-namespace WindowsFormsApplication1.Properties\r
-{\r
-\r
-\r
- /// <summary>\r
- /// ローカライズされた文字列などを検索するための、厳密に型指定されたリソース クラスです。\r
- /// </summary>\r
- // このクラスは StronglyTypedResourceBuilder クラスが ResGen\r
- // または Visual Studio のようなツールを使用して自動生成されました。\r
- // メンバーを追加または削除するには、.ResX ファイルを編集して、/str オプションと共に\r
- // ResGen を実行し直すか、または VS プロジェクトをビルドし直します。\r
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]\r
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\r
- internal class Resources\r
- {\r
-\r
- private static global::System.Resources.ResourceManager resourceMan;\r
-\r
- private static global::System.Globalization.CultureInfo resourceCulture;\r
-\r
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]\r
- internal Resources()\r
- {\r
- }\r
-\r
- /// <summary>\r
- /// このクラスに使用される、キャッシュされた ResourceManager のインスタンスを返します。\r
- /// </summary>\r
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\r
- internal static global::System.Resources.ResourceManager ResourceManager\r
- {\r
- get\r
- {\r
- if ((resourceMan == null))\r
- {\r
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WindowsFormsApplication1.Properties.Resources", typeof(Resources).Assembly);\r
- resourceMan = temp;\r
- }\r
- return resourceMan;\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// 厳密に型指定されたこのリソース クラスを使用して、すべての検索リソースに対し、\r
- /// 現在のスレッドの CurrentUICulture プロパティをオーバーライドします。\r
- /// </summary>\r
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\r
- internal static global::System.Globalization.CultureInfo Culture\r
- {\r
- get\r
- {\r
- return resourceCulture;\r
- }\r
- set\r
- {\r
- resourceCulture = value;\r
- }\r
- }\r
- }\r
-}\r
+//------------------------------------------------------------------------------
+// <auto-generated>
+// このコードはツールによって生成されました。
+// ランタイム バージョン:4.0.30319.1
+//
+// このファイルへの変更は、以下の状況下で不正な動作の原因になったり、
+// コードが再生成されるときに損失したりします
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace WindowsFormsApplication1.Properties
+{
+
+
+ /// <summary>
+ /// ローカライズされた文字列などを検索するための、厳密に型指定されたリソース クラスです。
+ /// </summary>
+ // このクラスは StronglyTypedResourceBuilder クラスが ResGen
+ // または Visual Studio のようなツールを使用して自動生成されました。
+ // メンバーを追加または削除するには、.ResX ファイルを編集して、/str オプションと共に
+ // ResGen を実行し直すか、または VS プロジェクトをビルドし直します。
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources
+ {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources()
+ {
+ }
+
+ /// <summary>
+ /// このクラスに使用される、キャッシュされた ResourceManager のインスタンスを返します。
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager
+ {
+ get
+ {
+ if ((resourceMan == null))
+ {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WindowsFormsApplication1.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// 厳密に型指定されたこのリソース クラスを使用して、すべての検索リソースに対し、
+ /// 現在のスレッドの CurrentUICulture プロパティをオーバーライドします。
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture
+ {
+ get
+ {
+ return resourceCulture;
+ }
+ set
+ {
+ resourceCulture = value;
+ }
+ }
+ }
+}
-<?xml version="1.0" encoding="utf-8"?>\r
-<root>\r
- <!-- \r
- Microsoft ResX Schema \r
- \r
- Version 2.0\r
- \r
- The primary goals of this format is to allow a simple XML format \r
- that is mostly human readable. The generation and parsing of the \r
- various data types are done through the TypeConverter classes \r
- associated with the data types.\r
- \r
- Example:\r
- \r
- ... ado.net/XML headers & schema ...\r
- <resheader name="resmimetype">text/microsoft-resx</resheader>\r
- <resheader name="version">2.0</resheader>\r
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>\r
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>\r
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">\r
- <value>[base64 mime encoded serialized .NET Framework object]</value>\r
- </data>\r
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r
- <comment>This is a comment</comment>\r
- </data>\r
- \r
- There are any number of "resheader" rows that contain simple \r
- name/value pairs.\r
- \r
- Each data row contains a name, and value. The row also contains a \r
- type or mimetype. Type corresponds to a .NET class that support \r
- text/value conversion through the TypeConverter architecture. \r
- Classes that don't support this are serialized and stored with the \r
- mimetype set.\r
- \r
- The mimetype is used for serialized objects, and tells the \r
- ResXResourceReader how to depersist the object. This is currently not \r
- extensible. For a given mimetype the value must be set accordingly:\r
- \r
- Note - application/x-microsoft.net.object.binary.base64 is the format \r
- that the ResXResourceWriter will generate, however the reader can \r
- read any of the formats listed below.\r
- \r
- mimetype: application/x-microsoft.net.object.binary.base64\r
- value : The object must be serialized with \r
- : System.Serialization.Formatters.Binary.BinaryFormatter\r
- : and then encoded with base64 encoding.\r
- \r
- mimetype: application/x-microsoft.net.object.soap.base64\r
- value : The object must be serialized with \r
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r
- : and then encoded with base64 encoding.\r
-\r
- mimetype: application/x-microsoft.net.object.bytearray.base64\r
- value : The object must be serialized into a byte array \r
- : using a System.ComponentModel.TypeConverter\r
- : and then encoded with base64 encoding.\r
- -->\r
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">\r
- <xsd:element name="root" msdata:IsDataSet="true">\r
- <xsd:complexType>\r
- <xsd:choice maxOccurs="unbounded">\r
- <xsd:element name="metadata">\r
- <xsd:complexType>\r
- <xsd:sequence>\r
- <xsd:element name="value" type="xsd:string" minOccurs="0" />\r
- </xsd:sequence>\r
- <xsd:attribute name="name" type="xsd:string" />\r
- <xsd:attribute name="type" type="xsd:string" />\r
- <xsd:attribute name="mimetype" type="xsd:string" />\r
- </xsd:complexType>\r
- </xsd:element>\r
- <xsd:element name="assembly">\r
- <xsd:complexType>\r
- <xsd:attribute name="alias" type="xsd:string" />\r
- <xsd:attribute name="name" type="xsd:string" />\r
- </xsd:complexType>\r
- </xsd:element>\r
- <xsd:element name="data">\r
- <xsd:complexType>\r
- <xsd:sequence>\r
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />\r
- </xsd:sequence>\r
- <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />\r
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />\r
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />\r
- </xsd:complexType>\r
- </xsd:element>\r
- <xsd:element name="resheader">\r
- <xsd:complexType>\r
- <xsd:sequence>\r
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
- </xsd:sequence>\r
- <xsd:attribute name="name" type="xsd:string" use="required" />\r
- </xsd:complexType>\r
- </xsd:element>\r
- </xsd:choice>\r
- </xsd:complexType>\r
- </xsd:element>\r
- </xsd:schema>\r
- <resheader name="resmimetype">\r
- <value>text/microsoft-resx</value>\r
- </resheader>\r
- <resheader name="version">\r
- <value>2.0</value>\r
- </resheader>\r
- <resheader name="reader">\r
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
- </resheader>\r
- <resheader name="writer">\r
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
- </resheader>\r
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
</root>
\ No newline at end of file
-//------------------------------------------------------------------------------\r
-// <auto-generated>\r
-// This code was generated by a tool.\r
-// Runtime Version:4.0.30319.1\r
-//\r
-// Changes to this file may cause incorrect behavior and will be lost if\r
-// the code is regenerated.\r
-// </auto-generated>\r
-//------------------------------------------------------------------------------\r
-\r
-namespace WindowsFormsApplication1.Properties\r
-{\r
-\r
-\r
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\r
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]\r
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase\r
- {\r
-\r
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));\r
-\r
- public static Settings Default\r
- {\r
- get\r
- {\r
- return defaultInstance;\r
- }\r
- }\r
- }\r
-}\r
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.1
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace WindowsFormsApplication1.Properties
+{
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+ {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default
+ {
+ get
+ {
+ return defaultInstance;
+ }
+ }
+ }
+}
-<?xml version='1.0' encoding='utf-8'?>\r
-<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">\r
- <Profiles>\r
- <Profile Name="(Default)" />\r
- </Profiles>\r
- <Settings />\r
-</SettingsFile>\r
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
+ <Profiles>
+ <Profile Name="(Default)" />
+ </Profiles>
+ <Settings />
+</SettingsFile>
-using System;\r
-using System.Collections.Generic;\r
-using System.Linq;\r
-using System.Text;\r
-using System.Runtime.InteropServices;\r
-\r
-namespace WindowsFormsApplication1\r
-{\r
- enum ScreenMode { Window = 0, FullScreen };\r
- enum InputMode { Device = 0, Logging, Logged };\r
- \r
- [StructLayout(LayoutKind.Sequential)]\r
- struct Resolution {\r
- public int width;\r
- public int height;\r
- }\r
-\r
- [StructLayout(LayoutKind.Sequential)]\r
- struct Settings {\r
- public Resolution screen;\r
- public int screen_mode;///< 0=ウィンドウ, 1=フルスクリーン\r
- public int fps;\r
- public int input_mode;///< 0=通常モード, 1=ファイルに書き出す, 2=ファイルから読み込む\r
- public int enable_output_frame;\r
- public int enable_output_audio;\r
- }\r
-\r
- [StructLayout(LayoutKind.Sequential)]\r
- struct ResolutionList\r
- {\r
- [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=32, ArraySubType=UnmanagedType.Struct)]\r
- public Resolution[] list;\r
- public int length;\r
- }\r
-\r
- class SettingEditor\r
- {\r
- [DllImport("impl.dll")]\r
- public static extern int LoadSettings(ref Settings setting);\r
-\r
- [DllImport("impl.dll")]\r
- public static extern int SaveSettings(ref Settings setting);\r
-\r
- [DllImport("impl.dll")]\r
- public static extern void EnumResolutionList(ref ResolutionList resolutions);\r
- }\r
-}\r
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Runtime.InteropServices;
+
+namespace WindowsFormsApplication1
+{
+ enum ScreenMode { Window = 0, FullScreen };
+ enum InputMode { Device = 0, Logging, Logged };
+
+ [StructLayout(LayoutKind.Sequential)]
+ struct Resolution {
+ public int width;
+ public int height;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ struct Settings {
+ public Resolution screen;
+ public int screen_mode;///< 0=ウィンドウ, 1=フルスクリーン
+ public int fps;
+ public int input_mode;///< 0=通常モード, 1=ファイルに書き出す, 2=ファイルから読み込む
+ public int enable_output_frame;
+ public int enable_output_audio;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ struct ResolutionList
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=32, ArraySubType=UnmanagedType.Struct)]
+ public Resolution[] list;
+ public int length;
+ }
+
+ class SettingEditor
+ {
+ [DllImport("impl.dll")]
+ public static extern int LoadSettings(ref Settings setting);
+
+ [DllImport("impl.dll")]
+ public static extern int SaveSettings(ref Settings setting);
+
+ [DllImport("impl.dll")]
+ public static extern void EnumResolutionList(ref ResolutionList resolutions);
+ }
+}
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <PropertyGroup>\r
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
- <Platform Condition=" '$(Platform)' == '' ">x86</Platform>\r
- <ProductVersion>8.0.30703</ProductVersion>\r
- <SchemaVersion>2.0</SchemaVersion>\r
- <ProjectGuid>{8E3ECFC8-E3DD-4886-B6AE-D8B65FEDDCFF}</ProjectGuid>\r
- <OutputType>WinExe</OutputType>\r
- <AppDesignerFolder>Properties</AppDesignerFolder>\r
- <RootNamespace>WindowsFormsApplication1</RootNamespace>\r
- <AssemblyName>SettingEditor</AssemblyName>\r
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>\r
- <TargetFrameworkProfile>Client</TargetFrameworkProfile>\r
- <FileAlignment>512</FileAlignment>\r
- </PropertyGroup>\r
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">\r
- <PlatformTarget>x86</PlatformTarget>\r
- <DebugSymbols>true</DebugSymbols>\r
- <DebugType>full</DebugType>\r
- <Optimize>false</Optimize>\r
- <OutputPath>bin\Debug\</OutputPath>\r
- <DefineConstants>DEBUG;TRACE</DefineConstants>\r
- <ErrorReport>prompt</ErrorReport>\r
- <WarningLevel>4</WarningLevel>\r
- </PropertyGroup>\r
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">\r
- <PlatformTarget>x86</PlatformTarget>\r
- <DebugType>pdbonly</DebugType>\r
- <Optimize>true</Optimize>\r
- <OutputPath>bin\Release\</OutputPath>\r
- <DefineConstants>TRACE</DefineConstants>\r
- <ErrorReport>prompt</ErrorReport>\r
- <WarningLevel>4</WarningLevel>\r
- </PropertyGroup>\r
- <ItemGroup>\r
- <Reference Include="System" />\r
- <Reference Include="System.Core" />\r
- <Reference Include="System.Xml.Linq" />\r
- <Reference Include="System.Data.DataSetExtensions" />\r
- <Reference Include="Microsoft.CSharp" />\r
- <Reference Include="System.Data" />\r
- <Reference Include="System.Deployment" />\r
- <Reference Include="System.Drawing" />\r
- <Reference Include="System.Windows.Forms" />\r
- <Reference Include="System.Xml" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <Compile Include="AssignToForm.cs">\r
- <SubType>Form</SubType>\r
- </Compile>\r
- <Compile Include="History.cs" />\r
- <Compile Include="SettingEditor.cs" />\r
- <Compile Include="Form1.cs">\r
- <SubType>Form</SubType>\r
- </Compile>\r
- <Compile Include="Form1.Designer.cs">\r
- <DependentUpon>Form1.cs</DependentUpon>\r
- </Compile>\r
- <Compile Include="Program.cs" />\r
- <Compile Include="Properties\AssemblyInfo.cs" />\r
- <EmbeddedResource Include="Form1.resx">\r
- <DependentUpon>Form1.cs</DependentUpon>\r
- </EmbeddedResource>\r
- <EmbeddedResource Include="Properties\Resources.resx">\r
- <Generator>ResXFileCodeGenerator</Generator>\r
- <LastGenOutput>Resources.Designer.cs</LastGenOutput>\r
- <SubType>Designer</SubType>\r
- </EmbeddedResource>\r
- <Compile Include="Properties\Resources.Designer.cs">\r
- <AutoGen>True</AutoGen>\r
- <DependentUpon>Resources.resx</DependentUpon>\r
- </Compile>\r
- <None Include="Properties\Settings.settings">\r
- <Generator>SettingsSingleFileGenerator</Generator>\r
- <LastGenOutput>Settings.Designer.cs</LastGenOutput>\r
- </None>\r
- <Compile Include="Properties\Settings.Designer.cs">\r
- <AutoGen>True</AutoGen>\r
- <DependentUpon>Settings.settings</DependentUpon>\r
- <DesignTimeSharedInput>True</DesignTimeSharedInput>\r
- </Compile>\r
- </ItemGroup>\r
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
- Other similar extension points exist, see Microsoft.Common.targets.\r
- <Target Name="BeforeBuild">\r
- </Target>\r
- <Target Name="AfterBuild">\r
- </Target>\r
- -->\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{8E3ECFC8-E3DD-4886-B6AE-D8B65FEDDCFF}</ProjectGuid>
+ <OutputType>WinExe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>WindowsFormsApplication1</RootNamespace>
+ <AssemblyName>SettingEditor</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <TargetFrameworkProfile>Client</TargetFrameworkProfile>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <PlatformTarget>x86</PlatformTarget>
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <PlatformTarget>x86</PlatformTarget>
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Deployment" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AssignToForm.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="History.cs" />
+ <Compile Include="SettingEditor.cs" />
+ <Compile Include="Form1.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="Form1.Designer.cs">
+ <DependentUpon>Form1.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Program.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <EmbeddedResource Include="Form1.resx">
+ <DependentUpon>Form1.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Properties\Resources.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <Compile Include="Properties\Resources.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Resources.resx</DependentUpon>
+ </Compile>
+ <None Include="Properties\Settings.settings">
+ <Generator>SettingsSingleFileGenerator</Generator>
+ <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+ </None>
+ <Compile Include="Properties\Settings.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Settings.settings</DependentUpon>
+ <DesignTimeSharedInput>True</DesignTimeSharedInput>
+ </Compile>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
\ No newline at end of file
-C:\Documents and Settings\TomohiroYasuda\my documents\visual studio 2010\Projects\SettingEditor\SettingEditor\bin\Debug\SettingEditor.exe\r
-C:\Documents and Settings\TomohiroYasuda\my documents\visual studio 2010\Projects\SettingEditor\SettingEditor\bin\Debug\SettingEditor.pdb\r
-C:\Documents and Settings\TomohiroYasuda\my documents\visual studio 2010\Projects\SettingEditor\SettingEditor\obj\x86\Debug\ResolveAssemblyReference.cache\r
-C:\Documents and Settings\TomohiroYasuda\my documents\visual studio 2010\Projects\SettingEditor\SettingEditor\obj\x86\Debug\WindowsFormsApplication1.Properties.Resources.resources\r
-C:\Documents and Settings\TomohiroYasuda\my documents\visual studio 2010\Projects\SettingEditor\SettingEditor\obj\x86\Debug\GenerateResource.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\my documents\visual studio 2010\Projects\SettingEditor\SettingEditor\obj\x86\Debug\GenerateResource.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\my documents\visual studio 2010\Projects\SettingEditor\SettingEditor\obj\x86\Debug\SettingEditor.exe\r
-C:\Documents and Settings\TomohiroYasuda\my documents\visual studio 2010\Projects\SettingEditor\SettingEditor\obj\x86\Debug\SettingEditor.pdb\r
-C:\Documents and Settings\TomohiroYasuda\my documents\visual studio 2010\Projects\SettingEditor\SettingEditor\obj\x86\Debug\WindowsFormsApplication1.TopForm.resources\r
+C:\Documents and Settings\TomohiroYasuda\my documents\visual studio 2010\Projects\SettingEditor\SettingEditor\bin\Debug\SettingEditor.exe
+C:\Documents and Settings\TomohiroYasuda\my documents\visual studio 2010\Projects\SettingEditor\SettingEditor\bin\Debug\SettingEditor.pdb
+C:\Documents and Settings\TomohiroYasuda\my documents\visual studio 2010\Projects\SettingEditor\SettingEditor\obj\x86\Debug\ResolveAssemblyReference.cache
+C:\Documents and Settings\TomohiroYasuda\my documents\visual studio 2010\Projects\SettingEditor\SettingEditor\obj\x86\Debug\WindowsFormsApplication1.Properties.Resources.resources
+C:\Documents and Settings\TomohiroYasuda\my documents\visual studio 2010\Projects\SettingEditor\SettingEditor\obj\x86\Debug\GenerateResource.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\my documents\visual studio 2010\Projects\SettingEditor\SettingEditor\obj\x86\Debug\GenerateResource.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\my documents\visual studio 2010\Projects\SettingEditor\SettingEditor\obj\x86\Debug\SettingEditor.exe
+C:\Documents and Settings\TomohiroYasuda\my documents\visual studio 2010\Projects\SettingEditor\SettingEditor\obj\x86\Debug\SettingEditor.pdb
+C:\Documents and Settings\TomohiroYasuda\my documents\visual studio 2010\Projects\SettingEditor\SettingEditor\obj\x86\Debug\WindowsFormsApplication1.TopForm.resources
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2010\Projects\SettingEditor\SettingEditor\bin\Release\SettingEditor.exe\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2010\Projects\SettingEditor\SettingEditor\bin\Release\SettingEditor.pdb\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2010\Projects\SettingEditor\SettingEditor\obj\x86\Release\ResolveAssemblyReference.cache\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2010\Projects\SettingEditor\SettingEditor\obj\x86\Release\WindowsFormsApplication1.TopForm.resources\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2010\Projects\SettingEditor\SettingEditor\obj\x86\Release\WindowsFormsApplication1.Properties.Resources.resources\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2010\Projects\SettingEditor\SettingEditor\obj\x86\Release\GenerateResource.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2010\Projects\SettingEditor\SettingEditor\obj\x86\Release\GenerateResource.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2010\Projects\SettingEditor\SettingEditor\obj\x86\Release\SettingEditor.exe\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2010\Projects\SettingEditor\SettingEditor\obj\x86\Release\SettingEditor.pdb\r
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2010\Projects\SettingEditor\SettingEditor\bin\Release\SettingEditor.exe
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2010\Projects\SettingEditor\SettingEditor\bin\Release\SettingEditor.pdb
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2010\Projects\SettingEditor\SettingEditor\obj\x86\Release\ResolveAssemblyReference.cache
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2010\Projects\SettingEditor\SettingEditor\obj\x86\Release\WindowsFormsApplication1.TopForm.resources
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2010\Projects\SettingEditor\SettingEditor\obj\x86\Release\WindowsFormsApplication1.Properties.Resources.resources
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2010\Projects\SettingEditor\SettingEditor\obj\x86\Release\GenerateResource.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2010\Projects\SettingEditor\SettingEditor\obj\x86\Release\GenerateResource.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2010\Projects\SettingEditor\SettingEditor\obj\x86\Release\SettingEditor.exe
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2010\Projects\SettingEditor\SettingEditor\obj\x86\Release\SettingEditor.pdb
-"Name","Guard","Fire","Ice","Thunder","Grabity","Durability","Price"\r
-"\83{\83\8d\82«\82ê",1,0,0,0,0,0,1\r
-"\83\8c\83U\81[\83\8d\81[\83u",5,5,5,5,5,5,120\r
-"\83K\83\89\83N\83^\82æ\82ë\82¢",1,0,0,0,0,0,1\r
-"\83\8c\83U\81[\83A\81[\83}\81[",,,,,,,\r
-"\83X\83P\83C\83\8b\83\81\83C\83\8b",,,,,,,\r
-"\83`\83F\83C\83\93\83\81\83C\83\8b",,,,,,,\r
-"\83v\83\8c\81[\83g\83\81\83C\83\8b",,,,,,,\r
-"\8e¾\95\97\82Ì\83\8d\81[\83u",,,,,,,\r
-"\83A\83\8b\83e\83~\83X\83\8d\81[\83u",,,,,,,\r
-"\83h\83\89\83S\83\93\83\81\83C\83\8b",,,,,,,\r
-"\8fd\90í\8em\82Ì\82æ\82ë\82¢",,,,,,,\r
-"\96\82\96@\8bâ\82Ì\8aZ",,,,,,,\r
-"\89Î\97³\82Ì\8aZ",,,,,,,\r
-"\8cQ\89_\82Ì\8aZ",,,,,,,\r
-"\95X\89Í\82Ì\8aZ",,,,,,,\r
-"\83o\83\93\83f\83B\83b\83g\83A\81[\83}\81[",,,,,,,\r
+"Name","Guard","Fire","Ice","Thunder","Grabity","Durability","Price"
+"\83{\83\8d\82«\82ê",1,0,0,0,0,0,1
+"\83\8c\83U\81[\83\8d\81[\83u",5,5,5,5,5,5,120
+"\83K\83\89\83N\83^\82æ\82ë\82¢",1,0,0,0,0,0,1
+"\83\8c\83U\81[\83A\81[\83}\81[",,,,,,,
+"\83X\83P\83C\83\8b\83\81\83C\83\8b",,,,,,,
+"\83`\83F\83C\83\93\83\81\83C\83\8b",,,,,,,
+"\83v\83\8c\81[\83g\83\81\83C\83\8b",,,,,,,
+"\8e¾\95\97\82Ì\83\8d\81[\83u",,,,,,,
+"\83A\83\8b\83e\83~\83X\83\8d\81[\83u",,,,,,,
+"\83h\83\89\83S\83\93\83\81\83C\83\8b",,,,,,,
+"\8fd\90í\8em\82Ì\82æ\82ë\82¢",,,,,,,
+"\96\82\96@\8bâ\82Ì\8aZ",,,,,,,
+"\89Î\97³\82Ì\8aZ",,,,,,,
+"\8cQ\89_\82Ì\8aZ",,,,,,,
+"\95X\89Í\82Ì\8aZ",,,,,,,
+"\83o\83\93\83f\83B\83b\83g\83A\81[\83}\81[",,,,,,,
-"Name","Type","Effect","Durability","Target"\r
-"\83K\83\8b\83i\83N\83\8a\83t",0,20,5,20\r
-"\83{\83{",,,,\r
-"\83N\83@\83e\83B\81[\83X",,,,\r
-"\83V\83\93",,,,\r
-"\83f\83B\83A\83\93\83\80\81[",,,,\r
-"\83A\83X\83g\83\8d\83e\83C\83\93",,,,\r
-"\83\94\83@\83h\83D",,,,\r
-"\83v\83\8d\83g\83\8d\83\93",,,,\r
+"Name","Type","Effect","Durability","Target"
+"\83K\83\8b\83i\83N\83\8a\83t",0,20,5,20
+"\83{\83{",,,,
+"\83N\83@\83e\83B\81[\83X",,,,
+"\83V\83\93",,,,
+"\83f\83B\83A\83\93\83\80\81[",,,,
+"\83A\83X\83g\83\8d\83e\83C\83\93",,,,
+"\83\94\83@\83h\83D",,,,
+"\83v\83\8d\83g\83\8d\83\93",,,,
-"Object","Motion","Class","Texture","Delay","Loop"\r
-"fireball","data/motion/explosion.csv","Billboard","image/explosion.dds",20,\r
+"Object","Motion","Class","Texture","Delay","Loop"
+"fireball","data/motion/explosion.csv","Billboard","image/explosion.dds",20,
-"Object","Motion","Class","Texture","Delay","Loop"\r
-"icicle","data/motion/icicle.csv","model/ice.x","image/ice.bmp",20,\r
+"Object","Motion","Class","Texture","Delay","Loop"
+"icicle","data/motion/icicle.csv","model/ice.x","image/ice.bmp",20,
-"Object","Motion","Class","Texture","Delay","Loop"\r
-"a","data/motion/shock.csv","Billboard","image/shock.dds",20,\r
+"Object","Motion","Class","Texture","Delay","Loop"
+"a","data/motion/shock.csv","Billboard","image/shock.dds",20,
-"Object","Motion","Class","Texture","Delay","Loop"\r
-"rock","data/motion/throw.csv","model/stone.x",,20,\r
-"explosion","data/motion/explosion.csv","Billboard","image/explosion.dds",60,\r
+"Object","Motion","Class","Texture","Delay","Loop"
+"rock","data/motion/throw.csv","model/stone.x",,20,
+"explosion","data/motion/explosion.csv","Billboard","image/explosion.dds",60,
-"Name","Type","Cost","Base","Coefficient","Attribute","Effect","Message"\r
-"\8eã\8dU\8c\82","\8dU\8c\82",2,0,100,,"data/effect/shock.csv","novalue"\r
-"\92\86\8dU\8c\82","\8dU\8c\82",3,0,150,,"data/effect/shock.csv","novalue"\r
-"\8b\8dU\8c\82","\8dU\8c\82",4,0,200,,"data/effect/shock.csv","novalue"\r
-"\89Î\8eR\92e","\8dU\8c\82",5,20,0,"Fire","data/effect/vol.csv","\89Î\8eR\92e"\r
-"\96h\8cä",,,,,,,\r
+"Name","Type","Cost","Base","Coefficient","Attribute","Effect","Message"
+"\8eã\8dU\8c\82","\8dU\8c\82",2,0,100,,"data/effect/shock.csv","novalue"
+"\92\86\8dU\8c\82","\8dU\8c\82",3,0,150,,"data/effect/shock.csv","novalue"
+"\8b\8dU\8c\82","\8dU\8c\82",4,0,200,,"data/effect/shock.csv","novalue"
+"\89Î\8eR\92e","\8dU\8c\82",5,20,0,"Fire","data/effect/vol.csv","\89Î\8eR\92e"
+"\96h\8cä",,,,,,,
-"Name","Type","Color","Hp","Offense","Defense","Speed","Fire","Ice","Thunder","Gravity","AI","DirectAttack1","DirectAttack2","SpecialAttack1","SpecialAttack2"\r
-"\83\8a\81[\83\8b","\83\8a\81[\83\8b\8cn","FFFFFF",20,15,3,3,0,100,100,100,"\83U\83R\83^\83C\83v","\8eã\8dU\8c\82",,,\r
-"\83E\83b\83f\83B\81[","\83E\83b\83f\83B\81[\8cn","FFFFFF",10,5,3,3,100,100,100,100,"\83U\83R\83^\83C\83v","\8eã\8dU\8c\82",,,\r
-"\83R\83\93\83t\83\85\81[\83W\83\87\83\93\83X\83\89\83C\83\80","\83R\83\93\83t\83\85\81[\83W\83\87\83\93\83X\83\89\83C\83\80\8cn",,,,,,,,,,,,,,\r
-"\83}\83E\83X\83B\81[","\83}\83E\83X\83B\81[\8cn",,,,,,,,,,,,,,\r
-"\83k\83\89\81[\83k","\83k\83\89\81[\83k\8cn",,,,,,,,,,,,,,\r
-"\83\8d\83b\83L\81[","\83\8d\83b\83L\81[\8cn","FFFFFF",20,18,8,3,30,170,70,100,"\83U\83R\83^\83C\83v",,,"\89Î\8eR\92e",\r
-"\83N\83\89\83\80\83X\83l\83C\83\8b","\83N\83\89\83\80\83X\83l\83C\83\8b\8cn",,,,,,,,,,,,,,\r
-"\83v\83\89\83\93\83e\83B\81[","\83E\83b\83f\83B\81[\8cn",,,,,,,,,,,,,,\r
-"\83k\83\89\83k\83X","\83k\83\89\81[\83k\8cn",,,,,,,,,,,,,,\r
-"\83G\83\8c\83L\83k\83\89\81[\83k","\83k\83\89\81[\83k\8cn",,,,,,,,,,,,,,\r
-"\83o\83\8b\81[\83\93","\83R\83\93\83t\83\85\81[\83W\83\87\83\93\83X\83\89\83C\83\80\8cn",,,,,,,,,,,,,,\r
-"\83A\83L\83\8c\83X","\83\8a\81[\83\8b\8cn",,,,,,,,,,,,,,\r
-"\82Ù\82Ì\82¨\82Ì\83i\83}\83Y","\83k\83\89\81[\83k\8cn",,,,,,,,,,,,,,\r
-"\83}\83O\83}\83b\83L\83B\81[","\83\8d\83b\83L\81[\8cn",,,,,,,,,,,,,,\r
-"\83n\83\93\83O\83\89\81[","\83}\83E\83X\83B\81[\8cn",,,,,,,,,,,,,,\r
-"\83e\83\8b\83e\83\8b","\83R\83\93\83t\83\85\81[\83W\83\87\83\93\83X\83\89\83C\83\80\8cn",,,,,,,,,,,,,,\r
-"\83g\83\8c\83\93\83e\83B\81[","\83E\83b\83f\83B\81[\8cn",,,,,,,,,,,,,,\r
-"\83^\83C\83j\81[\83S\81[\83\8c\83\80","\83\8d\83b\83L\81[\8cn",,,,,,,,,,,,,,\r
-"\83O\83\89\83g\83\93","\83}\83E\83X\83B\81[\8cn",,,,,,,,,,,,,,\r
-"\83\8c\83b\83h\83h\83\8c\83C\83N","\83m\83_\83S\83\93\8cn",,,,,,,,,,,,,,\r
-"\83n\83\89\83y\83R\81[\83\8b","\83}\83E\83X\83B\81[\8cn",,,,,,,,,,,,,,\r
-"\83n\83\93\83O\83\8a\81[\83h\83b\83O","\83n\83\93\83O\83\8a\81[\83h\83b\83O\8cn","FFFFFF",120,30,10,6,100,100,100,100,"\83A\83^\83b\83J\81[","\8eã\8dU\8c\82",,,\r
-"\83X\83\8f\83\93\83p\83X","\83X\83\8f\83\93\83p\83X\8cn",,,,,,,,,,,,,,\r
-"\83\89\83~\83A\83\93\83n\81[\83s\81[","\83\89\83~\83A\83\93\83n\81[\83s\81[\8cn","FFFFFF",33,12,6,10,200,150,120,90,"\83U\83R\83^\83C\83v","\8eã\8dU\8c\82",,,\r
-"\83_\81[\83N\83h\83\89\83O\81[\83\93","\83_\81[\83N\83h\83\89\83O\81[\83\93\8cn",,,,,,,,,,,,,,\r
-"\83}\83\93\83h\83\89\83S\83\89","\83}\83\93\83h\83\89\83S\83\89\8cn","FFFFFF",60,30,20,10,180,150,50,100,"\83U\83R\83^\83C\83v","\92\86\8dU\8c\82",,,\r
-"\83m\83_\83S\83\93","\83m\83_\83S\83\93\8cn",,,,,,,,,,,,,,\r
-"\83g\83\8a\83P\83\89\83\8c\83b\83N\83X","\83m\83_\83S\83\93\8cn",,,,,,,,,,,,,,\r
-"\83o\81[\83j\83\93\83O\83c\83\8a\81[","\83o\81[\83j\83\93\83O\83c\83\8a\81[\8cn",,,,,,,,,,,,,,\r
-"\83O\83\8a\81[\83\93\83s\81[\83|\83b\83h","\83O\83\8a\81[\83\93\83s\81[\83|\83b\83h\8cn",,,,,,,,,,,,,,\r
-"\83W\83F\83m\83T\83C\83h\83n\81[\83v\81[\83\93","\83O\83\8a\81[\83\93\83s\81[\83|\83b\83h\8cn",,,,,,,,,,,,,,\r
-"\83K\83\8b\83\80","\83n\83\93\83O\83\8a\81[\83h\83b\83O\8cn",,,,,,,,,,,,,,\r
+"Name","Type","Color","Hp","Offense","Defense","Speed","Fire","Ice","Thunder","Gravity","AI","DirectAttack1","DirectAttack2","SpecialAttack1","SpecialAttack2"
+"\83\8a\81[\83\8b","\83\8a\81[\83\8b\8cn","FFFFFF",20,15,3,3,0,100,100,100,"\83U\83R\83^\83C\83v","\8eã\8dU\8c\82",,,
+"\83E\83b\83f\83B\81[","\83E\83b\83f\83B\81[\8cn","FFFFFF",10,5,3,3,100,100,100,100,"\83U\83R\83^\83C\83v","\8eã\8dU\8c\82",,,
+"\83R\83\93\83t\83\85\81[\83W\83\87\83\93\83X\83\89\83C\83\80","\83R\83\93\83t\83\85\81[\83W\83\87\83\93\83X\83\89\83C\83\80\8cn",,,,,,,,,,,,,,
+"\83}\83E\83X\83B\81[","\83}\83E\83X\83B\81[\8cn",,,,,,,,,,,,,,
+"\83k\83\89\81[\83k","\83k\83\89\81[\83k\8cn",,,,,,,,,,,,,,
+"\83\8d\83b\83L\81[","\83\8d\83b\83L\81[\8cn","FFFFFF",20,18,8,3,30,170,70,100,"\83U\83R\83^\83C\83v",,,"\89Î\8eR\92e",
+"\83N\83\89\83\80\83X\83l\83C\83\8b","\83N\83\89\83\80\83X\83l\83C\83\8b\8cn",,,,,,,,,,,,,,
+"\83v\83\89\83\93\83e\83B\81[","\83E\83b\83f\83B\81[\8cn",,,,,,,,,,,,,,
+"\83k\83\89\83k\83X","\83k\83\89\81[\83k\8cn",,,,,,,,,,,,,,
+"\83G\83\8c\83L\83k\83\89\81[\83k","\83k\83\89\81[\83k\8cn",,,,,,,,,,,,,,
+"\83o\83\8b\81[\83\93","\83R\83\93\83t\83\85\81[\83W\83\87\83\93\83X\83\89\83C\83\80\8cn",,,,,,,,,,,,,,
+"\83A\83L\83\8c\83X","\83\8a\81[\83\8b\8cn",,,,,,,,,,,,,,
+"\82Ù\82Ì\82¨\82Ì\83i\83}\83Y","\83k\83\89\81[\83k\8cn",,,,,,,,,,,,,,
+"\83}\83O\83}\83b\83L\83B\81[","\83\8d\83b\83L\81[\8cn",,,,,,,,,,,,,,
+"\83n\83\93\83O\83\89\81[","\83}\83E\83X\83B\81[\8cn",,,,,,,,,,,,,,
+"\83e\83\8b\83e\83\8b","\83R\83\93\83t\83\85\81[\83W\83\87\83\93\83X\83\89\83C\83\80\8cn",,,,,,,,,,,,,,
+"\83g\83\8c\83\93\83e\83B\81[","\83E\83b\83f\83B\81[\8cn",,,,,,,,,,,,,,
+"\83^\83C\83j\81[\83S\81[\83\8c\83\80","\83\8d\83b\83L\81[\8cn",,,,,,,,,,,,,,
+"\83O\83\89\83g\83\93","\83}\83E\83X\83B\81[\8cn",,,,,,,,,,,,,,
+"\83\8c\83b\83h\83h\83\8c\83C\83N","\83m\83_\83S\83\93\8cn",,,,,,,,,,,,,,
+"\83n\83\89\83y\83R\81[\83\8b","\83}\83E\83X\83B\81[\8cn",,,,,,,,,,,,,,
+"\83n\83\93\83O\83\8a\81[\83h\83b\83O","\83n\83\93\83O\83\8a\81[\83h\83b\83O\8cn","FFFFFF",120,30,10,6,100,100,100,100,"\83A\83^\83b\83J\81[","\8eã\8dU\8c\82",,,
+"\83X\83\8f\83\93\83p\83X","\83X\83\8f\83\93\83p\83X\8cn",,,,,,,,,,,,,,
+"\83\89\83~\83A\83\93\83n\81[\83s\81[","\83\89\83~\83A\83\93\83n\81[\83s\81[\8cn","FFFFFF",33,12,6,10,200,150,120,90,"\83U\83R\83^\83C\83v","\8eã\8dU\8c\82",,,
+"\83_\81[\83N\83h\83\89\83O\81[\83\93","\83_\81[\83N\83h\83\89\83O\81[\83\93\8cn",,,,,,,,,,,,,,
+"\83}\83\93\83h\83\89\83S\83\89","\83}\83\93\83h\83\89\83S\83\89\8cn","FFFFFF",60,30,20,10,180,150,50,100,"\83U\83R\83^\83C\83v","\92\86\8dU\8c\82",,,
+"\83m\83_\83S\83\93","\83m\83_\83S\83\93\8cn",,,,,,,,,,,,,,
+"\83g\83\8a\83P\83\89\83\8c\83b\83N\83X","\83m\83_\83S\83\93\8cn",,,,,,,,,,,,,,
+"\83o\81[\83j\83\93\83O\83c\83\8a\81[","\83o\81[\83j\83\93\83O\83c\83\8a\81[\8cn",,,,,,,,,,,,,,
+"\83O\83\8a\81[\83\93\83s\81[\83|\83b\83h","\83O\83\8a\81[\83\93\83s\81[\83|\83b\83h\8cn",,,,,,,,,,,,,,
+"\83W\83F\83m\83T\83C\83h\83n\81[\83v\81[\83\93","\83O\83\8a\81[\83\93\83s\81[\83|\83b\83h\8cn",,,,,,,,,,,,,,
+"\83K\83\8b\83\80","\83n\83\93\83O\83\8a\81[\83h\83b\83O\8cn",,,,,,,,,,,,,,
-"Name","Image","AidlingMotion","DirectAttack1Motion","DirectAttack2Motion","SpecialAttack1Motion","SpecialAttack2Motion"\r
-"\83\8a\81[\83\8b\8cn","riel.png","data/motion/common/aidling.csv","data/motion/common/attack.csv",,,\r
-"\83E\83b\83f\83B\81[\8cn",,,,,,\r
-"\83R\83\93\83t\83\85\81[\83W\83\87\83\93\83X\83\89\83C\83\80\8cn",,,,,,\r
-"\83}\83E\83X\83B\81[\8cn",,,,,,\r
-"\83k\83\89\81[\83k\8cn",,,,,,\r
-"\83\8d\83b\83L\81[\8cn","rock.png","data/motion/common/aidling.csv","data/motion/common/attack.csv",,"data/motion/common/special.csv",\r
-"\83N\83\89\83\80\83X\83l\83C\83\8b\8cn",,,,,,\r
-"\83E\83b\83f\83B\81[\8cn",,,,,,\r
-"\83m\83_\83S\83\93\8cn",,,,,,\r
-"\83n\83\93\83O\83\8a\81[\83h\83b\83O\8cn","hd.png","data/motion/common/aidling.csv","data/motion/common/attack.csv",,,\r
-"\83X\83\8f\83\93\83p\83X\8cn",,,,,,\r
-"\83\89\83~\83A\83\93\83n\81[\83s\81[\8cn","rh.png","data/motion/rh/aidling.csv","data/motion/rh/attack.csv",,,\r
-"\83_\81[\83N\83h\83\89\83O\81[\83\93\8cn",,,,,,\r
-"\83}\83\93\83h\83\89\83S\83\89\8cn","mdg.png","data/motion/common/aidling.csv","data/motion/common/attack.csv",,,\r
-"\83o\81[\83j\83\93\83O\83c\83\8a\81[\8cn",,,,,,\r
-"\83O\83\8a\81[\83\93\83s\81[\83|\83b\83h\8cn",,,,,,\r
+"Name","Image","AidlingMotion","DirectAttack1Motion","DirectAttack2Motion","SpecialAttack1Motion","SpecialAttack2Motion"
+"\83\8a\81[\83\8b\8cn","riel.png","data/motion/common/aidling.csv","data/motion/common/attack.csv",,,
+"\83E\83b\83f\83B\81[\8cn",,,,,,
+"\83R\83\93\83t\83\85\81[\83W\83\87\83\93\83X\83\89\83C\83\80\8cn",,,,,,
+"\83}\83E\83X\83B\81[\8cn",,,,,,
+"\83k\83\89\81[\83k\8cn",,,,,,
+"\83\8d\83b\83L\81[\8cn","rock.png","data/motion/common/aidling.csv","data/motion/common/attack.csv",,"data/motion/common/special.csv",
+"\83N\83\89\83\80\83X\83l\83C\83\8b\8cn",,,,,,
+"\83E\83b\83f\83B\81[\8cn",,,,,,
+"\83m\83_\83S\83\93\8cn",,,,,,
+"\83n\83\93\83O\83\8a\81[\83h\83b\83O\8cn","hd.png","data/motion/common/aidling.csv","data/motion/common/attack.csv",,,
+"\83X\83\8f\83\93\83p\83X\8cn",,,,,,
+"\83\89\83~\83A\83\93\83n\81[\83s\81[\8cn","rh.png","data/motion/rh/aidling.csv","data/motion/rh/attack.csv",,,
+"\83_\81[\83N\83h\83\89\83O\81[\83\93\8cn",,,,,,
+"\83}\83\93\83h\83\89\83S\83\89\8cn","mdg.png","data/motion/common/aidling.csv","data/motion/common/attack.csv",,,
+"\83o\81[\83j\83\93\83O\83c\83\8a\81[\8cn",,,,,,
+"\83O\83\8a\81[\83\93\83s\81[\83|\83b\83h\8cn",,,,,,
-"Name","Monster1","Monster2","Monster3"\r
-"Test","\83\8a\81[\83\8b","\83\8a\81[\83\8b","\83\8a\81[\83\8b"\r
+"Name","Monster1","Monster2","Monster3"
+"Test","\83\8a\81[\83\8b","\83\8a\81[\83\8b","\83\8a\81[\83\8b"
-"KeyFrame","PositionX","PositionY","PositionZ","Color","Tux","Tuy","Tvx","Tvy","Width","Height","Depth","RotX","RotY","RotZ"\r
-1,0,0,,"FFE797",,,,,,,,,,\r
-3,0,-3,,,,,,,,,,,,\r
-6,0,-5,,,,,,,,,,,,\r
+"KeyFrame","PositionX","PositionY","PositionZ","Color","Tux","Tuy","Tvx","Tvy","Width","Height","Depth","RotX","RotY","RotZ"
+1,0,0,,"FFE797",,,,,,,,,,
+3,0,-3,,,,,,,,,,,,
+6,0,-5,,,,,,,,,,,,
-"KeyFrame","PositionX","PositionY","PositionZ","Color","Tux","Tuy","Tvx","Tvy","Width","Height","Depth","RotX","RotY","RotZ","Signal"\r
-0,,,,,0,0,64,64,,,,,,,\r
-15,,,,,0,64,64,128,,,,,,,\r
-29,,,,,0,0,64,64,,,,,,,\r
+"KeyFrame","PositionX","PositionY","PositionZ","Color","Tux","Tuy","Tvx","Tvy","Width","Height","Depth","RotX","RotY","RotZ","Signal"
+0,,,,,0,0,64,64,,,,,,,
+15,,,,,0,64,64,128,,,,,,,
+29,,,,,0,0,64,64,,,,,,,
-"KeyFrame","PositionX","PositionY","PositionZ","Color","Tux","Tuy","Tvx","Tvy","Width","Height","Depth","RotX","RotY","RotZ","Signal"\r
-0,,,,,64,0,128,64,,,,,,,10\r
-10,,,,,64,64,128,128,,,,,,,\r
-20,,,,,64,128,128,192,,,,,,,\r
+"KeyFrame","PositionX","PositionY","PositionZ","Color","Tux","Tuy","Tvx","Tvy","Width","Height","Depth","RotX","RotY","RotZ","Signal"
+0,,,,,64,0,128,64,,,,,,,10
+10,,,,,64,64,128,128,,,,,,,
+20,,,,,64,128,128,192,,,,,,,
-"KeyFrame","PositionX","PositionY","PositionZ","Color","Tux","Tuy","Tvx","Tvy","Width","Height","Depth","RotX","RotY","RotZ","Signal"\r
-0,,,,,128,0,192,64,,,,,,,10\r
-10,,,,,128,64,192,128,,,,,,,\r
-20,,,,,128,128,192,192,,,,,,,\r
+"KeyFrame","PositionX","PositionY","PositionZ","Color","Tux","Tuy","Tvx","Tvy","Width","Height","Depth","RotX","RotY","RotZ","Signal"
+0,,,,,128,0,192,64,,,,,,,10
+10,,,,,128,64,192,128,,,,,,,
+20,,,,,128,128,192,192,,,,,,,
-"KeyFrame","PositionX","PositionY","PositionZ","Color","Tux","Tuy","Tvx","Tvy","Width","Height","Depth","RotX","RotY","RotZ"\r
-1,0,0,,"FFFFFF",,,,,,,,,,\r
-3,0,-3,,,,,,,,,,,,\r
-6,0,-5,,,,,,,,,,,,\r
-9,0,-3,,,,,,,,,,,,\r
-11,0,0,,,,,,,,,,,,\r
+"KeyFrame","PositionX","PositionY","PositionZ","Color","Tux","Tuy","Tvx","Tvy","Width","Height","Depth","RotX","RotY","RotZ"
+1,0,0,,"FFFFFF",,,,,,,,,,
+3,0,-3,,,,,,,,,,,,
+6,0,-5,,,,,,,,,,,,
+9,0,-3,,,,,,,,,,,,
+11,0,0,,,,,,,,,,,,
-"KeyFrame","PositionX","PositionY","PositionZ","Color","Tux","Tuy","Tvx","Tvy","Width","Height","Depth","RotX","RotY","RotZ","Signal"\r
-0,1,0,1,,0,0,64,64,0.3,0.3,0.3,,,,0\r
-3,,,,,64,0,128,64,,,,,,,\r
-6,,,,,128,0,192,64,,,,,,,\r
-9,,,,,192,0,256,64,,,,,,,\r
-12,,,,,0,64,64,128,,,,,,,\r
-15,,,,,64,64,128,128,,,,,,,\r
-18,,,,,128,64,192,128,,,,,,,\r
-21,,,,,192,64,256,128,,,,,,,\r
-24,,,,,0,128,64,192,,,,,,,\r
-27,,,,,64,128,128,192,,,,,,,\r
-30,,,,,128,128,192,192,,,,,,,\r
-33,,,,,192,128,256,192,,,,,,,\r
-36,,,,,0,192,64,256,,,,,,,\r
-39,,,,,64,192,128,256,,,,,,,\r
-42,,,,,128,192,192,256,,,,,,,\r
-45,,,,,192,192,256,256,,,,,,,\r
+"KeyFrame","PositionX","PositionY","PositionZ","Color","Tux","Tuy","Tvx","Tvy","Width","Height","Depth","RotX","RotY","RotZ","Signal"
+0,1,0,1,,0,0,64,64,0.3,0.3,0.3,,,,0
+3,,,,,64,0,128,64,,,,,,,
+6,,,,,128,0,192,64,,,,,,,
+9,,,,,192,0,256,64,,,,,,,
+12,,,,,0,64,64,128,,,,,,,
+15,,,,,64,64,128,128,,,,,,,
+18,,,,,128,64,192,128,,,,,,,
+21,,,,,192,64,256,128,,,,,,,
+24,,,,,0,128,64,192,,,,,,,
+27,,,,,64,128,128,192,,,,,,,
+30,,,,,128,128,192,192,,,,,,,
+33,,,,,192,128,256,192,,,,,,,
+36,,,,,0,192,64,256,,,,,,,
+39,,,,,64,192,128,256,,,,,,,
+42,,,,,128,192,192,256,,,,,,,
+45,,,,,192,192,256,256,,,,,,,
-"KeyFrame","PositionX","PositionY","PositionZ","Color","Tux","Tuy","Tvx","Tvy","Width","Height","Depth","RotX","RotY","RotZ"\r
-1,0,0,,"90FF90",,,,,,,,,,\r
-3,0,-3,,,,,,,,,,,,\r
-6,0,-5,,,,,,,,,,,,\r
-9,0,-3,,,,,,,,,,,,\r
-11,0,0,,,,,,,,,,,,\r
+"KeyFrame","PositionX","PositionY","PositionZ","Color","Tux","Tuy","Tvx","Tvy","Width","Height","Depth","RotX","RotY","RotZ"
+1,0,0,,"90FF90",,,,,,,,,,
+3,0,-3,,,,,,,,,,,,
+6,0,-5,,,,,,,,,,,,
+9,0,-3,,,,,,,,,,,,
+11,0,0,,,,,,,,,,,,
-"KeyFrame","PositionX","PositionY","PositionZ","Color","Tux","Tuy","Tvx","Tvy","Width","Height","Depth","RotX","RotY","RotZ"\r
-0,,,,,0,0,64,64,,,,,,\r
-15,,,,,0,64,64,128,,,,,,\r
-29,,,,,0,0,64,64,,,,,,\r
+"KeyFrame","PositionX","PositionY","PositionZ","Color","Tux","Tuy","Tvx","Tvy","Width","Height","Depth","RotX","RotY","RotZ"
+0,,,,,0,0,64,64,,,,,,
+15,,,,,0,64,64,128,,,,,,
+29,,,,,0,0,64,64,,,,,,
-"KeyFrame","PositionX","PositionY","PositionZ","Color","Tux","Tuy","Tvx","Tvy","Width","Height","Depth","RotX","RotY","RotZ","Signal"\r
-0,0,-0.2,0,,,,,,0.3,0.3,0.3,,,,10\r
-10,0,0,0,,,,,,,,,,,,\r
-30,0,0,0,,,,,,,,,,,,\r
-40,0,-0.2,0,,,,,,,,,,,,\r
+"KeyFrame","PositionX","PositionY","PositionZ","Color","Tux","Tuy","Tvx","Tvy","Width","Height","Depth","RotX","RotY","RotZ","Signal"
+0,0,-0.2,0,,,,,,0.3,0.3,0.3,,,,10
+10,0,0,0,,,,,,,,,,,,
+30,0,0,0,,,,,,,,,,,,
+40,0,-0.2,0,,,,,,,,,,,,
-"KeyFrame","PositionX","PositionY","PositionZ","Color","Tux","Tuy","Tvx","Tvy","Width","Height","Depth","RotX","RotY","RotZ"\r
-0,,,,,0,0,64,64,,,,,,\r
-10,,,,,0,64,64,128,,,,,,\r
-20,,,,,0,128,64,192,,,,,,\r
-29,,,,,0,0,64,64,,,,,,\r
+"KeyFrame","PositionX","PositionY","PositionZ","Color","Tux","Tuy","Tvx","Tvy","Width","Height","Depth","RotX","RotY","RotZ"
+0,,,,,0,0,64,64,,,,,,
+10,,,,,0,64,64,128,,,,,,
+20,,,,,0,128,64,192,,,,,,
+29,,,,,0,0,64,64,,,,,,
-"KeyFrame","PositionX","PositionY","PositionZ","Color","Tux","Tuy","Tvx","Tvy","Width","Height","Depth","RotX","RotY","RotZ","Signal"\r
-0,,,,,64,0,128,64,,,,,,,10\r
-10,,,,,64,64,128,128,,,,,,,\r
-20,,,,,64,128,128,192,,,,,,,\r
-30,,,,,0,0,64,64,,,,,,,\r
+"KeyFrame","PositionX","PositionY","PositionZ","Color","Tux","Tuy","Tvx","Tvy","Width","Height","Depth","RotX","RotY","RotZ","Signal"
+0,,,,,64,0,128,64,,,,,,,10
+10,,,,,64,64,128,128,,,,,,,
+20,,,,,64,128,128,192,,,,,,,
+30,,,,,0,0,64,64,,,,,,,
-"KeyFrame","PositionX","PositionY","PositionZ","Color","Tux","Tuy","Tvx","Tvy","Width","Height","Depth","RotX","RotY","RotZ","Signal"\r
-0,1,0,0,,0,0,64,64,0.4,0.4,0.4,,,,0\r
-6,,,,,64,0,128,64,,,,,,,\r
-10,,,,,128,0,192,64,,,,,,,\r
-13,,,,,192,0,256,64,,,,,,,\r
-15,,,,,0,64,64,128,,,,,,,\r
-17,,,,,64,64,128,128,,,,,,,\r
-19,,,,,128,64,192,128,,,,,,,\r
-21,,,,,192,64,256,128,,,,,,,\r
+"KeyFrame","PositionX","PositionY","PositionZ","Color","Tux","Tuy","Tvx","Tvy","Width","Height","Depth","RotX","RotY","RotZ","Signal"
+0,1,0,0,,0,0,64,64,0.4,0.4,0.4,,,,0
+6,,,,,64,0,128,64,,,,,,,
+10,,,,,128,0,192,64,,,,,,,
+13,,,,,192,0,256,64,,,,,,,
+15,,,,,0,64,64,128,,,,,,,
+17,,,,,64,64,128,128,,,,,,,
+19,,,,,128,64,192,128,,,,,,,
+21,,,,,192,64,256,128,,,,,,,
-"Name","Type","Color"\r
-"\83\8a\81[\83\8b","\83\8a\81[\83\8b\8cn","FFFFFF"\r
-"\83E\83b\83f\83B\81[","\83E\83b\83f\83B\81[\8cn","FFFFFF"\r
-"\83R\83\93\83t\83\85\81[\83W\83\87\83\93\83X\83\89\83C\83\80","\83R\83\93\83t\83\85\81[\83W\83\87\83\93\83X\83\89\83C\83\80\8cn",\r
-"\83}\83E\83X\83B\81[","\83}\83E\83X\83B\81[\8cn",\r
-"\83k\83\89\81[\83k","\83k\83\89\81[\83k\8cn",\r
+"Name","Type","Color"
+"\83\8a\81[\83\8b","\83\8a\81[\83\8b\8cn","FFFFFF"
+"\83E\83b\83f\83B\81[","\83E\83b\83f\83B\81[\8cn","FFFFFF"
+"\83R\83\93\83t\83\85\81[\83W\83\87\83\93\83X\83\89\83C\83\80","\83R\83\93\83t\83\85\81[\83W\83\87\83\93\83X\83\89\83C\83\80\8cn",
+"\83}\83E\83X\83B\81[","\83}\83E\83X\83B\81[\8cn",
+"\83k\83\89\81[\83k","\83k\83\89\81[\83k\8cn",
-"KeyFrame","PositionX","PositionY","PositionZ","Color","Tux","Tuy","Tvx","Tvy","Width","Height","Depth","RotX","RotY","RotZ","Signal"\r
-0,0.1,0.1,0,,,,,,0.3,0.3,0.3,,,,\r
-6,0.25,0.3,0,,,,,,,,,,,,\r
-12,0.4,0.45,0,,,,,,,,,,,,\r
-18,0.55,0.5,0,,,,,,,,,,,,\r
-24,0.7,0.45,0,,,,,,,,,,,,\r
-30,0.85,0.3,0,,,,,,,,,,,,\r
-36,1,0.1,0,,,,,,0.3,0.3,0.3,,,,\r
-37,,,,,,,,,0,0,0,,,,\r
+"KeyFrame","PositionX","PositionY","PositionZ","Color","Tux","Tuy","Tvx","Tvy","Width","Height","Depth","RotX","RotY","RotZ","Signal"
+0,0.1,0.1,0,,,,,,0.3,0.3,0.3,,,,
+6,0.25,0.3,0,,,,,,,,,,,,
+12,0.4,0.45,0,,,,,,,,,,,,
+18,0.55,0.5,0,,,,,,,,,,,,
+24,0.7,0.45,0,,,,,,,,,,,,
+30,0.85,0.3,0,,,,,,,,,,,,
+36,1,0.1,0,,,,,,0.3,0.3,0.3,,,,
+37,,,,,,,,,0,0,0,,,,
-"Name","Type","Effect","Durability","Price"\r
-"\83R\83i\83\93\82Ì\8eÀ",0,20,5,20\r
-"\82\82³\82ê\83|\81[\83V\83\87\83\93",0,1,0,1\r
-"\82¢\82Ì\82¿\82Ì\89Ê\8eÀ",0,70,1,40\r
-"\97ì\91ù",0,120,5,150\r
-"\90X\82Ì\8aï\90Õ",0,500,5,1000\r
-"\83O\83\8a\81[\83\93\83|\81[\83V\83\87\83\93",1,30,3,100\r
-"\83u\83\8b\81[\83|\81[\83V\83\87\83\93",1,60,3,250\r
-"\83z\83\8f\83C\83g\83|\81[\83V\83\87\83\93",1,90,3,1000\r
-"AP\83|\81[\83V\83\87\83\93",2,10,3,500\r
-"\83}\83i\83|\81[\83V\83\87\83\93",3,0,3,800\r
-"\83\8b\81[\83\93\83|\81[\83V\83\87\83\93",4,0,3,3000\r
-"\83~\83\89\83N\83\8b\83|\81[\83V\83\87\83\93",5,0,3,5000\r
+"Name","Type","Effect","Durability","Price"
+"\83R\83i\83\93\82Ì\8eÀ",0,20,5,20
+"\82\82³\82ê\83|\81[\83V\83\87\83\93",0,1,0,1
+"\82¢\82Ì\82¿\82Ì\89Ê\8eÀ",0,70,1,40
+"\97ì\91ù",0,120,5,150
+"\90X\82Ì\8aï\90Õ",0,500,5,1000
+"\83O\83\8a\81[\83\93\83|\81[\83V\83\87\83\93",1,30,3,100
+"\83u\83\8b\81[\83|\81[\83V\83\87\83\93",1,60,3,250
+"\83z\83\8f\83C\83g\83|\81[\83V\83\87\83\93",1,90,3,1000
+"AP\83|\81[\83V\83\87\83\93",2,10,3,500
+"\83}\83i\83|\81[\83V\83\87\83\93",3,0,3,800
+"\83\8b\81[\83\93\83|\81[\83V\83\87\83\93",4,0,3,3000
+"\83~\83\89\83N\83\8b\83|\81[\83V\83\87\83\93",5,0,3,5000
-"Name","Type","Attack","Guard","Durability","Price","Attribute","\93X\83\8c\83x\83\8b","\91®\90«",\r
-"\83u\83\8d\81[\83h\83i\83C\83t",0,5,0,5,120,0,"\95\90\8aí\89®Lv1",,\r
-"\89º\8b\89\95º\8em\82Ì\8c\95",1,10,0,5,120,0,"\95\90\8aí\89®Lv1",,\r
-"\83c\83\94\83@\83C\83n\83\93\83_\81[",2,20,0,5,120,0,"\95\90\8aí\89®Lv1",,\r
-"\83V\83\87\81[\83g\83\\81[\83h",0,20,0,5,300,0,"\95\90\8aí\89®Lv1",,\r
-"\8bÈ\93\81",1,30,0,5,300,0,"\95\90\8aí\89®Lv1",,\r
-"\8eR\96Â\82è\82Ì\8c\95",2,50,0,5,300,0,"\95\90\8aí\89®Lv1",,\r
-"\83}\83\93\83S\81[\83V\83\85",0,20,5,5,450,0,"\95\90\8aí\89®Lv2",,\r
-"\8fã\8b\89\95º\8em\82Ì\8c\95",1,50,0,5,700,0,"\95\90\8aí\89®Lv2",,\r
-"\83\94\83@\83\8a\83A\83\93\83g\83\\81[\83h",1,60,0,7,1000,0,"\95\90\8aí\89®Lv2",,\r
-"\83A\83C\83V\83N\83\8b\83G\83b\83W",0,55,0,5,1500,2,,"\97â\8bC","\96\82\96@\8bâ\82Ì\92Z\93\81\81{\97â\8bC"\r
-"\96\82\96@\8bâ\82Ì\83_\83K\81[",0,65,0,5,1500,0,"\95\90\8aí\89®Lv2",,\r
-"\83\94\83@\83C\83X\83_\83K\81[",0,75,0,5,2300,0,"\95\90\8aí\89®Lv2",,\r
-"\83\8d\83C\83\84\83\8b\83K\81[\83h",1,90,0,5,1500,0,"\95\90\8aí\89®Lv3",,\r
-"\90¹\96ä\82Ì\96\82\8c\95",2,140,0,5,3000,0,"\95\90\8aí\89®Lv3",,\r
-"\8d\84\8c\95\83A\83\8c\83N\83T\83\93\83h\83\8d\83X",2,,,,,,,"\8fd\97Í",\r
-"\89ö\90l\93\81",2,,,,,,"\95\90\8aí\89®Lv2",,\r
-"\90_\96\82\82Ì\95ó\8c\95",1,,,,,,"\95\90\8aí\89®Lv3",,\r
-"\83T\83\93\83_\81[\83Z\83C\83o\81[",1,,,,,,,"\97\8b",\r
-"\83\8c\83\94\83@\83\93\83e\83C\83\93",2,,,,,,,"\89\8a",\r
-"\97³\96ä\82Ì\96\82\8c\95",2,,,,,,,"\89\8a",\r
-"\8f»\96ä\82Ì\96\82\8c\95",2,,,,,,,"\97â\8bC",\r
-"\93S\96ä\82Ì\96\82\8c\95",2,,,,,,,"\8fd\97Í",\r
-"\8e\87\96ä\82Ì\96\82\8c\95",2,,,,,,,"\97\8b",\r
-"\8eç\8cì\82Ì\92Z\8c\95",0,,,,,,"\95\90\8aí\89®Lv3",,\r
-"\96»\95{\82Ì\89\8a\8c\95",1,,,,,,,"\89\8a",\r
-"\94\9a\8dÓ\82Ì\8fd\8c\95",2,,,,,,,"\8fd\97Í",\r
-"\83K\83X\83g\83u\83\8a\83\93\83K\81[",1,,,,,,,"\97\8b",\r
-"\90_\98b\82Ì\8cä\8c\95",0,,,,,,,,\r
-"\83J\83^\83i\83u\83\8c\81[\83h",2,,,,,,,,\r
-"\83A\81[\83N\83X\83\8c\83C\83\84\81[",,,,,,,,,\r
-"\83\\81[\83h\83u\83\8c\83C\83J\81[",0,,,,,,,,\r
-"\83W\83F\83l\83V\83X\83\\81[\83h",1,,,,,,,,\r
-"\83h\83\89\83S\83\93\83g\83D\81[\83X",0,,,,,,,,\r
-"\90Ô\94M\82Ì\83i\83C\83t",,,,,,,,,\r
+"Name","Type","Attack","Guard","Durability","Price","Attribute","\93X\83\8c\83x\83\8b","\91®\90«",
+"\83u\83\8d\81[\83h\83i\83C\83t",0,5,0,5,120,0,"\95\90\8aí\89®Lv1",,
+"\89º\8b\89\95º\8em\82Ì\8c\95",1,10,0,5,120,0,"\95\90\8aí\89®Lv1",,
+"\83c\83\94\83@\83C\83n\83\93\83_\81[",2,20,0,5,120,0,"\95\90\8aí\89®Lv1",,
+"\83V\83\87\81[\83g\83\\81[\83h",0,20,0,5,300,0,"\95\90\8aí\89®Lv1",,
+"\8bÈ\93\81",1,30,0,5,300,0,"\95\90\8aí\89®Lv1",,
+"\8eR\96Â\82è\82Ì\8c\95",2,50,0,5,300,0,"\95\90\8aí\89®Lv1",,
+"\83}\83\93\83S\81[\83V\83\85",0,20,5,5,450,0,"\95\90\8aí\89®Lv2",,
+"\8fã\8b\89\95º\8em\82Ì\8c\95",1,50,0,5,700,0,"\95\90\8aí\89®Lv2",,
+"\83\94\83@\83\8a\83A\83\93\83g\83\\81[\83h",1,60,0,7,1000,0,"\95\90\8aí\89®Lv2",,
+"\83A\83C\83V\83N\83\8b\83G\83b\83W",0,55,0,5,1500,2,,"\97â\8bC","\96\82\96@\8bâ\82Ì\92Z\93\81\81{\97â\8bC"
+"\96\82\96@\8bâ\82Ì\83_\83K\81[",0,65,0,5,1500,0,"\95\90\8aí\89®Lv2",,
+"\83\94\83@\83C\83X\83_\83K\81[",0,75,0,5,2300,0,"\95\90\8aí\89®Lv2",,
+"\83\8d\83C\83\84\83\8b\83K\81[\83h",1,90,0,5,1500,0,"\95\90\8aí\89®Lv3",,
+"\90¹\96ä\82Ì\96\82\8c\95",2,140,0,5,3000,0,"\95\90\8aí\89®Lv3",,
+"\8d\84\8c\95\83A\83\8c\83N\83T\83\93\83h\83\8d\83X",2,,,,,,,"\8fd\97Í",
+"\89ö\90l\93\81",2,,,,,,"\95\90\8aí\89®Lv2",,
+"\90_\96\82\82Ì\95ó\8c\95",1,,,,,,"\95\90\8aí\89®Lv3",,
+"\83T\83\93\83_\81[\83Z\83C\83o\81[",1,,,,,,,"\97\8b",
+"\83\8c\83\94\83@\83\93\83e\83C\83\93",2,,,,,,,"\89\8a",
+"\97³\96ä\82Ì\96\82\8c\95",2,,,,,,,"\89\8a",
+"\8f»\96ä\82Ì\96\82\8c\95",2,,,,,,,"\97â\8bC",
+"\93S\96ä\82Ì\96\82\8c\95",2,,,,,,,"\8fd\97Í",
+"\8e\87\96ä\82Ì\96\82\8c\95",2,,,,,,,"\97\8b",
+"\8eç\8cì\82Ì\92Z\8c\95",0,,,,,,"\95\90\8aí\89®Lv3",,
+"\96»\95{\82Ì\89\8a\8c\95",1,,,,,,,"\89\8a",
+"\94\9a\8dÓ\82Ì\8fd\8c\95",2,,,,,,,"\8fd\97Í",
+"\83K\83X\83g\83u\83\8a\83\93\83K\81[",1,,,,,,,"\97\8b",
+"\90_\98b\82Ì\8cä\8c\95",0,,,,,,,,
+"\83J\83^\83i\83u\83\8c\81[\83h",2,,,,,,,,
+"\83A\81[\83N\83X\83\8c\83C\83\84\81[",,,,,,,,,
+"\83\\81[\83h\83u\83\8c\83C\83J\81[",0,,,,,,,,
+"\83W\83F\83l\83V\83X\83\\81[\83h",1,,,,,,,,
+"\83h\83\89\83S\83\93\83g\83D\81[\83X",0,,,,,,,,
+"\90Ô\94M\82Ì\83i\83C\83t",,,,,,,,,
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-1\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-1\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-1\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-1\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-0\r
-1\r
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+1
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+1
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+1
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+1
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+1
-\81E\89¹\8ay\92ñ\8b\9f\81@TAM Music Factory\81@(http://www.tam-music.com/\81j\r
-\81E\91f\8dÞ\92ñ\8b\9f\81@\91½\96²(TAM) (http://www.tam-music.com/\81j\r
-\81E\89¹\8ay\81@TAM Music Factory\r
-\81E\8cø\89Ê\89¹\81@TAM Music Factory\r
-\81EMusic by TAM\r
+\81E\89¹\8ay\92ñ\8b\9f\81@TAM Music Factory\81@(http://www.tam-music.com/\81j
+\81E\91f\8dÞ\92ñ\8b\9f\81@\91½\96²(TAM) (http://www.tam-music.com/\81j
+\81E\89¹\8ay\81@TAM Music Factory
+\81E\8cø\89Ê\89¹\81@TAM Music Factory
+\81EMusic by TAM
\81E(C)TAM Music Factory
\ No newline at end of file
-Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd\r
- and Clark Cooper\r
-Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers.\r
-\r
-Permission is hereby granted, free of charge, to any person obtaining\r
-a copy of this software and associated documentation files (the\r
-"Software"), to deal in the Software without restriction, including\r
-without limitation the rights to use, copy, modify, merge, publish,\r
-distribute, sublicense, and/or sell copies of the Software, and to\r
-permit persons to whom the Software is furnished to do so, subject to\r
-the following conditions:\r
-\r
-The above copyright notice and this permission notice shall be included\r
-in all copies or substantial portions of the Software.\r
-\r
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
+Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
+ and Clark Cooper
+Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-Copyright (c) 2002-2008 Xiph.org Foundation\r
-\r
-Redistribution and use in source and binary forms, with or without\r
-modification, are permitted provided that the following conditions\r
-are met:\r
-\r
-- Redistributions of source code must retain the above copyright\r
-notice, this list of conditions and the following disclaimer.\r
-\r
-- Redistributions in binary form must reproduce the above copyright\r
-notice, this list of conditions and the following disclaimer in the\r
-documentation and/or other materials provided with the distribution.\r
-\r
-- Neither the name of the Xiph.org Foundation nor the names of its\r
-contributors may be used to endorse or promote products derived from\r
-this software without specific prior written permission.\r
-\r
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
-``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION\r
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+Copyright (c) 2002-2008 Xiph.org Foundation
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+- Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+
+- Neither the name of the Xiph.org Foundation nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-Metasequoia Document\r
-Format Text Ver 1.0\r
-\r
-Scene {\r
- pos 0.0000 0.0000 1500.0000\r
- lookat 0.0000 0.0000 0.0000\r
- head -0.3000\r
- pich 0.8408\r
- ortho 0\r
- zoom2 12.1963\r
- amb 0.250 0.250 0.250\r
-}\r
-Material 1 {\r
- "mat1" shader(3) col(1.000 1.000 1.000 1.000) dif(0.800) amb(0.600) emi(0.000) spc(0.000) power(5.00) tex("areaField.jpg")\r
-}\r
-Object "obj1" {\r
- depth 0\r
- folding 0\r
- scale 1.000000 1.000000 1.000000\r
- rotation 0.000000 0.000000 0.000000\r
- translation 0.000000 0.000000 0.000000\r
- visible 15\r
- locking 0\r
- shading 1\r
- facet 59.5\r
- color 0.898 0.498 0.698\r
- color_type 0\r
- vertex 4 {\r
- 0.0000 0.0000 0.0000\r
- 30.0000 0.0000 0.0000\r
- 30.0000 0.0000 30.0000\r
- 0.0000 0.0000 30.0000\r
- }\r
- face 2 {\r
- 3 V(0 1 2) M(0) UV(0.01923 0.01923 0.98077 0.01923 0.98077 0.98077)\r
- 3 V(2 3 0) M(0) UV(0.98077 0.98077 0.01923 0.98077 0.01923 0.01923)\r
- }\r
-}\r
-Eof\r
+Metasequoia Document
+Format Text Ver 1.0
+
+Scene {
+ pos 0.0000 0.0000 1500.0000
+ lookat 0.0000 0.0000 0.0000
+ head -0.3000
+ pich 0.8408
+ ortho 0
+ zoom2 12.1963
+ amb 0.250 0.250 0.250
+}
+Material 1 {
+ "mat1" shader(3) col(1.000 1.000 1.000 1.000) dif(0.800) amb(0.600) emi(0.000) spc(0.000) power(5.00) tex("areaField.jpg")
+}
+Object "obj1" {
+ depth 0
+ folding 0
+ scale 1.000000 1.000000 1.000000
+ rotation 0.000000 0.000000 0.000000
+ translation 0.000000 0.000000 0.000000
+ visible 15
+ locking 0
+ shading 1
+ facet 59.5
+ color 0.898 0.498 0.698
+ color_type 0
+ vertex 4 {
+ 0.0000 0.0000 0.0000
+ 30.0000 0.0000 0.0000
+ 30.0000 0.0000 30.0000
+ 0.0000 0.0000 30.0000
+ }
+ face 2 {
+ 3 V(0 1 2) M(0) UV(0.01923 0.01923 0.98077 0.01923 0.98077 0.98077)
+ 3 V(2 3 0) M(0) UV(0.98077 0.98077 0.01923 0.98077 0.01923 0.01923)
+ }
+}
+Eof
-Metasequoia Document\r
-Format Text Ver 1.0\r
-\r
-Scene {\r
- pos 0.0000 0.0000 1500.0000\r
- lookat 0.0000 0.0000 0.0000\r
- head -0.3800\r
- pich 0.4508\r
- ortho 1\r
- zoom2 5.7285\r
- amb 0.250 0.250 0.250\r
-}\r
-Material 1 {\r
- "mat1" shader(3) col(1.000 1.000 1.000 1.000) dif(0.800) amb(0.600) emi(0.000) spc(0.000) power(5.00) tex("tile0.jpg")\r
-}\r
-Object "obj1" {\r
- depth 0\r
- folding 0\r
- scale 1.000000 1.000000 1.000000\r
- rotation 0.000000 0.000000 0.000000\r
- translation 0.000000 0.000000 0.000000\r
- visible 15\r
- locking 0\r
- shading 1\r
- facet 59.5\r
- color 0.898 0.498 0.698\r
- color_type 0\r
- vertex 20 {\r
- -99.7812 0.0000 -100.6564\r
- -49.4529 0.0000 -100.6564\r
- -49.8906 0.0000 -50.3282\r
- -99.7812 0.0000 -50.3282\r
- -49.8906 0.0000 0.0000\r
- 0.0000 0.0000 0.8753\r
- 0.0000 0.0000 -49.8906\r
- 0.4376 0.0000 -99.3435\r
- -98.9059 0.0000 0.0000\r
- -99.7812 0.0000 -150.9847\r
- -49.4529 0.0000 -150.1094\r
- 0.4376 0.0000 -151.4223\r
- 50.5471 0.0000 -100.6564\r
- 50.1094 0.0000 -50.3282\r
- 50.1094 0.0000 0.0000\r
- 100.0000 0.0000 0.8753\r
- 100.0000 0.0000 -49.8906\r
- 100.4376 0.0000 -99.3435\r
- 50.5471 0.0000 -150.1094\r
- 100.4376 0.0000 -151.4223\r
- }\r
- face 24 {\r
- 3 V(0 1 2) M(0) UV(0.00897 0.01561 0.98737 0.01094 0.99303 0.99765)\r
- 3 V(2 3 0) M(0) UV(0.99318 0.99615 0.01105 0.99100 0.01023 0.01499)\r
- 3 V(5 4 2) M(0) UV(0.99174 0.99034 0.00574 0.99496 0.00516 0.00918)\r
- 3 V(2 6 5) M(0) UV(0.00177 0.01667 0.99211 0.01789 0.99840 0.99264)\r
- 3 V(2 7 6) M(0) UV(0.00882 0.99562 0.99245 0.01205 0.99312 0.99379)\r
- 3 V(2 1 7) M(0) UV(0.01069 0.99287 0.00842 0.02115 0.99218 0.00984)\r
- 3 V(3 2 4) M(0) UV(0.01142 0.01572 0.98569 0.01194 0.99195 0.99447)\r
- 3 V(4 8 3) M(0) UV(0.99331 0.99514 0.01249 0.99533 0.00805 0.01833)\r
- 3 V(1 0 9) M(0) UV(0.99487 0.99515 0.01258 0.99274 0.00966 0.01313)\r
- 3 V(9 10 1) M(0) UV(0.00966 0.01313 0.98680 0.01125 0.99579 0.99602)\r
- 3 V(10 11 7) M(0) UV(0.00312 0.01289 0.99147 0.01446 0.99352 0.99812)\r
- 3 V(7 1 10) M(0) UV(0.99658 0.99694 0.01000 0.99347 0.01085 0.00845)\r
- 3 V(7 12 13) M(0) UV(0.01097 0.01872 0.98923 0.01342 0.99237 0.99405)\r
- 3 V(13 6 7) M(0) UV(0.98885 0.99569 0.00674 0.99088 0.00858 0.01165)\r
- 3 V(15 14 13) M(0) UV(0.98638 0.98910 0.00811 0.99347 0.01324 0.00680)\r
- 3 V(13 16 15) M(0) UV(0.00882 0.00984 0.98767 0.00640 0.99369 0.98860)\r
- 3 V(13 17 16) M(0) UV(0.00903 0.99562 0.98855 0.01205 0.98923 0.99242)\r
- 3 V(13 12 17) M(0) UV(0.00853 0.99039 0.00560 0.01090 0.98830 0.00775)\r
- 3 V(6 13 14) M(0) UV(0.00498 0.01636 0.99142 0.00858 0.99471 0.99061)\r
- 3 V(14 5 6) M(0) UV(0.98866 0.98831 0.00930 0.99461 0.00690 0.01223)\r
- 3 V(12 7 11) M(0) UV(0.99222 0.98891 0.00900 0.99315 0.00683 0.01282)\r
- 3 V(11 18 12) M(0) UV(0.00750 0.01527 0.99506 0.01786 0.99610 0.99307)\r
- 3 V(18 19 17) M(0) UV(0.00818 0.01373 0.99445 0.01513 0.99442 0.99776)\r
- 3 V(17 12 18) M(0) UV(0.98848 0.98921 0.01705 0.98936 0.00713 0.01391)\r
- }\r
-}\r
-Eof\r
+Metasequoia Document
+Format Text Ver 1.0
+
+Scene {
+ pos 0.0000 0.0000 1500.0000
+ lookat 0.0000 0.0000 0.0000
+ head -0.3800
+ pich 0.4508
+ ortho 1
+ zoom2 5.7285
+ amb 0.250 0.250 0.250
+}
+Material 1 {
+ "mat1" shader(3) col(1.000 1.000 1.000 1.000) dif(0.800) amb(0.600) emi(0.000) spc(0.000) power(5.00) tex("tile0.jpg")
+}
+Object "obj1" {
+ depth 0
+ folding 0
+ scale 1.000000 1.000000 1.000000
+ rotation 0.000000 0.000000 0.000000
+ translation 0.000000 0.000000 0.000000
+ visible 15
+ locking 0
+ shading 1
+ facet 59.5
+ color 0.898 0.498 0.698
+ color_type 0
+ vertex 20 {
+ -99.7812 0.0000 -100.6564
+ -49.4529 0.0000 -100.6564
+ -49.8906 0.0000 -50.3282
+ -99.7812 0.0000 -50.3282
+ -49.8906 0.0000 0.0000
+ 0.0000 0.0000 0.8753
+ 0.0000 0.0000 -49.8906
+ 0.4376 0.0000 -99.3435
+ -98.9059 0.0000 0.0000
+ -99.7812 0.0000 -150.9847
+ -49.4529 0.0000 -150.1094
+ 0.4376 0.0000 -151.4223
+ 50.5471 0.0000 -100.6564
+ 50.1094 0.0000 -50.3282
+ 50.1094 0.0000 0.0000
+ 100.0000 0.0000 0.8753
+ 100.0000 0.0000 -49.8906
+ 100.4376 0.0000 -99.3435
+ 50.5471 0.0000 -150.1094
+ 100.4376 0.0000 -151.4223
+ }
+ face 24 {
+ 3 V(0 1 2) M(0) UV(0.00897 0.01561 0.98737 0.01094 0.99303 0.99765)
+ 3 V(2 3 0) M(0) UV(0.99318 0.99615 0.01105 0.99100 0.01023 0.01499)
+ 3 V(5 4 2) M(0) UV(0.99174 0.99034 0.00574 0.99496 0.00516 0.00918)
+ 3 V(2 6 5) M(0) UV(0.00177 0.01667 0.99211 0.01789 0.99840 0.99264)
+ 3 V(2 7 6) M(0) UV(0.00882 0.99562 0.99245 0.01205 0.99312 0.99379)
+ 3 V(2 1 7) M(0) UV(0.01069 0.99287 0.00842 0.02115 0.99218 0.00984)
+ 3 V(3 2 4) M(0) UV(0.01142 0.01572 0.98569 0.01194 0.99195 0.99447)
+ 3 V(4 8 3) M(0) UV(0.99331 0.99514 0.01249 0.99533 0.00805 0.01833)
+ 3 V(1 0 9) M(0) UV(0.99487 0.99515 0.01258 0.99274 0.00966 0.01313)
+ 3 V(9 10 1) M(0) UV(0.00966 0.01313 0.98680 0.01125 0.99579 0.99602)
+ 3 V(10 11 7) M(0) UV(0.00312 0.01289 0.99147 0.01446 0.99352 0.99812)
+ 3 V(7 1 10) M(0) UV(0.99658 0.99694 0.01000 0.99347 0.01085 0.00845)
+ 3 V(7 12 13) M(0) UV(0.01097 0.01872 0.98923 0.01342 0.99237 0.99405)
+ 3 V(13 6 7) M(0) UV(0.98885 0.99569 0.00674 0.99088 0.00858 0.01165)
+ 3 V(15 14 13) M(0) UV(0.98638 0.98910 0.00811 0.99347 0.01324 0.00680)
+ 3 V(13 16 15) M(0) UV(0.00882 0.00984 0.98767 0.00640 0.99369 0.98860)
+ 3 V(13 17 16) M(0) UV(0.00903 0.99562 0.98855 0.01205 0.98923 0.99242)
+ 3 V(13 12 17) M(0) UV(0.00853 0.99039 0.00560 0.01090 0.98830 0.00775)
+ 3 V(6 13 14) M(0) UV(0.00498 0.01636 0.99142 0.00858 0.99471 0.99061)
+ 3 V(14 5 6) M(0) UV(0.98866 0.98831 0.00930 0.99461 0.00690 0.01223)
+ 3 V(12 7 11) M(0) UV(0.99222 0.98891 0.00900 0.99315 0.00683 0.01282)
+ 3 V(11 18 12) M(0) UV(0.00750 0.01527 0.99506 0.01786 0.99610 0.99307)
+ 3 V(18 19 17) M(0) UV(0.00818 0.01373 0.99445 0.01513 0.99442 0.99776)
+ 3 V(17 12 18) M(0) UV(0.98848 0.98921 0.01705 0.98936 0.00713 0.01391)
+ }
+}
+Eof
-xof 0302txt 0064\r
-template Header {\r
- <3D82AB43-62DA-11cf-AB39-0020AF71E433>\r
- WORD major;\r
- WORD minor;\r
- DWORD flags;\r
-}\r
-\r
-template Vector {\r
- <3D82AB5E-62DA-11cf-AB39-0020AF71E433>\r
- FLOAT x;\r
- FLOAT y;\r
- FLOAT z;\r
-}\r
-\r
-template Coords2d {\r
- <F6F23F44-7686-11cf-8F52-0040333594A3>\r
- FLOAT u;\r
- FLOAT v;\r
-}\r
-\r
-template Matrix4x4 {\r
- <F6F23F45-7686-11cf-8F52-0040333594A3>\r
- array FLOAT matrix[16];\r
-}\r
-\r
-template ColorRGBA {\r
- <35FF44E0-6C7C-11cf-8F52-0040333594A3>\r
- FLOAT red;\r
- FLOAT green;\r
- FLOAT blue;\r
- FLOAT alpha;\r
-}\r
-\r
-template ColorRGB {\r
- <D3E16E81-7835-11cf-8F52-0040333594A3>\r
- FLOAT red;\r
- FLOAT green;\r
- FLOAT blue;\r
-}\r
-\r
-template IndexedColor {\r
- <1630B820-7842-11cf-8F52-0040333594A3>\r
- DWORD index;\r
- ColorRGBA indexColor;\r
-}\r
-\r
-template Boolean {\r
- <4885AE61-78E8-11cf-8F52-0040333594A3>\r
- WORD truefalse;\r
-}\r
-\r
-template Boolean2d {\r
- <4885AE63-78E8-11cf-8F52-0040333594A3>\r
- Boolean u;\r
- Boolean v;\r
-}\r
-\r
-template MaterialWrap {\r
- <4885AE60-78E8-11cf-8F52-0040333594A3>\r
- Boolean u;\r
- Boolean v;\r
-}\r
-\r
-template TextureFilename {\r
- <A42790E1-7810-11cf-8F52-0040333594A3>\r
- STRING filename;\r
-}\r
-\r
-template Material {\r
- <3D82AB4D-62DA-11cf-AB39-0020AF71E433>\r
- ColorRGBA faceColor;\r
- FLOAT power;\r
- ColorRGB specularColor;\r
- ColorRGB emissiveColor;\r
- [...]\r
-}\r
-\r
-template MeshFace {\r
- <3D82AB5F-62DA-11cf-AB39-0020AF71E433>\r
- DWORD nFaceVertexIndices;\r
- array DWORD faceVertexIndices[nFaceVertexIndices];\r
-}\r
-\r
-template MeshFaceWraps {\r
- <4885AE62-78E8-11cf-8F52-0040333594A3>\r
- DWORD nFaceWrapValues;\r
- Boolean2d faceWrapValues;\r
-}\r
-\r
-template MeshTextureCoords {\r
- <F6F23F40-7686-11cf-8F52-0040333594A3>\r
- DWORD nTextureCoords;\r
- array Coords2d textureCoords[nTextureCoords];\r
-}\r
-\r
-template MeshMaterialList {\r
- <F6F23F42-7686-11cf-8F52-0040333594A3>\r
- DWORD nMaterials;\r
- DWORD nFaceIndexes;\r
- array DWORD faceIndexes[nFaceIndexes];\r
- [Material]\r
-}\r
-\r
-template MeshNormals {\r
- <F6F23F43-7686-11cf-8F52-0040333594A3>\r
- DWORD nNormals;\r
- array Vector normals[nNormals];\r
- DWORD nFaceNormals;\r
- array MeshFace faceNormals[nFaceNormals];\r
-}\r
-\r
-template MeshVertexColors {\r
- <1630B821-7842-11cf-8F52-0040333594A3>\r
- DWORD nVertexColors;\r
- array IndexedColor vertexColors[nVertexColors];\r
-}\r
-\r
-template Mesh {\r
- <3D82AB44-62DA-11cf-AB39-0020AF71E433>\r
- DWORD nVertices;\r
- array Vector vertices[nVertices];\r
- DWORD nFaces;\r
- array MeshFace faces[nFaces];\r
- [...]\r
-}\r
-\r
-Header{\r
-1;\r
-0;\r
-1;\r
-}\r
-\r
-Mesh {\r
- 71;\r
- -0.99781;0.00000;1.00656;,\r
- -0.49453;0.00000;1.00656;,\r
- -0.49891;0.00000;0.50328;,\r
- -0.49891;0.00000;0.50328;,\r
- -0.99781;0.00000;0.50328;,\r
- -0.99781;0.00000;1.00656;,\r
- 0.00000;0.00000;-0.00875;,\r
- -0.49891;0.00000;0.00000;,\r
- -0.49891;0.00000;0.50328;,\r
- -0.49891;0.00000;0.50328;,\r
- 0.00000;0.00000;0.49891;,\r
- 0.00000;0.00000;-0.00875;,\r
- -0.49891;0.00000;0.50328;,\r
- 0.00438;0.00000;0.99343;,\r
- 0.00000;0.00000;0.49891;,\r
- -0.49891;0.00000;0.50328;,\r
- -0.49453;0.00000;1.00656;,\r
- 0.00438;0.00000;0.99343;,\r
- -0.99781;0.00000;0.50328;,\r
- -0.49891;0.00000;0.50328;,\r
- -0.49891;0.00000;0.00000;,\r
- -0.49891;0.00000;0.00000;,\r
- -0.98906;0.00000;0.00000;,\r
- -0.99781;0.00000;0.50328;,\r
- -0.49453;0.00000;1.00656;,\r
- -0.99781;0.00000;1.00656;,\r
- -0.99781;0.00000;1.50985;,\r
- -0.49453;0.00000;1.50109;,\r
- -0.49453;0.00000;1.00656;,\r
- -0.49453;0.00000;1.50109;,\r
- 0.00438;0.00000;1.51422;,\r
- 0.00438;0.00000;0.99343;,\r
- 0.00438;0.00000;0.99343;,\r
- -0.49453;0.00000;1.00656;,\r
- -0.49453;0.00000;1.50109;,\r
- 0.00438;0.00000;0.99343;,\r
- 0.50547;0.00000;1.00656;,\r
- 0.50109;0.00000;0.50328;,\r
- 0.50109;0.00000;0.50328;,\r
- 0.00000;0.00000;0.49891;,\r
- 0.00438;0.00000;0.99343;,\r
- 1.00000;0.00000;-0.00875;,\r
- 0.50109;0.00000;0.00000;,\r
- 0.50109;0.00000;0.50328;,\r
- 0.50109;0.00000;0.50328;,\r
- 1.00000;0.00000;0.49891;,\r
- 1.00000;0.00000;-0.00875;,\r
- 0.50109;0.00000;0.50328;,\r
- 1.00438;0.00000;0.99343;,\r
- 1.00000;0.00000;0.49891;,\r
- 0.50109;0.00000;0.50328;,\r
- 0.50547;0.00000;1.00656;,\r
- 1.00438;0.00000;0.99343;,\r
- 0.00000;0.00000;0.49891;,\r
- 0.50109;0.00000;0.50328;,\r
- 0.50109;0.00000;0.00000;,\r
- 0.50109;0.00000;0.00000;,\r
- 0.00000;0.00000;-0.00875;,\r
- 0.00000;0.00000;0.49891;,\r
- 0.50547;0.00000;1.00656;,\r
- 0.00438;0.00000;0.99343;,\r
- 0.00438;0.00000;1.51422;,\r
- 0.00438;0.00000;1.51422;,\r
- 0.50547;0.00000;1.50109;,\r
- 0.50547;0.00000;1.00656;,\r
- 0.50547;0.00000;1.50109;,\r
- 1.00438;0.00000;1.51422;,\r
- 1.00438;0.00000;0.99343;,\r
- 1.00438;0.00000;0.99343;,\r
- 0.50547;0.00000;1.00656;,\r
- 0.50547;0.00000;1.50109;;\r
- \r
- 24;\r
- 3;0,1,2;,\r
- 3;3,4,5;,\r
- 3;6,7,8;,\r
- 3;9,10,11;,\r
- 3;12,13,14;,\r
- 3;15,16,17;,\r
- 3;18,19,20;,\r
- 3;21,22,23;,\r
- 3;24,25,26;,\r
- 3;26,27,28;,\r
- 3;29,30,31;,\r
- 3;32,33,34;,\r
- 3;35,36,37;,\r
- 3;38,39,40;,\r
- 3;41,42,43;,\r
- 3;44,45,46;,\r
- 3;47,48,49;,\r
- 3;50,51,52;,\r
- 3;53,54,55;,\r
- 3;56,57,58;,\r
- 3;59,60,61;,\r
- 3;62,63,64;,\r
- 3;65,66,67;,\r
- 3;68,69,70;;\r
- \r
- MeshMaterialList {\r
- 1;\r
- 24;\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0;;\r
- Material {\r
- 0.800000;0.800000;0.800000;1.000000;;\r
- 5.000000;\r
- 0.000000;0.000000;0.000000;;\r
- 0.000000;0.000000;0.000000;;\r
- TextureFilename {\r
- "tile0.jpg";\r
- }\r
- }\r
- }\r
- MeshNormals {\r
- 1;\r
- 0.000000;1.000000;0.000000;;\r
- 24;\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;;\r
- }\r
- MeshTextureCoords {\r
- 71;\r
- 0.008970;0.015610;\r
- 0.987370;0.010940;\r
- 0.993030;0.997650;\r
- 0.993180;0.996150;\r
- 0.011050;0.991000;\r
- 0.010230;0.014990;\r
- 0.991740;0.990340;\r
- 0.005740;0.994960;\r
- 0.005160;0.009180;\r
- 0.001770;0.016670;\r
- 0.992110;0.017890;\r
- 0.998400;0.992640;\r
- 0.008820;0.995620;\r
- 0.992450;0.012050;\r
- 0.993120;0.993790;\r
- 0.010690;0.992870;\r
- 0.008420;0.021150;\r
- 0.992180;0.009840;\r
- 0.011420;0.015720;\r
- 0.985690;0.011940;\r
- 0.991950;0.994470;\r
- 0.993310;0.995140;\r
- 0.012490;0.995330;\r
- 0.008050;0.018330;\r
- 0.994870;0.995150;\r
- 0.012580;0.992740;\r
- 0.009660;0.013130;\r
- 0.986800;0.011250;\r
- 0.995790;0.996020;\r
- 0.003120;0.012890;\r
- 0.991470;0.014460;\r
- 0.993520;0.998120;\r
- 0.996580;0.996940;\r
- 0.010000;0.993470;\r
- 0.010850;0.008450;\r
- 0.010970;0.018720;\r
- 0.989230;0.013420;\r
- 0.992370;0.994050;\r
- 0.988850;0.995690;\r
- 0.006740;0.990880;\r
- 0.008580;0.011650;\r
- 0.986380;0.989100;\r
- 0.008110;0.993470;\r
- 0.013240;0.006800;\r
- 0.008820;0.009840;\r
- 0.987670;0.006400;\r
- 0.993690;0.988600;\r
- 0.009030;0.995620;\r
- 0.988550;0.012050;\r
- 0.989230;0.992420;\r
- 0.008530;0.990390;\r
- 0.005600;0.010900;\r
- 0.988300;0.007750;\r
- 0.004980;0.016360;\r
- 0.991420;0.008580;\r
- 0.994710;0.990610;\r
- 0.988660;0.988310;\r
- 0.009300;0.994610;\r
- 0.006900;0.012230;\r
- 0.992220;0.988910;\r
- 0.009000;0.993150;\r
- 0.006830;0.012820;\r
- 0.007500;0.015270;\r
- 0.995060;0.017860;\r
- 0.996100;0.993070;\r
- 0.008180;0.013730;\r
- 0.994450;0.015130;\r
- 0.994420;0.997760;\r
- 0.988480;0.989210;\r
- 0.017050;0.989360;\r
- 0.007130;0.013910;;\r
- }\r
-}\r
+xof 0302txt 0064
+template Header {
+ <3D82AB43-62DA-11cf-AB39-0020AF71E433>
+ WORD major;
+ WORD minor;
+ DWORD flags;
+}
+
+template Vector {
+ <3D82AB5E-62DA-11cf-AB39-0020AF71E433>
+ FLOAT x;
+ FLOAT y;
+ FLOAT z;
+}
+
+template Coords2d {
+ <F6F23F44-7686-11cf-8F52-0040333594A3>
+ FLOAT u;
+ FLOAT v;
+}
+
+template Matrix4x4 {
+ <F6F23F45-7686-11cf-8F52-0040333594A3>
+ array FLOAT matrix[16];
+}
+
+template ColorRGBA {
+ <35FF44E0-6C7C-11cf-8F52-0040333594A3>
+ FLOAT red;
+ FLOAT green;
+ FLOAT blue;
+ FLOAT alpha;
+}
+
+template ColorRGB {
+ <D3E16E81-7835-11cf-8F52-0040333594A3>
+ FLOAT red;
+ FLOAT green;
+ FLOAT blue;
+}
+
+template IndexedColor {
+ <1630B820-7842-11cf-8F52-0040333594A3>
+ DWORD index;
+ ColorRGBA indexColor;
+}
+
+template Boolean {
+ <4885AE61-78E8-11cf-8F52-0040333594A3>
+ WORD truefalse;
+}
+
+template Boolean2d {
+ <4885AE63-78E8-11cf-8F52-0040333594A3>
+ Boolean u;
+ Boolean v;
+}
+
+template MaterialWrap {
+ <4885AE60-78E8-11cf-8F52-0040333594A3>
+ Boolean u;
+ Boolean v;
+}
+
+template TextureFilename {
+ <A42790E1-7810-11cf-8F52-0040333594A3>
+ STRING filename;
+}
+
+template Material {
+ <3D82AB4D-62DA-11cf-AB39-0020AF71E433>
+ ColorRGBA faceColor;
+ FLOAT power;
+ ColorRGB specularColor;
+ ColorRGB emissiveColor;
+ [...]
+}
+
+template MeshFace {
+ <3D82AB5F-62DA-11cf-AB39-0020AF71E433>
+ DWORD nFaceVertexIndices;
+ array DWORD faceVertexIndices[nFaceVertexIndices];
+}
+
+template MeshFaceWraps {
+ <4885AE62-78E8-11cf-8F52-0040333594A3>
+ DWORD nFaceWrapValues;
+ Boolean2d faceWrapValues;
+}
+
+template MeshTextureCoords {
+ <F6F23F40-7686-11cf-8F52-0040333594A3>
+ DWORD nTextureCoords;
+ array Coords2d textureCoords[nTextureCoords];
+}
+
+template MeshMaterialList {
+ <F6F23F42-7686-11cf-8F52-0040333594A3>
+ DWORD nMaterials;
+ DWORD nFaceIndexes;
+ array DWORD faceIndexes[nFaceIndexes];
+ [Material]
+}
+
+template MeshNormals {
+ <F6F23F43-7686-11cf-8F52-0040333594A3>
+ DWORD nNormals;
+ array Vector normals[nNormals];
+ DWORD nFaceNormals;
+ array MeshFace faceNormals[nFaceNormals];
+}
+
+template MeshVertexColors {
+ <1630B821-7842-11cf-8F52-0040333594A3>
+ DWORD nVertexColors;
+ array IndexedColor vertexColors[nVertexColors];
+}
+
+template Mesh {
+ <3D82AB44-62DA-11cf-AB39-0020AF71E433>
+ DWORD nVertices;
+ array Vector vertices[nVertices];
+ DWORD nFaces;
+ array MeshFace faces[nFaces];
+ [...]
+}
+
+Header{
+1;
+0;
+1;
+}
+
+Mesh {
+ 71;
+ -0.99781;0.00000;1.00656;,
+ -0.49453;0.00000;1.00656;,
+ -0.49891;0.00000;0.50328;,
+ -0.49891;0.00000;0.50328;,
+ -0.99781;0.00000;0.50328;,
+ -0.99781;0.00000;1.00656;,
+ 0.00000;0.00000;-0.00875;,
+ -0.49891;0.00000;0.00000;,
+ -0.49891;0.00000;0.50328;,
+ -0.49891;0.00000;0.50328;,
+ 0.00000;0.00000;0.49891;,
+ 0.00000;0.00000;-0.00875;,
+ -0.49891;0.00000;0.50328;,
+ 0.00438;0.00000;0.99343;,
+ 0.00000;0.00000;0.49891;,
+ -0.49891;0.00000;0.50328;,
+ -0.49453;0.00000;1.00656;,
+ 0.00438;0.00000;0.99343;,
+ -0.99781;0.00000;0.50328;,
+ -0.49891;0.00000;0.50328;,
+ -0.49891;0.00000;0.00000;,
+ -0.49891;0.00000;0.00000;,
+ -0.98906;0.00000;0.00000;,
+ -0.99781;0.00000;0.50328;,
+ -0.49453;0.00000;1.00656;,
+ -0.99781;0.00000;1.00656;,
+ -0.99781;0.00000;1.50985;,
+ -0.49453;0.00000;1.50109;,
+ -0.49453;0.00000;1.00656;,
+ -0.49453;0.00000;1.50109;,
+ 0.00438;0.00000;1.51422;,
+ 0.00438;0.00000;0.99343;,
+ 0.00438;0.00000;0.99343;,
+ -0.49453;0.00000;1.00656;,
+ -0.49453;0.00000;1.50109;,
+ 0.00438;0.00000;0.99343;,
+ 0.50547;0.00000;1.00656;,
+ 0.50109;0.00000;0.50328;,
+ 0.50109;0.00000;0.50328;,
+ 0.00000;0.00000;0.49891;,
+ 0.00438;0.00000;0.99343;,
+ 1.00000;0.00000;-0.00875;,
+ 0.50109;0.00000;0.00000;,
+ 0.50109;0.00000;0.50328;,
+ 0.50109;0.00000;0.50328;,
+ 1.00000;0.00000;0.49891;,
+ 1.00000;0.00000;-0.00875;,
+ 0.50109;0.00000;0.50328;,
+ 1.00438;0.00000;0.99343;,
+ 1.00000;0.00000;0.49891;,
+ 0.50109;0.00000;0.50328;,
+ 0.50547;0.00000;1.00656;,
+ 1.00438;0.00000;0.99343;,
+ 0.00000;0.00000;0.49891;,
+ 0.50109;0.00000;0.50328;,
+ 0.50109;0.00000;0.00000;,
+ 0.50109;0.00000;0.00000;,
+ 0.00000;0.00000;-0.00875;,
+ 0.00000;0.00000;0.49891;,
+ 0.50547;0.00000;1.00656;,
+ 0.00438;0.00000;0.99343;,
+ 0.00438;0.00000;1.51422;,
+ 0.00438;0.00000;1.51422;,
+ 0.50547;0.00000;1.50109;,
+ 0.50547;0.00000;1.00656;,
+ 0.50547;0.00000;1.50109;,
+ 1.00438;0.00000;1.51422;,
+ 1.00438;0.00000;0.99343;,
+ 1.00438;0.00000;0.99343;,
+ 0.50547;0.00000;1.00656;,
+ 0.50547;0.00000;1.50109;;
+
+ 24;
+ 3;0,1,2;,
+ 3;3,4,5;,
+ 3;6,7,8;,
+ 3;9,10,11;,
+ 3;12,13,14;,
+ 3;15,16,17;,
+ 3;18,19,20;,
+ 3;21,22,23;,
+ 3;24,25,26;,
+ 3;26,27,28;,
+ 3;29,30,31;,
+ 3;32,33,34;,
+ 3;35,36,37;,
+ 3;38,39,40;,
+ 3;41,42,43;,
+ 3;44,45,46;,
+ 3;47,48,49;,
+ 3;50,51,52;,
+ 3;53,54,55;,
+ 3;56,57,58;,
+ 3;59,60,61;,
+ 3;62,63,64;,
+ 3;65,66,67;,
+ 3;68,69,70;;
+
+ MeshMaterialList {
+ 1;
+ 24;
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0;;
+ Material {
+ 0.800000;0.800000;0.800000;1.000000;;
+ 5.000000;
+ 0.000000;0.000000;0.000000;;
+ 0.000000;0.000000;0.000000;;
+ TextureFilename {
+ "tile0.jpg";
+ }
+ }
+ }
+ MeshNormals {
+ 1;
+ 0.000000;1.000000;0.000000;;
+ 24;
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;;
+ }
+ MeshTextureCoords {
+ 71;
+ 0.008970;0.015610;
+ 0.987370;0.010940;
+ 0.993030;0.997650;
+ 0.993180;0.996150;
+ 0.011050;0.991000;
+ 0.010230;0.014990;
+ 0.991740;0.990340;
+ 0.005740;0.994960;
+ 0.005160;0.009180;
+ 0.001770;0.016670;
+ 0.992110;0.017890;
+ 0.998400;0.992640;
+ 0.008820;0.995620;
+ 0.992450;0.012050;
+ 0.993120;0.993790;
+ 0.010690;0.992870;
+ 0.008420;0.021150;
+ 0.992180;0.009840;
+ 0.011420;0.015720;
+ 0.985690;0.011940;
+ 0.991950;0.994470;
+ 0.993310;0.995140;
+ 0.012490;0.995330;
+ 0.008050;0.018330;
+ 0.994870;0.995150;
+ 0.012580;0.992740;
+ 0.009660;0.013130;
+ 0.986800;0.011250;
+ 0.995790;0.996020;
+ 0.003120;0.012890;
+ 0.991470;0.014460;
+ 0.993520;0.998120;
+ 0.996580;0.996940;
+ 0.010000;0.993470;
+ 0.010850;0.008450;
+ 0.010970;0.018720;
+ 0.989230;0.013420;
+ 0.992370;0.994050;
+ 0.988850;0.995690;
+ 0.006740;0.990880;
+ 0.008580;0.011650;
+ 0.986380;0.989100;
+ 0.008110;0.993470;
+ 0.013240;0.006800;
+ 0.008820;0.009840;
+ 0.987670;0.006400;
+ 0.993690;0.988600;
+ 0.009030;0.995620;
+ 0.988550;0.012050;
+ 0.989230;0.992420;
+ 0.008530;0.990390;
+ 0.005600;0.010900;
+ 0.988300;0.007750;
+ 0.004980;0.016360;
+ 0.991420;0.008580;
+ 0.994710;0.990610;
+ 0.988660;0.988310;
+ 0.009300;0.994610;
+ 0.006900;0.012230;
+ 0.992220;0.988910;
+ 0.009000;0.993150;
+ 0.006830;0.012820;
+ 0.007500;0.015270;
+ 0.995060;0.017860;
+ 0.996100;0.993070;
+ 0.008180;0.013730;
+ 0.994450;0.015130;
+ 0.994420;0.997760;
+ 0.988480;0.989210;
+ 0.017050;0.989360;
+ 0.007130;0.013910;;
+ }
+}
-Metasequoia Document\r
-Format Text Ver 1.0\r
-\r
-Scene {\r
- pos 0.0000 0.0000 1500.0000\r
- lookat 0.0000 0.0000 0.0000\r
- head -0.7700\r
- pich 0.1308\r
- ortho 1\r
- zoom2 2.4948\r
- amb 0.250 0.250 0.250\r
-}\r
-Material 1 {\r
- "mat1" col(1.000 1.000 1.000 1.000) dif(0.800) amb(0.600) emi(0.000) spc(0.000) power(5.00)\r
-}\r
-Object "obj1" {\r
- visible 15\r
- locking 0\r
- shading 1\r
- facet 59.5\r
- color 0.898 0.498 0.698\r
- color_type 0\r
- vertex 4 {\r
- -50.0000 100.0000 -0.0000\r
- 50.0000 100.0000 -0.0000\r
- -50.0000 0.0000 0.0000\r
- 50.0000 0.0000 0.0000\r
- }\r
- face 2 {\r
- 3 V(0 1 2) M(0)\r
- 3 V(1 3 2) M(0)\r
- }\r
-}\r
-Eof\r
+Metasequoia Document
+Format Text Ver 1.0
+
+Scene {
+ pos 0.0000 0.0000 1500.0000
+ lookat 0.0000 0.0000 0.0000
+ head -0.7700
+ pich 0.1308
+ ortho 1
+ zoom2 2.4948
+ amb 0.250 0.250 0.250
+}
+Material 1 {
+ "mat1" col(1.000 1.000 1.000 1.000) dif(0.800) amb(0.600) emi(0.000) spc(0.000) power(5.00)
+}
+Object "obj1" {
+ visible 15
+ locking 0
+ shading 1
+ facet 59.5
+ color 0.898 0.498 0.698
+ color_type 0
+ vertex 4 {
+ -50.0000 100.0000 -0.0000
+ 50.0000 100.0000 -0.0000
+ -50.0000 0.0000 0.0000
+ 50.0000 0.0000 0.0000
+ }
+ face 2 {
+ 3 V(0 1 2) M(0)
+ 3 V(1 3 2) M(0)
+ }
+}
+Eof
-xof 0302txt 0064\r
-template Header {\r
- <3D82AB43-62DA-11cf-AB39-0020AF71E433>\r
- WORD major;\r
- WORD minor;\r
- DWORD flags;\r
-}\r
-\r
-template Vector {\r
- <3D82AB5E-62DA-11cf-AB39-0020AF71E433>\r
- FLOAT x;\r
- FLOAT y;\r
- FLOAT z;\r
-}\r
-\r
-template Coords2d {\r
- <F6F23F44-7686-11cf-8F52-0040333594A3>\r
- FLOAT u;\r
- FLOAT v;\r
-}\r
-\r
-template Matrix4x4 {\r
- <F6F23F45-7686-11cf-8F52-0040333594A3>\r
- array FLOAT matrix[16];\r
-}\r
-\r
-template ColorRGBA {\r
- <35FF44E0-6C7C-11cf-8F52-0040333594A3>\r
- FLOAT red;\r
- FLOAT green;\r
- FLOAT blue;\r
- FLOAT alpha;\r
-}\r
-\r
-template ColorRGB {\r
- <D3E16E81-7835-11cf-8F52-0040333594A3>\r
- FLOAT red;\r
- FLOAT green;\r
- FLOAT blue;\r
-}\r
-\r
-template IndexedColor {\r
- <1630B820-7842-11cf-8F52-0040333594A3>\r
- DWORD index;\r
- ColorRGBA indexColor;\r
-}\r
-\r
-template Boolean {\r
- <4885AE61-78E8-11cf-8F52-0040333594A3>\r
- WORD truefalse;\r
-}\r
-\r
-template Boolean2d {\r
- <4885AE63-78E8-11cf-8F52-0040333594A3>\r
- Boolean u;\r
- Boolean v;\r
-}\r
-\r
-template MaterialWrap {\r
- <4885AE60-78E8-11cf-8F52-0040333594A3>\r
- Boolean u;\r
- Boolean v;\r
-}\r
-\r
-template TextureFilename {\r
- <A42790E1-7810-11cf-8F52-0040333594A3>\r
- STRING filename;\r
-}\r
-\r
-template Material {\r
- <3D82AB4D-62DA-11cf-AB39-0020AF71E433>\r
- ColorRGBA faceColor;\r
- FLOAT power;\r
- ColorRGB specularColor;\r
- ColorRGB emissiveColor;\r
- [...]\r
-}\r
-\r
-template MeshFace {\r
- <3D82AB5F-62DA-11cf-AB39-0020AF71E433>\r
- DWORD nFaceVertexIndices;\r
- array DWORD faceVertexIndices[nFaceVertexIndices];\r
-}\r
-\r
-template MeshFaceWraps {\r
- <4885AE62-78E8-11cf-8F52-0040333594A3>\r
- DWORD nFaceWrapValues;\r
- Boolean2d faceWrapValues;\r
-}\r
-\r
-template MeshTextureCoords {\r
- <F6F23F40-7686-11cf-8F52-0040333594A3>\r
- DWORD nTextureCoords;\r
- array Coords2d textureCoords[nTextureCoords];\r
-}\r
-\r
-template MeshMaterialList {\r
- <F6F23F42-7686-11cf-8F52-0040333594A3>\r
- DWORD nMaterials;\r
- DWORD nFaceIndexes;\r
- array DWORD faceIndexes[nFaceIndexes];\r
- [Material]\r
-}\r
-\r
-template MeshNormals {\r
- <F6F23F43-7686-11cf-8F52-0040333594A3>\r
- DWORD nNormals;\r
- array Vector normals[nNormals];\r
- DWORD nFaceNormals;\r
- array MeshFace faceNormals[nFaceNormals];\r
-}\r
-\r
-template MeshVertexColors {\r
- <1630B821-7842-11cf-8F52-0040333594A3>\r
- DWORD nVertexColors;\r
- array IndexedColor vertexColors[nVertexColors];\r
-}\r
-\r
-template Mesh {\r
- <3D82AB44-62DA-11cf-AB39-0020AF71E433>\r
- DWORD nVertices;\r
- array Vector vertices[nVertices];\r
- DWORD nFaces;\r
- array MeshFace faces[nFaces];\r
- [...]\r
-}\r
-\r
-Header{\r
-1;\r
-0;\r
-1;\r
-}\r
-\r
-Mesh {\r
- 4;\r
- -0.50000;1.00000;0.00000;,\r
- 0.50000;1.00000;0.00000;,\r
- -0.50000;0.00000;-0.00000;,\r
- 0.50000;0.00000;-0.00000;;\r
- \r
- 2;\r
- 3;0,1,2;,\r
- 3;1,3,2;;\r
- \r
- MeshMaterialList {\r
- 1;\r
- 2;\r
- 0,\r
- 0;;\r
- Material {\r
- 0.800000;0.800000;0.800000;1.000000;;\r
- 5.000000;\r
- 0.000000;0.000000;0.000000;;\r
- 0.000000;0.000000;0.000000;;\r
- }\r
- }\r
- MeshNormals {\r
- 1;\r
- 0.000000;0.000000;-1.000000;;\r
- 2;\r
- 3;0,0,0;,\r
- 3;0,0,0;;\r
- }\r
- MeshTextureCoords {\r
- 4;\r
- 0.000000;0.000000;\r
- 0.000000;0.000000;\r
- 0.000000;0.000000;\r
- 0.000000;0.000000;;\r
- }\r
-}\r
+xof 0302txt 0064
+template Header {
+ <3D82AB43-62DA-11cf-AB39-0020AF71E433>
+ WORD major;
+ WORD minor;
+ DWORD flags;
+}
+
+template Vector {
+ <3D82AB5E-62DA-11cf-AB39-0020AF71E433>
+ FLOAT x;
+ FLOAT y;
+ FLOAT z;
+}
+
+template Coords2d {
+ <F6F23F44-7686-11cf-8F52-0040333594A3>
+ FLOAT u;
+ FLOAT v;
+}
+
+template Matrix4x4 {
+ <F6F23F45-7686-11cf-8F52-0040333594A3>
+ array FLOAT matrix[16];
+}
+
+template ColorRGBA {
+ <35FF44E0-6C7C-11cf-8F52-0040333594A3>
+ FLOAT red;
+ FLOAT green;
+ FLOAT blue;
+ FLOAT alpha;
+}
+
+template ColorRGB {
+ <D3E16E81-7835-11cf-8F52-0040333594A3>
+ FLOAT red;
+ FLOAT green;
+ FLOAT blue;
+}
+
+template IndexedColor {
+ <1630B820-7842-11cf-8F52-0040333594A3>
+ DWORD index;
+ ColorRGBA indexColor;
+}
+
+template Boolean {
+ <4885AE61-78E8-11cf-8F52-0040333594A3>
+ WORD truefalse;
+}
+
+template Boolean2d {
+ <4885AE63-78E8-11cf-8F52-0040333594A3>
+ Boolean u;
+ Boolean v;
+}
+
+template MaterialWrap {
+ <4885AE60-78E8-11cf-8F52-0040333594A3>
+ Boolean u;
+ Boolean v;
+}
+
+template TextureFilename {
+ <A42790E1-7810-11cf-8F52-0040333594A3>
+ STRING filename;
+}
+
+template Material {
+ <3D82AB4D-62DA-11cf-AB39-0020AF71E433>
+ ColorRGBA faceColor;
+ FLOAT power;
+ ColorRGB specularColor;
+ ColorRGB emissiveColor;
+ [...]
+}
+
+template MeshFace {
+ <3D82AB5F-62DA-11cf-AB39-0020AF71E433>
+ DWORD nFaceVertexIndices;
+ array DWORD faceVertexIndices[nFaceVertexIndices];
+}
+
+template MeshFaceWraps {
+ <4885AE62-78E8-11cf-8F52-0040333594A3>
+ DWORD nFaceWrapValues;
+ Boolean2d faceWrapValues;
+}
+
+template MeshTextureCoords {
+ <F6F23F40-7686-11cf-8F52-0040333594A3>
+ DWORD nTextureCoords;
+ array Coords2d textureCoords[nTextureCoords];
+}
+
+template MeshMaterialList {
+ <F6F23F42-7686-11cf-8F52-0040333594A3>
+ DWORD nMaterials;
+ DWORD nFaceIndexes;
+ array DWORD faceIndexes[nFaceIndexes];
+ [Material]
+}
+
+template MeshNormals {
+ <F6F23F43-7686-11cf-8F52-0040333594A3>
+ DWORD nNormals;
+ array Vector normals[nNormals];
+ DWORD nFaceNormals;
+ array MeshFace faceNormals[nFaceNormals];
+}
+
+template MeshVertexColors {
+ <1630B821-7842-11cf-8F52-0040333594A3>
+ DWORD nVertexColors;
+ array IndexedColor vertexColors[nVertexColors];
+}
+
+template Mesh {
+ <3D82AB44-62DA-11cf-AB39-0020AF71E433>
+ DWORD nVertices;
+ array Vector vertices[nVertices];
+ DWORD nFaces;
+ array MeshFace faces[nFaces];
+ [...]
+}
+
+Header{
+1;
+0;
+1;
+}
+
+Mesh {
+ 4;
+ -0.50000;1.00000;0.00000;,
+ 0.50000;1.00000;0.00000;,
+ -0.50000;0.00000;-0.00000;,
+ 0.50000;0.00000;-0.00000;;
+
+ 2;
+ 3;0,1,2;,
+ 3;1,3,2;;
+
+ MeshMaterialList {
+ 1;
+ 2;
+ 0,
+ 0;;
+ Material {
+ 0.800000;0.800000;0.800000;1.000000;;
+ 5.000000;
+ 0.000000;0.000000;0.000000;;
+ 0.000000;0.000000;0.000000;;
+ }
+ }
+ MeshNormals {
+ 1;
+ 0.000000;0.000000;-1.000000;;
+ 2;
+ 3;0,0,0;,
+ 3;0,0,0;;
+ }
+ MeshTextureCoords {
+ 4;
+ 0.000000;0.000000;
+ 0.000000;0.000000;
+ 0.000000;0.000000;
+ 0.000000;0.000000;;
+ }
+}
-xof 0302txt 0064\r
-template Header {\r
- <3D82AB43-62DA-11cf-AB39-0020AF71E433>\r
- WORD major;\r
- WORD minor;\r
- DWORD flags;\r
-}\r
-\r
-template Vector {\r
- <3D82AB5E-62DA-11cf-AB39-0020AF71E433>\r
- FLOAT x;\r
- FLOAT y;\r
- FLOAT z;\r
-}\r
-\r
-template Coords2d {\r
- <F6F23F44-7686-11cf-8F52-0040333594A3>\r
- FLOAT u;\r
- FLOAT v;\r
-}\r
-\r
-template Matrix4x4 {\r
- <F6F23F45-7686-11cf-8F52-0040333594A3>\r
- array FLOAT matrix[16];\r
-}\r
-\r
-template ColorRGBA {\r
- <35FF44E0-6C7C-11cf-8F52-0040333594A3>\r
- FLOAT red;\r
- FLOAT green;\r
- FLOAT blue;\r
- FLOAT alpha;\r
-}\r
-\r
-template ColorRGB {\r
- <D3E16E81-7835-11cf-8F52-0040333594A3>\r
- FLOAT red;\r
- FLOAT green;\r
- FLOAT blue;\r
-}\r
-\r
-template IndexedColor {\r
- <1630B820-7842-11cf-8F52-0040333594A3>\r
- DWORD index;\r
- ColorRGBA indexColor;\r
-}\r
-\r
-template Boolean {\r
- <4885AE61-78E8-11cf-8F52-0040333594A3>\r
- WORD truefalse;\r
-}\r
-\r
-template Boolean2d {\r
- <4885AE63-78E8-11cf-8F52-0040333594A3>\r
- Boolean u;\r
- Boolean v;\r
-}\r
-\r
-template MaterialWrap {\r
- <4885AE60-78E8-11cf-8F52-0040333594A3>\r
- Boolean u;\r
- Boolean v;\r
-}\r
-\r
-template TextureFilename {\r
- <A42790E1-7810-11cf-8F52-0040333594A3>\r
- STRING filename;\r
-}\r
-\r
-template Material {\r
- <3D82AB4D-62DA-11cf-AB39-0020AF71E433>\r
- ColorRGBA faceColor;\r
- FLOAT power;\r
- ColorRGB specularColor;\r
- ColorRGB emissiveColor;\r
- [...]\r
-}\r
-\r
-template MeshFace {\r
- <3D82AB5F-62DA-11cf-AB39-0020AF71E433>\r
- DWORD nFaceVertexIndices;\r
- array DWORD faceVertexIndices[nFaceVertexIndices];\r
-}\r
-\r
-template MeshFaceWraps {\r
- <4885AE62-78E8-11cf-8F52-0040333594A3>\r
- DWORD nFaceWrapValues;\r
- Boolean2d faceWrapValues;\r
-}\r
-\r
-template MeshTextureCoords {\r
- <F6F23F40-7686-11cf-8F52-0040333594A3>\r
- DWORD nTextureCoords;\r
- array Coords2d textureCoords[nTextureCoords];\r
-}\r
-\r
-template MeshMaterialList {\r
- <F6F23F42-7686-11cf-8F52-0040333594A3>\r
- DWORD nMaterials;\r
- DWORD nFaceIndexes;\r
- array DWORD faceIndexes[nFaceIndexes];\r
- [Material]\r
-}\r
-\r
-template MeshNormals {\r
- <F6F23F43-7686-11cf-8F52-0040333594A3>\r
- DWORD nNormals;\r
- array Vector normals[nNormals];\r
- DWORD nFaceNormals;\r
- array MeshFace faceNormals[nFaceNormals];\r
-}\r
-\r
-template MeshVertexColors {\r
- <1630B821-7842-11cf-8F52-0040333594A3>\r
- DWORD nVertexColors;\r
- array IndexedColor vertexColors[nVertexColors];\r
-}\r
-\r
-template Mesh {\r
- <3D82AB44-62DA-11cf-AB39-0020AF71E433>\r
- DWORD nVertices;\r
- array Vector vertices[nVertices];\r
- DWORD nFaces;\r
- array MeshFace faces[nFaces];\r
- [...]\r
-}\r
-\r
-Header{\r
-1;\r
-0;\r
-1;\r
-}\r
-\r
-Mesh {\r
- 8;\r
- -0.50000;0.50000;0.50000;,\r
- 0.50000;0.50000;0.50000;,\r
- 0.50000;0.50000;-0.50000;,\r
- -0.50000;0.50000;-0.50000;,\r
- 0.50000;-0.50000;-0.50000;,\r
- -0.50000;-0.50000;-0.50000;,\r
- 0.50000;-0.50000;0.50000;,\r
- -0.50000;-0.50000;0.50000;;\r
- \r
- 6;\r
- 4;0,1,2,3;,\r
- 4;3,2,4,5;,\r
- 4;5,4,6,7;,\r
- 4;7,6,1,0;,\r
- 4;1,6,4,2;,\r
- 4;7,0,3,5;;\r
- \r
- MeshMaterialList {\r
- 1;\r
- 6;\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0;;\r
- Material {\r
- 1.000000;1.000000;1.000000;1.000000;;\r
- 0.000000;\r
- 0.000000;0.000000;0.000000;;\r
- 0.000000;0.000000;0.000000;;\r
- }\r
- }\r
- MeshNormals {\r
- 6;\r
- 0.000000;1.000000;0.000000;,\r
- 0.000000;0.000000;-1.000000;,\r
- 0.000000;-1.000000;-0.000000;,\r
- 0.000000;0.000000;1.000000;,\r
- 1.000000;0.000000;0.000000;,\r
- -1.000000;0.000000;0.000000;;\r
- 6;\r
- 4;0,0,0,0;,\r
- 4;1,1,1,1;,\r
- 4;2,2,2,2;,\r
- 4;3,3,3,3;,\r
- 4;4,4,4,4;,\r
- 4;5,5,5,5;;\r
- }\r
-}\r
+xof 0302txt 0064
+template Header {
+ <3D82AB43-62DA-11cf-AB39-0020AF71E433>
+ WORD major;
+ WORD minor;
+ DWORD flags;
+}
+
+template Vector {
+ <3D82AB5E-62DA-11cf-AB39-0020AF71E433>
+ FLOAT x;
+ FLOAT y;
+ FLOAT z;
+}
+
+template Coords2d {
+ <F6F23F44-7686-11cf-8F52-0040333594A3>
+ FLOAT u;
+ FLOAT v;
+}
+
+template Matrix4x4 {
+ <F6F23F45-7686-11cf-8F52-0040333594A3>
+ array FLOAT matrix[16];
+}
+
+template ColorRGBA {
+ <35FF44E0-6C7C-11cf-8F52-0040333594A3>
+ FLOAT red;
+ FLOAT green;
+ FLOAT blue;
+ FLOAT alpha;
+}
+
+template ColorRGB {
+ <D3E16E81-7835-11cf-8F52-0040333594A3>
+ FLOAT red;
+ FLOAT green;
+ FLOAT blue;
+}
+
+template IndexedColor {
+ <1630B820-7842-11cf-8F52-0040333594A3>
+ DWORD index;
+ ColorRGBA indexColor;
+}
+
+template Boolean {
+ <4885AE61-78E8-11cf-8F52-0040333594A3>
+ WORD truefalse;
+}
+
+template Boolean2d {
+ <4885AE63-78E8-11cf-8F52-0040333594A3>
+ Boolean u;
+ Boolean v;
+}
+
+template MaterialWrap {
+ <4885AE60-78E8-11cf-8F52-0040333594A3>
+ Boolean u;
+ Boolean v;
+}
+
+template TextureFilename {
+ <A42790E1-7810-11cf-8F52-0040333594A3>
+ STRING filename;
+}
+
+template Material {
+ <3D82AB4D-62DA-11cf-AB39-0020AF71E433>
+ ColorRGBA faceColor;
+ FLOAT power;
+ ColorRGB specularColor;
+ ColorRGB emissiveColor;
+ [...]
+}
+
+template MeshFace {
+ <3D82AB5F-62DA-11cf-AB39-0020AF71E433>
+ DWORD nFaceVertexIndices;
+ array DWORD faceVertexIndices[nFaceVertexIndices];
+}
+
+template MeshFaceWraps {
+ <4885AE62-78E8-11cf-8F52-0040333594A3>
+ DWORD nFaceWrapValues;
+ Boolean2d faceWrapValues;
+}
+
+template MeshTextureCoords {
+ <F6F23F40-7686-11cf-8F52-0040333594A3>
+ DWORD nTextureCoords;
+ array Coords2d textureCoords[nTextureCoords];
+}
+
+template MeshMaterialList {
+ <F6F23F42-7686-11cf-8F52-0040333594A3>
+ DWORD nMaterials;
+ DWORD nFaceIndexes;
+ array DWORD faceIndexes[nFaceIndexes];
+ [Material]
+}
+
+template MeshNormals {
+ <F6F23F43-7686-11cf-8F52-0040333594A3>
+ DWORD nNormals;
+ array Vector normals[nNormals];
+ DWORD nFaceNormals;
+ array MeshFace faceNormals[nFaceNormals];
+}
+
+template MeshVertexColors {
+ <1630B821-7842-11cf-8F52-0040333594A3>
+ DWORD nVertexColors;
+ array IndexedColor vertexColors[nVertexColors];
+}
+
+template Mesh {
+ <3D82AB44-62DA-11cf-AB39-0020AF71E433>
+ DWORD nVertices;
+ array Vector vertices[nVertices];
+ DWORD nFaces;
+ array MeshFace faces[nFaces];
+ [...]
+}
+
+Header{
+1;
+0;
+1;
+}
+
+Mesh {
+ 8;
+ -0.50000;0.50000;0.50000;,
+ 0.50000;0.50000;0.50000;,
+ 0.50000;0.50000;-0.50000;,
+ -0.50000;0.50000;-0.50000;,
+ 0.50000;-0.50000;-0.50000;,
+ -0.50000;-0.50000;-0.50000;,
+ 0.50000;-0.50000;0.50000;,
+ -0.50000;-0.50000;0.50000;;
+
+ 6;
+ 4;0,1,2,3;,
+ 4;3,2,4,5;,
+ 4;5,4,6,7;,
+ 4;7,6,1,0;,
+ 4;1,6,4,2;,
+ 4;7,0,3,5;;
+
+ MeshMaterialList {
+ 1;
+ 6;
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0;;
+ Material {
+ 1.000000;1.000000;1.000000;1.000000;;
+ 0.000000;
+ 0.000000;0.000000;0.000000;;
+ 0.000000;0.000000;0.000000;;
+ }
+ }
+ MeshNormals {
+ 6;
+ 0.000000;1.000000;0.000000;,
+ 0.000000;0.000000;-1.000000;,
+ 0.000000;-1.000000;-0.000000;,
+ 0.000000;0.000000;1.000000;,
+ 1.000000;0.000000;0.000000;,
+ -1.000000;0.000000;0.000000;;
+ 6;
+ 4;0,0,0,0;,
+ 4;1,1,1,1;,
+ 4;2,2,2,2;,
+ 4;3,3,3,3;,
+ 4;4,4,4,4;,
+ 4;5,5,5,5;;
+ }
+}
-Metasequoia Document\r
-Format Text Ver 1.0\r
-\r
-Scene {\r
- pos 0.0000 0.0000 1500.0000\r
- lookat 0.0000 0.0000 0.0000\r
- head -1.5708\r
- pich 0.0000\r
- ortho 0\r
- zoom2 4.4980\r
- amb 0.250 0.250 0.250\r
-}\r
-Material 1 {\r
- "mat1" col(0.784 0.827 0.247 1.000) dif(0.800) amb(0.600) emi(0.000) spc(0.000) power(5.00)\r
-}\r
-Object "obj1" {\r
- visible 15\r
- locking 0\r
- shading 1\r
- facet 59.5\r
- color 0.898 0.498 0.698\r
- color_type 0\r
- vertex 4 {\r
- -0.0000 0.4579 -0.4863\r
- 15.8070 48.3439 18.5751\r
- -19.9912 48.3439 -0.4863\r
- 15.3421 48.8087 -19.5477\r
- }\r
- face 4 {\r
- 3 V(2 1 0) M(0)\r
- 3 V(0 1 3) M(0)\r
- 3 V(3 2 0) M(0)\r
- 3 V(1 2 3) M(0)\r
- }\r
-}\r
-Eof\r
+Metasequoia Document
+Format Text Ver 1.0
+
+Scene {
+ pos 0.0000 0.0000 1500.0000
+ lookat 0.0000 0.0000 0.0000
+ head -1.5708
+ pich 0.0000
+ ortho 0
+ zoom2 4.4980
+ amb 0.250 0.250 0.250
+}
+Material 1 {
+ "mat1" col(0.784 0.827 0.247 1.000) dif(0.800) amb(0.600) emi(0.000) spc(0.000) power(5.00)
+}
+Object "obj1" {
+ visible 15
+ locking 0
+ shading 1
+ facet 59.5
+ color 0.898 0.498 0.698
+ color_type 0
+ vertex 4 {
+ -0.0000 0.4579 -0.4863
+ 15.8070 48.3439 18.5751
+ -19.9912 48.3439 -0.4863
+ 15.3421 48.8087 -19.5477
+ }
+ face 4 {
+ 3 V(2 1 0) M(0)
+ 3 V(0 1 3) M(0)
+ 3 V(3 2 0) M(0)
+ 3 V(1 2 3) M(0)
+ }
+}
+Eof
-xof 0302txt 0064\r
-template Header {\r
- <3D82AB43-62DA-11cf-AB39-0020AF71E433>\r
- WORD major;\r
- WORD minor;\r
- DWORD flags;\r
-}\r
-\r
-template Vector {\r
- <3D82AB5E-62DA-11cf-AB39-0020AF71E433>\r
- FLOAT x;\r
- FLOAT y;\r
- FLOAT z;\r
-}\r
-\r
-template Coords2d {\r
- <F6F23F44-7686-11cf-8F52-0040333594A3>\r
- FLOAT u;\r
- FLOAT v;\r
-}\r
-\r
-template Matrix4x4 {\r
- <F6F23F45-7686-11cf-8F52-0040333594A3>\r
- array FLOAT matrix[16];\r
-}\r
-\r
-template ColorRGBA {\r
- <35FF44E0-6C7C-11cf-8F52-0040333594A3>\r
- FLOAT red;\r
- FLOAT green;\r
- FLOAT blue;\r
- FLOAT alpha;\r
-}\r
-\r
-template ColorRGB {\r
- <D3E16E81-7835-11cf-8F52-0040333594A3>\r
- FLOAT red;\r
- FLOAT green;\r
- FLOAT blue;\r
-}\r
-\r
-template IndexedColor {\r
- <1630B820-7842-11cf-8F52-0040333594A3>\r
- DWORD index;\r
- ColorRGBA indexColor;\r
-}\r
-\r
-template Boolean {\r
- <4885AE61-78E8-11cf-8F52-0040333594A3>\r
- WORD truefalse;\r
-}\r
-\r
-template Boolean2d {\r
- <4885AE63-78E8-11cf-8F52-0040333594A3>\r
- Boolean u;\r
- Boolean v;\r
-}\r
-\r
-template MaterialWrap {\r
- <4885AE60-78E8-11cf-8F52-0040333594A3>\r
- Boolean u;\r
- Boolean v;\r
-}\r
-\r
-template TextureFilename {\r
- <A42790E1-7810-11cf-8F52-0040333594A3>\r
- STRING filename;\r
-}\r
-\r
-template Material {\r
- <3D82AB4D-62DA-11cf-AB39-0020AF71E433>\r
- ColorRGBA faceColor;\r
- FLOAT power;\r
- ColorRGB specularColor;\r
- ColorRGB emissiveColor;\r
- [...]\r
-}\r
-\r
-template MeshFace {\r
- <3D82AB5F-62DA-11cf-AB39-0020AF71E433>\r
- DWORD nFaceVertexIndices;\r
- array DWORD faceVertexIndices[nFaceVertexIndices];\r
-}\r
-\r
-template MeshFaceWraps {\r
- <4885AE62-78E8-11cf-8F52-0040333594A3>\r
- DWORD nFaceWrapValues;\r
- Boolean2d faceWrapValues;\r
-}\r
-\r
-template MeshTextureCoords {\r
- <F6F23F40-7686-11cf-8F52-0040333594A3>\r
- DWORD nTextureCoords;\r
- array Coords2d textureCoords[nTextureCoords];\r
-}\r
-\r
-template MeshMaterialList {\r
- <F6F23F42-7686-11cf-8F52-0040333594A3>\r
- DWORD nMaterials;\r
- DWORD nFaceIndexes;\r
- array DWORD faceIndexes[nFaceIndexes];\r
- [Material]\r
-}\r
-\r
-template MeshNormals {\r
- <F6F23F43-7686-11cf-8F52-0040333594A3>\r
- DWORD nNormals;\r
- array Vector normals[nNormals];\r
- DWORD nFaceNormals;\r
- array MeshFace faceNormals[nFaceNormals];\r
-}\r
-\r
-template MeshVertexColors {\r
- <1630B821-7842-11cf-8F52-0040333594A3>\r
- DWORD nVertexColors;\r
- array IndexedColor vertexColors[nVertexColors];\r
-}\r
-\r
-template Mesh {\r
- <3D82AB44-62DA-11cf-AB39-0020AF71E433>\r
- DWORD nVertices;\r
- array Vector vertices[nVertices];\r
- DWORD nFaces;\r
- array MeshFace faces[nFaces];\r
- [...]\r
-}\r
-\r
-Header{\r
-1;\r
-0;\r
-1;\r
-}\r
-\r
-Mesh {\r
- 4;\r
- -0.19991;0.48344;0.00486;,\r
- 0.15807;0.48344;-0.18575;,\r
- -0.00000;0.00458;0.00486;,\r
- 0.15342;0.48809;0.19548;;\r
- \r
- 4;\r
- 3;0,1,2;,\r
- 3;2,1,3;,\r
- 3;3,0,2;,\r
- 3;1,0,3;;\r
- \r
- MeshMaterialList {\r
- 1;\r
- 4;\r
- 0,\r
- 0,\r
- 0,\r
- 0;;\r
- Material {\r
- 0.627200;0.661600;0.197600;1.000000;;\r
- 5.000000;\r
- 0.000000;0.000000;0.000000;;\r
- 0.000000;0.000000;0.000000;;\r
- }\r
- }\r
- MeshNormals {\r
- 4;\r
- -0.461200;-0.192539;-0.866154;,\r
- 0.951293;-0.307906;0.015355;,\r
- -0.463830;-0.193637;0.864504;,\r
- -0.006534;0.999903;-0.012271;;\r
- 4;\r
- 3;0,0,0;,\r
- 3;1,1,1;,\r
- 3;2,2,2;,\r
- 3;3,3,3;;\r
- }\r
- MeshTextureCoords {\r
- 4;\r
- 0.000000;0.000000;\r
- 0.000000;0.000000;\r
- 0.000000;0.000000;\r
- 0.000000;0.000000;;\r
- }\r
-}\r
+xof 0302txt 0064
+template Header {
+ <3D82AB43-62DA-11cf-AB39-0020AF71E433>
+ WORD major;
+ WORD minor;
+ DWORD flags;
+}
+
+template Vector {
+ <3D82AB5E-62DA-11cf-AB39-0020AF71E433>
+ FLOAT x;
+ FLOAT y;
+ FLOAT z;
+}
+
+template Coords2d {
+ <F6F23F44-7686-11cf-8F52-0040333594A3>
+ FLOAT u;
+ FLOAT v;
+}
+
+template Matrix4x4 {
+ <F6F23F45-7686-11cf-8F52-0040333594A3>
+ array FLOAT matrix[16];
+}
+
+template ColorRGBA {
+ <35FF44E0-6C7C-11cf-8F52-0040333594A3>
+ FLOAT red;
+ FLOAT green;
+ FLOAT blue;
+ FLOAT alpha;
+}
+
+template ColorRGB {
+ <D3E16E81-7835-11cf-8F52-0040333594A3>
+ FLOAT red;
+ FLOAT green;
+ FLOAT blue;
+}
+
+template IndexedColor {
+ <1630B820-7842-11cf-8F52-0040333594A3>
+ DWORD index;
+ ColorRGBA indexColor;
+}
+
+template Boolean {
+ <4885AE61-78E8-11cf-8F52-0040333594A3>
+ WORD truefalse;
+}
+
+template Boolean2d {
+ <4885AE63-78E8-11cf-8F52-0040333594A3>
+ Boolean u;
+ Boolean v;
+}
+
+template MaterialWrap {
+ <4885AE60-78E8-11cf-8F52-0040333594A3>
+ Boolean u;
+ Boolean v;
+}
+
+template TextureFilename {
+ <A42790E1-7810-11cf-8F52-0040333594A3>
+ STRING filename;
+}
+
+template Material {
+ <3D82AB4D-62DA-11cf-AB39-0020AF71E433>
+ ColorRGBA faceColor;
+ FLOAT power;
+ ColorRGB specularColor;
+ ColorRGB emissiveColor;
+ [...]
+}
+
+template MeshFace {
+ <3D82AB5F-62DA-11cf-AB39-0020AF71E433>
+ DWORD nFaceVertexIndices;
+ array DWORD faceVertexIndices[nFaceVertexIndices];
+}
+
+template MeshFaceWraps {
+ <4885AE62-78E8-11cf-8F52-0040333594A3>
+ DWORD nFaceWrapValues;
+ Boolean2d faceWrapValues;
+}
+
+template MeshTextureCoords {
+ <F6F23F40-7686-11cf-8F52-0040333594A3>
+ DWORD nTextureCoords;
+ array Coords2d textureCoords[nTextureCoords];
+}
+
+template MeshMaterialList {
+ <F6F23F42-7686-11cf-8F52-0040333594A3>
+ DWORD nMaterials;
+ DWORD nFaceIndexes;
+ array DWORD faceIndexes[nFaceIndexes];
+ [Material]
+}
+
+template MeshNormals {
+ <F6F23F43-7686-11cf-8F52-0040333594A3>
+ DWORD nNormals;
+ array Vector normals[nNormals];
+ DWORD nFaceNormals;
+ array MeshFace faceNormals[nFaceNormals];
+}
+
+template MeshVertexColors {
+ <1630B821-7842-11cf-8F52-0040333594A3>
+ DWORD nVertexColors;
+ array IndexedColor vertexColors[nVertexColors];
+}
+
+template Mesh {
+ <3D82AB44-62DA-11cf-AB39-0020AF71E433>
+ DWORD nVertices;
+ array Vector vertices[nVertices];
+ DWORD nFaces;
+ array MeshFace faces[nFaces];
+ [...]
+}
+
+Header{
+1;
+0;
+1;
+}
+
+Mesh {
+ 4;
+ -0.19991;0.48344;0.00486;,
+ 0.15807;0.48344;-0.18575;,
+ -0.00000;0.00458;0.00486;,
+ 0.15342;0.48809;0.19548;;
+
+ 4;
+ 3;0,1,2;,
+ 3;2,1,3;,
+ 3;3,0,2;,
+ 3;1,0,3;;
+
+ MeshMaterialList {
+ 1;
+ 4;
+ 0,
+ 0,
+ 0,
+ 0;;
+ Material {
+ 0.627200;0.661600;0.197600;1.000000;;
+ 5.000000;
+ 0.000000;0.000000;0.000000;;
+ 0.000000;0.000000;0.000000;;
+ }
+ }
+ MeshNormals {
+ 4;
+ -0.461200;-0.192539;-0.866154;,
+ 0.951293;-0.307906;0.015355;,
+ -0.463830;-0.193637;0.864504;,
+ -0.006534;0.999903;-0.012271;;
+ 4;
+ 3;0,0,0;,
+ 3;1,1,1;,
+ 3;2,2,2;,
+ 3;3,3,3;;
+ }
+ MeshTextureCoords {
+ 4;
+ 0.000000;0.000000;
+ 0.000000;0.000000;
+ 0.000000;0.000000;
+ 0.000000;0.000000;;
+ }
+}
-Metasequoia Document\r
-Format Text Ver 1.0\r
-\r
-Scene {\r
- pos 0.0000 0.0000 1500.0000\r
- lookat 0.0000 0.0000 0.0000\r
- head -0.5000\r
- pich 0.3800\r
- ortho 0\r
- zoom2 5.0000\r
- amb 0.250 0.250 0.250\r
-}\r
-Material 2 {\r
- "mat1" col(0.537 0.624 1.000 0.830) dif(0.950) amb(0.600) emi(0.000) spc(0.000) power(5.00) tex("../../image/ice.bmp")\r
- "mat2" col(0.537 0.624 1.000 0.830) dif(0.950) amb(0.600) emi(0.000) spc(0.000) power(5.00)\r
-}\r
-Object "obj1" {\r
- visible 15\r
- locking 0\r
- shading 1\r
- facet 59.5\r
- color 0.898 0.498 0.698\r
- color_type 0\r
- vertex 4 {\r
- -30.0000 100.0000 0.0000\r
- 30.0000 100.0000 0.0000\r
- -30.0000 0.0000 0.0000\r
- 30.0000 0.0000 0.0000\r
- }\r
- face 4 {\r
- 3 V(1 2 3) M(1) UV(0.01562 0.01562 0.48438 0.79688 0.01562 0.79688)\r
- 3 V(1 0 2) M(1) UV(0.01562 0.01562 0.48438 0.01562 0.48438 0.79688)\r
- 3 V(0 1 2) M(0) UV(0.01111 0.00652 0.98438 0.00470 0.00929 0.98447)\r
- 3 V(3 2 1) M(0) UV(0.98802 0.98812 0.00929 0.98447 0.98438 0.00652)\r
- }\r
-}\r
-Eof\r
+Metasequoia Document
+Format Text Ver 1.0
+
+Scene {
+ pos 0.0000 0.0000 1500.0000
+ lookat 0.0000 0.0000 0.0000
+ head -0.5000
+ pich 0.3800
+ ortho 0
+ zoom2 5.0000
+ amb 0.250 0.250 0.250
+}
+Material 2 {
+ "mat1" col(0.537 0.624 1.000 0.830) dif(0.950) amb(0.600) emi(0.000) spc(0.000) power(5.00) tex("../../image/ice.bmp")
+ "mat2" col(0.537 0.624 1.000 0.830) dif(0.950) amb(0.600) emi(0.000) spc(0.000) power(5.00)
+}
+Object "obj1" {
+ visible 15
+ locking 0
+ shading 1
+ facet 59.5
+ color 0.898 0.498 0.698
+ color_type 0
+ vertex 4 {
+ -30.0000 100.0000 0.0000
+ 30.0000 100.0000 0.0000
+ -30.0000 0.0000 0.0000
+ 30.0000 0.0000 0.0000
+ }
+ face 4 {
+ 3 V(1 2 3) M(1) UV(0.01562 0.01562 0.48438 0.79688 0.01562 0.79688)
+ 3 V(1 0 2) M(1) UV(0.01562 0.01562 0.48438 0.01562 0.48438 0.79688)
+ 3 V(0 1 2) M(0) UV(0.01111 0.00652 0.98438 0.00470 0.00929 0.98447)
+ 3 V(3 2 1) M(0) UV(0.98802 0.98812 0.00929 0.98447 0.98438 0.00652)
+ }
+}
+Eof
-xof 0302txt 0064\r
-template Header {\r
- <3D82AB43-62DA-11cf-AB39-0020AF71E433>\r
- WORD major;\r
- WORD minor;\r
- DWORD flags;\r
-}\r
-\r
-template Vector {\r
- <3D82AB5E-62DA-11cf-AB39-0020AF71E433>\r
- FLOAT x;\r
- FLOAT y;\r
- FLOAT z;\r
-}\r
-\r
-template Coords2d {\r
- <F6F23F44-7686-11cf-8F52-0040333594A3>\r
- FLOAT u;\r
- FLOAT v;\r
-}\r
-\r
-template Matrix4x4 {\r
- <F6F23F45-7686-11cf-8F52-0040333594A3>\r
- array FLOAT matrix[16];\r
-}\r
-\r
-template ColorRGBA {\r
- <35FF44E0-6C7C-11cf-8F52-0040333594A3>\r
- FLOAT red;\r
- FLOAT green;\r
- FLOAT blue;\r
- FLOAT alpha;\r
-}\r
-\r
-template ColorRGB {\r
- <D3E16E81-7835-11cf-8F52-0040333594A3>\r
- FLOAT red;\r
- FLOAT green;\r
- FLOAT blue;\r
-}\r
-\r
-template IndexedColor {\r
- <1630B820-7842-11cf-8F52-0040333594A3>\r
- DWORD index;\r
- ColorRGBA indexColor;\r
-}\r
-\r
-template Boolean {\r
- <4885AE61-78E8-11cf-8F52-0040333594A3>\r
- WORD truefalse;\r
-}\r
-\r
-template Boolean2d {\r
- <4885AE63-78E8-11cf-8F52-0040333594A3>\r
- Boolean u;\r
- Boolean v;\r
-}\r
-\r
-template MaterialWrap {\r
- <4885AE60-78E8-11cf-8F52-0040333594A3>\r
- Boolean u;\r
- Boolean v;\r
-}\r
-\r
-template TextureFilename {\r
- <A42790E1-7810-11cf-8F52-0040333594A3>\r
- STRING filename;\r
-}\r
-\r
-template Material {\r
- <3D82AB4D-62DA-11cf-AB39-0020AF71E433>\r
- ColorRGBA faceColor;\r
- FLOAT power;\r
- ColorRGB specularColor;\r
- ColorRGB emissiveColor;\r
- [...]\r
-}\r
-\r
-template MeshFace {\r
- <3D82AB5F-62DA-11cf-AB39-0020AF71E433>\r
- DWORD nFaceVertexIndices;\r
- array DWORD faceVertexIndices[nFaceVertexIndices];\r
-}\r
-\r
-template MeshFaceWraps {\r
- <4885AE62-78E8-11cf-8F52-0040333594A3>\r
- DWORD nFaceWrapValues;\r
- Boolean2d faceWrapValues;\r
-}\r
-\r
-template MeshTextureCoords {\r
- <F6F23F40-7686-11cf-8F52-0040333594A3>\r
- DWORD nTextureCoords;\r
- array Coords2d textureCoords[nTextureCoords];\r
-}\r
-\r
-template MeshMaterialList {\r
- <F6F23F42-7686-11cf-8F52-0040333594A3>\r
- DWORD nMaterials;\r
- DWORD nFaceIndexes;\r
- array DWORD faceIndexes[nFaceIndexes];\r
- [Material]\r
-}\r
-\r
-template MeshNormals {\r
- <F6F23F43-7686-11cf-8F52-0040333594A3>\r
- DWORD nNormals;\r
- array Vector normals[nNormals];\r
- DWORD nFaceNormals;\r
- array MeshFace faceNormals[nFaceNormals];\r
-}\r
-\r
-template MeshVertexColors {\r
- <1630B821-7842-11cf-8F52-0040333594A3>\r
- DWORD nVertexColors;\r
- array IndexedColor vertexColors[nVertexColors];\r
-}\r
-\r
-template Mesh {\r
- <3D82AB44-62DA-11cf-AB39-0020AF71E433>\r
- DWORD nVertices;\r
- array Vector vertices[nVertices];\r
- DWORD nFaces;\r
- array MeshFace faces[nFaces];\r
- [...]\r
-}\r
-\r
-Header{\r
-1;\r
-0;\r
-1;\r
-}\r
-\r
-Mesh {\r
- 9;\r
- 0.30000;1.00000;0.00000;,\r
- -0.30000;0.00000;0.00000;,\r
- 0.30000;0.00000;0.00000;,\r
- -0.30000;1.00000;0.00000;,\r
- -0.30000;1.00000;0.00000;,\r
- 0.30000;1.00000;0.00000;,\r
- -0.30000;0.00000;0.00000;,\r
- 0.30000;0.00000;0.00000;,\r
- 0.30000;1.00000;0.00000;;\r
- \r
- 4;\r
- 3;0,1,2;,\r
- 3;0,3,1;,\r
- 3;4,5,6;,\r
- 3;7,6,8;;\r
- \r
- MeshMaterialList {\r
- 2;\r
- 4;\r
- 1,\r
- 1,\r
- 0,\r
- 0;;\r
- Material {\r
- 0.510150;0.592800;0.950000;0.830000;;\r
- 5.000000;\r
- 0.000000;0.000000;0.000000;;\r
- 0.000000;0.000000;0.000000;;\r
- TextureFilename {\r
- "../../image/ice.bmp";\r
- }\r
- }\r
- Material {\r
- 0.510392;0.592353;0.950000;0.830000;;\r
- 5.000000;\r
- 0.000000;0.000000;0.000000;;\r
- 0.000000;0.000000;0.000000;;\r
- }\r
- }\r
- MeshNormals {\r
- 2;\r
- 0.000000;0.000000;1.000000;,\r
- 0.000000;0.000000;-1.000000;;\r
- 4;\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;1,1,1;,\r
- 3;1,1,1;;\r
- }\r
- MeshTextureCoords {\r
- 9;\r
- 0.015620;0.015620;\r
- 0.484380;0.796880;\r
- 0.015620;0.796880;\r
- 0.484380;0.015620;\r
- 0.011110;0.006520;\r
- 0.984380;0.004700;\r
- 0.009290;0.984470;\r
- 0.988020;0.988120;\r
- 0.984380;0.006520;;\r
- }\r
-}\r
+xof 0302txt 0064
+template Header {
+ <3D82AB43-62DA-11cf-AB39-0020AF71E433>
+ WORD major;
+ WORD minor;
+ DWORD flags;
+}
+
+template Vector {
+ <3D82AB5E-62DA-11cf-AB39-0020AF71E433>
+ FLOAT x;
+ FLOAT y;
+ FLOAT z;
+}
+
+template Coords2d {
+ <F6F23F44-7686-11cf-8F52-0040333594A3>
+ FLOAT u;
+ FLOAT v;
+}
+
+template Matrix4x4 {
+ <F6F23F45-7686-11cf-8F52-0040333594A3>
+ array FLOAT matrix[16];
+}
+
+template ColorRGBA {
+ <35FF44E0-6C7C-11cf-8F52-0040333594A3>
+ FLOAT red;
+ FLOAT green;
+ FLOAT blue;
+ FLOAT alpha;
+}
+
+template ColorRGB {
+ <D3E16E81-7835-11cf-8F52-0040333594A3>
+ FLOAT red;
+ FLOAT green;
+ FLOAT blue;
+}
+
+template IndexedColor {
+ <1630B820-7842-11cf-8F52-0040333594A3>
+ DWORD index;
+ ColorRGBA indexColor;
+}
+
+template Boolean {
+ <4885AE61-78E8-11cf-8F52-0040333594A3>
+ WORD truefalse;
+}
+
+template Boolean2d {
+ <4885AE63-78E8-11cf-8F52-0040333594A3>
+ Boolean u;
+ Boolean v;
+}
+
+template MaterialWrap {
+ <4885AE60-78E8-11cf-8F52-0040333594A3>
+ Boolean u;
+ Boolean v;
+}
+
+template TextureFilename {
+ <A42790E1-7810-11cf-8F52-0040333594A3>
+ STRING filename;
+}
+
+template Material {
+ <3D82AB4D-62DA-11cf-AB39-0020AF71E433>
+ ColorRGBA faceColor;
+ FLOAT power;
+ ColorRGB specularColor;
+ ColorRGB emissiveColor;
+ [...]
+}
+
+template MeshFace {
+ <3D82AB5F-62DA-11cf-AB39-0020AF71E433>
+ DWORD nFaceVertexIndices;
+ array DWORD faceVertexIndices[nFaceVertexIndices];
+}
+
+template MeshFaceWraps {
+ <4885AE62-78E8-11cf-8F52-0040333594A3>
+ DWORD nFaceWrapValues;
+ Boolean2d faceWrapValues;
+}
+
+template MeshTextureCoords {
+ <F6F23F40-7686-11cf-8F52-0040333594A3>
+ DWORD nTextureCoords;
+ array Coords2d textureCoords[nTextureCoords];
+}
+
+template MeshMaterialList {
+ <F6F23F42-7686-11cf-8F52-0040333594A3>
+ DWORD nMaterials;
+ DWORD nFaceIndexes;
+ array DWORD faceIndexes[nFaceIndexes];
+ [Material]
+}
+
+template MeshNormals {
+ <F6F23F43-7686-11cf-8F52-0040333594A3>
+ DWORD nNormals;
+ array Vector normals[nNormals];
+ DWORD nFaceNormals;
+ array MeshFace faceNormals[nFaceNormals];
+}
+
+template MeshVertexColors {
+ <1630B821-7842-11cf-8F52-0040333594A3>
+ DWORD nVertexColors;
+ array IndexedColor vertexColors[nVertexColors];
+}
+
+template Mesh {
+ <3D82AB44-62DA-11cf-AB39-0020AF71E433>
+ DWORD nVertices;
+ array Vector vertices[nVertices];
+ DWORD nFaces;
+ array MeshFace faces[nFaces];
+ [...]
+}
+
+Header{
+1;
+0;
+1;
+}
+
+Mesh {
+ 9;
+ 0.30000;1.00000;0.00000;,
+ -0.30000;0.00000;0.00000;,
+ 0.30000;0.00000;0.00000;,
+ -0.30000;1.00000;0.00000;,
+ -0.30000;1.00000;0.00000;,
+ 0.30000;1.00000;0.00000;,
+ -0.30000;0.00000;0.00000;,
+ 0.30000;0.00000;0.00000;,
+ 0.30000;1.00000;0.00000;;
+
+ 4;
+ 3;0,1,2;,
+ 3;0,3,1;,
+ 3;4,5,6;,
+ 3;7,6,8;;
+
+ MeshMaterialList {
+ 2;
+ 4;
+ 1,
+ 1,
+ 0,
+ 0;;
+ Material {
+ 0.510150;0.592800;0.950000;0.830000;;
+ 5.000000;
+ 0.000000;0.000000;0.000000;;
+ 0.000000;0.000000;0.000000;;
+ TextureFilename {
+ "../../image/ice.bmp";
+ }
+ }
+ Material {
+ 0.510392;0.592353;0.950000;0.830000;;
+ 5.000000;
+ 0.000000;0.000000;0.000000;;
+ 0.000000;0.000000;0.000000;;
+ }
+ }
+ MeshNormals {
+ 2;
+ 0.000000;0.000000;1.000000;,
+ 0.000000;0.000000;-1.000000;;
+ 4;
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;1,1,1;,
+ 3;1,1,1;;
+ }
+ MeshTextureCoords {
+ 9;
+ 0.015620;0.015620;
+ 0.484380;0.796880;
+ 0.015620;0.796880;
+ 0.484380;0.015620;
+ 0.011110;0.006520;
+ 0.984380;0.004700;
+ 0.009290;0.984470;
+ 0.988020;0.988120;
+ 0.984380;0.006520;;
+ }
+}
-xof 0302txt 0064\r
-template Header {\r
- <3D82AB43-62DA-11cf-AB39-0020AF71E433>\r
- WORD major;\r
- WORD minor;\r
- DWORD flags;\r
-}\r
-\r
-template Vector {\r
- <3D82AB5E-62DA-11cf-AB39-0020AF71E433>\r
- FLOAT x;\r
- FLOAT y;\r
- FLOAT z;\r
-}\r
-\r
-template Coords2d {\r
- <F6F23F44-7686-11cf-8F52-0040333594A3>\r
- FLOAT u;\r
- FLOAT v;\r
-}\r
-\r
-template Matrix4x4 {\r
- <F6F23F45-7686-11cf-8F52-0040333594A3>\r
- array FLOAT matrix[16];\r
-}\r
-\r
-template ColorRGBA {\r
- <35FF44E0-6C7C-11cf-8F52-0040333594A3>\r
- FLOAT red;\r
- FLOAT green;\r
- FLOAT blue;\r
- FLOAT alpha;\r
-}\r
-\r
-template ColorRGB {\r
- <D3E16E81-7835-11cf-8F52-0040333594A3>\r
- FLOAT red;\r
- FLOAT green;\r
- FLOAT blue;\r
-}\r
-\r
-template IndexedColor {\r
- <1630B820-7842-11cf-8F52-0040333594A3>\r
- DWORD index;\r
- ColorRGBA indexColor;\r
-}\r
-\r
-template Boolean {\r
- <4885AE61-78E8-11cf-8F52-0040333594A3>\r
- WORD truefalse;\r
-}\r
-\r
-template Boolean2d {\r
- <4885AE63-78E8-11cf-8F52-0040333594A3>\r
- Boolean u;\r
- Boolean v;\r
-}\r
-\r
-template MaterialWrap {\r
- <4885AE60-78E8-11cf-8F52-0040333594A3>\r
- Boolean u;\r
- Boolean v;\r
-}\r
-\r
-template TextureFilename {\r
- <A42790E1-7810-11cf-8F52-0040333594A3>\r
- STRING filename;\r
-}\r
-\r
-template Material {\r
- <3D82AB4D-62DA-11cf-AB39-0020AF71E433>\r
- ColorRGBA faceColor;\r
- FLOAT power;\r
- ColorRGB specularColor;\r
- ColorRGB emissiveColor;\r
- [...]\r
-}\r
-\r
-template MeshFace {\r
- <3D82AB5F-62DA-11cf-AB39-0020AF71E433>\r
- DWORD nFaceVertexIndices;\r
- array DWORD faceVertexIndices[nFaceVertexIndices];\r
-}\r
-\r
-template MeshFaceWraps {\r
- <4885AE62-78E8-11cf-8F52-0040333594A3>\r
- DWORD nFaceWrapValues;\r
- Boolean2d faceWrapValues;\r
-}\r
-\r
-template MeshTextureCoords {\r
- <F6F23F40-7686-11cf-8F52-0040333594A3>\r
- DWORD nTextureCoords;\r
- array Coords2d textureCoords[nTextureCoords];\r
-}\r
-\r
-template MeshMaterialList {\r
- <F6F23F42-7686-11cf-8F52-0040333594A3>\r
- DWORD nMaterials;\r
- DWORD nFaceIndexes;\r
- array DWORD faceIndexes[nFaceIndexes];\r
- [Material]\r
-}\r
-\r
-template MeshNormals {\r
- <F6F23F43-7686-11cf-8F52-0040333594A3>\r
- DWORD nNormals;\r
- array Vector normals[nNormals];\r
- DWORD nFaceNormals;\r
- array MeshFace faceNormals[nFaceNormals];\r
-}\r
-\r
-template MeshVertexColors {\r
- <1630B821-7842-11cf-8F52-0040333594A3>\r
- DWORD nVertexColors;\r
- array IndexedColor vertexColors[nVertexColors];\r
-}\r
-\r
-template Mesh {\r
- <3D82AB44-62DA-11cf-AB39-0020AF71E433>\r
- DWORD nVertices;\r
- array Vector vertices[nVertices];\r
- DWORD nFaces;\r
- array MeshFace faces[nFaces];\r
- [...]\r
-}\r
-\r
-Header{\r
-1;\r
-0;\r
-1;\r
-}\r
-\r
-Mesh {\r
- 8;\r
- -0.50000;0.50000;0.50000;,\r
- 0.50000;0.50000;0.50000;,\r
- 0.50000;0.50000;-0.50000;,\r
- -0.50000;0.50000;-0.50000;,\r
- 0.50000;-0.50000;-0.50000;,\r
- -0.50000;-0.50000;-0.50000;,\r
- 0.50000;-0.50000;0.50000;,\r
- -0.50000;-0.50000;0.50000;;\r
- \r
- 6;\r
- 4;0,1,2,3;,\r
- 4;3,2,4,5;,\r
- 4;5,4,6,7;,\r
- 4;7,6,1,0;,\r
- 4;1,6,4,2;,\r
- 4;7,0,3,5;;\r
- \r
- MeshMaterialList {\r
- 1;\r
- 6;\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0;;\r
- Material {\r
- 1.000000;1.000000;1.000000;1.000000;;\r
- 0.000000;\r
- 0.000000;0.000000;0.000000;;\r
- 0.000000;0.000000;0.000000;;\r
- }\r
- }\r
- MeshNormals {\r
- 6;\r
- 0.000000;1.000000;0.000000;,\r
- 0.000000;0.000000;-1.000000;,\r
- 0.000000;-1.000000;-0.000000;,\r
- 0.000000;0.000000;1.000000;,\r
- 1.000000;0.000000;0.000000;,\r
- -1.000000;0.000000;0.000000;;\r
- 6;\r
- 4;0,0,0,0;,\r
- 4;1,1,1,1;,\r
- 4;2,2,2,2;,\r
- 4;3,3,3,3;,\r
- 4;4,4,4,4;,\r
- 4;5,5,5,5;;\r
- }\r
-}\r
+xof 0302txt 0064
+template Header {
+ <3D82AB43-62DA-11cf-AB39-0020AF71E433>
+ WORD major;
+ WORD minor;
+ DWORD flags;
+}
+
+template Vector {
+ <3D82AB5E-62DA-11cf-AB39-0020AF71E433>
+ FLOAT x;
+ FLOAT y;
+ FLOAT z;
+}
+
+template Coords2d {
+ <F6F23F44-7686-11cf-8F52-0040333594A3>
+ FLOAT u;
+ FLOAT v;
+}
+
+template Matrix4x4 {
+ <F6F23F45-7686-11cf-8F52-0040333594A3>
+ array FLOAT matrix[16];
+}
+
+template ColorRGBA {
+ <35FF44E0-6C7C-11cf-8F52-0040333594A3>
+ FLOAT red;
+ FLOAT green;
+ FLOAT blue;
+ FLOAT alpha;
+}
+
+template ColorRGB {
+ <D3E16E81-7835-11cf-8F52-0040333594A3>
+ FLOAT red;
+ FLOAT green;
+ FLOAT blue;
+}
+
+template IndexedColor {
+ <1630B820-7842-11cf-8F52-0040333594A3>
+ DWORD index;
+ ColorRGBA indexColor;
+}
+
+template Boolean {
+ <4885AE61-78E8-11cf-8F52-0040333594A3>
+ WORD truefalse;
+}
+
+template Boolean2d {
+ <4885AE63-78E8-11cf-8F52-0040333594A3>
+ Boolean u;
+ Boolean v;
+}
+
+template MaterialWrap {
+ <4885AE60-78E8-11cf-8F52-0040333594A3>
+ Boolean u;
+ Boolean v;
+}
+
+template TextureFilename {
+ <A42790E1-7810-11cf-8F52-0040333594A3>
+ STRING filename;
+}
+
+template Material {
+ <3D82AB4D-62DA-11cf-AB39-0020AF71E433>
+ ColorRGBA faceColor;
+ FLOAT power;
+ ColorRGB specularColor;
+ ColorRGB emissiveColor;
+ [...]
+}
+
+template MeshFace {
+ <3D82AB5F-62DA-11cf-AB39-0020AF71E433>
+ DWORD nFaceVertexIndices;
+ array DWORD faceVertexIndices[nFaceVertexIndices];
+}
+
+template MeshFaceWraps {
+ <4885AE62-78E8-11cf-8F52-0040333594A3>
+ DWORD nFaceWrapValues;
+ Boolean2d faceWrapValues;
+}
+
+template MeshTextureCoords {
+ <F6F23F40-7686-11cf-8F52-0040333594A3>
+ DWORD nTextureCoords;
+ array Coords2d textureCoords[nTextureCoords];
+}
+
+template MeshMaterialList {
+ <F6F23F42-7686-11cf-8F52-0040333594A3>
+ DWORD nMaterials;
+ DWORD nFaceIndexes;
+ array DWORD faceIndexes[nFaceIndexes];
+ [Material]
+}
+
+template MeshNormals {
+ <F6F23F43-7686-11cf-8F52-0040333594A3>
+ DWORD nNormals;
+ array Vector normals[nNormals];
+ DWORD nFaceNormals;
+ array MeshFace faceNormals[nFaceNormals];
+}
+
+template MeshVertexColors {
+ <1630B821-7842-11cf-8F52-0040333594A3>
+ DWORD nVertexColors;
+ array IndexedColor vertexColors[nVertexColors];
+}
+
+template Mesh {
+ <3D82AB44-62DA-11cf-AB39-0020AF71E433>
+ DWORD nVertices;
+ array Vector vertices[nVertices];
+ DWORD nFaces;
+ array MeshFace faces[nFaces];
+ [...]
+}
+
+Header{
+1;
+0;
+1;
+}
+
+Mesh {
+ 8;
+ -0.50000;0.50000;0.50000;,
+ 0.50000;0.50000;0.50000;,
+ 0.50000;0.50000;-0.50000;,
+ -0.50000;0.50000;-0.50000;,
+ 0.50000;-0.50000;-0.50000;,
+ -0.50000;-0.50000;-0.50000;,
+ 0.50000;-0.50000;0.50000;,
+ -0.50000;-0.50000;0.50000;;
+
+ 6;
+ 4;0,1,2,3;,
+ 4;3,2,4,5;,
+ 4;5,4,6,7;,
+ 4;7,6,1,0;,
+ 4;1,6,4,2;,
+ 4;7,0,3,5;;
+
+ MeshMaterialList {
+ 1;
+ 6;
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0;;
+ Material {
+ 1.000000;1.000000;1.000000;1.000000;;
+ 0.000000;
+ 0.000000;0.000000;0.000000;;
+ 0.000000;0.000000;0.000000;;
+ }
+ }
+ MeshNormals {
+ 6;
+ 0.000000;1.000000;0.000000;,
+ 0.000000;0.000000;-1.000000;,
+ 0.000000;-1.000000;-0.000000;,
+ 0.000000;0.000000;1.000000;,
+ 1.000000;0.000000;0.000000;,
+ -1.000000;0.000000;0.000000;;
+ 6;
+ 4;0,0,0,0;,
+ 4;1,1,1,1;,
+ 4;2,2,2,2;,
+ 4;3,3,3,3;,
+ 4;4,4,4,4;,
+ 4;5,5,5,5;;
+ }
+}
-Metasequoia Document\r
-Format Text Ver 1.0\r
-\r
-Scene {\r
- pos 0.0000 0.0000 1500.0000\r
- lookat 0.0000 0.0000 0.0000\r
- head -0.0908\r
- pich 0.3800\r
- ortho 1\r
- zoom2 23.4639\r
- amb 0.250 0.250 0.250\r
-}\r
-Material 1 {\r
- "mat1" col(1.000 1.000 1.000 1.000) dif(0.800) amb(0.600) emi(0.000) spc(0.000) power(5.00) tex("floor.jpg")\r
-}\r
-Object "obj1" {\r
- visible 15\r
- locking 0\r
- shading 1\r
- facet 59.5\r
- color 0.898 0.498 0.698\r
- color_type 0\r
- vertex 20 {\r
- -99.7812 0.6563 -25.8426\r
- -49.4529 0.6563 -25.8426\r
- -49.8906 0.6563 24.4855\r
- -99.7812 0.6563 24.4855\r
- -49.8906 0.6563 74.8137\r
- 0.0000 0.6563 75.6890\r
- 0.0000 0.6563 24.9231\r
- 0.4376 0.6563 -24.5297\r
- -98.9059 0.6563 74.8137\r
- -99.7812 0.6563 -76.1709\r
- -49.4529 0.6563 -75.2956\r
- 0.4376 0.6563 -76.6085\r
- 50.5471 0.6563 -25.8426\r
- 50.1094 0.6563 24.4855\r
- 50.1094 0.6563 74.8137\r
- 100.0000 0.6563 75.6890\r
- 100.0000 0.6563 24.9231\r
- 100.4376 0.6563 -24.5297\r
- 50.5471 0.6563 -75.2956\r
- 100.4376 0.6563 -76.6085\r
- }\r
- face 24 {\r
- 3 V(0 1 2) M(0) UV(0.00897 0.01561 0.98737 0.01094 0.99303 0.99765)\r
- 3 V(2 3 0) M(0) UV(0.99318 0.99615 0.01105 0.99100 0.01023 0.01499)\r
- 3 V(5 4 2) M(0) UV(0.99174 0.99034 0.00574 0.99496 0.00516 0.00918)\r
- 3 V(2 6 5) M(0) UV(0.00177 0.01667 0.99211 0.01789 0.99840 0.99264)\r
- 3 V(2 7 6) M(0) UV(0.00882 0.99562 0.99245 0.01205 0.99312 0.99379)\r
- 3 V(2 1 7) M(0) UV(0.01069 0.99287 0.00842 0.02115 0.99218 0.00984)\r
- 3 V(3 2 4) M(0) UV(0.01142 0.01572 0.98569 0.01194 0.99195 0.99447)\r
- 3 V(4 8 3) M(0) UV(0.99331 0.99514 0.01249 0.99533 0.00805 0.01833)\r
- 3 V(1 0 9) M(0) UV(0.99487 0.99515 0.01258 0.99274 0.00966 0.01313)\r
- 3 V(9 10 1) M(0) UV(0.00966 0.01313 0.98680 0.01125 0.99579 0.99602)\r
- 3 V(10 11 7) M(0) UV(0.00312 0.01289 0.99147 0.01446 0.99352 0.99812)\r
- 3 V(7 1 10) M(0) UV(0.99658 0.99694 0.01000 0.99347 0.01085 0.00845)\r
- 3 V(7 12 13) M(0) UV(0.01097 0.01872 0.98923 0.01342 0.99237 0.99405)\r
- 3 V(13 6 7) M(0) UV(0.98885 0.99569 0.00674 0.99088 0.00858 0.01165)\r
- 3 V(15 14 13) M(0) UV(0.98638 0.98910 0.00811 0.99347 0.01324 0.00680)\r
- 3 V(13 16 15) M(0) UV(0.00882 0.00984 0.98767 0.00640 0.99369 0.98860)\r
- 3 V(13 17 16) M(0) UV(0.00903 0.99562 0.98855 0.01205 0.98923 0.99242)\r
- 3 V(13 12 17) M(0) UV(0.00853 0.99039 0.00560 0.01090 0.98830 0.00775)\r
- 3 V(6 13 14) M(0) UV(0.00498 0.01636 0.99142 0.00858 0.99471 0.99061)\r
- 3 V(14 5 6) M(0) UV(0.98866 0.98831 0.00930 0.99461 0.00690 0.01223)\r
- 3 V(12 7 11) M(0) UV(0.99222 0.98891 0.00900 0.99315 0.00683 0.01282)\r
- 3 V(11 18 12) M(0) UV(0.00750 0.01527 0.99506 0.01786 0.99610 0.99307)\r
- 3 V(18 19 17) M(0) UV(0.00818 0.01373 0.99445 0.01513 0.99442 0.99776)\r
- 3 V(17 12 18) M(0) UV(0.98848 0.98921 0.01705 0.98936 0.00713 0.01391)\r
- }\r
-}\r
-Eof\r
+Metasequoia Document
+Format Text Ver 1.0
+
+Scene {
+ pos 0.0000 0.0000 1500.0000
+ lookat 0.0000 0.0000 0.0000
+ head -0.0908
+ pich 0.3800
+ ortho 1
+ zoom2 23.4639
+ amb 0.250 0.250 0.250
+}
+Material 1 {
+ "mat1" col(1.000 1.000 1.000 1.000) dif(0.800) amb(0.600) emi(0.000) spc(0.000) power(5.00) tex("floor.jpg")
+}
+Object "obj1" {
+ visible 15
+ locking 0
+ shading 1
+ facet 59.5
+ color 0.898 0.498 0.698
+ color_type 0
+ vertex 20 {
+ -99.7812 0.6563 -25.8426
+ -49.4529 0.6563 -25.8426
+ -49.8906 0.6563 24.4855
+ -99.7812 0.6563 24.4855
+ -49.8906 0.6563 74.8137
+ 0.0000 0.6563 75.6890
+ 0.0000 0.6563 24.9231
+ 0.4376 0.6563 -24.5297
+ -98.9059 0.6563 74.8137
+ -99.7812 0.6563 -76.1709
+ -49.4529 0.6563 -75.2956
+ 0.4376 0.6563 -76.6085
+ 50.5471 0.6563 -25.8426
+ 50.1094 0.6563 24.4855
+ 50.1094 0.6563 74.8137
+ 100.0000 0.6563 75.6890
+ 100.0000 0.6563 24.9231
+ 100.4376 0.6563 -24.5297
+ 50.5471 0.6563 -75.2956
+ 100.4376 0.6563 -76.6085
+ }
+ face 24 {
+ 3 V(0 1 2) M(0) UV(0.00897 0.01561 0.98737 0.01094 0.99303 0.99765)
+ 3 V(2 3 0) M(0) UV(0.99318 0.99615 0.01105 0.99100 0.01023 0.01499)
+ 3 V(5 4 2) M(0) UV(0.99174 0.99034 0.00574 0.99496 0.00516 0.00918)
+ 3 V(2 6 5) M(0) UV(0.00177 0.01667 0.99211 0.01789 0.99840 0.99264)
+ 3 V(2 7 6) M(0) UV(0.00882 0.99562 0.99245 0.01205 0.99312 0.99379)
+ 3 V(2 1 7) M(0) UV(0.01069 0.99287 0.00842 0.02115 0.99218 0.00984)
+ 3 V(3 2 4) M(0) UV(0.01142 0.01572 0.98569 0.01194 0.99195 0.99447)
+ 3 V(4 8 3) M(0) UV(0.99331 0.99514 0.01249 0.99533 0.00805 0.01833)
+ 3 V(1 0 9) M(0) UV(0.99487 0.99515 0.01258 0.99274 0.00966 0.01313)
+ 3 V(9 10 1) M(0) UV(0.00966 0.01313 0.98680 0.01125 0.99579 0.99602)
+ 3 V(10 11 7) M(0) UV(0.00312 0.01289 0.99147 0.01446 0.99352 0.99812)
+ 3 V(7 1 10) M(0) UV(0.99658 0.99694 0.01000 0.99347 0.01085 0.00845)
+ 3 V(7 12 13) M(0) UV(0.01097 0.01872 0.98923 0.01342 0.99237 0.99405)
+ 3 V(13 6 7) M(0) UV(0.98885 0.99569 0.00674 0.99088 0.00858 0.01165)
+ 3 V(15 14 13) M(0) UV(0.98638 0.98910 0.00811 0.99347 0.01324 0.00680)
+ 3 V(13 16 15) M(0) UV(0.00882 0.00984 0.98767 0.00640 0.99369 0.98860)
+ 3 V(13 17 16) M(0) UV(0.00903 0.99562 0.98855 0.01205 0.98923 0.99242)
+ 3 V(13 12 17) M(0) UV(0.00853 0.99039 0.00560 0.01090 0.98830 0.00775)
+ 3 V(6 13 14) M(0) UV(0.00498 0.01636 0.99142 0.00858 0.99471 0.99061)
+ 3 V(14 5 6) M(0) UV(0.98866 0.98831 0.00930 0.99461 0.00690 0.01223)
+ 3 V(12 7 11) M(0) UV(0.99222 0.98891 0.00900 0.99315 0.00683 0.01282)
+ 3 V(11 18 12) M(0) UV(0.00750 0.01527 0.99506 0.01786 0.99610 0.99307)
+ 3 V(18 19 17) M(0) UV(0.00818 0.01373 0.99445 0.01513 0.99442 0.99776)
+ 3 V(17 12 18) M(0) UV(0.98848 0.98921 0.01705 0.98936 0.00713 0.01391)
+ }
+}
+Eof
-xof 0302txt 0064\r
-template Header {\r
- <3D82AB43-62DA-11cf-AB39-0020AF71E433>\r
- WORD major;\r
- WORD minor;\r
- DWORD flags;\r
-}\r
-\r
-template Vector {\r
- <3D82AB5E-62DA-11cf-AB39-0020AF71E433>\r
- FLOAT x;\r
- FLOAT y;\r
- FLOAT z;\r
-}\r
-\r
-template Coords2d {\r
- <F6F23F44-7686-11cf-8F52-0040333594A3>\r
- FLOAT u;\r
- FLOAT v;\r
-}\r
-\r
-template Matrix4x4 {\r
- <F6F23F45-7686-11cf-8F52-0040333594A3>\r
- array FLOAT matrix[16];\r
-}\r
-\r
-template ColorRGBA {\r
- <35FF44E0-6C7C-11cf-8F52-0040333594A3>\r
- FLOAT red;\r
- FLOAT green;\r
- FLOAT blue;\r
- FLOAT alpha;\r
-}\r
-\r
-template ColorRGB {\r
- <D3E16E81-7835-11cf-8F52-0040333594A3>\r
- FLOAT red;\r
- FLOAT green;\r
- FLOAT blue;\r
-}\r
-\r
-template IndexedColor {\r
- <1630B820-7842-11cf-8F52-0040333594A3>\r
- DWORD index;\r
- ColorRGBA indexColor;\r
-}\r
-\r
-template Boolean {\r
- <4885AE61-78E8-11cf-8F52-0040333594A3>\r
- WORD truefalse;\r
-}\r
-\r
-template Boolean2d {\r
- <4885AE63-78E8-11cf-8F52-0040333594A3>\r
- Boolean u;\r
- Boolean v;\r
-}\r
-\r
-template MaterialWrap {\r
- <4885AE60-78E8-11cf-8F52-0040333594A3>\r
- Boolean u;\r
- Boolean v;\r
-}\r
-\r
-template TextureFilename {\r
- <A42790E1-7810-11cf-8F52-0040333594A3>\r
- STRING filename;\r
-}\r
-\r
-template Material {\r
- <3D82AB4D-62DA-11cf-AB39-0020AF71E433>\r
- ColorRGBA faceColor;\r
- FLOAT power;\r
- ColorRGB specularColor;\r
- ColorRGB emissiveColor;\r
- [...]\r
-}\r
-\r
-template MeshFace {\r
- <3D82AB5F-62DA-11cf-AB39-0020AF71E433>\r
- DWORD nFaceVertexIndices;\r
- array DWORD faceVertexIndices[nFaceVertexIndices];\r
-}\r
-\r
-template MeshFaceWraps {\r
- <4885AE62-78E8-11cf-8F52-0040333594A3>\r
- DWORD nFaceWrapValues;\r
- Boolean2d faceWrapValues;\r
-}\r
-\r
-template MeshTextureCoords {\r
- <F6F23F40-7686-11cf-8F52-0040333594A3>\r
- DWORD nTextureCoords;\r
- array Coords2d textureCoords[nTextureCoords];\r
-}\r
-\r
-template MeshMaterialList {\r
- <F6F23F42-7686-11cf-8F52-0040333594A3>\r
- DWORD nMaterials;\r
- DWORD nFaceIndexes;\r
- array DWORD faceIndexes[nFaceIndexes];\r
- [Material]\r
-}\r
-\r
-template MeshNormals {\r
- <F6F23F43-7686-11cf-8F52-0040333594A3>\r
- DWORD nNormals;\r
- array Vector normals[nNormals];\r
- DWORD nFaceNormals;\r
- array MeshFace faceNormals[nFaceNormals];\r
-}\r
-\r
-template MeshVertexColors {\r
- <1630B821-7842-11cf-8F52-0040333594A3>\r
- DWORD nVertexColors;\r
- array IndexedColor vertexColors[nVertexColors];\r
-}\r
-\r
-template Mesh {\r
- <3D82AB44-62DA-11cf-AB39-0020AF71E433>\r
- DWORD nVertices;\r
- array Vector vertices[nVertices];\r
- DWORD nFaces;\r
- array MeshFace faces[nFaces];\r
- [...]\r
-}\r
-\r
-Header{\r
-1;\r
-0;\r
-1;\r
-}\r
-\r
-Mesh {\r
- 71;\r
- -0.99781;0.00656;0.25843;,\r
- -0.49453;0.00656;0.25843;,\r
- -0.49891;0.00656;-0.24486;,\r
- -0.49891;0.00656;-0.24486;,\r
- -0.99781;0.00656;-0.24486;,\r
- -0.99781;0.00656;0.25843;,\r
- 0.00000;0.00656;-0.75689;,\r
- -0.49891;0.00656;-0.74814;,\r
- -0.49891;0.00656;-0.24486;,\r
- -0.49891;0.00656;-0.24486;,\r
- 0.00000;0.00656;-0.24923;,\r
- 0.00000;0.00656;-0.75689;,\r
- -0.49891;0.00656;-0.24486;,\r
- 0.00438;0.00656;0.24530;,\r
- 0.00000;0.00656;-0.24923;,\r
- -0.49891;0.00656;-0.24486;,\r
- -0.49453;0.00656;0.25843;,\r
- 0.00438;0.00656;0.24530;,\r
- -0.99781;0.00656;-0.24486;,\r
- -0.49891;0.00656;-0.24486;,\r
- -0.49891;0.00656;-0.74814;,\r
- -0.49891;0.00656;-0.74814;,\r
- -0.98906;0.00656;-0.74814;,\r
- -0.99781;0.00656;-0.24486;,\r
- -0.49453;0.00656;0.25843;,\r
- -0.99781;0.00656;0.25843;,\r
- -0.99781;0.00656;0.76171;,\r
- -0.49453;0.00656;0.75296;,\r
- -0.49453;0.00656;0.25843;,\r
- -0.49453;0.00656;0.75296;,\r
- 0.00438;0.00656;0.76608;,\r
- 0.00438;0.00656;0.24530;,\r
- 0.00438;0.00656;0.24530;,\r
- -0.49453;0.00656;0.25843;,\r
- -0.49453;0.00656;0.75296;,\r
- 0.00438;0.00656;0.24530;,\r
- 0.50547;0.00656;0.25843;,\r
- 0.50109;0.00656;-0.24486;,\r
- 0.50109;0.00656;-0.24486;,\r
- 0.00000;0.00656;-0.24923;,\r
- 0.00438;0.00656;0.24530;,\r
- 1.00000;0.00656;-0.75689;,\r
- 0.50109;0.00656;-0.74814;,\r
- 0.50109;0.00656;-0.24486;,\r
- 0.50109;0.00656;-0.24486;,\r
- 1.00000;0.00656;-0.24923;,\r
- 1.00000;0.00656;-0.75689;,\r
- 0.50109;0.00656;-0.24486;,\r
- 1.00438;0.00656;0.24530;,\r
- 1.00000;0.00656;-0.24923;,\r
- 0.50109;0.00656;-0.24486;,\r
- 0.50547;0.00656;0.25843;,\r
- 1.00438;0.00656;0.24530;,\r
- 0.00000;0.00656;-0.24923;,\r
- 0.50109;0.00656;-0.24486;,\r
- 0.50109;0.00656;-0.74814;,\r
- 0.50109;0.00656;-0.74814;,\r
- 0.00000;0.00656;-0.75689;,\r
- 0.00000;0.00656;-0.24923;,\r
- 0.50547;0.00656;0.25843;,\r
- 0.00438;0.00656;0.24530;,\r
- 0.00438;0.00656;0.76608;,\r
- 0.00438;0.00656;0.76608;,\r
- 0.50547;0.00656;0.75296;,\r
- 0.50547;0.00656;0.25843;,\r
- 0.50547;0.00656;0.75296;,\r
- 1.00438;0.00656;0.76608;,\r
- 1.00438;0.00656;0.24530;,\r
- 1.00438;0.00656;0.24530;,\r
- 0.50547;0.00656;0.25843;,\r
- 0.50547;0.00656;0.75296;;\r
- \r
- 24;\r
- 3;0,1,2;,\r
- 3;3,4,5;,\r
- 3;6,7,8;,\r
- 3;9,10,11;,\r
- 3;12,13,14;,\r
- 3;15,16,17;,\r
- 3;18,19,20;,\r
- 3;21,22,23;,\r
- 3;24,25,26;,\r
- 3;26,27,28;,\r
- 3;29,30,31;,\r
- 3;32,33,34;,\r
- 3;35,36,37;,\r
- 3;38,39,40;,\r
- 3;41,42,43;,\r
- 3;44,45,46;,\r
- 3;47,48,49;,\r
- 3;50,51,52;,\r
- 3;53,54,55;,\r
- 3;56,57,58;,\r
- 3;59,60,61;,\r
- 3;62,63,64;,\r
- 3;65,66,67;,\r
- 3;68,69,70;;\r
- \r
- MeshMaterialList {\r
- 1;\r
- 24;\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0;;\r
- Material {\r
- 0.800000;0.800000;0.800000;1.000000;;\r
- 5.000000;\r
- 0.000000;0.000000;0.000000;;\r
- 0.000000;0.000000;0.000000;;\r
- TextureFilename {\r
- "floor.jpg";\r
- }\r
- }\r
- }\r
- MeshNormals {\r
- 1;\r
- 0.000000;1.000000;0.000000;;\r
- 24;\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;,\r
- 3;0,0,0;;\r
- }\r
- MeshTextureCoords {\r
- 71;\r
- 0.008970;0.015610;\r
- 0.987370;0.010940;\r
- 0.993030;0.997650;\r
- 0.993180;0.996150;\r
- 0.011050;0.991000;\r
- 0.010230;0.014990;\r
- 0.991740;0.990340;\r
- 0.005740;0.994960;\r
- 0.005160;0.009180;\r
- 0.001770;0.016670;\r
- 0.992110;0.017890;\r
- 0.998400;0.992640;\r
- 0.008820;0.995620;\r
- 0.992450;0.012050;\r
- 0.993120;0.993790;\r
- 0.010690;0.992870;\r
- 0.008420;0.021150;\r
- 0.992180;0.009840;\r
- 0.011420;0.015720;\r
- 0.985690;0.011940;\r
- 0.991950;0.994470;\r
- 0.993310;0.995140;\r
- 0.012490;0.995330;\r
- 0.008050;0.018330;\r
- 0.994870;0.995150;\r
- 0.012580;0.992740;\r
- 0.009660;0.013130;\r
- 0.986800;0.011250;\r
- 0.995790;0.996020;\r
- 0.003120;0.012890;\r
- 0.991470;0.014460;\r
- 0.993520;0.998120;\r
- 0.996580;0.996940;\r
- 0.010000;0.993470;\r
- 0.010850;0.008450;\r
- 0.010970;0.018720;\r
- 0.989230;0.013420;\r
- 0.992370;0.994050;\r
- 0.988850;0.995690;\r
- 0.006740;0.990880;\r
- 0.008580;0.011650;\r
- 0.986380;0.989100;\r
- 0.008110;0.993470;\r
- 0.013240;0.006800;\r
- 0.008820;0.009840;\r
- 0.987670;0.006400;\r
- 0.993690;0.988600;\r
- 0.009030;0.995620;\r
- 0.988550;0.012050;\r
- 0.989230;0.992420;\r
- 0.008530;0.990390;\r
- 0.005600;0.010900;\r
- 0.988300;0.007750;\r
- 0.004980;0.016360;\r
- 0.991420;0.008580;\r
- 0.994710;0.990610;\r
- 0.988660;0.988310;\r
- 0.009300;0.994610;\r
- 0.006900;0.012230;\r
- 0.992220;0.988910;\r
- 0.009000;0.993150;\r
- 0.006830;0.012820;\r
- 0.007500;0.015270;\r
- 0.995060;0.017860;\r
- 0.996100;0.993070;\r
- 0.008180;0.013730;\r
- 0.994450;0.015130;\r
- 0.994420;0.997760;\r
- 0.988480;0.989210;\r
- 0.017050;0.989360;\r
- 0.007130;0.013910;;\r
- }\r
-}\r
+xof 0302txt 0064
+template Header {
+ <3D82AB43-62DA-11cf-AB39-0020AF71E433>
+ WORD major;
+ WORD minor;
+ DWORD flags;
+}
+
+template Vector {
+ <3D82AB5E-62DA-11cf-AB39-0020AF71E433>
+ FLOAT x;
+ FLOAT y;
+ FLOAT z;
+}
+
+template Coords2d {
+ <F6F23F44-7686-11cf-8F52-0040333594A3>
+ FLOAT u;
+ FLOAT v;
+}
+
+template Matrix4x4 {
+ <F6F23F45-7686-11cf-8F52-0040333594A3>
+ array FLOAT matrix[16];
+}
+
+template ColorRGBA {
+ <35FF44E0-6C7C-11cf-8F52-0040333594A3>
+ FLOAT red;
+ FLOAT green;
+ FLOAT blue;
+ FLOAT alpha;
+}
+
+template ColorRGB {
+ <D3E16E81-7835-11cf-8F52-0040333594A3>
+ FLOAT red;
+ FLOAT green;
+ FLOAT blue;
+}
+
+template IndexedColor {
+ <1630B820-7842-11cf-8F52-0040333594A3>
+ DWORD index;
+ ColorRGBA indexColor;
+}
+
+template Boolean {
+ <4885AE61-78E8-11cf-8F52-0040333594A3>
+ WORD truefalse;
+}
+
+template Boolean2d {
+ <4885AE63-78E8-11cf-8F52-0040333594A3>
+ Boolean u;
+ Boolean v;
+}
+
+template MaterialWrap {
+ <4885AE60-78E8-11cf-8F52-0040333594A3>
+ Boolean u;
+ Boolean v;
+}
+
+template TextureFilename {
+ <A42790E1-7810-11cf-8F52-0040333594A3>
+ STRING filename;
+}
+
+template Material {
+ <3D82AB4D-62DA-11cf-AB39-0020AF71E433>
+ ColorRGBA faceColor;
+ FLOAT power;
+ ColorRGB specularColor;
+ ColorRGB emissiveColor;
+ [...]
+}
+
+template MeshFace {
+ <3D82AB5F-62DA-11cf-AB39-0020AF71E433>
+ DWORD nFaceVertexIndices;
+ array DWORD faceVertexIndices[nFaceVertexIndices];
+}
+
+template MeshFaceWraps {
+ <4885AE62-78E8-11cf-8F52-0040333594A3>
+ DWORD nFaceWrapValues;
+ Boolean2d faceWrapValues;
+}
+
+template MeshTextureCoords {
+ <F6F23F40-7686-11cf-8F52-0040333594A3>
+ DWORD nTextureCoords;
+ array Coords2d textureCoords[nTextureCoords];
+}
+
+template MeshMaterialList {
+ <F6F23F42-7686-11cf-8F52-0040333594A3>
+ DWORD nMaterials;
+ DWORD nFaceIndexes;
+ array DWORD faceIndexes[nFaceIndexes];
+ [Material]
+}
+
+template MeshNormals {
+ <F6F23F43-7686-11cf-8F52-0040333594A3>
+ DWORD nNormals;
+ array Vector normals[nNormals];
+ DWORD nFaceNormals;
+ array MeshFace faceNormals[nFaceNormals];
+}
+
+template MeshVertexColors {
+ <1630B821-7842-11cf-8F52-0040333594A3>
+ DWORD nVertexColors;
+ array IndexedColor vertexColors[nVertexColors];
+}
+
+template Mesh {
+ <3D82AB44-62DA-11cf-AB39-0020AF71E433>
+ DWORD nVertices;
+ array Vector vertices[nVertices];
+ DWORD nFaces;
+ array MeshFace faces[nFaces];
+ [...]
+}
+
+Header{
+1;
+0;
+1;
+}
+
+Mesh {
+ 71;
+ -0.99781;0.00656;0.25843;,
+ -0.49453;0.00656;0.25843;,
+ -0.49891;0.00656;-0.24486;,
+ -0.49891;0.00656;-0.24486;,
+ -0.99781;0.00656;-0.24486;,
+ -0.99781;0.00656;0.25843;,
+ 0.00000;0.00656;-0.75689;,
+ -0.49891;0.00656;-0.74814;,
+ -0.49891;0.00656;-0.24486;,
+ -0.49891;0.00656;-0.24486;,
+ 0.00000;0.00656;-0.24923;,
+ 0.00000;0.00656;-0.75689;,
+ -0.49891;0.00656;-0.24486;,
+ 0.00438;0.00656;0.24530;,
+ 0.00000;0.00656;-0.24923;,
+ -0.49891;0.00656;-0.24486;,
+ -0.49453;0.00656;0.25843;,
+ 0.00438;0.00656;0.24530;,
+ -0.99781;0.00656;-0.24486;,
+ -0.49891;0.00656;-0.24486;,
+ -0.49891;0.00656;-0.74814;,
+ -0.49891;0.00656;-0.74814;,
+ -0.98906;0.00656;-0.74814;,
+ -0.99781;0.00656;-0.24486;,
+ -0.49453;0.00656;0.25843;,
+ -0.99781;0.00656;0.25843;,
+ -0.99781;0.00656;0.76171;,
+ -0.49453;0.00656;0.75296;,
+ -0.49453;0.00656;0.25843;,
+ -0.49453;0.00656;0.75296;,
+ 0.00438;0.00656;0.76608;,
+ 0.00438;0.00656;0.24530;,
+ 0.00438;0.00656;0.24530;,
+ -0.49453;0.00656;0.25843;,
+ -0.49453;0.00656;0.75296;,
+ 0.00438;0.00656;0.24530;,
+ 0.50547;0.00656;0.25843;,
+ 0.50109;0.00656;-0.24486;,
+ 0.50109;0.00656;-0.24486;,
+ 0.00000;0.00656;-0.24923;,
+ 0.00438;0.00656;0.24530;,
+ 1.00000;0.00656;-0.75689;,
+ 0.50109;0.00656;-0.74814;,
+ 0.50109;0.00656;-0.24486;,
+ 0.50109;0.00656;-0.24486;,
+ 1.00000;0.00656;-0.24923;,
+ 1.00000;0.00656;-0.75689;,
+ 0.50109;0.00656;-0.24486;,
+ 1.00438;0.00656;0.24530;,
+ 1.00000;0.00656;-0.24923;,
+ 0.50109;0.00656;-0.24486;,
+ 0.50547;0.00656;0.25843;,
+ 1.00438;0.00656;0.24530;,
+ 0.00000;0.00656;-0.24923;,
+ 0.50109;0.00656;-0.24486;,
+ 0.50109;0.00656;-0.74814;,
+ 0.50109;0.00656;-0.74814;,
+ 0.00000;0.00656;-0.75689;,
+ 0.00000;0.00656;-0.24923;,
+ 0.50547;0.00656;0.25843;,
+ 0.00438;0.00656;0.24530;,
+ 0.00438;0.00656;0.76608;,
+ 0.00438;0.00656;0.76608;,
+ 0.50547;0.00656;0.75296;,
+ 0.50547;0.00656;0.25843;,
+ 0.50547;0.00656;0.75296;,
+ 1.00438;0.00656;0.76608;,
+ 1.00438;0.00656;0.24530;,
+ 1.00438;0.00656;0.24530;,
+ 0.50547;0.00656;0.25843;,
+ 0.50547;0.00656;0.75296;;
+
+ 24;
+ 3;0,1,2;,
+ 3;3,4,5;,
+ 3;6,7,8;,
+ 3;9,10,11;,
+ 3;12,13,14;,
+ 3;15,16,17;,
+ 3;18,19,20;,
+ 3;21,22,23;,
+ 3;24,25,26;,
+ 3;26,27,28;,
+ 3;29,30,31;,
+ 3;32,33,34;,
+ 3;35,36,37;,
+ 3;38,39,40;,
+ 3;41,42,43;,
+ 3;44,45,46;,
+ 3;47,48,49;,
+ 3;50,51,52;,
+ 3;53,54,55;,
+ 3;56,57,58;,
+ 3;59,60,61;,
+ 3;62,63,64;,
+ 3;65,66,67;,
+ 3;68,69,70;;
+
+ MeshMaterialList {
+ 1;
+ 24;
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0;;
+ Material {
+ 0.800000;0.800000;0.800000;1.000000;;
+ 5.000000;
+ 0.000000;0.000000;0.000000;;
+ 0.000000;0.000000;0.000000;;
+ TextureFilename {
+ "floor.jpg";
+ }
+ }
+ }
+ MeshNormals {
+ 1;
+ 0.000000;1.000000;0.000000;;
+ 24;
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;,
+ 3;0,0,0;;
+ }
+ MeshTextureCoords {
+ 71;
+ 0.008970;0.015610;
+ 0.987370;0.010940;
+ 0.993030;0.997650;
+ 0.993180;0.996150;
+ 0.011050;0.991000;
+ 0.010230;0.014990;
+ 0.991740;0.990340;
+ 0.005740;0.994960;
+ 0.005160;0.009180;
+ 0.001770;0.016670;
+ 0.992110;0.017890;
+ 0.998400;0.992640;
+ 0.008820;0.995620;
+ 0.992450;0.012050;
+ 0.993120;0.993790;
+ 0.010690;0.992870;
+ 0.008420;0.021150;
+ 0.992180;0.009840;
+ 0.011420;0.015720;
+ 0.985690;0.011940;
+ 0.991950;0.994470;
+ 0.993310;0.995140;
+ 0.012490;0.995330;
+ 0.008050;0.018330;
+ 0.994870;0.995150;
+ 0.012580;0.992740;
+ 0.009660;0.013130;
+ 0.986800;0.011250;
+ 0.995790;0.996020;
+ 0.003120;0.012890;
+ 0.991470;0.014460;
+ 0.993520;0.998120;
+ 0.996580;0.996940;
+ 0.010000;0.993470;
+ 0.010850;0.008450;
+ 0.010970;0.018720;
+ 0.989230;0.013420;
+ 0.992370;0.994050;
+ 0.988850;0.995690;
+ 0.006740;0.990880;
+ 0.008580;0.011650;
+ 0.986380;0.989100;
+ 0.008110;0.993470;
+ 0.013240;0.006800;
+ 0.008820;0.009840;
+ 0.987670;0.006400;
+ 0.993690;0.988600;
+ 0.009030;0.995620;
+ 0.988550;0.012050;
+ 0.989230;0.992420;
+ 0.008530;0.990390;
+ 0.005600;0.010900;
+ 0.988300;0.007750;
+ 0.004980;0.016360;
+ 0.991420;0.008580;
+ 0.994710;0.990610;
+ 0.988660;0.988310;
+ 0.009300;0.994610;
+ 0.006900;0.012230;
+ 0.992220;0.988910;
+ 0.009000;0.993150;
+ 0.006830;0.012820;
+ 0.007500;0.015270;
+ 0.995060;0.017860;
+ 0.996100;0.993070;
+ 0.008180;0.013730;
+ 0.994450;0.015130;
+ 0.994420;0.997760;
+ 0.988480;0.989210;
+ 0.017050;0.989360;
+ 0.007130;0.013910;;
+ }
+}
-Metasequoia Document\r
-Format Text Ver 1.0\r
-\r
-Scene {\r
- pos 0.0000 0.0000 1500.0000\r
- lookat 0.0000 0.0000 0.0000\r
- head 4.0692\r
- pich 0.3500\r
- ortho 0\r
- zoom2 8.0000\r
- amb 0.250 0.250 0.250\r
-}\r
-Material 1 {\r
- "mat1" col(0.573 0.702 1.000 1.000) dif(0.800) amb(0.600) emi(0.000) spc(0.000) power(5.00) tex("./image/ice.bmp")\r
-}\r
-Object "obj1" {\r
- visible 15\r
- locking 0\r
- shading 1\r
- facet 59.5\r
- color 0.898 0.498 0.698\r
- color_type 0\r
- vertex 20 {\r
- 28.4255 -0.0640 21.6447\r
- 31.0376 1.7941 -11.2263\r
- 22.4370 26.7094 6.6876\r
- 14.5745 -0.1503 35.8940\r
- 4.8634 23.0848 20.8045\r
- -5.2842 -0.6545 33.5545\r
- -12.7160 -0.5702 25.1698\r
- -9.6912 26.7195 9.9308\r
- -33.1520 -0.3367 17.5590\r
- -1.8056 63.8250 4.9959\r
- 20.6629 20.0960 -10.3231\r
- 26.5836 3.1180 -26.1322\r
- 10.0779 18.1188 -9.7858\r
- 6.0867 0.7401 -23.0464\r
- 13.6935 34.1970 -5.8902\r
- -7.0163 29.2559 -16.4460\r
- -35.7552 -1.1320 -2.6837\r
- -10.5009 0.4908 -26.2749\r
- -1.4327 13.7071 -22.6226\r
- -24.4592 39.1865 -13.4335\r
- }\r
- face 28 {\r
- 3 V(2 1 0) M(0)\r
- 3 V(0 3 4) M(0)\r
- 3 V(4 2 0) M(0)\r
- 3 V(3 5 4) M(0)\r
- 3 V(5 6 4) M(0)\r
- 3 V(6 7 4) M(0)\r
- 3 V(6 8 7) M(0)\r
- 3 V(4 9 2) M(0)\r
- 3 V(2 10 1) M(0)\r
- 3 V(10 11 1) M(0)\r
- 3 V(10 12 11) M(0)\r
- 3 V(12 13 11) M(0)\r
- 3 V(9 14 2) M(0)\r
- 3 V(9 4 7) M(0)\r
- 3 V(2 12 10) M(0)\r
- 3 V(2 14 12) M(0)\r
- 3 V(15 14 9) M(0)\r
- 3 V(14 15 12) M(0)\r
- 3 V(7 15 9) M(0)\r
- 3 V(8 16 7) M(0)\r
- 3 V(18 17 13) M(0)\r
- 3 V(12 18 13) M(0)\r
- 3 V(12 15 18) M(0)\r
- 3 V(18 16 17) M(0)\r
- 3 V(16 18 15) M(0)\r
- 3 V(7 19 15) M(0)\r
- 3 V(16 15 19) M(0)\r
- 3 V(19 7 16) M(0)\r
- }\r
-}\r
-Eof\r
+Metasequoia Document
+Format Text Ver 1.0
+
+Scene {
+ pos 0.0000 0.0000 1500.0000
+ lookat 0.0000 0.0000 0.0000
+ head 4.0692
+ pich 0.3500
+ ortho 0
+ zoom2 8.0000
+ amb 0.250 0.250 0.250
+}
+Material 1 {
+ "mat1" col(0.573 0.702 1.000 1.000) dif(0.800) amb(0.600) emi(0.000) spc(0.000) power(5.00) tex("./image/ice.bmp")
+}
+Object "obj1" {
+ visible 15
+ locking 0
+ shading 1
+ facet 59.5
+ color 0.898 0.498 0.698
+ color_type 0
+ vertex 20 {
+ 28.4255 -0.0640 21.6447
+ 31.0376 1.7941 -11.2263
+ 22.4370 26.7094 6.6876
+ 14.5745 -0.1503 35.8940
+ 4.8634 23.0848 20.8045
+ -5.2842 -0.6545 33.5545
+ -12.7160 -0.5702 25.1698
+ -9.6912 26.7195 9.9308
+ -33.1520 -0.3367 17.5590
+ -1.8056 63.8250 4.9959
+ 20.6629 20.0960 -10.3231
+ 26.5836 3.1180 -26.1322
+ 10.0779 18.1188 -9.7858
+ 6.0867 0.7401 -23.0464
+ 13.6935 34.1970 -5.8902
+ -7.0163 29.2559 -16.4460
+ -35.7552 -1.1320 -2.6837
+ -10.5009 0.4908 -26.2749
+ -1.4327 13.7071 -22.6226
+ -24.4592 39.1865 -13.4335
+ }
+ face 28 {
+ 3 V(2 1 0) M(0)
+ 3 V(0 3 4) M(0)
+ 3 V(4 2 0) M(0)
+ 3 V(3 5 4) M(0)
+ 3 V(5 6 4) M(0)
+ 3 V(6 7 4) M(0)
+ 3 V(6 8 7) M(0)
+ 3 V(4 9 2) M(0)
+ 3 V(2 10 1) M(0)
+ 3 V(10 11 1) M(0)
+ 3 V(10 12 11) M(0)
+ 3 V(12 13 11) M(0)
+ 3 V(9 14 2) M(0)
+ 3 V(9 4 7) M(0)
+ 3 V(2 12 10) M(0)
+ 3 V(2 14 12) M(0)
+ 3 V(15 14 9) M(0)
+ 3 V(14 15 12) M(0)
+ 3 V(7 15 9) M(0)
+ 3 V(8 16 7) M(0)
+ 3 V(18 17 13) M(0)
+ 3 V(12 18 13) M(0)
+ 3 V(12 15 18) M(0)
+ 3 V(18 16 17) M(0)
+ 3 V(16 18 15) M(0)
+ 3 V(7 19 15) M(0)
+ 3 V(16 15 19) M(0)
+ 3 V(19 7 16) M(0)
+ }
+}
+Eof
-xof 0302txt 0064\r
-template Header {\r
- <3D82AB43-62DA-11cf-AB39-0020AF71E433>\r
- WORD major;\r
- WORD minor;\r
- DWORD flags;\r
-}\r
-\r
-template Vector {\r
- <3D82AB5E-62DA-11cf-AB39-0020AF71E433>\r
- FLOAT x;\r
- FLOAT y;\r
- FLOAT z;\r
-}\r
-\r
-template Coords2d {\r
- <F6F23F44-7686-11cf-8F52-0040333594A3>\r
- FLOAT u;\r
- FLOAT v;\r
-}\r
-\r
-template Matrix4x4 {\r
- <F6F23F45-7686-11cf-8F52-0040333594A3>\r
- array FLOAT matrix[16];\r
-}\r
-\r
-template ColorRGBA {\r
- <35FF44E0-6C7C-11cf-8F52-0040333594A3>\r
- FLOAT red;\r
- FLOAT green;\r
- FLOAT blue;\r
- FLOAT alpha;\r
-}\r
-\r
-template ColorRGB {\r
- <D3E16E81-7835-11cf-8F52-0040333594A3>\r
- FLOAT red;\r
- FLOAT green;\r
- FLOAT blue;\r
-}\r
-\r
-template IndexedColor {\r
- <1630B820-7842-11cf-8F52-0040333594A3>\r
- DWORD index;\r
- ColorRGBA indexColor;\r
-}\r
-\r
-template Boolean {\r
- <4885AE61-78E8-11cf-8F52-0040333594A3>\r
- WORD truefalse;\r
-}\r
-\r
-template Boolean2d {\r
- <4885AE63-78E8-11cf-8F52-0040333594A3>\r
- Boolean u;\r
- Boolean v;\r
-}\r
-\r
-template MaterialWrap {\r
- <4885AE60-78E8-11cf-8F52-0040333594A3>\r
- Boolean u;\r
- Boolean v;\r
-}\r
-\r
-template TextureFilename {\r
- <A42790E1-7810-11cf-8F52-0040333594A3>\r
- STRING filename;\r
-}\r
-\r
-template Material {\r
- <3D82AB4D-62DA-11cf-AB39-0020AF71E433>\r
- ColorRGBA faceColor;\r
- FLOAT power;\r
- ColorRGB specularColor;\r
- ColorRGB emissiveColor;\r
- [...]\r
-}\r
-\r
-template MeshFace {\r
- <3D82AB5F-62DA-11cf-AB39-0020AF71E433>\r
- DWORD nFaceVertexIndices;\r
- array DWORD faceVertexIndices[nFaceVertexIndices];\r
-}\r
-\r
-template MeshFaceWraps {\r
- <4885AE62-78E8-11cf-8F52-0040333594A3>\r
- DWORD nFaceWrapValues;\r
- Boolean2d faceWrapValues;\r
-}\r
-\r
-template MeshTextureCoords {\r
- <F6F23F40-7686-11cf-8F52-0040333594A3>\r
- DWORD nTextureCoords;\r
- array Coords2d textureCoords[nTextureCoords];\r
-}\r
-\r
-template MeshMaterialList {\r
- <F6F23F42-7686-11cf-8F52-0040333594A3>\r
- DWORD nMaterials;\r
- DWORD nFaceIndexes;\r
- array DWORD faceIndexes[nFaceIndexes];\r
- [Material]\r
-}\r
-\r
-template MeshNormals {\r
- <F6F23F43-7686-11cf-8F52-0040333594A3>\r
- DWORD nNormals;\r
- array Vector normals[nNormals];\r
- DWORD nFaceNormals;\r
- array MeshFace faceNormals[nFaceNormals];\r
-}\r
-\r
-template MeshVertexColors {\r
- <1630B821-7842-11cf-8F52-0040333594A3>\r
- DWORD nVertexColors;\r
- array IndexedColor vertexColors[nVertexColors];\r
-}\r
-\r
-template Mesh {\r
- <3D82AB44-62DA-11cf-AB39-0020AF71E433>\r
- DWORD nVertices;\r
- array Vector vertices[nVertices];\r
- DWORD nFaces;\r
- array MeshFace faces[nFaces];\r
- [...]\r
-}\r
-\r
-Header{\r
-1;\r
-0;\r
-1;\r
-}\r
-\r
-Mesh {\r
- 20;\r
- 0.22437;0.26709;-0.06688;,\r
- 0.31038;0.01794;0.11226;,\r
- 0.28426;-0.00064;-0.21645;,\r
- 0.14574;-0.00150;-0.35894;,\r
- 0.04863;0.23085;-0.20805;,\r
- -0.05284;-0.00654;-0.33554;,\r
- -0.12716;-0.00570;-0.25170;,\r
- -0.09691;0.26719;-0.09931;,\r
- -0.33152;-0.00337;-0.17559;,\r
- -0.01806;0.63825;-0.04996;,\r
- 0.20663;0.20096;0.10323;,\r
- 0.26584;0.03118;0.26132;,\r
- 0.10078;0.18119;0.09786;,\r
- 0.06087;0.00740;0.23046;,\r
- 0.13693;0.34197;0.05890;,\r
- -0.07016;0.29256;0.16446;,\r
- -0.35755;-0.01132;0.02684;,\r
- -0.01433;0.13707;0.22623;,\r
- -0.10501;0.00491;0.26275;,\r
- -0.24459;0.39186;0.13433;;\r
- \r
- 28;\r
- 3;0,1,2;,\r
- 3;2,3,4;,\r
- 3;4,0,2;,\r
- 3;3,5,4;,\r
- 3;5,6,4;,\r
- 3;6,7,4;,\r
- 3;6,8,7;,\r
- 3;4,9,0;,\r
- 3;0,10,1;,\r
- 3;10,11,1;,\r
- 3;10,12,11;,\r
- 3;12,13,11;,\r
- 3;9,14,0;,\r
- 3;9,4,7;,\r
- 3;0,12,10;,\r
- 3;0,14,12;,\r
- 3;15,14,9;,\r
- 3;14,15,12;,\r
- 3;7,15,9;,\r
- 3;8,16,7;,\r
- 3;17,18,13;,\r
- 3;12,17,13;,\r
- 3;12,15,17;,\r
- 3;17,16,18;,\r
- 3;16,17,15;,\r
- 3;7,19,15;,\r
- 3;16,15,19;,\r
- 3;19,7,16;;\r
- \r
- MeshMaterialList {\r
- 1;\r
- 28;\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0;;\r
- Material {\r
- 0.800000;0.800000;0.800000;1.000000;;\r
- 5.000000;\r
- 0.000000;0.000000;0.000000;;\r
- 0.000000;0.000000;0.000000;;\r
- }\r
- }\r
- MeshNormals {\r
- 31;\r
- 0.718356;0.492887;-0.490944;,\r
- 0.896784;0.421795;0.133670;,\r
- 0.897824;0.430711;-0.091656;,\r
- 0.246841;0.598252;-0.762341;,\r
- -0.025330;0.544760;-0.838209;,\r
- -0.382213;0.558701;-0.736048;,\r
- -0.462147;0.516095;-0.721156;,\r
- -0.583836;0.473482;-0.659508;,\r
- -0.582158;0.644538;-0.495643;,\r
- 0.530085;0.380765;-0.757646;,\r
- 0.838854;0.487472;0.242271;,\r
- 0.846207;0.490015;0.209331;,\r
- 0.204561;0.597432;0.775390;,\r
- 0.225632;0.416711;0.880592;,\r
- 0.647524;0.292778;0.703557;,\r
- 0.288703;0.243931;0.925823;,\r
- -0.637013;0.353570;0.684984;,\r
- -0.225901;0.400411;0.888054;,\r
- 0.477118;0.344557;0.808479;,\r
- 0.507630;0.851196;-0.133331;,\r
- -0.179375;0.807642;0.561729;,\r
- -0.172407;0.632846;0.754839;,\r
- 0.608751;0.534027;0.586717;,\r
- -0.875894;0.241684;-0.417611;,\r
- -0.189351;0.921687;0.338584;,\r
- 0.809150;-0.039916;0.586245;,\r
- -0.977123;0.196997;0.080148;,\r
- -0.842872;0.184647;0.505443;,\r
- -0.580114;0.360051;0.730638;,\r
- -0.265184;-0.178344;0.947560;,\r
- -0.689418;0.360646;-0.628202;;\r
- 28;\r
- 3;2,1,0;,\r
- 3;0,3,4;,\r
- 3;4,2,0;,\r
- 3;3,5,4;,\r
- 3;5,6,4;,\r
- 3;6,7,4;,\r
- 3;6,8,7;,\r
- 3;4,9,2;,\r
- 3;2,10,1;,\r
- 3;10,11,1;,\r
- 3;20,12,21;,\r
- 3;12,13,21;,\r
- 3;22,14,2;,\r
- 3;23,4,7;,\r
- 3;24,12,20;,\r
- 3;2,14,25;,\r
- 3;15,14,22;,\r
- 3;14,15,12;,\r
- 3;26,27,23;,\r
- 3;8,16,7;,\r
- 3;18,17,13;,\r
- 3;12,18,13;,\r
- 3;12,15,18;,\r
- 3;28,16,17;,\r
- 3;16,28,27;,\r
- 3;19,19,19;,\r
- 3;16,15,29;,\r
- 3;30,7,30;;\r
- }\r
- MeshTextureCoords {\r
- 20;\r
- 0.000000;0.000000;\r
- 0.000000;0.000000;\r
- 0.000000;0.000000;\r
- 0.000000;0.000000;\r
- 0.000000;0.000000;\r
- 0.000000;0.000000;\r
- 0.000000;0.000000;\r
- 0.000000;0.000000;\r
- 0.000000;0.000000;\r
- 0.000000;0.000000;\r
- 0.000000;0.000000;\r
- 0.000000;0.000000;\r
- 0.000000;0.000000;\r
- 0.000000;0.000000;\r
- 0.000000;0.000000;\r
- 0.000000;0.000000;\r
- 0.000000;0.000000;\r
- 0.000000;0.000000;\r
- 0.000000;0.000000;\r
- 0.000000;0.000000;;\r
- }\r
-}\r
+xof 0302txt 0064
+template Header {
+ <3D82AB43-62DA-11cf-AB39-0020AF71E433>
+ WORD major;
+ WORD minor;
+ DWORD flags;
+}
+
+template Vector {
+ <3D82AB5E-62DA-11cf-AB39-0020AF71E433>
+ FLOAT x;
+ FLOAT y;
+ FLOAT z;
+}
+
+template Coords2d {
+ <F6F23F44-7686-11cf-8F52-0040333594A3>
+ FLOAT u;
+ FLOAT v;
+}
+
+template Matrix4x4 {
+ <F6F23F45-7686-11cf-8F52-0040333594A3>
+ array FLOAT matrix[16];
+}
+
+template ColorRGBA {
+ <35FF44E0-6C7C-11cf-8F52-0040333594A3>
+ FLOAT red;
+ FLOAT green;
+ FLOAT blue;
+ FLOAT alpha;
+}
+
+template ColorRGB {
+ <D3E16E81-7835-11cf-8F52-0040333594A3>
+ FLOAT red;
+ FLOAT green;
+ FLOAT blue;
+}
+
+template IndexedColor {
+ <1630B820-7842-11cf-8F52-0040333594A3>
+ DWORD index;
+ ColorRGBA indexColor;
+}
+
+template Boolean {
+ <4885AE61-78E8-11cf-8F52-0040333594A3>
+ WORD truefalse;
+}
+
+template Boolean2d {
+ <4885AE63-78E8-11cf-8F52-0040333594A3>
+ Boolean u;
+ Boolean v;
+}
+
+template MaterialWrap {
+ <4885AE60-78E8-11cf-8F52-0040333594A3>
+ Boolean u;
+ Boolean v;
+}
+
+template TextureFilename {
+ <A42790E1-7810-11cf-8F52-0040333594A3>
+ STRING filename;
+}
+
+template Material {
+ <3D82AB4D-62DA-11cf-AB39-0020AF71E433>
+ ColorRGBA faceColor;
+ FLOAT power;
+ ColorRGB specularColor;
+ ColorRGB emissiveColor;
+ [...]
+}
+
+template MeshFace {
+ <3D82AB5F-62DA-11cf-AB39-0020AF71E433>
+ DWORD nFaceVertexIndices;
+ array DWORD faceVertexIndices[nFaceVertexIndices];
+}
+
+template MeshFaceWraps {
+ <4885AE62-78E8-11cf-8F52-0040333594A3>
+ DWORD nFaceWrapValues;
+ Boolean2d faceWrapValues;
+}
+
+template MeshTextureCoords {
+ <F6F23F40-7686-11cf-8F52-0040333594A3>
+ DWORD nTextureCoords;
+ array Coords2d textureCoords[nTextureCoords];
+}
+
+template MeshMaterialList {
+ <F6F23F42-7686-11cf-8F52-0040333594A3>
+ DWORD nMaterials;
+ DWORD nFaceIndexes;
+ array DWORD faceIndexes[nFaceIndexes];
+ [Material]
+}
+
+template MeshNormals {
+ <F6F23F43-7686-11cf-8F52-0040333594A3>
+ DWORD nNormals;
+ array Vector normals[nNormals];
+ DWORD nFaceNormals;
+ array MeshFace faceNormals[nFaceNormals];
+}
+
+template MeshVertexColors {
+ <1630B821-7842-11cf-8F52-0040333594A3>
+ DWORD nVertexColors;
+ array IndexedColor vertexColors[nVertexColors];
+}
+
+template Mesh {
+ <3D82AB44-62DA-11cf-AB39-0020AF71E433>
+ DWORD nVertices;
+ array Vector vertices[nVertices];
+ DWORD nFaces;
+ array MeshFace faces[nFaces];
+ [...]
+}
+
+Header{
+1;
+0;
+1;
+}
+
+Mesh {
+ 20;
+ 0.22437;0.26709;-0.06688;,
+ 0.31038;0.01794;0.11226;,
+ 0.28426;-0.00064;-0.21645;,
+ 0.14574;-0.00150;-0.35894;,
+ 0.04863;0.23085;-0.20805;,
+ -0.05284;-0.00654;-0.33554;,
+ -0.12716;-0.00570;-0.25170;,
+ -0.09691;0.26719;-0.09931;,
+ -0.33152;-0.00337;-0.17559;,
+ -0.01806;0.63825;-0.04996;,
+ 0.20663;0.20096;0.10323;,
+ 0.26584;0.03118;0.26132;,
+ 0.10078;0.18119;0.09786;,
+ 0.06087;0.00740;0.23046;,
+ 0.13693;0.34197;0.05890;,
+ -0.07016;0.29256;0.16446;,
+ -0.35755;-0.01132;0.02684;,
+ -0.01433;0.13707;0.22623;,
+ -0.10501;0.00491;0.26275;,
+ -0.24459;0.39186;0.13433;;
+
+ 28;
+ 3;0,1,2;,
+ 3;2,3,4;,
+ 3;4,0,2;,
+ 3;3,5,4;,
+ 3;5,6,4;,
+ 3;6,7,4;,
+ 3;6,8,7;,
+ 3;4,9,0;,
+ 3;0,10,1;,
+ 3;10,11,1;,
+ 3;10,12,11;,
+ 3;12,13,11;,
+ 3;9,14,0;,
+ 3;9,4,7;,
+ 3;0,12,10;,
+ 3;0,14,12;,
+ 3;15,14,9;,
+ 3;14,15,12;,
+ 3;7,15,9;,
+ 3;8,16,7;,
+ 3;17,18,13;,
+ 3;12,17,13;,
+ 3;12,15,17;,
+ 3;17,16,18;,
+ 3;16,17,15;,
+ 3;7,19,15;,
+ 3;16,15,19;,
+ 3;19,7,16;;
+
+ MeshMaterialList {
+ 1;
+ 28;
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0;;
+ Material {
+ 0.800000;0.800000;0.800000;1.000000;;
+ 5.000000;
+ 0.000000;0.000000;0.000000;;
+ 0.000000;0.000000;0.000000;;
+ }
+ }
+ MeshNormals {
+ 31;
+ 0.718356;0.492887;-0.490944;,
+ 0.896784;0.421795;0.133670;,
+ 0.897824;0.430711;-0.091656;,
+ 0.246841;0.598252;-0.762341;,
+ -0.025330;0.544760;-0.838209;,
+ -0.382213;0.558701;-0.736048;,
+ -0.462147;0.516095;-0.721156;,
+ -0.583836;0.473482;-0.659508;,
+ -0.582158;0.644538;-0.495643;,
+ 0.530085;0.380765;-0.757646;,
+ 0.838854;0.487472;0.242271;,
+ 0.846207;0.490015;0.209331;,
+ 0.204561;0.597432;0.775390;,
+ 0.225632;0.416711;0.880592;,
+ 0.647524;0.292778;0.703557;,
+ 0.288703;0.243931;0.925823;,
+ -0.637013;0.353570;0.684984;,
+ -0.225901;0.400411;0.888054;,
+ 0.477118;0.344557;0.808479;,
+ 0.507630;0.851196;-0.133331;,
+ -0.179375;0.807642;0.561729;,
+ -0.172407;0.632846;0.754839;,
+ 0.608751;0.534027;0.586717;,
+ -0.875894;0.241684;-0.417611;,
+ -0.189351;0.921687;0.338584;,
+ 0.809150;-0.039916;0.586245;,
+ -0.977123;0.196997;0.080148;,
+ -0.842872;0.184647;0.505443;,
+ -0.580114;0.360051;0.730638;,
+ -0.265184;-0.178344;0.947560;,
+ -0.689418;0.360646;-0.628202;;
+ 28;
+ 3;2,1,0;,
+ 3;0,3,4;,
+ 3;4,2,0;,
+ 3;3,5,4;,
+ 3;5,6,4;,
+ 3;6,7,4;,
+ 3;6,8,7;,
+ 3;4,9,2;,
+ 3;2,10,1;,
+ 3;10,11,1;,
+ 3;20,12,21;,
+ 3;12,13,21;,
+ 3;22,14,2;,
+ 3;23,4,7;,
+ 3;24,12,20;,
+ 3;2,14,25;,
+ 3;15,14,22;,
+ 3;14,15,12;,
+ 3;26,27,23;,
+ 3;8,16,7;,
+ 3;18,17,13;,
+ 3;12,18,13;,
+ 3;12,15,18;,
+ 3;28,16,17;,
+ 3;16,28,27;,
+ 3;19,19,19;,
+ 3;16,15,29;,
+ 3;30,7,30;;
+ }
+ MeshTextureCoords {
+ 20;
+ 0.000000;0.000000;
+ 0.000000;0.000000;
+ 0.000000;0.000000;
+ 0.000000;0.000000;
+ 0.000000;0.000000;
+ 0.000000;0.000000;
+ 0.000000;0.000000;
+ 0.000000;0.000000;
+ 0.000000;0.000000;
+ 0.000000;0.000000;
+ 0.000000;0.000000;
+ 0.000000;0.000000;
+ 0.000000;0.000000;
+ 0.000000;0.000000;
+ 0.000000;0.000000;
+ 0.000000;0.000000;
+ 0.000000;0.000000;
+ 0.000000;0.000000;
+ 0.000000;0.000000;
+ 0.000000;0.000000;;
+ }
+}
-xof 0302txt 0064\r
-template Header {\r
- <3D82AB43-62DA-11cf-AB39-0020AF71E433>\r
- WORD major;\r
- WORD minor;\r
- DWORD flags;\r
-}\r
-\r
-template Vector {\r
- <3D82AB5E-62DA-11cf-AB39-0020AF71E433>\r
- FLOAT x;\r
- FLOAT y;\r
- FLOAT z;\r
-}\r
-\r
-template Coords2d {\r
- <F6F23F44-7686-11cf-8F52-0040333594A3>\r
- FLOAT u;\r
- FLOAT v;\r
-}\r
-\r
-template Matrix4x4 {\r
- <F6F23F45-7686-11cf-8F52-0040333594A3>\r
- array FLOAT matrix[16];\r
-}\r
-\r
-template ColorRGBA {\r
- <35FF44E0-6C7C-11cf-8F52-0040333594A3>\r
- FLOAT red;\r
- FLOAT green;\r
- FLOAT blue;\r
- FLOAT alpha;\r
-}\r
-\r
-template ColorRGB {\r
- <D3E16E81-7835-11cf-8F52-0040333594A3>\r
- FLOAT red;\r
- FLOAT green;\r
- FLOAT blue;\r
-}\r
-\r
-template IndexedColor {\r
- <1630B820-7842-11cf-8F52-0040333594A3>\r
- DWORD index;\r
- ColorRGBA indexColor;\r
-}\r
-\r
-template Boolean {\r
- <4885AE61-78E8-11cf-8F52-0040333594A3>\r
- WORD truefalse;\r
-}\r
-\r
-template Boolean2d {\r
- <4885AE63-78E8-11cf-8F52-0040333594A3>\r
- Boolean u;\r
- Boolean v;\r
-}\r
-\r
-template MaterialWrap {\r
- <4885AE60-78E8-11cf-8F52-0040333594A3>\r
- Boolean u;\r
- Boolean v;\r
-}\r
-\r
-template TextureFilename {\r
- <A42790E1-7810-11cf-8F52-0040333594A3>\r
- STRING filename;\r
-}\r
-\r
-template Material {\r
- <3D82AB4D-62DA-11cf-AB39-0020AF71E433>\r
- ColorRGBA faceColor;\r
- FLOAT power;\r
- ColorRGB specularColor;\r
- ColorRGB emissiveColor;\r
- [...]\r
-}\r
-\r
-template MeshFace {\r
- <3D82AB5F-62DA-11cf-AB39-0020AF71E433>\r
- DWORD nFaceVertexIndices;\r
- array DWORD faceVertexIndices[nFaceVertexIndices];\r
-}\r
-\r
-template MeshFaceWraps {\r
- <4885AE62-78E8-11cf-8F52-0040333594A3>\r
- DWORD nFaceWrapValues;\r
- Boolean2d faceWrapValues;\r
-}\r
-\r
-template MeshTextureCoords {\r
- <F6F23F40-7686-11cf-8F52-0040333594A3>\r
- DWORD nTextureCoords;\r
- array Coords2d textureCoords[nTextureCoords];\r
-}\r
-\r
-template MeshMaterialList {\r
- <F6F23F42-7686-11cf-8F52-0040333594A3>\r
- DWORD nMaterials;\r
- DWORD nFaceIndexes;\r
- array DWORD faceIndexes[nFaceIndexes];\r
- [Material]\r
-}\r
-\r
-template MeshNormals {\r
- <F6F23F43-7686-11cf-8F52-0040333594A3>\r
- DWORD nNormals;\r
- array Vector normals[nNormals];\r
- DWORD nFaceNormals;\r
- array MeshFace faceNormals[nFaceNormals];\r
-}\r
-\r
-template MeshVertexColors {\r
- <1630B821-7842-11cf-8F52-0040333594A3>\r
- DWORD nVertexColors;\r
- array IndexedColor vertexColors[nVertexColors];\r
-}\r
-\r
-template Mesh {\r
- <3D82AB44-62DA-11cf-AB39-0020AF71E433>\r
- DWORD nVertices;\r
- array Vector vertices[nVertices];\r
- DWORD nFaces;\r
- array MeshFace faces[nFaces];\r
- [...]\r
-}\r
-\r
-Header{\r
-1;\r
-0;\r
-1;\r
-}\r
-\r
-Mesh {\r
- 562;\r
- 0.83376;-1.25528;-0.30875;,\r
- 0.80277;-2.58889;-0.30251;,\r
- 0.76306;-1.29886;-0.59323;,\r
- 0.63858;-0.50568;-0.44125;,\r
- 0.68794;-0.53522;0.00266;,\r
- 0.86522;-1.22997;-0.14551;,\r
- 0.81193;-2.95400;-0.00396;,\r
- 0.86522;-1.22997;-0.14551;,\r
- 0.68794;-0.53522;0.00266;,\r
- 0.68017;-1.20855;-0.05241;,\r
- 0.86522;-1.22997;-0.14551;,\r
- 0.37189;-2.95400;0.22913;,\r
- 0.81193;-2.95400;-0.00396;,\r
- 0.33183;-1.17604;0.07446;,\r
- 0.15072;-0.64497;0.13093;,\r
- 0.29130;-1.24712;-0.37368;,\r
- 0.37189;-2.95400;0.22913;,\r
- 0.33183;-1.17604;0.07446;,\r
- 0.29130;-1.24712;-0.37368;,\r
- 0.33183;-1.17604;0.07446;,\r
- 0.15072;-0.64497;0.13093;,\r
- 0.15735;-0.55373;-0.47440;,\r
- 0.26220;-1.28723;-0.62783;,\r
- 0.26220;-1.28723;-0.62783;,\r
- 0.31352;-2.53888;-0.29309;,\r
- 0.79865;-2.75765;-0.73990;,\r
- 0.47394;-2.95400;-1.01592;,\r
- 0.35866;-2.72285;-0.75687;,\r
- 0.47394;-2.95400;-1.01592;,\r
- 0.36029;-2.95400;-0.79296;,\r
- 0.35866;-2.72285;-0.75687;,\r
- 0.47394;-2.95400;-1.01592;,\r
- 0.79865;-2.75765;-0.73990;,\r
- 0.77531;-2.95400;-0.75977;,\r
- 0.79865;-2.75765;-0.73990;,\r
- 0.81193;-2.95400;-0.00396;,\r
- 0.77531;-2.95400;-0.75977;,\r
- 0.79865;-2.75765;-0.73990;,\r
- 0.80277;-2.58889;-0.30251;,\r
- 0.37189;-2.95400;0.22913;,\r
- 0.35866;-2.72285;-0.75687;,\r
- 0.37189;-2.95400;0.22913;,\r
- 0.31352;-2.53888;-0.29309;,\r
- 0.35866;-2.72285;-0.75687;,\r
- 0.58155;-2.60221;-0.44042;,\r
- 0.79865;-2.75765;-0.73990;,\r
- 0.58155;-2.60221;-0.44042;,\r
- 0.80277;-2.58889;-0.30251;,\r
- 0.79865;-2.75765;-0.73990;,\r
- 0.31352;-2.53888;-0.29309;,\r
- 0.58155;-2.60221;-0.44042;,\r
- 0.58155;-2.60221;-0.44042;,\r
- 0.76306;-1.29886;-0.59323;,\r
- 0.80277;-2.58889;-0.30251;,\r
- 0.26220;-1.28723;-0.62783;,\r
- 0.31352;-2.53888;-0.29309;,\r
- 0.50954;-1.37040;-0.70638;,\r
- 0.50954;-1.37040;-0.70638;,\r
- 0.40349;-0.51331;-0.54983;,\r
- 0.63858;-0.50568;-0.44125;,\r
- 0.76306;-1.29886;-0.59323;,\r
- 0.15735;-0.55373;-0.47440;,\r
- 0.26220;-1.28723;-0.62783;,\r
- 1.12845;0.70096;-0.32097;,\r
- 0.83839;0.64646;-0.29087;,\r
- 0.75930;1.00596;-0.44909;,\r
- 1.38724;1.22166;-0.18900;,\r
- 1.46892;0.65185;-0.20474;,\r
- 1.49708;0.67356;0.08021;,\r
- 1.46892;0.65185;-0.20474;,\r
- 1.38724;1.22166;-0.18900;,\r
- 1.23366;1.13833;0.32802;,\r
- 1.31234;0.40147;-0.05174;,\r
- 1.44008;-0.35841;-0.50913;,\r
- 1.08304;-0.38219;-0.43918;,\r
- 0.90131;0.41542;-0.15880;,\r
- 1.43991;0.08641;0.27125;,\r
- 1.48053;-0.58297;-0.27745;,\r
- 1.44008;-0.35841;-0.50913;,\r
- 1.31234;0.40147;-0.05174;,\r
- 1.07384;0.08943;0.34476;,\r
- 1.01951;0.56845;0.46641;,\r
- 0.90131;0.41542;-0.15880;,\r
- 0.90131;0.41542;-0.15880;,\r
- 1.08304;-0.38219;-0.43918;,\r
- 1.08757;-0.61891;-0.18951;,\r
- 1.07384;0.08943;0.34476;,\r
- 0.77215;0.92301;0.25592;,\r
- 0.83839;0.64646;-0.29087;,\r
- 1.37226;0.43919;0.31433;,\r
- 1.49708;0.67356;0.08021;,\r
- 1.23366;1.13833;0.32802;,\r
- 1.43991;0.08641;0.27125;,\r
- 1.08757;-0.61891;-0.18951;,\r
- 1.48053;-0.58297;-0.27745;,\r
- 1.07384;0.08943;0.34476;,\r
- 1.37226;0.43919;0.31433;,\r
- 1.01951;0.56845;0.46641;,\r
- 1.23366;1.13833;0.32802;,\r
- 1.31234;0.40147;-0.05174;,\r
- 1.46892;0.65185;-0.20474;,\r
- 1.43991;0.08641;0.27125;,\r
- 1.48053;-0.58297;-0.27745;,\r
- 1.47964;-0.85386;-0.90068;,\r
- 1.44008;-0.35841;-0.50913;,\r
- 1.34861;-1.15761;-0.45486;,\r
- 1.10860;-1.05492;-0.46865;,\r
- 1.34861;-1.15761;-0.45486;,\r
- 1.21013;-0.81884;-0.86005;,\r
- 1.10860;-1.05492;-0.46865;,\r
- 1.10986;-0.70604;-0.99091;,\r
- 1.08304;-0.38219;-0.43918;,\r
- 1.44008;-0.35841;-0.50913;,\r
- 1.10986;-0.70604;-0.99091;,\r
- 1.47964;-0.85386;-0.90068;,\r
- 1.06767;-1.00377;-1.01993;,\r
- 1.21013;-0.81884;-0.86005;,\r
- 1.47964;-0.85386;-0.90068;,\r
- 1.25294;-1.03515;-1.08123;,\r
- 1.06767;-1.00377;-1.01993;,\r
- 1.10860;-1.05492;-0.46865;,\r
- 1.21013;-0.81884;-0.86005;,\r
- 1.06767;-1.00377;-1.01993;,\r
- 1.00290;-1.33401;-0.77117;,\r
- 1.16139;-1.38159;-0.75763;,\r
- 1.00290;-1.33401;-0.77117;,\r
- 1.06767;-1.00377;-1.01993;,\r
- 1.25294;-1.03515;-1.08123;,\r
- 1.34861;-1.15761;-0.45486;,\r
- 1.16139;-1.38159;-0.75763;,\r
- 1.25294;-1.03515;-1.08123;,\r
- 1.25294;-1.03515;-1.08123;,\r
- 1.47964;-0.85386;-0.90068;,\r
- 1.34861;-1.15761;-0.45486;,\r
- 1.00290;-1.33401;-0.77117;,\r
- 1.00290;-1.33401;-0.77117;,\r
- 1.16139;-1.38159;-0.75763;,\r
- 1.34861;-1.15761;-0.45486;,\r
- 1.24926;-0.69036;-1.06053;,\r
- 1.44008;-0.35841;-0.50913;,\r
- 1.44008;-0.35841;-0.50913;,\r
- 1.21013;-0.81884;-0.86005;,\r
- 1.24926;-0.69036;-1.06053;,\r
- 1.21013;-0.81884;-0.86005;,\r
- 1.10986;-0.70604;-0.99091;,\r
- 1.24926;-0.69036;-1.06053;,\r
- 0.75930;1.00596;-0.44909;,\r
- 0.71312;1.42286;0.29508;,\r
- 1.38724;1.22166;-0.18900;,\r
- 1.23366;1.13833;0.32802;,\r
- 0.77215;0.92301;0.25592;,\r
- 0.71312;1.42286;0.29508;,\r
- 0.77215;0.92301;0.25592;,\r
- 0.40223;1.19293;0.12287;,\r
- 0.83839;0.64646;-0.29087;,\r
- 0.40223;1.19293;0.12287;,\r
- 0.71312;1.42286;0.29508;,\r
- 0.40223;1.19293;0.12287;,\r
- 0.75930;1.00596;-0.44909;,\r
- 0.83839;0.64646;-0.29087;,\r
- 0.40223;1.19293;0.12287;,\r
- 0.00000;1.06000;-0.71800;,\r
- 0.00000;1.45800;-0.46500;,\r
- 0.99307;1.04154;-0.52540;,\r
- 0.00000;1.45800;-0.46500;,\r
- 0.46391;1.60254;-0.14270;,\r
- 0.99307;1.04154;-0.52540;,\r
- 0.70784;1.47039;0.42200;,\r
- 0.00000;1.45800;-0.46500;,\r
- 0.00000;2.12500;-0.44300;,\r
- 0.46391;1.60254;-0.14270;,\r
- 0.00000;2.12500;-0.44300;,\r
- 0.29892;2.01794;-0.08815;,\r
- 0.46391;1.60254;-0.14270;,\r
- 0.00000;1.06000;-0.71800;,\r
- 0.99307;1.04154;-0.52540;,\r
- 0.76644;0.61187;-0.78288;,\r
- 0.76644;0.61187;-0.78288;,\r
- 0.99307;1.04154;-0.52540;,\r
- 0.64036;0.38786;0.28485;,\r
- 0.99307;1.04154;-0.52540;,\r
- 0.70784;1.47039;0.42200;,\r
- 0.64036;0.38786;0.28485;,\r
- 0.62264;0.12365;0.13707;,\r
- 0.59030;0.15838;-0.73047;,\r
- 0.76644;0.61187;-0.78288;,\r
- 0.64036;0.38786;0.28485;,\r
- 0.00000;0.67600;0.32500;,\r
- 0.64036;0.38786;0.28485;,\r
- 0.70784;1.47039;0.42200;,\r
- 0.86233;-1.78848;-0.58858;,\r
- 0.00000;1.06000;-0.71800;,\r
- 0.00000;-1.64400;-1.01200;,\r
- 0.76644;0.61187;-0.78288;,\r
- 0.55856;-0.52295;-0.65920;,\r
- 0.68794;-0.53522;0.00266;,\r
- 0.62264;0.12365;0.13707;,\r
- 0.00000;-0.62300;0.20800;,\r
- 0.68794;-0.53522;0.00266;,\r
- 0.00000;0.67600;0.32500;,\r
- 1.34784;-2.31506;0.22159;,\r
- -0.00036;-2.34101;0.33901;,\r
- 0.64036;0.38786;0.28485;,\r
- 0.70784;1.47039;0.42200;,\r
- 0.21590;1.46647;0.44132;,\r
- 0.00000;0.67600;0.32500;,\r
- 0.21590;1.46647;0.44132;,\r
- 0.21590;1.46647;0.44132;,\r
- 0.29892;2.01794;-0.08815;,\r
- 0.00000;2.01600;0.05400;,\r
- 0.21590;1.46647;0.44132;,\r
- 0.86233;-1.78848;-0.58858;,\r
- 0.00000;-1.64400;-1.01200;,\r
- -0.00036;-2.34101;0.33901;,\r
- 1.34784;-2.31506;0.22159;,\r
- 0.00000;1.48300;0.47700;,\r
- 0.00000;3.14501;-0.98060;,\r
- 0.00000;3.80714;-0.75242;,\r
- 0.45083;3.09201;-0.84439;,\r
- 0.54869;2.79080;-0.63716;,\r
- 0.00000;2.75267;-0.82371;,\r
- 0.54087;3.58423;-0.69773;,\r
- 1.00703;3.31745;-0.35273;,\r
- 0.71099;2.28813;-0.66572;,\r
- 0.28386;2.29207;-0.83083;,\r
- 0.00000;2.35906;-1.09979;,\r
- 0.00000;2.75267;-0.82371;,\r
- 0.28386;2.29207;-0.83083;,\r
- 0.00000;2.35906;-1.09979;,\r
- 0.57652;1.92587;-0.72498;,\r
- 0.00000;1.61675;-0.87856;,\r
- 0.00000;1.84558;0.58880;,\r
- 0.00000;1.61675;-0.87856;,\r
- 0.57468;1.95139;0.68270;,\r
- 0.82588;2.65084;1.08449;,\r
- 0.89899;2.30275;0.98211;,\r
- 1.00703;3.31745;-0.35273;,\r
- 1.05104;3.67230;0.17957;,\r
- 0.57468;1.95139;0.68270;,\r
- 0.89499;1.92592;0.08420;,\r
- 0.54869;2.79080;-0.63716;,\r
- 0.45083;3.09201;-0.84439;,\r
- 0.00000;3.72958;1.05475;,\r
- 0.00000;3.27658;1.45380;,\r
- 0.90663;3.21830;1.22060;,\r
- 0.00000;2.38080;1.32796;,\r
- 0.90663;3.21830;1.22060;,\r
- 0.00000;3.27658;1.45380;,\r
- 0.89499;1.92592;0.08420;,\r
- 0.57652;1.92587;-0.72498;,\r
- 0.00000;3.80714;-0.75242;,\r
- 0.00000;4.13778;0.18372;,\r
- 0.54087;3.58423;-0.69773;,\r
- 0.00000;2.38080;1.32796;,\r
- 0.89899;2.30275;0.98211;,\r
- 0.82588;2.65084;1.08449;,\r
- 0.89899;2.30275;0.98211;,\r
- 0.85967;1.96578;-0.63585;,\r
- 1.00703;3.31745;-0.35273;,\r
- 0.89499;1.92592;0.08420;,\r
- 0.85967;1.96578;-0.63585;,\r
- 0.85967;1.96578;-0.63585;,\r
- 1.05104;3.67230;0.17957;,\r
- 0.90663;3.21830;1.22060;,\r
- 0.82588;2.65084;1.08449;,\r
- 1.00703;3.31745;-0.35273;,\r
- 1.68291;3.84190;-0.78819;,\r
- 1.05104;3.67230;0.17957;,\r
- 1.00703;3.31745;-0.35273;,\r
- 0.54087;3.58423;-0.69773;,\r
- 1.68291;3.84190;-0.78819;,\r
- 0.54087;3.58423;-0.69773;,\r
- 1.05104;3.67230;0.17957;,\r
- 1.68291;3.84190;-0.78819;,\r
- 0.00000;4.13778;0.18372;,\r
- 0.86729;4.61507;-0.80806;,\r
- 0.54087;3.58423;-0.69773;,\r
- 0.86729;4.61507;-0.80806;,\r
- 1.05104;3.67230;0.17957;,\r
- 0.54087;3.58423;-0.69773;,\r
- 0.86729;4.61507;-0.80806;,\r
- 0.00000;4.13778;0.18372;,\r
- 1.05104;3.67230;0.17957;,\r
- 0.00000;4.13778;0.18372;,\r
- 0.00000;3.72958;1.05475;,\r
- 0.69255;4.47754;1.19887;,\r
- 0.00000;3.72958;1.05475;,\r
- 0.90663;3.21830;1.22060;,\r
- 1.52478;3.73033;1.95317;,\r
- 1.52478;3.73033;1.95317;,\r
- 0.90663;3.21830;1.22060;,\r
- 1.05104;3.67230;0.17957;,\r
- 1.52478;3.73033;1.95317;,\r
- 1.05104;3.67230;0.17957;,\r
- 0.00000;3.72958;1.05475;,\r
- 0.00000;3.72958;1.05475;,\r
- 1.05104;3.67230;0.17957;,\r
- 0.69255;4.47754;1.19887;,\r
- 0.69255;4.47754;1.19887;,\r
- 1.05104;3.67230;0.17957;,\r
- 0.00000;4.13778;0.18372;,\r
- -0.76306;-1.29886;-0.59323;,\r
- -0.80277;-2.58889;-0.30251;,\r
- -0.83376;-1.25528;-0.30875;,\r
- -0.68794;-0.53522;0.00266;,\r
- -0.63858;-0.50568;-0.44125;,\r
- -0.86522;-1.22997;-0.14551;,\r
- -0.81193;-2.95400;-0.00396;,\r
- -0.68017;-1.20855;-0.05241;,\r
- -0.68794;-0.53522;0.00266;,\r
- -0.86522;-1.22997;-0.14551;,\r
- -0.81193;-2.95400;-0.00396;,\r
- -0.37189;-2.95400;0.22913;,\r
- -0.86522;-1.22997;-0.14551;,\r
- -0.33183;-1.17604;0.07446;,\r
- -0.15072;-0.64497;0.13093;,\r
- -0.33183;-1.17604;0.07446;,\r
- -0.37189;-2.95400;0.22913;,\r
- -0.29130;-1.24712;-0.37368;,\r
- -0.15735;-0.55373;-0.47440;,\r
- -0.15072;-0.64497;0.13093;,\r
- -0.33183;-1.17604;0.07446;,\r
- -0.29130;-1.24712;-0.37368;,\r
- -0.26220;-1.28723;-0.62783;,\r
- -0.31352;-2.53888;-0.29309;,\r
- -0.26220;-1.28723;-0.62783;,\r
- -0.35866;-2.72285;-0.75687;,\r
- -0.47394;-2.95400;-1.01592;,\r
- -0.79865;-2.75765;-0.73990;,\r
- -0.35866;-2.72285;-0.75687;,\r
- -0.36029;-2.95400;-0.79296;,\r
- -0.47394;-2.95400;-1.01592;,\r
- -0.77531;-2.95400;-0.75977;,\r
- -0.79865;-2.75765;-0.73990;,\r
- -0.47394;-2.95400;-1.01592;,\r
- -0.77531;-2.95400;-0.75977;,\r
- -0.81193;-2.95400;-0.00396;,\r
- -0.79865;-2.75765;-0.73990;,\r
- -0.80277;-2.58889;-0.30251;,\r
- -0.79865;-2.75765;-0.73990;,\r
- -0.37189;-2.95400;0.22913;,\r
- -0.31352;-2.53888;-0.29309;,\r
- -0.37189;-2.95400;0.22913;,\r
- -0.35866;-2.72285;-0.75687;,\r
- -0.79865;-2.75765;-0.73990;,\r
- -0.58155;-2.60221;-0.44042;,\r
- -0.35866;-2.72285;-0.75687;,\r
- -0.79865;-2.75765;-0.73990;,\r
- -0.80277;-2.58889;-0.30251;,\r
- -0.58155;-2.60221;-0.44042;,\r
- -0.58155;-2.60221;-0.44042;,\r
- -0.31352;-2.53888;-0.29309;,\r
- -0.80277;-2.58889;-0.30251;,\r
- -0.76306;-1.29886;-0.59323;,\r
- -0.58155;-2.60221;-0.44042;,\r
- -0.31352;-2.53888;-0.29309;,\r
- -0.26220;-1.28723;-0.62783;,\r
- -0.50954;-1.37040;-0.70638;,\r
- -0.63858;-0.50568;-0.44125;,\r
- -0.40349;-0.51331;-0.54983;,\r
- -0.50954;-1.37040;-0.70638;,\r
- -0.76306;-1.29886;-0.59323;,\r
- -0.26220;-1.28723;-0.62783;,\r
- -0.15735;-0.55373;-0.47440;,\r
- -1.38724;1.22166;-0.18900;,\r
- -0.75930;1.00596;-0.44909;,\r
- -0.83839;0.64646;-0.29087;,\r
- -1.12845;0.70096;-0.32097;,\r
- -1.46892;0.65185;-0.20474;,\r
- -1.23366;1.13833;0.32802;,\r
- -1.38724;1.22166;-0.18900;,\r
- -1.46892;0.65185;-0.20474;,\r
- -1.49708;0.67356;0.08021;,\r
- -0.90131;0.41542;-0.15880;,\r
- -1.08304;-0.38219;-0.43918;,\r
- -1.44008;-0.35841;-0.50913;,\r
- -1.31234;0.40147;-0.05174;,\r
- -1.31234;0.40147;-0.05174;,\r
- -1.44008;-0.35841;-0.50913;,\r
- -1.48053;-0.58297;-0.27745;,\r
- -1.43991;0.08641;0.27125;,\r
- -0.90131;0.41542;-0.15880;,\r
- -1.01951;0.56845;0.46641;,\r
- -1.07384;0.08943;0.34476;,\r
- -1.08757;-0.61891;-0.18951;,\r
- -1.08304;-0.38219;-0.43918;,\r
- -0.90131;0.41542;-0.15880;,\r
- -1.07384;0.08943;0.34476;,\r
- -0.83839;0.64646;-0.29087;,\r
- -0.77215;0.92301;0.25592;,\r
- -1.23366;1.13833;0.32802;,\r
- -1.49708;0.67356;0.08021;,\r
- -1.37226;0.43919;0.31433;,\r
- -1.48053;-0.58297;-0.27745;,\r
- -1.08757;-0.61891;-0.18951;,\r
- -1.43991;0.08641;0.27125;,\r
- -1.07384;0.08943;0.34476;,\r
- -1.37226;0.43919;0.31433;,\r
- -1.01951;0.56845;0.46641;,\r
- -1.23366;1.13833;0.32802;,\r
- -1.31234;0.40147;-0.05174;,\r
- -1.46892;0.65185;-0.20474;,\r
- -1.43991;0.08641;0.27125;,\r
- -1.44008;-0.35841;-0.50913;,\r
- -1.47964;-0.85386;-0.90068;,\r
- -1.48053;-0.58297;-0.27745;,\r
- -1.34861;-1.15761;-0.45486;,\r
- -1.10860;-1.05492;-0.46865;,\r
- -1.34861;-1.15761;-0.45486;,\r
- -1.10860;-1.05492;-0.46865;,\r
- -1.21013;-0.81884;-0.86005;,\r
- -1.10986;-0.70604;-0.99091;,\r
- -1.10986;-0.70604;-0.99091;,\r
- -1.44008;-0.35841;-0.50913;,\r
- -1.08304;-0.38219;-0.43918;,\r
- -1.21013;-0.81884;-0.86005;,\r
- -1.06767;-1.00377;-1.01993;,\r
- -1.47964;-0.85386;-0.90068;,\r
- -1.06767;-1.00377;-1.01993;,\r
- -1.25294;-1.03515;-1.08123;,\r
- -1.47964;-0.85386;-0.90068;,\r
- -1.06767;-1.00377;-1.01993;,\r
- -1.21013;-0.81884;-0.86005;,\r
- -1.10860;-1.05492;-0.46865;,\r
- -1.00290;-1.33401;-0.77117;,\r
- -1.06767;-1.00377;-1.01993;,\r
- -1.00290;-1.33401;-0.77117;,\r
- -1.16139;-1.38159;-0.75763;,\r
- -1.25294;-1.03515;-1.08123;,\r
- -1.25294;-1.03515;-1.08123;,\r
- -1.16139;-1.38159;-0.75763;,\r
- -1.34861;-1.15761;-0.45486;,\r
- -1.34861;-1.15761;-0.45486;,\r
- -1.47964;-0.85386;-0.90068;,\r
- -1.25294;-1.03515;-1.08123;,\r
- -1.00290;-1.33401;-0.77117;,\r
- -1.34861;-1.15761;-0.45486;,\r
- -1.16139;-1.38159;-0.75763;,\r
- -1.00290;-1.33401;-0.77117;,\r
- -1.24926;-0.69036;-1.06053;,\r
- -1.44008;-0.35841;-0.50913;,\r
- -1.24926;-0.69036;-1.06053;,\r
- -1.21013;-0.81884;-0.86005;,\r
- -1.44008;-0.35841;-0.50913;,\r
- -1.24926;-0.69036;-1.06053;,\r
- -1.10986;-0.70604;-0.99091;,\r
- -1.21013;-0.81884;-0.86005;,\r
- -1.38724;1.22166;-0.18900;,\r
- -0.71312;1.42286;0.29508;,\r
- -0.75930;1.00596;-0.44909;,\r
- -1.23366;1.13833;0.32802;,\r
- -0.77215;0.92301;0.25592;,\r
- -0.71312;1.42286;0.29508;,\r
- -0.83839;0.64646;-0.29087;,\r
- -0.40223;1.19293;0.12287;,\r
- -0.77215;0.92301;0.25592;,\r
- -0.71312;1.42286;0.29508;,\r
- -0.40223;1.19293;0.12287;,\r
- -0.83839;0.64646;-0.29087;,\r
- -0.75930;1.00596;-0.44909;,\r
- -0.40223;1.19293;0.12287;,\r
- -0.40223;1.19293;0.12287;,\r
- -0.99307;1.04154;-0.52540;,\r
- -0.99307;1.04154;-0.52540;,\r
- -0.46391;1.60254;-0.14270;,\r
- -0.70784;1.47039;0.42200;,\r
- -0.46391;1.60254;-0.14270;,\r
- -0.46391;1.60254;-0.14270;,\r
- -0.29892;2.01794;-0.08815;,\r
- -0.76644;0.61187;-0.78288;,\r
- -0.99307;1.04154;-0.52540;,\r
- -0.64036;0.38786;0.28485;,\r
- -0.99307;1.04154;-0.52540;,\r
- -0.76644;0.61187;-0.78288;,\r
- -0.64036;0.38786;0.28485;,\r
- -0.70784;1.47039;0.42200;,\r
- -0.99307;1.04154;-0.52540;,\r
- -0.76644;0.61187;-0.78288;,\r
- -0.59030;0.15838;-0.73047;,\r
- -0.62264;0.12365;0.13707;,\r
- -0.64036;0.38786;0.28485;,\r
- -0.70784;1.47039;0.42200;,\r
- -0.64036;0.38786;0.28485;,\r
- -0.86233;-1.78848;-0.58858;,\r
- -0.76644;0.61187;-0.78288;,\r
- -0.55856;-0.52295;-0.65920;,\r
- -0.68794;-0.53522;0.00266;,\r
- -0.68794;-0.53522;0.00266;,\r
- -0.62264;0.12365;0.13707;,\r
- 0.00036;-2.34101;0.33901;,\r
- -1.34784;-2.31506;0.22159;,\r
- -0.64036;0.38786;0.28485;,\r
- -0.21590;1.46647;0.44132;,\r
- -0.70784;1.47039;0.42200;,\r
- -0.21590;1.46647;0.44132;,\r
- -0.21590;1.46647;0.44132;,\r
- -0.21590;1.46647;0.44132;,\r
- -0.29892;2.01794;-0.08815;,\r
- -0.86233;-1.78848;-0.58858;,\r
- -1.34784;-2.31506;0.22159;,\r
- 0.00036;-2.34101;0.33901;,\r
- -0.45083;3.09201;-0.84439;,\r
- -0.54869;2.79080;-0.63716;,\r
- -1.00703;3.31745;-0.35273;,\r
- -0.54087;3.58423;-0.69773;,\r
- -0.28386;2.29207;-0.83083;,\r
- -0.71099;2.28813;-0.66572;,\r
- -0.28386;2.29207;-0.83083;,\r
- -0.57652;1.92587;-0.72498;,\r
- -0.57468;1.95139;0.68270;,\r
- -1.05104;3.67230;0.17957;,\r
- -1.00703;3.31745;-0.35273;,\r
- -0.89899;2.30275;0.98211;,\r
- -0.82588;2.65084;1.08449;,\r
- -0.89499;1.92592;0.08420;,\r
- -0.57468;1.95139;0.68270;,\r
- -0.45083;3.09201;-0.84439;,\r
- -0.54869;2.79080;-0.63716;,\r
- -0.90663;3.21830;1.22060;,\r
- -0.90663;3.21830;1.22060;,\r
- -0.57652;1.92587;-0.72498;,\r
- -0.89499;1.92592;0.08420;,\r
- -0.54087;3.58423;-0.69773;,\r
- -0.89899;2.30275;0.98211;,\r
- -0.89899;2.30275;0.98211;,\r
- -0.82588;2.65084;1.08449;,\r
- -0.89499;1.92592;0.08420;,\r
- -1.00703;3.31745;-0.35273;,\r
- -0.85967;1.96578;-0.63585;,\r
- -0.85967;1.96578;-0.63585;,\r
- -0.85967;1.96578;-0.63585;,\r
- -0.82588;2.65084;1.08449;,\r
- -0.90663;3.21830;1.22060;,\r
- -1.05104;3.67230;0.17957;,\r
- -1.05104;3.67230;0.17957;,\r
- -1.68291;3.84190;-0.78819;,\r
- -1.00703;3.31745;-0.35273;,\r
- -1.68291;3.84190;-0.78819;,\r
- -0.54087;3.58423;-0.69773;,\r
- -1.00703;3.31745;-0.35273;,\r
- -1.68291;3.84190;-0.78819;,\r
- -1.05104;3.67230;0.17957;,\r
- -0.54087;3.58423;-0.69773;,\r
- -0.54087;3.58423;-0.69773;,\r
- -0.86729;4.61507;-0.80806;,\r
- -0.54087;3.58423;-0.69773;,\r
- -1.05104;3.67230;0.17957;,\r
- -0.86729;4.61507;-0.80806;,\r
- -1.05104;3.67230;0.17957;,\r
- -0.86729;4.61507;-0.80806;,\r
- -0.69255;4.47754;1.19887;,\r
- -1.52478;3.73033;1.95317;,\r
- -0.90663;3.21830;1.22060;,\r
- -1.05104;3.67230;0.17957;,\r
- -0.90663;3.21830;1.22060;,\r
- -1.52478;3.73033;1.95317;,\r
- -1.05104;3.67230;0.17957;,\r
- -1.52478;3.73033;1.95317;,\r
- -0.69255;4.47754;1.19887;,\r
- -1.05104;3.67230;0.17957;,\r
- -1.05104;3.67230;0.17957;,\r
- -0.69255;4.47754;1.19887;;\r
- \r
- 298;\r
- 3;0,1,2;,\r
- 4;0,2,3,4;,\r
- 3;0,4,5;,\r
- 4;0,5,6,1;,\r
- 3;7,8,9;,\r
- 4;10,9,11,12;,\r
- 3;13,11,9;,\r
- 4;13,9,8,14;,\r
- 3;15,16,17;,\r
- 4;18,19,20,21;,\r
- 3;18,21,22;,\r
- 4;15,23,24,16;,\r
- 3;25,26,27;,\r
- 3;28,29,30;,\r
- 3;31,32,33;,\r
- 3;34,35,36;,\r
- 3;6,37,38;,\r
- 3;39,30,29;,\r
- 3;40,41,42;,\r
- 3;43,44,45;,\r
- 3;46,47,48;,\r
- 3;27,49,50;,\r
- 3;51,52,53;,\r
- 3;54,51,55;,\r
- 3;56,52,51;,\r
- 3;54,56,51;,\r
- 3;57,58,59;,\r
- 3;60,57,59;,\r
- 3;61,58,62;,\r
- 3;57,62,58;,\r
- 4;63,64,65,66;,\r
- 3;63,66,67;,\r
- 4;68,69,70,71;,\r
- 4;72,73,74,75;,\r
- 4;76,77,78,79;,\r
- 3;75,64,63;,\r
- 3;63,67,72;,\r
- 3;72,75,63;,\r
- 3;80,81,82;,\r
- 3;83,84,85;,\r
- 3;83,85,86;,\r
- 3;87,88,82;,\r
- 3;89,90,91;,\r
- 3;81,87,82;,\r
- 3;92,93,94;,\r
- 3;92,95,93;,\r
- 3;95,92,96;,\r
- 3;96,97,95;,\r
- 3;98,97,96;,\r
- 3;90,89,99;,\r
- 3;90,99,100;,\r
- 3;99,89,101;,\r
- 3;102,103,104;,\r
- 3;102,105,103;,\r
- 3;93,106,94;,\r
- 3;106,107,94;,\r
- 3;108,109,85;,\r
- 3;110,108,85;,\r
- 3;85,84,110;,\r
- 3;111,112,113;,\r
- 3;114,115,116;,\r
- 3;117,118,119;,\r
- 3;120,121,122;,\r
- 3;122,123,120;,\r
- 3;124,125,126;,\r
- 3;126,127,124;,\r
- 3;128,129,130;,\r
- 3;131,132,133;,\r
- 3;107,106,134;,\r
- 3;135,136,137;,\r
- 3;112,138,113;,\r
- 3;139,114,116;,\r
- 3;140,141,142;,\r
- 3;143,144,145;,\r
- 3;146,147,148;,\r
- 3;147,149,148;,\r
- 3;97,98,150;,\r
- 3;151,150,98;,\r
- 3;152,153,154;,\r
- 3;155,156,146;,\r
- 3;157,158,159;,\r
- 3;151,160,150;,\r
- 3;161,162,163;,\r
- 3;164,165,166;,\r
- 3;165,167,166;,\r
- 3;168,169,170;,\r
- 3;171,172,173;,\r
- 3;174,175,176;,\r
- 3;177,178,179;,\r
- 3;180,181,182;,\r
- 3;183,184,185;,\r
- 3;185,186,183;,\r
- 3;187,188,189;,\r
- 3;190,191,192;,\r
- 3;191,190,193;,\r
- 3;183,194,184;,\r
- 3;183,195,194;,\r
- 3;196,197,198;,\r
- 3;199,200,201;,\r
- 3;199,202,200;,\r
- 3;203,204,205;,\r
- 3;165,206,167;,\r
- 3;173,172,207;,\r
- 3;208,209,210;,\r
- 3;174,211,212;,\r
- 3;174,176,211;,\r
- 3;187,213,214;,\r
- 3;188,187,214;,\r
- 3;210,215,187;,\r
- 3;215,210,209;,\r
- 3;216,217,218;,\r
- 4;216,218,219,220;,\r
- 3;218,221,222;,\r
- 3;218,217,221;,\r
- 4;223,224,220,219;,\r
- 3;225,226,227;,\r
- 4;228,224,229,230;,\r
- 3;231,232,233;,\r
- 4;234,235,236,237;,\r
- 4;235,238,239,236;,\r
- 3;222,240,241;,\r
- 3;224,223,229;,\r
- 3;242,243,244;,\r
- 3;245,246,247;,\r
- 3;248,233,249;,\r
- 3;250,251,252;,\r
- 3;231,233,253;,\r
- 3;254,253,233;,\r
- 3;255,245,256;,\r
- 3;255,246,245;,\r
- 3;219,222,223;,\r
- 3;257,258,259;,\r
- 3;222,260,223;,\r
- 3;260,229,223;,\r
- 3;248,249,261;,\r
- 3;262,263,264;,\r
- 3;265,266,267;,\r
- 3;268,269,270;,\r
- 3;271,272,273;,\r
- 3;274,275,276;,\r
- 3;277,278,279;,\r
- 3;280,281,282;,\r
- 3;283,284,285;,\r
- 3;286,287,288;,\r
- 3;289,290,291;,\r
- 3;292,293,294;,\r
- 3;295,296,297;,\r
- 3;298,299,300;,\r
- 3;233,232,249;,\r
- 3;301,302,303;,\r
- 4;304,305,301,303;,\r
- 3;306,304,303;,\r
- 4;302,307,306,303;,\r
- 3;308,309,310;,\r
- 4;311,312,308,313;,\r
- 3;308,312,314;,\r
- 4;315,309,308,314;,\r
- 3;316,317,318;,\r
- 4;319,320,321,322;,\r
- 3;323,319,322;,\r
- 4;317,324,325,318;,\r
- 3;326,327,328;,\r
- 3;329,330,331;,\r
- 3;332,333,334;,\r
- 3;335,336,337;,\r
- 3;338,339,307;,\r
- 3;330,329,340;,\r
- 3;341,342,343;,\r
- 3;344,345,346;,\r
- 3;347,348,349;,\r
- 3;350,351,326;,\r
- 3;352,353,354;,\r
- 3;355,354,356;,\r
- 3;354,353,357;,\r
- 3;354,357,356;,\r
- 3;358,359,360;,\r
- 3;358,360,361;,\r
- 3;362,359,363;,\r
- 3;359,362,360;,\r
- 4;364,365,366,367;,\r
- 3;368,364,367;,\r
- 4;369,370,371,372;,\r
- 4;373,374,375,376;,\r
- 4;377,378,379,380;,\r
- 3;367,366,373;,\r
- 3;376,368,367;,\r
- 3;367,373,376;,\r
- 3;381,382,383;,\r
- 3;384,385,386;,\r
- 3;387,384,386;,\r
- 3;381,388,389;,\r
- 3;390,391,392;,\r
- 3;381,389,382;,\r
- 3;393,394,395;,\r
- 3;394,396,395;,\r
- 3;397,395,396;,\r
- 3;396,398,397;,\r
- 3;397,398,399;,\r
- 3;400,392,391;,\r
- 3;401,400,391;,\r
- 3;402,392,400;,\r
- 3;403,404,405;,\r
- 3;404,406,405;,\r
- 3;393,407,394;,\r
- 3;393,408,407;,\r
- 3;384,409,410;,\r
- 3;384,410,411;,\r
- 3;411,385,384;,\r
- 3;412,413,414;,\r
- 3;415,416,417;,\r
- 3;418,419,420;,\r
- 3;421,422,423;,\r
- 3;423,424,421;,\r
- 3;425,426,427;,\r
- 3;427,428,425;,\r
- 3;429,430,431;,\r
- 3;432,433,434;,\r
- 3;435,407,408;,\r
- 3;436,437,438;,\r
- 3;412,439,413;,\r
- 3;415,417,440;,\r
- 3;441,442,443;,\r
- 3;444,445,446;,\r
- 3;447,448,449;,\r
- 3;447,450,448;,\r
- 3;451,399,398;,\r
- 3;399,451,452;,\r
- 3;453,454,455;,\r
- 3;449,456,457;,\r
- 3;458,459,460;,\r
- 3;451,461,452;,\r
- 3;462,162,161;,\r
- 3;463,464,164;,\r
- 3;463,465,464;,\r
- 3;466,169,168;,\r
- 3;467,468,171;,\r
- 3;469,470,174;,\r
- 3;471,472,473;,\r
- 3;474,475,476;,\r
- 3;477,478,479;,\r
- 3;479,480,477;,\r
- 3;481,482,187;,\r
- 3;192,191,483;,\r
- 3;484,483,191;,\r
- 3;478,485,479;,\r
- 3;485,486,479;,\r
- 3;487,197,488;,\r
- 3;489,490,199;,\r
- 3;490,491,199;,\r
- 3;205,492,493;,\r
- 3;465,494,464;,\r
- 3;495,468,467;,\r
- 3;496,209,497;,\r
- 3;212,498,174;,\r
- 3;498,469,174;,\r
- 3;499,500,187;,\r
- 3;499,187,482;,\r
- 3;187,215,496;,\r
- 3;209,496,215;,\r
- 3;501,217,216;,\r
- 4;220,502,501,216;,\r
- 3;503,504,501;,\r
- 3;504,217,501;,\r
- 4;502,220,505,506;,\r
- 3;507,226,225;,\r
- 4;230,508,505,228;,\r
- 3;509,232,231;,\r
- 4;510,511,512,513;,\r
- 4;511,514,515,512;,\r
- 3;516,517,503;,\r
- 3;508,506,505;,\r
- 3;518,243,242;,\r
- 3;247,519,245;,\r
- 3;520,509,521;,\r
- 3;522,251,250;,\r
- 3;253,509,231;,\r
- 3;509,253,523;,\r
- 3;524,245,525;,\r
- 3;245,519,525;,\r
- 3;506,503,502;,\r
- 3;526,527,528;,\r
- 3;506,529,503;,\r
- 3;506,508,529;,\r
- 3;530,520,521;,\r
- 3;531,532,533;,\r
- 3;534,535,536;,\r
- 3;537,538,539;,\r
- 3;540,541,542;,\r
- 3;543,544,274;,\r
- 3;545,546,547;,\r
- 3;548,281,549;,\r
- 3;550,284,283;,\r
- 3;551,552,286;,\r
- 3;553,554,555;,\r
- 3;294,556,557;,\r
- 3;558,559,295;,\r
- 3;300,560,561;,\r
- 3;520,232,509;;\r
- \r
- MeshMaterialList {\r
- 9;\r
- 298;\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 5,\r
- 2,\r
- 2,\r
- 5,\r
- 2,\r
- 5,\r
- 5,\r
- 2,\r
- 4,\r
- 4,\r
- 4,\r
- 4,\r
- 2,\r
- 4,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 5,\r
- 5,\r
- 5,\r
- 5,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 5,\r
- 2,\r
- 2,\r
- 8,\r
- 2,\r
- 5,\r
- 2,\r
- 2,\r
- 5,\r
- 5,\r
- 5,\r
- 2,\r
- 2,\r
- 2,\r
- 4,\r
- 4,\r
- 4,\r
- 4,\r
- 4,\r
- 4,\r
- 4,\r
- 4,\r
- 4,\r
- 4,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 4,\r
- 4,\r
- 4,\r
- 4,\r
- 4,\r
- 4,\r
- 2,\r
- 2,\r
- 5,\r
- 5,\r
- 5,\r
- 8,\r
- 5,\r
- 5,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 5,\r
- 1,\r
- 2,\r
- 2,\r
- 5,\r
- 5,\r
- 2,\r
- 7,\r
- 7,\r
- 5,\r
- 5,\r
- 5,\r
- 6,\r
- 6,\r
- 2,\r
- 2,\r
- 5,\r
- 5,\r
- 1,\r
- 1,\r
- 6,\r
- 6,\r
- 2,\r
- 5,\r
- 1,\r
- 1,\r
- 1,\r
- 1,\r
- 1,\r
- 1,\r
- 1,\r
- 3,\r
- 2,\r
- 2,\r
- 1,\r
- 1,\r
- 2,\r
- 3,\r
- 3,\r
- 2,\r
- 3,\r
- 3,\r
- 3,\r
- 3,\r
- 1,\r
- 2,\r
- 1,\r
- 1,\r
- 3,\r
- 3,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 3,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 5,\r
- 2,\r
- 2,\r
- 5,\r
- 2,\r
- 5,\r
- 5,\r
- 2,\r
- 4,\r
- 4,\r
- 4,\r
- 4,\r
- 2,\r
- 4,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 5,\r
- 5,\r
- 5,\r
- 5,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 5,\r
- 2,\r
- 2,\r
- 8,\r
- 2,\r
- 5,\r
- 2,\r
- 2,\r
- 5,\r
- 5,\r
- 5,\r
- 2,\r
- 2,\r
- 2,\r
- 4,\r
- 4,\r
- 4,\r
- 4,\r
- 4,\r
- 4,\r
- 4,\r
- 4,\r
- 4,\r
- 4,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 4,\r
- 4,\r
- 4,\r
- 4,\r
- 4,\r
- 4,\r
- 2,\r
- 2,\r
- 5,\r
- 5,\r
- 5,\r
- 8,\r
- 5,\r
- 5,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 5,\r
- 1,\r
- 2,\r
- 2,\r
- 5,\r
- 5,\r
- 2,\r
- 7,\r
- 7,\r
- 5,\r
- 5,\r
- 5,\r
- 6,\r
- 6,\r
- 2,\r
- 2,\r
- 5,\r
- 5,\r
- 1,\r
- 1,\r
- 6,\r
- 6,\r
- 2,\r
- 5,\r
- 1,\r
- 1,\r
- 1,\r
- 1,\r
- 1,\r
- 1,\r
- 1,\r
- 3,\r
- 2,\r
- 2,\r
- 1,\r
- 1,\r
- 2,\r
- 3,\r
- 3,\r
- 2,\r
- 3,\r
- 3,\r
- 3,\r
- 3,\r
- 1,\r
- 2,\r
- 1,\r
- 1,\r
- 3,\r
- 3,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 2,\r
- 3;;\r
- Material {\r
- 0.800000;0.800000;0.800000;1.000000;;\r
- 5.000000;\r
- 0.000000;0.000000;0.000000;;\r
- 0.000000;0.000000;0.000000;;\r
- }\r
- Material {\r
- 0.800000;0.800000;0.800000;1.000000;;\r
- 5.000000;\r
- 0.000000;0.000000;0.000000;;\r
- 0.000000;0.000000;0.000000;;\r
- TextureFilename {\r
- "samaru_high.bmp";\r
- }\r
- }\r
- Material {\r
- 0.800000;0.800000;0.800000;1.000000;;\r
- 5.000000;\r
- 0.000000;0.000000;0.000000;;\r
- 0.000000;0.000000;0.000000;;\r
- TextureFilename {\r
- "samaru_low.bmp";\r
- }\r
- }\r
- Material {\r
- 0.094400;0.357600;0.072000;1.000000;;\r
- 5.000000;\r
- 0.000000;0.000000;0.000000;;\r
- 0.000000;0.000000;0.000000;;\r
- }\r
- Material {\r
- 0.166400;0.392000;0.122400;1.000000;;\r
- 5.000000;\r
- 0.000000;0.000000;0.000000;;\r
- 0.000000;0.000000;0.000000;;\r
- }\r
- Material {\r
- 0.162000;0.162000;0.162000;1.000000;;\r
- 5.000000;\r
- 0.000000;0.000000;0.000000;;\r
- 0.000000;0.000000;0.000000;;\r
- }\r
- Material {\r
- 0.661640;0.495720;0.090440;1.000000;;\r
- 0.000000;\r
- 0.000000;0.000000;0.000000;;\r
- 0.000000;0.000000;0.000000;;\r
- }\r
- Material {\r
- 0.263670;0.263670;0.263670;1.000000;;\r
- 5.000000;\r
- 0.000000;0.000000;0.000000;;\r
- 0.000000;0.000000;0.000000;;\r
- }\r
- Material {\r
- 1.000000;1.000000;1.000000;1.000000;;\r
- 0.000000;\r
- 0.000000;0.000000;0.000000;;\r
- 0.000000;0.000000;0.000000;;\r
- }\r
- }\r
- MeshNormals {\r
- 355;\r
- -0.974589;-0.207706;0.083868;,\r
- 0.632823;0.244486;-0.734684;,\r
- -0.994906;-0.092058;0.041076;,\r
- 0.942901;-0.057262;-0.328114;,\r
- 0.946462;0.252056;-0.201684;,\r
- 0.996955;-0.043545;-0.064685;,\r
- 0.405237;0.074339;0.911184;,\r
- 0.286001;-0.051726;0.956832;,\r
- -0.988215;-0.089665;0.124063;,\r
- 0.974176;0.113662;-0.195093;,\r
- 0.975131;0.129382;-0.179942;,\r
- 0.318060;0.018707;0.947886;,\r
- 0.729051;0.019544;-0.684180;,\r
- 0.386027;0.004635;0.922476;,\r
- -0.989546;-0.110458;0.092724;,\r
- 0.064206;0.876253;-0.477555;,\r
- 0.280465;0.735992;-0.616162;,\r
- 0.416877;0.433612;-0.798870;,\r
- -0.973317;0.028682;-0.227665;,\r
- 0.894894;-0.061646;-0.442001;,\r
- 0.090958;0.921325;-0.378005;,\r
- 0.124315;0.044071;-0.991264;,\r
- -0.057797;0.178904;-0.982167;,\r
- 0.182362;-0.184933;-0.965683;,\r
- 0.259954;-0.056339;-0.963976;,\r
- -0.068980;0.673682;-0.735795;,\r
- -0.123528;0.722340;-0.680416;,\r
- 0.756028;0.376630;0.535324;,\r
- 0.999738;0.016184;-0.016202;,\r
- -0.802911;-0.430020;0.412815;,\r
- -0.980040;-0.197453;-0.023124;,\r
- 0.094325;-0.346327;-0.933360;,\r
- 0.184782;-0.374878;-0.908472;,\r
- 0.968531;-0.192714;0.157508;,\r
- 0.274318;-0.277396;-0.920761;,\r
- 0.023907;0.437435;-0.898932;,\r
- 0.457027;-0.017632;0.889278;,\r
- -0.919291;-0.305205;0.248502;,\r
- 0.079922;-0.246155;-0.965930;,\r
- 0.971067;0.193073;-0.140538;,\r
- -0.960705;-0.172346;0.217586;,\r
- 0.956801;-0.283225;-0.065697;,\r
- 0.877907;-0.463682;-0.119495;,\r
- -0.999855;-0.002243;-0.016893;,\r
- -0.086268;-0.493672;0.865359;,\r
- -0.934262;-0.356360;0.012759;,\r
- -0.056638;0.712219;-0.699669;,\r
- -0.086917;0.755451;-0.649414;,\r
- -0.960776;0.260368;0.095491;,\r
- -0.226046;-0.592739;-0.773022;,\r
- -0.302663;0.859203;-0.412511;,\r
- 0.006591;0.964119;-0.265388;,\r
- -0.802989;-0.592565;-0.063839;,\r
- -0.000000;0.261978;-0.965074;,\r
- 0.346729;0.645687;-0.680344;,\r
- 0.926557;0.357446;0.117153;,\r
- 0.000000;0.473276;-0.880914;,\r
- 0.625038;0.504083;-0.596010;,\r
- 0.684696;0.206156;-0.699065;,\r
- 0.925282;0.374983;-0.056928;,\r
- 0.000000;-0.094325;0.995541;,\r
- 0.024088;0.183476;-0.982729;,\r
- 0.961042;-0.234924;0.145631;,\r
- 0.976378;-0.211363;-0.044859;,\r
- 0.993643;-0.102267;-0.047063;,\r
- 0.000000;-0.108091;0.994141;,\r
- -0.167388;-0.005881;0.985873;,\r
- 0.992545;0.042365;-0.114277;,\r
- 0.972945;0.134717;-0.187693;,\r
- 0.000000;-0.169741;0.985489;,\r
- -0.086676;-0.004616;-0.996226;,\r
- -0.072860;0.001649;-0.997341;,\r
- 0.191310;0.248729;0.949492;,\r
- -0.000000;0.642902;0.765948;,\r
- 0.000000;0.238957;0.971030;,\r
- -0.000000;0.551611;-0.834101;,\r
- 0.000000;-0.157455;-0.987526;,\r
- 0.169232;0.905841;0.388347;,\r
- 0.613895;0.273685;-0.740425;,\r
- 0.857601;-0.070257;-0.509495;,\r
- 0.893357;-0.437571;0.102201;,\r
- 0.379295;-0.024416;-0.924954;,\r
- 0.953252;-0.293382;0.072369;,\r
- 0.158620;-0.008878;-0.987300;,\r
- 0.440829;-0.079155;-0.894094;,\r
- -0.000000;-0.059552;-0.998225;,\r
- 0.451741;0.003038;-0.892144;,\r
- 0.607805;0.151240;-0.779551;,\r
- 0.479399;0.127403;-0.868300;,\r
- 0.365191;0.111309;-0.924254;,\r
- 0.000000;-0.924149;0.382033;,\r
- 0.991843;-0.087116;0.093046;,\r
- -0.000000;-0.470080;0.882624;,\r
- 0.310771;-0.901809;0.300271;,\r
- 0.840245;-0.265022;0.473024;,\r
- 0.115627;-0.084648;0.989679;,\r
- 0.134622;0.990779;-0.015304;,\r
- 0.000000;0.287711;0.957717;,\r
- 0.993811;-0.097010;-0.054119;,\r
- 0.704778;-0.615801;0.352245;,\r
- -0.782089;0.183926;-0.595406;,\r
- -0.729405;0.619435;0.290292;,\r
- -0.431206;-0.527102;0.732274;,\r
- 0.974589;-0.207706;0.083868;,\r
- -0.632823;0.244486;-0.734684;,\r
- 0.994906;-0.092058;0.041076;,\r
- -0.942901;-0.057262;-0.328114;,\r
- -0.946462;0.252056;-0.201684;,\r
- -0.996955;-0.043545;-0.064685;,\r
- -0.405237;0.074339;0.911184;,\r
- -0.286001;-0.051726;0.956832;,\r
- 0.988215;-0.089665;0.124063;,\r
- -0.974176;0.113662;-0.195093;,\r
- -0.975131;0.129382;-0.179942;,\r
- -0.318060;0.018707;0.947886;,\r
- -0.729051;0.019544;-0.684180;,\r
- -0.386027;0.004635;0.922476;,\r
- 0.989546;-0.110458;0.092724;,\r
- -0.064206;0.876253;-0.477555;,\r
- -0.280465;0.735992;-0.616162;,\r
- -0.416877;0.433612;-0.798870;,\r
- 0.973317;0.028682;-0.227665;,\r
- -0.894894;-0.061646;-0.442001;,\r
- -0.090958;0.921325;-0.378005;,\r
- -0.124315;0.044071;-0.991264;,\r
- 0.057797;0.178904;-0.982167;,\r
- -0.182362;-0.184933;-0.965683;,\r
- -0.259954;-0.056339;-0.963976;,\r
- 0.068980;0.673682;-0.735795;,\r
- 0.123528;0.722340;-0.680416;,\r
- -0.756028;0.376630;0.535324;,\r
- -0.999738;0.016184;-0.016202;,\r
- 0.802911;-0.430020;0.412815;,\r
- 0.980040;-0.197453;-0.023124;,\r
- -0.094325;-0.346327;-0.933360;,\r
- -0.184782;-0.374878;-0.908472;,\r
- -0.968531;-0.192714;0.157508;,\r
- -0.274318;-0.277396;-0.920761;,\r
- -0.023907;0.437435;-0.898932;,\r
- -0.457027;-0.017632;0.889278;,\r
- 0.919291;-0.305205;0.248502;,\r
- -0.079922;-0.246155;-0.965930;,\r
- -0.971067;0.193073;-0.140538;,\r
- 0.960705;-0.172346;0.217586;,\r
- -0.956801;-0.283225;-0.065697;,\r
- -0.877907;-0.463682;-0.119495;,\r
- 0.999855;-0.002243;-0.016893;,\r
- 0.086268;-0.493672;0.865359;,\r
- 0.934262;-0.356360;0.012759;,\r
- 0.056638;0.712219;-0.699669;,\r
- 0.086917;0.755451;-0.649414;,\r
- 0.960776;0.260368;0.095491;,\r
- 0.226046;-0.592739;-0.773022;,\r
- 0.302663;0.859203;-0.412511;,\r
- -0.006591;0.964119;-0.265388;,\r
- 0.802989;-0.592565;-0.063839;,\r
- -0.346729;0.645687;-0.680344;,\r
- -0.926557;0.357446;0.117153;,\r
- -0.625038;0.504083;-0.596010;,\r
- -0.925282;0.374983;-0.056928;,\r
- -0.024088;0.183476;-0.982729;,\r
- -0.961042;-0.234924;0.145631;,\r
- -0.976378;-0.211363;-0.044859;,\r
- -0.993643;-0.102267;-0.047063;,\r
- 0.167388;-0.005881;0.985873;,\r
- -0.992545;0.042365;-0.114277;,\r
- -0.972945;0.134717;-0.187693;,\r
- 0.086676;-0.004616;-0.996226;,\r
- 0.072860;0.001649;-0.997341;,\r
- -0.191310;0.248729;0.949492;,\r
- -0.613895;0.273685;-0.740425;,\r
- -0.857601;-0.070257;-0.509495;,\r
- -0.893357;-0.437571;0.102201;,\r
- -0.379295;-0.024416;-0.924954;,\r
- -0.953252;-0.293382;0.072369;,\r
- -0.440829;-0.079155;-0.894094;,\r
- -0.451741;0.003038;-0.892144;,\r
- -0.479399;0.127403;-0.868300;,\r
- -0.365191;0.111309;-0.924254;,\r
- -0.991843;-0.087116;0.093046;,\r
- -0.310771;-0.901809;0.300271;,\r
- -0.840245;-0.265022;0.473024;,\r
- -0.115627;-0.084648;0.989679;,\r
- -0.993811;-0.097010;-0.054119;,\r
- -0.704778;-0.615801;0.352245;,\r
- 0.782089;0.183926;-0.595406;,\r
- 0.729405;0.619435;0.290292;,\r
- 0.431206;-0.527102;0.732274;,\r
- 0.451846;-0.009454;0.892046;,\r
- 0.364714;-0.065207;0.928833;,\r
- 0.460683;0.059358;0.885578;,\r
- -0.997574;-0.051785;0.046530;,\r
- -0.989473;-0.131178;0.061126;,\r
- -0.968827;-0.246033;0.029028;,\r
- -0.889077;0.064488;-0.453192;,\r
- -0.986136;-0.040190;-0.160997;,\r
- 0.998254;-0.050052;-0.031367;,\r
- 0.166760;0.919372;-0.356296;,\r
- 0.017918;0.929986;-0.367158;,\r
- 0.221364;-0.201266;-0.954196;,\r
- -0.368641;-0.041997;-0.928623;,\r
- -0.510650;-0.241613;-0.825142;,\r
- -0.312282;0.151531;-0.937826;,\r
- 0.985569;-0.165261;0.036630;,\r
- 0.772332;0.600569;0.206929;,\r
- 0.996189;-0.033284;-0.080615;,\r
- 0.976247;-0.187125;-0.109210;,\r
- 0.183204;-0.592626;-0.784366;,\r
- -0.962047;-0.246690;0.116661;,\r
- -0.990608;-0.107745;-0.084183;,\r
- -0.875507;-0.481747;-0.037509;,\r
- 0.198828;-0.443934;0.873722;,\r
- 0.204147;-0.574028;0.792979;,\r
- 0.100949;-0.475999;0.873633;,\r
- 0.232158;-0.299965;0.925269;,\r
- 0.161385;0.070317;0.984383;,\r
- 0.974234;-0.175744;-0.141358;,\r
- -0.255186;-0.544666;0.798886;,\r
- -0.952301;0.305156;0.001595;,\r
- -0.230001;0.857161;-0.460841;,\r
- -0.050558;0.681923;-0.729674;,\r
- -0.032120;0.641774;-0.766221;,\r
- -0.907349;0.407020;0.105132;,\r
- -0.106855;-0.584770;-0.804131;,\r
- -0.341793;-0.591676;-0.730135;,\r
- 0.873577;-0.434903;-0.218455;,\r
- 0.801871;-0.551343;-0.230267;,\r
- -0.289678;-0.665601;0.687795;,\r
- -0.264650;-0.689775;0.673922;,\r
- 0.914136;-0.398087;-0.076696;,\r
- -0.186362;-0.810265;-0.555643;,\r
- -0.217301;0.845765;-0.487300;,\r
- -0.094113;0.866050;-0.491020;,\r
- -0.208569;0.122117;0.970354;,\r
- -0.265413;-0.106416;0.958244;,\r
- -0.337098;0.812286;-0.475979;,\r
- -0.839100;-0.362936;-0.405202;,\r
- -0.412037;-0.119428;0.903306;,\r
- 0.946510;-0.322256;0.016408;,\r
- 0.940223;-0.293762;0.172292;,\r
- 0.032328;-0.067110;0.997222;,\r
- 0.022754;-0.141127;0.989730;,\r
- 0.000000;-0.005965;0.999982;,\r
- 0.133431;0.085256;0.987384;,\r
- 0.301151;-0.161861;0.939739;,\r
- -0.000000;0.001653;-0.999999;,\r
- -0.059027;0.007913;-0.998225;,\r
- 0.001170;0.973805;0.227382;,\r
- 0.856990;0.283905;0.430076;,\r
- 0.331213;0.627060;0.705049;,\r
- 0.167388;0.005881;-0.985873;,\r
- 0.000000;0.108091;-0.994141;,\r
- 0.086676;0.004616;0.996226;,\r
- 0.072860;-0.001649;0.997341;,\r
- 0.000000;-0.995901;0.090447;,\r
- 0.056749;-0.998140;-0.022273;,\r
- 0.198868;-0.979981;-0.009452;,\r
- 0.188382;-0.731906;0.654848;,\r
- 0.344255;-0.232792;0.909558;,\r
- 0.380972;0.090455;-0.920151;,\r
- 0.158509;-0.985389;-0.062324;,\r
- 0.905968;-0.419458;-0.057254;,\r
- 0.105774;-0.712375;-0.693782;,\r
- -0.217832;0.975563;0.028740;,\r
- 0.134260;0.990449;0.031390;,\r
- -0.869321;0.462045;-0.175483;,\r
- 0.834394;-0.312786;-0.453819;,\r
- 0.318897;0.714508;0.622722;,\r
- 0.000000;-0.630279;0.776369;,\r
- 0.744052;-0.644066;-0.177668;,\r
- 0.022273;0.999005;-0.038635;,\r
- 0.499611;-0.585596;0.638331;,\r
- 0.348436;0.791239;-0.502527;,\r
- -0.364714;-0.065207;0.928833;,\r
- -0.451846;-0.009454;0.892046;,\r
- -0.460683;0.059358;0.885578;,\r
- 0.989473;-0.131178;0.061126;,\r
- 0.997574;-0.051785;0.046530;,\r
- 0.968827;-0.246033;0.029028;,\r
- 0.986136;-0.040190;-0.160997;,\r
- 0.889077;0.064488;-0.453192;,\r
- -0.998254;-0.050052;-0.031367;,\r
- -0.166760;0.919372;-0.356296;,\r
- -0.017918;0.929986;-0.367158;,\r
- -0.221364;-0.201266;-0.954196;,\r
- 0.510650;-0.241613;-0.825142;,\r
- 0.368641;-0.041997;-0.928623;,\r
- 0.312282;0.151531;-0.937826;,\r
- -0.772332;0.600569;0.206929;,\r
- -0.985569;-0.165261;0.036630;,\r
- -0.976247;-0.187125;-0.109210;,\r
- -0.996189;-0.033284;-0.080615;,\r
- -0.183204;-0.592626;-0.784366;,\r
- 0.962047;-0.246690;0.116661;,\r
- 0.990608;-0.107745;-0.084183;,\r
- 0.875507;-0.481747;-0.037509;,\r
- -0.100949;-0.475999;0.873633;,\r
- -0.204147;-0.574028;0.792979;,\r
- -0.198828;-0.443934;0.873722;,\r
- -0.232158;-0.299965;0.925269;,\r
- -0.161385;0.070317;0.984383;,\r
- -0.974234;-0.175744;-0.141358;,\r
- 0.255186;-0.544666;0.798886;,\r
- 0.952301;0.305156;0.001595;,\r
- 0.230001;0.857161;-0.460841;,\r
- 0.032120;0.641774;-0.766221;,\r
- 0.050558;0.681923;-0.729674;,\r
- 0.907349;0.407020;0.105132;,\r
- 0.106855;-0.584770;-0.804131;,\r
- 0.341793;-0.591676;-0.730135;,\r
- -0.801871;-0.551343;-0.230267;,\r
- -0.873577;-0.434903;-0.218455;,\r
- 0.289678;-0.665601;0.687795;,\r
- 0.264650;-0.689775;0.673922;,\r
- -0.914136;-0.398087;-0.076696;,\r
- 0.186362;-0.810265;-0.555643;,\r
- 0.094113;0.866050;-0.491020;,\r
- 0.217301;0.845765;-0.487300;,\r
- 0.208569;0.122117;0.970354;,\r
- 0.265413;-0.106416;0.958244;,\r
- 0.337098;0.812286;-0.475979;,\r
- 0.839100;-0.362936;-0.405202;,\r
- 0.412037;-0.119428;0.903306;,\r
- -0.684696;0.206156;-0.699065;,\r
- -0.940223;-0.293762;0.172292;,\r
- -0.946510;-0.322256;0.016408;,\r
- -0.022754;-0.141127;0.989730;,\r
- -0.032328;-0.067110;0.997222;,\r
- -0.133431;0.085256;0.987384;,\r
- -0.301151;-0.161861;0.939739;,\r
- 0.059027;0.007913;-0.998225;,\r
- -0.001170;0.973805;0.227382;,\r
- -0.856990;0.283905;0.430076;,\r
- -0.331213;0.627060;0.705049;,\r
- -0.167388;0.005881;-0.985873;,\r
- -0.072860;-0.001649;0.997341;,\r
- -0.086676;0.004616;0.996226;,\r
- -0.673540;0.424446;-0.605136;,\r
- -0.607805;0.151240;-0.779551;,\r
- -0.198868;-0.979981;-0.009452;,\r
- -0.056749;-0.998140;-0.022273;,\r
- -0.188382;-0.731906;0.654848;,\r
- -0.344255;-0.232792;0.909558;,\r
- -0.380972;0.090455;-0.920151;,\r
- -0.158509;-0.985389;-0.062324;,\r
- -0.905968;-0.419458;-0.057254;,\r
- -0.105774;-0.712375;-0.693782;,\r
- 0.217832;0.975563;0.028740;,\r
- -0.134260;0.990449;0.031390;,\r
- -0.834394;-0.312786;-0.453819;,\r
- -0.318897;0.714508;0.622722;,\r
- -0.744052;-0.644066;-0.177668;,\r
- -0.022273;0.999005;-0.038635;,\r
- -0.499611;-0.585596;0.638331;,\r
- -0.348436;0.791239;-0.502527;;\r
- 298;\r
- 3;9,3,12;,\r
- 4;9,12,1,4;,\r
- 3;9,4,10;,\r
- 4;9,10,5,3;,\r
- 3;188,189,13;,\r
- 4;188,13,6,190;,\r
- 3;11,6,13;,\r
- 4;11,13,189,7;,\r
- 3;14,191,192;,\r
- 4;14,192,193,0;,\r
- 3;14,0,8;,\r
- 4;14,8,2,191;,\r
- 3;16,17,15;,\r
- 3;194,18,195;,\r
- 3;17,16,19;,\r
- 3;196,5,19;,\r
- 3;5,196,3;,\r
- 3;191,195,18;,\r
- 3;195,191,2;,\r
- 3;15,20,16;,\r
- 3;20,197,16;,\r
- 3;15,198,20;,\r
- 3;199,12,3;,\r
- 3;200,201,201;,\r
- 3;21,12,199;,\r
- 3;200,21,199;,\r
- 3;21,22,1;,\r
- 3;12,21,1;,\r
- 3;202,22,200;,\r
- 3;21,200,22;,\r
- 4;32,31,23,24;,\r
- 3;32,24,34;,\r
- 4;33,203,204,27;,\r
- 4;35,26,25,38;,\r
- 4;39,28,205,206;,\r
- 3;38,31,32;,\r
- 3;32,34,207;,\r
- 3;207,38,32;,\r
- 3;40,37,208;,\r
- 3;208,209,30;,\r
- 3;208,30,40;,\r
- 3;29,210,208;,\r
- 3;36,33,27;,\r
- 3;37,29,208;,\r
- 3;211,212,213;,\r
- 3;211,214,212;,\r
- 3;214,211,36;,\r
- 3;36,215,214;,\r
- 3;27,215,36;,\r
- 3;33,216,206;,\r
- 3;33,206,203;,\r
- 3;206,216,39;,\r
- 3;28,41,205;,\r
- 3;28,42,41;,\r
- 3;212,44,213;,\r
- 3;44,217,213;,\r
- 3;43,218,30;,\r
- 3;45,43,30;,\r
- 3;30,209,45;,\r
- 3;25,26,219;,\r
- 3;220,46,221;,\r
- 3;220,47,46;,\r
- 3;218,43,222;,\r
- 3;222,48,218;,\r
- 3;49,223,49;,\r
- 3;49,224,49;,\r
- 3;42,225,226;,\r
- 3;226,41,42;,\r
- 3;217,44,227;,\r
- 3;227,228,217;,\r
- 3;26,50,219;,\r
- 3;26,220,221;,\r
- 3;205,229,229;,\r
- 3;230,230,230;,\r
- 3;231,51,232;,\r
- 3;51,27,204;,\r
- 3;215,233,233;,\r
- 3;234,233,233;,\r
- 3;29,52,210;,\r
- 3;235,51,231;,\r
- 3;52,236,210;,\r
- 3;234,237,29;,\r
- 3;53,56,54;,\r
- 3;56,57,54;,\r
- 3;57,55,54;,\r
- 3;56,58,57;,\r
- 3;58,59,57;,\r
- 3;53,54,61;,\r
- 3;238,239,62;,\r
- 3;239,55,62;,\r
- 3;64,63,238;,\r
- 3;238,62,64;,\r
- 3;60,240,241;,\r
- 3;66,242,65;,\r
- 3;242,66,243;,\r
- 3;64,67,63;,\r
- 3;64,68,67;,\r
- 3;244,69,244;,\r
- 3;245,71,70;,\r
- 3;245,246,71;,\r
- 3;241,72,60;,\r
- 3;247,247,247;,\r
- 3;248,59,248;,\r
- 3;249,73,72;,\r
- 3;53,250,251;,\r
- 3;53,61,250;,\r
- 3;60,252,253;,\r
- 3;240,60,253;,\r
- 3;72,74,60;,\r
- 3;74,72,73;,\r
- 3;85,75,86;,\r
- 4;85,86,84,83;,\r
- 3;86,78,79;,\r
- 3;86,75,78;,\r
- 4;89,88,83,84;,\r
- 3;87,83,88;,\r
- 4;87,88,81,76;,\r
- 3;90,254,93;,\r
- 4;91,94,79,80;,\r
- 4;94,93,82,79;,\r
- 3;79,84,86;,\r
- 3;88,89,81;,\r
- 3;77,97,95;,\r
- 3;92,95,97;,\r
- 3;255,93,256;,\r
- 3;75,96,78;,\r
- 3;90,93,92;,\r
- 3;257,92,93;,\r
- 3;258,92,94;,\r
- 3;258,95,92;,\r
- 3;84,79,89;,\r
- 3;98,79,82;,\r
- 3;79,259,89;,\r
- 3;259,81,89;,\r
- 3;255,256,260;,\r
- 3;80,261,91;,\r
- 3;99,99,80;,\r
- 3;262,262,262;,\r
- 3;263,264,263;,\r
- 3;265,100,100;,\r
- 3;266,80,78;,\r
- 3;267,96,264;,\r
- 3;265,101,101;,\r
- 3;268,95,102;,\r
- 3;269,261,80;,\r
- 3;270,264,77;,\r
- 3;268,80,271;,\r
- 3;272,264,96;,\r
- 3;93,254,256;,\r
- 3;115,106,112;,\r
- 4;107,104,115,112;,\r
- 3;113,107,112;,\r
- 4;106,108,113,112;,\r
- 3;116,273,274;,\r
- 4;275,109,116,274;,\r
- 3;116,109,114;,\r
- 4;110,273,116,114;,\r
- 3;276,277,117;,\r
- 4;103,278,276,117;,\r
- 3;111,103,117;,\r
- 4;277,105,111,117;,\r
- 3;118,120,119;,\r
- 3;279,121,280;,\r
- 3;122,119,120;,\r
- 3;122,108,281;,\r
- 3;106,281,108;,\r
- 3;121,279,277;,\r
- 3;105,277,279;,\r
- 3;119,123,118;,\r
- 3;119,282,123;,\r
- 3;123,283,118;,\r
- 3;106,115,284;,\r
- 3;285,285,286;,\r
- 3;284,115,124;,\r
- 3;284,124,286;,\r
- 3;104,125,124;,\r
- 3;104,124,115;,\r
- 3;286,125,287;,\r
- 3;125,286,124;,\r
- 4;127,126,134,135;,\r
- 3;137,127,135;,\r
- 4;130,288,289,136;,\r
- 4;141,128,129,138;,\r
- 4;290,291,131,142;,\r
- 3;135,134,141;,\r
- 3;292,137,135;,\r
- 3;135,141,292;,\r
- 3;293,140,143;,\r
- 3;133,294,293;,\r
- 3;143,133,293;,\r
- 3;293,295,132;,\r
- 3;130,136,139;,\r
- 3;293,132,140;,\r
- 3;296,297,298;,\r
- 3;297,299,298;,\r
- 3;139,298,299;,\r
- 3;299,300,139;,\r
- 3;139,300,130;,\r
- 3;290,301,136;,\r
- 3;289,290,136;,\r
- 3;142,301,290;,\r
- 3;291,144,131;,\r
- 3;144,145,131;,\r
- 3;296,147,297;,\r
- 3;296,302,147;,\r
- 3;133,303,146;,\r
- 3;133,146,148;,\r
- 3;148,294,133;,\r
- 3;304,129,128;,\r
- 3;305,149,306;,\r
- 3;149,150,306;,\r
- 3;307,146,303;,\r
- 3;303,151,307;,\r
- 3;152,308,152;,\r
- 3;152,309,152;,\r
- 3;310,311,145;,\r
- 3;145,144,310;,\r
- 3;312,147,302;,\r
- 3;302,313,312;,\r
- 3;304,153,129;,\r
- 3;305,306,129;,\r
- 3;314,314,291;,\r
- 3;315,315,315;,\r
- 3;316,154,317;,\r
- 3;288,130,154;,\r
- 3;318,318,300;,\r
- 3;318,318,319;,\r
- 3;295,155,132;,\r
- 3;317,154,320;,\r
- 3;295,321,155;,\r
- 3;132,322,319;,\r
- 3;156,56,53;,\r
- 3;156,158,56;,\r
- 3;156,157,158;,\r
- 3;158,323,56;,\r
- 3;158,159,323;,\r
- 3;160,156,53;,\r
- 3;161,324,325;,\r
- 3;161,157,324;,\r
- 3;325,162,163;,\r
- 3;163,161,325;,\r
- 3;326,327,60;,\r
- 3;65,242,164;,\r
- 3;328,164,242;,\r
- 3;162,165,163;,\r
- 3;165,166,163;,\r
- 3;329,69,329;,\r
- 3;167,168,245;,\r
- 3;168,330,245;,\r
- 3;60,169,326;,\r
- 3;331,331,331;,\r
- 3;332,159,332;,\r
- 3;169,73,333;,\r
- 3;251,334,53;,\r
- 3;334,160,53;,\r
- 3;335,336,60;,\r
- 3;335,60,327;,\r
- 3;60,74,169;,\r
- 3;73,169,74;,\r
- 3;176,75,85;,\r
- 4;83,175,176,85;,\r
- 3;171,170,176;,\r
- 3;170,75,176;,\r
- 4;175,83,177,178;,\r
- 3;177,337,338;,\r
- 4;76,173,177,338;,\r
- 3;180,254,90;,\r
- 4;172,171,181,179;,\r
- 4;171,174,180,181;,\r
- 3;176,175,171;,\r
- 3;173,178,177;,\r
- 3;182,97,77;,\r
- 3;97,182,92;,\r
- 3;339,180,340;,\r
- 3;170,96,75;,\r
- 3;92,180,90;,\r
- 3;180,92,341;,\r
- 3;181,92,342;,\r
- 3;92,182,342;,\r
- 3;178,171,175;,\r
- 3;174,171,183;,\r
- 3;178,343,171;,\r
- 3;178,173,343;,\r
- 3;344,339,340;,\r
- 3;179,345,172;,\r
- 3;172,184,184;,\r
- 3;346,346,346;,\r
- 3;347,348,347;,\r
- 3;185,185,185;,\r
- 3;170,172,349;,\r
- 3;348,96,350;,\r
- 3;186,77,96;,\r
- 3;187,182,268;,\r
- 3;172,345,351;,\r
- 3;77,348,352;,\r
- 3;353,172,268;,\r
- 3;96,348,354;,\r
- 3;339,254,180;;\r
- }\r
- MeshTextureCoords {\r
- 562;\r
- 0.371030;0.135240;\r
- 0.562540;0.285920;\r
- 0.352800;0.173560;\r
- 0.276460;0.079040;\r
- 0.319630;0.024920;\r
- 0.388570;0.111120;\r
- 0.636690;0.275050;\r
- 0.591150;0.385480;\r
- 0.608240;0.318480;\r
- 0.608990;0.383410;\r
- 0.596090;0.384490;\r
- 0.638720;0.551730;\r
- 0.598250;0.551730;\r
- 0.642580;0.380270;\r
- 0.660050;0.329060;\r
- 0.091750;0.493710;\r
- 0.019340;0.737670;\r
- 0.048520;0.480250;\r
- 0.072730;0.531000;\r
- 0.029510;0.524150;\r
- 0.024070;0.472940;\r
- 0.082440;0.464140;\r
- 0.097240;0.534870;\r
- 0.108350;0.507900;\r
- 0.074880;0.661270;\r
- 0.952300;0.361570;\r
- 0.920990;0.388180;\r
- 0.909870;0.363200;\r
- 0.134660;0.695600;\r
- 0.113160;0.695600;\r
- 0.109680;0.673310;\r
- 0.457970;0.956510;\r
- 0.489280;0.937580;\r
- 0.487030;0.956510;\r
- 0.572240;0.231760;\r
- 0.643210;0.250690;\r
- 0.570320;0.250690;\r
- 0.554160;0.354070;\r
- 0.562540;0.287780;\r
- 0.014600;0.695600;\r
- 0.137460;0.688590;\r
- 0.021200;0.737670;\r
- 0.076740;0.661270;\r
- 0.911590;0.364920;\r
- 0.933080;0.334410;\r
- 0.954020;0.363290;\r
- 0.931360;0.334550;\r
- 0.949260;0.326410;\r
- 0.952300;0.363430;\r
- 0.907240;0.325350;\r
- 0.931360;0.332690;\r
- 0.722990;0.519910;\r
- 0.746370;0.288640;\r
- 0.749900;0.515660;\r
- 0.694920;0.278760;\r
- 0.701060;0.517630;\r
- 0.720250;0.307780;\r
- 0.723210;0.401870;\r
- 0.712980;0.319210;\r
- 0.735650;0.318480;\r
- 0.747660;0.394970;\r
- 0.689250;0.323110;\r
- 0.699360;0.393850;\r
- 0.809880;0.654370;\r
- 0.772960;0.688940;\r
- 0.722660;0.627210;\r
- 0.802930;0.556810;\r
- 0.865360;0.635310;\r
- 0.408840;0.387590;\r
- 0.372710;0.389140;\r
- 0.395690;0.329430;\r
- 0.442880;0.352460;\r
- 0.869190;0.695950;\r
- 0.966100;0.815190;\r
- 0.917220;0.855530;\r
- 0.807090;0.727600;\r
- 0.444590;0.455760;\r
- 0.384720;0.520010;\r
- 0.357110;0.483620;\r
- 0.404080;0.421220;\r
- 0.602880;0.661310;\r
- 0.591150;0.615110;\r
- 0.651440;0.629870;\r
- 0.651440;0.635910;\r
- 0.678480;0.706790;\r
- 0.654400;0.729610;\r
- 0.613760;0.668560;\r
- 0.611450;0.580920;\r
- 0.664170;0.607590;\r
- 0.457730;0.412110;\r
- 0.410760;0.387590;\r
- 0.444800;0.351920;\r
- 0.461890;0.447360;\r
- 0.495860;0.515370;\r
- 0.457970;0.511910;\r
- 0.497190;0.447060;\r
- 0.468410;0.413340;\r
- 0.502430;0.400870;\r
- 0.481780;0.345920;\r
- 0.398040;0.413820;\r
- 0.373540;0.389140;\r
- 0.445880;0.458330;\r
- 0.376270;0.508760;\r
- 0.316170;0.534880;\r
- 0.353930;0.487100;\r
- 0.359170;0.564170;\r
- 0.493840;0.557420;\r
- 0.470690;0.567320;\r
- 0.719060;0.748890;\r
- 0.681320;0.771660;\r
- 0.731680;0.738020;\r
- 0.939910;0.580920;\r
- 0.974340;0.587670;\r
- 0.942500;0.634130;\r
- 0.963510;0.246230;\r
- 0.923780;0.260690;\r
- 0.937520;0.242860;\r
- 0.610050;0.279890;\r
- 0.588190;0.297300;\r
- 0.570320;0.291390;\r
- 0.665550;0.754930;\r
- 0.727770;0.710660;\r
- 0.753190;0.745350;\r
- 0.713640;0.807260;\r
- 0.914670;0.987760;\r
- 0.874760;0.973630;\r
- 0.903210;0.896990;\r
- 0.941380;0.899840;\r
- 0.385210;0.561890;\r
- 0.326970;0.606650;\r
- 0.258820;0.523480;\r
- 0.258670;0.522350;\r
- 0.292730;0.485240;\r
- 0.385060;0.560770;\r
- 0.504030;0.584330;\r
- 0.173800;0.935310;\r
- 0.189090;0.936620;\r
- 0.207140;0.965810;\r
- 0.955940;0.640840;\r
- 0.959700;0.198460;\r
- 0.726210;0.255020;\r
- 0.692370;0.299420;\r
- 0.673040;0.287030;\r
- 0.731370;0.847100;\r
- 0.721700;0.834480;\r
- 0.735140;0.827770;\r
- 0.333200;0.912500;\r
- 0.339760;0.857270;\r
- 0.393750;0.887420;\r
- 0.378940;0.837570;\r
- 0.526280;0.366680;\r
- 0.531970;0.318480;\r
- 0.134620;0.971130;\r
- 0.098950;0.958300;\r
- 0.141010;0.918400;\r
- 0.298760;0.857350;\r
- 0.328740;0.840740;\r
- 0.014600;0.918400;\r
- 0.069750;0.936430;\r
- 0.054500;0.971100;\r
- 0.561950;0.340650;\r
- 0.189050;0.183970;\r
- 0.248680;0.114460;\r
- 0.355130;0.320400;\r
- 0.098560;0.753460;\r
- 0.189700;0.689110;\r
- 0.262250;0.772030;\r
- 0.211050;0.521330;\r
- 0.898690;0.181840;\r
- 0.898690;0.117520;\r
- 0.943430;0.167900;\r
- 0.862030;0.447080;\r
- 0.896250;0.457410;\r
- 0.890990;0.497460;\r
- 0.022190;0.039810;\r
- 0.385300;0.045390;\r
- 0.302430;0.175400;\r
- 0.307970;0.806340;\r
- 0.325310;0.659980;\r
- 0.394990;0.716960;\r
- 0.325310;0.658040;\r
- 0.416670;0.616680;\r
- 0.396200;0.718650;\r
- 0.387480;0.744830;\r
- 0.303820;0.741480;\r
- 0.298760;0.697750;\r
- 0.401730;0.719350;\r
- 0.144570;0.144000;\r
- 0.082820;0.171790;\r
- 0.076310;0.067400;\r
- 0.457970;0.289280;\r
- 0.541130;0.014600;\r
- 0.541130;0.275350;\r
- 0.467220;0.057810;\r
- 0.310690;0.807190;\r
- 0.374520;0.808370;\r
- 0.903270;0.014600;\r
- 0.963310;0.086600;\r
- 0.896970;0.078130;\r
- 0.298800;0.014600;\r
- 0.428770;0.303030;\r
- 0.298760;0.305530;\r
- 0.360550;0.042380;\r
- 0.078030;0.069120;\r
- 0.125470;0.069500;\r
- 0.146290;0.145720;\r
- 0.153070;0.533080;\r
- 0.947310;0.510580;\r
- 0.115750;0.014600;\r
- 0.144570;0.014790;\r
- 0.123750;0.067780;\r
- 0.337500;0.901660;\r
- 0.022190;0.857950;\r
- 0.144610;0.434940;\r
- 0.014600;0.432440;\r
- 0.144570;0.066180;\r
- 0.464040;0.302620;\r
- 0.464040;0.029020;\r
- 0.691270;0.324520;\r
- 0.740600;0.448980;\r
- 0.464040;0.464740;\r
- 0.736650;0.121130;\r
- 0.967260;0.235070;\r
- 0.822400;0.656690;\r
- 0.607110;0.655060;\r
- 0.464430;0.635020;\r
- 0.462620;0.468660;\r
- 0.604270;0.651560;\r
- 0.464040;0.634810;\r
- 0.754620;0.806380;\r
- 0.464040;0.934110;\r
- 0.173800;0.712320;\r
- 0.173800;0.570820;\r
- 0.229220;0.721370;\r
- 0.250710;0.335960;\r
- 0.237010;0.385540;\r
- 0.058350;0.241010;\r
- 0.129590;0.190460;\r
- 0.196930;0.435590;\r
- 0.116830;0.439220;\r
- 0.742520;0.448950;\r
- 0.693600;0.324490;\r
- 0.806390;0.836150;\r
- 0.797560;0.908500;\r
- 0.676080;0.927630;\r
- 0.910710;0.911290;\r
- 0.823290;0.830530;\r
- 0.910710;0.824910;\r
- 0.260110;0.663660;\r
- 0.229400;0.585630;\r
- 0.802670;0.525860;\r
- 0.808510;0.380560;\r
- 0.877190;0.510520;\r
- 0.173800;0.783600;\r
- 0.260500;0.750250;\r
- 0.831070;0.885250;\r
- 0.824020;0.918820;\r
- 0.022500;0.434480;\r
- 0.060290;0.245320;\r
- 0.118600;0.440060;\r
- 0.897340;0.789890;\r
- 0.256700;0.594220;\r
- 0.267130;0.373210;\r
- 0.367520;0.416990;\r
- 0.354390;0.471720;\r
- 0.704360;0.206040;\r
- 0.712870;0.105660;\r
- 0.828020;0.196840;\r
- 0.827070;0.197790;\r
- 0.702380;0.208840;\r
- 0.672840;0.030160;\r
- 0.702650;0.209750;\r
- 0.827980;0.195760;\r
- 0.713770;0.106800;\r
- 0.699920;0.209200;\r
- 0.672800;0.031560;\r
- 0.826020;0.198410;\r
- 0.667240;0.025710;\r
- 0.825260;0.198950;\r
- 0.702160;0.208860;\r
- 0.524380;0.962290;\r
- 0.392340;0.780120;\r
- 0.552940;0.780870;\r
- 0.257140;0.917080;\r
- 0.161290;0.949010;\r
- 0.138230;0.828240;\r
- 0.809690;0.835340;\r
- 0.679330;0.925170;\r
- 0.565270;0.837830;\r
- 0.828230;0.197140;\r
- 0.706830;0.206970;\r
- 0.666170;0.031230;\r
- 0.563580;0.836880;\r
- 0.678340;0.925250;\r
- 0.812140;0.835490;\r
- 0.824160;0.198860;\r
- 0.703830;0.208240;\r
- 0.717260;0.106330;\r
- 0.504870;0.602640;\r
- 0.554530;0.780260;\r
- 0.391490;0.778270;\r
- 0.352800;0.173560;\r
- 0.562540;0.285920;\r
- 0.371030;0.135240;\r
- 0.319630;0.024920;\r
- 0.276460;0.079040;\r
- 0.388570;0.111120;\r
- 0.636690;0.275050;\r
- 0.608990;0.383410;\r
- 0.608240;0.318480;\r
- 0.591150;0.385480;\r
- 0.598250;0.551730;\r
- 0.638720;0.551730;\r
- 0.596090;0.384490;\r
- 0.642580;0.380270;\r
- 0.660050;0.329060;\r
- 0.048520;0.480250;\r
- 0.019340;0.737670;\r
- 0.091750;0.493710;\r
- 0.082440;0.464140;\r
- 0.024070;0.472940;\r
- 0.029510;0.524150;\r
- 0.072730;0.531000;\r
- 0.097240;0.534870;\r
- 0.074880;0.661270;\r
- 0.108350;0.507900;\r
- 0.909870;0.363200;\r
- 0.920990;0.388180;\r
- 0.952300;0.361570;\r
- 0.109680;0.673310;\r
- 0.113160;0.695600;\r
- 0.134660;0.695600;\r
- 0.487030;0.956510;\r
- 0.489280;0.937580;\r
- 0.457970;0.956510;\r
- 0.570320;0.250690;\r
- 0.643210;0.250690;\r
- 0.572240;0.231760;\r
- 0.562540;0.287780;\r
- 0.554160;0.354070;\r
- 0.014600;0.695600;\r
- 0.076740;0.661270;\r
- 0.021200;0.737670;\r
- 0.137460;0.688590;\r
- 0.954020;0.363290;\r
- 0.933080;0.334410;\r
- 0.911590;0.364920;\r
- 0.952300;0.363430;\r
- 0.949260;0.326410;\r
- 0.931360;0.334550;\r
- 0.931360;0.332690;\r
- 0.907240;0.325350;\r
- 0.749900;0.515660;\r
- 0.746370;0.288640;\r
- 0.722990;0.519910;\r
- 0.701060;0.517630;\r
- 0.694920;0.278760;\r
- 0.720250;0.307780;\r
- 0.735650;0.318480;\r
- 0.712980;0.319210;\r
- 0.723210;0.401870;\r
- 0.747660;0.394970;\r
- 0.699360;0.393850;\r
- 0.689250;0.323110;\r
- 0.802930;0.556810;\r
- 0.722660;0.627210;\r
- 0.772960;0.688940;\r
- 0.809880;0.654370;\r
- 0.865360;0.635310;\r
- 0.442880;0.352460;\r
- 0.395690;0.329430;\r
- 0.372710;0.389140;\r
- 0.408840;0.387590;\r
- 0.807090;0.727600;\r
- 0.917220;0.855530;\r
- 0.966100;0.815190;\r
- 0.869190;0.695950;\r
- 0.404080;0.421220;\r
- 0.357110;0.483620;\r
- 0.384720;0.520010;\r
- 0.444590;0.455760;\r
- 0.651440;0.629870;\r
- 0.591150;0.615110;\r
- 0.602880;0.661310;\r
- 0.654400;0.729610;\r
- 0.678480;0.706790;\r
- 0.651440;0.635910;\r
- 0.613760;0.668560;\r
- 0.664170;0.607590;\r
- 0.611450;0.580920;\r
- 0.444800;0.351920;\r
- 0.410760;0.387590;\r
- 0.457730;0.412110;\r
- 0.457970;0.511910;\r
- 0.495860;0.515370;\r
- 0.461890;0.447360;\r
- 0.497190;0.447060;\r
- 0.468410;0.413340;\r
- 0.502430;0.400870;\r
- 0.481780;0.345920;\r
- 0.398040;0.413820;\r
- 0.373540;0.389140;\r
- 0.445880;0.458330;\r
- 0.353930;0.487100;\r
- 0.316170;0.534880;\r
- 0.376270;0.508760;\r
- 0.359170;0.564170;\r
- 0.493840;0.557420;\r
- 0.470690;0.567320;\r
- 0.681320;0.771660;\r
- 0.719060;0.748890;\r
- 0.731680;0.738020;\r
- 0.942500;0.634130;\r
- 0.974340;0.587670;\r
- 0.939910;0.580920;\r
- 0.937520;0.242860;\r
- 0.923780;0.260690;\r
- 0.963510;0.246230;\r
- 0.570320;0.291390;\r
- 0.588190;0.297300;\r
- 0.610050;0.279890;\r
- 0.753190;0.745350;\r
- 0.727770;0.710660;\r
- 0.665550;0.754930;\r
- 0.713640;0.807260;\r
- 0.903210;0.896990;\r
- 0.874760;0.973630;\r
- 0.914670;0.987760;\r
- 0.941380;0.899840;\r
- 0.258820;0.523480;\r
- 0.326970;0.606650;\r
- 0.385210;0.561890;\r
- 0.385060;0.560770;\r
- 0.292730;0.485240;\r
- 0.258670;0.522350;\r
- 0.504030;0.584330;\r
- 0.207140;0.965810;\r
- 0.189090;0.936620;\r
- 0.173800;0.935310;\r
- 0.955940;0.640840;\r
- 0.959700;0.198460;\r
- 0.673040;0.287030;\r
- 0.692370;0.299420;\r
- 0.726210;0.255020;\r
- 0.735140;0.827770;\r
- 0.721700;0.834480;\r
- 0.731370;0.847100;\r
- 0.393750;0.887420;\r
- 0.339760;0.857270;\r
- 0.333200;0.912500;\r
- 0.378940;0.837570;\r
- 0.526280;0.366680;\r
- 0.531970;0.318480;\r
- 0.141010;0.918400;\r
- 0.098950;0.958300;\r
- 0.134620;0.971130;\r
- 0.328740;0.840740;\r
- 0.298760;0.857350;\r
- 0.054500;0.971100;\r
- 0.069750;0.936430;\r
- 0.014600;0.918400;\r
- 0.561950;0.340650;\r
- 0.355130;0.320400;\r
- 0.262250;0.772030;\r
- 0.189700;0.689110;\r
- 0.211050;0.521330;\r
- 0.943430;0.167900;\r
- 0.890990;0.497460;\r
- 0.896250;0.457410;\r
- 0.302430;0.175400;\r
- 0.385300;0.045390;\r
- 0.394990;0.716960;\r
- 0.325310;0.659980;\r
- 0.307970;0.806340;\r
- 0.396200;0.718650;\r
- 0.416670;0.616680;\r
- 0.325310;0.658040;\r
- 0.298760;0.697750;\r
- 0.303820;0.741480;\r
- 0.387480;0.744830;\r
- 0.401730;0.719350;\r
- 0.076310;0.067400;\r
- 0.082820;0.171790;\r
- 0.457970;0.289280;\r
- 0.467220;0.057810;\r
- 0.310690;0.807190;\r
- 0.374520;0.808370;\r
- 0.896970;0.078130;\r
- 0.903270;0.014600;\r
- 0.298760;0.305530;\r
- 0.428770;0.303030;\r
- 0.360550;0.042380;\r
- 0.125470;0.069500;\r
- 0.078030;0.069120;\r
- 0.153070;0.533080;\r
- 0.947310;0.510580;\r
- 0.123750;0.067780;\r
- 0.115750;0.014600;\r
- 0.337500;0.901660;\r
- 0.014600;0.432440;\r
- 0.144610;0.434940;\r
- 0.691270;0.324520;\r
- 0.740600;0.448980;\r
- 0.967260;0.235070;\r
- 0.736650;0.121130;\r
- 0.607110;0.655060;\r
- 0.822400;0.656690;\r
- 0.604270;0.651560;\r
- 0.754620;0.806380;\r
- 0.229220;0.721370;\r
- 0.129590;0.190460;\r
- 0.058350;0.241010;\r
- 0.237010;0.385540;\r
- 0.250710;0.335960;\r
- 0.116830;0.439220;\r
- 0.196930;0.435590;\r
- 0.693600;0.324490;\r
- 0.742520;0.448950;\r
- 0.676080;0.927630;\r
- 0.823290;0.830530;\r
- 0.229400;0.585630;\r
- 0.260110;0.663660;\r
- 0.877190;0.510520;\r
- 0.260500;0.750250;\r
- 0.824020;0.918820;\r
- 0.831070;0.885250;\r
- 0.118600;0.440060;\r
- 0.060290;0.245320;\r
- 0.022500;0.434480;\r
- 0.897340;0.789890;\r
- 0.256700;0.594220;\r
- 0.354390;0.471720;\r
- 0.367520;0.416990;\r
- 0.267130;0.373210;\r
- 0.828020;0.196840;\r
- 0.712870;0.105660;\r
- 0.704360;0.206040;\r
- 0.672840;0.030160;\r
- 0.702380;0.208840;\r
- 0.827070;0.197790;\r
- 0.713770;0.106800;\r
- 0.827980;0.195760;\r
- 0.702650;0.209750;\r
- 0.826020;0.198410;\r
- 0.672800;0.031560;\r
- 0.702160;0.208860;\r
- 0.825260;0.198950;\r
- 0.667240;0.025710;\r
- 0.552940;0.780870;\r
- 0.524380;0.962290;\r
- 0.138230;0.828240;\r
- 0.565270;0.837830;\r
- 0.679330;0.925170;\r
- 0.666170;0.031230;\r
- 0.706830;0.206970;\r
- 0.828230;0.197140;\r
- 0.678340;0.925250;\r
- 0.563580;0.836880;\r
- 0.717260;0.106330;\r
- 0.703830;0.208240;\r
- 0.554530;0.780260;\r
- 0.504870;0.602640;;\r
- }\r
-}\r
+xof 0302txt 0064
+template Header {
+ <3D82AB43-62DA-11cf-AB39-0020AF71E433>
+ WORD major;
+ WORD minor;
+ DWORD flags;
+}
+
+template Vector {
+ <3D82AB5E-62DA-11cf-AB39-0020AF71E433>
+ FLOAT x;
+ FLOAT y;
+ FLOAT z;
+}
+
+template Coords2d {
+ <F6F23F44-7686-11cf-8F52-0040333594A3>
+ FLOAT u;
+ FLOAT v;
+}
+
+template Matrix4x4 {
+ <F6F23F45-7686-11cf-8F52-0040333594A3>
+ array FLOAT matrix[16];
+}
+
+template ColorRGBA {
+ <35FF44E0-6C7C-11cf-8F52-0040333594A3>
+ FLOAT red;
+ FLOAT green;
+ FLOAT blue;
+ FLOAT alpha;
+}
+
+template ColorRGB {
+ <D3E16E81-7835-11cf-8F52-0040333594A3>
+ FLOAT red;
+ FLOAT green;
+ FLOAT blue;
+}
+
+template IndexedColor {
+ <1630B820-7842-11cf-8F52-0040333594A3>
+ DWORD index;
+ ColorRGBA indexColor;
+}
+
+template Boolean {
+ <4885AE61-78E8-11cf-8F52-0040333594A3>
+ WORD truefalse;
+}
+
+template Boolean2d {
+ <4885AE63-78E8-11cf-8F52-0040333594A3>
+ Boolean u;
+ Boolean v;
+}
+
+template MaterialWrap {
+ <4885AE60-78E8-11cf-8F52-0040333594A3>
+ Boolean u;
+ Boolean v;
+}
+
+template TextureFilename {
+ <A42790E1-7810-11cf-8F52-0040333594A3>
+ STRING filename;
+}
+
+template Material {
+ <3D82AB4D-62DA-11cf-AB39-0020AF71E433>
+ ColorRGBA faceColor;
+ FLOAT power;
+ ColorRGB specularColor;
+ ColorRGB emissiveColor;
+ [...]
+}
+
+template MeshFace {
+ <3D82AB5F-62DA-11cf-AB39-0020AF71E433>
+ DWORD nFaceVertexIndices;
+ array DWORD faceVertexIndices[nFaceVertexIndices];
+}
+
+template MeshFaceWraps {
+ <4885AE62-78E8-11cf-8F52-0040333594A3>
+ DWORD nFaceWrapValues;
+ Boolean2d faceWrapValues;
+}
+
+template MeshTextureCoords {
+ <F6F23F40-7686-11cf-8F52-0040333594A3>
+ DWORD nTextureCoords;
+ array Coords2d textureCoords[nTextureCoords];
+}
+
+template MeshMaterialList {
+ <F6F23F42-7686-11cf-8F52-0040333594A3>
+ DWORD nMaterials;
+ DWORD nFaceIndexes;
+ array DWORD faceIndexes[nFaceIndexes];
+ [Material]
+}
+
+template MeshNormals {
+ <F6F23F43-7686-11cf-8F52-0040333594A3>
+ DWORD nNormals;
+ array Vector normals[nNormals];
+ DWORD nFaceNormals;
+ array MeshFace faceNormals[nFaceNormals];
+}
+
+template MeshVertexColors {
+ <1630B821-7842-11cf-8F52-0040333594A3>
+ DWORD nVertexColors;
+ array IndexedColor vertexColors[nVertexColors];
+}
+
+template Mesh {
+ <3D82AB44-62DA-11cf-AB39-0020AF71E433>
+ DWORD nVertices;
+ array Vector vertices[nVertices];
+ DWORD nFaces;
+ array MeshFace faces[nFaces];
+ [...]
+}
+
+Header{
+1;
+0;
+1;
+}
+
+Mesh {
+ 562;
+ 0.83376;-1.25528;-0.30875;,
+ 0.80277;-2.58889;-0.30251;,
+ 0.76306;-1.29886;-0.59323;,
+ 0.63858;-0.50568;-0.44125;,
+ 0.68794;-0.53522;0.00266;,
+ 0.86522;-1.22997;-0.14551;,
+ 0.81193;-2.95400;-0.00396;,
+ 0.86522;-1.22997;-0.14551;,
+ 0.68794;-0.53522;0.00266;,
+ 0.68017;-1.20855;-0.05241;,
+ 0.86522;-1.22997;-0.14551;,
+ 0.37189;-2.95400;0.22913;,
+ 0.81193;-2.95400;-0.00396;,
+ 0.33183;-1.17604;0.07446;,
+ 0.15072;-0.64497;0.13093;,
+ 0.29130;-1.24712;-0.37368;,
+ 0.37189;-2.95400;0.22913;,
+ 0.33183;-1.17604;0.07446;,
+ 0.29130;-1.24712;-0.37368;,
+ 0.33183;-1.17604;0.07446;,
+ 0.15072;-0.64497;0.13093;,
+ 0.15735;-0.55373;-0.47440;,
+ 0.26220;-1.28723;-0.62783;,
+ 0.26220;-1.28723;-0.62783;,
+ 0.31352;-2.53888;-0.29309;,
+ 0.79865;-2.75765;-0.73990;,
+ 0.47394;-2.95400;-1.01592;,
+ 0.35866;-2.72285;-0.75687;,
+ 0.47394;-2.95400;-1.01592;,
+ 0.36029;-2.95400;-0.79296;,
+ 0.35866;-2.72285;-0.75687;,
+ 0.47394;-2.95400;-1.01592;,
+ 0.79865;-2.75765;-0.73990;,
+ 0.77531;-2.95400;-0.75977;,
+ 0.79865;-2.75765;-0.73990;,
+ 0.81193;-2.95400;-0.00396;,
+ 0.77531;-2.95400;-0.75977;,
+ 0.79865;-2.75765;-0.73990;,
+ 0.80277;-2.58889;-0.30251;,
+ 0.37189;-2.95400;0.22913;,
+ 0.35866;-2.72285;-0.75687;,
+ 0.37189;-2.95400;0.22913;,
+ 0.31352;-2.53888;-0.29309;,
+ 0.35866;-2.72285;-0.75687;,
+ 0.58155;-2.60221;-0.44042;,
+ 0.79865;-2.75765;-0.73990;,
+ 0.58155;-2.60221;-0.44042;,
+ 0.80277;-2.58889;-0.30251;,
+ 0.79865;-2.75765;-0.73990;,
+ 0.31352;-2.53888;-0.29309;,
+ 0.58155;-2.60221;-0.44042;,
+ 0.58155;-2.60221;-0.44042;,
+ 0.76306;-1.29886;-0.59323;,
+ 0.80277;-2.58889;-0.30251;,
+ 0.26220;-1.28723;-0.62783;,
+ 0.31352;-2.53888;-0.29309;,
+ 0.50954;-1.37040;-0.70638;,
+ 0.50954;-1.37040;-0.70638;,
+ 0.40349;-0.51331;-0.54983;,
+ 0.63858;-0.50568;-0.44125;,
+ 0.76306;-1.29886;-0.59323;,
+ 0.15735;-0.55373;-0.47440;,
+ 0.26220;-1.28723;-0.62783;,
+ 1.12845;0.70096;-0.32097;,
+ 0.83839;0.64646;-0.29087;,
+ 0.75930;1.00596;-0.44909;,
+ 1.38724;1.22166;-0.18900;,
+ 1.46892;0.65185;-0.20474;,
+ 1.49708;0.67356;0.08021;,
+ 1.46892;0.65185;-0.20474;,
+ 1.38724;1.22166;-0.18900;,
+ 1.23366;1.13833;0.32802;,
+ 1.31234;0.40147;-0.05174;,
+ 1.44008;-0.35841;-0.50913;,
+ 1.08304;-0.38219;-0.43918;,
+ 0.90131;0.41542;-0.15880;,
+ 1.43991;0.08641;0.27125;,
+ 1.48053;-0.58297;-0.27745;,
+ 1.44008;-0.35841;-0.50913;,
+ 1.31234;0.40147;-0.05174;,
+ 1.07384;0.08943;0.34476;,
+ 1.01951;0.56845;0.46641;,
+ 0.90131;0.41542;-0.15880;,
+ 0.90131;0.41542;-0.15880;,
+ 1.08304;-0.38219;-0.43918;,
+ 1.08757;-0.61891;-0.18951;,
+ 1.07384;0.08943;0.34476;,
+ 0.77215;0.92301;0.25592;,
+ 0.83839;0.64646;-0.29087;,
+ 1.37226;0.43919;0.31433;,
+ 1.49708;0.67356;0.08021;,
+ 1.23366;1.13833;0.32802;,
+ 1.43991;0.08641;0.27125;,
+ 1.08757;-0.61891;-0.18951;,
+ 1.48053;-0.58297;-0.27745;,
+ 1.07384;0.08943;0.34476;,
+ 1.37226;0.43919;0.31433;,
+ 1.01951;0.56845;0.46641;,
+ 1.23366;1.13833;0.32802;,
+ 1.31234;0.40147;-0.05174;,
+ 1.46892;0.65185;-0.20474;,
+ 1.43991;0.08641;0.27125;,
+ 1.48053;-0.58297;-0.27745;,
+ 1.47964;-0.85386;-0.90068;,
+ 1.44008;-0.35841;-0.50913;,
+ 1.34861;-1.15761;-0.45486;,
+ 1.10860;-1.05492;-0.46865;,
+ 1.34861;-1.15761;-0.45486;,
+ 1.21013;-0.81884;-0.86005;,
+ 1.10860;-1.05492;-0.46865;,
+ 1.10986;-0.70604;-0.99091;,
+ 1.08304;-0.38219;-0.43918;,
+ 1.44008;-0.35841;-0.50913;,
+ 1.10986;-0.70604;-0.99091;,
+ 1.47964;-0.85386;-0.90068;,
+ 1.06767;-1.00377;-1.01993;,
+ 1.21013;-0.81884;-0.86005;,
+ 1.47964;-0.85386;-0.90068;,
+ 1.25294;-1.03515;-1.08123;,
+ 1.06767;-1.00377;-1.01993;,
+ 1.10860;-1.05492;-0.46865;,
+ 1.21013;-0.81884;-0.86005;,
+ 1.06767;-1.00377;-1.01993;,
+ 1.00290;-1.33401;-0.77117;,
+ 1.16139;-1.38159;-0.75763;,
+ 1.00290;-1.33401;-0.77117;,
+ 1.06767;-1.00377;-1.01993;,
+ 1.25294;-1.03515;-1.08123;,
+ 1.34861;-1.15761;-0.45486;,
+ 1.16139;-1.38159;-0.75763;,
+ 1.25294;-1.03515;-1.08123;,
+ 1.25294;-1.03515;-1.08123;,
+ 1.47964;-0.85386;-0.90068;,
+ 1.34861;-1.15761;-0.45486;,
+ 1.00290;-1.33401;-0.77117;,
+ 1.00290;-1.33401;-0.77117;,
+ 1.16139;-1.38159;-0.75763;,
+ 1.34861;-1.15761;-0.45486;,
+ 1.24926;-0.69036;-1.06053;,
+ 1.44008;-0.35841;-0.50913;,
+ 1.44008;-0.35841;-0.50913;,
+ 1.21013;-0.81884;-0.86005;,
+ 1.24926;-0.69036;-1.06053;,
+ 1.21013;-0.81884;-0.86005;,
+ 1.10986;-0.70604;-0.99091;,
+ 1.24926;-0.69036;-1.06053;,
+ 0.75930;1.00596;-0.44909;,
+ 0.71312;1.42286;0.29508;,
+ 1.38724;1.22166;-0.18900;,
+ 1.23366;1.13833;0.32802;,
+ 0.77215;0.92301;0.25592;,
+ 0.71312;1.42286;0.29508;,
+ 0.77215;0.92301;0.25592;,
+ 0.40223;1.19293;0.12287;,
+ 0.83839;0.64646;-0.29087;,
+ 0.40223;1.19293;0.12287;,
+ 0.71312;1.42286;0.29508;,
+ 0.40223;1.19293;0.12287;,
+ 0.75930;1.00596;-0.44909;,
+ 0.83839;0.64646;-0.29087;,
+ 0.40223;1.19293;0.12287;,
+ 0.00000;1.06000;-0.71800;,
+ 0.00000;1.45800;-0.46500;,
+ 0.99307;1.04154;-0.52540;,
+ 0.00000;1.45800;-0.46500;,
+ 0.46391;1.60254;-0.14270;,
+ 0.99307;1.04154;-0.52540;,
+ 0.70784;1.47039;0.42200;,
+ 0.00000;1.45800;-0.46500;,
+ 0.00000;2.12500;-0.44300;,
+ 0.46391;1.60254;-0.14270;,
+ 0.00000;2.12500;-0.44300;,
+ 0.29892;2.01794;-0.08815;,
+ 0.46391;1.60254;-0.14270;,
+ 0.00000;1.06000;-0.71800;,
+ 0.99307;1.04154;-0.52540;,
+ 0.76644;0.61187;-0.78288;,
+ 0.76644;0.61187;-0.78288;,
+ 0.99307;1.04154;-0.52540;,
+ 0.64036;0.38786;0.28485;,
+ 0.99307;1.04154;-0.52540;,
+ 0.70784;1.47039;0.42200;,
+ 0.64036;0.38786;0.28485;,
+ 0.62264;0.12365;0.13707;,
+ 0.59030;0.15838;-0.73047;,
+ 0.76644;0.61187;-0.78288;,
+ 0.64036;0.38786;0.28485;,
+ 0.00000;0.67600;0.32500;,
+ 0.64036;0.38786;0.28485;,
+ 0.70784;1.47039;0.42200;,
+ 0.86233;-1.78848;-0.58858;,
+ 0.00000;1.06000;-0.71800;,
+ 0.00000;-1.64400;-1.01200;,
+ 0.76644;0.61187;-0.78288;,
+ 0.55856;-0.52295;-0.65920;,
+ 0.68794;-0.53522;0.00266;,
+ 0.62264;0.12365;0.13707;,
+ 0.00000;-0.62300;0.20800;,
+ 0.68794;-0.53522;0.00266;,
+ 0.00000;0.67600;0.32500;,
+ 1.34784;-2.31506;0.22159;,
+ -0.00036;-2.34101;0.33901;,
+ 0.64036;0.38786;0.28485;,
+ 0.70784;1.47039;0.42200;,
+ 0.21590;1.46647;0.44132;,
+ 0.00000;0.67600;0.32500;,
+ 0.21590;1.46647;0.44132;,
+ 0.21590;1.46647;0.44132;,
+ 0.29892;2.01794;-0.08815;,
+ 0.00000;2.01600;0.05400;,
+ 0.21590;1.46647;0.44132;,
+ 0.86233;-1.78848;-0.58858;,
+ 0.00000;-1.64400;-1.01200;,
+ -0.00036;-2.34101;0.33901;,
+ 1.34784;-2.31506;0.22159;,
+ 0.00000;1.48300;0.47700;,
+ 0.00000;3.14501;-0.98060;,
+ 0.00000;3.80714;-0.75242;,
+ 0.45083;3.09201;-0.84439;,
+ 0.54869;2.79080;-0.63716;,
+ 0.00000;2.75267;-0.82371;,
+ 0.54087;3.58423;-0.69773;,
+ 1.00703;3.31745;-0.35273;,
+ 0.71099;2.28813;-0.66572;,
+ 0.28386;2.29207;-0.83083;,
+ 0.00000;2.35906;-1.09979;,
+ 0.00000;2.75267;-0.82371;,
+ 0.28386;2.29207;-0.83083;,
+ 0.00000;2.35906;-1.09979;,
+ 0.57652;1.92587;-0.72498;,
+ 0.00000;1.61675;-0.87856;,
+ 0.00000;1.84558;0.58880;,
+ 0.00000;1.61675;-0.87856;,
+ 0.57468;1.95139;0.68270;,
+ 0.82588;2.65084;1.08449;,
+ 0.89899;2.30275;0.98211;,
+ 1.00703;3.31745;-0.35273;,
+ 1.05104;3.67230;0.17957;,
+ 0.57468;1.95139;0.68270;,
+ 0.89499;1.92592;0.08420;,
+ 0.54869;2.79080;-0.63716;,
+ 0.45083;3.09201;-0.84439;,
+ 0.00000;3.72958;1.05475;,
+ 0.00000;3.27658;1.45380;,
+ 0.90663;3.21830;1.22060;,
+ 0.00000;2.38080;1.32796;,
+ 0.90663;3.21830;1.22060;,
+ 0.00000;3.27658;1.45380;,
+ 0.89499;1.92592;0.08420;,
+ 0.57652;1.92587;-0.72498;,
+ 0.00000;3.80714;-0.75242;,
+ 0.00000;4.13778;0.18372;,
+ 0.54087;3.58423;-0.69773;,
+ 0.00000;2.38080;1.32796;,
+ 0.89899;2.30275;0.98211;,
+ 0.82588;2.65084;1.08449;,
+ 0.89899;2.30275;0.98211;,
+ 0.85967;1.96578;-0.63585;,
+ 1.00703;3.31745;-0.35273;,
+ 0.89499;1.92592;0.08420;,
+ 0.85967;1.96578;-0.63585;,
+ 0.85967;1.96578;-0.63585;,
+ 1.05104;3.67230;0.17957;,
+ 0.90663;3.21830;1.22060;,
+ 0.82588;2.65084;1.08449;,
+ 1.00703;3.31745;-0.35273;,
+ 1.68291;3.84190;-0.78819;,
+ 1.05104;3.67230;0.17957;,
+ 1.00703;3.31745;-0.35273;,
+ 0.54087;3.58423;-0.69773;,
+ 1.68291;3.84190;-0.78819;,
+ 0.54087;3.58423;-0.69773;,
+ 1.05104;3.67230;0.17957;,
+ 1.68291;3.84190;-0.78819;,
+ 0.00000;4.13778;0.18372;,
+ 0.86729;4.61507;-0.80806;,
+ 0.54087;3.58423;-0.69773;,
+ 0.86729;4.61507;-0.80806;,
+ 1.05104;3.67230;0.17957;,
+ 0.54087;3.58423;-0.69773;,
+ 0.86729;4.61507;-0.80806;,
+ 0.00000;4.13778;0.18372;,
+ 1.05104;3.67230;0.17957;,
+ 0.00000;4.13778;0.18372;,
+ 0.00000;3.72958;1.05475;,
+ 0.69255;4.47754;1.19887;,
+ 0.00000;3.72958;1.05475;,
+ 0.90663;3.21830;1.22060;,
+ 1.52478;3.73033;1.95317;,
+ 1.52478;3.73033;1.95317;,
+ 0.90663;3.21830;1.22060;,
+ 1.05104;3.67230;0.17957;,
+ 1.52478;3.73033;1.95317;,
+ 1.05104;3.67230;0.17957;,
+ 0.00000;3.72958;1.05475;,
+ 0.00000;3.72958;1.05475;,
+ 1.05104;3.67230;0.17957;,
+ 0.69255;4.47754;1.19887;,
+ 0.69255;4.47754;1.19887;,
+ 1.05104;3.67230;0.17957;,
+ 0.00000;4.13778;0.18372;,
+ -0.76306;-1.29886;-0.59323;,
+ -0.80277;-2.58889;-0.30251;,
+ -0.83376;-1.25528;-0.30875;,
+ -0.68794;-0.53522;0.00266;,
+ -0.63858;-0.50568;-0.44125;,
+ -0.86522;-1.22997;-0.14551;,
+ -0.81193;-2.95400;-0.00396;,
+ -0.68017;-1.20855;-0.05241;,
+ -0.68794;-0.53522;0.00266;,
+ -0.86522;-1.22997;-0.14551;,
+ -0.81193;-2.95400;-0.00396;,
+ -0.37189;-2.95400;0.22913;,
+ -0.86522;-1.22997;-0.14551;,
+ -0.33183;-1.17604;0.07446;,
+ -0.15072;-0.64497;0.13093;,
+ -0.33183;-1.17604;0.07446;,
+ -0.37189;-2.95400;0.22913;,
+ -0.29130;-1.24712;-0.37368;,
+ -0.15735;-0.55373;-0.47440;,
+ -0.15072;-0.64497;0.13093;,
+ -0.33183;-1.17604;0.07446;,
+ -0.29130;-1.24712;-0.37368;,
+ -0.26220;-1.28723;-0.62783;,
+ -0.31352;-2.53888;-0.29309;,
+ -0.26220;-1.28723;-0.62783;,
+ -0.35866;-2.72285;-0.75687;,
+ -0.47394;-2.95400;-1.01592;,
+ -0.79865;-2.75765;-0.73990;,
+ -0.35866;-2.72285;-0.75687;,
+ -0.36029;-2.95400;-0.79296;,
+ -0.47394;-2.95400;-1.01592;,
+ -0.77531;-2.95400;-0.75977;,
+ -0.79865;-2.75765;-0.73990;,
+ -0.47394;-2.95400;-1.01592;,
+ -0.77531;-2.95400;-0.75977;,
+ -0.81193;-2.95400;-0.00396;,
+ -0.79865;-2.75765;-0.73990;,
+ -0.80277;-2.58889;-0.30251;,
+ -0.79865;-2.75765;-0.73990;,
+ -0.37189;-2.95400;0.22913;,
+ -0.31352;-2.53888;-0.29309;,
+ -0.37189;-2.95400;0.22913;,
+ -0.35866;-2.72285;-0.75687;,
+ -0.79865;-2.75765;-0.73990;,
+ -0.58155;-2.60221;-0.44042;,
+ -0.35866;-2.72285;-0.75687;,
+ -0.79865;-2.75765;-0.73990;,
+ -0.80277;-2.58889;-0.30251;,
+ -0.58155;-2.60221;-0.44042;,
+ -0.58155;-2.60221;-0.44042;,
+ -0.31352;-2.53888;-0.29309;,
+ -0.80277;-2.58889;-0.30251;,
+ -0.76306;-1.29886;-0.59323;,
+ -0.58155;-2.60221;-0.44042;,
+ -0.31352;-2.53888;-0.29309;,
+ -0.26220;-1.28723;-0.62783;,
+ -0.50954;-1.37040;-0.70638;,
+ -0.63858;-0.50568;-0.44125;,
+ -0.40349;-0.51331;-0.54983;,
+ -0.50954;-1.37040;-0.70638;,
+ -0.76306;-1.29886;-0.59323;,
+ -0.26220;-1.28723;-0.62783;,
+ -0.15735;-0.55373;-0.47440;,
+ -1.38724;1.22166;-0.18900;,
+ -0.75930;1.00596;-0.44909;,
+ -0.83839;0.64646;-0.29087;,
+ -1.12845;0.70096;-0.32097;,
+ -1.46892;0.65185;-0.20474;,
+ -1.23366;1.13833;0.32802;,
+ -1.38724;1.22166;-0.18900;,
+ -1.46892;0.65185;-0.20474;,
+ -1.49708;0.67356;0.08021;,
+ -0.90131;0.41542;-0.15880;,
+ -1.08304;-0.38219;-0.43918;,
+ -1.44008;-0.35841;-0.50913;,
+ -1.31234;0.40147;-0.05174;,
+ -1.31234;0.40147;-0.05174;,
+ -1.44008;-0.35841;-0.50913;,
+ -1.48053;-0.58297;-0.27745;,
+ -1.43991;0.08641;0.27125;,
+ -0.90131;0.41542;-0.15880;,
+ -1.01951;0.56845;0.46641;,
+ -1.07384;0.08943;0.34476;,
+ -1.08757;-0.61891;-0.18951;,
+ -1.08304;-0.38219;-0.43918;,
+ -0.90131;0.41542;-0.15880;,
+ -1.07384;0.08943;0.34476;,
+ -0.83839;0.64646;-0.29087;,
+ -0.77215;0.92301;0.25592;,
+ -1.23366;1.13833;0.32802;,
+ -1.49708;0.67356;0.08021;,
+ -1.37226;0.43919;0.31433;,
+ -1.48053;-0.58297;-0.27745;,
+ -1.08757;-0.61891;-0.18951;,
+ -1.43991;0.08641;0.27125;,
+ -1.07384;0.08943;0.34476;,
+ -1.37226;0.43919;0.31433;,
+ -1.01951;0.56845;0.46641;,
+ -1.23366;1.13833;0.32802;,
+ -1.31234;0.40147;-0.05174;,
+ -1.46892;0.65185;-0.20474;,
+ -1.43991;0.08641;0.27125;,
+ -1.44008;-0.35841;-0.50913;,
+ -1.47964;-0.85386;-0.90068;,
+ -1.48053;-0.58297;-0.27745;,
+ -1.34861;-1.15761;-0.45486;,
+ -1.10860;-1.05492;-0.46865;,
+ -1.34861;-1.15761;-0.45486;,
+ -1.10860;-1.05492;-0.46865;,
+ -1.21013;-0.81884;-0.86005;,
+ -1.10986;-0.70604;-0.99091;,
+ -1.10986;-0.70604;-0.99091;,
+ -1.44008;-0.35841;-0.50913;,
+ -1.08304;-0.38219;-0.43918;,
+ -1.21013;-0.81884;-0.86005;,
+ -1.06767;-1.00377;-1.01993;,
+ -1.47964;-0.85386;-0.90068;,
+ -1.06767;-1.00377;-1.01993;,
+ -1.25294;-1.03515;-1.08123;,
+ -1.47964;-0.85386;-0.90068;,
+ -1.06767;-1.00377;-1.01993;,
+ -1.21013;-0.81884;-0.86005;,
+ -1.10860;-1.05492;-0.46865;,
+ -1.00290;-1.33401;-0.77117;,
+ -1.06767;-1.00377;-1.01993;,
+ -1.00290;-1.33401;-0.77117;,
+ -1.16139;-1.38159;-0.75763;,
+ -1.25294;-1.03515;-1.08123;,
+ -1.25294;-1.03515;-1.08123;,
+ -1.16139;-1.38159;-0.75763;,
+ -1.34861;-1.15761;-0.45486;,
+ -1.34861;-1.15761;-0.45486;,
+ -1.47964;-0.85386;-0.90068;,
+ -1.25294;-1.03515;-1.08123;,
+ -1.00290;-1.33401;-0.77117;,
+ -1.34861;-1.15761;-0.45486;,
+ -1.16139;-1.38159;-0.75763;,
+ -1.00290;-1.33401;-0.77117;,
+ -1.24926;-0.69036;-1.06053;,
+ -1.44008;-0.35841;-0.50913;,
+ -1.24926;-0.69036;-1.06053;,
+ -1.21013;-0.81884;-0.86005;,
+ -1.44008;-0.35841;-0.50913;,
+ -1.24926;-0.69036;-1.06053;,
+ -1.10986;-0.70604;-0.99091;,
+ -1.21013;-0.81884;-0.86005;,
+ -1.38724;1.22166;-0.18900;,
+ -0.71312;1.42286;0.29508;,
+ -0.75930;1.00596;-0.44909;,
+ -1.23366;1.13833;0.32802;,
+ -0.77215;0.92301;0.25592;,
+ -0.71312;1.42286;0.29508;,
+ -0.83839;0.64646;-0.29087;,
+ -0.40223;1.19293;0.12287;,
+ -0.77215;0.92301;0.25592;,
+ -0.71312;1.42286;0.29508;,
+ -0.40223;1.19293;0.12287;,
+ -0.83839;0.64646;-0.29087;,
+ -0.75930;1.00596;-0.44909;,
+ -0.40223;1.19293;0.12287;,
+ -0.40223;1.19293;0.12287;,
+ -0.99307;1.04154;-0.52540;,
+ -0.99307;1.04154;-0.52540;,
+ -0.46391;1.60254;-0.14270;,
+ -0.70784;1.47039;0.42200;,
+ -0.46391;1.60254;-0.14270;,
+ -0.46391;1.60254;-0.14270;,
+ -0.29892;2.01794;-0.08815;,
+ -0.76644;0.61187;-0.78288;,
+ -0.99307;1.04154;-0.52540;,
+ -0.64036;0.38786;0.28485;,
+ -0.99307;1.04154;-0.52540;,
+ -0.76644;0.61187;-0.78288;,
+ -0.64036;0.38786;0.28485;,
+ -0.70784;1.47039;0.42200;,
+ -0.99307;1.04154;-0.52540;,
+ -0.76644;0.61187;-0.78288;,
+ -0.59030;0.15838;-0.73047;,
+ -0.62264;0.12365;0.13707;,
+ -0.64036;0.38786;0.28485;,
+ -0.70784;1.47039;0.42200;,
+ -0.64036;0.38786;0.28485;,
+ -0.86233;-1.78848;-0.58858;,
+ -0.76644;0.61187;-0.78288;,
+ -0.55856;-0.52295;-0.65920;,
+ -0.68794;-0.53522;0.00266;,
+ -0.68794;-0.53522;0.00266;,
+ -0.62264;0.12365;0.13707;,
+ 0.00036;-2.34101;0.33901;,
+ -1.34784;-2.31506;0.22159;,
+ -0.64036;0.38786;0.28485;,
+ -0.21590;1.46647;0.44132;,
+ -0.70784;1.47039;0.42200;,
+ -0.21590;1.46647;0.44132;,
+ -0.21590;1.46647;0.44132;,
+ -0.21590;1.46647;0.44132;,
+ -0.29892;2.01794;-0.08815;,
+ -0.86233;-1.78848;-0.58858;,
+ -1.34784;-2.31506;0.22159;,
+ 0.00036;-2.34101;0.33901;,
+ -0.45083;3.09201;-0.84439;,
+ -0.54869;2.79080;-0.63716;,
+ -1.00703;3.31745;-0.35273;,
+ -0.54087;3.58423;-0.69773;,
+ -0.28386;2.29207;-0.83083;,
+ -0.71099;2.28813;-0.66572;,
+ -0.28386;2.29207;-0.83083;,
+ -0.57652;1.92587;-0.72498;,
+ -0.57468;1.95139;0.68270;,
+ -1.05104;3.67230;0.17957;,
+ -1.00703;3.31745;-0.35273;,
+ -0.89899;2.30275;0.98211;,
+ -0.82588;2.65084;1.08449;,
+ -0.89499;1.92592;0.08420;,
+ -0.57468;1.95139;0.68270;,
+ -0.45083;3.09201;-0.84439;,
+ -0.54869;2.79080;-0.63716;,
+ -0.90663;3.21830;1.22060;,
+ -0.90663;3.21830;1.22060;,
+ -0.57652;1.92587;-0.72498;,
+ -0.89499;1.92592;0.08420;,
+ -0.54087;3.58423;-0.69773;,
+ -0.89899;2.30275;0.98211;,
+ -0.89899;2.30275;0.98211;,
+ -0.82588;2.65084;1.08449;,
+ -0.89499;1.92592;0.08420;,
+ -1.00703;3.31745;-0.35273;,
+ -0.85967;1.96578;-0.63585;,
+ -0.85967;1.96578;-0.63585;,
+ -0.85967;1.96578;-0.63585;,
+ -0.82588;2.65084;1.08449;,
+ -0.90663;3.21830;1.22060;,
+ -1.05104;3.67230;0.17957;,
+ -1.05104;3.67230;0.17957;,
+ -1.68291;3.84190;-0.78819;,
+ -1.00703;3.31745;-0.35273;,
+ -1.68291;3.84190;-0.78819;,
+ -0.54087;3.58423;-0.69773;,
+ -1.00703;3.31745;-0.35273;,
+ -1.68291;3.84190;-0.78819;,
+ -1.05104;3.67230;0.17957;,
+ -0.54087;3.58423;-0.69773;,
+ -0.54087;3.58423;-0.69773;,
+ -0.86729;4.61507;-0.80806;,
+ -0.54087;3.58423;-0.69773;,
+ -1.05104;3.67230;0.17957;,
+ -0.86729;4.61507;-0.80806;,
+ -1.05104;3.67230;0.17957;,
+ -0.86729;4.61507;-0.80806;,
+ -0.69255;4.47754;1.19887;,
+ -1.52478;3.73033;1.95317;,
+ -0.90663;3.21830;1.22060;,
+ -1.05104;3.67230;0.17957;,
+ -0.90663;3.21830;1.22060;,
+ -1.52478;3.73033;1.95317;,
+ -1.05104;3.67230;0.17957;,
+ -1.52478;3.73033;1.95317;,
+ -0.69255;4.47754;1.19887;,
+ -1.05104;3.67230;0.17957;,
+ -1.05104;3.67230;0.17957;,
+ -0.69255;4.47754;1.19887;;
+
+ 298;
+ 3;0,1,2;,
+ 4;0,2,3,4;,
+ 3;0,4,5;,
+ 4;0,5,6,1;,
+ 3;7,8,9;,
+ 4;10,9,11,12;,
+ 3;13,11,9;,
+ 4;13,9,8,14;,
+ 3;15,16,17;,
+ 4;18,19,20,21;,
+ 3;18,21,22;,
+ 4;15,23,24,16;,
+ 3;25,26,27;,
+ 3;28,29,30;,
+ 3;31,32,33;,
+ 3;34,35,36;,
+ 3;6,37,38;,
+ 3;39,30,29;,
+ 3;40,41,42;,
+ 3;43,44,45;,
+ 3;46,47,48;,
+ 3;27,49,50;,
+ 3;51,52,53;,
+ 3;54,51,55;,
+ 3;56,52,51;,
+ 3;54,56,51;,
+ 3;57,58,59;,
+ 3;60,57,59;,
+ 3;61,58,62;,
+ 3;57,62,58;,
+ 4;63,64,65,66;,
+ 3;63,66,67;,
+ 4;68,69,70,71;,
+ 4;72,73,74,75;,
+ 4;76,77,78,79;,
+ 3;75,64,63;,
+ 3;63,67,72;,
+ 3;72,75,63;,
+ 3;80,81,82;,
+ 3;83,84,85;,
+ 3;83,85,86;,
+ 3;87,88,82;,
+ 3;89,90,91;,
+ 3;81,87,82;,
+ 3;92,93,94;,
+ 3;92,95,93;,
+ 3;95,92,96;,
+ 3;96,97,95;,
+ 3;98,97,96;,
+ 3;90,89,99;,
+ 3;90,99,100;,
+ 3;99,89,101;,
+ 3;102,103,104;,
+ 3;102,105,103;,
+ 3;93,106,94;,
+ 3;106,107,94;,
+ 3;108,109,85;,
+ 3;110,108,85;,
+ 3;85,84,110;,
+ 3;111,112,113;,
+ 3;114,115,116;,
+ 3;117,118,119;,
+ 3;120,121,122;,
+ 3;122,123,120;,
+ 3;124,125,126;,
+ 3;126,127,124;,
+ 3;128,129,130;,
+ 3;131,132,133;,
+ 3;107,106,134;,
+ 3;135,136,137;,
+ 3;112,138,113;,
+ 3;139,114,116;,
+ 3;140,141,142;,
+ 3;143,144,145;,
+ 3;146,147,148;,
+ 3;147,149,148;,
+ 3;97,98,150;,
+ 3;151,150,98;,
+ 3;152,153,154;,
+ 3;155,156,146;,
+ 3;157,158,159;,
+ 3;151,160,150;,
+ 3;161,162,163;,
+ 3;164,165,166;,
+ 3;165,167,166;,
+ 3;168,169,170;,
+ 3;171,172,173;,
+ 3;174,175,176;,
+ 3;177,178,179;,
+ 3;180,181,182;,
+ 3;183,184,185;,
+ 3;185,186,183;,
+ 3;187,188,189;,
+ 3;190,191,192;,
+ 3;191,190,193;,
+ 3;183,194,184;,
+ 3;183,195,194;,
+ 3;196,197,198;,
+ 3;199,200,201;,
+ 3;199,202,200;,
+ 3;203,204,205;,
+ 3;165,206,167;,
+ 3;173,172,207;,
+ 3;208,209,210;,
+ 3;174,211,212;,
+ 3;174,176,211;,
+ 3;187,213,214;,
+ 3;188,187,214;,
+ 3;210,215,187;,
+ 3;215,210,209;,
+ 3;216,217,218;,
+ 4;216,218,219,220;,
+ 3;218,221,222;,
+ 3;218,217,221;,
+ 4;223,224,220,219;,
+ 3;225,226,227;,
+ 4;228,224,229,230;,
+ 3;231,232,233;,
+ 4;234,235,236,237;,
+ 4;235,238,239,236;,
+ 3;222,240,241;,
+ 3;224,223,229;,
+ 3;242,243,244;,
+ 3;245,246,247;,
+ 3;248,233,249;,
+ 3;250,251,252;,
+ 3;231,233,253;,
+ 3;254,253,233;,
+ 3;255,245,256;,
+ 3;255,246,245;,
+ 3;219,222,223;,
+ 3;257,258,259;,
+ 3;222,260,223;,
+ 3;260,229,223;,
+ 3;248,249,261;,
+ 3;262,263,264;,
+ 3;265,266,267;,
+ 3;268,269,270;,
+ 3;271,272,273;,
+ 3;274,275,276;,
+ 3;277,278,279;,
+ 3;280,281,282;,
+ 3;283,284,285;,
+ 3;286,287,288;,
+ 3;289,290,291;,
+ 3;292,293,294;,
+ 3;295,296,297;,
+ 3;298,299,300;,
+ 3;233,232,249;,
+ 3;301,302,303;,
+ 4;304,305,301,303;,
+ 3;306,304,303;,
+ 4;302,307,306,303;,
+ 3;308,309,310;,
+ 4;311,312,308,313;,
+ 3;308,312,314;,
+ 4;315,309,308,314;,
+ 3;316,317,318;,
+ 4;319,320,321,322;,
+ 3;323,319,322;,
+ 4;317,324,325,318;,
+ 3;326,327,328;,
+ 3;329,330,331;,
+ 3;332,333,334;,
+ 3;335,336,337;,
+ 3;338,339,307;,
+ 3;330,329,340;,
+ 3;341,342,343;,
+ 3;344,345,346;,
+ 3;347,348,349;,
+ 3;350,351,326;,
+ 3;352,353,354;,
+ 3;355,354,356;,
+ 3;354,353,357;,
+ 3;354,357,356;,
+ 3;358,359,360;,
+ 3;358,360,361;,
+ 3;362,359,363;,
+ 3;359,362,360;,
+ 4;364,365,366,367;,
+ 3;368,364,367;,
+ 4;369,370,371,372;,
+ 4;373,374,375,376;,
+ 4;377,378,379,380;,
+ 3;367,366,373;,
+ 3;376,368,367;,
+ 3;367,373,376;,
+ 3;381,382,383;,
+ 3;384,385,386;,
+ 3;387,384,386;,
+ 3;381,388,389;,
+ 3;390,391,392;,
+ 3;381,389,382;,
+ 3;393,394,395;,
+ 3;394,396,395;,
+ 3;397,395,396;,
+ 3;396,398,397;,
+ 3;397,398,399;,
+ 3;400,392,391;,
+ 3;401,400,391;,
+ 3;402,392,400;,
+ 3;403,404,405;,
+ 3;404,406,405;,
+ 3;393,407,394;,
+ 3;393,408,407;,
+ 3;384,409,410;,
+ 3;384,410,411;,
+ 3;411,385,384;,
+ 3;412,413,414;,
+ 3;415,416,417;,
+ 3;418,419,420;,
+ 3;421,422,423;,
+ 3;423,424,421;,
+ 3;425,426,427;,
+ 3;427,428,425;,
+ 3;429,430,431;,
+ 3;432,433,434;,
+ 3;435,407,408;,
+ 3;436,437,438;,
+ 3;412,439,413;,
+ 3;415,417,440;,
+ 3;441,442,443;,
+ 3;444,445,446;,
+ 3;447,448,449;,
+ 3;447,450,448;,
+ 3;451,399,398;,
+ 3;399,451,452;,
+ 3;453,454,455;,
+ 3;449,456,457;,
+ 3;458,459,460;,
+ 3;451,461,452;,
+ 3;462,162,161;,
+ 3;463,464,164;,
+ 3;463,465,464;,
+ 3;466,169,168;,
+ 3;467,468,171;,
+ 3;469,470,174;,
+ 3;471,472,473;,
+ 3;474,475,476;,
+ 3;477,478,479;,
+ 3;479,480,477;,
+ 3;481,482,187;,
+ 3;192,191,483;,
+ 3;484,483,191;,
+ 3;478,485,479;,
+ 3;485,486,479;,
+ 3;487,197,488;,
+ 3;489,490,199;,
+ 3;490,491,199;,
+ 3;205,492,493;,
+ 3;465,494,464;,
+ 3;495,468,467;,
+ 3;496,209,497;,
+ 3;212,498,174;,
+ 3;498,469,174;,
+ 3;499,500,187;,
+ 3;499,187,482;,
+ 3;187,215,496;,
+ 3;209,496,215;,
+ 3;501,217,216;,
+ 4;220,502,501,216;,
+ 3;503,504,501;,
+ 3;504,217,501;,
+ 4;502,220,505,506;,
+ 3;507,226,225;,
+ 4;230,508,505,228;,
+ 3;509,232,231;,
+ 4;510,511,512,513;,
+ 4;511,514,515,512;,
+ 3;516,517,503;,
+ 3;508,506,505;,
+ 3;518,243,242;,
+ 3;247,519,245;,
+ 3;520,509,521;,
+ 3;522,251,250;,
+ 3;253,509,231;,
+ 3;509,253,523;,
+ 3;524,245,525;,
+ 3;245,519,525;,
+ 3;506,503,502;,
+ 3;526,527,528;,
+ 3;506,529,503;,
+ 3;506,508,529;,
+ 3;530,520,521;,
+ 3;531,532,533;,
+ 3;534,535,536;,
+ 3;537,538,539;,
+ 3;540,541,542;,
+ 3;543,544,274;,
+ 3;545,546,547;,
+ 3;548,281,549;,
+ 3;550,284,283;,
+ 3;551,552,286;,
+ 3;553,554,555;,
+ 3;294,556,557;,
+ 3;558,559,295;,
+ 3;300,560,561;,
+ 3;520,232,509;;
+
+ MeshMaterialList {
+ 9;
+ 298;
+ 2,
+ 2,
+ 2,
+ 2,
+ 5,
+ 2,
+ 2,
+ 5,
+ 2,
+ 5,
+ 5,
+ 2,
+ 4,
+ 4,
+ 4,
+ 4,
+ 2,
+ 4,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 5,
+ 5,
+ 5,
+ 5,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 5,
+ 2,
+ 2,
+ 8,
+ 2,
+ 5,
+ 2,
+ 2,
+ 5,
+ 5,
+ 5,
+ 2,
+ 2,
+ 2,
+ 4,
+ 4,
+ 4,
+ 4,
+ 4,
+ 4,
+ 4,
+ 4,
+ 4,
+ 4,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 4,
+ 4,
+ 4,
+ 4,
+ 4,
+ 4,
+ 2,
+ 2,
+ 5,
+ 5,
+ 5,
+ 8,
+ 5,
+ 5,
+ 2,
+ 2,
+ 2,
+ 2,
+ 5,
+ 1,
+ 2,
+ 2,
+ 5,
+ 5,
+ 2,
+ 7,
+ 7,
+ 5,
+ 5,
+ 5,
+ 6,
+ 6,
+ 2,
+ 2,
+ 5,
+ 5,
+ 1,
+ 1,
+ 6,
+ 6,
+ 2,
+ 5,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 3,
+ 2,
+ 2,
+ 1,
+ 1,
+ 2,
+ 3,
+ 3,
+ 2,
+ 3,
+ 3,
+ 3,
+ 3,
+ 1,
+ 2,
+ 1,
+ 1,
+ 3,
+ 3,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 3,
+ 2,
+ 2,
+ 2,
+ 2,
+ 5,
+ 2,
+ 2,
+ 5,
+ 2,
+ 5,
+ 5,
+ 2,
+ 4,
+ 4,
+ 4,
+ 4,
+ 2,
+ 4,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 5,
+ 5,
+ 5,
+ 5,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 5,
+ 2,
+ 2,
+ 8,
+ 2,
+ 5,
+ 2,
+ 2,
+ 5,
+ 5,
+ 5,
+ 2,
+ 2,
+ 2,
+ 4,
+ 4,
+ 4,
+ 4,
+ 4,
+ 4,
+ 4,
+ 4,
+ 4,
+ 4,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 4,
+ 4,
+ 4,
+ 4,
+ 4,
+ 4,
+ 2,
+ 2,
+ 5,
+ 5,
+ 5,
+ 8,
+ 5,
+ 5,
+ 2,
+ 2,
+ 2,
+ 2,
+ 5,
+ 1,
+ 2,
+ 2,
+ 5,
+ 5,
+ 2,
+ 7,
+ 7,
+ 5,
+ 5,
+ 5,
+ 6,
+ 6,
+ 2,
+ 2,
+ 5,
+ 5,
+ 1,
+ 1,
+ 6,
+ 6,
+ 2,
+ 5,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 3,
+ 2,
+ 2,
+ 1,
+ 1,
+ 2,
+ 3,
+ 3,
+ 2,
+ 3,
+ 3,
+ 3,
+ 3,
+ 1,
+ 2,
+ 1,
+ 1,
+ 3,
+ 3,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 3;;
+ Material {
+ 0.800000;0.800000;0.800000;1.000000;;
+ 5.000000;
+ 0.000000;0.000000;0.000000;;
+ 0.000000;0.000000;0.000000;;
+ }
+ Material {
+ 0.800000;0.800000;0.800000;1.000000;;
+ 5.000000;
+ 0.000000;0.000000;0.000000;;
+ 0.000000;0.000000;0.000000;;
+ TextureFilename {
+ "samaru_high.bmp";
+ }
+ }
+ Material {
+ 0.800000;0.800000;0.800000;1.000000;;
+ 5.000000;
+ 0.000000;0.000000;0.000000;;
+ 0.000000;0.000000;0.000000;;
+ TextureFilename {
+ "samaru_low.bmp";
+ }
+ }
+ Material {
+ 0.094400;0.357600;0.072000;1.000000;;
+ 5.000000;
+ 0.000000;0.000000;0.000000;;
+ 0.000000;0.000000;0.000000;;
+ }
+ Material {
+ 0.166400;0.392000;0.122400;1.000000;;
+ 5.000000;
+ 0.000000;0.000000;0.000000;;
+ 0.000000;0.000000;0.000000;;
+ }
+ Material {
+ 0.162000;0.162000;0.162000;1.000000;;
+ 5.000000;
+ 0.000000;0.000000;0.000000;;
+ 0.000000;0.000000;0.000000;;
+ }
+ Material {
+ 0.661640;0.495720;0.090440;1.000000;;
+ 0.000000;
+ 0.000000;0.000000;0.000000;;
+ 0.000000;0.000000;0.000000;;
+ }
+ Material {
+ 0.263670;0.263670;0.263670;1.000000;;
+ 5.000000;
+ 0.000000;0.000000;0.000000;;
+ 0.000000;0.000000;0.000000;;
+ }
+ Material {
+ 1.000000;1.000000;1.000000;1.000000;;
+ 0.000000;
+ 0.000000;0.000000;0.000000;;
+ 0.000000;0.000000;0.000000;;
+ }
+ }
+ MeshNormals {
+ 355;
+ -0.974589;-0.207706;0.083868;,
+ 0.632823;0.244486;-0.734684;,
+ -0.994906;-0.092058;0.041076;,
+ 0.942901;-0.057262;-0.328114;,
+ 0.946462;0.252056;-0.201684;,
+ 0.996955;-0.043545;-0.064685;,
+ 0.405237;0.074339;0.911184;,
+ 0.286001;-0.051726;0.956832;,
+ -0.988215;-0.089665;0.124063;,
+ 0.974176;0.113662;-0.195093;,
+ 0.975131;0.129382;-0.179942;,
+ 0.318060;0.018707;0.947886;,
+ 0.729051;0.019544;-0.684180;,
+ 0.386027;0.004635;0.922476;,
+ -0.989546;-0.110458;0.092724;,
+ 0.064206;0.876253;-0.477555;,
+ 0.280465;0.735992;-0.616162;,
+ 0.416877;0.433612;-0.798870;,
+ -0.973317;0.028682;-0.227665;,
+ 0.894894;-0.061646;-0.442001;,
+ 0.090958;0.921325;-0.378005;,
+ 0.124315;0.044071;-0.991264;,
+ -0.057797;0.178904;-0.982167;,
+ 0.182362;-0.184933;-0.965683;,
+ 0.259954;-0.056339;-0.963976;,
+ -0.068980;0.673682;-0.735795;,
+ -0.123528;0.722340;-0.680416;,
+ 0.756028;0.376630;0.535324;,
+ 0.999738;0.016184;-0.016202;,
+ -0.802911;-0.430020;0.412815;,
+ -0.980040;-0.197453;-0.023124;,
+ 0.094325;-0.346327;-0.933360;,
+ 0.184782;-0.374878;-0.908472;,
+ 0.968531;-0.192714;0.157508;,
+ 0.274318;-0.277396;-0.920761;,
+ 0.023907;0.437435;-0.898932;,
+ 0.457027;-0.017632;0.889278;,
+ -0.919291;-0.305205;0.248502;,
+ 0.079922;-0.246155;-0.965930;,
+ 0.971067;0.193073;-0.140538;,
+ -0.960705;-0.172346;0.217586;,
+ 0.956801;-0.283225;-0.065697;,
+ 0.877907;-0.463682;-0.119495;,
+ -0.999855;-0.002243;-0.016893;,
+ -0.086268;-0.493672;0.865359;,
+ -0.934262;-0.356360;0.012759;,
+ -0.056638;0.712219;-0.699669;,
+ -0.086917;0.755451;-0.649414;,
+ -0.960776;0.260368;0.095491;,
+ -0.226046;-0.592739;-0.773022;,
+ -0.302663;0.859203;-0.412511;,
+ 0.006591;0.964119;-0.265388;,
+ -0.802989;-0.592565;-0.063839;,
+ -0.000000;0.261978;-0.965074;,
+ 0.346729;0.645687;-0.680344;,
+ 0.926557;0.357446;0.117153;,
+ 0.000000;0.473276;-0.880914;,
+ 0.625038;0.504083;-0.596010;,
+ 0.684696;0.206156;-0.699065;,
+ 0.925282;0.374983;-0.056928;,
+ 0.000000;-0.094325;0.995541;,
+ 0.024088;0.183476;-0.982729;,
+ 0.961042;-0.234924;0.145631;,
+ 0.976378;-0.211363;-0.044859;,
+ 0.993643;-0.102267;-0.047063;,
+ 0.000000;-0.108091;0.994141;,
+ -0.167388;-0.005881;0.985873;,
+ 0.992545;0.042365;-0.114277;,
+ 0.972945;0.134717;-0.187693;,
+ 0.000000;-0.169741;0.985489;,
+ -0.086676;-0.004616;-0.996226;,
+ -0.072860;0.001649;-0.997341;,
+ 0.191310;0.248729;0.949492;,
+ -0.000000;0.642902;0.765948;,
+ 0.000000;0.238957;0.971030;,
+ -0.000000;0.551611;-0.834101;,
+ 0.000000;-0.157455;-0.987526;,
+ 0.169232;0.905841;0.388347;,
+ 0.613895;0.273685;-0.740425;,
+ 0.857601;-0.070257;-0.509495;,
+ 0.893357;-0.437571;0.102201;,
+ 0.379295;-0.024416;-0.924954;,
+ 0.953252;-0.293382;0.072369;,
+ 0.158620;-0.008878;-0.987300;,
+ 0.440829;-0.079155;-0.894094;,
+ -0.000000;-0.059552;-0.998225;,
+ 0.451741;0.003038;-0.892144;,
+ 0.607805;0.151240;-0.779551;,
+ 0.479399;0.127403;-0.868300;,
+ 0.365191;0.111309;-0.924254;,
+ 0.000000;-0.924149;0.382033;,
+ 0.991843;-0.087116;0.093046;,
+ -0.000000;-0.470080;0.882624;,
+ 0.310771;-0.901809;0.300271;,
+ 0.840245;-0.265022;0.473024;,
+ 0.115627;-0.084648;0.989679;,
+ 0.134622;0.990779;-0.015304;,
+ 0.000000;0.287711;0.957717;,
+ 0.993811;-0.097010;-0.054119;,
+ 0.704778;-0.615801;0.352245;,
+ -0.782089;0.183926;-0.595406;,
+ -0.729405;0.619435;0.290292;,
+ -0.431206;-0.527102;0.732274;,
+ 0.974589;-0.207706;0.083868;,
+ -0.632823;0.244486;-0.734684;,
+ 0.994906;-0.092058;0.041076;,
+ -0.942901;-0.057262;-0.328114;,
+ -0.946462;0.252056;-0.201684;,
+ -0.996955;-0.043545;-0.064685;,
+ -0.405237;0.074339;0.911184;,
+ -0.286001;-0.051726;0.956832;,
+ 0.988215;-0.089665;0.124063;,
+ -0.974176;0.113662;-0.195093;,
+ -0.975131;0.129382;-0.179942;,
+ -0.318060;0.018707;0.947886;,
+ -0.729051;0.019544;-0.684180;,
+ -0.386027;0.004635;0.922476;,
+ 0.989546;-0.110458;0.092724;,
+ -0.064206;0.876253;-0.477555;,
+ -0.280465;0.735992;-0.616162;,
+ -0.416877;0.433612;-0.798870;,
+ 0.973317;0.028682;-0.227665;,
+ -0.894894;-0.061646;-0.442001;,
+ -0.090958;0.921325;-0.378005;,
+ -0.124315;0.044071;-0.991264;,
+ 0.057797;0.178904;-0.982167;,
+ -0.182362;-0.184933;-0.965683;,
+ -0.259954;-0.056339;-0.963976;,
+ 0.068980;0.673682;-0.735795;,
+ 0.123528;0.722340;-0.680416;,
+ -0.756028;0.376630;0.535324;,
+ -0.999738;0.016184;-0.016202;,
+ 0.802911;-0.430020;0.412815;,
+ 0.980040;-0.197453;-0.023124;,
+ -0.094325;-0.346327;-0.933360;,
+ -0.184782;-0.374878;-0.908472;,
+ -0.968531;-0.192714;0.157508;,
+ -0.274318;-0.277396;-0.920761;,
+ -0.023907;0.437435;-0.898932;,
+ -0.457027;-0.017632;0.889278;,
+ 0.919291;-0.305205;0.248502;,
+ -0.079922;-0.246155;-0.965930;,
+ -0.971067;0.193073;-0.140538;,
+ 0.960705;-0.172346;0.217586;,
+ -0.956801;-0.283225;-0.065697;,
+ -0.877907;-0.463682;-0.119495;,
+ 0.999855;-0.002243;-0.016893;,
+ 0.086268;-0.493672;0.865359;,
+ 0.934262;-0.356360;0.012759;,
+ 0.056638;0.712219;-0.699669;,
+ 0.086917;0.755451;-0.649414;,
+ 0.960776;0.260368;0.095491;,
+ 0.226046;-0.592739;-0.773022;,
+ 0.302663;0.859203;-0.412511;,
+ -0.006591;0.964119;-0.265388;,
+ 0.802989;-0.592565;-0.063839;,
+ -0.346729;0.645687;-0.680344;,
+ -0.926557;0.357446;0.117153;,
+ -0.625038;0.504083;-0.596010;,
+ -0.925282;0.374983;-0.056928;,
+ -0.024088;0.183476;-0.982729;,
+ -0.961042;-0.234924;0.145631;,
+ -0.976378;-0.211363;-0.044859;,
+ -0.993643;-0.102267;-0.047063;,
+ 0.167388;-0.005881;0.985873;,
+ -0.992545;0.042365;-0.114277;,
+ -0.972945;0.134717;-0.187693;,
+ 0.086676;-0.004616;-0.996226;,
+ 0.072860;0.001649;-0.997341;,
+ -0.191310;0.248729;0.949492;,
+ -0.613895;0.273685;-0.740425;,
+ -0.857601;-0.070257;-0.509495;,
+ -0.893357;-0.437571;0.102201;,
+ -0.379295;-0.024416;-0.924954;,
+ -0.953252;-0.293382;0.072369;,
+ -0.440829;-0.079155;-0.894094;,
+ -0.451741;0.003038;-0.892144;,
+ -0.479399;0.127403;-0.868300;,
+ -0.365191;0.111309;-0.924254;,
+ -0.991843;-0.087116;0.093046;,
+ -0.310771;-0.901809;0.300271;,
+ -0.840245;-0.265022;0.473024;,
+ -0.115627;-0.084648;0.989679;,
+ -0.993811;-0.097010;-0.054119;,
+ -0.704778;-0.615801;0.352245;,
+ 0.782089;0.183926;-0.595406;,
+ 0.729405;0.619435;0.290292;,
+ 0.431206;-0.527102;0.732274;,
+ 0.451846;-0.009454;0.892046;,
+ 0.364714;-0.065207;0.928833;,
+ 0.460683;0.059358;0.885578;,
+ -0.997574;-0.051785;0.046530;,
+ -0.989473;-0.131178;0.061126;,
+ -0.968827;-0.246033;0.029028;,
+ -0.889077;0.064488;-0.453192;,
+ -0.986136;-0.040190;-0.160997;,
+ 0.998254;-0.050052;-0.031367;,
+ 0.166760;0.919372;-0.356296;,
+ 0.017918;0.929986;-0.367158;,
+ 0.221364;-0.201266;-0.954196;,
+ -0.368641;-0.041997;-0.928623;,
+ -0.510650;-0.241613;-0.825142;,
+ -0.312282;0.151531;-0.937826;,
+ 0.985569;-0.165261;0.036630;,
+ 0.772332;0.600569;0.206929;,
+ 0.996189;-0.033284;-0.080615;,
+ 0.976247;-0.187125;-0.109210;,
+ 0.183204;-0.592626;-0.784366;,
+ -0.962047;-0.246690;0.116661;,
+ -0.990608;-0.107745;-0.084183;,
+ -0.875507;-0.481747;-0.037509;,
+ 0.198828;-0.443934;0.873722;,
+ 0.204147;-0.574028;0.792979;,
+ 0.100949;-0.475999;0.873633;,
+ 0.232158;-0.299965;0.925269;,
+ 0.161385;0.070317;0.984383;,
+ 0.974234;-0.175744;-0.141358;,
+ -0.255186;-0.544666;0.798886;,
+ -0.952301;0.305156;0.001595;,
+ -0.230001;0.857161;-0.460841;,
+ -0.050558;0.681923;-0.729674;,
+ -0.032120;0.641774;-0.766221;,
+ -0.907349;0.407020;0.105132;,
+ -0.106855;-0.584770;-0.804131;,
+ -0.341793;-0.591676;-0.730135;,
+ 0.873577;-0.434903;-0.218455;,
+ 0.801871;-0.551343;-0.230267;,
+ -0.289678;-0.665601;0.687795;,
+ -0.264650;-0.689775;0.673922;,
+ 0.914136;-0.398087;-0.076696;,
+ -0.186362;-0.810265;-0.555643;,
+ -0.217301;0.845765;-0.487300;,
+ -0.094113;0.866050;-0.491020;,
+ -0.208569;0.122117;0.970354;,
+ -0.265413;-0.106416;0.958244;,
+ -0.337098;0.812286;-0.475979;,
+ -0.839100;-0.362936;-0.405202;,
+ -0.412037;-0.119428;0.903306;,
+ 0.946510;-0.322256;0.016408;,
+ 0.940223;-0.293762;0.172292;,
+ 0.032328;-0.067110;0.997222;,
+ 0.022754;-0.141127;0.989730;,
+ 0.000000;-0.005965;0.999982;,
+ 0.133431;0.085256;0.987384;,
+ 0.301151;-0.161861;0.939739;,
+ -0.000000;0.001653;-0.999999;,
+ -0.059027;0.007913;-0.998225;,
+ 0.001170;0.973805;0.227382;,
+ 0.856990;0.283905;0.430076;,
+ 0.331213;0.627060;0.705049;,
+ 0.167388;0.005881;-0.985873;,
+ 0.000000;0.108091;-0.994141;,
+ 0.086676;0.004616;0.996226;,
+ 0.072860;-0.001649;0.997341;,
+ 0.000000;-0.995901;0.090447;,
+ 0.056749;-0.998140;-0.022273;,
+ 0.198868;-0.979981;-0.009452;,
+ 0.188382;-0.731906;0.654848;,
+ 0.344255;-0.232792;0.909558;,
+ 0.380972;0.090455;-0.920151;,
+ 0.158509;-0.985389;-0.062324;,
+ 0.905968;-0.419458;-0.057254;,
+ 0.105774;-0.712375;-0.693782;,
+ -0.217832;0.975563;0.028740;,
+ 0.134260;0.990449;0.031390;,
+ -0.869321;0.462045;-0.175483;,
+ 0.834394;-0.312786;-0.453819;,
+ 0.318897;0.714508;0.622722;,
+ 0.000000;-0.630279;0.776369;,
+ 0.744052;-0.644066;-0.177668;,
+ 0.022273;0.999005;-0.038635;,
+ 0.499611;-0.585596;0.638331;,
+ 0.348436;0.791239;-0.502527;,
+ -0.364714;-0.065207;0.928833;,
+ -0.451846;-0.009454;0.892046;,
+ -0.460683;0.059358;0.885578;,
+ 0.989473;-0.131178;0.061126;,
+ 0.997574;-0.051785;0.046530;,
+ 0.968827;-0.246033;0.029028;,
+ 0.986136;-0.040190;-0.160997;,
+ 0.889077;0.064488;-0.453192;,
+ -0.998254;-0.050052;-0.031367;,
+ -0.166760;0.919372;-0.356296;,
+ -0.017918;0.929986;-0.367158;,
+ -0.221364;-0.201266;-0.954196;,
+ 0.510650;-0.241613;-0.825142;,
+ 0.368641;-0.041997;-0.928623;,
+ 0.312282;0.151531;-0.937826;,
+ -0.772332;0.600569;0.206929;,
+ -0.985569;-0.165261;0.036630;,
+ -0.976247;-0.187125;-0.109210;,
+ -0.996189;-0.033284;-0.080615;,
+ -0.183204;-0.592626;-0.784366;,
+ 0.962047;-0.246690;0.116661;,
+ 0.990608;-0.107745;-0.084183;,
+ 0.875507;-0.481747;-0.037509;,
+ -0.100949;-0.475999;0.873633;,
+ -0.204147;-0.574028;0.792979;,
+ -0.198828;-0.443934;0.873722;,
+ -0.232158;-0.299965;0.925269;,
+ -0.161385;0.070317;0.984383;,
+ -0.974234;-0.175744;-0.141358;,
+ 0.255186;-0.544666;0.798886;,
+ 0.952301;0.305156;0.001595;,
+ 0.230001;0.857161;-0.460841;,
+ 0.032120;0.641774;-0.766221;,
+ 0.050558;0.681923;-0.729674;,
+ 0.907349;0.407020;0.105132;,
+ 0.106855;-0.584770;-0.804131;,
+ 0.341793;-0.591676;-0.730135;,
+ -0.801871;-0.551343;-0.230267;,
+ -0.873577;-0.434903;-0.218455;,
+ 0.289678;-0.665601;0.687795;,
+ 0.264650;-0.689775;0.673922;,
+ -0.914136;-0.398087;-0.076696;,
+ 0.186362;-0.810265;-0.555643;,
+ 0.094113;0.866050;-0.491020;,
+ 0.217301;0.845765;-0.487300;,
+ 0.208569;0.122117;0.970354;,
+ 0.265413;-0.106416;0.958244;,
+ 0.337098;0.812286;-0.475979;,
+ 0.839100;-0.362936;-0.405202;,
+ 0.412037;-0.119428;0.903306;,
+ -0.684696;0.206156;-0.699065;,
+ -0.940223;-0.293762;0.172292;,
+ -0.946510;-0.322256;0.016408;,
+ -0.022754;-0.141127;0.989730;,
+ -0.032328;-0.067110;0.997222;,
+ -0.133431;0.085256;0.987384;,
+ -0.301151;-0.161861;0.939739;,
+ 0.059027;0.007913;-0.998225;,
+ -0.001170;0.973805;0.227382;,
+ -0.856990;0.283905;0.430076;,
+ -0.331213;0.627060;0.705049;,
+ -0.167388;0.005881;-0.985873;,
+ -0.072860;-0.001649;0.997341;,
+ -0.086676;0.004616;0.996226;,
+ -0.673540;0.424446;-0.605136;,
+ -0.607805;0.151240;-0.779551;,
+ -0.198868;-0.979981;-0.009452;,
+ -0.056749;-0.998140;-0.022273;,
+ -0.188382;-0.731906;0.654848;,
+ -0.344255;-0.232792;0.909558;,
+ -0.380972;0.090455;-0.920151;,
+ -0.158509;-0.985389;-0.062324;,
+ -0.905968;-0.419458;-0.057254;,
+ -0.105774;-0.712375;-0.693782;,
+ 0.217832;0.975563;0.028740;,
+ -0.134260;0.990449;0.031390;,
+ -0.834394;-0.312786;-0.453819;,
+ -0.318897;0.714508;0.622722;,
+ -0.744052;-0.644066;-0.177668;,
+ -0.022273;0.999005;-0.038635;,
+ -0.499611;-0.585596;0.638331;,
+ -0.348436;0.791239;-0.502527;;
+ 298;
+ 3;9,3,12;,
+ 4;9,12,1,4;,
+ 3;9,4,10;,
+ 4;9,10,5,3;,
+ 3;188,189,13;,
+ 4;188,13,6,190;,
+ 3;11,6,13;,
+ 4;11,13,189,7;,
+ 3;14,191,192;,
+ 4;14,192,193,0;,
+ 3;14,0,8;,
+ 4;14,8,2,191;,
+ 3;16,17,15;,
+ 3;194,18,195;,
+ 3;17,16,19;,
+ 3;196,5,19;,
+ 3;5,196,3;,
+ 3;191,195,18;,
+ 3;195,191,2;,
+ 3;15,20,16;,
+ 3;20,197,16;,
+ 3;15,198,20;,
+ 3;199,12,3;,
+ 3;200,201,201;,
+ 3;21,12,199;,
+ 3;200,21,199;,
+ 3;21,22,1;,
+ 3;12,21,1;,
+ 3;202,22,200;,
+ 3;21,200,22;,
+ 4;32,31,23,24;,
+ 3;32,24,34;,
+ 4;33,203,204,27;,
+ 4;35,26,25,38;,
+ 4;39,28,205,206;,
+ 3;38,31,32;,
+ 3;32,34,207;,
+ 3;207,38,32;,
+ 3;40,37,208;,
+ 3;208,209,30;,
+ 3;208,30,40;,
+ 3;29,210,208;,
+ 3;36,33,27;,
+ 3;37,29,208;,
+ 3;211,212,213;,
+ 3;211,214,212;,
+ 3;214,211,36;,
+ 3;36,215,214;,
+ 3;27,215,36;,
+ 3;33,216,206;,
+ 3;33,206,203;,
+ 3;206,216,39;,
+ 3;28,41,205;,
+ 3;28,42,41;,
+ 3;212,44,213;,
+ 3;44,217,213;,
+ 3;43,218,30;,
+ 3;45,43,30;,
+ 3;30,209,45;,
+ 3;25,26,219;,
+ 3;220,46,221;,
+ 3;220,47,46;,
+ 3;218,43,222;,
+ 3;222,48,218;,
+ 3;49,223,49;,
+ 3;49,224,49;,
+ 3;42,225,226;,
+ 3;226,41,42;,
+ 3;217,44,227;,
+ 3;227,228,217;,
+ 3;26,50,219;,
+ 3;26,220,221;,
+ 3;205,229,229;,
+ 3;230,230,230;,
+ 3;231,51,232;,
+ 3;51,27,204;,
+ 3;215,233,233;,
+ 3;234,233,233;,
+ 3;29,52,210;,
+ 3;235,51,231;,
+ 3;52,236,210;,
+ 3;234,237,29;,
+ 3;53,56,54;,
+ 3;56,57,54;,
+ 3;57,55,54;,
+ 3;56,58,57;,
+ 3;58,59,57;,
+ 3;53,54,61;,
+ 3;238,239,62;,
+ 3;239,55,62;,
+ 3;64,63,238;,
+ 3;238,62,64;,
+ 3;60,240,241;,
+ 3;66,242,65;,
+ 3;242,66,243;,
+ 3;64,67,63;,
+ 3;64,68,67;,
+ 3;244,69,244;,
+ 3;245,71,70;,
+ 3;245,246,71;,
+ 3;241,72,60;,
+ 3;247,247,247;,
+ 3;248,59,248;,
+ 3;249,73,72;,
+ 3;53,250,251;,
+ 3;53,61,250;,
+ 3;60,252,253;,
+ 3;240,60,253;,
+ 3;72,74,60;,
+ 3;74,72,73;,
+ 3;85,75,86;,
+ 4;85,86,84,83;,
+ 3;86,78,79;,
+ 3;86,75,78;,
+ 4;89,88,83,84;,
+ 3;87,83,88;,
+ 4;87,88,81,76;,
+ 3;90,254,93;,
+ 4;91,94,79,80;,
+ 4;94,93,82,79;,
+ 3;79,84,86;,
+ 3;88,89,81;,
+ 3;77,97,95;,
+ 3;92,95,97;,
+ 3;255,93,256;,
+ 3;75,96,78;,
+ 3;90,93,92;,
+ 3;257,92,93;,
+ 3;258,92,94;,
+ 3;258,95,92;,
+ 3;84,79,89;,
+ 3;98,79,82;,
+ 3;79,259,89;,
+ 3;259,81,89;,
+ 3;255,256,260;,
+ 3;80,261,91;,
+ 3;99,99,80;,
+ 3;262,262,262;,
+ 3;263,264,263;,
+ 3;265,100,100;,
+ 3;266,80,78;,
+ 3;267,96,264;,
+ 3;265,101,101;,
+ 3;268,95,102;,
+ 3;269,261,80;,
+ 3;270,264,77;,
+ 3;268,80,271;,
+ 3;272,264,96;,
+ 3;93,254,256;,
+ 3;115,106,112;,
+ 4;107,104,115,112;,
+ 3;113,107,112;,
+ 4;106,108,113,112;,
+ 3;116,273,274;,
+ 4;275,109,116,274;,
+ 3;116,109,114;,
+ 4;110,273,116,114;,
+ 3;276,277,117;,
+ 4;103,278,276,117;,
+ 3;111,103,117;,
+ 4;277,105,111,117;,
+ 3;118,120,119;,
+ 3;279,121,280;,
+ 3;122,119,120;,
+ 3;122,108,281;,
+ 3;106,281,108;,
+ 3;121,279,277;,
+ 3;105,277,279;,
+ 3;119,123,118;,
+ 3;119,282,123;,
+ 3;123,283,118;,
+ 3;106,115,284;,
+ 3;285,285,286;,
+ 3;284,115,124;,
+ 3;284,124,286;,
+ 3;104,125,124;,
+ 3;104,124,115;,
+ 3;286,125,287;,
+ 3;125,286,124;,
+ 4;127,126,134,135;,
+ 3;137,127,135;,
+ 4;130,288,289,136;,
+ 4;141,128,129,138;,
+ 4;290,291,131,142;,
+ 3;135,134,141;,
+ 3;292,137,135;,
+ 3;135,141,292;,
+ 3;293,140,143;,
+ 3;133,294,293;,
+ 3;143,133,293;,
+ 3;293,295,132;,
+ 3;130,136,139;,
+ 3;293,132,140;,
+ 3;296,297,298;,
+ 3;297,299,298;,
+ 3;139,298,299;,
+ 3;299,300,139;,
+ 3;139,300,130;,
+ 3;290,301,136;,
+ 3;289,290,136;,
+ 3;142,301,290;,
+ 3;291,144,131;,
+ 3;144,145,131;,
+ 3;296,147,297;,
+ 3;296,302,147;,
+ 3;133,303,146;,
+ 3;133,146,148;,
+ 3;148,294,133;,
+ 3;304,129,128;,
+ 3;305,149,306;,
+ 3;149,150,306;,
+ 3;307,146,303;,
+ 3;303,151,307;,
+ 3;152,308,152;,
+ 3;152,309,152;,
+ 3;310,311,145;,
+ 3;145,144,310;,
+ 3;312,147,302;,
+ 3;302,313,312;,
+ 3;304,153,129;,
+ 3;305,306,129;,
+ 3;314,314,291;,
+ 3;315,315,315;,
+ 3;316,154,317;,
+ 3;288,130,154;,
+ 3;318,318,300;,
+ 3;318,318,319;,
+ 3;295,155,132;,
+ 3;317,154,320;,
+ 3;295,321,155;,
+ 3;132,322,319;,
+ 3;156,56,53;,
+ 3;156,158,56;,
+ 3;156,157,158;,
+ 3;158,323,56;,
+ 3;158,159,323;,
+ 3;160,156,53;,
+ 3;161,324,325;,
+ 3;161,157,324;,
+ 3;325,162,163;,
+ 3;163,161,325;,
+ 3;326,327,60;,
+ 3;65,242,164;,
+ 3;328,164,242;,
+ 3;162,165,163;,
+ 3;165,166,163;,
+ 3;329,69,329;,
+ 3;167,168,245;,
+ 3;168,330,245;,
+ 3;60,169,326;,
+ 3;331,331,331;,
+ 3;332,159,332;,
+ 3;169,73,333;,
+ 3;251,334,53;,
+ 3;334,160,53;,
+ 3;335,336,60;,
+ 3;335,60,327;,
+ 3;60,74,169;,
+ 3;73,169,74;,
+ 3;176,75,85;,
+ 4;83,175,176,85;,
+ 3;171,170,176;,
+ 3;170,75,176;,
+ 4;175,83,177,178;,
+ 3;177,337,338;,
+ 4;76,173,177,338;,
+ 3;180,254,90;,
+ 4;172,171,181,179;,
+ 4;171,174,180,181;,
+ 3;176,175,171;,
+ 3;173,178,177;,
+ 3;182,97,77;,
+ 3;97,182,92;,
+ 3;339,180,340;,
+ 3;170,96,75;,
+ 3;92,180,90;,
+ 3;180,92,341;,
+ 3;181,92,342;,
+ 3;92,182,342;,
+ 3;178,171,175;,
+ 3;174,171,183;,
+ 3;178,343,171;,
+ 3;178,173,343;,
+ 3;344,339,340;,
+ 3;179,345,172;,
+ 3;172,184,184;,
+ 3;346,346,346;,
+ 3;347,348,347;,
+ 3;185,185,185;,
+ 3;170,172,349;,
+ 3;348,96,350;,
+ 3;186,77,96;,
+ 3;187,182,268;,
+ 3;172,345,351;,
+ 3;77,348,352;,
+ 3;353,172,268;,
+ 3;96,348,354;,
+ 3;339,254,180;;
+ }
+ MeshTextureCoords {
+ 562;
+ 0.371030;0.135240;
+ 0.562540;0.285920;
+ 0.352800;0.173560;
+ 0.276460;0.079040;
+ 0.319630;0.024920;
+ 0.388570;0.111120;
+ 0.636690;0.275050;
+ 0.591150;0.385480;
+ 0.608240;0.318480;
+ 0.608990;0.383410;
+ 0.596090;0.384490;
+ 0.638720;0.551730;
+ 0.598250;0.551730;
+ 0.642580;0.380270;
+ 0.660050;0.329060;
+ 0.091750;0.493710;
+ 0.019340;0.737670;
+ 0.048520;0.480250;
+ 0.072730;0.531000;
+ 0.029510;0.524150;
+ 0.024070;0.472940;
+ 0.082440;0.464140;
+ 0.097240;0.534870;
+ 0.108350;0.507900;
+ 0.074880;0.661270;
+ 0.952300;0.361570;
+ 0.920990;0.388180;
+ 0.909870;0.363200;
+ 0.134660;0.695600;
+ 0.113160;0.695600;
+ 0.109680;0.673310;
+ 0.457970;0.956510;
+ 0.489280;0.937580;
+ 0.487030;0.956510;
+ 0.572240;0.231760;
+ 0.643210;0.250690;
+ 0.570320;0.250690;
+ 0.554160;0.354070;
+ 0.562540;0.287780;
+ 0.014600;0.695600;
+ 0.137460;0.688590;
+ 0.021200;0.737670;
+ 0.076740;0.661270;
+ 0.911590;0.364920;
+ 0.933080;0.334410;
+ 0.954020;0.363290;
+ 0.931360;0.334550;
+ 0.949260;0.326410;
+ 0.952300;0.363430;
+ 0.907240;0.325350;
+ 0.931360;0.332690;
+ 0.722990;0.519910;
+ 0.746370;0.288640;
+ 0.749900;0.515660;
+ 0.694920;0.278760;
+ 0.701060;0.517630;
+ 0.720250;0.307780;
+ 0.723210;0.401870;
+ 0.712980;0.319210;
+ 0.735650;0.318480;
+ 0.747660;0.394970;
+ 0.689250;0.323110;
+ 0.699360;0.393850;
+ 0.809880;0.654370;
+ 0.772960;0.688940;
+ 0.722660;0.627210;
+ 0.802930;0.556810;
+ 0.865360;0.635310;
+ 0.408840;0.387590;
+ 0.372710;0.389140;
+ 0.395690;0.329430;
+ 0.442880;0.352460;
+ 0.869190;0.695950;
+ 0.966100;0.815190;
+ 0.917220;0.855530;
+ 0.807090;0.727600;
+ 0.444590;0.455760;
+ 0.384720;0.520010;
+ 0.357110;0.483620;
+ 0.404080;0.421220;
+ 0.602880;0.661310;
+ 0.591150;0.615110;
+ 0.651440;0.629870;
+ 0.651440;0.635910;
+ 0.678480;0.706790;
+ 0.654400;0.729610;
+ 0.613760;0.668560;
+ 0.611450;0.580920;
+ 0.664170;0.607590;
+ 0.457730;0.412110;
+ 0.410760;0.387590;
+ 0.444800;0.351920;
+ 0.461890;0.447360;
+ 0.495860;0.515370;
+ 0.457970;0.511910;
+ 0.497190;0.447060;
+ 0.468410;0.413340;
+ 0.502430;0.400870;
+ 0.481780;0.345920;
+ 0.398040;0.413820;
+ 0.373540;0.389140;
+ 0.445880;0.458330;
+ 0.376270;0.508760;
+ 0.316170;0.534880;
+ 0.353930;0.487100;
+ 0.359170;0.564170;
+ 0.493840;0.557420;
+ 0.470690;0.567320;
+ 0.719060;0.748890;
+ 0.681320;0.771660;
+ 0.731680;0.738020;
+ 0.939910;0.580920;
+ 0.974340;0.587670;
+ 0.942500;0.634130;
+ 0.963510;0.246230;
+ 0.923780;0.260690;
+ 0.937520;0.242860;
+ 0.610050;0.279890;
+ 0.588190;0.297300;
+ 0.570320;0.291390;
+ 0.665550;0.754930;
+ 0.727770;0.710660;
+ 0.753190;0.745350;
+ 0.713640;0.807260;
+ 0.914670;0.987760;
+ 0.874760;0.973630;
+ 0.903210;0.896990;
+ 0.941380;0.899840;
+ 0.385210;0.561890;
+ 0.326970;0.606650;
+ 0.258820;0.523480;
+ 0.258670;0.522350;
+ 0.292730;0.485240;
+ 0.385060;0.560770;
+ 0.504030;0.584330;
+ 0.173800;0.935310;
+ 0.189090;0.936620;
+ 0.207140;0.965810;
+ 0.955940;0.640840;
+ 0.959700;0.198460;
+ 0.726210;0.255020;
+ 0.692370;0.299420;
+ 0.673040;0.287030;
+ 0.731370;0.847100;
+ 0.721700;0.834480;
+ 0.735140;0.827770;
+ 0.333200;0.912500;
+ 0.339760;0.857270;
+ 0.393750;0.887420;
+ 0.378940;0.837570;
+ 0.526280;0.366680;
+ 0.531970;0.318480;
+ 0.134620;0.971130;
+ 0.098950;0.958300;
+ 0.141010;0.918400;
+ 0.298760;0.857350;
+ 0.328740;0.840740;
+ 0.014600;0.918400;
+ 0.069750;0.936430;
+ 0.054500;0.971100;
+ 0.561950;0.340650;
+ 0.189050;0.183970;
+ 0.248680;0.114460;
+ 0.355130;0.320400;
+ 0.098560;0.753460;
+ 0.189700;0.689110;
+ 0.262250;0.772030;
+ 0.211050;0.521330;
+ 0.898690;0.181840;
+ 0.898690;0.117520;
+ 0.943430;0.167900;
+ 0.862030;0.447080;
+ 0.896250;0.457410;
+ 0.890990;0.497460;
+ 0.022190;0.039810;
+ 0.385300;0.045390;
+ 0.302430;0.175400;
+ 0.307970;0.806340;
+ 0.325310;0.659980;
+ 0.394990;0.716960;
+ 0.325310;0.658040;
+ 0.416670;0.616680;
+ 0.396200;0.718650;
+ 0.387480;0.744830;
+ 0.303820;0.741480;
+ 0.298760;0.697750;
+ 0.401730;0.719350;
+ 0.144570;0.144000;
+ 0.082820;0.171790;
+ 0.076310;0.067400;
+ 0.457970;0.289280;
+ 0.541130;0.014600;
+ 0.541130;0.275350;
+ 0.467220;0.057810;
+ 0.310690;0.807190;
+ 0.374520;0.808370;
+ 0.903270;0.014600;
+ 0.963310;0.086600;
+ 0.896970;0.078130;
+ 0.298800;0.014600;
+ 0.428770;0.303030;
+ 0.298760;0.305530;
+ 0.360550;0.042380;
+ 0.078030;0.069120;
+ 0.125470;0.069500;
+ 0.146290;0.145720;
+ 0.153070;0.533080;
+ 0.947310;0.510580;
+ 0.115750;0.014600;
+ 0.144570;0.014790;
+ 0.123750;0.067780;
+ 0.337500;0.901660;
+ 0.022190;0.857950;
+ 0.144610;0.434940;
+ 0.014600;0.432440;
+ 0.144570;0.066180;
+ 0.464040;0.302620;
+ 0.464040;0.029020;
+ 0.691270;0.324520;
+ 0.740600;0.448980;
+ 0.464040;0.464740;
+ 0.736650;0.121130;
+ 0.967260;0.235070;
+ 0.822400;0.656690;
+ 0.607110;0.655060;
+ 0.464430;0.635020;
+ 0.462620;0.468660;
+ 0.604270;0.651560;
+ 0.464040;0.634810;
+ 0.754620;0.806380;
+ 0.464040;0.934110;
+ 0.173800;0.712320;
+ 0.173800;0.570820;
+ 0.229220;0.721370;
+ 0.250710;0.335960;
+ 0.237010;0.385540;
+ 0.058350;0.241010;
+ 0.129590;0.190460;
+ 0.196930;0.435590;
+ 0.116830;0.439220;
+ 0.742520;0.448950;
+ 0.693600;0.324490;
+ 0.806390;0.836150;
+ 0.797560;0.908500;
+ 0.676080;0.927630;
+ 0.910710;0.911290;
+ 0.823290;0.830530;
+ 0.910710;0.824910;
+ 0.260110;0.663660;
+ 0.229400;0.585630;
+ 0.802670;0.525860;
+ 0.808510;0.380560;
+ 0.877190;0.510520;
+ 0.173800;0.783600;
+ 0.260500;0.750250;
+ 0.831070;0.885250;
+ 0.824020;0.918820;
+ 0.022500;0.434480;
+ 0.060290;0.245320;
+ 0.118600;0.440060;
+ 0.897340;0.789890;
+ 0.256700;0.594220;
+ 0.267130;0.373210;
+ 0.367520;0.416990;
+ 0.354390;0.471720;
+ 0.704360;0.206040;
+ 0.712870;0.105660;
+ 0.828020;0.196840;
+ 0.827070;0.197790;
+ 0.702380;0.208840;
+ 0.672840;0.030160;
+ 0.702650;0.209750;
+ 0.827980;0.195760;
+ 0.713770;0.106800;
+ 0.699920;0.209200;
+ 0.672800;0.031560;
+ 0.826020;0.198410;
+ 0.667240;0.025710;
+ 0.825260;0.198950;
+ 0.702160;0.208860;
+ 0.524380;0.962290;
+ 0.392340;0.780120;
+ 0.552940;0.780870;
+ 0.257140;0.917080;
+ 0.161290;0.949010;
+ 0.138230;0.828240;
+ 0.809690;0.835340;
+ 0.679330;0.925170;
+ 0.565270;0.837830;
+ 0.828230;0.197140;
+ 0.706830;0.206970;
+ 0.666170;0.031230;
+ 0.563580;0.836880;
+ 0.678340;0.925250;
+ 0.812140;0.835490;
+ 0.824160;0.198860;
+ 0.703830;0.208240;
+ 0.717260;0.106330;
+ 0.504870;0.602640;
+ 0.554530;0.780260;
+ 0.391490;0.778270;
+ 0.352800;0.173560;
+ 0.562540;0.285920;
+ 0.371030;0.135240;
+ 0.319630;0.024920;
+ 0.276460;0.079040;
+ 0.388570;0.111120;
+ 0.636690;0.275050;
+ 0.608990;0.383410;
+ 0.608240;0.318480;
+ 0.591150;0.385480;
+ 0.598250;0.551730;
+ 0.638720;0.551730;
+ 0.596090;0.384490;
+ 0.642580;0.380270;
+ 0.660050;0.329060;
+ 0.048520;0.480250;
+ 0.019340;0.737670;
+ 0.091750;0.493710;
+ 0.082440;0.464140;
+ 0.024070;0.472940;
+ 0.029510;0.524150;
+ 0.072730;0.531000;
+ 0.097240;0.534870;
+ 0.074880;0.661270;
+ 0.108350;0.507900;
+ 0.909870;0.363200;
+ 0.920990;0.388180;
+ 0.952300;0.361570;
+ 0.109680;0.673310;
+ 0.113160;0.695600;
+ 0.134660;0.695600;
+ 0.487030;0.956510;
+ 0.489280;0.937580;
+ 0.457970;0.956510;
+ 0.570320;0.250690;
+ 0.643210;0.250690;
+ 0.572240;0.231760;
+ 0.562540;0.287780;
+ 0.554160;0.354070;
+ 0.014600;0.695600;
+ 0.076740;0.661270;
+ 0.021200;0.737670;
+ 0.137460;0.688590;
+ 0.954020;0.363290;
+ 0.933080;0.334410;
+ 0.911590;0.364920;
+ 0.952300;0.363430;
+ 0.949260;0.326410;
+ 0.931360;0.334550;
+ 0.931360;0.332690;
+ 0.907240;0.325350;
+ 0.749900;0.515660;
+ 0.746370;0.288640;
+ 0.722990;0.519910;
+ 0.701060;0.517630;
+ 0.694920;0.278760;
+ 0.720250;0.307780;
+ 0.735650;0.318480;
+ 0.712980;0.319210;
+ 0.723210;0.401870;
+ 0.747660;0.394970;
+ 0.699360;0.393850;
+ 0.689250;0.323110;
+ 0.802930;0.556810;
+ 0.722660;0.627210;
+ 0.772960;0.688940;
+ 0.809880;0.654370;
+ 0.865360;0.635310;
+ 0.442880;0.352460;
+ 0.395690;0.329430;
+ 0.372710;0.389140;
+ 0.408840;0.387590;
+ 0.807090;0.727600;
+ 0.917220;0.855530;
+ 0.966100;0.815190;
+ 0.869190;0.695950;
+ 0.404080;0.421220;
+ 0.357110;0.483620;
+ 0.384720;0.520010;
+ 0.444590;0.455760;
+ 0.651440;0.629870;
+ 0.591150;0.615110;
+ 0.602880;0.661310;
+ 0.654400;0.729610;
+ 0.678480;0.706790;
+ 0.651440;0.635910;
+ 0.613760;0.668560;
+ 0.664170;0.607590;
+ 0.611450;0.580920;
+ 0.444800;0.351920;
+ 0.410760;0.387590;
+ 0.457730;0.412110;
+ 0.457970;0.511910;
+ 0.495860;0.515370;
+ 0.461890;0.447360;
+ 0.497190;0.447060;
+ 0.468410;0.413340;
+ 0.502430;0.400870;
+ 0.481780;0.345920;
+ 0.398040;0.413820;
+ 0.373540;0.389140;
+ 0.445880;0.458330;
+ 0.353930;0.487100;
+ 0.316170;0.534880;
+ 0.376270;0.508760;
+ 0.359170;0.564170;
+ 0.493840;0.557420;
+ 0.470690;0.567320;
+ 0.681320;0.771660;
+ 0.719060;0.748890;
+ 0.731680;0.738020;
+ 0.942500;0.634130;
+ 0.974340;0.587670;
+ 0.939910;0.580920;
+ 0.937520;0.242860;
+ 0.923780;0.260690;
+ 0.963510;0.246230;
+ 0.570320;0.291390;
+ 0.588190;0.297300;
+ 0.610050;0.279890;
+ 0.753190;0.745350;
+ 0.727770;0.710660;
+ 0.665550;0.754930;
+ 0.713640;0.807260;
+ 0.903210;0.896990;
+ 0.874760;0.973630;
+ 0.914670;0.987760;
+ 0.941380;0.899840;
+ 0.258820;0.523480;
+ 0.326970;0.606650;
+ 0.385210;0.561890;
+ 0.385060;0.560770;
+ 0.292730;0.485240;
+ 0.258670;0.522350;
+ 0.504030;0.584330;
+ 0.207140;0.965810;
+ 0.189090;0.936620;
+ 0.173800;0.935310;
+ 0.955940;0.640840;
+ 0.959700;0.198460;
+ 0.673040;0.287030;
+ 0.692370;0.299420;
+ 0.726210;0.255020;
+ 0.735140;0.827770;
+ 0.721700;0.834480;
+ 0.731370;0.847100;
+ 0.393750;0.887420;
+ 0.339760;0.857270;
+ 0.333200;0.912500;
+ 0.378940;0.837570;
+ 0.526280;0.366680;
+ 0.531970;0.318480;
+ 0.141010;0.918400;
+ 0.098950;0.958300;
+ 0.134620;0.971130;
+ 0.328740;0.840740;
+ 0.298760;0.857350;
+ 0.054500;0.971100;
+ 0.069750;0.936430;
+ 0.014600;0.918400;
+ 0.561950;0.340650;
+ 0.355130;0.320400;
+ 0.262250;0.772030;
+ 0.189700;0.689110;
+ 0.211050;0.521330;
+ 0.943430;0.167900;
+ 0.890990;0.497460;
+ 0.896250;0.457410;
+ 0.302430;0.175400;
+ 0.385300;0.045390;
+ 0.394990;0.716960;
+ 0.325310;0.659980;
+ 0.307970;0.806340;
+ 0.396200;0.718650;
+ 0.416670;0.616680;
+ 0.325310;0.658040;
+ 0.298760;0.697750;
+ 0.303820;0.741480;
+ 0.387480;0.744830;
+ 0.401730;0.719350;
+ 0.076310;0.067400;
+ 0.082820;0.171790;
+ 0.457970;0.289280;
+ 0.467220;0.057810;
+ 0.310690;0.807190;
+ 0.374520;0.808370;
+ 0.896970;0.078130;
+ 0.903270;0.014600;
+ 0.298760;0.305530;
+ 0.428770;0.303030;
+ 0.360550;0.042380;
+ 0.125470;0.069500;
+ 0.078030;0.069120;
+ 0.153070;0.533080;
+ 0.947310;0.510580;
+ 0.123750;0.067780;
+ 0.115750;0.014600;
+ 0.337500;0.901660;
+ 0.014600;0.432440;
+ 0.144610;0.434940;
+ 0.691270;0.324520;
+ 0.740600;0.448980;
+ 0.967260;0.235070;
+ 0.736650;0.121130;
+ 0.607110;0.655060;
+ 0.822400;0.656690;
+ 0.604270;0.651560;
+ 0.754620;0.806380;
+ 0.229220;0.721370;
+ 0.129590;0.190460;
+ 0.058350;0.241010;
+ 0.237010;0.385540;
+ 0.250710;0.335960;
+ 0.116830;0.439220;
+ 0.196930;0.435590;
+ 0.693600;0.324490;
+ 0.742520;0.448950;
+ 0.676080;0.927630;
+ 0.823290;0.830530;
+ 0.229400;0.585630;
+ 0.260110;0.663660;
+ 0.877190;0.510520;
+ 0.260500;0.750250;
+ 0.824020;0.918820;
+ 0.831070;0.885250;
+ 0.118600;0.440060;
+ 0.060290;0.245320;
+ 0.022500;0.434480;
+ 0.897340;0.789890;
+ 0.256700;0.594220;
+ 0.354390;0.471720;
+ 0.367520;0.416990;
+ 0.267130;0.373210;
+ 0.828020;0.196840;
+ 0.712870;0.105660;
+ 0.704360;0.206040;
+ 0.672840;0.030160;
+ 0.702380;0.208840;
+ 0.827070;0.197790;
+ 0.713770;0.106800;
+ 0.827980;0.195760;
+ 0.702650;0.209750;
+ 0.826020;0.198410;
+ 0.672800;0.031560;
+ 0.702160;0.208860;
+ 0.825260;0.198950;
+ 0.667240;0.025710;
+ 0.552940;0.780870;
+ 0.524380;0.962290;
+ 0.138230;0.828240;
+ 0.565270;0.837830;
+ 0.679330;0.925170;
+ 0.666170;0.031230;
+ 0.706830;0.206970;
+ 0.828230;0.197140;
+ 0.678340;0.925250;
+ 0.563580;0.836880;
+ 0.717260;0.106330;
+ 0.703830;0.208240;
+ 0.554530;0.780260;
+ 0.504870;0.602640;;
+ }
+}
-Metasequoia Document\r
-Format Text Ver 1.0\r
-\r
-Scene {\r
- pos 0.0000 0.0000 1500.0000\r
- lookat 0.0000 0.0000 0.0000\r
- head 1.1200\r
- pich 1.0600\r
- ortho 1\r
- zoom2 5.0000\r
- amb 0.250 0.250 0.250\r
-}\r
-Material 1 {\r
- "mat1" shader(3) col(0.318 0.176 0.169 1.000) dif(0.800) amb(0.600) emi(0.000) spc(0.000) power(5.00)\r
-}\r
-Object "obj1" {\r
- depth 0\r
- folding 0\r
- scale 1.000000 1.000000 1.000000\r
- rotation 0.000000 0.000000 0.000000\r
- translation 0.000000 0.000000 0.000000\r
- visible 15\r
- locking 0\r
- shading 1\r
- facet 59.5\r
- color 0.898 0.498 0.698\r
- color_type 0\r
- vertex 6 {\r
- -2.1562 -1.7787 7.8298\r
- 8.8426 4.3200 1.4252\r
- -0.4473 13.0870 -1.2759\r
- -6.3616 -2.7894 -4.9977\r
- 3.5884 -1.3103 -7.4480\r
- 6.3276 -6.5589 -3.8080\r
- }\r
- face 8 {\r
- 3 V(2 1 0) M(0)\r
- 3 V(0 3 2) M(0)\r
- 3 V(3 4 2) M(0)\r
- 3 V(4 1 2) M(0)\r
- 3 V(4 5 1) M(0)\r
- 3 V(5 4 3) M(0)\r
- 3 V(0 5 3) M(0)\r
- 3 V(0 1 5) M(0)\r
- }\r
-}\r
-Eof\r
+Metasequoia Document
+Format Text Ver 1.0
+
+Scene {
+ pos 0.0000 0.0000 1500.0000
+ lookat 0.0000 0.0000 0.0000
+ head 1.1200
+ pich 1.0600
+ ortho 1
+ zoom2 5.0000
+ amb 0.250 0.250 0.250
+}
+Material 1 {
+ "mat1" shader(3) col(0.318 0.176 0.169 1.000) dif(0.800) amb(0.600) emi(0.000) spc(0.000) power(5.00)
+}
+Object "obj1" {
+ depth 0
+ folding 0
+ scale 1.000000 1.000000 1.000000
+ rotation 0.000000 0.000000 0.000000
+ translation 0.000000 0.000000 0.000000
+ visible 15
+ locking 0
+ shading 1
+ facet 59.5
+ color 0.898 0.498 0.698
+ color_type 0
+ vertex 6 {
+ -2.1562 -1.7787 7.8298
+ 8.8426 4.3200 1.4252
+ -0.4473 13.0870 -1.2759
+ -6.3616 -2.7894 -4.9977
+ 3.5884 -1.3103 -7.4480
+ 6.3276 -6.5589 -3.8080
+ }
+ face 8 {
+ 3 V(2 1 0) M(0)
+ 3 V(0 3 2) M(0)
+ 3 V(3 4 2) M(0)
+ 3 V(4 1 2) M(0)
+ 3 V(4 5 1) M(0)
+ 3 V(5 4 3) M(0)
+ 3 V(0 5 3) M(0)
+ 3 V(0 1 5) M(0)
+ }
+}
+Eof
-xof 0302txt 0064\r
-template Header {\r
- <3D82AB43-62DA-11cf-AB39-0020AF71E433>\r
- WORD major;\r
- WORD minor;\r
- DWORD flags;\r
-}\r
-\r
-template Vector {\r
- <3D82AB5E-62DA-11cf-AB39-0020AF71E433>\r
- FLOAT x;\r
- FLOAT y;\r
- FLOAT z;\r
-}\r
-\r
-template Coords2d {\r
- <F6F23F44-7686-11cf-8F52-0040333594A3>\r
- FLOAT u;\r
- FLOAT v;\r
-}\r
-\r
-template Matrix4x4 {\r
- <F6F23F45-7686-11cf-8F52-0040333594A3>\r
- array FLOAT matrix[16];\r
-}\r
-\r
-template ColorRGBA {\r
- <35FF44E0-6C7C-11cf-8F52-0040333594A3>\r
- FLOAT red;\r
- FLOAT green;\r
- FLOAT blue;\r
- FLOAT alpha;\r
-}\r
-\r
-template ColorRGB {\r
- <D3E16E81-7835-11cf-8F52-0040333594A3>\r
- FLOAT red;\r
- FLOAT green;\r
- FLOAT blue;\r
-}\r
-\r
-template IndexedColor {\r
- <1630B820-7842-11cf-8F52-0040333594A3>\r
- DWORD index;\r
- ColorRGBA indexColor;\r
-}\r
-\r
-template Boolean {\r
- <4885AE61-78E8-11cf-8F52-0040333594A3>\r
- WORD truefalse;\r
-}\r
-\r
-template Boolean2d {\r
- <4885AE63-78E8-11cf-8F52-0040333594A3>\r
- Boolean u;\r
- Boolean v;\r
-}\r
-\r
-template MaterialWrap {\r
- <4885AE60-78E8-11cf-8F52-0040333594A3>\r
- Boolean u;\r
- Boolean v;\r
-}\r
-\r
-template TextureFilename {\r
- <A42790E1-7810-11cf-8F52-0040333594A3>\r
- STRING filename;\r
-}\r
-\r
-template Material {\r
- <3D82AB4D-62DA-11cf-AB39-0020AF71E433>\r
- ColorRGBA faceColor;\r
- FLOAT power;\r
- ColorRGB specularColor;\r
- ColorRGB emissiveColor;\r
- [...]\r
-}\r
-\r
-template MeshFace {\r
- <3D82AB5F-62DA-11cf-AB39-0020AF71E433>\r
- DWORD nFaceVertexIndices;\r
- array DWORD faceVertexIndices[nFaceVertexIndices];\r
-}\r
-\r
-template MeshFaceWraps {\r
- <4885AE62-78E8-11cf-8F52-0040333594A3>\r
- DWORD nFaceWrapValues;\r
- Boolean2d faceWrapValues;\r
-}\r
-\r
-template MeshTextureCoords {\r
- <F6F23F40-7686-11cf-8F52-0040333594A3>\r
- DWORD nTextureCoords;\r
- array Coords2d textureCoords[nTextureCoords];\r
-}\r
-\r
-template MeshMaterialList {\r
- <F6F23F42-7686-11cf-8F52-0040333594A3>\r
- DWORD nMaterials;\r
- DWORD nFaceIndexes;\r
- array DWORD faceIndexes[nFaceIndexes];\r
- [Material]\r
-}\r
-\r
-template MeshNormals {\r
- <F6F23F43-7686-11cf-8F52-0040333594A3>\r
- DWORD nNormals;\r
- array Vector normals[nNormals];\r
- DWORD nFaceNormals;\r
- array MeshFace faceNormals[nFaceNormals];\r
-}\r
-\r
-template MeshVertexColors {\r
- <1630B821-7842-11cf-8F52-0040333594A3>\r
- DWORD nVertexColors;\r
- array IndexedColor vertexColors[nVertexColors];\r
-}\r
-\r
-template Mesh {\r
- <3D82AB44-62DA-11cf-AB39-0020AF71E433>\r
- DWORD nVertices;\r
- array Vector vertices[nVertices];\r
- DWORD nFaces;\r
- array MeshFace faces[nFaces];\r
- [...]\r
-}\r
-\r
-Header{\r
-1;\r
-0;\r
-1;\r
-}\r
-\r
-Mesh {\r
- 6;\r
- -0.00447;0.13087;0.01276;,\r
- 0.08843;0.04320;-0.01425;,\r
- -0.02156;-0.01779;-0.07830;,\r
- -0.06362;-0.02789;0.04998;,\r
- 0.03588;-0.01310;0.07448;,\r
- 0.06328;-0.06559;0.03808;;\r
- \r
- 8;\r
- 3;0,1,2;,\r
- 3;2,3,0;,\r
- 3;3,4,0;,\r
- 3;4,1,0;,\r
- 3;4,5,1;,\r
- 3;5,4,3;,\r
- 3;2,5,3;,\r
- 3;2,1,5;;\r
- \r
- MeshMaterialList {\r
- 1;\r
- 8;\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0,\r
- 0;;\r
- Material {\r
- 0.254400;0.140800;0.135200;1.000000;;\r
- 5.000000;\r
- 0.000000;0.000000;0.000000;;\r
- 0.000000;0.000000;0.000000;;\r
- }\r
- }\r
- MeshNormals {\r
- 10;\r
- 0.218520;0.491318;-0.843122;,\r
- -0.919320;0.276928;-0.279573;,\r
- 0.464423;0.325601;0.823587;,\r
- 0.840056;0.064886;0.538605;,\r
- -0.212883;-0.163690;0.963269;,\r
- 0.193648;0.431914;0.880881;,\r
- 0.746812;0.264614;0.610124;,\r
- -0.105048;-0.603166;0.790668;,\r
- -0.295263;-0.940013;-0.170865;,\r
- 0.622549;-0.451429;-0.639253;;\r
- 8;\r
- 3;0,0,0;,\r
- 3;1,1,1;,\r
- 3;4,2,5;,\r
- 3;2,6,5;,\r
- 3;2,3,6;,\r
- 3;7,7,4;,\r
- 3;8,8,8;,\r
- 3;9,9,9;;\r
- }\r
- MeshTextureCoords {\r
- 6;\r
- 0.000000;0.000000;\r
- 0.000000;0.000000;\r
- 0.000000;0.000000;\r
- 0.000000;0.000000;\r
- 0.000000;0.000000;\r
- 0.000000;0.000000;;\r
- }\r
-}\r
+xof 0302txt 0064
+template Header {
+ <3D82AB43-62DA-11cf-AB39-0020AF71E433>
+ WORD major;
+ WORD minor;
+ DWORD flags;
+}
+
+template Vector {
+ <3D82AB5E-62DA-11cf-AB39-0020AF71E433>
+ FLOAT x;
+ FLOAT y;
+ FLOAT z;
+}
+
+template Coords2d {
+ <F6F23F44-7686-11cf-8F52-0040333594A3>
+ FLOAT u;
+ FLOAT v;
+}
+
+template Matrix4x4 {
+ <F6F23F45-7686-11cf-8F52-0040333594A3>
+ array FLOAT matrix[16];
+}
+
+template ColorRGBA {
+ <35FF44E0-6C7C-11cf-8F52-0040333594A3>
+ FLOAT red;
+ FLOAT green;
+ FLOAT blue;
+ FLOAT alpha;
+}
+
+template ColorRGB {
+ <D3E16E81-7835-11cf-8F52-0040333594A3>
+ FLOAT red;
+ FLOAT green;
+ FLOAT blue;
+}
+
+template IndexedColor {
+ <1630B820-7842-11cf-8F52-0040333594A3>
+ DWORD index;
+ ColorRGBA indexColor;
+}
+
+template Boolean {
+ <4885AE61-78E8-11cf-8F52-0040333594A3>
+ WORD truefalse;
+}
+
+template Boolean2d {
+ <4885AE63-78E8-11cf-8F52-0040333594A3>
+ Boolean u;
+ Boolean v;
+}
+
+template MaterialWrap {
+ <4885AE60-78E8-11cf-8F52-0040333594A3>
+ Boolean u;
+ Boolean v;
+}
+
+template TextureFilename {
+ <A42790E1-7810-11cf-8F52-0040333594A3>
+ STRING filename;
+}
+
+template Material {
+ <3D82AB4D-62DA-11cf-AB39-0020AF71E433>
+ ColorRGBA faceColor;
+ FLOAT power;
+ ColorRGB specularColor;
+ ColorRGB emissiveColor;
+ [...]
+}
+
+template MeshFace {
+ <3D82AB5F-62DA-11cf-AB39-0020AF71E433>
+ DWORD nFaceVertexIndices;
+ array DWORD faceVertexIndices[nFaceVertexIndices];
+}
+
+template MeshFaceWraps {
+ <4885AE62-78E8-11cf-8F52-0040333594A3>
+ DWORD nFaceWrapValues;
+ Boolean2d faceWrapValues;
+}
+
+template MeshTextureCoords {
+ <F6F23F40-7686-11cf-8F52-0040333594A3>
+ DWORD nTextureCoords;
+ array Coords2d textureCoords[nTextureCoords];
+}
+
+template MeshMaterialList {
+ <F6F23F42-7686-11cf-8F52-0040333594A3>
+ DWORD nMaterials;
+ DWORD nFaceIndexes;
+ array DWORD faceIndexes[nFaceIndexes];
+ [Material]
+}
+
+template MeshNormals {
+ <F6F23F43-7686-11cf-8F52-0040333594A3>
+ DWORD nNormals;
+ array Vector normals[nNormals];
+ DWORD nFaceNormals;
+ array MeshFace faceNormals[nFaceNormals];
+}
+
+template MeshVertexColors {
+ <1630B821-7842-11cf-8F52-0040333594A3>
+ DWORD nVertexColors;
+ array IndexedColor vertexColors[nVertexColors];
+}
+
+template Mesh {
+ <3D82AB44-62DA-11cf-AB39-0020AF71E433>
+ DWORD nVertices;
+ array Vector vertices[nVertices];
+ DWORD nFaces;
+ array MeshFace faces[nFaces];
+ [...]
+}
+
+Header{
+1;
+0;
+1;
+}
+
+Mesh {
+ 6;
+ -0.00447;0.13087;0.01276;,
+ 0.08843;0.04320;-0.01425;,
+ -0.02156;-0.01779;-0.07830;,
+ -0.06362;-0.02789;0.04998;,
+ 0.03588;-0.01310;0.07448;,
+ 0.06328;-0.06559;0.03808;;
+
+ 8;
+ 3;0,1,2;,
+ 3;2,3,0;,
+ 3;3,4,0;,
+ 3;4,1,0;,
+ 3;4,5,1;,
+ 3;5,4,3;,
+ 3;2,5,3;,
+ 3;2,1,5;;
+
+ MeshMaterialList {
+ 1;
+ 8;
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0;;
+ Material {
+ 0.254400;0.140800;0.135200;1.000000;;
+ 5.000000;
+ 0.000000;0.000000;0.000000;;
+ 0.000000;0.000000;0.000000;;
+ }
+ }
+ MeshNormals {
+ 10;
+ 0.218520;0.491318;-0.843122;,
+ -0.919320;0.276928;-0.279573;,
+ 0.464423;0.325601;0.823587;,
+ 0.840056;0.064886;0.538605;,
+ -0.212883;-0.163690;0.963269;,
+ 0.193648;0.431914;0.880881;,
+ 0.746812;0.264614;0.610124;,
+ -0.105048;-0.603166;0.790668;,
+ -0.295263;-0.940013;-0.170865;,
+ 0.622549;-0.451429;-0.639253;;
+ 8;
+ 3;0,0,0;,
+ 3;1,1,1;,
+ 3;4,2,5;,
+ 3;2,6,5;,
+ 3;2,3,6;,
+ 3;7,7,4;,
+ 3;8,8,8;,
+ 3;9,9,9;;
+ }
+ MeshTextureCoords {
+ 6;
+ 0.000000;0.000000;
+ 0.000000;0.000000;
+ 0.000000;0.000000;
+ 0.000000;0.000000;
+ 0.000000;0.000000;
+ 0.000000;0.000000;;
+ }
+}
-require("script/moflib");\r
-\r
-function bubble()\r
- --local p = Picture:new('image/bubble.dds')\r
- --p:set_tween('position2', {[0] = {0, 300}, [30] = {0, -128}}, 0)\r
- --p:set_tween('position2', {[0] = {0, 300}, [30] = {0, -128}, [loop] = {0, 100}, [noise] = {10}}, 0) TODO multi_tweenはどうする?\r
- --wait_frame(2000)\r
- --p:dispose()\r
-end\r
-\r
+require("script/moflib");
+
+function bubble()
+ --local p = Picture:new('image/bubble.dds')
+ --p:set_tween('position2', {[0] = {0, 300}, [30] = {0, -128}}, 0)
+ --p:set_tween('position2', {[0] = {0, 300}, [30] = {0, -128}, [loop] = {0, 100}, [noise] = {10}}, 0) TODO multi_tweenはどうする?
+ --wait_frame(2000)
+ --p:dispose()
+end
+
-require("script/moflib");\r
-require("script/common");\r
-\r
-function next_text(mes, text, snd)\r
- local frame = mes:next(text)\r
- wait_frame(frame / 2)\r
- if snd ~= nil then sound(snd) end\r
- wait_frame(frame / 2)\r
- wait_for_key(KEY_Z)\r
-end\r
-\r
-function main()\r
- --wait_frame(180)\r
- scene1()\r
-end\r
-\r
---{{{ scene1\r
-function scene1()\r
- --TODO local yukkuri = new Picture:new('image/yukkuri.dds')\r
- \r
- local mes = Message:new('\82¨\82Á\82¬\81[')\r
- local tween = ExtensionTween:new()\r
- tween(mes)\r
- local frame = mes:show()\r
- \r
- next_text(mes, '\91¼\82É\82à\81A\83G\83\8c\83\81\83\93\83g\82Í\90X\82Æ\92n\82¾\82¯\82É\82µ\82½\82è\81A<nl/>\90_\97ì\82Ì\8eí\97Þ\82Ì\8dí\8c¸\81A<nl/>\90í\93¬\96Ê\82Å\82Í\81A\83X\83y\83V\83\83\83\8b\83A\83N\83V\83\87\83\93\82Ì\94p\8e~\82Æ\82¢\82Á\82½\82±\82Æ\82ð<nl/>\8dl\82¦\82Ä\82¢\82Ü\82·\81B', 'speech/speech1.wav')\r
- next_text(mes, '\82½\82¾\81A\82±\82ê\82¾\82¯\82â\82Á\82Ä\82à\81A<nl/>\91²\8bÆ\82Ü\82Å\82É\8a®\90¬\82Å\82«\82é\82©\82Í\94÷\96\82È\82Æ\82±\82ë\81B<nl/>\96{\93\96\82É\81A\82ä\82Á\82\82è\8dì\82Á\82½\8c\8b\89Ê\82ª\82±\82ê\82¾\82æ\81I', 'speech/speech2.wav')\r
- next_text(mes, '\82µ\82©\82µ\81A\8c\8b\89Ê\82ª\82Ç\82¤\82È\82Á\82Ä\82à\81A\83\\81[\83X\83R\81[\83h\82Í<nl/>\82·\82×\82Ä\8cö\8aJ\82·\82é\82Â\82à\82è\82Å\82¢\82Ü\82·\81B<nl/>' ..\r
- '\82»\82¤\8ev\82Á\82Ä\81A\90\8f\95ª\91O\82ÉSourceForge.JP\82É<nl/>\83A\83J\83E\83\93\83g\82ð\8eæ\82è\82Ü\82µ\82½\81B<nl/>\81u\8dÄ\90¢\83v\83\8d\83W\83F\83N\83g\81v\82Å\8c\9f\8dõ\82µ\82Ä\82\82¾\82³\82¢\81B', 'speech/speech3.wav')\r
- wait_frame(30)\r
- next_text(mes, '\81c\83v\83\8d\83W\83F\83N\83g\96¼\82Å\92\86\83j\95a\82Æ\82©\8ev\82Á\82½\82â\82Â\81A\95\\82Ö\8fo\82ë\81B', 'speech/speech4.wav')\r
- mes:hide()\r
-\r
- wait_frame(90)\r
-\r
- local frame = mes:show()\r
- next_text(mes, '\8d¡\89ñ\82Í\82±\82ê\82Å\8fI\82í\82è\82Å\82·\81B<nl/>\8d¡\94N\92\86\82É\82à\82¤\88ê\89ñ\8dX\90V\82Å\82«\82é\82Æ\82¢\82¢\82È\81B', 'speech/speech5.wav')\r
- local frame = mes:hide()\r
- end\r
---}}}\r
---{{{ scene2\r
-function scene2()\r
- local g5 = Picture:new('image/5.jpg')\r
- local g4 = Picture:new('image/4.jpg')\r
- local g3 = Picture:new('image/3.jpg')\r
- local g2 = Picture:new('image/2.jpg')\r
- local g1 = Picture:new('image/1.jpg')\r
- g1:set_tween('position2', {[0] = {-128, 0}, [10] = {0, 0} }, 30)\r
- g2:set_tween('position2', {[0] = {-128, 0}, [15] = {128, 0} }, 30)\r
- g3:set_tween('position2', {[0] = {-128, 0}, [20] = {256, 0} }, 30)\r
- g4:set_tween('position2', {[0] = {-128, 0}, [25] = {256 + 128, 0} }, 30)\r
- g5:set_tween('position2', {[0] = {-128, 0}, [30] = {512, 0} }, 30)\r
-\r
- wait_frame(30)\r
- \r
- local mes = Message:new('\82¨\82Á\82¬\81[')\r
- local tween = ExtensionTween:new()\r
- tween(mes)\r
- local frame = mes:show()\r
- \r
- next_text(mes, '\82Ü\82¸\81A\82T\8eí\97Þ\82ð\8dl\82¦\82Ä\82¢\82½\81u\8eí\91°\81v\82Å\82·\82ª', 'speech/speech1.wav')\r
- mes:next('\8eå\97v\82È\83C\81[\83\94\83X\81A\83{\83\8d\83j\81[\81A\83X\83g\83\89\82ð\8ec\82µ\81A<nl/>\83g\83\8b\83g\83j\83A\83\93\81A\83\8b\83f\83\93\83X\82Í\83\8a\83X\83g\83\89\82Æ\82µ\82Ü\82·\81B')\r
- sound('speech/speech2.wav')\r
- wait_frame(380)\r
- g4:set_tween('color', {[0] = {1, 1, 1}, [20] = {0.5, 0.5, 0.5} }, 20)\r
- g5:set_tween('color', {[0] = {1, 1, 1}, [20] = {0.5, 0.5, 0.5} }, 20)\r
- wait_frame(20)\r
- sound('speech/ah.wav')\r
- g4:set_tween('position2', {[0] = {256+128, 0}, [20] = {256+128, 500} }, 20)\r
- g5:set_tween('position2', {[0] = {512, 0}, [20] = {512, 500} }, 20)\r
- \r
- wait_for_key(KEY_Z)\r
- next_text(mes, '\83\8a\83X\83g\83\89\82Æ\82µ\82Ü\82·\81B', 'speech/speech3.wav')\r
-\r
- mes:hide()\r
-\r
- end\r
---}}}\r
---{{{ scene3\r
-function scene3()\r
-\r
- local aira = Picture:new('image/aira.jpg')\r
- aira:set_tween('position2', {[0] = {200, 100}}, 20)\r
- \r
- local mes = Message:new('\82¨\82Á\82¬\81[')\r
- local tween = ExtensionTween:new()\r
- tween(mes)\r
- local frame = mes:show()\r
- \r
- next_text(mes, '\82Ü\82½\81A\82Ð\82»\82©\82É\8dl\82¦\82Ä\82¢\82½\83X\83g\81[\83\8a\81[\97v\91f\82Í<nl/>\8a®\91S\82É\8dí\8f\9c\82µ\82Ü\82·\81B', 'speech/speech1.wav')\r
- next_text(mes, '\8eÀ\82Í\81A\83A\83h\83o\83C\83U\81[\96ð\82ÌNPC\82Æ\82µ\82Ä\81A<nl/>\8f\97\90«\83L\83\83\83\89\82ð\8dl\82¦\82Ä\82¢\82½\82Ì\82Å\82·\82ª\81c', 'speech/speech2.wav')\r
-\r
- local riez = Picture:new('image/face.dds')\r
- riez:set_tween('position2', {[0] = {800, 100}, [60] = {600, 100}}, 20)\r
- \r
- next_text(mes, '\94Þ\8f\97\82Ì\93o\8fê\82à\82È\82¢\82Å\82µ\82å\82¤\81B', 'speech/speech3.wav')\r
- \r
- aira:set_tween('position2', {[0] = {200, 100}, [60] = {-200, 100}}, 20)\r
- \r
- next_text(mes, '\83\8a\81[\83X\82Í1\90l\8eâ\82µ\82\81A\83_\83\93\83W\83\87\83\93\82ð\93¥\94j\82µ\91±\82¯\82é\82±\82Æ\82É\82È\82è\82Ü\82·\81B', 'speech/speech4.wav')\r
- mes:hide()\r
- riez:set_tween('position2', {[0] = {600, 100}, [60] = {400, 100}}, 20)\r
- wait_frame(60)\r
-\r
- message('\83\8a\81[\83X', {'\81c\81c'}, nil, ExtensionTween:new())\r
- end\r
---}}}\r
+require("script/moflib");
+require("script/common");
+
+function next_text(mes, text, snd)
+ local frame = mes:next(text)
+ wait_frame(frame / 2)
+ if snd ~= nil then sound(snd) end
+ wait_frame(frame / 2)
+ wait_for_key(KEY_Z)
+end
+
+function main()
+ --wait_frame(180)
+ scene1()
+end
+
+--{{{ scene1
+function scene1()
+ --TODO local yukkuri = new Picture:new('image/yukkuri.dds')
+
+ local mes = Message:new('\82¨\82Á\82¬\81[')
+ local tween = ExtensionTween:new()
+ tween(mes)
+ local frame = mes:show()
+
+ next_text(mes, '\91¼\82É\82à\81A\83G\83\8c\83\81\83\93\83g\82Í\90X\82Æ\92n\82¾\82¯\82É\82µ\82½\82è\81A<nl/>\90_\97ì\82Ì\8eí\97Þ\82Ì\8dí\8c¸\81A<nl/>\90í\93¬\96Ê\82Å\82Í\81A\83X\83y\83V\83\83\83\8b\83A\83N\83V\83\87\83\93\82Ì\94p\8e~\82Æ\82¢\82Á\82½\82±\82Æ\82ð<nl/>\8dl\82¦\82Ä\82¢\82Ü\82·\81B', 'speech/speech1.wav')
+ next_text(mes, '\82½\82¾\81A\82±\82ê\82¾\82¯\82â\82Á\82Ä\82à\81A<nl/>\91²\8bÆ\82Ü\82Å\82É\8a®\90¬\82Å\82«\82é\82©\82Í\94÷\96\82È\82Æ\82±\82ë\81B<nl/>\96{\93\96\82É\81A\82ä\82Á\82\82è\8dì\82Á\82½\8c\8b\89Ê\82ª\82±\82ê\82¾\82æ\81I', 'speech/speech2.wav')
+ next_text(mes, '\82µ\82©\82µ\81A\8c\8b\89Ê\82ª\82Ç\82¤\82È\82Á\82Ä\82à\81A\83\\81[\83X\83R\81[\83h\82Í<nl/>\82·\82×\82Ä\8cö\8aJ\82·\82é\82Â\82à\82è\82Å\82¢\82Ü\82·\81B<nl/>' ..
+ '\82»\82¤\8ev\82Á\82Ä\81A\90\8f\95ª\91O\82ÉSourceForge.JP\82É<nl/>\83A\83J\83E\83\93\83g\82ð\8eæ\82è\82Ü\82µ\82½\81B<nl/>\81u\8dÄ\90¢\83v\83\8d\83W\83F\83N\83g\81v\82Å\8c\9f\8dõ\82µ\82Ä\82\82¾\82³\82¢\81B', 'speech/speech3.wav')
+ wait_frame(30)
+ next_text(mes, '\81c\83v\83\8d\83W\83F\83N\83g\96¼\82Å\92\86\83j\95a\82Æ\82©\8ev\82Á\82½\82â\82Â\81A\95\\82Ö\8fo\82ë\81B', 'speech/speech4.wav')
+ mes:hide()
+
+ wait_frame(90)
+
+ local frame = mes:show()
+ next_text(mes, '\8d¡\89ñ\82Í\82±\82ê\82Å\8fI\82í\82è\82Å\82·\81B<nl/>\8d¡\94N\92\86\82É\82à\82¤\88ê\89ñ\8dX\90V\82Å\82«\82é\82Æ\82¢\82¢\82È\81B', 'speech/speech5.wav')
+ local frame = mes:hide()
+ end
+--}}}
+--{{{ scene2
+function scene2()
+ local g5 = Picture:new('image/5.jpg')
+ local g4 = Picture:new('image/4.jpg')
+ local g3 = Picture:new('image/3.jpg')
+ local g2 = Picture:new('image/2.jpg')
+ local g1 = Picture:new('image/1.jpg')
+ g1:set_tween('position2', {[0] = {-128, 0}, [10] = {0, 0} }, 30)
+ g2:set_tween('position2', {[0] = {-128, 0}, [15] = {128, 0} }, 30)
+ g3:set_tween('position2', {[0] = {-128, 0}, [20] = {256, 0} }, 30)
+ g4:set_tween('position2', {[0] = {-128, 0}, [25] = {256 + 128, 0} }, 30)
+ g5:set_tween('position2', {[0] = {-128, 0}, [30] = {512, 0} }, 30)
+
+ wait_frame(30)
+
+ local mes = Message:new('\82¨\82Á\82¬\81[')
+ local tween = ExtensionTween:new()
+ tween(mes)
+ local frame = mes:show()
+
+ next_text(mes, '\82Ü\82¸\81A\82T\8eí\97Þ\82ð\8dl\82¦\82Ä\82¢\82½\81u\8eí\91°\81v\82Å\82·\82ª', 'speech/speech1.wav')
+ mes:next('\8eå\97v\82È\83C\81[\83\94\83X\81A\83{\83\8d\83j\81[\81A\83X\83g\83\89\82ð\8ec\82µ\81A<nl/>\83g\83\8b\83g\83j\83A\83\93\81A\83\8b\83f\83\93\83X\82Í\83\8a\83X\83g\83\89\82Æ\82µ\82Ü\82·\81B')
+ sound('speech/speech2.wav')
+ wait_frame(380)
+ g4:set_tween('color', {[0] = {1, 1, 1}, [20] = {0.5, 0.5, 0.5} }, 20)
+ g5:set_tween('color', {[0] = {1, 1, 1}, [20] = {0.5, 0.5, 0.5} }, 20)
+ wait_frame(20)
+ sound('speech/ah.wav')
+ g4:set_tween('position2', {[0] = {256+128, 0}, [20] = {256+128, 500} }, 20)
+ g5:set_tween('position2', {[0] = {512, 0}, [20] = {512, 500} }, 20)
+
+ wait_for_key(KEY_Z)
+ next_text(mes, '\83\8a\83X\83g\83\89\82Æ\82µ\82Ü\82·\81B', 'speech/speech3.wav')
+
+ mes:hide()
+
+ end
+--}}}
+--{{{ scene3
+function scene3()
+
+ local aira = Picture:new('image/aira.jpg')
+ aira:set_tween('position2', {[0] = {200, 100}}, 20)
+
+ local mes = Message:new('\82¨\82Á\82¬\81[')
+ local tween = ExtensionTween:new()
+ tween(mes)
+ local frame = mes:show()
+
+ next_text(mes, '\82Ü\82½\81A\82Ð\82»\82©\82É\8dl\82¦\82Ä\82¢\82½\83X\83g\81[\83\8a\81[\97v\91f\82Í<nl/>\8a®\91S\82É\8dí\8f\9c\82µ\82Ü\82·\81B', 'speech/speech1.wav')
+ next_text(mes, '\8eÀ\82Í\81A\83A\83h\83o\83C\83U\81[\96ð\82ÌNPC\82Æ\82µ\82Ä\81A<nl/>\8f\97\90«\83L\83\83\83\89\82ð\8dl\82¦\82Ä\82¢\82½\82Ì\82Å\82·\82ª\81c', 'speech/speech2.wav')
+
+ local riez = Picture:new('image/face.dds')
+ riez:set_tween('position2', {[0] = {800, 100}, [60] = {600, 100}}, 20)
+
+ next_text(mes, '\94Þ\8f\97\82Ì\93o\8fê\82à\82È\82¢\82Å\82µ\82å\82¤\81B', 'speech/speech3.wav')
+
+ aira:set_tween('position2', {[0] = {200, 100}, [60] = {-200, 100}}, 20)
+
+ next_text(mes, '\83\8a\81[\83X\82Í1\90l\8eâ\82µ\82\81A\83_\83\93\83W\83\87\83\93\82ð\93¥\94j\82µ\91±\82¯\82é\82±\82Æ\82É\82È\82è\82Ü\82·\81B', 'speech/speech4.wav')
+ mes:hide()
+ riez:set_tween('position2', {[0] = {600, 100}, [60] = {400, 100}}, 20)
+ wait_frame(60)
+
+ message('\83\8a\81[\83X', {'\81c\81c'}, nil, ExtensionTween:new())
+ end
+--}}}
-require("script/moflib");\r
-\r
-function main()\r
- local gen = Particlegen:new()\r
- gen:set_tween('position3', {[0] = {0.5, 0, 0.5}, [600] = {-0.5, 0, -0.5}}, 0)\r
- wait_frame(2000)\r
- gen:dispose()\r
-end\r
-\r
+require("script/moflib");
+
+function main()
+ local gen = Particlegen:new()
+ gen:set_tween('position3', {[0] = {0.5, 0, 0.5}, [600] = {-0.5, 0, -0.5}}, 0)
+ wait_frame(2000)
+ gen:dispose()
+end
+
-require('script/moflib')\r
-require('script/common')\r
-require('script/bubble')\r
-\r
---{{{ question_attached\r
-function question_attached(item_tween)\r
- local items = load_game_data('gamedata.item_profile')\r
- local list = {}\r
- for i = 1, #items, 1 do\r
- local name = get_icon_image_tag(items[i].icon_type) .. \r
- '<layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'\r
- if tonumber(items[i].attached) == 1 then \r
- if tonumber(items[i].equipped) == 1 then\r
- table.insert(list, name .. '<layout w="100" h="32" xalign="right" yalign="center"><col name="blue">(\91\95\94õ\92\86)</col></layout>')\r
- else\r
- table.insert(list, name)\r
- end\r
- end\r
- end\r
- return question('\8f\8a\8e\9d\83A\83C\83e\83\80(\8ec\82è0\83X\83\8d\83b\83g)', list, nil, nil, item_tween)\r
-end\r
---}}}\r
---{{{ question_stored\r
-function question_stored(item_tween)\r
- local items = load_game_data('gamedata.item_profile')\r
- local list = {}\r
- for i = 1, #items, 1 do\r
- local name = get_icon_image_tag(items[i].icon_type) .. \r
- '<layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'\r
- if tonumber(items[i].stored) == 1 then \r
- table.insert(list, name)\r
- end\r
- end\r
- return question('\91q\8cÉ\83A\83C\83e\83\80', list, nil, nil, item_tween)\r
-end\r
---}}}\r
---{{{ question_relic\r
-function question_relic(item_tween)\r
- local relics = load_game_data('gamedata.relic_profile')\r
- local list = {}\r
- for i = 1, #relics, 1 do\r
- if relics[i].num ~= 0 then\r
- local name = get_icon_image_tag(relics[i].icon_type) .. \r
- '<layout w="360" h="32" xalign="left" yalign="center">' .. relics[i].name .. '</layout>' ..\r
- '<layout w="100" h="32" xalign="right" yalign="center">' .. relics[i].num .. '\83\96</layout>'\r
- table.insert(list, name)\r
- end\r
- end\r
- return question('\83\8c\83\8a\83b\83N', list, nil, nil, item_tween) -- relic\82Í\91S\95\94disable\r
-end\r
---}}}\r
---{{{ question_setup_weapon\r
-function question_setup_weapon(item_tween)\r
- local items = load_game_data('gamedata.item_profile')\r
- local list = {}\r
- local disables = {}\r
- local num_items = 0\r
- for i = 1, #items, 1 do\r
- local type = tonumber(items[i].type);\r
- local state = ''\r
- if items[i].equipped == '1' then\r
- state = '<layout w="100" h="32" xalign="right" yalign="center">(\91\95\94õ\92\86)</layout></col>'\r
- elseif items[i].attached == '1' then\r
- state = '<layout w="100" h="32" xalign="right" yalign="center"><col name="blue">(\8f\8a\8e\9d)</col></layout>'\r
- elseif items[i].stored == '1' then\r
- state = '<layout w="100" h="32" xalign="right" yalign="center"><col name="blue">(\91q\8cÉ)</col></layout>'\r
- end\r
- if type == ITEM_TYPE_KNIGH or type == ITEM_TYPE_SWORD or type == ITEM_TYPE_BLADE then \r
- -- \91\95\94õ\92\86\82¾\82Á\82½\82çdisable\r
- if items[i].equipped == '1' then\r
- local name = get_icon_image_tag(items[i].icon_type) .. \r
- '<col name="gray"><layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'\r
- table.insert(list, name .. state)\r
- table.insert(disables, num_items)\r
- else\r
- local name = get_icon_image_tag(items[i].icon_type) .. \r
- '<layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'\r
- table.insert(list, name .. state)\r
- end\r
- num_items = num_items + 1\r
- end\r
- end\r
- return question('\91\95\94õ\82·\82é\95\90\8aí\82ð\91I\91ð', list, nil, disables, item_tween)\r
-end\r
---}}}\r
---{{{ question_setup_armer\r
-function question_setup_armer(item_tween)\r
- local items = load_game_data('gamedata.item_profile')\r
- local list = {}\r
- local disables = {}\r
- local num_items = 0\r
- for i = 1, #items, 1 do\r
- local type = tonumber(items[i].type);\r
- local state = ''\r
- if items[i].equipped == '1' then\r
- state = '<layout w="100" h="32" xalign="right" yalign="center">(\91\95\94õ\92\86)</layout></col>'\r
- elseif items[i].attached == '1' then\r
- state = '<layout w="100" h="32" xalign="right" yalign="center"><col name="blue">(\8f\8a\8e\9d)</col></layout>'\r
- elseif items[i].stored == '1' then\r
- state = '<layout w="100" h="32" xalign="right" yalign="center"><col name="blue">(\91q\8cÉ)</col></layout>'\r
- end\r
- if type == ITEM_TYPE_ROBE or type == ITEM_TYPE_ARMER then \r
- -- \91\95\94õ\92\86\82¾\82Á\82½\82çdisable\r
- if items[i].equipped == '1' then\r
- local name = get_icon_image_tag(items[i].icon_type) .. \r
- '<col name="gray"><layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'\r
- table.insert(list, name .. state)\r
- table.insert(disables, num_items)\r
- else\r
- local name = get_icon_image_tag(items[i].icon_type) .. \r
- '<layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'\r
- table.insert(list, name .. state)\r
- end\r
- num_items = num_items + 1\r
-\r
- end\r
- end\r
- return question('\91\95\94õ\82·\82é\96h\8bï\82ð\91I\91ð', list, nil, disables, item_tween)\r
-end\r
---}}}\r
---{{{ question_setup_item\r
-function question_setup_item(item_tween)\r
- local items = load_game_data('gamedata.item_profile')\r
- local list = {}\r
- local disables = {}\r
- local num_items = 0\r
- for i = 1, #items, 1 do\r
- local state = ''\r
- if items[i].equipped == '1' then\r
- state = '<layout w="100" h="32" xalign="right" yalign="center">(\91\95\94õ\92\86)</layout></col>'\r
- elseif items[i].attached == '1' then\r
- state = '<layout w="100" h="32" xalign="right" yalign="center"><col name="blue">(\8f\8a\8e\9d)</col></layout>'\r
- elseif items[i].stored == '1' then\r
- state = '<layout w="100" h="32" xalign="right" yalign="center"><col name="blue">(\91q\8cÉ)</col></layout>'\r
- end\r
-\r
- -- \91\95\94õ\92\86\82¾\82Á\82½\82çdisable\r
- if items[i].equipped == '1' then\r
- local name = get_icon_image_tag(items[i].icon_type) .. \r
- '<col name="gray"><layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'\r
- table.insert(list, name .. state)\r
- table.insert(disables, num_items)\r
- else\r
- local name = get_icon_image_tag(items[i].icon_type) .. \r
- '<layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'\r
- table.insert(list, name .. state)\r
- end\r
- num_items = num_items + 1\r
- end\r
- return question('\8f\8a\8e\9d\82·\82é\83A\83C\83e\83\80\82ð\91I\91ð(\8ec\82è0\83X\83\8d\83b\83g)', list, nil, disables, item_tween)\r
-end\r
---}}}\r
---{{{ question_setup_ideal\r
-function question_setup_ideal(item_tween)\r
- local items = load_game_data('gamedata.ideal_profile')\r
- local list = {}\r
- for i = 1, #items, 1 do\r
- local state = ''\r
- if items[i].attend == '1' then\r
- state = '<layout w="100" h="32" xalign="right" yalign="center"><col name="blue">(\8eQ\89Á)</col></layout>'\r
- end\r
- local name = get_icon_image_tag(items[i].icon_type) .. \r
- '<layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'\r
- table.insert(list, name .. state)\r
- end\r
- return question('\8fo\8c\82\90_\97ì\82ð\91I\91ð(\8ec\82è0\83X\83\8d\83b\83g)', list, nil, nil, item_tween)\r
-end\r
---}}}\r
---{{{ item_menu\r
-function item_menu()\r
- local base_width = 500\r
- local base_height = 400\r
-\r
- local items = \r
- {\r
- '<layout w="170" h="24" xalign="center">\8f\8a\8e\9d\83A\83C\83e\83\80</layout>',\r
- '<layout w="170" h="24" xalign="center">\91q\8cÉ\83A\83C\83e\83\80</layout>',\r
- '<layout w="170" h="24" xalign="center">\83\8c\83\8a\83b\83N</layout>',\r
- }\r
- local tab_menu = Question:new('\83A\83C\83e\83\80\8aÇ\97\9d\83\81\83j\83\85\81[', items, 'direction=horizontal')\r
- local prop = tab_menu:get_properties()\r
- local old_width, old_height = split(prop['preferred_size'], ',')\r
- local x, y = layout(0.5, base_width, 0.5, 0.5, base_height, 0.5)\r
- local width = base_width\r
- local height = 70\r
- -- tab_menu\82Ìtween\82ð\90Ý\92è\r
- tab_menu:set_tween('open.position2', {[0] = {x, -height}, [20] = {x, y}}, 20)\r
- tab_menu:set_tween('open.size2', {[0] = {width - old_width, height - old_height}}, 0)\r
- tab_menu:set_tween('close.position2', {[0] = {x, y}, [20] = {x, -height}}, 20)\r
- tab_menu:set_tween('close.size2', {[0] = {width - old_width, height - old_height}}, 0)\r
- tab_menu:set_tween('close.color', {[5] = {1, 1, 1, 1}, [20] = {0, 1, 1, 1}}, 20)\r
-\r
- local frame = tab_menu:show()\r
- wait_frame(frame)\r
- while true do\r
- local key = get_key()\r
- if key == KEY_UP then tab_menu:move_cursor_up()\r
- elseif key == KEY_DOWN then tab_menu:move_cursor_down()\r
- elseif key == KEY_LEFT then tab_menu:move_cursor_left()\r
- elseif key == KEY_RIGHT then tab_menu:move_cursor_right()\r
- elseif key == KEY_X then \r
- sound("sound/cancel.wav")-- \83L\83\83\83\93\83Z\83\8b\89¹\r
- frame = tab_menu:hide()\r
- wait_frame(frame)\r
- tab_menu:dispose()\r
- return \r
- elseif key == KEY_Z then \r
- local index = tab_menu:get_current()\r
- sound("sound/decide.wav")-- \8c\88\92è\89¹\r
- -- tab_menu\82Ì\88Ê\92u\8cv\8eZ\r
- local prop = tab_menu:get_properties()\r
-\r
- -- item_menu\82Ì\82½\82ß\82Ìtween\8dì\90¬\r
- local item_tween = DefaultTween:new(x, y + height + 10, width, base_height - height) -- \88ê\8fu\82Å\8c»\82ê\82é\r
- if index == 0 then\r
- question_attached(item_tween)\r
- elseif index == 1 then\r
- question_stored(item_tween)\r
- elseif index == 2 then\r
- question_relic(item_tween)\r
- --question('\83\8c\83\8a\83b\83N', {'\8dz\90ÎX15', '\96\82\8f»\90ÎX10', '\90Â\8f»\90ÎX2', '\8cÃ\95¶\8f\91X4', '\93ä\82Ì\89t\91ÌX3'}, nil, nil, item_tween)\r
- end\r
- end \r
- end\r
-end\r
---}}}\r
---{{{ setup_menu\r
-function setup_menu()\r
- local base_width = 500\r
- local base_height = 400\r
-\r
- local items = \r
- {\r
- '<layout w="120" h="24" xalign="center">\95\90\8aí</layout>',\r
- '<layout w="120" h="24" xalign="center">\96h\8bï</layout>',\r
- '<layout w="120" h="24" xalign="center">\90_\97ì</layout>',\r
- '<layout w="120" h="24" xalign="center">\83A\83C\83e\83\80</layout>',\r
- }\r
- local tab_menu = Question:new('\83Z\83b\83g\83A\83b\83v\83\81\83j\83\85\81[', items, 'direction=horizontal')\r
- local prop = tab_menu:get_properties()\r
- local old_width, old_height = split(prop['preferred_size'], ',')\r
- local x, y = layout(0.5, base_width, 0.5, 0.5, base_height, 0.5)\r
- local width = base_width\r
- local height = 70\r
- -- tab_menu\82Ìtween\82ð\90Ý\92è\r
- tab_menu:set_tween('open.position2', {[0] = {x, -height}, [20] = {x, y}}, 20)\r
- tab_menu:set_tween('open.size2', {[0] = {width - old_width, height - old_height}}, 0)\r
- tab_menu:set_tween('close.position2', {[0] = {x, y}, [20] = {x, -height}}, 20)\r
- tab_menu:set_tween('close.size2', {[0] = {width - old_width, height - old_height}}, 0)\r
- tab_menu:set_tween('close.color', {[5] = {1, 1, 1, 1}, [20] = {0, 1, 1, 1}}, 20)\r
-\r
- local frame = tab_menu:show()\r
- wait_frame(frame)\r
- while true do\r
- local key = get_key()\r
- if key == KEY_UP then tab_menu:move_cursor_up()\r
- elseif key == KEY_DOWN then tab_menu:move_cursor_down()\r
- elseif key == KEY_LEFT then tab_menu:move_cursor_left()\r
- elseif key == KEY_RIGHT then tab_menu:move_cursor_right()\r
- elseif key == KEY_X then \r
- sound("sound/cancel.wav")-- \83L\83\83\83\93\83Z\83\8b\89¹\r
- frame = tab_menu:hide()\r
- wait_frame(frame)\r
- tab_menu:dispose()\r
- return \r
- elseif key == KEY_Z then \r
- local index = tab_menu:get_current()\r
- sound("sound/decide.wav")-- \8c\88\92è\89¹\r
- -- tab_menu\82Ì\88Ê\92u\8cv\8eZ\r
- local prop = tab_menu:get_properties()\r
-\r
- -- item_menu\82Ì\82½\82ß\82Ìtween\8dì\90¬\r
- local item_tween = DefaultTween:new(x, y + height + 10, width, base_height - height) -- \88ê\8fu\82Å\8c»\82ê\82é\r
- if index == 0 then\r
- question_setup_weapon(item_tween)\r
- elseif index == 1 then\r
- question_setup_armer(item_tween)\r
- elseif index == 2 then\r
- question_setup_ideal(item_tween) \r
- elseif index == 3 then\r
- question_setup_item(item_tween)\r
- end\r
- end \r
- end\r
-end\r
---}}}\r
-\r
-function main()\r
- --pic = Picture:new('image/yukkuri.png')\r
- --pic:set_tween('color', {[0] = {1, 1, 1}, [10] = {1, 0, 0}, [100] = {1, 0, 1, 1}})\r
- --pic:set_tween('position2', {[0] = {200, 100}, [100] = {400, 200}})\r
- --pic:set_tween('size2', {[0] = {100, 100}, [30] = {200, 200}, [60] = {100, 100}})\r
- \r
- local answer\r
- while true do\r
- local items = {'\83X\83e\81[\83^\83X', '\83A\83C\83e\83\80\8aÇ\97\9d', '\83Z\83b\83g\83A\83b\83v', '\83V\83X\83e\83\80', '<col name="gray">\83_\83\93\83W\83\87\83\93\92E\8fo</col>'}\r
- answer = question('\83\81\83C\83\93\83\81\83j\83\85\81[', items, nil, {4}, RightSlideTween:new(0.2, 0.8, 0.3, 0.7, 20))\r
- if answer == 0 then\r
- break\r
- elseif answer == 1 then\r
- --{{{ \83X\83e\81[\83^\83X\r
- local texts = {\r
- 'HP 200/400 \83Q\83C\83\93 80%<nl/>\8dU\8c\82\97Í 200 \8aÑ\92Ê\97Í 20<nl/>\95¨\97\9d\96h\8cä 100 \96\82\96@\96h\8cä 50',\r
- '\8f\8a\8e\9d\83A\83C\83e\83\80\90\94 5<nl />\8eg\96ð\90_\97ì\90\94 5 \90í\93¬\8eQ\89Á\90_\97ì\90\94 2',\r
- '\8f\8a\8e\9d\8bà 3JEM',\r
- }\r
- message('\83\8a\81[\83X', texts, '', ExtensionTween:new())\r
- --}}}\r
- elseif answer == 2 then\r
- item_menu()\r
- elseif answer == 3 then\r
- setup_menu()\r
- elseif answer == 4 then\r
- --{{{ \83V\83X\83e\83\80\r
- answer = question('\83V\83X\83e\83\80\83\81\83j\83\85\81[', {'\83Z\81[\83u', '\83\8d\81[\83h', '\8aÂ\8b«\90Ý\92è', '\82à\82Ç\82é'})\r
- --}}}\r
- end \r
- end -- \83\81\83C\83\93\83\81\83j\83\85\81[\r
-\r
-end\r
-\r
+require('script/moflib')
+require('script/common')
+require('script/bubble')
+
+--{{{ question_attached
+function question_attached(item_tween)
+ local items = load_game_data('gamedata.item_profile')
+ local list = {}
+ for i = 1, #items, 1 do
+ local name = get_icon_image_tag(items[i].icon_type) ..
+ '<layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'
+ if tonumber(items[i].attached) == 1 then
+ if tonumber(items[i].equipped) == 1 then
+ table.insert(list, name .. '<layout w="100" h="32" xalign="right" yalign="center"><col name="blue">(\91\95\94õ\92\86)</col></layout>')
+ else
+ table.insert(list, name)
+ end
+ end
+ end
+ return question('\8f\8a\8e\9d\83A\83C\83e\83\80(\8ec\82è0\83X\83\8d\83b\83g)', list, nil, nil, item_tween)
+end
+--}}}
+--{{{ question_stored
+function question_stored(item_tween)
+ local items = load_game_data('gamedata.item_profile')
+ local list = {}
+ for i = 1, #items, 1 do
+ local name = get_icon_image_tag(items[i].icon_type) ..
+ '<layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'
+ if tonumber(items[i].stored) == 1 then
+ table.insert(list, name)
+ end
+ end
+ return question('\91q\8cÉ\83A\83C\83e\83\80', list, nil, nil, item_tween)
+end
+--}}}
+--{{{ question_relic
+function question_relic(item_tween)
+ local relics = load_game_data('gamedata.relic_profile')
+ local list = {}
+ for i = 1, #relics, 1 do
+ if relics[i].num ~= 0 then
+ local name = get_icon_image_tag(relics[i].icon_type) ..
+ '<layout w="360" h="32" xalign="left" yalign="center">' .. relics[i].name .. '</layout>' ..
+ '<layout w="100" h="32" xalign="right" yalign="center">' .. relics[i].num .. '\83\96</layout>'
+ table.insert(list, name)
+ end
+ end
+ return question('\83\8c\83\8a\83b\83N', list, nil, nil, item_tween) -- relic\82Í\91S\95\94disable
+end
+--}}}
+--{{{ question_setup_weapon
+function question_setup_weapon(item_tween)
+ local items = load_game_data('gamedata.item_profile')
+ local list = {}
+ local disables = {}
+ local num_items = 0
+ for i = 1, #items, 1 do
+ local type = tonumber(items[i].type);
+ local state = ''
+ if items[i].equipped == '1' then
+ state = '<layout w="100" h="32" xalign="right" yalign="center">(\91\95\94õ\92\86)</layout></col>'
+ elseif items[i].attached == '1' then
+ state = '<layout w="100" h="32" xalign="right" yalign="center"><col name="blue">(\8f\8a\8e\9d)</col></layout>'
+ elseif items[i].stored == '1' then
+ state = '<layout w="100" h="32" xalign="right" yalign="center"><col name="blue">(\91q\8cÉ)</col></layout>'
+ end
+ if type == ITEM_TYPE_KNIGH or type == ITEM_TYPE_SWORD or type == ITEM_TYPE_BLADE then
+ -- \91\95\94õ\92\86\82¾\82Á\82½\82çdisable
+ if items[i].equipped == '1' then
+ local name = get_icon_image_tag(items[i].icon_type) ..
+ '<col name="gray"><layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'
+ table.insert(list, name .. state)
+ table.insert(disables, num_items)
+ else
+ local name = get_icon_image_tag(items[i].icon_type) ..
+ '<layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'
+ table.insert(list, name .. state)
+ end
+ num_items = num_items + 1
+ end
+ end
+ return question('\91\95\94õ\82·\82é\95\90\8aí\82ð\91I\91ð', list, nil, disables, item_tween)
+end
+--}}}
+--{{{ question_setup_armer
+function question_setup_armer(item_tween)
+ local items = load_game_data('gamedata.item_profile')
+ local list = {}
+ local disables = {}
+ local num_items = 0
+ for i = 1, #items, 1 do
+ local type = tonumber(items[i].type);
+ local state = ''
+ if items[i].equipped == '1' then
+ state = '<layout w="100" h="32" xalign="right" yalign="center">(\91\95\94õ\92\86)</layout></col>'
+ elseif items[i].attached == '1' then
+ state = '<layout w="100" h="32" xalign="right" yalign="center"><col name="blue">(\8f\8a\8e\9d)</col></layout>'
+ elseif items[i].stored == '1' then
+ state = '<layout w="100" h="32" xalign="right" yalign="center"><col name="blue">(\91q\8cÉ)</col></layout>'
+ end
+ if type == ITEM_TYPE_ROBE or type == ITEM_TYPE_ARMER then
+ -- \91\95\94õ\92\86\82¾\82Á\82½\82çdisable
+ if items[i].equipped == '1' then
+ local name = get_icon_image_tag(items[i].icon_type) ..
+ '<col name="gray"><layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'
+ table.insert(list, name .. state)
+ table.insert(disables, num_items)
+ else
+ local name = get_icon_image_tag(items[i].icon_type) ..
+ '<layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'
+ table.insert(list, name .. state)
+ end
+ num_items = num_items + 1
+
+ end
+ end
+ return question('\91\95\94õ\82·\82é\96h\8bï\82ð\91I\91ð', list, nil, disables, item_tween)
+end
+--}}}
+--{{{ question_setup_item
+function question_setup_item(item_tween)
+ local items = load_game_data('gamedata.item_profile')
+ local list = {}
+ local disables = {}
+ local num_items = 0
+ for i = 1, #items, 1 do
+ local state = ''
+ if items[i].equipped == '1' then
+ state = '<layout w="100" h="32" xalign="right" yalign="center">(\91\95\94õ\92\86)</layout></col>'
+ elseif items[i].attached == '1' then
+ state = '<layout w="100" h="32" xalign="right" yalign="center"><col name="blue">(\8f\8a\8e\9d)</col></layout>'
+ elseif items[i].stored == '1' then
+ state = '<layout w="100" h="32" xalign="right" yalign="center"><col name="blue">(\91q\8cÉ)</col></layout>'
+ end
+
+ -- \91\95\94õ\92\86\82¾\82Á\82½\82çdisable
+ if items[i].equipped == '1' then
+ local name = get_icon_image_tag(items[i].icon_type) ..
+ '<col name="gray"><layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'
+ table.insert(list, name .. state)
+ table.insert(disables, num_items)
+ else
+ local name = get_icon_image_tag(items[i].icon_type) ..
+ '<layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'
+ table.insert(list, name .. state)
+ end
+ num_items = num_items + 1
+ end
+ return question('\8f\8a\8e\9d\82·\82é\83A\83C\83e\83\80\82ð\91I\91ð(\8ec\82è0\83X\83\8d\83b\83g)', list, nil, disables, item_tween)
+end
+--}}}
+--{{{ question_setup_ideal
+function question_setup_ideal(item_tween)
+ local items = load_game_data('gamedata.ideal_profile')
+ local list = {}
+ for i = 1, #items, 1 do
+ local state = ''
+ if items[i].attend == '1' then
+ state = '<layout w="100" h="32" xalign="right" yalign="center"><col name="blue">(\8eQ\89Á)</col></layout>'
+ end
+ local name = get_icon_image_tag(items[i].icon_type) ..
+ '<layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'
+ table.insert(list, name .. state)
+ end
+ return question('\8fo\8c\82\90_\97ì\82ð\91I\91ð(\8ec\82è0\83X\83\8d\83b\83g)', list, nil, nil, item_tween)
+end
+--}}}
+--{{{ item_menu
+function item_menu()
+ local base_width = 500
+ local base_height = 400
+
+ local items =
+ {
+ '<layout w="170" h="24" xalign="center">\8f\8a\8e\9d\83A\83C\83e\83\80</layout>',
+ '<layout w="170" h="24" xalign="center">\91q\8cÉ\83A\83C\83e\83\80</layout>',
+ '<layout w="170" h="24" xalign="center">\83\8c\83\8a\83b\83N</layout>',
+ }
+ local tab_menu = Question:new('\83A\83C\83e\83\80\8aÇ\97\9d\83\81\83j\83\85\81[', items, 'direction=horizontal')
+ local prop = tab_menu:get_properties()
+ local old_width, old_height = split(prop['preferred_size'], ',')
+ local x, y = layout(0.5, base_width, 0.5, 0.5, base_height, 0.5)
+ local width = base_width
+ local height = 70
+ -- tab_menu\82Ìtween\82ð\90Ý\92è
+ tab_menu:set_tween('open.position2', {[0] = {x, -height}, [20] = {x, y}}, 20)
+ tab_menu:set_tween('open.size2', {[0] = {width - old_width, height - old_height}}, 0)
+ tab_menu:set_tween('close.position2', {[0] = {x, y}, [20] = {x, -height}}, 20)
+ tab_menu:set_tween('close.size2', {[0] = {width - old_width, height - old_height}}, 0)
+ tab_menu:set_tween('close.color', {[5] = {1, 1, 1, 1}, [20] = {0, 1, 1, 1}}, 20)
+
+ local frame = tab_menu:show()
+ wait_frame(frame)
+ while true do
+ local key = get_key()
+ if key == KEY_UP then tab_menu:move_cursor_up()
+ elseif key == KEY_DOWN then tab_menu:move_cursor_down()
+ elseif key == KEY_LEFT then tab_menu:move_cursor_left()
+ elseif key == KEY_RIGHT then tab_menu:move_cursor_right()
+ elseif key == KEY_X then
+ sound("sound/cancel.wav")-- \83L\83\83\83\93\83Z\83\8b\89¹
+ frame = tab_menu:hide()
+ wait_frame(frame)
+ tab_menu:dispose()
+ return
+ elseif key == KEY_Z then
+ local index = tab_menu:get_current()
+ sound("sound/decide.wav")-- \8c\88\92è\89¹
+ -- tab_menu\82Ì\88Ê\92u\8cv\8eZ
+ local prop = tab_menu:get_properties()
+
+ -- item_menu\82Ì\82½\82ß\82Ìtween\8dì\90¬
+ local item_tween = DefaultTween:new(x, y + height + 10, width, base_height - height) -- \88ê\8fu\82Å\8c»\82ê\82é
+ if index == 0 then
+ question_attached(item_tween)
+ elseif index == 1 then
+ question_stored(item_tween)
+ elseif index == 2 then
+ question_relic(item_tween)
+ --question('\83\8c\83\8a\83b\83N', {'\8dz\90ÎX15', '\96\82\8f»\90ÎX10', '\90Â\8f»\90ÎX2', '\8cÃ\95¶\8f\91X4', '\93ä\82Ì\89t\91ÌX3'}, nil, nil, item_tween)
+ end
+ end
+ end
+end
+--}}}
+--{{{ setup_menu
+function setup_menu()
+ local base_width = 500
+ local base_height = 400
+
+ local items =
+ {
+ '<layout w="120" h="24" xalign="center">\95\90\8aí</layout>',
+ '<layout w="120" h="24" xalign="center">\96h\8bï</layout>',
+ '<layout w="120" h="24" xalign="center">\90_\97ì</layout>',
+ '<layout w="120" h="24" xalign="center">\83A\83C\83e\83\80</layout>',
+ }
+ local tab_menu = Question:new('\83Z\83b\83g\83A\83b\83v\83\81\83j\83\85\81[', items, 'direction=horizontal')
+ local prop = tab_menu:get_properties()
+ local old_width, old_height = split(prop['preferred_size'], ',')
+ local x, y = layout(0.5, base_width, 0.5, 0.5, base_height, 0.5)
+ local width = base_width
+ local height = 70
+ -- tab_menu\82Ìtween\82ð\90Ý\92è
+ tab_menu:set_tween('open.position2', {[0] = {x, -height}, [20] = {x, y}}, 20)
+ tab_menu:set_tween('open.size2', {[0] = {width - old_width, height - old_height}}, 0)
+ tab_menu:set_tween('close.position2', {[0] = {x, y}, [20] = {x, -height}}, 20)
+ tab_menu:set_tween('close.size2', {[0] = {width - old_width, height - old_height}}, 0)
+ tab_menu:set_tween('close.color', {[5] = {1, 1, 1, 1}, [20] = {0, 1, 1, 1}}, 20)
+
+ local frame = tab_menu:show()
+ wait_frame(frame)
+ while true do
+ local key = get_key()
+ if key == KEY_UP then tab_menu:move_cursor_up()
+ elseif key == KEY_DOWN then tab_menu:move_cursor_down()
+ elseif key == KEY_LEFT then tab_menu:move_cursor_left()
+ elseif key == KEY_RIGHT then tab_menu:move_cursor_right()
+ elseif key == KEY_X then
+ sound("sound/cancel.wav")-- \83L\83\83\83\93\83Z\83\8b\89¹
+ frame = tab_menu:hide()
+ wait_frame(frame)
+ tab_menu:dispose()
+ return
+ elseif key == KEY_Z then
+ local index = tab_menu:get_current()
+ sound("sound/decide.wav")-- \8c\88\92è\89¹
+ -- tab_menu\82Ì\88Ê\92u\8cv\8eZ
+ local prop = tab_menu:get_properties()
+
+ -- item_menu\82Ì\82½\82ß\82Ìtween\8dì\90¬
+ local item_tween = DefaultTween:new(x, y + height + 10, width, base_height - height) -- \88ê\8fu\82Å\8c»\82ê\82é
+ if index == 0 then
+ question_setup_weapon(item_tween)
+ elseif index == 1 then
+ question_setup_armer(item_tween)
+ elseif index == 2 then
+ question_setup_ideal(item_tween)
+ elseif index == 3 then
+ question_setup_item(item_tween)
+ end
+ end
+ end
+end
+--}}}
+
+function main()
+ --pic = Picture:new('image/yukkuri.png')
+ --pic:set_tween('color', {[0] = {1, 1, 1}, [10] = {1, 0, 0}, [100] = {1, 0, 1, 1}})
+ --pic:set_tween('position2', {[0] = {200, 100}, [100] = {400, 200}})
+ --pic:set_tween('size2', {[0] = {100, 100}, [30] = {200, 200}, [60] = {100, 100}})
+
+ local answer
+ while true do
+ local items = {'\83X\83e\81[\83^\83X', '\83A\83C\83e\83\80\8aÇ\97\9d', '\83Z\83b\83g\83A\83b\83v', '\83V\83X\83e\83\80', '<col name="gray">\83_\83\93\83W\83\87\83\93\92E\8fo</col>'}
+ answer = question('\83\81\83C\83\93\83\81\83j\83\85\81[', items, nil, {4}, RightSlideTween:new(0.2, 0.8, 0.3, 0.7, 20))
+ if answer == 0 then
+ break
+ elseif answer == 1 then
+ --{{{ \83X\83e\81[\83^\83X
+ local texts = {
+ 'HP 200/400 \83Q\83C\83\93 80%<nl/>\8dU\8c\82\97Í 200 \8aÑ\92Ê\97Í 20<nl/>\95¨\97\9d\96h\8cä 100 \96\82\96@\96h\8cä 50',
+ '\8f\8a\8e\9d\83A\83C\83e\83\80\90\94 5<nl />\8eg\96ð\90_\97ì\90\94 5 \90í\93¬\8eQ\89Á\90_\97ì\90\94 2',
+ '\8f\8a\8e\9d\8bà 3JEM',
+ }
+ message('\83\8a\81[\83X', texts, '', ExtensionTween:new())
+ --}}}
+ elseif answer == 2 then
+ item_menu()
+ elseif answer == 3 then
+ setup_menu()
+ elseif answer == 4 then
+ --{{{ \83V\83X\83e\83\80
+ answer = question('\83V\83X\83e\83\80\83\81\83j\83\85\81[', {'\83Z\81[\83u', '\83\8d\81[\83h', '\8aÂ\8b«\90Ý\92è', '\82à\82Ç\82é'})
+ --}}}
+ end
+ end -- \83\81\83C\83\93\83\81\83j\83\85\81[
+
+end
+
-require('script/strict')\r
---\83\86\81[\83e\83B\83\8a\83e\83B\8aÖ\90\94\r
---{{{ is_empty\r
-function is_empty(str)\r
- if str == nil or str == '' then return true\r
- else return false end\r
-end\r
---}}}\r
---{{{ split\r
-function split(str, delim)\r
- if string.find(str, delim) == nil then\r
- return {str}\r
- end\r
-\r
- local result = {}\r
- local pat = '(.-)' .. delim .. '()'\r
- local last_pos\r
- for part, pos in string.gfind(str, pat) do\r
- table.insert(result, part)\r
- last_pos = pos\r
- end\r
- table.insert(result, string.sub(str, last_pos))\r
- return unpack(result)\r
-end\r
---}}}\r
---{{{ join\r
-function join(tbl, sep)\r
- local ret\r
- for n, v in pairs(tbl) do\r
- local seg = tostring(v)\r
- if ret == nil then\r
- ret = seg\r
- else\r
- ret = ret .. sep .. seg\r
- end\r
- end\r
- return ret\r
-end\r
---}}}\r
---{{{ find\r
-function find(tbl, elem)\r
- if tbl == nil then return false end\r
-\r
- for n, v in pairs(tbl) do\r
- if v == elem then return true end\r
- end\r
- return false\r
-end\r
---}}}\r
---{{{ layout\r
-function layout(left_margin, width, right_margin, top_margin, height, bottom_margin)\r
- -- TODO get from app\r
- local data = load_game_data('system.client_region')\r
- local screen_width = data[1]['width'] \r
- local screen_height = data[1]['height']\r
-\r
- local x, y --results\r
-\r
- -- TODO parameter check. use error function\r
- if left_margin ~= nil and right_margin ~= nil then\r
- -- \8d¶\89E\82Ì\83}\81[\83W\83\93\82©\82ç\92\86\90S\88Ê\92u\82ð\8b\81\82ß\82é\r
- local center_from_left = left_margin + (1.0 - left_margin - right_margin) / 2\r
- x = center_from_left * screen_width - width / 2\r
- end\r
- \r
- if top_margin ~= nil and bottom_margin ~= nil then\r
- -- \8fã\89º\82Ì\83}\81[\83W\83\93\82©\82ç\92\86\90S\88Ê\92u\82ð\8b\81\82ß\82é\r
- local center_from_top = top_margin + (1.0 - top_margin - bottom_margin) / 2\r
- y = center_from_top * screen_height - height / 2\r
- end\r
-\r
-\r
-\r
- return x, y;\r
-end\r
---}}}\r
---moflib API\r
---{{{ waitFrame\r
-function wait_frame(frame)\r
- waitFrameImpl(frame)\r
- coroutine.yield()\r
-end\r
-\r
---\82±\82±\82Ì\83L\81[\92è\90\94\82ÍInputReceiver\82Æ\93¯\8aú\82µ\82Ä\82¢\82È\82¯\82ê\82Î\82È\82ç\82È\82¢\r
-KEY_UP = 1\r
-KEY_DOWN = 2\r
-KEY_LEFT = 3\r
-KEY_RIGHT = 4\r
-KEY_A = 5\r
-KEY_B = 6\r
-KEY_C = 7\r
-KEY_D = 8\r
-KEY_E = 9\r
-KEY_F = 10\r
-KEY_G = 11\r
-KEY_H = 12\r
-KEY_I = 13\r
-KEY_J = 14\r
-KEY_K = 15\r
-KEY_L = 16\r
-KEY_M = 17\r
-KEY_N = 18\r
-KEY_O = 19\r
-KEY_P = 20\r
-KEY_Q = 21\r
-KEY_R = 22\r
-KEY_S = 23\r
-KEY_T = 24\r
-KEY_U = 25\r
-KEY_V = 26\r
-KEY_W = 27\r
-KEY_X = 28\r
-KEY_Y = 29\r
-KEY_Z = 30\r
-KEY_ESCAPE = 31 \r
-KEY_ANY = 32\r
---}}}\r
---{{{ sound\r
-function sound(filepath)\r
- local id = soundCreateImpl(filepath)\r
- soundPlayImpl(id)\r
- --disposeImpl(id, 'sound')\r
-end\r
---}}}\r
---{{{ load_game_data\r
-function load_game_data(resource_path)\r
- return loadGameDataImpl(resource_path)\r
-end\r
---}}}\r
---{{{ wait_for_key\r
-function wait_for_key(key)\r
- waitForKeyImpl(key)\r
- coroutine.yield()\r
-end\r
---}}}\r
---{{{ get_last_key\r
-function get_last_key()\r
- return getLastKeyImpl()\r
-end\r
---}}}\r
---{{{ get_key\r
-function get_key()\r
- wait_for_key(KEY_ANY)\r
- return get_last_key()\r
-end\r
---}}}\r
---{{{ message\r
-function message(title, texts, style, initializer)\r
- local obj = Message:new(title)\r
- if initializer ~= nil then initializer(obj) end\r
- local frame = obj:show()\r
- --wait_frame(frame)\r
- for i = 1 , #texts , 1 \r
- do\r
- local frame = obj:next(texts[i])\r
- wait_frame(frame)\r
- wait_for_key(KEY_Z)\r
- end \r
- local frame = obj:hide()\r
- wait_frame(frame)\r
- obj:dispose()\r
-end\r
---{{{ new\r
-Message = {}\r
-function Message:new(title, style)\r
- if style == nil then style = '' end\r
- local id = messageNewImpl(title, style)\r
- local obj = {}\r
- obj.id_ = id\r
- setmetatable(obj, {__index = Message})\r
- return obj\r
-end\r
---}}}\r
---{{{ show\r
-function Message:show()\r
- return showImpl(self.id_, 'message')\r
-end\r
---}}}\r
---{{{ hide\r
-function Message:hide()\r
- return hideImpl(self.id_, 'message')\r
-end\r
---}}}\r
---{{{ set_tween\r
-function Message:set_tween(target, stream, period)\r
- if period == nil then period = 0 end\r
- objectSetBehaviorImpl(self.id_, 'message.' .. target, stream, period)\r
-end\r
---}}}\r
---{{{ get_property\r
-function Message:get_properties()\r
- return objectGetPropertiesImpl(self.id_, 'message')\r
-end\r
---}}}\r
---{{{ next\r
-function Message:next(text)\r
- print_debug(text)\r
- return messageNextImpl(self.id_, text)\r
-end\r
---}}}\r
---{{{ dispose\r
-function Message:dispose(text)\r
- return disposeImpl(self.id_, 'message')\r
-end\r
---}}}\r
---}}}\r
---{{{ question\r
-function question(title, items, style, disables, initializer)\r
- if disables ~= nil then \r
- -- disable\82ª\8ew\92è\82³\82ê\82Ä\82¢\82½\82çstyle\82É\92Ç\89Á\r
- if not is_empty(style) then style = style .. ';' end\r
- style = 'disable=' .. join(disables, ',')\r
- end\r
- local obj = Question:new(title, items, style)\r
- if initializer ~= nil then initializer(obj) end\r
- local frame = obj:show()\r
- wait_frame(frame)\r
- while true do\r
- local key = get_key()\r
- if key == KEY_UP then obj:move_cursor_up()\r
- elseif key == KEY_DOWN then obj:move_cursor_down()\r
- elseif key == KEY_LEFT then obj:move_cursor_left()\r
- elseif key == KEY_RIGHT then obj:move_cursor_right()\r
- elseif key == KEY_X then \r
- sound("sound/cancel.wav")-- \83L\83\83\83\93\83Z\83\8b\89¹\r
- frame = obj:hide()\r
- wait_frame(frame)\r
- obj:dispose()\r
- return 0 --\83L\83\83\83\93\83Z\83\8b\r
- elseif key == KEY_Z then \r
- local index = obj:get_current()\r
- if not find(disables, index) then -- disable\82È\82ç\96³\8e\8b\82·\82é\r
- sound("sound/decide.wav")-- \8c\88\92è\89¹\r
- frame = obj:select()\r
- wait_frame(frame)\r
- frame = obj:hide()\r
- wait_frame(frame)\r
- obj:dispose()\r
- return index + 1 --0 \82Í\83L\83\83\83\93\83Z\83\8b\8e\9e\82Ì\93®\82«\r
- end\r
- end \r
- end\r
-end\r
---{{{ new\r
-Question = {}\r
-function Question:new(title, items, style)\r
- if style == nil then style = '' end\r
- local id = menuNewImpl(title, items, style)\r
- local obj = {}\r
- obj.id_ = id\r
- setmetatable(obj, {__index = Question})\r
- return obj\r
-end\r
---}}}\r
---{{{ show\r
-function Question:show()\r
- return showImpl(self.id_, 'menu')\r
-end\r
---}}}\r
---{{{ hide\r
-function Question:hide()\r
- return hideImpl(self.id_, 'menu')\r
-end\r
---}}}\r
---{{{ set_tween\r
-function Question:set_tween(target, stream, period)\r
- if period == nil then period = 0 end\r
- objectSetBehaviorImpl(self.id_, 'menu.' .. target, stream, period)\r
-end\r
---}}}\r
---{{{ get_property\r
-function Question:get_properties()\r
- return objectGetPropertiesImpl(self.id_, 'menu')\r
-end\r
---}}}\r
---{{{ move_cursor\r
-MOVE_UP = 0\r
-MOVE_DOWN = 1\r
-MOVE_LEFT = 2\r
-MOVE_RIGHT = 3\r
-\r
-function Question:move_cursor_up()\r
- return menuMoveCursorImpl(self.id_, MOVE_UP)\r
-end\r
-\r
-function Question:move_cursor_down()\r
- return menuMoveCursorImpl(self.id_, MOVE_DOWN)\r
-end\r
-\r
-function Question:move_cursor_left()\r
- return menuMoveCursorImpl(self.id_, MOVE_LEFT)\r
-end\r
-\r
-function Question:move_cursor_right()\r
- return menuMoveCursorImpl(self.id_, MOVE_RIGHT)\r
-end\r
---}}}\r
---{{{ get_currnet\r
-function Question:get_current()\r
- return menuGetCurrentImpl(self.id_)\r
-end\r
---}}}\r
---{{{ select\r
-function Question:select()\r
- return menuSelectImpl(self.id_)\r
-end\r
---}}}\r
---{{{ dispose\r
-function Question:dispose()\r
- return disposeImpl(self.id_, 'menu')\r
-end\r
---}}}\r
---}}}\r
---{{{ print_debug\r
-function print_debug(obj, spacer)\r
- if (type(obj) ~= 'table') then\r
- printDebugImpl(tostring(obj))\r
- return\r
- end\r
-\r
- if spacer == nil then spacer = '' end\r
-\r
- for key, value in pairs(obj) do \r
- if (type(value) ~= 'table') then\r
- printDebugImpl(spacer .. tostring(key) .. ' => ' .. tostring(value))\r
- else\r
- printDebugImpl(spacer .. tostring(key) .. ' => ' )\r
- print_debug(value, spacer .. ' ')\r
- end\r
- end\r
-end\r
---}}}\r
---{{{ picture\r
---{{{ new\r
-Picture = {}\r
-function Picture:new(path)\r
- local id = pictureCreateImpl(path)\r
- local obj = {}\r
- obj.id_ = id\r
- setmetatable(obj, {__index = Picture})\r
- return obj\r
-end\r
---}}}\r
---{{{ set_tween\r
-function Picture:set_tween(target, stream)\r
- objectSetBehaviorImpl(self.id_, 'picture.' .. target, stream, 0)\r
-end\r
---}}}\r
---{{{ dispose\r
-function Picture:dispose()\r
- return disposeImpl(self.id_, 'picture')\r
-end\r
---}}}\r
---}}}\r
---{{{ particlegen\r
---{{{ new\r
-Particlegen = {}\r
-function Particlegen:new()\r
- local id = particlegenCreateImpl()\r
- local obj = {}\r
- obj.id_ = id\r
- setmetatable(obj, {__index = Particlegen})\r
- return obj\r
-end\r
---}}}\r
---{{{ set_tween\r
-function Particlegen:set_tween(target, stream)\r
- objectSetBehaviorImpl(self.id_, 'particlegen.' .. target, stream, 0)\r
-end\r
---}}}\r
---{{{ dispose\r
-function Particlegen:dispose()\r
- return disposeImpl(self.id_, 'particlegen')\r
-end\r
---}}}\r
---}}}\r
+require('script/strict')
+--\83\86\81[\83e\83B\83\8a\83e\83B\8aÖ\90\94
+--{{{ is_empty
+function is_empty(str)
+ if str == nil or str == '' then return true
+ else return false end
+end
+--}}}
+--{{{ split
+function split(str, delim)
+ if string.find(str, delim) == nil then
+ return {str}
+ end
+
+ local result = {}
+ local pat = '(.-)' .. delim .. '()'
+ local last_pos
+ for part, pos in string.gfind(str, pat) do
+ table.insert(result, part)
+ last_pos = pos
+ end
+ table.insert(result, string.sub(str, last_pos))
+ return unpack(result)
+end
+--}}}
+--{{{ join
+function join(tbl, sep)
+ local ret
+ for n, v in pairs(tbl) do
+ local seg = tostring(v)
+ if ret == nil then
+ ret = seg
+ else
+ ret = ret .. sep .. seg
+ end
+ end
+ return ret
+end
+--}}}
+--{{{ find
+function find(tbl, elem)
+ if tbl == nil then return false end
+
+ for n, v in pairs(tbl) do
+ if v == elem then return true end
+ end
+ return false
+end
+--}}}
+--{{{ layout
+function layout(left_margin, width, right_margin, top_margin, height, bottom_margin)
+ -- TODO get from app
+ local data = load_game_data('system.client_region')
+ local screen_width = data[1]['width']
+ local screen_height = data[1]['height']
+
+ local x, y --results
+
+ -- TODO parameter check. use error function
+ if left_margin ~= nil and right_margin ~= nil then
+ -- \8d¶\89E\82Ì\83}\81[\83W\83\93\82©\82ç\92\86\90S\88Ê\92u\82ð\8b\81\82ß\82é
+ local center_from_left = left_margin + (1.0 - left_margin - right_margin) / 2
+ x = center_from_left * screen_width - width / 2
+ end
+
+ if top_margin ~= nil and bottom_margin ~= nil then
+ -- \8fã\89º\82Ì\83}\81[\83W\83\93\82©\82ç\92\86\90S\88Ê\92u\82ð\8b\81\82ß\82é
+ local center_from_top = top_margin + (1.0 - top_margin - bottom_margin) / 2
+ y = center_from_top * screen_height - height / 2
+ end
+
+
+
+ return x, y;
+end
+--}}}
+--moflib API
+--{{{ waitFrame
+function wait_frame(frame)
+ waitFrameImpl(frame)
+ coroutine.yield()
+end
+
+--\82±\82±\82Ì\83L\81[\92è\90\94\82ÍInputReceiver\82Æ\93¯\8aú\82µ\82Ä\82¢\82È\82¯\82ê\82Î\82È\82ç\82È\82¢
+KEY_UP = 1
+KEY_DOWN = 2
+KEY_LEFT = 3
+KEY_RIGHT = 4
+KEY_A = 5
+KEY_B = 6
+KEY_C = 7
+KEY_D = 8
+KEY_E = 9
+KEY_F = 10
+KEY_G = 11
+KEY_H = 12
+KEY_I = 13
+KEY_J = 14
+KEY_K = 15
+KEY_L = 16
+KEY_M = 17
+KEY_N = 18
+KEY_O = 19
+KEY_P = 20
+KEY_Q = 21
+KEY_R = 22
+KEY_S = 23
+KEY_T = 24
+KEY_U = 25
+KEY_V = 26
+KEY_W = 27
+KEY_X = 28
+KEY_Y = 29
+KEY_Z = 30
+KEY_ESCAPE = 31
+KEY_ANY = 32
+--}}}
+--{{{ sound
+function sound(filepath)
+ local id = soundCreateImpl(filepath)
+ soundPlayImpl(id)
+ --disposeImpl(id, 'sound')
+end
+--}}}
+--{{{ load_game_data
+function load_game_data(resource_path)
+ return loadGameDataImpl(resource_path)
+end
+--}}}
+--{{{ wait_for_key
+function wait_for_key(key)
+ waitForKeyImpl(key)
+ coroutine.yield()
+end
+--}}}
+--{{{ get_last_key
+function get_last_key()
+ return getLastKeyImpl()
+end
+--}}}
+--{{{ get_key
+function get_key()
+ wait_for_key(KEY_ANY)
+ return get_last_key()
+end
+--}}}
+--{{{ message
+function message(title, texts, style, initializer)
+ local obj = Message:new(title)
+ if initializer ~= nil then initializer(obj) end
+ local frame = obj:show()
+ --wait_frame(frame)
+ for i = 1 , #texts , 1
+ do
+ local frame = obj:next(texts[i])
+ wait_frame(frame)
+ wait_for_key(KEY_Z)
+ end
+ local frame = obj:hide()
+ wait_frame(frame)
+ obj:dispose()
+end
+--{{{ new
+Message = {}
+function Message:new(title, style)
+ if style == nil then style = '' end
+ local id = messageNewImpl(title, style)
+ local obj = {}
+ obj.id_ = id
+ setmetatable(obj, {__index = Message})
+ return obj
+end
+--}}}
+--{{{ show
+function Message:show()
+ return showImpl(self.id_, 'message')
+end
+--}}}
+--{{{ hide
+function Message:hide()
+ return hideImpl(self.id_, 'message')
+end
+--}}}
+--{{{ set_tween
+function Message:set_tween(target, stream, period)
+ if period == nil then period = 0 end
+ objectSetBehaviorImpl(self.id_, 'message.' .. target, stream, period)
+end
+--}}}
+--{{{ get_property
+function Message:get_properties()
+ return objectGetPropertiesImpl(self.id_, 'message')
+end
+--}}}
+--{{{ next
+function Message:next(text)
+ print_debug(text)
+ return messageNextImpl(self.id_, text)
+end
+--}}}
+--{{{ dispose
+function Message:dispose(text)
+ return disposeImpl(self.id_, 'message')
+end
+--}}}
+--}}}
+--{{{ question
+function question(title, items, style, disables, initializer)
+ if disables ~= nil then
+ -- disable\82ª\8ew\92è\82³\82ê\82Ä\82¢\82½\82çstyle\82É\92Ç\89Á
+ if not is_empty(style) then style = style .. ';' end
+ style = 'disable=' .. join(disables, ',')
+ end
+ local obj = Question:new(title, items, style)
+ if initializer ~= nil then initializer(obj) end
+ local frame = obj:show()
+ wait_frame(frame)
+ while true do
+ local key = get_key()
+ if key == KEY_UP then obj:move_cursor_up()
+ elseif key == KEY_DOWN then obj:move_cursor_down()
+ elseif key == KEY_LEFT then obj:move_cursor_left()
+ elseif key == KEY_RIGHT then obj:move_cursor_right()
+ elseif key == KEY_X then
+ sound("sound/cancel.wav")-- \83L\83\83\83\93\83Z\83\8b\89¹
+ frame = obj:hide()
+ wait_frame(frame)
+ obj:dispose()
+ return 0 --\83L\83\83\83\93\83Z\83\8b
+ elseif key == KEY_Z then
+ local index = obj:get_current()
+ if not find(disables, index) then -- disable\82È\82ç\96³\8e\8b\82·\82é
+ sound("sound/decide.wav")-- \8c\88\92è\89¹
+ frame = obj:select()
+ wait_frame(frame)
+ frame = obj:hide()
+ wait_frame(frame)
+ obj:dispose()
+ return index + 1 --0 \82Í\83L\83\83\83\93\83Z\83\8b\8e\9e\82Ì\93®\82«
+ end
+ end
+ end
+end
+--{{{ new
+Question = {}
+function Question:new(title, items, style)
+ if style == nil then style = '' end
+ local id = menuNewImpl(title, items, style)
+ local obj = {}
+ obj.id_ = id
+ setmetatable(obj, {__index = Question})
+ return obj
+end
+--}}}
+--{{{ show
+function Question:show()
+ return showImpl(self.id_, 'menu')
+end
+--}}}
+--{{{ hide
+function Question:hide()
+ return hideImpl(self.id_, 'menu')
+end
+--}}}
+--{{{ set_tween
+function Question:set_tween(target, stream, period)
+ if period == nil then period = 0 end
+ objectSetBehaviorImpl(self.id_, 'menu.' .. target, stream, period)
+end
+--}}}
+--{{{ get_property
+function Question:get_properties()
+ return objectGetPropertiesImpl(self.id_, 'menu')
+end
+--}}}
+--{{{ move_cursor
+MOVE_UP = 0
+MOVE_DOWN = 1
+MOVE_LEFT = 2
+MOVE_RIGHT = 3
+
+function Question:move_cursor_up()
+ return menuMoveCursorImpl(self.id_, MOVE_UP)
+end
+
+function Question:move_cursor_down()
+ return menuMoveCursorImpl(self.id_, MOVE_DOWN)
+end
+
+function Question:move_cursor_left()
+ return menuMoveCursorImpl(self.id_, MOVE_LEFT)
+end
+
+function Question:move_cursor_right()
+ return menuMoveCursorImpl(self.id_, MOVE_RIGHT)
+end
+--}}}
+--{{{ get_currnet
+function Question:get_current()
+ return menuGetCurrentImpl(self.id_)
+end
+--}}}
+--{{{ select
+function Question:select()
+ return menuSelectImpl(self.id_)
+end
+--}}}
+--{{{ dispose
+function Question:dispose()
+ return disposeImpl(self.id_, 'menu')
+end
+--}}}
+--}}}
+--{{{ print_debug
+function print_debug(obj, spacer)
+ if (type(obj) ~= 'table') then
+ printDebugImpl(tostring(obj))
+ return
+ end
+
+ if spacer == nil then spacer = '' end
+
+ for key, value in pairs(obj) do
+ if (type(value) ~= 'table') then
+ printDebugImpl(spacer .. tostring(key) .. ' => ' .. tostring(value))
+ else
+ printDebugImpl(spacer .. tostring(key) .. ' => ' )
+ print_debug(value, spacer .. ' ')
+ end
+ end
+end
+--}}}
+--{{{ picture
+--{{{ new
+Picture = {}
+function Picture:new(path)
+ local id = pictureCreateImpl(path)
+ local obj = {}
+ obj.id_ = id
+ setmetatable(obj, {__index = Picture})
+ return obj
+end
+--}}}
+--{{{ set_tween
+function Picture:set_tween(target, stream)
+ objectSetBehaviorImpl(self.id_, 'picture.' .. target, stream, 0)
+end
+--}}}
+--{{{ dispose
+function Picture:dispose()
+ return disposeImpl(self.id_, 'picture')
+end
+--}}}
+--}}}
+--{{{ particlegen
+--{{{ new
+Particlegen = {}
+function Particlegen:new()
+ local id = particlegenCreateImpl()
+ local obj = {}
+ obj.id_ = id
+ setmetatable(obj, {__index = Particlegen})
+ return obj
+end
+--}}}
+--{{{ set_tween
+function Particlegen:set_tween(target, stream)
+ objectSetBehaviorImpl(self.id_, 'particlegen.' .. target, stream, 0)
+end
+--}}}
+--{{{ dispose
+function Particlegen:dispose()
+ return disposeImpl(self.id_, 'particlegen')
+end
+--}}}
+--}}}
-\81u\83q\81[\83\8a\83\93\83O\81v\81E\81E\81E\92Ê\8fí\89ñ\95\9c\r
-\81u\83\8a\83W\83F\83l\83\8c\83C\83V\83\87\83\93\81v\81E\81E\81E\90\94\83^\81[\83\93\81A\8f\82µ\82¸\82Â\89ñ\95\9c\r
-\81u\83z\81[\83\8a\81[\83u\83\8c\83X\81v\81E\81E\81E\8e\9f\82É\82g\82o\82ª\82O\82É\82È\82Á\82½\82Æ\82«\82É\81A\88ê\92è\8am\97¦\82Å\95\9c\8a\88\r
-\81u\83G\83N\83X\83^\83V\81[\81v\81E\81E\81E\8e\9f\82É\8eó\82¯\82½\83_\83\81\81[\83W\95ª\89ñ\95\9c\82·\82é\r
-\81u\83\8a\83J\83o\83\8a\81[\83t\83B\81[\83\8b\83h\81v\81E\81E\81E\93G\82à\96¡\95û\82à\89ñ\95\9c\r
-\81u\82`\82o\83q\81[\83\8a\83\93\83O\81v\81E\81E\81E\82`\82o\89ñ\95\9c\r
-\81u\83K\83b\83c\81v\81E\81E\81E\82`\82o\82É\94ä\97á\82µ\82Ä\89ñ\95\9c\r
-\81u\83t\83@\81[\83X\83g\83G\83C\83h\81v\81E\81E\81E\94í\83_\83\81\8e\9e\82É\89ñ\95\9c\r
-\r
-\r
-\92n\96¼\r
-\83X\83g\83\89\91°\81@\90\94\8aw\81E\95¨\97\9d\82©\82ç\r
-----------------------\r
-\83x\83N\83g\81[\83\8b --- vector\r
-\83t\83H\83g\83j\83X --- photonics\r
-\83P\83v\83c\83F\83\93 --- \83P\83v\83\89\81[\82Ì\96@\91¥ \r
-\83N\83G\81[\83g --- equation\r
-\83\81\83C\83g\83\8a\83X --- matrix\r
-\r
-\r
-\83{\83\8d\83j\81[\81@\8dz\90Î\82©\82ç\r
-\83\8b\83r\83X --- \83\8b\83r\81[\r
-\83x\83\8a\83\8b --- \83O\83\8a\81[\83\93\83x\83\8a\83\8b\r
-\83K\83\8b\83l\83b\83g --- \83K\81[\83l\83b\83g\r
-\83\8c\83C\83\93\83V\83X\83g --- \83A\83\81\83W\83X\83g \r
-\83\8a\83h\83b\83g --- \83y\83\8a\83h\83b\83g\r
-\r
-\r
-\r
-\83C\81[\83\94\83X\81@\91\90\89Ô\82©\82ç\r
-\83t\83\89\81[\83W\83A\r
-\83_\83\93\83f\83\8a\83I\83\93\r
-\83U\83N\83\\83\93\r
-\83u\83\89\81[\83\80\r
-\83A\81[\83T\83K\r
-\r
-\r
-\83g\83\8b\83g\83j\83A\83\93\81@\95º\8aí\82©\82ç\r
-\83\94\83@\83C\83\89\r
-\83~\83X\83\8b\r
-\83A\83g\83}\r
-\83K\83T\r
-\83J\83m\83\93\r
-\r
-\83\8b\83f\83\93\83X\81@\8eï\96¡\81E\8câ\8ay\82©\82ç\r
-\83Q\83}\81[\83\93\r
-\83\8c\83C\83u\83\93\r
-\83G\81[\83K\r
-\83V\83\85\83v\83\8b\83c\r
-\83~\83\85\81[\83Y\r
+\81u\83q\81[\83\8a\83\93\83O\81v\81E\81E\81E\92Ê\8fí\89ñ\95\9c
+\81u\83\8a\83W\83F\83l\83\8c\83C\83V\83\87\83\93\81v\81E\81E\81E\90\94\83^\81[\83\93\81A\8f\82µ\82¸\82Â\89ñ\95\9c
+\81u\83z\81[\83\8a\81[\83u\83\8c\83X\81v\81E\81E\81E\8e\9f\82É\82g\82o\82ª\82O\82É\82È\82Á\82½\82Æ\82«\82É\81A\88ê\92è\8am\97¦\82Å\95\9c\8a\88
+\81u\83G\83N\83X\83^\83V\81[\81v\81E\81E\81E\8e\9f\82É\8eó\82¯\82½\83_\83\81\81[\83W\95ª\89ñ\95\9c\82·\82é
+\81u\83\8a\83J\83o\83\8a\81[\83t\83B\81[\83\8b\83h\81v\81E\81E\81E\93G\82à\96¡\95û\82à\89ñ\95\9c
+\81u\82`\82o\83q\81[\83\8a\83\93\83O\81v\81E\81E\81E\82`\82o\89ñ\95\9c
+\81u\83K\83b\83c\81v\81E\81E\81E\82`\82o\82É\94ä\97á\82µ\82Ä\89ñ\95\9c
+\81u\83t\83@\81[\83X\83g\83G\83C\83h\81v\81E\81E\81E\94í\83_\83\81\8e\9e\82É\89ñ\95\9c
+
+
+\92n\96¼
+\83X\83g\83\89\91°\81@\90\94\8aw\81E\95¨\97\9d\82©\82ç
+----------------------
+\83x\83N\83g\81[\83\8b --- vector
+\83t\83H\83g\83j\83X --- photonics
+\83P\83v\83c\83F\83\93 --- \83P\83v\83\89\81[\82Ì\96@\91¥
+\83N\83G\81[\83g --- equation
+\83\81\83C\83g\83\8a\83X --- matrix
+
+
+\83{\83\8d\83j\81[\81@\8dz\90Î\82©\82ç
+\83\8b\83r\83X --- \83\8b\83r\81[
+\83x\83\8a\83\8b --- \83O\83\8a\81[\83\93\83x\83\8a\83\8b
+\83K\83\8b\83l\83b\83g --- \83K\81[\83l\83b\83g
+\83\8c\83C\83\93\83V\83X\83g --- \83A\83\81\83W\83X\83g
+\83\8a\83h\83b\83g --- \83y\83\8a\83h\83b\83g
+
+
+
+\83C\81[\83\94\83X\81@\91\90\89Ô\82©\82ç
+\83t\83\89\81[\83W\83A
+\83_\83\93\83f\83\8a\83I\83\93
+\83U\83N\83\\83\93
+\83u\83\89\81[\83\80
+\83A\81[\83T\83K
+
+
+\83g\83\8b\83g\83j\83A\83\93\81@\95º\8aí\82©\82ç
+\83\94\83@\83C\83\89
+\83~\83X\83\8b
+\83A\83g\83}
+\83K\83T
+\83J\83m\83\93
+
+\83\8b\83f\83\93\83X\81@\8eï\96¡\81E\8câ\8ay\82©\82ç
+\83Q\83}\81[\83\93
+\83\8c\83C\83u\83\93
+\83G\81[\83K
+\83V\83\85\83v\83\8b\83c
+\83~\83\85\81[\83Y
-<?xml version="1.0" encoding="shift_jis"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="8.00"\r
- Name="menu"\r
- ProjectGUID="{68A630D4-5627-44DB-843E-9638DE4081EC}"\r
- RootNamespace="menu"\r
- Keyword="Win32Proj"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="1"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"\r
- MinimalRebuild="true"\r
- BasicRuntimeChecks="3"\r
- RuntimeLibrary="3"\r
- UsePrecompiledHeader="0"\r
- WarningLevel="3"\r
- Detect64BitPortabilityProblems="true"\r
- DebugInformationFormat="4"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- LinkIncremental="2"\r
- GenerateDebugInformation="true"\r
- SubSystem="1"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="1"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
- RuntimeLibrary="2"\r
- UsePrecompiledHeader="0"\r
- WarningLevel="3"\r
- Detect64BitPortabilityProblems="true"\r
- DebugInformationFormat="3"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- LinkIncremental="1"\r
- GenerateDebugInformation="true"\r
- SubSystem="1"\r
- OptimizeReferences="2"\r
- EnableCOMDATFolding="2"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="\83\\81[\83X \83t\83@\83C\83\8b"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
- >\r
- </Filter>\r
- <Filter\r
- Name="\83w\83b\83_\81[ \83t\83@\83C\83\8b"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- </Filter>\r
- <Filter\r
- Name="\83\8a\83\\81[\83X \83t\83@\83C\83\8b"\r
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"\r
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
- >\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
+<?xml version="1.0" encoding="shift_jis"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="menu"
+ ProjectGUID="{68A630D4-5627-44DB-843E-9638DE4081EC}"
+ RootNamespace="menu"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="\83\\81[\83X \83t\83@\83C\83\8b"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ </Filter>
+ <Filter
+ Name="\83w\83b\83_\81[ \83t\83@\83C\83\8b"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="\83\8a\83\\81[\83X \83t\83@\83C\83\8b"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
-\r
-Microsoft Visual Studio Solution File, Format Version 11.00\r
-# Visual C++ Express 2010\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rpg", "rpg\rpg.vcxproj", "{0F6EAEBE-4F7B-485F-99CE-5D9918CBC304}"\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moflib", "..\moflib\moflib\moflib.vcxproj", "{04CD4817-1559-4830-BCB0-C5AE997CD904}"\r
-EndProject\r
-Global\r
- GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
- Debug|Win32 = Debug|Win32\r
- Release|Win32 = Release|Win32\r
- EndGlobalSection\r
- GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
- {0F6EAEBE-4F7B-485F-99CE-5D9918CBC304}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {0F6EAEBE-4F7B-485F-99CE-5D9918CBC304}.Debug|Win32.Build.0 = Debug|Win32\r
- {0F6EAEBE-4F7B-485F-99CE-5D9918CBC304}.Release|Win32.ActiveCfg = Release|Win32\r
- {0F6EAEBE-4F7B-485F-99CE-5D9918CBC304}.Release|Win32.Build.0 = Release|Win32\r
- {04CD4817-1559-4830-BCB0-C5AE997CD904}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {04CD4817-1559-4830-BCB0-C5AE997CD904}.Debug|Win32.Build.0 = Debug|Win32\r
- {04CD4817-1559-4830-BCB0-C5AE997CD904}.Release|Win32.ActiveCfg = Release|Win32\r
- {04CD4817-1559-4830-BCB0-C5AE997CD904}.Release|Win32.Build.0 = Release|Win32\r
- EndGlobalSection\r
- GlobalSection(SolutionProperties) = preSolution\r
- HideSolutionNode = FALSE\r
- EndGlobalSection\r
-EndGlobal\r
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual C++ Express 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rpg", "rpg\rpg.vcxproj", "{0F6EAEBE-4F7B-485F-99CE-5D9918CBC304}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moflib", "..\moflib\moflib\moflib.vcxproj", "{04CD4817-1559-4830-BCB0-C5AE997CD904}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {0F6EAEBE-4F7B-485F-99CE-5D9918CBC304}.Debug|Win32.ActiveCfg = Debug|Win32
+ {0F6EAEBE-4F7B-485F-99CE-5D9918CBC304}.Debug|Win32.Build.0 = Debug|Win32
+ {0F6EAEBE-4F7B-485F-99CE-5D9918CBC304}.Release|Win32.ActiveCfg = Release|Win32
+ {0F6EAEBE-4F7B-485F-99CE-5D9918CBC304}.Release|Win32.Build.0 = Release|Win32
+ {04CD4817-1559-4830-BCB0-C5AE997CD904}.Debug|Win32.ActiveCfg = Debug|Win32
+ {04CD4817-1559-4830-BCB0-C5AE997CD904}.Debug|Win32.Build.0 = Debug|Win32
+ {04CD4817-1559-4830-BCB0-C5AE997CD904}.Release|Win32.ActiveCfg = Release|Win32
+ {04CD4817-1559-4830-BCB0-C5AE997CD904}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
-\r
-Microsoft Visual Studio Solution File, Format Version 11.00\r
-# Visual C# Express 2010\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rpg", "rpg\rpg.vcproj", "{0F6EAEBE-4F7B-485F-99CE-5D9918CBC304}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {04CD4817-1559-4830-BCB0-C5AE997CD904} = {04CD4817-1559-4830-BCB0-C5AE997CD904}\r
- EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moflib", "..\moflib\moflib\moflib.vcproj", "{04CD4817-1559-4830-BCB0-C5AE997CD904}"\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Message_test", "..\test\Message_test\Message_test.vcproj", "{9217700A-B099-4E09-B836-DE7476962F40}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {04CD4817-1559-4830-BCB0-C5AE997CD904} = {04CD4817-1559-4830-BCB0-C5AE997CD904}\r
- EndProjectSection\r
-EndProject\r
-Global\r
- GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
- Debug|Win32 = Debug|Win32\r
- Release|Win32 = Release|Win32\r
- EndGlobalSection\r
- GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
- {0F6EAEBE-4F7B-485F-99CE-5D9918CBC304}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {0F6EAEBE-4F7B-485F-99CE-5D9918CBC304}.Debug|Win32.Build.0 = Debug|Win32\r
- {0F6EAEBE-4F7B-485F-99CE-5D9918CBC304}.Release|Win32.ActiveCfg = Release|Win32\r
- {0F6EAEBE-4F7B-485F-99CE-5D9918CBC304}.Release|Win32.Build.0 = Release|Win32\r
- {04CD4817-1559-4830-BCB0-C5AE997CD904}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {04CD4817-1559-4830-BCB0-C5AE997CD904}.Debug|Win32.Build.0 = Debug|Win32\r
- {04CD4817-1559-4830-BCB0-C5AE997CD904}.Release|Win32.ActiveCfg = Release|Win32\r
- {04CD4817-1559-4830-BCB0-C5AE997CD904}.Release|Win32.Build.0 = Release|Win32\r
- {9217700A-B099-4E09-B836-DE7476962F40}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {9217700A-B099-4E09-B836-DE7476962F40}.Debug|Win32.Build.0 = Debug|Win32\r
- {9217700A-B099-4E09-B836-DE7476962F40}.Release|Win32.ActiveCfg = Release|Win32\r
- {9217700A-B099-4E09-B836-DE7476962F40}.Release|Win32.Build.0 = Release|Win32\r
- EndGlobalSection\r
- GlobalSection(SolutionProperties) = preSolution\r
- HideSolutionNode = FALSE\r
- EndGlobalSection\r
-EndGlobal\r
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual C# Express 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rpg", "rpg\rpg.vcproj", "{0F6EAEBE-4F7B-485F-99CE-5D9918CBC304}"
+ ProjectSection(ProjectDependencies) = postProject
+ {04CD4817-1559-4830-BCB0-C5AE997CD904} = {04CD4817-1559-4830-BCB0-C5AE997CD904}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moflib", "..\moflib\moflib\moflib.vcproj", "{04CD4817-1559-4830-BCB0-C5AE997CD904}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Message_test", "..\test\Message_test\Message_test.vcproj", "{9217700A-B099-4E09-B836-DE7476962F40}"
+ ProjectSection(ProjectDependencies) = postProject
+ {04CD4817-1559-4830-BCB0-C5AE997CD904} = {04CD4817-1559-4830-BCB0-C5AE997CD904}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {0F6EAEBE-4F7B-485F-99CE-5D9918CBC304}.Debug|Win32.ActiveCfg = Debug|Win32
+ {0F6EAEBE-4F7B-485F-99CE-5D9918CBC304}.Debug|Win32.Build.0 = Debug|Win32
+ {0F6EAEBE-4F7B-485F-99CE-5D9918CBC304}.Release|Win32.ActiveCfg = Release|Win32
+ {0F6EAEBE-4F7B-485F-99CE-5D9918CBC304}.Release|Win32.Build.0 = Release|Win32
+ {04CD4817-1559-4830-BCB0-C5AE997CD904}.Debug|Win32.ActiveCfg = Debug|Win32
+ {04CD4817-1559-4830-BCB0-C5AE997CD904}.Debug|Win32.Build.0 = Debug|Win32
+ {04CD4817-1559-4830-BCB0-C5AE997CD904}.Release|Win32.ActiveCfg = Release|Win32
+ {04CD4817-1559-4830-BCB0-C5AE997CD904}.Release|Win32.Build.0 = Release|Win32
+ {9217700A-B099-4E09-B836-DE7476962F40}.Debug|Win32.ActiveCfg = Debug|Win32
+ {9217700A-B099-4E09-B836-DE7476962F40}.Debug|Win32.Build.0 = Debug|Win32
+ {9217700A-B099-4E09-B836-DE7476962F40}.Release|Win32.ActiveCfg = Release|Win32
+ {9217700A-B099-4E09-B836-DE7476962F40}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
-#include "CharacterBoard.hpp"\r
-#include "mof/Matrix3D.hpp"\r
-#include "mof/ConsoleIO.hpp"\r
-#include "mof/streams.hpp"\r
-#include "mof/Interpolation.hpp"\r
-#include "mof/Font.hpp"\r
-#include "mof/Vector2D.hpp"\r
-#include "mof/utilities.hpp"\r
-#include <vector>\r
-\r
-\r
-struct ::CharacterBoard::Impl{\r
- std::vector<mof::Board*> list;\r
- mof::Manipulator<mof::Matrix3D>::Handler worldMatrix;\r
- mof::FrameNumber frame;\r
-\r
- Impl()\r
- : frame(0) ,\r
- worldMatrix(mof::makeConstantHandler(mof::Matrix3D::createIdentity())) \r
- {\r
- }\r
-\r
- ~Impl(){\r
- for(std::vector<mof::Board*>::iterator itr = list.begin() ;\r
- itr != list.end() ;\r
- ++itr ){\r
- delete *itr;\r
- }\r
- \r
- }\r
-};\r
-\r
-::CharacterBoard::CharacterBoard( const mof::tstring& text)\r
-: m_pImpl(new Impl())\r
-{\r
- \r
-\r
- mof::Board* pBoard;\r
- pBoard = new mof::Board();\r
- pBoard->setColor(mof::makeConstantHandler(mof::Color4f(0.3f , 0.3f , 1)));\r
- m_pImpl->list.push_back(pBoard);\r
-\r
- pBoard = new mof::Board();\r
- pBoard->setColor(mof::makeConstantHandler(mof::Color4f(0.6f , 0.6f , 1)));\r
- m_pImpl->list.push_back(pBoard);\r
-\r
- mof::Font font(mof::Font::MS_GOTHIC , 70);\r
- std::shared_ptr<mof::PixelMap> pPixelMap( font.createText(text) );\r
- mof::Vector2D sizeVec((int)pPixelMap->shape()[0] , (int)pPixelMap->shape()[1]);\r
- std::shared_ptr<mof::Texture> pTexture(new mof::Texture( pPixelMap));\r
- float endX = static_cast<float>(pPixelMap->shape()[0]) / pTexture->getWidth();\r
- float endY = static_cast<float>(pPixelMap->shape()[1]) / pTexture->getHeight();\r
-\r
- pBoard = new mof::Board();\r
- pBoard->setColor(mof::makeConstantHandler(mof::Color4f(1 , 1 , 1)));\r
- pBoard->setTexture(pTexture);\r
- pBoard->setTextureCoordinates(mof::Rectangle<float>(0 , 0 , endX , endY));\r
- m_pImpl->list.push_back(pBoard);\r
-}\r
-\r
-::CharacterBoard::~CharacterBoard(){\r
-\r
-}\r
-\r
-void ::CharacterBoard::setFrameNumber(mof::FrameNumber frame){\r
- m_pImpl->frame = frame;\r
- for(std::vector<mof::Board*>::iterator itr = m_pImpl->list.begin() ;\r
- itr != m_pImpl->list.end() ;\r
- ++itr ){\r
- (*itr)->setFrameNumber(frame);\r
- }\r
-}\r
-\r
-/*\r
-void ::CharacterBoard::nextFrame(){\r
- //setFrameNumber(m_pImpl->frame + 1);\r
-}\r
-\r
-\r
-void ::CharacterBoard::prevFrame(){\r
- //if(m_pImpl->frame > 0)setFrameNumber(m_pImpl->frame - 1);\r
-}\r
-*/\r
-\r
-\r
-void ::CharacterBoard::update(){\r
- m_pImpl->frame++;\r
- for(std::vector<mof::Board*>::iterator itr = m_pImpl->list.begin() ;\r
- itr != m_pImpl->list.end() ;\r
- ++itr ){\r
- (*itr)->update();\r
- }\r
-}\r
-\r
-\r
-void ::CharacterBoard::setWorldMatrix(const mof::Manipulator<mof::Matrix3D>::Handler& handler){\r
- m_pImpl->worldMatrix = handler;\r
- std::vector<mof::Manipulator<mof::Matrix3D>::Handler> handlers;\r
- handlers.push_back( mof::makeConstantHandler(\r
- mof::Matrix3D::createTranslation(mof::Vector3D(0 , 0.5f , 0))\r
- ));\r
- handlers.push_back( handler);\r
- \r
- \r
- m_pImpl->list.at(0)->setWorldMatrix(\r
- mof::makeCascadeHandler<mof::Matrix3D, mof::Multiply<mof::Matrix3D>>(handlers.front() , handlers.back()));\r
-\r
- handlers.clear();\r
- handlers.push_back( mof::makeConstantHandler(\r
- mof::Matrix3D::createTranslation(mof::Vector3D(0 , 0.5f , 0.01f))\r
- ));\r
- handlers.push_back(mof::makeConstantHandler(\r
- mof::Matrix3D::createRotation(mof::Vector3D(0 , mof::deg2rad(180) , 0))\r
- ));\r
- handlers.push_back(handler);\r
-\r
- m_pImpl->list.at(1)->setWorldMatrix(\r
- mof::makeCascadeHandler<mof::Matrix3D , mof::Multiply<mof::Matrix3D>>(handlers.front() , handlers.back())\r
- );\r
-\r
- handlers.clear();\r
- handlers.push_back( mof::makeConstantHandler(\r
- mof::Matrix3D::createTranslation(mof::Vector3D(0 , 0.5f , -0.01f))\r
- ));\r
- handlers.push_back( handler);\r
- \r
- \r
- m_pImpl->list.at(2)->setWorldMatrix(\r
- mof::makeCascadeHandler<mof::Matrix3D , mof::Multiply<mof::Matrix3D>>(handlers.front() , handlers.back())\r
- );\r
- \r
-}\r
-\r
-\r
-mof::Matrix3D CharacterBoard::getWorldMatrix() const{\r
- return m_pImpl->worldMatrix->value(m_pImpl->frame);\r
-}\r
-\r
-mof::Vector3D CharacterBoard::getPosition() const{\r
- mof::Matrix3D m = getWorldMatrix();\r
- return mof::Vector3D(m.at(3 , 0) , m.at(3 , 1) , m.at(3 , 2));\r
-}\r
-\r
-void ::CharacterBoard::append(std::list<mof::Board*>& list_){\r
- list_.insert(list_.begin() , m_pImpl->list.begin(), m_pImpl->list.end());\r
- \r
-}\r
-\r
-void ::CharacterBoard::setFinishColor(mof::FrameNumber delay , mof::FrameNumber interval){\r
- {\r
- std::pair<mof::FrameNumber , mof::Color4f> keyFrames[] = {\r
- std::pair<mof::FrameNumber , mof::Color4f>( delay , mof::Color4f(0.3f , 0.3f , 1) ) ,\r
- std::pair<mof::FrameNumber , mof::Color4f>( delay + interval , mof::Color4f(1 , 1 , 1) )\r
- };\r
- m_pImpl->list.at(0)->setColor(\r
- mof::Manipulator<mof::Color4f>::Handler(mof::makeKeyFrameAnimationHandler<mof::Color4f>(keyFrames[0] , keyFrames[1])));\r
- }\r
-\r
- {\r
- std::pair<mof::FrameNumber , mof::Color4f> keyFrames[] = {\r
- std::pair<mof::FrameNumber , mof::Color4f>( delay , mof::Color4f(1 , 1 , 1) ) ,\r
- std::pair<mof::FrameNumber , mof::Color4f>( delay + interval , mof::Color4f(0.3f , 0.3f , 1) )\r
- };\r
- m_pImpl->list.at(2)->setColor(\r
- mof::Manipulator<mof::Color4f>::Handler(mof::makeKeyFrameAnimationHandler<mof::Color4f>(keyFrames[0] , keyFrames[1])));\r
- } \r
-\r
-}\r
-\r
-\r
-void ::CharacterBoard::setPartColor(mof::FrameNumber delay , mof::FrameNumber interval){\r
- {\r
- std::pair<mof::FrameNumber , mof::Color4f> keyFrames[] = {\r
- std::pair<mof::FrameNumber , mof::Color4f>( delay , mof::Color4f(0 , 1 , 1 , 1) ) ,\r
- std::pair<mof::FrameNumber , mof::Color4f>( delay + interval , mof::Color4f(0 , 1 , 1 , 1) )\r
- };\r
- m_pImpl->list.at(0)->setColor(\r
- mof::Manipulator<mof::Color4f>::Handler( mof::makeKeyFrameAnimationHandler<mof::Color4f>(keyFrames[0] , keyFrames[1])));\r
- }\r
-\r
- {\r
- std::pair<mof::FrameNumber , mof::Color4f> keyFrames[] = {\r
- std::pair<mof::FrameNumber , mof::Color4f>( delay , mof::Color4f(0 , 1 , 1 , 1) ) ,\r
- std::pair<mof::FrameNumber , mof::Color4f>( delay + interval , mof::Color4f(0 , 1 , 1 , 1) )\r
- };\r
- m_pImpl->list.at(1)->setColor(\r
- mof::Manipulator<mof::Color4f>::Handler(mof::makeKeyFrameAnimationHandler<mof::Color4f>(keyFrames[0] , keyFrames[1])));\r
- }\r
-\r
- {\r
- std::pair<mof::FrameNumber , mof::Color4f> keyFrames[] = {\r
- std::pair<mof::FrameNumber , mof::Color4f>( delay , mof::Color4f(0.8f , 0.5f , 0.2f) ) ,\r
- std::pair<mof::FrameNumber , mof::Color4f>( delay + interval , mof::Color4f(0.8f , 0.5f , 0.2f) )\r
- };\r
- m_pImpl->list.at(2)->setColor(\r
- mof::Manipulator<mof::Color4f>::Handler(mof::makeKeyFrameAnimationHandler<mof::Color4f>(keyFrames[0] , keyFrames[1])));\r
- } \r
-\r
-}\r
+#include "CharacterBoard.hpp"
+#include "mof/Matrix3D.hpp"
+#include "mof/ConsoleIO.hpp"
+#include "mof/streams.hpp"
+#include "mof/Interpolation.hpp"
+#include "mof/Font.hpp"
+#include "mof/Vector2D.hpp"
+#include "mof/utilities.hpp"
+#include <vector>
+
+
+struct ::CharacterBoard::Impl{
+ std::vector<mof::Board*> list;
+ mof::Manipulator<mof::Matrix3D>::Handler worldMatrix;
+ mof::FrameNumber frame;
+
+ Impl()
+ : frame(0) ,
+ worldMatrix(mof::makeConstantHandler(mof::Matrix3D::createIdentity()))
+ {
+ }
+
+ ~Impl(){
+ for(std::vector<mof::Board*>::iterator itr = list.begin() ;
+ itr != list.end() ;
+ ++itr ){
+ delete *itr;
+ }
+
+ }
+};
+
+::CharacterBoard::CharacterBoard( const mof::tstring& text)
+: m_pImpl(new Impl())
+{
+
+
+ mof::Board* pBoard;
+ pBoard = new mof::Board();
+ pBoard->setColor(mof::makeConstantHandler(mof::Color4f(0.3f , 0.3f , 1)));
+ m_pImpl->list.push_back(pBoard);
+
+ pBoard = new mof::Board();
+ pBoard->setColor(mof::makeConstantHandler(mof::Color4f(0.6f , 0.6f , 1)));
+ m_pImpl->list.push_back(pBoard);
+
+ mof::Font font(mof::Font::MS_GOTHIC , 70);
+ std::shared_ptr<mof::PixelMap> pPixelMap( font.createText(text) );
+ mof::Vector2D sizeVec((int)pPixelMap->shape()[0] , (int)pPixelMap->shape()[1]);
+ std::shared_ptr<mof::Texture> pTexture(new mof::Texture( pPixelMap));
+ float endX = static_cast<float>(pPixelMap->shape()[0]) / pTexture->getWidth();
+ float endY = static_cast<float>(pPixelMap->shape()[1]) / pTexture->getHeight();
+
+ pBoard = new mof::Board();
+ pBoard->setColor(mof::makeConstantHandler(mof::Color4f(1 , 1 , 1)));
+ pBoard->setTexture(pTexture);
+ pBoard->setTextureCoordinates(mof::Rectangle<float>(0 , 0 , endX , endY));
+ m_pImpl->list.push_back(pBoard);
+}
+
+::CharacterBoard::~CharacterBoard(){
+
+}
+
+void ::CharacterBoard::setFrameNumber(mof::FrameNumber frame){
+ m_pImpl->frame = frame;
+ for(std::vector<mof::Board*>::iterator itr = m_pImpl->list.begin() ;
+ itr != m_pImpl->list.end() ;
+ ++itr ){
+ (*itr)->setFrameNumber(frame);
+ }
+}
+
+/*
+void ::CharacterBoard::nextFrame(){
+ //setFrameNumber(m_pImpl->frame + 1);
+}
+
+
+void ::CharacterBoard::prevFrame(){
+ //if(m_pImpl->frame > 0)setFrameNumber(m_pImpl->frame - 1);
+}
+*/
+
+
+void ::CharacterBoard::update(){
+ m_pImpl->frame++;
+ for(std::vector<mof::Board*>::iterator itr = m_pImpl->list.begin() ;
+ itr != m_pImpl->list.end() ;
+ ++itr ){
+ (*itr)->update();
+ }
+}
+
+
+void ::CharacterBoard::setWorldMatrix(const mof::Manipulator<mof::Matrix3D>::Handler& handler){
+ m_pImpl->worldMatrix = handler;
+ std::vector<mof::Manipulator<mof::Matrix3D>::Handler> handlers;
+ handlers.push_back( mof::makeConstantHandler(
+ mof::Matrix3D::createTranslation(mof::Vector3D(0 , 0.5f , 0))
+ ));
+ handlers.push_back( handler);
+
+
+ m_pImpl->list.at(0)->setWorldMatrix(
+ mof::makeCascadeHandler<mof::Matrix3D, mof::Multiply<mof::Matrix3D>>(handlers.front() , handlers.back()));
+
+ handlers.clear();
+ handlers.push_back( mof::makeConstantHandler(
+ mof::Matrix3D::createTranslation(mof::Vector3D(0 , 0.5f , 0.01f))
+ ));
+ handlers.push_back(mof::makeConstantHandler(
+ mof::Matrix3D::createRotation(mof::Vector3D(0 , mof::deg2rad(180) , 0))
+ ));
+ handlers.push_back(handler);
+
+ m_pImpl->list.at(1)->setWorldMatrix(
+ mof::makeCascadeHandler<mof::Matrix3D , mof::Multiply<mof::Matrix3D>>(handlers.front() , handlers.back())
+ );
+
+ handlers.clear();
+ handlers.push_back( mof::makeConstantHandler(
+ mof::Matrix3D::createTranslation(mof::Vector3D(0 , 0.5f , -0.01f))
+ ));
+ handlers.push_back( handler);
+
+
+ m_pImpl->list.at(2)->setWorldMatrix(
+ mof::makeCascadeHandler<mof::Matrix3D , mof::Multiply<mof::Matrix3D>>(handlers.front() , handlers.back())
+ );
+
+}
+
+
+mof::Matrix3D CharacterBoard::getWorldMatrix() const{
+ return m_pImpl->worldMatrix->value(m_pImpl->frame);
+}
+
+mof::Vector3D CharacterBoard::getPosition() const{
+ mof::Matrix3D m = getWorldMatrix();
+ return mof::Vector3D(m.at(3 , 0) , m.at(3 , 1) , m.at(3 , 2));
+}
+
+void ::CharacterBoard::append(std::list<mof::Board*>& list_){
+ list_.insert(list_.begin() , m_pImpl->list.begin(), m_pImpl->list.end());
+
+}
+
+void ::CharacterBoard::setFinishColor(mof::FrameNumber delay , mof::FrameNumber interval){
+ {
+ std::pair<mof::FrameNumber , mof::Color4f> keyFrames[] = {
+ std::pair<mof::FrameNumber , mof::Color4f>( delay , mof::Color4f(0.3f , 0.3f , 1) ) ,
+ std::pair<mof::FrameNumber , mof::Color4f>( delay + interval , mof::Color4f(1 , 1 , 1) )
+ };
+ m_pImpl->list.at(0)->setColor(
+ mof::Manipulator<mof::Color4f>::Handler(mof::makeKeyFrameAnimationHandler<mof::Color4f>(keyFrames[0] , keyFrames[1])));
+ }
+
+ {
+ std::pair<mof::FrameNumber , mof::Color4f> keyFrames[] = {
+ std::pair<mof::FrameNumber , mof::Color4f>( delay , mof::Color4f(1 , 1 , 1) ) ,
+ std::pair<mof::FrameNumber , mof::Color4f>( delay + interval , mof::Color4f(0.3f , 0.3f , 1) )
+ };
+ m_pImpl->list.at(2)->setColor(
+ mof::Manipulator<mof::Color4f>::Handler(mof::makeKeyFrameAnimationHandler<mof::Color4f>(keyFrames[0] , keyFrames[1])));
+ }
+
+}
+
+
+void ::CharacterBoard::setPartColor(mof::FrameNumber delay , mof::FrameNumber interval){
+ {
+ std::pair<mof::FrameNumber , mof::Color4f> keyFrames[] = {
+ std::pair<mof::FrameNumber , mof::Color4f>( delay , mof::Color4f(0 , 1 , 1 , 1) ) ,
+ std::pair<mof::FrameNumber , mof::Color4f>( delay + interval , mof::Color4f(0 , 1 , 1 , 1) )
+ };
+ m_pImpl->list.at(0)->setColor(
+ mof::Manipulator<mof::Color4f>::Handler( mof::makeKeyFrameAnimationHandler<mof::Color4f>(keyFrames[0] , keyFrames[1])));
+ }
+
+ {
+ std::pair<mof::FrameNumber , mof::Color4f> keyFrames[] = {
+ std::pair<mof::FrameNumber , mof::Color4f>( delay , mof::Color4f(0 , 1 , 1 , 1) ) ,
+ std::pair<mof::FrameNumber , mof::Color4f>( delay + interval , mof::Color4f(0 , 1 , 1 , 1) )
+ };
+ m_pImpl->list.at(1)->setColor(
+ mof::Manipulator<mof::Color4f>::Handler(mof::makeKeyFrameAnimationHandler<mof::Color4f>(keyFrames[0] , keyFrames[1])));
+ }
+
+ {
+ std::pair<mof::FrameNumber , mof::Color4f> keyFrames[] = {
+ std::pair<mof::FrameNumber , mof::Color4f>( delay , mof::Color4f(0.8f , 0.5f , 0.2f) ) ,
+ std::pair<mof::FrameNumber , mof::Color4f>( delay + interval , mof::Color4f(0.8f , 0.5f , 0.2f) )
+ };
+ m_pImpl->list.at(2)->setColor(
+ mof::Manipulator<mof::Color4f>::Handler(mof::makeKeyFrameAnimationHandler<mof::Color4f>(keyFrames[0] , keyFrames[1])));
+ }
+
+}
-#ifndef CHARACTER_BOARD_HPP\r
-#define CHARACTER_BOARD_HPP\r
-#include <boost/scoped_ptr.hpp>\r
-#include "mof/Component3D.hpp"\r
-#include <list>\r
-#include "mof/Board.hpp"\r
-\r
-class CharacterBoard \r
-{\r
- struct Impl;\r
- boost::scoped_ptr<Impl> m_pImpl;\r
-public:\r
- CharacterBoard( const mof::tstring& text);\r
- virtual ~CharacterBoard();\r
-\r
- virtual void setFrameNumber(mof::FrameNumber frame);\r
- //virtual void nextFrame();\r
- //virtual void prevFrame();\r
-\r
- virtual void update();\r
- \r
-\r
- void setWorldMatrix(const mof::Manipulator<mof::Matrix3D>::Handler& handler);\r
- mof::Matrix3D getWorldMatrix() const;\r
- mof::Vector3D getPosition() const;\r
- void append(std::list<mof::Board*>& list);\r
-\r
- void setFinishColor(mof::FrameNumber delay , mof::FrameNumber interval);\r
- void setPartColor(mof::FrameNumber delay , mof::FrameNumber interval);\r
-};\r
-\r
-\r
-#endif\r
+#ifndef CHARACTER_BOARD_HPP
+#define CHARACTER_BOARD_HPP
+#include <boost/scoped_ptr.hpp>
+#include "mof/Component3D.hpp"
+#include <list>
+#include "mof/Board.hpp"
+
+class CharacterBoard
+{
+ struct Impl;
+ boost::scoped_ptr<Impl> m_pImpl;
+public:
+ CharacterBoard( const mof::tstring& text);
+ virtual ~CharacterBoard();
+
+ virtual void setFrameNumber(mof::FrameNumber frame);
+ //virtual void nextFrame();
+ //virtual void prevFrame();
+
+ virtual void update();
+
+
+ void setWorldMatrix(const mof::Manipulator<mof::Matrix3D>::Handler& handler);
+ mof::Matrix3D getWorldMatrix() const;
+ mof::Vector3D getPosition() const;
+ void append(std::list<mof::Board*>& list);
+
+ void setFinishColor(mof::FrameNumber delay , mof::FrameNumber interval);
+ void setPartColor(mof::FrameNumber delay , mof::FrameNumber interval);
+};
+
+
+#endif
-\83}\83j\83t\83F\83X\83g \83\8a\83\\81[\83X\82Ì\8dÅ\8fI\8dX\90V\93ú\8e\9e: 8:51:21.62 (2010/03/14) \r
+\83}\83j\83t\83F\83X\83g \83\8a\83\\81[\83X\82Ì\8dÅ\8fI\8dX\90V\93ú\8e\9e: 8:51:21.62 (2010/03/14)
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\RPG\DEBUG\RPG.EXE\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\Debug\rpg.pdb\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\RPG\RPG\DEBUG\CHARACTERBOARD.OBJ\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.1184.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.1184.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.1636.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.1636.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.1676.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.1676.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.1768.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.1768.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.1912.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.1912.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.2120.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.2120.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.224.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.224.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.2460.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.2460.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.2472.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.2472.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.2500.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.2500.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.2644.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.2644.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.2724.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.2724.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.3860.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.3860.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.3896.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.3896.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.3952.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.3952.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4216.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4216.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4264.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4264.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4488.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4488.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4500.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4500.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4660.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4660.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4684.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4684.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4748.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4748.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4848.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4848.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4920.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4920.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4956.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4956.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4984.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4984.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5024.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5024.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5244.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5244.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5344.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5344.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5396.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5396.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5440.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5440.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5656.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5656.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5764.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5764.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5876.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5876.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5912.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5912.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5988.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5988.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6040.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6040.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6088.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6088.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6220.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6220.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6280.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6280.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6284.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6284.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6348.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6348.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6384.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6384.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6388.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6388.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6448.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6448.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6468.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6468.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6476.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6476.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6484.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6484.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6516.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6516.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6560.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6560.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6564.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6564.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6692.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6692.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6844.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6844.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6876.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6876.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6948.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6948.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6988.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6988.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6992.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6992.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6996.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6996.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7076.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7076.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7084.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7084.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7168.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7168.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7204.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7204.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7252.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7252.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7280.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7280.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7296.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7296.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7368.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7368.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7412.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7412.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7504.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7504.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7608.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7608.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7616.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7616.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7648.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7648.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7652.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7652.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7760.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7760.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7996.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7996.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.8008.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.8008.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.8020.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.8020.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.8148.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.8148.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.8176.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.8176.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\cl.command.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\cl.write.1.tlog\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\RPG\RPG\DEBUG\CREATEFRAME.OBJ\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\RPG\RPG\DEBUG\CREATEMENUVIEW.OBJ\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\RPG\RPG\DEBUG\DEMO1.OBJ\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\RPG\RPG\DEBUG\DEMO2.OBJ\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\RPG\RPG\DEBUG\DEMO3.OBJ\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\RPG\RPG\DEBUG\HIGHLIGHTBUTTONVIEW.OBJ\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\RPG\RPG\DEBUG\IMAGETILER.OBJ\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\RPG\RPG\DEBUG\IMAGETILEVIEW.OBJ\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\link.4484.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\link.4484.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\link.command.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\link.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\link.write.1.tlog\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\RPG\RPG\DEBUG\MAIN.OBJ\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\mt.command.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\mt.read.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\mt.write.1.tlog\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\RPG\RPG\DEBUG\MYENVIRONMENT.OBJ\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\RPG\RPG\DEBUG\RESOURCE.OBJ\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\rpg.exe.intermediate.manifest\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\rpg.write.1.tlog\r
-C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\Settings.obj\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\RPG\RPG\DEBUG\SQLITE_WRAPPER.OBJ\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\RPG\RPG\DEBUG\TESTSCENE.OBJ\r
-C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\RPG\RPG\DEBUG\VC100.PDB\r
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\RPG\DEBUG\RPG.EXE
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\Debug\rpg.pdb
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\RPG\RPG\DEBUG\CHARACTERBOARD.OBJ
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.1184.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.1184.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.1636.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.1636.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.1676.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.1676.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.1768.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.1768.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.1912.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.1912.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.2120.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.2120.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.224.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.224.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.2460.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.2460.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.2472.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.2472.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.2500.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.2500.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.2644.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.2644.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.2724.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.2724.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.3860.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.3860.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.3896.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.3896.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.3952.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.3952.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4216.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4216.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4264.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4264.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4488.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4488.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4500.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4500.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4660.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4660.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4684.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4684.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4748.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4748.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4848.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4848.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4920.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4920.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4956.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4956.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4984.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.4984.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5024.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5024.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5244.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5244.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5344.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5344.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5396.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5396.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5440.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5440.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5656.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5656.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5764.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5764.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5876.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5876.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5912.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5912.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5988.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.5988.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6040.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6040.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6088.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6088.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6220.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6220.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6280.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6280.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6284.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6284.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6348.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6348.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6384.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6384.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6388.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6388.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6448.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6448.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6468.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6468.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6476.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6476.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6484.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6484.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6516.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6516.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6560.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6560.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6564.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6564.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6692.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6692.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6844.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6844.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6876.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6876.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6948.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6948.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6988.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6988.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6992.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6992.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6996.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.6996.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7076.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7076.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7084.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7084.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7168.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7168.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7204.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7204.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7252.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7252.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7280.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7280.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7296.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7296.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7368.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7368.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7412.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7412.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7504.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7504.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7608.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7608.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7616.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7616.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7648.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7648.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7652.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7652.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7760.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7760.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7996.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.7996.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.8008.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.8008.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.8020.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.8020.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.8148.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.8148.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.8176.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.8176.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\cl.command.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\CL.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\cl.write.1.tlog
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\RPG\RPG\DEBUG\CREATEFRAME.OBJ
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\RPG\RPG\DEBUG\CREATEMENUVIEW.OBJ
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\RPG\RPG\DEBUG\DEMO1.OBJ
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\RPG\RPG\DEBUG\DEMO2.OBJ
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\RPG\RPG\DEBUG\DEMO3.OBJ
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\RPG\RPG\DEBUG\HIGHLIGHTBUTTONVIEW.OBJ
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\RPG\RPG\DEBUG\IMAGETILER.OBJ
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\RPG\RPG\DEBUG\IMAGETILEVIEW.OBJ
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\link.4484.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\link.4484.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\link.command.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\link.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\link.write.1.tlog
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\RPG\RPG\DEBUG\MAIN.OBJ
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\mt.command.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\mt.read.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\mt.write.1.tlog
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\RPG\RPG\DEBUG\MYENVIRONMENT.OBJ
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\RPG\RPG\DEBUG\RESOURCE.OBJ
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\rpg.exe.intermediate.manifest
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\rpg.write.1.tlog
+C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\Debug\Settings.obj
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\RPG\RPG\DEBUG\SQLITE_WRAPPER.OBJ
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\RPG\RPG\DEBUG\TESTSCENE.OBJ
+C:\DOCUMENTS AND SETTINGS\TOMOHIROYASUDA\MY DOCUMENTS\VISUAL STUDIO 2005\PROJECTS\RPG\RPG\DEBUG\VC100.PDB
-<?xml version='1.0' encoding='UTF-8' standalone='yes'?>\r
-<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>\r
- <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">\r
- <security>\r
- <requestedPrivileges>\r
- <requestedExecutionLevel level='asInvoker' uiAccess='false' />\r
- </requestedPrivileges>\r
- </security>\r
- </trustInfo>\r
-</assembly>\r
+<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
+<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
+ <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
+ <security>
+ <requestedPrivileges>
+ <requestedExecutionLevel level='asInvoker' uiAccess='false' />
+ </requestedPrivileges>
+ </security>
+ </trustInfo>
+</assembly>
-#v4.0:v100\r
-Debug|Win32|C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\|\r
+#v4.0:v100
+Debug|Win32|C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\|
-2010/10/14 5:29:56 にビルドを開始しました。\r
- 1>ノード 2 上のプロジェクト "C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\rpg.vcxproj" (build ターゲット)。\r
- 1>InitializeBuildStatus:\r
- "AlwaysCreate" が指定されたため "Debug\rpg.unsuccessfulbuild" を作成しています。\r
- ClCompile:\r
- C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\CL.exe /c /I"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg" /I"C:\Program Files\Lua\5.1\include" /I"C:\Program Files\boost\boost_1_40_0" /I"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib" /I"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\extlib" /I"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\extlib\expat\include" /Zi /nologo /W4 /WX- /MP /Od /Oy- /Gm- /EHsc /MTd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"Debug\\" /Fd"Debug\vc100.pdb" /Gd /TP /analyze- /errorReport:prompt Demo1.cpp\r
- Demo1.cpp\r
- 1>C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\mof/stream/Cascade.hpp : warning C4819: ファイルは、現在のコード ページ (932) で表示できない文字を含んでいます。データの損失を防ぐために、ファイルを Unicode 形式で保存してください。\r
- 1>C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\mof/stream/Cache.hpp : warning C4819: ファイルは、現在のコード ページ (932) で表示できない文字を含んでいます。データの損失を防ぐために、ファイルを Unicode 形式で保存してください。\r
- 1>C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\mof/Component2D.hpp : warning C4819: ファイルは、現在のコード ページ (932) で表示できない文字を含んでいます。データの損失を防ぐために、ファイルを Unicode 形式で保存してください。\r
- 1>C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\mof/FactoryMethod.hpp : warning C4819: ファイルは、現在のコード ページ (932) で表示できない文字を含んでいます。データの損失を防ぐために、ファイルを Unicode 形式で保存してください。\r
- 1>C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\mof/widget/VerticalClipping.hpp : warning C4819: ファイルは、現在のコード ページ (932) で表示できない文字を含んでいます。データの損失を防ぐために、ファイルを Unicode 形式で保存してください。\r
- 1>C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\mof/widget/VerticalClipping.hpp(31): warning C4512: 'mof::widget::VerticalClipping' : 代入演算子を生成できません。\r
- C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\mof/widget/VerticalClipping.hpp(12) : 'mof::widget::VerticalClipping' の宣言を確認してください。\r
- 1>C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\mof/widget/HorizontalClipping.hpp : warning C4819: ファイルは、現在のコード ページ (932) で表示できない文字を含んでいます。データの損失を防ぐために、ファイルを Unicode 形式で保存してください。\r
- 1>C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\mof/widget/HorizontalClipping.hpp(31): warning C4512: 'mof::widget::HorizontalClipping' : 代入演算子を生成できません。\r
- C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\mof/widget/HorizontalClipping.hpp(12) : 'mof::widget::HorizontalClipping' の宣言を確認してください。\r
- 1>c:\documents and settings\tomohiroyasuda\my documents\visual studio 2005\projects\rpg\rpg\resource.hpp : warning C4819: ファイルは、現在のコード ページ (932) で表示できない文字を含んでいます。データの損失を防ぐために、ファイルを Unicode 形式で保存してください。\r
- 1>C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\mof/script/Environment.hpp : warning C4819: ファイルは、現在のコード ページ (932) で表示できない文字を含んでいます。データの損失を防ぐために、ファイルを Unicode 形式で保存してください。\r
- Link:\r
- C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\link.exe /ERRORREPORT:PROMPT /OUT:"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\Debug\rpg.exe" /NOLOGO /LIBPATH:"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\debug" /LIBPATH:"C:\Program Files\Lua\5.1\lib" moflib.lib sqlite3.lib /MANIFEST /ManifestFile:"Debug\rpg.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\Debug\rpg.pdb" /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\Debug\rpg.lib" /MACHINE:X86 Debug\CharacterBoard.obj\r
- Debug\Demo1.obj\r
- Debug\Demo2.obj\r
- Debug\Demo3.obj\r
- Debug\main.obj\r
- Debug\resource.obj\r
- Debug\MyEnvironment.obj\r
- Debug\Settings.obj\r
- Debug\sqlite_wrapper.obj\r
- Debug\TestScene.obj\r
- Debug\createFrame.obj\r
- Debug\createMenuView.obj\r
- Debug\HighlightButtonView.obj\r
- Debug\ImageTiler.obj\r
- Debug\ImageTileView.obj\r
- "C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\Debug\moflib.lib"\r
- LINK : 前回のインクリメンタル リンクで C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\Debug\rpg.exe が見つからなかったか、ビルドされませんでした。フル リンクを行います。\r
- rpg.vcxproj -> C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\Debug\rpg.exe\r
- Manifest:\r
- C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\mt.exe /nologo /verbose /outputresource:"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\Debug\rpg.exe;#1" /manifest Debug\rpg.exe.intermediate.manifest\r
- FinalizeBuildStatus:\r
- ファイル "Debug\rpg.unsuccessfulbuild" を削除しています。\r
- "Debug\rpg.lastbuildstate" のタッチ タスクを実行しています。\r
- 1>プロジェクト "C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\rpg.vcxproj" (build ターゲット) のビルドが完了しました。\r
-\r
-ビルドに成功しました。\r
-\r
-経過時間 00:00:10.35\r
+2010/10/14 5:29:56 にビルドを開始しました。
+ 1>ノード 2 上のプロジェクト "C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\rpg.vcxproj" (build ターゲット)。
+ 1>InitializeBuildStatus:
+ "AlwaysCreate" が指定されたため "Debug\rpg.unsuccessfulbuild" を作成しています。
+ ClCompile:
+ C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\CL.exe /c /I"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg" /I"C:\Program Files\Lua\5.1\include" /I"C:\Program Files\boost\boost_1_40_0" /I"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib" /I"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\extlib" /I"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\extlib\expat\include" /Zi /nologo /W4 /WX- /MP /Od /Oy- /Gm- /EHsc /MTd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"Debug\\" /Fd"Debug\vc100.pdb" /Gd /TP /analyze- /errorReport:prompt Demo1.cpp
+ Demo1.cpp
+ 1>C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\mof/stream/Cascade.hpp : warning C4819: ファイルは、現在のコード ページ (932) で表示できない文字を含んでいます。データの損失を防ぐために、ファイルを Unicode 形式で保存してください。
+ 1>C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\mof/stream/Cache.hpp : warning C4819: ファイルは、現在のコード ページ (932) で表示できない文字を含んでいます。データの損失を防ぐために、ファイルを Unicode 形式で保存してください。
+ 1>C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\mof/Component2D.hpp : warning C4819: ファイルは、現在のコード ページ (932) で表示できない文字を含んでいます。データの損失を防ぐために、ファイルを Unicode 形式で保存してください。
+ 1>C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\mof/FactoryMethod.hpp : warning C4819: ファイルは、現在のコード ページ (932) で表示できない文字を含んでいます。データの損失を防ぐために、ファイルを Unicode 形式で保存してください。
+ 1>C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\mof/widget/VerticalClipping.hpp : warning C4819: ファイルは、現在のコード ページ (932) で表示できない文字を含んでいます。データの損失を防ぐために、ファイルを Unicode 形式で保存してください。
+ 1>C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\mof/widget/VerticalClipping.hpp(31): warning C4512: 'mof::widget::VerticalClipping' : 代入演算子を生成できません。
+ C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\mof/widget/VerticalClipping.hpp(12) : 'mof::widget::VerticalClipping' の宣言を確認してください。
+ 1>C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\mof/widget/HorizontalClipping.hpp : warning C4819: ファイルは、現在のコード ページ (932) で表示できない文字を含んでいます。データの損失を防ぐために、ファイルを Unicode 形式で保存してください。
+ 1>C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\mof/widget/HorizontalClipping.hpp(31): warning C4512: 'mof::widget::HorizontalClipping' : 代入演算子を生成できません。
+ C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\mof/widget/HorizontalClipping.hpp(12) : 'mof::widget::HorizontalClipping' の宣言を確認してください。
+ 1>c:\documents and settings\tomohiroyasuda\my documents\visual studio 2005\projects\rpg\rpg\resource.hpp : warning C4819: ファイルは、現在のコード ページ (932) で表示できない文字を含んでいます。データの損失を防ぐために、ファイルを Unicode 形式で保存してください。
+ 1>C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\moflib\moflib\mof/script/Environment.hpp : warning C4819: ファイルは、現在のコード ページ (932) で表示できない文字を含んでいます。データの損失を防ぐために、ファイルを Unicode 形式で保存してください。
+ Link:
+ C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\link.exe /ERRORREPORT:PROMPT /OUT:"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\Debug\rpg.exe" /NOLOGO /LIBPATH:"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\debug" /LIBPATH:"C:\Program Files\Lua\5.1\lib" moflib.lib sqlite3.lib /MANIFEST /ManifestFile:"Debug\rpg.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\Debug\rpg.pdb" /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\Debug\rpg.lib" /MACHINE:X86 Debug\CharacterBoard.obj
+ Debug\Demo1.obj
+ Debug\Demo2.obj
+ Debug\Demo3.obj
+ Debug\main.obj
+ Debug\resource.obj
+ Debug\MyEnvironment.obj
+ Debug\Settings.obj
+ Debug\sqlite_wrapper.obj
+ Debug\TestScene.obj
+ Debug\createFrame.obj
+ Debug\createMenuView.obj
+ Debug\HighlightButtonView.obj
+ Debug\ImageTiler.obj
+ Debug\ImageTileView.obj
+ "C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\Debug\moflib.lib"
+ LINK : 前回のインクリメンタル リンクで C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\Debug\rpg.exe が見つからなかったか、ビルドされませんでした。フル リンクを行います。
+ rpg.vcxproj -> C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\Debug\rpg.exe
+ Manifest:
+ C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\mt.exe /nologo /verbose /outputresource:"C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\Debug\rpg.exe;#1" /manifest Debug\rpg.exe.intermediate.manifest
+ FinalizeBuildStatus:
+ ファイル "Debug\rpg.unsuccessfulbuild" を削除しています。
+ "Debug\rpg.lastbuildstate" のタッチ タスクを実行しています。
+ 1>プロジェクト "C:\Documents and Settings\TomohiroYasuda\My Documents\Visual Studio 2005\Projects\rpg\rpg\rpg.vcxproj" (build ターゲット) のビルドが完了しました。
+
+ビルドに成功しました。
+
+経過時間 00:00:10.35
-#include "Demo1.hpp"\r
-#include "configure.hpp"\r
-#include "mof/Interpreter.hpp"\r
-#include "mof/EventScheduler.hpp"\r
-#include "mof/mofInput.hpp"\r
-#include "mof/mofGraphics.hpp"\r
-#include "mof/Application.hpp"\r
-#include "mof/utilities.hpp"\r
-#include "mof/widgets.hpp"\r
-#include <mof/Texture.hpp>\r
-#include "mof/Font.hpp"\r
-#include "mof/Sprite.hpp"\r
-#include "resource.hpp"\r
-#include <mof/streams.hpp>\r
-#include <mof/FactoryMethod.hpp>\r
-#include <boost/bind.hpp> \r
-#include <memory> \r
-#include <mof/streams.hpp> \r
-#include "widget/createMenuView.hpp"\r
-#include "widget/createFrame.hpp"\r
-#include <mof/ConsoleIO.hpp>\r
-#include <mof/FactoryMethod.hpp>\r
-#include <mof/script/LuaInterpreter.hpp>\r
-#include "script/MyEnvironment.hpp"\r
-\r
-using namespace mof::widget;\r
-using namespace boost;\r
-\r
-namespace\r
-{\r
- \r
- std::shared_ptr<mof::script::LuaInterpreter> interpreter_;\r
- std::shared_ptr<mof::script::Environment> environment_;\r
- std::shared_ptr<mof::InputReceiver> m_pInputReceiver;\r
- mof::EventScheduler m_scheduler;\r
- std::shared_ptr<mof::Sprite> m_pYukkuri;\r
- Frame* m_pView;\r
-}\r
- \r
-namespace Demo1\r
-{\r
-//{{{ initialize\r
- void initialize()\r
- {\r
- mof::Application::InputMode mode = mof::Application::input_mode();\r
- if (mode == mof::Application::INPUT_MODE_DEVICE) {\r
- m_pInputReceiver = std::shared_ptr<mof::InputReceiver>(mof::InputDevice::getInputReceiver());\r
- }\r
- else if (mode == mof::Application::INPUT_MODE_LOGGING) {\r
- m_pInputReceiver = std::make_shared<mof::LoggingInputReceiver>((TCHAR*)_T("inputLog.txt"));\r
- }\r
- else if (mode == mof::Application::INPUT_MODE_LOGGED) {\r
- m_pInputReceiver = std::make_shared<mof::LoggedInputReceiver>((TCHAR*)_T("inputLog.txt"));\r
- }\r
-\r
- environment_ = std::make_shared<script::MyEnvironment>(m_pInputReceiver);\r
- interpreter_ = std::make_shared<mof::script::LuaInterpreter>(_T("script/douga.lua"));\r
- interpreter_->bind(environment_);\r
- interpreter_->start("main");\r
- mof::GraphicsDevice::lightEnable(false);\r
- mof::GraphicsDevice::setAlphaBlendingMode(mof::GraphicsDevice::BLENDING_MODE_ALPHA);\r
-\r
- m_pYukkuri = \r
- std::make_shared<mof::Sprite>\r
- (\r
- std::make_shared<mof::Texture>(_T("image/yukkuri.png")), mof::Rectangle<mof::real>(0, 0, 1, 1)\r
- );\r
- {\r
- mof::Vector2DStream stream;\r
- stream << mof::Vector2D(420, 120);\r
- m_pYukkuri->setPositionStream(stream);\r
- }\r
-\r
- /*\r
- {\r
- using namespace mof;\r
- mof::Vector2D size = m_pYukkuri->getPreferredSize();\r
- KeyFrameAnimation<Vector2D>::KeyFrame keyframes1[] = {\r
- makeKeyFrame(0, mof::Vector2D(420, 120)),\r
- makeKeyFrame(10, mof::Vector2D(420, 100)),\r
- makeKeyFrame(20, mof::Vector2D(420, 70)),\r
- makeKeyFrame(30, mof::Vector2D(420, 60)),\r
- makeKeyFrame(40, mof::Vector2D(420, 70)),\r
- makeKeyFrame(50, mof::Vector2D(420, 120)),\r
- makeKeyFrame(60, mof::Vector2D(420, 130)),\r
- makeKeyFrame(90, mof::Vector2D(420, 130)),\r
- makeKeyFrame(100, mof::Vector2D(420, 120)),\r
- makeKeyFrame(110, mof::Vector2D(420, 70)),\r
- makeKeyFrame(120, mof::Vector2D(420, 60)),\r
- makeKeyFrame(130, mof::Vector2D(420, 70)),\r
- makeKeyFrame(140, mof::Vector2D(420, 100)),\r
- makeKeyFrame(150, mof::Vector2D(420, 120)),\r
- };\r
- KeyFrameAnimation<Vector2D>::KeyFrame keyframes2[] = {\r
- makeKeyFrame(0, mof::Vector2D(200, 0)),\r
- makeKeyFrame(60, mof::Vector2D(100, 0)),\r
- makeKeyFrame(90, mof::Vector2D(100, 0)),\r
- makeKeyFrame(150, mof::Vector2D(0, 0)),\r
- };\r
- KeyFrameAnimation<Vector2D>::KeyFrame keyframes3[] = {\r
- makeKeyFrame(50, mof::Vector2D(0, 0)),\r
- makeKeyFrame(75, mof::Vector2D(0, -60)),\r
- makeKeyFrame(100, mof::Vector2D(0, 0)),\r
- makeKeyFrame(150, mof::Vector2D(0, 0)),\r
- makeKeyFrame(165, mof::Vector2D(0, -60)),\r
- makeKeyFrame(180, mof::Vector2D(0, 0)),\r
- };\r
- KeyFrameAnimation<Vector2D>::KeyFrame keyframes4[] = {\r
- makeKeyFrame(50, mof::Vector2D(0, 0)),\r
- makeKeyFrame(75, mof::Vector2D(0, 60)),\r
- makeKeyFrame(100, mof::Vector2D(0, 0)),\r
- makeKeyFrame(150, mof::Vector2D(0, 0)),\r
- makeKeyFrame(165, mof::Vector2D(0, 60)),\r
- makeKeyFrame(180, mof::Vector2D(0, 0)),\r
- };\r
-\r
- Vector2DStream stream;\r
- stream << makeKeyFrameAnimationHandler<Vector2D>(keyframes1[0], lastOf(keyframes1));\r
- stream << makeKeyFrameAnimationHandler<Vector2D>(keyframes2[0], lastOf(keyframes2));\r
- stream << makeKeyFrameAnimationHandler<Vector2D>(keyframes4[0], lastOf(keyframes4));\r
- m_pYukkuri->setPositionStream(stream);\r
- \r
- Vector2DStream stream2;\r
- stream2 << makeConstantHandler(size);\r
- stream2 << makeKeyFrameAnimationHandler<Vector2D>(keyframes3[0], lastOf(keyframes3));\r
- m_pYukkuri->setSizeStream(stream2);\r
- }\r
- */\r
-\r
-\r
- }\r
-//}}}\r
-//{{{ finalize\r
- void finalize( )\r
- {\r
- mof::safe_delete( m_pView );\r
- }\r
-//}}} \r
- \r
-\r
- void update()\r
- {\r
- m_scheduler.update();\r
- m_pInputReceiver->update();\r
- m_pYukkuri->update();\r
- //m_pView->update( );\r
- environment_->update();\r
- if(!environment_->isWaiting())interpreter_->update();\r
- \r
- }\r
-\r
- void draw()\r
- {\r
- mof::Rectangle<int> cr = mof::GraphicsDevice::getClientRegion();\r
- mof::VertexXYZRHWC vertices[] = \r
- {\r
- mof::VertexXYZRHWC(mof::Vector2D(0 , 0) , mof::createColor(0 , 0 , 0)) ,\r
- mof::VertexXYZRHWC(mof::Vector2D(cr.getWidth() , 0) , mof::createColor(0 , 0 , 0)) ,\r
- mof::VertexXYZRHWC(mof::Vector2D(0 , cr.getHeight()) , mof::createColor(127 , 127 , 127)) ,\r
- mof::VertexXYZRHWC(mof::Vector2D(cr.getWidth() , cr.getHeight()) , mof::createColor(127 , 127 , 127))\r
-\r
- };\r
- mof::GraphicsDevice::setTexture(NULL);\r
- mof::GraphicsDevice::drawVertexArray(vertices[0] , vertices[3] , mof::PRIMITIVE_TYPE_TRIANGLESTRIP );\r
- \r
- environment_->draw();\r
- m_pYukkuri->draw();\r
- }\r
-\r
-} // namespace Demo1\r
-\r
-\r
+#include "Demo1.hpp"
+#include "configure.hpp"
+#include "mof/Interpreter.hpp"
+#include "mof/EventScheduler.hpp"
+#include "mof/mofInput.hpp"
+#include "mof/mofGraphics.hpp"
+#include "mof/Application.hpp"
+#include "mof/utilities.hpp"
+#include "mof/widgets.hpp"
+#include <mof/Texture.hpp>
+#include "mof/Font.hpp"
+#include "mof/Sprite.hpp"
+#include "resource.hpp"
+#include <mof/streams.hpp>
+#include <mof/FactoryMethod.hpp>
+#include <boost/bind.hpp>
+#include <memory>
+#include <mof/streams.hpp>
+#include "widget/createMenuView.hpp"
+#include "widget/createFrame.hpp"
+#include <mof/ConsoleIO.hpp>
+#include <mof/FactoryMethod.hpp>
+#include <mof/script/LuaInterpreter.hpp>
+#include "script/MyEnvironment.hpp"
+
+using namespace mof::widget;
+using namespace boost;
+
+namespace
+{
+
+ std::shared_ptr<mof::script::LuaInterpreter> interpreter_;
+ std::shared_ptr<mof::script::Environment> environment_;
+ std::shared_ptr<mof::InputReceiver> m_pInputReceiver;
+ mof::EventScheduler m_scheduler;
+ std::shared_ptr<mof::Sprite> m_pYukkuri;
+ Frame* m_pView;
+}
+
+namespace Demo1
+{
+//{{{ initialize
+ void initialize()
+ {
+ mof::Application::InputMode mode = mof::Application::input_mode();
+ if (mode == mof::Application::INPUT_MODE_DEVICE) {
+ m_pInputReceiver = std::shared_ptr<mof::InputReceiver>(mof::InputDevice::getInputReceiver());
+ }
+ else if (mode == mof::Application::INPUT_MODE_LOGGING) {
+ m_pInputReceiver = std::make_shared<mof::LoggingInputReceiver>((TCHAR*)_T("inputLog.txt"));
+ }
+ else if (mode == mof::Application::INPUT_MODE_LOGGED) {
+ m_pInputReceiver = std::make_shared<mof::LoggedInputReceiver>((TCHAR*)_T("inputLog.txt"));
+ }
+
+ environment_ = std::make_shared<script::MyEnvironment>(m_pInputReceiver);
+ interpreter_ = std::make_shared<mof::script::LuaInterpreter>(_T("script/douga.lua"));
+ interpreter_->bind(environment_);
+ interpreter_->start("main");
+ mof::GraphicsDevice::lightEnable(false);
+ mof::GraphicsDevice::setAlphaBlendingMode(mof::GraphicsDevice::BLENDING_MODE_ALPHA);
+
+ m_pYukkuri =
+ std::make_shared<mof::Sprite>
+ (
+ std::make_shared<mof::Texture>(_T("image/yukkuri.png")), mof::Rectangle<mof::real>(0, 0, 1, 1)
+ );
+ {
+ mof::Vector2DStream stream;
+ stream << mof::Vector2D(420, 120);
+ m_pYukkuri->setPositionStream(stream);
+ }
+
+ /*
+ {
+ using namespace mof;
+ mof::Vector2D size = m_pYukkuri->getPreferredSize();
+ KeyFrameAnimation<Vector2D>::KeyFrame keyframes1[] = {
+ makeKeyFrame(0, mof::Vector2D(420, 120)),
+ makeKeyFrame(10, mof::Vector2D(420, 100)),
+ makeKeyFrame(20, mof::Vector2D(420, 70)),
+ makeKeyFrame(30, mof::Vector2D(420, 60)),
+ makeKeyFrame(40, mof::Vector2D(420, 70)),
+ makeKeyFrame(50, mof::Vector2D(420, 120)),
+ makeKeyFrame(60, mof::Vector2D(420, 130)),
+ makeKeyFrame(90, mof::Vector2D(420, 130)),
+ makeKeyFrame(100, mof::Vector2D(420, 120)),
+ makeKeyFrame(110, mof::Vector2D(420, 70)),
+ makeKeyFrame(120, mof::Vector2D(420, 60)),
+ makeKeyFrame(130, mof::Vector2D(420, 70)),
+ makeKeyFrame(140, mof::Vector2D(420, 100)),
+ makeKeyFrame(150, mof::Vector2D(420, 120)),
+ };
+ KeyFrameAnimation<Vector2D>::KeyFrame keyframes2[] = {
+ makeKeyFrame(0, mof::Vector2D(200, 0)),
+ makeKeyFrame(60, mof::Vector2D(100, 0)),
+ makeKeyFrame(90, mof::Vector2D(100, 0)),
+ makeKeyFrame(150, mof::Vector2D(0, 0)),
+ };
+ KeyFrameAnimation<Vector2D>::KeyFrame keyframes3[] = {
+ makeKeyFrame(50, mof::Vector2D(0, 0)),
+ makeKeyFrame(75, mof::Vector2D(0, -60)),
+ makeKeyFrame(100, mof::Vector2D(0, 0)),
+ makeKeyFrame(150, mof::Vector2D(0, 0)),
+ makeKeyFrame(165, mof::Vector2D(0, -60)),
+ makeKeyFrame(180, mof::Vector2D(0, 0)),
+ };
+ KeyFrameAnimation<Vector2D>::KeyFrame keyframes4[] = {
+ makeKeyFrame(50, mof::Vector2D(0, 0)),
+ makeKeyFrame(75, mof::Vector2D(0, 60)),
+ makeKeyFrame(100, mof::Vector2D(0, 0)),
+ makeKeyFrame(150, mof::Vector2D(0, 0)),
+ makeKeyFrame(165, mof::Vector2D(0, 60)),
+ makeKeyFrame(180, mof::Vector2D(0, 0)),
+ };
+
+ Vector2DStream stream;
+ stream << makeKeyFrameAnimationHandler<Vector2D>(keyframes1[0], lastOf(keyframes1));
+ stream << makeKeyFrameAnimationHandler<Vector2D>(keyframes2[0], lastOf(keyframes2));
+ stream << makeKeyFrameAnimationHandler<Vector2D>(keyframes4[0], lastOf(keyframes4));
+ m_pYukkuri->setPositionStream(stream);
+
+ Vector2DStream stream2;
+ stream2 << makeConstantHandler(size);
+ stream2 << makeKeyFrameAnimationHandler<Vector2D>(keyframes3[0], lastOf(keyframes3));
+ m_pYukkuri->setSizeStream(stream2);
+ }
+ */
+
+
+ }
+//}}}
+//{{{ finalize
+ void finalize( )
+ {
+ mof::safe_delete( m_pView );
+ }
+//}}}
+
+
+ void update()
+ {
+ m_scheduler.update();
+ m_pInputReceiver->update();
+ m_pYukkuri->update();
+ //m_pView->update( );
+ environment_->update();
+ if(!environment_->isWaiting())interpreter_->update();
+
+ }
+
+ void draw()
+ {
+ mof::Rectangle<int> cr = mof::GraphicsDevice::getClientRegion();
+ mof::VertexXYZRHWC vertices[] =
+ {
+ mof::VertexXYZRHWC(mof::Vector2D(0 , 0) , mof::createColor(0 , 0 , 0)) ,
+ mof::VertexXYZRHWC(mof::Vector2D(cr.getWidth() , 0) , mof::createColor(0 , 0 , 0)) ,
+ mof::VertexXYZRHWC(mof::Vector2D(0 , cr.getHeight()) , mof::createColor(127 , 127 , 127)) ,
+ mof::VertexXYZRHWC(mof::Vector2D(cr.getWidth() , cr.getHeight()) , mof::createColor(127 , 127 , 127))
+
+ };
+ mof::GraphicsDevice::setTexture(NULL);
+ mof::GraphicsDevice::drawVertexArray(vertices[0] , vertices[3] , mof::PRIMITIVE_TYPE_TRIANGLESTRIP );
+
+ environment_->draw();
+ m_pYukkuri->draw();
+ }
+
+} // namespace Demo1
+
+
-#pragma once\r
-\r
-namespace Demo1\r
-{\r
- void initialize( );\r
- void finalize( );\r
- void update( );\r
- void draw( );\r
-}\r
+#pragma once
+
+namespace Demo1
+{
+ void initialize( );
+ void finalize( );
+ void update( );
+ void draw( );
+}
-#include "Demo2.hpp"\r
-#include "configure.hpp"\r
-#include "mof/EventScheduler.hpp"\r
-#include "mof/mofInput.hpp"\r
-#include "mof/mofGraphics.hpp"\r
-#include "mof/Application.hpp"\r
-#include "mof/utilities.hpp"\r
-#include "mof/widgets.hpp"\r
-#include "resource.hpp"\r
-#include <mof/streams.hpp>\r
-#include <mof/FactoryMethod.hpp>\r
-#include <boost/bind.hpp> \r
-#include <memory> \r
-#include <mof/ConsoleIO.hpp>\r
-#include <mof/script/LuaInterpreter.hpp>\r
-#include "script/MyEnvironment.hpp"\r
-\r
-#include "CharacterBoard.hpp"\r
-\r
-using namespace mof::widget;\r
-using namespace boost;\r
-\r
-namespace\r
-{\r
- \r
- std::shared_ptr<mof::script::LuaInterpreter> interpreter_;\r
- std::shared_ptr<mof::script::Environment> environment_;\r
- std::shared_ptr<mof::InputReceiver> m_pInputReceiver;\r
- mof::Graphics3D::ptr field_;\r
- mof::EventScheduler m_scheduler;\r
- mof::Camera::ptr camera_;\r
- mof::Light::ptr light_;\r
-}\r
- \r
-namespace Demo2\r
-{\r
-//{{{ initialize\r
- void initialize()\r
- {\r
- mof::Application::InputMode mode = mof::Application::input_mode();\r
- if (mode == mof::Application::INPUT_MODE_DEVICE) {\r
- m_pInputReceiver = std::shared_ptr<mof::InputReceiver>(mof::InputDevice::getInputReceiver());\r
- }\r
- else if (mode == mof::Application::INPUT_MODE_LOGGING) {\r
- m_pInputReceiver = std::make_shared<mof::LoggingInputReceiver>((TCHAR*)_T("inputLog.txt"));\r
- }\r
- else if (mode == mof::Application::INPUT_MODE_LOGGED) {\r
- m_pInputReceiver = std::make_shared<mof::LoggedInputReceiver>((TCHAR*)_T("inputLog.txt"));\r
- }\r
-\r
- environment_ = std::make_shared<script::MyEnvironment>(m_pInputReceiver);\r
- interpreter_ = std::make_shared<mof::script::LuaInterpreter>(_T("script/effect_test.lua"));\r
- interpreter_->start("main");\r
- interpreter_->bind(environment_);\r
- mof::GraphicsDevice::lightEnable(false);\r
- mof::GraphicsDevice::setAlphaBlendingMode(mof::GraphicsDevice::BLENDING_MODE_ALPHA);\r
- \r
- field_ = std::shared_ptr<mof::Graphics3D>(mof::MeshBuilder("model/floor.x").construct());\r
-\r
- // 3D\83V\81[\83\93\82Ì\90Ý\92è\r
- //mof::GraphicsDevice::lightEnable(true);\r
- camera_ = std::make_shared<mof::Camera>(mof::Vector3D(0, 1, -2), mof::Vector3D(0, 0, 0), mof::Vector3D(0, 1, 0));\r
- //light_ = std::make_shared<mof::AmbientLight>(mof::Color4f(mof::createColor(255 , 255 , 255)));\r
-\r
- }\r
-//}}}\r
-//{{{ finalize\r
- void finalize( )\r
- {\r
- }\r
-//}}} \r
- \r
-\r
- void update()\r
- {\r
- m_scheduler.update();\r
- m_pInputReceiver->update();\r
-\r
- if(!environment_->isWaiting()) interpreter_->update();\r
- environment_->update();\r
- field_->update();\r
- camera_->update();\r
- }\r
-\r
- void draw()\r
- {\r
- mof::Rectangle<int> cr = mof::GraphicsDevice::getClientRegion();\r
- mof::VertexXYZRHWC vertices[] = \r
- {\r
- mof::VertexXYZRHWC(mof::Vector2D(0 , 0) , mof::createColor(127 , 127 , 127)) ,\r
- mof::VertexXYZRHWC(mof::Vector2D(cr.getWidth() , 0) , mof::createColor(127 , 127 , 127)) ,\r
- mof::VertexXYZRHWC(mof::Vector2D(0 , cr.getHeight()) , mof::createColor(255 , 255 , 255)) ,\r
- mof::VertexXYZRHWC(mof::Vector2D(cr.getWidth() , cr.getHeight()) , mof::createColor(255 , 255 , 255))\r
- };\r
- mof::GraphicsDevice::setViewTransform(camera_->getViewMatrix());\r
- mof::GraphicsDevice::setTexture(NULL);\r
- mof::GraphicsDevice::drawVertexArray(vertices[0] , vertices[3] , mof::PRIMITIVE_TYPE_TRIANGLESTRIP );\r
- mof::GraphicsDevice::clearZBuffer();\r
- field_->draw();\r
- environment_->draw();\r
- }\r
-\r
-} // namespace Demo2\r
-\r
-\r
+#include "Demo2.hpp"
+#include "configure.hpp"
+#include "mof/EventScheduler.hpp"
+#include "mof/mofInput.hpp"
+#include "mof/mofGraphics.hpp"
+#include "mof/Application.hpp"
+#include "mof/utilities.hpp"
+#include "mof/widgets.hpp"
+#include "resource.hpp"
+#include <mof/streams.hpp>
+#include <mof/FactoryMethod.hpp>
+#include <boost/bind.hpp>
+#include <memory>
+#include <mof/ConsoleIO.hpp>
+#include <mof/script/LuaInterpreter.hpp>
+#include "script/MyEnvironment.hpp"
+
+#include "CharacterBoard.hpp"
+
+using namespace mof::widget;
+using namespace boost;
+
+namespace
+{
+
+ std::shared_ptr<mof::script::LuaInterpreter> interpreter_;
+ std::shared_ptr<mof::script::Environment> environment_;
+ std::shared_ptr<mof::InputReceiver> m_pInputReceiver;
+ mof::Graphics3D::ptr field_;
+ mof::EventScheduler m_scheduler;
+ mof::Camera::ptr camera_;
+ mof::Light::ptr light_;
+}
+
+namespace Demo2
+{
+//{{{ initialize
+ void initialize()
+ {
+ mof::Application::InputMode mode = mof::Application::input_mode();
+ if (mode == mof::Application::INPUT_MODE_DEVICE) {
+ m_pInputReceiver = std::shared_ptr<mof::InputReceiver>(mof::InputDevice::getInputReceiver());
+ }
+ else if (mode == mof::Application::INPUT_MODE_LOGGING) {
+ m_pInputReceiver = std::make_shared<mof::LoggingInputReceiver>((TCHAR*)_T("inputLog.txt"));
+ }
+ else if (mode == mof::Application::INPUT_MODE_LOGGED) {
+ m_pInputReceiver = std::make_shared<mof::LoggedInputReceiver>((TCHAR*)_T("inputLog.txt"));
+ }
+
+ environment_ = std::make_shared<script::MyEnvironment>(m_pInputReceiver);
+ interpreter_ = std::make_shared<mof::script::LuaInterpreter>(_T("script/effect_test.lua"));
+ interpreter_->start("main");
+ interpreter_->bind(environment_);
+ mof::GraphicsDevice::lightEnable(false);
+ mof::GraphicsDevice::setAlphaBlendingMode(mof::GraphicsDevice::BLENDING_MODE_ALPHA);
+
+ field_ = std::shared_ptr<mof::Graphics3D>(mof::MeshBuilder("model/floor.x").construct());
+
+ // 3D\83V\81[\83\93\82Ì\90Ý\92è
+ //mof::GraphicsDevice::lightEnable(true);
+ camera_ = std::make_shared<mof::Camera>(mof::Vector3D(0, 1, -2), mof::Vector3D(0, 0, 0), mof::Vector3D(0, 1, 0));
+ //light_ = std::make_shared<mof::AmbientLight>(mof::Color4f(mof::createColor(255 , 255 , 255)));
+
+ }
+//}}}
+//{{{ finalize
+ void finalize( )
+ {
+ }
+//}}}
+
+
+ void update()
+ {
+ m_scheduler.update();
+ m_pInputReceiver->update();
+
+ if(!environment_->isWaiting()) interpreter_->update();
+ environment_->update();
+ field_->update();
+ camera_->update();
+ }
+
+ void draw()
+ {
+ mof::Rectangle<int> cr = mof::GraphicsDevice::getClientRegion();
+ mof::VertexXYZRHWC vertices[] =
+ {
+ mof::VertexXYZRHWC(mof::Vector2D(0 , 0) , mof::createColor(127 , 127 , 127)) ,
+ mof::VertexXYZRHWC(mof::Vector2D(cr.getWidth() , 0) , mof::createColor(127 , 127 , 127)) ,
+ mof::VertexXYZRHWC(mof::Vector2D(0 , cr.getHeight()) , mof::createColor(255 , 255 , 255)) ,
+ mof::VertexXYZRHWC(mof::Vector2D(cr.getWidth() , cr.getHeight()) , mof::createColor(255 , 255 , 255))
+ };
+ mof::GraphicsDevice::setViewTransform(camera_->getViewMatrix());
+ mof::GraphicsDevice::setTexture(NULL);
+ mof::GraphicsDevice::drawVertexArray(vertices[0] , vertices[3] , mof::PRIMITIVE_TYPE_TRIANGLESTRIP );
+ mof::GraphicsDevice::clearZBuffer();
+ field_->draw();
+ environment_->draw();
+ }
+
+} // namespace Demo2
+
+
-#pragma once\r
-\r
-namespace Demo2\r
-{\r
- void initialize( );\r
- void finalize( );\r
- void update( );\r
- void draw( );\r
-}\r
+#pragma once
+
+namespace Demo2
+{
+ void initialize( );
+ void finalize( );
+ void update( );
+ void draw( );
+}
-#include "Demo3.hpp"\r
-#include "configure.hpp"\r
-#include "mof/Interpreter.hpp"\r
-#include "mof/EventScheduler.hpp"\r
-#include "mof/mofInput.hpp"\r
-#include "mof/mofGraphics.hpp"\r
-#include "mof/Application.hpp"\r
-#include "mof/utilities.hpp"\r
-#include "mof/widgets.hpp"\r
-#include <mof/Texture.hpp>\r
-#include "mof/Font.hpp"\r
-#include "resource.hpp"\r
-#include <mof/streams.hpp>\r
-#include <mof/FactoryMethod.hpp>\r
-#include <boost/bind.hpp> \r
-#include <memory> \r
-#include "widget/createMenuView.hpp"\r
-#include "widget/createFrame.hpp"\r
-#include <mof/ConsoleIO.hpp>\r
-#include <mof/FactoryMethod.hpp>\r
-#include <mof/script/LuaInterpreter.hpp>\r
-#include "script/MyEnvironment.hpp"\r
-\r
-#include "mof/sound/SoundDevice.hpp"\r
-\r
-using namespace mof::widget;\r
-using namespace boost;\r
-\r
-namespace\r
-{\r
- \r
- std::shared_ptr<mof::script::LuaInterpreter> interpreter_;\r
- std::shared_ptr<mof::script::Environment> environment_;\r
- std::shared_ptr<mof::InputReceiver> m_pInputReceiver;\r
- mof::EventScheduler m_scheduler;\r
- mof::Camera::ptr camera_;\r
-}\r
- \r
-namespace Demo3\r
-{\r
-//{{{ initialize\r
- void initialize()\r
- {\r
- mof::Application::InputMode mode = mof::Application::input_mode();\r
- if (mode == mof::Application::INPUT_MODE_DEVICE) {\r
- m_pInputReceiver = std::shared_ptr<mof::InputReceiver>(mof::InputDevice::getInputReceiver());\r
- }\r
- else if (mode == mof::Application::INPUT_MODE_LOGGING) {\r
- m_pInputReceiver = std::make_shared<mof::LoggingInputReceiver>((TCHAR*)_T("inputLog.txt"));\r
- }\r
- else if (mode == mof::Application::INPUT_MODE_LOGGED) {\r
- m_pInputReceiver = std::make_shared<mof::LoggedInputReceiver>((TCHAR*)_T("inputLog.txt"));\r
- }\r
-\r
- environment_ = std::make_shared<script::MyEnvironment>(m_pInputReceiver);\r
- interpreter_ = std::make_shared<mof::script::LuaInterpreter>(_T("script/menu.lua"));\r
- interpreter_->start("main");\r
- interpreter_->start("bubble");\r
- interpreter_->bind(environment_);\r
- mof::GraphicsDevice::lightEnable(false);\r
- mof::GraphicsDevice::setAlphaBlendingMode(mof::GraphicsDevice::BLENDING_MODE_ALPHA);\r
- \r
- // 3Dシーンの設定\r
- camera_ = std::make_shared<mof::Camera>(mof::Vector3D(0, 1, -2), mof::Vector3D(0, 0, 0), mof::Vector3D(0, 1, 0));\r
- }\r
-//}}}\r
-//{{{ finalize\r
- void finalize( )\r
- {\r
- }\r
-//}}} \r
-//{{{ update\r
- void update()\r
- {\r
- m_scheduler.update();\r
- m_pInputReceiver->update();\r
-\r
- if(!environment_->isWaiting()) interpreter_->update();\r
- environment_->update();\r
- camera_->update();\r
- }\r
-//}}}\r
-//{{{ draw\r
- void draw()\r
- {\r
- mof::Rectangle<int> cr = mof::GraphicsDevice::getClientRegion();\r
- mof::VertexXYZRHWC vertices[] = \r
- {\r
- mof::VertexXYZRHWC(mof::Vector2D(0 , 0) , mof::createColor(100 , 100 , 255)) ,\r
- mof::VertexXYZRHWC(mof::Vector2D(cr.getWidth() , 0) , mof::createColor(100 , 100 , 255)) ,\r
- mof::VertexXYZRHWC(mof::Vector2D(0 , cr.getHeight()) , mof::createColor(0 , 0 , 127)) ,\r
- mof::VertexXYZRHWC(mof::Vector2D(cr.getWidth() , cr.getHeight()) , mof::createColor(0 , 0 , 127))\r
- };\r
- mof::GraphicsDevice::setViewTransform(camera_->getViewMatrix());\r
- mof::GraphicsDevice::setTexture(NULL);\r
- mof::GraphicsDevice::drawVertexArray(vertices[0] , vertices[3] , mof::PRIMITIVE_TYPE_TRIANGLESTRIP );\r
- mof::GraphicsDevice::clearZBuffer();\r
- \r
- environment_->draw();\r
- }\r
-//}}}\r
-} // namespace Demo2\r
-\r
-\r
+#include "Demo3.hpp"
+#include "configure.hpp"
+#include "mof/Interpreter.hpp"
+#include "mof/EventScheduler.hpp"
+#include "mof/mofInput.hpp"
+#include "mof/mofGraphics.hpp"
+#include "mof/Application.hpp"
+#include "mof/utilities.hpp"
+#include "mof/widgets.hpp"
+#include <mof/Texture.hpp>
+#include "mof/Font.hpp"
+#include "resource.hpp"
+#include <mof/streams.hpp>
+#include <mof/FactoryMethod.hpp>
+#include <boost/bind.hpp>
+#include <memory>
+#include "widget/createMenuView.hpp"
+#include "widget/createFrame.hpp"
+#include <mof/ConsoleIO.hpp>
+#include <mof/FactoryMethod.hpp>
+#include <mof/script/LuaInterpreter.hpp>
+#include "script/MyEnvironment.hpp"
+
+#include "mof/sound/SoundDevice.hpp"
+
+using namespace mof::widget;
+using namespace boost;
+
+namespace
+{
+
+ std::shared_ptr<mof::script::LuaInterpreter> interpreter_;
+ std::shared_ptr<mof::script::Environment> environment_;
+ std::shared_ptr<mof::InputReceiver> m_pInputReceiver;
+ mof::EventScheduler m_scheduler;
+ mof::Camera::ptr camera_;
+}
+
+namespace Demo3
+{
+//{{{ initialize
+ void initialize()
+ {
+ mof::Application::InputMode mode = mof::Application::input_mode();
+ if (mode == mof::Application::INPUT_MODE_DEVICE) {
+ m_pInputReceiver = std::shared_ptr<mof::InputReceiver>(mof::InputDevice::getInputReceiver());
+ }
+ else if (mode == mof::Application::INPUT_MODE_LOGGING) {
+ m_pInputReceiver = std::make_shared<mof::LoggingInputReceiver>((TCHAR*)_T("inputLog.txt"));
+ }
+ else if (mode == mof::Application::INPUT_MODE_LOGGED) {
+ m_pInputReceiver = std::make_shared<mof::LoggedInputReceiver>((TCHAR*)_T("inputLog.txt"));
+ }
+
+ environment_ = std::make_shared<script::MyEnvironment>(m_pInputReceiver);
+ interpreter_ = std::make_shared<mof::script::LuaInterpreter>(_T("script/menu.lua"));
+ interpreter_->start("main");
+ interpreter_->start("bubble");
+ interpreter_->bind(environment_);
+ mof::GraphicsDevice::lightEnable(false);
+ mof::GraphicsDevice::setAlphaBlendingMode(mof::GraphicsDevice::BLENDING_MODE_ALPHA);
+
+ // 3Dシーンの設定
+ camera_ = std::make_shared<mof::Camera>(mof::Vector3D(0, 1, -2), mof::Vector3D(0, 0, 0), mof::Vector3D(0, 1, 0));
+ }
+//}}}
+//{{{ finalize
+ void finalize( )
+ {
+ }
+//}}}
+//{{{ update
+ void update()
+ {
+ m_scheduler.update();
+ m_pInputReceiver->update();
+
+ if(!environment_->isWaiting()) interpreter_->update();
+ environment_->update();
+ camera_->update();
+ }
+//}}}
+//{{{ draw
+ void draw()
+ {
+ mof::Rectangle<int> cr = mof::GraphicsDevice::getClientRegion();
+ mof::VertexXYZRHWC vertices[] =
+ {
+ mof::VertexXYZRHWC(mof::Vector2D(0 , 0) , mof::createColor(100 , 100 , 255)) ,
+ mof::VertexXYZRHWC(mof::Vector2D(cr.getWidth() , 0) , mof::createColor(100 , 100 , 255)) ,
+ mof::VertexXYZRHWC(mof::Vector2D(0 , cr.getHeight()) , mof::createColor(0 , 0 , 127)) ,
+ mof::VertexXYZRHWC(mof::Vector2D(cr.getWidth() , cr.getHeight()) , mof::createColor(0 , 0 , 127))
+ };
+ mof::GraphicsDevice::setViewTransform(camera_->getViewMatrix());
+ mof::GraphicsDevice::setTexture(NULL);
+ mof::GraphicsDevice::drawVertexArray(vertices[0] , vertices[3] , mof::PRIMITIVE_TYPE_TRIANGLESTRIP );
+ mof::GraphicsDevice::clearZBuffer();
+
+ environment_->draw();
+ }
+//}}}
+} // namespace Demo2
+
+
-#pragma once\r
-\r
-namespace Demo3\r
-{\r
- void initialize( );\r
- void finalize( );\r
- void update( );\r
- void draw( );\r
-}\r
+#pragma once
+
+namespace Demo3
+{
+ void initialize( );
+ void finalize( );
+ void update( );
+ void draw( );
+}
-\83}\83j\83t\83F\83X\83g \83\8a\83\\81[\83X\82Ì\8dÅ\8fI\8dX\90V\93ú\8e\9e: 8:09:10.67 (2009/07/20) \r
+\83}\83j\83t\83F\83X\83g \83\8a\83\\81[\83X\82Ì\8dÅ\8fI\8dX\90V\93ú\8e\9e: 8:09:10.67 (2009/07/20)
-<?xml version='1.0' encoding='UTF-8' standalone='yes'?>\r
-<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>\r
-</assembly>\r
+<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
+<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
+</assembly>
-#include <windows.h>\r
-#include <iostream>\r
-#include <cstring>\r
-#include "extlib/sqlite3.h"\r
-#include "Settings.hpp"\r
-#include <memory>\r
-#include <boost/lexical_cast.hpp>\r
-#include <boost/format.hpp>\r
-#include <mof/GraphicsDevice.hpp>\r
-\r
-namespace \r
-{\r
- sqlite3* db;\r
-}\r
-\r
-//{{{ callback_load_settings\r
-static int callback_load_settings(void* data, int argc, char** argv, char** colnames)\r
-{\r
- Settings* settings = static_cast<Settings*>(data);\r
- for (int i = 0 ; i < argc; i++) {\r
- char* colname = colnames[i]; \r
- char* value = argv[i]; \r
- if (!strcmp(colname, "screen_width")) settings->screen.width = boost::lexical_cast<int>(value);\r
- else if (!strcmp(colname, "screen_height")) settings->screen.height = boost::lexical_cast<int>(value);\r
- else if (!strcmp(colname, "screen_mode")) settings->screen_mode = boost::lexical_cast<int>(value);\r
- else if (!strcmp(colname, "input_mode")) settings->input_mode = boost::lexical_cast<int>(value);\r
- else if (!strcmp(colname, "enable_output_frame")) settings->enable_output_frame = boost::lexical_cast<int>(value);\r
- else if (!strcmp(colname, "enable_output_audio")) settings->enable_output_audio = boost::lexical_cast<int>(value);\r
- else if (!strcmp(colname, "fps")) settings->fps = boost::lexical_cast<int>(value);\r
- }\r
- return 0;\r
-}\r
-//}}}\r
-//{{{ LoadSettings\r
-int LoadSettings(Settings* p)\r
-{\r
- int result;\r
- sqlite3* db;\r
- result = sqlite3_open("settings.db", &db);\r
- if (SQLITE_OK != result) return 0;\r
- static const char* sql = "SELECT * FROM settings WHERE id = 1";\r
- char *err;\r
- result = sqlite3_exec(db, sql, callback_load_settings, (void*)p, &err);\r
- if (err) {\r
- std::cout << err << std::endl;\r
- free(err);\r
- }\r
- sqlite3_close(db);\r
- if (SQLITE_OK != result) return 0;\r
- return 1;\r
-}\r
-//}}}\r
+#include <windows.h>
+#include <iostream>
+#include <cstring>
+#include "extlib/sqlite3.h"
+#include "Settings.hpp"
+#include <memory>
+#include <boost/lexical_cast.hpp>
+#include <boost/format.hpp>
+#include <mof/GraphicsDevice.hpp>
+
+namespace
+{
+ sqlite3* db;
+}
+
+//{{{ callback_load_settings
+static int callback_load_settings(void* data, int argc, char** argv, char** colnames)
+{
+ Settings* settings = static_cast<Settings*>(data);
+ for (int i = 0 ; i < argc; i++) {
+ char* colname = colnames[i];
+ char* value = argv[i];
+ if (!strcmp(colname, "screen_width")) settings->screen.width = boost::lexical_cast<int>(value);
+ else if (!strcmp(colname, "screen_height")) settings->screen.height = boost::lexical_cast<int>(value);
+ else if (!strcmp(colname, "screen_mode")) settings->screen_mode = boost::lexical_cast<int>(value);
+ else if (!strcmp(colname, "input_mode")) settings->input_mode = boost::lexical_cast<int>(value);
+ else if (!strcmp(colname, "enable_output_frame")) settings->enable_output_frame = boost::lexical_cast<int>(value);
+ else if (!strcmp(colname, "enable_output_audio")) settings->enable_output_audio = boost::lexical_cast<int>(value);
+ else if (!strcmp(colname, "fps")) settings->fps = boost::lexical_cast<int>(value);
+ }
+ return 0;
+}
+//}}}
+//{{{ LoadSettings
+int LoadSettings(Settings* p)
+{
+ int result;
+ sqlite3* db;
+ result = sqlite3_open("settings.db", &db);
+ if (SQLITE_OK != result) return 0;
+ static const char* sql = "SELECT * FROM settings WHERE id = 1";
+ char *err;
+ result = sqlite3_exec(db, sql, callback_load_settings, (void*)p, &err);
+ if (err) {
+ std::cout << err << std::endl;
+ free(err);
+ }
+ sqlite3_close(db);
+ if (SQLITE_OK != result) return 0;
+ return 1;
+}
+//}}}
-#include <windows.h>\r
-#include <cstring>\r
-\r
-\r
-struct Resolution\r
-{\r
- int width;\r
- int height;\r
-};\r
-\r
-struct Settings\r
-{\r
- Resolution screen;\r
- int screen_mode;///< 0=ウィンドウ, 1=フルスクリーン \r
- int fps;\r
- int input_mode;///< 0=通常モード, 1=ファイルに書き出す, 2=ファイルから読み込む\r
- int enable_output_frame;\r
- int enable_output_audio;\r
-};\r
-\r
-int LoadSettings(Settings* p);\r
+#include <windows.h>
+#include <cstring>
+
+
+struct Resolution
+{
+ int width;
+ int height;
+};
+
+struct Settings
+{
+ Resolution screen;
+ int screen_mode;///< 0=ウィンドウ, 1=フルスクリーン
+ int fps;
+ int input_mode;///< 0=通常モード, 1=ファイルに書き出す, 2=ファイルから読み込む
+ int enable_output_frame;
+ int enable_output_audio;
+};
+
+int LoadSettings(Settings* p);
-#include "TestScene.hpp"\r
-#include "mof/GraphicsDevice.hpp"\r
-#include <vector>\r
-#include "mof/VertexBuffer.hpp"\r
-#include "mof/AmbientLight.hpp"\r
-#include "mof/MaterialBuilder.hpp"\r
-#include "mof/Material.hpp"\r
-#include "mof/Camera.hpp"\r
-#include "mof/Texture.hpp"\r
-#include "mof/MeshBuilder.hpp"\r
-#include "mof/Graphics3D.hpp"\r
-#include "mof/EventScheduler.hpp"\r
-#include "mof/EventCondition.hpp"\r
-#include "mof/Board.hpp"\r
-#include "mof/Font.hpp"\r
-#include "mof/streams.hpp"\r
-#include "CharacterBoard.hpp"\r
-#include <vector>\r
-#include <boost/bind.hpp>\r
-#include <math.h>\r
-#include "mof/Finalizer.hpp"\r
-#include "mof/utilities.hpp"\r
-\r
-namespace \r
-{\r
-\r
- mof::AmbientLight* m_pLight;\r
- mof::Camera* m_pCamera;\r
- std::shared_ptr<mof::Texture> m_pTexture;\r
- std::vector<::CharacterBoard*> m_modelList;\r
- mof::Graphics3D* m_pBox;\r
- mof::EventScheduler* m_pScheduler;\r
- mof::Manipulator<mof::Color4f>::Handler m_backgroundColor;\r
- mof::FrameNumber m_backgroundColorFrame;\r
- mof::tstring m_part;\r
-};\r
-\r
-\r
-\r
- \r
-namespace TestScene\r
-{\r
-\r
- void begin(){\r
- std::vector<mof::Manipulator<mof::Matrix3D>::Handler> handlerList;\r
- \r
- {\r
- std::pair<mof::FrameNumber , mof::Vector3D> keyFrames[4];\r
- keyFrames[0] = std::pair<mof::FrameNumber , mof::Vector3D>( 25 , mof::Vector3D( mof::deg2rad(-90) , 0 , 0));\r
- keyFrames[1] = std::pair<mof::FrameNumber , mof::Vector3D>( 50 , mof::Vector3D( mof::deg2rad(-80) , 0 , 0));\r
- keyFrames[2] = std::pair<mof::FrameNumber , mof::Vector3D>( 75 , mof::Vector3D( mof::deg2rad(-25) , 0 , 0));\r
- keyFrames[3] = std::pair<mof::FrameNumber , mof::Vector3D>( 100 , mof::Vector3D( mof::deg2rad(0) , 0 , 0));\r
- mof::Manipulator<mof::Matrix3D>::Handler handler(new mof::Rotation3D(keyFrames[0] , mof::lastOf(keyFrames)));\r
- handlerList.push_back(handler);\r
- }\r
- {\r
- mof::Manipulator<mof::Matrix3D>::Handler handler(\r
- mof::makeConstantHandler(mof::Matrix3D::createTranslation(mof::Vector3D(0 , 0 , -4.5f)))\r
- );\r
- handlerList.push_back(handler);\r
- }\r
- {\r
- std::pair<mof::FrameNumber , mof::Vector3D> keyFrames[3];\r
- keyFrames[0] = std::pair<mof::FrameNumber , mof::Vector3D>( 0 , mof::Vector3D( 0 , mof::deg2rad(70) , 0));\r
- keyFrames[1] = std::pair<mof::FrameNumber , mof::Vector3D>( 130 , mof::Vector3D( 0 , mof::deg2rad(360) , 0));\r
- mof::Manipulator<mof::Matrix3D>::Handler handler(new mof::Rotation3D(keyFrames[0] , mof::lastOf(keyFrames)));\r
- handler = mof::Manipulator<mof::Matrix3D>::Handler(new mof::Loop<mof::Matrix3D>(handler , 200));\r
- handlerList.push_back(handler);\r
- }\r
- \r
- int size = handlerList.size();\r
- handlerList.resize(size + 1);\r
-\r
- mof::tstring title[] = { _T("\82R") , _T("\94N") , _T("\91O") , _T("\82É") , _T("\8dÁ") , _T("\90Ü") , _T("\82µ") ,\r
- _T("\82½") , _T("\82q") , _T("\82o") , _T("\82f") , _T("\8aJ") , _T("\94") , _T("\82ð") , _T("\8dÄ") , _T("\8aJ") ,\r
- _T("\82µ") , _T("\82Ä") , _T("\82Ý") , _T("\82é") };\r
-\r
- for(int i = 0 ; i < 20 ; i++)\r
- {\r
- m_modelList.push_back(new ::CharacterBoard( title[i]));\r
- {\r
- mof::Manipulator<mof::Matrix3D>::Handler handler(\r
- mof::makeConstantHandler(mof::Matrix3D::createRotation(mof::Vector3D(0 , mof::deg2rad(-360.0f/20 * i) , 0)))\r
- );\r
- handlerList.at(size) = handler;\r
- }\r
- mof::Manipulator<mof::Matrix3D>::Handler handler(mof::makeCascadeHandler<mof::Matrix3D >(handlerList.front() , handlerList.back()));\r
- m_modelList.at(i)->setWorldMatrix(handler);\r
- }\r
-\r
- \r
- {\r
- mof::MeshBuilder meshBuilder( "model/demo/box.x");\r
- m_pBox = meshBuilder.construct();\r
- handlerList.clear();\r
- \r
- {\r
- std::pair<mof::FrameNumber , mof::Vector3D> keyFrames[2];\r
- keyFrames[0] = std::pair<mof::FrameNumber , mof::Vector3D>( 0 , mof::Vector3D( 0 , 0 , 0));\r
- keyFrames[1] = std::pair<mof::FrameNumber , mof::Vector3D>( 130 , mof::Vector3D( mof::deg2rad(360) , mof::deg2rad(360) , mof::deg2rad(360)));\r
- mof::Manipulator<mof::Matrix3D>::Handler handler(new mof::Rotation3D(keyFrames[0] , keyFrames[1]));\r
- handler = mof::Manipulator<mof::Matrix3D>::Handler(new mof::Loop<mof::Matrix3D>(handler , 130));\r
- handlerList.push_back(handler);\r
- }\r
- mof::Manipulator<mof::Matrix3D>::Handler handler(mof::makeCascadeHandler<mof::Matrix3D >(handlerList.front() , handlerList.back()));\r
- m_pBox->setWorldMatrix(handler);\r
- }\r
-\r
- {\r
- std::pair<mof::FrameNumber , mof::Vector3D> keyFrames[2];\r
- keyFrames[0] = std::pair<mof::FrameNumber , mof::Vector3D>( 0 , mof::Vector3D(0 , 10.5f , -5));\r
- keyFrames[1] = std::pair<mof::FrameNumber , mof::Vector3D>( 130 , mof::Vector3D(0 , 1.5f , -10 ));\r
- mof::Manipulator<mof::Vector3D>::Handler handler(mof::makeKeyFrameAnimationHandler<mof::Vector3D>(keyFrames[0] , keyFrames[1]));\r
- m_pCamera->setEye(handler);\r
- }\r
- \r
- }\r
- \r
- void showTitle(){\r
- std::vector<mof::Manipulator<mof::Matrix3D>::Handler> handlerList;\r
- mof::Manipulator<mof::Matrix3D>::Handler handler;\r
- for(unsigned int i = 0 ; i < m_modelList.size() ; ++i){\r
- handlerList.clear();\r
- mof::Matrix3D matrix = m_modelList.at(i)->getWorldMatrix();\r
-\r
- {\r
- mof::Vector3D a = mof::Vector3D(1 , 0 , 0) * matrix;\r
- float rad = static_cast<float>(atan2( -a.x , -a.z));\r
- std::pair<mof::FrameNumber , mof::Vector3D> keyFrames[] = {\r
- std::pair<mof::FrameNumber , mof::Vector3D>( 20 , mof::Vector3D(0 , 0 , 0) ) ,\r
- std::pair<mof::FrameNumber , mof::Vector3D>( 50 , mof::Vector3D(0 , -rad , 0))\r
- };\r
- handler = mof::Manipulator<mof::Matrix3D>::Handler(new mof::Rotation3D(keyFrames[0] , keyFrames[1]));\r
- handlerList.push_back(handler);\r
- }\r
- \r
- {\r
- handler = mof::makeConstantHandler(matrix);\r
- handlerList.push_back(handler);\r
- }\r
- \r
- \r
- {\r
- float y = (i > 7) ? -1.0f : 0;\r
- float x = (i > 7) ? i - 8.0f : i;\r
- mof::Vector3D position(1.0f * x - 20 , y , -5);\r
- std::pair<mof::FrameNumber , mof::Vector3D> keyFrames[] = {\r
- std::pair<mof::FrameNumber , mof::Vector3D>( 0 , mof::Vector3D(0 , 0 , 0) ) ,\r
- std::pair<mof::FrameNumber , mof::Vector3D>( 50 , position - m_modelList.at(i)->getPosition())\r
- };\r
- handler = mof::Manipulator<mof::Matrix3D>::Handler(new mof::Translation3D(keyFrames[0] , keyFrames[1]));\r
- handlerList.push_back(handler);\r
- }\r
- handler = mof::Manipulator<mof::Matrix3D>::Handler(\r
- mof::makeCascadeHandler<mof::Matrix3D , mof::Multiply<mof::Matrix3D>>(handlerList.front() , handlerList.back())\r
- );\r
- m_modelList.at(i)->setWorldMatrix(handler);\r
- m_modelList.at(i)->setFinishColor(70 , 20);\r
- m_modelList.at(i)->setFrameNumber(0);\r
- }\r
- \r
- \r
-\r
- {\r
- mof::Vector3D eye = m_pCamera->getEye();\r
- std::pair<mof::FrameNumber , mof::Vector3D> keyFrames[] = {\r
- std::pair<mof::FrameNumber , mof::Vector3D>( 0 , eye) ,\r
- std::pair<mof::FrameNumber , mof::Vector3D>( 20 , eye) ,\r
- std::pair<mof::FrameNumber , mof::Vector3D>( 60 , mof::Vector3D(-16 , 1.0f , eye.z + 1)) ,\r
- std::pair<mof::FrameNumber , mof::Vector3D>( 70 , mof::Vector3D(-14 , -0.5f , eye.z - 8 ))\r
- };\r
- mof::Manipulator<mof::Vector3D>::Handler handler(mof::makeKeyFrameAnimationHandler<mof::Vector3D>(keyFrames[0] , keyFrames[3]));\r
- m_pCamera->setEye(handler);\r
- }\r
- \r
- {\r
- std::pair<mof::FrameNumber , mof::Vector3D> keyFrames[] = {\r
- std::pair<mof::FrameNumber , mof::Vector3D>( 0 , mof::Vector3D(0 , 0 , 0)) ,\r
- std::pair<mof::FrameNumber , mof::Vector3D>( 20 , mof::Vector3D(0 , 0 , 0)) ,\r
- std::pair<mof::FrameNumber , mof::Vector3D>( 60 , mof::Vector3D(-14 , 0.0f , 0 ))\r
- };\r
- mof::Manipulator<mof::Vector3D>::Handler handler(mof::makeKeyFrameAnimationHandler<mof::Vector3D>(keyFrames[0] , keyFrames[2]));\r
- m_pCamera->setCenter(handler);\r
- }\r
- m_pCamera->setFrameNumber(0);\r
-\r
- {\r
- std::pair<mof::FrameNumber , mof::Color4f> keyFrames[] = {\r
- std::pair<mof::FrameNumber , mof::Color4f>( 70 , mof::Color4f(mof::createColor(0 , 20 , 55)) ) ,\r
- std::pair<mof::FrameNumber , mof::Color4f>( 90 , mof::Color4f(mof::createColor(255 , 255 , 255)) )\r
- };\r
- m_backgroundColor = mof::Manipulator<mof::Color4f>::Handler(mof::makeKeyFrameAnimationHandler<mof::Color4f>(keyFrames[0] , keyFrames[1]));\r
- m_backgroundColorFrame = 0;\r
- }\r
- }\r
-\r
- void addPart(){\r
- std::vector<mof::Manipulator<mof::Matrix3D>::Handler> handlerList;\r
- mof::Manipulator<mof::Matrix3D>::Handler handler;\r
- {\r
- \r
- handlerList.clear();\r
- std::pair<mof::FrameNumber , mof::Vector3D> keyFrames[] = {\r
- std::pair<mof::FrameNumber , mof::Vector3D>( 0 , mof::Vector3D(0 , mof::deg2rad(270) , 0) ) ,\r
- std::pair<mof::FrameNumber , mof::Vector3D>( 40 , mof::Vector3D(0 , mof::deg2rad(360) , 0))\r
- };\r
- handler = mof::Manipulator<mof::Matrix3D>::Handler(new mof::Rotation3D(keyFrames[0] , keyFrames[1]));\r
- handlerList.push_back(handler);\r
-\r
- handler = mof::makeConstantHandler(mof::Matrix3D::createScaling(mof::Vector3D(4 , 1 , 1)));\r
- handlerList.push_back(handler);\r
- handler = mof::makeConstantHandler(mof::Matrix3D::createTranslation(mof::Vector3D(-10 , -2 , -5)));\r
- handlerList.push_back(handler);\r
- handler = mof::Manipulator<mof::Matrix3D>::Handler(\r
- mof::makeCascadeHandler<mof::Matrix3D , mof::Multiply<mof::Matrix3D>>(handlerList.front() , handlerList.back()));\r
- ::CharacterBoard* pPartBoard = new ::CharacterBoard( m_part);\r
- pPartBoard->setWorldMatrix(handler);\r
- pPartBoard->setPartColor(0 , 1);\r
- m_modelList.push_back(pPartBoard);\r
- }\r
- }\r
-\r
-\r
-\r
-\r
-\r
-\r
-void initialize( )\r
-{\r
- m_pLight = NULL;\r
- m_pCamera = NULL;\r
- m_pBox = NULL;\r
- m_pScheduler = NULL;\r
- m_backgroundColorFrame = 0;\r
- m_part = _T("part9");\r
- \r
- \r
-\r
- mof::GraphicsDevice::lightEnable(true);\r
- m_pLight = new mof::AmbientLight( mof::Color4f(mof::createColor(255 , 255 , 255)));\r
-\r
- m_pCamera = new mof::Camera(mof::Vector3D(0 , 0.5f , -10) , mof::Vector3D(0 , 0 , 0) , mof::Vector3D(0 , 1 , 0));\r
- m_backgroundColor = \r
- mof::Manipulator<mof::Color4f>::Handler(mof::makeConstantHandler(mof::Color4f(mof::createColor(0 , 20 , 55))));\r
-\r
- m_pScheduler = new mof::EventScheduler();\r
- m_pScheduler->addEvent( 125 , &::TestScene::showTitle );\r
- m_pScheduler->addEvent( 125+70 , &::TestScene::addPart );\r
- begin();\r
-\r
- \r
-}\r
-\r
-\r
-void finalize(){\r
- for(std::vector<::CharacterBoard*>::iterator itr = m_modelList.begin() ;\r
- itr != m_modelList.end() ;\r
- ++itr ){\r
- delete *itr;\r
- }\r
- delete m_pCamera;\r
- delete m_pBox;\r
- delete m_pScheduler;\r
- delete m_pLight;\r
- }\r
-\r
-\r
-\r
-\r
-void update(){\r
- for(std::vector<::CharacterBoard*>::iterator itr = m_modelList.begin() ;\r
- itr != m_modelList.end() ;\r
- ++itr ){\r
- (*itr)->update();\r
- }\r
- m_pBox->update();\r
- m_pScheduler->update();\r
- m_pCamera->update();\r
- m_backgroundColorFrame++;\r
-}\r
-\r
-\r
-\r
-void draw()\r
-{\r
- //m_pGraphics->setZBuffer(false);\r
- mof::GraphicsDevice::setViewTransform(m_pCamera->getViewMatrix());\r
- mof::GraphicsDevice::clearRenderTarget(m_backgroundColor->value(m_backgroundColorFrame).toColorCode());\r
- mof::GraphicsDevice::clearZBuffer();\r
- mof::GraphicsDevice::setAlphaBlendingMode(mof::GraphicsDevice::BLENDING_MODE_ALPHA);\r
- \r
- //m_pBox->draw();\r
- mof::GraphicsDevice::lightEnable(false);\r
- std::list<mof::Board*> boardList;\r
-\r
- for(std::vector<::CharacterBoard*>::iterator itr = m_modelList.begin() ;\r
- itr != m_modelList.end() ;\r
- ++itr ){\r
- (*itr)->append(boardList);\r
- }\r
-\r
- for(std::list<mof::Board*>::iterator itr = boardList.begin() ;\r
- itr != boardList.end() ;\r
- ++itr ){\r
- (*itr)->draw();\r
- }\r
-\r
-}\r
-\r
-} // namespace TestScene\r
+#include "TestScene.hpp"
+#include "mof/GraphicsDevice.hpp"
+#include <vector>
+#include "mof/VertexBuffer.hpp"
+#include "mof/AmbientLight.hpp"
+#include "mof/MaterialBuilder.hpp"
+#include "mof/Material.hpp"
+#include "mof/Camera.hpp"
+#include "mof/Texture.hpp"
+#include "mof/MeshBuilder.hpp"
+#include "mof/Graphics3D.hpp"
+#include "mof/EventScheduler.hpp"
+#include "mof/EventCondition.hpp"
+#include "mof/Board.hpp"
+#include "mof/Font.hpp"
+#include "mof/streams.hpp"
+#include "CharacterBoard.hpp"
+#include <vector>
+#include <boost/bind.hpp>
+#include <math.h>
+#include "mof/Finalizer.hpp"
+#include "mof/utilities.hpp"
+
+namespace
+{
+
+ mof::AmbientLight* m_pLight;
+ mof::Camera* m_pCamera;
+ std::shared_ptr<mof::Texture> m_pTexture;
+ std::vector<::CharacterBoard*> m_modelList;
+ mof::Graphics3D* m_pBox;
+ mof::EventScheduler* m_pScheduler;
+ mof::Manipulator<mof::Color4f>::Handler m_backgroundColor;
+ mof::FrameNumber m_backgroundColorFrame;
+ mof::tstring m_part;
+};
+
+
+
+
+namespace TestScene
+{
+
+ void begin(){
+ std::vector<mof::Manipulator<mof::Matrix3D>::Handler> handlerList;
+
+ {
+ std::pair<mof::FrameNumber , mof::Vector3D> keyFrames[4];
+ keyFrames[0] = std::pair<mof::FrameNumber , mof::Vector3D>( 25 , mof::Vector3D( mof::deg2rad(-90) , 0 , 0));
+ keyFrames[1] = std::pair<mof::FrameNumber , mof::Vector3D>( 50 , mof::Vector3D( mof::deg2rad(-80) , 0 , 0));
+ keyFrames[2] = std::pair<mof::FrameNumber , mof::Vector3D>( 75 , mof::Vector3D( mof::deg2rad(-25) , 0 , 0));
+ keyFrames[3] = std::pair<mof::FrameNumber , mof::Vector3D>( 100 , mof::Vector3D( mof::deg2rad(0) , 0 , 0));
+ mof::Manipulator<mof::Matrix3D>::Handler handler(new mof::Rotation3D(keyFrames[0] , mof::lastOf(keyFrames)));
+ handlerList.push_back(handler);
+ }
+ {
+ mof::Manipulator<mof::Matrix3D>::Handler handler(
+ mof::makeConstantHandler(mof::Matrix3D::createTranslation(mof::Vector3D(0 , 0 , -4.5f)))
+ );
+ handlerList.push_back(handler);
+ }
+ {
+ std::pair<mof::FrameNumber , mof::Vector3D> keyFrames[3];
+ keyFrames[0] = std::pair<mof::FrameNumber , mof::Vector3D>( 0 , mof::Vector3D( 0 , mof::deg2rad(70) , 0));
+ keyFrames[1] = std::pair<mof::FrameNumber , mof::Vector3D>( 130 , mof::Vector3D( 0 , mof::deg2rad(360) , 0));
+ mof::Manipulator<mof::Matrix3D>::Handler handler(new mof::Rotation3D(keyFrames[0] , mof::lastOf(keyFrames)));
+ handler = mof::Manipulator<mof::Matrix3D>::Handler(new mof::Loop<mof::Matrix3D>(handler , 200));
+ handlerList.push_back(handler);
+ }
+
+ int size = handlerList.size();
+ handlerList.resize(size + 1);
+
+ mof::tstring title[] = { _T("\82R") , _T("\94N") , _T("\91O") , _T("\82É") , _T("\8dÁ") , _T("\90Ü") , _T("\82µ") ,
+ _T("\82½") , _T("\82q") , _T("\82o") , _T("\82f") , _T("\8aJ") , _T("\94") , _T("\82ð") , _T("\8dÄ") , _T("\8aJ") ,
+ _T("\82µ") , _T("\82Ä") , _T("\82Ý") , _T("\82é") };
+
+ for(int i = 0 ; i < 20 ; i++)
+ {
+ m_modelList.push_back(new ::CharacterBoard( title[i]));
+ {
+ mof::Manipulator<mof::Matrix3D>::Handler handler(
+ mof::makeConstantHandler(mof::Matrix3D::createRotation(mof::Vector3D(0 , mof::deg2rad(-360.0f/20 * i) , 0)))
+ );
+ handlerList.at(size) = handler;
+ }
+ mof::Manipulator<mof::Matrix3D>::Handler handler(mof::makeCascadeHandler<mof::Matrix3D >(handlerList.front() , handlerList.back()));
+ m_modelList.at(i)->setWorldMatrix(handler);
+ }
+
+
+ {
+ mof::MeshBuilder meshBuilder( "model/demo/box.x");
+ m_pBox = meshBuilder.construct();
+ handlerList.clear();
+
+ {
+ std::pair<mof::FrameNumber , mof::Vector3D> keyFrames[2];
+ keyFrames[0] = std::pair<mof::FrameNumber , mof::Vector3D>( 0 , mof::Vector3D( 0 , 0 , 0));
+ keyFrames[1] = std::pair<mof::FrameNumber , mof::Vector3D>( 130 , mof::Vector3D( mof::deg2rad(360) , mof::deg2rad(360) , mof::deg2rad(360)));
+ mof::Manipulator<mof::Matrix3D>::Handler handler(new mof::Rotation3D(keyFrames[0] , keyFrames[1]));
+ handler = mof::Manipulator<mof::Matrix3D>::Handler(new mof::Loop<mof::Matrix3D>(handler , 130));
+ handlerList.push_back(handler);
+ }
+ mof::Manipulator<mof::Matrix3D>::Handler handler(mof::makeCascadeHandler<mof::Matrix3D >(handlerList.front() , handlerList.back()));
+ m_pBox->setWorldMatrix(handler);
+ }
+
+ {
+ std::pair<mof::FrameNumber , mof::Vector3D> keyFrames[2];
+ keyFrames[0] = std::pair<mof::FrameNumber , mof::Vector3D>( 0 , mof::Vector3D(0 , 10.5f , -5));
+ keyFrames[1] = std::pair<mof::FrameNumber , mof::Vector3D>( 130 , mof::Vector3D(0 , 1.5f , -10 ));
+ mof::Manipulator<mof::Vector3D>::Handler handler(mof::makeKeyFrameAnimationHandler<mof::Vector3D>(keyFrames[0] , keyFrames[1]));
+ m_pCamera->setEye(handler);
+ }
+
+ }
+
+ void showTitle(){
+ std::vector<mof::Manipulator<mof::Matrix3D>::Handler> handlerList;
+ mof::Manipulator<mof::Matrix3D>::Handler handler;
+ for(unsigned int i = 0 ; i < m_modelList.size() ; ++i){
+ handlerList.clear();
+ mof::Matrix3D matrix = m_modelList.at(i)->getWorldMatrix();
+
+ {
+ mof::Vector3D a = mof::Vector3D(1 , 0 , 0) * matrix;
+ float rad = static_cast<float>(atan2( -a.x , -a.z));
+ std::pair<mof::FrameNumber , mof::Vector3D> keyFrames[] = {
+ std::pair<mof::FrameNumber , mof::Vector3D>( 20 , mof::Vector3D(0 , 0 , 0) ) ,
+ std::pair<mof::FrameNumber , mof::Vector3D>( 50 , mof::Vector3D(0 , -rad , 0))
+ };
+ handler = mof::Manipulator<mof::Matrix3D>::Handler(new mof::Rotation3D(keyFrames[0] , keyFrames[1]));
+ handlerList.push_back(handler);
+ }
+
+ {
+ handler = mof::makeConstantHandler(matrix);
+ handlerList.push_back(handler);
+ }
+
+
+ {
+ float y = (i > 7) ? -1.0f : 0;
+ float x = (i > 7) ? i - 8.0f : i;
+ mof::Vector3D position(1.0f * x - 20 , y , -5);
+ std::pair<mof::FrameNumber , mof::Vector3D> keyFrames[] = {
+ std::pair<mof::FrameNumber , mof::Vector3D>( 0 , mof::Vector3D(0 , 0 , 0) ) ,
+ std::pair<mof::FrameNumber , mof::Vector3D>( 50 , position - m_modelList.at(i)->getPosition())
+ };
+ handler = mof::Manipulator<mof::Matrix3D>::Handler(new mof::Translation3D(keyFrames[0] , keyFrames[1]));
+ handlerList.push_back(handler);
+ }
+ handler = mof::Manipulator<mof::Matrix3D>::Handler(
+ mof::makeCascadeHandler<mof::Matrix3D , mof::Multiply<mof::Matrix3D>>(handlerList.front() , handlerList.back())
+ );
+ m_modelList.at(i)->setWorldMatrix(handler);
+ m_modelList.at(i)->setFinishColor(70 , 20);
+ m_modelList.at(i)->setFrameNumber(0);
+ }
+
+
+
+ {
+ mof::Vector3D eye = m_pCamera->getEye();
+ std::pair<mof::FrameNumber , mof::Vector3D> keyFrames[] = {
+ std::pair<mof::FrameNumber , mof::Vector3D>( 0 , eye) ,
+ std::pair<mof::FrameNumber , mof::Vector3D>( 20 , eye) ,
+ std::pair<mof::FrameNumber , mof::Vector3D>( 60 , mof::Vector3D(-16 , 1.0f , eye.z + 1)) ,
+ std::pair<mof::FrameNumber , mof::Vector3D>( 70 , mof::Vector3D(-14 , -0.5f , eye.z - 8 ))
+ };
+ mof::Manipulator<mof::Vector3D>::Handler handler(mof::makeKeyFrameAnimationHandler<mof::Vector3D>(keyFrames[0] , keyFrames[3]));
+ m_pCamera->setEye(handler);
+ }
+
+ {
+ std::pair<mof::FrameNumber , mof::Vector3D> keyFrames[] = {
+ std::pair<mof::FrameNumber , mof::Vector3D>( 0 , mof::Vector3D(0 , 0 , 0)) ,
+ std::pair<mof::FrameNumber , mof::Vector3D>( 20 , mof::Vector3D(0 , 0 , 0)) ,
+ std::pair<mof::FrameNumber , mof::Vector3D>( 60 , mof::Vector3D(-14 , 0.0f , 0 ))
+ };
+ mof::Manipulator<mof::Vector3D>::Handler handler(mof::makeKeyFrameAnimationHandler<mof::Vector3D>(keyFrames[0] , keyFrames[2]));
+ m_pCamera->setCenter(handler);
+ }
+ m_pCamera->setFrameNumber(0);
+
+ {
+ std::pair<mof::FrameNumber , mof::Color4f> keyFrames[] = {
+ std::pair<mof::FrameNumber , mof::Color4f>( 70 , mof::Color4f(mof::createColor(0 , 20 , 55)) ) ,
+ std::pair<mof::FrameNumber , mof::Color4f>( 90 , mof::Color4f(mof::createColor(255 , 255 , 255)) )
+ };
+ m_backgroundColor = mof::Manipulator<mof::Color4f>::Handler(mof::makeKeyFrameAnimationHandler<mof::Color4f>(keyFrames[0] , keyFrames[1]));
+ m_backgroundColorFrame = 0;
+ }
+ }
+
+ void addPart(){
+ std::vector<mof::Manipulator<mof::Matrix3D>::Handler> handlerList;
+ mof::Manipulator<mof::Matrix3D>::Handler handler;
+ {
+
+ handlerList.clear();
+ std::pair<mof::FrameNumber , mof::Vector3D> keyFrames[] = {
+ std::pair<mof::FrameNumber , mof::Vector3D>( 0 , mof::Vector3D(0 , mof::deg2rad(270) , 0) ) ,
+ std::pair<mof::FrameNumber , mof::Vector3D>( 40 , mof::Vector3D(0 , mof::deg2rad(360) , 0))
+ };
+ handler = mof::Manipulator<mof::Matrix3D>::Handler(new mof::Rotation3D(keyFrames[0] , keyFrames[1]));
+ handlerList.push_back(handler);
+
+ handler = mof::makeConstantHandler(mof::Matrix3D::createScaling(mof::Vector3D(4 , 1 , 1)));
+ handlerList.push_back(handler);
+ handler = mof::makeConstantHandler(mof::Matrix3D::createTranslation(mof::Vector3D(-10 , -2 , -5)));
+ handlerList.push_back(handler);
+ handler = mof::Manipulator<mof::Matrix3D>::Handler(
+ mof::makeCascadeHandler<mof::Matrix3D , mof::Multiply<mof::Matrix3D>>(handlerList.front() , handlerList.back()));
+ ::CharacterBoard* pPartBoard = new ::CharacterBoard( m_part);
+ pPartBoard->setWorldMatrix(handler);
+ pPartBoard->setPartColor(0 , 1);
+ m_modelList.push_back(pPartBoard);
+ }
+ }
+
+
+
+
+
+
+void initialize( )
+{
+ m_pLight = NULL;
+ m_pCamera = NULL;
+ m_pBox = NULL;
+ m_pScheduler = NULL;
+ m_backgroundColorFrame = 0;
+ m_part = _T("part9");
+
+
+
+ mof::GraphicsDevice::lightEnable(true);
+ m_pLight = new mof::AmbientLight( mof::Color4f(mof::createColor(255 , 255 , 255)));
+
+ m_pCamera = new mof::Camera(mof::Vector3D(0 , 0.5f , -10) , mof::Vector3D(0 , 0 , 0) , mof::Vector3D(0 , 1 , 0));
+ m_backgroundColor =
+ mof::Manipulator<mof::Color4f>::Handler(mof::makeConstantHandler(mof::Color4f(mof::createColor(0 , 20 , 55))));
+
+ m_pScheduler = new mof::EventScheduler();
+ m_pScheduler->addEvent( 125 , &::TestScene::showTitle );
+ m_pScheduler->addEvent( 125+70 , &::TestScene::addPart );
+ begin();
+
+
+}
+
+
+void finalize(){
+ for(std::vector<::CharacterBoard*>::iterator itr = m_modelList.begin() ;
+ itr != m_modelList.end() ;
+ ++itr ){
+ delete *itr;
+ }
+ delete m_pCamera;
+ delete m_pBox;
+ delete m_pScheduler;
+ delete m_pLight;
+ }
+
+
+
+
+void update(){
+ for(std::vector<::CharacterBoard*>::iterator itr = m_modelList.begin() ;
+ itr != m_modelList.end() ;
+ ++itr ){
+ (*itr)->update();
+ }
+ m_pBox->update();
+ m_pScheduler->update();
+ m_pCamera->update();
+ m_backgroundColorFrame++;
+}
+
+
+
+void draw()
+{
+ //m_pGraphics->setZBuffer(false);
+ mof::GraphicsDevice::setViewTransform(m_pCamera->getViewMatrix());
+ mof::GraphicsDevice::clearRenderTarget(m_backgroundColor->value(m_backgroundColorFrame).toColorCode());
+ mof::GraphicsDevice::clearZBuffer();
+ mof::GraphicsDevice::setAlphaBlendingMode(mof::GraphicsDevice::BLENDING_MODE_ALPHA);
+
+ //m_pBox->draw();
+ mof::GraphicsDevice::lightEnable(false);
+ std::list<mof::Board*> boardList;
+
+ for(std::vector<::CharacterBoard*>::iterator itr = m_modelList.begin() ;
+ itr != m_modelList.end() ;
+ ++itr ){
+ (*itr)->append(boardList);
+ }
+
+ for(std::list<mof::Board*>::iterator itr = boardList.begin() ;
+ itr != boardList.end() ;
+ ++itr ){
+ (*itr)->draw();
+ }
+
+}
+
+} // namespace TestScene
-#pragma once\r
-\r
-namespace TestScene\r
-{\r
- void initialize( );\r
- void finalize( );\r
- void update( );\r
- void draw( );\r
+#pragma once
+
+namespace TestScene
+{
+ void initialize( );
+ void finalize( );
+ void update( );
+ void draw( );
}
\ No newline at end of file
-#pragma once\r
-\r
-#define FONT_SIZE_STANDARD 24\r
-#define FONT_SIZE_LARGE 32\r
-#define FONT_SIZE_HUGE 40\r
-#define FONT_PATH_UME _T("font/ume-ugo4.ttf") \r
-//#define FONT_NAME_UME mof::Font::MS_GOTHIC\r
-#define FONT_NAME_UME _T("\94~UI\83S\83V\83b\83N") \r
+#pragma once
+
+#define FONT_SIZE_STANDARD 24
+#define FONT_SIZE_LARGE 32
+#define FONT_SIZE_HUGE 40
+#define FONT_PATH_UME _T("font/ume-ugo4.ttf")
+//#define FONT_NAME_UME mof::Font::MS_GOTHIC
+#define FONT_NAME_UME _T("\94~UI\83S\83V\83b\83N")
-/*\r
-** 2001 September 15\r
-**\r
-** The author disclaims copyright to this source code. In place of\r
-** a legal notice, here is a blessing:\r
-**\r
-** May you do good and not evil.\r
-** May you find forgiveness for yourself and forgive others.\r
-** May you share freely, never taking more than you give.\r
-**\r
-*************************************************************************\r
-** This header file defines the interface that the SQLite library\r
-** presents to client programs. If a C-function, structure, datatype,\r
-** or constant definition does not appear in this file, then it is\r
-** not a published API of SQLite, is subject to change without\r
-** notice, and should not be referenced by programs that use SQLite.\r
-**\r
-** Some of the definitions that are in this file are marked as\r
-** "experimental". Experimental interfaces are normally new\r
-** features recently added to SQLite. We do not anticipate changes\r
-** to experimental interfaces but reserve the right to make minor changes\r
-** if experience from use "in the wild" suggest such changes are prudent.\r
-**\r
-** The official C-language API documentation for SQLite is derived\r
-** from comments in this file. This file is the authoritative source\r
-** on how SQLite interfaces are suppose to operate.\r
-**\r
-** The name of this file under configuration management is "sqlite.h.in".\r
-** The makefile makes some minor changes to this file (such as inserting\r
-** the version number) and changes its name to "sqlite3.h" as\r
-** part of the build process.\r
-*/\r
-#ifndef _SQLITE3_H_\r
-#define _SQLITE3_H_\r
-#include <stdarg.h> /* Needed for the definition of va_list */\r
-\r
-/*\r
-** Make sure we can call this stuff from C++.\r
-*/\r
-#ifdef __cplusplus\r
-extern "C" {\r
-#endif\r
-\r
-\r
-/*\r
-** Add the ability to override 'extern'\r
-*/\r
-#ifndef SQLITE_EXTERN\r
-# define SQLITE_EXTERN extern\r
-#endif\r
-\r
-#ifndef SQLITE_API\r
-# define SQLITE_API\r
-#endif\r
-\r
-\r
-/*\r
-** These no-op macros are used in front of interfaces to mark those\r
-** interfaces as either deprecated or experimental. New applications\r
-** should not use deprecated interfaces - they are support for backwards\r
-** compatibility only. Application writers should be aware that\r
-** experimental interfaces are subject to change in point releases.\r
-**\r
-** These macros used to resolve to various kinds of compiler magic that\r
-** would generate warning messages when they were used. But that\r
-** compiler magic ended up generating such a flurry of bug reports\r
-** that we have taken it all out and gone back to using simple\r
-** noop macros.\r
-*/\r
-#define SQLITE_DEPRECATED\r
-#define SQLITE_EXPERIMENTAL\r
-\r
-/*\r
-** Ensure these symbols were not defined by some previous header file.\r
-*/\r
-#ifdef SQLITE_VERSION\r
-# undef SQLITE_VERSION\r
-#endif\r
-#ifdef SQLITE_VERSION_NUMBER\r
-# undef SQLITE_VERSION_NUMBER\r
-#endif\r
-\r
-/*\r
-** CAPI3REF: Compile-Time Library Version Numbers\r
-**\r
-** ^(The [SQLITE_VERSION] C preprocessor macro in the sqlite3.h header\r
-** evaluates to a string literal that is the SQLite version in the\r
-** format "X.Y.Z" where X is the major version number (always 3 for\r
-** SQLite3) and Y is the minor version number and Z is the release number.)^\r
-** ^(The [SQLITE_VERSION_NUMBER] C preprocessor macro resolves to an integer\r
-** with the value (X*1000000 + Y*1000 + Z) where X, Y, and Z are the same\r
-** numbers used in [SQLITE_VERSION].)^\r
-** The SQLITE_VERSION_NUMBER for any given release of SQLite will also\r
-** be larger than the release from which it is derived. Either Y will\r
-** be held constant and Z will be incremented or else Y will be incremented\r
-** and Z will be reset to zero.\r
-**\r
-** Since version 3.6.18, SQLite source code has been stored in the\r
-** <a href="http://www.fossil-scm.org/">Fossil configuration management\r
-** system</a>. ^The SQLITE_SOURCE_ID macro evalutes to\r
-** a string which identifies a particular check-in of SQLite\r
-** within its configuration management system. ^The SQLITE_SOURCE_ID\r
-** string contains the date and time of the check-in (UTC) and an SHA1\r
-** hash of the entire source tree.\r
-**\r
-** See also: [sqlite3_libversion()],\r
-** [sqlite3_libversion_number()], [sqlite3_sourceid()],\r
-** [sqlite_version()] and [sqlite_source_id()].\r
-*/\r
-#define SQLITE_VERSION "3.6.23.1"\r
-#define SQLITE_VERSION_NUMBER 3006023\r
-#define SQLITE_SOURCE_ID "2010-03-26 22:28:06 b078b588d617e07886ad156e9f54ade6d823568e"\r
-\r
-/*\r
-** CAPI3REF: Run-Time Library Version Numbers\r
-** KEYWORDS: sqlite3_version, sqlite3_sourceid\r
-**\r
-** These interfaces provide the same information as the [SQLITE_VERSION],\r
-** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros\r
-** but are associated with the library instead of the header file. ^(Cautious\r
-** programmers might include assert() statements in their application to\r
-** verify that values returned by these interfaces match the macros in\r
-** the header, and thus insure that the application is\r
-** compiled with matching library and header files.\r
-**\r
-** <blockquote><pre>\r
-** assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER );\r
-** assert( strcmp(sqlite3_sourceid(),SQLITE_SOURCE_ID)==0 );\r
-** assert( strcmp(sqlite3_libversion(),SQLITE_VERSION)==0 );\r
-** </pre></blockquote>)^\r
-**\r
-** ^The sqlite3_version[] string constant contains the text of [SQLITE_VERSION]\r
-** macro. ^The sqlite3_libversion() function returns a pointer to the\r
-** to the sqlite3_version[] string constant. The sqlite3_libversion()\r
-** function is provided for use in DLLs since DLL users usually do not have\r
-** direct access to string constants within the DLL. ^The\r
-** sqlite3_libversion_number() function returns an integer equal to\r
-** [SQLITE_VERSION_NUMBER]. ^The sqlite3_sourceid() function returns \r
-** a pointer to a string constant whose value is the same as the \r
-** [SQLITE_SOURCE_ID] C preprocessor macro.\r
-**\r
-** See also: [sqlite_version()] and [sqlite_source_id()].\r
-*/\r
-SQLITE_API SQLITE_EXTERN const char sqlite3_version[];\r
-SQLITE_API const char *sqlite3_libversion(void);\r
-SQLITE_API const char *sqlite3_sourceid(void);\r
-SQLITE_API int sqlite3_libversion_number(void);\r
-\r
-#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS\r
-/*\r
-** CAPI3REF: Run-Time Library Compilation Options Diagnostics\r
-**\r
-** ^The sqlite3_compileoption_used() function returns 0 or 1 \r
-** indicating whether the specified option was defined at \r
-** compile time. ^The SQLITE_ prefix may be omitted from the \r
-** option name passed to sqlite3_compileoption_used(). \r
-**\r
-** ^The sqlite3_compileoption_get() function allows interating\r
-** over the list of options that were defined at compile time by\r
-** returning the N-th compile time option string. ^If N is out of range,\r
-** sqlite3_compileoption_get() returns a NULL pointer. ^The SQLITE_ \r
-** prefix is omitted from any strings returned by \r
-** sqlite3_compileoption_get().\r
-**\r
-** ^Support for the diagnostic functions sqlite3_compileoption_used()\r
-** and sqlite3_compileoption_get() may be omitted by specifing the \r
-** [SQLITE_OMIT_COMPILEOPTION_DIAGS] option at compile time.\r
-**\r
-** See also: SQL functions [sqlite_compileoption_used()] and\r
-** [sqlite_compileoption_get()] and the [compile_options pragma].\r
-*/\r
-SQLITE_API int sqlite3_compileoption_used(const char *zOptName);\r
-SQLITE_API const char *sqlite3_compileoption_get(int N);\r
-#endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */\r
-\r
-/*\r
-** CAPI3REF: Test To See If The Library Is Threadsafe\r
-**\r
-** ^The sqlite3_threadsafe() function returns zero if and only if\r
-** SQLite was compiled mutexing code omitted due to the\r
-** [SQLITE_THREADSAFE] compile-time option being set to 0.\r
-**\r
-** SQLite can be compiled with or without mutexes. When\r
-** the [SQLITE_THREADSAFE] C preprocessor macro is 1 or 2, mutexes\r
-** are enabled and SQLite is threadsafe. When the\r
-** [SQLITE_THREADSAFE] macro is 0, \r
-** the mutexes are omitted. Without the mutexes, it is not safe\r
-** to use SQLite concurrently from more than one thread.\r
-**\r
-** Enabling mutexes incurs a measurable performance penalty.\r
-** So if speed is of utmost importance, it makes sense to disable\r
-** the mutexes. But for maximum safety, mutexes should be enabled.\r
-** ^The default behavior is for mutexes to be enabled.\r
-**\r
-** This interface can be used by an application to make sure that the\r
-** version of SQLite that it is linking against was compiled with\r
-** the desired setting of the [SQLITE_THREADSAFE] macro.\r
-**\r
-** This interface only reports on the compile-time mutex setting\r
-** of the [SQLITE_THREADSAFE] flag. If SQLite is compiled with\r
-** SQLITE_THREADSAFE=1 or =2 then mutexes are enabled by default but\r
-** can be fully or partially disabled using a call to [sqlite3_config()]\r
-** with the verbs [SQLITE_CONFIG_SINGLETHREAD], [SQLITE_CONFIG_MULTITHREAD],\r
-** or [SQLITE_CONFIG_MUTEX]. ^(The return value of the\r
-** sqlite3_threadsafe() function shows only the compile-time setting of\r
-** thread safety, not any run-time changes to that setting made by\r
-** sqlite3_config(). In other words, the return value from sqlite3_threadsafe()\r
-** is unchanged by calls to sqlite3_config().)^\r
-**\r
-** See the [threading mode] documentation for additional information.\r
-*/\r
-SQLITE_API int sqlite3_threadsafe(void);\r
-\r
-/*\r
-** CAPI3REF: Database Connection Handle\r
-** KEYWORDS: {database connection} {database connections}\r
-**\r
-** Each open SQLite database is represented by a pointer to an instance of\r
-** the opaque structure named "sqlite3". It is useful to think of an sqlite3\r
-** pointer as an object. The [sqlite3_open()], [sqlite3_open16()], and\r
-** [sqlite3_open_v2()] interfaces are its constructors, and [sqlite3_close()]\r
-** is its destructor. There are many other interfaces (such as\r
-** [sqlite3_prepare_v2()], [sqlite3_create_function()], and\r
-** [sqlite3_busy_timeout()] to name but three) that are methods on an\r
-** sqlite3 object.\r
-*/\r
-typedef struct sqlite3 sqlite3;\r
-\r
-/*\r
-** CAPI3REF: 64-Bit Integer Types\r
-** KEYWORDS: sqlite_int64 sqlite_uint64\r
-**\r
-** Because there is no cross-platform way to specify 64-bit integer types\r
-** SQLite includes typedefs for 64-bit signed and unsigned integers.\r
-**\r
-** The sqlite3_int64 and sqlite3_uint64 are the preferred type definitions.\r
-** The sqlite_int64 and sqlite_uint64 types are supported for backwards\r
-** compatibility only.\r
-**\r
-** ^The sqlite3_int64 and sqlite_int64 types can store integer values\r
-** between -9223372036854775808 and +9223372036854775807 inclusive. ^The\r
-** sqlite3_uint64 and sqlite_uint64 types can store integer values \r
-** between 0 and +18446744073709551615 inclusive.\r
-*/\r
-#ifdef SQLITE_INT64_TYPE\r
- typedef SQLITE_INT64_TYPE sqlite_int64;\r
- typedef unsigned SQLITE_INT64_TYPE sqlite_uint64;\r
-#elif defined(_MSC_VER) || defined(__BORLANDC__)\r
- typedef __int64 sqlite_int64;\r
- typedef unsigned __int64 sqlite_uint64;\r
-#else\r
- typedef long long int sqlite_int64;\r
- typedef unsigned long long int sqlite_uint64;\r
-#endif\r
-typedef sqlite_int64 sqlite3_int64;\r
-typedef sqlite_uint64 sqlite3_uint64;\r
-\r
-/*\r
-** If compiling for a processor that lacks floating point support,\r
-** substitute integer for floating-point.\r
-*/\r
-#ifdef SQLITE_OMIT_FLOATING_POINT\r
-# define double sqlite3_int64\r
-#endif\r
-\r
-/*\r
-** CAPI3REF: Closing A Database Connection\r
-**\r
-** ^The sqlite3_close() routine is the destructor for the [sqlite3] object.\r
-** ^Calls to sqlite3_close() return SQLITE_OK if the [sqlite3] object is\r
-** successfullly destroyed and all associated resources are deallocated.\r
-**\r
-** Applications must [sqlite3_finalize | finalize] all [prepared statements]\r
-** and [sqlite3_blob_close | close] all [BLOB handles] associated with\r
-** the [sqlite3] object prior to attempting to close the object. ^If\r
-** sqlite3_close() is called on a [database connection] that still has\r
-** outstanding [prepared statements] or [BLOB handles], then it returns\r
-** SQLITE_BUSY.\r
-**\r
-** ^If [sqlite3_close()] is invoked while a transaction is open,\r
-** the transaction is automatically rolled back.\r
-**\r
-** The C parameter to [sqlite3_close(C)] must be either a NULL\r
-** pointer or an [sqlite3] object pointer obtained\r
-** from [sqlite3_open()], [sqlite3_open16()], or\r
-** [sqlite3_open_v2()], and not previously closed.\r
-** ^Calling sqlite3_close() with a NULL pointer argument is a \r
-** harmless no-op.\r
-*/\r
-SQLITE_API int sqlite3_close(sqlite3 *);\r
-\r
-/*\r
-** The type for a callback function.\r
-** This is legacy and deprecated. It is included for historical\r
-** compatibility and is not documented.\r
-*/\r
-typedef int (*sqlite3_callback)(void*,int,char**, char**);\r
-\r
-/*\r
-** CAPI3REF: One-Step Query Execution Interface\r
-**\r
-** The sqlite3_exec() interface is a convenience wrapper around\r
-** [sqlite3_prepare_v2()], [sqlite3_step()], and [sqlite3_finalize()],\r
-** that allows an application to run multiple statements of SQL\r
-** without having to use a lot of C code. \r
-**\r
-** ^The sqlite3_exec() interface runs zero or more UTF-8 encoded,\r
-** semicolon-separate SQL statements passed into its 2nd argument,\r
-** in the context of the [database connection] passed in as its 1st\r
-** argument. ^If the callback function of the 3rd argument to\r
-** sqlite3_exec() is not NULL, then it is invoked for each result row\r
-** coming out of the evaluated SQL statements. ^The 4th argument to\r
-** to sqlite3_exec() is relayed through to the 1st argument of each\r
-** callback invocation. ^If the callback pointer to sqlite3_exec()\r
-** is NULL, then no callback is ever invoked and result rows are\r
-** ignored.\r
-**\r
-** ^If an error occurs while evaluating the SQL statements passed into\r
-** sqlite3_exec(), then execution of the current statement stops and\r
-** subsequent statements are skipped. ^If the 5th parameter to sqlite3_exec()\r
-** is not NULL then any error message is written into memory obtained\r
-** from [sqlite3_malloc()] and passed back through the 5th parameter.\r
-** To avoid memory leaks, the application should invoke [sqlite3_free()]\r
-** on error message strings returned through the 5th parameter of\r
-** of sqlite3_exec() after the error message string is no longer needed.\r
-** ^If the 5th parameter to sqlite3_exec() is not NULL and no errors\r
-** occur, then sqlite3_exec() sets the pointer in its 5th parameter to\r
-** NULL before returning.\r
-**\r
-** ^If an sqlite3_exec() callback returns non-zero, the sqlite3_exec()\r
-** routine returns SQLITE_ABORT without invoking the callback again and\r
-** without running any subsequent SQL statements.\r
-**\r
-** ^The 2nd argument to the sqlite3_exec() callback function is the\r
-** number of columns in the result. ^The 3rd argument to the sqlite3_exec()\r
-** callback is an array of pointers to strings obtained as if from\r
-** [sqlite3_column_text()], one for each column. ^If an element of a\r
-** result row is NULL then the corresponding string pointer for the\r
-** sqlite3_exec() callback is a NULL pointer. ^The 4th argument to the\r
-** sqlite3_exec() callback is an array of pointers to strings where each\r
-** entry represents the name of corresponding result column as obtained\r
-** from [sqlite3_column_name()].\r
-**\r
-** ^If the 2nd parameter to sqlite3_exec() is a NULL pointer, a pointer\r
-** to an empty string, or a pointer that contains only whitespace and/or \r
-** SQL comments, then no SQL statements are evaluated and the database\r
-** is not changed.\r
-**\r
-** Restrictions:\r
-**\r
-** <ul>\r
-** <li> The application must insure that the 1st parameter to sqlite3_exec()\r
-** is a valid and open [database connection].\r
-** <li> The application must not close [database connection] specified by\r
-** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running.\r
-** <li> The application must not modify the SQL statement text passed into\r
-** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running.\r
-** </ul>\r
-*/\r
-SQLITE_API int sqlite3_exec(\r
- sqlite3*, /* An open database */\r
- const char *sql, /* SQL to be evaluated */\r
- int (*callback)(void*,int,char**,char**), /* Callback function */\r
- void *, /* 1st argument to callback */\r
- char **errmsg /* Error msg written here */\r
-);\r
-\r
-/*\r
-** CAPI3REF: Result Codes\r
-** KEYWORDS: SQLITE_OK {error code} {error codes}\r
-** KEYWORDS: {result code} {result codes}\r
-**\r
-** Many SQLite functions return an integer result code from the set shown\r
-** here in order to indicates success or failure.\r
-**\r
-** New error codes may be added in future versions of SQLite.\r
-**\r
-** See also: [SQLITE_IOERR_READ | extended result codes]\r
-*/\r
-#define SQLITE_OK 0 /* Successful result */\r
-/* beginning-of-error-codes */\r
-#define SQLITE_ERROR 1 /* SQL error or missing database */\r
-#define SQLITE_INTERNAL 2 /* Internal logic error in SQLite */\r
-#define SQLITE_PERM 3 /* Access permission denied */\r
-#define SQLITE_ABORT 4 /* Callback routine requested an abort */\r
-#define SQLITE_BUSY 5 /* The database file is locked */\r
-#define SQLITE_LOCKED 6 /* A table in the database is locked */\r
-#define SQLITE_NOMEM 7 /* A malloc() failed */\r
-#define SQLITE_READONLY 8 /* Attempt to write a readonly database */\r
-#define SQLITE_INTERRUPT 9 /* Operation terminated by sqlite3_interrupt()*/\r
-#define SQLITE_IOERR 10 /* Some kind of disk I/O error occurred */\r
-#define SQLITE_CORRUPT 11 /* The database disk image is malformed */\r
-#define SQLITE_NOTFOUND 12 /* NOT USED. Table or record not found */\r
-#define SQLITE_FULL 13 /* Insertion failed because database is full */\r
-#define SQLITE_CANTOPEN 14 /* Unable to open the database file */\r
-#define SQLITE_PROTOCOL 15 /* NOT USED. Database lock protocol error */\r
-#define SQLITE_EMPTY 16 /* Database is empty */\r
-#define SQLITE_SCHEMA 17 /* The database schema changed */\r
-#define SQLITE_TOOBIG 18 /* String or BLOB exceeds size limit */\r
-#define SQLITE_CONSTRAINT 19 /* Abort due to constraint violation */\r
-#define SQLITE_MISMATCH 20 /* Data type mismatch */\r
-#define SQLITE_MISUSE 21 /* Library used incorrectly */\r
-#define SQLITE_NOLFS 22 /* Uses OS features not supported on host */\r
-#define SQLITE_AUTH 23 /* Authorization denied */\r
-#define SQLITE_FORMAT 24 /* Auxiliary database format error */\r
-#define SQLITE_RANGE 25 /* 2nd parameter to sqlite3_bind out of range */\r
-#define SQLITE_NOTADB 26 /* File opened that is not a database file */\r
-#define SQLITE_ROW 100 /* sqlite3_step() has another row ready */\r
-#define SQLITE_DONE 101 /* sqlite3_step() has finished executing */\r
-/* end-of-error-codes */\r
-\r
-/*\r
-** CAPI3REF: Extended Result Codes\r
-** KEYWORDS: {extended error code} {extended error codes}\r
-** KEYWORDS: {extended result code} {extended result codes}\r
-**\r
-** In its default configuration, SQLite API routines return one of 26 integer\r
-** [SQLITE_OK | result codes]. However, experience has shown that many of\r
-** these result codes are too coarse-grained. They do not provide as\r
-** much information about problems as programmers might like. In an effort to\r
-** address this, newer versions of SQLite (version 3.3.8 and later) include\r
-** support for additional result codes that provide more detailed information\r
-** about errors. The extended result codes are enabled or disabled\r
-** on a per database connection basis using the\r
-** [sqlite3_extended_result_codes()] API.\r
-**\r
-** Some of the available extended result codes are listed here.\r
-** One may expect the number of extended result codes will be expand\r
-** over time. Software that uses extended result codes should expect\r
-** to see new result codes in future releases of SQLite.\r
-**\r
-** The SQLITE_OK result code will never be extended. It will always\r
-** be exactly zero.\r
-*/\r
-#define SQLITE_IOERR_READ (SQLITE_IOERR | (1<<8))\r
-#define SQLITE_IOERR_SHORT_READ (SQLITE_IOERR | (2<<8))\r
-#define SQLITE_IOERR_WRITE (SQLITE_IOERR | (3<<8))\r
-#define SQLITE_IOERR_FSYNC (SQLITE_IOERR | (4<<8))\r
-#define SQLITE_IOERR_DIR_FSYNC (SQLITE_IOERR | (5<<8))\r
-#define SQLITE_IOERR_TRUNCATE (SQLITE_IOERR | (6<<8))\r
-#define SQLITE_IOERR_FSTAT (SQLITE_IOERR | (7<<8))\r
-#define SQLITE_IOERR_UNLOCK (SQLITE_IOERR | (8<<8))\r
-#define SQLITE_IOERR_RDLOCK (SQLITE_IOERR | (9<<8))\r
-#define SQLITE_IOERR_DELETE (SQLITE_IOERR | (10<<8))\r
-#define SQLITE_IOERR_BLOCKED (SQLITE_IOERR | (11<<8))\r
-#define SQLITE_IOERR_NOMEM (SQLITE_IOERR | (12<<8))\r
-#define SQLITE_IOERR_ACCESS (SQLITE_IOERR | (13<<8))\r
-#define SQLITE_IOERR_CHECKRESERVEDLOCK (SQLITE_IOERR | (14<<8))\r
-#define SQLITE_IOERR_LOCK (SQLITE_IOERR | (15<<8))\r
-#define SQLITE_IOERR_CLOSE (SQLITE_IOERR | (16<<8))\r
-#define SQLITE_IOERR_DIR_CLOSE (SQLITE_IOERR | (17<<8))\r
-#define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1<<8) )\r
-\r
-/*\r
-** CAPI3REF: Flags For File Open Operations\r
-**\r
-** These bit values are intended for use in the\r
-** 3rd parameter to the [sqlite3_open_v2()] interface and\r
-** in the 4th parameter to the xOpen method of the\r
-** [sqlite3_vfs] object.\r
-*/\r
-#define SQLITE_OPEN_READONLY 0x00000001 /* Ok for sqlite3_open_v2() */\r
-#define SQLITE_OPEN_READWRITE 0x00000002 /* Ok for sqlite3_open_v2() */\r
-#define SQLITE_OPEN_CREATE 0x00000004 /* Ok for sqlite3_open_v2() */\r
-#define SQLITE_OPEN_DELETEONCLOSE 0x00000008 /* VFS only */\r
-#define SQLITE_OPEN_EXCLUSIVE 0x00000010 /* VFS only */\r
-#define SQLITE_OPEN_AUTOPROXY 0x00000020 /* VFS only */\r
-#define SQLITE_OPEN_MAIN_DB 0x00000100 /* VFS only */\r
-#define SQLITE_OPEN_TEMP_DB 0x00000200 /* VFS only */\r
-#define SQLITE_OPEN_TRANSIENT_DB 0x00000400 /* VFS only */\r
-#define SQLITE_OPEN_MAIN_JOURNAL 0x00000800 /* VFS only */\r
-#define SQLITE_OPEN_TEMP_JOURNAL 0x00001000 /* VFS only */\r
-#define SQLITE_OPEN_SUBJOURNAL 0x00002000 /* VFS only */\r
-#define SQLITE_OPEN_MASTER_JOURNAL 0x00004000 /* VFS only */\r
-#define SQLITE_OPEN_NOMUTEX 0x00008000 /* Ok for sqlite3_open_v2() */\r
-#define SQLITE_OPEN_FULLMUTEX 0x00010000 /* Ok for sqlite3_open_v2() */\r
-#define SQLITE_OPEN_SHAREDCACHE 0x00020000 /* Ok for sqlite3_open_v2() */\r
-#define SQLITE_OPEN_PRIVATECACHE 0x00040000 /* Ok for sqlite3_open_v2() */\r
-\r
-/*\r
-** CAPI3REF: Device Characteristics\r
-**\r
-** The xDeviceCapabilities method of the [sqlite3_io_methods]\r
-** object returns an integer which is a vector of the these\r
-** bit values expressing I/O characteristics of the mass storage\r
-** device that holds the file that the [sqlite3_io_methods]\r
-** refers to.\r
-**\r
-** The SQLITE_IOCAP_ATOMIC property means that all writes of\r
-** any size are atomic. The SQLITE_IOCAP_ATOMICnnn values\r
-** mean that writes of blocks that are nnn bytes in size and\r
-** are aligned to an address which is an integer multiple of\r
-** nnn are atomic. The SQLITE_IOCAP_SAFE_APPEND value means\r
-** that when data is appended to a file, the data is appended\r
-** first then the size of the file is extended, never the other\r
-** way around. The SQLITE_IOCAP_SEQUENTIAL property means that\r
-** information is written to disk in the same order as calls\r
-** to xWrite().\r
-*/\r
-#define SQLITE_IOCAP_ATOMIC 0x00000001\r
-#define SQLITE_IOCAP_ATOMIC512 0x00000002\r
-#define SQLITE_IOCAP_ATOMIC1K 0x00000004\r
-#define SQLITE_IOCAP_ATOMIC2K 0x00000008\r
-#define SQLITE_IOCAP_ATOMIC4K 0x00000010\r
-#define SQLITE_IOCAP_ATOMIC8K 0x00000020\r
-#define SQLITE_IOCAP_ATOMIC16K 0x00000040\r
-#define SQLITE_IOCAP_ATOMIC32K 0x00000080\r
-#define SQLITE_IOCAP_ATOMIC64K 0x00000100\r
-#define SQLITE_IOCAP_SAFE_APPEND 0x00000200\r
-#define SQLITE_IOCAP_SEQUENTIAL 0x00000400\r
-\r
-/*\r
-** CAPI3REF: File Locking Levels\r
-**\r
-** SQLite uses one of these integer values as the second\r
-** argument to calls it makes to the xLock() and xUnlock() methods\r
-** of an [sqlite3_io_methods] object.\r
-*/\r
-#define SQLITE_LOCK_NONE 0\r
-#define SQLITE_LOCK_SHARED 1\r
-#define SQLITE_LOCK_RESERVED 2\r
-#define SQLITE_LOCK_PENDING 3\r
-#define SQLITE_LOCK_EXCLUSIVE 4\r
-\r
-/*\r
-** CAPI3REF: Synchronization Type Flags\r
-**\r
-** When SQLite invokes the xSync() method of an\r
-** [sqlite3_io_methods] object it uses a combination of\r
-** these integer values as the second argument.\r
-**\r
-** When the SQLITE_SYNC_DATAONLY flag is used, it means that the\r
-** sync operation only needs to flush data to mass storage. Inode\r
-** information need not be flushed. If the lower four bits of the flag\r
-** equal SQLITE_SYNC_NORMAL, that means to use normal fsync() semantics.\r
-** If the lower four bits equal SQLITE_SYNC_FULL, that means\r
-** to use Mac OS X style fullsync instead of fsync().\r
-*/\r
-#define SQLITE_SYNC_NORMAL 0x00002\r
-#define SQLITE_SYNC_FULL 0x00003\r
-#define SQLITE_SYNC_DATAONLY 0x00010\r
-\r
-/*\r
-** CAPI3REF: OS Interface Open File Handle\r
-**\r
-** An [sqlite3_file] object represents an open file in the \r
-** [sqlite3_vfs | OS interface layer]. Individual OS interface\r
-** implementations will\r
-** want to subclass this object by appending additional fields\r
-** for their own use. The pMethods entry is a pointer to an\r
-** [sqlite3_io_methods] object that defines methods for performing\r
-** I/O operations on the open file.\r
-*/\r
-typedef struct sqlite3_file sqlite3_file;\r
-struct sqlite3_file {\r
- const struct sqlite3_io_methods *pMethods; /* Methods for an open file */\r
-};\r
-\r
-/*\r
-** CAPI3REF: OS Interface File Virtual Methods Object\r
-**\r
-** Every file opened by the [sqlite3_vfs] xOpen method populates an\r
-** [sqlite3_file] object (or, more commonly, a subclass of the\r
-** [sqlite3_file] object) with a pointer to an instance of this object.\r
-** This object defines the methods used to perform various operations\r
-** against the open file represented by the [sqlite3_file] object.\r
-**\r
-** If the xOpen method sets the sqlite3_file.pMethods element \r
-** to a non-NULL pointer, then the sqlite3_io_methods.xClose method\r
-** may be invoked even if the xOpen reported that it failed. The\r
-** only way to prevent a call to xClose following a failed xOpen\r
-** is for the xOpen to set the sqlite3_file.pMethods element to NULL.\r
-**\r
-** The flags argument to xSync may be one of [SQLITE_SYNC_NORMAL] or\r
-** [SQLITE_SYNC_FULL]. The first choice is the normal fsync().\r
-** The second choice is a Mac OS X style fullsync. The [SQLITE_SYNC_DATAONLY]\r
-** flag may be ORed in to indicate that only the data of the file\r
-** and not its inode needs to be synced.\r
-**\r
-** The integer values to xLock() and xUnlock() are one of\r
-** <ul>\r
-** <li> [SQLITE_LOCK_NONE],\r
-** <li> [SQLITE_LOCK_SHARED],\r
-** <li> [SQLITE_LOCK_RESERVED],\r
-** <li> [SQLITE_LOCK_PENDING], or\r
-** <li> [SQLITE_LOCK_EXCLUSIVE].\r
-** </ul>\r
-** xLock() increases the lock. xUnlock() decreases the lock.\r
-** The xCheckReservedLock() method checks whether any database connection,\r
-** either in this process or in some other process, is holding a RESERVED,\r
-** PENDING, or EXCLUSIVE lock on the file. It returns true\r
-** if such a lock exists and false otherwise.\r
-**\r
-** The xFileControl() method is a generic interface that allows custom\r
-** VFS implementations to directly control an open file using the\r
-** [sqlite3_file_control()] interface. The second "op" argument is an\r
-** integer opcode. The third argument is a generic pointer intended to\r
-** point to a structure that may contain arguments or space in which to\r
-** write return values. Potential uses for xFileControl() might be\r
-** functions to enable blocking locks with timeouts, to change the\r
-** locking strategy (for example to use dot-file locks), to inquire\r
-** about the status of a lock, or to break stale locks. The SQLite\r
-** core reserves all opcodes less than 100 for its own use.\r
-** A [SQLITE_FCNTL_LOCKSTATE | list of opcodes] less than 100 is available.\r
-** Applications that define a custom xFileControl method should use opcodes\r
-** greater than 100 to avoid conflicts.\r
-**\r
-** The xSectorSize() method returns the sector size of the\r
-** device that underlies the file. The sector size is the\r
-** minimum write that can be performed without disturbing\r
-** other bytes in the file. The xDeviceCharacteristics()\r
-** method returns a bit vector describing behaviors of the\r
-** underlying device:\r
-**\r
-** <ul>\r
-** <li> [SQLITE_IOCAP_ATOMIC]\r
-** <li> [SQLITE_IOCAP_ATOMIC512]\r
-** <li> [SQLITE_IOCAP_ATOMIC1K]\r
-** <li> [SQLITE_IOCAP_ATOMIC2K]\r
-** <li> [SQLITE_IOCAP_ATOMIC4K]\r
-** <li> [SQLITE_IOCAP_ATOMIC8K]\r
-** <li> [SQLITE_IOCAP_ATOMIC16K]\r
-** <li> [SQLITE_IOCAP_ATOMIC32K]\r
-** <li> [SQLITE_IOCAP_ATOMIC64K]\r
-** <li> [SQLITE_IOCAP_SAFE_APPEND]\r
-** <li> [SQLITE_IOCAP_SEQUENTIAL]\r
-** </ul>\r
-**\r
-** The SQLITE_IOCAP_ATOMIC property means that all writes of\r
-** any size are atomic. The SQLITE_IOCAP_ATOMICnnn values\r
-** mean that writes of blocks that are nnn bytes in size and\r
-** are aligned to an address which is an integer multiple of\r
-** nnn are atomic. The SQLITE_IOCAP_SAFE_APPEND value means\r
-** that when data is appended to a file, the data is appended\r
-** first then the size of the file is extended, never the other\r
-** way around. The SQLITE_IOCAP_SEQUENTIAL property means that\r
-** information is written to disk in the same order as calls\r
-** to xWrite().\r
-**\r
-** If xRead() returns SQLITE_IOERR_SHORT_READ it must also fill\r
-** in the unread portions of the buffer with zeros. A VFS that\r
-** fails to zero-fill short reads might seem to work. However,\r
-** failure to zero-fill short reads will eventually lead to\r
-** database corruption.\r
-*/\r
-typedef struct sqlite3_io_methods sqlite3_io_methods;\r
-struct sqlite3_io_methods {\r
- int iVersion;\r
- int (*xClose)(sqlite3_file*);\r
- int (*xRead)(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst);\r
- int (*xWrite)(sqlite3_file*, const void*, int iAmt, sqlite3_int64 iOfst);\r
- int (*xTruncate)(sqlite3_file*, sqlite3_int64 size);\r
- int (*xSync)(sqlite3_file*, int flags);\r
- int (*xFileSize)(sqlite3_file*, sqlite3_int64 *pSize);\r
- int (*xLock)(sqlite3_file*, int);\r
- int (*xUnlock)(sqlite3_file*, int);\r
- int (*xCheckReservedLock)(sqlite3_file*, int *pResOut);\r
- int (*xFileControl)(sqlite3_file*, int op, void *pArg);\r
- int (*xSectorSize)(sqlite3_file*);\r
- int (*xDeviceCharacteristics)(sqlite3_file*);\r
- /* Additional methods may be added in future releases */\r
-};\r
-\r
-/*\r
-** CAPI3REF: Standard File Control Opcodes\r
-**\r
-** These integer constants are opcodes for the xFileControl method\r
-** of the [sqlite3_io_methods] object and for the [sqlite3_file_control()]\r
-** interface.\r
-**\r
-** The [SQLITE_FCNTL_LOCKSTATE] opcode is used for debugging. This\r
-** opcode causes the xFileControl method to write the current state of\r
-** the lock (one of [SQLITE_LOCK_NONE], [SQLITE_LOCK_SHARED],\r
-** [SQLITE_LOCK_RESERVED], [SQLITE_LOCK_PENDING], or [SQLITE_LOCK_EXCLUSIVE])\r
-** into an integer that the pArg argument points to. This capability\r
-** is used during testing and only needs to be supported when SQLITE_TEST\r
-** is defined.\r
-*/\r
-#define SQLITE_FCNTL_LOCKSTATE 1\r
-#define SQLITE_GET_LOCKPROXYFILE 2\r
-#define SQLITE_SET_LOCKPROXYFILE 3\r
-#define SQLITE_LAST_ERRNO 4\r
-\r
-/*\r
-** CAPI3REF: Mutex Handle\r
-**\r
-** The mutex module within SQLite defines [sqlite3_mutex] to be an\r
-** abstract type for a mutex object. The SQLite core never looks\r
-** at the internal representation of an [sqlite3_mutex]. It only\r
-** deals with pointers to the [sqlite3_mutex] object.\r
-**\r
-** Mutexes are created using [sqlite3_mutex_alloc()].\r
-*/\r
-typedef struct sqlite3_mutex sqlite3_mutex;\r
-\r
-/*\r
-** CAPI3REF: OS Interface Object\r
-**\r
-** An instance of the sqlite3_vfs object defines the interface between\r
-** the SQLite core and the underlying operating system. The "vfs"\r
-** in the name of the object stands for "virtual file system".\r
-**\r
-** The value of the iVersion field is initially 1 but may be larger in\r
-** future versions of SQLite. Additional fields may be appended to this\r
-** object when the iVersion value is increased. Note that the structure\r
-** of the sqlite3_vfs object changes in the transaction between\r
-** SQLite version 3.5.9 and 3.6.0 and yet the iVersion field was not\r
-** modified.\r
-**\r
-** The szOsFile field is the size of the subclassed [sqlite3_file]\r
-** structure used by this VFS. mxPathname is the maximum length of\r
-** a pathname in this VFS.\r
-**\r
-** Registered sqlite3_vfs objects are kept on a linked list formed by\r
-** the pNext pointer. The [sqlite3_vfs_register()]\r
-** and [sqlite3_vfs_unregister()] interfaces manage this list\r
-** in a thread-safe way. The [sqlite3_vfs_find()] interface\r
-** searches the list. Neither the application code nor the VFS\r
-** implementation should use the pNext pointer.\r
-**\r
-** The pNext field is the only field in the sqlite3_vfs\r
-** structure that SQLite will ever modify. SQLite will only access\r
-** or modify this field while holding a particular static mutex.\r
-** The application should never modify anything within the sqlite3_vfs\r
-** object once the object has been registered.\r
-**\r
-** The zName field holds the name of the VFS module. The name must\r
-** be unique across all VFS modules.\r
-**\r
-** SQLite will guarantee that the zFilename parameter to xOpen\r
-** is either a NULL pointer or string obtained\r
-** from xFullPathname(). SQLite further guarantees that\r
-** the string will be valid and unchanged until xClose() is\r
-** called. Because of the previous sentence,\r
-** the [sqlite3_file] can safely store a pointer to the\r
-** filename if it needs to remember the filename for some reason.\r
-** If the zFilename parameter is xOpen is a NULL pointer then xOpen\r
-** must invent its own temporary name for the file. Whenever the \r
-** xFilename parameter is NULL it will also be the case that the\r
-** flags parameter will include [SQLITE_OPEN_DELETEONCLOSE].\r
-**\r
-** The flags argument to xOpen() includes all bits set in\r
-** the flags argument to [sqlite3_open_v2()]. Or if [sqlite3_open()]\r
-** or [sqlite3_open16()] is used, then flags includes at least\r
-** [SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]. \r
-** If xOpen() opens a file read-only then it sets *pOutFlags to\r
-** include [SQLITE_OPEN_READONLY]. Other bits in *pOutFlags may be set.\r
-**\r
-** SQLite will also add one of the following flags to the xOpen()\r
-** call, depending on the object being opened:\r
-**\r
-** <ul>\r
-** <li> [SQLITE_OPEN_MAIN_DB]\r
-** <li> [SQLITE_OPEN_MAIN_JOURNAL]\r
-** <li> [SQLITE_OPEN_TEMP_DB]\r
-** <li> [SQLITE_OPEN_TEMP_JOURNAL]\r
-** <li> [SQLITE_OPEN_TRANSIENT_DB]\r
-** <li> [SQLITE_OPEN_SUBJOURNAL]\r
-** <li> [SQLITE_OPEN_MASTER_JOURNAL]\r
-** </ul>\r
-**\r
-** The file I/O implementation can use the object type flags to\r
-** change the way it deals with files. For example, an application\r
-** that does not care about crash recovery or rollback might make\r
-** the open of a journal file a no-op. Writes to this journal would\r
-** also be no-ops, and any attempt to read the journal would return\r
-** SQLITE_IOERR. Or the implementation might recognize that a database\r
-** file will be doing page-aligned sector reads and writes in a random\r
-** order and set up its I/O subsystem accordingly.\r
-**\r
-** SQLite might also add one of the following flags to the xOpen method:\r
-**\r
-** <ul>\r
-** <li> [SQLITE_OPEN_DELETEONCLOSE]\r
-** <li> [SQLITE_OPEN_EXCLUSIVE]\r
-** </ul>\r
-**\r
-** The [SQLITE_OPEN_DELETEONCLOSE] flag means the file should be\r
-** deleted when it is closed. The [SQLITE_OPEN_DELETEONCLOSE]\r
-** will be set for TEMP databases, journals and for subjournals.\r
-**\r
-** The [SQLITE_OPEN_EXCLUSIVE] flag is always used in conjunction\r
-** with the [SQLITE_OPEN_CREATE] flag, which are both directly\r
-** analogous to the O_EXCL and O_CREAT flags of the POSIX open()\r
-** API. The SQLITE_OPEN_EXCLUSIVE flag, when paired with the \r
-** SQLITE_OPEN_CREATE, is used to indicate that file should always\r
-** be created, and that it is an error if it already exists.\r
-** It is <i>not</i> used to indicate the file should be opened \r
-** for exclusive access.\r
-**\r
-** At least szOsFile bytes of memory are allocated by SQLite\r
-** to hold the [sqlite3_file] structure passed as the third\r
-** argument to xOpen. The xOpen method does not have to\r
-** allocate the structure; it should just fill it in. Note that\r
-** the xOpen method must set the sqlite3_file.pMethods to either\r
-** a valid [sqlite3_io_methods] object or to NULL. xOpen must do\r
-** this even if the open fails. SQLite expects that the sqlite3_file.pMethods\r
-** element will be valid after xOpen returns regardless of the success\r
-** or failure of the xOpen call.\r
-**\r
-** The flags argument to xAccess() may be [SQLITE_ACCESS_EXISTS]\r
-** to test for the existence of a file, or [SQLITE_ACCESS_READWRITE] to\r
-** test whether a file is readable and writable, or [SQLITE_ACCESS_READ]\r
-** to test whether a file is at least readable. The file can be a\r
-** directory.\r
-**\r
-** SQLite will always allocate at least mxPathname+1 bytes for the\r
-** output buffer xFullPathname. The exact size of the output buffer\r
-** is also passed as a parameter to both methods. If the output buffer\r
-** is not large enough, [SQLITE_CANTOPEN] should be returned. Since this is\r
-** handled as a fatal error by SQLite, vfs implementations should endeavor\r
-** to prevent this by setting mxPathname to a sufficiently large value.\r
-**\r
-** The xRandomness(), xSleep(), and xCurrentTime() interfaces\r
-** are not strictly a part of the filesystem, but they are\r
-** included in the VFS structure for completeness.\r
-** The xRandomness() function attempts to return nBytes bytes\r
-** of good-quality randomness into zOut. The return value is\r
-** the actual number of bytes of randomness obtained.\r
-** The xSleep() method causes the calling thread to sleep for at\r
-** least the number of microseconds given. The xCurrentTime()\r
-** method returns a Julian Day Number for the current date and time.\r
-**\r
-*/\r
-typedef struct sqlite3_vfs sqlite3_vfs;\r
-struct sqlite3_vfs {\r
- int iVersion; /* Structure version number */\r
- int szOsFile; /* Size of subclassed sqlite3_file */\r
- int mxPathname; /* Maximum file pathname length */\r
- sqlite3_vfs *pNext; /* Next registered VFS */\r
- const char *zName; /* Name of this virtual file system */\r
- void *pAppData; /* Pointer to application-specific data */\r
- int (*xOpen)(sqlite3_vfs*, const char *zName, sqlite3_file*,\r
- int flags, int *pOutFlags);\r
- int (*xDelete)(sqlite3_vfs*, const char *zName, int syncDir);\r
- int (*xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut);\r
- int (*xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut);\r
- void *(*xDlOpen)(sqlite3_vfs*, const char *zFilename);\r
- void (*xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg);\r
- void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void);\r
- void (*xDlClose)(sqlite3_vfs*, void*);\r
- int (*xRandomness)(sqlite3_vfs*, int nByte, char *zOut);\r
- int (*xSleep)(sqlite3_vfs*, int microseconds);\r
- int (*xCurrentTime)(sqlite3_vfs*, double*);\r
- int (*xGetLastError)(sqlite3_vfs*, int, char *);\r
- /* New fields may be appended in figure versions. The iVersion\r
- ** value will increment whenever this happens. */\r
-};\r
-\r
-/*\r
-** CAPI3REF: Flags for the xAccess VFS method\r
-**\r
-** These integer constants can be used as the third parameter to\r
-** the xAccess method of an [sqlite3_vfs] object. They determine\r
-** what kind of permissions the xAccess method is looking for.\r
-** With SQLITE_ACCESS_EXISTS, the xAccess method\r
-** simply checks whether the file exists.\r
-** With SQLITE_ACCESS_READWRITE, the xAccess method\r
-** checks whether the file is both readable and writable.\r
-** With SQLITE_ACCESS_READ, the xAccess method\r
-** checks whether the file is readable.\r
-*/\r
-#define SQLITE_ACCESS_EXISTS 0\r
-#define SQLITE_ACCESS_READWRITE 1\r
-#define SQLITE_ACCESS_READ 2\r
-\r
-/*\r
-** CAPI3REF: Initialize The SQLite Library\r
-**\r
-** ^The sqlite3_initialize() routine initializes the\r
-** SQLite library. ^The sqlite3_shutdown() routine\r
-** deallocates any resources that were allocated by sqlite3_initialize().\r
-** These routines are designed to aid in process initialization and\r
-** shutdown on embedded systems. Workstation applications using\r
-** SQLite normally do not need to invoke either of these routines.\r
-**\r
-** A call to sqlite3_initialize() is an "effective" call if it is\r
-** the first time sqlite3_initialize() is invoked during the lifetime of\r
-** the process, or if it is the first time sqlite3_initialize() is invoked\r
-** following a call to sqlite3_shutdown(). ^(Only an effective call\r
-** of sqlite3_initialize() does any initialization. All other calls\r
-** are harmless no-ops.)^\r
-**\r
-** A call to sqlite3_shutdown() is an "effective" call if it is the first\r
-** call to sqlite3_shutdown() since the last sqlite3_initialize(). ^(Only\r
-** an effective call to sqlite3_shutdown() does any deinitialization.\r
-** All other valid calls to sqlite3_shutdown() are harmless no-ops.)^\r
-**\r
-** The sqlite3_initialize() interface is threadsafe, but sqlite3_shutdown()\r
-** is not. The sqlite3_shutdown() interface must only be called from a\r
-** single thread. All open [database connections] must be closed and all\r
-** other SQLite resources must be deallocated prior to invoking\r
-** sqlite3_shutdown().\r
-**\r
-** Among other things, ^sqlite3_initialize() will invoke\r
-** sqlite3_os_init(). Similarly, ^sqlite3_shutdown()\r
-** will invoke sqlite3_os_end().\r
-**\r
-** ^The sqlite3_initialize() routine returns [SQLITE_OK] on success.\r
-** ^If for some reason, sqlite3_initialize() is unable to initialize\r
-** the library (perhaps it is unable to allocate a needed resource such\r
-** as a mutex) it returns an [error code] other than [SQLITE_OK].\r
-**\r
-** ^The sqlite3_initialize() routine is called internally by many other\r
-** SQLite interfaces so that an application usually does not need to\r
-** invoke sqlite3_initialize() directly. For example, [sqlite3_open()]\r
-** calls sqlite3_initialize() so the SQLite library will be automatically\r
-** initialized when [sqlite3_open()] is called if it has not be initialized\r
-** already. ^However, if SQLite is compiled with the [SQLITE_OMIT_AUTOINIT]\r
-** compile-time option, then the automatic calls to sqlite3_initialize()\r
-** are omitted and the application must call sqlite3_initialize() directly\r
-** prior to using any other SQLite interface. For maximum portability,\r
-** it is recommended that applications always invoke sqlite3_initialize()\r
-** directly prior to using any other SQLite interface. Future releases\r
-** of SQLite may require this. In other words, the behavior exhibited\r
-** when SQLite is compiled with [SQLITE_OMIT_AUTOINIT] might become the\r
-** default behavior in some future release of SQLite.\r
-**\r
-** The sqlite3_os_init() routine does operating-system specific\r
-** initialization of the SQLite library. The sqlite3_os_end()\r
-** routine undoes the effect of sqlite3_os_init(). Typical tasks\r
-** performed by these routines include allocation or deallocation\r
-** of static resources, initialization of global variables,\r
-** setting up a default [sqlite3_vfs] module, or setting up\r
-** a default configuration using [sqlite3_config()].\r
-**\r
-** The application should never invoke either sqlite3_os_init()\r
-** or sqlite3_os_end() directly. The application should only invoke\r
-** sqlite3_initialize() and sqlite3_shutdown(). The sqlite3_os_init()\r
-** interface is called automatically by sqlite3_initialize() and\r
-** sqlite3_os_end() is called by sqlite3_shutdown(). Appropriate\r
-** implementations for sqlite3_os_init() and sqlite3_os_end()\r
-** are built into SQLite when it is compiled for Unix, Windows, or OS/2.\r
-** When [custom builds | built for other platforms]\r
-** (using the [SQLITE_OS_OTHER=1] compile-time\r
-** option) the application must supply a suitable implementation for\r
-** sqlite3_os_init() and sqlite3_os_end(). An application-supplied\r
-** implementation of sqlite3_os_init() or sqlite3_os_end()\r
-** must return [SQLITE_OK] on success and some other [error code] upon\r
-** failure.\r
-*/\r
-SQLITE_API int sqlite3_initialize(void);\r
-SQLITE_API int sqlite3_shutdown(void);\r
-SQLITE_API int sqlite3_os_init(void);\r
-SQLITE_API int sqlite3_os_end(void);\r
-\r
-/*\r
-** CAPI3REF: Configuring The SQLite Library\r
-**\r
-** The sqlite3_config() interface is used to make global configuration\r
-** changes to SQLite in order to tune SQLite to the specific needs of\r
-** the application. The default configuration is recommended for most\r
-** applications and so this routine is usually not necessary. It is\r
-** provided to support rare applications with unusual needs.\r
-**\r
-** The sqlite3_config() interface is not threadsafe. The application\r
-** must insure that no other SQLite interfaces are invoked by other\r
-** threads while sqlite3_config() is running. Furthermore, sqlite3_config()\r
-** may only be invoked prior to library initialization using\r
-** [sqlite3_initialize()] or after shutdown by [sqlite3_shutdown()].\r
-** ^If sqlite3_config() is called after [sqlite3_initialize()] and before\r
-** [sqlite3_shutdown()] then it will return SQLITE_MISUSE.\r
-** Note, however, that ^sqlite3_config() can be called as part of the\r
-** implementation of an application-defined [sqlite3_os_init()].\r
-**\r
-** The first argument to sqlite3_config() is an integer\r
-** [SQLITE_CONFIG_SINGLETHREAD | configuration option] that determines\r
-** what property of SQLite is to be configured. Subsequent arguments\r
-** vary depending on the [SQLITE_CONFIG_SINGLETHREAD | configuration option]\r
-** in the first argument.\r
-**\r
-** ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK].\r
-** ^If the option is unknown or SQLite is unable to set the option\r
-** then this routine returns a non-zero [error code].\r
-*/\r
-SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_config(int, ...);\r
-\r
-/*\r
-** CAPI3REF: Configure database connections\r
-** EXPERIMENTAL\r
-**\r
-** The sqlite3_db_config() interface is used to make configuration\r
-** changes to a [database connection]. The interface is similar to\r
-** [sqlite3_config()] except that the changes apply to a single\r
-** [database connection] (specified in the first argument). The\r
-** sqlite3_db_config() interface should only be used immediately after\r
-** the database connection is created using [sqlite3_open()],\r
-** [sqlite3_open16()], or [sqlite3_open_v2()]. \r
-**\r
-** The second argument to sqlite3_db_config(D,V,...) is the\r
-** configuration verb - an integer code that indicates what\r
-** aspect of the [database connection] is being configured.\r
-** The only choice for this value is [SQLITE_DBCONFIG_LOOKASIDE].\r
-** New verbs are likely to be added in future releases of SQLite.\r
-** Additional arguments depend on the verb.\r
-**\r
-** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if\r
-** the call is considered successful.\r
-*/\r
-SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_db_config(sqlite3*, int op, ...);\r
-\r
-/*\r
-** CAPI3REF: Memory Allocation Routines\r
-** EXPERIMENTAL\r
-**\r
-** An instance of this object defines the interface between SQLite\r
-** and low-level memory allocation routines.\r
-**\r
-** This object is used in only one place in the SQLite interface.\r
-** A pointer to an instance of this object is the argument to\r
-** [sqlite3_config()] when the configuration option is\r
-** [SQLITE_CONFIG_MALLOC] or [SQLITE_CONFIG_GETMALLOC]. \r
-** By creating an instance of this object\r
-** and passing it to [sqlite3_config]([SQLITE_CONFIG_MALLOC])\r
-** during configuration, an application can specify an alternative\r
-** memory allocation subsystem for SQLite to use for all of its\r
-** dynamic memory needs.\r
-**\r
-** Note that SQLite comes with several [built-in memory allocators]\r
-** that are perfectly adequate for the overwhelming majority of applications\r
-** and that this object is only useful to a tiny minority of applications\r
-** with specialized memory allocation requirements. This object is\r
-** also used during testing of SQLite in order to specify an alternative\r
-** memory allocator that simulates memory out-of-memory conditions in\r
-** order to verify that SQLite recovers gracefully from such\r
-** conditions.\r
-**\r
-** The xMalloc and xFree methods must work like the\r
-** malloc() and free() functions from the standard C library.\r
-** The xRealloc method must work like realloc() from the standard C library\r
-** with the exception that if the second argument to xRealloc is zero,\r
-** xRealloc must be a no-op - it must not perform any allocation or\r
-** deallocation. ^SQLite guarantees that the second argument to\r
-** xRealloc is always a value returned by a prior call to xRoundup.\r
-** And so in cases where xRoundup always returns a positive number,\r
-** xRealloc can perform exactly as the standard library realloc() and\r
-** still be in compliance with this specification.\r
-**\r
-** xSize should return the allocated size of a memory allocation\r
-** previously obtained from xMalloc or xRealloc. The allocated size\r
-** is always at least as big as the requested size but may be larger.\r
-**\r
-** The xRoundup method returns what would be the allocated size of\r
-** a memory allocation given a particular requested size. Most memory\r
-** allocators round up memory allocations at least to the next multiple\r
-** of 8. Some allocators round up to a larger multiple or to a power of 2.\r
-** Every memory allocation request coming in through [sqlite3_malloc()]\r
-** or [sqlite3_realloc()] first calls xRoundup. If xRoundup returns 0, \r
-** that causes the corresponding memory allocation to fail.\r
-**\r
-** The xInit method initializes the memory allocator. (For example,\r
-** it might allocate any require mutexes or initialize internal data\r
-** structures. The xShutdown method is invoked (indirectly) by\r
-** [sqlite3_shutdown()] and should deallocate any resources acquired\r
-** by xInit. The pAppData pointer is used as the only parameter to\r
-** xInit and xShutdown.\r
-**\r
-** SQLite holds the [SQLITE_MUTEX_STATIC_MASTER] mutex when it invokes\r
-** the xInit method, so the xInit method need not be threadsafe. The\r
-** xShutdown method is only called from [sqlite3_shutdown()] so it does\r
-** not need to be threadsafe either. For all other methods, SQLite\r
-** holds the [SQLITE_MUTEX_STATIC_MEM] mutex as long as the\r
-** [SQLITE_CONFIG_MEMSTATUS] configuration option is turned on (which\r
-** it is by default) and so the methods are automatically serialized.\r
-** However, if [SQLITE_CONFIG_MEMSTATUS] is disabled, then the other\r
-** methods must be threadsafe or else make their own arrangements for\r
-** serialization.\r
-**\r
-** SQLite will never invoke xInit() more than once without an intervening\r
-** call to xShutdown().\r
-*/\r
-typedef struct sqlite3_mem_methods sqlite3_mem_methods;\r
-struct sqlite3_mem_methods {\r
- void *(*xMalloc)(int); /* Memory allocation function */\r
- void (*xFree)(void*); /* Free a prior allocation */\r
- void *(*xRealloc)(void*,int); /* Resize an allocation */\r
- int (*xSize)(void*); /* Return the size of an allocation */\r
- int (*xRoundup)(int); /* Round up request size to allocation size */\r
- int (*xInit)(void*); /* Initialize the memory allocator */\r
- void (*xShutdown)(void*); /* Deinitialize the memory allocator */\r
- void *pAppData; /* Argument to xInit() and xShutdown() */\r
-};\r
-\r
-/*\r
-** CAPI3REF: Configuration Options\r
-** EXPERIMENTAL\r
-**\r
-** These constants are the available integer configuration options that\r
-** can be passed as the first argument to the [sqlite3_config()] interface.\r
-**\r
-** New configuration options may be added in future releases of SQLite.\r
-** Existing configuration options might be discontinued. Applications\r
-** should check the return code from [sqlite3_config()] to make sure that\r
-** the call worked. The [sqlite3_config()] interface will return a\r
-** non-zero [error code] if a discontinued or unsupported configuration option\r
-** is invoked.\r
-**\r
-** <dl>\r
-** <dt>SQLITE_CONFIG_SINGLETHREAD</dt>\r
-** <dd>There are no arguments to this option. ^This option sets the\r
-** [threading mode] to Single-thread. In other words, it disables\r
-** all mutexing and puts SQLite into a mode where it can only be used\r
-** by a single thread. ^If SQLite is compiled with\r
-** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then\r
-** it is not possible to change the [threading mode] from its default\r
-** value of Single-thread and so [sqlite3_config()] will return \r
-** [SQLITE_ERROR] if called with the SQLITE_CONFIG_SINGLETHREAD\r
-** configuration option.</dd>\r
-**\r
-** <dt>SQLITE_CONFIG_MULTITHREAD</dt>\r
-** <dd>There are no arguments to this option. ^This option sets the\r
-** [threading mode] to Multi-thread. In other words, it disables\r
-** mutexing on [database connection] and [prepared statement] objects.\r
-** The application is responsible for serializing access to\r
-** [database connections] and [prepared statements]. But other mutexes\r
-** are enabled so that SQLite will be safe to use in a multi-threaded\r
-** environment as long as no two threads attempt to use the same\r
-** [database connection] at the same time. ^If SQLite is compiled with\r
-** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then\r
-** it is not possible to set the Multi-thread [threading mode] and\r
-** [sqlite3_config()] will return [SQLITE_ERROR] if called with the\r
-** SQLITE_CONFIG_MULTITHREAD configuration option.</dd>\r
-**\r
-** <dt>SQLITE_CONFIG_SERIALIZED</dt>\r
-** <dd>There are no arguments to this option. ^This option sets the\r
-** [threading mode] to Serialized. In other words, this option enables\r
-** all mutexes including the recursive\r
-** mutexes on [database connection] and [prepared statement] objects.\r
-** In this mode (which is the default when SQLite is compiled with\r
-** [SQLITE_THREADSAFE=1]) the SQLite library will itself serialize access\r
-** to [database connections] and [prepared statements] so that the\r
-** application is free to use the same [database connection] or the\r
-** same [prepared statement] in different threads at the same time.\r
-** ^If SQLite is compiled with\r
-** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then\r
-** it is not possible to set the Serialized [threading mode] and\r
-** [sqlite3_config()] will return [SQLITE_ERROR] if called with the\r
-** SQLITE_CONFIG_SERIALIZED configuration option.</dd>\r
-**\r
-** <dt>SQLITE_CONFIG_MALLOC</dt>\r
-** <dd> ^(This option takes a single argument which is a pointer to an\r
-** instance of the [sqlite3_mem_methods] structure. The argument specifies\r
-** alternative low-level memory allocation routines to be used in place of\r
-** the memory allocation routines built into SQLite.)^ ^SQLite makes\r
-** its own private copy of the content of the [sqlite3_mem_methods] structure\r
-** before the [sqlite3_config()] call returns.</dd>\r
-**\r
-** <dt>SQLITE_CONFIG_GETMALLOC</dt>\r
-** <dd> ^(This option takes a single argument which is a pointer to an\r
-** instance of the [sqlite3_mem_methods] structure. The [sqlite3_mem_methods]\r
-** structure is filled with the currently defined memory allocation routines.)^\r
-** This option can be used to overload the default memory allocation\r
-** routines with a wrapper that simulations memory allocation failure or\r
-** tracks memory usage, for example. </dd>\r
-**\r
-** <dt>SQLITE_CONFIG_MEMSTATUS</dt>\r
-** <dd> ^This option takes single argument of type int, interpreted as a \r
-** boolean, which enables or disables the collection of memory allocation \r
-** statistics. ^(When memory allocation statistics are disabled, the \r
-** following SQLite interfaces become non-operational:\r
-** <ul>\r
-** <li> [sqlite3_memory_used()]\r
-** <li> [sqlite3_memory_highwater()]\r
-** <li> [sqlite3_soft_heap_limit()]\r
-** <li> [sqlite3_status()]\r
-** </ul>)^\r
-** ^Memory allocation statistics are enabled by default unless SQLite is\r
-** compiled with [SQLITE_DEFAULT_MEMSTATUS]=0 in which case memory\r
-** allocation statistics are disabled by default.\r
-** </dd>\r
-**\r
-** <dt>SQLITE_CONFIG_SCRATCH</dt>\r
-** <dd> ^This option specifies a static memory buffer that SQLite can use for\r
-** scratch memory. There are three arguments: A pointer an 8-byte\r
-** aligned memory buffer from which the scrach allocations will be\r
-** drawn, the size of each scratch allocation (sz),\r
-** and the maximum number of scratch allocations (N). The sz\r
-** argument must be a multiple of 16. The sz parameter should be a few bytes\r
-** larger than the actual scratch space required due to internal overhead.\r
-** The first argument must be a pointer to an 8-byte aligned buffer\r
-** of at least sz*N bytes of memory.\r
-** ^SQLite will use no more than one scratch buffer per thread. So\r
-** N should be set to the expected maximum number of threads. ^SQLite will\r
-** never require a scratch buffer that is more than 6 times the database\r
-** page size. ^If SQLite needs needs additional scratch memory beyond \r
-** what is provided by this configuration option, then \r
-** [sqlite3_malloc()] will be used to obtain the memory needed.</dd>\r
-**\r
-** <dt>SQLITE_CONFIG_PAGECACHE</dt>\r
-** <dd> ^This option specifies a static memory buffer that SQLite can use for\r
-** the database page cache with the default page cache implemenation. \r
-** This configuration should not be used if an application-define page\r
-** cache implementation is loaded using the SQLITE_CONFIG_PCACHE option.\r
-** There are three arguments to this option: A pointer to 8-byte aligned\r
-** memory, the size of each page buffer (sz), and the number of pages (N).\r
-** The sz argument should be the size of the largest database page\r
-** (a power of two between 512 and 32768) plus a little extra for each\r
-** page header. ^The page header size is 20 to 40 bytes depending on\r
-** the host architecture. ^It is harmless, apart from the wasted memory,\r
-** to make sz a little too large. The first\r
-** argument should point to an allocation of at least sz*N bytes of memory.\r
-** ^SQLite will use the memory provided by the first argument to satisfy its\r
-** memory needs for the first N pages that it adds to cache. ^If additional\r
-** page cache memory is needed beyond what is provided by this option, then\r
-** SQLite goes to [sqlite3_malloc()] for the additional storage space.\r
-** ^The implementation might use one or more of the N buffers to hold \r
-** memory accounting information. The pointer in the first argument must\r
-** be aligned to an 8-byte boundary or subsequent behavior of SQLite\r
-** will be undefined.</dd>\r
-**\r
-** <dt>SQLITE_CONFIG_HEAP</dt>\r
-** <dd> ^This option specifies a static memory buffer that SQLite will use\r
-** for all of its dynamic memory allocation needs beyond those provided\r
-** for by [SQLITE_CONFIG_SCRATCH] and [SQLITE_CONFIG_PAGECACHE].\r
-** There are three arguments: An 8-byte aligned pointer to the memory,\r
-** the number of bytes in the memory buffer, and the minimum allocation size.\r
-** ^If the first pointer (the memory pointer) is NULL, then SQLite reverts\r
-** to using its default memory allocator (the system malloc() implementation),\r
-** undoing any prior invocation of [SQLITE_CONFIG_MALLOC]. ^If the\r
-** memory pointer is not NULL and either [SQLITE_ENABLE_MEMSYS3] or\r
-** [SQLITE_ENABLE_MEMSYS5] are defined, then the alternative memory\r
-** allocator is engaged to handle all of SQLites memory allocation needs.\r
-** The first pointer (the memory pointer) must be aligned to an 8-byte\r
-** boundary or subsequent behavior of SQLite will be undefined.</dd>\r
-**\r
-** <dt>SQLITE_CONFIG_MUTEX</dt>\r
-** <dd> ^(This option takes a single argument which is a pointer to an\r
-** instance of the [sqlite3_mutex_methods] structure. The argument specifies\r
-** alternative low-level mutex routines to be used in place\r
-** the mutex routines built into SQLite.)^ ^SQLite makes a copy of the\r
-** content of the [sqlite3_mutex_methods] structure before the call to\r
-** [sqlite3_config()] returns. ^If SQLite is compiled with\r
-** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then\r
-** the entire mutexing subsystem is omitted from the build and hence calls to\r
-** [sqlite3_config()] with the SQLITE_CONFIG_MUTEX configuration option will\r
-** return [SQLITE_ERROR].</dd>\r
-**\r
-** <dt>SQLITE_CONFIG_GETMUTEX</dt>\r
-** <dd> ^(This option takes a single argument which is a pointer to an\r
-** instance of the [sqlite3_mutex_methods] structure. The\r
-** [sqlite3_mutex_methods]\r
-** structure is filled with the currently defined mutex routines.)^\r
-** This option can be used to overload the default mutex allocation\r
-** routines with a wrapper used to track mutex usage for performance\r
-** profiling or testing, for example. ^If SQLite is compiled with\r
-** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then\r
-** the entire mutexing subsystem is omitted from the build and hence calls to\r
-** [sqlite3_config()] with the SQLITE_CONFIG_GETMUTEX configuration option will\r
-** return [SQLITE_ERROR].</dd>\r
-**\r
-** <dt>SQLITE_CONFIG_LOOKASIDE</dt>\r
-** <dd> ^(This option takes two arguments that determine the default\r
-** memory allocation for the lookaside memory allocator on each\r
-** [database connection]. The first argument is the\r
-** size of each lookaside buffer slot and the second is the number of\r
-** slots allocated to each database connection.)^ ^(This option sets the\r
-** <i>default</i> lookaside size. The [SQLITE_DBCONFIG_LOOKASIDE]\r
-** verb to [sqlite3_db_config()] can be used to change the lookaside\r
-** configuration on individual connections.)^ </dd>\r
-**\r
-** <dt>SQLITE_CONFIG_PCACHE</dt>\r
-** <dd> ^(This option takes a single argument which is a pointer to\r
-** an [sqlite3_pcache_methods] object. This object specifies the interface\r
-** to a custom page cache implementation.)^ ^SQLite makes a copy of the\r
-** object and uses it for page cache memory allocations.</dd>\r
-**\r
-** <dt>SQLITE_CONFIG_GETPCACHE</dt>\r
-** <dd> ^(This option takes a single argument which is a pointer to an\r
-** [sqlite3_pcache_methods] object. SQLite copies of the current\r
-** page cache implementation into that object.)^ </dd>\r
-**\r
-** </dl>\r
-*/\r
-#define SQLITE_CONFIG_SINGLETHREAD 1 /* nil */\r
-#define SQLITE_CONFIG_MULTITHREAD 2 /* nil */\r
-#define SQLITE_CONFIG_SERIALIZED 3 /* nil */\r
-#define SQLITE_CONFIG_MALLOC 4 /* sqlite3_mem_methods* */\r
-#define SQLITE_CONFIG_GETMALLOC 5 /* sqlite3_mem_methods* */\r
-#define SQLITE_CONFIG_SCRATCH 6 /* void*, int sz, int N */\r
-#define SQLITE_CONFIG_PAGECACHE 7 /* void*, int sz, int N */\r
-#define SQLITE_CONFIG_HEAP 8 /* void*, int nByte, int min */\r
-#define SQLITE_CONFIG_MEMSTATUS 9 /* boolean */\r
-#define SQLITE_CONFIG_MUTEX 10 /* sqlite3_mutex_methods* */\r
-#define SQLITE_CONFIG_GETMUTEX 11 /* sqlite3_mutex_methods* */\r
-/* previously SQLITE_CONFIG_CHUNKALLOC 12 which is now unused. */ \r
-#define SQLITE_CONFIG_LOOKASIDE 13 /* int int */\r
-#define SQLITE_CONFIG_PCACHE 14 /* sqlite3_pcache_methods* */\r
-#define SQLITE_CONFIG_GETPCACHE 15 /* sqlite3_pcache_methods* */\r
-#define SQLITE_CONFIG_LOG 16 /* xFunc, void* */\r
-\r
-/*\r
-** CAPI3REF: Configuration Options\r
-** EXPERIMENTAL\r
-**\r
-** These constants are the available integer configuration options that\r
-** can be passed as the second argument to the [sqlite3_db_config()] interface.\r
-**\r
-** New configuration options may be added in future releases of SQLite.\r
-** Existing configuration options might be discontinued. Applications\r
-** should check the return code from [sqlite3_db_config()] to make sure that\r
-** the call worked. ^The [sqlite3_db_config()] interface will return a\r
-** non-zero [error code] if a discontinued or unsupported configuration option\r
-** is invoked.\r
-**\r
-** <dl>\r
-** <dt>SQLITE_DBCONFIG_LOOKASIDE</dt>\r
-** <dd> ^This option takes three additional arguments that determine the \r
-** [lookaside memory allocator] configuration for the [database connection].\r
-** ^The first argument (the third parameter to [sqlite3_db_config()] is a\r
-** pointer to an memory buffer to use for lookaside memory.\r
-** ^The first argument after the SQLITE_DBCONFIG_LOOKASIDE verb\r
-** may be NULL in which case SQLite will allocate the\r
-** lookaside buffer itself using [sqlite3_malloc()]. ^The second argument is the\r
-** size of each lookaside buffer slot. ^The third argument is the number of\r
-** slots. The size of the buffer in the first argument must be greater than\r
-** or equal to the product of the second and third arguments. The buffer\r
-** must be aligned to an 8-byte boundary. ^If the second argument to\r
-** SQLITE_DBCONFIG_LOOKASIDE is not a multiple of 8, it is internally\r
-** rounded down to the next smaller\r
-** multiple of 8. See also: [SQLITE_CONFIG_LOOKASIDE]</dd>\r
-**\r
-** </dl>\r
-*/\r
-#define SQLITE_DBCONFIG_LOOKASIDE 1001 /* void* int int */\r
-\r
-\r
-/*\r
-** CAPI3REF: Enable Or Disable Extended Result Codes\r
-**\r
-** ^The sqlite3_extended_result_codes() routine enables or disables the\r
-** [extended result codes] feature of SQLite. ^The extended result\r
-** codes are disabled by default for historical compatibility.\r
-*/\r
-SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff);\r
-\r
-/*\r
-** CAPI3REF: Last Insert Rowid\r
-**\r
-** ^Each entry in an SQLite table has a unique 64-bit signed\r
-** integer key called the [ROWID | "rowid"]. ^The rowid is always available\r
-** as an undeclared column named ROWID, OID, or _ROWID_ as long as those\r
-** names are not also used by explicitly declared columns. ^If\r
-** the table has a column of type [INTEGER PRIMARY KEY] then that column\r
-** is another alias for the rowid.\r
-**\r
-** ^This routine returns the [rowid] of the most recent\r
-** successful [INSERT] into the database from the [database connection]\r
-** in the first argument. ^If no successful [INSERT]s\r
-** have ever occurred on that database connection, zero is returned.\r
-**\r
-** ^(If an [INSERT] occurs within a trigger, then the [rowid] of the inserted\r
-** row is returned by this routine as long as the trigger is running.\r
-** But once the trigger terminates, the value returned by this routine\r
-** reverts to the last value inserted before the trigger fired.)^\r
-**\r
-** ^An [INSERT] that fails due to a constraint violation is not a\r
-** successful [INSERT] and does not change the value returned by this\r
-** routine. ^Thus INSERT OR FAIL, INSERT OR IGNORE, INSERT OR ROLLBACK,\r
-** and INSERT OR ABORT make no changes to the return value of this\r
-** routine when their insertion fails. ^(When INSERT OR REPLACE\r
-** encounters a constraint violation, it does not fail. The\r
-** INSERT continues to completion after deleting rows that caused\r
-** the constraint problem so INSERT OR REPLACE will always change\r
-** the return value of this interface.)^\r
-**\r
-** ^For the purposes of this routine, an [INSERT] is considered to\r
-** be successful even if it is subsequently rolled back.\r
-**\r
-** This function is accessible to SQL statements via the\r
-** [last_insert_rowid() SQL function].\r
-**\r
-** If a separate thread performs a new [INSERT] on the same\r
-** database connection while the [sqlite3_last_insert_rowid()]\r
-** function is running and thus changes the last insert [rowid],\r
-** then the value returned by [sqlite3_last_insert_rowid()] is\r
-** unpredictable and might not equal either the old or the new\r
-** last insert [rowid].\r
-*/\r
-SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*);\r
-\r
-/*\r
-** CAPI3REF: Count The Number Of Rows Modified\r
-**\r
-** ^This function returns the number of database rows that were changed\r
-** or inserted or deleted by the most recently completed SQL statement\r
-** on the [database connection] specified by the first parameter.\r
-** ^(Only changes that are directly specified by the [INSERT], [UPDATE],\r
-** or [DELETE] statement are counted. Auxiliary changes caused by\r
-** triggers or [foreign key actions] are not counted.)^ Use the\r
-** [sqlite3_total_changes()] function to find the total number of changes\r
-** including changes caused by triggers and foreign key actions.\r
-**\r
-** ^Changes to a view that are simulated by an [INSTEAD OF trigger]\r
-** are not counted. Only real table changes are counted.\r
-**\r
-** ^(A "row change" is a change to a single row of a single table\r
-** caused by an INSERT, DELETE, or UPDATE statement. Rows that\r
-** are changed as side effects of [REPLACE] constraint resolution,\r
-** rollback, ABORT processing, [DROP TABLE], or by any other\r
-** mechanisms do not count as direct row changes.)^\r
-**\r
-** A "trigger context" is a scope of execution that begins and\r
-** ends with the script of a [CREATE TRIGGER | trigger]. \r
-** Most SQL statements are\r
-** evaluated outside of any trigger. This is the "top level"\r
-** trigger context. If a trigger fires from the top level, a\r
-** new trigger context is entered for the duration of that one\r
-** trigger. Subtriggers create subcontexts for their duration.\r
-**\r
-** ^Calling [sqlite3_exec()] or [sqlite3_step()] recursively does\r
-** not create a new trigger context.\r
-**\r
-** ^This function returns the number of direct row changes in the\r
-** most recent INSERT, UPDATE, or DELETE statement within the same\r
-** trigger context.\r
-**\r
-** ^Thus, when called from the top level, this function returns the\r
-** number of changes in the most recent INSERT, UPDATE, or DELETE\r
-** that also occurred at the top level. ^(Within the body of a trigger,\r
-** the sqlite3_changes() interface can be called to find the number of\r
-** changes in the most recently completed INSERT, UPDATE, or DELETE\r
-** statement within the body of the same trigger.\r
-** However, the number returned does not include changes\r
-** caused by subtriggers since those have their own context.)^\r
-**\r
-** See also the [sqlite3_total_changes()] interface, the\r
-** [count_changes pragma], and the [changes() SQL function].\r
-**\r
-** If a separate thread makes changes on the same database connection\r
-** while [sqlite3_changes()] is running then the value returned\r
-** is unpredictable and not meaningful.\r
-*/\r
-SQLITE_API int sqlite3_changes(sqlite3*);\r
-\r
-/*\r
-** CAPI3REF: Total Number Of Rows Modified\r
-**\r
-** ^This function returns the number of row changes caused by [INSERT],\r
-** [UPDATE] or [DELETE] statements since the [database connection] was opened.\r
-** ^(The count returned by sqlite3_total_changes() includes all changes\r
-** from all [CREATE TRIGGER | trigger] contexts and changes made by\r
-** [foreign key actions]. However,\r
-** the count does not include changes used to implement [REPLACE] constraints,\r
-** do rollbacks or ABORT processing, or [DROP TABLE] processing. The\r
-** count does not include rows of views that fire an [INSTEAD OF trigger],\r
-** though if the INSTEAD OF trigger makes changes of its own, those changes \r
-** are counted.)^\r
-** ^The sqlite3_total_changes() function counts the changes as soon as\r
-** the statement that makes them is completed (when the statement handle\r
-** is passed to [sqlite3_reset()] or [sqlite3_finalize()]).\r
-**\r
-** See also the [sqlite3_changes()] interface, the\r
-** [count_changes pragma], and the [total_changes() SQL function].\r
-**\r
-** If a separate thread makes changes on the same database connection\r
-** while [sqlite3_total_changes()] is running then the value\r
-** returned is unpredictable and not meaningful.\r
-*/\r
-SQLITE_API int sqlite3_total_changes(sqlite3*);\r
-\r
-/*\r
-** CAPI3REF: Interrupt A Long-Running Query\r
-**\r
-** ^This function causes any pending database operation to abort and\r
-** return at its earliest opportunity. This routine is typically\r
-** called in response to a user action such as pressing "Cancel"\r
-** or Ctrl-C where the user wants a long query operation to halt\r
-** immediately.\r
-**\r
-** ^It is safe to call this routine from a thread different from the\r
-** thread that is currently running the database operation. But it\r
-** is not safe to call this routine with a [database connection] that\r
-** is closed or might close before sqlite3_interrupt() returns.\r
-**\r
-** ^If an SQL operation is very nearly finished at the time when\r
-** sqlite3_interrupt() is called, then it might not have an opportunity\r
-** to be interrupted and might continue to completion.\r
-**\r
-** ^An SQL operation that is interrupted will return [SQLITE_INTERRUPT].\r
-** ^If the interrupted SQL operation is an INSERT, UPDATE, or DELETE\r
-** that is inside an explicit transaction, then the entire transaction\r
-** will be rolled back automatically.\r
-**\r
-** ^The sqlite3_interrupt(D) call is in effect until all currently running\r
-** SQL statements on [database connection] D complete. ^Any new SQL statements\r
-** that are started after the sqlite3_interrupt() call and before the \r
-** running statements reaches zero are interrupted as if they had been\r
-** running prior to the sqlite3_interrupt() call. ^New SQL statements\r
-** that are started after the running statement count reaches zero are\r
-** not effected by the sqlite3_interrupt().\r
-** ^A call to sqlite3_interrupt(D) that occurs when there are no running\r
-** SQL statements is a no-op and has no effect on SQL statements\r
-** that are started after the sqlite3_interrupt() call returns.\r
-**\r
-** If the database connection closes while [sqlite3_interrupt()]\r
-** is running then bad things will likely happen.\r
-*/\r
-SQLITE_API void sqlite3_interrupt(sqlite3*);\r
-\r
-/*\r
-** CAPI3REF: Determine If An SQL Statement Is Complete\r
-**\r
-** These routines are useful during command-line input to determine if the\r
-** currently entered text seems to form a complete SQL statement or\r
-** if additional input is needed before sending the text into\r
-** SQLite for parsing. ^These routines return 1 if the input string\r
-** appears to be a complete SQL statement. ^A statement is judged to be\r
-** complete if it ends with a semicolon token and is not a prefix of a\r
-** well-formed CREATE TRIGGER statement. ^Semicolons that are embedded within\r
-** string literals or quoted identifier names or comments are not\r
-** independent tokens (they are part of the token in which they are\r
-** embedded) and thus do not count as a statement terminator. ^Whitespace\r
-** and comments that follow the final semicolon are ignored.\r
-**\r
-** ^These routines return 0 if the statement is incomplete. ^If a\r
-** memory allocation fails, then SQLITE_NOMEM is returned.\r
-**\r
-** ^These routines do not parse the SQL statements thus\r
-** will not detect syntactically incorrect SQL.\r
-**\r
-** ^(If SQLite has not been initialized using [sqlite3_initialize()] prior \r
-** to invoking sqlite3_complete16() then sqlite3_initialize() is invoked\r
-** automatically by sqlite3_complete16(). If that initialization fails,\r
-** then the return value from sqlite3_complete16() will be non-zero\r
-** regardless of whether or not the input SQL is complete.)^\r
-**\r
-** The input to [sqlite3_complete()] must be a zero-terminated\r
-** UTF-8 string.\r
-**\r
-** The input to [sqlite3_complete16()] must be a zero-terminated\r
-** UTF-16 string in native byte order.\r
-*/\r
-SQLITE_API int sqlite3_complete(const char *sql);\r
-SQLITE_API int sqlite3_complete16(const void *sql);\r
-\r
-/*\r
-** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors\r
-**\r
-** ^This routine sets a callback function that might be invoked whenever\r
-** an attempt is made to open a database table that another thread\r
-** or process has locked.\r
-**\r
-** ^If the busy callback is NULL, then [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED]\r
-** is returned immediately upon encountering the lock. ^If the busy callback\r
-** is not NULL, then the callback might be invoked with two arguments.\r
-**\r
-** ^The first argument to the busy handler is a copy of the void* pointer which\r
-** is the third argument to sqlite3_busy_handler(). ^The second argument to\r
-** the busy handler callback is the number of times that the busy handler has\r
-** been invoked for this locking event. ^If the\r
-** busy callback returns 0, then no additional attempts are made to\r
-** access the database and [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED] is returned.\r
-** ^If the callback returns non-zero, then another attempt\r
-** is made to open the database for reading and the cycle repeats.\r
-**\r
-** The presence of a busy handler does not guarantee that it will be invoked\r
-** when there is lock contention. ^If SQLite determines that invoking the busy\r
-** handler could result in a deadlock, it will go ahead and return [SQLITE_BUSY]\r
-** or [SQLITE_IOERR_BLOCKED] instead of invoking the busy handler.\r
-** Consider a scenario where one process is holding a read lock that\r
-** it is trying to promote to a reserved lock and\r
-** a second process is holding a reserved lock that it is trying\r
-** to promote to an exclusive lock. The first process cannot proceed\r
-** because it is blocked by the second and the second process cannot\r
-** proceed because it is blocked by the first. If both processes\r
-** invoke the busy handlers, neither will make any progress. Therefore,\r
-** SQLite returns [SQLITE_BUSY] for the first process, hoping that this\r
-** will induce the first process to release its read lock and allow\r
-** the second process to proceed.\r
-**\r
-** ^The default busy callback is NULL.\r
-**\r
-** ^The [SQLITE_BUSY] error is converted to [SQLITE_IOERR_BLOCKED]\r
-** when SQLite is in the middle of a large transaction where all the\r
-** changes will not fit into the in-memory cache. SQLite will\r
-** already hold a RESERVED lock on the database file, but it needs\r
-** to promote this lock to EXCLUSIVE so that it can spill cache\r
-** pages into the database file without harm to concurrent\r
-** readers. ^If it is unable to promote the lock, then the in-memory\r
-** cache will be left in an inconsistent state and so the error\r
-** code is promoted from the relatively benign [SQLITE_BUSY] to\r
-** the more severe [SQLITE_IOERR_BLOCKED]. ^This error code promotion\r
-** forces an automatic rollback of the changes. See the\r
-** <a href="/cvstrac/wiki?p=CorruptionFollowingBusyError">\r
-** CorruptionFollowingBusyError</a> wiki page for a discussion of why\r
-** this is important.\r
-**\r
-** ^(There can only be a single busy handler defined for each\r
-** [database connection]. Setting a new busy handler clears any\r
-** previously set handler.)^ ^Note that calling [sqlite3_busy_timeout()]\r
-** will also set or clear the busy handler.\r
-**\r
-** The busy callback should not take any actions which modify the\r
-** database connection that invoked the busy handler. Any such actions\r
-** result in undefined behavior.\r
-** \r
-** A busy handler must not close the database connection\r
-** or [prepared statement] that invoked the busy handler.\r
-*/\r
-SQLITE_API int sqlite3_busy_handler(sqlite3*, int(*)(void*,int), void*);\r
-\r
-/*\r
-** CAPI3REF: Set A Busy Timeout\r
-**\r
-** ^This routine sets a [sqlite3_busy_handler | busy handler] that sleeps\r
-** for a specified amount of time when a table is locked. ^The handler\r
-** will sleep multiple times until at least "ms" milliseconds of sleeping\r
-** have accumulated. ^After at least "ms" milliseconds of sleeping,\r
-** the handler returns 0 which causes [sqlite3_step()] to return\r
-** [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED].\r
-**\r
-** ^Calling this routine with an argument less than or equal to zero\r
-** turns off all busy handlers.\r
-**\r
-** ^(There can only be a single busy handler for a particular\r
-** [database connection] any any given moment. If another busy handler\r
-** was defined (using [sqlite3_busy_handler()]) prior to calling\r
-** this routine, that other busy handler is cleared.)^\r
-*/\r
-SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms);\r
-\r
-/*\r
-** CAPI3REF: Convenience Routines For Running Queries\r
-**\r
-** Definition: A <b>result table</b> is memory data structure created by the\r
-** [sqlite3_get_table()] interface. A result table records the\r
-** complete query results from one or more queries.\r
-**\r
-** The table conceptually has a number of rows and columns. But\r
-** these numbers are not part of the result table itself. These\r
-** numbers are obtained separately. Let N be the number of rows\r
-** and M be the number of columns.\r
-**\r
-** A result table is an array of pointers to zero-terminated UTF-8 strings.\r
-** There are (N+1)*M elements in the array. The first M pointers point\r
-** to zero-terminated strings that contain the names of the columns.\r
-** The remaining entries all point to query results. NULL values result\r
-** in NULL pointers. All other values are in their UTF-8 zero-terminated\r
-** string representation as returned by [sqlite3_column_text()].\r
-**\r
-** A result table might consist of one or more memory allocations.\r
-** It is not safe to pass a result table directly to [sqlite3_free()].\r
-** A result table should be deallocated using [sqlite3_free_table()].\r
-**\r
-** As an example of the result table format, suppose a query result\r
-** is as follows:\r
-**\r
-** <blockquote><pre>\r
-** Name | Age\r
-** -----------------------\r
-** Alice | 43\r
-** Bob | 28\r
-** Cindy | 21\r
-** </pre></blockquote>\r
-**\r
-** There are two column (M==2) and three rows (N==3). Thus the\r
-** result table has 8 entries. Suppose the result table is stored\r
-** in an array names azResult. Then azResult holds this content:\r
-**\r
-** <blockquote><pre>\r
-** azResult[0] = "Name";\r
-** azResult[1] = "Age";\r
-** azResult[2] = "Alice";\r
-** azResult[3] = "43";\r
-** azResult[4] = "Bob";\r
-** azResult[5] = "28";\r
-** azResult[6] = "Cindy";\r
-** azResult[7] = "21";\r
-** </pre></blockquote>\r
-**\r
-** ^The sqlite3_get_table() function evaluates one or more\r
-** semicolon-separated SQL statements in the zero-terminated UTF-8\r
-** string of its 2nd parameter and returns a result table to the\r
-** pointer given in its 3rd parameter.\r
-**\r
-** After the application has finished with the result from sqlite3_get_table(),\r
-** it should pass the result table pointer to sqlite3_free_table() in order to\r
-** release the memory that was malloced. Because of the way the\r
-** [sqlite3_malloc()] happens within sqlite3_get_table(), the calling\r
-** function must not try to call [sqlite3_free()] directly. Only\r
-** [sqlite3_free_table()] is able to release the memory properly and safely.\r
-**\r
-** ^(The sqlite3_get_table() interface is implemented as a wrapper around\r
-** [sqlite3_exec()]. The sqlite3_get_table() routine does not have access\r
-** to any internal data structures of SQLite. It uses only the public\r
-** interface defined here. As a consequence, errors that occur in the\r
-** wrapper layer outside of the internal [sqlite3_exec()] call are not\r
-** reflected in subsequent calls to [sqlite3_errcode()] or\r
-** [sqlite3_errmsg()].)^\r
-*/\r
-SQLITE_API int sqlite3_get_table(\r
- sqlite3 *db, /* An open database */\r
- const char *zSql, /* SQL to be evaluated */\r
- char ***pazResult, /* Results of the query */\r
- int *pnRow, /* Number of result rows written here */\r
- int *pnColumn, /* Number of result columns written here */\r
- char **pzErrmsg /* Error msg written here */\r
-);\r
-SQLITE_API void sqlite3_free_table(char **result);\r
-\r
-/*\r
-** CAPI3REF: Formatted String Printing Functions\r
-**\r
-** These routines are work-alikes of the "printf()" family of functions\r
-** from the standard C library.\r
-**\r
-** ^The sqlite3_mprintf() and sqlite3_vmprintf() routines write their\r
-** results into memory obtained from [sqlite3_malloc()].\r
-** The strings returned by these two routines should be\r
-** released by [sqlite3_free()]. ^Both routines return a\r
-** NULL pointer if [sqlite3_malloc()] is unable to allocate enough\r
-** memory to hold the resulting string.\r
-**\r
-** ^(In sqlite3_snprintf() routine is similar to "snprintf()" from\r
-** the standard C library. The result is written into the\r
-** buffer supplied as the second parameter whose size is given by\r
-** the first parameter. Note that the order of the\r
-** first two parameters is reversed from snprintf().)^ This is an\r
-** historical accident that cannot be fixed without breaking\r
-** backwards compatibility. ^(Note also that sqlite3_snprintf()\r
-** returns a pointer to its buffer instead of the number of\r
-** characters actually written into the buffer.)^ We admit that\r
-** the number of characters written would be a more useful return\r
-** value but we cannot change the implementation of sqlite3_snprintf()\r
-** now without breaking compatibility.\r
-**\r
-** ^As long as the buffer size is greater than zero, sqlite3_snprintf()\r
-** guarantees that the buffer is always zero-terminated. ^The first\r
-** parameter "n" is the total size of the buffer, including space for\r
-** the zero terminator. So the longest string that can be completely\r
-** written will be n-1 characters.\r
-**\r
-** These routines all implement some additional formatting\r
-** options that are useful for constructing SQL statements.\r
-** All of the usual printf() formatting options apply. In addition, there\r
-** is are "%q", "%Q", and "%z" options.\r
-**\r
-** ^(The %q option works like %s in that it substitutes a null-terminated\r
-** string from the argument list. But %q also doubles every '\'' character.\r
-** %q is designed for use inside a string literal.)^ By doubling each '\''\r
-** character it escapes that character and allows it to be inserted into\r
-** the string.\r
-**\r
-** For example, assume the string variable zText contains text as follows:\r
-**\r
-** <blockquote><pre>\r
-** char *zText = "It's a happy day!";\r
-** </pre></blockquote>\r
-**\r
-** One can use this text in an SQL statement as follows:\r
-**\r
-** <blockquote><pre>\r
-** char *zSQL = sqlite3_mprintf("INSERT INTO table VALUES('%q')", zText);\r
-** sqlite3_exec(db, zSQL, 0, 0, 0);\r
-** sqlite3_free(zSQL);\r
-** </pre></blockquote>\r
-**\r
-** Because the %q format string is used, the '\'' character in zText\r
-** is escaped and the SQL generated is as follows:\r
-**\r
-** <blockquote><pre>\r
-** INSERT INTO table1 VALUES('It''s a happy day!')\r
-** </pre></blockquote>\r
-**\r
-** This is correct. Had we used %s instead of %q, the generated SQL\r
-** would have looked like this:\r
-**\r
-** <blockquote><pre>\r
-** INSERT INTO table1 VALUES('It's a happy day!');\r
-** </pre></blockquote>\r
-**\r
-** This second example is an SQL syntax error. As a general rule you should\r
-** always use %q instead of %s when inserting text into a string literal.\r
-**\r
-** ^(The %Q option works like %q except it also adds single quotes around\r
-** the outside of the total string. Additionally, if the parameter in the\r
-** argument list is a NULL pointer, %Q substitutes the text "NULL" (without\r
-** single quotes).)^ So, for example, one could say:\r
-**\r
-** <blockquote><pre>\r
-** char *zSQL = sqlite3_mprintf("INSERT INTO table VALUES(%Q)", zText);\r
-** sqlite3_exec(db, zSQL, 0, 0, 0);\r
-** sqlite3_free(zSQL);\r
-** </pre></blockquote>\r
-**\r
-** The code above will render a correct SQL statement in the zSQL\r
-** variable even if the zText variable is a NULL pointer.\r
-**\r
-** ^(The "%z" formatting option works like "%s" but with the\r
-** addition that after the string has been read and copied into\r
-** the result, [sqlite3_free()] is called on the input string.)^\r
-*/\r
-SQLITE_API char *sqlite3_mprintf(const char*,...);\r
-SQLITE_API char *sqlite3_vmprintf(const char*, va_list);\r
-SQLITE_API char *sqlite3_snprintf(int,char*,const char*, ...);\r
-\r
-/*\r
-** CAPI3REF: Memory Allocation Subsystem\r
-**\r
-** The SQLite core uses these three routines for all of its own\r
-** internal memory allocation needs. "Core" in the previous sentence\r
-** does not include operating-system specific VFS implementation. The\r
-** Windows VFS uses native malloc() and free() for some operations.\r
-**\r
-** ^The sqlite3_malloc() routine returns a pointer to a block\r
-** of memory at least N bytes in length, where N is the parameter.\r
-** ^If sqlite3_malloc() is unable to obtain sufficient free\r
-** memory, it returns a NULL pointer. ^If the parameter N to\r
-** sqlite3_malloc() is zero or negative then sqlite3_malloc() returns\r
-** a NULL pointer.\r
-**\r
-** ^Calling sqlite3_free() with a pointer previously returned\r
-** by sqlite3_malloc() or sqlite3_realloc() releases that memory so\r
-** that it might be reused. ^The sqlite3_free() routine is\r
-** a no-op if is called with a NULL pointer. Passing a NULL pointer\r
-** to sqlite3_free() is harmless. After being freed, memory\r
-** should neither be read nor written. Even reading previously freed\r
-** memory might result in a segmentation fault or other severe error.\r
-** Memory corruption, a segmentation fault, or other severe error\r
-** might result if sqlite3_free() is called with a non-NULL pointer that\r
-** was not obtained from sqlite3_malloc() or sqlite3_realloc().\r
-**\r
-** ^(The sqlite3_realloc() interface attempts to resize a\r
-** prior memory allocation to be at least N bytes, where N is the\r
-** second parameter. The memory allocation to be resized is the first\r
-** parameter.)^ ^ If the first parameter to sqlite3_realloc()\r
-** is a NULL pointer then its behavior is identical to calling\r
-** sqlite3_malloc(N) where N is the second parameter to sqlite3_realloc().\r
-** ^If the second parameter to sqlite3_realloc() is zero or\r
-** negative then the behavior is exactly the same as calling\r
-** sqlite3_free(P) where P is the first parameter to sqlite3_realloc().\r
-** ^sqlite3_realloc() returns a pointer to a memory allocation\r
-** of at least N bytes in size or NULL if sufficient memory is unavailable.\r
-** ^If M is the size of the prior allocation, then min(N,M) bytes\r
-** of the prior allocation are copied into the beginning of buffer returned\r
-** by sqlite3_realloc() and the prior allocation is freed.\r
-** ^If sqlite3_realloc() returns NULL, then the prior allocation\r
-** is not freed.\r
-**\r
-** ^The memory returned by sqlite3_malloc() and sqlite3_realloc()\r
-** is always aligned to at least an 8 byte boundary.\r
-**\r
-** In SQLite version 3.5.0 and 3.5.1, it was possible to define\r
-** the SQLITE_OMIT_MEMORY_ALLOCATION which would cause the built-in\r
-** implementation of these routines to be omitted. That capability\r
-** is no longer provided. Only built-in memory allocators can be used.\r
-**\r
-** The Windows OS interface layer calls\r
-** the system malloc() and free() directly when converting\r
-** filenames between the UTF-8 encoding used by SQLite\r
-** and whatever filename encoding is used by the particular Windows\r
-** installation. Memory allocation errors are detected, but\r
-** they are reported back as [SQLITE_CANTOPEN] or\r
-** [SQLITE_IOERR] rather than [SQLITE_NOMEM].\r
-**\r
-** The pointer arguments to [sqlite3_free()] and [sqlite3_realloc()]\r
-** must be either NULL or else pointers obtained from a prior\r
-** invocation of [sqlite3_malloc()] or [sqlite3_realloc()] that have\r
-** not yet been released.\r
-**\r
-** The application must not read or write any part of\r
-** a block of memory after it has been released using\r
-** [sqlite3_free()] or [sqlite3_realloc()].\r
-*/\r
-SQLITE_API void *sqlite3_malloc(int);\r
-SQLITE_API void *sqlite3_realloc(void*, int);\r
-SQLITE_API void sqlite3_free(void*);\r
-\r
-/*\r
-** CAPI3REF: Memory Allocator Statistics\r
-**\r
-** SQLite provides these two interfaces for reporting on the status\r
-** of the [sqlite3_malloc()], [sqlite3_free()], and [sqlite3_realloc()]\r
-** routines, which form the built-in memory allocation subsystem.\r
-**\r
-** ^The [sqlite3_memory_used()] routine returns the number of bytes\r
-** of memory currently outstanding (malloced but not freed).\r
-** ^The [sqlite3_memory_highwater()] routine returns the maximum\r
-** value of [sqlite3_memory_used()] since the high-water mark\r
-** was last reset. ^The values returned by [sqlite3_memory_used()] and\r
-** [sqlite3_memory_highwater()] include any overhead\r
-** added by SQLite in its implementation of [sqlite3_malloc()],\r
-** but not overhead added by the any underlying system library\r
-** routines that [sqlite3_malloc()] may call.\r
-**\r
-** ^The memory high-water mark is reset to the current value of\r
-** [sqlite3_memory_used()] if and only if the parameter to\r
-** [sqlite3_memory_highwater()] is true. ^The value returned\r
-** by [sqlite3_memory_highwater(1)] is the high-water mark\r
-** prior to the reset.\r
-*/\r
-SQLITE_API sqlite3_int64 sqlite3_memory_used(void);\r
-SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag);\r
-\r
-/*\r
-** CAPI3REF: Pseudo-Random Number Generator\r
-**\r
-** SQLite contains a high-quality pseudo-random number generator (PRNG) used to\r
-** select random [ROWID | ROWIDs] when inserting new records into a table that\r
-** already uses the largest possible [ROWID]. The PRNG is also used for\r
-** the build-in random() and randomblob() SQL functions. This interface allows\r
-** applications to access the same PRNG for other purposes.\r
-**\r
-** ^A call to this routine stores N bytes of randomness into buffer P.\r
-**\r
-** ^The first time this routine is invoked (either internally or by\r
-** the application) the PRNG is seeded using randomness obtained\r
-** from the xRandomness method of the default [sqlite3_vfs] object.\r
-** ^On all subsequent invocations, the pseudo-randomness is generated\r
-** internally and without recourse to the [sqlite3_vfs] xRandomness\r
-** method.\r
-*/\r
-SQLITE_API void sqlite3_randomness(int N, void *P);\r
-\r
-/*\r
-** CAPI3REF: Compile-Time Authorization Callbacks\r
-**\r
-** ^This routine registers a authorizer callback with a particular\r
-** [database connection], supplied in the first argument.\r
-** ^The authorizer callback is invoked as SQL statements are being compiled\r
-** by [sqlite3_prepare()] or its variants [sqlite3_prepare_v2()],\r
-** [sqlite3_prepare16()] and [sqlite3_prepare16_v2()]. ^At various\r
-** points during the compilation process, as logic is being created\r
-** to perform various actions, the authorizer callback is invoked to\r
-** see if those actions are allowed. ^The authorizer callback should\r
-** return [SQLITE_OK] to allow the action, [SQLITE_IGNORE] to disallow the\r
-** specific action but allow the SQL statement to continue to be\r
-** compiled, or [SQLITE_DENY] to cause the entire SQL statement to be\r
-** rejected with an error. ^If the authorizer callback returns\r
-** any value other than [SQLITE_IGNORE], [SQLITE_OK], or [SQLITE_DENY]\r
-** then the [sqlite3_prepare_v2()] or equivalent call that triggered\r
-** the authorizer will fail with an error message.\r
-**\r
-** When the callback returns [SQLITE_OK], that means the operation\r
-** requested is ok. ^When the callback returns [SQLITE_DENY], the\r
-** [sqlite3_prepare_v2()] or equivalent call that triggered the\r
-** authorizer will fail with an error message explaining that\r
-** access is denied. \r
-**\r
-** ^The first parameter to the authorizer callback is a copy of the third\r
-** parameter to the sqlite3_set_authorizer() interface. ^The second parameter\r
-** to the callback is an integer [SQLITE_COPY | action code] that specifies\r
-** the particular action to be authorized. ^The third through sixth parameters\r
-** to the callback are zero-terminated strings that contain additional\r
-** details about the action to be authorized.\r
-**\r
-** ^If the action code is [SQLITE_READ]\r
-** and the callback returns [SQLITE_IGNORE] then the\r
-** [prepared statement] statement is constructed to substitute\r
-** a NULL value in place of the table column that would have\r
-** been read if [SQLITE_OK] had been returned. The [SQLITE_IGNORE]\r
-** return can be used to deny an untrusted user access to individual\r
-** columns of a table.\r
-** ^If the action code is [SQLITE_DELETE] and the callback returns\r
-** [SQLITE_IGNORE] then the [DELETE] operation proceeds but the\r
-** [truncate optimization] is disabled and all rows are deleted individually.\r
-**\r
-** An authorizer is used when [sqlite3_prepare | preparing]\r
-** SQL statements from an untrusted source, to ensure that the SQL statements\r
-** do not try to access data they are not allowed to see, or that they do not\r
-** try to execute malicious statements that damage the database. For\r
-** example, an application may allow a user to enter arbitrary\r
-** SQL queries for evaluation by a database. But the application does\r
-** not want the user to be able to make arbitrary changes to the\r
-** database. An authorizer could then be put in place while the\r
-** user-entered SQL is being [sqlite3_prepare | prepared] that\r
-** disallows everything except [SELECT] statements.\r
-**\r
-** Applications that need to process SQL from untrusted sources\r
-** might also consider lowering resource limits using [sqlite3_limit()]\r
-** and limiting database size using the [max_page_count] [PRAGMA]\r
-** in addition to using an authorizer.\r
-**\r
-** ^(Only a single authorizer can be in place on a database connection\r
-** at a time. Each call to sqlite3_set_authorizer overrides the\r
-** previous call.)^ ^Disable the authorizer by installing a NULL callback.\r
-** The authorizer is disabled by default.\r
-**\r
-** The authorizer callback must not do anything that will modify\r
-** the database connection that invoked the authorizer callback.\r
-** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their\r
-** database connections for the meaning of "modify" in this paragraph.\r
-**\r
-** ^When [sqlite3_prepare_v2()] is used to prepare a statement, the\r
-** statement might be re-prepared during [sqlite3_step()] due to a \r
-** schema change. Hence, the application should ensure that the\r
-** correct authorizer callback remains in place during the [sqlite3_step()].\r
-**\r
-** ^Note that the authorizer callback is invoked only during\r
-** [sqlite3_prepare()] or its variants. Authorization is not\r
-** performed during statement evaluation in [sqlite3_step()], unless\r
-** as stated in the previous paragraph, sqlite3_step() invokes\r
-** sqlite3_prepare_v2() to reprepare a statement after a schema change.\r
-*/\r
-SQLITE_API int sqlite3_set_authorizer(\r
- sqlite3*,\r
- int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),\r
- void *pUserData\r
-);\r
-\r
-/*\r
-** CAPI3REF: Authorizer Return Codes\r
-**\r
-** The [sqlite3_set_authorizer | authorizer callback function] must\r
-** return either [SQLITE_OK] or one of these two constants in order\r
-** to signal SQLite whether or not the action is permitted. See the\r
-** [sqlite3_set_authorizer | authorizer documentation] for additional\r
-** information.\r
-*/\r
-#define SQLITE_DENY 1 /* Abort the SQL statement with an error */\r
-#define SQLITE_IGNORE 2 /* Don't allow access, but don't generate an error */\r
-\r
-/*\r
-** CAPI3REF: Authorizer Action Codes\r
-**\r
-** The [sqlite3_set_authorizer()] interface registers a callback function\r
-** that is invoked to authorize certain SQL statement actions. The\r
-** second parameter to the callback is an integer code that specifies\r
-** what action is being authorized. These are the integer action codes that\r
-** the authorizer callback may be passed.\r
-**\r
-** These action code values signify what kind of operation is to be\r
-** authorized. The 3rd and 4th parameters to the authorization\r
-** callback function will be parameters or NULL depending on which of these\r
-** codes is used as the second parameter. ^(The 5th parameter to the\r
-** authorizer callback is the name of the database ("main", "temp",\r
-** etc.) if applicable.)^ ^The 6th parameter to the authorizer callback\r
-** is the name of the inner-most trigger or view that is responsible for\r
-** the access attempt or NULL if this access attempt is directly from\r
-** top-level SQL code.\r
-*/\r
-/******************************************* 3rd ************ 4th ***********/\r
-#define SQLITE_CREATE_INDEX 1 /* Index Name Table Name */\r
-#define SQLITE_CREATE_TABLE 2 /* Table Name NULL */\r
-#define SQLITE_CREATE_TEMP_INDEX 3 /* Index Name Table Name */\r
-#define SQLITE_CREATE_TEMP_TABLE 4 /* Table Name NULL */\r
-#define SQLITE_CREATE_TEMP_TRIGGER 5 /* Trigger Name Table Name */\r
-#define SQLITE_CREATE_TEMP_VIEW 6 /* View Name NULL */\r
-#define SQLITE_CREATE_TRIGGER 7 /* Trigger Name Table Name */\r
-#define SQLITE_CREATE_VIEW 8 /* View Name NULL */\r
-#define SQLITE_DELETE 9 /* Table Name NULL */\r
-#define SQLITE_DROP_INDEX 10 /* Index Name Table Name */\r
-#define SQLITE_DROP_TABLE 11 /* Table Name NULL */\r
-#define SQLITE_DROP_TEMP_INDEX 12 /* Index Name Table Name */\r
-#define SQLITE_DROP_TEMP_TABLE 13 /* Table Name NULL */\r
-#define SQLITE_DROP_TEMP_TRIGGER 14 /* Trigger Name Table Name */\r
-#define SQLITE_DROP_TEMP_VIEW 15 /* View Name NULL */\r
-#define SQLITE_DROP_TRIGGER 16 /* Trigger Name Table Name */\r
-#define SQLITE_DROP_VIEW 17 /* View Name NULL */\r
-#define SQLITE_INSERT 18 /* Table Name NULL */\r
-#define SQLITE_PRAGMA 19 /* Pragma Name 1st arg or NULL */\r
-#define SQLITE_READ 20 /* Table Name Column Name */\r
-#define SQLITE_SELECT 21 /* NULL NULL */\r
-#define SQLITE_TRANSACTION 22 /* Operation NULL */\r
-#define SQLITE_UPDATE 23 /* Table Name Column Name */\r
-#define SQLITE_ATTACH 24 /* Filename NULL */\r
-#define SQLITE_DETACH 25 /* Database Name NULL */\r
-#define SQLITE_ALTER_TABLE 26 /* Database Name Table Name */\r
-#define SQLITE_REINDEX 27 /* Index Name NULL */\r
-#define SQLITE_ANALYZE 28 /* Table Name NULL */\r
-#define SQLITE_CREATE_VTABLE 29 /* Table Name Module Name */\r
-#define SQLITE_DROP_VTABLE 30 /* Table Name Module Name */\r
-#define SQLITE_FUNCTION 31 /* NULL Function Name */\r
-#define SQLITE_SAVEPOINT 32 /* Operation Savepoint Name */\r
-#define SQLITE_COPY 0 /* No longer used */\r
-\r
-/*\r
-** CAPI3REF: Tracing And Profiling Functions\r
-** EXPERIMENTAL\r
-**\r
-** These routines register callback functions that can be used for\r
-** tracing and profiling the execution of SQL statements.\r
-**\r
-** ^The callback function registered by sqlite3_trace() is invoked at\r
-** various times when an SQL statement is being run by [sqlite3_step()].\r
-** ^The sqlite3_trace() callback is invoked with a UTF-8 rendering of the\r
-** SQL statement text as the statement first begins executing.\r
-** ^(Additional sqlite3_trace() callbacks might occur\r
-** as each triggered subprogram is entered. The callbacks for triggers\r
-** contain a UTF-8 SQL comment that identifies the trigger.)^\r
-**\r
-** ^The callback function registered by sqlite3_profile() is invoked\r
-** as each SQL statement finishes. ^The profile callback contains\r
-** the original statement text and an estimate of wall-clock time\r
-** of how long that statement took to run.\r
-*/\r
-SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*);\r
-SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_profile(sqlite3*,\r
- void(*xProfile)(void*,const char*,sqlite3_uint64), void*);\r
-\r
-/*\r
-** CAPI3REF: Query Progress Callbacks\r
-**\r
-** ^This routine configures a callback function - the\r
-** progress callback - that is invoked periodically during long\r
-** running calls to [sqlite3_exec()], [sqlite3_step()] and\r
-** [sqlite3_get_table()]. An example use for this\r
-** interface is to keep a GUI updated during a large query.\r
-**\r
-** ^If the progress callback returns non-zero, the operation is\r
-** interrupted. This feature can be used to implement a\r
-** "Cancel" button on a GUI progress dialog box.\r
-**\r
-** The progress handler must not do anything that will modify\r
-** the database connection that invoked the progress handler.\r
-** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their\r
-** database connections for the meaning of "modify" in this paragraph.\r
-**\r
-*/\r
-SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);\r
-\r
-/*\r
-** CAPI3REF: Opening A New Database Connection\r
-**\r
-** ^These routines open an SQLite database file whose name is given by the\r
-** filename argument. ^The filename argument is interpreted as UTF-8 for\r
-** sqlite3_open() and sqlite3_open_v2() and as UTF-16 in the native byte\r
-** order for sqlite3_open16(). ^(A [database connection] handle is usually\r
-** returned in *ppDb, even if an error occurs. The only exception is that\r
-** if SQLite is unable to allocate memory to hold the [sqlite3] object,\r
-** a NULL will be written into *ppDb instead of a pointer to the [sqlite3]\r
-** object.)^ ^(If the database is opened (and/or created) successfully, then\r
-** [SQLITE_OK] is returned. Otherwise an [error code] is returned.)^ ^The\r
-** [sqlite3_errmsg()] or [sqlite3_errmsg16()] routines can be used to obtain\r
-** an English language description of the error following a failure of any\r
-** of the sqlite3_open() routines.\r
-**\r
-** ^The default encoding for the database will be UTF-8 if\r
-** sqlite3_open() or sqlite3_open_v2() is called and\r
-** UTF-16 in the native byte order if sqlite3_open16() is used.\r
-**\r
-** Whether or not an error occurs when it is opened, resources\r
-** associated with the [database connection] handle should be released by\r
-** passing it to [sqlite3_close()] when it is no longer required.\r
-**\r
-** The sqlite3_open_v2() interface works like sqlite3_open()\r
-** except that it accepts two additional parameters for additional control\r
-** over the new database connection. ^(The flags parameter to\r
-** sqlite3_open_v2() can take one of\r
-** the following three values, optionally combined with the \r
-** [SQLITE_OPEN_NOMUTEX], [SQLITE_OPEN_FULLMUTEX], [SQLITE_OPEN_SHAREDCACHE],\r
-** and/or [SQLITE_OPEN_PRIVATECACHE] flags:)^\r
-**\r
-** <dl>\r
-** ^(<dt>[SQLITE_OPEN_READONLY]</dt>\r
-** <dd>The database is opened in read-only mode. If the database does not\r
-** already exist, an error is returned.</dd>)^\r
-**\r
-** ^(<dt>[SQLITE_OPEN_READWRITE]</dt>\r
-** <dd>The database is opened for reading and writing if possible, or reading\r
-** only if the file is write protected by the operating system. In either\r
-** case the database must already exist, otherwise an error is returned.</dd>)^\r
-**\r
-** ^(<dt>[SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]</dt>\r
-** <dd>The database is opened for reading and writing, and is creates it if\r
-** it does not already exist. This is the behavior that is always used for\r
-** sqlite3_open() and sqlite3_open16().</dd>)^\r
-** </dl>\r
-**\r
-** If the 3rd parameter to sqlite3_open_v2() is not one of the\r
-** combinations shown above or one of the combinations shown above combined\r
-** with the [SQLITE_OPEN_NOMUTEX], [SQLITE_OPEN_FULLMUTEX],\r
-** [SQLITE_OPEN_SHAREDCACHE] and/or [SQLITE_OPEN_SHAREDCACHE] flags,\r
-** then the behavior is undefined.\r
-**\r
-** ^If the [SQLITE_OPEN_NOMUTEX] flag is set, then the database connection\r
-** opens in the multi-thread [threading mode] as long as the single-thread\r
-** mode has not been set at compile-time or start-time. ^If the\r
-** [SQLITE_OPEN_FULLMUTEX] flag is set then the database connection opens\r
-** in the serialized [threading mode] unless single-thread was\r
-** previously selected at compile-time or start-time.\r
-** ^The [SQLITE_OPEN_SHAREDCACHE] flag causes the database connection to be\r
-** eligible to use [shared cache mode], regardless of whether or not shared\r
-** cache is enabled using [sqlite3_enable_shared_cache()]. ^The\r
-** [SQLITE_OPEN_PRIVATECACHE] flag causes the database connection to not\r
-** participate in [shared cache mode] even if it is enabled.\r
-**\r
-** ^If the filename is ":memory:", then a private, temporary in-memory database\r
-** is created for the connection. ^This in-memory database will vanish when\r
-** the database connection is closed. Future versions of SQLite might\r
-** make use of additional special filenames that begin with the ":" character.\r
-** It is recommended that when a database filename actually does begin with\r
-** a ":" character you should prefix the filename with a pathname such as\r
-** "./" to avoid ambiguity.\r
-**\r
-** ^If the filename is an empty string, then a private, temporary\r
-** on-disk database will be created. ^This private database will be\r
-** automatically deleted as soon as the database connection is closed.\r
-**\r
-** ^The fourth parameter to sqlite3_open_v2() is the name of the\r
-** [sqlite3_vfs] object that defines the operating system interface that\r
-** the new database connection should use. ^If the fourth parameter is\r
-** a NULL pointer then the default [sqlite3_vfs] object is used.\r
-**\r
-** <b>Note to Windows users:</b> The encoding used for the filename argument\r
-** of sqlite3_open() and sqlite3_open_v2() must be UTF-8, not whatever\r
-** codepage is currently defined. Filenames containing international\r
-** characters must be converted to UTF-8 prior to passing them into\r
-** sqlite3_open() or sqlite3_open_v2().\r
-*/\r
-SQLITE_API int sqlite3_open(\r
- const char *filename, /* Database filename (UTF-8) */\r
- sqlite3 **ppDb /* OUT: SQLite db handle */\r
-);\r
-SQLITE_API int sqlite3_open16(\r
- const void *filename, /* Database filename (UTF-16) */\r
- sqlite3 **ppDb /* OUT: SQLite db handle */\r
-);\r
-SQLITE_API int sqlite3_open_v2(\r
- const char *filename, /* Database filename (UTF-8) */\r
- sqlite3 **ppDb, /* OUT: SQLite db handle */\r
- int flags, /* Flags */\r
- const char *zVfs /* Name of VFS module to use */\r
-);\r
-\r
-/*\r
-** CAPI3REF: Error Codes And Messages\r
-**\r
-** ^The sqlite3_errcode() interface returns the numeric [result code] or\r
-** [extended result code] for the most recent failed sqlite3_* API call\r
-** associated with a [database connection]. If a prior API call failed\r
-** but the most recent API call succeeded, the return value from\r
-** sqlite3_errcode() is undefined. ^The sqlite3_extended_errcode()\r
-** interface is the same except that it always returns the \r
-** [extended result code] even when extended result codes are\r
-** disabled.\r
-**\r
-** ^The sqlite3_errmsg() and sqlite3_errmsg16() return English-language\r
-** text that describes the error, as either UTF-8 or UTF-16 respectively.\r
-** ^(Memory to hold the error message string is managed internally.\r
-** The application does not need to worry about freeing the result.\r
-** However, the error string might be overwritten or deallocated by\r
-** subsequent calls to other SQLite interface functions.)^\r
-**\r
-** When the serialized [threading mode] is in use, it might be the\r
-** case that a second error occurs on a separate thread in between\r
-** the time of the first error and the call to these interfaces.\r
-** When that happens, the second error will be reported since these\r
-** interfaces always report the most recent result. To avoid\r
-** this, each thread can obtain exclusive use of the [database connection] D\r
-** by invoking [sqlite3_mutex_enter]([sqlite3_db_mutex](D)) before beginning\r
-** to use D and invoking [sqlite3_mutex_leave]([sqlite3_db_mutex](D)) after\r
-** all calls to the interfaces listed here are completed.\r
-**\r
-** If an interface fails with SQLITE_MISUSE, that means the interface\r
-** was invoked incorrectly by the application. In that case, the\r
-** error code and message may or may not be set.\r
-*/\r
-SQLITE_API int sqlite3_errcode(sqlite3 *db);\r
-SQLITE_API int sqlite3_extended_errcode(sqlite3 *db);\r
-SQLITE_API const char *sqlite3_errmsg(sqlite3*);\r
-SQLITE_API const void *sqlite3_errmsg16(sqlite3*);\r
-\r
-/*\r
-** CAPI3REF: SQL Statement Object\r
-** KEYWORDS: {prepared statement} {prepared statements}\r
-**\r
-** An instance of this object represents a single SQL statement.\r
-** This object is variously known as a "prepared statement" or a\r
-** "compiled SQL statement" or simply as a "statement".\r
-**\r
-** The life of a statement object goes something like this:\r
-**\r
-** <ol>\r
-** <li> Create the object using [sqlite3_prepare_v2()] or a related\r
-** function.\r
-** <li> Bind values to [host parameters] using the sqlite3_bind_*()\r
-** interfaces.\r
-** <li> Run the SQL by calling [sqlite3_step()] one or more times.\r
-** <li> Reset the statement using [sqlite3_reset()] then go back\r
-** to step 2. Do this zero or more times.\r
-** <li> Destroy the object using [sqlite3_finalize()].\r
-** </ol>\r
-**\r
-** Refer to documentation on individual methods above for additional\r
-** information.\r
-*/\r
-typedef struct sqlite3_stmt sqlite3_stmt;\r
-\r
-/*\r
-** CAPI3REF: Run-time Limits\r
-**\r
-** ^(This interface allows the size of various constructs to be limited\r
-** on a connection by connection basis. The first parameter is the\r
-** [database connection] whose limit is to be set or queried. The\r
-** second parameter is one of the [limit categories] that define a\r
-** class of constructs to be size limited. The third parameter is the\r
-** new limit for that construct. The function returns the old limit.)^\r
-**\r
-** ^If the new limit is a negative number, the limit is unchanged.\r
-** ^(For the limit category of SQLITE_LIMIT_XYZ there is a \r
-** [limits | hard upper bound]\r
-** set by a compile-time C preprocessor macro named \r
-** [limits | SQLITE_MAX_XYZ].\r
-** (The "_LIMIT_" in the name is changed to "_MAX_".))^\r
-** ^Attempts to increase a limit above its hard upper bound are\r
-** silently truncated to the hard upper bound.\r
-**\r
-** Run-time limits are intended for use in applications that manage\r
-** both their own internal database and also databases that are controlled\r
-** by untrusted external sources. An example application might be a\r
-** web browser that has its own databases for storing history and\r
-** separate databases controlled by JavaScript applications downloaded\r
-** off the Internet. The internal databases can be given the\r
-** large, default limits. Databases managed by external sources can\r
-** be given much smaller limits designed to prevent a denial of service\r
-** attack. Developers might also want to use the [sqlite3_set_authorizer()]\r
-** interface to further control untrusted SQL. The size of the database\r
-** created by an untrusted script can be contained using the\r
-** [max_page_count] [PRAGMA].\r
-**\r
-** New run-time limit categories may be added in future releases.\r
-*/\r
-SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);\r
-\r
-/*\r
-** CAPI3REF: Run-Time Limit Categories\r
-** KEYWORDS: {limit category} {*limit categories}\r
-**\r
-** These constants define various performance limits\r
-** that can be lowered at run-time using [sqlite3_limit()].\r
-** The synopsis of the meanings of the various limits is shown below.\r
-** Additional information is available at [limits | Limits in SQLite].\r
-**\r
-** <dl>\r
-** ^(<dt>SQLITE_LIMIT_LENGTH</dt>\r
-** <dd>The maximum size of any string or BLOB or table row.<dd>)^\r
-**\r
-** ^(<dt>SQLITE_LIMIT_SQL_LENGTH</dt>\r
-** <dd>The maximum length of an SQL statement, in bytes.</dd>)^\r
-**\r
-** ^(<dt>SQLITE_LIMIT_COLUMN</dt>\r
-** <dd>The maximum number of columns in a table definition or in the\r
-** result set of a [SELECT] or the maximum number of columns in an index\r
-** or in an ORDER BY or GROUP BY clause.</dd>)^\r
-**\r
-** ^(<dt>SQLITE_LIMIT_EXPR_DEPTH</dt>\r
-** <dd>The maximum depth of the parse tree on any expression.</dd>)^\r
-**\r
-** ^(<dt>SQLITE_LIMIT_COMPOUND_SELECT</dt>\r
-** <dd>The maximum number of terms in a compound SELECT statement.</dd>)^\r
-**\r
-** ^(<dt>SQLITE_LIMIT_VDBE_OP</dt>\r
-** <dd>The maximum number of instructions in a virtual machine program\r
-** used to implement an SQL statement.</dd>)^\r
-**\r
-** ^(<dt>SQLITE_LIMIT_FUNCTION_ARG</dt>\r
-** <dd>The maximum number of arguments on a function.</dd>)^\r
-**\r
-** ^(<dt>SQLITE_LIMIT_ATTACHED</dt>\r
-** <dd>The maximum number of [ATTACH | attached databases].)^</dd>\r
-**\r
-** ^(<dt>SQLITE_LIMIT_LIKE_PATTERN_LENGTH</dt>\r
-** <dd>The maximum length of the pattern argument to the [LIKE] or\r
-** [GLOB] operators.</dd>)^\r
-**\r
-** ^(<dt>SQLITE_LIMIT_VARIABLE_NUMBER</dt>\r
-** <dd>The maximum number of variables in an SQL statement that can\r
-** be bound.</dd>)^\r
-**\r
-** ^(<dt>SQLITE_LIMIT_TRIGGER_DEPTH</dt>\r
-** <dd>The maximum depth of recursion for triggers.</dd>)^\r
-** </dl>\r
-*/\r
-#define SQLITE_LIMIT_LENGTH 0\r
-#define SQLITE_LIMIT_SQL_LENGTH 1\r
-#define SQLITE_LIMIT_COLUMN 2\r
-#define SQLITE_LIMIT_EXPR_DEPTH 3\r
-#define SQLITE_LIMIT_COMPOUND_SELECT 4\r
-#define SQLITE_LIMIT_VDBE_OP 5\r
-#define SQLITE_LIMIT_FUNCTION_ARG 6\r
-#define SQLITE_LIMIT_ATTACHED 7\r
-#define SQLITE_LIMIT_LIKE_PATTERN_LENGTH 8\r
-#define SQLITE_LIMIT_VARIABLE_NUMBER 9\r
-#define SQLITE_LIMIT_TRIGGER_DEPTH 10\r
-\r
-/*\r
-** CAPI3REF: Compiling An SQL Statement\r
-** KEYWORDS: {SQL statement compiler}\r
-**\r
-** To execute an SQL query, it must first be compiled into a byte-code\r
-** program using one of these routines.\r
-**\r
-** The first argument, "db", is a [database connection] obtained from a\r
-** prior successful call to [sqlite3_open()], [sqlite3_open_v2()] or\r
-** [sqlite3_open16()]. The database connection must not have been closed.\r
-**\r
-** The second argument, "zSql", is the statement to be compiled, encoded\r
-** as either UTF-8 or UTF-16. The sqlite3_prepare() and sqlite3_prepare_v2()\r
-** interfaces use UTF-8, and sqlite3_prepare16() and sqlite3_prepare16_v2()\r
-** use UTF-16.\r
-**\r
-** ^If the nByte argument is less than zero, then zSql is read up to the\r
-** first zero terminator. ^If nByte is non-negative, then it is the maximum\r
-** number of bytes read from zSql. ^When nByte is non-negative, the\r
-** zSql string ends at either the first '\000' or '\u0000' character or\r
-** the nByte-th byte, whichever comes first. If the caller knows\r
-** that the supplied string is nul-terminated, then there is a small\r
-** performance advantage to be gained by passing an nByte parameter that\r
-** is equal to the number of bytes in the input string <i>including</i>\r
-** the nul-terminator bytes.\r
-**\r
-** ^If pzTail is not NULL then *pzTail is made to point to the first byte\r
-** past the end of the first SQL statement in zSql. These routines only\r
-** compile the first statement in zSql, so *pzTail is left pointing to\r
-** what remains uncompiled.\r
-**\r
-** ^*ppStmt is left pointing to a compiled [prepared statement] that can be\r
-** executed using [sqlite3_step()]. ^If there is an error, *ppStmt is set\r
-** to NULL. ^If the input text contains no SQL (if the input is an empty\r
-** string or a comment) then *ppStmt is set to NULL.\r
-** The calling procedure is responsible for deleting the compiled\r
-** SQL statement using [sqlite3_finalize()] after it has finished with it.\r
-** ppStmt may not be NULL.\r
-**\r
-** ^On success, the sqlite3_prepare() family of routines return [SQLITE_OK];\r
-** otherwise an [error code] is returned.\r
-**\r
-** The sqlite3_prepare_v2() and sqlite3_prepare16_v2() interfaces are\r
-** recommended for all new programs. The two older interfaces are retained\r
-** for backwards compatibility, but their use is discouraged.\r
-** ^In the "v2" interfaces, the prepared statement\r
-** that is returned (the [sqlite3_stmt] object) contains a copy of the\r
-** original SQL text. This causes the [sqlite3_step()] interface to\r
-** behave differently in three ways:\r
-**\r
-** <ol>\r
-** <li>\r
-** ^If the database schema changes, instead of returning [SQLITE_SCHEMA] as it\r
-** always used to do, [sqlite3_step()] will automatically recompile the SQL\r
-** statement and try to run it again. ^If the schema has changed in\r
-** a way that makes the statement no longer valid, [sqlite3_step()] will still\r
-** return [SQLITE_SCHEMA]. But unlike the legacy behavior, [SQLITE_SCHEMA] is\r
-** now a fatal error. Calling [sqlite3_prepare_v2()] again will not make the\r
-** error go away. Note: use [sqlite3_errmsg()] to find the text\r
-** of the parsing error that results in an [SQLITE_SCHEMA] return.\r
-** </li>\r
-**\r
-** <li>\r
-** ^When an error occurs, [sqlite3_step()] will return one of the detailed\r
-** [error codes] or [extended error codes]. ^The legacy behavior was that\r
-** [sqlite3_step()] would only return a generic [SQLITE_ERROR] result code\r
-** and the application would have to make a second call to [sqlite3_reset()]\r
-** in order to find the underlying cause of the problem. With the "v2" prepare\r
-** interfaces, the underlying reason for the error is returned immediately.\r
-** </li>\r
-**\r
-** <li>\r
-** ^If the value of a [parameter | host parameter] in the WHERE clause might\r
-** change the query plan for a statement, then the statement may be\r
-** automatically recompiled (as if there had been a schema change) on the first \r
-** [sqlite3_step()] call following any change to the \r
-** [sqlite3_bind_text | bindings] of the [parameter]. \r
-** </li>\r
-** </ol>\r
-*/\r
-SQLITE_API int sqlite3_prepare(\r
- sqlite3 *db, /* Database handle */\r
- const char *zSql, /* SQL statement, UTF-8 encoded */\r
- int nByte, /* Maximum length of zSql in bytes. */\r
- sqlite3_stmt **ppStmt, /* OUT: Statement handle */\r
- const char **pzTail /* OUT: Pointer to unused portion of zSql */\r
-);\r
-SQLITE_API int sqlite3_prepare_v2(\r
- sqlite3 *db, /* Database handle */\r
- const char *zSql, /* SQL statement, UTF-8 encoded */\r
- int nByte, /* Maximum length of zSql in bytes. */\r
- sqlite3_stmt **ppStmt, /* OUT: Statement handle */\r
- const char **pzTail /* OUT: Pointer to unused portion of zSql */\r
-);\r
-SQLITE_API int sqlite3_prepare16(\r
- sqlite3 *db, /* Database handle */\r
- const void *zSql, /* SQL statement, UTF-16 encoded */\r
- int nByte, /* Maximum length of zSql in bytes. */\r
- sqlite3_stmt **ppStmt, /* OUT: Statement handle */\r
- const void **pzTail /* OUT: Pointer to unused portion of zSql */\r
-);\r
-SQLITE_API int sqlite3_prepare16_v2(\r
- sqlite3 *db, /* Database handle */\r
- const void *zSql, /* SQL statement, UTF-16 encoded */\r
- int nByte, /* Maximum length of zSql in bytes. */\r
- sqlite3_stmt **ppStmt, /* OUT: Statement handle */\r
- const void **pzTail /* OUT: Pointer to unused portion of zSql */\r
-);\r
-\r
-/*\r
-** CAPI3REF: Retrieving Statement SQL\r
-**\r
-** ^This interface can be used to retrieve a saved copy of the original\r
-** SQL text used to create a [prepared statement] if that statement was\r
-** compiled using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()].\r
-*/\r
-SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt);\r
-\r
-/*\r
-** CAPI3REF: Dynamically Typed Value Object\r
-** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value}\r
-**\r
-** SQLite uses the sqlite3_value object to represent all values\r
-** that can be stored in a database table. SQLite uses dynamic typing\r
-** for the values it stores. ^Values stored in sqlite3_value objects\r
-** can be integers, floating point values, strings, BLOBs, or NULL.\r
-**\r
-** An sqlite3_value object may be either "protected" or "unprotected".\r
-** Some interfaces require a protected sqlite3_value. Other interfaces\r
-** will accept either a protected or an unprotected sqlite3_value.\r
-** Every interface that accepts sqlite3_value arguments specifies\r
-** whether or not it requires a protected sqlite3_value.\r
-**\r
-** The terms "protected" and "unprotected" refer to whether or not\r
-** a mutex is held. A internal mutex is held for a protected\r
-** sqlite3_value object but no mutex is held for an unprotected\r
-** sqlite3_value object. If SQLite is compiled to be single-threaded\r
-** (with [SQLITE_THREADSAFE=0] and with [sqlite3_threadsafe()] returning 0)\r
-** or if SQLite is run in one of reduced mutex modes \r
-** [SQLITE_CONFIG_SINGLETHREAD] or [SQLITE_CONFIG_MULTITHREAD]\r
-** then there is no distinction between protected and unprotected\r
-** sqlite3_value objects and they can be used interchangeably. However,\r
-** for maximum code portability it is recommended that applications\r
-** still make the distinction between between protected and unprotected\r
-** sqlite3_value objects even when not strictly required.\r
-**\r
-** ^The sqlite3_value objects that are passed as parameters into the\r
-** implementation of [application-defined SQL functions] are protected.\r
-** ^The sqlite3_value object returned by\r
-** [sqlite3_column_value()] is unprotected.\r
-** Unprotected sqlite3_value objects may only be used with\r
-** [sqlite3_result_value()] and [sqlite3_bind_value()].\r
-** The [sqlite3_value_blob | sqlite3_value_type()] family of\r
-** interfaces require protected sqlite3_value objects.\r
-*/\r
-typedef struct Mem sqlite3_value;\r
-\r
-/*\r
-** CAPI3REF: SQL Function Context Object\r
-**\r
-** The context in which an SQL function executes is stored in an\r
-** sqlite3_context object. ^A pointer to an sqlite3_context object\r
-** is always first parameter to [application-defined SQL functions].\r
-** The application-defined SQL function implementation will pass this\r
-** pointer through into calls to [sqlite3_result_int | sqlite3_result()],\r
-** [sqlite3_aggregate_context()], [sqlite3_user_data()],\r
-** [sqlite3_context_db_handle()], [sqlite3_get_auxdata()],\r
-** and/or [sqlite3_set_auxdata()].\r
-*/\r
-typedef struct sqlite3_context sqlite3_context;\r
-\r
-/*\r
-** CAPI3REF: Binding Values To Prepared Statements\r
-** KEYWORDS: {host parameter} {host parameters} {host parameter name}\r
-** KEYWORDS: {SQL parameter} {SQL parameters} {parameter binding}\r
-**\r
-** ^(In the SQL statement text input to [sqlite3_prepare_v2()] and its variants,\r
-** literals may be replaced by a [parameter] that matches one of following\r
-** templates:\r
-**\r
-** <ul>\r
-** <li> ?\r
-** <li> ?NNN\r
-** <li> :VVV\r
-** <li> @VVV\r
-** <li> $VVV\r
-** </ul>\r
-**\r
-** In the templates above, NNN represents an integer literal,\r
-** and VVV represents an alphanumeric identifer.)^ ^The values of these\r
-** parameters (also called "host parameter names" or "SQL parameters")\r
-** can be set using the sqlite3_bind_*() routines defined here.\r
-**\r
-** ^The first argument to the sqlite3_bind_*() routines is always\r
-** a pointer to the [sqlite3_stmt] object returned from\r
-** [sqlite3_prepare_v2()] or its variants.\r
-**\r
-** ^The second argument is the index of the SQL parameter to be set.\r
-** ^The leftmost SQL parameter has an index of 1. ^When the same named\r
-** SQL parameter is used more than once, second and subsequent\r
-** occurrences have the same index as the first occurrence.\r
-** ^The index for named parameters can be looked up using the\r
-** [sqlite3_bind_parameter_index()] API if desired. ^The index\r
-** for "?NNN" parameters is the value of NNN.\r
-** ^The NNN value must be between 1 and the [sqlite3_limit()]\r
-** parameter [SQLITE_LIMIT_VARIABLE_NUMBER] (default value: 999).\r
-**\r
-** ^The third argument is the value to bind to the parameter.\r
-**\r
-** ^(In those routines that have a fourth argument, its value is the\r
-** number of bytes in the parameter. To be clear: the value is the\r
-** number of <u>bytes</u> in the value, not the number of characters.)^\r
-** ^If the fourth parameter is negative, the length of the string is\r
-** the number of bytes up to the first zero terminator.\r
-**\r
-** ^The fifth argument to sqlite3_bind_blob(), sqlite3_bind_text(), and\r
-** sqlite3_bind_text16() is a destructor used to dispose of the BLOB or\r
-** string after SQLite has finished with it. ^If the fifth argument is\r
-** the special value [SQLITE_STATIC], then SQLite assumes that the\r
-** information is in static, unmanaged space and does not need to be freed.\r
-** ^If the fifth argument has the value [SQLITE_TRANSIENT], then\r
-** SQLite makes its own private copy of the data immediately, before\r
-** the sqlite3_bind_*() routine returns.\r
-**\r
-** ^The sqlite3_bind_zeroblob() routine binds a BLOB of length N that\r
-** is filled with zeroes. ^A zeroblob uses a fixed amount of memory\r
-** (just an integer to hold its size) while it is being processed.\r
-** Zeroblobs are intended to serve as placeholders for BLOBs whose\r
-** content is later written using\r
-** [sqlite3_blob_open | incremental BLOB I/O] routines.\r
-** ^A negative value for the zeroblob results in a zero-length BLOB.\r
-**\r
-** ^If any of the sqlite3_bind_*() routines are called with a NULL pointer\r
-** for the [prepared statement] or with a prepared statement for which\r
-** [sqlite3_step()] has been called more recently than [sqlite3_reset()],\r
-** then the call will return [SQLITE_MISUSE]. If any sqlite3_bind_()\r
-** routine is passed a [prepared statement] that has been finalized, the\r
-** result is undefined and probably harmful.\r
-**\r
-** ^Bindings are not cleared by the [sqlite3_reset()] routine.\r
-** ^Unbound parameters are interpreted as NULL.\r
-**\r
-** ^The sqlite3_bind_* routines return [SQLITE_OK] on success or an\r
-** [error code] if anything goes wrong.\r
-** ^[SQLITE_RANGE] is returned if the parameter\r
-** index is out of range. ^[SQLITE_NOMEM] is returned if malloc() fails.\r
-**\r
-** See also: [sqlite3_bind_parameter_count()],\r
-** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()].\r
-*/\r
-SQLITE_API int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));\r
-SQLITE_API int sqlite3_bind_double(sqlite3_stmt*, int, double);\r
-SQLITE_API int sqlite3_bind_int(sqlite3_stmt*, int, int);\r
-SQLITE_API int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64);\r
-SQLITE_API int sqlite3_bind_null(sqlite3_stmt*, int);\r
-SQLITE_API int sqlite3_bind_text(sqlite3_stmt*, int, const char*, int n, void(*)(void*));\r
-SQLITE_API int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));\r
-SQLITE_API int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);\r
-SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);\r
-\r
-/*\r
-** CAPI3REF: Number Of SQL Parameters\r
-**\r
-** ^This routine can be used to find the number of [SQL parameters]\r
-** in a [prepared statement]. SQL parameters are tokens of the\r
-** form "?", "?NNN", ":AAA", "$AAA", or "@AAA" that serve as\r
-** placeholders for values that are [sqlite3_bind_blob | bound]\r
-** to the parameters at a later time.\r
-**\r
-** ^(This routine actually returns the index of the largest (rightmost)\r
-** parameter. For all forms except ?NNN, this will correspond to the\r
-** number of unique parameters. If parameters of the ?NNN form are used,\r
-** there may be gaps in the list.)^\r
-**\r
-** See also: [sqlite3_bind_blob|sqlite3_bind()],\r
-** [sqlite3_bind_parameter_name()], and\r
-** [sqlite3_bind_parameter_index()].\r
-*/\r
-SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt*);\r
-\r
-/*\r
-** CAPI3REF: Name Of A Host Parameter\r
-**\r
-** ^The sqlite3_bind_parameter_name(P,N) interface returns\r
-** the name of the N-th [SQL parameter] in the [prepared statement] P.\r
-** ^(SQL parameters of the form "?NNN" or ":AAA" or "@AAA" or "$AAA"\r
-** have a name which is the string "?NNN" or ":AAA" or "@AAA" or "$AAA"\r
-** respectively.\r
-** In other words, the initial ":" or "$" or "@" or "?"\r
-** is included as part of the name.)^\r
-** ^Parameters of the form "?" without a following integer have no name\r
-** and are referred to as "nameless" or "anonymous parameters".\r
-**\r
-** ^The first host parameter has an index of 1, not 0.\r
-**\r
-** ^If the value N is out of range or if the N-th parameter is\r
-** nameless, then NULL is returned. ^The returned string is\r
-** always in UTF-8 encoding even if the named parameter was\r
-** originally specified as UTF-16 in [sqlite3_prepare16()] or\r
-** [sqlite3_prepare16_v2()].\r
-**\r
-** See also: [sqlite3_bind_blob|sqlite3_bind()],\r
-** [sqlite3_bind_parameter_count()], and\r
-** [sqlite3_bind_parameter_index()].\r
-*/\r
-SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int);\r
-\r
-/*\r
-** CAPI3REF: Index Of A Parameter With A Given Name\r
-**\r
-** ^Return the index of an SQL parameter given its name. ^The\r
-** index value returned is suitable for use as the second\r
-** parameter to [sqlite3_bind_blob|sqlite3_bind()]. ^A zero\r
-** is returned if no matching parameter is found. ^The parameter\r
-** name must be given in UTF-8 even if the original statement\r
-** was prepared from UTF-16 text using [sqlite3_prepare16_v2()].\r
-**\r
-** See also: [sqlite3_bind_blob|sqlite3_bind()],\r
-** [sqlite3_bind_parameter_count()], and\r
-** [sqlite3_bind_parameter_index()].\r
-*/\r
-SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);\r
-\r
-/*\r
-** CAPI3REF: Reset All Bindings On A Prepared Statement\r
-**\r
-** ^Contrary to the intuition of many, [sqlite3_reset()] does not reset\r
-** the [sqlite3_bind_blob | bindings] on a [prepared statement].\r
-** ^Use this routine to reset all host parameters to NULL.\r
-*/\r
-SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*);\r
-\r
-/*\r
-** CAPI3REF: Number Of Columns In A Result Set\r
-**\r
-** ^Return the number of columns in the result set returned by the\r
-** [prepared statement]. ^This routine returns 0 if pStmt is an SQL\r
-** statement that does not return data (for example an [UPDATE]).\r
-*/\r
-SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt);\r
-\r
-/*\r
-** CAPI3REF: Column Names In A Result Set\r
-**\r
-** ^These routines return the name assigned to a particular column\r
-** in the result set of a [SELECT] statement. ^The sqlite3_column_name()\r
-** interface returns a pointer to a zero-terminated UTF-8 string\r
-** and sqlite3_column_name16() returns a pointer to a zero-terminated\r
-** UTF-16 string. ^The first parameter is the [prepared statement]\r
-** that implements the [SELECT] statement. ^The second parameter is the\r
-** column number. ^The leftmost column is number 0.\r
-**\r
-** ^The returned string pointer is valid until either the [prepared statement]\r
-** is destroyed by [sqlite3_finalize()] or until the next call to\r
-** sqlite3_column_name() or sqlite3_column_name16() on the same column.\r
-**\r
-** ^If sqlite3_malloc() fails during the processing of either routine\r
-** (for example during a conversion from UTF-8 to UTF-16) then a\r
-** NULL pointer is returned.\r
-**\r
-** ^The name of a result column is the value of the "AS" clause for\r
-** that column, if there is an AS clause. If there is no AS clause\r
-** then the name of the column is unspecified and may change from\r
-** one release of SQLite to the next.\r
-*/\r
-SQLITE_API const char *sqlite3_column_name(sqlite3_stmt*, int N);\r
-SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N);\r
-\r
-/*\r
-** CAPI3REF: Source Of Data In A Query Result\r
-**\r
-** ^These routines provide a means to determine the database, table, and\r
-** table column that is the origin of a particular result column in\r
-** [SELECT] statement.\r
-** ^The name of the database or table or column can be returned as\r
-** either a UTF-8 or UTF-16 string. ^The _database_ routines return\r
-** the database name, the _table_ routines return the table name, and\r
-** the origin_ routines return the column name.\r
-** ^The returned string is valid until the [prepared statement] is destroyed\r
-** using [sqlite3_finalize()] or until the same information is requested\r
-** again in a different encoding.\r
-**\r
-** ^The names returned are the original un-aliased names of the\r
-** database, table, and column.\r
-**\r
-** ^The first argument to these interfaces is a [prepared statement].\r
-** ^These functions return information about the Nth result column returned by\r
-** the statement, where N is the second function argument.\r
-** ^The left-most column is column 0 for these routines.\r
-**\r
-** ^If the Nth column returned by the statement is an expression or\r
-** subquery and is not a column value, then all of these functions return\r
-** NULL. ^These routine might also return NULL if a memory allocation error\r
-** occurs. ^Otherwise, they return the name of the attached database, table,\r
-** or column that query result column was extracted from.\r
-**\r
-** ^As with all other SQLite APIs, those whose names end with "16" return\r
-** UTF-16 encoded strings and the other functions return UTF-8.\r
-**\r
-** ^These APIs are only available if the library was compiled with the\r
-** [SQLITE_ENABLE_COLUMN_METADATA] C-preprocessor symbol.\r
-**\r
-** If two or more threads call one or more of these routines against the same\r
-** prepared statement and column at the same time then the results are\r
-** undefined.\r
-**\r
-** If two or more threads call one or more\r
-** [sqlite3_column_database_name | column metadata interfaces]\r
-** for the same [prepared statement] and result column\r
-** at the same time then the results are undefined.\r
-*/\r
-SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt*,int);\r
-SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt*,int);\r
-SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt*,int);\r
-SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt*,int);\r
-SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt*,int);\r
-SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt*,int);\r
-\r
-/*\r
-** CAPI3REF: Declared Datatype Of A Query Result\r
-**\r
-** ^(The first parameter is a [prepared statement].\r
-** If this statement is a [SELECT] statement and the Nth column of the\r
-** returned result set of that [SELECT] is a table column (not an\r
-** expression or subquery) then the declared type of the table\r
-** column is returned.)^ ^If the Nth column of the result set is an\r
-** expression or subquery, then a NULL pointer is returned.\r
-** ^The returned string is always UTF-8 encoded.\r
-**\r
-** ^(For example, given the database schema:\r
-**\r
-** CREATE TABLE t1(c1 VARIANT);\r
-**\r
-** and the following statement to be compiled:\r
-**\r
-** SELECT c1 + 1, c1 FROM t1;\r
-**\r
-** this routine would return the string "VARIANT" for the second result\r
-** column (i==1), and a NULL pointer for the first result column (i==0).)^\r
-**\r
-** ^SQLite uses dynamic run-time typing. ^So just because a column\r
-** is declared to contain a particular type does not mean that the\r
-** data stored in that column is of the declared type. SQLite is\r
-** strongly typed, but the typing is dynamic not static. ^Type\r
-** is associated with individual values, not with the containers\r
-** used to hold those values.\r
-*/\r
-SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt*,int);\r
-SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int);\r
-\r
-/*\r
-** CAPI3REF: Evaluate An SQL Statement\r
-**\r
-** After a [prepared statement] has been prepared using either\r
-** [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] or one of the legacy\r
-** interfaces [sqlite3_prepare()] or [sqlite3_prepare16()], this function\r
-** must be called one or more times to evaluate the statement.\r
-**\r
-** The details of the behavior of the sqlite3_step() interface depend\r
-** on whether the statement was prepared using the newer "v2" interface\r
-** [sqlite3_prepare_v2()] and [sqlite3_prepare16_v2()] or the older legacy\r
-** interface [sqlite3_prepare()] and [sqlite3_prepare16()]. The use of the\r
-** new "v2" interface is recommended for new applications but the legacy\r
-** interface will continue to be supported.\r
-**\r
-** ^In the legacy interface, the return value will be either [SQLITE_BUSY],\r
-** [SQLITE_DONE], [SQLITE_ROW], [SQLITE_ERROR], or [SQLITE_MISUSE].\r
-** ^With the "v2" interface, any of the other [result codes] or\r
-** [extended result codes] might be returned as well.\r
-**\r
-** ^[SQLITE_BUSY] means that the database engine was unable to acquire the\r
-** database locks it needs to do its job. ^If the statement is a [COMMIT]\r
-** or occurs outside of an explicit transaction, then you can retry the\r
-** statement. If the statement is not a [COMMIT] and occurs within a\r
-** explicit transaction then you should rollback the transaction before\r
-** continuing.\r
-**\r
-** ^[SQLITE_DONE] means that the statement has finished executing\r
-** successfully. sqlite3_step() should not be called again on this virtual\r
-** machine without first calling [sqlite3_reset()] to reset the virtual\r
-** machine back to its initial state.\r
-**\r
-** ^If the SQL statement being executed returns any data, then [SQLITE_ROW]\r
-** is returned each time a new row of data is ready for processing by the\r
-** caller. The values may be accessed using the [column access functions].\r
-** sqlite3_step() is called again to retrieve the next row of data.\r
-**\r
-** ^[SQLITE_ERROR] means that a run-time error (such as a constraint\r
-** violation) has occurred. sqlite3_step() should not be called again on\r
-** the VM. More information may be found by calling [sqlite3_errmsg()].\r
-** ^With the legacy interface, a more specific error code (for example,\r
-** [SQLITE_INTERRUPT], [SQLITE_SCHEMA], [SQLITE_CORRUPT], and so forth)\r
-** can be obtained by calling [sqlite3_reset()] on the\r
-** [prepared statement]. ^In the "v2" interface,\r
-** the more specific error code is returned directly by sqlite3_step().\r
-**\r
-** [SQLITE_MISUSE] means that the this routine was called inappropriately.\r
-** Perhaps it was called on a [prepared statement] that has\r
-** already been [sqlite3_finalize | finalized] or on one that had\r
-** previously returned [SQLITE_ERROR] or [SQLITE_DONE]. Or it could\r
-** be the case that the same database connection is being used by two or\r
-** more threads at the same moment in time.\r
-**\r
-** <b>Goofy Interface Alert:</b> In the legacy interface, the sqlite3_step()\r
-** API always returns a generic error code, [SQLITE_ERROR], following any\r
-** error other than [SQLITE_BUSY] and [SQLITE_MISUSE]. You must call\r
-** [sqlite3_reset()] or [sqlite3_finalize()] in order to find one of the\r
-** specific [error codes] that better describes the error.\r
-** We admit that this is a goofy design. The problem has been fixed\r
-** with the "v2" interface. If you prepare all of your SQL statements\r
-** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead\r
-** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces,\r
-** then the more specific [error codes] are returned directly\r
-** by sqlite3_step(). The use of the "v2" interface is recommended.\r
-*/\r
-SQLITE_API int sqlite3_step(sqlite3_stmt*);\r
-\r
-/*\r
-** CAPI3REF: Number of columns in a result set\r
-**\r
-** ^The sqlite3_data_count(P) the number of columns in the\r
-** of the result set of [prepared statement] P.\r
-*/\r
-SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt);\r
-\r
-/*\r
-** CAPI3REF: Fundamental Datatypes\r
-** KEYWORDS: SQLITE_TEXT\r
-**\r
-** ^(Every value in SQLite has one of five fundamental datatypes:\r
-**\r
-** <ul>\r
-** <li> 64-bit signed integer\r
-** <li> 64-bit IEEE floating point number\r
-** <li> string\r
-** <li> BLOB\r
-** <li> NULL\r
-** </ul>)^\r
-**\r
-** These constants are codes for each of those types.\r
-**\r
-** Note that the SQLITE_TEXT constant was also used in SQLite version 2\r
-** for a completely different meaning. Software that links against both\r
-** SQLite version 2 and SQLite version 3 should use SQLITE3_TEXT, not\r
-** SQLITE_TEXT.\r
-*/\r
-#define SQLITE_INTEGER 1\r
-#define SQLITE_FLOAT 2\r
-#define SQLITE_BLOB 4\r
-#define SQLITE_NULL 5\r
-#ifdef SQLITE_TEXT\r
-# undef SQLITE_TEXT\r
-#else\r
-# define SQLITE_TEXT 3\r
-#endif\r
-#define SQLITE3_TEXT 3\r
-\r
-/*\r
-** CAPI3REF: Result Values From A Query\r
-** KEYWORDS: {column access functions}\r
-**\r
-** These routines form the "result set" interface.\r
-**\r
-** ^These routines return information about a single column of the current\r
-** result row of a query. ^In every case the first argument is a pointer\r
-** to the [prepared statement] that is being evaluated (the [sqlite3_stmt*]\r
-** that was returned from [sqlite3_prepare_v2()] or one of its variants)\r
-** and the second argument is the index of the column for which information\r
-** should be returned. ^The leftmost column of the result set has the index 0.\r
-** ^The number of columns in the result can be determined using\r
-** [sqlite3_column_count()].\r
-**\r
-** If the SQL statement does not currently point to a valid row, or if the\r
-** column index is out of range, the result is undefined.\r
-** These routines may only be called when the most recent call to\r
-** [sqlite3_step()] has returned [SQLITE_ROW] and neither\r
-** [sqlite3_reset()] nor [sqlite3_finalize()] have been called subsequently.\r
-** If any of these routines are called after [sqlite3_reset()] or\r
-** [sqlite3_finalize()] or after [sqlite3_step()] has returned\r
-** something other than [SQLITE_ROW], the results are undefined.\r
-** If [sqlite3_step()] or [sqlite3_reset()] or [sqlite3_finalize()]\r
-** are called from a different thread while any of these routines\r
-** are pending, then the results are undefined.\r
-**\r
-** ^The sqlite3_column_type() routine returns the\r
-** [SQLITE_INTEGER | datatype code] for the initial data type\r
-** of the result column. ^The returned value is one of [SQLITE_INTEGER],\r
-** [SQLITE_FLOAT], [SQLITE_TEXT], [SQLITE_BLOB], or [SQLITE_NULL]. The value\r
-** returned by sqlite3_column_type() is only meaningful if no type\r
-** conversions have occurred as described below. After a type conversion,\r
-** the value returned by sqlite3_column_type() is undefined. Future\r
-** versions of SQLite may change the behavior of sqlite3_column_type()\r
-** following a type conversion.\r
-**\r
-** ^If the result is a BLOB or UTF-8 string then the sqlite3_column_bytes()\r
-** routine returns the number of bytes in that BLOB or string.\r
-** ^If the result is a UTF-16 string, then sqlite3_column_bytes() converts\r
-** the string to UTF-8 and then returns the number of bytes.\r
-** ^If the result is a numeric value then sqlite3_column_bytes() uses\r
-** [sqlite3_snprintf()] to convert that value to a UTF-8 string and returns\r
-** the number of bytes in that string.\r
-** ^The value returned does not include the zero terminator at the end\r
-** of the string. ^For clarity: the value returned is the number of\r
-** bytes in the string, not the number of characters.\r
-**\r
-** ^Strings returned by sqlite3_column_text() and sqlite3_column_text16(),\r
-** even empty strings, are always zero terminated. ^The return\r
-** value from sqlite3_column_blob() for a zero-length BLOB is an arbitrary\r
-** pointer, possibly even a NULL pointer.\r
-**\r
-** ^The sqlite3_column_bytes16() routine is similar to sqlite3_column_bytes()\r
-** but leaves the result in UTF-16 in native byte order instead of UTF-8.\r
-** ^The zero terminator is not included in this count.\r
-**\r
-** ^The object returned by [sqlite3_column_value()] is an\r
-** [unprotected sqlite3_value] object. An unprotected sqlite3_value object\r
-** may only be used with [sqlite3_bind_value()] and [sqlite3_result_value()].\r
-** If the [unprotected sqlite3_value] object returned by\r
-** [sqlite3_column_value()] is used in any other way, including calls\r
-** to routines like [sqlite3_value_int()], [sqlite3_value_text()],\r
-** or [sqlite3_value_bytes()], then the behavior is undefined.\r
-**\r
-** These routines attempt to convert the value where appropriate. ^For\r
-** example, if the internal representation is FLOAT and a text result\r
-** is requested, [sqlite3_snprintf()] is used internally to perform the\r
-** conversion automatically. ^(The following table details the conversions\r
-** that are applied:\r
-**\r
-** <blockquote>\r
-** <table border="1">\r
-** <tr><th> Internal<br>Type <th> Requested<br>Type <th> Conversion\r
-**\r
-** <tr><td> NULL <td> INTEGER <td> Result is 0\r
-** <tr><td> NULL <td> FLOAT <td> Result is 0.0\r
-** <tr><td> NULL <td> TEXT <td> Result is NULL pointer\r
-** <tr><td> NULL <td> BLOB <td> Result is NULL pointer\r
-** <tr><td> INTEGER <td> FLOAT <td> Convert from integer to float\r
-** <tr><td> INTEGER <td> TEXT <td> ASCII rendering of the integer\r
-** <tr><td> INTEGER <td> BLOB <td> Same as INTEGER->TEXT\r
-** <tr><td> FLOAT <td> INTEGER <td> Convert from float to integer\r
-** <tr><td> FLOAT <td> TEXT <td> ASCII rendering of the float\r
-** <tr><td> FLOAT <td> BLOB <td> Same as FLOAT->TEXT\r
-** <tr><td> TEXT <td> INTEGER <td> Use atoi()\r
-** <tr><td> TEXT <td> FLOAT <td> Use atof()\r
-** <tr><td> TEXT <td> BLOB <td> No change\r
-** <tr><td> BLOB <td> INTEGER <td> Convert to TEXT then use atoi()\r
-** <tr><td> BLOB <td> FLOAT <td> Convert to TEXT then use atof()\r
-** <tr><td> BLOB <td> TEXT <td> Add a zero terminator if needed\r
-** </table>\r
-** </blockquote>)^\r
-**\r
-** The table above makes reference to standard C library functions atoi()\r
-** and atof(). SQLite does not really use these functions. It has its\r
-** own equivalent internal routines. The atoi() and atof() names are\r
-** used in the table for brevity and because they are familiar to most\r
-** C programmers.\r
-**\r
-** ^Note that when type conversions occur, pointers returned by prior\r
-** calls to sqlite3_column_blob(), sqlite3_column_text(), and/or\r
-** sqlite3_column_text16() may be invalidated.\r
-** ^(Type conversions and pointer invalidations might occur\r
-** in the following cases:\r
-**\r
-** <ul>\r
-** <li> The initial content is a BLOB and sqlite3_column_text() or\r
-** sqlite3_column_text16() is called. A zero-terminator might\r
-** need to be added to the string.</li>\r
-** <li> The initial content is UTF-8 text and sqlite3_column_bytes16() or\r
-** sqlite3_column_text16() is called. The content must be converted\r
-** to UTF-16.</li>\r
-** <li> The initial content is UTF-16 text and sqlite3_column_bytes() or\r
-** sqlite3_column_text() is called. The content must be converted\r
-** to UTF-8.</li>\r
-** </ul>)^\r
-**\r
-** ^Conversions between UTF-16be and UTF-16le are always done in place and do\r
-** not invalidate a prior pointer, though of course the content of the buffer\r
-** that the prior pointer points to will have been modified. Other kinds\r
-** of conversion are done in place when it is possible, but sometimes they\r
-** are not possible and in those cases prior pointers are invalidated.\r
-**\r
-** ^(The safest and easiest to remember policy is to invoke these routines\r
-** in one of the following ways:\r
-**\r
-** <ul>\r
-** <li>sqlite3_column_text() followed by sqlite3_column_bytes()</li>\r
-** <li>sqlite3_column_blob() followed by sqlite3_column_bytes()</li>\r
-** <li>sqlite3_column_text16() followed by sqlite3_column_bytes16()</li>\r
-** </ul>)^\r
-**\r
-** In other words, you should call sqlite3_column_text(),\r
-** sqlite3_column_blob(), or sqlite3_column_text16() first to force the result\r
-** into the desired format, then invoke sqlite3_column_bytes() or\r
-** sqlite3_column_bytes16() to find the size of the result. Do not mix calls\r
-** to sqlite3_column_text() or sqlite3_column_blob() with calls to\r
-** sqlite3_column_bytes16(), and do not mix calls to sqlite3_column_text16()\r
-** with calls to sqlite3_column_bytes().\r
-**\r
-** ^The pointers returned are valid until a type conversion occurs as\r
-** described above, or until [sqlite3_step()] or [sqlite3_reset()] or\r
-** [sqlite3_finalize()] is called. ^The memory space used to hold strings\r
-** and BLOBs is freed automatically. Do <b>not</b> pass the pointers returned\r
-** [sqlite3_column_blob()], [sqlite3_column_text()], etc. into\r
-** [sqlite3_free()].\r
-**\r
-** ^(If a memory allocation error occurs during the evaluation of any\r
-** of these routines, a default value is returned. The default value\r
-** is either the integer 0, the floating point number 0.0, or a NULL\r
-** pointer. Subsequent calls to [sqlite3_errcode()] will return\r
-** [SQLITE_NOMEM].)^\r
-*/\r
-SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt*, int iCol);\r
-SQLITE_API int sqlite3_column_bytes(sqlite3_stmt*, int iCol);\r
-SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt*, int iCol);\r
-SQLITE_API double sqlite3_column_double(sqlite3_stmt*, int iCol);\r
-SQLITE_API int sqlite3_column_int(sqlite3_stmt*, int iCol);\r
-SQLITE_API sqlite3_int64 sqlite3_column_int64(sqlite3_stmt*, int iCol);\r
-SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol);\r
-SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt*, int iCol);\r
-SQLITE_API int sqlite3_column_type(sqlite3_stmt*, int iCol);\r
-SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol);\r
-\r
-/*\r
-** CAPI3REF: Destroy A Prepared Statement Object\r
-**\r
-** ^The sqlite3_finalize() function is called to delete a [prepared statement].\r
-** ^If the statement was executed successfully or not executed at all, then\r
-** SQLITE_OK is returned. ^If execution of the statement failed then an\r
-** [error code] or [extended error code] is returned.\r
-**\r
-** ^This routine can be called at any point during the execution of the\r
-** [prepared statement]. ^If the virtual machine has not\r
-** completed execution when this routine is called, that is like\r
-** encountering an error or an [sqlite3_interrupt | interrupt].\r
-** ^Incomplete updates may be rolled back and transactions canceled,\r
-** depending on the circumstances, and the\r
-** [error code] returned will be [SQLITE_ABORT].\r
-*/\r
-SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt);\r
-\r
-/*\r
-** CAPI3REF: Reset A Prepared Statement Object\r
-**\r
-** The sqlite3_reset() function is called to reset a [prepared statement]\r
-** object back to its initial state, ready to be re-executed.\r
-** ^Any SQL statement variables that had values bound to them using\r
-** the [sqlite3_bind_blob | sqlite3_bind_*() API] retain their values.\r
-** Use [sqlite3_clear_bindings()] to reset the bindings.\r
-**\r
-** ^The [sqlite3_reset(S)] interface resets the [prepared statement] S\r
-** back to the beginning of its program.\r
-**\r
-** ^If the most recent call to [sqlite3_step(S)] for the\r
-** [prepared statement] S returned [SQLITE_ROW] or [SQLITE_DONE],\r
-** or if [sqlite3_step(S)] has never before been called on S,\r
-** then [sqlite3_reset(S)] returns [SQLITE_OK].\r
-**\r
-** ^If the most recent call to [sqlite3_step(S)] for the\r
-** [prepared statement] S indicated an error, then\r
-** [sqlite3_reset(S)] returns an appropriate [error code].\r
-**\r
-** ^The [sqlite3_reset(S)] interface does not change the values\r
-** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S.\r
-*/\r
-SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);\r
-\r
-/*\r
-** CAPI3REF: Create Or Redefine SQL Functions\r
-** KEYWORDS: {function creation routines}\r
-** KEYWORDS: {application-defined SQL function}\r
-** KEYWORDS: {application-defined SQL functions}\r
-**\r
-** ^These two functions (collectively known as "function creation routines")\r
-** are used to add SQL functions or aggregates or to redefine the behavior\r
-** of existing SQL functions or aggregates. The only difference between the\r
-** two is that the second parameter, the name of the (scalar) function or\r
-** aggregate, is encoded in UTF-8 for sqlite3_create_function() and UTF-16\r
-** for sqlite3_create_function16().\r
-**\r
-** ^The first parameter is the [database connection] to which the SQL\r
-** function is to be added. ^If an application uses more than one database\r
-** connection then application-defined SQL functions must be added\r
-** to each database connection separately.\r
-**\r
-** The second parameter is the name of the SQL function to be created or\r
-** redefined. ^The length of the name is limited to 255 bytes, exclusive of\r
-** the zero-terminator. Note that the name length limit is in bytes, not\r
-** characters. ^Any attempt to create a function with a longer name\r
-** will result in [SQLITE_ERROR] being returned.\r
-**\r
-** ^The third parameter (nArg)\r
-** is the number of arguments that the SQL function or\r
-** aggregate takes. ^If this parameter is -1, then the SQL function or\r
-** aggregate may take any number of arguments between 0 and the limit\r
-** set by [sqlite3_limit]([SQLITE_LIMIT_FUNCTION_ARG]). If the third\r
-** parameter is less than -1 or greater than 127 then the behavior is\r
-** undefined.\r
-**\r
-** The fourth parameter, eTextRep, specifies what\r
-** [SQLITE_UTF8 | text encoding] this SQL function prefers for\r
-** its parameters. Any SQL function implementation should be able to work\r
-** work with UTF-8, UTF-16le, or UTF-16be. But some implementations may be\r
-** more efficient with one encoding than another. ^An application may\r
-** invoke sqlite3_create_function() or sqlite3_create_function16() multiple\r
-** times with the same function but with different values of eTextRep.\r
-** ^When multiple implementations of the same function are available, SQLite\r
-** will pick the one that involves the least amount of data conversion.\r
-** If there is only a single implementation which does not care what text\r
-** encoding is used, then the fourth argument should be [SQLITE_ANY].\r
-**\r
-** ^(The fifth parameter is an arbitrary pointer. The implementation of the\r
-** function can gain access to this pointer using [sqlite3_user_data()].)^\r
-**\r
-** The seventh, eighth and ninth parameters, xFunc, xStep and xFinal, are\r
-** pointers to C-language functions that implement the SQL function or\r
-** aggregate. ^A scalar SQL function requires an implementation of the xFunc\r
-** callback only; NULL pointers should be passed as the xStep and xFinal\r
-** parameters. ^An aggregate SQL function requires an implementation of xStep\r
-** and xFinal and NULL should be passed for xFunc. ^To delete an existing\r
-** SQL function or aggregate, pass NULL for all three function callbacks.\r
-**\r
-** ^It is permitted to register multiple implementations of the same\r
-** functions with the same name but with either differing numbers of\r
-** arguments or differing preferred text encodings. ^SQLite will use\r
-** the implementation that most closely matches the way in which the\r
-** SQL function is used. ^A function implementation with a non-negative\r
-** nArg parameter is a better match than a function implementation with\r
-** a negative nArg. ^A function where the preferred text encoding\r
-** matches the database encoding is a better\r
-** match than a function where the encoding is different. \r
-** ^A function where the encoding difference is between UTF16le and UTF16be\r
-** is a closer match than a function where the encoding difference is\r
-** between UTF8 and UTF16.\r
-**\r
-** ^Built-in functions may be overloaded by new application-defined functions.\r
-** ^The first application-defined function with a given name overrides all\r
-** built-in functions in the same [database connection] with the same name.\r
-** ^Subsequent application-defined functions of the same name only override \r
-** prior application-defined functions that are an exact match for the\r
-** number of parameters and preferred encoding.\r
-**\r
-** ^An application-defined function is permitted to call other\r
-** SQLite interfaces. However, such calls must not\r
-** close the database connection nor finalize or reset the prepared\r
-** statement in which the function is running.\r
-*/\r
-SQLITE_API int sqlite3_create_function(\r
- sqlite3 *db,\r
- const char *zFunctionName,\r
- int nArg,\r
- int eTextRep,\r
- void *pApp,\r
- void (*xFunc)(sqlite3_context*,int,sqlite3_value**),\r
- void (*xStep)(sqlite3_context*,int,sqlite3_value**),\r
- void (*xFinal)(sqlite3_context*)\r
-);\r
-SQLITE_API int sqlite3_create_function16(\r
- sqlite3 *db,\r
- const void *zFunctionName,\r
- int nArg,\r
- int eTextRep,\r
- void *pApp,\r
- void (*xFunc)(sqlite3_context*,int,sqlite3_value**),\r
- void (*xStep)(sqlite3_context*,int,sqlite3_value**),\r
- void (*xFinal)(sqlite3_context*)\r
-);\r
-\r
-/*\r
-** CAPI3REF: Text Encodings\r
-**\r
-** These constant define integer codes that represent the various\r
-** text encodings supported by SQLite.\r
-*/\r
-#define SQLITE_UTF8 1\r
-#define SQLITE_UTF16LE 2\r
-#define SQLITE_UTF16BE 3\r
-#define SQLITE_UTF16 4 /* Use native byte order */\r
-#define SQLITE_ANY 5 /* sqlite3_create_function only */\r
-#define SQLITE_UTF16_ALIGNED 8 /* sqlite3_create_collation only */\r
-\r
-/*\r
-** CAPI3REF: Deprecated Functions\r
-** DEPRECATED\r
-**\r
-** These functions are [deprecated]. In order to maintain\r
-** backwards compatibility with older code, these functions continue \r
-** to be supported. However, new applications should avoid\r
-** the use of these functions. To help encourage people to avoid\r
-** using these functions, we are not going to tell you what they do.\r
-*/\r
-#ifndef SQLITE_OMIT_DEPRECATED\r
-SQLITE_API SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*);\r
-SQLITE_API SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*);\r
-SQLITE_API SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);\r
-SQLITE_API SQLITE_DEPRECATED int sqlite3_global_recover(void);\r
-SQLITE_API SQLITE_DEPRECATED void sqlite3_thread_cleanup(void);\r
-SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),void*,sqlite3_int64);\r
-#endif\r
-\r
-/*\r
-** CAPI3REF: Obtaining SQL Function Parameter Values\r
-**\r
-** The C-language implementation of SQL functions and aggregates uses\r
-** this set of interface routines to access the parameter values on\r
-** the function or aggregate.\r
-**\r
-** The xFunc (for scalar functions) or xStep (for aggregates) parameters\r
-** to [sqlite3_create_function()] and [sqlite3_create_function16()]\r
-** define callbacks that implement the SQL functions and aggregates.\r
-** The 4th parameter to these callbacks is an array of pointers to\r
-** [protected sqlite3_value] objects. There is one [sqlite3_value] object for\r
-** each parameter to the SQL function. These routines are used to\r
-** extract values from the [sqlite3_value] objects.\r
-**\r
-** These routines work only with [protected sqlite3_value] objects.\r
-** Any attempt to use these routines on an [unprotected sqlite3_value]\r
-** object results in undefined behavior.\r
-**\r
-** ^These routines work just like the corresponding [column access functions]\r
-** except that these routines take a single [protected sqlite3_value] object\r
-** pointer instead of a [sqlite3_stmt*] pointer and an integer column number.\r
-**\r
-** ^The sqlite3_value_text16() interface extracts a UTF-16 string\r
-** in the native byte-order of the host machine. ^The\r
-** sqlite3_value_text16be() and sqlite3_value_text16le() interfaces\r
-** extract UTF-16 strings as big-endian and little-endian respectively.\r
-**\r
-** ^(The sqlite3_value_numeric_type() interface attempts to apply\r
-** numeric affinity to the value. This means that an attempt is\r
-** made to convert the value to an integer or floating point. If\r
-** such a conversion is possible without loss of information (in other\r
-** words, if the value is a string that looks like a number)\r
-** then the conversion is performed. Otherwise no conversion occurs.\r
-** The [SQLITE_INTEGER | datatype] after conversion is returned.)^\r
-**\r
-** Please pay particular attention to the fact that the pointer returned\r
-** from [sqlite3_value_blob()], [sqlite3_value_text()], or\r
-** [sqlite3_value_text16()] can be invalidated by a subsequent call to\r
-** [sqlite3_value_bytes()], [sqlite3_value_bytes16()], [sqlite3_value_text()],\r
-** or [sqlite3_value_text16()].\r
-**\r
-** These routines must be called from the same thread as\r
-** the SQL function that supplied the [sqlite3_value*] parameters.\r
-*/\r
-SQLITE_API const void *sqlite3_value_blob(sqlite3_value*);\r
-SQLITE_API int sqlite3_value_bytes(sqlite3_value*);\r
-SQLITE_API int sqlite3_value_bytes16(sqlite3_value*);\r
-SQLITE_API double sqlite3_value_double(sqlite3_value*);\r
-SQLITE_API int sqlite3_value_int(sqlite3_value*);\r
-SQLITE_API sqlite3_int64 sqlite3_value_int64(sqlite3_value*);\r
-SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value*);\r
-SQLITE_API const void *sqlite3_value_text16(sqlite3_value*);\r
-SQLITE_API const void *sqlite3_value_text16le(sqlite3_value*);\r
-SQLITE_API const void *sqlite3_value_text16be(sqlite3_value*);\r
-SQLITE_API int sqlite3_value_type(sqlite3_value*);\r
-SQLITE_API int sqlite3_value_numeric_type(sqlite3_value*);\r
-\r
-/*\r
-** CAPI3REF: Obtain Aggregate Function Context\r
-**\r
-** Implementions of aggregate SQL functions use this\r
-** routine to allocate memory for storing their state.\r
-**\r
-** ^The first time the sqlite3_aggregate_context(C,N) routine is called \r
-** for a particular aggregate function, SQLite\r
-** allocates N of memory, zeroes out that memory, and returns a pointer\r
-** to the new memory. ^On second and subsequent calls to\r
-** sqlite3_aggregate_context() for the same aggregate function instance,\r
-** the same buffer is returned. Sqlite3_aggregate_context() is normally\r
-** called once for each invocation of the xStep callback and then one\r
-** last time when the xFinal callback is invoked. ^(When no rows match\r
-** an aggregate query, the xStep() callback of the aggregate function\r
-** implementation is never called and xFinal() is called exactly once.\r
-** In those cases, sqlite3_aggregate_context() might be called for the\r
-** first time from within xFinal().)^\r
-**\r
-** ^The sqlite3_aggregate_context(C,N) routine returns a NULL pointer if N is\r
-** less than or equal to zero or if a memory allocate error occurs.\r
-**\r
-** ^(The amount of space allocated by sqlite3_aggregate_context(C,N) is\r
-** determined by the N parameter on first successful call. Changing the\r
-** value of N in subsequent call to sqlite3_aggregate_context() within\r
-** the same aggregate function instance will not resize the memory\r
-** allocation.)^\r
-**\r
-** ^SQLite automatically frees the memory allocated by \r
-** sqlite3_aggregate_context() when the aggregate query concludes.\r
-**\r
-** The first parameter must be a copy of the\r
-** [sqlite3_context | SQL function context] that is the first parameter\r
-** to the xStep or xFinal callback routine that implements the aggregate\r
-** function.\r
-**\r
-** This routine must be called from the same thread in which\r
-** the aggregate SQL function is running.\r
-*/\r
-SQLITE_API void *sqlite3_aggregate_context(sqlite3_context*, int nBytes);\r
-\r
-/*\r
-** CAPI3REF: User Data For Functions\r
-**\r
-** ^The sqlite3_user_data() interface returns a copy of\r
-** the pointer that was the pUserData parameter (the 5th parameter)\r
-** of the [sqlite3_create_function()]\r
-** and [sqlite3_create_function16()] routines that originally\r
-** registered the application defined function.\r
-**\r
-** This routine must be called from the same thread in which\r
-** the application-defined function is running.\r
-*/\r
-SQLITE_API void *sqlite3_user_data(sqlite3_context*);\r
-\r
-/*\r
-** CAPI3REF: Database Connection For Functions\r
-**\r
-** ^The sqlite3_context_db_handle() interface returns a copy of\r
-** the pointer to the [database connection] (the 1st parameter)\r
-** of the [sqlite3_create_function()]\r
-** and [sqlite3_create_function16()] routines that originally\r
-** registered the application defined function.\r
-*/\r
-SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*);\r
-\r
-/*\r
-** CAPI3REF: Function Auxiliary Data\r
-**\r
-** The following two functions may be used by scalar SQL functions to\r
-** associate metadata with argument values. If the same value is passed to\r
-** multiple invocations of the same SQL function during query execution, under\r
-** some circumstances the associated metadata may be preserved. This may\r
-** be used, for example, to add a regular-expression matching scalar\r
-** function. The compiled version of the regular expression is stored as\r
-** metadata associated with the SQL value passed as the regular expression\r
-** pattern. The compiled regular expression can be reused on multiple\r
-** invocations of the same function so that the original pattern string\r
-** does not need to be recompiled on each invocation.\r
-**\r
-** ^The sqlite3_get_auxdata() interface returns a pointer to the metadata\r
-** associated by the sqlite3_set_auxdata() function with the Nth argument\r
-** value to the application-defined function. ^If no metadata has been ever\r
-** been set for the Nth argument of the function, or if the corresponding\r
-** function parameter has changed since the meta-data was set,\r
-** then sqlite3_get_auxdata() returns a NULL pointer.\r
-**\r
-** ^The sqlite3_set_auxdata() interface saves the metadata\r
-** pointed to by its 3rd parameter as the metadata for the N-th\r
-** argument of the application-defined function. Subsequent\r
-** calls to sqlite3_get_auxdata() might return this data, if it has\r
-** not been destroyed.\r
-** ^If it is not NULL, SQLite will invoke the destructor\r
-** function given by the 4th parameter to sqlite3_set_auxdata() on\r
-** the metadata when the corresponding function parameter changes\r
-** or when the SQL statement completes, whichever comes first.\r
-**\r
-** SQLite is free to call the destructor and drop metadata on any\r
-** parameter of any function at any time. ^The only guarantee is that\r
-** the destructor will be called before the metadata is dropped.\r
-**\r
-** ^(In practice, metadata is preserved between function calls for\r
-** expressions that are constant at compile time. This includes literal\r
-** values and [parameters].)^\r
-**\r
-** These routines must be called from the same thread in which\r
-** the SQL function is running.\r
-*/\r
-SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N);\r
-SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*));\r
-\r
-\r
-/*\r
-** CAPI3REF: Constants Defining Special Destructor Behavior\r
-**\r
-** These are special values for the destructor that is passed in as the\r
-** final argument to routines like [sqlite3_result_blob()]. ^If the destructor\r
-** argument is SQLITE_STATIC, it means that the content pointer is constant\r
-** and will never change. It does not need to be destroyed. ^The\r
-** SQLITE_TRANSIENT value means that the content will likely change in\r
-** the near future and that SQLite should make its own private copy of\r
-** the content before returning.\r
-**\r
-** The typedef is necessary to work around problems in certain\r
-** C++ compilers. See ticket #2191.\r
-*/\r
-typedef void (*sqlite3_destructor_type)(void*);\r
-#define SQLITE_STATIC ((sqlite3_destructor_type)0)\r
-#define SQLITE_TRANSIENT ((sqlite3_destructor_type)-1)\r
-\r
-/*\r
-** CAPI3REF: Setting The Result Of An SQL Function\r
-**\r
-** These routines are used by the xFunc or xFinal callbacks that\r
-** implement SQL functions and aggregates. See\r
-** [sqlite3_create_function()] and [sqlite3_create_function16()]\r
-** for additional information.\r
-**\r
-** These functions work very much like the [parameter binding] family of\r
-** functions used to bind values to host parameters in prepared statements.\r
-** Refer to the [SQL parameter] documentation for additional information.\r
-**\r
-** ^The sqlite3_result_blob() interface sets the result from\r
-** an application-defined function to be the BLOB whose content is pointed\r
-** to by the second parameter and which is N bytes long where N is the\r
-** third parameter.\r
-**\r
-** ^The sqlite3_result_zeroblob() interfaces set the result of\r
-** the application-defined function to be a BLOB containing all zero\r
-** bytes and N bytes in size, where N is the value of the 2nd parameter.\r
-**\r
-** ^The sqlite3_result_double() interface sets the result from\r
-** an application-defined function to be a floating point value specified\r
-** by its 2nd argument.\r
-**\r
-** ^The sqlite3_result_error() and sqlite3_result_error16() functions\r
-** cause the implemented SQL function to throw an exception.\r
-** ^SQLite uses the string pointed to by the\r
-** 2nd parameter of sqlite3_result_error() or sqlite3_result_error16()\r
-** as the text of an error message. ^SQLite interprets the error\r
-** message string from sqlite3_result_error() as UTF-8. ^SQLite\r
-** interprets the string from sqlite3_result_error16() as UTF-16 in native\r
-** byte order. ^If the third parameter to sqlite3_result_error()\r
-** or sqlite3_result_error16() is negative then SQLite takes as the error\r
-** message all text up through the first zero character.\r
-** ^If the third parameter to sqlite3_result_error() or\r
-** sqlite3_result_error16() is non-negative then SQLite takes that many\r
-** bytes (not characters) from the 2nd parameter as the error message.\r
-** ^The sqlite3_result_error() and sqlite3_result_error16()\r
-** routines make a private copy of the error message text before\r
-** they return. Hence, the calling function can deallocate or\r
-** modify the text after they return without harm.\r
-** ^The sqlite3_result_error_code() function changes the error code\r
-** returned by SQLite as a result of an error in a function. ^By default,\r
-** the error code is SQLITE_ERROR. ^A subsequent call to sqlite3_result_error()\r
-** or sqlite3_result_error16() resets the error code to SQLITE_ERROR.\r
-**\r
-** ^The sqlite3_result_toobig() interface causes SQLite to throw an error\r
-** indicating that a string or BLOB is too long to represent.\r
-**\r
-** ^The sqlite3_result_nomem() interface causes SQLite to throw an error\r
-** indicating that a memory allocation failed.\r
-**\r
-** ^The sqlite3_result_int() interface sets the return value\r
-** of the application-defined function to be the 32-bit signed integer\r
-** value given in the 2nd argument.\r
-** ^The sqlite3_result_int64() interface sets the return value\r
-** of the application-defined function to be the 64-bit signed integer\r
-** value given in the 2nd argument.\r
-**\r
-** ^The sqlite3_result_null() interface sets the return value\r
-** of the application-defined function to be NULL.\r
-**\r
-** ^The sqlite3_result_text(), sqlite3_result_text16(),\r
-** sqlite3_result_text16le(), and sqlite3_result_text16be() interfaces\r
-** set the return value of the application-defined function to be\r
-** a text string which is represented as UTF-8, UTF-16 native byte order,\r
-** UTF-16 little endian, or UTF-16 big endian, respectively.\r
-** ^SQLite takes the text result from the application from\r
-** the 2nd parameter of the sqlite3_result_text* interfaces.\r
-** ^If the 3rd parameter to the sqlite3_result_text* interfaces\r
-** is negative, then SQLite takes result text from the 2nd parameter\r
-** through the first zero character.\r
-** ^If the 3rd parameter to the sqlite3_result_text* interfaces\r
-** is non-negative, then as many bytes (not characters) of the text\r
-** pointed to by the 2nd parameter are taken as the application-defined\r
-** function result.\r
-** ^If the 4th parameter to the sqlite3_result_text* interfaces\r
-** or sqlite3_result_blob is a non-NULL pointer, then SQLite calls that\r
-** function as the destructor on the text or BLOB result when it has\r
-** finished using that result.\r
-** ^If the 4th parameter to the sqlite3_result_text* interfaces or to\r
-** sqlite3_result_blob is the special constant SQLITE_STATIC, then SQLite\r
-** assumes that the text or BLOB result is in constant space and does not\r
-** copy the content of the parameter nor call a destructor on the content\r
-** when it has finished using that result.\r
-** ^If the 4th parameter to the sqlite3_result_text* interfaces\r
-** or sqlite3_result_blob is the special constant SQLITE_TRANSIENT\r
-** then SQLite makes a copy of the result into space obtained from\r
-** from [sqlite3_malloc()] before it returns.\r
-**\r
-** ^The sqlite3_result_value() interface sets the result of\r
-** the application-defined function to be a copy the\r
-** [unprotected sqlite3_value] object specified by the 2nd parameter. ^The\r
-** sqlite3_result_value() interface makes a copy of the [sqlite3_value]\r
-** so that the [sqlite3_value] specified in the parameter may change or\r
-** be deallocated after sqlite3_result_value() returns without harm.\r
-** ^A [protected sqlite3_value] object may always be used where an\r
-** [unprotected sqlite3_value] object is required, so either\r
-** kind of [sqlite3_value] object can be used with this interface.\r
-**\r
-** If these routines are called from within the different thread\r
-** than the one containing the application-defined function that received\r
-** the [sqlite3_context] pointer, the results are undefined.\r
-*/\r
-SQLITE_API void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*));\r
-SQLITE_API void sqlite3_result_double(sqlite3_context*, double);\r
-SQLITE_API void sqlite3_result_error(sqlite3_context*, const char*, int);\r
-SQLITE_API void sqlite3_result_error16(sqlite3_context*, const void*, int);\r
-SQLITE_API void sqlite3_result_error_toobig(sqlite3_context*);\r
-SQLITE_API void sqlite3_result_error_nomem(sqlite3_context*);\r
-SQLITE_API void sqlite3_result_error_code(sqlite3_context*, int);\r
-SQLITE_API void sqlite3_result_int(sqlite3_context*, int);\r
-SQLITE_API void sqlite3_result_int64(sqlite3_context*, sqlite3_int64);\r
-SQLITE_API void sqlite3_result_null(sqlite3_context*);\r
-SQLITE_API void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*));\r
-SQLITE_API void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));\r
-SQLITE_API void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));\r
-SQLITE_API void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));\r
-SQLITE_API void sqlite3_result_value(sqlite3_context*, sqlite3_value*);\r
-SQLITE_API void sqlite3_result_zeroblob(sqlite3_context*, int n);\r
-\r
-/*\r
-** CAPI3REF: Define New Collating Sequences\r
-**\r
-** These functions are used to add new collation sequences to the\r
-** [database connection] specified as the first argument.\r
-**\r
-** ^The name of the new collation sequence is specified as a UTF-8 string\r
-** for sqlite3_create_collation() and sqlite3_create_collation_v2()\r
-** and a UTF-16 string for sqlite3_create_collation16(). ^In all cases\r
-** the name is passed as the second function argument.\r
-**\r
-** ^The third argument may be one of the constants [SQLITE_UTF8],\r
-** [SQLITE_UTF16LE], or [SQLITE_UTF16BE], indicating that the user-supplied\r
-** routine expects to be passed pointers to strings encoded using UTF-8,\r
-** UTF-16 little-endian, or UTF-16 big-endian, respectively. ^The\r
-** third argument might also be [SQLITE_UTF16] to indicate that the routine\r
-** expects pointers to be UTF-16 strings in the native byte order, or the\r
-** argument can be [SQLITE_UTF16_ALIGNED] if the\r
-** the routine expects pointers to 16-bit word aligned strings\r
-** of UTF-16 in the native byte order.\r
-**\r
-** A pointer to the user supplied routine must be passed as the fifth\r
-** argument. ^If it is NULL, this is the same as deleting the collation\r
-** sequence (so that SQLite cannot call it anymore).\r
-** ^Each time the application supplied function is invoked, it is passed\r
-** as its first parameter a copy of the void* passed as the fourth argument\r
-** to sqlite3_create_collation() or sqlite3_create_collation16().\r
-**\r
-** ^The remaining arguments to the application-supplied routine are two strings,\r
-** each represented by a (length, data) pair and encoded in the encoding\r
-** that was passed as the third argument when the collation sequence was\r
-** registered. The application defined collation routine should\r
-** return negative, zero or positive if the first string is less than,\r
-** equal to, or greater than the second string. i.e. (STRING1 - STRING2).\r
-**\r
-** ^The sqlite3_create_collation_v2() works like sqlite3_create_collation()\r
-** except that it takes an extra argument which is a destructor for\r
-** the collation. ^The destructor is called when the collation is\r
-** destroyed and is passed a copy of the fourth parameter void* pointer\r
-** of the sqlite3_create_collation_v2().\r
-** ^Collations are destroyed when they are overridden by later calls to the\r
-** collation creation functions or when the [database connection] is closed\r
-** using [sqlite3_close()].\r
-**\r
-** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()].\r
-*/\r
-SQLITE_API int sqlite3_create_collation(\r
- sqlite3*, \r
- const char *zName, \r
- int eTextRep, \r
- void*,\r
- int(*xCompare)(void*,int,const void*,int,const void*)\r
-);\r
-SQLITE_API int sqlite3_create_collation_v2(\r
- sqlite3*, \r
- const char *zName, \r
- int eTextRep, \r
- void*,\r
- int(*xCompare)(void*,int,const void*,int,const void*),\r
- void(*xDestroy)(void*)\r
-);\r
-SQLITE_API int sqlite3_create_collation16(\r
- sqlite3*, \r
- const void *zName,\r
- int eTextRep, \r
- void*,\r
- int(*xCompare)(void*,int,const void*,int,const void*)\r
-);\r
-\r
-/*\r
-** CAPI3REF: Collation Needed Callbacks\r
-**\r
-** ^To avoid having to register all collation sequences before a database\r
-** can be used, a single callback function may be registered with the\r
-** [database connection] to be invoked whenever an undefined collation\r
-** sequence is required.\r
-**\r
-** ^If the function is registered using the sqlite3_collation_needed() API,\r
-** then it is passed the names of undefined collation sequences as strings\r
-** encoded in UTF-8. ^If sqlite3_collation_needed16() is used,\r
-** the names are passed as UTF-16 in machine native byte order.\r
-** ^A call to either function replaces the existing collation-needed callback.\r
-**\r
-** ^(When the callback is invoked, the first argument passed is a copy\r
-** of the second argument to sqlite3_collation_needed() or\r
-** sqlite3_collation_needed16(). The second argument is the database\r
-** connection. The third argument is one of [SQLITE_UTF8], [SQLITE_UTF16BE],\r
-** or [SQLITE_UTF16LE], indicating the most desirable form of the collation\r
-** sequence function required. The fourth parameter is the name of the\r
-** required collation sequence.)^\r
-**\r
-** The callback function should register the desired collation using\r
-** [sqlite3_create_collation()], [sqlite3_create_collation16()], or\r
-** [sqlite3_create_collation_v2()].\r
-*/\r
-SQLITE_API int sqlite3_collation_needed(\r
- sqlite3*, \r
- void*, \r
- void(*)(void*,sqlite3*,int eTextRep,const char*)\r
-);\r
-SQLITE_API int sqlite3_collation_needed16(\r
- sqlite3*, \r
- void*,\r
- void(*)(void*,sqlite3*,int eTextRep,const void*)\r
-);\r
-\r
-#if SQLITE_HAS_CODEC\r
-/*\r
-** Specify the key for an encrypted database. This routine should be\r
-** called right after sqlite3_open().\r
-**\r
-** The code to implement this API is not available in the public release\r
-** of SQLite.\r
-*/\r
-SQLITE_API int sqlite3_key(\r
- sqlite3 *db, /* Database to be rekeyed */\r
- const void *pKey, int nKey /* The key */\r
-);\r
-\r
-/*\r
-** Change the key on an open database. If the current database is not\r
-** encrypted, this routine will encrypt it. If pNew==0 or nNew==0, the\r
-** database is decrypted.\r
-**\r
-** The code to implement this API is not available in the public release\r
-** of SQLite.\r
-*/\r
-SQLITE_API int sqlite3_rekey(\r
- sqlite3 *db, /* Database to be rekeyed */\r
- const void *pKey, int nKey /* The new key */\r
-);\r
-\r
-/*\r
-** Specify the activation key for a SEE database. Unless \r
-** activated, none of the SEE routines will work.\r
-*/\r
-SQLITE_API void sqlite3_activate_see(\r
- const char *zPassPhrase /* Activation phrase */\r
-);\r
-#endif\r
-\r
-#ifdef SQLITE_ENABLE_CEROD\r
-/*\r
-** Specify the activation key for a CEROD database. Unless \r
-** activated, none of the CEROD routines will work.\r
-*/\r
-SQLITE_API void sqlite3_activate_cerod(\r
- const char *zPassPhrase /* Activation phrase */\r
-);\r
-#endif\r
-\r
-/*\r
-** CAPI3REF: Suspend Execution For A Short Time\r
-**\r
-** ^The sqlite3_sleep() function causes the current thread to suspend execution\r
-** for at least a number of milliseconds specified in its parameter.\r
-**\r
-** ^If the operating system does not support sleep requests with\r
-** millisecond time resolution, then the time will be rounded up to\r
-** the nearest second. ^The number of milliseconds of sleep actually\r
-** requested from the operating system is returned.\r
-**\r
-** ^SQLite implements this interface by calling the xSleep()\r
-** method of the default [sqlite3_vfs] object.\r
-*/\r
-SQLITE_API int sqlite3_sleep(int);\r
-\r
-/*\r
-** CAPI3REF: Name Of The Folder Holding Temporary Files\r
-**\r
-** ^(If this global variable is made to point to a string which is\r
-** the name of a folder (a.k.a. directory), then all temporary files\r
-** created by SQLite when using a built-in [sqlite3_vfs | VFS]\r
-** will be placed in that directory.)^ ^If this variable\r
-** is a NULL pointer, then SQLite performs a search for an appropriate\r
-** temporary file directory.\r
-**\r
-** It is not safe to read or modify this variable in more than one\r
-** thread at a time. It is not safe to read or modify this variable\r
-** if a [database connection] is being used at the same time in a separate\r
-** thread.\r
-** It is intended that this variable be set once\r
-** as part of process initialization and before any SQLite interface\r
-** routines have been called and that this variable remain unchanged\r
-** thereafter.\r
-**\r
-** ^The [temp_store_directory pragma] may modify this variable and cause\r
-** it to point to memory obtained from [sqlite3_malloc]. ^Furthermore,\r
-** the [temp_store_directory pragma] always assumes that any string\r
-** that this variable points to is held in memory obtained from \r
-** [sqlite3_malloc] and the pragma may attempt to free that memory\r
-** using [sqlite3_free].\r
-** Hence, if this variable is modified directly, either it should be\r
-** made NULL or made to point to memory obtained from [sqlite3_malloc]\r
-** or else the use of the [temp_store_directory pragma] should be avoided.\r
-*/\r
-SQLITE_API SQLITE_EXTERN char *sqlite3_temp_directory;\r
-\r
-/*\r
-** CAPI3REF: Test For Auto-Commit Mode\r
-** KEYWORDS: {autocommit mode}\r
-**\r
-** ^The sqlite3_get_autocommit() interface returns non-zero or\r
-** zero if the given database connection is or is not in autocommit mode,\r
-** respectively. ^Autocommit mode is on by default.\r
-** ^Autocommit mode is disabled by a [BEGIN] statement.\r
-** ^Autocommit mode is re-enabled by a [COMMIT] or [ROLLBACK].\r
-**\r
-** If certain kinds of errors occur on a statement within a multi-statement\r
-** transaction (errors including [SQLITE_FULL], [SQLITE_IOERR],\r
-** [SQLITE_NOMEM], [SQLITE_BUSY], and [SQLITE_INTERRUPT]) then the\r
-** transaction might be rolled back automatically. The only way to\r
-** find out whether SQLite automatically rolled back the transaction after\r
-** an error is to use this function.\r
-**\r
-** If another thread changes the autocommit status of the database\r
-** connection while this routine is running, then the return value\r
-** is undefined.\r
-*/\r
-SQLITE_API int sqlite3_get_autocommit(sqlite3*);\r
-\r
-/*\r
-** CAPI3REF: Find The Database Handle Of A Prepared Statement\r
-**\r
-** ^The sqlite3_db_handle interface returns the [database connection] handle\r
-** to which a [prepared statement] belongs. ^The [database connection]\r
-** returned by sqlite3_db_handle is the same [database connection]\r
-** that was the first argument\r
-** to the [sqlite3_prepare_v2()] call (or its variants) that was used to\r
-** create the statement in the first place.\r
-*/\r
-SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);\r
-\r
-/*\r
-** CAPI3REF: Find the next prepared statement\r
-**\r
-** ^This interface returns a pointer to the next [prepared statement] after\r
-** pStmt associated with the [database connection] pDb. ^If pStmt is NULL\r
-** then this interface returns a pointer to the first prepared statement\r
-** associated with the database connection pDb. ^If no prepared statement\r
-** satisfies the conditions of this routine, it returns NULL.\r
-**\r
-** The [database connection] pointer D in a call to\r
-** [sqlite3_next_stmt(D,S)] must refer to an open database\r
-** connection and in particular must not be a NULL pointer.\r
-*/\r
-SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);\r
-\r
-/*\r
-** CAPI3REF: Commit And Rollback Notification Callbacks\r
-**\r
-** ^The sqlite3_commit_hook() interface registers a callback\r
-** function to be invoked whenever a transaction is [COMMIT | committed].\r
-** ^Any callback set by a previous call to sqlite3_commit_hook()\r
-** for the same database connection is overridden.\r
-** ^The sqlite3_rollback_hook() interface registers a callback\r
-** function to be invoked whenever a transaction is [ROLLBACK | rolled back].\r
-** ^Any callback set by a previous call to sqlite3_rollback_hook()\r
-** for the same database connection is overridden.\r
-** ^The pArg argument is passed through to the callback.\r
-** ^If the callback on a commit hook function returns non-zero,\r
-** then the commit is converted into a rollback.\r
-**\r
-** ^The sqlite3_commit_hook(D,C,P) and sqlite3_rollback_hook(D,C,P) functions\r
-** return the P argument from the previous call of the same function\r
-** on the same [database connection] D, or NULL for\r
-** the first call for each function on D.\r
-**\r
-** The callback implementation must not do anything that will modify\r
-** the database connection that invoked the callback. Any actions\r
-** to modify the database connection must be deferred until after the\r
-** completion of the [sqlite3_step()] call that triggered the commit\r
-** or rollback hook in the first place.\r
-** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their\r
-** database connections for the meaning of "modify" in this paragraph.\r
-**\r
-** ^Registering a NULL function disables the callback.\r
-**\r
-** ^When the commit hook callback routine returns zero, the [COMMIT]\r
-** operation is allowed to continue normally. ^If the commit hook\r
-** returns non-zero, then the [COMMIT] is converted into a [ROLLBACK].\r
-** ^The rollback hook is invoked on a rollback that results from a commit\r
-** hook returning non-zero, just as it would be with any other rollback.\r
-**\r
-** ^For the purposes of this API, a transaction is said to have been\r
-** rolled back if an explicit "ROLLBACK" statement is executed, or\r
-** an error or constraint causes an implicit rollback to occur.\r
-** ^The rollback callback is not invoked if a transaction is\r
-** automatically rolled back because the database connection is closed.\r
-** ^The rollback callback is not invoked if a transaction is\r
-** rolled back because a commit callback returned non-zero.\r
-**\r
-** See also the [sqlite3_update_hook()] interface.\r
-*/\r
-SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);\r
-SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);\r
-\r
-/*\r
-** CAPI3REF: Data Change Notification Callbacks\r
-**\r
-** ^The sqlite3_update_hook() interface registers a callback function\r
-** with the [database connection] identified by the first argument\r
-** to be invoked whenever a row is updated, inserted or deleted.\r
-** ^Any callback set by a previous call to this function\r
-** for the same database connection is overridden.\r
-**\r
-** ^The second argument is a pointer to the function to invoke when a\r
-** row is updated, inserted or deleted.\r
-** ^The first argument to the callback is a copy of the third argument\r
-** to sqlite3_update_hook().\r
-** ^The second callback argument is one of [SQLITE_INSERT], [SQLITE_DELETE],\r
-** or [SQLITE_UPDATE], depending on the operation that caused the callback\r
-** to be invoked.\r
-** ^The third and fourth arguments to the callback contain pointers to the\r
-** database and table name containing the affected row.\r
-** ^The final callback parameter is the [rowid] of the row.\r
-** ^In the case of an update, this is the [rowid] after the update takes place.\r
-**\r
-** ^(The update hook is not invoked when internal system tables are\r
-** modified (i.e. sqlite_master and sqlite_sequence).)^\r
-**\r
-** ^In the current implementation, the update hook\r
-** is not invoked when duplication rows are deleted because of an\r
-** [ON CONFLICT | ON CONFLICT REPLACE] clause. ^Nor is the update hook\r
-** invoked when rows are deleted using the [truncate optimization].\r
-** The exceptions defined in this paragraph might change in a future\r
-** release of SQLite.\r
-**\r
-** The update hook implementation must not do anything that will modify\r
-** the database connection that invoked the update hook. Any actions\r
-** to modify the database connection must be deferred until after the\r
-** completion of the [sqlite3_step()] call that triggered the update hook.\r
-** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their\r
-** database connections for the meaning of "modify" in this paragraph.\r
-**\r
-** ^The sqlite3_update_hook(D,C,P) function\r
-** returns the P argument from the previous call\r
-** on the same [database connection] D, or NULL for\r
-** the first call on D.\r
-**\r
-** See also the [sqlite3_commit_hook()] and [sqlite3_rollback_hook()]\r
-** interfaces.\r
-*/\r
-SQLITE_API void *sqlite3_update_hook(\r
- sqlite3*, \r
- void(*)(void *,int ,char const *,char const *,sqlite3_int64),\r
- void*\r
-);\r
-\r
-/*\r
-** CAPI3REF: Enable Or Disable Shared Pager Cache\r
-** KEYWORDS: {shared cache}\r
-**\r
-** ^(This routine enables or disables the sharing of the database cache\r
-** and schema data structures between [database connection | connections]\r
-** to the same database. Sharing is enabled if the argument is true\r
-** and disabled if the argument is false.)^\r
-**\r
-** ^Cache sharing is enabled and disabled for an entire process.\r
-** This is a change as of SQLite version 3.5.0. In prior versions of SQLite,\r
-** sharing was enabled or disabled for each thread separately.\r
-**\r
-** ^(The cache sharing mode set by this interface effects all subsequent\r
-** calls to [sqlite3_open()], [sqlite3_open_v2()], and [sqlite3_open16()].\r
-** Existing database connections continue use the sharing mode\r
-** that was in effect at the time they were opened.)^\r
-**\r
-** ^(This routine returns [SQLITE_OK] if shared cache was enabled or disabled\r
-** successfully. An [error code] is returned otherwise.)^\r
-**\r
-** ^Shared cache is disabled by default. But this might change in\r
-** future releases of SQLite. Applications that care about shared\r
-** cache setting should set it explicitly.\r
-**\r
-** See Also: [SQLite Shared-Cache Mode]\r
-*/\r
-SQLITE_API int sqlite3_enable_shared_cache(int);\r
-\r
-/*\r
-** CAPI3REF: Attempt To Free Heap Memory\r
-**\r
-** ^The sqlite3_release_memory() interface attempts to free N bytes\r
-** of heap memory by deallocating non-essential memory allocations\r
-** held by the database library. Memory used to cache database\r
-** pages to improve performance is an example of non-essential memory.\r
-** ^sqlite3_release_memory() returns the number of bytes actually freed,\r
-** which might be more or less than the amount requested.\r
-*/\r
-SQLITE_API int sqlite3_release_memory(int);\r
-\r
-/*\r
-** CAPI3REF: Impose A Limit On Heap Size\r
-**\r
-** ^The sqlite3_soft_heap_limit() interface places a "soft" limit\r
-** on the amount of heap memory that may be allocated by SQLite.\r
-** ^If an internal allocation is requested that would exceed the\r
-** soft heap limit, [sqlite3_release_memory()] is invoked one or\r
-** more times to free up some space before the allocation is performed.\r
-**\r
-** ^The limit is called "soft" because if [sqlite3_release_memory()]\r
-** cannot free sufficient memory to prevent the limit from being exceeded,\r
-** the memory is allocated anyway and the current operation proceeds.\r
-**\r
-** ^A negative or zero value for N means that there is no soft heap limit and\r
-** [sqlite3_release_memory()] will only be called when memory is exhausted.\r
-** ^The default value for the soft heap limit is zero.\r
-**\r
-** ^(SQLite makes a best effort to honor the soft heap limit.\r
-** But if the soft heap limit cannot be honored, execution will\r
-** continue without error or notification.)^ This is why the limit is\r
-** called a "soft" limit. It is advisory only.\r
-**\r
-** Prior to SQLite version 3.5.0, this routine only constrained the memory\r
-** allocated by a single thread - the same thread in which this routine\r
-** runs. Beginning with SQLite version 3.5.0, the soft heap limit is\r
-** applied to all threads. The value specified for the soft heap limit\r
-** is an upper bound on the total memory allocation for all threads. In\r
-** version 3.5.0 there is no mechanism for limiting the heap usage for\r
-** individual threads.\r
-*/\r
-SQLITE_API void sqlite3_soft_heap_limit(int);\r
-\r
-/*\r
-** CAPI3REF: Extract Metadata About A Column Of A Table\r
-**\r
-** ^This routine returns metadata about a specific column of a specific\r
-** database table accessible using the [database connection] handle\r
-** passed as the first function argument.\r
-**\r
-** ^The column is identified by the second, third and fourth parameters to\r
-** this function. ^The second parameter is either the name of the database\r
-** (i.e. "main", "temp", or an attached database) containing the specified\r
-** table or NULL. ^If it is NULL, then all attached databases are searched\r
-** for the table using the same algorithm used by the database engine to\r
-** resolve unqualified table references.\r
-**\r
-** ^The third and fourth parameters to this function are the table and column\r
-** name of the desired column, respectively. Neither of these parameters\r
-** may be NULL.\r
-**\r
-** ^Metadata is returned by writing to the memory locations passed as the 5th\r
-** and subsequent parameters to this function. ^Any of these arguments may be\r
-** NULL, in which case the corresponding element of metadata is omitted.\r
-**\r
-** ^(<blockquote>\r
-** <table border="1">\r
-** <tr><th> Parameter <th> Output<br>Type <th> Description\r
-**\r
-** <tr><td> 5th <td> const char* <td> Data type\r
-** <tr><td> 6th <td> const char* <td> Name of default collation sequence\r
-** <tr><td> 7th <td> int <td> True if column has a NOT NULL constraint\r
-** <tr><td> 8th <td> int <td> True if column is part of the PRIMARY KEY\r
-** <tr><td> 9th <td> int <td> True if column is [AUTOINCREMENT]\r
-** </table>\r
-** </blockquote>)^\r
-**\r
-** ^The memory pointed to by the character pointers returned for the\r
-** declaration type and collation sequence is valid only until the next\r
-** call to any SQLite API function.\r
-**\r
-** ^If the specified table is actually a view, an [error code] is returned.\r
-**\r
-** ^If the specified column is "rowid", "oid" or "_rowid_" and an\r
-** [INTEGER PRIMARY KEY] column has been explicitly declared, then the output\r
-** parameters are set for the explicitly declared column. ^(If there is no\r
-** explicitly declared [INTEGER PRIMARY KEY] column, then the output\r
-** parameters are set as follows:\r
-**\r
-** <pre>\r
-** data type: "INTEGER"\r
-** collation sequence: "BINARY"\r
-** not null: 0\r
-** primary key: 1\r
-** auto increment: 0\r
-** </pre>)^\r
-**\r
-** ^(This function may load one or more schemas from database files. If an\r
-** error occurs during this process, or if the requested table or column\r
-** cannot be found, an [error code] is returned and an error message left\r
-** in the [database connection] (to be retrieved using sqlite3_errmsg()).)^\r
-**\r
-** ^This API is only available if the library was compiled with the\r
-** [SQLITE_ENABLE_COLUMN_METADATA] C-preprocessor symbol defined.\r
-*/\r
-SQLITE_API int sqlite3_table_column_metadata(\r
- sqlite3 *db, /* Connection handle */\r
- const char *zDbName, /* Database name or NULL */\r
- const char *zTableName, /* Table name */\r
- const char *zColumnName, /* Column name */\r
- char const **pzDataType, /* OUTPUT: Declared data type */\r
- char const **pzCollSeq, /* OUTPUT: Collation sequence name */\r
- int *pNotNull, /* OUTPUT: True if NOT NULL constraint exists */\r
- int *pPrimaryKey, /* OUTPUT: True if column part of PK */\r
- int *pAutoinc /* OUTPUT: True if column is auto-increment */\r
-);\r
-\r
-/*\r
-** CAPI3REF: Load An Extension\r
-**\r
-** ^This interface loads an SQLite extension library from the named file.\r
-**\r
-** ^The sqlite3_load_extension() interface attempts to load an\r
-** SQLite extension library contained in the file zFile.\r
-**\r
-** ^The entry point is zProc.\r
-** ^zProc may be 0, in which case the name of the entry point\r
-** defaults to "sqlite3_extension_init".\r
-** ^The sqlite3_load_extension() interface returns\r
-** [SQLITE_OK] on success and [SQLITE_ERROR] if something goes wrong.\r
-** ^If an error occurs and pzErrMsg is not 0, then the\r
-** [sqlite3_load_extension()] interface shall attempt to\r
-** fill *pzErrMsg with error message text stored in memory\r
-** obtained from [sqlite3_malloc()]. The calling function\r
-** should free this memory by calling [sqlite3_free()].\r
-**\r
-** ^Extension loading must be enabled using\r
-** [sqlite3_enable_load_extension()] prior to calling this API,\r
-** otherwise an error will be returned.\r
-**\r
-** See also the [load_extension() SQL function].\r
-*/\r
-SQLITE_API int sqlite3_load_extension(\r
- sqlite3 *db, /* Load the extension into this database connection */\r
- const char *zFile, /* Name of the shared library containing extension */\r
- const char *zProc, /* Entry point. Derived from zFile if 0 */\r
- char **pzErrMsg /* Put error message here if not 0 */\r
-);\r
-\r
-/*\r
-** CAPI3REF: Enable Or Disable Extension Loading\r
-**\r
-** ^So as not to open security holes in older applications that are\r
-** unprepared to deal with extension loading, and as a means of disabling\r
-** extension loading while evaluating user-entered SQL, the following API\r
-** is provided to turn the [sqlite3_load_extension()] mechanism on and off.\r
-**\r
-** ^Extension loading is off by default. See ticket #1863.\r
-** ^Call the sqlite3_enable_load_extension() routine with onoff==1\r
-** to turn extension loading on and call it with onoff==0 to turn\r
-** it back off again.\r
-*/\r
-SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff);\r
-\r
-/*\r
-** CAPI3REF: Automatically Load An Extensions\r
-**\r
-** ^This API can be invoked at program startup in order to register\r
-** one or more statically linked extensions that will be available\r
-** to all new [database connections].\r
-**\r
-** ^(This routine stores a pointer to the extension entry point\r
-** in an array that is obtained from [sqlite3_malloc()]. That memory\r
-** is deallocated by [sqlite3_reset_auto_extension()].)^\r
-**\r
-** ^This function registers an extension entry point that is\r
-** automatically invoked whenever a new [database connection]\r
-** is opened using [sqlite3_open()], [sqlite3_open16()],\r
-** or [sqlite3_open_v2()].\r
-** ^Duplicate extensions are detected so calling this routine\r
-** multiple times with the same extension is harmless.\r
-** ^Automatic extensions apply across all threads.\r
-*/\r
-SQLITE_API int sqlite3_auto_extension(void (*xEntryPoint)(void));\r
-\r
-/*\r
-** CAPI3REF: Reset Automatic Extension Loading\r
-**\r
-** ^(This function disables all previously registered automatic\r
-** extensions. It undoes the effect of all prior\r
-** [sqlite3_auto_extension()] calls.)^\r
-**\r
-** ^This function disables automatic extensions in all threads.\r
-*/\r
-SQLITE_API void sqlite3_reset_auto_extension(void);\r
-\r
-/*\r
-****** EXPERIMENTAL - subject to change without notice **************\r
-**\r
-** The interface to the virtual-table mechanism is currently considered\r
-** to be experimental. The interface might change in incompatible ways.\r
-** If this is a problem for you, do not use the interface at this time.\r
-**\r
-** When the virtual-table mechanism stabilizes, we will declare the\r
-** interface fixed, support it indefinitely, and remove this comment.\r
-*/\r
-\r
-/*\r
-** Structures used by the virtual table interface\r
-*/\r
-typedef struct sqlite3_vtab sqlite3_vtab;\r
-typedef struct sqlite3_index_info sqlite3_index_info;\r
-typedef struct sqlite3_vtab_cursor sqlite3_vtab_cursor;\r
-typedef struct sqlite3_module sqlite3_module;\r
-\r
-/*\r
-** CAPI3REF: Virtual Table Object\r
-** KEYWORDS: sqlite3_module {virtual table module}\r
-** EXPERIMENTAL\r
-**\r
-** This structure, sometimes called a a "virtual table module", \r
-** defines the implementation of a [virtual tables]. \r
-** This structure consists mostly of methods for the module.\r
-**\r
-** ^A virtual table module is created by filling in a persistent\r
-** instance of this structure and passing a pointer to that instance\r
-** to [sqlite3_create_module()] or [sqlite3_create_module_v2()].\r
-** ^The registration remains valid until it is replaced by a different\r
-** module or until the [database connection] closes. The content\r
-** of this structure must not change while it is registered with\r
-** any database connection.\r
-*/\r
-struct sqlite3_module {\r
- int iVersion;\r
- int (*xCreate)(sqlite3*, void *pAux,\r
- int argc, const char *const*argv,\r
- sqlite3_vtab **ppVTab, char**);\r
- int (*xConnect)(sqlite3*, void *pAux,\r
- int argc, const char *const*argv,\r
- sqlite3_vtab **ppVTab, char**);\r
- int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*);\r
- int (*xDisconnect)(sqlite3_vtab *pVTab);\r
- int (*xDestroy)(sqlite3_vtab *pVTab);\r
- int (*xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor);\r
- int (*xClose)(sqlite3_vtab_cursor*);\r
- int (*xFilter)(sqlite3_vtab_cursor*, int idxNum, const char *idxStr,\r
- int argc, sqlite3_value **argv);\r
- int (*xNext)(sqlite3_vtab_cursor*);\r
- int (*xEof)(sqlite3_vtab_cursor*);\r
- int (*xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int);\r
- int (*xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid);\r
- int (*xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *);\r
- int (*xBegin)(sqlite3_vtab *pVTab);\r
- int (*xSync)(sqlite3_vtab *pVTab);\r
- int (*xCommit)(sqlite3_vtab *pVTab);\r
- int (*xRollback)(sqlite3_vtab *pVTab);\r
- int (*xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName,\r
- void (**pxFunc)(sqlite3_context*,int,sqlite3_value**),\r
- void **ppArg);\r
- int (*xRename)(sqlite3_vtab *pVtab, const char *zNew);\r
-};\r
-\r
-/*\r
-** CAPI3REF: Virtual Table Indexing Information\r
-** KEYWORDS: sqlite3_index_info\r
-** EXPERIMENTAL\r
-**\r
-** The sqlite3_index_info structure and its substructures is used to\r
-** pass information into and receive the reply from the [xBestIndex]\r
-** method of a [virtual table module]. The fields under **Inputs** are the\r
-** inputs to xBestIndex and are read-only. xBestIndex inserts its\r
-** results into the **Outputs** fields.\r
-**\r
-** ^(The aConstraint[] array records WHERE clause constraints of the form:\r
-**\r
-** <pre>column OP expr</pre>\r
-**\r
-** where OP is =, <, <=, >, or >=.)^ ^(The particular operator is\r
-** stored in aConstraint[].op.)^ ^(The index of the column is stored in\r
-** aConstraint[].iColumn.)^ ^(aConstraint[].usable is TRUE if the\r
-** expr on the right-hand side can be evaluated (and thus the constraint\r
-** is usable) and false if it cannot.)^\r
-**\r
-** ^The optimizer automatically inverts terms of the form "expr OP column"\r
-** and makes other simplifications to the WHERE clause in an attempt to\r
-** get as many WHERE clause terms into the form shown above as possible.\r
-** ^The aConstraint[] array only reports WHERE clause terms that are\r
-** relevant to the particular virtual table being queried.\r
-**\r
-** ^Information about the ORDER BY clause is stored in aOrderBy[].\r
-** ^Each term of aOrderBy records a column of the ORDER BY clause.\r
-**\r
-** The [xBestIndex] method must fill aConstraintUsage[] with information\r
-** about what parameters to pass to xFilter. ^If argvIndex>0 then\r
-** the right-hand side of the corresponding aConstraint[] is evaluated\r
-** and becomes the argvIndex-th entry in argv. ^(If aConstraintUsage[].omit\r
-** is true, then the constraint is assumed to be fully handled by the\r
-** virtual table and is not checked again by SQLite.)^\r
-**\r
-** ^The idxNum and idxPtr values are recorded and passed into the\r
-** [xFilter] method.\r
-** ^[sqlite3_free()] is used to free idxPtr if and only if\r
-** needToFreeIdxPtr is true.\r
-**\r
-** ^The orderByConsumed means that output from [xFilter]/[xNext] will occur in\r
-** the correct order to satisfy the ORDER BY clause so that no separate\r
-** sorting step is required.\r
-**\r
-** ^The estimatedCost value is an estimate of the cost of doing the\r
-** particular lookup. A full scan of a table with N entries should have\r
-** a cost of N. A binary search of a table of N entries should have a\r
-** cost of approximately log(N).\r
-*/\r
-struct sqlite3_index_info {\r
- /* Inputs */\r
- int nConstraint; /* Number of entries in aConstraint */\r
- struct sqlite3_index_constraint {\r
- int iColumn; /* Column on left-hand side of constraint */\r
- unsigned char op; /* Constraint operator */\r
- unsigned char usable; /* True if this constraint is usable */\r
- int iTermOffset; /* Used internally - xBestIndex should ignore */\r
- } *aConstraint; /* Table of WHERE clause constraints */\r
- int nOrderBy; /* Number of terms in the ORDER BY clause */\r
- struct sqlite3_index_orderby {\r
- int iColumn; /* Column number */\r
- unsigned char desc; /* True for DESC. False for ASC. */\r
- } *aOrderBy; /* The ORDER BY clause */\r
- /* Outputs */\r
- struct sqlite3_index_constraint_usage {\r
- int argvIndex; /* if >0, constraint is part of argv to xFilter */\r
- unsigned char omit; /* Do not code a test for this constraint */\r
- } *aConstraintUsage;\r
- int idxNum; /* Number used to identify the index */\r
- char *idxStr; /* String, possibly obtained from sqlite3_malloc */\r
- int needToFreeIdxStr; /* Free idxStr using sqlite3_free() if true */\r
- int orderByConsumed; /* True if output is already ordered */\r
- double estimatedCost; /* Estimated cost of using this index */\r
-};\r
-#define SQLITE_INDEX_CONSTRAINT_EQ 2\r
-#define SQLITE_INDEX_CONSTRAINT_GT 4\r
-#define SQLITE_INDEX_CONSTRAINT_LE 8\r
-#define SQLITE_INDEX_CONSTRAINT_LT 16\r
-#define SQLITE_INDEX_CONSTRAINT_GE 32\r
-#define SQLITE_INDEX_CONSTRAINT_MATCH 64\r
-\r
-/*\r
-** CAPI3REF: Register A Virtual Table Implementation\r
-** EXPERIMENTAL\r
-**\r
-** ^These routines are used to register a new [virtual table module] name.\r
-** ^Module names must be registered before\r
-** creating a new [virtual table] using the module and before using a\r
-** preexisting [virtual table] for the module.\r
-**\r
-** ^The module name is registered on the [database connection] specified\r
-** by the first parameter. ^The name of the module is given by the \r
-** second parameter. ^The third parameter is a pointer to\r
-** the implementation of the [virtual table module]. ^The fourth\r
-** parameter is an arbitrary client data pointer that is passed through\r
-** into the [xCreate] and [xConnect] methods of the virtual table module\r
-** when a new virtual table is be being created or reinitialized.\r
-**\r
-** ^The sqlite3_create_module_v2() interface has a fifth parameter which\r
-** is a pointer to a destructor for the pClientData. ^SQLite will\r
-** invoke the destructor function (if it is not NULL) when SQLite\r
-** no longer needs the pClientData pointer. ^The sqlite3_create_module()\r
-** interface is equivalent to sqlite3_create_module_v2() with a NULL\r
-** destructor.\r
-*/\r
-SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_create_module(\r
- sqlite3 *db, /* SQLite connection to register module with */\r
- const char *zName, /* Name of the module */\r
- const sqlite3_module *p, /* Methods for the module */\r
- void *pClientData /* Client data for xCreate/xConnect */\r
-);\r
-SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_create_module_v2(\r
- sqlite3 *db, /* SQLite connection to register module with */\r
- const char *zName, /* Name of the module */\r
- const sqlite3_module *p, /* Methods for the module */\r
- void *pClientData, /* Client data for xCreate/xConnect */\r
- void(*xDestroy)(void*) /* Module destructor function */\r
-);\r
-\r
-/*\r
-** CAPI3REF: Virtual Table Instance Object\r
-** KEYWORDS: sqlite3_vtab\r
-** EXPERIMENTAL\r
-**\r
-** Every [virtual table module] implementation uses a subclass\r
-** of this object to describe a particular instance\r
-** of the [virtual table]. Each subclass will\r
-** be tailored to the specific needs of the module implementation.\r
-** The purpose of this superclass is to define certain fields that are\r
-** common to all module implementations.\r
-**\r
-** ^Virtual tables methods can set an error message by assigning a\r
-** string obtained from [sqlite3_mprintf()] to zErrMsg. The method should\r
-** take care that any prior string is freed by a call to [sqlite3_free()]\r
-** prior to assigning a new string to zErrMsg. ^After the error message\r
-** is delivered up to the client application, the string will be automatically\r
-** freed by sqlite3_free() and the zErrMsg field will be zeroed.\r
-*/\r
-struct sqlite3_vtab {\r
- const sqlite3_module *pModule; /* The module for this virtual table */\r
- int nRef; /* NO LONGER USED */\r
- char *zErrMsg; /* Error message from sqlite3_mprintf() */\r
- /* Virtual table implementations will typically add additional fields */\r
-};\r
-\r
-/*\r
-** CAPI3REF: Virtual Table Cursor Object\r
-** KEYWORDS: sqlite3_vtab_cursor {virtual table cursor}\r
-** EXPERIMENTAL\r
-**\r
-** Every [virtual table module] implementation uses a subclass of the\r
-** following structure to describe cursors that point into the\r
-** [virtual table] and are used\r
-** to loop through the virtual table. Cursors are created using the\r
-** [sqlite3_module.xOpen | xOpen] method of the module and are destroyed\r
-** by the [sqlite3_module.xClose | xClose] method. Cursors are used\r
-** by the [xFilter], [xNext], [xEof], [xColumn], and [xRowid] methods\r
-** of the module. Each module implementation will define\r
-** the content of a cursor structure to suit its own needs.\r
-**\r
-** This superclass exists in order to define fields of the cursor that\r
-** are common to all implementations.\r
-*/\r
-struct sqlite3_vtab_cursor {\r
- sqlite3_vtab *pVtab; /* Virtual table of this cursor */\r
- /* Virtual table implementations will typically add additional fields */\r
-};\r
-\r
-/*\r
-** CAPI3REF: Declare The Schema Of A Virtual Table\r
-** EXPERIMENTAL\r
-**\r
-** ^The [xCreate] and [xConnect] methods of a\r
-** [virtual table module] call this interface\r
-** to declare the format (the names and datatypes of the columns) of\r
-** the virtual tables they implement.\r
-*/\r
-SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_declare_vtab(sqlite3*, const char *zSQL);\r
-\r
-/*\r
-** CAPI3REF: Overload A Function For A Virtual Table\r
-** EXPERIMENTAL\r
-**\r
-** ^(Virtual tables can provide alternative implementations of functions\r
-** using the [xFindFunction] method of the [virtual table module]. \r
-** But global versions of those functions\r
-** must exist in order to be overloaded.)^\r
-**\r
-** ^(This API makes sure a global version of a function with a particular\r
-** name and number of parameters exists. If no such function exists\r
-** before this API is called, a new function is created.)^ ^The implementation\r
-** of the new function always causes an exception to be thrown. So\r
-** the new function is not good for anything by itself. Its only\r
-** purpose is to be a placeholder function that can be overloaded\r
-** by a [virtual table].\r
-*/\r
-SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);\r
-\r
-/*\r
-** The interface to the virtual-table mechanism defined above (back up\r
-** to a comment remarkably similar to this one) is currently considered\r
-** to be experimental. The interface might change in incompatible ways.\r
-** If this is a problem for you, do not use the interface at this time.\r
-**\r
-** When the virtual-table mechanism stabilizes, we will declare the\r
-** interface fixed, support it indefinitely, and remove this comment.\r
-**\r
-****** EXPERIMENTAL - subject to change without notice **************\r
-*/\r
-\r
-/*\r
-** CAPI3REF: A Handle To An Open BLOB\r
-** KEYWORDS: {BLOB handle} {BLOB handles}\r
-**\r
-** An instance of this object represents an open BLOB on which\r
-** [sqlite3_blob_open | incremental BLOB I/O] can be performed.\r
-** ^Objects of this type are created by [sqlite3_blob_open()]\r
-** and destroyed by [sqlite3_blob_close()].\r
-** ^The [sqlite3_blob_read()] and [sqlite3_blob_write()] interfaces\r
-** can be used to read or write small subsections of the BLOB.\r
-** ^The [sqlite3_blob_bytes()] interface returns the size of the BLOB in bytes.\r
-*/\r
-typedef struct sqlite3_blob sqlite3_blob;\r
-\r
-/*\r
-** CAPI3REF: Open A BLOB For Incremental I/O\r
-**\r
-** ^(This interfaces opens a [BLOB handle | handle] to the BLOB located\r
-** in row iRow, column zColumn, table zTable in database zDb;\r
-** in other words, the same BLOB that would be selected by:\r
-**\r
-** <pre>\r
-** SELECT zColumn FROM zDb.zTable WHERE [rowid] = iRow;\r
-** </pre>)^\r
-**\r
-** ^If the flags parameter is non-zero, then the BLOB is opened for read\r
-** and write access. ^If it is zero, the BLOB is opened for read access.\r
-** ^It is not possible to open a column that is part of an index or primary \r
-** key for writing. ^If [foreign key constraints] are enabled, it is \r
-** not possible to open a column that is part of a [child key] for writing.\r
-**\r
-** ^Note that the database name is not the filename that contains\r
-** the database but rather the symbolic name of the database that\r
-** appears after the AS keyword when the database is connected using [ATTACH].\r
-** ^For the main database file, the database name is "main".\r
-** ^For TEMP tables, the database name is "temp".\r
-**\r
-** ^(On success, [SQLITE_OK] is returned and the new [BLOB handle] is written\r
-** to *ppBlob. Otherwise an [error code] is returned and *ppBlob is set\r
-** to be a null pointer.)^\r
-** ^This function sets the [database connection] error code and message\r
-** accessible via [sqlite3_errcode()] and [sqlite3_errmsg()] and related\r
-** functions. ^Note that the *ppBlob variable is always initialized in a\r
-** way that makes it safe to invoke [sqlite3_blob_close()] on *ppBlob\r
-** regardless of the success or failure of this routine.\r
-**\r
-** ^(If the row that a BLOB handle points to is modified by an\r
-** [UPDATE], [DELETE], or by [ON CONFLICT] side-effects\r
-** then the BLOB handle is marked as "expired".\r
-** This is true if any column of the row is changed, even a column\r
-** other than the one the BLOB handle is open on.)^\r
-** ^Calls to [sqlite3_blob_read()] and [sqlite3_blob_write()] for\r
-** a expired BLOB handle fail with an return code of [SQLITE_ABORT].\r
-** ^(Changes written into a BLOB prior to the BLOB expiring are not\r
-** rolled back by the expiration of the BLOB. Such changes will eventually\r
-** commit if the transaction continues to completion.)^\r
-**\r
-** ^Use the [sqlite3_blob_bytes()] interface to determine the size of\r
-** the opened blob. ^The size of a blob may not be changed by this\r
-** interface. Use the [UPDATE] SQL command to change the size of a\r
-** blob.\r
-**\r
-** ^The [sqlite3_bind_zeroblob()] and [sqlite3_result_zeroblob()] interfaces\r
-** and the built-in [zeroblob] SQL function can be used, if desired,\r
-** to create an empty, zero-filled blob in which to read or write using\r
-** this interface.\r
-**\r
-** To avoid a resource leak, every open [BLOB handle] should eventually\r
-** be released by a call to [sqlite3_blob_close()].\r
-*/\r
-SQLITE_API int sqlite3_blob_open(\r
- sqlite3*,\r
- const char *zDb,\r
- const char *zTable,\r
- const char *zColumn,\r
- sqlite3_int64 iRow,\r
- int flags,\r
- sqlite3_blob **ppBlob\r
-);\r
-\r
-/*\r
-** CAPI3REF: Close A BLOB Handle\r
-**\r
-** ^Closes an open [BLOB handle].\r
-**\r
-** ^Closing a BLOB shall cause the current transaction to commit\r
-** if there are no other BLOBs, no pending prepared statements, and the\r
-** database connection is in [autocommit mode].\r
-** ^If any writes were made to the BLOB, they might be held in cache\r
-** until the close operation if they will fit.\r
-**\r
-** ^(Closing the BLOB often forces the changes\r
-** out to disk and so if any I/O errors occur, they will likely occur\r
-** at the time when the BLOB is closed. Any errors that occur during\r
-** closing are reported as a non-zero return value.)^\r
-**\r
-** ^(The BLOB is closed unconditionally. Even if this routine returns\r
-** an error code, the BLOB is still closed.)^\r
-**\r
-** ^Calling this routine with a null pointer (such as would be returned\r
-** by a failed call to [sqlite3_blob_open()]) is a harmless no-op.\r
-*/\r
-SQLITE_API int sqlite3_blob_close(sqlite3_blob *);\r
-\r
-/*\r
-** CAPI3REF: Return The Size Of An Open BLOB\r
-**\r
-** ^Returns the size in bytes of the BLOB accessible via the \r
-** successfully opened [BLOB handle] in its only argument. ^The\r
-** incremental blob I/O routines can only read or overwriting existing\r
-** blob content; they cannot change the size of a blob.\r
-**\r
-** This routine only works on a [BLOB handle] which has been created\r
-** by a prior successful call to [sqlite3_blob_open()] and which has not\r
-** been closed by [sqlite3_blob_close()]. Passing any other pointer in\r
-** to this routine results in undefined and probably undesirable behavior.\r
-*/\r
-SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *);\r
-\r
-/*\r
-** CAPI3REF: Read Data From A BLOB Incrementally\r
-**\r
-** ^(This function is used to read data from an open [BLOB handle] into a\r
-** caller-supplied buffer. N bytes of data are copied into buffer Z\r
-** from the open BLOB, starting at offset iOffset.)^\r
-**\r
-** ^If offset iOffset is less than N bytes from the end of the BLOB,\r
-** [SQLITE_ERROR] is returned and no data is read. ^If N or iOffset is\r
-** less than zero, [SQLITE_ERROR] is returned and no data is read.\r
-** ^The size of the blob (and hence the maximum value of N+iOffset)\r
-** can be determined using the [sqlite3_blob_bytes()] interface.\r
-**\r
-** ^An attempt to read from an expired [BLOB handle] fails with an\r
-** error code of [SQLITE_ABORT].\r
-**\r
-** ^(On success, sqlite3_blob_read() returns SQLITE_OK.\r
-** Otherwise, an [error code] or an [extended error code] is returned.)^\r
-**\r
-** This routine only works on a [BLOB handle] which has been created\r
-** by a prior successful call to [sqlite3_blob_open()] and which has not\r
-** been closed by [sqlite3_blob_close()]. Passing any other pointer in\r
-** to this routine results in undefined and probably undesirable behavior.\r
-**\r
-** See also: [sqlite3_blob_write()].\r
-*/\r
-SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);\r
-\r
-/*\r
-** CAPI3REF: Write Data Into A BLOB Incrementally\r
-**\r
-** ^This function is used to write data into an open [BLOB handle] from a\r
-** caller-supplied buffer. ^N bytes of data are copied from the buffer Z\r
-** into the open BLOB, starting at offset iOffset.\r
-**\r
-** ^If the [BLOB handle] passed as the first argument was not opened for\r
-** writing (the flags parameter to [sqlite3_blob_open()] was zero),\r
-** this function returns [SQLITE_READONLY].\r
-**\r
-** ^This function may only modify the contents of the BLOB; it is\r
-** not possible to increase the size of a BLOB using this API.\r
-** ^If offset iOffset is less than N bytes from the end of the BLOB,\r
-** [SQLITE_ERROR] is returned and no data is written. ^If N is\r
-** less than zero [SQLITE_ERROR] is returned and no data is written.\r
-** The size of the BLOB (and hence the maximum value of N+iOffset)\r
-** can be determined using the [sqlite3_blob_bytes()] interface.\r
-**\r
-** ^An attempt to write to an expired [BLOB handle] fails with an\r
-** error code of [SQLITE_ABORT]. ^Writes to the BLOB that occurred\r
-** before the [BLOB handle] expired are not rolled back by the\r
-** expiration of the handle, though of course those changes might\r
-** have been overwritten by the statement that expired the BLOB handle\r
-** or by other independent statements.\r
-**\r
-** ^(On success, sqlite3_blob_write() returns SQLITE_OK.\r
-** Otherwise, an [error code] or an [extended error code] is returned.)^\r
-**\r
-** This routine only works on a [BLOB handle] which has been created\r
-** by a prior successful call to [sqlite3_blob_open()] and which has not\r
-** been closed by [sqlite3_blob_close()]. Passing any other pointer in\r
-** to this routine results in undefined and probably undesirable behavior.\r
-**\r
-** See also: [sqlite3_blob_read()].\r
-*/\r
-SQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);\r
-\r
-/*\r
-** CAPI3REF: Virtual File System Objects\r
-**\r
-** A virtual filesystem (VFS) is an [sqlite3_vfs] object\r
-** that SQLite uses to interact\r
-** with the underlying operating system. Most SQLite builds come with a\r
-** single default VFS that is appropriate for the host computer.\r
-** New VFSes can be registered and existing VFSes can be unregistered.\r
-** The following interfaces are provided.\r
-**\r
-** ^The sqlite3_vfs_find() interface returns a pointer to a VFS given its name.\r
-** ^Names are case sensitive.\r
-** ^Names are zero-terminated UTF-8 strings.\r
-** ^If there is no match, a NULL pointer is returned.\r
-** ^If zVfsName is NULL then the default VFS is returned.\r
-**\r
-** ^New VFSes are registered with sqlite3_vfs_register().\r
-** ^Each new VFS becomes the default VFS if the makeDflt flag is set.\r
-** ^The same VFS can be registered multiple times without injury.\r
-** ^To make an existing VFS into the default VFS, register it again\r
-** with the makeDflt flag set. If two different VFSes with the\r
-** same name are registered, the behavior is undefined. If a\r
-** VFS is registered with a name that is NULL or an empty string,\r
-** then the behavior is undefined.\r
-**\r
-** ^Unregister a VFS with the sqlite3_vfs_unregister() interface.\r
-** ^(If the default VFS is unregistered, another VFS is chosen as\r
-** the default. The choice for the new VFS is arbitrary.)^\r
-*/\r
-SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName);\r
-SQLITE_API int sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);\r
-SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);\r
-\r
-/*\r
-** CAPI3REF: Mutexes\r
-**\r
-** The SQLite core uses these routines for thread\r
-** synchronization. Though they are intended for internal\r
-** use by SQLite, code that links against SQLite is\r
-** permitted to use any of these routines.\r
-**\r
-** The SQLite source code contains multiple implementations\r
-** of these mutex routines. An appropriate implementation\r
-** is selected automatically at compile-time. ^(The following\r
-** implementations are available in the SQLite core:\r
-**\r
-** <ul>\r
-** <li> SQLITE_MUTEX_OS2\r
-** <li> SQLITE_MUTEX_PTHREAD\r
-** <li> SQLITE_MUTEX_W32\r
-** <li> SQLITE_MUTEX_NOOP\r
-** </ul>)^\r
-**\r
-** ^The SQLITE_MUTEX_NOOP implementation is a set of routines\r
-** that does no real locking and is appropriate for use in\r
-** a single-threaded application. ^The SQLITE_MUTEX_OS2,\r
-** SQLITE_MUTEX_PTHREAD, and SQLITE_MUTEX_W32 implementations\r
-** are appropriate for use on OS/2, Unix, and Windows.\r
-**\r
-** ^(If SQLite is compiled with the SQLITE_MUTEX_APPDEF preprocessor\r
-** macro defined (with "-DSQLITE_MUTEX_APPDEF=1"), then no mutex\r
-** implementation is included with the library. In this case the\r
-** application must supply a custom mutex implementation using the\r
-** [SQLITE_CONFIG_MUTEX] option of the sqlite3_config() function\r
-** before calling sqlite3_initialize() or any other public sqlite3_\r
-** function that calls sqlite3_initialize().)^\r
-**\r
-** ^The sqlite3_mutex_alloc() routine allocates a new\r
-** mutex and returns a pointer to it. ^If it returns NULL\r
-** that means that a mutex could not be allocated. ^SQLite\r
-** will unwind its stack and return an error. ^(The argument\r
-** to sqlite3_mutex_alloc() is one of these integer constants:\r
-**\r
-** <ul>\r
-** <li> SQLITE_MUTEX_FAST\r
-** <li> SQLITE_MUTEX_RECURSIVE\r
-** <li> SQLITE_MUTEX_STATIC_MASTER\r
-** <li> SQLITE_MUTEX_STATIC_MEM\r
-** <li> SQLITE_MUTEX_STATIC_MEM2\r
-** <li> SQLITE_MUTEX_STATIC_PRNG\r
-** <li> SQLITE_MUTEX_STATIC_LRU\r
-** <li> SQLITE_MUTEX_STATIC_LRU2\r
-** </ul>)^\r
-**\r
-** ^The first two constants (SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE)\r
-** cause sqlite3_mutex_alloc() to create\r
-** a new mutex. ^The new mutex is recursive when SQLITE_MUTEX_RECURSIVE\r
-** is used but not necessarily so when SQLITE_MUTEX_FAST is used.\r
-** The mutex implementation does not need to make a distinction\r
-** between SQLITE_MUTEX_RECURSIVE and SQLITE_MUTEX_FAST if it does\r
-** not want to. ^SQLite will only request a recursive mutex in\r
-** cases where it really needs one. ^If a faster non-recursive mutex\r
-** implementation is available on the host platform, the mutex subsystem\r
-** might return such a mutex in response to SQLITE_MUTEX_FAST.\r
-**\r
-** ^The other allowed parameters to sqlite3_mutex_alloc() (anything other\r
-** than SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE) each return\r
-** a pointer to a static preexisting mutex. ^Six static mutexes are\r
-** used by the current version of SQLite. Future versions of SQLite\r
-** may add additional static mutexes. Static mutexes are for internal\r
-** use by SQLite only. Applications that use SQLite mutexes should\r
-** use only the dynamic mutexes returned by SQLITE_MUTEX_FAST or\r
-** SQLITE_MUTEX_RECURSIVE.\r
-**\r
-** ^Note that if one of the dynamic mutex parameters (SQLITE_MUTEX_FAST\r
-** or SQLITE_MUTEX_RECURSIVE) is used then sqlite3_mutex_alloc()\r
-** returns a different mutex on every call. ^But for the static\r
-** mutex types, the same mutex is returned on every call that has\r
-** the same type number.\r
-**\r
-** ^The sqlite3_mutex_free() routine deallocates a previously\r
-** allocated dynamic mutex. ^SQLite is careful to deallocate every\r
-** dynamic mutex that it allocates. The dynamic mutexes must not be in\r
-** use when they are deallocated. Attempting to deallocate a static\r
-** mutex results in undefined behavior. ^SQLite never deallocates\r
-** a static mutex.\r
-**\r
-** ^The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt\r
-** to enter a mutex. ^If another thread is already within the mutex,\r
-** sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return\r
-** SQLITE_BUSY. ^The sqlite3_mutex_try() interface returns [SQLITE_OK]\r
-** upon successful entry. ^(Mutexes created using\r
-** SQLITE_MUTEX_RECURSIVE can be entered multiple times by the same thread.\r
-** In such cases the,\r
-** mutex must be exited an equal number of times before another thread\r
-** can enter.)^ ^(If the same thread tries to enter any other\r
-** kind of mutex more than once, the behavior is undefined.\r
-** SQLite will never exhibit\r
-** such behavior in its own use of mutexes.)^\r
-**\r
-** ^(Some systems (for example, Windows 95) do not support the operation\r
-** implemented by sqlite3_mutex_try(). On those systems, sqlite3_mutex_try()\r
-** will always return SQLITE_BUSY. The SQLite core only ever uses\r
-** sqlite3_mutex_try() as an optimization so this is acceptable behavior.)^\r
-**\r
-** ^The sqlite3_mutex_leave() routine exits a mutex that was\r
-** previously entered by the same thread. ^(The behavior\r
-** is undefined if the mutex is not currently entered by the\r
-** calling thread or is not currently allocated. SQLite will\r
-** never do either.)^\r
-**\r
-** ^If the argument to sqlite3_mutex_enter(), sqlite3_mutex_try(), or\r
-** sqlite3_mutex_leave() is a NULL pointer, then all three routines\r
-** behave as no-ops.\r
-**\r
-** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()].\r
-*/\r
-SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int);\r
-SQLITE_API void sqlite3_mutex_free(sqlite3_mutex*);\r
-SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex*);\r
-SQLITE_API int sqlite3_mutex_try(sqlite3_mutex*);\r
-SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex*);\r
-\r
-/*\r
-** CAPI3REF: Mutex Methods Object\r
-** EXPERIMENTAL\r
-**\r
-** An instance of this structure defines the low-level routines\r
-** used to allocate and use mutexes.\r
-**\r
-** Usually, the default mutex implementations provided by SQLite are\r
-** sufficient, however the user has the option of substituting a custom\r
-** implementation for specialized deployments or systems for which SQLite\r
-** does not provide a suitable implementation. In this case, the user\r
-** creates and populates an instance of this structure to pass\r
-** to sqlite3_config() along with the [SQLITE_CONFIG_MUTEX] option.\r
-** Additionally, an instance of this structure can be used as an\r
-** output variable when querying the system for the current mutex\r
-** implementation, using the [SQLITE_CONFIG_GETMUTEX] option.\r
-**\r
-** ^The xMutexInit method defined by this structure is invoked as\r
-** part of system initialization by the sqlite3_initialize() function.\r
-** ^The xMutexInit routine is calle by SQLite exactly once for each\r
-** effective call to [sqlite3_initialize()].\r
-**\r
-** ^The xMutexEnd method defined by this structure is invoked as\r
-** part of system shutdown by the sqlite3_shutdown() function. The\r
-** implementation of this method is expected to release all outstanding\r
-** resources obtained by the mutex methods implementation, especially\r
-** those obtained by the xMutexInit method. ^The xMutexEnd()\r
-** interface is invoked exactly once for each call to [sqlite3_shutdown()].\r
-**\r
-** ^(The remaining seven methods defined by this structure (xMutexAlloc,\r
-** xMutexFree, xMutexEnter, xMutexTry, xMutexLeave, xMutexHeld and\r
-** xMutexNotheld) implement the following interfaces (respectively):\r
-**\r
-** <ul>\r
-** <li> [sqlite3_mutex_alloc()] </li>\r
-** <li> [sqlite3_mutex_free()] </li>\r
-** <li> [sqlite3_mutex_enter()] </li>\r
-** <li> [sqlite3_mutex_try()] </li>\r
-** <li> [sqlite3_mutex_leave()] </li>\r
-** <li> [sqlite3_mutex_held()] </li>\r
-** <li> [sqlite3_mutex_notheld()] </li>\r
-** </ul>)^\r
-**\r
-** The only difference is that the public sqlite3_XXX functions enumerated\r
-** above silently ignore any invocations that pass a NULL pointer instead\r
-** of a valid mutex handle. The implementations of the methods defined\r
-** by this structure are not required to handle this case, the results\r
-** of passing a NULL pointer instead of a valid mutex handle are undefined\r
-** (i.e. it is acceptable to provide an implementation that segfaults if\r
-** it is passed a NULL pointer).\r
-**\r
-** The xMutexInit() method must be threadsafe. ^It must be harmless to\r
-** invoke xMutexInit() mutiple times within the same process and without\r
-** intervening calls to xMutexEnd(). Second and subsequent calls to\r
-** xMutexInit() must be no-ops.\r
-**\r
-** ^xMutexInit() must not use SQLite memory allocation ([sqlite3_malloc()]\r
-** and its associates). ^Similarly, xMutexAlloc() must not use SQLite memory\r
-** allocation for a static mutex. ^However xMutexAlloc() may use SQLite\r
-** memory allocation for a fast or recursive mutex.\r
-**\r
-** ^SQLite will invoke the xMutexEnd() method when [sqlite3_shutdown()] is\r
-** called, but only if the prior call to xMutexInit returned SQLITE_OK.\r
-** If xMutexInit fails in any way, it is expected to clean up after itself\r
-** prior to returning.\r
-*/\r
-typedef struct sqlite3_mutex_methods sqlite3_mutex_methods;\r
-struct sqlite3_mutex_methods {\r
- int (*xMutexInit)(void);\r
- int (*xMutexEnd)(void);\r
- sqlite3_mutex *(*xMutexAlloc)(int);\r
- void (*xMutexFree)(sqlite3_mutex *);\r
- void (*xMutexEnter)(sqlite3_mutex *);\r
- int (*xMutexTry)(sqlite3_mutex *);\r
- void (*xMutexLeave)(sqlite3_mutex *);\r
- int (*xMutexHeld)(sqlite3_mutex *);\r
- int (*xMutexNotheld)(sqlite3_mutex *);\r
-};\r
-\r
-/*\r
-** CAPI3REF: Mutex Verification Routines\r
-**\r
-** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routines\r
-** are intended for use inside assert() statements. ^The SQLite core\r
-** never uses these routines except inside an assert() and applications\r
-** are advised to follow the lead of the core. ^The SQLite core only\r
-** provides implementations for these routines when it is compiled\r
-** with the SQLITE_DEBUG flag. ^External mutex implementations\r
-** are only required to provide these routines if SQLITE_DEBUG is\r
-** defined and if NDEBUG is not defined.\r
-**\r
-** ^These routines should return true if the mutex in their argument\r
-** is held or not held, respectively, by the calling thread.\r
-**\r
-** ^The implementation is not required to provided versions of these\r
-** routines that actually work. If the implementation does not provide working\r
-** versions of these routines, it should at least provide stubs that always\r
-** return true so that one does not get spurious assertion failures.\r
-**\r
-** ^If the argument to sqlite3_mutex_held() is a NULL pointer then\r
-** the routine should return 1. This seems counter-intuitive since\r
-** clearly the mutex cannot be held if it does not exist. But the\r
-** the reason the mutex does not exist is because the build is not\r
-** using mutexes. And we do not want the assert() containing the\r
-** call to sqlite3_mutex_held() to fail, so a non-zero return is\r
-** the appropriate thing to do. ^The sqlite3_mutex_notheld()\r
-** interface should also return 1 when given a NULL pointer.\r
-*/\r
-#ifndef NDEBUG\r
-SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*);\r
-SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*);\r
-#endif\r
-\r
-/*\r
-** CAPI3REF: Mutex Types\r
-**\r
-** The [sqlite3_mutex_alloc()] interface takes a single argument\r
-** which is one of these integer constants.\r
-**\r
-** The set of static mutexes may change from one SQLite release to the\r
-** next. Applications that override the built-in mutex logic must be\r
-** prepared to accommodate additional static mutexes.\r
-*/\r
-#define SQLITE_MUTEX_FAST 0\r
-#define SQLITE_MUTEX_RECURSIVE 1\r
-#define SQLITE_MUTEX_STATIC_MASTER 2\r
-#define SQLITE_MUTEX_STATIC_MEM 3 /* sqlite3_malloc() */\r
-#define SQLITE_MUTEX_STATIC_MEM2 4 /* NOT USED */\r
-#define SQLITE_MUTEX_STATIC_OPEN 4 /* sqlite3BtreeOpen() */\r
-#define SQLITE_MUTEX_STATIC_PRNG 5 /* sqlite3_random() */\r
-#define SQLITE_MUTEX_STATIC_LRU 6 /* lru page list */\r
-#define SQLITE_MUTEX_STATIC_LRU2 7 /* lru page list */\r
-\r
-/*\r
-** CAPI3REF: Retrieve the mutex for a database connection\r
-**\r
-** ^This interface returns a pointer the [sqlite3_mutex] object that \r
-** serializes access to the [database connection] given in the argument\r
-** when the [threading mode] is Serialized.\r
-** ^If the [threading mode] is Single-thread or Multi-thread then this\r
-** routine returns a NULL pointer.\r
-*/\r
-SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*);\r
-\r
-/*\r
-** CAPI3REF: Low-Level Control Of Database Files\r
-**\r
-** ^The [sqlite3_file_control()] interface makes a direct call to the\r
-** xFileControl method for the [sqlite3_io_methods] object associated\r
-** with a particular database identified by the second argument. ^The\r
-** name of the database "main" for the main database or "temp" for the\r
-** TEMP database, or the name that appears after the AS keyword for\r
-** databases that are added using the [ATTACH] SQL command.\r
-** ^A NULL pointer can be used in place of "main" to refer to the\r
-** main database file.\r
-** ^The third and fourth parameters to this routine\r
-** are passed directly through to the second and third parameters of\r
-** the xFileControl method. ^The return value of the xFileControl\r
-** method becomes the return value of this routine.\r
-**\r
-** ^If the second parameter (zDbName) does not match the name of any\r
-** open database file, then SQLITE_ERROR is returned. ^This error\r
-** code is not remembered and will not be recalled by [sqlite3_errcode()]\r
-** or [sqlite3_errmsg()]. The underlying xFileControl method might\r
-** also return SQLITE_ERROR. There is no way to distinguish between\r
-** an incorrect zDbName and an SQLITE_ERROR return from the underlying\r
-** xFileControl method.\r
-**\r
-** See also: [SQLITE_FCNTL_LOCKSTATE]\r
-*/\r
-SQLITE_API int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);\r
-\r
-/*\r
-** CAPI3REF: Testing Interface\r
-**\r
-** ^The sqlite3_test_control() interface is used to read out internal\r
-** state of SQLite and to inject faults into SQLite for testing\r
-** purposes. ^The first parameter is an operation code that determines\r
-** the number, meaning, and operation of all subsequent parameters.\r
-**\r
-** This interface is not for use by applications. It exists solely\r
-** for verifying the correct operation of the SQLite library. Depending\r
-** on how the SQLite library is compiled, this interface might not exist.\r
-**\r
-** The details of the operation codes, their meanings, the parameters\r
-** they take, and what they do are all subject to change without notice.\r
-** Unlike most of the SQLite API, this function is not guaranteed to\r
-** operate consistently from one release to the next.\r
-*/\r
-SQLITE_API int sqlite3_test_control(int op, ...);\r
-\r
-/*\r
-** CAPI3REF: Testing Interface Operation Codes\r
-**\r
-** These constants are the valid operation code parameters used\r
-** as the first argument to [sqlite3_test_control()].\r
-**\r
-** These parameters and their meanings are subject to change\r
-** without notice. These values are for testing purposes only.\r
-** Applications should not use any of these parameters or the\r
-** [sqlite3_test_control()] interface.\r
-*/\r
-#define SQLITE_TESTCTRL_FIRST 5\r
-#define SQLITE_TESTCTRL_PRNG_SAVE 5\r
-#define SQLITE_TESTCTRL_PRNG_RESTORE 6\r
-#define SQLITE_TESTCTRL_PRNG_RESET 7\r
-#define SQLITE_TESTCTRL_BITVEC_TEST 8\r
-#define SQLITE_TESTCTRL_FAULT_INSTALL 9\r
-#define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS 10\r
-#define SQLITE_TESTCTRL_PENDING_BYTE 11\r
-#define SQLITE_TESTCTRL_ASSERT 12\r
-#define SQLITE_TESTCTRL_ALWAYS 13\r
-#define SQLITE_TESTCTRL_RESERVE 14\r
-#define SQLITE_TESTCTRL_OPTIMIZATIONS 15\r
-#define SQLITE_TESTCTRL_ISKEYWORD 16\r
-#define SQLITE_TESTCTRL_LAST 16\r
-\r
-/*\r
-** CAPI3REF: SQLite Runtime Status\r
-** EXPERIMENTAL\r
-**\r
-** ^This interface is used to retrieve runtime status information\r
-** about the preformance of SQLite, and optionally to reset various\r
-** highwater marks. ^The first argument is an integer code for\r
-** the specific parameter to measure. ^(Recognized integer codes\r
-** are of the form [SQLITE_STATUS_MEMORY_USED | SQLITE_STATUS_...].)^\r
-** ^The current value of the parameter is returned into *pCurrent.\r
-** ^The highest recorded value is returned in *pHighwater. ^If the\r
-** resetFlag is true, then the highest record value is reset after\r
-** *pHighwater is written. ^(Some parameters do not record the highest\r
-** value. For those parameters\r
-** nothing is written into *pHighwater and the resetFlag is ignored.)^\r
-** ^(Other parameters record only the highwater mark and not the current\r
-** value. For these latter parameters nothing is written into *pCurrent.)^\r
-**\r
-** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a\r
-** non-zero [error code] on failure.\r
-**\r
-** This routine is threadsafe but is not atomic. This routine can be\r
-** called while other threads are running the same or different SQLite\r
-** interfaces. However the values returned in *pCurrent and\r
-** *pHighwater reflect the status of SQLite at different points in time\r
-** and it is possible that another thread might change the parameter\r
-** in between the times when *pCurrent and *pHighwater are written.\r
-**\r
-** See also: [sqlite3_db_status()]\r
-*/\r
-SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);\r
-\r
-\r
-/*\r
-** CAPI3REF: Status Parameters\r
-** EXPERIMENTAL\r
-**\r
-** These integer constants designate various run-time status parameters\r
-** that can be returned by [sqlite3_status()].\r
-**\r
-** <dl>\r
-** ^(<dt>SQLITE_STATUS_MEMORY_USED</dt>\r
-** <dd>This parameter is the current amount of memory checked out\r
-** using [sqlite3_malloc()], either directly or indirectly. The\r
-** figure includes calls made to [sqlite3_malloc()] by the application\r
-** and internal memory usage by the SQLite library. Scratch memory\r
-** controlled by [SQLITE_CONFIG_SCRATCH] and auxiliary page-cache\r
-** memory controlled by [SQLITE_CONFIG_PAGECACHE] is not included in\r
-** this parameter. The amount returned is the sum of the allocation\r
-** sizes as reported by the xSize method in [sqlite3_mem_methods].</dd>)^\r
-**\r
-** ^(<dt>SQLITE_STATUS_MALLOC_SIZE</dt>\r
-** <dd>This parameter records the largest memory allocation request\r
-** handed to [sqlite3_malloc()] or [sqlite3_realloc()] (or their\r
-** internal equivalents). Only the value returned in the\r
-** *pHighwater parameter to [sqlite3_status()] is of interest. \r
-** The value written into the *pCurrent parameter is undefined.</dd>)^\r
-**\r
-** ^(<dt>SQLITE_STATUS_PAGECACHE_USED</dt>\r
-** <dd>This parameter returns the number of pages used out of the\r
-** [pagecache memory allocator] that was configured using \r
-** [SQLITE_CONFIG_PAGECACHE]. The\r
-** value returned is in pages, not in bytes.</dd>)^\r
-**\r
-** ^(<dt>SQLITE_STATUS_PAGECACHE_OVERFLOW</dt>\r
-** <dd>This parameter returns the number of bytes of page cache\r
-** allocation which could not be statisfied by the [SQLITE_CONFIG_PAGECACHE]\r
-** buffer and where forced to overflow to [sqlite3_malloc()]. The\r
-** returned value includes allocations that overflowed because they\r
-** where too large (they were larger than the "sz" parameter to\r
-** [SQLITE_CONFIG_PAGECACHE]) and allocations that overflowed because\r
-** no space was left in the page cache.</dd>)^\r
-**\r
-** ^(<dt>SQLITE_STATUS_PAGECACHE_SIZE</dt>\r
-** <dd>This parameter records the largest memory allocation request\r
-** handed to [pagecache memory allocator]. Only the value returned in the\r
-** *pHighwater parameter to [sqlite3_status()] is of interest. \r
-** The value written into the *pCurrent parameter is undefined.</dd>)^\r
-**\r
-** ^(<dt>SQLITE_STATUS_SCRATCH_USED</dt>\r
-** <dd>This parameter returns the number of allocations used out of the\r
-** [scratch memory allocator] configured using\r
-** [SQLITE_CONFIG_SCRATCH]. The value returned is in allocations, not\r
-** in bytes. Since a single thread may only have one scratch allocation\r
-** outstanding at time, this parameter also reports the number of threads\r
-** using scratch memory at the same time.</dd>)^\r
-**\r
-** ^(<dt>SQLITE_STATUS_SCRATCH_OVERFLOW</dt>\r
-** <dd>This parameter returns the number of bytes of scratch memory\r
-** allocation which could not be statisfied by the [SQLITE_CONFIG_SCRATCH]\r
-** buffer and where forced to overflow to [sqlite3_malloc()]. The values\r
-** returned include overflows because the requested allocation was too\r
-** larger (that is, because the requested allocation was larger than the\r
-** "sz" parameter to [SQLITE_CONFIG_SCRATCH]) and because no scratch buffer\r
-** slots were available.\r
-** </dd>)^\r
-**\r
-** ^(<dt>SQLITE_STATUS_SCRATCH_SIZE</dt>\r
-** <dd>This parameter records the largest memory allocation request\r
-** handed to [scratch memory allocator]. Only the value returned in the\r
-** *pHighwater parameter to [sqlite3_status()] is of interest. \r
-** The value written into the *pCurrent parameter is undefined.</dd>)^\r
-**\r
-** ^(<dt>SQLITE_STATUS_PARSER_STACK</dt>\r
-** <dd>This parameter records the deepest parser stack. It is only\r
-** meaningful if SQLite is compiled with [YYTRACKMAXSTACKDEPTH].</dd>)^\r
-** </dl>\r
-**\r
-** New status parameters may be added from time to time.\r
-*/\r
-#define SQLITE_STATUS_MEMORY_USED 0\r
-#define SQLITE_STATUS_PAGECACHE_USED 1\r
-#define SQLITE_STATUS_PAGECACHE_OVERFLOW 2\r
-#define SQLITE_STATUS_SCRATCH_USED 3\r
-#define SQLITE_STATUS_SCRATCH_OVERFLOW 4\r
-#define SQLITE_STATUS_MALLOC_SIZE 5\r
-#define SQLITE_STATUS_PARSER_STACK 6\r
-#define SQLITE_STATUS_PAGECACHE_SIZE 7\r
-#define SQLITE_STATUS_SCRATCH_SIZE 8\r
-\r
-/*\r
-** CAPI3REF: Database Connection Status\r
-** EXPERIMENTAL\r
-**\r
-** ^This interface is used to retrieve runtime status information \r
-** about a single [database connection]. ^The first argument is the\r
-** database connection object to be interrogated. ^The second argument\r
-** is the parameter to interrogate. ^Currently, the only allowed value\r
-** for the second parameter is [SQLITE_DBSTATUS_LOOKASIDE_USED].\r
-** Additional options will likely appear in future releases of SQLite.\r
-**\r
-** ^The current value of the requested parameter is written into *pCur\r
-** and the highest instantaneous value is written into *pHiwtr. ^If\r
-** the resetFlg is true, then the highest instantaneous value is\r
-** reset back down to the current value.\r
-**\r
-** See also: [sqlite3_status()] and [sqlite3_stmt_status()].\r
-*/\r
-SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);\r
-\r
-/*\r
-** CAPI3REF: Status Parameters for database connections\r
-** EXPERIMENTAL\r
-**\r
-** These constants are the available integer "verbs" that can be passed as\r
-** the second argument to the [sqlite3_db_status()] interface.\r
-**\r
-** New verbs may be added in future releases of SQLite. Existing verbs\r
-** might be discontinued. Applications should check the return code from\r
-** [sqlite3_db_status()] to make sure that the call worked.\r
-** The [sqlite3_db_status()] interface will return a non-zero error code\r
-** if a discontinued or unsupported verb is invoked.\r
-**\r
-** <dl>\r
-** ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_USED</dt>\r
-** <dd>This parameter returns the number of lookaside memory slots currently\r
-** checked out.</dd>)^\r
-** </dl>\r
-*/\r
-#define SQLITE_DBSTATUS_LOOKASIDE_USED 0\r
-\r
-\r
-/*\r
-** CAPI3REF: Prepared Statement Status\r
-** EXPERIMENTAL\r
-**\r
-** ^(Each prepared statement maintains various\r
-** [SQLITE_STMTSTATUS_SORT | counters] that measure the number\r
-** of times it has performed specific operations.)^ These counters can\r
-** be used to monitor the performance characteristics of the prepared\r
-** statements. For example, if the number of table steps greatly exceeds\r
-** the number of table searches or result rows, that would tend to indicate\r
-** that the prepared statement is using a full table scan rather than\r
-** an index. \r
-**\r
-** ^(This interface is used to retrieve and reset counter values from\r
-** a [prepared statement]. The first argument is the prepared statement\r
-** object to be interrogated. The second argument\r
-** is an integer code for a specific [SQLITE_STMTSTATUS_SORT | counter]\r
-** to be interrogated.)^\r
-** ^The current value of the requested counter is returned.\r
-** ^If the resetFlg is true, then the counter is reset to zero after this\r
-** interface call returns.\r
-**\r
-** See also: [sqlite3_status()] and [sqlite3_db_status()].\r
-*/\r
-SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);\r
-\r
-/*\r
-** CAPI3REF: Status Parameters for prepared statements\r
-** EXPERIMENTAL\r
-**\r
-** These preprocessor macros define integer codes that name counter\r
-** values associated with the [sqlite3_stmt_status()] interface.\r
-** The meanings of the various counters are as follows:\r
-**\r
-** <dl>\r
-** <dt>SQLITE_STMTSTATUS_FULLSCAN_STEP</dt>\r
-** <dd>^This is the number of times that SQLite has stepped forward in\r
-** a table as part of a full table scan. Large numbers for this counter\r
-** may indicate opportunities for performance improvement through \r
-** careful use of indices.</dd>\r
-**\r
-** <dt>SQLITE_STMTSTATUS_SORT</dt>\r
-** <dd>^This is the number of sort operations that have occurred.\r
-** A non-zero value in this counter may indicate an opportunity to\r
-** improvement performance through careful use of indices.</dd>\r
-**\r
-** </dl>\r
-*/\r
-#define SQLITE_STMTSTATUS_FULLSCAN_STEP 1\r
-#define SQLITE_STMTSTATUS_SORT 2\r
-\r
-/*\r
-** CAPI3REF: Custom Page Cache Object\r
-** EXPERIMENTAL\r
-**\r
-** The sqlite3_pcache type is opaque. It is implemented by\r
-** the pluggable module. The SQLite core has no knowledge of\r
-** its size or internal structure and never deals with the\r
-** sqlite3_pcache object except by holding and passing pointers\r
-** to the object.\r
-**\r
-** See [sqlite3_pcache_methods] for additional information.\r
-*/\r
-typedef struct sqlite3_pcache sqlite3_pcache;\r
-\r
-/*\r
-** CAPI3REF: Application Defined Page Cache.\r
-** KEYWORDS: {page cache}\r
-** EXPERIMENTAL\r
-**\r
-** ^(The [sqlite3_config]([SQLITE_CONFIG_PCACHE], ...) interface can\r
-** register an alternative page cache implementation by passing in an \r
-** instance of the sqlite3_pcache_methods structure.)^ The majority of the \r
-** heap memory used by SQLite is used by the page cache to cache data read \r
-** from, or ready to be written to, the database file. By implementing a \r
-** custom page cache using this API, an application can control more \r
-** precisely the amount of memory consumed by SQLite, the way in which \r
-** that memory is allocated and released, and the policies used to \r
-** determine exactly which parts of a database file are cached and for \r
-** how long.\r
-**\r
-** ^(The contents of the sqlite3_pcache_methods structure are copied to an\r
-** internal buffer by SQLite within the call to [sqlite3_config]. Hence\r
-** the application may discard the parameter after the call to\r
-** [sqlite3_config()] returns.)^\r
-**\r
-** ^The xInit() method is called once for each call to [sqlite3_initialize()]\r
-** (usually only once during the lifetime of the process). ^(The xInit()\r
-** method is passed a copy of the sqlite3_pcache_methods.pArg value.)^\r
-** ^The xInit() method can set up up global structures and/or any mutexes\r
-** required by the custom page cache implementation. \r
-**\r
-** ^The xShutdown() method is called from within [sqlite3_shutdown()], \r
-** if the application invokes this API. It can be used to clean up \r
-** any outstanding resources before process shutdown, if required.\r
-**\r
-** ^SQLite holds a [SQLITE_MUTEX_RECURSIVE] mutex when it invokes\r
-** the xInit method, so the xInit method need not be threadsafe. ^The\r
-** xShutdown method is only called from [sqlite3_shutdown()] so it does\r
-** not need to be threadsafe either. All other methods must be threadsafe\r
-** in multithreaded applications.\r
-**\r
-** ^SQLite will never invoke xInit() more than once without an intervening\r
-** call to xShutdown().\r
-**\r
-** ^The xCreate() method is used to construct a new cache instance. SQLite\r
-** will typically create one cache instance for each open database file,\r
-** though this is not guaranteed. ^The\r
-** first parameter, szPage, is the size in bytes of the pages that must\r
-** be allocated by the cache. ^szPage will not be a power of two. ^szPage\r
-** will the page size of the database file that is to be cached plus an\r
-** increment (here called "R") of about 100 or 200. ^SQLite will use the\r
-** extra R bytes on each page to store metadata about the underlying\r
-** database page on disk. The value of R depends\r
-** on the SQLite version, the target platform, and how SQLite was compiled.\r
-** ^R is constant for a particular build of SQLite. ^The second argument to\r
-** xCreate(), bPurgeable, is true if the cache being created will\r
-** be used to cache database pages of a file stored on disk, or\r
-** false if it is used for an in-memory database. ^The cache implementation\r
-** does not have to do anything special based with the value of bPurgeable;\r
-** it is purely advisory. ^On a cache where bPurgeable is false, SQLite will\r
-** never invoke xUnpin() except to deliberately delete a page.\r
-** ^In other words, a cache created with bPurgeable set to false will\r
-** never contain any unpinned pages.\r
-**\r
-** ^(The xCachesize() method may be called at any time by SQLite to set the\r
-** suggested maximum cache-size (number of pages stored by) the cache\r
-** instance passed as the first argument. This is the value configured using\r
-** the SQLite "[PRAGMA cache_size]" command.)^ ^As with the bPurgeable\r
-** parameter, the implementation is not required to do anything with this\r
-** value; it is advisory only.\r
-**\r
-** ^The xPagecount() method should return the number of pages currently\r
-** stored in the cache.\r
-** \r
-** ^The xFetch() method is used to fetch a page and return a pointer to it. \r
-** ^A 'page', in this context, is a buffer of szPage bytes aligned at an\r
-** 8-byte boundary. ^The page to be fetched is determined by the key. ^The\r
-** mimimum key value is 1. After it has been retrieved using xFetch, the page \r
-** is considered to be "pinned".\r
-**\r
-** ^If the requested page is already in the page cache, then the page cache\r
-** implementation must return a pointer to the page buffer with its content\r
-** intact. ^(If the requested page is not already in the cache, then the\r
-** behavior of the cache implementation is determined by the value of the\r
-** createFlag parameter passed to xFetch, according to the following table:\r
-**\r
-** <table border=1 width=85% align=center>\r
-** <tr><th> createFlag <th> Behaviour when page is not already in cache\r
-** <tr><td> 0 <td> Do not allocate a new page. Return NULL.\r
-** <tr><td> 1 <td> Allocate a new page if it easy and convenient to do so.\r
-** Otherwise return NULL.\r
-** <tr><td> 2 <td> Make every effort to allocate a new page. Only return\r
-** NULL if allocating a new page is effectively impossible.\r
-** </table>)^\r
-**\r
-** SQLite will normally invoke xFetch() with a createFlag of 0 or 1. If\r
-** a call to xFetch() with createFlag==1 returns NULL, then SQLite will\r
-** attempt to unpin one or more cache pages by spilling the content of\r
-** pinned pages to disk and synching the operating system disk cache. After\r
-** attempting to unpin pages, the xFetch() method will be invoked again with\r
-** a createFlag of 2.\r
-**\r
-** ^xUnpin() is called by SQLite with a pointer to a currently pinned page\r
-** as its second argument. ^(If the third parameter, discard, is non-zero,\r
-** then the page should be evicted from the cache. In this case SQLite \r
-** assumes that the next time the page is retrieved from the cache using\r
-** the xFetch() method, it will be zeroed.)^ ^If the discard parameter is\r
-** zero, then the page is considered to be unpinned. ^The cache implementation\r
-** may choose to evict unpinned pages at any time.\r
-**\r
-** ^(The cache is not required to perform any reference counting. A single \r
-** call to xUnpin() unpins the page regardless of the number of prior calls \r
-** to xFetch().)^\r
-**\r
-** ^The xRekey() method is used to change the key value associated with the\r
-** page passed as the second argument from oldKey to newKey. ^If the cache\r
-** previously contains an entry associated with newKey, it should be\r
-** discarded. ^Any prior cache entry associated with newKey is guaranteed not\r
-** to be pinned.\r
-**\r
-** ^When SQLite calls the xTruncate() method, the cache must discard all\r
-** existing cache entries with page numbers (keys) greater than or equal\r
-** to the value of the iLimit parameter passed to xTruncate(). ^If any\r
-** of these pages are pinned, they are implicitly unpinned, meaning that\r
-** they can be safely discarded.\r
-**\r
-** ^The xDestroy() method is used to delete a cache allocated by xCreate().\r
-** All resources associated with the specified cache should be freed. ^After\r
-** calling the xDestroy() method, SQLite considers the [sqlite3_pcache*]\r
-** handle invalid, and will not use it with any other sqlite3_pcache_methods\r
-** functions.\r
-*/\r
-typedef struct sqlite3_pcache_methods sqlite3_pcache_methods;\r
-struct sqlite3_pcache_methods {\r
- void *pArg;\r
- int (*xInit)(void*);\r
- void (*xShutdown)(void*);\r
- sqlite3_pcache *(*xCreate)(int szPage, int bPurgeable);\r
- void (*xCachesize)(sqlite3_pcache*, int nCachesize);\r
- int (*xPagecount)(sqlite3_pcache*);\r
- void *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag);\r
- void (*xUnpin)(sqlite3_pcache*, void*, int discard);\r
- void (*xRekey)(sqlite3_pcache*, void*, unsigned oldKey, unsigned newKey);\r
- void (*xTruncate)(sqlite3_pcache*, unsigned iLimit);\r
- void (*xDestroy)(sqlite3_pcache*);\r
-};\r
-\r
-/*\r
-** CAPI3REF: Online Backup Object\r
-** EXPERIMENTAL\r
-**\r
-** The sqlite3_backup object records state information about an ongoing\r
-** online backup operation. ^The sqlite3_backup object is created by\r
-** a call to [sqlite3_backup_init()] and is destroyed by a call to\r
-** [sqlite3_backup_finish()].\r
-**\r
-** See Also: [Using the SQLite Online Backup API]\r
-*/\r
-typedef struct sqlite3_backup sqlite3_backup;\r
-\r
-/*\r
-** CAPI3REF: Online Backup API.\r
-** EXPERIMENTAL\r
-**\r
-** The backup API copies the content of one database into another.\r
-** It is useful either for creating backups of databases or\r
-** for copying in-memory databases to or from persistent files. \r
-**\r
-** See Also: [Using the SQLite Online Backup API]\r
-**\r
-** ^Exclusive access is required to the destination database for the \r
-** duration of the operation. ^However the source database is only\r
-** read-locked while it is actually being read; it is not locked\r
-** continuously for the entire backup operation. ^Thus, the backup may be\r
-** performed on a live source database without preventing other users from\r
-** reading or writing to the source database while the backup is underway.\r
-** \r
-** ^(To perform a backup operation: \r
-** <ol>\r
-** <li><b>sqlite3_backup_init()</b> is called once to initialize the\r
-** backup, \r
-** <li><b>sqlite3_backup_step()</b> is called one or more times to transfer \r
-** the data between the two databases, and finally\r
-** <li><b>sqlite3_backup_finish()</b> is called to release all resources \r
-** associated with the backup operation. \r
-** </ol>)^\r
-** There should be exactly one call to sqlite3_backup_finish() for each\r
-** successful call to sqlite3_backup_init().\r
-**\r
-** <b>sqlite3_backup_init()</b>\r
-**\r
-** ^The D and N arguments to sqlite3_backup_init(D,N,S,M) are the \r
-** [database connection] associated with the destination database \r
-** and the database name, respectively.\r
-** ^The database name is "main" for the main database, "temp" for the\r
-** temporary database, or the name specified after the AS keyword in\r
-** an [ATTACH] statement for an attached database.\r
-** ^The S and M arguments passed to \r
-** sqlite3_backup_init(D,N,S,M) identify the [database connection]\r
-** and database name of the source database, respectively.\r
-** ^The source and destination [database connections] (parameters S and D)\r
-** must be different or else sqlite3_backup_init(D,N,S,M) will file with\r
-** an error.\r
-**\r
-** ^If an error occurs within sqlite3_backup_init(D,N,S,M), then NULL is\r
-** returned and an error code and error message are store3d in the\r
-** destination [database connection] D.\r
-** ^The error code and message for the failed call to sqlite3_backup_init()\r
-** can be retrieved using the [sqlite3_errcode()], [sqlite3_errmsg()], and/or\r
-** [sqlite3_errmsg16()] functions.\r
-** ^A successful call to sqlite3_backup_init() returns a pointer to an\r
-** [sqlite3_backup] object.\r
-** ^The [sqlite3_backup] object may be used with the sqlite3_backup_step() and\r
-** sqlite3_backup_finish() functions to perform the specified backup \r
-** operation.\r
-**\r
-** <b>sqlite3_backup_step()</b>\r
-**\r
-** ^Function sqlite3_backup_step(B,N) will copy up to N pages between \r
-** the source and destination databases specified by [sqlite3_backup] object B.\r
-** ^If N is negative, all remaining source pages are copied. \r
-** ^If sqlite3_backup_step(B,N) successfully copies N pages and there\r
-** are still more pages to be copied, then the function resturns [SQLITE_OK].\r
-** ^If sqlite3_backup_step(B,N) successfully finishes copying all pages\r
-** from source to destination, then it returns [SQLITE_DONE].\r
-** ^If an error occurs while running sqlite3_backup_step(B,N),\r
-** then an [error code] is returned. ^As well as [SQLITE_OK] and\r
-** [SQLITE_DONE], a call to sqlite3_backup_step() may return [SQLITE_READONLY],\r
-** [SQLITE_NOMEM], [SQLITE_BUSY], [SQLITE_LOCKED], or an\r
-** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX] extended error code.\r
-**\r
-** ^The sqlite3_backup_step() might return [SQLITE_READONLY] if the destination\r
-** database was opened read-only or if\r
-** the destination is an in-memory database with a different page size\r
-** from the source database.\r
-**\r
-** ^If sqlite3_backup_step() cannot obtain a required file-system lock, then\r
-** the [sqlite3_busy_handler | busy-handler function]\r
-** is invoked (if one is specified). ^If the \r
-** busy-handler returns non-zero before the lock is available, then \r
-** [SQLITE_BUSY] is returned to the caller. ^In this case the call to\r
-** sqlite3_backup_step() can be retried later. ^If the source\r
-** [database connection]\r
-** is being used to write to the source database when sqlite3_backup_step()\r
-** is called, then [SQLITE_LOCKED] is returned immediately. ^Again, in this\r
-** case the call to sqlite3_backup_step() can be retried later on. ^(If\r
-** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX], [SQLITE_NOMEM], or\r
-** [SQLITE_READONLY] is returned, then \r
-** there is no point in retrying the call to sqlite3_backup_step(). These \r
-** errors are considered fatal.)^ The application must accept \r
-** that the backup operation has failed and pass the backup operation handle \r
-** to the sqlite3_backup_finish() to release associated resources.\r
-**\r
-** ^The first call to sqlite3_backup_step() obtains an exclusive lock\r
-** on the destination file. ^The exclusive lock is not released until either \r
-** sqlite3_backup_finish() is called or the backup operation is complete \r
-** and sqlite3_backup_step() returns [SQLITE_DONE]. ^Every call to\r
-** sqlite3_backup_step() obtains a [shared lock] on the source database that\r
-** lasts for the duration of the sqlite3_backup_step() call.\r
-** ^Because the source database is not locked between calls to\r
-** sqlite3_backup_step(), the source database may be modified mid-way\r
-** through the backup process. ^If the source database is modified by an\r
-** external process or via a database connection other than the one being\r
-** used by the backup operation, then the backup will be automatically\r
-** restarted by the next call to sqlite3_backup_step(). ^If the source \r
-** database is modified by the using the same database connection as is used\r
-** by the backup operation, then the backup database is automatically\r
-** updated at the same time.\r
-**\r
-** <b>sqlite3_backup_finish()</b>\r
-**\r
-** When sqlite3_backup_step() has returned [SQLITE_DONE], or when the \r
-** application wishes to abandon the backup operation, the application\r
-** should destroy the [sqlite3_backup] by passing it to sqlite3_backup_finish().\r
-** ^The sqlite3_backup_finish() interfaces releases all\r
-** resources associated with the [sqlite3_backup] object. \r
-** ^If sqlite3_backup_step() has not yet returned [SQLITE_DONE], then any\r
-** active write-transaction on the destination database is rolled back.\r
-** The [sqlite3_backup] object is invalid\r
-** and may not be used following a call to sqlite3_backup_finish().\r
-**\r
-** ^The value returned by sqlite3_backup_finish is [SQLITE_OK] if no\r
-** sqlite3_backup_step() errors occurred, regardless or whether or not\r
-** sqlite3_backup_step() completed.\r
-** ^If an out-of-memory condition or IO error occurred during any prior\r
-** sqlite3_backup_step() call on the same [sqlite3_backup] object, then\r
-** sqlite3_backup_finish() returns the corresponding [error code].\r
-**\r
-** ^A return of [SQLITE_BUSY] or [SQLITE_LOCKED] from sqlite3_backup_step()\r
-** is not a permanent error and does not affect the return value of\r
-** sqlite3_backup_finish().\r
-**\r
-** <b>sqlite3_backup_remaining(), sqlite3_backup_pagecount()</b>\r
-**\r
-** ^Each call to sqlite3_backup_step() sets two values inside\r
-** the [sqlite3_backup] object: the number of pages still to be backed\r
-** up and the total number of pages in the source databae file.\r
-** The sqlite3_backup_remaining() and sqlite3_backup_pagecount() interfaces\r
-** retrieve these two values, respectively.\r
-**\r
-** ^The values returned by these functions are only updated by\r
-** sqlite3_backup_step(). ^If the source database is modified during a backup\r
-** operation, then the values are not updated to account for any extra\r
-** pages that need to be updated or the size of the source database file\r
-** changing.\r
-**\r
-** <b>Concurrent Usage of Database Handles</b>\r
-**\r
-** ^The source [database connection] may be used by the application for other\r
-** purposes while a backup operation is underway or being initialized.\r
-** ^If SQLite is compiled and configured to support threadsafe database\r
-** connections, then the source database connection may be used concurrently\r
-** from within other threads.\r
-**\r
-** However, the application must guarantee that the destination \r
-** [database connection] is not passed to any other API (by any thread) after \r
-** sqlite3_backup_init() is called and before the corresponding call to\r
-** sqlite3_backup_finish(). SQLite does not currently check to see\r
-** if the application incorrectly accesses the destination [database connection]\r
-** and so no error code is reported, but the operations may malfunction\r
-** nevertheless. Use of the destination database connection while a\r
-** backup is in progress might also also cause a mutex deadlock.\r
-**\r
-** If running in [shared cache mode], the application must\r
-** guarantee that the shared cache used by the destination database\r
-** is not accessed while the backup is running. In practice this means\r
-** that the application must guarantee that the disk file being \r
-** backed up to is not accessed by any connection within the process,\r
-** not just the specific connection that was passed to sqlite3_backup_init().\r
-**\r
-** The [sqlite3_backup] object itself is partially threadsafe. Multiple \r
-** threads may safely make multiple concurrent calls to sqlite3_backup_step().\r
-** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount()\r
-** APIs are not strictly speaking threadsafe. If they are invoked at the\r
-** same time as another thread is invoking sqlite3_backup_step() it is\r
-** possible that they return invalid values.\r
-*/\r
-SQLITE_API sqlite3_backup *sqlite3_backup_init(\r
- sqlite3 *pDest, /* Destination database handle */\r
- const char *zDestName, /* Destination database name */\r
- sqlite3 *pSource, /* Source database handle */\r
- const char *zSourceName /* Source database name */\r
-);\r
-SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage);\r
-SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p);\r
-SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p);\r
-SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);\r
-\r
-/*\r
-** CAPI3REF: Unlock Notification\r
-** EXPERIMENTAL\r
-**\r
-** ^When running in shared-cache mode, a database operation may fail with\r
-** an [SQLITE_LOCKED] error if the required locks on the shared-cache or\r
-** individual tables within the shared-cache cannot be obtained. See\r
-** [SQLite Shared-Cache Mode] for a description of shared-cache locking. \r
-** ^This API may be used to register a callback that SQLite will invoke \r
-** when the connection currently holding the required lock relinquishes it.\r
-** ^This API is only available if the library was compiled with the\r
-** [SQLITE_ENABLE_UNLOCK_NOTIFY] C-preprocessor symbol defined.\r
-**\r
-** See Also: [Using the SQLite Unlock Notification Feature].\r
-**\r
-** ^Shared-cache locks are released when a database connection concludes\r
-** its current transaction, either by committing it or rolling it back. \r
-**\r
-** ^When a connection (known as the blocked connection) fails to obtain a\r
-** shared-cache lock and SQLITE_LOCKED is returned to the caller, the\r
-** identity of the database connection (the blocking connection) that\r
-** has locked the required resource is stored internally. ^After an \r
-** application receives an SQLITE_LOCKED error, it may call the\r
-** sqlite3_unlock_notify() method with the blocked connection handle as \r
-** the first argument to register for a callback that will be invoked\r
-** when the blocking connections current transaction is concluded. ^The\r
-** callback is invoked from within the [sqlite3_step] or [sqlite3_close]\r
-** call that concludes the blocking connections transaction.\r
-**\r
-** ^(If sqlite3_unlock_notify() is called in a multi-threaded application,\r
-** there is a chance that the blocking connection will have already\r
-** concluded its transaction by the time sqlite3_unlock_notify() is invoked.\r
-** If this happens, then the specified callback is invoked immediately,\r
-** from within the call to sqlite3_unlock_notify().)^\r
-**\r
-** ^If the blocked connection is attempting to obtain a write-lock on a\r
-** shared-cache table, and more than one other connection currently holds\r
-** a read-lock on the same table, then SQLite arbitrarily selects one of \r
-** the other connections to use as the blocking connection.\r
-**\r
-** ^(There may be at most one unlock-notify callback registered by a \r
-** blocked connection. If sqlite3_unlock_notify() is called when the\r
-** blocked connection already has a registered unlock-notify callback,\r
-** then the new callback replaces the old.)^ ^If sqlite3_unlock_notify() is\r
-** called with a NULL pointer as its second argument, then any existing\r
-** unlock-notify callback is cancelled. ^The blocked connections \r
-** unlock-notify callback may also be canceled by closing the blocked\r
-** connection using [sqlite3_close()].\r
-**\r
-** The unlock-notify callback is not reentrant. If an application invokes\r
-** any sqlite3_xxx API functions from within an unlock-notify callback, a\r
-** crash or deadlock may be the result.\r
-**\r
-** ^Unless deadlock is detected (see below), sqlite3_unlock_notify() always\r
-** returns SQLITE_OK.\r
-**\r
-** <b>Callback Invocation Details</b>\r
-**\r
-** When an unlock-notify callback is registered, the application provides a \r
-** single void* pointer that is passed to the callback when it is invoked.\r
-** However, the signature of the callback function allows SQLite to pass\r
-** it an array of void* context pointers. The first argument passed to\r
-** an unlock-notify callback is a pointer to an array of void* pointers,\r
-** and the second is the number of entries in the array.\r
-**\r
-** When a blocking connections transaction is concluded, there may be\r
-** more than one blocked connection that has registered for an unlock-notify\r
-** callback. ^If two or more such blocked connections have specified the\r
-** same callback function, then instead of invoking the callback function\r
-** multiple times, it is invoked once with the set of void* context pointers\r
-** specified by the blocked connections bundled together into an array.\r
-** This gives the application an opportunity to prioritize any actions \r
-** related to the set of unblocked database connections.\r
-**\r
-** <b>Deadlock Detection</b>\r
-**\r
-** Assuming that after registering for an unlock-notify callback a \r
-** database waits for the callback to be issued before taking any further\r
-** action (a reasonable assumption), then using this API may cause the\r
-** application to deadlock. For example, if connection X is waiting for\r
-** connection Y's transaction to be concluded, and similarly connection\r
-** Y is waiting on connection X's transaction, then neither connection\r
-** will proceed and the system may remain deadlocked indefinitely.\r
-**\r
-** To avoid this scenario, the sqlite3_unlock_notify() performs deadlock\r
-** detection. ^If a given call to sqlite3_unlock_notify() would put the\r
-** system in a deadlocked state, then SQLITE_LOCKED is returned and no\r
-** unlock-notify callback is registered. The system is said to be in\r
-** a deadlocked state if connection A has registered for an unlock-notify\r
-** callback on the conclusion of connection B's transaction, and connection\r
-** B has itself registered for an unlock-notify callback when connection\r
-** A's transaction is concluded. ^Indirect deadlock is also detected, so\r
-** the system is also considered to be deadlocked if connection B has\r
-** registered for an unlock-notify callback on the conclusion of connection\r
-** C's transaction, where connection C is waiting on connection A. ^Any\r
-** number of levels of indirection are allowed.\r
-**\r
-** <b>The "DROP TABLE" Exception</b>\r
-**\r
-** When a call to [sqlite3_step()] returns SQLITE_LOCKED, it is almost \r
-** always appropriate to call sqlite3_unlock_notify(). There is however,\r
-** one exception. When executing a "DROP TABLE" or "DROP INDEX" statement,\r
-** SQLite checks if there are any currently executing SELECT statements\r
-** that belong to the same connection. If there are, SQLITE_LOCKED is\r
-** returned. In this case there is no "blocking connection", so invoking\r
-** sqlite3_unlock_notify() results in the unlock-notify callback being\r
-** invoked immediately. If the application then re-attempts the "DROP TABLE"\r
-** or "DROP INDEX" query, an infinite loop might be the result.\r
-**\r
-** One way around this problem is to check the extended error code returned\r
-** by an sqlite3_step() call. ^(If there is a blocking connection, then the\r
-** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in\r
-** the special "DROP TABLE/INDEX" case, the extended error code is just \r
-** SQLITE_LOCKED.)^\r
-*/\r
-SQLITE_API int sqlite3_unlock_notify(\r
- sqlite3 *pBlocked, /* Waiting connection */\r
- void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */\r
- void *pNotifyArg /* Argument to pass to xNotify */\r
-);\r
-\r
-\r
-/*\r
-** CAPI3REF: String Comparison\r
-** EXPERIMENTAL\r
-**\r
-** ^The [sqlite3_strnicmp()] API allows applications and extensions to\r
-** compare the contents of two buffers containing UTF-8 strings in a\r
-** case-indendent fashion, using the same definition of case independence \r
-** that SQLite uses internally when comparing identifiers.\r
-*/\r
-SQLITE_API int sqlite3_strnicmp(const char *, const char *, int);\r
-\r
-/*\r
-** CAPI3REF: Error Logging Interface\r
-** EXPERIMENTAL\r
-**\r
-** ^The [sqlite3_log()] interface writes a message into the error log\r
-** established by the [SQLITE_CONFIG_LOG] option to [sqlite3_config()].\r
-** ^If logging is enabled, the zFormat string and subsequent arguments are\r
-** passed through to [sqlite3_vmprintf()] to generate the final output string.\r
-**\r
-** The sqlite3_log() interface is intended for use by extensions such as\r
-** virtual tables, collating functions, and SQL functions. While there is\r
-** nothing to prevent an application from calling sqlite3_log(), doing so\r
-** is considered bad form.\r
-**\r
-** The zFormat string must not be NULL.\r
-**\r
-** To avoid deadlocks and other threading problems, the sqlite3_log() routine\r
-** will not use dynamically allocated memory. The log message is stored in\r
-** a fixed-length buffer on the stack. If the log message is longer than\r
-** a few hundred characters, it will be truncated to the length of the\r
-** buffer.\r
-*/\r
-SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...);\r
-\r
-/*\r
-** Undo the hack that converts floating point types to integer for\r
-** builds on processors without floating point support.\r
-*/\r
-#ifdef SQLITE_OMIT_FLOATING_POINT\r
-# undef double\r
-#endif\r
-\r
-#ifdef __cplusplus\r
-} /* End of the 'extern "C"' block */\r
-#endif\r
-#endif\r
-\r
+/*
+** 2001 September 15
+**
+** The author disclaims copyright to this source code. In place of
+** a legal notice, here is a blessing:
+**
+** May you do good and not evil.
+** May you find forgiveness for yourself and forgive others.
+** May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This header file defines the interface that the SQLite library
+** presents to client programs. If a C-function, structure, datatype,
+** or constant definition does not appear in this file, then it is
+** not a published API of SQLite, is subject to change without
+** notice, and should not be referenced by programs that use SQLite.
+**
+** Some of the definitions that are in this file are marked as
+** "experimental". Experimental interfaces are normally new
+** features recently added to SQLite. We do not anticipate changes
+** to experimental interfaces but reserve the right to make minor changes
+** if experience from use "in the wild" suggest such changes are prudent.
+**
+** The official C-language API documentation for SQLite is derived
+** from comments in this file. This file is the authoritative source
+** on how SQLite interfaces are suppose to operate.
+**
+** The name of this file under configuration management is "sqlite.h.in".
+** The makefile makes some minor changes to this file (such as inserting
+** the version number) and changes its name to "sqlite3.h" as
+** part of the build process.
+*/
+#ifndef _SQLITE3_H_
+#define _SQLITE3_H_
+#include <stdarg.h> /* Needed for the definition of va_list */
+
+/*
+** Make sure we can call this stuff from C++.
+*/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/*
+** Add the ability to override 'extern'
+*/
+#ifndef SQLITE_EXTERN
+# define SQLITE_EXTERN extern
+#endif
+
+#ifndef SQLITE_API
+# define SQLITE_API
+#endif
+
+
+/*
+** These no-op macros are used in front of interfaces to mark those
+** interfaces as either deprecated or experimental. New applications
+** should not use deprecated interfaces - they are support for backwards
+** compatibility only. Application writers should be aware that
+** experimental interfaces are subject to change in point releases.
+**
+** These macros used to resolve to various kinds of compiler magic that
+** would generate warning messages when they were used. But that
+** compiler magic ended up generating such a flurry of bug reports
+** that we have taken it all out and gone back to using simple
+** noop macros.
+*/
+#define SQLITE_DEPRECATED
+#define SQLITE_EXPERIMENTAL
+
+/*
+** Ensure these symbols were not defined by some previous header file.
+*/
+#ifdef SQLITE_VERSION
+# undef SQLITE_VERSION
+#endif
+#ifdef SQLITE_VERSION_NUMBER
+# undef SQLITE_VERSION_NUMBER
+#endif
+
+/*
+** CAPI3REF: Compile-Time Library Version Numbers
+**
+** ^(The [SQLITE_VERSION] C preprocessor macro in the sqlite3.h header
+** evaluates to a string literal that is the SQLite version in the
+** format "X.Y.Z" where X is the major version number (always 3 for
+** SQLite3) and Y is the minor version number and Z is the release number.)^
+** ^(The [SQLITE_VERSION_NUMBER] C preprocessor macro resolves to an integer
+** with the value (X*1000000 + Y*1000 + Z) where X, Y, and Z are the same
+** numbers used in [SQLITE_VERSION].)^
+** The SQLITE_VERSION_NUMBER for any given release of SQLite will also
+** be larger than the release from which it is derived. Either Y will
+** be held constant and Z will be incremented or else Y will be incremented
+** and Z will be reset to zero.
+**
+** Since version 3.6.18, SQLite source code has been stored in the
+** <a href="http://www.fossil-scm.org/">Fossil configuration management
+** system</a>. ^The SQLITE_SOURCE_ID macro evalutes to
+** a string which identifies a particular check-in of SQLite
+** within its configuration management system. ^The SQLITE_SOURCE_ID
+** string contains the date and time of the check-in (UTC) and an SHA1
+** hash of the entire source tree.
+**
+** See also: [sqlite3_libversion()],
+** [sqlite3_libversion_number()], [sqlite3_sourceid()],
+** [sqlite_version()] and [sqlite_source_id()].
+*/
+#define SQLITE_VERSION "3.6.23.1"
+#define SQLITE_VERSION_NUMBER 3006023
+#define SQLITE_SOURCE_ID "2010-03-26 22:28:06 b078b588d617e07886ad156e9f54ade6d823568e"
+
+/*
+** CAPI3REF: Run-Time Library Version Numbers
+** KEYWORDS: sqlite3_version, sqlite3_sourceid
+**
+** These interfaces provide the same information as the [SQLITE_VERSION],
+** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros
+** but are associated with the library instead of the header file. ^(Cautious
+** programmers might include assert() statements in their application to
+** verify that values returned by these interfaces match the macros in
+** the header, and thus insure that the application is
+** compiled with matching library and header files.
+**
+** <blockquote><pre>
+** assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER );
+** assert( strcmp(sqlite3_sourceid(),SQLITE_SOURCE_ID)==0 );
+** assert( strcmp(sqlite3_libversion(),SQLITE_VERSION)==0 );
+** </pre></blockquote>)^
+**
+** ^The sqlite3_version[] string constant contains the text of [SQLITE_VERSION]
+** macro. ^The sqlite3_libversion() function returns a pointer to the
+** to the sqlite3_version[] string constant. The sqlite3_libversion()
+** function is provided for use in DLLs since DLL users usually do not have
+** direct access to string constants within the DLL. ^The
+** sqlite3_libversion_number() function returns an integer equal to
+** [SQLITE_VERSION_NUMBER]. ^The sqlite3_sourceid() function returns
+** a pointer to a string constant whose value is the same as the
+** [SQLITE_SOURCE_ID] C preprocessor macro.
+**
+** See also: [sqlite_version()] and [sqlite_source_id()].
+*/
+SQLITE_API SQLITE_EXTERN const char sqlite3_version[];
+SQLITE_API const char *sqlite3_libversion(void);
+SQLITE_API const char *sqlite3_sourceid(void);
+SQLITE_API int sqlite3_libversion_number(void);
+
+#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
+/*
+** CAPI3REF: Run-Time Library Compilation Options Diagnostics
+**
+** ^The sqlite3_compileoption_used() function returns 0 or 1
+** indicating whether the specified option was defined at
+** compile time. ^The SQLITE_ prefix may be omitted from the
+** option name passed to sqlite3_compileoption_used().
+**
+** ^The sqlite3_compileoption_get() function allows interating
+** over the list of options that were defined at compile time by
+** returning the N-th compile time option string. ^If N is out of range,
+** sqlite3_compileoption_get() returns a NULL pointer. ^The SQLITE_
+** prefix is omitted from any strings returned by
+** sqlite3_compileoption_get().
+**
+** ^Support for the diagnostic functions sqlite3_compileoption_used()
+** and sqlite3_compileoption_get() may be omitted by specifing the
+** [SQLITE_OMIT_COMPILEOPTION_DIAGS] option at compile time.
+**
+** See also: SQL functions [sqlite_compileoption_used()] and
+** [sqlite_compileoption_get()] and the [compile_options pragma].
+*/
+SQLITE_API int sqlite3_compileoption_used(const char *zOptName);
+SQLITE_API const char *sqlite3_compileoption_get(int N);
+#endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */
+
+/*
+** CAPI3REF: Test To See If The Library Is Threadsafe
+**
+** ^The sqlite3_threadsafe() function returns zero if and only if
+** SQLite was compiled mutexing code omitted due to the
+** [SQLITE_THREADSAFE] compile-time option being set to 0.
+**
+** SQLite can be compiled with or without mutexes. When
+** the [SQLITE_THREADSAFE] C preprocessor macro is 1 or 2, mutexes
+** are enabled and SQLite is threadsafe. When the
+** [SQLITE_THREADSAFE] macro is 0,
+** the mutexes are omitted. Without the mutexes, it is not safe
+** to use SQLite concurrently from more than one thread.
+**
+** Enabling mutexes incurs a measurable performance penalty.
+** So if speed is of utmost importance, it makes sense to disable
+** the mutexes. But for maximum safety, mutexes should be enabled.
+** ^The default behavior is for mutexes to be enabled.
+**
+** This interface can be used by an application to make sure that the
+** version of SQLite that it is linking against was compiled with
+** the desired setting of the [SQLITE_THREADSAFE] macro.
+**
+** This interface only reports on the compile-time mutex setting
+** of the [SQLITE_THREADSAFE] flag. If SQLite is compiled with
+** SQLITE_THREADSAFE=1 or =2 then mutexes are enabled by default but
+** can be fully or partially disabled using a call to [sqlite3_config()]
+** with the verbs [SQLITE_CONFIG_SINGLETHREAD], [SQLITE_CONFIG_MULTITHREAD],
+** or [SQLITE_CONFIG_MUTEX]. ^(The return value of the
+** sqlite3_threadsafe() function shows only the compile-time setting of
+** thread safety, not any run-time changes to that setting made by
+** sqlite3_config(). In other words, the return value from sqlite3_threadsafe()
+** is unchanged by calls to sqlite3_config().)^
+**
+** See the [threading mode] documentation for additional information.
+*/
+SQLITE_API int sqlite3_threadsafe(void);
+
+/*
+** CAPI3REF: Database Connection Handle
+** KEYWORDS: {database connection} {database connections}
+**
+** Each open SQLite database is represented by a pointer to an instance of
+** the opaque structure named "sqlite3". It is useful to think of an sqlite3
+** pointer as an object. The [sqlite3_open()], [sqlite3_open16()], and
+** [sqlite3_open_v2()] interfaces are its constructors, and [sqlite3_close()]
+** is its destructor. There are many other interfaces (such as
+** [sqlite3_prepare_v2()], [sqlite3_create_function()], and
+** [sqlite3_busy_timeout()] to name but three) that are methods on an
+** sqlite3 object.
+*/
+typedef struct sqlite3 sqlite3;
+
+/*
+** CAPI3REF: 64-Bit Integer Types
+** KEYWORDS: sqlite_int64 sqlite_uint64
+**
+** Because there is no cross-platform way to specify 64-bit integer types
+** SQLite includes typedefs for 64-bit signed and unsigned integers.
+**
+** The sqlite3_int64 and sqlite3_uint64 are the preferred type definitions.
+** The sqlite_int64 and sqlite_uint64 types are supported for backwards
+** compatibility only.
+**
+** ^The sqlite3_int64 and sqlite_int64 types can store integer values
+** between -9223372036854775808 and +9223372036854775807 inclusive. ^The
+** sqlite3_uint64 and sqlite_uint64 types can store integer values
+** between 0 and +18446744073709551615 inclusive.
+*/
+#ifdef SQLITE_INT64_TYPE
+ typedef SQLITE_INT64_TYPE sqlite_int64;
+ typedef unsigned SQLITE_INT64_TYPE sqlite_uint64;
+#elif defined(_MSC_VER) || defined(__BORLANDC__)
+ typedef __int64 sqlite_int64;
+ typedef unsigned __int64 sqlite_uint64;
+#else
+ typedef long long int sqlite_int64;
+ typedef unsigned long long int sqlite_uint64;
+#endif
+typedef sqlite_int64 sqlite3_int64;
+typedef sqlite_uint64 sqlite3_uint64;
+
+/*
+** If compiling for a processor that lacks floating point support,
+** substitute integer for floating-point.
+*/
+#ifdef SQLITE_OMIT_FLOATING_POINT
+# define double sqlite3_int64
+#endif
+
+/*
+** CAPI3REF: Closing A Database Connection
+**
+** ^The sqlite3_close() routine is the destructor for the [sqlite3] object.
+** ^Calls to sqlite3_close() return SQLITE_OK if the [sqlite3] object is
+** successfullly destroyed and all associated resources are deallocated.
+**
+** Applications must [sqlite3_finalize | finalize] all [prepared statements]
+** and [sqlite3_blob_close | close] all [BLOB handles] associated with
+** the [sqlite3] object prior to attempting to close the object. ^If
+** sqlite3_close() is called on a [database connection] that still has
+** outstanding [prepared statements] or [BLOB handles], then it returns
+** SQLITE_BUSY.
+**
+** ^If [sqlite3_close()] is invoked while a transaction is open,
+** the transaction is automatically rolled back.
+**
+** The C parameter to [sqlite3_close(C)] must be either a NULL
+** pointer or an [sqlite3] object pointer obtained
+** from [sqlite3_open()], [sqlite3_open16()], or
+** [sqlite3_open_v2()], and not previously closed.
+** ^Calling sqlite3_close() with a NULL pointer argument is a
+** harmless no-op.
+*/
+SQLITE_API int sqlite3_close(sqlite3 *);
+
+/*
+** The type for a callback function.
+** This is legacy and deprecated. It is included for historical
+** compatibility and is not documented.
+*/
+typedef int (*sqlite3_callback)(void*,int,char**, char**);
+
+/*
+** CAPI3REF: One-Step Query Execution Interface
+**
+** The sqlite3_exec() interface is a convenience wrapper around
+** [sqlite3_prepare_v2()], [sqlite3_step()], and [sqlite3_finalize()],
+** that allows an application to run multiple statements of SQL
+** without having to use a lot of C code.
+**
+** ^The sqlite3_exec() interface runs zero or more UTF-8 encoded,
+** semicolon-separate SQL statements passed into its 2nd argument,
+** in the context of the [database connection] passed in as its 1st
+** argument. ^If the callback function of the 3rd argument to
+** sqlite3_exec() is not NULL, then it is invoked for each result row
+** coming out of the evaluated SQL statements. ^The 4th argument to
+** to sqlite3_exec() is relayed through to the 1st argument of each
+** callback invocation. ^If the callback pointer to sqlite3_exec()
+** is NULL, then no callback is ever invoked and result rows are
+** ignored.
+**
+** ^If an error occurs while evaluating the SQL statements passed into
+** sqlite3_exec(), then execution of the current statement stops and
+** subsequent statements are skipped. ^If the 5th parameter to sqlite3_exec()
+** is not NULL then any error message is written into memory obtained
+** from [sqlite3_malloc()] and passed back through the 5th parameter.
+** To avoid memory leaks, the application should invoke [sqlite3_free()]
+** on error message strings returned through the 5th parameter of
+** of sqlite3_exec() after the error message string is no longer needed.
+** ^If the 5th parameter to sqlite3_exec() is not NULL and no errors
+** occur, then sqlite3_exec() sets the pointer in its 5th parameter to
+** NULL before returning.
+**
+** ^If an sqlite3_exec() callback returns non-zero, the sqlite3_exec()
+** routine returns SQLITE_ABORT without invoking the callback again and
+** without running any subsequent SQL statements.
+**
+** ^The 2nd argument to the sqlite3_exec() callback function is the
+** number of columns in the result. ^The 3rd argument to the sqlite3_exec()
+** callback is an array of pointers to strings obtained as if from
+** [sqlite3_column_text()], one for each column. ^If an element of a
+** result row is NULL then the corresponding string pointer for the
+** sqlite3_exec() callback is a NULL pointer. ^The 4th argument to the
+** sqlite3_exec() callback is an array of pointers to strings where each
+** entry represents the name of corresponding result column as obtained
+** from [sqlite3_column_name()].
+**
+** ^If the 2nd parameter to sqlite3_exec() is a NULL pointer, a pointer
+** to an empty string, or a pointer that contains only whitespace and/or
+** SQL comments, then no SQL statements are evaluated and the database
+** is not changed.
+**
+** Restrictions:
+**
+** <ul>
+** <li> The application must insure that the 1st parameter to sqlite3_exec()
+** is a valid and open [database connection].
+** <li> The application must not close [database connection] specified by
+** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running.
+** <li> The application must not modify the SQL statement text passed into
+** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running.
+** </ul>
+*/
+SQLITE_API int sqlite3_exec(
+ sqlite3*, /* An open database */
+ const char *sql, /* SQL to be evaluated */
+ int (*callback)(void*,int,char**,char**), /* Callback function */
+ void *, /* 1st argument to callback */
+ char **errmsg /* Error msg written here */
+);
+
+/*
+** CAPI3REF: Result Codes
+** KEYWORDS: SQLITE_OK {error code} {error codes}
+** KEYWORDS: {result code} {result codes}
+**
+** Many SQLite functions return an integer result code from the set shown
+** here in order to indicates success or failure.
+**
+** New error codes may be added in future versions of SQLite.
+**
+** See also: [SQLITE_IOERR_READ | extended result codes]
+*/
+#define SQLITE_OK 0 /* Successful result */
+/* beginning-of-error-codes */
+#define SQLITE_ERROR 1 /* SQL error or missing database */
+#define SQLITE_INTERNAL 2 /* Internal logic error in SQLite */
+#define SQLITE_PERM 3 /* Access permission denied */
+#define SQLITE_ABORT 4 /* Callback routine requested an abort */
+#define SQLITE_BUSY 5 /* The database file is locked */
+#define SQLITE_LOCKED 6 /* A table in the database is locked */
+#define SQLITE_NOMEM 7 /* A malloc() failed */
+#define SQLITE_READONLY 8 /* Attempt to write a readonly database */
+#define SQLITE_INTERRUPT 9 /* Operation terminated by sqlite3_interrupt()*/
+#define SQLITE_IOERR 10 /* Some kind of disk I/O error occurred */
+#define SQLITE_CORRUPT 11 /* The database disk image is malformed */
+#define SQLITE_NOTFOUND 12 /* NOT USED. Table or record not found */
+#define SQLITE_FULL 13 /* Insertion failed because database is full */
+#define SQLITE_CANTOPEN 14 /* Unable to open the database file */
+#define SQLITE_PROTOCOL 15 /* NOT USED. Database lock protocol error */
+#define SQLITE_EMPTY 16 /* Database is empty */
+#define SQLITE_SCHEMA 17 /* The database schema changed */
+#define SQLITE_TOOBIG 18 /* String or BLOB exceeds size limit */
+#define SQLITE_CONSTRAINT 19 /* Abort due to constraint violation */
+#define SQLITE_MISMATCH 20 /* Data type mismatch */
+#define SQLITE_MISUSE 21 /* Library used incorrectly */
+#define SQLITE_NOLFS 22 /* Uses OS features not supported on host */
+#define SQLITE_AUTH 23 /* Authorization denied */
+#define SQLITE_FORMAT 24 /* Auxiliary database format error */
+#define SQLITE_RANGE 25 /* 2nd parameter to sqlite3_bind out of range */
+#define SQLITE_NOTADB 26 /* File opened that is not a database file */
+#define SQLITE_ROW 100 /* sqlite3_step() has another row ready */
+#define SQLITE_DONE 101 /* sqlite3_step() has finished executing */
+/* end-of-error-codes */
+
+/*
+** CAPI3REF: Extended Result Codes
+** KEYWORDS: {extended error code} {extended error codes}
+** KEYWORDS: {extended result code} {extended result codes}
+**
+** In its default configuration, SQLite API routines return one of 26 integer
+** [SQLITE_OK | result codes]. However, experience has shown that many of
+** these result codes are too coarse-grained. They do not provide as
+** much information about problems as programmers might like. In an effort to
+** address this, newer versions of SQLite (version 3.3.8 and later) include
+** support for additional result codes that provide more detailed information
+** about errors. The extended result codes are enabled or disabled
+** on a per database connection basis using the
+** [sqlite3_extended_result_codes()] API.
+**
+** Some of the available extended result codes are listed here.
+** One may expect the number of extended result codes will be expand
+** over time. Software that uses extended result codes should expect
+** to see new result codes in future releases of SQLite.
+**
+** The SQLITE_OK result code will never be extended. It will always
+** be exactly zero.
+*/
+#define SQLITE_IOERR_READ (SQLITE_IOERR | (1<<8))
+#define SQLITE_IOERR_SHORT_READ (SQLITE_IOERR | (2<<8))
+#define SQLITE_IOERR_WRITE (SQLITE_IOERR | (3<<8))
+#define SQLITE_IOERR_FSYNC (SQLITE_IOERR | (4<<8))
+#define SQLITE_IOERR_DIR_FSYNC (SQLITE_IOERR | (5<<8))
+#define SQLITE_IOERR_TRUNCATE (SQLITE_IOERR | (6<<8))
+#define SQLITE_IOERR_FSTAT (SQLITE_IOERR | (7<<8))
+#define SQLITE_IOERR_UNLOCK (SQLITE_IOERR | (8<<8))
+#define SQLITE_IOERR_RDLOCK (SQLITE_IOERR | (9<<8))
+#define SQLITE_IOERR_DELETE (SQLITE_IOERR | (10<<8))
+#define SQLITE_IOERR_BLOCKED (SQLITE_IOERR | (11<<8))
+#define SQLITE_IOERR_NOMEM (SQLITE_IOERR | (12<<8))
+#define SQLITE_IOERR_ACCESS (SQLITE_IOERR | (13<<8))
+#define SQLITE_IOERR_CHECKRESERVEDLOCK (SQLITE_IOERR | (14<<8))
+#define SQLITE_IOERR_LOCK (SQLITE_IOERR | (15<<8))
+#define SQLITE_IOERR_CLOSE (SQLITE_IOERR | (16<<8))
+#define SQLITE_IOERR_DIR_CLOSE (SQLITE_IOERR | (17<<8))
+#define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1<<8) )
+
+/*
+** CAPI3REF: Flags For File Open Operations
+**
+** These bit values are intended for use in the
+** 3rd parameter to the [sqlite3_open_v2()] interface and
+** in the 4th parameter to the xOpen method of the
+** [sqlite3_vfs] object.
+*/
+#define SQLITE_OPEN_READONLY 0x00000001 /* Ok for sqlite3_open_v2() */
+#define SQLITE_OPEN_READWRITE 0x00000002 /* Ok for sqlite3_open_v2() */
+#define SQLITE_OPEN_CREATE 0x00000004 /* Ok for sqlite3_open_v2() */
+#define SQLITE_OPEN_DELETEONCLOSE 0x00000008 /* VFS only */
+#define SQLITE_OPEN_EXCLUSIVE 0x00000010 /* VFS only */
+#define SQLITE_OPEN_AUTOPROXY 0x00000020 /* VFS only */
+#define SQLITE_OPEN_MAIN_DB 0x00000100 /* VFS only */
+#define SQLITE_OPEN_TEMP_DB 0x00000200 /* VFS only */
+#define SQLITE_OPEN_TRANSIENT_DB 0x00000400 /* VFS only */
+#define SQLITE_OPEN_MAIN_JOURNAL 0x00000800 /* VFS only */
+#define SQLITE_OPEN_TEMP_JOURNAL 0x00001000 /* VFS only */
+#define SQLITE_OPEN_SUBJOURNAL 0x00002000 /* VFS only */
+#define SQLITE_OPEN_MASTER_JOURNAL 0x00004000 /* VFS only */
+#define SQLITE_OPEN_NOMUTEX 0x00008000 /* Ok for sqlite3_open_v2() */
+#define SQLITE_OPEN_FULLMUTEX 0x00010000 /* Ok for sqlite3_open_v2() */
+#define SQLITE_OPEN_SHAREDCACHE 0x00020000 /* Ok for sqlite3_open_v2() */
+#define SQLITE_OPEN_PRIVATECACHE 0x00040000 /* Ok for sqlite3_open_v2() */
+
+/*
+** CAPI3REF: Device Characteristics
+**
+** The xDeviceCapabilities method of the [sqlite3_io_methods]
+** object returns an integer which is a vector of the these
+** bit values expressing I/O characteristics of the mass storage
+** device that holds the file that the [sqlite3_io_methods]
+** refers to.
+**
+** The SQLITE_IOCAP_ATOMIC property means that all writes of
+** any size are atomic. The SQLITE_IOCAP_ATOMICnnn values
+** mean that writes of blocks that are nnn bytes in size and
+** are aligned to an address which is an integer multiple of
+** nnn are atomic. The SQLITE_IOCAP_SAFE_APPEND value means
+** that when data is appended to a file, the data is appended
+** first then the size of the file is extended, never the other
+** way around. The SQLITE_IOCAP_SEQUENTIAL property means that
+** information is written to disk in the same order as calls
+** to xWrite().
+*/
+#define SQLITE_IOCAP_ATOMIC 0x00000001
+#define SQLITE_IOCAP_ATOMIC512 0x00000002
+#define SQLITE_IOCAP_ATOMIC1K 0x00000004
+#define SQLITE_IOCAP_ATOMIC2K 0x00000008
+#define SQLITE_IOCAP_ATOMIC4K 0x00000010
+#define SQLITE_IOCAP_ATOMIC8K 0x00000020
+#define SQLITE_IOCAP_ATOMIC16K 0x00000040
+#define SQLITE_IOCAP_ATOMIC32K 0x00000080
+#define SQLITE_IOCAP_ATOMIC64K 0x00000100
+#define SQLITE_IOCAP_SAFE_APPEND 0x00000200
+#define SQLITE_IOCAP_SEQUENTIAL 0x00000400
+
+/*
+** CAPI3REF: File Locking Levels
+**
+** SQLite uses one of these integer values as the second
+** argument to calls it makes to the xLock() and xUnlock() methods
+** of an [sqlite3_io_methods] object.
+*/
+#define SQLITE_LOCK_NONE 0
+#define SQLITE_LOCK_SHARED 1
+#define SQLITE_LOCK_RESERVED 2
+#define SQLITE_LOCK_PENDING 3
+#define SQLITE_LOCK_EXCLUSIVE 4
+
+/*
+** CAPI3REF: Synchronization Type Flags
+**
+** When SQLite invokes the xSync() method of an
+** [sqlite3_io_methods] object it uses a combination of
+** these integer values as the second argument.
+**
+** When the SQLITE_SYNC_DATAONLY flag is used, it means that the
+** sync operation only needs to flush data to mass storage. Inode
+** information need not be flushed. If the lower four bits of the flag
+** equal SQLITE_SYNC_NORMAL, that means to use normal fsync() semantics.
+** If the lower four bits equal SQLITE_SYNC_FULL, that means
+** to use Mac OS X style fullsync instead of fsync().
+*/
+#define SQLITE_SYNC_NORMAL 0x00002
+#define SQLITE_SYNC_FULL 0x00003
+#define SQLITE_SYNC_DATAONLY 0x00010
+
+/*
+** CAPI3REF: OS Interface Open File Handle
+**
+** An [sqlite3_file] object represents an open file in the
+** [sqlite3_vfs | OS interface layer]. Individual OS interface
+** implementations will
+** want to subclass this object by appending additional fields
+** for their own use. The pMethods entry is a pointer to an
+** [sqlite3_io_methods] object that defines methods for performing
+** I/O operations on the open file.
+*/
+typedef struct sqlite3_file sqlite3_file;
+struct sqlite3_file {
+ const struct sqlite3_io_methods *pMethods; /* Methods for an open file */
+};
+
+/*
+** CAPI3REF: OS Interface File Virtual Methods Object
+**
+** Every file opened by the [sqlite3_vfs] xOpen method populates an
+** [sqlite3_file] object (or, more commonly, a subclass of the
+** [sqlite3_file] object) with a pointer to an instance of this object.
+** This object defines the methods used to perform various operations
+** against the open file represented by the [sqlite3_file] object.
+**
+** If the xOpen method sets the sqlite3_file.pMethods element
+** to a non-NULL pointer, then the sqlite3_io_methods.xClose method
+** may be invoked even if the xOpen reported that it failed. The
+** only way to prevent a call to xClose following a failed xOpen
+** is for the xOpen to set the sqlite3_file.pMethods element to NULL.
+**
+** The flags argument to xSync may be one of [SQLITE_SYNC_NORMAL] or
+** [SQLITE_SYNC_FULL]. The first choice is the normal fsync().
+** The second choice is a Mac OS X style fullsync. The [SQLITE_SYNC_DATAONLY]
+** flag may be ORed in to indicate that only the data of the file
+** and not its inode needs to be synced.
+**
+** The integer values to xLock() and xUnlock() are one of
+** <ul>
+** <li> [SQLITE_LOCK_NONE],
+** <li> [SQLITE_LOCK_SHARED],
+** <li> [SQLITE_LOCK_RESERVED],
+** <li> [SQLITE_LOCK_PENDING], or
+** <li> [SQLITE_LOCK_EXCLUSIVE].
+** </ul>
+** xLock() increases the lock. xUnlock() decreases the lock.
+** The xCheckReservedLock() method checks whether any database connection,
+** either in this process or in some other process, is holding a RESERVED,
+** PENDING, or EXCLUSIVE lock on the file. It returns true
+** if such a lock exists and false otherwise.
+**
+** The xFileControl() method is a generic interface that allows custom
+** VFS implementations to directly control an open file using the
+** [sqlite3_file_control()] interface. The second "op" argument is an
+** integer opcode. The third argument is a generic pointer intended to
+** point to a structure that may contain arguments or space in which to
+** write return values. Potential uses for xFileControl() might be
+** functions to enable blocking locks with timeouts, to change the
+** locking strategy (for example to use dot-file locks), to inquire
+** about the status of a lock, or to break stale locks. The SQLite
+** core reserves all opcodes less than 100 for its own use.
+** A [SQLITE_FCNTL_LOCKSTATE | list of opcodes] less than 100 is available.
+** Applications that define a custom xFileControl method should use opcodes
+** greater than 100 to avoid conflicts.
+**
+** The xSectorSize() method returns the sector size of the
+** device that underlies the file. The sector size is the
+** minimum write that can be performed without disturbing
+** other bytes in the file. The xDeviceCharacteristics()
+** method returns a bit vector describing behaviors of the
+** underlying device:
+**
+** <ul>
+** <li> [SQLITE_IOCAP_ATOMIC]
+** <li> [SQLITE_IOCAP_ATOMIC512]
+** <li> [SQLITE_IOCAP_ATOMIC1K]
+** <li> [SQLITE_IOCAP_ATOMIC2K]
+** <li> [SQLITE_IOCAP_ATOMIC4K]
+** <li> [SQLITE_IOCAP_ATOMIC8K]
+** <li> [SQLITE_IOCAP_ATOMIC16K]
+** <li> [SQLITE_IOCAP_ATOMIC32K]
+** <li> [SQLITE_IOCAP_ATOMIC64K]
+** <li> [SQLITE_IOCAP_SAFE_APPEND]
+** <li> [SQLITE_IOCAP_SEQUENTIAL]
+** </ul>
+**
+** The SQLITE_IOCAP_ATOMIC property means that all writes of
+** any size are atomic. The SQLITE_IOCAP_ATOMICnnn values
+** mean that writes of blocks that are nnn bytes in size and
+** are aligned to an address which is an integer multiple of
+** nnn are atomic. The SQLITE_IOCAP_SAFE_APPEND value means
+** that when data is appended to a file, the data is appended
+** first then the size of the file is extended, never the other
+** way around. The SQLITE_IOCAP_SEQUENTIAL property means that
+** information is written to disk in the same order as calls
+** to xWrite().
+**
+** If xRead() returns SQLITE_IOERR_SHORT_READ it must also fill
+** in the unread portions of the buffer with zeros. A VFS that
+** fails to zero-fill short reads might seem to work. However,
+** failure to zero-fill short reads will eventually lead to
+** database corruption.
+*/
+typedef struct sqlite3_io_methods sqlite3_io_methods;
+struct sqlite3_io_methods {
+ int iVersion;
+ int (*xClose)(sqlite3_file*);
+ int (*xRead)(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst);
+ int (*xWrite)(sqlite3_file*, const void*, int iAmt, sqlite3_int64 iOfst);
+ int (*xTruncate)(sqlite3_file*, sqlite3_int64 size);
+ int (*xSync)(sqlite3_file*, int flags);
+ int (*xFileSize)(sqlite3_file*, sqlite3_int64 *pSize);
+ int (*xLock)(sqlite3_file*, int);
+ int (*xUnlock)(sqlite3_file*, int);
+ int (*xCheckReservedLock)(sqlite3_file*, int *pResOut);
+ int (*xFileControl)(sqlite3_file*, int op, void *pArg);
+ int (*xSectorSize)(sqlite3_file*);
+ int (*xDeviceCharacteristics)(sqlite3_file*);
+ /* Additional methods may be added in future releases */
+};
+
+/*
+** CAPI3REF: Standard File Control Opcodes
+**
+** These integer constants are opcodes for the xFileControl method
+** of the [sqlite3_io_methods] object and for the [sqlite3_file_control()]
+** interface.
+**
+** The [SQLITE_FCNTL_LOCKSTATE] opcode is used for debugging. This
+** opcode causes the xFileControl method to write the current state of
+** the lock (one of [SQLITE_LOCK_NONE], [SQLITE_LOCK_SHARED],
+** [SQLITE_LOCK_RESERVED], [SQLITE_LOCK_PENDING], or [SQLITE_LOCK_EXCLUSIVE])
+** into an integer that the pArg argument points to. This capability
+** is used during testing and only needs to be supported when SQLITE_TEST
+** is defined.
+*/
+#define SQLITE_FCNTL_LOCKSTATE 1
+#define SQLITE_GET_LOCKPROXYFILE 2
+#define SQLITE_SET_LOCKPROXYFILE 3
+#define SQLITE_LAST_ERRNO 4
+
+/*
+** CAPI3REF: Mutex Handle
+**
+** The mutex module within SQLite defines [sqlite3_mutex] to be an
+** abstract type for a mutex object. The SQLite core never looks
+** at the internal representation of an [sqlite3_mutex]. It only
+** deals with pointers to the [sqlite3_mutex] object.
+**
+** Mutexes are created using [sqlite3_mutex_alloc()].
+*/
+typedef struct sqlite3_mutex sqlite3_mutex;
+
+/*
+** CAPI3REF: OS Interface Object
+**
+** An instance of the sqlite3_vfs object defines the interface between
+** the SQLite core and the underlying operating system. The "vfs"
+** in the name of the object stands for "virtual file system".
+**
+** The value of the iVersion field is initially 1 but may be larger in
+** future versions of SQLite. Additional fields may be appended to this
+** object when the iVersion value is increased. Note that the structure
+** of the sqlite3_vfs object changes in the transaction between
+** SQLite version 3.5.9 and 3.6.0 and yet the iVersion field was not
+** modified.
+**
+** The szOsFile field is the size of the subclassed [sqlite3_file]
+** structure used by this VFS. mxPathname is the maximum length of
+** a pathname in this VFS.
+**
+** Registered sqlite3_vfs objects are kept on a linked list formed by
+** the pNext pointer. The [sqlite3_vfs_register()]
+** and [sqlite3_vfs_unregister()] interfaces manage this list
+** in a thread-safe way. The [sqlite3_vfs_find()] interface
+** searches the list. Neither the application code nor the VFS
+** implementation should use the pNext pointer.
+**
+** The pNext field is the only field in the sqlite3_vfs
+** structure that SQLite will ever modify. SQLite will only access
+** or modify this field while holding a particular static mutex.
+** The application should never modify anything within the sqlite3_vfs
+** object once the object has been registered.
+**
+** The zName field holds the name of the VFS module. The name must
+** be unique across all VFS modules.
+**
+** SQLite will guarantee that the zFilename parameter to xOpen
+** is either a NULL pointer or string obtained
+** from xFullPathname(). SQLite further guarantees that
+** the string will be valid and unchanged until xClose() is
+** called. Because of the previous sentence,
+** the [sqlite3_file] can safely store a pointer to the
+** filename if it needs to remember the filename for some reason.
+** If the zFilename parameter is xOpen is a NULL pointer then xOpen
+** must invent its own temporary name for the file. Whenever the
+** xFilename parameter is NULL it will also be the case that the
+** flags parameter will include [SQLITE_OPEN_DELETEONCLOSE].
+**
+** The flags argument to xOpen() includes all bits set in
+** the flags argument to [sqlite3_open_v2()]. Or if [sqlite3_open()]
+** or [sqlite3_open16()] is used, then flags includes at least
+** [SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE].
+** If xOpen() opens a file read-only then it sets *pOutFlags to
+** include [SQLITE_OPEN_READONLY]. Other bits in *pOutFlags may be set.
+**
+** SQLite will also add one of the following flags to the xOpen()
+** call, depending on the object being opened:
+**
+** <ul>
+** <li> [SQLITE_OPEN_MAIN_DB]
+** <li> [SQLITE_OPEN_MAIN_JOURNAL]
+** <li> [SQLITE_OPEN_TEMP_DB]
+** <li> [SQLITE_OPEN_TEMP_JOURNAL]
+** <li> [SQLITE_OPEN_TRANSIENT_DB]
+** <li> [SQLITE_OPEN_SUBJOURNAL]
+** <li> [SQLITE_OPEN_MASTER_JOURNAL]
+** </ul>
+**
+** The file I/O implementation can use the object type flags to
+** change the way it deals with files. For example, an application
+** that does not care about crash recovery or rollback might make
+** the open of a journal file a no-op. Writes to this journal would
+** also be no-ops, and any attempt to read the journal would return
+** SQLITE_IOERR. Or the implementation might recognize that a database
+** file will be doing page-aligned sector reads and writes in a random
+** order and set up its I/O subsystem accordingly.
+**
+** SQLite might also add one of the following flags to the xOpen method:
+**
+** <ul>
+** <li> [SQLITE_OPEN_DELETEONCLOSE]
+** <li> [SQLITE_OPEN_EXCLUSIVE]
+** </ul>
+**
+** The [SQLITE_OPEN_DELETEONCLOSE] flag means the file should be
+** deleted when it is closed. The [SQLITE_OPEN_DELETEONCLOSE]
+** will be set for TEMP databases, journals and for subjournals.
+**
+** The [SQLITE_OPEN_EXCLUSIVE] flag is always used in conjunction
+** with the [SQLITE_OPEN_CREATE] flag, which are both directly
+** analogous to the O_EXCL and O_CREAT flags of the POSIX open()
+** API. The SQLITE_OPEN_EXCLUSIVE flag, when paired with the
+** SQLITE_OPEN_CREATE, is used to indicate that file should always
+** be created, and that it is an error if it already exists.
+** It is <i>not</i> used to indicate the file should be opened
+** for exclusive access.
+**
+** At least szOsFile bytes of memory are allocated by SQLite
+** to hold the [sqlite3_file] structure passed as the third
+** argument to xOpen. The xOpen method does not have to
+** allocate the structure; it should just fill it in. Note that
+** the xOpen method must set the sqlite3_file.pMethods to either
+** a valid [sqlite3_io_methods] object or to NULL. xOpen must do
+** this even if the open fails. SQLite expects that the sqlite3_file.pMethods
+** element will be valid after xOpen returns regardless of the success
+** or failure of the xOpen call.
+**
+** The flags argument to xAccess() may be [SQLITE_ACCESS_EXISTS]
+** to test for the existence of a file, or [SQLITE_ACCESS_READWRITE] to
+** test whether a file is readable and writable, or [SQLITE_ACCESS_READ]
+** to test whether a file is at least readable. The file can be a
+** directory.
+**
+** SQLite will always allocate at least mxPathname+1 bytes for the
+** output buffer xFullPathname. The exact size of the output buffer
+** is also passed as a parameter to both methods. If the output buffer
+** is not large enough, [SQLITE_CANTOPEN] should be returned. Since this is
+** handled as a fatal error by SQLite, vfs implementations should endeavor
+** to prevent this by setting mxPathname to a sufficiently large value.
+**
+** The xRandomness(), xSleep(), and xCurrentTime() interfaces
+** are not strictly a part of the filesystem, but they are
+** included in the VFS structure for completeness.
+** The xRandomness() function attempts to return nBytes bytes
+** of good-quality randomness into zOut. The return value is
+** the actual number of bytes of randomness obtained.
+** The xSleep() method causes the calling thread to sleep for at
+** least the number of microseconds given. The xCurrentTime()
+** method returns a Julian Day Number for the current date and time.
+**
+*/
+typedef struct sqlite3_vfs sqlite3_vfs;
+struct sqlite3_vfs {
+ int iVersion; /* Structure version number */
+ int szOsFile; /* Size of subclassed sqlite3_file */
+ int mxPathname; /* Maximum file pathname length */
+ sqlite3_vfs *pNext; /* Next registered VFS */
+ const char *zName; /* Name of this virtual file system */
+ void *pAppData; /* Pointer to application-specific data */
+ int (*xOpen)(sqlite3_vfs*, const char *zName, sqlite3_file*,
+ int flags, int *pOutFlags);
+ int (*xDelete)(sqlite3_vfs*, const char *zName, int syncDir);
+ int (*xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut);
+ int (*xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut);
+ void *(*xDlOpen)(sqlite3_vfs*, const char *zFilename);
+ void (*xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg);
+ void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void);
+ void (*xDlClose)(sqlite3_vfs*, void*);
+ int (*xRandomness)(sqlite3_vfs*, int nByte, char *zOut);
+ int (*xSleep)(sqlite3_vfs*, int microseconds);
+ int (*xCurrentTime)(sqlite3_vfs*, double*);
+ int (*xGetLastError)(sqlite3_vfs*, int, char *);
+ /* New fields may be appended in figure versions. The iVersion
+ ** value will increment whenever this happens. */
+};
+
+/*
+** CAPI3REF: Flags for the xAccess VFS method
+**
+** These integer constants can be used as the third parameter to
+** the xAccess method of an [sqlite3_vfs] object. They determine
+** what kind of permissions the xAccess method is looking for.
+** With SQLITE_ACCESS_EXISTS, the xAccess method
+** simply checks whether the file exists.
+** With SQLITE_ACCESS_READWRITE, the xAccess method
+** checks whether the file is both readable and writable.
+** With SQLITE_ACCESS_READ, the xAccess method
+** checks whether the file is readable.
+*/
+#define SQLITE_ACCESS_EXISTS 0
+#define SQLITE_ACCESS_READWRITE 1
+#define SQLITE_ACCESS_READ 2
+
+/*
+** CAPI3REF: Initialize The SQLite Library
+**
+** ^The sqlite3_initialize() routine initializes the
+** SQLite library. ^The sqlite3_shutdown() routine
+** deallocates any resources that were allocated by sqlite3_initialize().
+** These routines are designed to aid in process initialization and
+** shutdown on embedded systems. Workstation applications using
+** SQLite normally do not need to invoke either of these routines.
+**
+** A call to sqlite3_initialize() is an "effective" call if it is
+** the first time sqlite3_initialize() is invoked during the lifetime of
+** the process, or if it is the first time sqlite3_initialize() is invoked
+** following a call to sqlite3_shutdown(). ^(Only an effective call
+** of sqlite3_initialize() does any initialization. All other calls
+** are harmless no-ops.)^
+**
+** A call to sqlite3_shutdown() is an "effective" call if it is the first
+** call to sqlite3_shutdown() since the last sqlite3_initialize(). ^(Only
+** an effective call to sqlite3_shutdown() does any deinitialization.
+** All other valid calls to sqlite3_shutdown() are harmless no-ops.)^
+**
+** The sqlite3_initialize() interface is threadsafe, but sqlite3_shutdown()
+** is not. The sqlite3_shutdown() interface must only be called from a
+** single thread. All open [database connections] must be closed and all
+** other SQLite resources must be deallocated prior to invoking
+** sqlite3_shutdown().
+**
+** Among other things, ^sqlite3_initialize() will invoke
+** sqlite3_os_init(). Similarly, ^sqlite3_shutdown()
+** will invoke sqlite3_os_end().
+**
+** ^The sqlite3_initialize() routine returns [SQLITE_OK] on success.
+** ^If for some reason, sqlite3_initialize() is unable to initialize
+** the library (perhaps it is unable to allocate a needed resource such
+** as a mutex) it returns an [error code] other than [SQLITE_OK].
+**
+** ^The sqlite3_initialize() routine is called internally by many other
+** SQLite interfaces so that an application usually does not need to
+** invoke sqlite3_initialize() directly. For example, [sqlite3_open()]
+** calls sqlite3_initialize() so the SQLite library will be automatically
+** initialized when [sqlite3_open()] is called if it has not be initialized
+** already. ^However, if SQLite is compiled with the [SQLITE_OMIT_AUTOINIT]
+** compile-time option, then the automatic calls to sqlite3_initialize()
+** are omitted and the application must call sqlite3_initialize() directly
+** prior to using any other SQLite interface. For maximum portability,
+** it is recommended that applications always invoke sqlite3_initialize()
+** directly prior to using any other SQLite interface. Future releases
+** of SQLite may require this. In other words, the behavior exhibited
+** when SQLite is compiled with [SQLITE_OMIT_AUTOINIT] might become the
+** default behavior in some future release of SQLite.
+**
+** The sqlite3_os_init() routine does operating-system specific
+** initialization of the SQLite library. The sqlite3_os_end()
+** routine undoes the effect of sqlite3_os_init(). Typical tasks
+** performed by these routines include allocation or deallocation
+** of static resources, initialization of global variables,
+** setting up a default [sqlite3_vfs] module, or setting up
+** a default configuration using [sqlite3_config()].
+**
+** The application should never invoke either sqlite3_os_init()
+** or sqlite3_os_end() directly. The application should only invoke
+** sqlite3_initialize() and sqlite3_shutdown(). The sqlite3_os_init()
+** interface is called automatically by sqlite3_initialize() and
+** sqlite3_os_end() is called by sqlite3_shutdown(). Appropriate
+** implementations for sqlite3_os_init() and sqlite3_os_end()
+** are built into SQLite when it is compiled for Unix, Windows, or OS/2.
+** When [custom builds | built for other platforms]
+** (using the [SQLITE_OS_OTHER=1] compile-time
+** option) the application must supply a suitable implementation for
+** sqlite3_os_init() and sqlite3_os_end(). An application-supplied
+** implementation of sqlite3_os_init() or sqlite3_os_end()
+** must return [SQLITE_OK] on success and some other [error code] upon
+** failure.
+*/
+SQLITE_API int sqlite3_initialize(void);
+SQLITE_API int sqlite3_shutdown(void);
+SQLITE_API int sqlite3_os_init(void);
+SQLITE_API int sqlite3_os_end(void);
+
+/*
+** CAPI3REF: Configuring The SQLite Library
+**
+** The sqlite3_config() interface is used to make global configuration
+** changes to SQLite in order to tune SQLite to the specific needs of
+** the application. The default configuration is recommended for most
+** applications and so this routine is usually not necessary. It is
+** provided to support rare applications with unusual needs.
+**
+** The sqlite3_config() interface is not threadsafe. The application
+** must insure that no other SQLite interfaces are invoked by other
+** threads while sqlite3_config() is running. Furthermore, sqlite3_config()
+** may only be invoked prior to library initialization using
+** [sqlite3_initialize()] or after shutdown by [sqlite3_shutdown()].
+** ^If sqlite3_config() is called after [sqlite3_initialize()] and before
+** [sqlite3_shutdown()] then it will return SQLITE_MISUSE.
+** Note, however, that ^sqlite3_config() can be called as part of the
+** implementation of an application-defined [sqlite3_os_init()].
+**
+** The first argument to sqlite3_config() is an integer
+** [SQLITE_CONFIG_SINGLETHREAD | configuration option] that determines
+** what property of SQLite is to be configured. Subsequent arguments
+** vary depending on the [SQLITE_CONFIG_SINGLETHREAD | configuration option]
+** in the first argument.
+**
+** ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK].
+** ^If the option is unknown or SQLite is unable to set the option
+** then this routine returns a non-zero [error code].
+*/
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_config(int, ...);
+
+/*
+** CAPI3REF: Configure database connections
+** EXPERIMENTAL
+**
+** The sqlite3_db_config() interface is used to make configuration
+** changes to a [database connection]. The interface is similar to
+** [sqlite3_config()] except that the changes apply to a single
+** [database connection] (specified in the first argument). The
+** sqlite3_db_config() interface should only be used immediately after
+** the database connection is created using [sqlite3_open()],
+** [sqlite3_open16()], or [sqlite3_open_v2()].
+**
+** The second argument to sqlite3_db_config(D,V,...) is the
+** configuration verb - an integer code that indicates what
+** aspect of the [database connection] is being configured.
+** The only choice for this value is [SQLITE_DBCONFIG_LOOKASIDE].
+** New verbs are likely to be added in future releases of SQLite.
+** Additional arguments depend on the verb.
+**
+** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if
+** the call is considered successful.
+*/
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_db_config(sqlite3*, int op, ...);
+
+/*
+** CAPI3REF: Memory Allocation Routines
+** EXPERIMENTAL
+**
+** An instance of this object defines the interface between SQLite
+** and low-level memory allocation routines.
+**
+** This object is used in only one place in the SQLite interface.
+** A pointer to an instance of this object is the argument to
+** [sqlite3_config()] when the configuration option is
+** [SQLITE_CONFIG_MALLOC] or [SQLITE_CONFIG_GETMALLOC].
+** By creating an instance of this object
+** and passing it to [sqlite3_config]([SQLITE_CONFIG_MALLOC])
+** during configuration, an application can specify an alternative
+** memory allocation subsystem for SQLite to use for all of its
+** dynamic memory needs.
+**
+** Note that SQLite comes with several [built-in memory allocators]
+** that are perfectly adequate for the overwhelming majority of applications
+** and that this object is only useful to a tiny minority of applications
+** with specialized memory allocation requirements. This object is
+** also used during testing of SQLite in order to specify an alternative
+** memory allocator that simulates memory out-of-memory conditions in
+** order to verify that SQLite recovers gracefully from such
+** conditions.
+**
+** The xMalloc and xFree methods must work like the
+** malloc() and free() functions from the standard C library.
+** The xRealloc method must work like realloc() from the standard C library
+** with the exception that if the second argument to xRealloc is zero,
+** xRealloc must be a no-op - it must not perform any allocation or
+** deallocation. ^SQLite guarantees that the second argument to
+** xRealloc is always a value returned by a prior call to xRoundup.
+** And so in cases where xRoundup always returns a positive number,
+** xRealloc can perform exactly as the standard library realloc() and
+** still be in compliance with this specification.
+**
+** xSize should return the allocated size of a memory allocation
+** previously obtained from xMalloc or xRealloc. The allocated size
+** is always at least as big as the requested size but may be larger.
+**
+** The xRoundup method returns what would be the allocated size of
+** a memory allocation given a particular requested size. Most memory
+** allocators round up memory allocations at least to the next multiple
+** of 8. Some allocators round up to a larger multiple or to a power of 2.
+** Every memory allocation request coming in through [sqlite3_malloc()]
+** or [sqlite3_realloc()] first calls xRoundup. If xRoundup returns 0,
+** that causes the corresponding memory allocation to fail.
+**
+** The xInit method initializes the memory allocator. (For example,
+** it might allocate any require mutexes or initialize internal data
+** structures. The xShutdown method is invoked (indirectly) by
+** [sqlite3_shutdown()] and should deallocate any resources acquired
+** by xInit. The pAppData pointer is used as the only parameter to
+** xInit and xShutdown.
+**
+** SQLite holds the [SQLITE_MUTEX_STATIC_MASTER] mutex when it invokes
+** the xInit method, so the xInit method need not be threadsafe. The
+** xShutdown method is only called from [sqlite3_shutdown()] so it does
+** not need to be threadsafe either. For all other methods, SQLite
+** holds the [SQLITE_MUTEX_STATIC_MEM] mutex as long as the
+** [SQLITE_CONFIG_MEMSTATUS] configuration option is turned on (which
+** it is by default) and so the methods are automatically serialized.
+** However, if [SQLITE_CONFIG_MEMSTATUS] is disabled, then the other
+** methods must be threadsafe or else make their own arrangements for
+** serialization.
+**
+** SQLite will never invoke xInit() more than once without an intervening
+** call to xShutdown().
+*/
+typedef struct sqlite3_mem_methods sqlite3_mem_methods;
+struct sqlite3_mem_methods {
+ void *(*xMalloc)(int); /* Memory allocation function */
+ void (*xFree)(void*); /* Free a prior allocation */
+ void *(*xRealloc)(void*,int); /* Resize an allocation */
+ int (*xSize)(void*); /* Return the size of an allocation */
+ int (*xRoundup)(int); /* Round up request size to allocation size */
+ int (*xInit)(void*); /* Initialize the memory allocator */
+ void (*xShutdown)(void*); /* Deinitialize the memory allocator */
+ void *pAppData; /* Argument to xInit() and xShutdown() */
+};
+
+/*
+** CAPI3REF: Configuration Options
+** EXPERIMENTAL
+**
+** These constants are the available integer configuration options that
+** can be passed as the first argument to the [sqlite3_config()] interface.
+**
+** New configuration options may be added in future releases of SQLite.
+** Existing configuration options might be discontinued. Applications
+** should check the return code from [sqlite3_config()] to make sure that
+** the call worked. The [sqlite3_config()] interface will return a
+** non-zero [error code] if a discontinued or unsupported configuration option
+** is invoked.
+**
+** <dl>
+** <dt>SQLITE_CONFIG_SINGLETHREAD</dt>
+** <dd>There are no arguments to this option. ^This option sets the
+** [threading mode] to Single-thread. In other words, it disables
+** all mutexing and puts SQLite into a mode where it can only be used
+** by a single thread. ^If SQLite is compiled with
+** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then
+** it is not possible to change the [threading mode] from its default
+** value of Single-thread and so [sqlite3_config()] will return
+** [SQLITE_ERROR] if called with the SQLITE_CONFIG_SINGLETHREAD
+** configuration option.</dd>
+**
+** <dt>SQLITE_CONFIG_MULTITHREAD</dt>
+** <dd>There are no arguments to this option. ^This option sets the
+** [threading mode] to Multi-thread. In other words, it disables
+** mutexing on [database connection] and [prepared statement] objects.
+** The application is responsible for serializing access to
+** [database connections] and [prepared statements]. But other mutexes
+** are enabled so that SQLite will be safe to use in a multi-threaded
+** environment as long as no two threads attempt to use the same
+** [database connection] at the same time. ^If SQLite is compiled with
+** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then
+** it is not possible to set the Multi-thread [threading mode] and
+** [sqlite3_config()] will return [SQLITE_ERROR] if called with the
+** SQLITE_CONFIG_MULTITHREAD configuration option.</dd>
+**
+** <dt>SQLITE_CONFIG_SERIALIZED</dt>
+** <dd>There are no arguments to this option. ^This option sets the
+** [threading mode] to Serialized. In other words, this option enables
+** all mutexes including the recursive
+** mutexes on [database connection] and [prepared statement] objects.
+** In this mode (which is the default when SQLite is compiled with
+** [SQLITE_THREADSAFE=1]) the SQLite library will itself serialize access
+** to [database connections] and [prepared statements] so that the
+** application is free to use the same [database connection] or the
+** same [prepared statement] in different threads at the same time.
+** ^If SQLite is compiled with
+** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then
+** it is not possible to set the Serialized [threading mode] and
+** [sqlite3_config()] will return [SQLITE_ERROR] if called with the
+** SQLITE_CONFIG_SERIALIZED configuration option.</dd>
+**
+** <dt>SQLITE_CONFIG_MALLOC</dt>
+** <dd> ^(This option takes a single argument which is a pointer to an
+** instance of the [sqlite3_mem_methods] structure. The argument specifies
+** alternative low-level memory allocation routines to be used in place of
+** the memory allocation routines built into SQLite.)^ ^SQLite makes
+** its own private copy of the content of the [sqlite3_mem_methods] structure
+** before the [sqlite3_config()] call returns.</dd>
+**
+** <dt>SQLITE_CONFIG_GETMALLOC</dt>
+** <dd> ^(This option takes a single argument which is a pointer to an
+** instance of the [sqlite3_mem_methods] structure. The [sqlite3_mem_methods]
+** structure is filled with the currently defined memory allocation routines.)^
+** This option can be used to overload the default memory allocation
+** routines with a wrapper that simulations memory allocation failure or
+** tracks memory usage, for example. </dd>
+**
+** <dt>SQLITE_CONFIG_MEMSTATUS</dt>
+** <dd> ^This option takes single argument of type int, interpreted as a
+** boolean, which enables or disables the collection of memory allocation
+** statistics. ^(When memory allocation statistics are disabled, the
+** following SQLite interfaces become non-operational:
+** <ul>
+** <li> [sqlite3_memory_used()]
+** <li> [sqlite3_memory_highwater()]
+** <li> [sqlite3_soft_heap_limit()]
+** <li> [sqlite3_status()]
+** </ul>)^
+** ^Memory allocation statistics are enabled by default unless SQLite is
+** compiled with [SQLITE_DEFAULT_MEMSTATUS]=0 in which case memory
+** allocation statistics are disabled by default.
+** </dd>
+**
+** <dt>SQLITE_CONFIG_SCRATCH</dt>
+** <dd> ^This option specifies a static memory buffer that SQLite can use for
+** scratch memory. There are three arguments: A pointer an 8-byte
+** aligned memory buffer from which the scrach allocations will be
+** drawn, the size of each scratch allocation (sz),
+** and the maximum number of scratch allocations (N). The sz
+** argument must be a multiple of 16. The sz parameter should be a few bytes
+** larger than the actual scratch space required due to internal overhead.
+** The first argument must be a pointer to an 8-byte aligned buffer
+** of at least sz*N bytes of memory.
+** ^SQLite will use no more than one scratch buffer per thread. So
+** N should be set to the expected maximum number of threads. ^SQLite will
+** never require a scratch buffer that is more than 6 times the database
+** page size. ^If SQLite needs needs additional scratch memory beyond
+** what is provided by this configuration option, then
+** [sqlite3_malloc()] will be used to obtain the memory needed.</dd>
+**
+** <dt>SQLITE_CONFIG_PAGECACHE</dt>
+** <dd> ^This option specifies a static memory buffer that SQLite can use for
+** the database page cache with the default page cache implemenation.
+** This configuration should not be used if an application-define page
+** cache implementation is loaded using the SQLITE_CONFIG_PCACHE option.
+** There are three arguments to this option: A pointer to 8-byte aligned
+** memory, the size of each page buffer (sz), and the number of pages (N).
+** The sz argument should be the size of the largest database page
+** (a power of two between 512 and 32768) plus a little extra for each
+** page header. ^The page header size is 20 to 40 bytes depending on
+** the host architecture. ^It is harmless, apart from the wasted memory,
+** to make sz a little too large. The first
+** argument should point to an allocation of at least sz*N bytes of memory.
+** ^SQLite will use the memory provided by the first argument to satisfy its
+** memory needs for the first N pages that it adds to cache. ^If additional
+** page cache memory is needed beyond what is provided by this option, then
+** SQLite goes to [sqlite3_malloc()] for the additional storage space.
+** ^The implementation might use one or more of the N buffers to hold
+** memory accounting information. The pointer in the first argument must
+** be aligned to an 8-byte boundary or subsequent behavior of SQLite
+** will be undefined.</dd>
+**
+** <dt>SQLITE_CONFIG_HEAP</dt>
+** <dd> ^This option specifies a static memory buffer that SQLite will use
+** for all of its dynamic memory allocation needs beyond those provided
+** for by [SQLITE_CONFIG_SCRATCH] and [SQLITE_CONFIG_PAGECACHE].
+** There are three arguments: An 8-byte aligned pointer to the memory,
+** the number of bytes in the memory buffer, and the minimum allocation size.
+** ^If the first pointer (the memory pointer) is NULL, then SQLite reverts
+** to using its default memory allocator (the system malloc() implementation),
+** undoing any prior invocation of [SQLITE_CONFIG_MALLOC]. ^If the
+** memory pointer is not NULL and either [SQLITE_ENABLE_MEMSYS3] or
+** [SQLITE_ENABLE_MEMSYS5] are defined, then the alternative memory
+** allocator is engaged to handle all of SQLites memory allocation needs.
+** The first pointer (the memory pointer) must be aligned to an 8-byte
+** boundary or subsequent behavior of SQLite will be undefined.</dd>
+**
+** <dt>SQLITE_CONFIG_MUTEX</dt>
+** <dd> ^(This option takes a single argument which is a pointer to an
+** instance of the [sqlite3_mutex_methods] structure. The argument specifies
+** alternative low-level mutex routines to be used in place
+** the mutex routines built into SQLite.)^ ^SQLite makes a copy of the
+** content of the [sqlite3_mutex_methods] structure before the call to
+** [sqlite3_config()] returns. ^If SQLite is compiled with
+** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then
+** the entire mutexing subsystem is omitted from the build and hence calls to
+** [sqlite3_config()] with the SQLITE_CONFIG_MUTEX configuration option will
+** return [SQLITE_ERROR].</dd>
+**
+** <dt>SQLITE_CONFIG_GETMUTEX</dt>
+** <dd> ^(This option takes a single argument which is a pointer to an
+** instance of the [sqlite3_mutex_methods] structure. The
+** [sqlite3_mutex_methods]
+** structure is filled with the currently defined mutex routines.)^
+** This option can be used to overload the default mutex allocation
+** routines with a wrapper used to track mutex usage for performance
+** profiling or testing, for example. ^If SQLite is compiled with
+** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then
+** the entire mutexing subsystem is omitted from the build and hence calls to
+** [sqlite3_config()] with the SQLITE_CONFIG_GETMUTEX configuration option will
+** return [SQLITE_ERROR].</dd>
+**
+** <dt>SQLITE_CONFIG_LOOKASIDE</dt>
+** <dd> ^(This option takes two arguments that determine the default
+** memory allocation for the lookaside memory allocator on each
+** [database connection]. The first argument is the
+** size of each lookaside buffer slot and the second is the number of
+** slots allocated to each database connection.)^ ^(This option sets the
+** <i>default</i> lookaside size. The [SQLITE_DBCONFIG_LOOKASIDE]
+** verb to [sqlite3_db_config()] can be used to change the lookaside
+** configuration on individual connections.)^ </dd>
+**
+** <dt>SQLITE_CONFIG_PCACHE</dt>
+** <dd> ^(This option takes a single argument which is a pointer to
+** an [sqlite3_pcache_methods] object. This object specifies the interface
+** to a custom page cache implementation.)^ ^SQLite makes a copy of the
+** object and uses it for page cache memory allocations.</dd>
+**
+** <dt>SQLITE_CONFIG_GETPCACHE</dt>
+** <dd> ^(This option takes a single argument which is a pointer to an
+** [sqlite3_pcache_methods] object. SQLite copies of the current
+** page cache implementation into that object.)^ </dd>
+**
+** </dl>
+*/
+#define SQLITE_CONFIG_SINGLETHREAD 1 /* nil */
+#define SQLITE_CONFIG_MULTITHREAD 2 /* nil */
+#define SQLITE_CONFIG_SERIALIZED 3 /* nil */
+#define SQLITE_CONFIG_MALLOC 4 /* sqlite3_mem_methods* */
+#define SQLITE_CONFIG_GETMALLOC 5 /* sqlite3_mem_methods* */
+#define SQLITE_CONFIG_SCRATCH 6 /* void*, int sz, int N */
+#define SQLITE_CONFIG_PAGECACHE 7 /* void*, int sz, int N */
+#define SQLITE_CONFIG_HEAP 8 /* void*, int nByte, int min */
+#define SQLITE_CONFIG_MEMSTATUS 9 /* boolean */
+#define SQLITE_CONFIG_MUTEX 10 /* sqlite3_mutex_methods* */
+#define SQLITE_CONFIG_GETMUTEX 11 /* sqlite3_mutex_methods* */
+/* previously SQLITE_CONFIG_CHUNKALLOC 12 which is now unused. */
+#define SQLITE_CONFIG_LOOKASIDE 13 /* int int */
+#define SQLITE_CONFIG_PCACHE 14 /* sqlite3_pcache_methods* */
+#define SQLITE_CONFIG_GETPCACHE 15 /* sqlite3_pcache_methods* */
+#define SQLITE_CONFIG_LOG 16 /* xFunc, void* */
+
+/*
+** CAPI3REF: Configuration Options
+** EXPERIMENTAL
+**
+** These constants are the available integer configuration options that
+** can be passed as the second argument to the [sqlite3_db_config()] interface.
+**
+** New configuration options may be added in future releases of SQLite.
+** Existing configuration options might be discontinued. Applications
+** should check the return code from [sqlite3_db_config()] to make sure that
+** the call worked. ^The [sqlite3_db_config()] interface will return a
+** non-zero [error code] if a discontinued or unsupported configuration option
+** is invoked.
+**
+** <dl>
+** <dt>SQLITE_DBCONFIG_LOOKASIDE</dt>
+** <dd> ^This option takes three additional arguments that determine the
+** [lookaside memory allocator] configuration for the [database connection].
+** ^The first argument (the third parameter to [sqlite3_db_config()] is a
+** pointer to an memory buffer to use for lookaside memory.
+** ^The first argument after the SQLITE_DBCONFIG_LOOKASIDE verb
+** may be NULL in which case SQLite will allocate the
+** lookaside buffer itself using [sqlite3_malloc()]. ^The second argument is the
+** size of each lookaside buffer slot. ^The third argument is the number of
+** slots. The size of the buffer in the first argument must be greater than
+** or equal to the product of the second and third arguments. The buffer
+** must be aligned to an 8-byte boundary. ^If the second argument to
+** SQLITE_DBCONFIG_LOOKASIDE is not a multiple of 8, it is internally
+** rounded down to the next smaller
+** multiple of 8. See also: [SQLITE_CONFIG_LOOKASIDE]</dd>
+**
+** </dl>
+*/
+#define SQLITE_DBCONFIG_LOOKASIDE 1001 /* void* int int */
+
+
+/*
+** CAPI3REF: Enable Or Disable Extended Result Codes
+**
+** ^The sqlite3_extended_result_codes() routine enables or disables the
+** [extended result codes] feature of SQLite. ^The extended result
+** codes are disabled by default for historical compatibility.
+*/
+SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff);
+
+/*
+** CAPI3REF: Last Insert Rowid
+**
+** ^Each entry in an SQLite table has a unique 64-bit signed
+** integer key called the [ROWID | "rowid"]. ^The rowid is always available
+** as an undeclared column named ROWID, OID, or _ROWID_ as long as those
+** names are not also used by explicitly declared columns. ^If
+** the table has a column of type [INTEGER PRIMARY KEY] then that column
+** is another alias for the rowid.
+**
+** ^This routine returns the [rowid] of the most recent
+** successful [INSERT] into the database from the [database connection]
+** in the first argument. ^If no successful [INSERT]s
+** have ever occurred on that database connection, zero is returned.
+**
+** ^(If an [INSERT] occurs within a trigger, then the [rowid] of the inserted
+** row is returned by this routine as long as the trigger is running.
+** But once the trigger terminates, the value returned by this routine
+** reverts to the last value inserted before the trigger fired.)^
+**
+** ^An [INSERT] that fails due to a constraint violation is not a
+** successful [INSERT] and does not change the value returned by this
+** routine. ^Thus INSERT OR FAIL, INSERT OR IGNORE, INSERT OR ROLLBACK,
+** and INSERT OR ABORT make no changes to the return value of this
+** routine when their insertion fails. ^(When INSERT OR REPLACE
+** encounters a constraint violation, it does not fail. The
+** INSERT continues to completion after deleting rows that caused
+** the constraint problem so INSERT OR REPLACE will always change
+** the return value of this interface.)^
+**
+** ^For the purposes of this routine, an [INSERT] is considered to
+** be successful even if it is subsequently rolled back.
+**
+** This function is accessible to SQL statements via the
+** [last_insert_rowid() SQL function].
+**
+** If a separate thread performs a new [INSERT] on the same
+** database connection while the [sqlite3_last_insert_rowid()]
+** function is running and thus changes the last insert [rowid],
+** then the value returned by [sqlite3_last_insert_rowid()] is
+** unpredictable and might not equal either the old or the new
+** last insert [rowid].
+*/
+SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*);
+
+/*
+** CAPI3REF: Count The Number Of Rows Modified
+**
+** ^This function returns the number of database rows that were changed
+** or inserted or deleted by the most recently completed SQL statement
+** on the [database connection] specified by the first parameter.
+** ^(Only changes that are directly specified by the [INSERT], [UPDATE],
+** or [DELETE] statement are counted. Auxiliary changes caused by
+** triggers or [foreign key actions] are not counted.)^ Use the
+** [sqlite3_total_changes()] function to find the total number of changes
+** including changes caused by triggers and foreign key actions.
+**
+** ^Changes to a view that are simulated by an [INSTEAD OF trigger]
+** are not counted. Only real table changes are counted.
+**
+** ^(A "row change" is a change to a single row of a single table
+** caused by an INSERT, DELETE, or UPDATE statement. Rows that
+** are changed as side effects of [REPLACE] constraint resolution,
+** rollback, ABORT processing, [DROP TABLE], or by any other
+** mechanisms do not count as direct row changes.)^
+**
+** A "trigger context" is a scope of execution that begins and
+** ends with the script of a [CREATE TRIGGER | trigger].
+** Most SQL statements are
+** evaluated outside of any trigger. This is the "top level"
+** trigger context. If a trigger fires from the top level, a
+** new trigger context is entered for the duration of that one
+** trigger. Subtriggers create subcontexts for their duration.
+**
+** ^Calling [sqlite3_exec()] or [sqlite3_step()] recursively does
+** not create a new trigger context.
+**
+** ^This function returns the number of direct row changes in the
+** most recent INSERT, UPDATE, or DELETE statement within the same
+** trigger context.
+**
+** ^Thus, when called from the top level, this function returns the
+** number of changes in the most recent INSERT, UPDATE, or DELETE
+** that also occurred at the top level. ^(Within the body of a trigger,
+** the sqlite3_changes() interface can be called to find the number of
+** changes in the most recently completed INSERT, UPDATE, or DELETE
+** statement within the body of the same trigger.
+** However, the number returned does not include changes
+** caused by subtriggers since those have their own context.)^
+**
+** See also the [sqlite3_total_changes()] interface, the
+** [count_changes pragma], and the [changes() SQL function].
+**
+** If a separate thread makes changes on the same database connection
+** while [sqlite3_changes()] is running then the value returned
+** is unpredictable and not meaningful.
+*/
+SQLITE_API int sqlite3_changes(sqlite3*);
+
+/*
+** CAPI3REF: Total Number Of Rows Modified
+**
+** ^This function returns the number of row changes caused by [INSERT],
+** [UPDATE] or [DELETE] statements since the [database connection] was opened.
+** ^(The count returned by sqlite3_total_changes() includes all changes
+** from all [CREATE TRIGGER | trigger] contexts and changes made by
+** [foreign key actions]. However,
+** the count does not include changes used to implement [REPLACE] constraints,
+** do rollbacks or ABORT processing, or [DROP TABLE] processing. The
+** count does not include rows of views that fire an [INSTEAD OF trigger],
+** though if the INSTEAD OF trigger makes changes of its own, those changes
+** are counted.)^
+** ^The sqlite3_total_changes() function counts the changes as soon as
+** the statement that makes them is completed (when the statement handle
+** is passed to [sqlite3_reset()] or [sqlite3_finalize()]).
+**
+** See also the [sqlite3_changes()] interface, the
+** [count_changes pragma], and the [total_changes() SQL function].
+**
+** If a separate thread makes changes on the same database connection
+** while [sqlite3_total_changes()] is running then the value
+** returned is unpredictable and not meaningful.
+*/
+SQLITE_API int sqlite3_total_changes(sqlite3*);
+
+/*
+** CAPI3REF: Interrupt A Long-Running Query
+**
+** ^This function causes any pending database operation to abort and
+** return at its earliest opportunity. This routine is typically
+** called in response to a user action such as pressing "Cancel"
+** or Ctrl-C where the user wants a long query operation to halt
+** immediately.
+**
+** ^It is safe to call this routine from a thread different from the
+** thread that is currently running the database operation. But it
+** is not safe to call this routine with a [database connection] that
+** is closed or might close before sqlite3_interrupt() returns.
+**
+** ^If an SQL operation is very nearly finished at the time when
+** sqlite3_interrupt() is called, then it might not have an opportunity
+** to be interrupted and might continue to completion.
+**
+** ^An SQL operation that is interrupted will return [SQLITE_INTERRUPT].
+** ^If the interrupted SQL operation is an INSERT, UPDATE, or DELETE
+** that is inside an explicit transaction, then the entire transaction
+** will be rolled back automatically.
+**
+** ^The sqlite3_interrupt(D) call is in effect until all currently running
+** SQL statements on [database connection] D complete. ^Any new SQL statements
+** that are started after the sqlite3_interrupt() call and before the
+** running statements reaches zero are interrupted as if they had been
+** running prior to the sqlite3_interrupt() call. ^New SQL statements
+** that are started after the running statement count reaches zero are
+** not effected by the sqlite3_interrupt().
+** ^A call to sqlite3_interrupt(D) that occurs when there are no running
+** SQL statements is a no-op and has no effect on SQL statements
+** that are started after the sqlite3_interrupt() call returns.
+**
+** If the database connection closes while [sqlite3_interrupt()]
+** is running then bad things will likely happen.
+*/
+SQLITE_API void sqlite3_interrupt(sqlite3*);
+
+/*
+** CAPI3REF: Determine If An SQL Statement Is Complete
+**
+** These routines are useful during command-line input to determine if the
+** currently entered text seems to form a complete SQL statement or
+** if additional input is needed before sending the text into
+** SQLite for parsing. ^These routines return 1 if the input string
+** appears to be a complete SQL statement. ^A statement is judged to be
+** complete if it ends with a semicolon token and is not a prefix of a
+** well-formed CREATE TRIGGER statement. ^Semicolons that are embedded within
+** string literals or quoted identifier names or comments are not
+** independent tokens (they are part of the token in which they are
+** embedded) and thus do not count as a statement terminator. ^Whitespace
+** and comments that follow the final semicolon are ignored.
+**
+** ^These routines return 0 if the statement is incomplete. ^If a
+** memory allocation fails, then SQLITE_NOMEM is returned.
+**
+** ^These routines do not parse the SQL statements thus
+** will not detect syntactically incorrect SQL.
+**
+** ^(If SQLite has not been initialized using [sqlite3_initialize()] prior
+** to invoking sqlite3_complete16() then sqlite3_initialize() is invoked
+** automatically by sqlite3_complete16(). If that initialization fails,
+** then the return value from sqlite3_complete16() will be non-zero
+** regardless of whether or not the input SQL is complete.)^
+**
+** The input to [sqlite3_complete()] must be a zero-terminated
+** UTF-8 string.
+**
+** The input to [sqlite3_complete16()] must be a zero-terminated
+** UTF-16 string in native byte order.
+*/
+SQLITE_API int sqlite3_complete(const char *sql);
+SQLITE_API int sqlite3_complete16(const void *sql);
+
+/*
+** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors
+**
+** ^This routine sets a callback function that might be invoked whenever
+** an attempt is made to open a database table that another thread
+** or process has locked.
+**
+** ^If the busy callback is NULL, then [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED]
+** is returned immediately upon encountering the lock. ^If the busy callback
+** is not NULL, then the callback might be invoked with two arguments.
+**
+** ^The first argument to the busy handler is a copy of the void* pointer which
+** is the third argument to sqlite3_busy_handler(). ^The second argument to
+** the busy handler callback is the number of times that the busy handler has
+** been invoked for this locking event. ^If the
+** busy callback returns 0, then no additional attempts are made to
+** access the database and [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED] is returned.
+** ^If the callback returns non-zero, then another attempt
+** is made to open the database for reading and the cycle repeats.
+**
+** The presence of a busy handler does not guarantee that it will be invoked
+** when there is lock contention. ^If SQLite determines that invoking the busy
+** handler could result in a deadlock, it will go ahead and return [SQLITE_BUSY]
+** or [SQLITE_IOERR_BLOCKED] instead of invoking the busy handler.
+** Consider a scenario where one process is holding a read lock that
+** it is trying to promote to a reserved lock and
+** a second process is holding a reserved lock that it is trying
+** to promote to an exclusive lock. The first process cannot proceed
+** because it is blocked by the second and the second process cannot
+** proceed because it is blocked by the first. If both processes
+** invoke the busy handlers, neither will make any progress. Therefore,
+** SQLite returns [SQLITE_BUSY] for the first process, hoping that this
+** will induce the first process to release its read lock and allow
+** the second process to proceed.
+**
+** ^The default busy callback is NULL.
+**
+** ^The [SQLITE_BUSY] error is converted to [SQLITE_IOERR_BLOCKED]
+** when SQLite is in the middle of a large transaction where all the
+** changes will not fit into the in-memory cache. SQLite will
+** already hold a RESERVED lock on the database file, but it needs
+** to promote this lock to EXCLUSIVE so that it can spill cache
+** pages into the database file without harm to concurrent
+** readers. ^If it is unable to promote the lock, then the in-memory
+** cache will be left in an inconsistent state and so the error
+** code is promoted from the relatively benign [SQLITE_BUSY] to
+** the more severe [SQLITE_IOERR_BLOCKED]. ^This error code promotion
+** forces an automatic rollback of the changes. See the
+** <a href="/cvstrac/wiki?p=CorruptionFollowingBusyError">
+** CorruptionFollowingBusyError</a> wiki page for a discussion of why
+** this is important.
+**
+** ^(There can only be a single busy handler defined for each
+** [database connection]. Setting a new busy handler clears any
+** previously set handler.)^ ^Note that calling [sqlite3_busy_timeout()]
+** will also set or clear the busy handler.
+**
+** The busy callback should not take any actions which modify the
+** database connection that invoked the busy handler. Any such actions
+** result in undefined behavior.
+**
+** A busy handler must not close the database connection
+** or [prepared statement] that invoked the busy handler.
+*/
+SQLITE_API int sqlite3_busy_handler(sqlite3*, int(*)(void*,int), void*);
+
+/*
+** CAPI3REF: Set A Busy Timeout
+**
+** ^This routine sets a [sqlite3_busy_handler | busy handler] that sleeps
+** for a specified amount of time when a table is locked. ^The handler
+** will sleep multiple times until at least "ms" milliseconds of sleeping
+** have accumulated. ^After at least "ms" milliseconds of sleeping,
+** the handler returns 0 which causes [sqlite3_step()] to return
+** [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED].
+**
+** ^Calling this routine with an argument less than or equal to zero
+** turns off all busy handlers.
+**
+** ^(There can only be a single busy handler for a particular
+** [database connection] any any given moment. If another busy handler
+** was defined (using [sqlite3_busy_handler()]) prior to calling
+** this routine, that other busy handler is cleared.)^
+*/
+SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms);
+
+/*
+** CAPI3REF: Convenience Routines For Running Queries
+**
+** Definition: A <b>result table</b> is memory data structure created by the
+** [sqlite3_get_table()] interface. A result table records the
+** complete query results from one or more queries.
+**
+** The table conceptually has a number of rows and columns. But
+** these numbers are not part of the result table itself. These
+** numbers are obtained separately. Let N be the number of rows
+** and M be the number of columns.
+**
+** A result table is an array of pointers to zero-terminated UTF-8 strings.
+** There are (N+1)*M elements in the array. The first M pointers point
+** to zero-terminated strings that contain the names of the columns.
+** The remaining entries all point to query results. NULL values result
+** in NULL pointers. All other values are in their UTF-8 zero-terminated
+** string representation as returned by [sqlite3_column_text()].
+**
+** A result table might consist of one or more memory allocations.
+** It is not safe to pass a result table directly to [sqlite3_free()].
+** A result table should be deallocated using [sqlite3_free_table()].
+**
+** As an example of the result table format, suppose a query result
+** is as follows:
+**
+** <blockquote><pre>
+** Name | Age
+** -----------------------
+** Alice | 43
+** Bob | 28
+** Cindy | 21
+** </pre></blockquote>
+**
+** There are two column (M==2) and three rows (N==3). Thus the
+** result table has 8 entries. Suppose the result table is stored
+** in an array names azResult. Then azResult holds this content:
+**
+** <blockquote><pre>
+** azResult[0] = "Name";
+** azResult[1] = "Age";
+** azResult[2] = "Alice";
+** azResult[3] = "43";
+** azResult[4] = "Bob";
+** azResult[5] = "28";
+** azResult[6] = "Cindy";
+** azResult[7] = "21";
+** </pre></blockquote>
+**
+** ^The sqlite3_get_table() function evaluates one or more
+** semicolon-separated SQL statements in the zero-terminated UTF-8
+** string of its 2nd parameter and returns a result table to the
+** pointer given in its 3rd parameter.
+**
+** After the application has finished with the result from sqlite3_get_table(),
+** it should pass the result table pointer to sqlite3_free_table() in order to
+** release the memory that was malloced. Because of the way the
+** [sqlite3_malloc()] happens within sqlite3_get_table(), the calling
+** function must not try to call [sqlite3_free()] directly. Only
+** [sqlite3_free_table()] is able to release the memory properly and safely.
+**
+** ^(The sqlite3_get_table() interface is implemented as a wrapper around
+** [sqlite3_exec()]. The sqlite3_get_table() routine does not have access
+** to any internal data structures of SQLite. It uses only the public
+** interface defined here. As a consequence, errors that occur in the
+** wrapper layer outside of the internal [sqlite3_exec()] call are not
+** reflected in subsequent calls to [sqlite3_errcode()] or
+** [sqlite3_errmsg()].)^
+*/
+SQLITE_API int sqlite3_get_table(
+ sqlite3 *db, /* An open database */
+ const char *zSql, /* SQL to be evaluated */
+ char ***pazResult, /* Results of the query */
+ int *pnRow, /* Number of result rows written here */
+ int *pnColumn, /* Number of result columns written here */
+ char **pzErrmsg /* Error msg written here */
+);
+SQLITE_API void sqlite3_free_table(char **result);
+
+/*
+** CAPI3REF: Formatted String Printing Functions
+**
+** These routines are work-alikes of the "printf()" family of functions
+** from the standard C library.
+**
+** ^The sqlite3_mprintf() and sqlite3_vmprintf() routines write their
+** results into memory obtained from [sqlite3_malloc()].
+** The strings returned by these two routines should be
+** released by [sqlite3_free()]. ^Both routines return a
+** NULL pointer if [sqlite3_malloc()] is unable to allocate enough
+** memory to hold the resulting string.
+**
+** ^(In sqlite3_snprintf() routine is similar to "snprintf()" from
+** the standard C library. The result is written into the
+** buffer supplied as the second parameter whose size is given by
+** the first parameter. Note that the order of the
+** first two parameters is reversed from snprintf().)^ This is an
+** historical accident that cannot be fixed without breaking
+** backwards compatibility. ^(Note also that sqlite3_snprintf()
+** returns a pointer to its buffer instead of the number of
+** characters actually written into the buffer.)^ We admit that
+** the number of characters written would be a more useful return
+** value but we cannot change the implementation of sqlite3_snprintf()
+** now without breaking compatibility.
+**
+** ^As long as the buffer size is greater than zero, sqlite3_snprintf()
+** guarantees that the buffer is always zero-terminated. ^The first
+** parameter "n" is the total size of the buffer, including space for
+** the zero terminator. So the longest string that can be completely
+** written will be n-1 characters.
+**
+** These routines all implement some additional formatting
+** options that are useful for constructing SQL statements.
+** All of the usual printf() formatting options apply. In addition, there
+** is are "%q", "%Q", and "%z" options.
+**
+** ^(The %q option works like %s in that it substitutes a null-terminated
+** string from the argument list. But %q also doubles every '\'' character.
+** %q is designed for use inside a string literal.)^ By doubling each '\''
+** character it escapes that character and allows it to be inserted into
+** the string.
+**
+** For example, assume the string variable zText contains text as follows:
+**
+** <blockquote><pre>
+** char *zText = "It's a happy day!";
+** </pre></blockquote>
+**
+** One can use this text in an SQL statement as follows:
+**
+** <blockquote><pre>
+** char *zSQL = sqlite3_mprintf("INSERT INTO table VALUES('%q')", zText);
+** sqlite3_exec(db, zSQL, 0, 0, 0);
+** sqlite3_free(zSQL);
+** </pre></blockquote>
+**
+** Because the %q format string is used, the '\'' character in zText
+** is escaped and the SQL generated is as follows:
+**
+** <blockquote><pre>
+** INSERT INTO table1 VALUES('It''s a happy day!')
+** </pre></blockquote>
+**
+** This is correct. Had we used %s instead of %q, the generated SQL
+** would have looked like this:
+**
+** <blockquote><pre>
+** INSERT INTO table1 VALUES('It's a happy day!');
+** </pre></blockquote>
+**
+** This second example is an SQL syntax error. As a general rule you should
+** always use %q instead of %s when inserting text into a string literal.
+**
+** ^(The %Q option works like %q except it also adds single quotes around
+** the outside of the total string. Additionally, if the parameter in the
+** argument list is a NULL pointer, %Q substitutes the text "NULL" (without
+** single quotes).)^ So, for example, one could say:
+**
+** <blockquote><pre>
+** char *zSQL = sqlite3_mprintf("INSERT INTO table VALUES(%Q)", zText);
+** sqlite3_exec(db, zSQL, 0, 0, 0);
+** sqlite3_free(zSQL);
+** </pre></blockquote>
+**
+** The code above will render a correct SQL statement in the zSQL
+** variable even if the zText variable is a NULL pointer.
+**
+** ^(The "%z" formatting option works like "%s" but with the
+** addition that after the string has been read and copied into
+** the result, [sqlite3_free()] is called on the input string.)^
+*/
+SQLITE_API char *sqlite3_mprintf(const char*,...);
+SQLITE_API char *sqlite3_vmprintf(const char*, va_list);
+SQLITE_API char *sqlite3_snprintf(int,char*,const char*, ...);
+
+/*
+** CAPI3REF: Memory Allocation Subsystem
+**
+** The SQLite core uses these three routines for all of its own
+** internal memory allocation needs. "Core" in the previous sentence
+** does not include operating-system specific VFS implementation. The
+** Windows VFS uses native malloc() and free() for some operations.
+**
+** ^The sqlite3_malloc() routine returns a pointer to a block
+** of memory at least N bytes in length, where N is the parameter.
+** ^If sqlite3_malloc() is unable to obtain sufficient free
+** memory, it returns a NULL pointer. ^If the parameter N to
+** sqlite3_malloc() is zero or negative then sqlite3_malloc() returns
+** a NULL pointer.
+**
+** ^Calling sqlite3_free() with a pointer previously returned
+** by sqlite3_malloc() or sqlite3_realloc() releases that memory so
+** that it might be reused. ^The sqlite3_free() routine is
+** a no-op if is called with a NULL pointer. Passing a NULL pointer
+** to sqlite3_free() is harmless. After being freed, memory
+** should neither be read nor written. Even reading previously freed
+** memory might result in a segmentation fault or other severe error.
+** Memory corruption, a segmentation fault, or other severe error
+** might result if sqlite3_free() is called with a non-NULL pointer that
+** was not obtained from sqlite3_malloc() or sqlite3_realloc().
+**
+** ^(The sqlite3_realloc() interface attempts to resize a
+** prior memory allocation to be at least N bytes, where N is the
+** second parameter. The memory allocation to be resized is the first
+** parameter.)^ ^ If the first parameter to sqlite3_realloc()
+** is a NULL pointer then its behavior is identical to calling
+** sqlite3_malloc(N) where N is the second parameter to sqlite3_realloc().
+** ^If the second parameter to sqlite3_realloc() is zero or
+** negative then the behavior is exactly the same as calling
+** sqlite3_free(P) where P is the first parameter to sqlite3_realloc().
+** ^sqlite3_realloc() returns a pointer to a memory allocation
+** of at least N bytes in size or NULL if sufficient memory is unavailable.
+** ^If M is the size of the prior allocation, then min(N,M) bytes
+** of the prior allocation are copied into the beginning of buffer returned
+** by sqlite3_realloc() and the prior allocation is freed.
+** ^If sqlite3_realloc() returns NULL, then the prior allocation
+** is not freed.
+**
+** ^The memory returned by sqlite3_malloc() and sqlite3_realloc()
+** is always aligned to at least an 8 byte boundary.
+**
+** In SQLite version 3.5.0 and 3.5.1, it was possible to define
+** the SQLITE_OMIT_MEMORY_ALLOCATION which would cause the built-in
+** implementation of these routines to be omitted. That capability
+** is no longer provided. Only built-in memory allocators can be used.
+**
+** The Windows OS interface layer calls
+** the system malloc() and free() directly when converting
+** filenames between the UTF-8 encoding used by SQLite
+** and whatever filename encoding is used by the particular Windows
+** installation. Memory allocation errors are detected, but
+** they are reported back as [SQLITE_CANTOPEN] or
+** [SQLITE_IOERR] rather than [SQLITE_NOMEM].
+**
+** The pointer arguments to [sqlite3_free()] and [sqlite3_realloc()]
+** must be either NULL or else pointers obtained from a prior
+** invocation of [sqlite3_malloc()] or [sqlite3_realloc()] that have
+** not yet been released.
+**
+** The application must not read or write any part of
+** a block of memory after it has been released using
+** [sqlite3_free()] or [sqlite3_realloc()].
+*/
+SQLITE_API void *sqlite3_malloc(int);
+SQLITE_API void *sqlite3_realloc(void*, int);
+SQLITE_API void sqlite3_free(void*);
+
+/*
+** CAPI3REF: Memory Allocator Statistics
+**
+** SQLite provides these two interfaces for reporting on the status
+** of the [sqlite3_malloc()], [sqlite3_free()], and [sqlite3_realloc()]
+** routines, which form the built-in memory allocation subsystem.
+**
+** ^The [sqlite3_memory_used()] routine returns the number of bytes
+** of memory currently outstanding (malloced but not freed).
+** ^The [sqlite3_memory_highwater()] routine returns the maximum
+** value of [sqlite3_memory_used()] since the high-water mark
+** was last reset. ^The values returned by [sqlite3_memory_used()] and
+** [sqlite3_memory_highwater()] include any overhead
+** added by SQLite in its implementation of [sqlite3_malloc()],
+** but not overhead added by the any underlying system library
+** routines that [sqlite3_malloc()] may call.
+**
+** ^The memory high-water mark is reset to the current value of
+** [sqlite3_memory_used()] if and only if the parameter to
+** [sqlite3_memory_highwater()] is true. ^The value returned
+** by [sqlite3_memory_highwater(1)] is the high-water mark
+** prior to the reset.
+*/
+SQLITE_API sqlite3_int64 sqlite3_memory_used(void);
+SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag);
+
+/*
+** CAPI3REF: Pseudo-Random Number Generator
+**
+** SQLite contains a high-quality pseudo-random number generator (PRNG) used to
+** select random [ROWID | ROWIDs] when inserting new records into a table that
+** already uses the largest possible [ROWID]. The PRNG is also used for
+** the build-in random() and randomblob() SQL functions. This interface allows
+** applications to access the same PRNG for other purposes.
+**
+** ^A call to this routine stores N bytes of randomness into buffer P.
+**
+** ^The first time this routine is invoked (either internally or by
+** the application) the PRNG is seeded using randomness obtained
+** from the xRandomness method of the default [sqlite3_vfs] object.
+** ^On all subsequent invocations, the pseudo-randomness is generated
+** internally and without recourse to the [sqlite3_vfs] xRandomness
+** method.
+*/
+SQLITE_API void sqlite3_randomness(int N, void *P);
+
+/*
+** CAPI3REF: Compile-Time Authorization Callbacks
+**
+** ^This routine registers a authorizer callback with a particular
+** [database connection], supplied in the first argument.
+** ^The authorizer callback is invoked as SQL statements are being compiled
+** by [sqlite3_prepare()] or its variants [sqlite3_prepare_v2()],
+** [sqlite3_prepare16()] and [sqlite3_prepare16_v2()]. ^At various
+** points during the compilation process, as logic is being created
+** to perform various actions, the authorizer callback is invoked to
+** see if those actions are allowed. ^The authorizer callback should
+** return [SQLITE_OK] to allow the action, [SQLITE_IGNORE] to disallow the
+** specific action but allow the SQL statement to continue to be
+** compiled, or [SQLITE_DENY] to cause the entire SQL statement to be
+** rejected with an error. ^If the authorizer callback returns
+** any value other than [SQLITE_IGNORE], [SQLITE_OK], or [SQLITE_DENY]
+** then the [sqlite3_prepare_v2()] or equivalent call that triggered
+** the authorizer will fail with an error message.
+**
+** When the callback returns [SQLITE_OK], that means the operation
+** requested is ok. ^When the callback returns [SQLITE_DENY], the
+** [sqlite3_prepare_v2()] or equivalent call that triggered the
+** authorizer will fail with an error message explaining that
+** access is denied.
+**
+** ^The first parameter to the authorizer callback is a copy of the third
+** parameter to the sqlite3_set_authorizer() interface. ^The second parameter
+** to the callback is an integer [SQLITE_COPY | action code] that specifies
+** the particular action to be authorized. ^The third through sixth parameters
+** to the callback are zero-terminated strings that contain additional
+** details about the action to be authorized.
+**
+** ^If the action code is [SQLITE_READ]
+** and the callback returns [SQLITE_IGNORE] then the
+** [prepared statement] statement is constructed to substitute
+** a NULL value in place of the table column that would have
+** been read if [SQLITE_OK] had been returned. The [SQLITE_IGNORE]
+** return can be used to deny an untrusted user access to individual
+** columns of a table.
+** ^If the action code is [SQLITE_DELETE] and the callback returns
+** [SQLITE_IGNORE] then the [DELETE] operation proceeds but the
+** [truncate optimization] is disabled and all rows are deleted individually.
+**
+** An authorizer is used when [sqlite3_prepare | preparing]
+** SQL statements from an untrusted source, to ensure that the SQL statements
+** do not try to access data they are not allowed to see, or that they do not
+** try to execute malicious statements that damage the database. For
+** example, an application may allow a user to enter arbitrary
+** SQL queries for evaluation by a database. But the application does
+** not want the user to be able to make arbitrary changes to the
+** database. An authorizer could then be put in place while the
+** user-entered SQL is being [sqlite3_prepare | prepared] that
+** disallows everything except [SELECT] statements.
+**
+** Applications that need to process SQL from untrusted sources
+** might also consider lowering resource limits using [sqlite3_limit()]
+** and limiting database size using the [max_page_count] [PRAGMA]
+** in addition to using an authorizer.
+**
+** ^(Only a single authorizer can be in place on a database connection
+** at a time. Each call to sqlite3_set_authorizer overrides the
+** previous call.)^ ^Disable the authorizer by installing a NULL callback.
+** The authorizer is disabled by default.
+**
+** The authorizer callback must not do anything that will modify
+** the database connection that invoked the authorizer callback.
+** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
+** database connections for the meaning of "modify" in this paragraph.
+**
+** ^When [sqlite3_prepare_v2()] is used to prepare a statement, the
+** statement might be re-prepared during [sqlite3_step()] due to a
+** schema change. Hence, the application should ensure that the
+** correct authorizer callback remains in place during the [sqlite3_step()].
+**
+** ^Note that the authorizer callback is invoked only during
+** [sqlite3_prepare()] or its variants. Authorization is not
+** performed during statement evaluation in [sqlite3_step()], unless
+** as stated in the previous paragraph, sqlite3_step() invokes
+** sqlite3_prepare_v2() to reprepare a statement after a schema change.
+*/
+SQLITE_API int sqlite3_set_authorizer(
+ sqlite3*,
+ int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
+ void *pUserData
+);
+
+/*
+** CAPI3REF: Authorizer Return Codes
+**
+** The [sqlite3_set_authorizer | authorizer callback function] must
+** return either [SQLITE_OK] or one of these two constants in order
+** to signal SQLite whether or not the action is permitted. See the
+** [sqlite3_set_authorizer | authorizer documentation] for additional
+** information.
+*/
+#define SQLITE_DENY 1 /* Abort the SQL statement with an error */
+#define SQLITE_IGNORE 2 /* Don't allow access, but don't generate an error */
+
+/*
+** CAPI3REF: Authorizer Action Codes
+**
+** The [sqlite3_set_authorizer()] interface registers a callback function
+** that is invoked to authorize certain SQL statement actions. The
+** second parameter to the callback is an integer code that specifies
+** what action is being authorized. These are the integer action codes that
+** the authorizer callback may be passed.
+**
+** These action code values signify what kind of operation is to be
+** authorized. The 3rd and 4th parameters to the authorization
+** callback function will be parameters or NULL depending on which of these
+** codes is used as the second parameter. ^(The 5th parameter to the
+** authorizer callback is the name of the database ("main", "temp",
+** etc.) if applicable.)^ ^The 6th parameter to the authorizer callback
+** is the name of the inner-most trigger or view that is responsible for
+** the access attempt or NULL if this access attempt is directly from
+** top-level SQL code.
+*/
+/******************************************* 3rd ************ 4th ***********/
+#define SQLITE_CREATE_INDEX 1 /* Index Name Table Name */
+#define SQLITE_CREATE_TABLE 2 /* Table Name NULL */
+#define SQLITE_CREATE_TEMP_INDEX 3 /* Index Name Table Name */
+#define SQLITE_CREATE_TEMP_TABLE 4 /* Table Name NULL */
+#define SQLITE_CREATE_TEMP_TRIGGER 5 /* Trigger Name Table Name */
+#define SQLITE_CREATE_TEMP_VIEW 6 /* View Name NULL */
+#define SQLITE_CREATE_TRIGGER 7 /* Trigger Name Table Name */
+#define SQLITE_CREATE_VIEW 8 /* View Name NULL */
+#define SQLITE_DELETE 9 /* Table Name NULL */
+#define SQLITE_DROP_INDEX 10 /* Index Name Table Name */
+#define SQLITE_DROP_TABLE 11 /* Table Name NULL */
+#define SQLITE_DROP_TEMP_INDEX 12 /* Index Name Table Name */
+#define SQLITE_DROP_TEMP_TABLE 13 /* Table Name NULL */
+#define SQLITE_DROP_TEMP_TRIGGER 14 /* Trigger Name Table Name */
+#define SQLITE_DROP_TEMP_VIEW 15 /* View Name NULL */
+#define SQLITE_DROP_TRIGGER 16 /* Trigger Name Table Name */
+#define SQLITE_DROP_VIEW 17 /* View Name NULL */
+#define SQLITE_INSERT 18 /* Table Name NULL */
+#define SQLITE_PRAGMA 19 /* Pragma Name 1st arg or NULL */
+#define SQLITE_READ 20 /* Table Name Column Name */
+#define SQLITE_SELECT 21 /* NULL NULL */
+#define SQLITE_TRANSACTION 22 /* Operation NULL */
+#define SQLITE_UPDATE 23 /* Table Name Column Name */
+#define SQLITE_ATTACH 24 /* Filename NULL */
+#define SQLITE_DETACH 25 /* Database Name NULL */
+#define SQLITE_ALTER_TABLE 26 /* Database Name Table Name */
+#define SQLITE_REINDEX 27 /* Index Name NULL */
+#define SQLITE_ANALYZE 28 /* Table Name NULL */
+#define SQLITE_CREATE_VTABLE 29 /* Table Name Module Name */
+#define SQLITE_DROP_VTABLE 30 /* Table Name Module Name */
+#define SQLITE_FUNCTION 31 /* NULL Function Name */
+#define SQLITE_SAVEPOINT 32 /* Operation Savepoint Name */
+#define SQLITE_COPY 0 /* No longer used */
+
+/*
+** CAPI3REF: Tracing And Profiling Functions
+** EXPERIMENTAL
+**
+** These routines register callback functions that can be used for
+** tracing and profiling the execution of SQL statements.
+**
+** ^The callback function registered by sqlite3_trace() is invoked at
+** various times when an SQL statement is being run by [sqlite3_step()].
+** ^The sqlite3_trace() callback is invoked with a UTF-8 rendering of the
+** SQL statement text as the statement first begins executing.
+** ^(Additional sqlite3_trace() callbacks might occur
+** as each triggered subprogram is entered. The callbacks for triggers
+** contain a UTF-8 SQL comment that identifies the trigger.)^
+**
+** ^The callback function registered by sqlite3_profile() is invoked
+** as each SQL statement finishes. ^The profile callback contains
+** the original statement text and an estimate of wall-clock time
+** of how long that statement took to run.
+*/
+SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*);
+SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_profile(sqlite3*,
+ void(*xProfile)(void*,const char*,sqlite3_uint64), void*);
+
+/*
+** CAPI3REF: Query Progress Callbacks
+**
+** ^This routine configures a callback function - the
+** progress callback - that is invoked periodically during long
+** running calls to [sqlite3_exec()], [sqlite3_step()] and
+** [sqlite3_get_table()]. An example use for this
+** interface is to keep a GUI updated during a large query.
+**
+** ^If the progress callback returns non-zero, the operation is
+** interrupted. This feature can be used to implement a
+** "Cancel" button on a GUI progress dialog box.
+**
+** The progress handler must not do anything that will modify
+** the database connection that invoked the progress handler.
+** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
+** database connections for the meaning of "modify" in this paragraph.
+**
+*/
+SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
+
+/*
+** CAPI3REF: Opening A New Database Connection
+**
+** ^These routines open an SQLite database file whose name is given by the
+** filename argument. ^The filename argument is interpreted as UTF-8 for
+** sqlite3_open() and sqlite3_open_v2() and as UTF-16 in the native byte
+** order for sqlite3_open16(). ^(A [database connection] handle is usually
+** returned in *ppDb, even if an error occurs. The only exception is that
+** if SQLite is unable to allocate memory to hold the [sqlite3] object,
+** a NULL will be written into *ppDb instead of a pointer to the [sqlite3]
+** object.)^ ^(If the database is opened (and/or created) successfully, then
+** [SQLITE_OK] is returned. Otherwise an [error code] is returned.)^ ^The
+** [sqlite3_errmsg()] or [sqlite3_errmsg16()] routines can be used to obtain
+** an English language description of the error following a failure of any
+** of the sqlite3_open() routines.
+**
+** ^The default encoding for the database will be UTF-8 if
+** sqlite3_open() or sqlite3_open_v2() is called and
+** UTF-16 in the native byte order if sqlite3_open16() is used.
+**
+** Whether or not an error occurs when it is opened, resources
+** associated with the [database connection] handle should be released by
+** passing it to [sqlite3_close()] when it is no longer required.
+**
+** The sqlite3_open_v2() interface works like sqlite3_open()
+** except that it accepts two additional parameters for additional control
+** over the new database connection. ^(The flags parameter to
+** sqlite3_open_v2() can take one of
+** the following three values, optionally combined with the
+** [SQLITE_OPEN_NOMUTEX], [SQLITE_OPEN_FULLMUTEX], [SQLITE_OPEN_SHAREDCACHE],
+** and/or [SQLITE_OPEN_PRIVATECACHE] flags:)^
+**
+** <dl>
+** ^(<dt>[SQLITE_OPEN_READONLY]</dt>
+** <dd>The database is opened in read-only mode. If the database does not
+** already exist, an error is returned.</dd>)^
+**
+** ^(<dt>[SQLITE_OPEN_READWRITE]</dt>
+** <dd>The database is opened for reading and writing if possible, or reading
+** only if the file is write protected by the operating system. In either
+** case the database must already exist, otherwise an error is returned.</dd>)^
+**
+** ^(<dt>[SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]</dt>
+** <dd>The database is opened for reading and writing, and is creates it if
+** it does not already exist. This is the behavior that is always used for
+** sqlite3_open() and sqlite3_open16().</dd>)^
+** </dl>
+**
+** If the 3rd parameter to sqlite3_open_v2() is not one of the
+** combinations shown above or one of the combinations shown above combined
+** with the [SQLITE_OPEN_NOMUTEX], [SQLITE_OPEN_FULLMUTEX],
+** [SQLITE_OPEN_SHAREDCACHE] and/or [SQLITE_OPEN_SHAREDCACHE] flags,
+** then the behavior is undefined.
+**
+** ^If the [SQLITE_OPEN_NOMUTEX] flag is set, then the database connection
+** opens in the multi-thread [threading mode] as long as the single-thread
+** mode has not been set at compile-time or start-time. ^If the
+** [SQLITE_OPEN_FULLMUTEX] flag is set then the database connection opens
+** in the serialized [threading mode] unless single-thread was
+** previously selected at compile-time or start-time.
+** ^The [SQLITE_OPEN_SHAREDCACHE] flag causes the database connection to be
+** eligible to use [shared cache mode], regardless of whether or not shared
+** cache is enabled using [sqlite3_enable_shared_cache()]. ^The
+** [SQLITE_OPEN_PRIVATECACHE] flag causes the database connection to not
+** participate in [shared cache mode] even if it is enabled.
+**
+** ^If the filename is ":memory:", then a private, temporary in-memory database
+** is created for the connection. ^This in-memory database will vanish when
+** the database connection is closed. Future versions of SQLite might
+** make use of additional special filenames that begin with the ":" character.
+** It is recommended that when a database filename actually does begin with
+** a ":" character you should prefix the filename with a pathname such as
+** "./" to avoid ambiguity.
+**
+** ^If the filename is an empty string, then a private, temporary
+** on-disk database will be created. ^This private database will be
+** automatically deleted as soon as the database connection is closed.
+**
+** ^The fourth parameter to sqlite3_open_v2() is the name of the
+** [sqlite3_vfs] object that defines the operating system interface that
+** the new database connection should use. ^If the fourth parameter is
+** a NULL pointer then the default [sqlite3_vfs] object is used.
+**
+** <b>Note to Windows users:</b> The encoding used for the filename argument
+** of sqlite3_open() and sqlite3_open_v2() must be UTF-8, not whatever
+** codepage is currently defined. Filenames containing international
+** characters must be converted to UTF-8 prior to passing them into
+** sqlite3_open() or sqlite3_open_v2().
+*/
+SQLITE_API int sqlite3_open(
+ const char *filename, /* Database filename (UTF-8) */
+ sqlite3 **ppDb /* OUT: SQLite db handle */
+);
+SQLITE_API int sqlite3_open16(
+ const void *filename, /* Database filename (UTF-16) */
+ sqlite3 **ppDb /* OUT: SQLite db handle */
+);
+SQLITE_API int sqlite3_open_v2(
+ const char *filename, /* Database filename (UTF-8) */
+ sqlite3 **ppDb, /* OUT: SQLite db handle */
+ int flags, /* Flags */
+ const char *zVfs /* Name of VFS module to use */
+);
+
+/*
+** CAPI3REF: Error Codes And Messages
+**
+** ^The sqlite3_errcode() interface returns the numeric [result code] or
+** [extended result code] for the most recent failed sqlite3_* API call
+** associated with a [database connection]. If a prior API call failed
+** but the most recent API call succeeded, the return value from
+** sqlite3_errcode() is undefined. ^The sqlite3_extended_errcode()
+** interface is the same except that it always returns the
+** [extended result code] even when extended result codes are
+** disabled.
+**
+** ^The sqlite3_errmsg() and sqlite3_errmsg16() return English-language
+** text that describes the error, as either UTF-8 or UTF-16 respectively.
+** ^(Memory to hold the error message string is managed internally.
+** The application does not need to worry about freeing the result.
+** However, the error string might be overwritten or deallocated by
+** subsequent calls to other SQLite interface functions.)^
+**
+** When the serialized [threading mode] is in use, it might be the
+** case that a second error occurs on a separate thread in between
+** the time of the first error and the call to these interfaces.
+** When that happens, the second error will be reported since these
+** interfaces always report the most recent result. To avoid
+** this, each thread can obtain exclusive use of the [database connection] D
+** by invoking [sqlite3_mutex_enter]([sqlite3_db_mutex](D)) before beginning
+** to use D and invoking [sqlite3_mutex_leave]([sqlite3_db_mutex](D)) after
+** all calls to the interfaces listed here are completed.
+**
+** If an interface fails with SQLITE_MISUSE, that means the interface
+** was invoked incorrectly by the application. In that case, the
+** error code and message may or may not be set.
+*/
+SQLITE_API int sqlite3_errcode(sqlite3 *db);
+SQLITE_API int sqlite3_extended_errcode(sqlite3 *db);
+SQLITE_API const char *sqlite3_errmsg(sqlite3*);
+SQLITE_API const void *sqlite3_errmsg16(sqlite3*);
+
+/*
+** CAPI3REF: SQL Statement Object
+** KEYWORDS: {prepared statement} {prepared statements}
+**
+** An instance of this object represents a single SQL statement.
+** This object is variously known as a "prepared statement" or a
+** "compiled SQL statement" or simply as a "statement".
+**
+** The life of a statement object goes something like this:
+**
+** <ol>
+** <li> Create the object using [sqlite3_prepare_v2()] or a related
+** function.
+** <li> Bind values to [host parameters] using the sqlite3_bind_*()
+** interfaces.
+** <li> Run the SQL by calling [sqlite3_step()] one or more times.
+** <li> Reset the statement using [sqlite3_reset()] then go back
+** to step 2. Do this zero or more times.
+** <li> Destroy the object using [sqlite3_finalize()].
+** </ol>
+**
+** Refer to documentation on individual methods above for additional
+** information.
+*/
+typedef struct sqlite3_stmt sqlite3_stmt;
+
+/*
+** CAPI3REF: Run-time Limits
+**
+** ^(This interface allows the size of various constructs to be limited
+** on a connection by connection basis. The first parameter is the
+** [database connection] whose limit is to be set or queried. The
+** second parameter is one of the [limit categories] that define a
+** class of constructs to be size limited. The third parameter is the
+** new limit for that construct. The function returns the old limit.)^
+**
+** ^If the new limit is a negative number, the limit is unchanged.
+** ^(For the limit category of SQLITE_LIMIT_XYZ there is a
+** [limits | hard upper bound]
+** set by a compile-time C preprocessor macro named
+** [limits | SQLITE_MAX_XYZ].
+** (The "_LIMIT_" in the name is changed to "_MAX_".))^
+** ^Attempts to increase a limit above its hard upper bound are
+** silently truncated to the hard upper bound.
+**
+** Run-time limits are intended for use in applications that manage
+** both their own internal database and also databases that are controlled
+** by untrusted external sources. An example application might be a
+** web browser that has its own databases for storing history and
+** separate databases controlled by JavaScript applications downloaded
+** off the Internet. The internal databases can be given the
+** large, default limits. Databases managed by external sources can
+** be given much smaller limits designed to prevent a denial of service
+** attack. Developers might also want to use the [sqlite3_set_authorizer()]
+** interface to further control untrusted SQL. The size of the database
+** created by an untrusted script can be contained using the
+** [max_page_count] [PRAGMA].
+**
+** New run-time limit categories may be added in future releases.
+*/
+SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
+
+/*
+** CAPI3REF: Run-Time Limit Categories
+** KEYWORDS: {limit category} {*limit categories}
+**
+** These constants define various performance limits
+** that can be lowered at run-time using [sqlite3_limit()].
+** The synopsis of the meanings of the various limits is shown below.
+** Additional information is available at [limits | Limits in SQLite].
+**
+** <dl>
+** ^(<dt>SQLITE_LIMIT_LENGTH</dt>
+** <dd>The maximum size of any string or BLOB or table row.<dd>)^
+**
+** ^(<dt>SQLITE_LIMIT_SQL_LENGTH</dt>
+** <dd>The maximum length of an SQL statement, in bytes.</dd>)^
+**
+** ^(<dt>SQLITE_LIMIT_COLUMN</dt>
+** <dd>The maximum number of columns in a table definition or in the
+** result set of a [SELECT] or the maximum number of columns in an index
+** or in an ORDER BY or GROUP BY clause.</dd>)^
+**
+** ^(<dt>SQLITE_LIMIT_EXPR_DEPTH</dt>
+** <dd>The maximum depth of the parse tree on any expression.</dd>)^
+**
+** ^(<dt>SQLITE_LIMIT_COMPOUND_SELECT</dt>
+** <dd>The maximum number of terms in a compound SELECT statement.</dd>)^
+**
+** ^(<dt>SQLITE_LIMIT_VDBE_OP</dt>
+** <dd>The maximum number of instructions in a virtual machine program
+** used to implement an SQL statement.</dd>)^
+**
+** ^(<dt>SQLITE_LIMIT_FUNCTION_ARG</dt>
+** <dd>The maximum number of arguments on a function.</dd>)^
+**
+** ^(<dt>SQLITE_LIMIT_ATTACHED</dt>
+** <dd>The maximum number of [ATTACH | attached databases].)^</dd>
+**
+** ^(<dt>SQLITE_LIMIT_LIKE_PATTERN_LENGTH</dt>
+** <dd>The maximum length of the pattern argument to the [LIKE] or
+** [GLOB] operators.</dd>)^
+**
+** ^(<dt>SQLITE_LIMIT_VARIABLE_NUMBER</dt>
+** <dd>The maximum number of variables in an SQL statement that can
+** be bound.</dd>)^
+**
+** ^(<dt>SQLITE_LIMIT_TRIGGER_DEPTH</dt>
+** <dd>The maximum depth of recursion for triggers.</dd>)^
+** </dl>
+*/
+#define SQLITE_LIMIT_LENGTH 0
+#define SQLITE_LIMIT_SQL_LENGTH 1
+#define SQLITE_LIMIT_COLUMN 2
+#define SQLITE_LIMIT_EXPR_DEPTH 3
+#define SQLITE_LIMIT_COMPOUND_SELECT 4
+#define SQLITE_LIMIT_VDBE_OP 5
+#define SQLITE_LIMIT_FUNCTION_ARG 6
+#define SQLITE_LIMIT_ATTACHED 7
+#define SQLITE_LIMIT_LIKE_PATTERN_LENGTH 8
+#define SQLITE_LIMIT_VARIABLE_NUMBER 9
+#define SQLITE_LIMIT_TRIGGER_DEPTH 10
+
+/*
+** CAPI3REF: Compiling An SQL Statement
+** KEYWORDS: {SQL statement compiler}
+**
+** To execute an SQL query, it must first be compiled into a byte-code
+** program using one of these routines.
+**
+** The first argument, "db", is a [database connection] obtained from a
+** prior successful call to [sqlite3_open()], [sqlite3_open_v2()] or
+** [sqlite3_open16()]. The database connection must not have been closed.
+**
+** The second argument, "zSql", is the statement to be compiled, encoded
+** as either UTF-8 or UTF-16. The sqlite3_prepare() and sqlite3_prepare_v2()
+** interfaces use UTF-8, and sqlite3_prepare16() and sqlite3_prepare16_v2()
+** use UTF-16.
+**
+** ^If the nByte argument is less than zero, then zSql is read up to the
+** first zero terminator. ^If nByte is non-negative, then it is the maximum
+** number of bytes read from zSql. ^When nByte is non-negative, the
+** zSql string ends at either the first '\000' or '\u0000' character or
+** the nByte-th byte, whichever comes first. If the caller knows
+** that the supplied string is nul-terminated, then there is a small
+** performance advantage to be gained by passing an nByte parameter that
+** is equal to the number of bytes in the input string <i>including</i>
+** the nul-terminator bytes.
+**
+** ^If pzTail is not NULL then *pzTail is made to point to the first byte
+** past the end of the first SQL statement in zSql. These routines only
+** compile the first statement in zSql, so *pzTail is left pointing to
+** what remains uncompiled.
+**
+** ^*ppStmt is left pointing to a compiled [prepared statement] that can be
+** executed using [sqlite3_step()]. ^If there is an error, *ppStmt is set
+** to NULL. ^If the input text contains no SQL (if the input is an empty
+** string or a comment) then *ppStmt is set to NULL.
+** The calling procedure is responsible for deleting the compiled
+** SQL statement using [sqlite3_finalize()] after it has finished with it.
+** ppStmt may not be NULL.
+**
+** ^On success, the sqlite3_prepare() family of routines return [SQLITE_OK];
+** otherwise an [error code] is returned.
+**
+** The sqlite3_prepare_v2() and sqlite3_prepare16_v2() interfaces are
+** recommended for all new programs. The two older interfaces are retained
+** for backwards compatibility, but their use is discouraged.
+** ^In the "v2" interfaces, the prepared statement
+** that is returned (the [sqlite3_stmt] object) contains a copy of the
+** original SQL text. This causes the [sqlite3_step()] interface to
+** behave differently in three ways:
+**
+** <ol>
+** <li>
+** ^If the database schema changes, instead of returning [SQLITE_SCHEMA] as it
+** always used to do, [sqlite3_step()] will automatically recompile the SQL
+** statement and try to run it again. ^If the schema has changed in
+** a way that makes the statement no longer valid, [sqlite3_step()] will still
+** return [SQLITE_SCHEMA]. But unlike the legacy behavior, [SQLITE_SCHEMA] is
+** now a fatal error. Calling [sqlite3_prepare_v2()] again will not make the
+** error go away. Note: use [sqlite3_errmsg()] to find the text
+** of the parsing error that results in an [SQLITE_SCHEMA] return.
+** </li>
+**
+** <li>
+** ^When an error occurs, [sqlite3_step()] will return one of the detailed
+** [error codes] or [extended error codes]. ^The legacy behavior was that
+** [sqlite3_step()] would only return a generic [SQLITE_ERROR] result code
+** and the application would have to make a second call to [sqlite3_reset()]
+** in order to find the underlying cause of the problem. With the "v2" prepare
+** interfaces, the underlying reason for the error is returned immediately.
+** </li>
+**
+** <li>
+** ^If the value of a [parameter | host parameter] in the WHERE clause might
+** change the query plan for a statement, then the statement may be
+** automatically recompiled (as if there had been a schema change) on the first
+** [sqlite3_step()] call following any change to the
+** [sqlite3_bind_text | bindings] of the [parameter].
+** </li>
+** </ol>
+*/
+SQLITE_API int sqlite3_prepare(
+ sqlite3 *db, /* Database handle */
+ const char *zSql, /* SQL statement, UTF-8 encoded */
+ int nByte, /* Maximum length of zSql in bytes. */
+ sqlite3_stmt **ppStmt, /* OUT: Statement handle */
+ const char **pzTail /* OUT: Pointer to unused portion of zSql */
+);
+SQLITE_API int sqlite3_prepare_v2(
+ sqlite3 *db, /* Database handle */
+ const char *zSql, /* SQL statement, UTF-8 encoded */
+ int nByte, /* Maximum length of zSql in bytes. */
+ sqlite3_stmt **ppStmt, /* OUT: Statement handle */
+ const char **pzTail /* OUT: Pointer to unused portion of zSql */
+);
+SQLITE_API int sqlite3_prepare16(
+ sqlite3 *db, /* Database handle */
+ const void *zSql, /* SQL statement, UTF-16 encoded */
+ int nByte, /* Maximum length of zSql in bytes. */
+ sqlite3_stmt **ppStmt, /* OUT: Statement handle */
+ const void **pzTail /* OUT: Pointer to unused portion of zSql */
+);
+SQLITE_API int sqlite3_prepare16_v2(
+ sqlite3 *db, /* Database handle */
+ const void *zSql, /* SQL statement, UTF-16 encoded */
+ int nByte, /* Maximum length of zSql in bytes. */
+ sqlite3_stmt **ppStmt, /* OUT: Statement handle */
+ const void **pzTail /* OUT: Pointer to unused portion of zSql */
+);
+
+/*
+** CAPI3REF: Retrieving Statement SQL
+**
+** ^This interface can be used to retrieve a saved copy of the original
+** SQL text used to create a [prepared statement] if that statement was
+** compiled using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()].
+*/
+SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt);
+
+/*
+** CAPI3REF: Dynamically Typed Value Object
+** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value}
+**
+** SQLite uses the sqlite3_value object to represent all values
+** that can be stored in a database table. SQLite uses dynamic typing
+** for the values it stores. ^Values stored in sqlite3_value objects
+** can be integers, floating point values, strings, BLOBs, or NULL.
+**
+** An sqlite3_value object may be either "protected" or "unprotected".
+** Some interfaces require a protected sqlite3_value. Other interfaces
+** will accept either a protected or an unprotected sqlite3_value.
+** Every interface that accepts sqlite3_value arguments specifies
+** whether or not it requires a protected sqlite3_value.
+**
+** The terms "protected" and "unprotected" refer to whether or not
+** a mutex is held. A internal mutex is held for a protected
+** sqlite3_value object but no mutex is held for an unprotected
+** sqlite3_value object. If SQLite is compiled to be single-threaded
+** (with [SQLITE_THREADSAFE=0] and with [sqlite3_threadsafe()] returning 0)
+** or if SQLite is run in one of reduced mutex modes
+** [SQLITE_CONFIG_SINGLETHREAD] or [SQLITE_CONFIG_MULTITHREAD]
+** then there is no distinction between protected and unprotected
+** sqlite3_value objects and they can be used interchangeably. However,
+** for maximum code portability it is recommended that applications
+** still make the distinction between between protected and unprotected
+** sqlite3_value objects even when not strictly required.
+**
+** ^The sqlite3_value objects that are passed as parameters into the
+** implementation of [application-defined SQL functions] are protected.
+** ^The sqlite3_value object returned by
+** [sqlite3_column_value()] is unprotected.
+** Unprotected sqlite3_value objects may only be used with
+** [sqlite3_result_value()] and [sqlite3_bind_value()].
+** The [sqlite3_value_blob | sqlite3_value_type()] family of
+** interfaces require protected sqlite3_value objects.
+*/
+typedef struct Mem sqlite3_value;
+
+/*
+** CAPI3REF: SQL Function Context Object
+**
+** The context in which an SQL function executes is stored in an
+** sqlite3_context object. ^A pointer to an sqlite3_context object
+** is always first parameter to [application-defined SQL functions].
+** The application-defined SQL function implementation will pass this
+** pointer through into calls to [sqlite3_result_int | sqlite3_result()],
+** [sqlite3_aggregate_context()], [sqlite3_user_data()],
+** [sqlite3_context_db_handle()], [sqlite3_get_auxdata()],
+** and/or [sqlite3_set_auxdata()].
+*/
+typedef struct sqlite3_context sqlite3_context;
+
+/*
+** CAPI3REF: Binding Values To Prepared Statements
+** KEYWORDS: {host parameter} {host parameters} {host parameter name}
+** KEYWORDS: {SQL parameter} {SQL parameters} {parameter binding}
+**
+** ^(In the SQL statement text input to [sqlite3_prepare_v2()] and its variants,
+** literals may be replaced by a [parameter] that matches one of following
+** templates:
+**
+** <ul>
+** <li> ?
+** <li> ?NNN
+** <li> :VVV
+** <li> @VVV
+** <li> $VVV
+** </ul>
+**
+** In the templates above, NNN represents an integer literal,
+** and VVV represents an alphanumeric identifer.)^ ^The values of these
+** parameters (also called "host parameter names" or "SQL parameters")
+** can be set using the sqlite3_bind_*() routines defined here.
+**
+** ^The first argument to the sqlite3_bind_*() routines is always
+** a pointer to the [sqlite3_stmt] object returned from
+** [sqlite3_prepare_v2()] or its variants.
+**
+** ^The second argument is the index of the SQL parameter to be set.
+** ^The leftmost SQL parameter has an index of 1. ^When the same named
+** SQL parameter is used more than once, second and subsequent
+** occurrences have the same index as the first occurrence.
+** ^The index for named parameters can be looked up using the
+** [sqlite3_bind_parameter_index()] API if desired. ^The index
+** for "?NNN" parameters is the value of NNN.
+** ^The NNN value must be between 1 and the [sqlite3_limit()]
+** parameter [SQLITE_LIMIT_VARIABLE_NUMBER] (default value: 999).
+**
+** ^The third argument is the value to bind to the parameter.
+**
+** ^(In those routines that have a fourth argument, its value is the
+** number of bytes in the parameter. To be clear: the value is the
+** number of <u>bytes</u> in the value, not the number of characters.)^
+** ^If the fourth parameter is negative, the length of the string is
+** the number of bytes up to the first zero terminator.
+**
+** ^The fifth argument to sqlite3_bind_blob(), sqlite3_bind_text(), and
+** sqlite3_bind_text16() is a destructor used to dispose of the BLOB or
+** string after SQLite has finished with it. ^If the fifth argument is
+** the special value [SQLITE_STATIC], then SQLite assumes that the
+** information is in static, unmanaged space and does not need to be freed.
+** ^If the fifth argument has the value [SQLITE_TRANSIENT], then
+** SQLite makes its own private copy of the data immediately, before
+** the sqlite3_bind_*() routine returns.
+**
+** ^The sqlite3_bind_zeroblob() routine binds a BLOB of length N that
+** is filled with zeroes. ^A zeroblob uses a fixed amount of memory
+** (just an integer to hold its size) while it is being processed.
+** Zeroblobs are intended to serve as placeholders for BLOBs whose
+** content is later written using
+** [sqlite3_blob_open | incremental BLOB I/O] routines.
+** ^A negative value for the zeroblob results in a zero-length BLOB.
+**
+** ^If any of the sqlite3_bind_*() routines are called with a NULL pointer
+** for the [prepared statement] or with a prepared statement for which
+** [sqlite3_step()] has been called more recently than [sqlite3_reset()],
+** then the call will return [SQLITE_MISUSE]. If any sqlite3_bind_()
+** routine is passed a [prepared statement] that has been finalized, the
+** result is undefined and probably harmful.
+**
+** ^Bindings are not cleared by the [sqlite3_reset()] routine.
+** ^Unbound parameters are interpreted as NULL.
+**
+** ^The sqlite3_bind_* routines return [SQLITE_OK] on success or an
+** [error code] if anything goes wrong.
+** ^[SQLITE_RANGE] is returned if the parameter
+** index is out of range. ^[SQLITE_NOMEM] is returned if malloc() fails.
+**
+** See also: [sqlite3_bind_parameter_count()],
+** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()].
+*/
+SQLITE_API int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
+SQLITE_API int sqlite3_bind_double(sqlite3_stmt*, int, double);
+SQLITE_API int sqlite3_bind_int(sqlite3_stmt*, int, int);
+SQLITE_API int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64);
+SQLITE_API int sqlite3_bind_null(sqlite3_stmt*, int);
+SQLITE_API int sqlite3_bind_text(sqlite3_stmt*, int, const char*, int n, void(*)(void*));
+SQLITE_API int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
+SQLITE_API int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
+SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
+
+/*
+** CAPI3REF: Number Of SQL Parameters
+**
+** ^This routine can be used to find the number of [SQL parameters]
+** in a [prepared statement]. SQL parameters are tokens of the
+** form "?", "?NNN", ":AAA", "$AAA", or "@AAA" that serve as
+** placeholders for values that are [sqlite3_bind_blob | bound]
+** to the parameters at a later time.
+**
+** ^(This routine actually returns the index of the largest (rightmost)
+** parameter. For all forms except ?NNN, this will correspond to the
+** number of unique parameters. If parameters of the ?NNN form are used,
+** there may be gaps in the list.)^
+**
+** See also: [sqlite3_bind_blob|sqlite3_bind()],
+** [sqlite3_bind_parameter_name()], and
+** [sqlite3_bind_parameter_index()].
+*/
+SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt*);
+
+/*
+** CAPI3REF: Name Of A Host Parameter
+**
+** ^The sqlite3_bind_parameter_name(P,N) interface returns
+** the name of the N-th [SQL parameter] in the [prepared statement] P.
+** ^(SQL parameters of the form "?NNN" or ":AAA" or "@AAA" or "$AAA"
+** have a name which is the string "?NNN" or ":AAA" or "@AAA" or "$AAA"
+** respectively.
+** In other words, the initial ":" or "$" or "@" or "?"
+** is included as part of the name.)^
+** ^Parameters of the form "?" without a following integer have no name
+** and are referred to as "nameless" or "anonymous parameters".
+**
+** ^The first host parameter has an index of 1, not 0.
+**
+** ^If the value N is out of range or if the N-th parameter is
+** nameless, then NULL is returned. ^The returned string is
+** always in UTF-8 encoding even if the named parameter was
+** originally specified as UTF-16 in [sqlite3_prepare16()] or
+** [sqlite3_prepare16_v2()].
+**
+** See also: [sqlite3_bind_blob|sqlite3_bind()],
+** [sqlite3_bind_parameter_count()], and
+** [sqlite3_bind_parameter_index()].
+*/
+SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int);
+
+/*
+** CAPI3REF: Index Of A Parameter With A Given Name
+**
+** ^Return the index of an SQL parameter given its name. ^The
+** index value returned is suitable for use as the second
+** parameter to [sqlite3_bind_blob|sqlite3_bind()]. ^A zero
+** is returned if no matching parameter is found. ^The parameter
+** name must be given in UTF-8 even if the original statement
+** was prepared from UTF-16 text using [sqlite3_prepare16_v2()].
+**
+** See also: [sqlite3_bind_blob|sqlite3_bind()],
+** [sqlite3_bind_parameter_count()], and
+** [sqlite3_bind_parameter_index()].
+*/
+SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);
+
+/*
+** CAPI3REF: Reset All Bindings On A Prepared Statement
+**
+** ^Contrary to the intuition of many, [sqlite3_reset()] does not reset
+** the [sqlite3_bind_blob | bindings] on a [prepared statement].
+** ^Use this routine to reset all host parameters to NULL.
+*/
+SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*);
+
+/*
+** CAPI3REF: Number Of Columns In A Result Set
+**
+** ^Return the number of columns in the result set returned by the
+** [prepared statement]. ^This routine returns 0 if pStmt is an SQL
+** statement that does not return data (for example an [UPDATE]).
+*/
+SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt);
+
+/*
+** CAPI3REF: Column Names In A Result Set
+**
+** ^These routines return the name assigned to a particular column
+** in the result set of a [SELECT] statement. ^The sqlite3_column_name()
+** interface returns a pointer to a zero-terminated UTF-8 string
+** and sqlite3_column_name16() returns a pointer to a zero-terminated
+** UTF-16 string. ^The first parameter is the [prepared statement]
+** that implements the [SELECT] statement. ^The second parameter is the
+** column number. ^The leftmost column is number 0.
+**
+** ^The returned string pointer is valid until either the [prepared statement]
+** is destroyed by [sqlite3_finalize()] or until the next call to
+** sqlite3_column_name() or sqlite3_column_name16() on the same column.
+**
+** ^If sqlite3_malloc() fails during the processing of either routine
+** (for example during a conversion from UTF-8 to UTF-16) then a
+** NULL pointer is returned.
+**
+** ^The name of a result column is the value of the "AS" clause for
+** that column, if there is an AS clause. If there is no AS clause
+** then the name of the column is unspecified and may change from
+** one release of SQLite to the next.
+*/
+SQLITE_API const char *sqlite3_column_name(sqlite3_stmt*, int N);
+SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N);
+
+/*
+** CAPI3REF: Source Of Data In A Query Result
+**
+** ^These routines provide a means to determine the database, table, and
+** table column that is the origin of a particular result column in
+** [SELECT] statement.
+** ^The name of the database or table or column can be returned as
+** either a UTF-8 or UTF-16 string. ^The _database_ routines return
+** the database name, the _table_ routines return the table name, and
+** the origin_ routines return the column name.
+** ^The returned string is valid until the [prepared statement] is destroyed
+** using [sqlite3_finalize()] or until the same information is requested
+** again in a different encoding.
+**
+** ^The names returned are the original un-aliased names of the
+** database, table, and column.
+**
+** ^The first argument to these interfaces is a [prepared statement].
+** ^These functions return information about the Nth result column returned by
+** the statement, where N is the second function argument.
+** ^The left-most column is column 0 for these routines.
+**
+** ^If the Nth column returned by the statement is an expression or
+** subquery and is not a column value, then all of these functions return
+** NULL. ^These routine might also return NULL if a memory allocation error
+** occurs. ^Otherwise, they return the name of the attached database, table,
+** or column that query result column was extracted from.
+**
+** ^As with all other SQLite APIs, those whose names end with "16" return
+** UTF-16 encoded strings and the other functions return UTF-8.
+**
+** ^These APIs are only available if the library was compiled with the
+** [SQLITE_ENABLE_COLUMN_METADATA] C-preprocessor symbol.
+**
+** If two or more threads call one or more of these routines against the same
+** prepared statement and column at the same time then the results are
+** undefined.
+**
+** If two or more threads call one or more
+** [sqlite3_column_database_name | column metadata interfaces]
+** for the same [prepared statement] and result column
+** at the same time then the results are undefined.
+*/
+SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt*,int);
+SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt*,int);
+SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt*,int);
+SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt*,int);
+SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt*,int);
+SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt*,int);
+
+/*
+** CAPI3REF: Declared Datatype Of A Query Result
+**
+** ^(The first parameter is a [prepared statement].
+** If this statement is a [SELECT] statement and the Nth column of the
+** returned result set of that [SELECT] is a table column (not an
+** expression or subquery) then the declared type of the table
+** column is returned.)^ ^If the Nth column of the result set is an
+** expression or subquery, then a NULL pointer is returned.
+** ^The returned string is always UTF-8 encoded.
+**
+** ^(For example, given the database schema:
+**
+** CREATE TABLE t1(c1 VARIANT);
+**
+** and the following statement to be compiled:
+**
+** SELECT c1 + 1, c1 FROM t1;
+**
+** this routine would return the string "VARIANT" for the second result
+** column (i==1), and a NULL pointer for the first result column (i==0).)^
+**
+** ^SQLite uses dynamic run-time typing. ^So just because a column
+** is declared to contain a particular type does not mean that the
+** data stored in that column is of the declared type. SQLite is
+** strongly typed, but the typing is dynamic not static. ^Type
+** is associated with individual values, not with the containers
+** used to hold those values.
+*/
+SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt*,int);
+SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int);
+
+/*
+** CAPI3REF: Evaluate An SQL Statement
+**
+** After a [prepared statement] has been prepared using either
+** [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] or one of the legacy
+** interfaces [sqlite3_prepare()] or [sqlite3_prepare16()], this function
+** must be called one or more times to evaluate the statement.
+**
+** The details of the behavior of the sqlite3_step() interface depend
+** on whether the statement was prepared using the newer "v2" interface
+** [sqlite3_prepare_v2()] and [sqlite3_prepare16_v2()] or the older legacy
+** interface [sqlite3_prepare()] and [sqlite3_prepare16()]. The use of the
+** new "v2" interface is recommended for new applications but the legacy
+** interface will continue to be supported.
+**
+** ^In the legacy interface, the return value will be either [SQLITE_BUSY],
+** [SQLITE_DONE], [SQLITE_ROW], [SQLITE_ERROR], or [SQLITE_MISUSE].
+** ^With the "v2" interface, any of the other [result codes] or
+** [extended result codes] might be returned as well.
+**
+** ^[SQLITE_BUSY] means that the database engine was unable to acquire the
+** database locks it needs to do its job. ^If the statement is a [COMMIT]
+** or occurs outside of an explicit transaction, then you can retry the
+** statement. If the statement is not a [COMMIT] and occurs within a
+** explicit transaction then you should rollback the transaction before
+** continuing.
+**
+** ^[SQLITE_DONE] means that the statement has finished executing
+** successfully. sqlite3_step() should not be called again on this virtual
+** machine without first calling [sqlite3_reset()] to reset the virtual
+** machine back to its initial state.
+**
+** ^If the SQL statement being executed returns any data, then [SQLITE_ROW]
+** is returned each time a new row of data is ready for processing by the
+** caller. The values may be accessed using the [column access functions].
+** sqlite3_step() is called again to retrieve the next row of data.
+**
+** ^[SQLITE_ERROR] means that a run-time error (such as a constraint
+** violation) has occurred. sqlite3_step() should not be called again on
+** the VM. More information may be found by calling [sqlite3_errmsg()].
+** ^With the legacy interface, a more specific error code (for example,
+** [SQLITE_INTERRUPT], [SQLITE_SCHEMA], [SQLITE_CORRUPT], and so forth)
+** can be obtained by calling [sqlite3_reset()] on the
+** [prepared statement]. ^In the "v2" interface,
+** the more specific error code is returned directly by sqlite3_step().
+**
+** [SQLITE_MISUSE] means that the this routine was called inappropriately.
+** Perhaps it was called on a [prepared statement] that has
+** already been [sqlite3_finalize | finalized] or on one that had
+** previously returned [SQLITE_ERROR] or [SQLITE_DONE]. Or it could
+** be the case that the same database connection is being used by two or
+** more threads at the same moment in time.
+**
+** <b>Goofy Interface Alert:</b> In the legacy interface, the sqlite3_step()
+** API always returns a generic error code, [SQLITE_ERROR], following any
+** error other than [SQLITE_BUSY] and [SQLITE_MISUSE]. You must call
+** [sqlite3_reset()] or [sqlite3_finalize()] in order to find one of the
+** specific [error codes] that better describes the error.
+** We admit that this is a goofy design. The problem has been fixed
+** with the "v2" interface. If you prepare all of your SQL statements
+** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead
+** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces,
+** then the more specific [error codes] are returned directly
+** by sqlite3_step(). The use of the "v2" interface is recommended.
+*/
+SQLITE_API int sqlite3_step(sqlite3_stmt*);
+
+/*
+** CAPI3REF: Number of columns in a result set
+**
+** ^The sqlite3_data_count(P) the number of columns in the
+** of the result set of [prepared statement] P.
+*/
+SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt);
+
+/*
+** CAPI3REF: Fundamental Datatypes
+** KEYWORDS: SQLITE_TEXT
+**
+** ^(Every value in SQLite has one of five fundamental datatypes:
+**
+** <ul>
+** <li> 64-bit signed integer
+** <li> 64-bit IEEE floating point number
+** <li> string
+** <li> BLOB
+** <li> NULL
+** </ul>)^
+**
+** These constants are codes for each of those types.
+**
+** Note that the SQLITE_TEXT constant was also used in SQLite version 2
+** for a completely different meaning. Software that links against both
+** SQLite version 2 and SQLite version 3 should use SQLITE3_TEXT, not
+** SQLITE_TEXT.
+*/
+#define SQLITE_INTEGER 1
+#define SQLITE_FLOAT 2
+#define SQLITE_BLOB 4
+#define SQLITE_NULL 5
+#ifdef SQLITE_TEXT
+# undef SQLITE_TEXT
+#else
+# define SQLITE_TEXT 3
+#endif
+#define SQLITE3_TEXT 3
+
+/*
+** CAPI3REF: Result Values From A Query
+** KEYWORDS: {column access functions}
+**
+** These routines form the "result set" interface.
+**
+** ^These routines return information about a single column of the current
+** result row of a query. ^In every case the first argument is a pointer
+** to the [prepared statement] that is being evaluated (the [sqlite3_stmt*]
+** that was returned from [sqlite3_prepare_v2()] or one of its variants)
+** and the second argument is the index of the column for which information
+** should be returned. ^The leftmost column of the result set has the index 0.
+** ^The number of columns in the result can be determined using
+** [sqlite3_column_count()].
+**
+** If the SQL statement does not currently point to a valid row, or if the
+** column index is out of range, the result is undefined.
+** These routines may only be called when the most recent call to
+** [sqlite3_step()] has returned [SQLITE_ROW] and neither
+** [sqlite3_reset()] nor [sqlite3_finalize()] have been called subsequently.
+** If any of these routines are called after [sqlite3_reset()] or
+** [sqlite3_finalize()] or after [sqlite3_step()] has returned
+** something other than [SQLITE_ROW], the results are undefined.
+** If [sqlite3_step()] or [sqlite3_reset()] or [sqlite3_finalize()]
+** are called from a different thread while any of these routines
+** are pending, then the results are undefined.
+**
+** ^The sqlite3_column_type() routine returns the
+** [SQLITE_INTEGER | datatype code] for the initial data type
+** of the result column. ^The returned value is one of [SQLITE_INTEGER],
+** [SQLITE_FLOAT], [SQLITE_TEXT], [SQLITE_BLOB], or [SQLITE_NULL]. The value
+** returned by sqlite3_column_type() is only meaningful if no type
+** conversions have occurred as described below. After a type conversion,
+** the value returned by sqlite3_column_type() is undefined. Future
+** versions of SQLite may change the behavior of sqlite3_column_type()
+** following a type conversion.
+**
+** ^If the result is a BLOB or UTF-8 string then the sqlite3_column_bytes()
+** routine returns the number of bytes in that BLOB or string.
+** ^If the result is a UTF-16 string, then sqlite3_column_bytes() converts
+** the string to UTF-8 and then returns the number of bytes.
+** ^If the result is a numeric value then sqlite3_column_bytes() uses
+** [sqlite3_snprintf()] to convert that value to a UTF-8 string and returns
+** the number of bytes in that string.
+** ^The value returned does not include the zero terminator at the end
+** of the string. ^For clarity: the value returned is the number of
+** bytes in the string, not the number of characters.
+**
+** ^Strings returned by sqlite3_column_text() and sqlite3_column_text16(),
+** even empty strings, are always zero terminated. ^The return
+** value from sqlite3_column_blob() for a zero-length BLOB is an arbitrary
+** pointer, possibly even a NULL pointer.
+**
+** ^The sqlite3_column_bytes16() routine is similar to sqlite3_column_bytes()
+** but leaves the result in UTF-16 in native byte order instead of UTF-8.
+** ^The zero terminator is not included in this count.
+**
+** ^The object returned by [sqlite3_column_value()] is an
+** [unprotected sqlite3_value] object. An unprotected sqlite3_value object
+** may only be used with [sqlite3_bind_value()] and [sqlite3_result_value()].
+** If the [unprotected sqlite3_value] object returned by
+** [sqlite3_column_value()] is used in any other way, including calls
+** to routines like [sqlite3_value_int()], [sqlite3_value_text()],
+** or [sqlite3_value_bytes()], then the behavior is undefined.
+**
+** These routines attempt to convert the value where appropriate. ^For
+** example, if the internal representation is FLOAT and a text result
+** is requested, [sqlite3_snprintf()] is used internally to perform the
+** conversion automatically. ^(The following table details the conversions
+** that are applied:
+**
+** <blockquote>
+** <table border="1">
+** <tr><th> Internal<br>Type <th> Requested<br>Type <th> Conversion
+**
+** <tr><td> NULL <td> INTEGER <td> Result is 0
+** <tr><td> NULL <td> FLOAT <td> Result is 0.0
+** <tr><td> NULL <td> TEXT <td> Result is NULL pointer
+** <tr><td> NULL <td> BLOB <td> Result is NULL pointer
+** <tr><td> INTEGER <td> FLOAT <td> Convert from integer to float
+** <tr><td> INTEGER <td> TEXT <td> ASCII rendering of the integer
+** <tr><td> INTEGER <td> BLOB <td> Same as INTEGER->TEXT
+** <tr><td> FLOAT <td> INTEGER <td> Convert from float to integer
+** <tr><td> FLOAT <td> TEXT <td> ASCII rendering of the float
+** <tr><td> FLOAT <td> BLOB <td> Same as FLOAT->TEXT
+** <tr><td> TEXT <td> INTEGER <td> Use atoi()
+** <tr><td> TEXT <td> FLOAT <td> Use atof()
+** <tr><td> TEXT <td> BLOB <td> No change
+** <tr><td> BLOB <td> INTEGER <td> Convert to TEXT then use atoi()
+** <tr><td> BLOB <td> FLOAT <td> Convert to TEXT then use atof()
+** <tr><td> BLOB <td> TEXT <td> Add a zero terminator if needed
+** </table>
+** </blockquote>)^
+**
+** The table above makes reference to standard C library functions atoi()
+** and atof(). SQLite does not really use these functions. It has its
+** own equivalent internal routines. The atoi() and atof() names are
+** used in the table for brevity and because they are familiar to most
+** C programmers.
+**
+** ^Note that when type conversions occur, pointers returned by prior
+** calls to sqlite3_column_blob(), sqlite3_column_text(), and/or
+** sqlite3_column_text16() may be invalidated.
+** ^(Type conversions and pointer invalidations might occur
+** in the following cases:
+**
+** <ul>
+** <li> The initial content is a BLOB and sqlite3_column_text() or
+** sqlite3_column_text16() is called. A zero-terminator might
+** need to be added to the string.</li>
+** <li> The initial content is UTF-8 text and sqlite3_column_bytes16() or
+** sqlite3_column_text16() is called. The content must be converted
+** to UTF-16.</li>
+** <li> The initial content is UTF-16 text and sqlite3_column_bytes() or
+** sqlite3_column_text() is called. The content must be converted
+** to UTF-8.</li>
+** </ul>)^
+**
+** ^Conversions between UTF-16be and UTF-16le are always done in place and do
+** not invalidate a prior pointer, though of course the content of the buffer
+** that the prior pointer points to will have been modified. Other kinds
+** of conversion are done in place when it is possible, but sometimes they
+** are not possible and in those cases prior pointers are invalidated.
+**
+** ^(The safest and easiest to remember policy is to invoke these routines
+** in one of the following ways:
+**
+** <ul>
+** <li>sqlite3_column_text() followed by sqlite3_column_bytes()</li>
+** <li>sqlite3_column_blob() followed by sqlite3_column_bytes()</li>
+** <li>sqlite3_column_text16() followed by sqlite3_column_bytes16()</li>
+** </ul>)^
+**
+** In other words, you should call sqlite3_column_text(),
+** sqlite3_column_blob(), or sqlite3_column_text16() first to force the result
+** into the desired format, then invoke sqlite3_column_bytes() or
+** sqlite3_column_bytes16() to find the size of the result. Do not mix calls
+** to sqlite3_column_text() or sqlite3_column_blob() with calls to
+** sqlite3_column_bytes16(), and do not mix calls to sqlite3_column_text16()
+** with calls to sqlite3_column_bytes().
+**
+** ^The pointers returned are valid until a type conversion occurs as
+** described above, or until [sqlite3_step()] or [sqlite3_reset()] or
+** [sqlite3_finalize()] is called. ^The memory space used to hold strings
+** and BLOBs is freed automatically. Do <b>not</b> pass the pointers returned
+** [sqlite3_column_blob()], [sqlite3_column_text()], etc. into
+** [sqlite3_free()].
+**
+** ^(If a memory allocation error occurs during the evaluation of any
+** of these routines, a default value is returned. The default value
+** is either the integer 0, the floating point number 0.0, or a NULL
+** pointer. Subsequent calls to [sqlite3_errcode()] will return
+** [SQLITE_NOMEM].)^
+*/
+SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt*, int iCol);
+SQLITE_API int sqlite3_column_bytes(sqlite3_stmt*, int iCol);
+SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt*, int iCol);
+SQLITE_API double sqlite3_column_double(sqlite3_stmt*, int iCol);
+SQLITE_API int sqlite3_column_int(sqlite3_stmt*, int iCol);
+SQLITE_API sqlite3_int64 sqlite3_column_int64(sqlite3_stmt*, int iCol);
+SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol);
+SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt*, int iCol);
+SQLITE_API int sqlite3_column_type(sqlite3_stmt*, int iCol);
+SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol);
+
+/*
+** CAPI3REF: Destroy A Prepared Statement Object
+**
+** ^The sqlite3_finalize() function is called to delete a [prepared statement].
+** ^If the statement was executed successfully or not executed at all, then
+** SQLITE_OK is returned. ^If execution of the statement failed then an
+** [error code] or [extended error code] is returned.
+**
+** ^This routine can be called at any point during the execution of the
+** [prepared statement]. ^If the virtual machine has not
+** completed execution when this routine is called, that is like
+** encountering an error or an [sqlite3_interrupt | interrupt].
+** ^Incomplete updates may be rolled back and transactions canceled,
+** depending on the circumstances, and the
+** [error code] returned will be [SQLITE_ABORT].
+*/
+SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt);
+
+/*
+** CAPI3REF: Reset A Prepared Statement Object
+**
+** The sqlite3_reset() function is called to reset a [prepared statement]
+** object back to its initial state, ready to be re-executed.
+** ^Any SQL statement variables that had values bound to them using
+** the [sqlite3_bind_blob | sqlite3_bind_*() API] retain their values.
+** Use [sqlite3_clear_bindings()] to reset the bindings.
+**
+** ^The [sqlite3_reset(S)] interface resets the [prepared statement] S
+** back to the beginning of its program.
+**
+** ^If the most recent call to [sqlite3_step(S)] for the
+** [prepared statement] S returned [SQLITE_ROW] or [SQLITE_DONE],
+** or if [sqlite3_step(S)] has never before been called on S,
+** then [sqlite3_reset(S)] returns [SQLITE_OK].
+**
+** ^If the most recent call to [sqlite3_step(S)] for the
+** [prepared statement] S indicated an error, then
+** [sqlite3_reset(S)] returns an appropriate [error code].
+**
+** ^The [sqlite3_reset(S)] interface does not change the values
+** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S.
+*/
+SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
+
+/*
+** CAPI3REF: Create Or Redefine SQL Functions
+** KEYWORDS: {function creation routines}
+** KEYWORDS: {application-defined SQL function}
+** KEYWORDS: {application-defined SQL functions}
+**
+** ^These two functions (collectively known as "function creation routines")
+** are used to add SQL functions or aggregates or to redefine the behavior
+** of existing SQL functions or aggregates. The only difference between the
+** two is that the second parameter, the name of the (scalar) function or
+** aggregate, is encoded in UTF-8 for sqlite3_create_function() and UTF-16
+** for sqlite3_create_function16().
+**
+** ^The first parameter is the [database connection] to which the SQL
+** function is to be added. ^If an application uses more than one database
+** connection then application-defined SQL functions must be added
+** to each database connection separately.
+**
+** The second parameter is the name of the SQL function to be created or
+** redefined. ^The length of the name is limited to 255 bytes, exclusive of
+** the zero-terminator. Note that the name length limit is in bytes, not
+** characters. ^Any attempt to create a function with a longer name
+** will result in [SQLITE_ERROR] being returned.
+**
+** ^The third parameter (nArg)
+** is the number of arguments that the SQL function or
+** aggregate takes. ^If this parameter is -1, then the SQL function or
+** aggregate may take any number of arguments between 0 and the limit
+** set by [sqlite3_limit]([SQLITE_LIMIT_FUNCTION_ARG]). If the third
+** parameter is less than -1 or greater than 127 then the behavior is
+** undefined.
+**
+** The fourth parameter, eTextRep, specifies what
+** [SQLITE_UTF8 | text encoding] this SQL function prefers for
+** its parameters. Any SQL function implementation should be able to work
+** work with UTF-8, UTF-16le, or UTF-16be. But some implementations may be
+** more efficient with one encoding than another. ^An application may
+** invoke sqlite3_create_function() or sqlite3_create_function16() multiple
+** times with the same function but with different values of eTextRep.
+** ^When multiple implementations of the same function are available, SQLite
+** will pick the one that involves the least amount of data conversion.
+** If there is only a single implementation which does not care what text
+** encoding is used, then the fourth argument should be [SQLITE_ANY].
+**
+** ^(The fifth parameter is an arbitrary pointer. The implementation of the
+** function can gain access to this pointer using [sqlite3_user_data()].)^
+**
+** The seventh, eighth and ninth parameters, xFunc, xStep and xFinal, are
+** pointers to C-language functions that implement the SQL function or
+** aggregate. ^A scalar SQL function requires an implementation of the xFunc
+** callback only; NULL pointers should be passed as the xStep and xFinal
+** parameters. ^An aggregate SQL function requires an implementation of xStep
+** and xFinal and NULL should be passed for xFunc. ^To delete an existing
+** SQL function or aggregate, pass NULL for all three function callbacks.
+**
+** ^It is permitted to register multiple implementations of the same
+** functions with the same name but with either differing numbers of
+** arguments or differing preferred text encodings. ^SQLite will use
+** the implementation that most closely matches the way in which the
+** SQL function is used. ^A function implementation with a non-negative
+** nArg parameter is a better match than a function implementation with
+** a negative nArg. ^A function where the preferred text encoding
+** matches the database encoding is a better
+** match than a function where the encoding is different.
+** ^A function where the encoding difference is between UTF16le and UTF16be
+** is a closer match than a function where the encoding difference is
+** between UTF8 and UTF16.
+**
+** ^Built-in functions may be overloaded by new application-defined functions.
+** ^The first application-defined function with a given name overrides all
+** built-in functions in the same [database connection] with the same name.
+** ^Subsequent application-defined functions of the same name only override
+** prior application-defined functions that are an exact match for the
+** number of parameters and preferred encoding.
+**
+** ^An application-defined function is permitted to call other
+** SQLite interfaces. However, such calls must not
+** close the database connection nor finalize or reset the prepared
+** statement in which the function is running.
+*/
+SQLITE_API int sqlite3_create_function(
+ sqlite3 *db,
+ const char *zFunctionName,
+ int nArg,
+ int eTextRep,
+ void *pApp,
+ void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
+ void (*xStep)(sqlite3_context*,int,sqlite3_value**),
+ void (*xFinal)(sqlite3_context*)
+);
+SQLITE_API int sqlite3_create_function16(
+ sqlite3 *db,
+ const void *zFunctionName,
+ int nArg,
+ int eTextRep,
+ void *pApp,
+ void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
+ void (*xStep)(sqlite3_context*,int,sqlite3_value**),
+ void (*xFinal)(sqlite3_context*)
+);
+
+/*
+** CAPI3REF: Text Encodings
+**
+** These constant define integer codes that represent the various
+** text encodings supported by SQLite.
+*/
+#define SQLITE_UTF8 1
+#define SQLITE_UTF16LE 2
+#define SQLITE_UTF16BE 3
+#define SQLITE_UTF16 4 /* Use native byte order */
+#define SQLITE_ANY 5 /* sqlite3_create_function only */
+#define SQLITE_UTF16_ALIGNED 8 /* sqlite3_create_collation only */
+
+/*
+** CAPI3REF: Deprecated Functions
+** DEPRECATED
+**
+** These functions are [deprecated]. In order to maintain
+** backwards compatibility with older code, these functions continue
+** to be supported. However, new applications should avoid
+** the use of these functions. To help encourage people to avoid
+** using these functions, we are not going to tell you what they do.
+*/
+#ifndef SQLITE_OMIT_DEPRECATED
+SQLITE_API SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*);
+SQLITE_API SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*);
+SQLITE_API SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
+SQLITE_API SQLITE_DEPRECATED int sqlite3_global_recover(void);
+SQLITE_API SQLITE_DEPRECATED void sqlite3_thread_cleanup(void);
+SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),void*,sqlite3_int64);
+#endif
+
+/*
+** CAPI3REF: Obtaining SQL Function Parameter Values
+**
+** The C-language implementation of SQL functions and aggregates uses
+** this set of interface routines to access the parameter values on
+** the function or aggregate.
+**
+** The xFunc (for scalar functions) or xStep (for aggregates) parameters
+** to [sqlite3_create_function()] and [sqlite3_create_function16()]
+** define callbacks that implement the SQL functions and aggregates.
+** The 4th parameter to these callbacks is an array of pointers to
+** [protected sqlite3_value] objects. There is one [sqlite3_value] object for
+** each parameter to the SQL function. These routines are used to
+** extract values from the [sqlite3_value] objects.
+**
+** These routines work only with [protected sqlite3_value] objects.
+** Any attempt to use these routines on an [unprotected sqlite3_value]
+** object results in undefined behavior.
+**
+** ^These routines work just like the corresponding [column access functions]
+** except that these routines take a single [protected sqlite3_value] object
+** pointer instead of a [sqlite3_stmt*] pointer and an integer column number.
+**
+** ^The sqlite3_value_text16() interface extracts a UTF-16 string
+** in the native byte-order of the host machine. ^The
+** sqlite3_value_text16be() and sqlite3_value_text16le() interfaces
+** extract UTF-16 strings as big-endian and little-endian respectively.
+**
+** ^(The sqlite3_value_numeric_type() interface attempts to apply
+** numeric affinity to the value. This means that an attempt is
+** made to convert the value to an integer or floating point. If
+** such a conversion is possible without loss of information (in other
+** words, if the value is a string that looks like a number)
+** then the conversion is performed. Otherwise no conversion occurs.
+** The [SQLITE_INTEGER | datatype] after conversion is returned.)^
+**
+** Please pay particular attention to the fact that the pointer returned
+** from [sqlite3_value_blob()], [sqlite3_value_text()], or
+** [sqlite3_value_text16()] can be invalidated by a subsequent call to
+** [sqlite3_value_bytes()], [sqlite3_value_bytes16()], [sqlite3_value_text()],
+** or [sqlite3_value_text16()].
+**
+** These routines must be called from the same thread as
+** the SQL function that supplied the [sqlite3_value*] parameters.
+*/
+SQLITE_API const void *sqlite3_value_blob(sqlite3_value*);
+SQLITE_API int sqlite3_value_bytes(sqlite3_value*);
+SQLITE_API int sqlite3_value_bytes16(sqlite3_value*);
+SQLITE_API double sqlite3_value_double(sqlite3_value*);
+SQLITE_API int sqlite3_value_int(sqlite3_value*);
+SQLITE_API sqlite3_int64 sqlite3_value_int64(sqlite3_value*);
+SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value*);
+SQLITE_API const void *sqlite3_value_text16(sqlite3_value*);
+SQLITE_API const void *sqlite3_value_text16le(sqlite3_value*);
+SQLITE_API const void *sqlite3_value_text16be(sqlite3_value*);
+SQLITE_API int sqlite3_value_type(sqlite3_value*);
+SQLITE_API int sqlite3_value_numeric_type(sqlite3_value*);
+
+/*
+** CAPI3REF: Obtain Aggregate Function Context
+**
+** Implementions of aggregate SQL functions use this
+** routine to allocate memory for storing their state.
+**
+** ^The first time the sqlite3_aggregate_context(C,N) routine is called
+** for a particular aggregate function, SQLite
+** allocates N of memory, zeroes out that memory, and returns a pointer
+** to the new memory. ^On second and subsequent calls to
+** sqlite3_aggregate_context() for the same aggregate function instance,
+** the same buffer is returned. Sqlite3_aggregate_context() is normally
+** called once for each invocation of the xStep callback and then one
+** last time when the xFinal callback is invoked. ^(When no rows match
+** an aggregate query, the xStep() callback of the aggregate function
+** implementation is never called and xFinal() is called exactly once.
+** In those cases, sqlite3_aggregate_context() might be called for the
+** first time from within xFinal().)^
+**
+** ^The sqlite3_aggregate_context(C,N) routine returns a NULL pointer if N is
+** less than or equal to zero or if a memory allocate error occurs.
+**
+** ^(The amount of space allocated by sqlite3_aggregate_context(C,N) is
+** determined by the N parameter on first successful call. Changing the
+** value of N in subsequent call to sqlite3_aggregate_context() within
+** the same aggregate function instance will not resize the memory
+** allocation.)^
+**
+** ^SQLite automatically frees the memory allocated by
+** sqlite3_aggregate_context() when the aggregate query concludes.
+**
+** The first parameter must be a copy of the
+** [sqlite3_context | SQL function context] that is the first parameter
+** to the xStep or xFinal callback routine that implements the aggregate
+** function.
+**
+** This routine must be called from the same thread in which
+** the aggregate SQL function is running.
+*/
+SQLITE_API void *sqlite3_aggregate_context(sqlite3_context*, int nBytes);
+
+/*
+** CAPI3REF: User Data For Functions
+**
+** ^The sqlite3_user_data() interface returns a copy of
+** the pointer that was the pUserData parameter (the 5th parameter)
+** of the [sqlite3_create_function()]
+** and [sqlite3_create_function16()] routines that originally
+** registered the application defined function.
+**
+** This routine must be called from the same thread in which
+** the application-defined function is running.
+*/
+SQLITE_API void *sqlite3_user_data(sqlite3_context*);
+
+/*
+** CAPI3REF: Database Connection For Functions
+**
+** ^The sqlite3_context_db_handle() interface returns a copy of
+** the pointer to the [database connection] (the 1st parameter)
+** of the [sqlite3_create_function()]
+** and [sqlite3_create_function16()] routines that originally
+** registered the application defined function.
+*/
+SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*);
+
+/*
+** CAPI3REF: Function Auxiliary Data
+**
+** The following two functions may be used by scalar SQL functions to
+** associate metadata with argument values. If the same value is passed to
+** multiple invocations of the same SQL function during query execution, under
+** some circumstances the associated metadata may be preserved. This may
+** be used, for example, to add a regular-expression matching scalar
+** function. The compiled version of the regular expression is stored as
+** metadata associated with the SQL value passed as the regular expression
+** pattern. The compiled regular expression can be reused on multiple
+** invocations of the same function so that the original pattern string
+** does not need to be recompiled on each invocation.
+**
+** ^The sqlite3_get_auxdata() interface returns a pointer to the metadata
+** associated by the sqlite3_set_auxdata() function with the Nth argument
+** value to the application-defined function. ^If no metadata has been ever
+** been set for the Nth argument of the function, or if the corresponding
+** function parameter has changed since the meta-data was set,
+** then sqlite3_get_auxdata() returns a NULL pointer.
+**
+** ^The sqlite3_set_auxdata() interface saves the metadata
+** pointed to by its 3rd parameter as the metadata for the N-th
+** argument of the application-defined function. Subsequent
+** calls to sqlite3_get_auxdata() might return this data, if it has
+** not been destroyed.
+** ^If it is not NULL, SQLite will invoke the destructor
+** function given by the 4th parameter to sqlite3_set_auxdata() on
+** the metadata when the corresponding function parameter changes
+** or when the SQL statement completes, whichever comes first.
+**
+** SQLite is free to call the destructor and drop metadata on any
+** parameter of any function at any time. ^The only guarantee is that
+** the destructor will be called before the metadata is dropped.
+**
+** ^(In practice, metadata is preserved between function calls for
+** expressions that are constant at compile time. This includes literal
+** values and [parameters].)^
+**
+** These routines must be called from the same thread in which
+** the SQL function is running.
+*/
+SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N);
+SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*));
+
+
+/*
+** CAPI3REF: Constants Defining Special Destructor Behavior
+**
+** These are special values for the destructor that is passed in as the
+** final argument to routines like [sqlite3_result_blob()]. ^If the destructor
+** argument is SQLITE_STATIC, it means that the content pointer is constant
+** and will never change. It does not need to be destroyed. ^The
+** SQLITE_TRANSIENT value means that the content will likely change in
+** the near future and that SQLite should make its own private copy of
+** the content before returning.
+**
+** The typedef is necessary to work around problems in certain
+** C++ compilers. See ticket #2191.
+*/
+typedef void (*sqlite3_destructor_type)(void*);
+#define SQLITE_STATIC ((sqlite3_destructor_type)0)
+#define SQLITE_TRANSIENT ((sqlite3_destructor_type)-1)
+
+/*
+** CAPI3REF: Setting The Result Of An SQL Function
+**
+** These routines are used by the xFunc or xFinal callbacks that
+** implement SQL functions and aggregates. See
+** [sqlite3_create_function()] and [sqlite3_create_function16()]
+** for additional information.
+**
+** These functions work very much like the [parameter binding] family of
+** functions used to bind values to host parameters in prepared statements.
+** Refer to the [SQL parameter] documentation for additional information.
+**
+** ^The sqlite3_result_blob() interface sets the result from
+** an application-defined function to be the BLOB whose content is pointed
+** to by the second parameter and which is N bytes long where N is the
+** third parameter.
+**
+** ^The sqlite3_result_zeroblob() interfaces set the result of
+** the application-defined function to be a BLOB containing all zero
+** bytes and N bytes in size, where N is the value of the 2nd parameter.
+**
+** ^The sqlite3_result_double() interface sets the result from
+** an application-defined function to be a floating point value specified
+** by its 2nd argument.
+**
+** ^The sqlite3_result_error() and sqlite3_result_error16() functions
+** cause the implemented SQL function to throw an exception.
+** ^SQLite uses the string pointed to by the
+** 2nd parameter of sqlite3_result_error() or sqlite3_result_error16()
+** as the text of an error message. ^SQLite interprets the error
+** message string from sqlite3_result_error() as UTF-8. ^SQLite
+** interprets the string from sqlite3_result_error16() as UTF-16 in native
+** byte order. ^If the third parameter to sqlite3_result_error()
+** or sqlite3_result_error16() is negative then SQLite takes as the error
+** message all text up through the first zero character.
+** ^If the third parameter to sqlite3_result_error() or
+** sqlite3_result_error16() is non-negative then SQLite takes that many
+** bytes (not characters) from the 2nd parameter as the error message.
+** ^The sqlite3_result_error() and sqlite3_result_error16()
+** routines make a private copy of the error message text before
+** they return. Hence, the calling function can deallocate or
+** modify the text after they return without harm.
+** ^The sqlite3_result_error_code() function changes the error code
+** returned by SQLite as a result of an error in a function. ^By default,
+** the error code is SQLITE_ERROR. ^A subsequent call to sqlite3_result_error()
+** or sqlite3_result_error16() resets the error code to SQLITE_ERROR.
+**
+** ^The sqlite3_result_toobig() interface causes SQLite to throw an error
+** indicating that a string or BLOB is too long to represent.
+**
+** ^The sqlite3_result_nomem() interface causes SQLite to throw an error
+** indicating that a memory allocation failed.
+**
+** ^The sqlite3_result_int() interface sets the return value
+** of the application-defined function to be the 32-bit signed integer
+** value given in the 2nd argument.
+** ^The sqlite3_result_int64() interface sets the return value
+** of the application-defined function to be the 64-bit signed integer
+** value given in the 2nd argument.
+**
+** ^The sqlite3_result_null() interface sets the return value
+** of the application-defined function to be NULL.
+**
+** ^The sqlite3_result_text(), sqlite3_result_text16(),
+** sqlite3_result_text16le(), and sqlite3_result_text16be() interfaces
+** set the return value of the application-defined function to be
+** a text string which is represented as UTF-8, UTF-16 native byte order,
+** UTF-16 little endian, or UTF-16 big endian, respectively.
+** ^SQLite takes the text result from the application from
+** the 2nd parameter of the sqlite3_result_text* interfaces.
+** ^If the 3rd parameter to the sqlite3_result_text* interfaces
+** is negative, then SQLite takes result text from the 2nd parameter
+** through the first zero character.
+** ^If the 3rd parameter to the sqlite3_result_text* interfaces
+** is non-negative, then as many bytes (not characters) of the text
+** pointed to by the 2nd parameter are taken as the application-defined
+** function result.
+** ^If the 4th parameter to the sqlite3_result_text* interfaces
+** or sqlite3_result_blob is a non-NULL pointer, then SQLite calls that
+** function as the destructor on the text or BLOB result when it has
+** finished using that result.
+** ^If the 4th parameter to the sqlite3_result_text* interfaces or to
+** sqlite3_result_blob is the special constant SQLITE_STATIC, then SQLite
+** assumes that the text or BLOB result is in constant space and does not
+** copy the content of the parameter nor call a destructor on the content
+** when it has finished using that result.
+** ^If the 4th parameter to the sqlite3_result_text* interfaces
+** or sqlite3_result_blob is the special constant SQLITE_TRANSIENT
+** then SQLite makes a copy of the result into space obtained from
+** from [sqlite3_malloc()] before it returns.
+**
+** ^The sqlite3_result_value() interface sets the result of
+** the application-defined function to be a copy the
+** [unprotected sqlite3_value] object specified by the 2nd parameter. ^The
+** sqlite3_result_value() interface makes a copy of the [sqlite3_value]
+** so that the [sqlite3_value] specified in the parameter may change or
+** be deallocated after sqlite3_result_value() returns without harm.
+** ^A [protected sqlite3_value] object may always be used where an
+** [unprotected sqlite3_value] object is required, so either
+** kind of [sqlite3_value] object can be used with this interface.
+**
+** If these routines are called from within the different thread
+** than the one containing the application-defined function that received
+** the [sqlite3_context] pointer, the results are undefined.
+*/
+SQLITE_API void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*));
+SQLITE_API void sqlite3_result_double(sqlite3_context*, double);
+SQLITE_API void sqlite3_result_error(sqlite3_context*, const char*, int);
+SQLITE_API void sqlite3_result_error16(sqlite3_context*, const void*, int);
+SQLITE_API void sqlite3_result_error_toobig(sqlite3_context*);
+SQLITE_API void sqlite3_result_error_nomem(sqlite3_context*);
+SQLITE_API void sqlite3_result_error_code(sqlite3_context*, int);
+SQLITE_API void sqlite3_result_int(sqlite3_context*, int);
+SQLITE_API void sqlite3_result_int64(sqlite3_context*, sqlite3_int64);
+SQLITE_API void sqlite3_result_null(sqlite3_context*);
+SQLITE_API void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*));
+SQLITE_API void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
+SQLITE_API void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
+SQLITE_API void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
+SQLITE_API void sqlite3_result_value(sqlite3_context*, sqlite3_value*);
+SQLITE_API void sqlite3_result_zeroblob(sqlite3_context*, int n);
+
+/*
+** CAPI3REF: Define New Collating Sequences
+**
+** These functions are used to add new collation sequences to the
+** [database connection] specified as the first argument.
+**
+** ^The name of the new collation sequence is specified as a UTF-8 string
+** for sqlite3_create_collation() and sqlite3_create_collation_v2()
+** and a UTF-16 string for sqlite3_create_collation16(). ^In all cases
+** the name is passed as the second function argument.
+**
+** ^The third argument may be one of the constants [SQLITE_UTF8],
+** [SQLITE_UTF16LE], or [SQLITE_UTF16BE], indicating that the user-supplied
+** routine expects to be passed pointers to strings encoded using UTF-8,
+** UTF-16 little-endian, or UTF-16 big-endian, respectively. ^The
+** third argument might also be [SQLITE_UTF16] to indicate that the routine
+** expects pointers to be UTF-16 strings in the native byte order, or the
+** argument can be [SQLITE_UTF16_ALIGNED] if the
+** the routine expects pointers to 16-bit word aligned strings
+** of UTF-16 in the native byte order.
+**
+** A pointer to the user supplied routine must be passed as the fifth
+** argument. ^If it is NULL, this is the same as deleting the collation
+** sequence (so that SQLite cannot call it anymore).
+** ^Each time the application supplied function is invoked, it is passed
+** as its first parameter a copy of the void* passed as the fourth argument
+** to sqlite3_create_collation() or sqlite3_create_collation16().
+**
+** ^The remaining arguments to the application-supplied routine are two strings,
+** each represented by a (length, data) pair and encoded in the encoding
+** that was passed as the third argument when the collation sequence was
+** registered. The application defined collation routine should
+** return negative, zero or positive if the first string is less than,
+** equal to, or greater than the second string. i.e. (STRING1 - STRING2).
+**
+** ^The sqlite3_create_collation_v2() works like sqlite3_create_collation()
+** except that it takes an extra argument which is a destructor for
+** the collation. ^The destructor is called when the collation is
+** destroyed and is passed a copy of the fourth parameter void* pointer
+** of the sqlite3_create_collation_v2().
+** ^Collations are destroyed when they are overridden by later calls to the
+** collation creation functions or when the [database connection] is closed
+** using [sqlite3_close()].
+**
+** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()].
+*/
+SQLITE_API int sqlite3_create_collation(
+ sqlite3*,
+ const char *zName,
+ int eTextRep,
+ void*,
+ int(*xCompare)(void*,int,const void*,int,const void*)
+);
+SQLITE_API int sqlite3_create_collation_v2(
+ sqlite3*,
+ const char *zName,
+ int eTextRep,
+ void*,
+ int(*xCompare)(void*,int,const void*,int,const void*),
+ void(*xDestroy)(void*)
+);
+SQLITE_API int sqlite3_create_collation16(
+ sqlite3*,
+ const void *zName,
+ int eTextRep,
+ void*,
+ int(*xCompare)(void*,int,const void*,int,const void*)
+);
+
+/*
+** CAPI3REF: Collation Needed Callbacks
+**
+** ^To avoid having to register all collation sequences before a database
+** can be used, a single callback function may be registered with the
+** [database connection] to be invoked whenever an undefined collation
+** sequence is required.
+**
+** ^If the function is registered using the sqlite3_collation_needed() API,
+** then it is passed the names of undefined collation sequences as strings
+** encoded in UTF-8. ^If sqlite3_collation_needed16() is used,
+** the names are passed as UTF-16 in machine native byte order.
+** ^A call to either function replaces the existing collation-needed callback.
+**
+** ^(When the callback is invoked, the first argument passed is a copy
+** of the second argument to sqlite3_collation_needed() or
+** sqlite3_collation_needed16(). The second argument is the database
+** connection. The third argument is one of [SQLITE_UTF8], [SQLITE_UTF16BE],
+** or [SQLITE_UTF16LE], indicating the most desirable form of the collation
+** sequence function required. The fourth parameter is the name of the
+** required collation sequence.)^
+**
+** The callback function should register the desired collation using
+** [sqlite3_create_collation()], [sqlite3_create_collation16()], or
+** [sqlite3_create_collation_v2()].
+*/
+SQLITE_API int sqlite3_collation_needed(
+ sqlite3*,
+ void*,
+ void(*)(void*,sqlite3*,int eTextRep,const char*)
+);
+SQLITE_API int sqlite3_collation_needed16(
+ sqlite3*,
+ void*,
+ void(*)(void*,sqlite3*,int eTextRep,const void*)
+);
+
+#if SQLITE_HAS_CODEC
+/*
+** Specify the key for an encrypted database. This routine should be
+** called right after sqlite3_open().
+**
+** The code to implement this API is not available in the public release
+** of SQLite.
+*/
+SQLITE_API int sqlite3_key(
+ sqlite3 *db, /* Database to be rekeyed */
+ const void *pKey, int nKey /* The key */
+);
+
+/*
+** Change the key on an open database. If the current database is not
+** encrypted, this routine will encrypt it. If pNew==0 or nNew==0, the
+** database is decrypted.
+**
+** The code to implement this API is not available in the public release
+** of SQLite.
+*/
+SQLITE_API int sqlite3_rekey(
+ sqlite3 *db, /* Database to be rekeyed */
+ const void *pKey, int nKey /* The new key */
+);
+
+/*
+** Specify the activation key for a SEE database. Unless
+** activated, none of the SEE routines will work.
+*/
+SQLITE_API void sqlite3_activate_see(
+ const char *zPassPhrase /* Activation phrase */
+);
+#endif
+
+#ifdef SQLITE_ENABLE_CEROD
+/*
+** Specify the activation key for a CEROD database. Unless
+** activated, none of the CEROD routines will work.
+*/
+SQLITE_API void sqlite3_activate_cerod(
+ const char *zPassPhrase /* Activation phrase */
+);
+#endif
+
+/*
+** CAPI3REF: Suspend Execution For A Short Time
+**
+** ^The sqlite3_sleep() function causes the current thread to suspend execution
+** for at least a number of milliseconds specified in its parameter.
+**
+** ^If the operating system does not support sleep requests with
+** millisecond time resolution, then the time will be rounded up to
+** the nearest second. ^The number of milliseconds of sleep actually
+** requested from the operating system is returned.
+**
+** ^SQLite implements this interface by calling the xSleep()
+** method of the default [sqlite3_vfs] object.
+*/
+SQLITE_API int sqlite3_sleep(int);
+
+/*
+** CAPI3REF: Name Of The Folder Holding Temporary Files
+**
+** ^(If this global variable is made to point to a string which is
+** the name of a folder (a.k.a. directory), then all temporary files
+** created by SQLite when using a built-in [sqlite3_vfs | VFS]
+** will be placed in that directory.)^ ^If this variable
+** is a NULL pointer, then SQLite performs a search for an appropriate
+** temporary file directory.
+**
+** It is not safe to read or modify this variable in more than one
+** thread at a time. It is not safe to read or modify this variable
+** if a [database connection] is being used at the same time in a separate
+** thread.
+** It is intended that this variable be set once
+** as part of process initialization and before any SQLite interface
+** routines have been called and that this variable remain unchanged
+** thereafter.
+**
+** ^The [temp_store_directory pragma] may modify this variable and cause
+** it to point to memory obtained from [sqlite3_malloc]. ^Furthermore,
+** the [temp_store_directory pragma] always assumes that any string
+** that this variable points to is held in memory obtained from
+** [sqlite3_malloc] and the pragma may attempt to free that memory
+** using [sqlite3_free].
+** Hence, if this variable is modified directly, either it should be
+** made NULL or made to point to memory obtained from [sqlite3_malloc]
+** or else the use of the [temp_store_directory pragma] should be avoided.
+*/
+SQLITE_API SQLITE_EXTERN char *sqlite3_temp_directory;
+
+/*
+** CAPI3REF: Test For Auto-Commit Mode
+** KEYWORDS: {autocommit mode}
+**
+** ^The sqlite3_get_autocommit() interface returns non-zero or
+** zero if the given database connection is or is not in autocommit mode,
+** respectively. ^Autocommit mode is on by default.
+** ^Autocommit mode is disabled by a [BEGIN] statement.
+** ^Autocommit mode is re-enabled by a [COMMIT] or [ROLLBACK].
+**
+** If certain kinds of errors occur on a statement within a multi-statement
+** transaction (errors including [SQLITE_FULL], [SQLITE_IOERR],
+** [SQLITE_NOMEM], [SQLITE_BUSY], and [SQLITE_INTERRUPT]) then the
+** transaction might be rolled back automatically. The only way to
+** find out whether SQLite automatically rolled back the transaction after
+** an error is to use this function.
+**
+** If another thread changes the autocommit status of the database
+** connection while this routine is running, then the return value
+** is undefined.
+*/
+SQLITE_API int sqlite3_get_autocommit(sqlite3*);
+
+/*
+** CAPI3REF: Find The Database Handle Of A Prepared Statement
+**
+** ^The sqlite3_db_handle interface returns the [database connection] handle
+** to which a [prepared statement] belongs. ^The [database connection]
+** returned by sqlite3_db_handle is the same [database connection]
+** that was the first argument
+** to the [sqlite3_prepare_v2()] call (or its variants) that was used to
+** create the statement in the first place.
+*/
+SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
+
+/*
+** CAPI3REF: Find the next prepared statement
+**
+** ^This interface returns a pointer to the next [prepared statement] after
+** pStmt associated with the [database connection] pDb. ^If pStmt is NULL
+** then this interface returns a pointer to the first prepared statement
+** associated with the database connection pDb. ^If no prepared statement
+** satisfies the conditions of this routine, it returns NULL.
+**
+** The [database connection] pointer D in a call to
+** [sqlite3_next_stmt(D,S)] must refer to an open database
+** connection and in particular must not be a NULL pointer.
+*/
+SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
+
+/*
+** CAPI3REF: Commit And Rollback Notification Callbacks
+**
+** ^The sqlite3_commit_hook() interface registers a callback
+** function to be invoked whenever a transaction is [COMMIT | committed].
+** ^Any callback set by a previous call to sqlite3_commit_hook()
+** for the same database connection is overridden.
+** ^The sqlite3_rollback_hook() interface registers a callback
+** function to be invoked whenever a transaction is [ROLLBACK | rolled back].
+** ^Any callback set by a previous call to sqlite3_rollback_hook()
+** for the same database connection is overridden.
+** ^The pArg argument is passed through to the callback.
+** ^If the callback on a commit hook function returns non-zero,
+** then the commit is converted into a rollback.
+**
+** ^The sqlite3_commit_hook(D,C,P) and sqlite3_rollback_hook(D,C,P) functions
+** return the P argument from the previous call of the same function
+** on the same [database connection] D, or NULL for
+** the first call for each function on D.
+**
+** The callback implementation must not do anything that will modify
+** the database connection that invoked the callback. Any actions
+** to modify the database connection must be deferred until after the
+** completion of the [sqlite3_step()] call that triggered the commit
+** or rollback hook in the first place.
+** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
+** database connections for the meaning of "modify" in this paragraph.
+**
+** ^Registering a NULL function disables the callback.
+**
+** ^When the commit hook callback routine returns zero, the [COMMIT]
+** operation is allowed to continue normally. ^If the commit hook
+** returns non-zero, then the [COMMIT] is converted into a [ROLLBACK].
+** ^The rollback hook is invoked on a rollback that results from a commit
+** hook returning non-zero, just as it would be with any other rollback.
+**
+** ^For the purposes of this API, a transaction is said to have been
+** rolled back if an explicit "ROLLBACK" statement is executed, or
+** an error or constraint causes an implicit rollback to occur.
+** ^The rollback callback is not invoked if a transaction is
+** automatically rolled back because the database connection is closed.
+** ^The rollback callback is not invoked if a transaction is
+** rolled back because a commit callback returned non-zero.
+**
+** See also the [sqlite3_update_hook()] interface.
+*/
+SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);
+SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
+
+/*
+** CAPI3REF: Data Change Notification Callbacks
+**
+** ^The sqlite3_update_hook() interface registers a callback function
+** with the [database connection] identified by the first argument
+** to be invoked whenever a row is updated, inserted or deleted.
+** ^Any callback set by a previous call to this function
+** for the same database connection is overridden.
+**
+** ^The second argument is a pointer to the function to invoke when a
+** row is updated, inserted or deleted.
+** ^The first argument to the callback is a copy of the third argument
+** to sqlite3_update_hook().
+** ^The second callback argument is one of [SQLITE_INSERT], [SQLITE_DELETE],
+** or [SQLITE_UPDATE], depending on the operation that caused the callback
+** to be invoked.
+** ^The third and fourth arguments to the callback contain pointers to the
+** database and table name containing the affected row.
+** ^The final callback parameter is the [rowid] of the row.
+** ^In the case of an update, this is the [rowid] after the update takes place.
+**
+** ^(The update hook is not invoked when internal system tables are
+** modified (i.e. sqlite_master and sqlite_sequence).)^
+**
+** ^In the current implementation, the update hook
+** is not invoked when duplication rows are deleted because of an
+** [ON CONFLICT | ON CONFLICT REPLACE] clause. ^Nor is the update hook
+** invoked when rows are deleted using the [truncate optimization].
+** The exceptions defined in this paragraph might change in a future
+** release of SQLite.
+**
+** The update hook implementation must not do anything that will modify
+** the database connection that invoked the update hook. Any actions
+** to modify the database connection must be deferred until after the
+** completion of the [sqlite3_step()] call that triggered the update hook.
+** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
+** database connections for the meaning of "modify" in this paragraph.
+**
+** ^The sqlite3_update_hook(D,C,P) function
+** returns the P argument from the previous call
+** on the same [database connection] D, or NULL for
+** the first call on D.
+**
+** See also the [sqlite3_commit_hook()] and [sqlite3_rollback_hook()]
+** interfaces.
+*/
+SQLITE_API void *sqlite3_update_hook(
+ sqlite3*,
+ void(*)(void *,int ,char const *,char const *,sqlite3_int64),
+ void*
+);
+
+/*
+** CAPI3REF: Enable Or Disable Shared Pager Cache
+** KEYWORDS: {shared cache}
+**
+** ^(This routine enables or disables the sharing of the database cache
+** and schema data structures between [database connection | connections]
+** to the same database. Sharing is enabled if the argument is true
+** and disabled if the argument is false.)^
+**
+** ^Cache sharing is enabled and disabled for an entire process.
+** This is a change as of SQLite version 3.5.0. In prior versions of SQLite,
+** sharing was enabled or disabled for each thread separately.
+**
+** ^(The cache sharing mode set by this interface effects all subsequent
+** calls to [sqlite3_open()], [sqlite3_open_v2()], and [sqlite3_open16()].
+** Existing database connections continue use the sharing mode
+** that was in effect at the time they were opened.)^
+**
+** ^(This routine returns [SQLITE_OK] if shared cache was enabled or disabled
+** successfully. An [error code] is returned otherwise.)^
+**
+** ^Shared cache is disabled by default. But this might change in
+** future releases of SQLite. Applications that care about shared
+** cache setting should set it explicitly.
+**
+** See Also: [SQLite Shared-Cache Mode]
+*/
+SQLITE_API int sqlite3_enable_shared_cache(int);
+
+/*
+** CAPI3REF: Attempt To Free Heap Memory
+**
+** ^The sqlite3_release_memory() interface attempts to free N bytes
+** of heap memory by deallocating non-essential memory allocations
+** held by the database library. Memory used to cache database
+** pages to improve performance is an example of non-essential memory.
+** ^sqlite3_release_memory() returns the number of bytes actually freed,
+** which might be more or less than the amount requested.
+*/
+SQLITE_API int sqlite3_release_memory(int);
+
+/*
+** CAPI3REF: Impose A Limit On Heap Size
+**
+** ^The sqlite3_soft_heap_limit() interface places a "soft" limit
+** on the amount of heap memory that may be allocated by SQLite.
+** ^If an internal allocation is requested that would exceed the
+** soft heap limit, [sqlite3_release_memory()] is invoked one or
+** more times to free up some space before the allocation is performed.
+**
+** ^The limit is called "soft" because if [sqlite3_release_memory()]
+** cannot free sufficient memory to prevent the limit from being exceeded,
+** the memory is allocated anyway and the current operation proceeds.
+**
+** ^A negative or zero value for N means that there is no soft heap limit and
+** [sqlite3_release_memory()] will only be called when memory is exhausted.
+** ^The default value for the soft heap limit is zero.
+**
+** ^(SQLite makes a best effort to honor the soft heap limit.
+** But if the soft heap limit cannot be honored, execution will
+** continue without error or notification.)^ This is why the limit is
+** called a "soft" limit. It is advisory only.
+**
+** Prior to SQLite version 3.5.0, this routine only constrained the memory
+** allocated by a single thread - the same thread in which this routine
+** runs. Beginning with SQLite version 3.5.0, the soft heap limit is
+** applied to all threads. The value specified for the soft heap limit
+** is an upper bound on the total memory allocation for all threads. In
+** version 3.5.0 there is no mechanism for limiting the heap usage for
+** individual threads.
+*/
+SQLITE_API void sqlite3_soft_heap_limit(int);
+
+/*
+** CAPI3REF: Extract Metadata About A Column Of A Table
+**
+** ^This routine returns metadata about a specific column of a specific
+** database table accessible using the [database connection] handle
+** passed as the first function argument.
+**
+** ^The column is identified by the second, third and fourth parameters to
+** this function. ^The second parameter is either the name of the database
+** (i.e. "main", "temp", or an attached database) containing the specified
+** table or NULL. ^If it is NULL, then all attached databases are searched
+** for the table using the same algorithm used by the database engine to
+** resolve unqualified table references.
+**
+** ^The third and fourth parameters to this function are the table and column
+** name of the desired column, respectively. Neither of these parameters
+** may be NULL.
+**
+** ^Metadata is returned by writing to the memory locations passed as the 5th
+** and subsequent parameters to this function. ^Any of these arguments may be
+** NULL, in which case the corresponding element of metadata is omitted.
+**
+** ^(<blockquote>
+** <table border="1">
+** <tr><th> Parameter <th> Output<br>Type <th> Description
+**
+** <tr><td> 5th <td> const char* <td> Data type
+** <tr><td> 6th <td> const char* <td> Name of default collation sequence
+** <tr><td> 7th <td> int <td> True if column has a NOT NULL constraint
+** <tr><td> 8th <td> int <td> True if column is part of the PRIMARY KEY
+** <tr><td> 9th <td> int <td> True if column is [AUTOINCREMENT]
+** </table>
+** </blockquote>)^
+**
+** ^The memory pointed to by the character pointers returned for the
+** declaration type and collation sequence is valid only until the next
+** call to any SQLite API function.
+**
+** ^If the specified table is actually a view, an [error code] is returned.
+**
+** ^If the specified column is "rowid", "oid" or "_rowid_" and an
+** [INTEGER PRIMARY KEY] column has been explicitly declared, then the output
+** parameters are set for the explicitly declared column. ^(If there is no
+** explicitly declared [INTEGER PRIMARY KEY] column, then the output
+** parameters are set as follows:
+**
+** <pre>
+** data type: "INTEGER"
+** collation sequence: "BINARY"
+** not null: 0
+** primary key: 1
+** auto increment: 0
+** </pre>)^
+**
+** ^(This function may load one or more schemas from database files. If an
+** error occurs during this process, or if the requested table or column
+** cannot be found, an [error code] is returned and an error message left
+** in the [database connection] (to be retrieved using sqlite3_errmsg()).)^
+**
+** ^This API is only available if the library was compiled with the
+** [SQLITE_ENABLE_COLUMN_METADATA] C-preprocessor symbol defined.
+*/
+SQLITE_API int sqlite3_table_column_metadata(
+ sqlite3 *db, /* Connection handle */
+ const char *zDbName, /* Database name or NULL */
+ const char *zTableName, /* Table name */
+ const char *zColumnName, /* Column name */
+ char const **pzDataType, /* OUTPUT: Declared data type */
+ char const **pzCollSeq, /* OUTPUT: Collation sequence name */
+ int *pNotNull, /* OUTPUT: True if NOT NULL constraint exists */
+ int *pPrimaryKey, /* OUTPUT: True if column part of PK */
+ int *pAutoinc /* OUTPUT: True if column is auto-increment */
+);
+
+/*
+** CAPI3REF: Load An Extension
+**
+** ^This interface loads an SQLite extension library from the named file.
+**
+** ^The sqlite3_load_extension() interface attempts to load an
+** SQLite extension library contained in the file zFile.
+**
+** ^The entry point is zProc.
+** ^zProc may be 0, in which case the name of the entry point
+** defaults to "sqlite3_extension_init".
+** ^The sqlite3_load_extension() interface returns
+** [SQLITE_OK] on success and [SQLITE_ERROR] if something goes wrong.
+** ^If an error occurs and pzErrMsg is not 0, then the
+** [sqlite3_load_extension()] interface shall attempt to
+** fill *pzErrMsg with error message text stored in memory
+** obtained from [sqlite3_malloc()]. The calling function
+** should free this memory by calling [sqlite3_free()].
+**
+** ^Extension loading must be enabled using
+** [sqlite3_enable_load_extension()] prior to calling this API,
+** otherwise an error will be returned.
+**
+** See also the [load_extension() SQL function].
+*/
+SQLITE_API int sqlite3_load_extension(
+ sqlite3 *db, /* Load the extension into this database connection */
+ const char *zFile, /* Name of the shared library containing extension */
+ const char *zProc, /* Entry point. Derived from zFile if 0 */
+ char **pzErrMsg /* Put error message here if not 0 */
+);
+
+/*
+** CAPI3REF: Enable Or Disable Extension Loading
+**
+** ^So as not to open security holes in older applications that are
+** unprepared to deal with extension loading, and as a means of disabling
+** extension loading while evaluating user-entered SQL, the following API
+** is provided to turn the [sqlite3_load_extension()] mechanism on and off.
+**
+** ^Extension loading is off by default. See ticket #1863.
+** ^Call the sqlite3_enable_load_extension() routine with onoff==1
+** to turn extension loading on and call it with onoff==0 to turn
+** it back off again.
+*/
+SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
+
+/*
+** CAPI3REF: Automatically Load An Extensions
+**
+** ^This API can be invoked at program startup in order to register
+** one or more statically linked extensions that will be available
+** to all new [database connections].
+**
+** ^(This routine stores a pointer to the extension entry point
+** in an array that is obtained from [sqlite3_malloc()]. That memory
+** is deallocated by [sqlite3_reset_auto_extension()].)^
+**
+** ^This function registers an extension entry point that is
+** automatically invoked whenever a new [database connection]
+** is opened using [sqlite3_open()], [sqlite3_open16()],
+** or [sqlite3_open_v2()].
+** ^Duplicate extensions are detected so calling this routine
+** multiple times with the same extension is harmless.
+** ^Automatic extensions apply across all threads.
+*/
+SQLITE_API int sqlite3_auto_extension(void (*xEntryPoint)(void));
+
+/*
+** CAPI3REF: Reset Automatic Extension Loading
+**
+** ^(This function disables all previously registered automatic
+** extensions. It undoes the effect of all prior
+** [sqlite3_auto_extension()] calls.)^
+**
+** ^This function disables automatic extensions in all threads.
+*/
+SQLITE_API void sqlite3_reset_auto_extension(void);
+
+/*
+****** EXPERIMENTAL - subject to change without notice **************
+**
+** The interface to the virtual-table mechanism is currently considered
+** to be experimental. The interface might change in incompatible ways.
+** If this is a problem for you, do not use the interface at this time.
+**
+** When the virtual-table mechanism stabilizes, we will declare the
+** interface fixed, support it indefinitely, and remove this comment.
+*/
+
+/*
+** Structures used by the virtual table interface
+*/
+typedef struct sqlite3_vtab sqlite3_vtab;
+typedef struct sqlite3_index_info sqlite3_index_info;
+typedef struct sqlite3_vtab_cursor sqlite3_vtab_cursor;
+typedef struct sqlite3_module sqlite3_module;
+
+/*
+** CAPI3REF: Virtual Table Object
+** KEYWORDS: sqlite3_module {virtual table module}
+** EXPERIMENTAL
+**
+** This structure, sometimes called a a "virtual table module",
+** defines the implementation of a [virtual tables].
+** This structure consists mostly of methods for the module.
+**
+** ^A virtual table module is created by filling in a persistent
+** instance of this structure and passing a pointer to that instance
+** to [sqlite3_create_module()] or [sqlite3_create_module_v2()].
+** ^The registration remains valid until it is replaced by a different
+** module or until the [database connection] closes. The content
+** of this structure must not change while it is registered with
+** any database connection.
+*/
+struct sqlite3_module {
+ int iVersion;
+ int (*xCreate)(sqlite3*, void *pAux,
+ int argc, const char *const*argv,
+ sqlite3_vtab **ppVTab, char**);
+ int (*xConnect)(sqlite3*, void *pAux,
+ int argc, const char *const*argv,
+ sqlite3_vtab **ppVTab, char**);
+ int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*);
+ int (*xDisconnect)(sqlite3_vtab *pVTab);
+ int (*xDestroy)(sqlite3_vtab *pVTab);
+ int (*xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor);
+ int (*xClose)(sqlite3_vtab_cursor*);
+ int (*xFilter)(sqlite3_vtab_cursor*, int idxNum, const char *idxStr,
+ int argc, sqlite3_value **argv);
+ int (*xNext)(sqlite3_vtab_cursor*);
+ int (*xEof)(sqlite3_vtab_cursor*);
+ int (*xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int);
+ int (*xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid);
+ int (*xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *);
+ int (*xBegin)(sqlite3_vtab *pVTab);
+ int (*xSync)(sqlite3_vtab *pVTab);
+ int (*xCommit)(sqlite3_vtab *pVTab);
+ int (*xRollback)(sqlite3_vtab *pVTab);
+ int (*xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName,
+ void (**pxFunc)(sqlite3_context*,int,sqlite3_value**),
+ void **ppArg);
+ int (*xRename)(sqlite3_vtab *pVtab, const char *zNew);
+};
+
+/*
+** CAPI3REF: Virtual Table Indexing Information
+** KEYWORDS: sqlite3_index_info
+** EXPERIMENTAL
+**
+** The sqlite3_index_info structure and its substructures is used to
+** pass information into and receive the reply from the [xBestIndex]
+** method of a [virtual table module]. The fields under **Inputs** are the
+** inputs to xBestIndex and are read-only. xBestIndex inserts its
+** results into the **Outputs** fields.
+**
+** ^(The aConstraint[] array records WHERE clause constraints of the form:
+**
+** <pre>column OP expr</pre>
+**
+** where OP is =, <, <=, >, or >=.)^ ^(The particular operator is
+** stored in aConstraint[].op.)^ ^(The index of the column is stored in
+** aConstraint[].iColumn.)^ ^(aConstraint[].usable is TRUE if the
+** expr on the right-hand side can be evaluated (and thus the constraint
+** is usable) and false if it cannot.)^
+**
+** ^The optimizer automatically inverts terms of the form "expr OP column"
+** and makes other simplifications to the WHERE clause in an attempt to
+** get as many WHERE clause terms into the form shown above as possible.
+** ^The aConstraint[] array only reports WHERE clause terms that are
+** relevant to the particular virtual table being queried.
+**
+** ^Information about the ORDER BY clause is stored in aOrderBy[].
+** ^Each term of aOrderBy records a column of the ORDER BY clause.
+**
+** The [xBestIndex] method must fill aConstraintUsage[] with information
+** about what parameters to pass to xFilter. ^If argvIndex>0 then
+** the right-hand side of the corresponding aConstraint[] is evaluated
+** and becomes the argvIndex-th entry in argv. ^(If aConstraintUsage[].omit
+** is true, then the constraint is assumed to be fully handled by the
+** virtual table and is not checked again by SQLite.)^
+**
+** ^The idxNum and idxPtr values are recorded and passed into the
+** [xFilter] method.
+** ^[sqlite3_free()] is used to free idxPtr if and only if
+** needToFreeIdxPtr is true.
+**
+** ^The orderByConsumed means that output from [xFilter]/[xNext] will occur in
+** the correct order to satisfy the ORDER BY clause so that no separate
+** sorting step is required.
+**
+** ^The estimatedCost value is an estimate of the cost of doing the
+** particular lookup. A full scan of a table with N entries should have
+** a cost of N. A binary search of a table of N entries should have a
+** cost of approximately log(N).
+*/
+struct sqlite3_index_info {
+ /* Inputs */
+ int nConstraint; /* Number of entries in aConstraint */
+ struct sqlite3_index_constraint {
+ int iColumn; /* Column on left-hand side of constraint */
+ unsigned char op; /* Constraint operator */
+ unsigned char usable; /* True if this constraint is usable */
+ int iTermOffset; /* Used internally - xBestIndex should ignore */
+ } *aConstraint; /* Table of WHERE clause constraints */
+ int nOrderBy; /* Number of terms in the ORDER BY clause */
+ struct sqlite3_index_orderby {
+ int iColumn; /* Column number */
+ unsigned char desc; /* True for DESC. False for ASC. */
+ } *aOrderBy; /* The ORDER BY clause */
+ /* Outputs */
+ struct sqlite3_index_constraint_usage {
+ int argvIndex; /* if >0, constraint is part of argv to xFilter */
+ unsigned char omit; /* Do not code a test for this constraint */
+ } *aConstraintUsage;
+ int idxNum; /* Number used to identify the index */
+ char *idxStr; /* String, possibly obtained from sqlite3_malloc */
+ int needToFreeIdxStr; /* Free idxStr using sqlite3_free() if true */
+ int orderByConsumed; /* True if output is already ordered */
+ double estimatedCost; /* Estimated cost of using this index */
+};
+#define SQLITE_INDEX_CONSTRAINT_EQ 2
+#define SQLITE_INDEX_CONSTRAINT_GT 4
+#define SQLITE_INDEX_CONSTRAINT_LE 8
+#define SQLITE_INDEX_CONSTRAINT_LT 16
+#define SQLITE_INDEX_CONSTRAINT_GE 32
+#define SQLITE_INDEX_CONSTRAINT_MATCH 64
+
+/*
+** CAPI3REF: Register A Virtual Table Implementation
+** EXPERIMENTAL
+**
+** ^These routines are used to register a new [virtual table module] name.
+** ^Module names must be registered before
+** creating a new [virtual table] using the module and before using a
+** preexisting [virtual table] for the module.
+**
+** ^The module name is registered on the [database connection] specified
+** by the first parameter. ^The name of the module is given by the
+** second parameter. ^The third parameter is a pointer to
+** the implementation of the [virtual table module]. ^The fourth
+** parameter is an arbitrary client data pointer that is passed through
+** into the [xCreate] and [xConnect] methods of the virtual table module
+** when a new virtual table is be being created or reinitialized.
+**
+** ^The sqlite3_create_module_v2() interface has a fifth parameter which
+** is a pointer to a destructor for the pClientData. ^SQLite will
+** invoke the destructor function (if it is not NULL) when SQLite
+** no longer needs the pClientData pointer. ^The sqlite3_create_module()
+** interface is equivalent to sqlite3_create_module_v2() with a NULL
+** destructor.
+*/
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_create_module(
+ sqlite3 *db, /* SQLite connection to register module with */
+ const char *zName, /* Name of the module */
+ const sqlite3_module *p, /* Methods for the module */
+ void *pClientData /* Client data for xCreate/xConnect */
+);
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_create_module_v2(
+ sqlite3 *db, /* SQLite connection to register module with */
+ const char *zName, /* Name of the module */
+ const sqlite3_module *p, /* Methods for the module */
+ void *pClientData, /* Client data for xCreate/xConnect */
+ void(*xDestroy)(void*) /* Module destructor function */
+);
+
+/*
+** CAPI3REF: Virtual Table Instance Object
+** KEYWORDS: sqlite3_vtab
+** EXPERIMENTAL
+**
+** Every [virtual table module] implementation uses a subclass
+** of this object to describe a particular instance
+** of the [virtual table]. Each subclass will
+** be tailored to the specific needs of the module implementation.
+** The purpose of this superclass is to define certain fields that are
+** common to all module implementations.
+**
+** ^Virtual tables methods can set an error message by assigning a
+** string obtained from [sqlite3_mprintf()] to zErrMsg. The method should
+** take care that any prior string is freed by a call to [sqlite3_free()]
+** prior to assigning a new string to zErrMsg. ^After the error message
+** is delivered up to the client application, the string will be automatically
+** freed by sqlite3_free() and the zErrMsg field will be zeroed.
+*/
+struct sqlite3_vtab {
+ const sqlite3_module *pModule; /* The module for this virtual table */
+ int nRef; /* NO LONGER USED */
+ char *zErrMsg; /* Error message from sqlite3_mprintf() */
+ /* Virtual table implementations will typically add additional fields */
+};
+
+/*
+** CAPI3REF: Virtual Table Cursor Object
+** KEYWORDS: sqlite3_vtab_cursor {virtual table cursor}
+** EXPERIMENTAL
+**
+** Every [virtual table module] implementation uses a subclass of the
+** following structure to describe cursors that point into the
+** [virtual table] and are used
+** to loop through the virtual table. Cursors are created using the
+** [sqlite3_module.xOpen | xOpen] method of the module and are destroyed
+** by the [sqlite3_module.xClose | xClose] method. Cursors are used
+** by the [xFilter], [xNext], [xEof], [xColumn], and [xRowid] methods
+** of the module. Each module implementation will define
+** the content of a cursor structure to suit its own needs.
+**
+** This superclass exists in order to define fields of the cursor that
+** are common to all implementations.
+*/
+struct sqlite3_vtab_cursor {
+ sqlite3_vtab *pVtab; /* Virtual table of this cursor */
+ /* Virtual table implementations will typically add additional fields */
+};
+
+/*
+** CAPI3REF: Declare The Schema Of A Virtual Table
+** EXPERIMENTAL
+**
+** ^The [xCreate] and [xConnect] methods of a
+** [virtual table module] call this interface
+** to declare the format (the names and datatypes of the columns) of
+** the virtual tables they implement.
+*/
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_declare_vtab(sqlite3*, const char *zSQL);
+
+/*
+** CAPI3REF: Overload A Function For A Virtual Table
+** EXPERIMENTAL
+**
+** ^(Virtual tables can provide alternative implementations of functions
+** using the [xFindFunction] method of the [virtual table module].
+** But global versions of those functions
+** must exist in order to be overloaded.)^
+**
+** ^(This API makes sure a global version of a function with a particular
+** name and number of parameters exists. If no such function exists
+** before this API is called, a new function is created.)^ ^The implementation
+** of the new function always causes an exception to be thrown. So
+** the new function is not good for anything by itself. Its only
+** purpose is to be a placeholder function that can be overloaded
+** by a [virtual table].
+*/
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
+
+/*
+** The interface to the virtual-table mechanism defined above (back up
+** to a comment remarkably similar to this one) is currently considered
+** to be experimental. The interface might change in incompatible ways.
+** If this is a problem for you, do not use the interface at this time.
+**
+** When the virtual-table mechanism stabilizes, we will declare the
+** interface fixed, support it indefinitely, and remove this comment.
+**
+****** EXPERIMENTAL - subject to change without notice **************
+*/
+
+/*
+** CAPI3REF: A Handle To An Open BLOB
+** KEYWORDS: {BLOB handle} {BLOB handles}
+**
+** An instance of this object represents an open BLOB on which
+** [sqlite3_blob_open | incremental BLOB I/O] can be performed.
+** ^Objects of this type are created by [sqlite3_blob_open()]
+** and destroyed by [sqlite3_blob_close()].
+** ^The [sqlite3_blob_read()] and [sqlite3_blob_write()] interfaces
+** can be used to read or write small subsections of the BLOB.
+** ^The [sqlite3_blob_bytes()] interface returns the size of the BLOB in bytes.
+*/
+typedef struct sqlite3_blob sqlite3_blob;
+
+/*
+** CAPI3REF: Open A BLOB For Incremental I/O
+**
+** ^(This interfaces opens a [BLOB handle | handle] to the BLOB located
+** in row iRow, column zColumn, table zTable in database zDb;
+** in other words, the same BLOB that would be selected by:
+**
+** <pre>
+** SELECT zColumn FROM zDb.zTable WHERE [rowid] = iRow;
+** </pre>)^
+**
+** ^If the flags parameter is non-zero, then the BLOB is opened for read
+** and write access. ^If it is zero, the BLOB is opened for read access.
+** ^It is not possible to open a column that is part of an index or primary
+** key for writing. ^If [foreign key constraints] are enabled, it is
+** not possible to open a column that is part of a [child key] for writing.
+**
+** ^Note that the database name is not the filename that contains
+** the database but rather the symbolic name of the database that
+** appears after the AS keyword when the database is connected using [ATTACH].
+** ^For the main database file, the database name is "main".
+** ^For TEMP tables, the database name is "temp".
+**
+** ^(On success, [SQLITE_OK] is returned and the new [BLOB handle] is written
+** to *ppBlob. Otherwise an [error code] is returned and *ppBlob is set
+** to be a null pointer.)^
+** ^This function sets the [database connection] error code and message
+** accessible via [sqlite3_errcode()] and [sqlite3_errmsg()] and related
+** functions. ^Note that the *ppBlob variable is always initialized in a
+** way that makes it safe to invoke [sqlite3_blob_close()] on *ppBlob
+** regardless of the success or failure of this routine.
+**
+** ^(If the row that a BLOB handle points to is modified by an
+** [UPDATE], [DELETE], or by [ON CONFLICT] side-effects
+** then the BLOB handle is marked as "expired".
+** This is true if any column of the row is changed, even a column
+** other than the one the BLOB handle is open on.)^
+** ^Calls to [sqlite3_blob_read()] and [sqlite3_blob_write()] for
+** a expired BLOB handle fail with an return code of [SQLITE_ABORT].
+** ^(Changes written into a BLOB prior to the BLOB expiring are not
+** rolled back by the expiration of the BLOB. Such changes will eventually
+** commit if the transaction continues to completion.)^
+**
+** ^Use the [sqlite3_blob_bytes()] interface to determine the size of
+** the opened blob. ^The size of a blob may not be changed by this
+** interface. Use the [UPDATE] SQL command to change the size of a
+** blob.
+**
+** ^The [sqlite3_bind_zeroblob()] and [sqlite3_result_zeroblob()] interfaces
+** and the built-in [zeroblob] SQL function can be used, if desired,
+** to create an empty, zero-filled blob in which to read or write using
+** this interface.
+**
+** To avoid a resource leak, every open [BLOB handle] should eventually
+** be released by a call to [sqlite3_blob_close()].
+*/
+SQLITE_API int sqlite3_blob_open(
+ sqlite3*,
+ const char *zDb,
+ const char *zTable,
+ const char *zColumn,
+ sqlite3_int64 iRow,
+ int flags,
+ sqlite3_blob **ppBlob
+);
+
+/*
+** CAPI3REF: Close A BLOB Handle
+**
+** ^Closes an open [BLOB handle].
+**
+** ^Closing a BLOB shall cause the current transaction to commit
+** if there are no other BLOBs, no pending prepared statements, and the
+** database connection is in [autocommit mode].
+** ^If any writes were made to the BLOB, they might be held in cache
+** until the close operation if they will fit.
+**
+** ^(Closing the BLOB often forces the changes
+** out to disk and so if any I/O errors occur, they will likely occur
+** at the time when the BLOB is closed. Any errors that occur during
+** closing are reported as a non-zero return value.)^
+**
+** ^(The BLOB is closed unconditionally. Even if this routine returns
+** an error code, the BLOB is still closed.)^
+**
+** ^Calling this routine with a null pointer (such as would be returned
+** by a failed call to [sqlite3_blob_open()]) is a harmless no-op.
+*/
+SQLITE_API int sqlite3_blob_close(sqlite3_blob *);
+
+/*
+** CAPI3REF: Return The Size Of An Open BLOB
+**
+** ^Returns the size in bytes of the BLOB accessible via the
+** successfully opened [BLOB handle] in its only argument. ^The
+** incremental blob I/O routines can only read or overwriting existing
+** blob content; they cannot change the size of a blob.
+**
+** This routine only works on a [BLOB handle] which has been created
+** by a prior successful call to [sqlite3_blob_open()] and which has not
+** been closed by [sqlite3_blob_close()]. Passing any other pointer in
+** to this routine results in undefined and probably undesirable behavior.
+*/
+SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *);
+
+/*
+** CAPI3REF: Read Data From A BLOB Incrementally
+**
+** ^(This function is used to read data from an open [BLOB handle] into a
+** caller-supplied buffer. N bytes of data are copied into buffer Z
+** from the open BLOB, starting at offset iOffset.)^
+**
+** ^If offset iOffset is less than N bytes from the end of the BLOB,
+** [SQLITE_ERROR] is returned and no data is read. ^If N or iOffset is
+** less than zero, [SQLITE_ERROR] is returned and no data is read.
+** ^The size of the blob (and hence the maximum value of N+iOffset)
+** can be determined using the [sqlite3_blob_bytes()] interface.
+**
+** ^An attempt to read from an expired [BLOB handle] fails with an
+** error code of [SQLITE_ABORT].
+**
+** ^(On success, sqlite3_blob_read() returns SQLITE_OK.
+** Otherwise, an [error code] or an [extended error code] is returned.)^
+**
+** This routine only works on a [BLOB handle] which has been created
+** by a prior successful call to [sqlite3_blob_open()] and which has not
+** been closed by [sqlite3_blob_close()]. Passing any other pointer in
+** to this routine results in undefined and probably undesirable behavior.
+**
+** See also: [sqlite3_blob_write()].
+*/
+SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);
+
+/*
+** CAPI3REF: Write Data Into A BLOB Incrementally
+**
+** ^This function is used to write data into an open [BLOB handle] from a
+** caller-supplied buffer. ^N bytes of data are copied from the buffer Z
+** into the open BLOB, starting at offset iOffset.
+**
+** ^If the [BLOB handle] passed as the first argument was not opened for
+** writing (the flags parameter to [sqlite3_blob_open()] was zero),
+** this function returns [SQLITE_READONLY].
+**
+** ^This function may only modify the contents of the BLOB; it is
+** not possible to increase the size of a BLOB using this API.
+** ^If offset iOffset is less than N bytes from the end of the BLOB,
+** [SQLITE_ERROR] is returned and no data is written. ^If N is
+** less than zero [SQLITE_ERROR] is returned and no data is written.
+** The size of the BLOB (and hence the maximum value of N+iOffset)
+** can be determined using the [sqlite3_blob_bytes()] interface.
+**
+** ^An attempt to write to an expired [BLOB handle] fails with an
+** error code of [SQLITE_ABORT]. ^Writes to the BLOB that occurred
+** before the [BLOB handle] expired are not rolled back by the
+** expiration of the handle, though of course those changes might
+** have been overwritten by the statement that expired the BLOB handle
+** or by other independent statements.
+**
+** ^(On success, sqlite3_blob_write() returns SQLITE_OK.
+** Otherwise, an [error code] or an [extended error code] is returned.)^
+**
+** This routine only works on a [BLOB handle] which has been created
+** by a prior successful call to [sqlite3_blob_open()] and which has not
+** been closed by [sqlite3_blob_close()]. Passing any other pointer in
+** to this routine results in undefined and probably undesirable behavior.
+**
+** See also: [sqlite3_blob_read()].
+*/
+SQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);
+
+/*
+** CAPI3REF: Virtual File System Objects
+**
+** A virtual filesystem (VFS) is an [sqlite3_vfs] object
+** that SQLite uses to interact
+** with the underlying operating system. Most SQLite builds come with a
+** single default VFS that is appropriate for the host computer.
+** New VFSes can be registered and existing VFSes can be unregistered.
+** The following interfaces are provided.
+**
+** ^The sqlite3_vfs_find() interface returns a pointer to a VFS given its name.
+** ^Names are case sensitive.
+** ^Names are zero-terminated UTF-8 strings.
+** ^If there is no match, a NULL pointer is returned.
+** ^If zVfsName is NULL then the default VFS is returned.
+**
+** ^New VFSes are registered with sqlite3_vfs_register().
+** ^Each new VFS becomes the default VFS if the makeDflt flag is set.
+** ^The same VFS can be registered multiple times without injury.
+** ^To make an existing VFS into the default VFS, register it again
+** with the makeDflt flag set. If two different VFSes with the
+** same name are registered, the behavior is undefined. If a
+** VFS is registered with a name that is NULL or an empty string,
+** then the behavior is undefined.
+**
+** ^Unregister a VFS with the sqlite3_vfs_unregister() interface.
+** ^(If the default VFS is unregistered, another VFS is chosen as
+** the default. The choice for the new VFS is arbitrary.)^
+*/
+SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName);
+SQLITE_API int sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);
+SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
+
+/*
+** CAPI3REF: Mutexes
+**
+** The SQLite core uses these routines for thread
+** synchronization. Though they are intended for internal
+** use by SQLite, code that links against SQLite is
+** permitted to use any of these routines.
+**
+** The SQLite source code contains multiple implementations
+** of these mutex routines. An appropriate implementation
+** is selected automatically at compile-time. ^(The following
+** implementations are available in the SQLite core:
+**
+** <ul>
+** <li> SQLITE_MUTEX_OS2
+** <li> SQLITE_MUTEX_PTHREAD
+** <li> SQLITE_MUTEX_W32
+** <li> SQLITE_MUTEX_NOOP
+** </ul>)^
+**
+** ^The SQLITE_MUTEX_NOOP implementation is a set of routines
+** that does no real locking and is appropriate for use in
+** a single-threaded application. ^The SQLITE_MUTEX_OS2,
+** SQLITE_MUTEX_PTHREAD, and SQLITE_MUTEX_W32 implementations
+** are appropriate for use on OS/2, Unix, and Windows.
+**
+** ^(If SQLite is compiled with the SQLITE_MUTEX_APPDEF preprocessor
+** macro defined (with "-DSQLITE_MUTEX_APPDEF=1"), then no mutex
+** implementation is included with the library. In this case the
+** application must supply a custom mutex implementation using the
+** [SQLITE_CONFIG_MUTEX] option of the sqlite3_config() function
+** before calling sqlite3_initialize() or any other public sqlite3_
+** function that calls sqlite3_initialize().)^
+**
+** ^The sqlite3_mutex_alloc() routine allocates a new
+** mutex and returns a pointer to it. ^If it returns NULL
+** that means that a mutex could not be allocated. ^SQLite
+** will unwind its stack and return an error. ^(The argument
+** to sqlite3_mutex_alloc() is one of these integer constants:
+**
+** <ul>
+** <li> SQLITE_MUTEX_FAST
+** <li> SQLITE_MUTEX_RECURSIVE
+** <li> SQLITE_MUTEX_STATIC_MASTER
+** <li> SQLITE_MUTEX_STATIC_MEM
+** <li> SQLITE_MUTEX_STATIC_MEM2
+** <li> SQLITE_MUTEX_STATIC_PRNG
+** <li> SQLITE_MUTEX_STATIC_LRU
+** <li> SQLITE_MUTEX_STATIC_LRU2
+** </ul>)^
+**
+** ^The first two constants (SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE)
+** cause sqlite3_mutex_alloc() to create
+** a new mutex. ^The new mutex is recursive when SQLITE_MUTEX_RECURSIVE
+** is used but not necessarily so when SQLITE_MUTEX_FAST is used.
+** The mutex implementation does not need to make a distinction
+** between SQLITE_MUTEX_RECURSIVE and SQLITE_MUTEX_FAST if it does
+** not want to. ^SQLite will only request a recursive mutex in
+** cases where it really needs one. ^If a faster non-recursive mutex
+** implementation is available on the host platform, the mutex subsystem
+** might return such a mutex in response to SQLITE_MUTEX_FAST.
+**
+** ^The other allowed parameters to sqlite3_mutex_alloc() (anything other
+** than SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE) each return
+** a pointer to a static preexisting mutex. ^Six static mutexes are
+** used by the current version of SQLite. Future versions of SQLite
+** may add additional static mutexes. Static mutexes are for internal
+** use by SQLite only. Applications that use SQLite mutexes should
+** use only the dynamic mutexes returned by SQLITE_MUTEX_FAST or
+** SQLITE_MUTEX_RECURSIVE.
+**
+** ^Note that if one of the dynamic mutex parameters (SQLITE_MUTEX_FAST
+** or SQLITE_MUTEX_RECURSIVE) is used then sqlite3_mutex_alloc()
+** returns a different mutex on every call. ^But for the static
+** mutex types, the same mutex is returned on every call that has
+** the same type number.
+**
+** ^The sqlite3_mutex_free() routine deallocates a previously
+** allocated dynamic mutex. ^SQLite is careful to deallocate every
+** dynamic mutex that it allocates. The dynamic mutexes must not be in
+** use when they are deallocated. Attempting to deallocate a static
+** mutex results in undefined behavior. ^SQLite never deallocates
+** a static mutex.
+**
+** ^The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt
+** to enter a mutex. ^If another thread is already within the mutex,
+** sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return
+** SQLITE_BUSY. ^The sqlite3_mutex_try() interface returns [SQLITE_OK]
+** upon successful entry. ^(Mutexes created using
+** SQLITE_MUTEX_RECURSIVE can be entered multiple times by the same thread.
+** In such cases the,
+** mutex must be exited an equal number of times before another thread
+** can enter.)^ ^(If the same thread tries to enter any other
+** kind of mutex more than once, the behavior is undefined.
+** SQLite will never exhibit
+** such behavior in its own use of mutexes.)^
+**
+** ^(Some systems (for example, Windows 95) do not support the operation
+** implemented by sqlite3_mutex_try(). On those systems, sqlite3_mutex_try()
+** will always return SQLITE_BUSY. The SQLite core only ever uses
+** sqlite3_mutex_try() as an optimization so this is acceptable behavior.)^
+**
+** ^The sqlite3_mutex_leave() routine exits a mutex that was
+** previously entered by the same thread. ^(The behavior
+** is undefined if the mutex is not currently entered by the
+** calling thread or is not currently allocated. SQLite will
+** never do either.)^
+**
+** ^If the argument to sqlite3_mutex_enter(), sqlite3_mutex_try(), or
+** sqlite3_mutex_leave() is a NULL pointer, then all three routines
+** behave as no-ops.
+**
+** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()].
+*/
+SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int);
+SQLITE_API void sqlite3_mutex_free(sqlite3_mutex*);
+SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex*);
+SQLITE_API int sqlite3_mutex_try(sqlite3_mutex*);
+SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex*);
+
+/*
+** CAPI3REF: Mutex Methods Object
+** EXPERIMENTAL
+**
+** An instance of this structure defines the low-level routines
+** used to allocate and use mutexes.
+**
+** Usually, the default mutex implementations provided by SQLite are
+** sufficient, however the user has the option of substituting a custom
+** implementation for specialized deployments or systems for which SQLite
+** does not provide a suitable implementation. In this case, the user
+** creates and populates an instance of this structure to pass
+** to sqlite3_config() along with the [SQLITE_CONFIG_MUTEX] option.
+** Additionally, an instance of this structure can be used as an
+** output variable when querying the system for the current mutex
+** implementation, using the [SQLITE_CONFIG_GETMUTEX] option.
+**
+** ^The xMutexInit method defined by this structure is invoked as
+** part of system initialization by the sqlite3_initialize() function.
+** ^The xMutexInit routine is calle by SQLite exactly once for each
+** effective call to [sqlite3_initialize()].
+**
+** ^The xMutexEnd method defined by this structure is invoked as
+** part of system shutdown by the sqlite3_shutdown() function. The
+** implementation of this method is expected to release all outstanding
+** resources obtained by the mutex methods implementation, especially
+** those obtained by the xMutexInit method. ^The xMutexEnd()
+** interface is invoked exactly once for each call to [sqlite3_shutdown()].
+**
+** ^(The remaining seven methods defined by this structure (xMutexAlloc,
+** xMutexFree, xMutexEnter, xMutexTry, xMutexLeave, xMutexHeld and
+** xMutexNotheld) implement the following interfaces (respectively):
+**
+** <ul>
+** <li> [sqlite3_mutex_alloc()] </li>
+** <li> [sqlite3_mutex_free()] </li>
+** <li> [sqlite3_mutex_enter()] </li>
+** <li> [sqlite3_mutex_try()] </li>
+** <li> [sqlite3_mutex_leave()] </li>
+** <li> [sqlite3_mutex_held()] </li>
+** <li> [sqlite3_mutex_notheld()] </li>
+** </ul>)^
+**
+** The only difference is that the public sqlite3_XXX functions enumerated
+** above silently ignore any invocations that pass a NULL pointer instead
+** of a valid mutex handle. The implementations of the methods defined
+** by this structure are not required to handle this case, the results
+** of passing a NULL pointer instead of a valid mutex handle are undefined
+** (i.e. it is acceptable to provide an implementation that segfaults if
+** it is passed a NULL pointer).
+**
+** The xMutexInit() method must be threadsafe. ^It must be harmless to
+** invoke xMutexInit() mutiple times within the same process and without
+** intervening calls to xMutexEnd(). Second and subsequent calls to
+** xMutexInit() must be no-ops.
+**
+** ^xMutexInit() must not use SQLite memory allocation ([sqlite3_malloc()]
+** and its associates). ^Similarly, xMutexAlloc() must not use SQLite memory
+** allocation for a static mutex. ^However xMutexAlloc() may use SQLite
+** memory allocation for a fast or recursive mutex.
+**
+** ^SQLite will invoke the xMutexEnd() method when [sqlite3_shutdown()] is
+** called, but only if the prior call to xMutexInit returned SQLITE_OK.
+** If xMutexInit fails in any way, it is expected to clean up after itself
+** prior to returning.
+*/
+typedef struct sqlite3_mutex_methods sqlite3_mutex_methods;
+struct sqlite3_mutex_methods {
+ int (*xMutexInit)(void);
+ int (*xMutexEnd)(void);
+ sqlite3_mutex *(*xMutexAlloc)(int);
+ void (*xMutexFree)(sqlite3_mutex *);
+ void (*xMutexEnter)(sqlite3_mutex *);
+ int (*xMutexTry)(sqlite3_mutex *);
+ void (*xMutexLeave)(sqlite3_mutex *);
+ int (*xMutexHeld)(sqlite3_mutex *);
+ int (*xMutexNotheld)(sqlite3_mutex *);
+};
+
+/*
+** CAPI3REF: Mutex Verification Routines
+**
+** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routines
+** are intended for use inside assert() statements. ^The SQLite core
+** never uses these routines except inside an assert() and applications
+** are advised to follow the lead of the core. ^The SQLite core only
+** provides implementations for these routines when it is compiled
+** with the SQLITE_DEBUG flag. ^External mutex implementations
+** are only required to provide these routines if SQLITE_DEBUG is
+** defined and if NDEBUG is not defined.
+**
+** ^These routines should return true if the mutex in their argument
+** is held or not held, respectively, by the calling thread.
+**
+** ^The implementation is not required to provided versions of these
+** routines that actually work. If the implementation does not provide working
+** versions of these routines, it should at least provide stubs that always
+** return true so that one does not get spurious assertion failures.
+**
+** ^If the argument to sqlite3_mutex_held() is a NULL pointer then
+** the routine should return 1. This seems counter-intuitive since
+** clearly the mutex cannot be held if it does not exist. But the
+** the reason the mutex does not exist is because the build is not
+** using mutexes. And we do not want the assert() containing the
+** call to sqlite3_mutex_held() to fail, so a non-zero return is
+** the appropriate thing to do. ^The sqlite3_mutex_notheld()
+** interface should also return 1 when given a NULL pointer.
+*/
+#ifndef NDEBUG
+SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*);
+SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*);
+#endif
+
+/*
+** CAPI3REF: Mutex Types
+**
+** The [sqlite3_mutex_alloc()] interface takes a single argument
+** which is one of these integer constants.
+**
+** The set of static mutexes may change from one SQLite release to the
+** next. Applications that override the built-in mutex logic must be
+** prepared to accommodate additional static mutexes.
+*/
+#define SQLITE_MUTEX_FAST 0
+#define SQLITE_MUTEX_RECURSIVE 1
+#define SQLITE_MUTEX_STATIC_MASTER 2
+#define SQLITE_MUTEX_STATIC_MEM 3 /* sqlite3_malloc() */
+#define SQLITE_MUTEX_STATIC_MEM2 4 /* NOT USED */
+#define SQLITE_MUTEX_STATIC_OPEN 4 /* sqlite3BtreeOpen() */
+#define SQLITE_MUTEX_STATIC_PRNG 5 /* sqlite3_random() */
+#define SQLITE_MUTEX_STATIC_LRU 6 /* lru page list */
+#define SQLITE_MUTEX_STATIC_LRU2 7 /* lru page list */
+
+/*
+** CAPI3REF: Retrieve the mutex for a database connection
+**
+** ^This interface returns a pointer the [sqlite3_mutex] object that
+** serializes access to the [database connection] given in the argument
+** when the [threading mode] is Serialized.
+** ^If the [threading mode] is Single-thread or Multi-thread then this
+** routine returns a NULL pointer.
+*/
+SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*);
+
+/*
+** CAPI3REF: Low-Level Control Of Database Files
+**
+** ^The [sqlite3_file_control()] interface makes a direct call to the
+** xFileControl method for the [sqlite3_io_methods] object associated
+** with a particular database identified by the second argument. ^The
+** name of the database "main" for the main database or "temp" for the
+** TEMP database, or the name that appears after the AS keyword for
+** databases that are added using the [ATTACH] SQL command.
+** ^A NULL pointer can be used in place of "main" to refer to the
+** main database file.
+** ^The third and fourth parameters to this routine
+** are passed directly through to the second and third parameters of
+** the xFileControl method. ^The return value of the xFileControl
+** method becomes the return value of this routine.
+**
+** ^If the second parameter (zDbName) does not match the name of any
+** open database file, then SQLITE_ERROR is returned. ^This error
+** code is not remembered and will not be recalled by [sqlite3_errcode()]
+** or [sqlite3_errmsg()]. The underlying xFileControl method might
+** also return SQLITE_ERROR. There is no way to distinguish between
+** an incorrect zDbName and an SQLITE_ERROR return from the underlying
+** xFileControl method.
+**
+** See also: [SQLITE_FCNTL_LOCKSTATE]
+*/
+SQLITE_API int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
+
+/*
+** CAPI3REF: Testing Interface
+**
+** ^The sqlite3_test_control() interface is used to read out internal
+** state of SQLite and to inject faults into SQLite for testing
+** purposes. ^The first parameter is an operation code that determines
+** the number, meaning, and operation of all subsequent parameters.
+**
+** This interface is not for use by applications. It exists solely
+** for verifying the correct operation of the SQLite library. Depending
+** on how the SQLite library is compiled, this interface might not exist.
+**
+** The details of the operation codes, their meanings, the parameters
+** they take, and what they do are all subject to change without notice.
+** Unlike most of the SQLite API, this function is not guaranteed to
+** operate consistently from one release to the next.
+*/
+SQLITE_API int sqlite3_test_control(int op, ...);
+
+/*
+** CAPI3REF: Testing Interface Operation Codes
+**
+** These constants are the valid operation code parameters used
+** as the first argument to [sqlite3_test_control()].
+**
+** These parameters and their meanings are subject to change
+** without notice. These values are for testing purposes only.
+** Applications should not use any of these parameters or the
+** [sqlite3_test_control()] interface.
+*/
+#define SQLITE_TESTCTRL_FIRST 5
+#define SQLITE_TESTCTRL_PRNG_SAVE 5
+#define SQLITE_TESTCTRL_PRNG_RESTORE 6
+#define SQLITE_TESTCTRL_PRNG_RESET 7
+#define SQLITE_TESTCTRL_BITVEC_TEST 8
+#define SQLITE_TESTCTRL_FAULT_INSTALL 9
+#define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS 10
+#define SQLITE_TESTCTRL_PENDING_BYTE 11
+#define SQLITE_TESTCTRL_ASSERT 12
+#define SQLITE_TESTCTRL_ALWAYS 13
+#define SQLITE_TESTCTRL_RESERVE 14
+#define SQLITE_TESTCTRL_OPTIMIZATIONS 15
+#define SQLITE_TESTCTRL_ISKEYWORD 16
+#define SQLITE_TESTCTRL_LAST 16
+
+/*
+** CAPI3REF: SQLite Runtime Status
+** EXPERIMENTAL
+**
+** ^This interface is used to retrieve runtime status information
+** about the preformance of SQLite, and optionally to reset various
+** highwater marks. ^The first argument is an integer code for
+** the specific parameter to measure. ^(Recognized integer codes
+** are of the form [SQLITE_STATUS_MEMORY_USED | SQLITE_STATUS_...].)^
+** ^The current value of the parameter is returned into *pCurrent.
+** ^The highest recorded value is returned in *pHighwater. ^If the
+** resetFlag is true, then the highest record value is reset after
+** *pHighwater is written. ^(Some parameters do not record the highest
+** value. For those parameters
+** nothing is written into *pHighwater and the resetFlag is ignored.)^
+** ^(Other parameters record only the highwater mark and not the current
+** value. For these latter parameters nothing is written into *pCurrent.)^
+**
+** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a
+** non-zero [error code] on failure.
+**
+** This routine is threadsafe but is not atomic. This routine can be
+** called while other threads are running the same or different SQLite
+** interfaces. However the values returned in *pCurrent and
+** *pHighwater reflect the status of SQLite at different points in time
+** and it is possible that another thread might change the parameter
+** in between the times when *pCurrent and *pHighwater are written.
+**
+** See also: [sqlite3_db_status()]
+*/
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);
+
+
+/*
+** CAPI3REF: Status Parameters
+** EXPERIMENTAL
+**
+** These integer constants designate various run-time status parameters
+** that can be returned by [sqlite3_status()].
+**
+** <dl>
+** ^(<dt>SQLITE_STATUS_MEMORY_USED</dt>
+** <dd>This parameter is the current amount of memory checked out
+** using [sqlite3_malloc()], either directly or indirectly. The
+** figure includes calls made to [sqlite3_malloc()] by the application
+** and internal memory usage by the SQLite library. Scratch memory
+** controlled by [SQLITE_CONFIG_SCRATCH] and auxiliary page-cache
+** memory controlled by [SQLITE_CONFIG_PAGECACHE] is not included in
+** this parameter. The amount returned is the sum of the allocation
+** sizes as reported by the xSize method in [sqlite3_mem_methods].</dd>)^
+**
+** ^(<dt>SQLITE_STATUS_MALLOC_SIZE</dt>
+** <dd>This parameter records the largest memory allocation request
+** handed to [sqlite3_malloc()] or [sqlite3_realloc()] (or their
+** internal equivalents). Only the value returned in the
+** *pHighwater parameter to [sqlite3_status()] is of interest.
+** The value written into the *pCurrent parameter is undefined.</dd>)^
+**
+** ^(<dt>SQLITE_STATUS_PAGECACHE_USED</dt>
+** <dd>This parameter returns the number of pages used out of the
+** [pagecache memory allocator] that was configured using
+** [SQLITE_CONFIG_PAGECACHE]. The
+** value returned is in pages, not in bytes.</dd>)^
+**
+** ^(<dt>SQLITE_STATUS_PAGECACHE_OVERFLOW</dt>
+** <dd>This parameter returns the number of bytes of page cache
+** allocation which could not be statisfied by the [SQLITE_CONFIG_PAGECACHE]
+** buffer and where forced to overflow to [sqlite3_malloc()]. The
+** returned value includes allocations that overflowed because they
+** where too large (they were larger than the "sz" parameter to
+** [SQLITE_CONFIG_PAGECACHE]) and allocations that overflowed because
+** no space was left in the page cache.</dd>)^
+**
+** ^(<dt>SQLITE_STATUS_PAGECACHE_SIZE</dt>
+** <dd>This parameter records the largest memory allocation request
+** handed to [pagecache memory allocator]. Only the value returned in the
+** *pHighwater parameter to [sqlite3_status()] is of interest.
+** The value written into the *pCurrent parameter is undefined.</dd>)^
+**
+** ^(<dt>SQLITE_STATUS_SCRATCH_USED</dt>
+** <dd>This parameter returns the number of allocations used out of the
+** [scratch memory allocator] configured using
+** [SQLITE_CONFIG_SCRATCH]. The value returned is in allocations, not
+** in bytes. Since a single thread may only have one scratch allocation
+** outstanding at time, this parameter also reports the number of threads
+** using scratch memory at the same time.</dd>)^
+**
+** ^(<dt>SQLITE_STATUS_SCRATCH_OVERFLOW</dt>
+** <dd>This parameter returns the number of bytes of scratch memory
+** allocation which could not be statisfied by the [SQLITE_CONFIG_SCRATCH]
+** buffer and where forced to overflow to [sqlite3_malloc()]. The values
+** returned include overflows because the requested allocation was too
+** larger (that is, because the requested allocation was larger than the
+** "sz" parameter to [SQLITE_CONFIG_SCRATCH]) and because no scratch buffer
+** slots were available.
+** </dd>)^
+**
+** ^(<dt>SQLITE_STATUS_SCRATCH_SIZE</dt>
+** <dd>This parameter records the largest memory allocation request
+** handed to [scratch memory allocator]. Only the value returned in the
+** *pHighwater parameter to [sqlite3_status()] is of interest.
+** The value written into the *pCurrent parameter is undefined.</dd>)^
+**
+** ^(<dt>SQLITE_STATUS_PARSER_STACK</dt>
+** <dd>This parameter records the deepest parser stack. It is only
+** meaningful if SQLite is compiled with [YYTRACKMAXSTACKDEPTH].</dd>)^
+** </dl>
+**
+** New status parameters may be added from time to time.
+*/
+#define SQLITE_STATUS_MEMORY_USED 0
+#define SQLITE_STATUS_PAGECACHE_USED 1
+#define SQLITE_STATUS_PAGECACHE_OVERFLOW 2
+#define SQLITE_STATUS_SCRATCH_USED 3
+#define SQLITE_STATUS_SCRATCH_OVERFLOW 4
+#define SQLITE_STATUS_MALLOC_SIZE 5
+#define SQLITE_STATUS_PARSER_STACK 6
+#define SQLITE_STATUS_PAGECACHE_SIZE 7
+#define SQLITE_STATUS_SCRATCH_SIZE 8
+
+/*
+** CAPI3REF: Database Connection Status
+** EXPERIMENTAL
+**
+** ^This interface is used to retrieve runtime status information
+** about a single [database connection]. ^The first argument is the
+** database connection object to be interrogated. ^The second argument
+** is the parameter to interrogate. ^Currently, the only allowed value
+** for the second parameter is [SQLITE_DBSTATUS_LOOKASIDE_USED].
+** Additional options will likely appear in future releases of SQLite.
+**
+** ^The current value of the requested parameter is written into *pCur
+** and the highest instantaneous value is written into *pHiwtr. ^If
+** the resetFlg is true, then the highest instantaneous value is
+** reset back down to the current value.
+**
+** See also: [sqlite3_status()] and [sqlite3_stmt_status()].
+*/
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
+
+/*
+** CAPI3REF: Status Parameters for database connections
+** EXPERIMENTAL
+**
+** These constants are the available integer "verbs" that can be passed as
+** the second argument to the [sqlite3_db_status()] interface.
+**
+** New verbs may be added in future releases of SQLite. Existing verbs
+** might be discontinued. Applications should check the return code from
+** [sqlite3_db_status()] to make sure that the call worked.
+** The [sqlite3_db_status()] interface will return a non-zero error code
+** if a discontinued or unsupported verb is invoked.
+**
+** <dl>
+** ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_USED</dt>
+** <dd>This parameter returns the number of lookaside memory slots currently
+** checked out.</dd>)^
+** </dl>
+*/
+#define SQLITE_DBSTATUS_LOOKASIDE_USED 0
+
+
+/*
+** CAPI3REF: Prepared Statement Status
+** EXPERIMENTAL
+**
+** ^(Each prepared statement maintains various
+** [SQLITE_STMTSTATUS_SORT | counters] that measure the number
+** of times it has performed specific operations.)^ These counters can
+** be used to monitor the performance characteristics of the prepared
+** statements. For example, if the number of table steps greatly exceeds
+** the number of table searches or result rows, that would tend to indicate
+** that the prepared statement is using a full table scan rather than
+** an index.
+**
+** ^(This interface is used to retrieve and reset counter values from
+** a [prepared statement]. The first argument is the prepared statement
+** object to be interrogated. The second argument
+** is an integer code for a specific [SQLITE_STMTSTATUS_SORT | counter]
+** to be interrogated.)^
+** ^The current value of the requested counter is returned.
+** ^If the resetFlg is true, then the counter is reset to zero after this
+** interface call returns.
+**
+** See also: [sqlite3_status()] and [sqlite3_db_status()].
+*/
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
+
+/*
+** CAPI3REF: Status Parameters for prepared statements
+** EXPERIMENTAL
+**
+** These preprocessor macros define integer codes that name counter
+** values associated with the [sqlite3_stmt_status()] interface.
+** The meanings of the various counters are as follows:
+**
+** <dl>
+** <dt>SQLITE_STMTSTATUS_FULLSCAN_STEP</dt>
+** <dd>^This is the number of times that SQLite has stepped forward in
+** a table as part of a full table scan. Large numbers for this counter
+** may indicate opportunities for performance improvement through
+** careful use of indices.</dd>
+**
+** <dt>SQLITE_STMTSTATUS_SORT</dt>
+** <dd>^This is the number of sort operations that have occurred.
+** A non-zero value in this counter may indicate an opportunity to
+** improvement performance through careful use of indices.</dd>
+**
+** </dl>
+*/
+#define SQLITE_STMTSTATUS_FULLSCAN_STEP 1
+#define SQLITE_STMTSTATUS_SORT 2
+
+/*
+** CAPI3REF: Custom Page Cache Object
+** EXPERIMENTAL
+**
+** The sqlite3_pcache type is opaque. It is implemented by
+** the pluggable module. The SQLite core has no knowledge of
+** its size or internal structure and never deals with the
+** sqlite3_pcache object except by holding and passing pointers
+** to the object.
+**
+** See [sqlite3_pcache_methods] for additional information.
+*/
+typedef struct sqlite3_pcache sqlite3_pcache;
+
+/*
+** CAPI3REF: Application Defined Page Cache.
+** KEYWORDS: {page cache}
+** EXPERIMENTAL
+**
+** ^(The [sqlite3_config]([SQLITE_CONFIG_PCACHE], ...) interface can
+** register an alternative page cache implementation by passing in an
+** instance of the sqlite3_pcache_methods structure.)^ The majority of the
+** heap memory used by SQLite is used by the page cache to cache data read
+** from, or ready to be written to, the database file. By implementing a
+** custom page cache using this API, an application can control more
+** precisely the amount of memory consumed by SQLite, the way in which
+** that memory is allocated and released, and the policies used to
+** determine exactly which parts of a database file are cached and for
+** how long.
+**
+** ^(The contents of the sqlite3_pcache_methods structure are copied to an
+** internal buffer by SQLite within the call to [sqlite3_config]. Hence
+** the application may discard the parameter after the call to
+** [sqlite3_config()] returns.)^
+**
+** ^The xInit() method is called once for each call to [sqlite3_initialize()]
+** (usually only once during the lifetime of the process). ^(The xInit()
+** method is passed a copy of the sqlite3_pcache_methods.pArg value.)^
+** ^The xInit() method can set up up global structures and/or any mutexes
+** required by the custom page cache implementation.
+**
+** ^The xShutdown() method is called from within [sqlite3_shutdown()],
+** if the application invokes this API. It can be used to clean up
+** any outstanding resources before process shutdown, if required.
+**
+** ^SQLite holds a [SQLITE_MUTEX_RECURSIVE] mutex when it invokes
+** the xInit method, so the xInit method need not be threadsafe. ^The
+** xShutdown method is only called from [sqlite3_shutdown()] so it does
+** not need to be threadsafe either. All other methods must be threadsafe
+** in multithreaded applications.
+**
+** ^SQLite will never invoke xInit() more than once without an intervening
+** call to xShutdown().
+**
+** ^The xCreate() method is used to construct a new cache instance. SQLite
+** will typically create one cache instance for each open database file,
+** though this is not guaranteed. ^The
+** first parameter, szPage, is the size in bytes of the pages that must
+** be allocated by the cache. ^szPage will not be a power of two. ^szPage
+** will the page size of the database file that is to be cached plus an
+** increment (here called "R") of about 100 or 200. ^SQLite will use the
+** extra R bytes on each page to store metadata about the underlying
+** database page on disk. The value of R depends
+** on the SQLite version, the target platform, and how SQLite was compiled.
+** ^R is constant for a particular build of SQLite. ^The second argument to
+** xCreate(), bPurgeable, is true if the cache being created will
+** be used to cache database pages of a file stored on disk, or
+** false if it is used for an in-memory database. ^The cache implementation
+** does not have to do anything special based with the value of bPurgeable;
+** it is purely advisory. ^On a cache where bPurgeable is false, SQLite will
+** never invoke xUnpin() except to deliberately delete a page.
+** ^In other words, a cache created with bPurgeable set to false will
+** never contain any unpinned pages.
+**
+** ^(The xCachesize() method may be called at any time by SQLite to set the
+** suggested maximum cache-size (number of pages stored by) the cache
+** instance passed as the first argument. This is the value configured using
+** the SQLite "[PRAGMA cache_size]" command.)^ ^As with the bPurgeable
+** parameter, the implementation is not required to do anything with this
+** value; it is advisory only.
+**
+** ^The xPagecount() method should return the number of pages currently
+** stored in the cache.
+**
+** ^The xFetch() method is used to fetch a page and return a pointer to it.
+** ^A 'page', in this context, is a buffer of szPage bytes aligned at an
+** 8-byte boundary. ^The page to be fetched is determined by the key. ^The
+** mimimum key value is 1. After it has been retrieved using xFetch, the page
+** is considered to be "pinned".
+**
+** ^If the requested page is already in the page cache, then the page cache
+** implementation must return a pointer to the page buffer with its content
+** intact. ^(If the requested page is not already in the cache, then the
+** behavior of the cache implementation is determined by the value of the
+** createFlag parameter passed to xFetch, according to the following table:
+**
+** <table border=1 width=85% align=center>
+** <tr><th> createFlag <th> Behaviour when page is not already in cache
+** <tr><td> 0 <td> Do not allocate a new page. Return NULL.
+** <tr><td> 1 <td> Allocate a new page if it easy and convenient to do so.
+** Otherwise return NULL.
+** <tr><td> 2 <td> Make every effort to allocate a new page. Only return
+** NULL if allocating a new page is effectively impossible.
+** </table>)^
+**
+** SQLite will normally invoke xFetch() with a createFlag of 0 or 1. If
+** a call to xFetch() with createFlag==1 returns NULL, then SQLite will
+** attempt to unpin one or more cache pages by spilling the content of
+** pinned pages to disk and synching the operating system disk cache. After
+** attempting to unpin pages, the xFetch() method will be invoked again with
+** a createFlag of 2.
+**
+** ^xUnpin() is called by SQLite with a pointer to a currently pinned page
+** as its second argument. ^(If the third parameter, discard, is non-zero,
+** then the page should be evicted from the cache. In this case SQLite
+** assumes that the next time the page is retrieved from the cache using
+** the xFetch() method, it will be zeroed.)^ ^If the discard parameter is
+** zero, then the page is considered to be unpinned. ^The cache implementation
+** may choose to evict unpinned pages at any time.
+**
+** ^(The cache is not required to perform any reference counting. A single
+** call to xUnpin() unpins the page regardless of the number of prior calls
+** to xFetch().)^
+**
+** ^The xRekey() method is used to change the key value associated with the
+** page passed as the second argument from oldKey to newKey. ^If the cache
+** previously contains an entry associated with newKey, it should be
+** discarded. ^Any prior cache entry associated with newKey is guaranteed not
+** to be pinned.
+**
+** ^When SQLite calls the xTruncate() method, the cache must discard all
+** existing cache entries with page numbers (keys) greater than or equal
+** to the value of the iLimit parameter passed to xTruncate(). ^If any
+** of these pages are pinned, they are implicitly unpinned, meaning that
+** they can be safely discarded.
+**
+** ^The xDestroy() method is used to delete a cache allocated by xCreate().
+** All resources associated with the specified cache should be freed. ^After
+** calling the xDestroy() method, SQLite considers the [sqlite3_pcache*]
+** handle invalid, and will not use it with any other sqlite3_pcache_methods
+** functions.
+*/
+typedef struct sqlite3_pcache_methods sqlite3_pcache_methods;
+struct sqlite3_pcache_methods {
+ void *pArg;
+ int (*xInit)(void*);
+ void (*xShutdown)(void*);
+ sqlite3_pcache *(*xCreate)(int szPage, int bPurgeable);
+ void (*xCachesize)(sqlite3_pcache*, int nCachesize);
+ int (*xPagecount)(sqlite3_pcache*);
+ void *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag);
+ void (*xUnpin)(sqlite3_pcache*, void*, int discard);
+ void (*xRekey)(sqlite3_pcache*, void*, unsigned oldKey, unsigned newKey);
+ void (*xTruncate)(sqlite3_pcache*, unsigned iLimit);
+ void (*xDestroy)(sqlite3_pcache*);
+};
+
+/*
+** CAPI3REF: Online Backup Object
+** EXPERIMENTAL
+**
+** The sqlite3_backup object records state information about an ongoing
+** online backup operation. ^The sqlite3_backup object is created by
+** a call to [sqlite3_backup_init()] and is destroyed by a call to
+** [sqlite3_backup_finish()].
+**
+** See Also: [Using the SQLite Online Backup API]
+*/
+typedef struct sqlite3_backup sqlite3_backup;
+
+/*
+** CAPI3REF: Online Backup API.
+** EXPERIMENTAL
+**
+** The backup API copies the content of one database into another.
+** It is useful either for creating backups of databases or
+** for copying in-memory databases to or from persistent files.
+**
+** See Also: [Using the SQLite Online Backup API]
+**
+** ^Exclusive access is required to the destination database for the
+** duration of the operation. ^However the source database is only
+** read-locked while it is actually being read; it is not locked
+** continuously for the entire backup operation. ^Thus, the backup may be
+** performed on a live source database without preventing other users from
+** reading or writing to the source database while the backup is underway.
+**
+** ^(To perform a backup operation:
+** <ol>
+** <li><b>sqlite3_backup_init()</b> is called once to initialize the
+** backup,
+** <li><b>sqlite3_backup_step()</b> is called one or more times to transfer
+** the data between the two databases, and finally
+** <li><b>sqlite3_backup_finish()</b> is called to release all resources
+** associated with the backup operation.
+** </ol>)^
+** There should be exactly one call to sqlite3_backup_finish() for each
+** successful call to sqlite3_backup_init().
+**
+** <b>sqlite3_backup_init()</b>
+**
+** ^The D and N arguments to sqlite3_backup_init(D,N,S,M) are the
+** [database connection] associated with the destination database
+** and the database name, respectively.
+** ^The database name is "main" for the main database, "temp" for the
+** temporary database, or the name specified after the AS keyword in
+** an [ATTACH] statement for an attached database.
+** ^The S and M arguments passed to
+** sqlite3_backup_init(D,N,S,M) identify the [database connection]
+** and database name of the source database, respectively.
+** ^The source and destination [database connections] (parameters S and D)
+** must be different or else sqlite3_backup_init(D,N,S,M) will file with
+** an error.
+**
+** ^If an error occurs within sqlite3_backup_init(D,N,S,M), then NULL is
+** returned and an error code and error message are store3d in the
+** destination [database connection] D.
+** ^The error code and message for the failed call to sqlite3_backup_init()
+** can be retrieved using the [sqlite3_errcode()], [sqlite3_errmsg()], and/or
+** [sqlite3_errmsg16()] functions.
+** ^A successful call to sqlite3_backup_init() returns a pointer to an
+** [sqlite3_backup] object.
+** ^The [sqlite3_backup] object may be used with the sqlite3_backup_step() and
+** sqlite3_backup_finish() functions to perform the specified backup
+** operation.
+**
+** <b>sqlite3_backup_step()</b>
+**
+** ^Function sqlite3_backup_step(B,N) will copy up to N pages between
+** the source and destination databases specified by [sqlite3_backup] object B.
+** ^If N is negative, all remaining source pages are copied.
+** ^If sqlite3_backup_step(B,N) successfully copies N pages and there
+** are still more pages to be copied, then the function resturns [SQLITE_OK].
+** ^If sqlite3_backup_step(B,N) successfully finishes copying all pages
+** from source to destination, then it returns [SQLITE_DONE].
+** ^If an error occurs while running sqlite3_backup_step(B,N),
+** then an [error code] is returned. ^As well as [SQLITE_OK] and
+** [SQLITE_DONE], a call to sqlite3_backup_step() may return [SQLITE_READONLY],
+** [SQLITE_NOMEM], [SQLITE_BUSY], [SQLITE_LOCKED], or an
+** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX] extended error code.
+**
+** ^The sqlite3_backup_step() might return [SQLITE_READONLY] if the destination
+** database was opened read-only or if
+** the destination is an in-memory database with a different page size
+** from the source database.
+**
+** ^If sqlite3_backup_step() cannot obtain a required file-system lock, then
+** the [sqlite3_busy_handler | busy-handler function]
+** is invoked (if one is specified). ^If the
+** busy-handler returns non-zero before the lock is available, then
+** [SQLITE_BUSY] is returned to the caller. ^In this case the call to
+** sqlite3_backup_step() can be retried later. ^If the source
+** [database connection]
+** is being used to write to the source database when sqlite3_backup_step()
+** is called, then [SQLITE_LOCKED] is returned immediately. ^Again, in this
+** case the call to sqlite3_backup_step() can be retried later on. ^(If
+** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX], [SQLITE_NOMEM], or
+** [SQLITE_READONLY] is returned, then
+** there is no point in retrying the call to sqlite3_backup_step(). These
+** errors are considered fatal.)^ The application must accept
+** that the backup operation has failed and pass the backup operation handle
+** to the sqlite3_backup_finish() to release associated resources.
+**
+** ^The first call to sqlite3_backup_step() obtains an exclusive lock
+** on the destination file. ^The exclusive lock is not released until either
+** sqlite3_backup_finish() is called or the backup operation is complete
+** and sqlite3_backup_step() returns [SQLITE_DONE]. ^Every call to
+** sqlite3_backup_step() obtains a [shared lock] on the source database that
+** lasts for the duration of the sqlite3_backup_step() call.
+** ^Because the source database is not locked between calls to
+** sqlite3_backup_step(), the source database may be modified mid-way
+** through the backup process. ^If the source database is modified by an
+** external process or via a database connection other than the one being
+** used by the backup operation, then the backup will be automatically
+** restarted by the next call to sqlite3_backup_step(). ^If the source
+** database is modified by the using the same database connection as is used
+** by the backup operation, then the backup database is automatically
+** updated at the same time.
+**
+** <b>sqlite3_backup_finish()</b>
+**
+** When sqlite3_backup_step() has returned [SQLITE_DONE], or when the
+** application wishes to abandon the backup operation, the application
+** should destroy the [sqlite3_backup] by passing it to sqlite3_backup_finish().
+** ^The sqlite3_backup_finish() interfaces releases all
+** resources associated with the [sqlite3_backup] object.
+** ^If sqlite3_backup_step() has not yet returned [SQLITE_DONE], then any
+** active write-transaction on the destination database is rolled back.
+** The [sqlite3_backup] object is invalid
+** and may not be used following a call to sqlite3_backup_finish().
+**
+** ^The value returned by sqlite3_backup_finish is [SQLITE_OK] if no
+** sqlite3_backup_step() errors occurred, regardless or whether or not
+** sqlite3_backup_step() completed.
+** ^If an out-of-memory condition or IO error occurred during any prior
+** sqlite3_backup_step() call on the same [sqlite3_backup] object, then
+** sqlite3_backup_finish() returns the corresponding [error code].
+**
+** ^A return of [SQLITE_BUSY] or [SQLITE_LOCKED] from sqlite3_backup_step()
+** is not a permanent error and does not affect the return value of
+** sqlite3_backup_finish().
+**
+** <b>sqlite3_backup_remaining(), sqlite3_backup_pagecount()</b>
+**
+** ^Each call to sqlite3_backup_step() sets two values inside
+** the [sqlite3_backup] object: the number of pages still to be backed
+** up and the total number of pages in the source databae file.
+** The sqlite3_backup_remaining() and sqlite3_backup_pagecount() interfaces
+** retrieve these two values, respectively.
+**
+** ^The values returned by these functions are only updated by
+** sqlite3_backup_step(). ^If the source database is modified during a backup
+** operation, then the values are not updated to account for any extra
+** pages that need to be updated or the size of the source database file
+** changing.
+**
+** <b>Concurrent Usage of Database Handles</b>
+**
+** ^The source [database connection] may be used by the application for other
+** purposes while a backup operation is underway or being initialized.
+** ^If SQLite is compiled and configured to support threadsafe database
+** connections, then the source database connection may be used concurrently
+** from within other threads.
+**
+** However, the application must guarantee that the destination
+** [database connection] is not passed to any other API (by any thread) after
+** sqlite3_backup_init() is called and before the corresponding call to
+** sqlite3_backup_finish(). SQLite does not currently check to see
+** if the application incorrectly accesses the destination [database connection]
+** and so no error code is reported, but the operations may malfunction
+** nevertheless. Use of the destination database connection while a
+** backup is in progress might also also cause a mutex deadlock.
+**
+** If running in [shared cache mode], the application must
+** guarantee that the shared cache used by the destination database
+** is not accessed while the backup is running. In practice this means
+** that the application must guarantee that the disk file being
+** backed up to is not accessed by any connection within the process,
+** not just the specific connection that was passed to sqlite3_backup_init().
+**
+** The [sqlite3_backup] object itself is partially threadsafe. Multiple
+** threads may safely make multiple concurrent calls to sqlite3_backup_step().
+** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount()
+** APIs are not strictly speaking threadsafe. If they are invoked at the
+** same time as another thread is invoking sqlite3_backup_step() it is
+** possible that they return invalid values.
+*/
+SQLITE_API sqlite3_backup *sqlite3_backup_init(
+ sqlite3 *pDest, /* Destination database handle */
+ const char *zDestName, /* Destination database name */
+ sqlite3 *pSource, /* Source database handle */
+ const char *zSourceName /* Source database name */
+);
+SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage);
+SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p);
+SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p);
+SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);
+
+/*
+** CAPI3REF: Unlock Notification
+** EXPERIMENTAL
+**
+** ^When running in shared-cache mode, a database operation may fail with
+** an [SQLITE_LOCKED] error if the required locks on the shared-cache or
+** individual tables within the shared-cache cannot be obtained. See
+** [SQLite Shared-Cache Mode] for a description of shared-cache locking.
+** ^This API may be used to register a callback that SQLite will invoke
+** when the connection currently holding the required lock relinquishes it.
+** ^This API is only available if the library was compiled with the
+** [SQLITE_ENABLE_UNLOCK_NOTIFY] C-preprocessor symbol defined.
+**
+** See Also: [Using the SQLite Unlock Notification Feature].
+**
+** ^Shared-cache locks are released when a database connection concludes
+** its current transaction, either by committing it or rolling it back.
+**
+** ^When a connection (known as the blocked connection) fails to obtain a
+** shared-cache lock and SQLITE_LOCKED is returned to the caller, the
+** identity of the database connection (the blocking connection) that
+** has locked the required resource is stored internally. ^After an
+** application receives an SQLITE_LOCKED error, it may call the
+** sqlite3_unlock_notify() method with the blocked connection handle as
+** the first argument to register for a callback that will be invoked
+** when the blocking connections current transaction is concluded. ^The
+** callback is invoked from within the [sqlite3_step] or [sqlite3_close]
+** call that concludes the blocking connections transaction.
+**
+** ^(If sqlite3_unlock_notify() is called in a multi-threaded application,
+** there is a chance that the blocking connection will have already
+** concluded its transaction by the time sqlite3_unlock_notify() is invoked.
+** If this happens, then the specified callback is invoked immediately,
+** from within the call to sqlite3_unlock_notify().)^
+**
+** ^If the blocked connection is attempting to obtain a write-lock on a
+** shared-cache table, and more than one other connection currently holds
+** a read-lock on the same table, then SQLite arbitrarily selects one of
+** the other connections to use as the blocking connection.
+**
+** ^(There may be at most one unlock-notify callback registered by a
+** blocked connection. If sqlite3_unlock_notify() is called when the
+** blocked connection already has a registered unlock-notify callback,
+** then the new callback replaces the old.)^ ^If sqlite3_unlock_notify() is
+** called with a NULL pointer as its second argument, then any existing
+** unlock-notify callback is cancelled. ^The blocked connections
+** unlock-notify callback may also be canceled by closing the blocked
+** connection using [sqlite3_close()].
+**
+** The unlock-notify callback is not reentrant. If an application invokes
+** any sqlite3_xxx API functions from within an unlock-notify callback, a
+** crash or deadlock may be the result.
+**
+** ^Unless deadlock is detected (see below), sqlite3_unlock_notify() always
+** returns SQLITE_OK.
+**
+** <b>Callback Invocation Details</b>
+**
+** When an unlock-notify callback is registered, the application provides a
+** single void* pointer that is passed to the callback when it is invoked.
+** However, the signature of the callback function allows SQLite to pass
+** it an array of void* context pointers. The first argument passed to
+** an unlock-notify callback is a pointer to an array of void* pointers,
+** and the second is the number of entries in the array.
+**
+** When a blocking connections transaction is concluded, there may be
+** more than one blocked connection that has registered for an unlock-notify
+** callback. ^If two or more such blocked connections have specified the
+** same callback function, then instead of invoking the callback function
+** multiple times, it is invoked once with the set of void* context pointers
+** specified by the blocked connections bundled together into an array.
+** This gives the application an opportunity to prioritize any actions
+** related to the set of unblocked database connections.
+**
+** <b>Deadlock Detection</b>
+**
+** Assuming that after registering for an unlock-notify callback a
+** database waits for the callback to be issued before taking any further
+** action (a reasonable assumption), then using this API may cause the
+** application to deadlock. For example, if connection X is waiting for
+** connection Y's transaction to be concluded, and similarly connection
+** Y is waiting on connection X's transaction, then neither connection
+** will proceed and the system may remain deadlocked indefinitely.
+**
+** To avoid this scenario, the sqlite3_unlock_notify() performs deadlock
+** detection. ^If a given call to sqlite3_unlock_notify() would put the
+** system in a deadlocked state, then SQLITE_LOCKED is returned and no
+** unlock-notify callback is registered. The system is said to be in
+** a deadlocked state if connection A has registered for an unlock-notify
+** callback on the conclusion of connection B's transaction, and connection
+** B has itself registered for an unlock-notify callback when connection
+** A's transaction is concluded. ^Indirect deadlock is also detected, so
+** the system is also considered to be deadlocked if connection B has
+** registered for an unlock-notify callback on the conclusion of connection
+** C's transaction, where connection C is waiting on connection A. ^Any
+** number of levels of indirection are allowed.
+**
+** <b>The "DROP TABLE" Exception</b>
+**
+** When a call to [sqlite3_step()] returns SQLITE_LOCKED, it is almost
+** always appropriate to call sqlite3_unlock_notify(). There is however,
+** one exception. When executing a "DROP TABLE" or "DROP INDEX" statement,
+** SQLite checks if there are any currently executing SELECT statements
+** that belong to the same connection. If there are, SQLITE_LOCKED is
+** returned. In this case there is no "blocking connection", so invoking
+** sqlite3_unlock_notify() results in the unlock-notify callback being
+** invoked immediately. If the application then re-attempts the "DROP TABLE"
+** or "DROP INDEX" query, an infinite loop might be the result.
+**
+** One way around this problem is to check the extended error code returned
+** by an sqlite3_step() call. ^(If there is a blocking connection, then the
+** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in
+** the special "DROP TABLE/INDEX" case, the extended error code is just
+** SQLITE_LOCKED.)^
+*/
+SQLITE_API int sqlite3_unlock_notify(
+ sqlite3 *pBlocked, /* Waiting connection */
+ void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */
+ void *pNotifyArg /* Argument to pass to xNotify */
+);
+
+
+/*
+** CAPI3REF: String Comparison
+** EXPERIMENTAL
+**
+** ^The [sqlite3_strnicmp()] API allows applications and extensions to
+** compare the contents of two buffers containing UTF-8 strings in a
+** case-indendent fashion, using the same definition of case independence
+** that SQLite uses internally when comparing identifiers.
+*/
+SQLITE_API int sqlite3_strnicmp(const char *, const char *, int);
+
+/*
+** CAPI3REF: Error Logging Interface
+** EXPERIMENTAL
+**
+** ^The [sqlite3_log()] interface writes a message into the error log
+** established by the [SQLITE_CONFIG_LOG] option to [sqlite3_config()].
+** ^If logging is enabled, the zFormat string and subsequent arguments are
+** passed through to [sqlite3_vmprintf()] to generate the final output string.
+**
+** The sqlite3_log() interface is intended for use by extensions such as
+** virtual tables, collating functions, and SQL functions. While there is
+** nothing to prevent an application from calling sqlite3_log(), doing so
+** is considered bad form.
+**
+** The zFormat string must not be NULL.
+**
+** To avoid deadlocks and other threading problems, the sqlite3_log() routine
+** will not use dynamically allocated memory. The log message is stored in
+** a fixed-length buffer on the stack. If the log message is longer than
+** a few hundred characters, it will be truncated to the length of the
+** buffer.
+*/
+SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...);
+
+/*
+** Undo the hack that converts floating point types to integer for
+** builds on processors without floating point support.
+*/
+#ifdef SQLITE_OMIT_FLOATING_POINT
+# undef double
+#endif
+
+#ifdef __cplusplus
+} /* End of the 'extern "C"' block */
+#endif
+#endif
+
-#include "configure.hpp"\r
-#include "mof/Application.hpp"\r
-#include "mof/streams.hpp"\r
-#include "mof/Color.hpp"\r
-#include <exception>\r
-#include "mof/utilities.hpp"\r
-#include "mof/ConsoleIO.hpp"\r
-#include <conio.h>\r
-#include "mof/Font.hpp"\r
-\r
-#include "TestScene.hpp"\r
-#include "Demo1.hpp"\r
-#include "Demo2.hpp"\r
-#include "Demo3.hpp"\r
-#include "Settings.hpp"\r
-\r
-\r
-int main(int , char**)\r
-{\r
- mof::Font::addFontResource( FONT_PATH_UME );\r
- ::Settings settings;\r
- int result = ::LoadSettings(&settings);\r
- try\r
- {\r
- if (!result) throw std::runtime_error("bad settings");\r
- { // \83A\83v\83\8a\83P\81[\83V\83\87\83\93\82Ì\8f\89\8aú\89»\r
- int upf = settings.fps == 30 ? 2 : 1;\r
- int interval = settings.fps == 30 ? 32 : 16;\r
- mof::Application::initialize\r
- (\r
- _T("MyApplication") ,\r
- settings.screen.width, settings.screen.height,\r
- settings.screen_mode, interval, upf,\r
- (mof::Application::InputMode)settings.input_mode, \r
- settings.enable_output_frame? true: false,\r
- settings.enable_output_audio? true: false\r
- ); \r
- }\r
- \r
- { // \83V\81[\83\93\82Ì\83Z\83b\83g\82Æ\8aJ\8en\r
- mof::Scene scene;\r
- #define FIRST_SCENE Demo1\r
- scene.initialize = FIRST_SCENE::initialize;\r
- scene.finalize = FIRST_SCENE::finalize;\r
- scene.update = FIRST_SCENE::update;\r
- scene.draw = FIRST_SCENE::draw;\r
- mof::Application::run( scene );\r
- }\r
- }\r
- catch(std::exception& e)\r
- {\r
- MessageBox(NULL, e.what(), "\97á\8aO\82ª\94\90¶\82µ\82Ü\82µ\82½", MB_OK);\r
- }\r
- mof::Application::finalize();\r
-\r
- return 0;\r
-}\r
+#include "configure.hpp"
+#include "mof/Application.hpp"
+#include "mof/streams.hpp"
+#include "mof/Color.hpp"
+#include <exception>
+#include "mof/utilities.hpp"
+#include "mof/ConsoleIO.hpp"
+#include <conio.h>
+#include "mof/Font.hpp"
+
+#include "TestScene.hpp"
+#include "Demo1.hpp"
+#include "Demo2.hpp"
+#include "Demo3.hpp"
+#include "Settings.hpp"
+
+
+int main(int , char**)
+{
+ mof::Font::addFontResource( FONT_PATH_UME );
+ ::Settings settings;
+ int result = ::LoadSettings(&settings);
+ try
+ {
+ if (!result) throw std::runtime_error("bad settings");
+ { // \83A\83v\83\8a\83P\81[\83V\83\87\83\93\82Ì\8f\89\8aú\89»
+ int upf = settings.fps == 30 ? 2 : 1;
+ int interval = settings.fps == 30 ? 32 : 16;
+ mof::Application::initialize
+ (
+ _T("MyApplication") ,
+ settings.screen.width, settings.screen.height,
+ settings.screen_mode, interval, upf,
+ (mof::Application::InputMode)settings.input_mode,
+ settings.enable_output_frame? true: false,
+ settings.enable_output_audio? true: false
+ );
+ }
+
+ { // \83V\81[\83\93\82Ì\83Z\83b\83g\82Æ\8aJ\8en
+ mof::Scene scene;
+ #define FIRST_SCENE Demo1
+ scene.initialize = FIRST_SCENE::initialize;
+ scene.finalize = FIRST_SCENE::finalize;
+ scene.update = FIRST_SCENE::update;
+ scene.draw = FIRST_SCENE::draw;
+ mof::Application::run( scene );
+ }
+ }
+ catch(std::exception& e)
+ {
+ MessageBox(NULL, e.what(), "\97á\8aO\82ª\94\90¶\82µ\82Ü\82µ\82½", MB_OK);
+ }
+ mof::Application::finalize();
+
+ return 0;
+}
-#include "Action.h"\r
-#include "BattlerFacade.h"\r
-#include "mof/DataRow.h"\r
-#include "mof/DataBasedAnimation.h"\r
-#include "mof/KeyFrameAnimation.h"\r
-\r
-et::Action::Action(et::BattlerFacade* pBattler , et::BattlerFacade* pTarget , int cost)\r
-{\r
- m_pBattler = pBattler;\r
- if(pTarget != NULL)m_targetList.push_back(pTarget);\r
- m_cost = cost;\r
-}\r
-\r
-\r
-\r
-et::Action::Action(et::BattlerFacade* pBattler , std::vector<et::BattlerFacade*>& targetList , int cost)\r
-{\r
- m_pBattler = pBattler;\r
- m_targetList = targetList;\r
- m_cost = cost;\r
-}\r
-\r
-\r
-et::Action::~Action(void)\r
-{\r
-}\r
-\r
-void et::Action::setTargetList(std::vector<et::BattlerFacade*>& targetList){\r
- m_targetList = targetList;\r
-}\r
-\r
-std::vector<int> et::Action::doAction(){\r
- std::vector<int> result;\r
- et::BattlerParameter parameter = m_pBattler->getParameter();\r
- parameter.dActionPoint -= getAPCost();\r
- m_pBattler->setParameter(parameter);\r
- for(std::vector<BattlerFacade*>::iterator itr = m_targetList.begin() ; itr != m_targetList.end() ; ++itr){\r
- result.push_back(doActionTo(*itr));\r
- }\r
- return result;\r
-}\r
-\r
-mof::GraphicsSchedule* et::Action::createEffect(et::Common& common){\r
- mof::DataResource effectTable = common.m_pDataResourceManager->getResource(_T("data/effect/shock.csv"));\r
-\r
- mof::GraphicsSchedule* pSchedule = new mof::GraphicsSchedule();\r
-\r
- for(int i = 0 ; i < effectTable->getNumberOfRows() ; i++){\r
- mof::DataRow effectRow = mof::DataRow(effectTable , i);\r
-\r
- //---\83\82\81[\83V\83\87\83\93\82Ì\8d\\90¬\r
- mof::CascadeAnimation* pCascadeAnimation = new mof::CascadeAnimation();\r
- \r
- mof::KeyFrameAnimation* pCommonAnimation = new mof::KeyFrameAnimation();\r
- mof::Vector3D targetPosition = getTargetList().front()->getPosition();\r
- mof::Vector3D basePosition = m_pBattler->getGraphicsObject()->getPosition();\r
- //\83X\83P\81[\83\8b\82ð\8cv\8eZ\r
- mof::Vector3D scale = targetPosition - basePosition;\r
- //if(scale.x < 0)scale.x = -scale.x;\r
- scale.y = scale.z = 1.0;\r
- pCommonAnimation->setPosition(0 , basePosition);\r
- mof::AnimationResource resource(pCommonAnimation);\r
-\r
- mof::tstring motionName(effectRow.getData(_T("Motion")));\r
- mof::DataBasedAnimation* pMotionAnimation = new mof::DataBasedAnimation(motionName.c_str() , scale);\r
- pCascadeAnimation->setElement(0 , mof::AnimationResource(pMotionAnimation));\r
- \r
- \r
- pCascadeAnimation->setElement(1 , resource);\r
- mof::AnimationResource animation(pCascadeAnimation);\r
-\r
- //---\83I\83u\83W\83F\83N\83g\82Ì\8d\\90¬\r
- mof::tstring className(effectRow.getData(_T("Class")));\r
-\r
- mof::tstring textureName(effectRow.getData(_T("Texture")));\r
- if(textureName == _T(""))textureName = _T("null");\r
- mof::TextureResource texture = common.m_pTextureManager->getResource(textureName.c_str());\r
-\r
- if(className == _T("Billboard")){\r
- //\83r\83\8b\83{\81[\83h\r
- mof::GraphicsObject* pModel = new mof::Billboard(mof::Billboard::Y_FIXED , texture);\r
- pModel->setAnimation(0 , animation);\r
- pSchedule->add(20 , mof::GraphicsModelPtr(pModel) , animation);\r
- }\r
- else {\r
- //\83\81\83b\83V\83\85(className\82ªPath)\r
- mof::MeshResource pModel = common.m_pMeshManager->getResource(className.c_str());\r
- pModel->setTexture(0 , texture);\r
- pModel->setAnimation(0 , animation);\r
- pSchedule->add(20 , mof::GraphicsModelPtr(pModel) , animation);\r
- }\r
- \r
- }\r
- \r
- \r
- return pSchedule;\r
+#include "Action.h"
+#include "BattlerFacade.h"
+#include "mof/DataRow.h"
+#include "mof/DataBasedAnimation.h"
+#include "mof/KeyFrameAnimation.h"
+
+et::Action::Action(et::BattlerFacade* pBattler , et::BattlerFacade* pTarget , int cost)
+{
+ m_pBattler = pBattler;
+ if(pTarget != NULL)m_targetList.push_back(pTarget);
+ m_cost = cost;
+}
+
+
+
+et::Action::Action(et::BattlerFacade* pBattler , std::vector<et::BattlerFacade*>& targetList , int cost)
+{
+ m_pBattler = pBattler;
+ m_targetList = targetList;
+ m_cost = cost;
+}
+
+
+et::Action::~Action(void)
+{
+}
+
+void et::Action::setTargetList(std::vector<et::BattlerFacade*>& targetList){
+ m_targetList = targetList;
+}
+
+std::vector<int> et::Action::doAction(){
+ std::vector<int> result;
+ et::BattlerParameter parameter = m_pBattler->getParameter();
+ parameter.dActionPoint -= getAPCost();
+ m_pBattler->setParameter(parameter);
+ for(std::vector<BattlerFacade*>::iterator itr = m_targetList.begin() ; itr != m_targetList.end() ; ++itr){
+ result.push_back(doActionTo(*itr));
+ }
+ return result;
+}
+
+mof::GraphicsSchedule* et::Action::createEffect(et::Common& common){
+ mof::DataResource effectTable = common.m_pDataResourceManager->getResource(_T("data/effect/shock.csv"));
+
+ mof::GraphicsSchedule* pSchedule = new mof::GraphicsSchedule();
+
+ for(int i = 0 ; i < effectTable->getNumberOfRows() ; i++){
+ mof::DataRow effectRow = mof::DataRow(effectTable , i);
+
+ //---\83\82\81[\83V\83\87\83\93\82Ì\8d\\90¬
+ mof::CascadeAnimation* pCascadeAnimation = new mof::CascadeAnimation();
+
+ mof::KeyFrameAnimation* pCommonAnimation = new mof::KeyFrameAnimation();
+ mof::Vector3D targetPosition = getTargetList().front()->getPosition();
+ mof::Vector3D basePosition = m_pBattler->getGraphicsObject()->getPosition();
+ //\83X\83P\81[\83\8b\82ð\8cv\8eZ
+ mof::Vector3D scale = targetPosition - basePosition;
+ //if(scale.x < 0)scale.x = -scale.x;
+ scale.y = scale.z = 1.0;
+ pCommonAnimation->setPosition(0 , basePosition);
+ mof::AnimationResource resource(pCommonAnimation);
+
+ mof::tstring motionName(effectRow.getData(_T("Motion")));
+ mof::DataBasedAnimation* pMotionAnimation = new mof::DataBasedAnimation(motionName.c_str() , scale);
+ pCascadeAnimation->setElement(0 , mof::AnimationResource(pMotionAnimation));
+
+
+ pCascadeAnimation->setElement(1 , resource);
+ mof::AnimationResource animation(pCascadeAnimation);
+
+ //---\83I\83u\83W\83F\83N\83g\82Ì\8d\\90¬
+ mof::tstring className(effectRow.getData(_T("Class")));
+
+ mof::tstring textureName(effectRow.getData(_T("Texture")));
+ if(textureName == _T(""))textureName = _T("null");
+ mof::TextureResource texture = common.m_pTextureManager->getResource(textureName.c_str());
+
+ if(className == _T("Billboard")){
+ //\83r\83\8b\83{\81[\83h
+ mof::GraphicsObject* pModel = new mof::Billboard(mof::Billboard::Y_FIXED , texture);
+ pModel->setAnimation(0 , animation);
+ pSchedule->add(20 , mof::GraphicsModelPtr(pModel) , animation);
+ }
+ else {
+ //\83\81\83b\83V\83\85(className\82ªPath)
+ mof::MeshResource pModel = common.m_pMeshManager->getResource(className.c_str());
+ pModel->setTexture(0 , texture);
+ pModel->setAnimation(0 , animation);
+ pSchedule->add(20 , mof::GraphicsModelPtr(pModel) , animation);
+ }
+
+ }
+
+
+ return pSchedule;
}
\ No newline at end of file
-#pragma once\r
-\r
-#include <list>\r
-#include <vector>\r
-#include "mof/Graphics.h"\r
-#include "mof/GraphicsSchedule.h"\r
-#include "Common.h"\r
-\r
-namespace et{\r
- class BattlerFacade;\r
- \r
- class Action\r
- {\r
- std::vector<BattlerFacade*> m_targetList;\r
- protected:\r
- BattlerFacade* m_pBattler;\r
- virtual int doActionTo(et::BattlerFacade* pTarget) = 0;\r
- int m_cost;\r
- public:\r
- Action(et::BattlerFacade* pBattler , et::BattlerFacade* pTarget , int cost);\r
- Action(et::BattlerFacade* pBattler , std::vector<BattlerFacade*>& targetList , int cost);\r
- virtual ~Action(void);\r
- std::vector<int> doAction();\r
- std::vector<BattlerFacade*>& getTargetList(){return m_targetList;}\r
- void setTargetList(std::vector<BattlerFacade*>& targetList);\r
- int getAPCost(){return m_cost;}\r
- virtual mof::AnimationResource createApproachAnimation() = 0;\r
- virtual mof::AnimationResource createExecuteAnimation() = 0;\r
- virtual mof::tstring getActionMessage() = 0;\r
- virtual bool isDirectAttack(){return false;}\r
-\r
- virtual mof::GraphicsSchedule* createEffect(et::Common& common);\r
- };\r
-\r
-\r
+#pragma once
+
+#include <list>
+#include <vector>
+#include "mof/Graphics.h"
+#include "mof/GraphicsSchedule.h"
+#include "Common.h"
+
+namespace et{
+ class BattlerFacade;
+
+ class Action
+ {
+ std::vector<BattlerFacade*> m_targetList;
+ protected:
+ BattlerFacade* m_pBattler;
+ virtual int doActionTo(et::BattlerFacade* pTarget) = 0;
+ int m_cost;
+ public:
+ Action(et::BattlerFacade* pBattler , et::BattlerFacade* pTarget , int cost);
+ Action(et::BattlerFacade* pBattler , std::vector<BattlerFacade*>& targetList , int cost);
+ virtual ~Action(void);
+ std::vector<int> doAction();
+ std::vector<BattlerFacade*>& getTargetList(){return m_targetList;}
+ void setTargetList(std::vector<BattlerFacade*>& targetList);
+ int getAPCost(){return m_cost;}
+ virtual mof::AnimationResource createApproachAnimation() = 0;
+ virtual mof::AnimationResource createExecuteAnimation() = 0;
+ virtual mof::tstring getActionMessage() = 0;
+ virtual bool isDirectAttack(){return false;}
+
+ virtual mof::GraphicsSchedule* createEffect(et::Common& common);
+ };
+
+
}
\ No newline at end of file
-#include "Area.h"\r
-/*\r
-Area::Area(void)\r
-{\r
-}\r
-\r
-Area::~Area(void)\r
-{\r
-}*/\r
+#include "Area.h"
+/*
+Area::Area(void)
+{
+}
+
+Area::~Area(void)
+{
+}*/
-#pragma once\r
-#include "mof/GeneralMap.h"\r
-\r
-namespace et{\r
- struct AreaPowerLevel\r
- {\r
- int forest;\r
- int earth;\r
-\r
- AreaPowerLevel(){\r
- forest = earth = 0;\r
- }\r
-\r
- AreaPowerLevel(int _forest , int _earth){\r
- forest = _forest;\r
- _earth = earth;\r
- }\r
- };\r
-\r
- typedef mof::GeneralMap<et::AreaPowerLevel> AreaPowerLevelMap;\r
-\r
- \r
-\r
- struct Area{\r
- AreaPowerLevel powerLevel;\r
- bool forestGen;\r
- bool earthGen;\r
- bool town;\r
-\r
- public :\r
- Area(){\r
- forestGen = earthGen = false;\r
- town = false;\r
- }\r
- \r
- bool hasSomethingIcon(){\r
- return (forestGen || earthGen || town);\r
- }\r
- };\r
-\r
- typedef mof::GeneralMap<et::Area> AreaMap;\r
-\r
-\r
- \r
+#pragma once
+#include "mof/GeneralMap.h"
+
+namespace et{
+ struct AreaPowerLevel
+ {
+ int forest;
+ int earth;
+
+ AreaPowerLevel(){
+ forest = earth = 0;
+ }
+
+ AreaPowerLevel(int _forest , int _earth){
+ forest = _forest;
+ _earth = earth;
+ }
+ };
+
+ typedef mof::GeneralMap<et::AreaPowerLevel> AreaPowerLevelMap;
+
+
+
+ struct Area{
+ AreaPowerLevel powerLevel;
+ bool forestGen;
+ bool earthGen;
+ bool town;
+
+ public :
+ Area(){
+ forestGen = earthGen = false;
+ town = false;
+ }
+
+ bool hasSomethingIcon(){
+ return (forestGen || earthGen || town);
+ }
+ };
+
+ typedef mof::GeneralMap<et::Area> AreaMap;
+
+
+
};
\ No newline at end of file
-#include "AreaMenu.h"\r
-#include "mof/KeyFrameAnimation.h"\r
-#include "MyWindow.h"\r
-\r
-\r
-et::AreaMenu::AreaMenu(et::Area& area , mof::TextureManager* pTextureManager , \r
- et::World* pWorld , et::GameData* pGameData , mof::Vector2D& position)\r
-: et::MyFrame(mof::Line2D( 650 , 50 , 800 , 200) , true , pTextureManager->getResource(_T("image/frame0.png")) )\r
-{\r
- m_pTextureManager = pTextureManager;\r
- m_pWorld = pWorld;\r
- m_pGameData = pGameData;\r
- m_position = position;\r
- m_pSelector = NULL;\r
- std::vector<mof::Window*> selectables;\r
-\r
- mof::Window* pSelectable = NULL;\r
- add(mof::Sprite::createSpriteFromText(_T("\83G\83\8a\83A\83\81\83j\83\85\81[") , 16) );\r
- pSelectable = addSelectableTextItem(this , selectables , _T("\92¬\82ð\96K\96â") , 16);\r
- if(!area.town)pSelectable->setAvailable(false);\r
- pSelectable = addSelectableTextItem(this , selectables , _T("\83G\83\8c\83\81\83\93\83g") , 16);\r
- if(area.hasSomethingIcon())pSelectable->setAvailable(false);\r
- addSelectableTextItem(this , selectables , _T("\82à\82Ç\82é") , 16);\r
- m_pSelector = new mof::SelectionModel(selectables , mof::AnimationResource());\r
- setVisible(true);\r
-}\r
-\r
-\r
-\r
-\r
-et::AreaMenu::~AreaMenu(void)\r
-{\r
- delete m_pSelector;\r
-}\r
-\r
-\r
-\r
-\r
-void et::AreaMenu::setVisible(bool visible){\r
- et::MyFrame::setVisible(visible);\r
- if(visible){\r
- mof::KeyFrameAnimation* pAnimation = new mof::KeyFrameAnimation();\r
- pAnimation->setPosition(0 , mof::Vector2D(650 , 50));\r
- pAnimation->setPosition(7 , mof::Vector2D(440 , 50));\r
- mof::AnimationResource resource(pAnimation);\r
- m_pSelector->setMenuAnimation(resource);\r
- setAnimation(0 , resource);\r
- }\r
- else {\r
- mof::KeyFrameAnimation* pAnimation = new mof::KeyFrameAnimation();\r
- pAnimation->setPosition(0 , mof::Vector2D(440 , 50));\r
- pAnimation->setPosition(7 , mof::Vector2D(650 , 50));\r
- mof::AnimationResource resource(pAnimation);\r
- m_pSelector->setMenuAnimation(resource);\r
- setAnimation(0 , resource);\r
- }\r
-}\r
-\r
-et::MyFrame* et::AreaMenu::performAction(){\r
-\r
- switch(getSelectionModel()->getSelectingIndex()){\r
- case 1 : //\83G\83\8c\83\81\83\93\83g\94z\92u\r
- {\r
- et::Area area = m_pWorld->getArea(m_position.x , m_position.y);\r
- area.forestGen = true;\r
- m_pWorld->setArea(m_position.x , m_position.y , area);\r
- m_pGameData->addRegenerationEvent(et::RegenerationEvent::createForestGenEvent(m_pWorld->getTerm() , m_position));\r
- setVisible(false);\r
- return NULL;\r
- }\r
- case 2 : //\82à\82Ç\82é\r
- setVisible(false);\r
- return NULL;\r
- default :\r
- DEBUG_PRINT("\96¢\92è\8b`\82Ì\83A\83N\83V\83\87\83\93\82ª\97v\8b\81\82³\82ê\82Ü\82µ\82½");\r
- return NULL;\r
- }\r
- \r
-}\r
-\r
-mof::Window* et::AreaMenu::addSelectableTextItem(mof::Window* pOwner, std::vector<mof::Window*>& selectables , TCHAR* text , int size){\r
- mof::Window* pSelectable = new et::MyWindow(mof::Sprite::createSpriteFromText(text , size) , m_pTextureManager);\r
- pOwner->add(pSelectable);\r
- selectables.push_back(pSelectable);\r
- return pSelectable;\r
+#include "AreaMenu.h"
+#include "mof/KeyFrameAnimation.h"
+#include "MyWindow.h"
+
+
+et::AreaMenu::AreaMenu(et::Area& area , mof::TextureManager* pTextureManager ,
+ et::World* pWorld , et::GameData* pGameData , mof::Vector2D& position)
+: et::MyFrame(mof::Line2D( 650 , 50 , 800 , 200) , true , pTextureManager->getResource(_T("image/frame0.png")) )
+{
+ m_pTextureManager = pTextureManager;
+ m_pWorld = pWorld;
+ m_pGameData = pGameData;
+ m_position = position;
+ m_pSelector = NULL;
+ std::vector<mof::Window*> selectables;
+
+ mof::Window* pSelectable = NULL;
+ add(mof::Sprite::createSpriteFromText(_T("\83G\83\8a\83A\83\81\83j\83\85\81[") , 16) );
+ pSelectable = addSelectableTextItem(this , selectables , _T("\92¬\82ð\96K\96â") , 16);
+ if(!area.town)pSelectable->setAvailable(false);
+ pSelectable = addSelectableTextItem(this , selectables , _T("\83G\83\8c\83\81\83\93\83g") , 16);
+ if(area.hasSomethingIcon())pSelectable->setAvailable(false);
+ addSelectableTextItem(this , selectables , _T("\82à\82Ç\82é") , 16);
+ m_pSelector = new mof::SelectionModel(selectables , mof::AnimationResource());
+ setVisible(true);
+}
+
+
+
+
+et::AreaMenu::~AreaMenu(void)
+{
+ delete m_pSelector;
+}
+
+
+
+
+void et::AreaMenu::setVisible(bool visible){
+ et::MyFrame::setVisible(visible);
+ if(visible){
+ mof::KeyFrameAnimation* pAnimation = new mof::KeyFrameAnimation();
+ pAnimation->setPosition(0 , mof::Vector2D(650 , 50));
+ pAnimation->setPosition(7 , mof::Vector2D(440 , 50));
+ mof::AnimationResource resource(pAnimation);
+ m_pSelector->setMenuAnimation(resource);
+ setAnimation(0 , resource);
+ }
+ else {
+ mof::KeyFrameAnimation* pAnimation = new mof::KeyFrameAnimation();
+ pAnimation->setPosition(0 , mof::Vector2D(440 , 50));
+ pAnimation->setPosition(7 , mof::Vector2D(650 , 50));
+ mof::AnimationResource resource(pAnimation);
+ m_pSelector->setMenuAnimation(resource);
+ setAnimation(0 , resource);
+ }
+}
+
+et::MyFrame* et::AreaMenu::performAction(){
+
+ switch(getSelectionModel()->getSelectingIndex()){
+ case 1 : //\83G\83\8c\83\81\83\93\83g\94z\92u
+ {
+ et::Area area = m_pWorld->getArea(m_position.x , m_position.y);
+ area.forestGen = true;
+ m_pWorld->setArea(m_position.x , m_position.y , area);
+ m_pGameData->addRegenerationEvent(et::RegenerationEvent::createForestGenEvent(m_pWorld->getTerm() , m_position));
+ setVisible(false);
+ return NULL;
+ }
+ case 2 : //\82à\82Ç\82é
+ setVisible(false);
+ return NULL;
+ default :
+ DEBUG_PRINT("\96¢\92è\8b`\82Ì\83A\83N\83V\83\87\83\93\82ª\97v\8b\81\82³\82ê\82Ü\82µ\82½");
+ return NULL;
+ }
+
+}
+
+mof::Window* et::AreaMenu::addSelectableTextItem(mof::Window* pOwner, std::vector<mof::Window*>& selectables , TCHAR* text , int size){
+ mof::Window* pSelectable = new et::MyWindow(mof::Sprite::createSpriteFromText(text , size) , m_pTextureManager);
+ pOwner->add(pSelectable);
+ selectables.push_back(pSelectable);
+ return pSelectable;
}
\ No newline at end of file
-#pragma once\r
-#include "mof/SelectionModel.h"\r
-#include "MyFrame.h"\r
-#include "Area.h"\r
-#include "World.h"\r
-#include "GameData.h"\r
-\r
-\r
-namespace et{\r
-\r
- class AreaMenu : public MyFrame{\r
- mof::Window* addSelectableTextItem(mof::Window* pOwner , std::vector<mof::Window*>& selectables , TCHAR* text , int size);\r
-\r
- mof::SelectionModel* m_pSelector;\r
- mof::TextureManager* m_pTextureManager;\r
- et::World* m_pWorld;\r
- et::GameData* m_pGameData;\r
- mof::Vector2D m_position;\r
- public:\r
- AreaMenu(et::Area& area , mof::TextureManager* pTextureManager , et::World* pWorld , et::GameData* m_pGameData , mof::Vector2D& position);\r
- virtual ~AreaMenu();\r
- virtual void setVisible(bool visible);\r
-\r
- virtual mof::SelectionModel* getSelectionModel(){return m_pSelector;}\r
- virtual et::MyFrame* performAction();\r
-\r
- };\r
-\r
-\r
-\r
+#pragma once
+#include "mof/SelectionModel.h"
+#include "MyFrame.h"
+#include "Area.h"
+#include "World.h"
+#include "GameData.h"
+
+
+namespace et{
+
+ class AreaMenu : public MyFrame{
+ mof::Window* addSelectableTextItem(mof::Window* pOwner , std::vector<mof::Window*>& selectables , TCHAR* text , int size);
+
+ mof::SelectionModel* m_pSelector;
+ mof::TextureManager* m_pTextureManager;
+ et::World* m_pWorld;
+ et::GameData* m_pGameData;
+ mof::Vector2D m_position;
+ public:
+ AreaMenu(et::Area& area , mof::TextureManager* pTextureManager , et::World* pWorld , et::GameData* m_pGameData , mof::Vector2D& position);
+ virtual ~AreaMenu();
+ virtual void setVisible(bool visible);
+
+ virtual mof::SelectionModel* getSelectionModel(){return m_pSelector;}
+ virtual et::MyFrame* performAction();
+
+ };
+
+
+
};
\ No newline at end of file
-#include "AttackAction.h"\r
-#include "BattlerFacade.h"\r
-\r
-\r
-\r
-et::AttackAction::AttackAction(et::BattlerFacade* pBattler , et::BattlerFacade* pTarget , int cost , float correction)\r
-: Action(pBattler , pTarget , cost)\r
-{\r
- m_correction = correction;\r
-}\r
-\r
-et::AttackAction::~AttackAction(void)\r
-{\r
-}\r
-\r
-\r
-int et::AttackAction::doActionTo(et::BattlerFacade* pTarget){\r
- float totalPower = (float)m_pBattler->getParameter().attack * m_correction;\r
- int damage = (int)totalPower - pTarget->getParameter().diffence;\r
- if(m_pBattler->getParameter().critical)damage = (int)totalPower;\r
- if(pTarget->getParameter().guard)damage *= 0.5;//\83K\81[\83h\92\86\82È\82Ç\83_\83\81\81[\83W\82ª\94¼\95ª\82É\r
- if(damage < 0)damage = 0;\r
- int effect = -damage;\r
-\r
- et::BattlerParameter parameter = pTarget->getParameter();\r
- if(parameter.hp <= damage){\r
- parameter.hp = 0;\r
- parameter.alive = false;\r
- }\r
- else parameter.hp -= damage;\r
- parameter.dActionPoint += 1;\r
- pTarget->setParameter(parameter);\r
- return effect;\r
-}\r
-\r
-mof::AnimationResource et::AttackAction::createApproachAnimation(){\r
- mof::Vector3D targetPosition = getTargetList().front()->getPosition();\r
- targetPosition.x += (m_pBattler->getType() == et::ENEMY)? -0.2f : 0.2f;\r
- return m_pBattler->setMovingAnimation(targetPosition , 15);\r
-}\r
-\r
-\r
-mof::AnimationResource et::AttackAction::createExecuteAnimation(){\r
- return m_pBattler->setCastAnimation(0);\r
-}\r
-\r
-mof::tstring et::AttackAction::getActionMessage(){\r
- return mof::tstring(_T(""));\r
+#include "AttackAction.h"
+#include "BattlerFacade.h"
+
+
+
+et::AttackAction::AttackAction(et::BattlerFacade* pBattler , et::BattlerFacade* pTarget , int cost , float correction)
+: Action(pBattler , pTarget , cost)
+{
+ m_correction = correction;
+}
+
+et::AttackAction::~AttackAction(void)
+{
+}
+
+
+int et::AttackAction::doActionTo(et::BattlerFacade* pTarget){
+ float totalPower = (float)m_pBattler->getParameter().attack * m_correction;
+ int damage = (int)totalPower - pTarget->getParameter().diffence;
+ if(m_pBattler->getParameter().critical)damage = (int)totalPower;
+ if(pTarget->getParameter().guard)damage *= 0.5;//\83K\81[\83h\92\86\82È\82Ç\83_\83\81\81[\83W\82ª\94¼\95ª\82É
+ if(damage < 0)damage = 0;
+ int effect = -damage;
+
+ et::BattlerParameter parameter = pTarget->getParameter();
+ if(parameter.hp <= damage){
+ parameter.hp = 0;
+ parameter.alive = false;
+ }
+ else parameter.hp -= damage;
+ parameter.dActionPoint += 1;
+ pTarget->setParameter(parameter);
+ return effect;
+}
+
+mof::AnimationResource et::AttackAction::createApproachAnimation(){
+ mof::Vector3D targetPosition = getTargetList().front()->getPosition();
+ targetPosition.x += (m_pBattler->getType() == et::ENEMY)? -0.2f : 0.2f;
+ return m_pBattler->setMovingAnimation(targetPosition , 15);
+}
+
+
+mof::AnimationResource et::AttackAction::createExecuteAnimation(){
+ return m_pBattler->setCastAnimation(0);
+}
+
+mof::tstring et::AttackAction::getActionMessage(){
+ return mof::tstring(_T(""));
}
\ No newline at end of file
-#pragma once\r
-#include "Action.h"\r
-\r
-\r
-namespace et{\r
- class AttackAction : public Action\r
- {\r
- float m_correction;\r
- public:\r
- AttackAction(et::BattlerFacade* pBattler , et::BattlerFacade* pTarget , int cost , float correction = 1.0f);\r
- virtual ~AttackAction(void);\r
- virtual int doActionTo(et::BattlerFacade* pTarget);\r
- virtual mof::AnimationResource createApproachAnimation();\r
- virtual mof::AnimationResource createExecuteAnimation();\r
- virtual mof::tstring getActionMessage();\r
- virtual bool isDirectAttack(){return true;}\r
- };\r
-\r
-\r
+#pragma once
+#include "Action.h"
+
+
+namespace et{
+ class AttackAction : public Action
+ {
+ float m_correction;
+ public:
+ AttackAction(et::BattlerFacade* pBattler , et::BattlerFacade* pTarget , int cost , float correction = 1.0f);
+ virtual ~AttackAction(void);
+ virtual int doActionTo(et::BattlerFacade* pTarget);
+ virtual mof::AnimationResource createApproachAnimation();
+ virtual mof::AnimationResource createExecuteAnimation();
+ virtual mof::tstring getActionMessage();
+ virtual bool isDirectAttack(){return true;}
+ };
+
+
}
\ No newline at end of file
-#include "BattleAI.h"\r
-\r
-\r
-et::BattleAI::BattleAI(mof::DataResourceManager* pDataResourceManager)\r
-: m_pDataResourceManager(pDataResourceManager)\r
-{\r
-}\r
-\r
-et::BattleAI::~BattleAI(){\r
-\r
-}\r
+#include "BattleAI.h"
+
+
+et::BattleAI::BattleAI(mof::DataResourceManager* pDataResourceManager)
+: m_pDataResourceManager(pDataResourceManager)
+{
+}
+
+et::BattleAI::~BattleAI(){
+
+}
-#pragma once\r
-#include "mof/DataTable.h"\r
-\r
-namespace et{\r
- class Action;\r
- class BattlerGroup;\r
- class DataBasedBattler;\r
-\r
- class BattleAI\r
- {\r
- protected:\r
- mof::DataResourceManager* m_pDataResourceManager;\r
- public:\r
- BattleAI(mof::DataResourceManager* pDataResoourceManager);\r
- virtual ~BattleAI(void);\r
- virtual Action* createAction(DataBasedBattler* pOwn , BattlerGroup* pGroup) = 0;\r
- };\r
-\r
-}\r
+#pragma once
+#include "mof/DataTable.h"
+
+namespace et{
+ class Action;
+ class BattlerGroup;
+ class DataBasedBattler;
+
+ class BattleAI
+ {
+ protected:
+ mof::DataResourceManager* m_pDataResourceManager;
+ public:
+ BattleAI(mof::DataResourceManager* pDataResoourceManager);
+ virtual ~BattleAI(void);
+ virtual Action* createAction(DataBasedBattler* pOwn , BattlerGroup* pGroup) = 0;
+ };
+
+}
-#include "BattleData.h"\r
-#include "mof/KeyFrameAnimation.h"\r
-#include "AttackAction.h"\r
-#include "SpecialAction.h"\r
-#include "GameData.h"\r
-#include "BattlerGroup.h"\r
-#include "BattlerFacade.h"\r
-\r
-\r
-et::BattleData::BattleData(mof::TextureManager* pTextureManager , et::GameData* pGameData , et::BattlerGroup* pGroup)\r
-{\r
- m_pGameData = pGameData;\r
- m_pTextureManager = pTextureManager;\r
- m_battleAction.type = BattleAction::NONE;\r
- et::BattlerParameter parameter;\r
- m_pGroup = pGroup;\r
- //m_battlerList.push_back(new Battler(parameter , m_pTextureManager));\r
-}\r
-\r
-et::BattleData::~BattleData(void)\r
-{\r
- delete m_pGroup;\r
-}\r
-\r
-\r
-\r
-/*\r
-void et::BattleData::addBattler(et::BattlerFacade* pBattler){\r
- m_battlerList.push_back(pBattler);\r
-}\r
-\r
-\r
-void et::BattleData::layoutBattler(){\r
- int nEnemy = 0;\r
- int nIdeal = 0;\r
- \r
- //\91O\92²\8d¸\r
- for(std::list<BattlerFacade*>::iterator itr = m_battlerList.begin() ; itr != m_battlerList.end() ; ++itr){\r
- if((*itr)->getType() == et::ENEMY)nEnemy++;\r
- else if((*itr)->getType() == et::IDEAL)nIdeal++;\r
- }\r
-\r
- int cntEnemy = 0;\r
- int cntIdeal = 0;\r
- float zTable[3][3] = { {0.6f , 0.6f , 0.6f} , { 0.8f , 0.4f , 0.6f} , {0.86f , 0.6f , 0.34f} };//[\91\8d\90\94][\94Ô\8d\86]\r
- float xTable[3][3] = { {0.0f , 0.0f , 0.0f} , { 0.1f , -0.1f , 0.6f} , {0.15f , 0.0f , -0.15f} };//[\91\8d\90\94][\94Ô\8d\86]\r
- float ixTable[3][3] = { {0.2f , 0.0f , 0.0f} , { 0.0f , 0.07f , 0.6f} , {0.0f , 0.1f , 0.15f} };//[\91\8d\90\94][\94Ô\8d\86]\r
- for(std::list<BattlerFacade*>::iterator itr = m_battlerList.begin() ; itr != m_battlerList.end() ; ++itr){\r
- if((*itr)->getType() == et::HERO){\r
- (*itr)->setAidlingAnimation(mof::Vector3D(0.3f , 0.0f , 0.6f));\r
- (*itr)->setBasePosition(mof::Vector3D(0.3f , 0.0f , 0.6f));\r
- }\r
- else if((*itr)->getType() == et::ENEMY){\r
- mof::KeyFrameAnimation* pAnimation = new mof::KeyFrameAnimation();\r
- (*itr)->setAidlingAnimation(mof::Vector3D(-0.45f + xTable[nEnemy-1][cntEnemy] , 0.0f , zTable[nEnemy-1][cntEnemy]));\r
- (*itr)->setBasePosition(mof::Vector3D(-0.45f + xTable[nEnemy-1][cntEnemy] , 0.0f , zTable[nEnemy-1][cntEnemy]));\r
- cntEnemy++; \r
- }\r
- else if((*itr)->getType() == et::IDEAL){\r
- mof::KeyFrameAnimation* pAnimation = new mof::KeyFrameAnimation();\r
- (*itr)->setAidlingAnimation(mof::Vector3D(0.6 +ixTable[nIdeal-1][cntIdeal] , 0.0f , zTable[nIdeal-1][cntIdeal]));\r
- cntIdeal++; \r
- }\r
- }\r
-\r
-}\r
-\r
-\r
-et::BattlerFacade* et::BattleData::getHeroBattler(){\r
- for(std::list<BattlerFacade*>::iterator itr = m_battlerList.begin() ; itr != m_battlerList.end() ; ++itr){\r
- if((*itr)->getType() == et::HERO){\r
- return *itr;\r
- }\r
- }\r
- assert(0);\r
- return NULL;\r
-}\r
-\r
-et::BattlerFacade* et::BattleData::getEnemyBattler(int index){\r
- int cntEnemy = 0;\r
- for(std::list<BattlerFacade*>::iterator itr = m_battlerList.begin() ; itr != m_battlerList.end() ; ++itr){\r
- if((*itr)->getType() == et::ENEMY){\r
- if(cntEnemy++ == index)return *itr;\r
- }\r
- }\r
- return NULL;\r
-\r
-}\r
-\r
-\r
-et::BattlerFacade* et::BattleData::getIdealBattler(int index){\r
- int cntIdeal = 0;\r
- for(std::list<BattlerFacade*>::iterator itr = m_battlerList.begin() ; itr != m_battlerList.end() ; ++itr){\r
- if((*itr)->getType() == et::IDEAL){\r
- if(cntIdeal++ == index)return *itr;\r
- }\r
- }\r
- return NULL;\r
-}\r
-\r
-\r
-et::Action* et::BattleData::createBattlerAction(et::BattlerFacade* pBattler){\r
- if(pBattler->getType() == et::HERO){\r
- et::BattleAction action = m_battleAction;\r
- m_battleAction.type = et::BattleAction::NONE;\r
- if(action.type == et::BattleAction::ATTACK_WEAPON){\r
- return new AttackAction(pBattler , action.pTarget , 3);\r
- }\r
- else if(action.type == et::BattleAction::WAIT || action.type == et::BattleAction::GUARD){\r
- return NULL;\r
- }\r
- else if(action.type == et::BattleAction::CAST){\r
- et::BattlerFacade* pIdeal = getIdealBattler(action.idealIndex);\r
- et::BattlerParameter parameter = pIdeal->getParameter();\r
- parameter.dActionPoint -= 5;\r
- pIdeal->setParameter(parameter);\r
- std::list<et::BattlerFacade*> targetList;\r
- if(action.pTarget != NULL)targetList.push_back(action.pTarget);\r
- else {\r
- for(std::list<et::BattlerFacade*>::const_iterator itr = getBattlerList().begin() ; itr != getBattlerList().end() ; ++itr){\r
- if((*itr)->getType() == et::ENEMY && (*itr)->getParameter().alive)targetList.push_back(*itr);\r
- }\r
- }\r
- //\93Á\8eê\8bZ\82Ì\8eí\97Þ\82ð\93¾\82é\r
- return new SpecialAction(pBattler , targetList , 5 , action.idealIndex);\r
- }\r
- else if(action.type == et::BattleAction::USE_ITEM){\r
- //\83A\83C\83e\83\80\82ð\82È\82\82·\r
- std::list<et::ItemData> &refList = getItemList();\r
- for(std::list<et::ItemData>::iterator itr = refList.begin() ; itr != refList.end() ; ++itr){\r
- if(action.pTargetItem == &(*itr)){\r
- refList.erase(itr);\r
- break;\r
- }\r
- }\r
- std::list<et::BattlerFacade*> targetList;\r
- if(action.pTarget != NULL)targetList.push_back(action.pTarget);\r
- else {\r
- for(std::list<et::BattlerFacade*>::const_iterator itr = getBattlerList().begin() ; itr != getBattlerList().end() ; ++itr){\r
- if((*itr)->getType() == et::ENEMY && (*itr)->getParameter().alive)targetList.push_back(*itr);\r
- }\r
- }\r
- //\93Á\8eê\8bZ\82Ì\8eí\97Þ\82ð\93¾\82é\r
- return new SpecialAction(pBattler , targetList , 2 , 3);\r
- }\r
- else return NULL;\r
- }\r
- else {\r
- std::list<BattlerFacade*> enemyList;\r
- enemyList.push_back(getHeroBattler());\r
- std::list<BattlerFacade*> allyList;\r
- for(std::list<BattlerFacade*>::iterator itr = m_battlerList.begin() ; itr != m_battlerList.end() ; ++itr){\r
- if((*itr)->getType() == et::ENEMY && *itr != pBattler)allyList.push_back(*itr);\r
- }\r
- return pBattler->createNextAction(enemyList , allyList);\r
- \r
- }\r
-\r
-}*/\r
-\r
-et::BattleAction et::BattleData::pollBattleAction(){\r
- BattleAction action = m_battleAction;\r
- m_battleAction.type = BattleAction::NONE;\r
- return action;\r
-}\r
-\r
-bool et::BattleData::isOver(){\r
- if(!m_pGroup->getHeroBattler()->getParameter().alive)return true;\r
- //et::BattlerFacade* pEnemy = NULL;\r
- return m_pGroup->getEnemyBattlerListAlive().size() == 0;\r
- /*for(int i = 0 ; (pEnemy = m_pGroup->getEnemyBattlerAt(i)) != NULL ; i++){\r
- if(pEnemy->getParameter().alive)return false;\r
- }\r
- return true;*/\r
- \r
-}\r
-\r
-\r
-std::list<et::ItemData>& et::BattleData::getItemList(){\r
- return m_pGameData->getBattleItemList();\r
-}\r
+#include "BattleData.h"
+#include "mof/KeyFrameAnimation.h"
+#include "AttackAction.h"
+#include "SpecialAction.h"
+#include "GameData.h"
+#include "BattlerGroup.h"
+#include "BattlerFacade.h"
+
+
+et::BattleData::BattleData(mof::TextureManager* pTextureManager , et::GameData* pGameData , et::BattlerGroup* pGroup)
+{
+ m_pGameData = pGameData;
+ m_pTextureManager = pTextureManager;
+ m_battleAction.type = BattleAction::NONE;
+ et::BattlerParameter parameter;
+ m_pGroup = pGroup;
+ //m_battlerList.push_back(new Battler(parameter , m_pTextureManager));
+}
+
+et::BattleData::~BattleData(void)
+{
+ delete m_pGroup;
+}
+
+
+
+/*
+void et::BattleData::addBattler(et::BattlerFacade* pBattler){
+ m_battlerList.push_back(pBattler);
+}
+
+
+void et::BattleData::layoutBattler(){
+ int nEnemy = 0;
+ int nIdeal = 0;
+
+ //\91O\92²\8d¸
+ for(std::list<BattlerFacade*>::iterator itr = m_battlerList.begin() ; itr != m_battlerList.end() ; ++itr){
+ if((*itr)->getType() == et::ENEMY)nEnemy++;
+ else if((*itr)->getType() == et::IDEAL)nIdeal++;
+ }
+
+ int cntEnemy = 0;
+ int cntIdeal = 0;
+ float zTable[3][3] = { {0.6f , 0.6f , 0.6f} , { 0.8f , 0.4f , 0.6f} , {0.86f , 0.6f , 0.34f} };//[\91\8d\90\94][\94Ô\8d\86]
+ float xTable[3][3] = { {0.0f , 0.0f , 0.0f} , { 0.1f , -0.1f , 0.6f} , {0.15f , 0.0f , -0.15f} };//[\91\8d\90\94][\94Ô\8d\86]
+ float ixTable[3][3] = { {0.2f , 0.0f , 0.0f} , { 0.0f , 0.07f , 0.6f} , {0.0f , 0.1f , 0.15f} };//[\91\8d\90\94][\94Ô\8d\86]
+ for(std::list<BattlerFacade*>::iterator itr = m_battlerList.begin() ; itr != m_battlerList.end() ; ++itr){
+ if((*itr)->getType() == et::HERO){
+ (*itr)->setAidlingAnimation(mof::Vector3D(0.3f , 0.0f , 0.6f));
+ (*itr)->setBasePosition(mof::Vector3D(0.3f , 0.0f , 0.6f));
+ }
+ else if((*itr)->getType() == et::ENEMY){
+ mof::KeyFrameAnimation* pAnimation = new mof::KeyFrameAnimation();
+ (*itr)->setAidlingAnimation(mof::Vector3D(-0.45f + xTable[nEnemy-1][cntEnemy] , 0.0f , zTable[nEnemy-1][cntEnemy]));
+ (*itr)->setBasePosition(mof::Vector3D(-0.45f + xTable[nEnemy-1][cntEnemy] , 0.0f , zTable[nEnemy-1][cntEnemy]));
+ cntEnemy++;
+ }
+ else if((*itr)->getType() == et::IDEAL){
+ mof::KeyFrameAnimation* pAnimation = new mof::KeyFrameAnimation();
+ (*itr)->setAidlingAnimation(mof::Vector3D(0.6 +ixTable[nIdeal-1][cntIdeal] , 0.0f , zTable[nIdeal-1][cntIdeal]));
+ cntIdeal++;
+ }
+ }
+
+}
+
+
+et::BattlerFacade* et::BattleData::getHeroBattler(){
+ for(std::list<BattlerFacade*>::iterator itr = m_battlerList.begin() ; itr != m_battlerList.end() ; ++itr){
+ if((*itr)->getType() == et::HERO){
+ return *itr;
+ }
+ }
+ assert(0);
+ return NULL;
+}
+
+et::BattlerFacade* et::BattleData::getEnemyBattler(int index){
+ int cntEnemy = 0;
+ for(std::list<BattlerFacade*>::iterator itr = m_battlerList.begin() ; itr != m_battlerList.end() ; ++itr){
+ if((*itr)->getType() == et::ENEMY){
+ if(cntEnemy++ == index)return *itr;
+ }
+ }
+ return NULL;
+
+}
+
+
+et::BattlerFacade* et::BattleData::getIdealBattler(int index){
+ int cntIdeal = 0;
+ for(std::list<BattlerFacade*>::iterator itr = m_battlerList.begin() ; itr != m_battlerList.end() ; ++itr){
+ if((*itr)->getType() == et::IDEAL){
+ if(cntIdeal++ == index)return *itr;
+ }
+ }
+ return NULL;
+}
+
+
+et::Action* et::BattleData::createBattlerAction(et::BattlerFacade* pBattler){
+ if(pBattler->getType() == et::HERO){
+ et::BattleAction action = m_battleAction;
+ m_battleAction.type = et::BattleAction::NONE;
+ if(action.type == et::BattleAction::ATTACK_WEAPON){
+ return new AttackAction(pBattler , action.pTarget , 3);
+ }
+ else if(action.type == et::BattleAction::WAIT || action.type == et::BattleAction::GUARD){
+ return NULL;
+ }
+ else if(action.type == et::BattleAction::CAST){
+ et::BattlerFacade* pIdeal = getIdealBattler(action.idealIndex);
+ et::BattlerParameter parameter = pIdeal->getParameter();
+ parameter.dActionPoint -= 5;
+ pIdeal->setParameter(parameter);
+ std::list<et::BattlerFacade*> targetList;
+ if(action.pTarget != NULL)targetList.push_back(action.pTarget);
+ else {
+ for(std::list<et::BattlerFacade*>::const_iterator itr = getBattlerList().begin() ; itr != getBattlerList().end() ; ++itr){
+ if((*itr)->getType() == et::ENEMY && (*itr)->getParameter().alive)targetList.push_back(*itr);
+ }
+ }
+ //\93Á\8eê\8bZ\82Ì\8eí\97Þ\82ð\93¾\82é
+ return new SpecialAction(pBattler , targetList , 5 , action.idealIndex);
+ }
+ else if(action.type == et::BattleAction::USE_ITEM){
+ //\83A\83C\83e\83\80\82ð\82È\82\82·
+ std::list<et::ItemData> &refList = getItemList();
+ for(std::list<et::ItemData>::iterator itr = refList.begin() ; itr != refList.end() ; ++itr){
+ if(action.pTargetItem == &(*itr)){
+ refList.erase(itr);
+ break;
+ }
+ }
+ std::list<et::BattlerFacade*> targetList;
+ if(action.pTarget != NULL)targetList.push_back(action.pTarget);
+ else {
+ for(std::list<et::BattlerFacade*>::const_iterator itr = getBattlerList().begin() ; itr != getBattlerList().end() ; ++itr){
+ if((*itr)->getType() == et::ENEMY && (*itr)->getParameter().alive)targetList.push_back(*itr);
+ }
+ }
+ //\93Á\8eê\8bZ\82Ì\8eí\97Þ\82ð\93¾\82é
+ return new SpecialAction(pBattler , targetList , 2 , 3);
+ }
+ else return NULL;
+ }
+ else {
+ std::list<BattlerFacade*> enemyList;
+ enemyList.push_back(getHeroBattler());
+ std::list<BattlerFacade*> allyList;
+ for(std::list<BattlerFacade*>::iterator itr = m_battlerList.begin() ; itr != m_battlerList.end() ; ++itr){
+ if((*itr)->getType() == et::ENEMY && *itr != pBattler)allyList.push_back(*itr);
+ }
+ return pBattler->createNextAction(enemyList , allyList);
+
+ }
+
+}*/
+
+et::BattleAction et::BattleData::pollBattleAction(){
+ BattleAction action = m_battleAction;
+ m_battleAction.type = BattleAction::NONE;
+ return action;
+}
+
+bool et::BattleData::isOver(){
+ if(!m_pGroup->getHeroBattler()->getParameter().alive)return true;
+ //et::BattlerFacade* pEnemy = NULL;
+ return m_pGroup->getEnemyBattlerListAlive().size() == 0;
+ /*for(int i = 0 ; (pEnemy = m_pGroup->getEnemyBattlerAt(i)) != NULL ; i++){
+ if(pEnemy->getParameter().alive)return false;
+ }
+ return true;*/
+
+}
+
+
+std::list<et::ItemData>& et::BattleData::getItemList(){
+ return m_pGameData->getBattleItemList();
+}
-#include "BattleData.h"\r
-#include "mof/KeyFrameAnimation.h"\r
-#include "AttackAction.h"\r
-#include "SpecialAction.h"\r
-#include "GameData.h"\r
-#include "BattlerGroup.h"\r
-#include "BattlerFacade.h"\r
-\r
-et::BattleData::BattleData(mof::TextureManager* pTextureManager , et::GameData* pGameData , et::BattlerGroup* pGroup)\r
-{\r
- m_pGameData = pGameData;\r
- m_pTextureManager = pTextureManager;\r
- m_battleAction.type = BattleAction::NONE;\r
- et::BattlerParameter parameter;\r
- m_pGroup = pGroup;\r
- //m_battlerList.push_back(new Battler(parameter , m_pTextureManager));\r
-}\r
-\r
-et::BattleData::~BattleData(void)\r
-{\r
- delete m_pGroup;\r
-}\r
-\r
-\r
-\r
-/*\r
-void et::BattleData::addBattler(et::BattlerFacade* pBattler){\r
- m_battlerList.push_back(pBattler);\r
-}\r
-\r
-\r
-void et::BattleData::layoutBattler(){\r
- int nEnemy = 0;\r
- int nIdeal = 0;\r
- \r
- //\91O\92²\8d¸\r
- for(std::list<BattlerFacade*>::iterator itr = m_battlerList.begin() ; itr != m_battlerList.end() ; ++itr){\r
- if((*itr)->getType() == et::ENEMY)nEnemy++;\r
- else if((*itr)->getType() == et::IDEAL)nIdeal++;\r
- }\r
-\r
- int cntEnemy = 0;\r
- int cntIdeal = 0;\r
- float zTable[3][3] = { {0.6f , 0.6f , 0.6f} , { 0.8f , 0.4f , 0.6f} , {0.86f , 0.6f , 0.34f} };//[\91\8d\90\94][\94Ô\8d\86]\r
- float xTable[3][3] = { {0.0f , 0.0f , 0.0f} , { 0.1f , -0.1f , 0.6f} , {0.15f , 0.0f , -0.15f} };//[\91\8d\90\94][\94Ô\8d\86]\r
- float ixTable[3][3] = { {0.2f , 0.0f , 0.0f} , { 0.0f , 0.07f , 0.6f} , {0.0f , 0.1f , 0.15f} };//[\91\8d\90\94][\94Ô\8d\86]\r
- for(std::list<BattlerFacade*>::iterator itr = m_battlerList.begin() ; itr != m_battlerList.end() ; ++itr){\r
- if((*itr)->getType() == et::HERO){\r
- (*itr)->setAidlingAnimation(mof::Vector3D(0.3f , 0.0f , 0.6f));\r
- (*itr)->setBasePosition(mof::Vector3D(0.3f , 0.0f , 0.6f));\r
- }\r
- else if((*itr)->getType() == et::ENEMY){\r
- mof::KeyFrameAnimation* pAnimation = new mof::KeyFrameAnimation();\r
- (*itr)->setAidlingAnimation(mof::Vector3D(-0.45f + xTable[nEnemy-1][cntEnemy] , 0.0f , zTable[nEnemy-1][cntEnemy]));\r
- (*itr)->setBasePosition(mof::Vector3D(-0.45f + xTable[nEnemy-1][cntEnemy] , 0.0f , zTable[nEnemy-1][cntEnemy]));\r
- cntEnemy++; \r
- }\r
- else if((*itr)->getType() == et::IDEAL){\r
- mof::KeyFrameAnimation* pAnimation = new mof::KeyFrameAnimation();\r
- (*itr)->setAidlingAnimation(mof::Vector3D(0.6 +ixTable[nIdeal-1][cntIdeal] , 0.0f , zTable[nIdeal-1][cntIdeal]));\r
- cntIdeal++; \r
- }\r
- }\r
-\r
-}\r
-\r
-\r
-et::BattlerFacade* et::BattleData::getHeroBattler(){\r
- for(std::list<BattlerFacade*>::iterator itr = m_battlerList.begin() ; itr != m_battlerList.end() ; ++itr){\r
- if((*itr)->getType() == et::HERO){\r
- return *itr;\r
- }\r
- }\r
- assert(0);\r
- return NULL;\r
-}\r
-\r
-et::BattlerFacade* et::BattleData::getEnemyBattler(int index){\r
- int cntEnemy = 0;\r
- for(std::list<BattlerFacade*>::iterator itr = m_battlerList.begin() ; itr != m_battlerList.end() ; ++itr){\r
- if((*itr)->getType() == et::ENEMY){\r
- if(cntEnemy++ == index)return *itr;\r
- }\r
- }\r
- return NULL;\r
-\r
-}\r
-\r
-\r
-et::BattlerFacade* et::BattleData::getIdealBattler(int index){\r
- int cntIdeal = 0;\r
- for(std::list<BattlerFacade*>::iterator itr = m_battlerList.begin() ; itr != m_battlerList.end() ; ++itr){\r
- if((*itr)->getType() == et::IDEAL){\r
- if(cntIdeal++ == index)return *itr;\r
- }\r
- }\r
- return NULL;\r
-}\r
-\r
-\r
-et::Action* et::BattleData::createBattlerAction(et::BattlerFacade* pBattler){\r
- if(pBattler->getType() == et::HERO){\r
- et::BattleAction action = m_battleAction;\r
- m_battleAction.type = et::BattleAction::NONE;\r
- if(action.type == et::BattleAction::ATTACK_WEAPON){\r
- return new AttackAction(pBattler , action.pTarget , 3);\r
- }\r
- else if(action.type == et::BattleAction::WAIT || action.type == et::BattleAction::GUARD){\r
- return NULL;\r
- }\r
- else if(action.type == et::BattleAction::CAST){\r
- et::BattlerFacade* pIdeal = getIdealBattler(action.idealIndex);\r
- et::BattlerParameter parameter = pIdeal->getParameter();\r
- parameter.dActionPoint -= 5;\r
- pIdeal->setParameter(parameter);\r
- std::list<et::BattlerFacade*> targetList;\r
- if(action.pTarget != NULL)targetList.push_back(action.pTarget);\r
- else {\r
- for(std::list<et::BattlerFacade*>::const_iterator itr = getBattlerList().begin() ; itr != getBattlerList().end() ; ++itr){\r
- if((*itr)->getType() == et::ENEMY && (*itr)->getParameter().alive)targetList.push_back(*itr);\r
- }\r
- }\r
- //\93Á\8eê\8bZ\82Ì\8eí\97Þ\82ð\93¾\82é\r
- return new SpecialAction(pBattler , targetList , 5 , action.idealIndex);\r
- }\r
- else if(action.type == et::BattleAction::USE_ITEM){\r
- //\83A\83C\83e\83\80\82ð\82È\82\82·\r
- std::list<et::ItemData> &refList = getItemList();\r
- for(std::list<et::ItemData>::iterator itr = refList.begin() ; itr != refList.end() ; ++itr){\r
- if(action.pTargetItem == &(*itr)){\r
- refList.erase(itr);\r
- break;\r
- }\r
- }\r
- std::list<et::BattlerFacade*> targetList;\r
- if(action.pTarget != NULL)targetList.push_back(action.pTarget);\r
- else {\r
- for(std::list<et::BattlerFacade*>::const_iterator itr = getBattlerList().begin() ; itr != getBattlerList().end() ; ++itr){\r
- if((*itr)->getType() == et::ENEMY && (*itr)->getParameter().alive)targetList.push_back(*itr);\r
- }\r
- }\r
- //\93Á\8eê\8bZ\82Ì\8eí\97Þ\82ð\93¾\82é\r
- return new SpecialAction(pBattler , targetList , 2 , 3);\r
- }\r
- else return NULL;\r
- }\r
- else {\r
- std::list<BattlerFacade*> enemyList;\r
- enemyList.push_back(getHeroBattler());\r
- std::list<BattlerFacade*> allyList;\r
- for(std::list<BattlerFacade*>::iterator itr = m_battlerList.begin() ; itr != m_battlerList.end() ; ++itr){\r
- if((*itr)->getType() == et::ENEMY && *itr != pBattler)allyList.push_back(*itr);\r
- }\r
- return pBattler->createNextAction(enemyList , allyList);\r
- \r
- }\r
-\r
-}*/\r
-\r
-et::BattleAction et::BattleData::pollBattleAction(){\r
- BattleAction action = m_battleAction;\r
- m_battleAction.type = BattleAction::NONE;\r
- return action;\r
-}\r
-\r
-bool et::BattleData::isOver(){\r
- if(!m_pGroup->getHeroBattler()->getParameter().alive)return true;\r
- //et::BattlerFacade* pEnemy = NULL;\r
- return m_pGroup->getEnemyBattlerListAlive().size() == 0;\r
- /*for(int i = 0 ; (pEnemy = m_pGroup->getEnemyBattlerAt(i)) != NULL ; i++){\r
- if(pEnemy->getParameter().alive)return false;\r
- }\r
- return true;*/\r
- \r
-}\r
-\r
-\r
-std::list<et::ItemData>& et::BattleData::getItemList(){\r
- return m_pGameData->getBattleItemList();\r
+#include "BattleData.h"
+#include "mof/KeyFrameAnimation.h"
+#include "AttackAction.h"
+#include "SpecialAction.h"
+#include "GameData.h"
+#include "BattlerGroup.h"
+#include "BattlerFacade.h"
+
+et::BattleData::BattleData(mof::TextureManager* pTextureManager , et::GameData* pGameData , et::BattlerGroup* pGroup)
+{
+ m_pGameData = pGameData;
+ m_pTextureManager = pTextureManager;
+ m_battleAction.type = BattleAction::NONE;
+ et::BattlerParameter parameter;
+ m_pGroup = pGroup;
+ //m_battlerList.push_back(new Battler(parameter , m_pTextureManager));
+}
+
+et::BattleData::~BattleData(void)
+{
+ delete m_pGroup;
+}
+
+
+
+/*
+void et::BattleData::addBattler(et::BattlerFacade* pBattler){
+ m_battlerList.push_back(pBattler);
+}
+
+
+void et::BattleData::layoutBattler(){
+ int nEnemy = 0;
+ int nIdeal = 0;
+
+ //\91O\92²\8d¸
+ for(std::list<BattlerFacade*>::iterator itr = m_battlerList.begin() ; itr != m_battlerList.end() ; ++itr){
+ if((*itr)->getType() == et::ENEMY)nEnemy++;
+ else if((*itr)->getType() == et::IDEAL)nIdeal++;
+ }
+
+ int cntEnemy = 0;
+ int cntIdeal = 0;
+ float zTable[3][3] = { {0.6f , 0.6f , 0.6f} , { 0.8f , 0.4f , 0.6f} , {0.86f , 0.6f , 0.34f} };//[\91\8d\90\94][\94Ô\8d\86]
+ float xTable[3][3] = { {0.0f , 0.0f , 0.0f} , { 0.1f , -0.1f , 0.6f} , {0.15f , 0.0f , -0.15f} };//[\91\8d\90\94][\94Ô\8d\86]
+ float ixTable[3][3] = { {0.2f , 0.0f , 0.0f} , { 0.0f , 0.07f , 0.6f} , {0.0f , 0.1f , 0.15f} };//[\91\8d\90\94][\94Ô\8d\86]
+ for(std::list<BattlerFacade*>::iterator itr = m_battlerList.begin() ; itr != m_battlerList.end() ; ++itr){
+ if((*itr)->getType() == et::HERO){
+ (*itr)->setAidlingAnimation(mof::Vector3D(0.3f , 0.0f , 0.6f));
+ (*itr)->setBasePosition(mof::Vector3D(0.3f , 0.0f , 0.6f));
+ }
+ else if((*itr)->getType() == et::ENEMY){
+ mof::KeyFrameAnimation* pAnimation = new mof::KeyFrameAnimation();
+ (*itr)->setAidlingAnimation(mof::Vector3D(-0.45f + xTable[nEnemy-1][cntEnemy] , 0.0f , zTable[nEnemy-1][cntEnemy]));
+ (*itr)->setBasePosition(mof::Vector3D(-0.45f + xTable[nEnemy-1][cntEnemy] , 0.0f , zTable[nEnemy-1][cntEnemy]));
+ cntEnemy++;
+ }
+ else if((*itr)->getType() == et::IDEAL){
+ mof::KeyFrameAnimation* pAnimation = new mof::KeyFrameAnimation();
+ (*itr)->setAidlingAnimation(mof::Vector3D(0.6 +ixTable[nIdeal-1][cntIdeal] , 0.0f , zTable[nIdeal-1][cntIdeal]));
+ cntIdeal++;
+ }
+ }
+
+}
+
+
+et::BattlerFacade* et::BattleData::getHeroBattler(){
+ for(std::list<BattlerFacade*>::iterator itr = m_battlerList.begin() ; itr != m_battlerList.end() ; ++itr){
+ if((*itr)->getType() == et::HERO){
+ return *itr;
+ }
+ }
+ assert(0);
+ return NULL;
+}
+
+et::BattlerFacade* et::BattleData::getEnemyBattler(int index){
+ int cntEnemy = 0;
+ for(std::list<BattlerFacade*>::iterator itr = m_battlerList.begin() ; itr != m_battlerList.end() ; ++itr){
+ if((*itr)->getType() == et::ENEMY){
+ if(cntEnemy++ == index)return *itr;
+ }
+ }
+ return NULL;
+
+}
+
+
+et::BattlerFacade* et::BattleData::getIdealBattler(int index){
+ int cntIdeal = 0;
+ for(std::list<BattlerFacade*>::iterator itr = m_battlerList.begin() ; itr != m_battlerList.end() ; ++itr){
+ if((*itr)->getType() == et::IDEAL){
+ if(cntIdeal++ == index)return *itr;
+ }
+ }
+ return NULL;
+}
+
+
+et::Action* et::BattleData::createBattlerAction(et::BattlerFacade* pBattler){
+ if(pBattler->getType() == et::HERO){
+ et::BattleAction action = m_battleAction;
+ m_battleAction.type = et::BattleAction::NONE;
+ if(action.type == et::BattleAction::ATTACK_WEAPON){
+ return new AttackAction(pBattler , action.pTarget , 3);
+ }
+ else if(action.type == et::BattleAction::WAIT || action.type == et::BattleAction::GUARD){
+ return NULL;
+ }
+ else if(action.type == et::BattleAction::CAST){
+ et::BattlerFacade* pIdeal = getIdealBattler(action.idealIndex);
+ et::BattlerParameter parameter = pIdeal->getParameter();
+ parameter.dActionPoint -= 5;
+ pIdeal->setParameter(parameter);
+ std::list<et::BattlerFacade*> targetList;
+ if(action.pTarget != NULL)targetList.push_back(action.pTarget);
+ else {
+ for(std::list<et::BattlerFacade*>::const_iterator itr = getBattlerList().begin() ; itr != getBattlerList().end() ; ++itr){
+ if((*itr)->getType() == et::ENEMY && (*itr)->getParameter().alive)targetList.push_back(*itr);
+ }
+ }
+ //\93Á\8eê\8bZ\82Ì\8eí\97Þ\82ð\93¾\82é
+ return new SpecialAction(pBattler , targetList , 5 , action.idealIndex);
+ }
+ else if(action.type == et::BattleAction::USE_ITEM){
+ //\83A\83C\83e\83\80\82ð\82È\82\82·
+ std::list<et::ItemData> &refList = getItemList();
+ for(std::list<et::ItemData>::iterator itr = refList.begin() ; itr != refList.end() ; ++itr){
+ if(action.pTargetItem == &(*itr)){
+ refList.erase(itr);
+ break;
+ }
+ }
+ std::list<et::BattlerFacade*> targetList;
+ if(action.pTarget != NULL)targetList.push_back(action.pTarget);
+ else {
+ for(std::list<et::BattlerFacade*>::const_iterator itr = getBattlerList().begin() ; itr != getBattlerList().end() ; ++itr){
+ if((*itr)->getType() == et::ENEMY && (*itr)->getParameter().alive)targetList.push_back(*itr);
+ }
+ }
+ //\93Á\8eê\8bZ\82Ì\8eí\97Þ\82ð\93¾\82é
+ return new SpecialAction(pBattler , targetList , 2 , 3);
+ }
+ else return NULL;
+ }
+ else {
+ std::list<BattlerFacade*> enemyList;
+ enemyList.push_back(getHeroBattler());
+ std::list<BattlerFacade*> allyList;
+ for(std::list<BattlerFacade*>::iterator itr = m_battlerList.begin() ; itr != m_battlerList.end() ; ++itr){
+ if((*itr)->getType() == et::ENEMY && *itr != pBattler)allyList.push_back(*itr);
+ }
+ return pBattler->createNextAction(enemyList , allyList);
+
+ }
+
+}*/
+
+et::BattleAction et::BattleData::pollBattleAction(){
+ BattleAction action = m_battleAction;
+ m_battleAction.type = BattleAction::NONE;
+ return action;
+}
+
+bool et::BattleData::isOver(){
+ if(!m_pGroup->getHeroBattler()->getParameter().alive)return true;
+ //et::BattlerFacade* pEnemy = NULL;
+ return m_pGroup->getEnemyBattlerListAlive().size() == 0;
+ /*for(int i = 0 ; (pEnemy = m_pGroup->getEnemyBattlerAt(i)) != NULL ; i++){
+ if(pEnemy->getParameter().alive)return false;
+ }
+ return true;*/
+
+}
+
+
+std::list<et::ItemData>& et::BattleData::getItemList(){
+ return m_pGameData->getBattleItemList();
}
\ No newline at end of file
-#pragma once\r
-#include <list>\r
-#include "mof/Texture.h"\r
-#include "Action.h"\r
-#include "ItemData.h"\r
-\r
-namespace et{\r
-\r
- class GameData;\r
- class BattlerGroup;\r
-\r
- struct BattleAction{\r
- enum ActionType{\r
- NONE , ATTACK_WEAPON , GUARD , WAIT , RUN_AWAY , CAST , USE_ITEM\r
- };\r
-\r
- ActionType type;\r
- int idealIndex;\r
- et::ItemData* pTargetItem;\r
- et::BattlerFacade* pTarget;\r
-\r
- BattleAction(){\r
- type = BattleAction::NONE;\r
- }\r
- };\r
-\r
- class BattleData\r
- {\r
- BattleAction m_battleAction;\r
- //std::list<BattlerFacade*> m_battlerList;\r
- mof::TextureManager* m_pTextureManager;\r
- et::GameData* m_pGameData;\r
- BattlerGroup* m_pGroup;\r
- public:\r
- BattleData(mof::TextureManager* pTextureManager , et::GameData* pGameData , et::BattlerGroup* pGroup);\r
- ~BattleData(void);\r
-\r
- std::list<et::ItemData>& getItemList();\r
-\r
- mof::TextureManager* getTextureManager(){return m_pTextureManager;}\r
- //\83o\83g\83\8b\83A\83N\83V\83\87\83\93\8cn\r
- void setBattleAction(BattleAction& action){m_battleAction = action;}\r
- bool hasBattleAction(){return !(m_battleAction.type == BattleAction::NONE);}\r
- BattleAction pollBattleAction();\r
- BattlerGroup* getBattlerGroup(){return m_pGroup;}\r
-\r
- \r
- bool isOver();\r
- };\r
-\r
-\r
-}\r
+#pragma once
+#include <list>
+#include "mof/Texture.h"
+#include "Action.h"
+#include "ItemData.h"
+
+namespace et{
+
+ class GameData;
+ class BattlerGroup;
+
+ struct BattleAction{
+ enum ActionType{
+ NONE , ATTACK_WEAPON , GUARD , WAIT , RUN_AWAY , CAST , USE_ITEM
+ };
+
+ ActionType type;
+ int idealIndex;
+ et::ItemData* pTargetItem;
+ et::BattlerFacade* pTarget;
+
+ BattleAction(){
+ type = BattleAction::NONE;
+ }
+ };
+
+ class BattleData
+ {
+ BattleAction m_battleAction;
+ //std::list<BattlerFacade*> m_battlerList;
+ mof::TextureManager* m_pTextureManager;
+ et::GameData* m_pGameData;
+ BattlerGroup* m_pGroup;
+ public:
+ BattleData(mof::TextureManager* pTextureManager , et::GameData* pGameData , et::BattlerGroup* pGroup);
+ ~BattleData(void);
+
+ std::list<et::ItemData>& getItemList();
+
+ mof::TextureManager* getTextureManager(){return m_pTextureManager;}
+ //\83o\83g\83\8b\83A\83N\83V\83\87\83\93\8cn
+ void setBattleAction(BattleAction& action){m_battleAction = action;}
+ bool hasBattleAction(){return !(m_battleAction.type == BattleAction::NONE);}
+ BattleAction pollBattleAction();
+ BattlerGroup* getBattlerGroup(){return m_pGroup;}
+
+
+ bool isOver();
+ };
+
+
+}
-#include "BattleScene.h"\r
-#include "mof/GraphicsDevice.h"\r
-#include "mof/AmbientLight.h"\r
-#include "mof/ConsoleIO.h"\r
-#include "mof/KeyFrameAnimation.h"\r
-#include <math.h>\r
-#include "CommandMenu.h"\r
-#include "FixedBattler.h"\r
-#include "DataBasedBattler.h"\r
-#include "BattlerGroup.h"\r
-#include "Common.h"\r
-\r
-et::BattleScene::BattleScene(mof::TextureResource& nullTexture)\r
-: et::GameScene() , m_pCurrentFrame() , m_pHeroBattler(NULL)\r
-{\r
- \r
- m_pMeshManager = NULL;\r
- m_pCamera = NULL;\r
- m_pCurrentFrame = NULL;\r
- m_popFlag = false;\r
- m_clearFlag = false;\r
- m_pBattleSystem = NULL;\r
- m_pBattleResultWindow = NULL;\r
- m_pBattleData = NULL;\r
-\r
-}\r
-\r
-et::BattleScene::~BattleScene(void)\r
-{\r
- delete m_back;\r
- delete m_pCamera;\r
- delete m_pBattleSystem;\r
- for(std::list<et::BattlerWindow*>::iterator itr = m_battlerWindowList.begin() ; itr != m_battlerWindowList.end() ; ++itr){\r
- delete *itr;\r
- }\r
- delete m_pBattleResultWindow;\r
- \r
-\r
-}\r
-\r
-\r
-bool et::BattleScene::initialize(){\r
- \r
-\r
- m_back = new mof::Sprite(mof::Line2D(0 , 0 , 640 , 480) , mof::Line2D(0 , 0 , 64 , 64) , \r
- m_pTextureManager->getResource(mof::tstring(_T("null"))));\r
- m_back->setCornerColor(mof::createColor(55 , 55 , 55));\r
- \r
-\r
- mof::GraphicsDevice::getInstance()->setProjectionTransform(0.01f , 50.0f);\r
- mof::GRAPHICS_DEVICE pDevice = mof::GraphicsDevice::getInstance()->getGraphicsDevice();\r
-\r
- m_field = m_pMeshManager->getResource(mof::tstring(_T("model/battleField0.x")));\r
-\r
- //\83o\83g\83\8b\83f\81[\83^\82Ì\8f\89\8aú\89»\r
- BattlerGroup* pGroup = new BattlerGroup(); \r
- et::BattlerParameter parameter;\r
- parameter.hp = 50;\r
- parameter.maxHp = 50;\r
- parameter.attack = 25;\r
- parameter.diffence = 10;\r
- parameter.actionPoint = 3;//3\82É\82·\82×\82«\r
- parameter.guard = false;\r
- parameter.alive = true;\r
- parameter.dActionPoint = 0;\r
- parameter.name = _T("\83\8a\81[\83X");\r
- parameter.speed = 10;\r
- m_pHeroBattler = new FixedBattler(et::HERO , parameter , m_pTextureManager , m_pGameData);\r
- m_battlerWindowList.push_back(new BattlerWindow( m_pTextureManager , m_pHeroBattler ));\r
- pGroup->addBattler(et::HERO , m_pHeroBattler);\r
- et::BattlerFacade* pBattler = m_pHeroBattler;\r
-\r
- /*pBattler = new DataBasedBattler( _T("\83\89\83~\83A\83\93\83n\81[\83s\81[") , m_pDataResourceManager , m_pTextureManager , _T('A'));\r
- m_battlerWindowList.push_back(new BattlerWindow( m_pTextureManager , pBattler ));\r
- pGroup->addBattler(et::ENEMY , pBattler);\r
-\r
- pBattler = new DataBasedBattler( _T("\83}\83\93\83h\83\89\83S\83\89") , m_pDataResourceManager , m_pTextureManager , _T('B'));\r
- m_battlerWindowList.push_back(new BattlerWindow( m_pTextureManager , pBattler ));\r
- pGroup->addBattler(et::ENEMY , pBattler);\r
-\r
- pBattler = new DataBasedBattler( _T("\83\8d\83b\83L\81[") , m_pDataResourceManager , m_pTextureManager , _T('C'));\r
- m_battlerWindowList.push_back(new BattlerWindow( m_pTextureManager , pBattler ));\r
- pGroup->addBattler(et::ENEMY , pBattler);*/\r
-\r
- mof::DataRow unitData(m_pDataResourceManager->getResource(_T("data/monster.unit.csv")) , 0);\r
- pGroup->addEnemyBattlers(unitData , et::Common(m_pTextureManager , m_pMeshManager , m_pDataResourceManager));\r
- std::vector<et::BattlerFacade*> enemyList = pGroup->getEnemyBattlerList();\r
- for(std::vector<et::BattlerFacade*>::iterator itr = enemyList.begin() ; itr != enemyList.end() ; ++itr){\r
- m_battlerWindowList.push_back(new BattlerWindow(m_pTextureManager , *itr));\r
- }\r
-\r
- parameter.name = _T("\83K\83\8b\83i\83N\83\8a\83t");\r
- pBattler = new FixedBattler(et::IDEAL , parameter , m_pTextureManager);\r
- m_battlerWindowList.push_back(new BattlerWindow( m_pTextureManager , pBattler ));\r
- pGroup->addBattler(et::IDEAL , pBattler);\r
- \r
- parameter.name = _T("\83{\83{");\r
- pBattler = new FixedBattler(et::IDEAL , parameter , m_pTextureManager);\r
- m_battlerWindowList.push_back(new BattlerWindow( m_pTextureManager , pBattler ));\r
- pGroup->addBattler(et::IDEAL , pBattler);\r
-\r
- parameter.name = _T("\83}\81[\83X");\r
- pBattler = new FixedBattler(et::IDEAL , parameter , m_pTextureManager);\r
- m_battlerWindowList.push_back(new BattlerWindow( m_pTextureManager , pBattler ));\r
- pGroup->addBattler(et::IDEAL , pBattler);\r
-\r
- layoutBattlers(pGroup);\r
- m_pBattleData = new BattleData(m_pTextureManager , m_pGameData , pGroup);\r
- \r
-\r
- mof::AmbientLight(mof::createColor(255 , 255 , 255)).reflect();\r
-\r
- m_pCamera = new mof::Camera(mof::Vector3D(0.0f , 1.1f , -1.4f) , mof::Vector3D(0.0f , 0 , 0.5f) , mof::Vector3D(0.0f , 1.0f , 0.0f));\r
- m_pCamera->reflect();\r
-\r
- //\83R\83}\83\93\83h\83\81\83j\83\85\81[\r
- m_pCurrentFrame = new et::CommandMenu(m_pTextureManager , m_pBattleData);\r
- m_menuStack.push_back(mof::Container2D());\r
- m_menuStack.back().add(m_pCurrentFrame);\r
- m_translationScheduler.add(0 , m_pCurrentFrame->getAnimationSet());\r
-\r
- \r
- return true;\r
-}\r
-\r
-bool compareTo( mof::Component3D* &a , mof::Component3D* &b){\r
- return (*a).getPosition().z > (*b).getPosition().z;\r
- }\r
-\r
- \r
-bool et::BattleScene::draw(){\r
- //m_pCapturer->capture();\r
-\r
- mof::GraphicsDevice::getInstance()->setAlphaBlendingMode(mof::GraphicsDevice::BLENDING_MODE_ALPHA);\r
- mof::GraphicsDevice::getInstance()->setZBuffer(false);\r
- \r
- m_back->draw();\r
-\r
- mof::GraphicsDevice::getInstance()->setZBuffer(true);\r
- mof::GraphicsDevice::getInstance()->clearZBuffer();\r
- m_field->draw();\r
-\r
- //Z\83\\81[\83g\82µ\82Ä\95`\89æ\r
- std::vector< mof::Component3D*> orderList;\r
- orderList.reserve(100);\r
- for(BattlerList::const_iterator itr = m_pBattleData->getBattlerGroup()->getBattlerList().begin() ;\r
- itr != m_pBattleData->getBattlerGroup()->getBattlerList().end() ; ++itr){\r
- orderList.push_back((*itr)->getGraphicsObject());\r
- }\r
- std::sort(orderList.begin() , orderList.end() , compareTo);\r
- for(std::vector<mof::Component3D*>::iterator itr = orderList.begin() ; itr != orderList.end() ; ++itr)(*itr)->draw();\r
-\r
- if(m_pBattleSystem != NULL){\r
- std::list<mof::GraphicsModelPtr> modelList;\r
- m_pBattleSystem->getModelList(modelList);\r
- for(std::list<mof::GraphicsModelPtr>::iterator itr = modelList.begin() ; itr != modelList.end() ; ++itr){\r
- (*itr)->draw();\r
- }\r
- }\r
-\r
-\r
- //mof::GraphicsDevice::getInstance()->setLight(false);\r
- mof::GraphicsDevice::getInstance()->setZBuffer(false);\r
- \r
-\r
- for(std::list<mof::Container2D>::iterator itr = m_menuStack.begin() ; itr != m_menuStack.end() ; ++itr){\r
- (*itr).draw();\r
- }\r
- \r
- \r
- if(m_pBattleSystem == NULL){\r
- for(std::list<et::BattlerWindow*>::iterator itr = m_battlerWindowList.begin() ; itr != m_battlerWindowList.end() ; ++itr){\r
- (*itr)->draw();\r
- }\r
- }\r
- if(m_pBattleResultWindow != NULL)m_pBattleResultWindow->draw();\r
-\r
- return true;\r
-}\r
-\r
-\r
-bool et::BattleScene::update(){\r
- \r
- if(m_translationScheduler.isFinalized() && m_popFlag){\r
- m_menuStack.pop_back();\r
- m_popFlag = false;\r
- }\r
- if(m_translationScheduler.isFinalized() && m_clearFlag){\r
- m_menuStack.clear();\r
- m_clearFlag = false;\r
- }\r
- \r
-\r
- if( m_pCurrentFrame != NULL && m_translationScheduler.isFinalized() && !m_pBattleData->isOver()){\r
- //\83E\83B\83\93\83h\83E\82É\91Î\82·\82é\83L\81[\r
- if(m_pInputReceiver->checkKeyPressed(mof::InputReceiver::UP))m_pCurrentFrame->getSelectionModel()->up();\r
- else if(m_pInputReceiver->checkKeyPressed(mof::InputReceiver::DOWN))m_pCurrentFrame->getSelectionModel()->down();\r
- else if(m_pInputReceiver->checkKeyPressed(mof::InputReceiver::LEFT))m_pCurrentFrame->getSelectionModel()->left();\r
- else if(m_pInputReceiver->checkKeyPressed(mof::InputReceiver::RIGHT))m_pCurrentFrame->getSelectionModel()->right();\r
- else if(m_pInputReceiver->checkKeyPressed(mof::InputReceiver::Z) && \r
- m_pCurrentFrame->getSelectionModel()->getSelectingItem()->isAvailable()){\r
- \r
- int selectedIndex = m_pCurrentFrame->getSelectionModel()->getSelectingIndex();\r
- MyFrame* pPrevFrame = m_pCurrentFrame;\r
- MyFrame* pNextFrame = m_pCurrentFrame->performAction();\r
- if(pNextFrame != m_pCurrentFrame){\r
- //\83E\83B\83\93\83h\83E\82Ì\91J\88Ú\r
- m_translationScheduler.clear();\r
- if(!m_pCurrentFrame->isVisible())m_translationScheduler.add(0 , m_pCurrentFrame->getAnimationSet());\r
- m_pCurrentFrame = pNextFrame;\r
- if(m_pCurrentFrame != NULL){\r
- m_translationScheduler.add(0 , m_pCurrentFrame->getAnimationSet());\r
- m_menuStack.push_back(mof::Container2D());\r
- m_menuStack.back().add(m_pCurrentFrame);\r
- }\r
-\r
- }\r
- //\93Á\89»\8f\88\97\9d\r
- }\r
- else if(m_pInputReceiver->checkKeyPressed(mof::InputReceiver::X) && m_menuStack.size() > 1){//\83g\83b\83v\83\81\83j\83\85\81[\88È\8aO\r
-\r
- //\83\81\83j\83\85\81[\83X\83^\83b\83N\82ð\83|\83b\83v\82·\82é\r
- m_translationScheduler.clear();\r
- std::list<mof::Container2D>::iterator itr = m_menuStack.end();\r
- --itr;//\8dÅ\8cã\94ö\82Ì\97v\91f\82ð\8ew\82·\r
- for(int i = 0 ; i < (*itr).size() ; ++i){\r
- (*itr).get(i)->setVisible(false);\r
- m_translationScheduler.add(0 , (*itr).get(i)->getAnimationSet());\r
- }\r
- m_popFlag = true;\r
- if(m_menuStack.size() >= 2){\r
- //\8cã\82ë\82©\82ç\82Q\94Ô\96Ú\82Ì\97v\91f\82ð\95\9c\8a\88\r
- --itr;\r
- for(int i = 0 ; i < (*itr).size() ; ++i){\r
- if(dynamic_cast<MyFrame*>((*itr).get(i))->isVisible())continue;\r
- (*itr).get(i)->setVisible(true);\r
- m_translationScheduler.add(0 , (*itr).get(i)->getAnimationSet());\r
- }\r
- m_pCurrentFrame = dynamic_cast<MyFrame*>((*itr).get(0));\r
- }\r
- else m_pCurrentFrame = NULL;\r
- }\r
-\r
- }\r
- \r
-\r
- if(m_pBattleData->hasBattleAction() && m_pBattleSystem == NULL){\r
- //\91S\83\81\83j\83\85\81[\82ð\95Â\82¶\82é\r
- m_translationScheduler.clear();\r
- for(std::list<mof::Container2D>::iterator itr = m_menuStack.begin() ; itr != m_menuStack.end() ; ++itr){\r
- for(int i = 0 ; i < (*itr).size() ; ++i){\r
- if(!dynamic_cast<MyFrame*>((*itr).get(i))->isVisible())continue;\r
- (*itr).get(i)->setVisible(false);\r
- m_translationScheduler.add(0 , (*itr).get(i)->getAnimationSet());\r
- }\r
- }\r
- m_pCurrentFrame = NULL;\r
- m_clearFlag = true;\r
- m_pHeroBattler->setBattleCommand(m_pBattleData->pollBattleAction());\r
- m_pBattleSystem = new BattleSystem(m_pBattleData , &m_turnScheduler , et::Common(m_pTextureManager , m_pMeshManager , m_pDataResourceManager));\r
- if(m_pBattleData->getBattlerGroup()->getHeroBattler()->getParameter().guard){\r
- //\91Ò\8b@\83A\83j\83\81\82ð\95Ï\8dX\r
- m_pBattleData->getBattlerGroup()->getHeroBattler()->setAidlingAnimation(m_pBattleData->getBattlerGroup()->getHeroBattler()->getPosition());\r
- }\r
- m_turnScheduler.clear();\r
- }\r
- else if(m_pBattleSystem != NULL ){\r
- if(m_pInputReceiver->checkKeyPressed(mof::InputReceiver::Z))m_pBattleSystem->notifyPushKey();\r
- m_pBattleSystem->update();\r
- if(m_pBattleSystem->isFinalized() && m_menuStack.empty()){\r
- delete m_pBattleSystem;\r
- m_pBattleSystem = NULL;\r
- \r
- if(m_pBattleData->getBattlerGroup()->getHeroBattler()->getParameter().guard){\r
- //\91Ò\8b@\83A\83j\83\81\82ð\95Ï\8dX\r
- et::BattlerParameter parameter = m_pBattleData->getBattlerGroup()->getHeroBattler()->getParameter();\r
- parameter.guard = false;\r
- m_pBattleData->getBattlerGroup()->getHeroBattler()->setParameter(parameter);\r
- m_pBattleData->getBattlerGroup()->getHeroBattler()->setAidlingAnimation(m_pBattleData->getBattlerGroup()->getHeroBattler()->getPosition());\r
- }\r
-\r
- if(m_pBattleData->isOver()){\r
- //\90í\93¬\8fI\97¹\8fó\91Ô\82Ö\88Ú\8ds\r
- m_pBattleData->setBattleAction(et::BattleAction());\r
- m_pBattleResultWindow = new MyWindow(mof::Sprite::createSpriteFromText(_T("\83o\83g\83\8b\8fI\97¹") , 17) , m_pTextureManager);\r
- }\r
- else {\r
- m_translationScheduler.clear();\r
- m_pCurrentFrame = new et::CommandMenu(m_pTextureManager , m_pBattleData);\r
- m_menuStack.push_back(mof::Container2D());\r
- m_menuStack.back().add(m_pCurrentFrame);\r
- m_translationScheduler.add(0 , m_pCurrentFrame->getAnimationSet());\r
- }\r
- }\r
- }\r
-\r
-\r
- if(m_pBattleSystem != NULL){\r
- std::list<mof::GraphicsModelPtr> modelList;\r
- m_pBattleSystem->getModelList(modelList);\r
- for(std::list<mof::GraphicsModelPtr>::iterator itr = modelList.begin() ; itr != modelList.end() ; ++itr){\r
- (*itr)->update();\r
- }\r
- }\r
-\r
-\r
- //\83\81\83j\83\85\81[\82Ì\8dX\90V\r
- for(std::list<mof::Container2D>::iterator itr = m_menuStack.begin() ; itr != m_menuStack.end() ; ++itr){\r
- for(int i = 0 ; i < (*itr).size() ; i++)(*itr).get(i)->update();\r
- }\r
- for(std::list<et::BattlerWindow*>::iterator itr = m_battlerWindowList.begin() ; itr != m_battlerWindowList.end() ; ++itr){\r
- (*itr)->update();\r
- }\r
- if(m_pBattleResultWindow != NULL)m_pBattleResultWindow->update();\r
-\r
- m_pCamera->reflect();\r
- for(BattlerList::const_iterator itr = m_pBattleData->getBattlerGroup()->getBattlerList().begin() ;\r
- itr != m_pBattleData->getBattlerGroup()->getBattlerList().end() ; ++itr){\r
- (*itr)->getGraphicsObject()->update();\r
- }\r
-\r
- mof::Billboard::updateBillboardDirection(m_pCamera);\r
-\r
- m_translationScheduler.update();\r
- m_turnScheduler.update();\r
- return true;\r
-}\r
-\r
-\r
-void et::BattleScene::layoutBattlers(BattlerGroup* pGroup){\r
- int nEnemy = pGroup->getEnemyBattlerList().size();\r
- int nIdeal = pGroup->getIdealBattlerList().size();\r
- \r
- int cntEnemy = 0;\r
- int cntIdeal = 0;\r
- float zTable[3][3] = { {0.6f , 0.6f , 0.6f} , { 0.8f , 0.4f , 0.6f} , {0.9f , 0.6f , 0.30f} };//[\91\8d\90\94][\94Ô\8d\86]\r
- float xTable[3][3] = { {-0.2f , 0.0f , 0.0f} , { -0.0f , -0.3f , 0.0f} , {-0.05f , -0.2f , -0.35f} };//[\91\8d\90\94][\94Ô\8d\86]\r
- float ixTable[3][3] = { {0.2f , 0.0f , 0.0f} , { 0.0f , 0.07f , 0.6f} , {0.1f , 0.2f , 0.25f} };//[\91\8d\90\94][\94Ô\8d\86]\r
-\r
- BattlerFacade* pBattler = pGroup->getHeroBattler();\r
- pBattler->setAidlingAnimation(mof::Vector3D(0.3f , 0.0f , 0.6f));\r
- pBattler->setBasePosition(mof::Vector3D(0.3f , 0.0f , 0.6f));\r
- \r
- \r
- for(std::vector<BattlerFacade*>::const_iterator itr = pGroup->getEnemyBattlerList().begin() ; itr != pGroup->getEnemyBattlerList().end() ; ++itr){\r
- mof::KeyFrameAnimation* pAnimation = new mof::KeyFrameAnimation();\r
- (*itr)->setAidlingAnimation(mof::Vector3D(-0.45f + xTable[nEnemy-1][cntEnemy] , 0.0f , zTable[nEnemy-1][cntEnemy]));\r
- (*itr)->setBasePosition(mof::Vector3D(-0.45f + xTable[nEnemy-1][cntEnemy] , 0.0f , zTable[nEnemy-1][cntEnemy]));\r
- cntEnemy++; \r
- }\r
-\r
- for(std::vector<BattlerFacade*>::const_iterator itr = pGroup->getIdealBattlerList().begin() ; itr != pGroup->getIdealBattlerList().end() ; ++itr){\r
- mof::KeyFrameAnimation* pAnimation = new mof::KeyFrameAnimation();\r
- (*itr)->setAidlingAnimation(mof::Vector3D(0.6 +ixTable[nIdeal-1][cntIdeal] , 0.0f , zTable[nIdeal-1][cntIdeal]));\r
- cntIdeal++; \r
- \r
- }\r
-\r
+#include "BattleScene.h"
+#include "mof/GraphicsDevice.h"
+#include "mof/AmbientLight.h"
+#include "mof/ConsoleIO.h"
+#include "mof/KeyFrameAnimation.h"
+#include <math.h>
+#include "CommandMenu.h"
+#include "FixedBattler.h"
+#include "DataBasedBattler.h"
+#include "BattlerGroup.h"
+#include "Common.h"
+
+et::BattleScene::BattleScene(mof::TextureResource& nullTexture)
+: et::GameScene() , m_pCurrentFrame() , m_pHeroBattler(NULL)
+{
+
+ m_pMeshManager = NULL;
+ m_pCamera = NULL;
+ m_pCurrentFrame = NULL;
+ m_popFlag = false;
+ m_clearFlag = false;
+ m_pBattleSystem = NULL;
+ m_pBattleResultWindow = NULL;
+ m_pBattleData = NULL;
+
+}
+
+et::BattleScene::~BattleScene(void)
+{
+ delete m_back;
+ delete m_pCamera;
+ delete m_pBattleSystem;
+ for(std::list<et::BattlerWindow*>::iterator itr = m_battlerWindowList.begin() ; itr != m_battlerWindowList.end() ; ++itr){
+ delete *itr;
+ }
+ delete m_pBattleResultWindow;
+
+
+}
+
+
+bool et::BattleScene::initialize(){
+
+
+ m_back = new mof::Sprite(mof::Line2D(0 , 0 , 640 , 480) , mof::Line2D(0 , 0 , 64 , 64) ,
+ m_pTextureManager->getResource(mof::tstring(_T("null"))));
+ m_back->setCornerColor(mof::createColor(55 , 55 , 55));
+
+
+ mof::GraphicsDevice::getInstance()->setProjectionTransform(0.01f , 50.0f);
+ mof::GRAPHICS_DEVICE pDevice = mof::GraphicsDevice::getInstance()->getGraphicsDevice();
+
+ m_field = m_pMeshManager->getResource(mof::tstring(_T("model/battleField0.x")));
+
+ //\83o\83g\83\8b\83f\81[\83^\82Ì\8f\89\8aú\89»
+ BattlerGroup* pGroup = new BattlerGroup();
+ et::BattlerParameter parameter;
+ parameter.hp = 50;
+ parameter.maxHp = 50;
+ parameter.attack = 25;
+ parameter.diffence = 10;
+ parameter.actionPoint = 3;//3\82É\82·\82×\82«
+ parameter.guard = false;
+ parameter.alive = true;
+ parameter.dActionPoint = 0;
+ parameter.name = _T("\83\8a\81[\83X");
+ parameter.speed = 10;
+ m_pHeroBattler = new FixedBattler(et::HERO , parameter , m_pTextureManager , m_pGameData);
+ m_battlerWindowList.push_back(new BattlerWindow( m_pTextureManager , m_pHeroBattler ));
+ pGroup->addBattler(et::HERO , m_pHeroBattler);
+ et::BattlerFacade* pBattler = m_pHeroBattler;
+
+ /*pBattler = new DataBasedBattler( _T("\83\89\83~\83A\83\93\83n\81[\83s\81[") , m_pDataResourceManager , m_pTextureManager , _T('A'));
+ m_battlerWindowList.push_back(new BattlerWindow( m_pTextureManager , pBattler ));
+ pGroup->addBattler(et::ENEMY , pBattler);
+
+ pBattler = new DataBasedBattler( _T("\83}\83\93\83h\83\89\83S\83\89") , m_pDataResourceManager , m_pTextureManager , _T('B'));
+ m_battlerWindowList.push_back(new BattlerWindow( m_pTextureManager , pBattler ));
+ pGroup->addBattler(et::ENEMY , pBattler);
+
+ pBattler = new DataBasedBattler( _T("\83\8d\83b\83L\81[") , m_pDataResourceManager , m_pTextureManager , _T('C'));
+ m_battlerWindowList.push_back(new BattlerWindow( m_pTextureManager , pBattler ));
+ pGroup->addBattler(et::ENEMY , pBattler);*/
+
+ mof::DataRow unitData(m_pDataResourceManager->getResource(_T("data/monster.unit.csv")) , 0);
+ pGroup->addEnemyBattlers(unitData , et::Common(m_pTextureManager , m_pMeshManager , m_pDataResourceManager));
+ std::vector<et::BattlerFacade*> enemyList = pGroup->getEnemyBattlerList();
+ for(std::vector<et::BattlerFacade*>::iterator itr = enemyList.begin() ; itr != enemyList.end() ; ++itr){
+ m_battlerWindowList.push_back(new BattlerWindow(m_pTextureManager , *itr));
+ }
+
+ parameter.name = _T("\83K\83\8b\83i\83N\83\8a\83t");
+ pBattler = new FixedBattler(et::IDEAL , parameter , m_pTextureManager);
+ m_battlerWindowList.push_back(new BattlerWindow( m_pTextureManager , pBattler ));
+ pGroup->addBattler(et::IDEAL , pBattler);
+
+ parameter.name = _T("\83{\83{");
+ pBattler = new FixedBattler(et::IDEAL , parameter , m_pTextureManager);
+ m_battlerWindowList.push_back(new BattlerWindow( m_pTextureManager , pBattler ));
+ pGroup->addBattler(et::IDEAL , pBattler);
+
+ parameter.name = _T("\83}\81[\83X");
+ pBattler = new FixedBattler(et::IDEAL , parameter , m_pTextureManager);
+ m_battlerWindowList.push_back(new BattlerWindow( m_pTextureManager , pBattler ));
+ pGroup->addBattler(et::IDEAL , pBattler);
+
+ layoutBattlers(pGroup);
+ m_pBattleData = new BattleData(m_pTextureManager , m_pGameData , pGroup);
+
+
+ mof::AmbientLight(mof::createColor(255 , 255 , 255)).reflect();
+
+ m_pCamera = new mof::Camera(mof::Vector3D(0.0f , 1.1f , -1.4f) , mof::Vector3D(0.0f , 0 , 0.5f) , mof::Vector3D(0.0f , 1.0f , 0.0f));
+ m_pCamera->reflect();
+
+ //\83R\83}\83\93\83h\83\81\83j\83\85\81[
+ m_pCurrentFrame = new et::CommandMenu(m_pTextureManager , m_pBattleData);
+ m_menuStack.push_back(mof::Container2D());
+ m_menuStack.back().add(m_pCurrentFrame);
+ m_translationScheduler.add(0 , m_pCurrentFrame->getAnimationSet());
+
+
+ return true;
+}
+
+bool compareTo( mof::Component3D* &a , mof::Component3D* &b){
+ return (*a).getPosition().z > (*b).getPosition().z;
+ }
+
+
+bool et::BattleScene::draw(){
+ //m_pCapturer->capture();
+
+ mof::GraphicsDevice::getInstance()->setAlphaBlendingMode(mof::GraphicsDevice::BLENDING_MODE_ALPHA);
+ mof::GraphicsDevice::getInstance()->setZBuffer(false);
+
+ m_back->draw();
+
+ mof::GraphicsDevice::getInstance()->setZBuffer(true);
+ mof::GraphicsDevice::getInstance()->clearZBuffer();
+ m_field->draw();
+
+ //Z\83\\81[\83g\82µ\82Ä\95`\89æ
+ std::vector< mof::Component3D*> orderList;
+ orderList.reserve(100);
+ for(BattlerList::const_iterator itr = m_pBattleData->getBattlerGroup()->getBattlerList().begin() ;
+ itr != m_pBattleData->getBattlerGroup()->getBattlerList().end() ; ++itr){
+ orderList.push_back((*itr)->getGraphicsObject());
+ }
+ std::sort(orderList.begin() , orderList.end() , compareTo);
+ for(std::vector<mof::Component3D*>::iterator itr = orderList.begin() ; itr != orderList.end() ; ++itr)(*itr)->draw();
+
+ if(m_pBattleSystem != NULL){
+ std::list<mof::GraphicsModelPtr> modelList;
+ m_pBattleSystem->getModelList(modelList);
+ for(std::list<mof::GraphicsModelPtr>::iterator itr = modelList.begin() ; itr != modelList.end() ; ++itr){
+ (*itr)->draw();
+ }
+ }
+
+
+ //mof::GraphicsDevice::getInstance()->setLight(false);
+ mof::GraphicsDevice::getInstance()->setZBuffer(false);
+
+
+ for(std::list<mof::Container2D>::iterator itr = m_menuStack.begin() ; itr != m_menuStack.end() ; ++itr){
+ (*itr).draw();
+ }
+
+
+ if(m_pBattleSystem == NULL){
+ for(std::list<et::BattlerWindow*>::iterator itr = m_battlerWindowList.begin() ; itr != m_battlerWindowList.end() ; ++itr){
+ (*itr)->draw();
+ }
+ }
+ if(m_pBattleResultWindow != NULL)m_pBattleResultWindow->draw();
+
+ return true;
+}
+
+
+bool et::BattleScene::update(){
+
+ if(m_translationScheduler.isFinalized() && m_popFlag){
+ m_menuStack.pop_back();
+ m_popFlag = false;
+ }
+ if(m_translationScheduler.isFinalized() && m_clearFlag){
+ m_menuStack.clear();
+ m_clearFlag = false;
+ }
+
+
+ if( m_pCurrentFrame != NULL && m_translationScheduler.isFinalized() && !m_pBattleData->isOver()){
+ //\83E\83B\83\93\83h\83E\82É\91Î\82·\82é\83L\81[
+ if(m_pInputReceiver->checkKeyPressed(mof::InputReceiver::UP))m_pCurrentFrame->getSelectionModel()->up();
+ else if(m_pInputReceiver->checkKeyPressed(mof::InputReceiver::DOWN))m_pCurrentFrame->getSelectionModel()->down();
+ else if(m_pInputReceiver->checkKeyPressed(mof::InputReceiver::LEFT))m_pCurrentFrame->getSelectionModel()->left();
+ else if(m_pInputReceiver->checkKeyPressed(mof::InputReceiver::RIGHT))m_pCurrentFrame->getSelectionModel()->right();
+ else if(m_pInputReceiver->checkKeyPressed(mof::InputReceiver::Z) &&
+ m_pCurrentFrame->getSelectionModel()->getSelectingItem()->isAvailable()){
+
+ int selectedIndex = m_pCurrentFrame->getSelectionModel()->getSelectingIndex();
+ MyFrame* pPrevFrame = m_pCurrentFrame;
+ MyFrame* pNextFrame = m_pCurrentFrame->performAction();
+ if(pNextFrame != m_pCurrentFrame){
+ //\83E\83B\83\93\83h\83E\82Ì\91J\88Ú
+ m_translationScheduler.clear();
+ if(!m_pCurrentFrame->isVisible())m_translationScheduler.add(0 , m_pCurrentFrame->getAnimationSet());
+ m_pCurrentFrame = pNextFrame;
+ if(m_pCurrentFrame != NULL){
+ m_translationScheduler.add(0 , m_pCurrentFrame->getAnimationSet());
+ m_menuStack.push_back(mof::Container2D());
+ m_menuStack.back().add(m_pCurrentFrame);
+ }
+
+ }
+ //\93Á\89»\8f\88\97\9d
+ }
+ else if(m_pInputReceiver->checkKeyPressed(mof::InputReceiver::X) && m_menuStack.size() > 1){//\83g\83b\83v\83\81\83j\83\85\81[\88È\8aO
+
+ //\83\81\83j\83\85\81[\83X\83^\83b\83N\82ð\83|\83b\83v\82·\82é
+ m_translationScheduler.clear();
+ std::list<mof::Container2D>::iterator itr = m_menuStack.end();
+ --itr;//\8dÅ\8cã\94ö\82Ì\97v\91f\82ð\8ew\82·
+ for(int i = 0 ; i < (*itr).size() ; ++i){
+ (*itr).get(i)->setVisible(false);
+ m_translationScheduler.add(0 , (*itr).get(i)->getAnimationSet());
+ }
+ m_popFlag = true;
+ if(m_menuStack.size() >= 2){
+ //\8cã\82ë\82©\82ç\82Q\94Ô\96Ú\82Ì\97v\91f\82ð\95\9c\8a\88
+ --itr;
+ for(int i = 0 ; i < (*itr).size() ; ++i){
+ if(dynamic_cast<MyFrame*>((*itr).get(i))->isVisible())continue;
+ (*itr).get(i)->setVisible(true);
+ m_translationScheduler.add(0 , (*itr).get(i)->getAnimationSet());
+ }
+ m_pCurrentFrame = dynamic_cast<MyFrame*>((*itr).get(0));
+ }
+ else m_pCurrentFrame = NULL;
+ }
+
+ }
+
+
+ if(m_pBattleData->hasBattleAction() && m_pBattleSystem == NULL){
+ //\91S\83\81\83j\83\85\81[\82ð\95Â\82¶\82é
+ m_translationScheduler.clear();
+ for(std::list<mof::Container2D>::iterator itr = m_menuStack.begin() ; itr != m_menuStack.end() ; ++itr){
+ for(int i = 0 ; i < (*itr).size() ; ++i){
+ if(!dynamic_cast<MyFrame*>((*itr).get(i))->isVisible())continue;
+ (*itr).get(i)->setVisible(false);
+ m_translationScheduler.add(0 , (*itr).get(i)->getAnimationSet());
+ }
+ }
+ m_pCurrentFrame = NULL;
+ m_clearFlag = true;
+ m_pHeroBattler->setBattleCommand(m_pBattleData->pollBattleAction());
+ m_pBattleSystem = new BattleSystem(m_pBattleData , &m_turnScheduler , et::Common(m_pTextureManager , m_pMeshManager , m_pDataResourceManager));
+ if(m_pBattleData->getBattlerGroup()->getHeroBattler()->getParameter().guard){
+ //\91Ò\8b@\83A\83j\83\81\82ð\95Ï\8dX
+ m_pBattleData->getBattlerGroup()->getHeroBattler()->setAidlingAnimation(m_pBattleData->getBattlerGroup()->getHeroBattler()->getPosition());
+ }
+ m_turnScheduler.clear();
+ }
+ else if(m_pBattleSystem != NULL ){
+ if(m_pInputReceiver->checkKeyPressed(mof::InputReceiver::Z))m_pBattleSystem->notifyPushKey();
+ m_pBattleSystem->update();
+ if(m_pBattleSystem->isFinalized() && m_menuStack.empty()){
+ delete m_pBattleSystem;
+ m_pBattleSystem = NULL;
+
+ if(m_pBattleData->getBattlerGroup()->getHeroBattler()->getParameter().guard){
+ //\91Ò\8b@\83A\83j\83\81\82ð\95Ï\8dX
+ et::BattlerParameter parameter = m_pBattleData->getBattlerGroup()->getHeroBattler()->getParameter();
+ parameter.guard = false;
+ m_pBattleData->getBattlerGroup()->getHeroBattler()->setParameter(parameter);
+ m_pBattleData->getBattlerGroup()->getHeroBattler()->setAidlingAnimation(m_pBattleData->getBattlerGroup()->getHeroBattler()->getPosition());
+ }
+
+ if(m_pBattleData->isOver()){
+ //\90í\93¬\8fI\97¹\8fó\91Ô\82Ö\88Ú\8ds
+ m_pBattleData->setBattleAction(et::BattleAction());
+ m_pBattleResultWindow = new MyWindow(mof::Sprite::createSpriteFromText(_T("\83o\83g\83\8b\8fI\97¹") , 17) , m_pTextureManager);
+ }
+ else {
+ m_translationScheduler.clear();
+ m_pCurrentFrame = new et::CommandMenu(m_pTextureManager , m_pBattleData);
+ m_menuStack.push_back(mof::Container2D());
+ m_menuStack.back().add(m_pCurrentFrame);
+ m_translationScheduler.add(0 , m_pCurrentFrame->getAnimationSet());
+ }
+ }
+ }
+
+
+ if(m_pBattleSystem != NULL){
+ std::list<mof::GraphicsModelPtr> modelList;
+ m_pBattleSystem->getModelList(modelList);
+ for(std::list<mof::GraphicsModelPtr>::iterator itr = modelList.begin() ; itr != modelList.end() ; ++itr){
+ (*itr)->update();
+ }
+ }
+
+
+ //\83\81\83j\83\85\81[\82Ì\8dX\90V
+ for(std::list<mof::Container2D>::iterator itr = m_menuStack.begin() ; itr != m_menuStack.end() ; ++itr){
+ for(int i = 0 ; i < (*itr).size() ; i++)(*itr).get(i)->update();
+ }
+ for(std::list<et::BattlerWindow*>::iterator itr = m_battlerWindowList.begin() ; itr != m_battlerWindowList.end() ; ++itr){
+ (*itr)->update();
+ }
+ if(m_pBattleResultWindow != NULL)m_pBattleResultWindow->update();
+
+ m_pCamera->reflect();
+ for(BattlerList::const_iterator itr = m_pBattleData->getBattlerGroup()->getBattlerList().begin() ;
+ itr != m_pBattleData->getBattlerGroup()->getBattlerList().end() ; ++itr){
+ (*itr)->getGraphicsObject()->update();
+ }
+
+ mof::Billboard::updateBillboardDirection(m_pCamera);
+
+ m_translationScheduler.update();
+ m_turnScheduler.update();
+ return true;
+}
+
+
+void et::BattleScene::layoutBattlers(BattlerGroup* pGroup){
+ int nEnemy = pGroup->getEnemyBattlerList().size();
+ int nIdeal = pGroup->getIdealBattlerList().size();
+
+ int cntEnemy = 0;
+ int cntIdeal = 0;
+ float zTable[3][3] = { {0.6f , 0.6f , 0.6f} , { 0.8f , 0.4f , 0.6f} , {0.9f , 0.6f , 0.30f} };//[\91\8d\90\94][\94Ô\8d\86]
+ float xTable[3][3] = { {-0.2f , 0.0f , 0.0f} , { -0.0f , -0.3f , 0.0f} , {-0.05f , -0.2f , -0.35f} };//[\91\8d\90\94][\94Ô\8d\86]
+ float ixTable[3][3] = { {0.2f , 0.0f , 0.0f} , { 0.0f , 0.07f , 0.6f} , {0.1f , 0.2f , 0.25f} };//[\91\8d\90\94][\94Ô\8d\86]
+
+ BattlerFacade* pBattler = pGroup->getHeroBattler();
+ pBattler->setAidlingAnimation(mof::Vector3D(0.3f , 0.0f , 0.6f));
+ pBattler->setBasePosition(mof::Vector3D(0.3f , 0.0f , 0.6f));
+
+
+ for(std::vector<BattlerFacade*>::const_iterator itr = pGroup->getEnemyBattlerList().begin() ; itr != pGroup->getEnemyBattlerList().end() ; ++itr){
+ mof::KeyFrameAnimation* pAnimation = new mof::KeyFrameAnimation();
+ (*itr)->setAidlingAnimation(mof::Vector3D(-0.45f + xTable[nEnemy-1][cntEnemy] , 0.0f , zTable[nEnemy-1][cntEnemy]));
+ (*itr)->setBasePosition(mof::Vector3D(-0.45f + xTable[nEnemy-1][cntEnemy] , 0.0f , zTable[nEnemy-1][cntEnemy]));
+ cntEnemy++;
+ }
+
+ for(std::vector<BattlerFacade*>::const_iterator itr = pGroup->getIdealBattlerList().begin() ; itr != pGroup->getIdealBattlerList().end() ; ++itr){
+ mof::KeyFrameAnimation* pAnimation = new mof::KeyFrameAnimation();
+ (*itr)->setAidlingAnimation(mof::Vector3D(0.6 +ixTable[nIdeal-1][cntIdeal] , 0.0f , zTable[nIdeal-1][cntIdeal]));
+ cntIdeal++;
+
+ }
+
}
\ No newline at end of file
-#pragma once\r
-#include "GameScene.h"\r
-#include "mof/Graphics.h"\r
-#include "mof/Camera.h"\r
-#include "mof/VertexBuffer.h"\r
-#include "mof/VertexTypes.h"\r
-#include "mof/Billboard.h"\r
-#include <list>\r
-#include "BattlerFacade.h"\r
-#include "MyFrame.h"\r
-#include "mof/AnimationScheduler.h"\r
-#include "BattleData.h"\r
-#include "BattleSystem.h"\r
-#include "BattlerWindow.h"\r
-\r
-namespace et{\r
-\r
- typedef std::vector<BattlerFacade*> BattlerList;\r
- class BattlerGroup;\r
- class FixedBattler;\r
-\r
- class BattleScene : public et::GameScene\r
- {\r
- mof::Sprite* m_back;\r
- mof::MeshResource m_field;\r
- mof::Camera* m_pCamera;\r
-\r
- et::BattleData* m_pBattleData;\r
- //BattlerList m_battlerList;\r
-\r
- //\83\81\83j\83\85\81[\83V\83X\83e\83\80\r
- MyFrame* m_pCurrentFrame;\r
- mof::AnimationResource m_menuChangeAnimation;\r
- mof::AnimationScheduler m_translationScheduler;\r
- std::list<mof::Container2D> m_menuStack;\r
- bool m_popFlag;\r
- bool m_clearFlag;\r
-\r
- //\83^\81[\83\93\8aÇ\97\9d\r
- mof::AnimationScheduler m_turnScheduler;\r
- et::BattleSystem* m_pBattleSystem;\r
-\r
- et::MyWindow* m_pBattleResultWindow;\r
-\r
- std::list<et::BattlerWindow*> m_battlerWindowList;\r
- et::FixedBattler* m_pHeroBattler;\r
-\r
- void layoutBattlers(BattlerGroup* pGroup);\r
- public:\r
-\r
-\r
- BattleScene(mof::TextureResource& nullTexture );\r
- virtual ~BattleScene(void);\r
-\r
- virtual bool initialize();\r
- virtual bool draw();\r
- virtual bool update();\r
- \r
-\r
- \r
- };\r
-\r
-};\r
+#pragma once
+#include "GameScene.h"
+#include "mof/Graphics.h"
+#include "mof/Camera.h"
+#include "mof/VertexBuffer.h"
+#include "mof/VertexTypes.h"
+#include "mof/Billboard.h"
+#include <list>
+#include "BattlerFacade.h"
+#include "MyFrame.h"
+#include "mof/AnimationScheduler.h"
+#include "BattleData.h"
+#include "BattleSystem.h"
+#include "BattlerWindow.h"
+
+namespace et{
+
+ typedef std::vector<BattlerFacade*> BattlerList;
+ class BattlerGroup;
+ class FixedBattler;
+
+ class BattleScene : public et::GameScene
+ {
+ mof::Sprite* m_back;
+ mof::MeshResource m_field;
+ mof::Camera* m_pCamera;
+
+ et::BattleData* m_pBattleData;
+ //BattlerList m_battlerList;
+
+ //\83\81\83j\83\85\81[\83V\83X\83e\83\80
+ MyFrame* m_pCurrentFrame;
+ mof::AnimationResource m_menuChangeAnimation;
+ mof::AnimationScheduler m_translationScheduler;
+ std::list<mof::Container2D> m_menuStack;
+ bool m_popFlag;
+ bool m_clearFlag;
+
+ //\83^\81[\83\93\8aÇ\97\9d
+ mof::AnimationScheduler m_turnScheduler;
+ et::BattleSystem* m_pBattleSystem;
+
+ et::MyWindow* m_pBattleResultWindow;
+
+ std::list<et::BattlerWindow*> m_battlerWindowList;
+ et::FixedBattler* m_pHeroBattler;
+
+ void layoutBattlers(BattlerGroup* pGroup);
+ public:
+
+
+ BattleScene(mof::TextureResource& nullTexture );
+ virtual ~BattleScene(void);
+
+ virtual bool initialize();
+ virtual bool draw();
+ virtual bool update();
+
+
+
+ };
+
+};
-#include "BattleSystem.h"\r
-#include "mof/KeyFrameAnimation.h"\r
-#include "mof/ConsoleIO.h"\r
-#include <sstream>\r
-#include <iomanip>\r
-#include "mof/GraphicsDevice.h"\r
-#include "MyFrame.h"\r
-#include "mof/System.h"\r
-#include "BattlerBindAnimation.h"\r
-#include "AttackAction.h"\r
-#include "BattlerGroup.h"\r
-#include "mof/DataBasedAnimation.h"\r
-\r
-\r
-\r
-\r
-mof::GraphicsSchedule* createNumbersEffect(int numbers , mof::Vector2D& position);\r
-mof::GraphicsSchedule* createAPEffect(int dActionPoint , mof::Vector2D& position);\r
-mof::GraphicsSchedule* createMessage(const mof::tstring& message , mof::TextureManager* pTextureManager);\r
-mof::GraphicsSchedule* createChanceDisplay(int beginFrame , int endFrame , et::BattleData* pBattleData);\r
-\r
-\r
-\r
-\r
-bool compareTo( et::BattlerFacade* &a , et::BattlerFacade* &b){\r
- return (*a).getParameter().speed < (*b).getParameter().speed;\r
- }\r
-\r
-\r
-et::BattleSystem::BattleSystem(et::BattleData* pBattleData , mof::AnimationScheduler* pScheduler , et::Common& common)\r
-: m_common(common){\r
- m_pBattleData = pBattleData;\r
- m_pScheduler = pScheduler;\r
- m_pChanceScheduler = NULL;\r
-\r
- m_finalized = false;\r
- m_state = et::BattleSystem::READY;\r
- m_pAction = NULL;\r
- m_succeeded = false;\r
- \r
- //\83o\83g\83\89\81[\82ð\91¬\93x\82Ì\8f¸\8f\87\82É\83\\81[\83g\82µ\82Ä\8ai\94[\r
- m_battlerQueue = m_pBattleData->getBattlerGroup()->getEnemyBattlerListAlive();\r
- m_battlerQueue.push_back(m_pBattleData->getBattlerGroup()->getHeroBattler());\r
- std::sort(m_battlerQueue.begin() , m_battlerQueue.end() , compareTo);\r
-}\r
-\r
-et::BattleSystem::~BattleSystem(){\r
- for(std::list<mof::GraphicsSchedule*>::iterator itr = m_scheduleList.begin() ; itr != m_scheduleList.end() ; ){\r
- delete *itr;\r
- itr = m_scheduleList.erase(itr);\r
- }\r
- delete m_pAction;\r
-}\r
-\r
-\r
-\r
-\r
-\r
-void et::BattleSystem::update(){\r
-\r
- /*{\r
- \r
- switch(m_state){\r
- case MAIN: DEBUG_PRINT("MAIN");\r
- break;\r
- case EXECUTE: DEBUG_PRINT("EXECUTE");\r
- break;\r
- case HIT: DEBUG_PRINT("HIT");\r
- break;\r
- default: DEBUG_PRINT("OTHER");\r
- }\r
- }*/\r
- \r
-\r
- bool flag = false;\r
- for(std::list<mof::GraphicsSchedule*>::iterator itr = m_scheduleList.begin() ; itr != m_scheduleList.end() ; ){\r
- (*itr)->update();\r
- if((*itr)->isFinalized()){\r
- if(m_state == SECESSION || m_state == FINAL){//\83G\83t\83F\83N\83g\82Í\93r\92\86\82Å\8fI\82í\82ç\82È\82¢\r
- delete *itr;\r
- itr = m_scheduleList.erase(itr);\r
- continue;\r
- }\r
- }\r
- else flag = true;\r
- ++itr;\r
- }\r
- if(flag)return;\r
-\r
- \r
- if(m_state != HIT){\r
- \r
- if(!m_pScheduler->isFinalized())return;\r
- }\r
- if(m_pScheduler->isFinalized())m_pScheduler->clear();\r
-\r
- \r
- \r
- BattlerGroup* pGroup = m_pBattleData->getBattlerGroup();\r
-\r
- if(m_state == et::BattleSystem::READY){\r
- //\8e\9f\82Ì\83A\83N\83V\83\87\83\93\82ð\93¾\82é\r
- if(m_battlerQueue.empty())assert(0);\r
- et::BattlerFacade* pBattler = m_battlerQueue.back();\r
- m_pAction = pBattler->createAction(pGroup);\r
- if(m_pAction == NULL){\r
- //\89½\82à\82µ\82È\82¢\r
- m_state = et::BattleSystem::SECESSION;\r
- return;\r
- }\r
-\r
- //\83^\81[\83Q\83b\83g\82Í\90¶\91¶\82µ\82Ä\82¢\82é\82©\82ð\83`\83F\83b\83N\r
- if(m_pAction->getTargetList().size() == 1 && !m_pAction->getTargetList().front()->getParameter().alive){\r
- if(pBattler->getType() == et::HERO){\r
- //\90¶\91¶\82µ\82Ä\82¢\82È\82¯\82ê\82Î\81A\8e\9f\82Ì\83\82\83\93\83X\83^\81[\82ð\91I\82Ô\r
- et::BattlerFacade* pNextTarget = NULL;\r
- for(std::vector<et::BattlerFacade*>::const_iterator itr = pGroup->getEnemyBattlerList().begin() ; itr != pGroup->getEnemyBattlerList().end() ; ++itr){\r
- if((*itr)->getParameter().alive){\r
- pNextTarget = *itr;\r
- break;\r
- }\r
- }\r
- if(pNextTarget == NULL){\r
- //\90¶\91¶\82µ\82Ä\82¢\82é\83\82\83\93\83X\83^\81[\82ª\82¢\82È\82©\82Á\82½\r
- m_state = et::BattleSystem::SECESSION;\r
- return;\r
- }\r
- else {\r
- //\83^\81[\83Q\83b\83g\82ð\8dX\90V\r
- std::vector<et::BattlerFacade*> targetList;\r
- targetList.push_back(pNextTarget);\r
- m_pAction->setTargetList(targetList);\r
- }\r
- }\r
- else {//\96¡\95û\82Í\82P\90l\82µ\82©\82¢\82È\82¢\82Ì\82Å\r
- m_state = et::BattleSystem::SECESSION;\r
- return;\r
- }\r
- }\r
- \r
-\r
- m_pScheduler->add(10 , m_pAction->createApproachAnimation());\r
- mof::tstring message = m_pAction->getActionMessage();\r
- if(message.length() > 0)m_scheduleList.push_back(createMessage(message , m_pBattleData->getTextureManager()));\r
- //\83X\83y\83V\83\83\83\8b\83A\83N\83V\83\87\83\93\82Ì\90¶\90¬\r
- if((rand()%100 < 20) && m_pAction->isDirectAttack()){\r
- m_pChanceScheduler = createChanceDisplay(10 , 30 , m_pBattleData);\r
- m_scheduleList.push_back(m_pChanceScheduler);\r
- m_succeeded = false;\r
- }\r
- m_state = et::BattleSystem::EXECUTE;\r
- }\r
- else if(m_state == et::BattleSystem::EXECUTE){\r
- et::BattlerFacade* pBattler = m_battlerQueue.back();\r
- if(!m_succeeded){\r
- m_pScheduler->add(0 , m_pAction->createExecuteAnimation());\r
- //std::vector<int> resultList = m_pAction->doAction();\r
- /*int index = 0;\r
- for(std::vector<BattlerFacade*>::iterator itr = m_pAction->getTargetList().begin() ; itr != m_pAction->getTargetList().end() ; ++itr){\r
- //\83G\83t\83F\83N\83g\r
- mof::Vector2D position = mof::GraphicsDevice::getInstance()->to2DPosition((*itr)->getPosition());\r
- m_scheduleList.push_back(createNumbersEffect(resultList.at(index) , position));\r
- index++;\r
- }*/\r
- m_scheduleList.push_back(m_pAction->createEffect(m_common));\r
- \r
- /*index = 0;\r
- for(std::vector<BattlerFacade*>::iterator itr = m_pAction->getTargetList().begin() ; itr != m_pAction->getTargetList().end() ; ++itr){\r
- if(resultList.at(index) > 0)continue;\r
- int level = ((*itr)->getParameter().alive) ? 0 : 1;\r
- m_pScheduler->add(20 , (*itr)->setDamagedAnimation(level));\r
- }*/\r
- }\r
- else if(pBattler == pGroup->getHeroBattler()){\r
- //\83N\83\8a\83e\83B\83J\83\8b\90¬\8c÷\81I\r
- m_pScheduler->add(0 , m_pAction->createExecuteAnimation());\r
- m_scheduleList.push_back(m_pAction->createEffect(m_common));\r
- m_scheduleList.push_back( createMessage(_T("\83N\83\8a\83e\83B\83J\83\8b") , m_pBattleData->getTextureManager()));\r
- }\r
- else {\r
- //\83J\83E\83\93\83^\81[\90¬\8c÷\81I\r
- //\91\8a\8eè\82Ì\8dU\8c\82\83L\83\83\83\93\83Z\83\8b\81@\83m\81[\83R\83X\83g\82Å\8dU\8c\82\82Å\82«\82é\r
- m_battlerQueue.pop_back();//\8dU\8c\82\83L\83\83\83\93\83Z\83\8b\r
- et::BattlerFacade* pTarget = m_pAction->getTargetList().front();\r
- m_battlerQueue.push_back(pTarget);\r
- //AP\82¾\82¯\8fÁ\94ï\82³\82¹\82é\r
- et::BattlerParameter parameter = pBattler->getParameter();\r
- parameter.dActionPoint -= m_pAction->getAPCost();\r
- pBattler->setParameter(parameter);\r
- delete m_pAction;\r
- \r
- m_pAction = new et::AttackAction(pTarget , pBattler , 0);//\83m\81[\83R\83X\83g\82Å\8dU\8c\82\r
- m_pScheduler->add(0 , m_pAction->createExecuteAnimation());\r
- m_scheduleList.push_back(m_pAction->createEffect(m_common));\r
- /*std::vector<int> resultList = m_pAction->doAction();\r
- int index = 0;\r
- for(std::vector<BattlerFacade*>::iterator itr = m_pAction->getTargetList().begin() ; itr != m_pAction->getTargetList().end() ; ++itr){\r
- //\83G\83t\83F\83N\83g\r
- mof::Vector2D position = mof::GraphicsDevice::getInstance()->to2DPosition((*itr)->getPosition());\r
- m_scheduleList.push_back(createNumbersEffect(resultList.at(index) , position));\r
- index++;\r
- }\r
- \r
- index = 0;\r
- for(std::vector<BattlerFacade*>::iterator itr = m_pAction->getTargetList().begin() ; itr != m_pAction->getTargetList().end() ; ++itr){\r
- if(resultList.at(index) > 0)continue;\r
- int level = ((*itr)->getParameter().alive) ? 0 : 1;\r
- m_pScheduler->add(20 , (*itr)->setDamagedAnimation(level));\r
- }*/\r
-\r
- m_scheduleList.push_back( createMessage(_T("\83J\83E\83\93\83^\81[") , m_pBattleData->getTextureManager()));\r
- \r
- \r
- }\r
- m_state = et::BattleSystem::HIT;\r
- }\r
- else if(m_state == et::BattleSystem::HIT){\r
- et::BattlerFacade* pBattler = m_battlerQueue.back();\r
- if(!m_succeeded){\r
- //m_pScheduler->add(0 , m_pAction->createExecuteAnimation());\r
- std::vector<int> resultList = m_pAction->doAction();\r
- int index = 0;\r
- for(std::vector<BattlerFacade*>::iterator itr = m_pAction->getTargetList().begin() ; itr != m_pAction->getTargetList().end() ; ++itr){\r
- //\83G\83t\83F\83N\83g\r
- mof::Vector2D position = mof::GraphicsDevice::getInstance()->to2DPosition((*itr)->getPosition());\r
- m_scheduleList.push_back(createNumbersEffect(resultList.at(index) , position));\r
- index++;\r
- }\r
- //m_scheduleList.push_back(m_pAction->createEffect(m_common));\r
- \r
- index = 0;\r
- for(std::vector<BattlerFacade*>::iterator itr = m_pAction->getTargetList().begin() ; itr != m_pAction->getTargetList().end() ; ++itr){\r
- if(resultList.at(index) > 0)continue;\r
- int level = ((*itr)->getParameter().alive) ? 0 : 1;\r
- m_pScheduler->add(0 , (*itr)->setDamagedAnimation(level));\r
- }\r
- }\r
- else if(pBattler == pGroup->getHeroBattler()){\r
- //\83N\83\8a\83e\83B\83J\83\8b\90¬\8c÷\81I\r
- //\91\8a\8eè\82Ì\96h\8cä\97Í\96³\8e\8b\81@\91\8a\8eè\82ÌAP\82ð0\82É\82·\82é\r
-\r
- //\88ê\8e\9e\93I\82É\83N\83\8a\83e\83B\83J\83\8b\8fó\91Ô\82É\82·\82é\r
- et::BattlerParameter parameter = pBattler->getParameter();\r
- parameter.critical = true;\r
- pBattler->setParameter(parameter);\r
- //m_pScheduler->add(0 , m_pAction->createExecuteAnimation());\r
- std::vector<int> resultList = m_pAction->doAction();\r
- int index = 0;\r
- for(std::vector<BattlerFacade*>::iterator itr = m_pAction->getTargetList().begin() ; itr != m_pAction->getTargetList().end() ; ++itr){\r
- //\83G\83t\83F\83N\83g\r
- mof::Vector2D position = mof::GraphicsDevice::getInstance()->to2DPosition((*itr)->getPosition());\r
- m_scheduleList.push_back(createNumbersEffect(resultList.at(index) , position));\r
- index++;\r
- }\r
- \r
- index = 0;\r
- for(std::vector<BattlerFacade*>::iterator itr = m_pAction->getTargetList().begin() ; itr != m_pAction->getTargetList().end() ; ++itr){\r
- if(resultList.at(index) > 0)continue;\r
- int level = ((*itr)->getParameter().alive) ? 0 : 1;\r
- m_pScheduler->add(20 , (*itr)->setDamagedAnimation(level));\r
- }\r
-\r
- //\83N\83\8a\83e\83B\83J\83\8b\8fó\91Ô\82ð\82È\82¨\82·\r
- parameter = pBattler->getParameter();\r
- parameter.critical = false;\r
- pBattler->setParameter(parameter);\r
-\r
- //\83^\81[\83Q\83b\83g\82ÌdAP\82ð\8f\\95ª\82É\8c¸\82ç\82·\r
- parameter = m_pAction->getTargetList().front()->getParameter();\r
- parameter.dActionPoint -= 100;\r
- m_pAction->getTargetList().front()->setParameter(parameter);\r
- m_succeeded = false;\r
- //m_scheduleList.push_back( createMessage(_T("\83N\83\8a\83e\83B\83J\83\8b") , m_pBattleData->getTextureManager()));\r
- }\r
- else {\r
- //\83J\83E\83\93\83^\81[\90¬\8c÷\81I\r
- //\91\8a\8eè\82Ì\8dU\8c\82\83L\83\83\83\93\83Z\83\8b\81@\83m\81[\83R\83X\83g\82Å\8dU\8c\82\82Å\82«\82é\r
- /*m_battlerQueue.pop_back();//\8dU\8c\82\83L\83\83\83\93\83Z\83\8b\r
- et::BattlerFacade* pTarget = m_pAction->getTargetList().front();\r
- m_battlerQueue.push_back(pTarget);\r
- //AP\82¾\82¯\8fÁ\94ï\82³\82¹\82é\r
- et::BattlerParameter parameter = pBattler->getParameter();\r
- parameter.dActionPoint -= m_pAction->getAPCost();\r
- pBattler->setParameter(parameter);\r
- delete m_pAction;\r
- m_pAction = new et::AttackAction(pTarget , pBattler , 0);//\83m\81[\83R\83X\83g\82Å\8dU\8c\82\r
- m_pScheduler->add(0 , m_pAction->createExecuteAnimation());*/\r
- \r
- \r
- std::vector<int> resultList = m_pAction->doAction();\r
- int index = 0;\r
- for(std::vector<BattlerFacade*>::iterator itr = m_pAction->getTargetList().begin() ; itr != m_pAction->getTargetList().end() ; ++itr){\r
- //\83G\83t\83F\83N\83g\r
- mof::Vector2D position = mof::GraphicsDevice::getInstance()->to2DPosition((*itr)->getPosition());\r
- m_scheduleList.push_back(createNumbersEffect(resultList.at(index) , position));\r
- index++;\r
- }\r
- \r
- index = 0;\r
- for(std::vector<BattlerFacade*>::iterator itr = m_pAction->getTargetList().begin() ; itr != m_pAction->getTargetList().end() ; ++itr){\r
- if(resultList.at(index) > 0)continue;\r
- int level = ((*itr)->getParameter().alive) ? 0 : 1;\r
- m_pScheduler->add(20 , (*itr)->setDamagedAnimation(level));\r
- }\r
-\r
- //m_scheduleList.push_back( createMessage(_T("\83J\83E\83\93\83^\81[") , m_pBattleData->getTextureManager()));\r
- m_succeeded = false;\r
- \r
- }\r
- m_state = et::BattleSystem::MAIN;\r
- }\r
- else if(m_state == et::BattleSystem::MAIN ){\r
- et::BattlerFacade* pBattler = m_battlerQueue.back();\r
- m_pScheduler->add(0 , pBattler->setMovingAnimation(pBattler->getBasePosition() , 15));\r
- for(std::vector<BattlerFacade*>::iterator itr = m_pAction->getTargetList().begin() ; itr != m_pAction->getTargetList().end() ; ++itr){\r
- if(pBattler == (*itr) )continue;\r
- if((*itr)->getPosition() == (*itr)->getBasePosition())(*itr)->setAidlingAnimation((*itr)->getPosition());\r
- else if((*itr)->getParameter().alive)(*itr)->setMovingAnimation((*itr)->getBasePosition() , 15);\r
- }\r
- m_state = et::BattleSystem::SECESSION;\r
- }\r
- else if(m_state == et::BattleSystem::SECESSION){\r
- m_state = et::BattleSystem::READY;\r
- et::BattlerFacade* pBattler = m_battlerQueue.back();\r
- pBattler->setAidlingAnimation(pBattler->getBasePosition() );\r
- if(m_pAction != NULL && m_pAction->getTargetList().size() == 1){\r
- //\83J\83E\83\93\83^\81[\82³\82ê\82Ä\96ß\82Á\82Ä\82«\82½\83o\83g\83\89\81[\82ð\83A\83C\83h\83\8a\83\93\83O\82É\82·\82é\r
- m_pAction->getTargetList().front()->setAidlingAnimation(m_pAction->getTargetList().front()->getPosition());\r
- }\r
- m_battlerQueue.pop_back();\r
- while(!m_battlerQueue.empty() && !m_battlerQueue.back()->getParameter().alive)m_battlerQueue.pop_back();\r
- delete m_pAction;\r
- m_pAction = NULL;\r
- if(m_battlerQueue.empty()){\r
- for(std::vector<et::BattlerFacade*>::const_iterator itr = pGroup->getBattlerList().begin() ; itr != pGroup->getBattlerList().end() ; ++itr){\r
- if(!(*itr)->getParameter().alive)continue;\r
- et::BattlerParameter parameter = (*itr)->getParameter();\r
- int dActionPoint = parameter.dActionPoint + 2;\r
- int tmpActionPoint = parameter.actionPoint;\r
- parameter.actionPoint += dActionPoint;\r
- if(parameter.actionPoint > 7)parameter.actionPoint = 7;\r
- else if(parameter.actionPoint < 0)parameter.actionPoint = 0;\r
- parameter.dActionPoint = 0;\r
- (*itr)->setParameter(parameter);\r
- mof::Vector2D position = mof::GraphicsDevice::getInstance()->to2DPosition((*itr)->getPosition());\r
- m_scheduleList.push_back(createAPEffect(parameter.actionPoint - tmpActionPoint , position));\r
- }\r
- m_state = et::BattleSystem::FINAL;\r
- }\r
- }\r
- else if(m_state == et::BattleSystem::FINAL && m_scheduleList.empty()){\r
- m_finalized = true;\r
- }\r
- \r
-}\r
-\r
-bool et::BattleSystem::isFinalized(){\r
- return m_finalized;\r
-}\r
-\r
-\r
-\r
-void et::BattleSystem::notifyPushKey(){\r
- if(m_pChanceScheduler == NULL)return;\r
- for(std::list<mof::GraphicsSchedule*>::iterator itr = m_scheduleList.begin() ; itr != m_scheduleList.end() ; ++itr){\r
- if((*itr) == m_pChanceScheduler){\r
- if((*itr)->isFinalized() || !(*itr)->isPlaying())return;\r
- m_succeeded = true;\r
- return;\r
- }\r
- \r
- }\r
- //\8aù\82É\8dí\8f\9c\82³\82ê\82Ä\82¢\82é\r
- m_pChanceScheduler = NULL;\r
-\r
-}\r
-\r
-\r
-std::list<mof::GraphicsModelPtr>& et::BattleSystem::getModelList( std::list<mof::GraphicsModelPtr>& modelList){\r
- for(std::list<mof::GraphicsSchedule*>::iterator itr = m_scheduleList.begin() ; itr != m_scheduleList.end(); ++itr){\r
- (*itr)->appendModelList(modelList);\r
- }\r
- return modelList;\r
-}\r
-\r
-\r
-mof::GraphicsSchedule* createNumbersEffect(int numbers , mof::Vector2D& position){\r
- std::basic_ostringstream<TCHAR> stream;\r
- stream << abs(numbers);\r
- mof::Sprite* pModel = mof::Sprite::createSpriteFromText(stream.str() , 20);\r
-\r
- mof::CascadeAnimation* pCascadeAnimation = new mof::CascadeAnimation();\r
- {\r
- mof::DataBasedAnimation* pAnimation;\r
- if(numbers > 0)pAnimation = new mof::DataBasedAnimation(_T("data/motion/heel.csv") );\r
- else pAnimation = new mof::DataBasedAnimation(_T("data/motion/damage.csv") );\r
- mof::AnimationResource resource(pAnimation);\r
- pCascadeAnimation->setElement(1 , resource);\r
- }\r
-\r
- {\r
- mof::KeyFrameAnimation* pAnimation = new mof::KeyFrameAnimation();\r
- pAnimation->setPosition(0 , mof::Vector2D(-200 , -200 ));\r
- pAnimation->setPosition(1 , position);\r
- pAnimation->setPosition(40 , position);\r
- \r
- \r
- mof::AnimationResource resource(pAnimation);\r
- pCascadeAnimation->setElement(0 , resource);\r
- }\r
- \r
- mof::AnimationResource animation(pCascadeAnimation);\r
- pModel->setAnimation(0 , animation);\r
- \r
- mof::GraphicsSchedule* pSchedule = new mof::GraphicsSchedule();\r
- pSchedule->add(0 , mof::GraphicsModelPtr(pModel) , animation);\r
- return pSchedule;\r
-\r
-\r
-}\r
-\r
-mof::GraphicsSchedule* createAPEffect(int dActionPoint , mof::Vector2D& position){\r
- std::basic_ostringstream<TCHAR> stream;\r
- stream << _T("AP");\r
- if(dActionPoint >= 0)stream << _T("+");\r
- stream << dActionPoint;\r
- mof::Sprite* pModel = mof::Sprite::createSpriteFromText(stream.str() , 20);\r
-\r
-\r
- mof::CascadeAnimation* pCascadeAnimation = new mof::CascadeAnimation();\r
- {\r
- mof::DataBasedAnimation* pAnimation = new mof::DataBasedAnimation(_T("data/motion/ap.csv") );\r
- mof::AnimationResource resource(pAnimation);\r
- pCascadeAnimation->setElement(1 , resource);\r
- }\r
-\r
- {\r
- mof::KeyFrameAnimation* pAnimation = new mof::KeyFrameAnimation();\r
- pAnimation->setPosition(0 , mof::Vector2D(-200 , -200 ));\r
- pAnimation->setPosition(1 , position);\r
- pAnimation->setPosition(40 , position);\r
-\r
- mof::AnimationResource resource(pAnimation);\r
- pCascadeAnimation->setElement(0 , resource);\r
- }\r
- \r
- mof::AnimationResource animation(pCascadeAnimation);\r
- pModel->setAnimation(0 , animation);\r
-\r
- mof::GraphicsSchedule* pSchedule = new mof::GraphicsSchedule();\r
- pSchedule->add(20 , mof::GraphicsModelPtr(pModel) , animation);\r
- return pSchedule;\r
-\r
-}\r
-\r
-\r
-mof::GraphicsSchedule* createMessage(const mof::tstring& message , mof::TextureManager* pTextureManager){\r
- \r
- et::MyFrame* pModel = new et::MyFrame(mof::Line2D( 0 , 0 , 200 , 300) , true , pTextureManager->getResource(_T("image/frame0.png")));\r
- //pModel->setMargin(2);\r
- mof::Sprite* pMessage = mof::Sprite::createSpriteFromText(message , 17);\r
- pModel->add(pMessage);\r
-\r
- //\83Z\83\93\83^\83\8a\83\93\83O\82·\82é\r
- int centerizedX = (mof::System::getInstance()->getWindowWidth() - pModel->getWidth()) * 0.5;\r
-\r
- mof::KeyFrameAnimation* pAnimation = new mof::KeyFrameAnimation();\r
- pAnimation->setPosition(0 , mof::Vector2D(centerizedX , -50 ));\r
- pAnimation->setPosition(10 , mof::Vector2D(centerizedX , 5 ));\r
- pAnimation->setPosition(60 , mof::Vector2D(centerizedX , 5 ));\r
- pAnimation->setPosition(70 , mof::Vector2D(centerizedX , -50 ));\r
- pAnimation->setFinalKey(0);\r
- mof::AnimationResource resource(pAnimation);\r
- pModel->setAnimation(0 , resource);\r
-\r
-\r
- mof::GraphicsSchedule* pSchedule = new mof::GraphicsSchedule();\r
- pSchedule->add(20 , mof::GraphicsModelPtr(pModel) , resource);\r
- return pSchedule;\r
-}\r
-\r
-\r
-mof::GraphicsSchedule* createChanceDisplay(int beginFrame , int endFrame , et::BattleData* pBattleData){\r
- et::MyFrame* pModel = new et::MyFrame(mof::Line2D( 0 , 0 , 200 , 300) , true , \r
- pBattleData->getTextureManager()->getResource(_T("image/frame0.png")));\r
- pModel->setMargin(5);\r
- mof::Sprite* pMessage = mof::Sprite::createSpriteFromText("Chance!" , 13);\r
- pModel->add(pMessage);\r
-\r
- et::BattlerBindAnimation* pAnimation = new et::BattlerBindAnimation(pBattleData->getBattlerGroup()->getHeroBattler());\r
- pAnimation->setFinalKey(endFrame - beginFrame);\r
- \r
- mof::AnimationResource resource(pAnimation);\r
- pModel->setAnimation(0 , resource);\r
-\r
-\r
- mof::GraphicsSchedule* pSchedule = new mof::GraphicsSchedule();\r
- pSchedule->add(beginFrame , mof::GraphicsModelPtr(pModel) , resource);\r
- return pSchedule;\r
-\r
+#include "BattleSystem.h"
+#include "mof/KeyFrameAnimation.h"
+#include "mof/ConsoleIO.h"
+#include <sstream>
+#include <iomanip>
+#include "mof/GraphicsDevice.h"
+#include "MyFrame.h"
+#include "mof/System.h"
+#include "BattlerBindAnimation.h"
+#include "AttackAction.h"
+#include "BattlerGroup.h"
+#include "mof/DataBasedAnimation.h"
+
+
+
+
+mof::GraphicsSchedule* createNumbersEffect(int numbers , mof::Vector2D& position);
+mof::GraphicsSchedule* createAPEffect(int dActionPoint , mof::Vector2D& position);
+mof::GraphicsSchedule* createMessage(const mof::tstring& message , mof::TextureManager* pTextureManager);
+mof::GraphicsSchedule* createChanceDisplay(int beginFrame , int endFrame , et::BattleData* pBattleData);
+
+
+
+
+bool compareTo( et::BattlerFacade* &a , et::BattlerFacade* &b){
+ return (*a).getParameter().speed < (*b).getParameter().speed;
+ }
+
+
+et::BattleSystem::BattleSystem(et::BattleData* pBattleData , mof::AnimationScheduler* pScheduler , et::Common& common)
+: m_common(common){
+ m_pBattleData = pBattleData;
+ m_pScheduler = pScheduler;
+ m_pChanceScheduler = NULL;
+
+ m_finalized = false;
+ m_state = et::BattleSystem::READY;
+ m_pAction = NULL;
+ m_succeeded = false;
+
+ //\83o\83g\83\89\81[\82ð\91¬\93x\82Ì\8f¸\8f\87\82É\83\\81[\83g\82µ\82Ä\8ai\94[
+ m_battlerQueue = m_pBattleData->getBattlerGroup()->getEnemyBattlerListAlive();
+ m_battlerQueue.push_back(m_pBattleData->getBattlerGroup()->getHeroBattler());
+ std::sort(m_battlerQueue.begin() , m_battlerQueue.end() , compareTo);
+}
+
+et::BattleSystem::~BattleSystem(){
+ for(std::list<mof::GraphicsSchedule*>::iterator itr = m_scheduleList.begin() ; itr != m_scheduleList.end() ; ){
+ delete *itr;
+ itr = m_scheduleList.erase(itr);
+ }
+ delete m_pAction;
+}
+
+
+
+
+
+void et::BattleSystem::update(){
+
+ /*{
+
+ switch(m_state){
+ case MAIN: DEBUG_PRINT("MAIN");
+ break;
+ case EXECUTE: DEBUG_PRINT("EXECUTE");
+ break;
+ case HIT: DEBUG_PRINT("HIT");
+ break;
+ default: DEBUG_PRINT("OTHER");
+ }
+ }*/
+
+
+ bool flag = false;
+ for(std::list<mof::GraphicsSchedule*>::iterator itr = m_scheduleList.begin() ; itr != m_scheduleList.end() ; ){
+ (*itr)->update();
+ if((*itr)->isFinalized()){
+ if(m_state == SECESSION || m_state == FINAL){//\83G\83t\83F\83N\83g\82Í\93r\92\86\82Å\8fI\82í\82ç\82È\82¢
+ delete *itr;
+ itr = m_scheduleList.erase(itr);
+ continue;
+ }
+ }
+ else flag = true;
+ ++itr;
+ }
+ if(flag)return;
+
+
+ if(m_state != HIT){
+
+ if(!m_pScheduler->isFinalized())return;
+ }
+ if(m_pScheduler->isFinalized())m_pScheduler->clear();
+
+
+
+ BattlerGroup* pGroup = m_pBattleData->getBattlerGroup();
+
+ if(m_state == et::BattleSystem::READY){
+ //\8e\9f\82Ì\83A\83N\83V\83\87\83\93\82ð\93¾\82é
+ if(m_battlerQueue.empty())assert(0);
+ et::BattlerFacade* pBattler = m_battlerQueue.back();
+ m_pAction = pBattler->createAction(pGroup);
+ if(m_pAction == NULL){
+ //\89½\82à\82µ\82È\82¢
+ m_state = et::BattleSystem::SECESSION;
+ return;
+ }
+
+ //\83^\81[\83Q\83b\83g\82Í\90¶\91¶\82µ\82Ä\82¢\82é\82©\82ð\83`\83F\83b\83N
+ if(m_pAction->getTargetList().size() == 1 && !m_pAction->getTargetList().front()->getParameter().alive){
+ if(pBattler->getType() == et::HERO){
+ //\90¶\91¶\82µ\82Ä\82¢\82È\82¯\82ê\82Î\81A\8e\9f\82Ì\83\82\83\93\83X\83^\81[\82ð\91I\82Ô
+ et::BattlerFacade* pNextTarget = NULL;
+ for(std::vector<et::BattlerFacade*>::const_iterator itr = pGroup->getEnemyBattlerList().begin() ; itr != pGroup->getEnemyBattlerList().end() ; ++itr){
+ if((*itr)->getParameter().alive){
+ pNextTarget = *itr;
+ break;
+ }
+ }
+ if(pNextTarget == NULL){
+ //\90¶\91¶\82µ\82Ä\82¢\82é\83\82\83\93\83X\83^\81[\82ª\82¢\82È\82©\82Á\82½
+ m_state = et::BattleSystem::SECESSION;
+ return;
+ }
+ else {
+ //\83^\81[\83Q\83b\83g\82ð\8dX\90V
+ std::vector<et::BattlerFacade*> targetList;
+ targetList.push_back(pNextTarget);
+ m_pAction->setTargetList(targetList);
+ }
+ }
+ else {//\96¡\95û\82Í\82P\90l\82µ\82©\82¢\82È\82¢\82Ì\82Å
+ m_state = et::BattleSystem::SECESSION;
+ return;
+ }
+ }
+
+
+ m_pScheduler->add(10 , m_pAction->createApproachAnimation());
+ mof::tstring message = m_pAction->getActionMessage();
+ if(message.length() > 0)m_scheduleList.push_back(createMessage(message , m_pBattleData->getTextureManager()));
+ //\83X\83y\83V\83\83\83\8b\83A\83N\83V\83\87\83\93\82Ì\90¶\90¬
+ if((rand()%100 < 20) && m_pAction->isDirectAttack()){
+ m_pChanceScheduler = createChanceDisplay(10 , 30 , m_pBattleData);
+ m_scheduleList.push_back(m_pChanceScheduler);
+ m_succeeded = false;
+ }
+ m_state = et::BattleSystem::EXECUTE;
+ }
+ else if(m_state == et::BattleSystem::EXECUTE){
+ et::BattlerFacade* pBattler = m_battlerQueue.back();
+ if(!m_succeeded){
+ m_pScheduler->add(0 , m_pAction->createExecuteAnimation());
+ //std::vector<int> resultList = m_pAction->doAction();
+ /*int index = 0;
+ for(std::vector<BattlerFacade*>::iterator itr = m_pAction->getTargetList().begin() ; itr != m_pAction->getTargetList().end() ; ++itr){
+ //\83G\83t\83F\83N\83g
+ mof::Vector2D position = mof::GraphicsDevice::getInstance()->to2DPosition((*itr)->getPosition());
+ m_scheduleList.push_back(createNumbersEffect(resultList.at(index) , position));
+ index++;
+ }*/
+ m_scheduleList.push_back(m_pAction->createEffect(m_common));
+
+ /*index = 0;
+ for(std::vector<BattlerFacade*>::iterator itr = m_pAction->getTargetList().begin() ; itr != m_pAction->getTargetList().end() ; ++itr){
+ if(resultList.at(index) > 0)continue;
+ int level = ((*itr)->getParameter().alive) ? 0 : 1;
+ m_pScheduler->add(20 , (*itr)->setDamagedAnimation(level));
+ }*/
+ }
+ else if(pBattler == pGroup->getHeroBattler()){
+ //\83N\83\8a\83e\83B\83J\83\8b\90¬\8c÷\81I
+ m_pScheduler->add(0 , m_pAction->createExecuteAnimation());
+ m_scheduleList.push_back(m_pAction->createEffect(m_common));
+ m_scheduleList.push_back( createMessage(_T("\83N\83\8a\83e\83B\83J\83\8b") , m_pBattleData->getTextureManager()));
+ }
+ else {
+ //\83J\83E\83\93\83^\81[\90¬\8c÷\81I
+ //\91\8a\8eè\82Ì\8dU\8c\82\83L\83\83\83\93\83Z\83\8b\81@\83m\81[\83R\83X\83g\82Å\8dU\8c\82\82Å\82«\82é
+ m_battlerQueue.pop_back();//\8dU\8c\82\83L\83\83\83\93\83Z\83\8b
+ et::BattlerFacade* pTarget = m_pAction->getTargetList().front();
+ m_battlerQueue.push_back(pTarget);
+ //AP\82¾\82¯\8fÁ\94ï\82³\82¹\82é
+ et::BattlerParameter parameter = pBattler->getParameter();
+ parameter.dActionPoint -= m_pAction->getAPCost();
+ pBattler->setParameter(parameter);
+ delete m_pAction;
+
+ m_pAction = new et::AttackAction(pTarget , pBattler , 0);//\83m\81[\83R\83X\83g\82Å\8dU\8c\82
+ m_pScheduler->add(0 , m_pAction->createExecuteAnimation());
+ m_scheduleList.push_back(m_pAction->createEffect(m_common));
+ /*std::vector<int> resultList = m_pAction->doAction();
+ int index = 0;
+ for(std::vector<BattlerFacade*>::iterator itr = m_pAction->getTargetList().begin() ; itr != m_pAction->getTargetList().end() ; ++itr){
+ //\83G\83t\83F\83N\83g
+ mof::Vector2D position = mof::GraphicsDevice::getInstance()->to2DPosition((*itr)->getPosition());
+ m_scheduleList.push_back(createNumbersEffect(resultList.at(index) , position));
+ index++;
+ }
+
+ index = 0;
+ for(std::vector<BattlerFacade*>::iterator itr = m_pAction->getTargetList().begin() ; itr != m_pAction->getTargetList().end() ; ++itr){
+ if(resultList.at(index) > 0)continue;
+ int level = ((*itr)->getParameter().alive) ? 0 : 1;
+ m_pScheduler->add(20 , (*itr)->setDamagedAnimation(level));
+ }*/
+
+ m_scheduleList.push_back( createMessage(_T("\83J\83E\83\93\83^\81[") , m_pBattleData->getTextureManager()));
+
+
+ }
+ m_state = et::BattleSystem::HIT;
+ }
+ else if(m_state == et::BattleSystem::HIT){
+ et::BattlerFacade* pBattler = m_battlerQueue.back();
+ if(!m_succeeded){
+ //m_pScheduler->add(0 , m_pAction->createExecuteAnimation());
+ std::vector<int> resultList = m_pAction->doAction();
+ int index = 0;
+ for(std::vector<BattlerFacade*>::iterator itr = m_pAction->getTargetList().begin() ; itr != m_pAction->getTargetList().end() ; ++itr){
+ //\83G\83t\83F\83N\83g
+ mof::Vector2D position = mof::GraphicsDevice::getInstance()->to2DPosition((*itr)->getPosition());
+ m_scheduleList.push_back(createNumbersEffect(resultList.at(index) , position));
+ index++;
+ }
+ //m_scheduleList.push_back(m_pAction->createEffect(m_common));
+
+ index = 0;
+ for(std::vector<BattlerFacade*>::iterator itr = m_pAction->getTargetList().begin() ; itr != m_pAction->getTargetList().end() ; ++itr){
+ if(resultList.at(index) > 0)continue;
+ int level = ((*itr)->getParameter().alive) ? 0 : 1;
+ m_pScheduler->add(0 , (*itr)->setDamagedAnimation(level));
+ }
+ }
+ else if(pBattler == pGroup->getHeroBattler()){
+ //\83N\83\8a\83e\83B\83J\83\8b\90¬\8c÷\81I
+ //\91\8a\8eè\82Ì\96h\8cä\97Í\96³\8e\8b\81@\91\8a\8eè\82ÌAP\82ð0\82É\82·\82é
+
+ //\88ê\8e\9e\93I\82É\83N\83\8a\83e\83B\83J\83\8b\8fó\91Ô\82É\82·\82é
+ et::BattlerParameter parameter = pBattler->getParameter();
+ parameter.critical = true;
+ pBattler->setParameter(parameter);
+ //m_pScheduler->add(0 , m_pAction->createExecuteAnimation());
+ std::vector<int> resultList = m_pAction->doAction();
+ int index = 0;
+ for(std::vector<BattlerFacade*>::iterator itr = m_pAction->getTargetList().begin() ; itr != m_pAction->getTargetList().end() ; ++itr){
+ //\83G\83t\83F\83N\83g
+ mof::Vector2D position = mof::GraphicsDevice::getInstance()->to2DPosition((*itr)->getPosition());
+ m_scheduleList.push_back(createNumbersEffect(resultList.at(index) , position));
+ index++;
+ }
+
+ index = 0;
+ for(std::vector<BattlerFacade*>::iterator itr = m_pAction->getTargetList().begin() ; itr != m_pAction->getTargetList().end() ; ++itr){
+ if(resultList.at(index) > 0)continue;
+ int level = ((*itr)->getParameter().alive) ? 0 : 1;
+ m_pScheduler->add(20 , (*itr)->setDamagedAnimation(level));
+ }
+
+ //\83N\83\8a\83e\83B\83J\83\8b\8fó\91Ô\82ð\82È\82¨\82·
+ parameter = pBattler->getParameter();
+ parameter.critical = false;
+ pBattler->setParameter(parameter);
+
+ //\83^\81[\83Q\83b\83g\82ÌdAP\82ð\8f\\95ª\82É\8c¸\82ç\82·
+ parameter = m_pAction->getTargetList().front()->getParameter();
+ parameter.dActionPoint -= 100;
+ m_pAction->getTargetList().front()->setParameter(parameter);
+ m_succeeded = false;
+ //m_scheduleList.push_back( createMessage(_T("\83N\83\8a\83e\83B\83J\83\8b") , m_pBattleData->getTextureManager()));
+ }
+ else {
+ //\83J\83E\83\93\83^\81[\90¬\8c÷\81I
+ //\91\8a\8eè\82Ì\8dU\8c\82\83L\83\83\83\93\83Z\83\8b\81@\83m\81[\83R\83X\83g\82Å\8dU\8c\82\82Å\82«\82é
+ /*m_battlerQueue.pop_back();//\8dU\8c\82\83L\83\83\83\93\83Z\83\8b
+ et::BattlerFacade* pTarget = m_pAction->getTargetList().front();
+ m_battlerQueue.push_back(pTarget);
+ //AP\82¾\82¯\8fÁ\94ï\82³\82¹\82é
+ et::BattlerParameter parameter = pBattler->getParameter();
+ parameter.dActionPoint -= m_pAction->getAPCost();
+ pBattler->setParameter(parameter);
+ delete m_pAction;
+ m_pAction = new et::AttackAction(pTarget , pBattler , 0);//\83m\81[\83R\83X\83g\82Å\8dU\8c\82
+ m_pScheduler->add(0 , m_pAction->createExecuteAnimation());*/
+
+
+ std::vector<int> resultList = m_pAction->doAction();
+ int index = 0;
+ for(std::vector<BattlerFacade*>::iterator itr = m_pAction->getTargetList().begin() ; itr != m_pAction->getTargetList().end() ; ++itr){
+ //\83G\83t\83F\83N\83g
+ mof::Vector2D position = mof::GraphicsDevice::getInstance()->to2DPosition((*itr)->getPosition());
+ m_scheduleList.push_back(createNumbersEffect(resultList.at(index) , position));
+ index++;
+ }
+
+ index = 0;
+ for(std::vector<BattlerFacade*>::iterator itr = m_pAction->getTargetList().begin() ; itr != m_pAction->getTargetList().end() ; ++itr){
+ if(resultList.at(index) > 0)continue;
+ int level = ((*itr)->getParameter().alive) ? 0 : 1;
+ m_pScheduler->add(20 , (*itr)->setDamagedAnimation(level));
+ }
+
+ //m_scheduleList.push_back( createMessage(_T("\83J\83E\83\93\83^\81[") , m_pBattleData->getTextureManager()));
+ m_succeeded = false;
+
+ }
+ m_state = et::BattleSystem::MAIN;
+ }
+ else if(m_state == et::BattleSystem::MAIN ){
+ et::BattlerFacade* pBattler = m_battlerQueue.back();
+ m_pScheduler->add(0 , pBattler->setMovingAnimation(pBattler->getBasePosition() , 15));
+ for(std::vector<BattlerFacade*>::iterator itr = m_pAction->getTargetList().begin() ; itr != m_pAction->getTargetList().end() ; ++itr){
+ if(pBattler == (*itr) )continue;
+ if((*itr)->getPosition() == (*itr)->getBasePosition())(*itr)->setAidlingAnimation((*itr)->getPosition());
+ else if((*itr)->getParameter().alive)(*itr)->setMovingAnimation((*itr)->getBasePosition() , 15);
+ }
+ m_state = et::BattleSystem::SECESSION;
+ }
+ else if(m_state == et::BattleSystem::SECESSION){
+ m_state = et::BattleSystem::READY;
+ et::BattlerFacade* pBattler = m_battlerQueue.back();
+ pBattler->setAidlingAnimation(pBattler->getBasePosition() );
+ if(m_pAction != NULL && m_pAction->getTargetList().size() == 1){
+ //\83J\83E\83\93\83^\81[\82³\82ê\82Ä\96ß\82Á\82Ä\82«\82½\83o\83g\83\89\81[\82ð\83A\83C\83h\83\8a\83\93\83O\82É\82·\82é
+ m_pAction->getTargetList().front()->setAidlingAnimation(m_pAction->getTargetList().front()->getPosition());
+ }
+ m_battlerQueue.pop_back();
+ while(!m_battlerQueue.empty() && !m_battlerQueue.back()->getParameter().alive)m_battlerQueue.pop_back();
+ delete m_pAction;
+ m_pAction = NULL;
+ if(m_battlerQueue.empty()){
+ for(std::vector<et::BattlerFacade*>::const_iterator itr = pGroup->getBattlerList().begin() ; itr != pGroup->getBattlerList().end() ; ++itr){
+ if(!(*itr)->getParameter().alive)continue;
+ et::BattlerParameter parameter = (*itr)->getParameter();
+ int dActionPoint = parameter.dActionPoint + 2;
+ int tmpActionPoint = parameter.actionPoint;
+ parameter.actionPoint += dActionPoint;
+ if(parameter.actionPoint > 7)parameter.actionPoint = 7;
+ else if(parameter.actionPoint < 0)parameter.actionPoint = 0;
+ parameter.dActionPoint = 0;
+ (*itr)->setParameter(parameter);
+ mof::Vector2D position = mof::GraphicsDevice::getInstance()->to2DPosition((*itr)->getPosition());
+ m_scheduleList.push_back(createAPEffect(parameter.actionPoint - tmpActionPoint , position));
+ }
+ m_state = et::BattleSystem::FINAL;
+ }
+ }
+ else if(m_state == et::BattleSystem::FINAL && m_scheduleList.empty()){
+ m_finalized = true;
+ }
+
+}
+
+bool et::BattleSystem::isFinalized(){
+ return m_finalized;
+}
+
+
+
+void et::BattleSystem::notifyPushKey(){
+ if(m_pChanceScheduler == NULL)return;
+ for(std::list<mof::GraphicsSchedule*>::iterator itr = m_scheduleList.begin() ; itr != m_scheduleList.end() ; ++itr){
+ if((*itr) == m_pChanceScheduler){
+ if((*itr)->isFinalized() || !(*itr)->isPlaying())return;
+ m_succeeded = true;
+ return;
+ }
+
+ }
+ //\8aù\82É\8dí\8f\9c\82³\82ê\82Ä\82¢\82é
+ m_pChanceScheduler = NULL;
+
+}
+
+
+std::list<mof::GraphicsModelPtr>& et::BattleSystem::getModelList( std::list<mof::GraphicsModelPtr>& modelList){
+ for(std::list<mof::GraphicsSchedule*>::iterator itr = m_scheduleList.begin() ; itr != m_scheduleList.end(); ++itr){
+ (*itr)->appendModelList(modelList);
+ }
+ return modelList;
+}
+
+
+mof::GraphicsSchedule* createNumbersEffect(int numbers , mof::Vector2D& position){
+ std::basic_ostringstream<TCHAR> stream;
+ stream << abs(numbers);
+ mof::Sprite* pModel = mof::Sprite::createSpriteFromText(stream.str() , 20);
+
+ mof::CascadeAnimation* pCascadeAnimation = new mof::CascadeAnimation();
+ {
+ mof::DataBasedAnimation* pAnimation;
+ if(numbers > 0)pAnimation = new mof::DataBasedAnimation(_T("data/motion/heel.csv") );
+ else pAnimation = new mof::DataBasedAnimation(_T("data/motion/damage.csv") );
+ mof::AnimationResource resource(pAnimation);
+ pCascadeAnimation->setElement(1 , resource);
+ }
+
+ {
+ mof::KeyFrameAnimation* pAnimation = new mof::KeyFrameAnimation();
+ pAnimation->setPosition(0 , mof::Vector2D(-200 , -200 ));
+ pAnimation->setPosition(1 , position);
+ pAnimation->setPosition(40 , position);
+
+
+ mof::AnimationResource resource(pAnimation);
+ pCascadeAnimation->setElement(0 , resource);
+ }
+
+ mof::AnimationResource animation(pCascadeAnimation);
+ pModel->setAnimation(0 , animation);
+
+ mof::GraphicsSchedule* pSchedule = new mof::GraphicsSchedule();
+ pSchedule->add(0 , mof::GraphicsModelPtr(pModel) , animation);
+ return pSchedule;
+
+
+}
+
+mof::GraphicsSchedule* createAPEffect(int dActionPoint , mof::Vector2D& position){
+ std::basic_ostringstream<TCHAR> stream;
+ stream << _T("AP");
+ if(dActionPoint >= 0)stream << _T("+");
+ stream << dActionPoint;
+ mof::Sprite* pModel = mof::Sprite::createSpriteFromText(stream.str() , 20);
+
+
+ mof::CascadeAnimation* pCascadeAnimation = new mof::CascadeAnimation();
+ {
+ mof::DataBasedAnimation* pAnimation = new mof::DataBasedAnimation(_T("data/motion/ap.csv") );
+ mof::AnimationResource resource(pAnimation);
+ pCascadeAnimation->setElement(1 , resource);
+ }
+
+ {
+ mof::KeyFrameAnimation* pAnimation = new mof::KeyFrameAnimation();
+ pAnimation->setPosition(0 , mof::Vector2D(-200 , -200 ));
+ pAnimation->setPosition(1 , position);
+ pAnimation->setPosition(40 , position);
+
+ mof::AnimationResource resource(pAnimation);
+ pCascadeAnimation->setElement(0 , resource);
+ }
+
+ mof::AnimationResource animation(pCascadeAnimation);
+ pModel->setAnimation(0 , animation);
+
+ mof::GraphicsSchedule* pSchedule = new mof::GraphicsSchedule();
+ pSchedule->add(20 , mof::GraphicsModelPtr(pModel) , animation);
+ return pSchedule;
+
+}
+
+
+mof::GraphicsSchedule* createMessage(const mof::tstring& message , mof::TextureManager* pTextureManager){
+
+ et::MyFrame* pModel = new et::MyFrame(mof::Line2D( 0 , 0 , 200 , 300) , true , pTextureManager->getResource(_T("image/frame0.png")));
+ //pModel->setMargin(2);
+ mof::Sprite* pMessage = mof::Sprite::createSpriteFromText(message , 17);
+ pModel->add(pMessage);
+
+ //\83Z\83\93\83^\83\8a\83\93\83O\82·\82é
+ int centerizedX = (mof::System::getInstance()->getWindowWidth() - pModel->getWidth()) * 0.5;
+
+ mof::KeyFrameAnimation* pAnimation = new mof::KeyFrameAnimation();
+ pAnimation->setPosition(0 , mof::Vector2D(centerizedX , -50 ));
+ pAnimation->setPosition(10 , mof::Vector2D(centerizedX , 5 ));
+ pAnimation->setPosition(60 , mof::Vector2D(centerizedX , 5 ));
+ pAnimation->setPosition(70 , mof::Vector2D(centerizedX , -50 ));
+ pAnimation->setFinalKey(0);
+ mof::AnimationResource resource(pAnimation);
+ pModel->setAnimation(0 , resource);
+
+
+ mof::GraphicsSchedule* pSchedule = new mof::GraphicsSchedule();
+ pSchedule->add(20 , mof::GraphicsModelPtr(pModel) , resource);
+ return pSchedule;
+}
+
+
+mof::GraphicsSchedule* createChanceDisplay(int beginFrame , int endFrame , et::BattleData* pBattleData){
+ et::MyFrame* pModel = new et::MyFrame(mof::Line2D( 0 , 0 , 200 , 300) , true ,
+ pBattleData->getTextureManager()->getResource(_T("image/frame0.png")));
+ pModel->setMargin(5);
+ mof::Sprite* pMessage = mof::Sprite::createSpriteFromText("Chance!" , 13);
+ pModel->add(pMessage);
+
+ et::BattlerBindAnimation* pAnimation = new et::BattlerBindAnimation(pBattleData->getBattlerGroup()->getHeroBattler());
+ pAnimation->setFinalKey(endFrame - beginFrame);
+
+ mof::AnimationResource resource(pAnimation);
+ pModel->setAnimation(0 , resource);
+
+
+ mof::GraphicsSchedule* pSchedule = new mof::GraphicsSchedule();
+ pSchedule->add(beginFrame , mof::GraphicsModelPtr(pModel) , resource);
+ return pSchedule;
+
}
\ No newline at end of file
-#pragma once\r
-#include "BattleData.h"\r
-#include "mof/AnimationScheduler.h"\r
-#include "mof/GraphicsSchedule.h"\r
-#include "Action.h"\r
-#include <vector>\r
-#include "Common.h"\r
-\r
-namespace et{\r
-\r
- \r
-\r
- class BattlerData;\r
- class BattlerFacade;\r
-\r
-\r
- class BattleSystem\r
- {\r
- protected :\r
- enum ActionState{\r
- APPROACH , EXECUTE , HIT, MAIN , SECESSION , READY , FINAL\r
- };\r
- private:\r
- et::BattleData* m_pBattleData;\r
- bool m_finalized;\r
- ActionState m_state;\r
- et::Action* m_pAction;\r
- std::vector<et::BattlerFacade*> m_battlerQueue;\r
- mof::AnimationScheduler* m_pScheduler;\r
- et::Common m_common;\r
- \r
- //\83X\83y\83V\83\83\83\8b\83A\83N\83V\83\87\83\93\8cn\r
- mof::GraphicsSchedule* m_pChanceScheduler;\r
- bool m_succeeded;\r
-\r
- std::list<mof::GraphicsSchedule*> m_scheduleList;\r
- \r
- \r
- public:\r
- BattleSystem(et::BattleData* pBattleData , mof::AnimationScheduler* pScheduler , et::Common& common);\r
- ~BattleSystem(void);\r
- void update();\r
- \r
- bool isFinalized();\r
-\r
- std::list<mof::GraphicsModelPtr>& getModelList( std::list<mof::GraphicsModelPtr>& modelList);\r
- void notifyPushKey();\r
- };\r
-\r
-}\r
-\r
+#pragma once
+#include "BattleData.h"
+#include "mof/AnimationScheduler.h"
+#include "mof/GraphicsSchedule.h"
+#include "Action.h"
+#include <vector>
+#include "Common.h"
+
+namespace et{
+
+
+
+ class BattlerData;
+ class BattlerFacade;
+
+
+ class BattleSystem
+ {
+ protected :
+ enum ActionState{
+ APPROACH , EXECUTE , HIT, MAIN , SECESSION , READY , FINAL
+ };
+ private:
+ et::BattleData* m_pBattleData;
+ bool m_finalized;
+ ActionState m_state;
+ et::Action* m_pAction;
+ std::vector<et::BattlerFacade*> m_battlerQueue;
+ mof::AnimationScheduler* m_pScheduler;
+ et::Common m_common;
+
+ //\83X\83y\83V\83\83\83\8b\83A\83N\83V\83\87\83\93\8cn
+ mof::GraphicsSchedule* m_pChanceScheduler;
+ bool m_succeeded;
+
+ std::list<mof::GraphicsSchedule*> m_scheduleList;
+
+
+ public:
+ BattleSystem(et::BattleData* pBattleData , mof::AnimationScheduler* pScheduler , et::Common& common);
+ ~BattleSystem(void);
+ void update();
+
+ bool isFinalized();
+
+ std::list<mof::GraphicsModelPtr>& getModelList( std::list<mof::GraphicsModelPtr>& modelList);
+ void notifyPushKey();
+ };
+
+}
+
-#include "BattlerBindAnimation.h"\r
-#include "mof/GraphicsDevice.h"\r
-\r
-\r
-et::BattlerBindAnimation::BattlerBindAnimation(et::BattlerFacade* pBattler)\r
-{\r
- m_finalKey = 0;\r
- m_key = 0;\r
- m_pBattler = pBattler;\r
-}\r
-\r
-et::BattlerBindAnimation::~BattlerBindAnimation(void)\r
-{\r
-}\r
-\r
-\r
-mof::Vector2D et::BattlerBindAnimation::getPosition(){\r
- if(!isPlaying())return mof::Vector2D(0 , -100);\r
- return mof::GraphicsDevice::getInstance()->to2DPosition(m_pBattler->getPosition());\r
-}\r
-\r
-mof::Color et::BattlerBindAnimation::getColor(){\r
- return mof::createColor( 255 , 255 , 255);\r
-}\r
-\r
-bool et::BattlerBindAnimation::update(){\r
- if(!isPlaying())return false;\r
- m_key++;\r
- //if(isFinalized() && isLooping())m_key = 0;\r
- if(isFinalized())stop();\r
- return true;\r
-}\r
-\r
- \r
-bool et::BattlerBindAnimation::isFinalized(){\r
- if(m_key > m_finalKey)return true;\r
- return false;\r
-}\r
-\r
-\r
-void et::BattlerBindAnimation::setFinalKey(mof::AnimationKey key){\r
- m_finalKey = key;\r
+#include "BattlerBindAnimation.h"
+#include "mof/GraphicsDevice.h"
+
+
+et::BattlerBindAnimation::BattlerBindAnimation(et::BattlerFacade* pBattler)
+{
+ m_finalKey = 0;
+ m_key = 0;
+ m_pBattler = pBattler;
+}
+
+et::BattlerBindAnimation::~BattlerBindAnimation(void)
+{
+}
+
+
+mof::Vector2D et::BattlerBindAnimation::getPosition(){
+ if(!isPlaying())return mof::Vector2D(0 , -100);
+ return mof::GraphicsDevice::getInstance()->to2DPosition(m_pBattler->getPosition());
+}
+
+mof::Color et::BattlerBindAnimation::getColor(){
+ return mof::createColor( 255 , 255 , 255);
+}
+
+bool et::BattlerBindAnimation::update(){
+ if(!isPlaying())return false;
+ m_key++;
+ //if(isFinalized() && isLooping())m_key = 0;
+ if(isFinalized())stop();
+ return true;
+}
+
+
+bool et::BattlerBindAnimation::isFinalized(){
+ if(m_key > m_finalKey)return true;
+ return false;
+}
+
+
+void et::BattlerBindAnimation::setFinalKey(mof::AnimationKey key){
+ m_finalKey = key;
}
\ No newline at end of file
-#pragma once\r
-#include "mof/Animation.h"\r
-#include "BattlerFacade.h"\r
-\r
-namespace et{\r
- class BattlerBindAnimation : public mof::Animation\r
- {\r
- et::BattlerFacade* m_pBattler;\r
- int m_finalKey;\r
- int m_key;\r
- public:\r
- BattlerBindAnimation(et::BattlerFacade* pBattler);\r
- virtual ~BattlerBindAnimation(void);\r
- virtual mof::Vector2D getPosition();\r
- virtual mof::Color getColor();\r
- virtual bool update();\r
- virtual bool isFinalized();\r
- virtual void setFinalKey(mof::AnimationKey key);\r
- };\r
-\r
-\r
+#pragma once
+#include "mof/Animation.h"
+#include "BattlerFacade.h"
+
+namespace et{
+ class BattlerBindAnimation : public mof::Animation
+ {
+ et::BattlerFacade* m_pBattler;
+ int m_finalKey;
+ int m_key;
+ public:
+ BattlerBindAnimation(et::BattlerFacade* pBattler);
+ virtual ~BattlerBindAnimation(void);
+ virtual mof::Vector2D getPosition();
+ virtual mof::Color getColor();
+ virtual bool update();
+ virtual bool isFinalized();
+ virtual void setFinalKey(mof::AnimationKey key);
+ };
+
+
}
\ No newline at end of file
-#include "BattlerFacade.h"\r
-#include "mof/KeyFrameAnimation.h"\r
-\r
-\r
-\r
-et::BattlerFacade::BattlerFacade(BattlerType type )\r
-: m_type(type)\r
-{\r
- m_pGraphicsObject = NULL;\r
- \r
- m_timeStamp = 0;\r
-}\r
-\r
-\r
-et::BattlerFacade::~BattlerFacade(void)\r
-{\r
- delete m_pGraphicsObject;\r
-}\r
-\r
-\r
-mof::Billboard* et::BattlerFacade::getGraphicsObject(){\r
- return m_pGraphicsObject;\r
-}\r
-\r
-mof::Vector3D et::BattlerFacade::getPosition(){\r
- return m_pGraphicsObject->getPosition();\r
-}\r
-\r
-int et::BattlerFacade::getTimeStamp(){\r
- return m_timeStamp;\r
-}\r
-\r
-\r
+#include "BattlerFacade.h"
+#include "mof/KeyFrameAnimation.h"
+
+
+
+et::BattlerFacade::BattlerFacade(BattlerType type )
+: m_type(type)
+{
+ m_pGraphicsObject = NULL;
+
+ m_timeStamp = 0;
+}
+
+
+et::BattlerFacade::~BattlerFacade(void)
+{
+ delete m_pGraphicsObject;
+}
+
+
+mof::Billboard* et::BattlerFacade::getGraphicsObject(){
+ return m_pGraphicsObject;
+}
+
+mof::Vector3D et::BattlerFacade::getPosition(){
+ return m_pGraphicsObject->getPosition();
+}
+
+int et::BattlerFacade::getTimeStamp(){
+ return m_timeStamp;
+}
+
+
-#pragma once\r
-#include "mof/Graphics.h"\r
-#include "mof/Billboard.h"\r
-#include "BattlerParameter.h"\r
-#include "Action.h"\r
-#include "BattlerType.h"\r
-#include "mof/DataTable.h"\r
-\r
-namespace et{\r
- class BattlerGroup;\r
- class BattlerFacade\r
- {\r
- public:\r
- /*enum BattlerType{\r
- ENEMY , HERO , IDEAL\r
- };*/\r
- private:\r
- BattlerType m_type;\r
- BattlerParameter m_parameter;\r
- int m_timeStamp;\r
- mof::Vector3D m_basePosition;\r
- protected:\r
- mof::Billboard* m_pGraphicsObject;\r
- public:\r
-\r
- BattlerFacade(BattlerType m_type );\r
- \r
- virtual ~BattlerFacade(void);\r
- mof::Billboard* getGraphicsObject();\r
- const BattlerParameter& getParameter(){return m_parameter;}\r
- void setParameter(const BattlerParameter& parameter){m_parameter = parameter;m_timeStamp++;}\r
- BattlerType getType(){return m_type;}\r
-\r
- mof::Vector3D getPosition();\r
- virtual mof::AnimationResource setMovingAnimation(mof::Vector3D& goal , int nFrame) = 0;\r
- virtual mof::AnimationResource setAidlingAnimation(mof::Vector3D& position) = 0;\r
- virtual mof::AnimationResource setCastAnimation(int category) = 0;\r
- virtual mof::AnimationResource setDamagedAnimation(int level) = 0;\r
- virtual Action* createAction(BattlerGroup* pGroup ) = 0;\r
- int getTimeStamp();\r
- void setBasePosition(mof::Vector3D& position){m_basePosition = position;}\r
- mof::Vector3D& getBasePosition(){return m_basePosition;}\r
- };\r
-\r
-\r
+#pragma once
+#include "mof/Graphics.h"
+#include "mof/Billboard.h"
+#include "BattlerParameter.h"
+#include "Action.h"
+#include "BattlerType.h"
+#include "mof/DataTable.h"
+
+namespace et{
+ class BattlerGroup;
+ class BattlerFacade
+ {
+ public:
+ /*enum BattlerType{
+ ENEMY , HERO , IDEAL
+ };*/
+ private:
+ BattlerType m_type;
+ BattlerParameter m_parameter;
+ int m_timeStamp;
+ mof::Vector3D m_basePosition;
+ protected:
+ mof::Billboard* m_pGraphicsObject;
+ public:
+
+ BattlerFacade(BattlerType m_type );
+
+ virtual ~BattlerFacade(void);
+ mof::Billboard* getGraphicsObject();
+ const BattlerParameter& getParameter(){return m_parameter;}
+ void setParameter(const BattlerParameter& parameter){m_parameter = parameter;m_timeStamp++;}
+ BattlerType getType(){return m_type;}
+
+ mof::Vector3D getPosition();
+ virtual mof::AnimationResource setMovingAnimation(mof::Vector3D& goal , int nFrame) = 0;
+ virtual mof::AnimationResource setAidlingAnimation(mof::Vector3D& position) = 0;
+ virtual mof::AnimationResource setCastAnimation(int category) = 0;
+ virtual mof::AnimationResource setDamagedAnimation(int level) = 0;
+ virtual Action* createAction(BattlerGroup* pGroup ) = 0;
+ int getTimeStamp();
+ void setBasePosition(mof::Vector3D& position){m_basePosition = position;}
+ mof::Vector3D& getBasePosition(){return m_basePosition;}
+ };
+
+
}
\ No newline at end of file
-#include "BattlerGroup.h"\r
-#include "BattlerFacade.h"\r
-#include "DataBasedBattler.h"\r
-#include <stdexcept>\r
-\r
-et::BattlerGroup::~BattlerGroup(){\r
- for(std::vector<BattlerFacade*>::iterator itr = m_battlerList.begin() ; itr != m_battlerList.end() ; ++itr){\r
- delete *itr;\r
- }\r
-}\r
-\r
-void et::BattlerGroup::addBattler(BattlerType type, et::BattlerFacade *pBattler){\r
- if(et::ENEMY == type)m_enemyBattlerList.push_back(pBattler);\r
- else if(et::IDEAL == type)m_idealBattlerList.push_back(pBattler);\r
- else m_heroBattlerList.push_back(pBattler);\r
-\r
- m_battlerList.push_back(pBattler);\r
-}\r
-\r
-\r
-et::BattlerFacade* et::BattlerGroup::getBattlerAt(int index) const{\r
- return m_battlerList.at(index);\r
-}\r
-\r
-\r
-const std::vector<et::BattlerFacade*>& et::BattlerGroup::getBattlerList() const{\r
- return m_battlerList;\r
-}\r
-\r
-\r
-const std::vector<et::BattlerFacade*> et::BattlerGroup::getBattlerListAlive() const{\r
- std::vector<BattlerFacade*> result;\r
- for(std::vector<BattlerFacade*>::const_iterator itr = m_battlerList.begin() ; itr != m_battlerList.end() ; ++itr){\r
- if((*itr)->getParameter().alive)result.push_back(*itr);\r
- }\r
- return result;\r
-}\r
-\r
-\r
-\r
-et::BattlerFacade* et::BattlerGroup::getEnemyBattlerAt(int index) const{\r
- return m_enemyBattlerList.at(index);\r
-}\r
-\r
-\r
-et::BattlerFacade* et::BattlerGroup::getIdealBattlerAt(int index) const{\r
- return m_idealBattlerList.at(index);\r
-}\r
-\r
-\r
-et::BattlerFacade* et::BattlerGroup::getHeroBattler() const{\r
- return m_heroBattlerList.at(0);\r
-}\r
-\r
-const std::vector<et::BattlerFacade*>& et::BattlerGroup::getEnemyBattlerList() const{\r
- return m_enemyBattlerList;\r
-}\r
-\r
-const std::vector<et::BattlerFacade*> et::BattlerGroup::getEnemyBattlerListAlive() const{\r
- std::vector<BattlerFacade*> result;\r
- for(std::vector<BattlerFacade*>::const_iterator itr = m_enemyBattlerList.begin() ; itr != m_enemyBattlerList.end() ; ++itr){\r
- if((*itr)->getParameter().alive)result.push_back(*itr);\r
- }\r
- return result;\r
-}\r
-\r
-\r
-const std::vector<et::BattlerFacade*>& et::BattlerGroup::getIdealBattlerList() const{\r
- return m_idealBattlerList;\r
-}\r
-\r
-\r
-const std::vector<et::BattlerFacade*> et::BattlerGroup::getIdealBattlerListAlive() const{\r
- std::vector<BattlerFacade*> result;\r
- for(std::vector<BattlerFacade*>::const_iterator itr = m_idealBattlerList.begin() ; itr != m_idealBattlerList.end() ; ++itr){\r
- if((*itr)->getParameter().alive)result.push_back(*itr);\r
- }\r
- return result;\r
-}\r
-\r
-\r
-void et::BattlerGroup::addEnemyBattlers(mof::DataRow& unitData , et::Common& common){\r
- TCHAR* columnTable[] = {_T("Monster1") , _T("Monster2") , _T("Monster3")};\r
- TCHAR suffixTable[] = {_T('A') , _T('B') , _T('C')};\r
- mof::tstring nameTable[3];\r
- for(int i = 0 ; i < 3 ; i++){\r
- try{\r
- nameTable[i] = unitData.getData(columnTable[i]);\r
- }catch(std::logic_error e){\r
- return;\r
- }\r
- if(nameTable[i] == _T(""))continue;\r
- int count = 0;\r
- for(int j = 0 ; j < i ; j++){\r
- if(nameTable[i] == nameTable[j])count++;\r
- }\r
- addBattler(et::ENEMY, new DataBasedBattler( nameTable[i].c_str() , common.m_pDataResourceManager , common.m_pTextureManager , suffixTable[count]));\r
- }\r
+#include "BattlerGroup.h"
+#include "BattlerFacade.h"
+#include "DataBasedBattler.h"
+#include <stdexcept>
+
+et::BattlerGroup::~BattlerGroup(){
+ for(std::vector<BattlerFacade*>::iterator itr = m_battlerList.begin() ; itr != m_battlerList.end() ; ++itr){
+ delete *itr;
+ }
+}
+
+void et::BattlerGroup::addBattler(BattlerType type, et::BattlerFacade *pBattler){
+ if(et::ENEMY == type)m_enemyBattlerList.push_back(pBattler);
+ else if(et::IDEAL == type)m_idealBattlerList.push_back(pBattler);
+ else m_heroBattlerList.push_back(pBattler);
+
+ m_battlerList.push_back(pBattler);
+}
+
+
+et::BattlerFacade* et::BattlerGroup::getBattlerAt(int index) const{
+ return m_battlerList.at(index);
+}
+
+
+const std::vector<et::BattlerFacade*>& et::BattlerGroup::getBattlerList() const{
+ return m_battlerList;
+}
+
+
+const std::vector<et::BattlerFacade*> et::BattlerGroup::getBattlerListAlive() const{
+ std::vector<BattlerFacade*> result;
+ for(std::vector<BattlerFacade*>::const_iterator itr = m_battlerList.begin() ; itr != m_battlerList.end() ; ++itr){
+ if((*itr)->getParameter().alive)result.push_back(*itr);
+ }
+ return result;
+}
+
+
+
+et::BattlerFacade* et::BattlerGroup::getEnemyBattlerAt(int index) const{
+ return m_enemyBattlerList.at(index);
+}
+
+
+et::BattlerFacade* et::BattlerGroup::getIdealBattlerAt(int index) const{
+ return m_idealBattlerList.at(index);
+}
+
+
+et::BattlerFacade* et::BattlerGroup::getHeroBattler() const{
+ return m_heroBattlerList.at(0);
+}
+
+const std::vector<et::BattlerFacade*>& et::BattlerGroup::getEnemyBattlerList() const{
+ return m_enemyBattlerList;
+}
+
+const std::vector<et::BattlerFacade*> et::BattlerGroup::getEnemyBattlerListAlive() const{
+ std::vector<BattlerFacade*> result;
+ for(std::vector<BattlerFacade*>::const_iterator itr = m_enemyBattlerList.begin() ; itr != m_enemyBattlerList.end() ; ++itr){
+ if((*itr)->getParameter().alive)result.push_back(*itr);
+ }
+ return result;
+}
+
+
+const std::vector<et::BattlerFacade*>& et::BattlerGroup::getIdealBattlerList() const{
+ return m_idealBattlerList;
+}
+
+
+const std::vector<et::BattlerFacade*> et::BattlerGroup::getIdealBattlerListAlive() const{
+ std::vector<BattlerFacade*> result;
+ for(std::vector<BattlerFacade*>::const_iterator itr = m_idealBattlerList.begin() ; itr != m_idealBattlerList.end() ; ++itr){
+ if((*itr)->getParameter().alive)result.push_back(*itr);
+ }
+ return result;
+}
+
+
+void et::BattlerGroup::addEnemyBattlers(mof::DataRow& unitData , et::Common& common){
+ TCHAR* columnTable[] = {_T("Monster1") , _T("Monster2") , _T("Monster3")};
+ TCHAR suffixTable[] = {_T('A') , _T('B') , _T('C')};
+ mof::tstring nameTable[3];
+ for(int i = 0 ; i < 3 ; i++){
+ try{
+ nameTable[i] = unitData.getData(columnTable[i]);
+ }catch(std::logic_error e){
+ return;
+ }
+ if(nameTable[i] == _T(""))continue;
+ int count = 0;
+ for(int j = 0 ; j < i ; j++){
+ if(nameTable[i] == nameTable[j])count++;
+ }
+ addBattler(et::ENEMY, new DataBasedBattler( nameTable[i].c_str() , common.m_pDataResourceManager , common.m_pTextureManager , suffixTable[count]));
+ }
}
\ No newline at end of file
-#pragma once\r
-#include <vector>\r
-#include "BattlerType.h"\r
-#include "mof/DataRow.h"\r
-#include "Common.h"\r
-\r
-namespace et{\r
- class BattlerFacade;\r
-\r
- class BattlerGroup\r
- {\r
- \r
- std::vector<BattlerFacade*> m_enemyBattlerList;\r
- std::vector<BattlerFacade*> m_idealBattlerList;\r
- std::vector<BattlerFacade*> m_heroBattlerList;\r
- std::vector<BattlerFacade*> m_battlerList;\r
-\r
- BattlerGroup(const BattlerGroup&){;}\r
- BattlerGroup& operator=(const BattlerGroup&){return *this;}\r
- public:\r
- BattlerGroup(){;}\r
- ~BattlerGroup();\r
-\r
- void addBattler(BattlerType type , BattlerFacade* pBattler);\r
- void addEnemyBattlers(mof::DataRow& unitData , et::Common& common);\r
- BattlerFacade* getBattlerAt(int index) const;\r
- const std::vector<BattlerFacade*>& getBattlerList() const;\r
- const std::vector<BattlerFacade*> getBattlerListAlive() const;\r
- BattlerFacade* getEnemyBattlerAt(int index) const;\r
- BattlerFacade* getIdealBattlerAt(int index) const;\r
- BattlerFacade* getHeroBattler() const;\r
-\r
- const std::vector<BattlerFacade*>& getEnemyBattlerList() const;\r
- const std::vector<BattlerFacade*> getEnemyBattlerListAlive() const;\r
- const std::vector<BattlerFacade*>& getIdealBattlerList() const;\r
- const std::vector<BattlerFacade*> getIdealBattlerListAlive() const;\r
- \r
- };\r
-\r
-\r
+#pragma once
+#include <vector>
+#include "BattlerType.h"
+#include "mof/DataRow.h"
+#include "Common.h"
+
+namespace et{
+ class BattlerFacade;
+
+ class BattlerGroup
+ {
+
+ std::vector<BattlerFacade*> m_enemyBattlerList;
+ std::vector<BattlerFacade*> m_idealBattlerList;
+ std::vector<BattlerFacade*> m_heroBattlerList;
+ std::vector<BattlerFacade*> m_battlerList;
+
+ BattlerGroup(const BattlerGroup&){;}
+ BattlerGroup& operator=(const BattlerGroup&){return *this;}
+ public:
+ BattlerGroup(){;}
+ ~BattlerGroup();
+
+ void addBattler(BattlerType type , BattlerFacade* pBattler);
+ void addEnemyBattlers(mof::DataRow& unitData , et::Common& common);
+ BattlerFacade* getBattlerAt(int index) const;
+ const std::vector<BattlerFacade*>& getBattlerList() const;
+ const std::vector<BattlerFacade*> getBattlerListAlive() const;
+ BattlerFacade* getEnemyBattlerAt(int index) const;
+ BattlerFacade* getIdealBattlerAt(int index) const;
+ BattlerFacade* getHeroBattler() const;
+
+ const std::vector<BattlerFacade*>& getEnemyBattlerList() const;
+ const std::vector<BattlerFacade*> getEnemyBattlerListAlive() const;
+ const std::vector<BattlerFacade*>& getIdealBattlerList() const;
+ const std::vector<BattlerFacade*> getIdealBattlerListAlive() const;
+
+ };
+
+
}
\ No newline at end of file
-#pragma once \r
-#include "mof/tstring.h"\r
-\r
-namespace et{\r
-\r
- struct BattlerParameter{\r
- mof::tstring name;\r
- bool alive;\r
- bool guard;\r
- bool critical;\r
- int hp;\r
- int maxHp;\r
-\r
- int attack;\r
- int diffence;\r
-\r
- int actionPoint;\r
- int speed;\r
- int dActionPoint;\r
-\r
- BattlerParameter(){\r
- actionPoint = 0;\r
- alive = true;\r
- guard = false;\r
- dActionPoint = 0;\r
- critical = false;\r
- }\r
-\r
- BattlerParameter(TCHAR* _name , int _hp , int _attack , int _defence , int _speed)\r
- : name(_name) {\r
- hp = maxHp = _hp;\r
- attack = _attack;\r
- diffence = _defence;\r
- actionPoint = 0;\r
- speed = _speed;\r
- alive = true;\r
- guard = false;\r
- dActionPoint = 0;\r
- critical = false;\r
- }\r
- };\r
-\r
+#pragma once
+#include "mof/tstring.h"
+
+namespace et{
+
+ struct BattlerParameter{
+ mof::tstring name;
+ bool alive;
+ bool guard;
+ bool critical;
+ int hp;
+ int maxHp;
+
+ int attack;
+ int diffence;
+
+ int actionPoint;
+ int speed;
+ int dActionPoint;
+
+ BattlerParameter(){
+ actionPoint = 0;
+ alive = true;
+ guard = false;
+ dActionPoint = 0;
+ critical = false;
+ }
+
+ BattlerParameter(TCHAR* _name , int _hp , int _attack , int _defence , int _speed)
+ : name(_name) {
+ hp = maxHp = _hp;
+ attack = _attack;
+ diffence = _defence;
+ actionPoint = 0;
+ speed = _speed;
+ alive = true;
+ guard = false;
+ dActionPoint = 0;
+ critical = false;
+ }
+ };
+
};
\ No newline at end of file
-#pragma once\r
-\r
-namespace et{\r
- enum BattlerType{\r
- ENEMY , HERO , IDEAL\r
- };\r
- \r
- \r
+#pragma once
+
+namespace et{
+ enum BattlerType{
+ ENEMY , HERO , IDEAL
+ };
+
+
}
\ No newline at end of file