admin
管理员
管理员
  • UID1
  • 注册日期2011-05-18
  • 最后登录2022-08-22
  • 粉丝94
  • 关注0
  • 发帖数1061
  • QQ
  • 铜币1232枚
  • 威望8点
  • 银元1218个
阅读:1552回复:1

【源码编辑】客户端地形纹理的限制去除

楼主#
更多 发布于:2012-12-12 12:45

<div class="bbcode_container" style="margin: 5px 20px 20px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 13px; line-height: normal; background-color: rgb(248, 247, 244); -webkit-box-shadow: none !important;"><font style="-webkit-box-shadow: none !important;"><h2 class="title icon" style="margin-bottom: 5px; padding-top: 10px; padding-right: 10px; padding-bottom: 5px; font-size: 14px; font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(200, 200, 200); -webkit-box-shadow: none !important;"></h2><h2 class="title icon" style="margin-bottom: 5px; padding-top: 10px; padding-right: 10px; padding-bottom: 5px; font-size: 14px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(200, 200, 200); -webkit-box-shadow: none !important;"><font style="-webkit-box-shadow: none !important;">客户端地形纹理的限制去除</font></h2><div class="content" style="-webkit-box-shadow: none !important;"><div id="post_message_7366069" style="-webkit-box-shadow: none !important;"><blockquote class="postcontent restore " style="overflow: hidden; -webkit-box-shadow: none !important;"><b style="-webkit-box-shadow: none !important;">TerrainMng.cpp</b><br style="-webkit-box-shadow: none !important;"><br style="-webkit-box-shadow: none !important;">在 CTerrainMng::CTerrainMng 替换代码:<div class="bbcode_container" style="margin: 5px 20px 20px; -webkit-box-shadow: none !important;"><pre class="bbcode_code" style="padding: 6px; line-height: 12px; border: 1px inset; overflow: scroll; direction: ltr; background-image: none; background-color: rgb(240, 238, 232); font-size: 12px; height: 36px; -webkit-box-shadow: none !important;"> ZeroMemory( m_aTerrain, sizeof( m_aTerrain ) );//* MAX_TERRAIN );</pre></div><div class="bbcode_container" style="margin: 5px 20px 20px; -webkit-box-shadow: none !important;"><div class="bbcode_description" style="-webkit-box-shadow: none !important;">通过代码:</div><pre class="bbcode_code" style="padding: 6px; line-height: 12px; border: 1px inset; overflow: scroll; direction: ltr; background-image: none; background-color: rgb(240, 238, 232); font-size: 12px; height: 84px; -webkit-box-shadow: none !important;">#ifdef __TERRAIN_TEXFIX
m_aTerrain.clear();
#else // __TERRAIN_TEXFIX
ZeroMemory( m_aTerrain, sizeof( m_aTerrain ) );//* MAX_TERRAIN );
#endif // __TERRAIN_TEXFIX</pre></div>In CTerrainMng:eleteDeviceObjects&nbsp;<font style="-webkit-box-shadow: none !important;"><font class="goog-text-highlight" style="-webkit-box-shadow: rgb(153, 153, 170) 2px 2px 4px; background-color: rgb(201, 215, 241); box-shadow: rgb(153, 153, 170) 2px 2px 4px; box-sizing: border-box; position: relative;">取代</font></font><br style="-webkit-box-shadow: none !important;"><div class="bbcode_container" style="margin: 5px 20px 20px; -webkit-box-shadow: none !important;"><div class="bbcode_description" style="-webkit-box-shadow: none !important;">代码::</div><pre class="bbcode_code" style="padding: 6px; line-height: 12px; border: 1px inset; overflow: scroll; direction: ltr; background-image: none; background-color: rgb(240, 238, 232); font-size: 12px; height: 84px; -webkit-box-shadow: none !important;"> for( int i = 0; i &lt; MAX_TERRAIN; i++ )
{
if( m_aTerrain<i>.m_pTexture )
SAFE_RELEASE( m_aTerrain<i>.m_pTexture  );
}</i></i></pre></div><div class="bbcode_container" style="margin: 5px 20px 20px; -webkit-box-shadow: none !important;"><i><i><font style="-webkit-box-shadow: none !important;"><font style="-webkit-box-shadow: none !important;">通过</font></font><br style="-webkit-box-shadow: none !important;"><div class="bbcode_description" style="-webkit-box-shadow: none !important;">代码:</div><pre class="bbcode_code" style="padding: 6px; line-height: 12px; border: 1px inset; overflow: scroll; direction: ltr; background-image: none; background-color: rgb(240, 238, 232); font-size: 12px; height: 180px; -webkit-box-shadow: none !important;">#ifdef __TERRAIN_TEXFIX
for( map&lt;DWORD, TERRAIN&gt;::iterator it = m_aTerrain.begin(); it != m_aTerrain.end(); ++it )
{
if(it-&gt;second.m_pTexture)
SAFE_RELEASE( it-&gt;second.m_pTexture );
}
#else // __TERRAIN_TEXFIX
for( int i = 0; i &lt; MAX_TERRAIN; i++ )
{
if( m_aTerrain<i>.m_pTexture )
SAFE_RELEASE( m_aTerrain<i>.m_pTexture  );
}
#endif // __TERRAIN_TEXFIX</i></i></pre></i></i></div><i><i><i><b style="-webkit-box-shadow: none !important;">TerrainMng.h:</b><br style="-webkit-box-shadow: none !important;"><br style="-webkit-box-shadow: none !important;"><div class="bbcode_container" style="margin: 5px 20px 20px; -webkit-box-shadow: none !important;"><font style="-webkit-box-shadow: none !important;"><font style="-webkit-box-shadow: none !important;">替换</font></font><br style="-webkit-box-shadow: none !important;"><div class="bbcode_description" style="-webkit-box-shadow: none !important;"><span style="background-color: rgb(201, 215, 241);">代码</span>:</div><pre class="bbcode_code" style="padding: 6px; line-height: 12px; border: 1px inset; overflow: scroll; direction: ltr; background-image: none; background-color: rgb(240, 238, 232); font-size: 12px; height: 36px; -webkit-box-shadow: none !important;"> TERRAIN m_aTerrain[MAX_TERRAIN];</pre></div><div class="bbcode_container" style="margin: 5px 20px 20px; -webkit-box-shadow: none !important;"><font style="-webkit-box-shadow: none !important;"><font style="-webkit-box-shadow: none !important;">通过</font></font><br style="-webkit-box-shadow: none !important;"><div class="bbcode_description" style="-webkit-box-shadow: none !important;"><span style="background-color: rgb(201, 215, 241);">代码</span>:</div><pre class="bbcode_code" style="padding: 6px; line-height: 12px; border: 1px inset; overflow: scroll; direction: ltr; background-image: none; background-color: rgb(240, 238, 232); font-size: 12px; height: 84px; -webkit-box-shadow: none !important;">#ifdef __TERRAIN_TEXFIX
map&lt;DWORD, TERRAIN&gt; m_aTerrain;
#else // __TERRAIN_TEXFIX
TERRAIN m_aTerrain[MAX_TERRAIN];
#endif // __TERRAIN_TEXFIX</pre><div><br></div></div></i></i></i></blockquote></div></div></font></div>
哎...今天够累的,签到来了3...
暴力熊
禁止发言
禁止发言
  • UID12
  • 注册日期2011-05-18
  • 最后登录2020-03-17
  • 粉丝24
  • 关注0
  • 发帖数567
  • QQ
  • 铜币2033枚
  • 威望-2点
  • 银元486个
沙发#
发布于:2012-12-16 21:46
用户被禁言,该主题自动屏蔽!
游客

返回顶部