<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Windows 游戏开发常见问题解答 （Windows Game Dev FAQ )</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/windows__windows_game_dev_faq_/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/windows__windows_game_dev_faq_/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:27:10 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Unity 游戏移植到 Windows10 之路 -- 环境搭建</title>
      <link>https://docs.microsoft.com/archive/blogs/windows__windows_game_dev_faq_/unity-windows10</link>
      <pubDate>Wed, 19 Aug 2015 02:12:00 GMT</pubDate>
      <dc:creator><![CDATA[梅颖广]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/windows__windows_game_dev_faq_/2015/08/19/unity-windows10/</guid>
      <description><![CDATA[Windows10 是微软公司最新一代的跨平台及设备应用的操作系统。它统一了包括个人电脑、平板电脑、智慧型手机、嵌入式系统、Xbox One以及新产品Surface...]]></description>
      <content:encoded><![CDATA[<div class="WordSection1">
<p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt; text-align: justify; text-justify: inter-ideograph; mso-add-space: auto;"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Windows10 </span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">是微软公司最新一代的跨平台及设备应用的操作系统</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: 'MS Mincho'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: 'MS Mincho'; mso-bidi-font-family: Arial;" lang="ZH-CN">。</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">它统一了包括个人电脑、平板电脑、智慧型手机、嵌入式系统、</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Xbox One</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">以及新产品</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Surface Hub</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">和</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">HoloLens</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">等等的整个</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Windows</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">产品系列的作业系统，共享一个通用的应用程式架构（</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">UWP</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">）和</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Windows Store</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的生态系统。</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: 'MS Mincho'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: 'MS Mincho'; mso-bidi-font-family: Arial;" lang="ZH-CN">随着</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">今年的</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">7-29 </span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">号</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Windows10</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">发布大会的召开，目前微软已经开始向全球用户推送</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Windows10 </span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">系统，在未来的一年内所有用户都将能免费升级。</span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt; mso-add-space: auto;"><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">虽然</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Unity</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">引擎的官方正式版本</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">5.1.x</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">，目前尚未支持</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Windows10</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">平台，但</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">5.2 Beta</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">版本从一开始（即</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">5.2b1</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">）就已经全面支持</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Windows10</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">平台。这里笔者根据自己的经验，使用</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Unity 5.2b5</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">版本，给大家简单介绍一下如何搭建开发</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Windows10 </span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Unity</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">游戏的环境。</span></p>
<p class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 0pt; text-align: justify; text-justify: inter-ideograph; mso-add-space: auto;"><span style="font-family: 'Arial',sans-serif;">&nbsp;</span></p>
<p class="MsoNormal" style="text-align: justify; margin-bottom: 0pt; text-justify: inter-ideograph;"><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">一、开发环境</span></p>
<p class="MsoNormal" style="text-align: justify; margin-bottom: 0pt; text-justify: inter-ideograph;"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">1. </span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">首先开发者必须把系统升级到</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Windows10 RTM</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">版本。</span></p>
<p class="MsoNormal" style="text-align: justify; margin-bottom: 0pt; text-justify: inter-ideograph;"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">2. </span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">然后当然是安装</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Visual Studio 2015</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">，目前官方提供免费的</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">community</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">版本：</span></p>
<p class="MsoNormal" style="text-align: justify; margin-bottom: 0pt; text-justify: inter-ideograph;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span><a href="https://www.visualstudio.com/downloads/download-visual-studio-vs"><strong style="mso-bidi-font-weight: normal;"><span style="line-height: 107%; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-bidi-font-family: Arial;">https://www.visualstudio.com/downloads/download-visual-studio-vs</span></strong></a></p>
<p class="MsoNormal" style="text-align: justify; margin-bottom: 0pt; text-justify: inter-ideograph;"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">3. </span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">需要注意的是一定要安装</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Windows10 </span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">SDK</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">，即勾选下方黄框的选项。</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="mso-no-proof: yes;">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/8156.image002.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/8156.image002.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/8156.image002.jpg" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/8156.image002.jpg" alt="" width="436" height="611" border="0" /></a></span></p>
<p class="MsoNormal" style="text-align: justify; margin-bottom: 0pt; text-justify: inter-ideograph;"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">&nbsp;</span></p>
<p class="MsoNormal" style="text-align: justify; margin-bottom: 0pt; text-justify: inter-ideograph;"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">4. </span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">安装</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Unity5.2Beta</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">版本：</span></p>
<p class="MsoNormal" style="text-align: justify; margin-bottom: 0pt; text-justify: inter-ideograph;"><span style="mso-bidi-font-family: Arial;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span><strong style="mso-bidi-font-weight: normal;"><a href="http://unity3d.com/unity/beta">http://unity3d.com/unity/beta</a></strong></span></p>
<p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 22.5pt; text-align: justify; text-justify: inter-ideograph; mso-add-space: auto;"><span style="font-family: 'Arial',sans-serif;">&nbsp;</span></p>
<p class="MsoNormal" style="text-align: justify; margin-bottom: 0pt; text-justify: inter-ideograph;"><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">二</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">、发布</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Win10</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">工程</span></p>
<p class="MsoNormal" style="text-align: justify; margin-bottom: 0pt; text-justify: inter-ideograph;"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">1. <span style="mso-spacerun: yes;">&nbsp;</span></span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">使用任何一个游戏项目，笔者使用</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Unity Store</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">上畅销的</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">3D</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">打飞机游戏</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">-- Space Shooter。</span></p>
<p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt; text-align: justify; text-justify: inter-ideograph; mso-add-space: auto;"><span style="mso-no-proof: yes;">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/1200.image004.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/1200.image004.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/1200.image004.jpg" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/1200.image004.jpg" alt="" border="0" /></a></span></p>
<p class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 0pt; text-align: justify; text-justify: inter-ideograph; mso-add-space: auto;"><span style="line-height: 107%; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-bidi-font-family: Arial;">&nbsp;</span></p>
<p class="MsoNormal" style="text-align: justify; margin-bottom: 0pt; text-justify: inter-ideograph;"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">2. <span style="mso-spacerun: yes;">&nbsp;</span></span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">发布游戏的</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Win10</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">工程。</span></p>
<p class="MsoNormal" style="text-align: justify; margin-bottom: 0pt; text-justify: inter-ideograph;"><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">在</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">5.2</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">版本的</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Unity</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Build Setting</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">窗口中，大家已经可以看到</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Win10</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的选项。具体是在</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Windows Store</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的平台下，</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">SDK</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">选择为</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Universal 10</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">，</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">UAP Build Type</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">选择为</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">XAML</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">，这样就可以生成</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Win10 UWP</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">架构的游戏工程。</span></p>
<p class="MsoNormal" style="text-align: justify; margin-bottom: 0pt; text-justify: inter-ideograph;"><span style="mso-no-proof: yes;">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/0042.image006.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/0042.image006.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/0042.image006.jpg" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/0042.image006.jpg" alt="" border="0" /></a></span></p>
<p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 18pt; text-align: justify; text-justify: inter-ideograph; mso-add-space: auto;"><span style="line-height: 107%; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-bidi-font-family: Arial;">&nbsp;</span></p>
<p class="MsoNormal" style="text-align: justify; margin-bottom: 0pt; text-justify: inter-ideograph;"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">3. <span style="mso-spacerun: yes;">&nbsp;</span></span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">打开</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Win10</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的工程，可惜这个新工程是编译不过的。错误信息如下：</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="background: white; color: black; line-height: 107%; font-family: Consolas; font-size: 9pt; mso-bidi-font-size: 9.5pt; mso-highlight: white;">1&gt;C:\Program Files (x86)\MSBuild\14.0\bin\<span class="GramE">Microsoft.Common.CurrentVersion.targets(</span>2048,5): error MSB3774: Could not find SDK "<span class="SpellE">Microsoft.VCLibs.AppLocal</span>, Version=14.0".</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="mso-bidi-font-family: Arial;">&nbsp;</span></p>
<p class="MsoNormal" style="text-align: justify; margin-bottom: 0pt; text-justify: inter-ideograph;"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">4. <span style="mso-spacerun: yes;">&nbsp;</span></span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">修改工程设置，使得工程编译通过：</span></p>
<p class="MsoNormal" style="text-align: justify; margin-bottom: 0pt; text-justify: inter-ideograph;"><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Calibri; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;" lang="ZH-CN">工程编译不通过的原因主要是由于</span><span style="line-height: 107%; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-bidi-font-family: Arial;">Win10 SDK</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Calibri; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;" lang="ZH-CN">更新速度比较快，</span><span style="line-height: 107%; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-bidi-font-family: Arial;">Unity</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Calibri; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;" lang="ZH-CN">的</span><span style="line-height: 107%; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-bidi-font-family: Arial;">Win10</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Calibri; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;" lang="ZH-CN">工程使用的</span><span style="line-height: 107%; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-bidi-font-family: Arial;">SDK</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Calibri; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;" lang="ZH-CN">版本比</span><span style="line-height: 107%; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-bidi-font-family: Arial;">VS2015</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Calibri; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;" lang="ZH-CN">安装的</span><span style="line-height: 107%; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-bidi-font-family: Arial;">SDK</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Calibri; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;" lang="ZH-CN">版本旧。推荐大家按下面的方法修正这个问题：</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="mso-bidi-font-family: Arial;">&nbsp;</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">1)<span style="mso-spacerun: yes;">&nbsp; </span></span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">使用</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">VS2015</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的模板，创建一个</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">C# </span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Win10 UWP</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的空工程</span></p>
<p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt 18pt; mso-add-space: auto;"><span style="mso-no-proof: yes;">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/7875.image008.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/7875.image008.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/7875.image008.jpg" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/7875.image008.jpg" alt="" border="0" /></a></span></p>
<p class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 0pt 18pt; mso-add-space: auto;"><span style="mso-bidi-font-family: Arial;">&nbsp;</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">2)<span style="mso-spacerun: yes;">&nbsp; </span></span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">给</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Unity Win10</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">工程使用刚才创建的</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Win10 UWP</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">工程的</span><span class="SpellE"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">project.json</span></span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">文件，用于保证</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Unity</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Win10</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">工程调用正确的</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">SDK</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">和</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Runtime</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">。操作如下：</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">&nbsp;</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><strong><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">步骤一：</span></strong></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">把</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Win10 UWP</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">工程目录下的</span><span class="SpellE"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">project.json</span></span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">文件拷贝到</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Unity</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">游戏发布的</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Win10</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">目录下。即</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 36pt; text-indent: 36pt;"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Win10UWP<span style="mso-spacerun: yes;">&nbsp;&nbsp; </span>-<span class="GramE">&gt; <span style="mso-spacerun: yes;">&nbsp;</span><span class="SpellE">UnityGame</span></span> \ Win10 \ <span class="SpellE">UnityGame</span></span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">(</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">假设：</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Win10 UWP</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">工程名为：</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Win10UWP</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Unity</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">项目的名称为：</span><span class="SpellE"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">UnityGame</span></span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">，</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">发布打</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Win10</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">平台的目录为：</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Win10</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="mso-bidi-font-family: Arial;">)</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">&nbsp;</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><strong><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">步骤二：</span></strong></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">修改</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Unity Win10</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">工程的</span><span class="SpellE"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">csproj</span></span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">文件</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">平台版本设置为最新版本</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><em style="mso-bidi-font-style: normal;"><span style="line-height: 107%; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-bidi-font-family: Arial;">&lt;TargetPlatformMinVersion&gt;10.0.<strong style="mso-bidi-font-weight: normal;">10240</strong>.0&lt;/TargetPlatformMinVersion&gt;</span></em></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">&nbsp;</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">添加</span><span class="SpellE"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">project.json</span></span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的使用</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><em style="mso-bidi-font-style: normal;"><span style="line-height: 107%; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-bidi-font-family: Arial;">&lt;<span class="SpellE">ItemGroup</span>&gt;</span></em></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><em style="mso-bidi-font-style: normal;"><span style="line-height: 107%; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-bidi-font-family: Arial;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span><span class="GramE">&lt;!--</span> A reference to the entire .Net Framework and Windows SDK are automatically included --&gt;</span></em></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><em style="mso-bidi-font-style: normal;"><span style="line-height: 107%; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-bidi-font-family: Arial;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span>&lt;Content Include="<span class="SpellE">ApplicationInsights.config</span>"&gt;</span></em></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><em style="mso-bidi-font-style: normal;"><span style="line-height: 107%; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-bidi-font-family: Arial;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;<span class="SpellE">CopyToOutputDirectory</span>&gt;<span class="SpellE">PreserveNewest</span>&lt;/<span class="SpellE">CopyToOutputDirectory</span>&gt;</span></em></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><em style="mso-bidi-font-style: normal;"><span style="line-height: 107%; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-bidi-font-family: Arial;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span>&lt;/Content&gt;</span></em></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><em style="mso-bidi-font-style: normal;"><span style="line-height: 107%; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-bidi-font-family: Arial;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span>&lt;None Include="<span class="SpellE"><strong style="mso-bidi-font-weight: normal;">project.json</strong></span>" /&gt;</span></em></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><em style="mso-bidi-font-style: normal;"><span style="line-height: 107%; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-bidi-font-family: Arial;"><span style="mso-spacerun: yes;">&nbsp; </span>&lt;/<span class="SpellE">ItemGroup</span>&gt;</span></em></p>
<p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 18pt; mso-add-space: auto;"><span style="mso-bidi-font-family: Arial;">&nbsp;</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">3)<span style="mso-spacerun: yes;">&nbsp; </span></span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">再次打开</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Win10</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">工程，去掉如下图所示的二个引用和模块，即可编译通过</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="mso-no-proof: yes;">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/1524.image010.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/1524.image010.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/1524.image010.jpg" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/1524.image010.jpg" alt="" width="419" height="542" border="0" /></a></span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">&nbsp;</span></p>
<p class="MsoNormal" style="text-align: justify; margin-bottom: 0pt; text-justify: inter-ideograph;"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">5. <span style="mso-spacerun: yes;">&nbsp;</span></span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">在</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Win10</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">系统手机模拟器上运行的画面：</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="mso-no-proof: yes;">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/2148.image011.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/2148.image011.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/2148.image011.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/2148.image011.png" alt="" width="431" height="797" border="0" /></a></span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">希望大家通过上述步骤，都能在</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Windows10 </span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">上顺利地运行和开发</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Unity</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">游戏，也欢迎大家为这个崭新的平台提供越来越多的优秀游戏作品！</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">谢谢！</span></p>
<p class="MsoNoSpacing" style="text-align: right;" align="right"><span style="background: white; font-family: 宋体; font-size: 10.5pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">梅颖广</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="mso-bidi-font-family: Arial;">&nbsp;</span></p>
</div>]]></content:encoded>
    </item>
    <item>
      <title>Cocos 游戏移植到 Windows10 之路 -- 环境搭建</title>
      <link>https://docs.microsoft.com/archive/blogs/windows__windows_game_dev_faq_/cocos-windows10</link>
      <pubDate>Mon, 17 Aug 2015 03:22:00 GMT</pubDate>
      <dc:creator><![CDATA[梅颖广]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/windows__windows_game_dev_faq_/2015/08/17/cocos-windows10/</guid>
      <description><![CDATA[Windows10 是微软公司最新一代的跨平台及设备应用的操作系统。它统一了包括个人电脑、平板电脑、智慧型手机、嵌入式系统、Xbox One以及新产品Surface...]]></description>
      <content:encoded><![CDATA[<p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt; text-align: justify; text-justify: inter-ideograph; mso-add-space: auto;"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Windows10 </span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">是微软公司最新一代的跨平台及设备应用的操作系统</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: 'MS Mincho'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: 'MS Mincho'; mso-bidi-font-family: Arial;" lang="ZH-CN">。</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">它统一了包括个人电脑、平板电脑、智慧型手机、嵌入式系统、</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Xbox One</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">以及新产品</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Surface Hub</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">和</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">HoloLens</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">等等的整个</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Windows</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">产品系列的作业系统，共享一个通用的应用程式架构（</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">UWP</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">）和</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Windows Store</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的生态系统。</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: 'MS Mincho'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: 'MS Mincho'; mso-bidi-font-family: Arial;" lang="ZH-CN">随着</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">今年的</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">7-29 </span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">号</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Windows10</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">发布大会的召开，目前微软已经开始向全球用户推送</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Windows10 </span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">系统，在未来的一年内所有用户都将能免费升级。</span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt; text-align: justify; text-justify: inter-ideograph; mso-add-space: auto;"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Cocos</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">引擎也在第一时间对于</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Windows10 </span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">平台提供了强有力的支持。目前使用官网最新的</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Cocos2dx 3.7</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">版本已经能开发基于</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Windows10</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">平台的通用应用架构的游戏。这里笔者根据自己的经验给大家简单介绍一下如何搭建开发</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Windows10 </span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Cocos</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">游戏的环境。</span></p>
<p class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 0pt; text-align: justify; text-justify: inter-ideograph; mso-add-space: auto;"><span style="font-family: 'Arial',sans-serif;">&nbsp;</span></p>
<p class="MsoNormal" style="text-align: justify; margin-bottom: 0pt; text-justify: inter-ideograph;"><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">一、开发环境</span></p>
<p class="MsoNormal" style="text-align: justify; margin-bottom: 0pt; text-justify: inter-ideograph;"><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN"><span style="font-size: xx-small;">●　</span>首先开发者必须把系统升级到</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Windows10 RTM</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">版本（废话）。</span></p>
<p class="MsoNormal" style="text-align: justify; margin-bottom: 0pt; text-justify: inter-ideograph;"><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN"><span style="font-size: xx-small;">●　</span>然后当然是安装</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Visual Studio 2015</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">，目前官方提供免费的</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">community</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">版本：</span></p>
<p class="MsoNormal" style="text-align: justify; margin-bottom: 0pt; text-justify: inter-ideograph;"><span style="font-size: xx-small;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><a href="https://www.visualstudio.com/downloads/download-visual-studio-vs"><strong style="mso-bidi-font-weight: normal;"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">https://www.visualstudio.com/downloads/download-visual-studio-vs</span></strong></a></p>
<p class="MsoNormal" style="text-align: justify; margin-bottom: 0pt; text-justify: inter-ideograph;"><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN"><span style="font-size: xx-small;">●　</span>需要注意的是一定要安装</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Windows10 </span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">SDK</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">，即勾选下方黄框的选项。</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="mso-no-proof: yes;">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/2425.image002.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/2425.image002.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/2425.image002.jpg" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/2425.image002.jpg" alt="" width="428" height="573" border="0" /></a></span></p>
<p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 22.5pt; text-align: justify; text-justify: inter-ideograph; mso-add-space: auto;"><span style="font-family: 'Arial',sans-serif;">&nbsp;</span></p>
<p class="MsoNormal" style="text-align: justify; margin-bottom: 0pt; text-justify: inter-ideograph;"><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">二</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">、</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">HelloWorld</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">工程</span></p>
<p class="MsoNormal" style="text-align: justify; margin-bottom: 0pt; text-justify: inter-ideograph;"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">1. <span style="mso-spacerun: yes;">&nbsp;</span></span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">从官网下载最新的</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Cocos2dx</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">代码（</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">3.7.1</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">）</span></p>
<p class="MsoNormal" style="text-align: justify; margin-bottom: 0pt; text-justify: inter-ideograph;"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">2. <span style="mso-spacerun: yes;">&nbsp;</span></span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">解压后，使用</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Cocos new</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">命令创建新工程。从工程的目录中可以发现</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">proj.win10</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的目录，证明</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Cocos</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">引擎已经支持</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Windows10</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">平台了。</span></p>
<p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 18pt; text-align: justify; text-justify: inter-ideograph; mso-add-space: auto;"><span style="line-height: 107%; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-no-proof: yes;">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/0552.image004.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/0552.image004.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/0552.image004.jpg" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/0552.image004.jpg" alt="" width="219" height="280" border="0" /></a></span></p>
<p class="MsoNormal" style="text-align: justify; margin-bottom: 0pt; text-justify: inter-ideograph;"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">3. <span style="mso-spacerun: yes;">&nbsp;</span></span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">打开</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Win10</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的工程，可惜这个新工程是编译不过的。错误信息如下：</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="background: white; color: black; line-height: 107%; font-family: Consolas; font-size: 9pt; mso-bidi-font-size: 9.5pt; mso-highlight: white;">1&gt;C:\Program Files (x86)\<span class="SpellE">MSBuild</span>\<span class="SpellE">Microsoft.Cpp</span>\v4.0\V140\Application Type\Windows Store\10.0\Platforms\x64\PlatformToolsets\v140\<span class="GramE">Toolset.targets(</span>41,5): error : The Windows SDK version (10.0.0.0) was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting &lsquo;Retarget solution&rsquo;</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="mso-bidi-font-family: Arial;">&nbsp;</span></p>
<p class="MsoNormal" style="text-align: justify; margin-bottom: 0pt; text-justify: inter-ideograph;"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">4. <span style="mso-spacerun: yes;">&nbsp;</span></span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">修改工程设置，使得工程编译通过：</span></p>
<p class="MsoNormal" style="text-align: justify; margin-bottom: 0pt; text-justify: inter-ideograph;"><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Calibri; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;" lang="ZH-CN">工程编译不通过的原因主要是由于</span><span style="line-height: 107%; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-bidi-font-family: Arial;">Win10 SDK</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Calibri; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;" lang="ZH-CN">更新速度比较快，</span><span style="line-height: 107%; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-bidi-font-family: Arial;">Cocos</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Calibri; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;" lang="ZH-CN">的</span><span style="line-height: 107%; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-bidi-font-family: Arial;">Win10</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Calibri; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;" lang="ZH-CN">工程使用的</span><span style="line-height: 107%; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-bidi-font-family: Arial;">SDK</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Calibri; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;" lang="ZH-CN">版本比</span><span style="line-height: 107%; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-bidi-font-family: Arial;">VS2015</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Calibri; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;" lang="ZH-CN">安装的</span><span style="line-height: 107%; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-bidi-font-family: Arial;">SDK</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Calibri; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;" lang="ZH-CN">版本旧。修正这个问题比较简单，推荐大家按下面二步：</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="mso-bidi-font-family: Arial;">&nbsp;</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">1) <span style="mso-spacerun: yes;">&nbsp;</span></span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">把工程下的所有项目，包括</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">libbox2d, <span class="SpellE">libbullet</span>, <span class="SpellE">librecast</span>, <span class="SpellE">libSpine</span>, libCocos2d </span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">和游戏本身的工程全部</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">retarget</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">到最新的</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">SDK version</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">。</span></p>
<p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt 18pt; mso-add-space: auto;"><span style="mso-no-proof: yes;">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/0702.image006.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/0702.image006.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/0702.image006.jpg" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/0702.image006.jpg" alt="" border="0" /></a></span></p>
<p class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 0pt 18pt; mso-add-space: auto;"><span style="mso-bidi-font-family: Arial;">&nbsp;</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">2) <span style="mso-spacerun: yes;">&nbsp;</span></span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">替换游戏工程下的</span><span class="SpellE"><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">WindowsPhone</span></span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的引用</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">为</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;"> Windows Phone Extension for UWP</span></p>
<p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt 18pt; mso-add-space: auto;"><span style="mso-no-proof: yes;">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/1373.image008.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/1373.image008.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/1373.image008.jpg" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/1373.image008.jpg" alt="" width="346" height="387" border="0" /></a></span></p>
<p class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 0pt 18pt; mso-add-space: auto;"><span style="mso-no-proof: yes;">&nbsp;</span></p>
<p class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 0pt 18pt; mso-add-space: auto;"><span style="mso-no-proof: yes;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/0083.image012.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/0083.image012.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/0083.image012.jpg" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/0083.image012.jpg" alt="" border="0" /></a></span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="mso-bidi-font-family: Arial;">&nbsp;</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="mso-bidi-font-family: Arial;">&nbsp;</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">希望大家通过上述步骤，都能在</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Windows10 </span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">上顺利地运行和开发</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10.5pt; mso-bidi-font-size: 11.0pt;">Cocos</span><span style="line-height: 107%; font-family: 宋体; font-size: 10.5pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">游戏，也欢迎大家为这个崭新的平台提供越来越多的优秀游戏作品！</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;">&nbsp;</p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="mso-bidi-font-family: Arial;">&nbsp;</span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;" lang="ZH-CN">谢谢！</span></p>
<p class="MsoNoSpacing" style="text-align: right;" align="right"><span style="background: white; font-family: 宋体; font-size: 10.5pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">梅颖广</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="mso-bidi-font-family: Arial;">&nbsp;</span></p>]]></content:encoded>
    </item>
    <item>
      <title>商店应用的WACK问题 -- Cocos2dx 游戏移植到 Windows Phone8 之通用应用篇</title>
      <link>https://docs.microsoft.com/archive/blogs/windows__windows_game_dev_faq_/wack-cocos2dx-windows-phone8</link>
      <pubDate>Sat, 04 Apr 2015 21:19:00 GMT</pubDate>
      <dc:creator><![CDATA[梅颖广]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/windows__windows_game_dev_faq_/2015/04/04/wack-cocos2dx-windows-phone8/</guid>
      <description><![CDATA[&nbsp;
Universal Windows App即通用窗口应用是微软2014年推出的最重要的技术之一。在全新8.1的Windows XAML app framework下，使用统一的...]]></description>
      <content:encoded><![CDATA[<div class="WordSection1">
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; text-align: left;" align="center">&nbsp;</p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt; text-align: justify; text-justify: inter-ideograph;">Universal Windows App即通用窗口应用是微软2014年推出的最重要的技术之一。在全新8.1的Windows XAML app framework下，使用统一的 Windows 运行时和 Visual Studio IDE 同时针对所有 Windows 设备进行开发（包括Windows Phone），真正做到一套代码全平台共用，极大地提高了开发效率，节省开发成本。</p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt; text-align: justify; text-justify: inter-ideograph;"><span style="font-family: 宋体;" lang="ZH-CN">针对最近有开发者反馈在</span>Cocos2dx<span style="font-family: 宋体;" lang="ZH-CN">最新的</span>Universal<span style="font-family: 宋体;" lang="ZH-CN">工程中存在</span>Windows Store<span style="font-family: 宋体;" lang="ZH-CN">应用无法提交商店审核的问题，文本在此做一个统一的说明。</span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt; text-align: justify; text-justify: inter-ideograph;">&nbsp;</p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt; text-align: justify; text-justify: inter-ideograph;"><span style="font-family: 宋体;" lang="ZH-CN">目前能够开发</span>Windows Store<span style="font-family: 宋体;" lang="ZH-CN">应用的</span>Cocos2dx<span style="font-family: 宋体;" lang="ZH-CN">的工程通常有二种类型：</span>proj.winrt<span style="font-family: 宋体;" lang="ZH-CN">、</span>proj.win8.1-universal<span style="font-family: 宋体;" lang="ZH-CN">。前者是比较旧的非通用应用的工程，存在于</span>2.x<span style="font-family: 宋体;" lang="ZH-CN">版本中。后者就是通用应用工程，存在于</span>3.x<span style="font-family: 宋体;" lang="ZH-CN">版本。无论哪种类型，工程的</span>CPU<span style="font-family: 宋体;" lang="ZH-CN">平台一般都有三种：</span>ARM<span style="font-family: 宋体;" lang="ZH-CN">、</span>Win32<span style="font-family: 宋体;" lang="ZH-CN">和</span>x64<span style="font-family: 宋体;" lang="ZH-CN">。如果打开</span>Visual Studio<span style="font-family: 宋体;" lang="ZH-CN">，可以从工具栏中发现</span>CPU<span style="font-family: 宋体;" lang="ZH-CN">的选项：</span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt; text-align: justify; text-justify: inter-ideograph;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/2860.image001.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/2860.image001.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/2860.image001.jpg" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/2860.image001.jpg" alt="" width="128" height="93" border="0" /></a></p>
<p class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 0pt; text-align: justify; text-justify: inter-ideograph;"><span style="font-family: 宋体;" lang="ZH-CN">针对不同的设备，开发者需要在各自对应的</span>CPU<span style="font-family: 宋体;" lang="ZH-CN">中进行切换。目前存在的问题和</span>CPU<span style="font-family: 宋体;" lang="ZH-CN">平台有关，主要有二类：</span></p>
<p class="MsoNormal" style="text-align: justify; margin-bottom: 0pt; text-justify: inter-ideograph;">1. &nbsp;Cocos2dx<span style="font-family: 宋体;" lang="ZH-CN">所有版本在</span>x64<span style="font-family: 宋体;" lang="ZH-CN">平台上全部编译出错</span></p>
<p class="MsoNormal" style="text-align: justify; margin-bottom: 0pt; text-justify: inter-ideograph;">x64<span style="font-family: 宋体;" lang="ZH-CN">平台上</span>3.x<span style="font-family: 宋体;" lang="ZH-CN">版本</span>handleTouch<span style="font-family: 宋体;" lang="ZH-CN">类的函数有参数类型转换的错误，还有</span>link<span style="font-family: 宋体;" lang="ZH-CN">方面的错误：</span></p>
<p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt; text-align: justify; text-justify: inter-ideograph;">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/2845.image002.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/2845.image002.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/2845.image002.jpg" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/2845.image002.jpg" alt="" width="582" height="110" border="0" /></a></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt; text-align: justify; text-justify: inter-ideograph;">&nbsp;</p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt; text-align: justify; text-justify: inter-ideograph;">X64<span style="font-family: 宋体;" lang="ZH-CN">平台的</span>2.x<span style="font-family: 宋体;" lang="ZH-CN">版本有</span>link<span style="font-family: 宋体;" lang="ZH-CN">方面的错误：</span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt; text-align: justify; text-justify: inter-ideograph;"><span style="font-family: 宋体;" lang="ZH-CN"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/5824.image003.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/5824.image003.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/5824.image003.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/5824.image003.png" alt="" width="373" height="68" border="0" /></a></span></p>
<p class="MsoNormal" style="text-align: justify; margin-bottom: 0pt; text-justify: inter-ideograph;">2. &nbsp;Cocos2dx 3.3-3.5<span style="font-family: 宋体;" lang="ZH-CN">版本在</span>Win32<span style="font-family: 宋体;" lang="ZH-CN">平台上商店审核出错</span></p>
<p class="MsoNormal" style="text-align: justify; margin-bottom: 0pt; text-justify: inter-ideograph;"><span style="font-family: 宋体;" lang="ZH-CN">（注：所有错误都只针对<span style="font-family: arial,helvetica,sans-serif;">Windows Store</span>的应用，<span style="font-family: arial,helvetica,sans-serif;">Windows Phone</span>的应用不存在错误）</span>&nbsp;</p>
<p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt 18pt; text-align: justify; text-justify: inter-ideograph;">&nbsp;</p>
<p class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 0pt;"><span style="font-family: 宋体;" lang="ZH-CN">下面是解决方法：</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;">1. &nbsp;Windows Store <span style="font-family: 宋体;" lang="ZH-CN">应用的</span>64<span style="font-family: 宋体;" lang="ZH-CN">位</span>CPU<span style="font-family: 宋体;" lang="ZH-CN">平台（即</span>x64<span style="font-family: 宋体;" lang="ZH-CN">）的版本还在开发中，所以目前确实无法编译通过。可以使用</span>32<span style="font-family: 宋体;" lang="ZH-CN">位</span>CPU<span style="font-family: 宋体;" lang="ZH-CN">平台（即</span>Win32<span style="font-family: 宋体;" lang="ZH-CN">）代替，用于</span>Surface Pro <span style="font-family: 宋体;" lang="ZH-CN">、笔记本这样的设备。</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;">&nbsp;</p>
<p class="MsoNormal" style="margin-bottom: 0pt;">2. &nbsp;<span style="font-family: 宋体;" lang="ZH-CN">在提交</span>Win32<span style="font-family: 宋体;" lang="ZH-CN">平台的商店应用审核时，请先用</span>WACK(Windows App Certification Kit)<span style="font-family: 宋体;" lang="ZH-CN">测试，选项画面见下图：</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="font-family: 宋体;" lang="ZH-CN"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/3348.111.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/3348.111.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/3348.111.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/3348.111.png" alt="" border="0" /></a></span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="font-family: 宋体;" lang="ZH-CN">在</span>3.3-3.5<span style="font-family: 宋体;" lang="ZH-CN">版本中如何出现类似</span>&rdquo;APIs are not the part of the Windows SDK for Windows Store apps&rdquo;<span style="font-family: 宋体;" lang="ZH-CN">的审核不通过的意见，那请在控制面板里删除</span>KB2976978 <span style="font-family: 宋体;" lang="ZH-CN">的</span>Windows Update<span style="font-family: 宋体;" lang="ZH-CN">。</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><span style="font-family: 宋体;" lang="ZH-CN">详情可以参考如下博客：</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;"><a href="https://msopentech.com/blog/2014/12/16/windows-app-certification-kit-fails-with-cocos2d-x-3-windows-8-universal-project/">https://msopentech.com/blog/2014/12/16/windows-app-certification-kit-fails-with-cocos2d-x-3-windows-8-universal-project/</a></p>
<p class="MsoNormal" style="margin-bottom: 0pt;">&nbsp;</p>
<p class="MsoNormal" style="margin-bottom: 0pt;">3.&nbsp; ARM<span style="font-family: 宋体;" lang="ZH-CN">平台上没有任何问题，用于</span>Surface RT<span style="font-family: 宋体;" lang="ZH-CN">这样的设备。</span></p>
<p class="MsoNormal" style="margin-bottom: 0pt;">&nbsp;</p>
<p class="MsoNormal" style="margin-bottom: 0pt;">谢谢！</p>
<p class="MsoNormal" style="text-align: right; margin-bottom: 0pt;" align="right"><span style="font-family: 宋体;" lang="ZH-CN">梅颖广</span></p>
</div>]]></content:encoded>
    </item>
    <item>
      <title>如何安装 Windows 10 Technical Preview</title>
      <link>https://docs.microsoft.com/archive/blogs/windows__windows_game_dev_faq_/windows-10-technical-preview</link>
      <pubDate>Sat, 14 Feb 2015 19:33:00 GMT</pubDate>
      <dc:creator><![CDATA[Elissa Tong]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/windows__windows_game_dev_faq_/2015/02/14/windows-10-technical-preview/</guid>
      <description><![CDATA[Windows 10 介绍
Windows 10 很快今年就发布。在开发游戏的行业，我们需要不停找新的机会来创新。 Windows 10 就是这个机会。 我会简单让大家了解 Windows 10...]]></description>
      <content:encoded><![CDATA[<p><strong><span style="font-size: large;">Windows 10 介绍</span></strong><strong></strong></p>
<p>Windows 10 很快今年就发布。在开发游戏的行业，我们需要不停找新的机会来创新。 Windows 10 就是这个机会。 我会简单让大家了解 Windows 10 的平台，然后学习怎么安装在你的电脑。</p>
<p>从2014年9月30日宣布 Windows 10 后，还有最近的2015年1月21日的 Windows 10： The Next Chapter 活动中，我可以总结一个概念:&nbsp;</p>
<p style="padding-left: 30px;"><span style="font-family: arial black,avant garde;">The first step to an era of more personal computing with...</span></p>
<p style="padding-left: 60px;"><span style="font-family: arial black,avant garde;">One Product Family, One Platform, One Store</span></p>
<p style="padding-left: 90px;"><span style="font-family: arial,helvetica,sans-serif;">（进来这时代的个人电脑需要...一个产品组，一个平台，一个商店）</span></p>
<p>One Product Family 是代表一个操作系统就能运行在各种不同的设备，每个设备会有一个订造的体验。设备包含不同的大少和不同的输入方式。 <br />One Platform 是代表开发者只需要写一次 universal apps 的代码就能发布到微软全部的产品组。<br />One Store 是代表只有一个方式来发现，购买，和更新应用到每一个设备。</p>
<p><span style="text-decoration: underline;"><span style="font-size: medium;">Windows 10 的设备</span></span></p>
<p><span style="font-size: small;">这个列表有 Windows 10 能支持的设备：</span></p>
<ul>
<li>桌面电脑: Windows PCs: <a href="http://windows.microsoft.com">http://windows.microsoft.com</a></li>
<li>移动手机: Windows Phone: <a href="http://www.windowsphone.com">http://www.windowsphone.com</a></li>
<li>平板： Surface: <a href="http://www.microsoft.com/surface/">http://www.microsoft.com/surface/</a></li>
<li>4K平板： Surface Hub： <a href="http://www.microsoft.com/microsoft-surface-hub/en-us">http://www.microsoft.com/microsoft-surface-hub/en-us</a></li>
<li>主机: Xbox One: <a href="http://www.xbox.com/zh-CN/xbox-one/meet-xbox-one">http://www.xbox.com/zh-CN/xbox-one/meet-xbox-one</a></li>
<li>全息设备: HoloLens: <a href="http://www.microsoft.com/microsoft-hololens">http://www.microsoft.com/microsoft-hololens</a></li>
<li>可穿戴： Microsoft Band： <a href="http://www.microsoft.com/Microsoft-Band">http://www.microsoft.com/Microsoft-Band</a></li>
<li>IoT： Windows 10 与 Raspberry Pi 2： <a href="http://dev.windows.com/zh-cn/featured/Windows-Developer-Program-for-IoT/">http://dev.windows.com/zh-cn/featured/Windows-Developer-Program-for-IoT/</a></li>
</ul>
<p>看到那么多设备，我们做为开发者都心动。 另外的事情就是 Windows 7, Windows 8.1, and Windows Phone 8.1 的用户可以一年之内免费更新到 Windows 10。</p>
<p>我建议大家早点安装 Windows 10 的预先版，早点准备你的幻境来开发 Windows 10 游戏和应用。</p>
<p><span style="text-decoration: underline;"><span style="font-size: medium;">安装方式</span></span></p>
<ol>
<li>安装在你主机：&nbsp;</li>
<ol>
<li>如果：你电脑重要的文件都在运存储，不怕失去资料， 或者你的硬盘空间满了，不能安装双系统。</li>
<li>风险：大， 预先版会有 bugs，更能还没完善，可能影响平常操作。</li>
<li>难度：底</li>
</ol>
<li>双系统安装：</li>
<ol>
<li>如果：你主机的文件非常重要，不想冒险失去 （这个情况要多点保存文件在运存里）。 你有些软件不能在 Windows 10 运作。</li>
<li>风险：小</li>
<li>难度：高</li>
</ol>
<li>安装在虚拟机：</li>
<ol>
<li>如果：你想试一下 Windows 10 的新功能</li>
<li>风险：小</li>
<li>难度：中，如果用 Azure，Windows 10 image 模板已经准备好</li>
</ol></ol>
<p>虽然安装在主机是最容易，我选择双系统的安装因为我的主机是工作需要用的，所以我不想安装一个开发中的操作系统， 以防万一...</p>
<p><br /><strong><span style="font-size: large;">怎么用双系统来安装 Windows 10 Technical Preview</span></strong></p>
<p><span style="text-decoration: underline;"><span style="font-size: medium;">准备工作</span></span></p>
<ol>
<li>备份好主机的文档和浏览器的书签。 如果电脑有加密 （例如用了 Bitlocker）， 密码打印出来或者写下来。</li>
<li>在 Windows Insider 报名和下载 Windows 10 Technical Preview 的 ISO 版本。</li>
<li>下载和安装 Windows USB/DVD Download Tool: <a href="http://wudt.codeplex.com/">http://wudt.codeplex.com/</a></li>
<li>插入一个空的 USB。 （Windows 10 Build 9926 需要 3.95GB）</li>
<li>打开 Windows USB/DVD Download Tool 工具，然后选择下载的 Windows 10 ISO。 USB 会需要重新格式化。</li>
</ol>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/7725.WindowsUSBTool02.JPG" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/7725.WindowsUSBTool02.JPG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/7725.WindowsUSBTool02.JPG" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/7725.WindowsUSBTool02.JPG" alt="" border="0" /></a></p>
<p><span style="text-decoration: underline;"><span style="font-size: medium;">准备硬盘</span></span></p>
<ol>
<li>安装 Windows 10 用了大约 25GB。 但是开发者会用 Visual Studio IDE， 这个软件最少需要 6 GB。 我建议优盘有 50 GB 的空位 (越大越好，方便存储文件和安装例外的软件）。</li>
<ol>
<li>为了游戏开发，你可以安装几个开发语言和工具</li>
<li>例如 ：Microsoft Web Developer Tools, Visual C++ for Cross Platform Mobile Development, Tools for Apache Cordova, Silverlight Development Kit, Windows 8.1 and Windows Phone 8.1 Tools, Windows Phone 8.1 Emulators, Windows Phone 8.0 SDK.</li>
<li>总共安装后的存储用量大约 14 GB。
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/7776.VisualStudio2015_02.JPG" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/7776.VisualStudio2015_5F00_02.JPG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/7776.VisualStudio2015_02.JPG" original-url="http://blogs.msdn.com/resized-image.ashx/__size/300x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/7776.VisualStudio2015_5F00_02.JPG" alt="" border="0" /></a></p>
</li>
</ol>
<li>在搜索窗口 （Windows 按钮 + S 按钮）， 写 diskmgmt.msc, 打开 Disk Management 工具。 （留意你的主盘有多少的空位。 有没有 50 GB?)</li>
<li>在主盘 （例如 C：\ 盘）， 右点击， 选择 Shrink Volume...</li>
<ul>
<li><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/8836.DiskMgmt02.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/8836.DiskMgmt02.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/8836.DiskMgmt02.jpg" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/8836.DiskMgmt02.jpg" alt="" border="0" /></a></li>
</ul>
<li>在 Shrink Volume 的窗口， 留意 Size of available shrink space in MB 和 Enter the amount of space to shrink in MB:</li>
<ol>
<li>如果 available shrink space 有 50 GB 以上，你就可以写 50 GB。 点击 Shrink 按钮就行了。</li>
<li>问题去在如果 available shrink space 没有 50 GB， 但是硬盘是很明确有 50 GB 以上的空位。 为什么？ 这个是因为你的硬盘有分散 （fragmented） 的情况。 硬盘连起来找不到 50 GB。 解决方案可以参考下面的建议。</li>
</ol></ol>
<p style="padding-left: 60px;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/8715.DiskMgmt03.JPG" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/8715.DiskMgmt03.JPG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/8715.DiskMgmt03.JPG" original-url="http://blogs.msdn.com/resized-image.ashx/__size/350x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/8715.DiskMgmt03.JPG" alt="" border="0" /></a></p>
<p><span style="text-decoration: underline;"><span style="font-size: medium;">安装 Windows 10</span></span></p>
<ol>
<li>打开电脑时， 进去 BIOS 的主页。 选择 Boot， 然后选择 USB 的启动方式。 保存和离开 BIOS 的主页。 (每个电脑的 BIOS 可能不一样。）</li>
<li>电脑重启就启动 USB 里面的系统， 进入 Windows 10 的安装画面。</li>
<li>点击 Install Now， 然后 Custom 的选择。</li>
<li>一个硬盘的列表会出来，选择刚创建的新 shrink volume， 有 50 GB 的空位。</li>
<li>跟着画面来安装就可以成功启动一个双系统的环境！</li>
</ol>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/7180.ChooseAnOperatingSystem.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/7180.ChooseAnOperatingSystem.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/7180.ChooseAnOperatingSystem.jpg" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/7180.ChooseAnOperatingSystem.jpg" alt="" border="0" /></a></p>
<p>安装 Windows 10 后，你可以随时进入 Check for Updates 来下载更新的版本。</p>
<p>现在你只需要等待 Windows 10 SDK 的公开日期， 拿到 SDK 你就可以开始开发最新的跨设备的 Windows 10 游戏和应用！<br />&nbsp;</p>
<p><span style="text-decoration: underline;"><span style="font-size: medium;">怎么解决分散的情况</span></span></p>
<p>（Optional：可以参考的资料）</p>
<p>主要的方式需要 defragment 你的硬盘。 右点击主盘的 Properties， 然后 Disk Cleanup 来删除垃圾， 还有在 Tools， 选择 Optimize。</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/2625.CDriveProperties.JPG" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/2625.CDriveProperties.JPG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/2625.CDriveProperties.JPG" original-url="http://blogs.msdn.com/resized-image.ashx/__size/300x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/2625.CDriveProperties.JPG" alt="" border="0" /></a>&nbsp;&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/0647.CDriveOptimize.JPG" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/0647.CDriveOptimize.JPG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/0647.CDriveOptimize.JPG" original-url="http://blogs.msdn.com/resized-image.ashx/__size/300x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/0647.CDriveOptimize.JPG" alt="" border="0" /></a><br />如果空位还不现实，我们需要第三方的软件。 有三个软件的建议：<br />&nbsp;- Power Defragmenter<br />&nbsp;- Auslogics Disk Defrag<br />&nbsp;- Perfect Disk: takes about 2 hours.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/8054.PerfectDiskMenu.JPG" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/8054.PerfectDiskMenu.JPG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/8054.PerfectDiskMenu.JPG" original-url="http://blogs.msdn.com/resized-image.ashx/__size/400x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/8054.PerfectDiskMenu.JPG" alt="" border="0" /></a></p>
<p>试了三个软件后，只有 Perfect Disk 的 Boot Time Defrag 能帮助完全 defragment 我的硬盘。更多资料请参考：<a href="http://www.howtogeek.com/howto/windows-vista/working-around-windows-vistas-shrink-volume-inadequacy-problems/">http://www.howtogeek.com/howto/windows-vista/working-around-windows-vistas-shrink-volume-inadequacy-problems/</a></p>
<p>&nbsp;</p>
<p><span style="text-decoration: underline;"><span style="font-size: medium;">查询以下的网站</span></span></p>
<ul>
<li><a href="https://insider.windows.com/">https://insider.windows.com/</a></li>
<li><a href="http://news.microsoft.com/windows10story/">http://news.microsoft.com/windows10story/</a></li>
<li><a href="http://windows.microsoft.com/zh-cn/windows-10/about">http://windows.microsoft.com/zh-cn/windows-10/about</a></li>
<li><a href="http://blogs.windows.com/bloggingwindows/2014/09/30/announcing-windows-10/">http://blogs.windows.com/bloggingwindows/2014/09/30/announcing-windows-10/</a></li>
<li><a href="http://blogs.windows.com/bloggingwindows/2015/01/21/the-next-generation-of-windows-windows-10/">http://blogs.windows.com/bloggingwindows/2015/01/21/the-next-generation-of-windows-windows-10/</a></li>
<li><a href="http://blogs.windows.com/business/2014/09/30/introducing-windows-10-for-business/">http://blogs.windows.com/business/2014/09/30/introducing-windows-10-for-business/</a></li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Windows Phone 游戏在应用恢复时如何避免花屏问题</title>
      <link>https://docs.microsoft.com/archive/blogs/windows__windows_game_dev_faq_/windows-phone</link>
      <pubDate>Tue, 27 Jan 2015 02:27:55 GMT</pubDate>
      <dc:creator><![CDATA[Leon Liang_MS]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/windows__windows_game_dev_faq_/2015/01/27/windows-phone/</guid>
      <description><![CDATA[近来，我们收到了很多游戏开发者关于 Windows Phone 8/8.1 上游戏在快速应用恢复或者应用恢复后，遇到花屏的问题。 很多开发者认为是 DirecX...]]></description>
      <content:encoded><![CDATA[<p><font size="3">近来，我们收到了很多游戏开发者关于 Windows Phone 8/8.1 上游戏在快速应用恢复或者应用恢复后，遇到花屏的问题。 很多开发者认为是 DirecX 控件和游戏图片资源重新渲染延迟的问题。其实这个问题非常好解决。</font></p>  <p><font size="3">首先，我们需要了解一下Windows Phone 上的快速应用恢复。请参考MSDN 上的介绍</font></p>  <p><a href="http://msdn.microsoft.com/library/windows/apps/jj735579(v=vs.105).aspx/"><font size="3">http://msdn.microsoft.com/library/windows/apps/jj735579(v=vs.105).aspx/</font></a></p>  <p><font size="3">当游戏切到后台时，系统会将DirectX控件资源释放。恢复后，系统需要重新加载和rendering 游戏资源。 如果游戏资源比较多的时候，有可能引起资源渲染上的延迟等问题。</font></p>  <p><font size="3">其实，解决这个问题并不复杂。在游戏恢复的时候，提供一个静态图片，让用户选择“继续”，“退出”，“重新玩”等选项。在用户选择之前，可以利用用户考虑的3-4秒让游戏的资源恢复。这样就避免了花屏的问题。</font></p>  <p><font size="3">大家可以参考Windows Phone 上的“滑雪大冒险”游戏。 可以看到通过静态的选项，避免的恢复中的问题。</font></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/metablogapi/2451.clip_image001_7CF1EA35.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90-metablogapi/2451.clip_5F00_image001_5F00_7CF1EA35.png"><img title="clip_image001" style="border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px" border="0" alt="clip_image001" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/metablogapi/4370.clip_image001_thumb_5143B0EA.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90-metablogapi/4370.clip_5F00_image001_5F00_thumb_5F00_5143B0EA.png" width="509" height="306" /></a></p>]]></content:encoded>
    </item>
    <item>
      <title>快速过渡到 Universal App  -- Cocos2dx 游戏移植到 Windows Phone8 之通用应用篇</title>
      <link>https://docs.microsoft.com/archive/blogs/windows__windows_game_dev_faq_/universal-app-cocos2dx-windows-phone8</link>
      <pubDate>Wed, 07 Jan 2015 00:02:00 GMT</pubDate>
      <dc:creator><![CDATA[梅颖广]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/windows__windows_game_dev_faq_/2015/01/07/universal-app-cocos2dx-windows-phone8/</guid>
      <description><![CDATA[Universal Windows App即通用窗口应用是微软2014年推出的最重要的技术之一。在全新8.1的Windows XAML app framework下，使用统一的 Windows...]]></description>
      <content:encoded><![CDATA[<div class="WordSection1">
<p class="MsoNormal" style="text-align: left; margin-left: 18pt;" align="center">Universal Windows App即通用窗口应用是微软2014年推出的最重要的技术之一。在全新8.1的Windows XAML app framework下，使用统一的 Windows 运行时和 Visual Studio IDE 同时针对所有Windows 设备进行开发（包括Windows Phone），真正做到一套代码全平台共用，极大地提高了开发效率，节省开发成本。进一步的知识大家可以参考如下链接：</p>
<ul>
<li>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;"><a href="http://dev.windows.com/zh-cn/develop/building-universal-windows-apps/">http://dev.windows.com/zh-cn/develop/building-universal-windows-apps/</a></div>
</li>
<li>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;"><a href="http://www.cnblogs.com/sonic1abc/p/3772693.html">http://www.cnblogs.com/sonic1abc/p/3772693.html</a></div>
</li>
</ul>
<p class="MsoListParagraphCxSpLast" style="text-align: justify; margin-left: 0cm; text-justify: inter-ideograph;">Cocos2dx<span style="font-family: 宋体;" lang="JA">的最新版本提供了对于</span>Universal Windows App<span style="font-family: 宋体;" lang="ZH-CN">（以下简称</span>UAP<span style="font-family: 宋体;" lang="ZH-CN">）的支持。针对这个全新的开发模式，很多开发者还不是太熟悉。所以本文罗列了一些基本信息，帮助大家快速过渡。</span></p>
<p>1. Cocos2dx支持UAP的版本：</p>
<ul>
<li>
<div>3.x的话：需要3.3版本</div>
</li>
<li>
<div>2.x的话：官网版本尚不支持UAP，需要MSOpenTech分支的2.2.5版本</div>
</li>
</ul>
<p class="MsoNormal"><span style="font-family: 宋体;" lang="ZH-CN">2.获取支持</span>UAP<span style="font-family: 宋体;" lang="ZH-CN">的</span>Cocos2dx<span style="font-family: 宋体;" lang="ZH-CN">代码：</span></p>
<ul>
<li>
<div class="MsoNormal">3.x<span style="font-family: 宋体;" lang="ZH-CN">的话：直接从官网下载</span>3.3<span style="font-family: 宋体;" lang="ZH-CN">版本即可：</span><a href="http://www.cocos2d-x.org/download">http://www.cocos2d-x.org/download</a></div>
</li>
<li>
<div class="MsoNormal">2.x<span style="font-family: 宋体;" lang="ZH-CN">的话：从</span>MSOpenTech<span style="font-family: 宋体;" lang="ZH-CN">的</span>GitHub<span style="font-family: 宋体;" lang="ZH-CN">上获取，具体步骤如下所示：</span></div>
</li>
</ul>
<table class="MsoTableGrid" style="border: currentColor; margin-left: 12.35pt; border-collapse: collapse;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="border-width: 1pt 1pt medium; border-style: solid solid none; border-color: windowtext windowtext currentColor; padding: 0cm 5.4pt; width: 401.15pt;" valign="top" width="535">
<p class="MsoNormal" style="text-align: justify; line-height: normal; text-justify: inter-ideograph;"><span style="color: black;">Git clone&nbsp;</span><a href="https://github.com/MSOpenTech/cocos2d-x.git" target="_blank">https://github.com/MSOpenTech/cocos2d-x.git</a></p>
</td>
</tr>
<tr>
<td style="border-width: medium 1pt; border-style: none solid; border-color: currentColor windowtext; padding: 0cm 5.4pt; width: 401.15pt;" valign="top" width="535">
<p class="MsoNormal" style="text-align: justify; line-height: normal; text-justify: inter-ideograph;"><span style="color: black;">cd cocos2d-x</span></p>
</td>
</tr>
<tr>
<td style="border-width: medium 1pt; border-style: none solid; border-color: currentColor windowtext; padding: 0cm 5.4pt; width: 401.15pt;" valign="top" width="535">
<p class="MsoNormal" style="line-height: normal;"><span style="color: black;">git checkout v2-universal</span></p>
</td>
</tr>
<tr>
<td style="border-width: medium 1pt; border-style: none solid; border-color: currentColor windowtext; padding: 0cm 5.4pt; width: 401.15pt;" valign="top" width="535">
<p class="MsoNormal" style="line-height: normal;"><span style="color: black;">git&nbsp;submodule&nbsp;update &ndash;init</span></p>
</td>
</tr>
<tr>
<td style="border-width: medium 1pt 1pt; border-style: none solid solid; border-color: currentColor windowtext windowtext; padding: 0cm 5.4pt; width: 401.15pt;" valign="top" width="535">
<p class="MsoNormal" style="line-height: normal;"><strong><span style="color: black;">download-deps.py &nbsp;</span></strong><em><span style="color: #548235;">(should be downloading from msopentech and not cocos2d)</span></em></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoListParagraph" style="margin-left: 0cm;">&nbsp;</p>
<p class="MsoNormal"><span style="font-family: 宋体;" lang="ZH-CN">3.系统要求:</span></p>
<p class="MsoNormal" style="text-align: left; padding-left: 30px;"><span style="font-family: 宋体;" lang="ZH-CN"><span style="font-family: 宋体;" lang="ZH-CN">安装 </span><span style="font-family: arial,helvetica,sans-serif; font-size: small;"><strong>Visual Studio 2013&nbsp;Update 4</strong>&nbsp;</span></span></p>
<p class="MsoNormal" style="text-align: left; padding-left: 30px;">&nbsp;</p>
<p class="MsoNormal"><span style="font-family: 宋体;" lang="ZH-CN">4.创建支持</span>UAP<span style="font-family: 宋体;" lang="ZH-CN">工程</span>:</p>
<p class="MsoNormal"><span style="font-family: 宋体;" lang="ZH-CN">方法和以前完全相同，不需要特别的步骤</span></p>
<p class="MsoNormal" style="padding-left: 30px;">3.x<span style="font-family: 宋体;" lang="JA">版本</span>:</p>
<p class="MsoNormal" style="padding-left: 30px;">Cocos new -l cpp -d D:\<span style="color: black;"> MyGame&nbsp;</span> <span style="color: black;">MyGame&nbsp;</span></p>
<p class="MsoListParagraph" style="margin-left: 0cm;">&nbsp;</p>
<p class="MsoNormal" style="padding-left: 30px;">2.x<span style="font-family: 宋体;" lang="JA">版本</span>:</p>
<p class="MsoNormal" style="padding-left: 30px;"><span style="color: black;">cd tools\project-creator </span></p>
<p class="MsoNormal" style="padding-left: 30px;"><span style="color: black;">create_project.py -project&nbsp;MyGame&nbsp;-package&nbsp;com.foo.bar&nbsp;-language&nbsp;cpp</span></p>
<p class="MsoListParagraph" style="margin-left: 18pt;">&nbsp;</p>
<p class="MsoNormal"><span style="font-family: 宋体;" lang="ZH-CN">5.构建</span>UAP<span style="font-family: 宋体;" lang="ZH-CN">工程：</span></p>
<p class="MsoNormal" style="padding-left: 30px;"><span style="font-family: 宋体;" lang="ZH-CN">在</span><strong>proj.win8.1-universal</strong><span style="font-family: 宋体;" lang="JA">目录下打开</span>&ldquo;xxx.sln&rdquo;<span style="font-family: 宋体;" lang="JA">工程文件</span><span style="font-family: 宋体;" lang="ZH-CN">，根据需要的环境</span><span style="font-family: 宋体;" lang="JA">把</span><strong>XXX.Windows (Windows 8.1)</strong> <span style="font-family: 宋体;" lang="JA">或者</span><strong>XXX.WindowsPhone (Windows Phone8.1)</strong><span style="font-family: 宋体;" lang="JA">设置为启动工程</span><span style="font-family: 宋体;" lang="ZH-CN">，</span><span style="font-family: 宋体;" lang="JA">运行即可</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-family: 宋体;" lang="ZH-CN">6.常见的一些问题</span>:</p>
<table class="MsoTableGrid" style="border: currentColor; width: 552px; margin-left: 18pt; border-collapse: collapse;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="background: #5b9bd5; padding: 0cm 5.4pt; border: 1pt solid windowtext; width: 38.45pt;" rowspan="2" width="51">
<p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt; text-align: center; line-height: normal;" align="center"><span style="color: white; font-family: 宋体; font-size: 10pt;" lang="ZH-CN">问题</span><span style="color: white; font-size: 10pt;">1</span></p>
</td>
<td style="border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: windowtext windowtext windowtext currentColor; padding: 0cm 5.4pt; width: 375.65pt;" valign="top" width="501">
<p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt; line-height: normal;"><span style="font-family: 宋体; font-size: 10pt;" lang="ZH-CN">问：编译后会有如下很多</span><span style="font-size: 10pt;">LinkError</span><span style="font-family: 宋体; font-size: 10pt;" lang="ZH-CN">，如何解决？</span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt; line-height: normal;"><span style="font-size: 10pt;">&nbsp;</span></p>
<p class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 0pt; line-height: normal;"><span style="color: black; font-size: 10.5pt;">2&gt;XamlTypeInfo.g.obj : error LNK2001: 无法解析的外部符号 "public: __cdecl<br />cocos2d::KeyBoardWinRT::~KeyBoardWinRT(void)" (<a href="mailto:??1KeyBoardWinRT@cocos2d@@Q$AAA@XZ">??1KeyBoardWinRT@cocos2d@@Q$AAA@XZ</a>)<br /><br />2&gt;OpenGLES.obj : error LNK2001: 无法解析的外部符号 "public: __cdecl<br />cocos2d::KeyBoardWinRT::~KeyBoardWinRT(void)" (<a href="mailto:??1KeyBoardWinRT@cocos2d@@Q$AAA@XZ">??1KeyBoardWinRT@cocos2d@@Q$AAA@XZ</a>)</span></p>
</td>
</tr>
<tr>
<td style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: currentColor windowtext windowtext currentColor; padding: 0cm 5.4pt; width: 375.65pt;" valign="top" width="501">
<p class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 0pt; line-height: normal;"><span style="font-family: 宋体; font-size: 10pt;" lang="ZH-CN">答：必须安装</span>Visual Studio 2013 update 4</p>
</td>
</tr>
<tr>
<td style="background: #5b9bd5; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: currentColor windowtext windowtext; padding: 0cm 5.4pt; width: 38.45pt;" rowspan="2" valign="top" width="51">
<p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt; text-align: center; line-height: normal;">&nbsp;</p>
<p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt; text-align: center; line-height: normal;">&nbsp;</p>
<p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt; text-align: center; line-height: normal;">&nbsp;</p>
<p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt; text-align: center; line-height: normal;">&nbsp;</p>
<p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt; text-align: center; line-height: normal;">&nbsp;</p>
<p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt; text-align: center; line-height: normal;">&nbsp;</p>
<p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt; text-align: center; line-height: normal;">&nbsp;</p>
<p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt; text-align: center; line-height: normal;">&nbsp;</p>
<p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt; text-align: center; line-height: normal;">&nbsp;</p>
<p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt; text-align: center; line-height: normal;">&nbsp;</p>
<p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt; text-align: center; line-height: normal;">&nbsp;</p>
<p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt; text-align: center; line-height: normal;">&nbsp;</p>
<p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt; text-align: center; line-height: normal;">&nbsp;</p>
<p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt; text-align: center; line-height: normal;">&nbsp;</p>
<p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt; text-align: center; line-height: normal;">&nbsp;</p>
<p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt; text-align: center; line-height: normal;">&nbsp;</p>
<p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt; text-align: center; line-height: normal;">&nbsp;</p>
<p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt; text-align: center; line-height: normal;">&nbsp;</p>
<p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt; text-align: center; line-height: normal;">&nbsp;</p>
<p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt; text-align: center; line-height: normal;"><span style="color: white; font-family: 宋体; font-size: 10pt;" lang="ZH-CN">问题</span><span style="color: white; font-size: 10pt;">2</span></p>
</td>
<td style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: currentColor windowtext windowtext currentColor; padding: 0cm 5.4pt; width: 375.65pt;" valign="top" width="501">
<p class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 0pt; line-height: normal;"><span style="font-family: 宋体; font-size: 10pt;" lang="ZH-CN">问：</span><span style="font-size: 10pt;">UAP</span><span style="font-family: 宋体; font-size: 10pt;" lang="ZH-CN">模式如何增加回退键处理？</span></p>
</td>
</tr>
<tr>
<td style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: currentColor windowtext windowtext currentColor; padding: 0cm 5.4pt; width: 375.65pt;" valign="top" width="501">
<p class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 0pt; line-height: normal;"><span style="font-family: 宋体; font-size: 10pt;" lang="ZH-CN">答：可以按以下步骤增加</span><span style="font-size: 10pt;">HardwareButtons::BackPressed</span><span style="font-family: 宋体; font-size: 10pt;" lang="ZH-CN">处理：</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt;"><span style="color: #1f497d; font-family: 宋体;" lang="ZH-CN">1. 在</span><span style="color: #1f497d;">App</span><span style="color: #1f497d;">.xaml.cpp</span><span style="color: #1f497d; font-family: 宋体;" lang="ZH-CN">中加入头文件：</span></p>
<p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt; line-height: normal;"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">using</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">namespace</span><em><span style="background: white; color: #216f85; font-family: Consolas; font-size: 9.5pt;">Windows</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">::</span><em><span style="background: white; color: #216f85; font-family: Consolas; font-size: 9.5pt;">Phone</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">::</span><em><span style="background: white; color: #216f85; font-family: Consolas; font-size: 9.5pt;">UI</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">::</span><em><span style="background: white; color: #216f85; font-family: Consolas; font-size: 9.5pt;">Input</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">;</span></p>
<p class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 0pt 18pt; line-height: normal;"><span style="color: #1f497d;">&nbsp;</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt;"><span style="color: #1f497d; font-family: 宋体;" lang="ZH-CN">2. 在</span><span style="color: #1f497d;">App()</span><span style="color: #1f497d; font-family: 宋体;" lang="ZH-CN">中加入</span><span style="color: #1f497d;">BackPressed</span><span style="color: #1f497d; font-family: 宋体;" lang="ZH-CN">处理：</span></p>
<p class="MsoNormal" style="line-height: normal; padding-left: 30px; margin-bottom: 0pt;"><span style="background: white; color: #216f85; font-family: Consolas; font-size: 9.5pt;">App</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">::</span><span style="background: white; color: #880000; font-family: Consolas; font-size: 9.5pt;">App</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">()</span></p>
<p class="MsoNormal" style="line-height: normal; padding-left: 30px; margin-bottom: 0pt;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">{</span></p>
<p class="MsoNormal" style="line-height: normal; padding-left: 60px; margin-bottom: 0pt;"><span style="background: white; color: #880000; font-family: Consolas; font-size: 9.5pt;">InitializeComponent</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">();</span></p>
<p class="MsoNormal" style="line-height: normal; padding-left: 60px; margin-bottom: 0pt;"><em><span style="background: white; color: #216f85; font-family: Consolas; font-size: 9.5pt;">Suspending</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;"> += </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">ref</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">new</span><em><span style="background: white; color: #216f85; font-family: Consolas; font-size: 9.5pt;">SuspendingEventHandler</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">(</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">this</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">, &amp;</span><span style="background: white; color: #216f85; font-family: Consolas; font-size: 9.5pt;">App</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">::</span><span style="background: white; color: #880000; font-family: Consolas; font-size: 9.5pt;">OnSuspending</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">);</span></p>
<p class="MsoNormal" style="line-height: normal; padding-left: 60px; margin-bottom: 0pt;"><em><span style="background: white; color: #216f85; font-family: Consolas; font-size: 9.5pt;">Resuming</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;"> += </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">ref</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">new</span><em><span style="background: white; color: #216f85; font-family: Consolas; font-size: 9.5pt;">EventHandler</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">&lt;</span><em><span style="background: white; color: #216f85; font-family: Consolas; font-size: 9.5pt;">Object</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">^&gt;(</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">this</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">, &amp;</span><span style="background: white; color: #216f85; font-family: Consolas; font-size: 9.5pt;">App</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">::</span><span style="background: white; color: #880000; font-family: Consolas; font-size: 9.5pt;">OnResuming</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">);</span></p>
<p class="MsoNormal" style="line-height: normal; padding-left: 60px; margin-bottom: 0pt;"><em><span style="background: yellow; color: #216f85; font-family: Consolas; font-size: 10pt;">HardwareButtons</span></em><span style="background: yellow; color: black; font-family: Consolas; font-size: 10pt;">::</span><em><span style="background: yellow; color: #216f85; font-family: Consolas; font-size: 10pt;">BackPressed</span></em><span style="background: yellow; color: black; font-family: Consolas; font-size: 10pt;"> += </span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 10pt;">ref</span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 10pt;">new</span><em><span style="background: yellow; color: #216f85; font-family: Consolas; font-size: 10pt;">EventHandler</span></em><span style="background: yellow; color: black; font-family: Consolas; font-size: 10pt;">&lt;</span><em><span style="background: yellow; color: #216f85; font-family: Consolas; font-size: 10pt;">BackPressedEventArgs</span></em><span style="background: yellow; color: black; font-family: Consolas; font-size: 10pt;">^&gt;(</span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 10pt;">this</span><span style="background: yellow; color: black; font-family: Consolas; font-size: 10pt;">, &amp;</span><span style="background: yellow; color: #216f85; font-family: Consolas; font-size: 10pt;">App</span><span style="background: yellow; color: black; font-family: Consolas; font-size: 10pt;">::</span><span style="background: yellow; color: #880000; font-family: Consolas; font-size: 10pt;">HardwareButtons_BackPressed</span><span style="background: yellow; color: black; font-family: Consolas; font-size: 10pt;">);</span></p>
<p class="MsoNormal" style="line-height: normal; padding-left: 30px; margin-bottom: 0pt;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">}</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal;"><span style="color: #1f497d;">&nbsp;</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt;"><span style="color: #1f497d; font-family: 宋体;" lang="ZH-CN">3.在</span><span style="color: #1f497d;">App</span><span style="color: #1f497d;">.xaml.h</span><span style="color: #1f497d; font-family: 宋体;" lang="ZH-CN">中加入</span><span style="color: #1f497d;">HardwareButtons_BackPressed() </span><span style="color: #1f497d; font-family: 宋体;" lang="ZH-CN">声明</span><span style="color: #1f497d; font-family: 宋体;" lang="ZH-CN">：</span></p>
<p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt; line-height: normal; padding-left: 30px;"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">void</span><span style="background: white; color: #880000; font-family: Consolas; font-size: 9.5pt;">HardwareButtons_BackPressed</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">(</span><em><span style="background: white; color: #216f85; font-family: Consolas; font-size: 9.5pt;">Object</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">^ </span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt;">sender</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">, </span><em><span style="background: white; color: #216f85; font-family: Consolas; font-size: 9.5pt;">Windows</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">::</span><em><span style="background: white; color: #216f85; font-family: Consolas; font-size: 9.5pt;">Phone</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">::</span><em><span style="background: white; color: #216f85; font-family: Consolas; font-size: 9.5pt;">UI</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">::</span><em><span style="background: white; color: #216f85; font-family: Consolas; font-size: 9.5pt;">Input</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">::</span><em><span style="background: white; color: #216f85; font-family: Consolas; font-size: 9.5pt;">BackPressedEventArgs</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">^ </span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt;">e</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">);</span></p>
<p class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px;"><span style="color: #1f497d;">&nbsp;</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt;"><span style="color: #1f497d; font-family: 宋体;" lang="ZH-CN">4.在</span><span style="color: #1f497d;">App</span><span style="color: #1f497d;">.xaml.cpp</span><span style="color: #1f497d; font-family: 宋体;" lang="ZH-CN">中加入</span><span style="color: #1f497d;">HardwareButtons_BackPressed() </span><span style="color: #1f497d; font-family: 宋体;" lang="ZH-CN">定义（函数内部可以根据自己的要求修改）</span><span style="color: #1f497d;">:</span></p>
<p class="MsoNormal" style="line-height: normal; padding-left: 30px; margin-bottom: 0pt;"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">void </span><span style="background: white; color: #216f85; font-family: Consolas; font-size: 9.5pt;">App</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">::</span><span style="background: white; color: #880000; font-family: Consolas; font-size: 9.5pt;">HardwareButtons_BackPressed</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">(</span><em><span style="background: white; color: #216f85; font-family: Consolas; font-size: 9.5pt;">Object</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">^ </span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt;">sender</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">, </span><em><span style="background: white; color: #216f85; font-family: Consolas; font-size: 9.5pt;">BackPressedEventArgs</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">^ </span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt;">e</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">)</span></p>
<p class="MsoNormal" style="line-height: normal; padding-left: 30px; margin-bottom: 0pt;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">{</span></p>
<p class="MsoNormal" style="line-height: normal; padding-left: 60px; margin-bottom: 0pt;"><em><span style="background: white; color: #216f85; font-family: Consolas; font-size: 9.5pt;">Frame</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">^ </span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt;">rootFrame</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;"> = </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">dynamic_cast</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">&lt;</span><em><span style="background: white; color: #216f85; font-family: Consolas; font-size: 9.5pt;">Frame</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">^&gt;(</span><em><span style="background: white; color: #216f85; font-family: Consolas; font-size: 9.5pt;">Window</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">::</span><em><span style="background: white; color: #880000; font-family: Consolas; font-size: 9.5pt;">Current</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">-&gt;</span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt;">Content</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">);</span></p>
<p class="MsoNormal" style="line-height: normal; padding-left: 60px; margin-bottom: 0pt;"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">if</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;"> (</span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt;">rootFrame</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;"> != </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">nullptr</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">&amp;&amp;</span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt;">rootFrame</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">-&gt;</span><em><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt;">CanGoBack</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">)</span></p>
<p class="MsoNormal" style="line-height: normal; padding-left: 60px; margin-bottom: 0pt;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">{</span></p>
<p class="MsoNormal" style="line-height: normal; padding-left: 90px; margin-bottom: 0pt;"><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt;">rootFrame</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">-&gt;</span><em><span style="background: white; color: #880000; font-family: Consolas; font-size: 9.5pt;">GoBack</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">();</span></p>
<p class="MsoNormal" style="line-height: normal; padding-left: 90px; margin-bottom: 0pt;"><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt;">e</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">-&gt;</span><em><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt;">Handled</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;"> = </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">true</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">;</span></p>
<p class="MsoNormal" style="line-height: normal; padding-left: 60px; margin-bottom: 0pt;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">}</span></p>
<p class="MsoNormal" style="line-height: normal; padding-left: 30px; margin-bottom: 0pt;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">}</span></p>
</td>
</tr>
<tr>
<td style="background: #5b9bd5; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: currentColor windowtext windowtext; padding: 0cm 5.4pt; width: 38.45pt;" rowspan="2" valign="top" width="51">
<p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt; line-height: normal;"><span style="color: white; font-family: 宋体; font-size: 10pt;" lang="ZH-CN">问题</span><span style="color: white; font-size: 10pt;">3</span></p>
</td>
<td style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: currentColor windowtext windowtext currentColor; padding: 0cm 5.4pt; width: 375.65pt;" valign="top" width="501">
<p class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 0pt; line-height: normal;"><span style="font-family: 宋体; font-size: 10pt;" lang="ZH-CN">问：为什么</span><span style="font-size: 10pt;">UAP</span><span style="font-family: 宋体; font-size: 10pt;" lang="ZH-CN">模式没有</span><span style="font-size: 10pt;">Master</span><span style="font-family: 宋体; font-size: 10pt;" lang="ZH-CN">版本？</span></p>
</td>
</tr>
<tr>
<td style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: currentColor windowtext windowtext currentColor; padding: 0cm 5.4pt; width: 375.65pt;" valign="top" width="501">
<p class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 0pt; line-height: normal;"><span style="font-family: 宋体; font-size: 10pt;" lang="ZH-CN">答：目前只提供</span><span style="font-size: 10pt;">Release</span><span style="font-family: 宋体; font-size: 10pt;" lang="ZH-CN">版本</span></p>
</td>
</tr>
<tr>
<td style="background: #5b9bd5; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: currentColor windowtext windowtext; padding: 0cm 5.4pt; width: 38.45pt;" rowspan="2" valign="top" width="51">
<p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt; line-height: normal;"><span style="color: white; font-family: 宋体; font-size: 10pt;" lang="ZH-CN">问题</span><span style="color: white; font-size: 10pt;">4</span></p>
</td>
<td style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: currentColor windowtext windowtext currentColor; padding: 0cm 5.4pt; width: 375.65pt;" valign="top" width="501">
<p class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 0pt; line-height: normal;"><span style="font-family: 宋体; font-size: 10pt;" lang="ZH-CN">问：如何发布</span><span style="font-size: 10pt;">UAP</span><span style="font-family: 宋体; font-size: 10pt;" lang="ZH-CN">的应用？</span></p>
</td>
</tr>
<tr>
<td style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: currentColor windowtext windowtext currentColor; padding: 0cm 5.4pt; width: 375.65pt;" valign="top" width="501">
<p class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 0pt; line-height: normal;"><span style="font-family: 宋体; font-size: 10pt;" lang="ZH-CN">答：使用</span><span style="font-size: 10pt;">VS</span><span style="font-family: 宋体; font-size: 10pt;" lang="ZH-CN">的</span><span style="font-size: 10pt;">Store</span><span style="font-family: 宋体; font-size: 10pt;" lang="ZH-CN">菜单下的商店功能</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoListParagraph" style="margin-left: 18pt;">&nbsp;</p>
<p class="MsoNormal"><span style="font-family: 宋体;" lang="ZH-CN">谢谢！</span></p>
<p class="MsoNormal" style="text-align: right;" align="right"><span style="font-family: 宋体;" lang="ZH-CN">梅颖广</span></p>
</div>]]></content:encoded>
    </item>
    <item>
      <title>MP3之痛 -- Cocos2dx 游戏移植到 WP8 之路</title>
      <link>https://docs.microsoft.com/archive/blogs/windows__windows_game_dev_faq_/mp3-cocos2dx-wp8</link>
      <pubDate>Wed, 10 Dec 2014 05:36:00 GMT</pubDate>
      <dc:creator><![CDATA[梅颖广]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/windows__windows_game_dev_faq_/2014/12/10/mp3-cocos2dx-wp8/</guid>
      <description><![CDATA[Cocos2dx 是目前最流行的手机游戏引擎之一，开源、轻量、多平台等的诸多特性使得它被很多国内外手游开发者所喜爱。利用Cocos2dx来开发Windows Phone...]]></description>
      <content:encoded><![CDATA[<p class="MsoNormal" style="text-align: left;" align="center"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Cocos2dx </span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">是目前最流行的手机游戏引擎之一，开源、轻量、多平台等的诸多特性使得它被很多国内外手游开发者所喜爱。利用</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Cocos2dx</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">来开发</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Windows Phone 8</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的游戏同样也是非常的方便高效。当然任何跨平台的游戏引擎，最终解决的都只能是游戏层面的问题：包括场景的管理、图形的渲染、真实物理世界的模拟等；要想真正在一个平台上把游戏做好，不可避免会遇到很多和平台相关的问题，需要我们每个游戏程序员对于该平台的技术有个比较深入的了解。在</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Windows Phone 8</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">这个平台上，我希望通过自己的努力帮助大家解决移植过程中遇到的问题。</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">这一次我们来聊聊</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">mp3</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">音乐播放的问题。在游戏中播放音乐，大家一般使用</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Cocos2dx</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">自带的</span><span class="SpellE"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">CocosDenshion</span></span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">音乐引擎。使用方法相当简单，步骤如下：</span></p>
<div class="WordSection1">
<ul>
<li>
<div class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">工程中加入</span><span class="SpellE"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">CocosDension</span></span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">引擎</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;"> (WP8</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的目录在</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">cocos2d\<span class="SpellE">cocos</span>\audio\proj.wp8)</span></div>
</li>
<li>
<div class="MsoNormal"><span class="SpellE"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">WinRT</span></span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">工程加入</span><span class="SpellE"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">CocosDension</span></span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的库引用</span></div>
</li>
<li>
<div class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">代码中加入必要的</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">H</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">文件和</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">namespace</span></div>
</li>
</ul>
</div>
<p class="MsoNormal" style="line-height: normal; padding-left: 60px; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">#include</span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">"<span class="SpellE">SimpleAudioEngine.h</span>"</span></p>
<p class="MsoNormal" style="padding-left: 60px;"><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: blue; background: white; mso-highlight: white;">using </span><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: blue; background: white; mso-highlight: white;">namespace </span><span class="SpellE"><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: #216f85; background: white; mso-highlight: white;">CocosDenshion</span></span><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: black; background: white; mso-highlight: white;">;</span></p>
<ul>
<li>
<div class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">播放</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">BGM</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的代码</span></div>
</li>
</ul>
<p class="MsoListParagraph" style="padding-left: 30px; margin-left: 0cm; mso-add-space: auto;"><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: #216f85; background: white; mso-highlight: white;">SimpleAudioEngine</span><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: black; background: white; mso-highlight: white;">::</span><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">sharedEngine</span><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: black; background: white; mso-highlight: white;">()-&gt;</span><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">playBackgroundMusic</span><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">"xxx"</span><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: black; background: white; mso-highlight: white;">, </span><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: blue; background: white; mso-highlight: white;">true</span><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: black; background: white; mso-highlight: white;">);</span></p>
<ul>
<li>
<div class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">播放</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">SE</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的代码</span></div>
</li>
</ul>
<p class="MsoListParagraphCxSpFirst" style="padding-left: 60px; margin-left: 0cm; mso-add-space: auto;"><span class="SpellE"><span style="font-size: 9.0pt; line-height: 107%; font-family: Consolas; mso-fareast-font-family: 'Times New Roman'; color: #2b91af;">SimpleAudioEngine</span></span><span style="font-size: 9.0pt; line-height: 107%; font-family: Consolas; mso-fareast-font-family: 'Times New Roman'; color: black;">::<span class="SpellE">sharedEngine</span>()-&gt;<span class="SpellE">preloadEffect</span>(</span><span style="font-size: 9.0pt; line-height: 107%; font-family: Consolas; mso-fareast-font-family: 'Times New Roman'; color: #a31515;">"xxx"</span><span style="font-size: 9.0pt; line-height: 107%; font-family: Consolas; mso-fareast-font-family: 'Times New Roman'; color: black;">);</span></p>
<p class="MsoListParagraphCxSpLast" style="padding-left: 60px; margin-left: 0cm; mso-add-space: auto;"><span class="SpellE"><span style="font-size: 9.0pt; line-height: 107%; font-family: Consolas; mso-fareast-font-family: 'Times New Roman'; color: #2b91af;">SimpleAudioEngine</span></span><span style="font-size: 9.0pt; line-height: 107%; font-family: Consolas; mso-fareast-font-family: 'Times New Roman'; color: black;">::<span class="SpellE">sharedEngine</span>()-&gt;<span class="SpellE">playEffect</span>(</span><span style="font-size: 9.0pt; line-height: 107%; font-family: Consolas; mso-fareast-font-family: 'Times New Roman'; color: #a31515;">"xxx"</span><span style="font-size: 9.0pt; line-height: 107%; font-family: Consolas; mso-fareast-font-family: 'Times New Roman'; color: black;">);<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 8.0pt; mso-bidi-font-size: 11.0pt; line-height: 107%; font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">(</span><span style="font-size: 8.0pt; mso-bidi-font-size: 11.0pt; line-height: 107%; font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">注</span><span style="font-size: 8.0pt; mso-bidi-font-size: 11.0pt; line-height: 107%; font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">1)</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">采用上述方法，我们可以很顺利地播放</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">wav</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">格式的音乐。但美中不足的是，因为版权的原因</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Windows Phone 8</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的平台上默认是不支持</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">mp3</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">格式音乐的播放的，所以</span><span class="SpellE"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">CocosDenshion</span></span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">音乐引擎在</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">WP8</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">平台上对</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">mp3</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">格式的文件做了屏蔽。做一下如下试验：我们在上述代码中，把</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">xxx</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">替换为</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">mp3</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">音乐文件名，比如&ldquo;</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">spacegame.mp3</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">&rdquo;，运行后抛出如下异常：</span></p>
<p class="MsoNormal">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/7762.image001.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/7762.image001.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/7762.image001.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/7762.image001.png" alt="" width="433" height="235" border="0" /></a></p>
<p class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">抛异常的语句为</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">mediaStreamer.cpp</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">文件的</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Initialize</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">函数：</span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; mso-layout-grid-align: none; text-autospace: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">ThrowIfFailed</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">ReadChunk</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><em><span style="font-size: 9.5pt; font-family: Consolas; color: #6f008a; background: white; mso-highlight: white;">MAKEFOURCC</span></em><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">'R'</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">, </span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">'I'</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">, </span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">'F'</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">, </span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">'F'</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">), </span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">chunkSize</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">, </span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">chunkPos</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">));</span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; mso-layout-grid-align: none; text-autospace: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">if</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> (*</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">reinterpret_cast</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">&lt;</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">const</span></span><em><span style="font-size: 9.5pt; font-family: Consolas; color: #216f85; background: white; mso-highlight: white;">DWORD</span></em><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> *&gt;(&amp;</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">dataPtr</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">[</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">chunkPos</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">]) != </span><em><span style="font-size: 9.5pt; font-family: Consolas; color: #6f008a; background: white; mso-highlight: white;">MAKEFOURCC</span></em><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">'W'</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">, </span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">'A'</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">, </span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">'V'</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">, </span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">'E'</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">)) </span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">ThrowIfFailed</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><em><span style="font-size: 9.5pt; font-family: Consolas; color: #6f008a; background: white; mso-highlight: white;">E_FAIL</span></em><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">);</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">从代码可以看出，</span><span class="SpellE"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">CocosDenshion</span></span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">一开始就对</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">mp3</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的文件进行了过滤，任何非</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">wav</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的文件都会直接抛出异常。</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">如何解决这个问题呢？方法有二个。第一个最简单，就是修改资源本身。我们把</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">mp3</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的格式转换为</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">wav</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">格式，网络上可以找到很多这样的工具。当然因为</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">wav</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">格式的文件体积比较大，所以这个方法不够完美。<span style="background: yellow; mso-highlight: yellow;">本文重点介绍第二个方法，也就是使用</span></span><span style="font-family: 'Verdana',sans-serif; background: yellow; mso-highlight: yellow;">lamb</span><span style="font-family: 宋体; mso-bidi-font-family: 宋体; background: yellow; mso-highlight: yellow;" lang="ZH-CN">库增加</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体; background: yellow; mso-highlight: yellow;">Windows Phone 8</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial; background: yellow; mso-highlight: yellow;" lang="ZH-CN">平台对于</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体; background: yellow; mso-highlight: yellow;">mp3</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial; background: yellow; mso-highlight: yellow;" lang="ZH-CN">的支持</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">。</span></p>
<p class="MsoNormal"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Lamb</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">是目前使用最广泛的</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">MP3</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">编码器，大家可以访问官网获取更多信息：</span></p>
<ul>
<li>
<div class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">链接地址：</span></div>
</li>
<li>
<div class="MsoNormal"><a href="http://lame.sourceforge.net/download.php">http://lame.sourceforge.net/download.php</a></div>
</li>
</ul>
<p class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">使用</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Lamb</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">所提供的解码模块，我们可以在</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">WP8</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">平台上实现</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">mp3</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">格式音乐的播放。我在这里借用一个网络上开源的代码：</span></p>
<ul>
<li>
<div class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">链接地址：</span></div>
</li>
<li>
<div class="MsoNormal"><a href="https://github.com/tianjing/lame_wp8"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">https://github.com/tianjing/lame_wp8</span></a></div>
</li>
</ul>
<p class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">下载源码后，我们需要用到</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">libmp3lame, <span class="SpellE">libmpghip</span>, <span class="SpellE">src</span></span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">这三个目录夹下的代码。（我已上传代码供大家使用）大家可以把这三块代码拷贝至</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Cocos2dx</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">proj.wp8-xaml</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">目录夹下。然后在工程中加入</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">libmp3lame</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">和</span><span class="SpellE"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">libmpghip</span></span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">这二个项目。</span></p>
<table class="MsoTableGrid" style="border: currentColor; border-collapse: collapse; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 1184; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes;">
<td style="padding: 0cm 5.4pt; border: 1pt solid windowtext; width: 215.75pt; mso-border-alt: solid windowtext .5pt;" valign="top" width="288">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/6114.image002.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/6114.image002.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/6114.image002.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/6114.image002.png" alt="" width="152" height="166" border="0" /></a></td>
<td style="border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: windowtext windowtext windowtext currentColor; padding: 0cm 5.4pt; width: 215.75pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt;" valign="top" width="288">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/7558.image003.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/7558.image003.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/7558.image003.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/7558.image003.png" alt="" width="275" height="246" border="0" /></a></td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">然后按下述步骤：</span></p>
<p class="MsoListParagraphCxSpFirst" style="margin-left: 18.0pt; mso-add-space: auto; text-indent: -18.0pt; mso-list: l10 level1 lfo20;"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: Arial;"><span style="mso-list: Ignore;">1.<span style="font: 7.0pt 'Times New Roman';">&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">编译工程，生成</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">libmp3lame.lib, libmpghip.lib</span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 18.0pt; mso-add-space: auto; text-indent: -18.0pt; mso-list: l10 level1 lfo20;"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: Arial;"><span style="mso-list: Ignore;">2.<span style="font: 7.0pt 'Times New Roman';">&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">在</span><span class="SpellE"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">WinRT</span></span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">工程中，加入</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">libmp3lame, <span class="SpellE">libmpghip</span></span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的库引用</span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 18pt; mso-add-space: auto;"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/5670.image004.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/5670.image004.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/5670.image004.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/5670.image004.png" alt="" border="0" /></a></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 18.0pt; mso-add-space: auto; text-indent: -18.0pt; mso-list: l10 level1 lfo20;"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: Arial;"><span style="mso-list: Ignore;">3.<span style="font: 7.0pt 'Times New Roman';">&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">为了引用方便，把</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">proj.wp8-xaml\<span class="SpellE">src</span>\include</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">目录下的</span><span class="SpellE"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">lame.h</span></span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">文件拷贝到</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">cocos2d\<span class="SpellE">cocos</span>\audio\Include\</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">目录下</span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 18.0pt; mso-add-space: auto; text-indent: -18.0pt; mso-list: l10 level1 lfo20;"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: Arial;"><span style="mso-list: Ignore;">4.<span style="font: 7.0pt 'Times New Roman';">&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">在</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">cocos2d\<span class="SpellE">cocos</span>\audio\wp8\mediaStreamer.cpp</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">文件的增加头文件引用</span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin-left: 18.0pt; mso-add-space: auto;"><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: blue; background: white; mso-highlight: white;">#include</span><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">"lame.h"</span></p>
<p class="MsoListParagraphCxSpLast" style="margin-left: 18.0pt; mso-add-space: auto; text-indent: -18.0pt; mso-list: l10 level1 lfo20;"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: Arial;"><span style="mso-list: Ignore;">5.<span style="font: 7.0pt 'Times New Roman';">&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">在</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">cocos2d\<span class="SpellE">cocos</span>\audio\wp8\mediaStreamer.cpp</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">文件的增加</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Initialize_MP3()</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">函数，用来初始化</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">mp3</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">文件。源码如下：</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">void </span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: #216f85; background: white; mso-highlight: white;">MediaStreamer</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">::</span><span style="font-size: 9.5pt; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">Initialize_MP3</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><em><span style="font-size: 9.5pt; font-family: Consolas; color: #6f008a; background: white; mso-highlight: white;">__in</span></em><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">const</span></span><em><span style="font-size: 9.5pt; font-family: Consolas; color: #216f85; background: white; mso-highlight: white;">WCHAR</span></em><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">* </span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">url</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">)</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">{</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">#if</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> 1</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><em><span style="font-size: 9.5pt; font-family: Consolas; color: #216f85; background: white; mso-highlight: white;">WCHAR </span></em><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">filePath</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">[</span><em><span style="font-size: 9.5pt; font-family: Consolas; color: #6f008a; background: white; mso-highlight: white;">MAX_PATH</span></em><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">] = { 0 };</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">if</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> ((</span><span class="SpellE"><em><span style="font-size: 9.5pt; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">wcslen</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">url</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">) &gt; 1 &amp;&amp; </span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">url</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">[1] == </span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">':'</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">))</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span>{</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 2;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: green; background: white; mso-highlight: white;">// path start with "x:", is absolute path</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 2;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span class="SpellE"><em><span style="font-size: 9.5pt; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">wcscat_s</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">filePath</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">, </span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">url</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">);</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span>}</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">else</span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">if</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> (</span><span class="SpellE"><em><span style="font-size: 9.5pt; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">wcslen</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">url</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">) &gt; 0</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 2;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&amp;&amp; (L</span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">'/'</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> == </span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">url</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">[0] || L</span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">'\\'</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> == </span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">url</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">[0]))</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span>{</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 2;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: green; background: white; mso-highlight: white;">// path start with '/' or '\', is absolute path without driver name</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 2;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span class="SpellE"><em><span style="font-size: 9.5pt; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">wcscat_s</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">filePath</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">, </span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">m_locationPath</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">-&gt;</span><span style="font-size: 9.5pt; font-family: Consolas; color: #216f85; background: white; mso-highlight: white;">Data</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">());</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 2;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: green; background: white; mso-highlight: white;">// remove '/' or '\\'</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 2;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span class="SpellE"><em><span style="font-size: 9.5pt; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">wcscat_s</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">filePath</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">, (</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">const </span></span><em><span style="font-size: 9.5pt; font-family: Consolas; color: #216f85; background: white; mso-highlight: white;">WCHAR</span></em><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">*)</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">url</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">[1]);</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span>}</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">else</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span>{</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 2;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span class="SpellE"><em><span style="font-size: 9.5pt; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">wcscat_s</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">filePath</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">, </span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">m_locationPath</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">-&gt;</span><span style="font-size: 9.5pt; font-family: Consolas; color: #216f85; background: white; mso-highlight: white;">Data</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">());</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 2;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span class="SpellE"><em><span style="font-size: 9.5pt; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">wcscat_s</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">filePath</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">, </span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">url</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">);</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span>}</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">&nbsp;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">&nbsp;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: #216f85; background: white; mso-highlight: white;">hip_t </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">hip</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> = </span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">hip_decode_init</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">();</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">if</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> (!</span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">hip</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">)</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span>{</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span><span style="mso-tab-count: 1;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: #6f008a; background: white; mso-highlight: white;">printf</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">"</span><span style="font-size: 9.5pt; font-family: 宋体; mso-ascii-font-family: Consolas; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Consolas; mso-bidi-font-family: Consolas; color: #a31515; background: white; mso-highlight: white;" lang="ZH-CN">创建</span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">mp3</span><span style="font-size: 9.5pt; font-family: 宋体; mso-ascii-font-family: Consolas; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Consolas; mso-bidi-font-family: Consolas; color: #a31515; background: white; mso-highlight: white;" lang="ZH-CN">解码失败</span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">);</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 2;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">return</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span>}</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">&nbsp;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: #216f85; background: white; mso-highlight: white;">mp3data_struct </span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">mp3str</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">;</span><span style="font-size: 9.5pt; font-family: Consolas; color: green; background: white; mso-highlight: white;">//mp3</span><span style="font-size: 9.5pt; font-family: 宋体; mso-ascii-font-family: Consolas; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Consolas; mso-bidi-font-family: Consolas; color: green; background: white; mso-highlight: white;" lang="ZH-CN">文件编码信息</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span class="SpellE"><em><span style="font-size: 9.5pt; font-family: Consolas; color: #216f85; background: white; mso-highlight: white;">std</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">::</span><em><span style="font-size: 9.5pt; font-family: Consolas; color: #216f85; background: white; mso-highlight: white;">vector</span></em><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">&lt;</span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">short</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">*&gt; </span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">mp3Buffer</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">;</span><span style="font-size: 9.5pt; font-family: Consolas; color: green; background: white; mso-highlight: white;">// mp3</span><span style="font-size: 9.5pt; font-family: 宋体; mso-ascii-font-family: Consolas; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Consolas; mso-bidi-font-family: Consolas; color: green; background: white; mso-highlight: white;" lang="ZH-CN">数据流</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span class="SpellE"><em><span style="font-size: 9.5pt; font-family: Consolas; color: #216f85; background: white; mso-highlight: white;">std</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">::</span><em><span style="font-size: 9.5pt; font-family: Consolas; color: #216f85; background: white; mso-highlight: white;">vector</span></em><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">&lt;</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">int</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">&gt; </span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">mp3BufferSize</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">&nbsp;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">int </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">samples</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">int </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">mp3_bytes</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">int </span></span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">write_bytes</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> = 0;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">&nbsp;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">const </span></span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">int </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">BUF_SIZE</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> = 512;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">const </span></span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">int </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">INBUF_SIZE</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> = 4096;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">const </span></span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">int </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">MP3BUF_SIZE</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> = (</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">int</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">)(1.25 * </span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">BUF_SIZE</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">) + 7200;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">&nbsp;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">short </span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">pcm_l</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">[</span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">INBUF_SIZE</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">];</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">short </span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">pcm_r</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">[</span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">INBUF_SIZE</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">];</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">unsigned </span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">char </span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">mp3_buf</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">[</span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">MP3BUF_SIZE</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">];</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">&nbsp;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><em><span style="font-size: 9.5pt; font-family: Consolas; color: #216f85; background: white; mso-highlight: white;">FILE</span></em><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> * </span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">MP3File</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">&nbsp;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">&nbsp;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span class="SpellE"><em><span style="font-size: 9.5pt; font-family: Consolas; color: #216f85; background: white; mso-highlight: white;">std</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">::</span><span class="SpellE"><em><span style="font-size: 9.5pt; font-family: Consolas; color: #216f85; background: white; mso-highlight: white;">wstring </span></em></span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">wstr</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> = </span><span class="SpellE"><em><span style="font-size: 9.5pt; font-family: Consolas; color: #216f85; background: white; mso-highlight: white;">std</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">::</span><span class="SpellE"><em><span style="font-size: 9.5pt; font-family: Consolas; color: #216f85; background: white; mso-highlight: white;">wstring</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">filePath</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">);</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">&nbsp;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span class="SpellE"><em><span style="font-size: 9.5pt; font-family: Consolas; color: #216f85; background: white; mso-highlight: white;">std</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">::</span><em><span style="font-size: 9.5pt; font-family: Consolas; color: #216f85; background: white; mso-highlight: white;">string </span></em><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">str_filePath</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> = </span><span class="SpellE"><em><span style="font-size: 9.5pt; font-family: Consolas; color: #216f85; background: white; mso-highlight: white;">std</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">::</span><em><span style="font-size: 9.5pt; font-family: Consolas; color: #216f85; background: white; mso-highlight: white;">string</span></em><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">wstr</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">.</span><em><span style="font-size: 9.5pt; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">begin</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(), </span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">wstr</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">.</span><em><span style="font-size: 9.5pt; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">end</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">());</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">&nbsp;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">&nbsp;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">auto </span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">error</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> = </span><span class="SpellE"><em><span style="font-size: 9.5pt; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">fopen_s</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(&amp;</span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">MP3File</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">, </span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">str_filePath</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">.</span><em><span style="font-size: 9.5pt; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">c_str</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(), </span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">"<span class="SpellE">rb</span>"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">);</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: #216f85; background: white; mso-highlight: white;">mp3data_struct </span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">mp3Header</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">&nbsp;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">while</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> ((</span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">mp3_bytes</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> = </span><span class="SpellE"><em><span style="font-size: 9.5pt; font-family: Consolas; color: #6f008a; background: white; mso-highlight: white;">fread</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">mp3_buf</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">, 1, 210, </span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">MP3File</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">)) &gt; 0)</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span>{</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 2;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">samples</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> = </span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">hip_decode_headers</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">hip</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">, </span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">mp3_buf</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">, 210, </span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">pcm_l</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">, </span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">pcm_r</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">, &amp;</span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">mp3Header</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">);</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 2;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">if</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> (</span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">samples</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> &gt; 0)</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 2;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">short</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> *</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">tt</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> = </span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">new </span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">short</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">[</span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">samples</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">*</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">sizeof</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">short</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">)];</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: #6f008a; background: white; mso-highlight: white;">memcpy</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">((</span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">void</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">*)</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">tt</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">, (</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">const </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">void</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">*)</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">pcm_l</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">, </span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">samples</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">*</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">sizeof</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">short</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">));</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">mp3Buffer</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">.</span><em><span style="font-size: 9.5pt; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">push_back</span></em><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">tt</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">);</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">write_bytes</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> += </span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">samples</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">*</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">sizeof</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">short</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">);</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">mp3BufferSize</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">.</span><em><span style="font-size: 9.5pt; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">push_back</span></em><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">samples</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">*</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">sizeof</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">short</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">));</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span><span style="mso-tab-count: 1;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span>}</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">&nbsp;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">&nbsp;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><em><span style="font-size: 9.5pt; font-family: Consolas; color: #216f85; background: white; mso-highlight: white;">byte</span></em><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">* </span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">_mp3Buffer</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> = </span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">new </span><em><span style="font-size: 9.5pt; font-family: Consolas; color: #216f85; background: white; mso-highlight: white;">byte</span></em><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">[</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">write_bytes</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">];</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><em><span style="font-size: 9.5pt; font-family: Consolas; color: #216f85; background: white; mso-highlight: white;">byte</span></em><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">* </span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">temp</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> = </span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">_mp3Buffer</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">int </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">size</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> = </span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">mp3BufferSize</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">.</span><em><span style="font-size: 9.5pt; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">size</span></em><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">();</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">for</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> (</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">int </span></span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">i</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> = 0; </span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">i</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> &lt; </span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">size</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">; </span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">i</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">++)</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span>{</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 2;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: #6f008a; background: white; mso-highlight: white;">memcpy</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">temp</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">, </span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">mp3Buffer</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">[</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">i</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">], </span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">mp3BufferSize</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">[</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">i</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">]);</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 2;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">delete </span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">mp3Buffer</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">[</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">i</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">];</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 2;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">temp</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> += </span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">mp3BufferSize</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">[</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">i</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">];</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span>}</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">mp3Buffer</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">.</span><em><span style="font-size: 9.5pt; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">clear</span></em><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">();</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">hip_decode_exit</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">hip</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">);</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">&nbsp;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">m_data</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">.</span><span style="font-size: 9.5pt; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">resize</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">write_bytes</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">);</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">for</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> (</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">int</span></span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">i</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> = 0; </span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">i</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> &lt; </span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">write_bytes</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">; </span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">i</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">++)</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span>{</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 2;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">m_data</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">[</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">i</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">] = </span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">_mp3Buffer</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">[</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">i</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">];</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span>}</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">&nbsp;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span class="SpellE"><em><span style="font-size: 9.5pt; font-family: Consolas; color: #6f008a; background: white; mso-highlight: white;">fclose</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">MP3File</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">);</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">&nbsp;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">m_waveFormat</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">.</span><em><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">wFormatTag</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> = </span><em><span style="font-size: 9.5pt; font-family: Consolas; color: #6f008a; background: white; mso-highlight: white;">WAVE_FORMAT_PCM</span></em><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">; </span><span style="font-size: 9.5pt; font-family: Consolas; color: green; background: white; mso-highlight: white;">//</span><span style="font-size: 9.5pt; font-family: 宋体; mso-ascii-font-family: Consolas; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Consolas; mso-bidi-font-family: Consolas; color: green; background: white; mso-highlight: white;" lang="ZH-CN">固定</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">m_waveFormat</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">.</span><em><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">nChannels</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> = 1; </span><span style="font-size: 9.5pt; font-family: Consolas; color: green; background: white; mso-highlight: white;">//</span><span style="font-size: 9.5pt; font-family: 宋体; mso-ascii-font-family: Consolas; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Consolas; mso-bidi-font-family: Consolas; color: green; background: white; mso-highlight: white;" lang="ZH-CN">固定</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">m_waveFormat</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">.</span><em><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">nSamplesPerSec</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> = (</span><em><span style="font-size: 9.5pt; font-family: Consolas; color: #216f85; background: white; mso-highlight: white;">DWORD</span></em><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">)</span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">mp3Header</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">.</span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">samplerate</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">;</span><span style="font-size: 9.5pt; font-family: Consolas; color: green; background: white; mso-highlight: white;">// </span><span style="font-size: 9.5pt; font-family: 宋体; mso-ascii-font-family: Consolas; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Consolas; mso-bidi-font-family: Consolas; color: green; background: white; mso-highlight: white;" lang="ZH-CN">固定</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">&nbsp;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">m_waveFormat</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">.</span><em><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">wBitsPerSample</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> = 16;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">m_waveFormat</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">.</span><em><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">nBlockAlign</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> = </span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">m_waveFormat</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">.</span><em><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">nChannels</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> * </span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">m_waveFormat</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">.</span><em><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">wBitsPerSample</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> / 8.0;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">m_waveFormat</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">.</span><em><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">nAvgBytesPerSec</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> = </span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">m_waveFormat</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">.</span><em><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">nSamplesPerSec</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> * </span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">m_waveFormat</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">.</span><em><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">nBlockAlign</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">; </span><span style="font-size: 9.5pt; font-family: Consolas; color: green; background: white; mso-highlight: white;">//</span><span style="font-size: 9.5pt; font-family: 宋体; mso-ascii-font-family: Consolas; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Consolas; mso-bidi-font-family: Consolas; color: green; background: white; mso-highlight: white;" lang="ZH-CN">越大越快</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">m_waveFormat</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">.</span><em><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">cbSize</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> = 0;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">#<span class="SpellE">endif</span></span></p>
<p class="MsoNormal" style="padding-left: 30px;"><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: black; background: white; mso-highlight: white;">}</span></p>
<p class="MsoNormal" style="padding-left: 30px;">&nbsp;</p>
<p class="MsoListParagraph" style="text-indent: -18pt; margin-left: 18pt; mso-list: l10 level1 lfo20; mso-add-space: auto;"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: Arial;"><span style="mso-list: Ignore;">6.<span style="font: 7.0pt 'Times New Roman';">&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">在</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">\cocos2d\<span class="SpellE">cocos</span>\audio\wp8\Audio.cpp</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">文件中，修改</span><span class="SpellE"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">PreloadSoundEffect</span></span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">函数。把原来简单的&ldquo;</span><span class="SpellE"><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: navy; background: white; mso-highlight: white;">mediaStreamer</span><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: black; background: white; mso-highlight: white;">.</span><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">Initialize</span></span><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">CCUtf8ToUnicode</span><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span class="SpellE"><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: navy; background: white; mso-highlight: white;">pszFilePath</span></span><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: black; background: white; mso-highlight: white;">).</span><span class="SpellE"><em><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">c_str</span></em></span><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: black; background: white; mso-highlight: white;">());</span><span style="font-size: 9.5pt; line-height: 107%; font-family: 宋体; mso-ascii-font-family: Consolas; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Consolas; mso-bidi-font-family: Consolas; color: black; background: white; mso-highlight: white;" lang="ZH-CN">&rdquo;</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">语句用如下代码替换，目的是根源不同的音乐格式文件调用相应的初始化函数：</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">if</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> (</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">m_engineExperiencedCriticalError</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">) {</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">return</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">}</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">&nbsp;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span class="SpellE"><em><span style="font-size: 9.5pt; font-family: Consolas; color: #216f85; background: white; mso-highlight: white;">std</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">::</span><em><span style="font-size: 9.5pt; font-family: Consolas; color: #216f85; background: white; mso-highlight: white;">string </span></em><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">path</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">pszFilePath</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">);</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">&nbsp;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">int </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">sound</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> = </span><span style="font-size: 9.5pt; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">Hash</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">pszFilePath</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">);</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">&nbsp;</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: green; background: white; mso-highlight: white;">// no MP3 support for CC_PLATFORM_WP8</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span class="SpellE"><em><span style="font-size: 9.5pt; font-family: Consolas; color: #216f85; background: white; mso-highlight: white;">std</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">::</span><em><span style="font-size: 9.5pt; font-family: Consolas; color: #216f85; background: white; mso-highlight: white;">string</span></em><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">::</span><span class="SpellE"><em><span style="font-size: 9.5pt; font-family: Consolas; color: #216f85; background: white; mso-highlight: white;">size_type </span></em></span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">pos</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> = </span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">path</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">.</span><em><span style="font-size: 9.5pt; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">find</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">".mp3"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">);</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">if</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> (</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">pos</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> != </span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">path</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">.</span><em><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">npos</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">)</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">{</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">mediaStreamer</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">.</span><span style="font-size: 9.5pt; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">Initialize_MP3</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span style="font-size: 9.5pt; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">CCUtf8ToUnicode</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">pszFilePath</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">).</span><em><span style="font-size: 9.5pt; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">c_str</span></em><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">());</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">}</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">else</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">{<span style="mso-tab-count: 3;">&nbsp;&nbsp;</span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; line-height: normal; padding-left: 30px; mso-layout-grid-align: none;"><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">&nbsp;&nbsp; mediaStreamer</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">.</span><span style="font-size: 9.5pt; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">Initialize</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span style="font-size: 9.5pt; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">CCUtf8ToUnicode</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">(</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: navy; background: white; mso-highlight: white;">pszFilePath</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">).</span><span class="SpellE"><em><span style="font-size: 9.5pt; font-family: Consolas; color: #880000; background: white; mso-highlight: white;">c_str</span></em></span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">());</span></p>
<p class="MsoNormal" style="padding-left: 30px; margin-left: 18pt;"><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: black; background: white; mso-highlight: white;">}</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">至此大功告成，现在整个工程可以使用</span><span class="SpellE"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">CocosDension</span></span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">顺利播放</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">mp3</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">音乐了。由此大家可以看到，这是一种非常好的方案，只需要做很少的代码修改，就实现了</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">WP8</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">平台对于</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">mp3</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">音乐的支持。推荐给大家的同时，也希望大家可以照此继续开发出对于</span><span class="SpellE"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">ogg</span></span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">等更多音乐格式的支持的方案。关于这边博文，我借鉴了如下网站的内容。</span></p>
<ul>
<li>
<div class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">链接地址：</span></div>
</li>
<li>
<div class="MsoNormal"><a href="http://www.cnblogs.com/bader/archive/2013/01/25/2876881.html"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">http://www.cnblogs.com/bader/archive/2013/01/25/2876881.html</span></a></div>
</li>
</ul>
<p class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">最后，我默认各位读者对于</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Cocos2dx</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">已是非常的熟悉。如果大家对于</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Cocos2dx</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">引擎本身或如何在</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">WP8</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">上建立</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Cocos2dx</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">开发环境不清楚的话，推荐大家去观看我在微软虚拟在线课堂上的免费课程。</span></p>
<ul>
<li>
<div class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">链接地址：</span></div>
</li>
<li>
<div class="MsoNormal"><a href="http://www.microsoftvirtualacademy.com/training-courses/854"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">http://www.microsoftvirtualacademy.com/training-courses/854</span></a></div>
</li>
</ul>
<p class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">谢谢！</span></p>
<p class="MsoNormal" style="text-align: right;" align="right"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">梅颖广</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 11.0pt; line-height: 107%; font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">注</span><span style="font-size: 9.0pt; mso-bidi-font-size: 11.0pt; line-height: 107%; font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">1</span><span style="font-size: 9.0pt; mso-bidi-font-size: 11.0pt; line-height: 107%; font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">：</span><span style="font-size: 9.0pt; mso-bidi-font-size: 11.0pt; line-height: 107%; font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">xxx</span><span style="font-size: 9.0pt; mso-bidi-font-size: 11.0pt; line-height: 107%; font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">表示音乐文件名</span></p>
<p class="MsoNormal"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">&nbsp;</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/10/57/97/00/lame.7z" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-57-97-00/lame.7z">lame.7z</a></p>]]></content:encoded>
    </item>
    <item>
      <title>轻松将HTML5 游戏迁移为Universal App 商店应用 （H5拓展为Windows Native 应用）</title>
      <link>https://docs.microsoft.com/archive/blogs/windows__windows_game_dev_faq_/html5-universal-app-h5windows-native</link>
      <pubDate>Wed, 10 Dec 2014 03:25:01 GMT</pubDate>
      <dc:creator><![CDATA[Leon Liang_MS]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/windows__windows_game_dev_faq_/2014/12/10/html5-universal-app-h5windows-native/</guid>
      <description><![CDATA[&#160;  随着HTML5 游戏快速流行和发展，很多HTML5 游戏开发者并不满足HTML5 游戏在微信和轻应用平台上的成功。迫切希望将游戏变为Native 应用发布的应用商店里。...]]></description>
      <content:encoded><![CDATA[<p>&#160;</p>  <p><font size="3">随着HTML5 游戏快速流行和发展，很多HTML5 游戏开发者并不满足HTML5 游戏在微信和轻应用平台上的成功。迫切希望将游戏变为Native 应用发布的应用商店里。 目前流行的做法是 </font></p>  <ol>   <li><font size="3">使用游戏引擎（Cocos2D-X， Unity3D）重新开发游戏</font> </li>    <li><font size="3">搭建一个极其简单应用框架，使用Webview 加载游戏。 </font></li> </ol>  <p><font size="3">第一种方法，显而易见，虽然充分利用native 应用特点使用了Offline 的功能，但是需要重新开发。又要学习新的引擎和开发语言，痛苦之处，不言而喻。 </font></p>  <p><font size="3">第二种方法，虽然简单，但是仍然无法逃避H5 非常依赖流量和网络状态的弊端。此外，有些应用商店都会拒绝这类应用的发布。 </font></p>  <p><font size="3">那么，HTML5 游戏开发者的福音来了。 是时候将你的H5 游戏轻松变为真正的 Windows Universal Apps 发布到Windows 和 Windows Phone 商店了。 这样我们就可以方便地支持Windows PC，平板，手机了。 </font></p>  <p><font size="3">下面我就揭晓这个过程。 </font></p>  <p><font size="3">首先，如果你还不了解什么是Windows和Windows Phone 商店应用，请参考 </font></p>  <p><a title="http://msdn.microsoft.com/library/windows/apps/dn726767.aspx" href="http://msdn.microsoft.com/library/windows/apps/dn726767.aspx"><font size="3">http://msdn.microsoft.com/library/windows/apps/dn726767.aspx</font></a></p>  <p><font size="3">如果你打算发布应用，请注册开发者账户。 </font></p>  <p><font size="3">然后，请下载开发工具 <a title="http://dev.windows.com/zh-cn/develop/downloads" href="http://dev.windows.com/zh-cn/develop/downloads">http://dev.windows.com/zh-cn/develop/downloads</a>&#160;</font></p>  <p><font size="3">如果你还不了解什么是Windows Universal App, 请参考 </font><a href="http://dev.windows.com/zh-cn/develop/Building-universal-Windows-apps"><font size="3">http://dev.windows.com/zh-cn/develop/Building-universal-Windows-apps</font></a></p>  <p><strong><font color="#ff0000"><font size="3">请注意：在将你的H5 游戏迁移到Universal App 之前，请一定确保你的游戏在IE11 上没有任何的兼容性问题。 如果你没有IE11，可以使用 </font><a href="http://modern.ie/"><font size="3">http://modern.ie</font></a><font size="3"> (下载Browser Stack 和其他 free VMs).</font></font></strong></p>  <p><font size="3">那么，我们来举个例子： </font></p>  <p><font size="3">我们有一个H5 的游戏&#160; </font><a href="https://aka.ms/platformer"><font size="3">https://aka.ms/platformer</font></a>&#160;<font size="3">可以下载源码 <a href="http://david.blob.core.windows.net/html5platformer/PlatformerTouch.zip">PlatformerTouch.zip</a> 进行参考。 </font></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/metablogapi/3187.image_5FF1286D.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90-metablogapi/3187.image_5F00_5FF1286D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/metablogapi/5611.image_thumb_2A1154B5.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90-metablogapi/5611.image_5F00_thumb_5F00_2A1154B5.png" width="460" height="338" /></a> </p>  <p></p>  <p><font size="3">第一步： 创建一个新的Universal Apps 工程</font></p>  <p><font size="3">启动VS2013 创建一个新工程 “Other Languages”-&gt;”JavaScript”-&gt;”Store Apps”-&gt;”Universal Apps” -&gt; “Blank App (Universal Apps)” </font></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/metablogapi/4064.clip_image001_4F9D62C7.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90-metablogapi/4064.clip_5F00_image001_5F00_4F9D62C7.jpg"><img title="clip_image001" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="clip_image001" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/metablogapi/4118.clip_image001_thumb_3871E849.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90-metablogapi/4118.clip_5F00_image001_5F00_thumb_5F00_3871E849.jpg" width="484" height="122" /></a></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/metablogapi/8750.clip_image0015_084A9D86.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90-metablogapi/8750.clip_5F00_image0015_5F00_084A9D86.jpg"><img title="clip_image001[5]" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="clip_image001[5]" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/metablogapi/1667.clip_image0015_thumb_379C1310.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90-metablogapi/1667.clip_5F00_image0015_5F00_thumb_5F00_379C1310.jpg" width="663" height="460" /></a></p>  <p></p>  <p><font size="3">你可以看到Solution里有三个工程目录： 两个特定为WP8.1 和 Windows 8.1， 还有一个Shared 工程 </font></p>  <p><font size="3">默认的时候，在shared 目录里只有一个“default.js” ，在WP8.1 和 Windows 8.1 里有CSS/image/HTML。 有两个default.html 是因为WinJS 版本不同。 在Windows 8.1 WinJS2.0 脚本和CSS 文件将会加载。在Windows phone 8.1 上 WinJS2.1脚本将会加载。 关于WinJS， 可以参考</font><a href="https://dev.windows.com/zh-cn/develop/winjs/" target="_blank"><font size="3">WinJS 开源项目和Windows 商店应用开发介绍</font></a></p>  <p><font size="3">在我们的例子里，不会使用到WinJS 的接口，所以，我们可以使用同样的HTML页面，同样的CSS，同样的JavaScript 代码。 所以我们可以将在”.Windows”和“.Windows Phone” 里的default.html 文件删掉。</font></p> <a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/metablogapi/8228.clip_image0017_4DF1B855.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90-metablogapi/8228.clip_5F00_image0017_5F00_4DF1B855.jpg"><img title="clip_image001[7]" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="clip_image001[7]" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/metablogapi/3386.clip_image0017_thumb_396EF988.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90-metablogapi/3386.clip_5F00_image0017_5F00_thumb_5F00_396EF988.jpg" width="425" height="341" /></a>  <p><font size="3">第二步： 将代码复制到Shared 目录下</font></p>  <p><font size="3">解压缩PlatformTouch 的源码，拷贝所有的文件到”.Shared”项目里。 </font></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/metablogapi/3323.clip_image0019_620D658F.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90-metablogapi/3323.clip_5F00_image0019_5F00_620D658F.jpg"><img title="clip_image001[9]" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="clip_image001[9]" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/metablogapi/0844.clip_image0019_thumb_78630AD4.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90-metablogapi/0844.clip_5F00_image0019_5F00_thumb_5F00_78630AD4.jpg" width="758" height="338" /></a></p>  <p><font size="3">Ok，万事具备，让我们运行一下试试。确认一下Windows 8.1 已设置成默认启动项目，然后按‘F5’&#160; 可以看到，Windows 商店应用已经OK了。完全本地offline 的功能。如果你是触屏的设备，可以直接touch 体验</font></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/metablogapi/8371.image_3CA602D2.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90-metablogapi/8371.image_5F00_3CA602D2.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/metablogapi/3312.image_thumb_202E3254.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90-metablogapi/3312.image_5F00_thumb_5F00_202E3254.png" width="637" height="391" /></a> </p>  <p><font size="3">Ok，既然是Universal App， 让我们看看Windows Phone 上的表现了。 </font></p>  <p><font size="3">鼠标右键点击 “.WindowsPhone”工程， 选择“<i>Set as StartUp Project</i>”.&#160; 选择模拟器或者真机， 这里我们选择模拟器 “<i>Emulator 8.1 WVGA 4 inch 512MB</i>” 。下面我们同样按“F5”</font> </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/metablogapi/7870.image_7C97255D.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90-metablogapi/7870.image_5F00_7C97255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/metablogapi/8358.image_thumb_2052DDA9.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90-metablogapi/8358.image_5F00_thumb_5F00_2052DDA9.png" width="257" height="428" /></a> <a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/metablogapi/3157.image_4D6A5B28.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90-metablogapi/3157.image_5F00_4D6A5B28.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/metablogapi/1803.image_thumb_0E2EC23C.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90-metablogapi/1803.image_5F00_thumb_5F00_0E2EC23C.png" width="522" height="276" /></a> </p>  <p><font size="3">是的，恭喜你，Windows phone 商店应用也OK啦。 而且也是支持offline ，没有loading......的苦恼。完全触屏体验。 不过，我们发现，用户必须自己去转手机，来调整横屏模式。可否在游戏启动的时候，就是横屏模式 ？ </font></p>  <p><font size="3">当然没问题。这里就发挥了”.WindowsPhone” 工程目录的功能了。 我们的共享逻辑代码可以放在.Shared 目录里，那么我们针对不同Windows 设备的差异化调整，就可以放在不同的项目里了。 </font></p>  <p><font size="3">那么，我们打开WindowsPhone工程里的appxmanifest</font> </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/metablogapi/5852.image_1001A8B4.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90-metablogapi/5852.image_5F00_1001A8B4.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/metablogapi/1614.image_thumb_140E8737.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90-metablogapi/1614.image_5F00_thumb_5F00_140E8737.png" width="845" height="456" /></a> </p>  <p></p>  <p>我们可以看到在Application选择里，我们可以调整Rotation。 那么选择成Landscape </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/metablogapi/1641.image_25EDABB5.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90-metablogapi/1641.image_5F00_25EDABB5.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/metablogapi/2677.image_thumb_553F213F.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90-metablogapi/2677.image_5F00_thumb_5F00_553F213F.png" width="510" height="295" /></a> </p>  <p><font size="3">是的，你会惊喜地发现，还可以调整很多属性。包括，Logo 图标，Splash Screen (启动时的欢迎页面）等等。 是时候个性化你商店应用了。 </font></p>  <p><font size="3">调整完了后，我们发现有启动页面和Landscape 效果</font></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/metablogapi/2538.image_6B94C684.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90-metablogapi/2538.image_5F00_6B94C684.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/metablogapi/1325.image_thumb_118D078C.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90-metablogapi/1325.image_5F00_thumb_5F00_118D078C.png" width="266" height="421" /></a> </p>  <p><font size="3">通过WinJS， 你还可以增加更多的个性化Native 应用功能。比如Live Tiles （动态磁贴），推送，使用Camera 等。请参考 </font><a title="http://msdn.microsoft.com/library/windows/apps/br229565.aspx/" href="http://msdn.microsoft.com/library/windows/apps/br229565.aspx/"><font size="3">http://msdn.microsoft.com/library/windows/apps/br229565.aspx/</font></a></p>  <p><a href="https://dev.windows.com/zh-cn/publish" target="_blank"><font size="3">如何发布你的应用</font></a></p>  <p><strong><font size="3">尝试一下，让你的HTML5 游戏也能轻松变为Windows Universal App， 支持PC， 平板，手机等设备。 通过应用商店，让你的游戏用户更多。 你还可以选择应用内支付，广告，游戏销售等商店功能，帮助你盈利！</font></strong></p>]]></content:encoded>
    </item>
    <item>
      <title>HTML5 开发新机遇活动总结！</title>
      <link>https://docs.microsoft.com/archive/blogs/windows__windows_game_dev_faq_/html5</link>
      <pubDate>Sun, 07 Dec 2014 22:38:00 GMT</pubDate>
      <dc:creator><![CDATA[Elissa Tong]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/windows__windows_game_dev_faq_/2014/12/07/html5/</guid>
      <description><![CDATA[在12月6日早上9：30到下午4：30，微软DX部门举办了《HTML5 开发新机遇》。这个活动准们为微软的网技术做了一系列的介绍。题目包含了：

移植 Web 应用到 Universal...]]></description>
      <content:encoded><![CDATA[<p>在12月6日早上9：30到下午4：30，微软DX部门举办了《HTML5 开发新机遇》。这个活动准们为微软的网技术做了一系列的介绍。题目包含了：</p>
<ul>
<li>移植 Web 应用到 Universal Apps</li>
<li>WinJS 概述</li>
<li>TypeScript 的优势</li>
<li>用 Web App Template 来一直网站到 Universal Apps</li>
<li>Internet Explorer 最新的工具</li>
<li>跨平台的 Visual Studio Tools for Apache Cordova</li>
<li>微软的 Azure 云计算</li>
<li>发布应用到 Windows 商店</li>
</ul>
<p>如果大家对这个课程有兴趣，请下载 PDF 来学习。还有教课视频在 Microsoft Virtual Academy 可以在线学习。</p>
<p>Apache Cordova：<a href="http://www.microsoftvirtualacademy.com/training-courses/873">http://www.microsoftvirtualacademy.com/training-courses/873</a></p>
<p>HTML5 开发 Universal Apps：<a href="http://www.microsoftvirtualacademy.com/training-courses/866">http://www.microsoftvirtualacademy.com/training-courses/866</a></p>
<p>HTML5 游戏迁移到 Universal Apps 和 Egret 课程：<a href="http://www.microsoftvirtualacademy.com/training-courses/869">http://www.microsoftvirtualacademy.com/training-courses/869</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/10/57/89/77/Porting%20HTML5%20to%20Universal%20Apps%20Complete.pdf" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-57-89-77/Porting-HTML5-to-Universal-Apps-Complete.pdf">Porting HTML5 to Universal Apps Complete.pdf</a></p>]]></content:encoded>
    </item>
    <item>
      <title>TTF中文乱码 -- Cocos2dx 游戏移植WP8之路</title>
      <link>https://docs.microsoft.com/archive/blogs/windows__windows_game_dev_faq_/ttf-cocos2dx-wp8</link>
      <pubDate>Thu, 06 Nov 2014 01:25:00 GMT</pubDate>
      <dc:creator><![CDATA[梅颖广]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/windows__windows_game_dev_faq_/2014/11/06/ttf-cocos2dx-wp8/</guid>
      <description><![CDATA[Cocos2dx 是目前最流行的手机游戏引擎之一，开源、轻量、多平台等的诸多特性使得它被很多国内外手游开发者所喜爱。利用Cocos2dx来开发Windows Phone...]]></description>
      <content:encoded><![CDATA[<p class="MsoNormal" style="text-align: left;"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Cocos2dx </span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">是目前最流行的手机游戏引擎之一，开源、轻量、多平台等的诸多特性使得它被很多国内外手游开发者所喜爱。利用</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Cocos2dx</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">来开发</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Windows Phone 8</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的游戏同样也是非常的方便高效。当然任何跨平台的游戏引擎，最终解决的都只能是游戏层面的问题：包括场景的管理、图形的渲染、真实物理世界的模拟等；要想真正在一个平台上把游戏做好，不可避免会遇到很多和平台相关的问题，需要我们每个游戏程序员对于该平台的技术有个比较深入的了解。在</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Windows Phone 8</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">这个平台上，我希望通过自己的努力帮助大家解决移植过程中遇到的问题。</span></p>
<p class="MsoNormal"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Cocos2dx</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">WP8</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">项目在中文显示这一块，一直有些问题。虽然这算不上很严重的</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Bug</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">，但也足以令不少开发者费神。因为这是所有面向国内市场的游戏开发者所无法回避的问题。我总结了一下，中文显示不出主要集中在大家使用</span><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">CCLabeTTF</span></strong><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">显示</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">TrueTypeFont</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的中文时，会发生二个症状：一是中文显示为方块，二是中文显示乱码。如下图所示：</span></p>
<div class="WordSection1">
<table class="MsoTableGrid" style="border: currentColor; border-collapse: collapse; mso-yfti-tbllook: 1184; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-insideh: none; mso-border-insidev: none;" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 137.1pt; mso-yfti-irow: 0; mso-yfti-firstrow: yes;">
<td style="padding: 0cm 5.4pt; width: 358.05pt; height: 137.1pt;" valign="top" width="477">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/3617.image001.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/3617.image001.png"><img style="width: 441px; height: 225px;" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/3617.image001.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/3617.image001.png" alt="" width="550" height="294" border="0" /></a></td>
<td style="padding: 0cm 5.4pt; width: 73.95pt; height: 137.1pt;" valign="top" width="99">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt;"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial; mso-no-proof: yes;" lang="ZH-CN">显示方块</span></p>
</td>
</tr>
<tr style="height: 168.65pt; mso-yfti-irow: 1; mso-yfti-lastrow: yes;">
<td style="padding: 0cm 5.4pt; width: 358.05pt; height: 168.65pt;" valign="top" width="477">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/8306.image002.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/8306.image002.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/8306.image002.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/8306.image002.png" alt="" width="440" height="238" border="0" /></a></td>
<td style="padding: 0cm 5.4pt; width: 73.95pt; height: 168.65pt;" valign="top" width="99">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt;"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial; mso-no-proof: yes;" lang="ZH-CN">显示乱码</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p class="MsoNormal"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">更麻烦的是，</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Cocos2dx</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">自带的</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">TestCpp</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">也有同样的问题</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">(</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">注</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">1)</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">。</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">下面给出解决方案：</span></p>
<p class="MsoNormal"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">中文只显示方块的问题是由于</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">CCTableTTF</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">所指定的</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">TTF</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">字体在</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">WP8</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">下不支持中文，比如</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Marker Felt </span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">或是</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Arial</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">字体。解决的办法很简单，只要替换支持中文的字体即可。这里推荐大家使用</span><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">arialuni.ttf (Arial Unicode MS) </span></strong><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">或是</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Cocos2dx</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">自带的</span><strong style="mso-bidi-font-weight: normal;"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">HKYuanMini.ttf</span></strong><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">（我已上传</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">arialuni.ttf</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">字库供大家使用）。这里提醒大家需要把新添加的字库文件放到游戏工程的</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Resources\fonts</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">目录下，并确保该字库文件打入</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">XAP</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">包中。代码的写法类似下面所示：</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">auto </span><span style="background: white; color: navy; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">label</span><span style="background: white; color: black; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> = </span><span style="background: white; color: #216f85; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">LabelTTF</span><span style="background: white; color: black; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">::</span><span style="background: white; color: #880000; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">create</span><span style="background: white; color: black; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">(</span><span style="background: white; color: #a31515; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"</span><span style="background: white; color: #a31515; line-height: 107%; font-family: 宋体; font-size: 9.5pt; mso-ascii-font-family: Consolas; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Consolas; mso-bidi-font-family: Consolas; mso-highlight: white;" lang="ZH-CN">梅颖广研究</span><span style="background: white; color: #a31515; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">Cocos2dx",</span><span style="background: white; color: #a31515; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"fonts/arialuni.ttf"</span><span style="background: white; color: black; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">,36);</span></p>
<p class="MsoNormal"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">如果出现中文乱码的情况，那就是字符编码不对的问题，这不是简单替换字库文件所能搞定的。</span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;" lang="ZH-CN">大家所做的第一件事情，就是确认需要输出的中文是什么编码。如果大家是直接把输出的中文写在</span>Visual Studio<span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;" lang="ZH-CN">里，就像上述的那条语句一样，那就去查看一下</span>Visual Studio<span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;" lang="ZH-CN">编码方式。方法是打开</span>File \ Advanced Save Option&hellip;<span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;" lang="ZH-CN">菜单，弹出如下对话框。</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;" lang="ZH-CN"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/2402.image003.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/2402.image003.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/2402.image003.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/2402.image003.png" alt="" width="422" height="223" border="0" /></a></span></p>
<p class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">一般可能会是三种编码方式：</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Unicode(UTF-8 without signature), Unicode(UTF-8 with signature), Chinese Simplified (GB2312)</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">。其中</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">UTF8 </span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">signature</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的意思就是</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">BOM (Byte Order Mark) </span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">，带不带</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">BOM</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的区别可以参考如下文章：</span></p>
<ul>
<li>
<div class="MsoNormal">链接地址：</div>
</li>
<li>
<div class="MsoNormal"><a href="http://gkecenter.blog.163.com/blog/static/18138030520129292491090/">http://gkecenter.blog.163.com/blog/static/18138030520129292491090/</a></div>
</li>
</ul>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">当然大家可以通过上述对话框切换编码。</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Cocos2dx</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">处理的必须是</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">UTF8</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">编码的字符，如果不符合的话就会显示乱码。除此之外我还发现，如果编码选择不好，在代码中直接插入中文的时候，中文字符会和后面的标点产生干涉，发生奇怪的编译错误。比如下面这句，究和右分号会产生错误。</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">auto </span><span style="background: white; color: navy; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">label</span><span style="background: white; color: black; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> = </span><span style="background: white; color: #216f85; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">LabelTTF</span><span style="background: white; color: black; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">::</span><span style="background: white; color: #880000; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">create</span><span style="background: white; color: black; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">(</span><span style="background: white; color: #a31515; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"Cocos2dx</span><span style="background: white; color: #a31515; line-height: 107%; font-family: 宋体; font-size: 9.5pt; mso-ascii-font-family: Consolas; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Consolas; mso-bidi-font-family: Consolas; mso-highlight: white;" lang="ZH-CN">梅颖广研究</span><span style="background: white; color: #a31515; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"</span><span style="background: white; color: black; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">,</span><span style="background: white; color: #a31515; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"fonts/arialuni.ttf"</span><span style="background: white; color: black; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">, 36);</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">针对这三种编码，我做了测试，请看下表的结果：</span></p>
<div class="WordSection1">
<table class="MsoTableGrid" style="border: currentColor; border-collapse: collapse; mso-yfti-tbllook: 1184; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-alt: solid windowtext .5pt;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes;">
<td style="background: #7f7f7f; padding: 0cm 5.4pt; border: 1pt solid windowtext; width: 120.25pt; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: text1; mso-background-themetint: 128;" valign="top" width="160">
<p class="MsoNormal" style="text-align: center; line-height: normal; margin-bottom: 0pt;" align="center"><span style="color: white; font-family: 宋体; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial; mso-themecolor: background1;" lang="ZH-CN">编码</span></p>
</td>
<td style="background: #7f7f7f; border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: windowtext windowtext windowtext currentColor; padding: 0cm 5.4pt; width: 163pt; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: text1; mso-background-themetint: 128; mso-border-left-alt: solid windowtext .5pt;" valign="top" width="217">
<p class="MsoNormal" style="text-align: center; line-height: normal; margin-bottom: 0pt;" align="center"><span style="color: white; font-family: 宋体; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial; mso-themecolor: background1;" lang="ZH-CN">是否需要</span><span style="color: white; font-family: 'Arial',sans-serif; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 宋体; mso-themecolor: background1;">Unicode</span><span style="color: white; font-family: 宋体; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial; mso-themecolor: background1;" lang="ZH-CN">到</span><span style="color: white; font-family: 'Arial',sans-serif; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 宋体; mso-themecolor: background1;">UTF8</span><span style="color: white; font-family: 宋体; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial; mso-themecolor: background1;" lang="ZH-CN">转换</span></p>
</td>
<td style="background: #7f7f7f; border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: windowtext windowtext windowtext currentColor; padding: 0cm 5.4pt; width: 148.25pt; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: text1; mso-background-themetint: 128; mso-border-left-alt: solid windowtext .5pt;" valign="top" width="198">
<p class="MsoNormal" style="text-align: center; line-height: normal; margin-bottom: 0pt;" align="center"><span style="color: white; font-family: 宋体; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial; mso-themecolor: background1;" lang="ZH-CN">是否会产生干涉</span></p>
</td>
</tr>
<tr style="mso-yfti-irow: 1;">
<td style="border-width: medium 1pt 1pt; border-style: none solid solid; border-color: currentColor windowtext windowtext; padding: 0cm 5.4pt; width: 120.25pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt;" valign="top" width="160">
<p class="MsoNormal" style="text-align: center; line-height: normal; margin-bottom: 0pt;" align="center"><span style="font-family: 'Arial',sans-serif; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 宋体;">GB2312</span></p>
</td>
<td style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: currentColor windowtext windowtext currentColor; padding: 0cm 5.4pt; width: 163pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt;" valign="top" width="217">
<p class="MsoNormal" style="text-align: center; line-height: normal; margin-bottom: 0pt;" align="center"><span style="font-family: 宋体; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">需要转换</span></p>
</td>
<td style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: currentColor windowtext windowtext currentColor; padding: 0cm 5.4pt; width: 148.25pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt;" valign="top" width="198">
<p class="MsoNormal" style="text-align: center; line-height: normal; margin-bottom: 0pt;" align="center"><span style="font-family: 宋体; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">不会</span></p>
</td>
</tr>
<tr style="mso-yfti-irow: 2;">
<td style="border-width: medium 1pt 1pt; border-style: none solid solid; border-color: currentColor windowtext windowtext; padding: 0cm 5.4pt; width: 120.25pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt;" valign="top" width="160">
<p class="MsoNormal" style="text-align: center; line-height: normal; margin-bottom: 0pt;" align="center"><span style="font-family: 'Arial',sans-serif; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 宋体;">UTF8 </span><span style="font-family: 'Arial',sans-serif; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'MS Mincho'; mso-fareast-language: JA;">no signature</span></p>
</td>
<td style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: currentColor windowtext windowtext currentColor; padding: 0cm 5.4pt; width: 163pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt;" valign="top" width="217">
<p class="MsoNormal" style="text-align: center; line-height: normal; margin-bottom: 0pt;" align="center"><span style="font-family: 宋体; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">不需要转换</span></p>
</td>
<td style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: currentColor windowtext windowtext currentColor; padding: 0cm 5.4pt; width: 148.25pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt;" valign="top" width="198">
<p class="MsoNormal" style="text-align: center; line-height: normal; margin-bottom: 0pt;" align="center"><span style="font-family: 宋体; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">会</span></p>
</td>
</tr>
<tr style="mso-yfti-irow: 3; mso-yfti-lastrow: yes;">
<td style="border-width: medium 1pt 1pt; border-style: none solid solid; border-color: currentColor windowtext windowtext; padding: 0cm 5.4pt; width: 120.25pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt;" valign="top" width="160">
<p class="MsoNormal" style="text-align: center; line-height: normal; margin-bottom: 0pt;" align="center"><span style="font-family: 'Arial',sans-serif; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 宋体;">UTF8 </span><span style="font-family: 'Arial',sans-serif; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'MS Mincho'; mso-fareast-language: JA;">with signature</span></p>
</td>
<td style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: currentColor windowtext windowtext currentColor; padding: 0cm 5.4pt; width: 163pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt;" valign="top" width="217">
<p class="MsoNormal" style="text-align: center; line-height: normal; margin-bottom: 0pt;" align="center"><span style="font-family: 宋体; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">需要转换</span></p>
</td>
<td style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: currentColor windowtext windowtext currentColor; padding: 0cm 5.4pt; width: 148.25pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt;" valign="top" width="198">
<p class="MsoNormal" style="text-align: center; line-height: normal; margin-bottom: 0pt;" align="center"><span style="font-family: 宋体; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">不会</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p class="MsoNormal"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">从表可以看出，</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">UTF8 no signature</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的编码虽然不需要做</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Unicode</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">到</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">UTF8</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的转换，方便快捷，但会产生字符干涉的问题，所以，<strong style="mso-bidi-font-weight: normal;"><span style="background: yellow; mso-highlight: yellow;">我建议大家采用</span></strong></span><strong style="mso-bidi-font-weight: normal;"><span style="background: yellow; font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体; mso-highlight: yellow;">GB2312</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="background: yellow; font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial; mso-highlight: yellow;" lang="ZH-CN">或者</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="background: yellow; font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体; mso-highlight: yellow;">UTF8 with signature</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="background: yellow; font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial; mso-highlight: yellow;" lang="ZH-CN">的编码</span></strong><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">，然后在使用</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">CCLabelTTF</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">前做</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Unicode</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">到</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">UTF8</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的转换。</span></p>
<p class="MsoNormal"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">下面和大家谈谈如何实现</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Unicode</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">到</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">UTF8</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的转换。这个转换方法很多，比如采用</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">iconv</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">库等。其实比较方便的是采用</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Cocos2dx</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">自带的转换函数</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">CCUnicodeToUtf8 ( CCWinRTUtils.h &amp; cpp )</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">。标准的写法如下所示：</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">auto </span><span style="background: white; color: navy; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">label</span><span style="background: white; color: black; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> = </span><span style="background: white; color: #216f85; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">LabelTTF</span><span style="background: white; color: black; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">::</span><span style="background: white; color: #880000; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">create</span><span style="background: white; color: black; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">( </span><span style="background: white; color: #880000; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">CCUnicodeToUtf8</span><span style="background: white; color: black; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">(L</span><span style="background: white; color: #a31515; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"</span><span style="background: white; color: #a31515; line-height: 107%; font-family: 宋体; font-size: 9.5pt; mso-ascii-font-family: Consolas; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Consolas; mso-bidi-font-family: Consolas; mso-highlight: white;" lang="ZH-CN">梅颖广研究</span><span style="background: white; color: #a31515; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">Cocos2dx"</span><span style="background: white; color: black; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">), </span><span style="background: white; color: #a31515; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"fonts/arialuni.ttf"</span><span style="background: white; color: black; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">, 36);</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">如果打开</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">CCUnicodeToUtf8 </span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">函数，大家就会发现此函数的本质是使用了</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">WideCharToMultiByte </span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">函数。当然，这个是</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Windows</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">平台才有的函数，无法跨平台。所以如果大家想完美的话，可以采用纯</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">C++</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">写的函数。如下所示：</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><em><span style="background: white; color: #216f85; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">std</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">::</span><em><span style="background: white; color: #216f85; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">string </span></em><span style="background: white; color: #880000; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">WStrToUTF8</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">(</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">const</span><em><span style="background: white; color: #216f85; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">std</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">::</span><em><span style="background: white; color: #216f85; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">wstring</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">&amp; </span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">src</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">)</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">{</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><em><span style="background: white; color: #216f85; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">std</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">::</span><em><span style="background: white; color: #216f85; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">string </span></em><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">dest</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">;</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">dest</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">.</span><em><span style="background: white; color: #880000; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">clear</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">();</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">for</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> (</span><em><span style="background: white; color: #216f85; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">size_t</span></em><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">i</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> = 0; </span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">i</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> &lt; </span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">src</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">.</span><em><span style="background: white; color: #880000; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">size</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">(); </span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">i</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">++)</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 2;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">wchar_t</span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">w</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> = </span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">src</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">[</span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">i</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">];</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 2;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">if</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> (</span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">w</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> &lt;= 0x7f)</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 2;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">dest</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">.</span><em><span style="background: white; color: #880000; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">push_back</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">((</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">char</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">)</span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">w</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">);</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 2;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 2;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">else</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">if</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> (</span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">w</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> &lt;= 0x7ff)</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 2;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">dest</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">.</span><em><span style="background: white; color: #880000; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">push_back</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">(0xc0 | ((</span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">w</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> &gt;&gt; 6) &amp; 0x1f));</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">dest</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">.</span><em><span style="background: white; color: #880000; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">push_back</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">(0x80 | (</span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">w</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> &amp; 0x3f));</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 2;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 2;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">else</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">if</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> (</span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">w</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> &lt;= 0xffff)</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 2;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">dest</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">.</span><em><span style="background: white; color: #880000; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">push_back</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">(0xe0 | ((</span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">w</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> &gt;&gt; 12) &amp; 0x0f));</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">dest</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">.</span><em><span style="background: white; color: #880000; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">push_back</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">(0x80 | ((</span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">w</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> &gt;&gt; 6) &amp; 0x3f));</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">dest</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">.</span><em><span style="background: white; color: #880000; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">push_back</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">(0x80 | (</span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">w</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> &amp; 0x3f));</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 2;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 2;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">else</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">if</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> (</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">sizeof</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">(</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">wchar_t</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">) &gt; 2 &amp;&amp; </span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">w</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> &lt;= 0x10ffff)</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 2;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">dest</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">.</span><em><span style="background: white; color: #880000; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">push_back</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">(0xf0 | ((</span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">w</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> &gt;&gt; 18) &amp; 0x07));</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">dest</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">.</span><em><span style="background: white; color: #880000; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">push_back</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">(0x80 | ((</span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">w</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> &gt;&gt; 12) &amp; 0x3f));</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">dest</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">.</span><em><span style="background: white; color: #880000; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">push_back</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">(0x80 | ((</span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">w</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> &gt;&gt; 6) &amp; 0x3f));</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">dest</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">.</span><em><span style="background: white; color: #880000; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">push_back</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">(0x80 | (</span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">w</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> &amp; 0x3f));</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 2;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 2;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">else</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">dest</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">.</span><em><span style="background: white; color: #880000; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">push_back</span></em><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">(</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">'?'</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">);</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">return </span><span style="background: white; color: navy; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">dest</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">;</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">}</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">然后，完美输出中文的函数如下所示：</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">auto </span><span style="background: white; color: navy; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">label</span><span style="background: white; color: black; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> = </span><span style="background: white; color: #216f85; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">LabelTTF</span><span style="background: white; color: black; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">::</span><span style="background: white; color: #880000; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">create</span><span style="background: white; color: black; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">( </span><span style="background: white; color: #880000; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">WStrToUTF8</span><span style="background: white; color: black; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">(L</span><span style="background: white; color: #a31515; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"</span><span style="background: white; color: #a31515; line-height: 107%; font-family: 宋体; font-size: 9.5pt; mso-ascii-font-family: Consolas; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Consolas; mso-bidi-font-family: Consolas; mso-highlight: white;" lang="ZH-CN">梅颖广研究</span><span style="background: white; color: #a31515; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">Cocos2dx"</span><span style="background: white; color: black; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">), </span><span style="background: white; color: #a31515; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"fonts/arialuni.ttf"</span><span style="background: white; color: black; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">, 36);</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">用这种办法，其它语言的输出也没有问题。比如：</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">auto </span><span style="background: white; color: navy; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">label</span><span style="background: white; color: black; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> = </span><span style="background: white; color: #216f85; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">LabelTTF</span><span style="background: white; color: black; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">::</span><span style="background: white; color: #880000; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">create</span><span style="background: white; color: black; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">( </span><span style="background: white; color: #880000; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">WStrToUTF8</span><span style="background: white; color: black; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">(L</span><span style="background: white; color: #a31515; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"</span><span style="background: white; color: #a31515; line-height: 107%; font-family: 宋体; font-size: 9.5pt; mso-ascii-font-family: Consolas; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Consolas; mso-bidi-font-family: Consolas; mso-highlight: white;" lang="ZH-CN">よろしくお願い梅颖广研究</span><span style="background: white; color: #a31515; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"</span><span style="background: white; color: black; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">), </span><span style="background: white; color: #a31515; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"fonts/arialuni.ttf"</span><span style="background: white; color: black; line-height: 107%; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">, 36);</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><br /><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/8371.image004.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/8371.image004.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/67/90/8371.image004.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-67-90/8371.image004.png" alt="" width="472" height="244" border="0" /></a></p>
<p class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">最后一个问题，当使用</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">CCTTFLabel</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">自动换行功能的时候，即提供</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">dimension</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">参数给</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">CCTTFLabel::create() </span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">函数时，中文输出会无法换行。针对这个问题，其实与中文无关。即使全是英文也可能出现这种情况。主要的原因是由于</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Cocos2dx</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">在实现这个功能的时候，是靠空格来判断是否超越了边界。所以只要是一大段文字，不带空格的，都会出现无法换行的情况。如何解决这个问题呢？我给大家推荐一篇文章：</span></p>
<ul>
<li>链接地址：</li>
<li><a href="http://blog.csdn.net/hopingwhite/article/details/38414917">http://blog.csdn.net/hopingwhite/article/details/38414917</a></li>
</ul>
<p class="MsoNormal"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">最后，我默认各位读者对于</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Cocos2dx</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">已是非常的熟悉。如果大家对于</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Cocos2dx</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">引擎本身或如何在</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">WP8</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">上建立</span><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">Cocos2dx</span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">开发环境不清楚的话，推荐大家去观看我在微软虚拟在线课堂上的免费课程。</span></p>
<ul>
<li>链接地址：</li>
<li><a href="http://www.microsoftvirtualacademy.com/training-courses/854">http://www.microsoftvirtualacademy.com/training-courses/854</a></li>
</ul>
<p class="MsoListParagraphCxSpLast">&nbsp;谢谢！</p>
<p class="MsoNormal" style="text-align: right;" align="right"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">梅颖广</span></p>
<p class="MsoNormal"><span style="line-height: 107%; font-family: 宋体; font-size: 9pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">注</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 9pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 宋体;">1</span><span style="line-height: 107%; font-family: 宋体; font-size: 9pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">：</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 9pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 宋体;">Cocos2dx 3.2</span><span style="line-height: 107%; font-family: 宋体; font-size: 9pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">的</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 9pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 宋体;"> LabelTest.cpp</span><span style="line-height: 107%; font-family: 宋体; font-size: 9pt; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial;" lang="ZH-CN">文件的</span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 9pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 宋体;">LabelTTFChinese</span></p>
<p class="MsoNormal" style="text-align: right;" align="right"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-family: 'Arial',sans-serif; mso-fareast-font-family: 宋体;">&nbsp;</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/10/57/02/13/arialuni.ttf" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-57-02-13/arialuni.ttf">arialuni.ttf</a></p>]]></content:encoded>
    </item>
  </channel>
</rss>