锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久久精品视频免费观看,久久久久99精品成人片直播,久久久精品人妻一区二区三区四 http://www.shnenglu.com/wc250en007/category/17338.html鍓嶈繘鐨勮礬涓?/description>zh-cnMon, 18 Jul 2011 14:00:33 GMTMon, 18 Jul 2011 14:00:33 GMT60luaplus鑴氭湰涓嬌鐢ㄦ垚鍛樺嚱鏁?/title><link>http://www.shnenglu.com/wc250en007/archive/2011/07/18/151300.html</link><dc:creator>Let me see see</dc:creator><author>Let me see see</author><pubDate>Mon, 18 Jul 2011 05:27:00 GMT</pubDate><guid>http://www.shnenglu.com/wc250en007/archive/2011/07/18/151300.html</guid><wfw:comment>http://www.shnenglu.com/wc250en007/comments/151300.html</wfw:comment><comments>http://www.shnenglu.com/wc250en007/archive/2011/07/18/151300.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/wc250en007/comments/commentRss/151300.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/wc250en007/services/trackbacks/151300.html</trackback:ping><description><![CDATA[<div>鍦ㄨ剼鏈腑浣跨敤綾葷殑鎴愬憳鍑芥暟 <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" alt="" /><span style="color: #000000">#include </span><span style="color: #000000">"</span><span style="color: #000000">luaplus.h</span><span style="color: #000000">"</span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">using</span><span style="color: #000000"> </span><span style="color: #0000ff">namespace</span><span style="color: #000000"> LuaPlus;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" alt="" />template</span><span style="color: #000000"><</span><span style="color: #000000"> </span><span style="color: #0000ff">class</span><span style="color: #000000"> T </span><span style="color: #000000">></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">class</span><span style="color: #000000"> LuaExport<br /><img id="Codehighlighter1_83_1148_Open_Image" onclick="this.style.display='none'; Codehighlighter1_83_1148_Open_Text.style.display='none'; Codehighlighter1_83_1148_Closed_Image.style.display='inline'; Codehighlighter1_83_1148_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top"><img id="Codehighlighter1_83_1148_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_83_1148_Closed_Text.style.display='none'; Codehighlighter1_83_1148_Open_Image.style.display='inline'; Codehighlighter1_83_1148_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top"></span><span id="Codehighlighter1_83_1148_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_83_1148_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #0000ff">public</span><span style="color: #000000">:<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    LuaExport(</span><span style="color: #0000ff">const</span><span style="color: #000000"> </span><span style="color: #0000ff">char</span><span style="color: #000000">*</span><span style="color: #000000"> pszName, LuaPlus::LuaState</span><span style="color: #000000">*</span><span style="color: #000000"> pState </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">)<br /><img id="Codehighlighter1_157_598_Open_Image" onclick="this.style.display='none'; Codehighlighter1_157_598_Open_Text.style.display='none'; Codehighlighter1_157_598_Closed_Image.style.display='inline'; Codehighlighter1_157_598_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_157_598_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_157_598_Closed_Text.style.display='none'; Codehighlighter1_157_598_Open_Image.style.display='inline'; Codehighlighter1_157_598_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top">    </span><span id="Codehighlighter1_157_598_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_157_598_Open_Text"><span style="color: #000000">{ <br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        </span><span style="color: #008000">//</span><span style="color: #008000">TDAssert(s_pMe == 0);</span><span style="color: #008000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #000000">        s_pMe </span><span style="color: #000000">=</span><span style="color: #000000"> static_cast</span><span style="color: #000000"><</span><span style="color: #000000"> T</span><span style="color: #000000">*</span><span style="color: #000000"> </span><span style="color: #000000">></span><span style="color: #000000">(</span><span style="color: #0000ff">this</span><span style="color: #000000">);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        LuaPlus::LuaState</span><span style="color: #000000">*</span><span style="color: #000000"> theState </span><span style="color: #000000">=</span><span style="color: #000000"> pState; </span><span style="color: #008000">//</span><span style="color: #008000">? pState : CScriptSystem::_GetLuaState();</span><span style="color: #008000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        s_pMetaTable </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> LuaPlus::LuaObject;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        </span><span style="color: #000000">*</span><span style="color: #000000">s_pMetaTable </span><span style="color: #000000">=</span><span style="color: #000000"> theState</span><span style="color: #000000">-></span><span style="color: #000000">GetGlobals().CreateTable(pszName);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        s_pMetaTable</span><span style="color: #000000">-></span><span style="color: #000000">SetObject(</span><span style="color: #000000">"</span><span style="color: #000000">__index</span><span style="color: #000000">"</span><span style="color: #000000">, </span><span style="color: #000000">*</span><span style="color: #000000">s_pMetaTable);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        LuaObject obj </span><span style="color: #000000">=</span><span style="color: #000000"> theState</span><span style="color: #000000">-></span><span style="color: #000000">BoxPointer(s_pMe);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        obj.SetMetaTable(</span><span style="color: #000000">*</span><span style="color: #000000">s_pMetaTable);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        theState</span><span style="color: #000000">-></span><span style="color: #000000">GetGlobals().SetObject(pszName, obj);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">virtual</span><span style="color: #000000"> </span><span style="color: #000000">~</span><span style="color: #000000">LuaExport()<br /><img id="Codehighlighter1_624_681_Open_Image" onclick="this.style.display='none'; Codehighlighter1_624_681_Open_Text.style.display='none'; Codehighlighter1_624_681_Closed_Image.style.display='inline'; Codehighlighter1_624_681_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_624_681_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_624_681_Closed_Text.style.display='none'; Codehighlighter1_624_681_Open_Image.style.display='inline'; Codehighlighter1_624_681_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top">    </span><span id="Codehighlighter1_624_681_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_624_681_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        delete s_pMetaTable; s_pMetaTable </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        s_pMe </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    template </span><span style="color: #000000"><</span><span style="color: #0000ff">class</span><span style="color: #000000"> Callee</span><span style="color: #000000">></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">void</span><span style="color: #000000"> RegisterFunction(</span><span style="color: #0000ff">const</span><span style="color: #000000"> </span><span style="color: #0000ff">char</span><span style="color: #000000">*</span><span style="color: #000000"> pszFuncName, </span><span style="color: #0000ff">int</span><span style="color: #000000"> (Callee::</span><span style="color: #000000">*</span><span style="color: #000000">func)(LuaPlus::LuaState</span><span style="color: #000000">*</span><span style="color: #000000">))<br /><img id="Codehighlighter1_799_860_Open_Image" onclick="this.style.display='none'; Codehighlighter1_799_860_Open_Text.style.display='none'; Codehighlighter1_799_860_Closed_Image.style.display='inline'; Codehighlighter1_799_860_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_799_860_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_799_860_Closed_Text.style.display='none'; Codehighlighter1_799_860_Open_Image.style.display='inline'; Codehighlighter1_799_860_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top">    </span><span id="Codehighlighter1_799_860_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_799_860_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        s_pMetaTable</span><span style="color: #000000">-></span><span style="color: #000000">RegisterObjectFunctor(pszFuncName, func);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #008000">//</span><span style="color: #008000">鍙栧緱鑷繁</span><span style="color: #008000"><br /><img id="Codehighlighter1_895_911_Open_Image" onclick="this.style.display='none'; Codehighlighter1_895_911_Open_Text.style.display='none'; Codehighlighter1_895_911_Closed_Image.style.display='inline'; Codehighlighter1_895_911_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_895_911_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_895_911_Closed_Text.style.display='none'; Codehighlighter1_895_911_Open_Image.style.display='inline'; Codehighlighter1_895_911_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top"></span><span style="color: #000000">    </span><span style="color: #0000ff">static</span><span style="color: #000000"> T</span><span style="color: #000000">*</span><span style="color: #000000"> GetMe(</span><span style="color: #0000ff">void</span><span style="color: #000000">)  </span><span id="Codehighlighter1_895_911_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_895_911_Open_Text"><span style="color: #000000">{ </span><span style="color: #0000ff">return</span><span style="color: #000000"> s_pMe; }</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #0000ff">protected</span><span style="color: #000000">:<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">static</span><span style="color: #000000"> T</span><span style="color: #000000">*</span><span style="color: #000000">                    s_pMe;            </span><span style="color: #008000">//</span><span style="color: #008000">鑷韓瀹炰緥錛屽叏灞鍙橀噺</span><span style="color: #008000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #000000">    </span><span style="color: #0000ff">static</span><span style="color: #000000"> LuaPlus::LuaObject</span><span style="color: #000000">*</span><span style="color: #000000">    s_pMetaTable;    </span><span style="color: #008000">//</span><span style="color: #008000">MetaTable</span><span style="color: #008000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #0000ff">private</span><span style="color: #000000">:<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #008000">//</span><span style="color: #008000"> unimplemented constructors / assignment</span><span style="color: #008000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #000000">    LuaExport(</span><span style="color: #0000ff">const</span><span style="color: #000000"> LuaExport</span><span style="color: #000000">&</span><span style="color: #000000"> obj);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    LuaExport</span><span style="color: #000000">&</span><span style="color: #000000"> </span><span style="color: #0000ff">operator</span><span style="color: #000000">=</span><span style="color: #000000">(</span><span style="color: #0000ff">const</span><span style="color: #000000"> LuaExport</span><span style="color: #000000">&</span><span style="color: #000000"> obj);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" />}</span></span><span style="color: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">extern</span><span style="color: #000000"> LuaPlus::LuaState</span><span style="color: #000000">*</span><span style="color: #000000"> GetLuaState();</span></div><br />// 嫻嬭瘯main.cpp<br /><br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" alt="" /><span style="color: #0000ff">class</span><span style="color: #000000"> player : </span><span style="color: #0000ff">public</span><span style="color: #000000"> LuaExport</span><span style="color: #000000"><</span><span style="color: #000000"> player </span><span style="color: #000000">></span><span style="color: #000000"><br /><img id="Codehighlighter1_42_652_Open_Image" onclick="this.style.display='none'; Codehighlighter1_42_652_Open_Text.style.display='none'; Codehighlighter1_42_652_Closed_Image.style.display='inline'; Codehighlighter1_42_652_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top"><img id="Codehighlighter1_42_652_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_42_652_Closed_Text.style.display='none'; Codehighlighter1_42_652_Open_Image.style.display='inline'; Codehighlighter1_42_652_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top"></span><span id="Codehighlighter1_42_652_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_42_652_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #0000ff">public</span><span style="color: #000000">:<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    player():<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />      LuaExport</span><span style="color: #000000"><</span><span style="color: #000000"> player </span><span style="color: #000000">></span><span style="color: #000000">( </span><span style="color: #000000">"</span><span style="color: #000000">pp</span><span style="color: #000000">"</span><span style="color: #000000">, GetLuaState() )<br /><img id="Codehighlighter1_112_118_Open_Image" onclick="this.style.display='none'; Codehighlighter1_112_118_Open_Text.style.display='none'; Codehighlighter1_112_118_Closed_Image.style.display='inline'; Codehighlighter1_112_118_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_112_118_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_112_118_Closed_Text.style.display='none'; Codehighlighter1_112_118_Open_Image.style.display='inline'; Codehighlighter1_112_118_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top">      </span><span id="Codehighlighter1_112_118_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_112_118_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />      }</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />      </span><span style="color: #0000ff">int</span><span style="color: #000000"> LS_PrintNumber(LuaState</span><span style="color: #000000">*</span><span style="color: #000000"> state)<br /><img id="Codehighlighter1_163_379_Open_Image" onclick="this.style.display='none'; Codehighlighter1_163_379_Open_Text.style.display='none'; Codehighlighter1_163_379_Closed_Image.style.display='inline'; Codehighlighter1_163_379_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_163_379_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_163_379_Closed_Text.style.display='none'; Codehighlighter1_163_379_Open_Image.style.display='inline'; Codehighlighter1_163_379_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top">      </span><span id="Codehighlighter1_163_379_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_163_379_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />          LuaStack args(state);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /><img id="Codehighlighter1_220_269_Open_Image" onclick="this.style.display='none'; Codehighlighter1_220_269_Open_Text.style.display='none'; Codehighlighter1_220_269_Closed_Image.style.display='inline'; Codehighlighter1_220_269_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_220_269_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_220_269_Closed_Text.style.display='none'; Codehighlighter1_220_269_Open_Image.style.display='inline'; Codehighlighter1_220_269_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top">          </span><span style="color: #0000ff">if</span><span style="color: #000000"> (args[</span><span style="color: #000000">2</span><span style="color: #000000">].IsNumber()) </span><span id="Codehighlighter1_220_269_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_220_269_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />              printf(</span><span style="color: #000000">"</span><span style="color: #000000">%f\n</span><span style="color: #000000">"</span><span style="color: #000000">, args[</span><span style="color: #000000">2</span><span style="color: #000000">].GetNumber());<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />          }</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />          </span><span style="color: #0000ff">else</span><span style="color: #000000"> </span><span style="color: #0000ff">if</span><span style="color: #000000"> ( args[</span><span style="color: #000000">2</span><span style="color: #000000">].IsString() )<br /><img id="Codehighlighter1_310_360_Open_Image" onclick="this.style.display='none'; Codehighlighter1_310_360_Open_Text.style.display='none'; Codehighlighter1_310_360_Closed_Image.style.display='inline'; Codehighlighter1_310_360_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_310_360_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_310_360_Closed_Text.style.display='none'; Codehighlighter1_310_360_Open_Image.style.display='inline'; Codehighlighter1_310_360_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top">          </span><span id="Codehighlighter1_310_360_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_310_360_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />              printf(</span><span style="color: #000000">"</span><span style="color: #000000">%s\n</span><span style="color: #000000">"</span><span style="color: #000000">, args[</span><span style="color: #000000">2</span><span style="color: #000000">].GetString() );<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />          }</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />          </span><span style="color: #0000ff">return</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />      }</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />      </span><span style="color: #0000ff">int</span><span style="color: #000000"> UI_SetTipText( lua_State </span><span style="color: #000000">*</span><span style="color: #000000">state )<br /><img id="Codehighlighter1_425_649_Open_Image" onclick="this.style.display='none'; Codehighlighter1_425_649_Open_Text.style.display='none'; Codehighlighter1_425_649_Closed_Image.style.display='inline'; Codehighlighter1_425_649_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_425_649_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_425_649_Closed_Text.style.display='none'; Codehighlighter1_425_649_Open_Image.style.display='inline'; Codehighlighter1_425_649_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top">      </span><span id="Codehighlighter1_425_649_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_425_649_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />          LuaStack args(state);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />          </span><span style="color: #0000ff">if</span><span style="color: #000000"> ( args[</span><span style="color: #000000">2</span><span style="color: #000000">].IsString() )<br /><img id="Codehighlighter1_487_629_Open_Image" onclick="this.style.display='none'; Codehighlighter1_487_629_Open_Text.style.display='none'; Codehighlighter1_487_629_Closed_Image.style.display='inline'; Codehighlighter1_487_629_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_487_629_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_487_629_Closed_Text.style.display='none'; Codehighlighter1_487_629_Open_Image.style.display='inline'; Codehighlighter1_487_629_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top">          </span><span id="Codehighlighter1_487_629_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_487_629_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />              </span><span style="color: #0000ff">const</span><span style="color: #000000"> </span><span style="color: #0000ff">char</span><span style="color: #000000"> </span><span style="color: #000000">*</span><span style="color: #000000">szData </span><span style="color: #000000">=</span><span style="color: #000000"> args[</span><span style="color: #000000">2</span><span style="color: #000000">].GetString();</span><span style="color: #008000">//</span><span style="color: #008000">lua_tostring(state, 1);</span><span style="color: #008000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #000000">              </span><span style="color: #0000ff">if</span><span style="color: #000000">( szData )<br /><img id="Codehighlighter1_584_623_Open_Image" onclick="this.style.display='none'; Codehighlighter1_584_623_Open_Text.style.display='none'; Codehighlighter1_584_623_Closed_Image.style.display='inline'; Codehighlighter1_584_623_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_584_623_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_584_623_Closed_Text.style.display='none'; Codehighlighter1_584_623_Open_Image.style.display='inline'; Codehighlighter1_584_623_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top">              </span><span id="Codehighlighter1_584_623_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_584_623_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />                  printf(</span><span style="color: #000000">"</span><span style="color: #000000">%s\n</span><span style="color: #000000">"</span><span style="color: #000000">, szData );<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />              }</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />          }</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />          </span><span style="color: #0000ff">return</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />      }</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" />}</span></span><span style="color: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" alt="" />player</span><span style="color: #000000">*</span><span style="color: #000000">    LuaExport</span><span style="color: #000000"><</span><span style="color: #000000"> player </span><span style="color: #000000">></span><span style="color: #000000">::s_pMe </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" alt="" />LuaPlus::LuaObject</span><span style="color: #000000">*</span><span style="color: #000000"> LuaExport</span><span style="color: #000000"><</span><span style="color: #000000"> player </span><span style="color: #000000">></span><span style="color: #000000">::s_pMetaTable </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">int</span><span style="color: #000000"> _tmain(</span><span style="color: #0000ff">int</span><span style="color: #000000"> argc, _TCHAR</span><span style="color: #000000">*</span><span style="color: #000000"> argv[])<br /><img id="Codehighlighter1_794_1147_Open_Image" onclick="this.style.display='none'; Codehighlighter1_794_1147_Open_Text.style.display='none'; Codehighlighter1_794_1147_Closed_Image.style.display='inline'; Codehighlighter1_794_1147_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top"><img id="Codehighlighter1_794_1147_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_794_1147_Closed_Text.style.display='none'; Codehighlighter1_794_1147_Open_Image.style.display='inline'; Codehighlighter1_794_1147_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top"></span><span id="Codehighlighter1_794_1147_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_794_1147_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    player</span><span style="color: #000000">*</span><span style="color: #000000"> pPlayer </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> player();<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    pPlayer</span><span style="color: #000000">-></span><span style="color: #000000">RegisterFunction( </span><span style="color: #000000">"</span><span style="color: #000000">PrintNumber</span><span style="color: #000000">"</span><span style="color: #000000">, </span><span style="color: #000000">&</span><span style="color: #000000">player::LS_PrintNumber );<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    pPlayer</span><span style="color: #000000">-></span><span style="color: #000000">RegisterFunction( </span><span style="color: #000000">"</span><span style="color: #000000">SetTips</span><span style="color: #000000">"</span><span style="color: #000000">, </span><span style="color: #000000">&</span><span style="color: #000000">player::LS_PrintNumber );<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #008000">//</span><span style="color: #008000"> Register your functions.</span><span style="color: #008000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">int</span><span style="color: #000000"> nRet </span><span style="color: #000000">=</span><span style="color: #000000"> GetLuaState()</span><span style="color: #000000">-></span><span style="color: #000000">DoFile( </span><span style="color: #000000">"</span><span style="color: #000000">main.lua</span><span style="color: #000000">"</span><span style="color: #000000"> );<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">if</span><span style="color: #000000"> (  nRet )<br /><img id="Codehighlighter1_1058_1122_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1058_1122_Open_Text.style.display='none'; Codehighlighter1_1058_1122_Closed_Image.style.display='inline'; Codehighlighter1_1058_1122_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_1058_1122_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1058_1122_Closed_Text.style.display='none'; Codehighlighter1_1058_1122_Open_Image.style.display='inline'; Codehighlighter1_1058_1122_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top">    </span><span id="Codehighlighter1_1058_1122_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1058_1122_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        printf(</span><span style="color: #000000">"</span><span style="color: #000000">閿欒淇℃伅: %s</span><span style="color: #000000">"</span><span style="color: #000000">, GetLuaState()</span><span style="color: #000000">-></span><span style="color: #000000">StackTop().GetString());<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    getchar();<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">return</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" />}</span></span></div><br />// main.lua<br />    <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" alt="" /><span style="color: #000000">pp.PrintNumber(</span><span style="color: #000000">1000</span><span style="color: #000000">)<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span></div><br /><br />1.闇瑕佹敞鎰忕殑鏄紝綾葷殑鎴愬憳鍑芥暟涓殑鍙傛暟  榛樿絎竴涓負this<br />鎵浠?瑕佹椿寰楀弬鏁扮殑鏃跺?涓嬫爣榛樿鍔?<br /> if (args[2].IsNumber()) <br />{<br />     printf("%f\n", args[2].GetNumber());<br /> }<br /><br /><br /><br /></div><img src ="http://www.shnenglu.com/wc250en007/aggbug/151300.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/wc250en007/" target="_blank">Let me see see</a> 2011-07-18 13:27 <a href="http://www.shnenglu.com/wc250en007/archive/2011/07/18/151300.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>luaplus涓婃墜 (杞?http://www.shnenglu.com/wc250en007/archive/2011/07/18/151284.htmlLet me see seeLet me see seeMon, 18 Jul 2011 02:10:00 GMThttp://www.shnenglu.com/wc250en007/archive/2011/07/18/151284.htmlhttp://www.shnenglu.com/wc250en007/comments/151284.htmlhttp://www.shnenglu.com/wc250en007/archive/2011/07/18/151284.html#Feedback0http://www.shnenglu.com/wc250en007/comments/commentRss/151284.htmlhttp://www.shnenglu.com/wc250en007/services/trackbacks/151284.html

鐗堟潈鎵鏈?杞澆璇鋒敞鏄庡嚭澶?鍕跨敤浜庡晢涓氱敤閫?璋㈣阿!

浣滆?    澶у疂澶╁ぉ瑙?/span>

Blog:    http://www.shnenglu.com/singohgod

鏈漢姘村鉤鏈夐檺,鏈夐敊璇鋒寚鍑?嬈㈣繋浜ゆ祦,鍏卞悓榪涙!

 

 

鍥藉唴鍏充簬Lua鐨勮祫鏂欏疄鍦ㄦ槸澶皯,涓轟簡瀵繪壘涓涓悎閫傜殑Lua鐨?/span>C++灝佽,鐪熸槸濡傚悓澶ф搗鎹為拡.鍦ㄧ湅浜嗕紬澶氳祫鏂欏悗閿佸畾浠ヤ笅鍑犵:LuaBind ToLua++ LuaPlus.鍦ㄩ夋嫨涓婇鏈夎鍒虹殑鍛抽亾,LuaBind鐨勭増鏈彿榪樻病鍒?/span>1.0,鍔犱笂緗戝弸棰囨湁寰瘝,鏀懼純.ToLua++鏈潵鏈夋湅鍙嬫帹鑽?/span>,浣嗘槸鎬庝箞閮芥壘涓嶅埌涓嬭澆,瀹樼綉灝辨槸鎵撲笉寮,鏃犺禆鏀懼純.灝卞彧鏈?/span>LuaPlus浜?/span>,鐪嬪埌涓浜涗漢鐨勮瘎浠瘋繕琛?/span>,浜庢槸鍐沖畾灝辯敤瀹冨惂.

LuaPlus鐨勮祫鏂欏氨鏇村皯浜?/span>,榪炴庝箞閰嶇疆鎬庝箞璋冭瘯絳変粈涔堥兘娌℃湁,鍙湁娌愭灚澶у摜璁茶В浜嗚娉曟柟闈㈢殑涓綃囨枃绔?/span>.鍟婂摕,鎬庝箞鎼炲憿,闅鵑亾鍙堝彧鏈夌‖鐫澶寸毊涓婁簡?(鏌愪紵浜烘浘璇磋繃,浣嗗嚒鏉板嚭鐨勪簨閮芥槸紜潃澶寸毊騫插嚭鏉ユ淮)

濂戒簡,璦褰掓浼?/span>,涓嬮潰璁茶鎴戠殑緇忛獙鍚?/span>:

 

濡備綍緙栬瘧

1.       涓嬭澆

棣栧厛鍒板畼鏂圭綉绔欎笅杞?/span>: http://www.luaplus.org/

涓嬭澆榪欎釜: All source code: http://luaplus.org/LuaPlus51_Build1100.zip (鎴戝綋鍓嶇殑鐗堟湰,褰撶劧瓚婃柊瓚婂ソ)

 

2.       鍓ョ

瑙e紑涓嬭澆鍖?/span>,鎵撳紑 \LuaPlus51_Build1100\Src\LuaPlus 閲岄潰鏄叏閮ㄦ簮鏂囦歡,src涓嬫槸lua鐨勬簮鏂囦歡.榪欓噷鏈変釜浠や漢鐤戞儜鐨勫湴鏂?/span>,婧愭枃浠朵腑甯︿簡涓浜涗笉闇瑕佺殑鏂囦歡,瑕佸墧闄ゅ幓,鍩烘湰涓婇渶瑕佷互涓嬭繖浜涙枃浠?/span>:

1)      Lua搴撴枃浠?/span>:

lapi.c

lapi.h

lauxlib.c

lauxlib.h

lbaselib.c

lcode.c

lcode.h

ldblib.c

ldebug.c

ldebug.h

ldo.c

ldo.h

ldump.c

lfunc.c

lfunc.h

lgc.c

lgc.h

linit.c

liolib.c

llex.c

llex.h

llimits.h

lmathlib.c

lmem.c

lmem.h

loadlib.c

lobject.c

lobject.h

lopcodes.c

lopcodes.h

loslib.c

lparser.c

lparser.h

lstate.c

lstate.h

lstring.c

lstring.h

lstrlib.c

ltable.c

ltable.h

ltablib.c

ltm.c

ltm.h

lua.h

luaconf.h

lualib.h

lundump.c

lundump.h

lvm.c

lvm.h

lzio.c

lzio.h

print.c

 

2)      LuaPlus澶存枃浠?/span>:

auxiliar.h

LuaAutoBlock.h

LuaCall.h

LuaFunction.h

LuaHelper.h

LuaHelper_Object.h

LuaHelper_StackObject.h

LuaLink.h

LuaObject.h

LuaObject.inl

LuaPlus.h

LuaPlusCD.h

LuaPlusFunctions.h

LuaPlusInternal.h

LuaStackObject.h

LuaStackObject.inl

LuaStackTableIterator.h

LuaState.h

LuaState.inl

LuaStateOutFile.h

LuaTableIterator.h

luathread.h

pt.h

srm.h

 

3)      LuaPlus婧愭枃浠?/span>

LuaCall.cpp

LuaObject.cpp

LuaPlus.cpp

LuaPlusAddons.c

LuaPlusFunctions.cpp

LuaPlus_Libs.cpp

LuaStackObject.cpp

LuaStackTableIterator.cpp

LuaState.cpp

LuaStateOutFile.cpp

LuaState_DumpObject.cpp

LuaTableIterator.cpp

lwstrlib.c

 

 

3.       寤虹珛欏圭洰

鐒跺悗浣犲氨鍙互鍦?/span>VS涓緩绔嬩竴涓柊欏圭洰,闈欐侀摼鎺ュ簱鐨?/span>:

鍒嗗埆鎶婇渶瑕佺殑鏂囦歡鍔犺繘鍘?/span>,涔嬪悗緙栬瘧,搴旇鑳介氳繃浜?/span>.

 

濡備綍浣跨敤

鎺ョ潃璁茶濡備綍鍦ㄤ綘鐨勫叾浠栭」鐩腑浣跨敤LuaPlus.

1.蹇呰鐨勯厤緗?/span>

浣犵殑欏圭洰鍙兘鏄繖鏍風殑:

璁劇疆GameClient鐨勪緷璧栭」鏄?/span>LuaPlusLib

#include "LuaPlus.h"

using namespace LuaPlus;

璁板緱騫茶繖浜?/span>…

 

2.鍒涘緩涓涓姸鎬?/span>

LuaStateOwner state;

浠婂悗鐨勬搷浣滈兘鍥寸粫榪欎釜state

 

3.鎵ц鑴氭湰

int iret = state->DoFile("test.lua");

榪斿洖鍊間負0琛ㄧず鎴愬姛,鍚﹀垯涓嶆垚鍔?/span>.

 

4.C++涓幏鍙?/span>Lua鑴氭湰鐨勫彉閲?/span>

鍋囪浣犵殑test.lua涓湁:

health = 200;

閫氳繃涓嬪垪鏂規(guī)硶灝卞彲浠ュ湪C++涓緱鍒拌繖涓暟鍊?/span>

int mytest = state->GetGlobal("health").GetInteger();

 

5.C++涓皟鐢?/span>Lua鑴氭湰閲岀殑鍑芥暟

鍋囪浣犵殑test.lua涓湁:

function Add(x, y)

       return x+y;

end

鍦?/span>C++涓渶瑕佸厛澹版槑榪欎釜鍑芥暟:

LuaFunction<float> Add =  state->GetGlobal("Add");

榪欐牱浣犲氨鏈変簡Add()榪欎釜鍑芥暟,鐒跺悗灝卞彲浠ュ儚騫沖父涓鏍蜂嬌鐢ㄥ畠浜?/span>:

float myret = Add(3.14f,5.25f);

 

6.Lua鑴氭湰涓皟鐢?/span>C++鍑芥暟

鍦ㄨ鍙?/span>test.lua涔嬪墠瑕佸厛鎶?/span>C++鍑芥暟娉ㄥ唽鍒?/span>Lua鐨勮繍琛屾椂鏍堥噷,榪欐牱鍦ㄦ墽琛?/span>lua鑴氭湰鐨勬椂鍊?/span>,鎵嶇煡閬撴墽琛屽摢涓涓嚱鏁?/span>:

棣栧厛鏈夊嚱鏁?/span>:

int LS_PrintNumber(LuaState* state)

{

LuaStack args(state);

 

       if (args[1].IsNumber()) {

              printf("%f\n", args[1].GetNumber());

       }

       return 0;

}

鐒跺悗娉ㄥ唽榪欎釜鍑芥暟鍒?/span>Lua:

state->GetGlobals().Register("PrintNumber", LS_PrintNumber);

榪欐牱灝辨妸LS_PrintNumber鏄犲皠涓?/span>Lua涓彲浠ヤ嬌鐢ㄧ殑鍑芥暟PrintNumber.

Test.lua鑴氭湰涓坊鍔犺皟鐢ㄨ鍙?/span>:

PrintNumber(30);

褰?/span>state->DoFile("test.lua");鎵ц鐨勬椂鍊?/span>,灝辨墽琛屼簡C++涓殑榪欎釜鍑芥暟.

 

鎬葷粨

鏈枃浠嬬粛浜?/span>LuaPlus鐨勫熀鏈厤緗柟娉曞拰浣跨敤,甯屾湜瀵逛綘鏈夊府鍔?/span>.涓嬩竴綃囧皢浠嬬粛涓浜涢珮綰х壒鎬?/span>,濡傛庢牱鍦?/span>VS涓皟璇?/span>LuaPlus鐨勮剼鏈?/span>,浠ュ強瀵圭被鐨勬搷浣滅瓑.

濡傛灉榪樻湁浠諱綍鐤戦棶鍙互鐪嬬湅涓嬮潰榪欎釜綆鍗曠殑渚嬪瓙:
 /Files/singohgod/LuaPlus_Test.rar



]]>
luaplus瀛︿範(浜? 杞?/title><link>http://www.shnenglu.com/wc250en007/archive/2011/07/18/151283.html</link><dc:creator>Let me see see</dc:creator><author>Let me see see</author><pubDate>Mon, 18 Jul 2011 02:08:00 GMT</pubDate><guid>http://www.shnenglu.com/wc250en007/archive/2011/07/18/151283.html</guid><wfw:comment>http://www.shnenglu.com/wc250en007/comments/151283.html</wfw:comment><comments>http://www.shnenglu.com/wc250en007/archive/2011/07/18/151283.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/wc250en007/comments/commentRss/151283.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/wc250en007/services/trackbacks/151283.html</trackback:ping><description><![CDATA[<span id="3fxhrjn" class="Apple-style-span" style="word-spacing: 0px; font: 14px/26px Arial; text-transform: none; color: rgb(51,51,51); text-indent: 0px; white-space: normal; letter-spacing: normal; background-color: rgb(255,255,255); text-align: left; orphans: 2; widows: 2; webkit-text-decorations-in-effect: none; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"> <h1 style="padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">鐢╨ua鍋氶厤緗枃浠?/h1>    鍙互鐢╨ua鍋氱▼搴忕殑閰嶇疆鏂囦歡銆?br />    LuaPlus鎻愪緵浜嗚鍐檒ua鑴氭湰鏂囦歡鐨勫姛鑳斤紝鎴戜滑鍙互灝嗛厤緗俊鎭互Table鐨勫艦寮忓瓨鍌ㄥ湪lua鑴氭湰涓紝鐒跺悗鍒╃敤LuaPlus榪涜璇誨彇鍜屾洿鏀廣?br /> <h2 style="padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">    涓銆佸垱寤洪厤緗枃浠?/h2>    閰嶇疆鏂囦歡鍙互鐢ㄦ枃瀛楃紪杈戝櫒鍒涘緩錛屼篃鍙互鍦–++浠g爜涓垱寤恒傛垜浠厛鍦–++涓垱寤恒傚埄鐢–reateTable鍒涘緩涓涓悕涓?Window"鐨勮〃鏍鹼紝鍒╃敤LuaObject鐨凷et*鍑芥暟璁劇疆琛ㄦ牸鍐呭錛屾渶鍚庣敤DumpObject鍑芥暟淇濆瓨鍒版枃浠躲備唬鐮佸涓嬶細<br /> <div style="border-right: windowtext 0.5pt solid; padding-right: 5.4pt; background-position: 0% 50%; border-top: windowtext 0.5pt solid; padding-left: 5.4pt; background-attachment: scroll;background-image: none; padding-bottom: 4px; border-left: windowtext 0.5pt solid; width: 659px; padding-top: 4px; border-bottom: windowtext 0.5pt solid; background-color: rgb(230,230,230); background-origin: initial; background-clip: initial"> <div><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><span style="color: rgb(0,0,255)">void</span><span style="color: rgb(0,0,0)"> SaveTable()<br /><img id="_17_431_Open_Image" style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" onclick="this.style.display='none'; document.getElementById('_17_431_Open_Text').style.display='none'; document.getElementById('_17_431_Closed_Image').style.display='inline'; document.getElementById('_17_431_Closed_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" align="top"></span><span id="_17_431_Open_Text"><span style="color: rgb(0,0,0)">{<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    LuaStateOwner state;<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    LuaObject myTable </span><span style="color: rgb(0,0,0)">=</span><span style="color: rgb(0,0,0)">  state</span><span style="color: rgb(0,0,0)">-></span><span style="color: rgb(0,0,0)">GetGlobals().CreateTable(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">Window</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    myTable.SetInteger(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">width</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, </span><span style="color: rgb(0,0,0)">640</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    myTable.SetInteger(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">height</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, </span><span style="color: rgb(0,0,0)">480</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    myTable.SetString(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">title</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, </span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">My First Window</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    myTable.SetBoolean(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">enabled</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, </span><span style="color: rgb(0,0,255)">true</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    myTable.SetInteger(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">alpha</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, </span><span style="color: rgb(0,0,0)">128</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    myTable.SetString(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">backgroundimage</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, </span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">bg.jpg</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    state</span><span style="color: rgb(0,0,0)">-></span><span style="color: rgb(0,0,0)">DumpObject(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">FirstWindow.lua</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, </span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">Window</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, state</span><span style="color: rgb(0,0,0)">-></span><span style="color: rgb(0,0,0)">GetGlobals()[</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">Window</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">], </span><span style="color: rgb(0,0,0)">0</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span></div></div>    鐩稿叧鍑芥暟鐨勮鏄庡弬瑙佹枃妗c?br /> <h2 style="padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">    浜屻佽鍙栭厤緗枃浠?/h2>    Lua閰嶇疆鏂囦歡鐨勫姞杞藉拰鍏跺畠鑴氭湰鏂囦歡涓鏍鳳紝鍙互鐢―oFile鍑芥暟錛岀劧鍚庡彲浠ョ敤GetGlobals鍔犵儲寮曠殑褰㈠紡鑾峰彇琛ㄦ牸LuaObject瀵硅薄錛屾渶鍚庣敤[ ]璁塊棶琛ㄦ牸鐨勫厓绱犮備唬鐮佸涓嬶細<br /> <div style="border-right: windowtext 0.5pt solid; padding-right: 5.4pt; background-position: 0% 50%; border-top: windowtext 0.5pt solid; padding-left: 5.4pt; background-attachment: scroll;background-image: none; padding-bottom: 4px; border-left: windowtext 0.5pt solid; width: 659px; padding-top: 4px; border-bottom: windowtext 0.5pt solid; background-color: rgb(230,230,230); background-origin: initial; background-clip: initial"> <div><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><span style="color: rgb(0,0,255)">void</span><span style="color: rgb(0,0,0)"> ReadShowTable()<br /><img id="_21_603_Open_Image" style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" onclick="this.style.display='none'; document.getElementById('_21_603_Open_Text').style.display='none'; document.getElementById('_21_603_Closed_Image').style.display='inline'; document.getElementById('_21_603_Closed_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" align="top"></span><span id="_21_603_Open_Text"><span style="color: rgb(0,0,0)">{<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    LuaStateOwner state;<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    state</span><span style="color: rgb(0,0,0)">-></span><span style="color: rgb(0,0,0)">DoFile(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">FirstWindow.lua</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    LuaObject myTable </span><span style="color: rgb(0,0,0)">=</span><span style="color: rgb(0,0,0)"> state</span><span style="color: rgb(0,0,0)">-></span><span style="color: rgb(0,0,0)">GetGlobals()[</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">Window</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">];<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="color: rgb(0,128,0)">//</span><span style="color: rgb(0,128,0)">get Window Table's item</span><span style="color: rgb(0,128,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: rgb(0,0,0)">    printf(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">Window Table in FirstWindow.lua:<span id="zj5z9lx" class="Apple-converted-space"> </span></span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    printf(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)"> width = %d<span id="hdlfrdf" class="Apple-converted-space"> </span></span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, myTable[</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">width</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">].GetInteger() );<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    printf(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)"> height = %d<span id="vdbblfn" class="Apple-converted-space"> </span></span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, myTable[</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">height</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">].GetInteger() );<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    printf(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)"> title = %s<span id="jtlnhlx" class="Apple-converted-space"> </span></span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, myTable[</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">title</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">].GetString() );<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    printf(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)"> enabled = %s<span id="lx9jljl" class="Apple-converted-space"> </span></span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, myTable[</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">enabled</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">].GetBoolean() </span><span style="color: rgb(0,0,0)">?</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">true</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)"> : </span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">false</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)"> );<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    printf(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)"> alpha = %d<span id="phbbxrx" class="Apple-converted-space"> </span></span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, myTable[</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">alpha</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">].GetInteger());<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    printf(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)"> backgroundimage = %s<span id="pbtfprz" class="Apple-converted-space"> </span></span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, myTable[</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">backgroundimage</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">].GetString() );<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span></div></div><br /> <h2 style="padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">    涓夈佹洿鏀歸厤緗枃浠?/h2>    璇誨彇閰嶇疆鏂囦歡鐨勮繃紼嬪拰涓婁竴鑺傜被浼鹼紝鏇存敼涓庝繚瀛樺拰絎竴鑺傜被浼箋備唬鐮佸涓嬶細<br /> <div style="border-right: windowtext 0.5pt solid; padding-right: 5.4pt; background-position: 0% 50%; border-top: windowtext 0.5pt solid; padding-left: 5.4pt; background-attachment: scroll;background-image: none; padding-bottom: 4px; border-left: windowtext 0.5pt solid; width: 659px; padding-top: 4px; border-bottom: windowtext 0.5pt solid; background-color: rgb(230,230,230); background-origin: initial; background-clip: initial"> <div><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><span style="color: rgb(0,0,255)">void</span><span style="color: rgb(0,0,0)"> RewriteTableContents()<br /><img id="_28_392_Open_Image" style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" onclick="this.style.display='none'; document.getElementById('_28_392_Open_Text').style.display='none'; document.getElementById('_28_392_Closed_Image').style.display='inline'; document.getElementById('_28_392_Closed_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" align="top"></span><span id="_28_392_Open_Text"><span style="color: rgb(0,0,0)">{<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    LuaStateOwner state;<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    state</span><span style="color: rgb(0,0,0)">-></span><span style="color: rgb(0,0,0)">DoFile(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">FirstWindow.lua</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    LuaObject myTable </span><span style="color: rgb(0,0,0)">=</span><span style="color: rgb(0,0,0)"> state</span><span style="color: rgb(0,0,0)">-></span><span style="color: rgb(0,0,0)">GetGlobals()[</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">Window</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">];<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    myTable.SetInteger(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">width</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, </span><span style="color: rgb(0,0,0)">800</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    myTable.SetInteger(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">height</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, </span><span style="color: rgb(0,0,0)">600</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    printf(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">new width=%d, height=%d<span id="ppr7dd7" class="Apple-converted-space"> </span></span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">,myTable[</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">width</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">].GetInteger(), myTable[</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">height</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">].GetInteger());<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    state</span><span style="color: rgb(0,0,0)">-></span><span style="color: rgb(0,0,0)">DumpObject(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">FirstWindow.lua</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, </span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">Window</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, state</span><span style="color: rgb(0,0,0)">-></span><span style="color: rgb(0,0,0)">GetGlobals()[</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">Window</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">]);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span></div></div>    鍊煎緱娉ㄦ剰鐨勬槸錛屾洿鏂伴厤緗枃浠舵椂錛屼笉鑳藉崟鐙洿鏂拌〃鏍肩殑鏌愪竴涓厓绱犮傛垜璇曢獙浜嗕笅錛屽嚭閿欍備篃璁告槸鎴戠殑鏂規(guī)硶涓嶅銆傛墍浠ユ垜鐜板湪涓嬈℃洿鏂版暣涓〃鏍箋?br /><br />    涓嬮潰鏄痬ain鍑芥暟錛?br />    <div style="border-right: windowtext 0.5pt solid; padding-right: 5.4pt; background-position: 0% 50%; border-top: windowtext 0.5pt solid; padding-left: 5.4pt; background-attachment: scroll;background-image: none; padding-bottom: 4px; border-left: windowtext 0.5pt solid; width: 659px; padding-top: 4px; border-bottom: windowtext 0.5pt solid; background-color: rgb(230,230,230); background-origin: initial; background-clip: initial"> <div><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><span style="color: rgb(0,0,255)">int</span><span style="color: rgb(0,0,0)"> _tmain(</span><span style="color: rgb(0,0,255)">int</span><span style="color: rgb(0,0,0)"> argc, _TCHAR</span><span style="color: rgb(0,0,0)">*</span><span style="color: rgb(0,0,0)"> argv[])<br /><img id="_37_381_Open_Image" style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" onclick="this.style.display='none'; document.getElementById('_37_381_Open_Text').style.display='none'; document.getElementById('_37_381_Closed_Image').style.display='inline'; document.getElementById('_37_381_Closed_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" align="top"></span><span id="_37_381_Open_Text"><span style="color: rgb(0,0,0)">{<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    printf(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">now create table and save in FirstWindow.lua:<span id="tlvxhrx" class="Apple-converted-space"> </span></span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    SaveTable();<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    printf(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">now read table from FirstWindow.lua:<span id="txfrtlb" class="Apple-converted-space"> </span></span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    ReadShowTable();<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    printf(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">now retrieve the table, change the "width" and "height" value, then save:<span id="zjj7vfx" class="Apple-converted-space"> </span></span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    RewriteTableContents();<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    printf(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">now, re-read from FirstWindow.lua:<span id="hjjjbdd" class="Apple-converted-space"> </span></span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    ReadShowTable();<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="color: rgb(0,0,255)">return</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,0)">0</span><span style="color: rgb(0,0,0)">;<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span></div></div><br />    宸ョ▼鐨勮緗拰涓婁竴綃囨枃绔犱竴鏍楓?br />    F7緙栬瘧鍚嶤TRL+F5鍗沖彲鐪嬪埌榪愯緇撴灉銆?br /><br />    鍊煎緱娉ㄦ剰鐨勬槸錛宼able鍙互宓屽table銆傝繖鏍鋒垜浠究鍙互瀹炵幇澶嶆潅鐨勯厤緗枃浠躲?/span><img src ="http://www.shnenglu.com/wc250en007/aggbug/151283.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/wc250en007/" target="_blank">Let me see see</a> 2011-07-18 10:08 <a href="http://www.shnenglu.com/wc250en007/archive/2011/07/18/151283.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>luaplus瀛︿範錛堜竴錛?杞?/title><link>http://www.shnenglu.com/wc250en007/archive/2011/07/18/151282.html</link><dc:creator>Let me see see</dc:creator><author>Let me see see</author><pubDate>Mon, 18 Jul 2011 02:07:00 GMT</pubDate><guid>http://www.shnenglu.com/wc250en007/archive/2011/07/18/151282.html</guid><wfw:comment>http://www.shnenglu.com/wc250en007/comments/151282.html</wfw:comment><comments>http://www.shnenglu.com/wc250en007/archive/2011/07/18/151282.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/wc250en007/comments/commentRss/151282.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/wc250en007/services/trackbacks/151282.html</trackback:ping><description><![CDATA[<span id="nfxj7zh" class="Apple-style-span" style="word-spacing: 0px; font: 14px/26px Arial; text-transform: none; color: rgb(51,51,51); text-indent: 0px; white-space: normal; letter-spacing: normal; background-color: rgb(255,255,255); text-align: left; orphans: 2; widows: 2; webkit-text-decorations-in-effect: none; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px">    鎯沖湪鎴戠殑欏圭洰涓嬌鐢↙ua鑴氭湰璇█銆傛渶鍒濈煡閬揕ua鏄氳繃CEGUI錛屽悗鏉ュ洜涓轟竴浜涘師鍥犱笉鎵撶畻浣跨敤CEGUI浜嗭紝鍙ソ鍗曠嫭浣跨敤Lua銆傚湪緗戜笂鐪嬪埌LuaPlus錛岃矊浼兼瘮杈冪畝鍗曘傚湪姝よ褰曞涔犺繃紼嬨?br />    鍙互鍒拌繖閲宧ttp://luaplus.org/tiki-index.php?page=LuaPlus+Home+Page涓嬭澆LuaPlus鐨剋in32浜岃繘鍒舵枃浠跺拰婧愮爜鍖呫備粠婧愮爜鍖呮彁鍙栧ご鏂囦歡錛屼粠浜岃繘鍒跺寘鎻愬彇DLL鏂囦歡銆?br />    LuaPlus瀵筁ua鍋氫簡淇敼鍜屽皝瑁咃紝浣垮緱Lua鍜孋++鐨勪氦浜掓洿涓虹畝鍗曘傚彲浠ヤ粠涓婇潰鐨勯摼鎺ユ壘鍒板畠鐨勪粙緇嶃?br /><br />    鍏堢畝鍗曠殑鍋氫袱涓祴璇曪細錛?錛変粠C++涓皟鐢↙ua鑴氭湰涓殑鍑芥暟錛涳紙2錛変粠Lua鑴氭湰涓皟鐢–++閲岀殑鍑芥暟銆?br /><br /> <h2 style="padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">    涓銆佸伐紼嬮厤緗?/h2>    VC7.1涓柊寤簑in32鎺у埗鍙板伐紼婽estLuaPlusLib銆?br /><br />    瑙e喅鏂規(guī)瑙嗗浘涓彸閿偣鍑籘estLuaPlusLib錛岄夊睘鎬э紱閰嶇疆緇勫悎妗嗛?#8220;鎵鏈夐厤緗?#8221;錛涗緷嬈$偣鍑?#8220;閰嶇疆灞炴?#8221;銆?#8220;C/C++”銆?#8220;甯歌”錛屽湪闄勫姞鍖呭惈鐩綍閲屾坊鍔犳簮鐮佽В鍘嬪悗鎵鍦ㄧ殑璺緞錛堟垜鐨勶細E:/sources/LuaPlus/LuaPlus51_Build1100/Src/LuaPlus錛夛紱渚濇鐐瑰嚮“榪炴帴鍣?#8221;銆?#8220;甯歌”錛屽湪闄勫姞搴撶洰褰曚腑娣誨姞浜岃繘鍒跺寘瑙e帇鍚庢墍鍦ㄧ殑璺緞錛堟垜鐨勶細E:/sources/LuaPlus/LuaPlus51_Build1100_Win32/Lib/win32錛夈?br /><br />    鍦═estLuaPlusLib.cpp涓姞鍏ュ涓嬪嚑琛屼唬鐮侊紝灝嗗ご鏂囦歡鍜屽簱鏂囦歡鍔犲叆榪涙潵銆?br /><br /> <div> <div style="border-right: windowtext 0.5pt solid; padding-right: 5.4pt; background-position: 0% 50%; border-top: windowtext 0.5pt solid; padding-left: 5.4pt; background-attachment: scroll;background-image: none; padding-bottom: 4px; border-left: windowtext 0.5pt solid; width: 659px; padding-top: 4px; border-bottom: windowtext 0.5pt solid; background-color: rgb(230,230,230); background-origin: initial; background-clip: initial"> <div><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><span style="color: rgb(0,0,0)">    #include </span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">luaplus.h</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />    </span><span style="color: rgb(0,0,255)">#if</span><span style="color: rgb(0,0,0)"> defined(DEBUG) || defined(_DEBUG)</span><span style="color: rgb(0,0,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />    </span><span style="color: rgb(0,0,255)">#pragma</span><span style="color: rgb(0,0,0)"> comment(lib, "LuaPlusD_1100.lib")</span><span style="color: rgb(0,0,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />    </span><span style="color: rgb(0,0,255)">#else</span><span style="color: rgb(0,0,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />    </span><span style="color: rgb(0,0,255)">#pragma</span><span style="color: rgb(0,0,0)"> comment(lib, "LuaPlus_1100.lib")</span><span style="color: rgb(0,0,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />    </span><span style="color: rgb(0,0,255)">#endif</span><span style="color: rgb(0,0,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />    </span><span style="color: rgb(0,0,255)">using</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,255)">namespace</span><span style="color: rgb(0,0,0)"> LuaPlus;<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /></span></div></div><br />    宸ョ▼閰嶇疆鍩烘湰涓婂畬鎴愪簡銆?/div>   <span id="rjblvvn" class="Apple-converted-space"> </span><br /> <h2 style="padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">   浜屻佹祴璇曠敤Lua鑴氭湰</h2>    濡備笅寤虹珛嫻嬭瘯鐢ㄧ殑Lua鑴氭湰騫朵繚瀛樺湪浣犲嵆灝嗙敓鎴愮殑鍙墽琛屾枃浠舵墍鍦ㄧ殑鐩綍涓嬨傚悓鏃墮渶瑕佹妸浜岃繘鍒跺寘涓殑LuaPlusD_1100.dll鍜孡uaPlus_1100.dll鎷瘋礉鍒拌鐩綍涓嬨?br /> <div style="border-right: windowtext 0.5pt solid; padding-right: 5.4pt; background-position: 0% 50%; border-top: windowtext 0.5pt solid; padding-left: 5.4pt; background-attachment: scroll;background-image: none; padding-bottom: 4px; border-left: windowtext 0.5pt solid; width: 659px; padding-top: 4px; border-bottom: windowtext 0.5pt solid; background-color: rgb(230,230,230); background-origin: initial; background-clip: initial"> <div><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><span style="color: rgb(0,0,0)">    health </span><span style="color: rgb(0,0,0)">=</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,0)">100</span><span style="color: rgb(0,0,0)">;<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />    PrintNumber(</span><span style="color: rgb(0,0,0)">30</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /> <br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />    function Add(x, y)<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />        </span><span style="color: rgb(0,0,255)">return</span><span style="color: rgb(0,0,0)"> x </span><span style="color: rgb(0,0,0)">+</span><span style="color: rgb(0,0,0)"> y;<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />    end<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /></span></div></div><br /> <div>    health = 100;Lua鑴氭湰涓殑鍏ㄥ眬鍙橀噺錛屽彲浠ヨC++鏂囦歡璁塊棶銆?br />    PrintNumber(30);璇ヨ鍙ヨ皟鐢–++鏂囦歡涓殑鍑芥暟錛屾墦鍗版暟瀛楀埌鎺у埗鍙扮獥鍙c?br />    function Add(x,y)澹版槑涓涓嚱鏁幫紝C++鏂囦歡浼氭壘鍒板茍璋冪敤姝ゅ嚱鏁般?br /><br /> <h2 style="padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">    涓夈丆++瀹炵幇</h2>    鍦═estLuaPlusLib.cpp涓姞鍏ヤ笅闈袱涓嚱鏁般?br /> <div style="border-right: windowtext 0.5pt solid; padding-right: 5.4pt; background-position: 0% 50%; border-top: windowtext 0.5pt solid; padding-left: 5.4pt; background-attachment: scroll;background-image: none; padding-bottom: 4px; border-left: windowtext 0.5pt solid; width: 659px; padding-top: 4px; border-bottom: windowtext 0.5pt solid; background-color: rgb(230,230,230); background-origin: initial; background-clip: initial"> <div><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><span style="color: rgb(0,0,255)">static</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,255)">int</span><span style="color: rgb(0,0,0)"> PrintLSNumber(LuaState</span><span style="color: rgb(0,0,0)">*</span><span style="color: rgb(0,0,0)"> state)<br /><img id="_42_210_Open_Image" style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" onclick="this.style.display='none'; document.getElementById('_42_210_Open_Text').style.display='none'; document.getElementById('_42_210_Closed_Image').style.display='inline'; document.getElementById('_42_210_Closed_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" align="top"></span><span id="_42_210_Open_Text"><span style="color: rgb(0,0,0)">{<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    LuaStack args(state);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="color: rgb(0,128,0)">//</span><span style="color: rgb(0,128,0)"> Verify it is a number and print it.</span><span style="color: rgb(0,128,0)"><br /><img id="_133_175_Open_Image" style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" onclick="this.style.display='none'; document.getElementById('_133_175_Open_Text').style.display='none'; document.getElementById('_133_175_Closed_Image').style.display='inline'; document.getElementById('_133_175_Closed_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" align="top"></span><span style="color: rgb(0,0,0)">    </span><span style="color: rgb(0,0,255)">if</span><span style="color: rgb(0,0,0)"> (args[</span><span style="color: rgb(0,0,0)">1</span><span style="color: rgb(0,0,0)">].IsNumber()) </span><span id="_133_175_Open_Text"><span style="color: rgb(0,0,0)">{<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />        printf(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">%f<span id="dfhb9hr" class="Apple-converted-space"> </span></span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, args[</span><span style="color: rgb(0,0,0)">1</span><span style="color: rgb(0,0,0)">].GetNumber());<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span></span><span style="color: rgb(0,0,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="color: rgb(0,128,0)">//</span><span style="color: rgb(0,128,0)"> No return values.</span><span style="color: rgb(0,128,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: rgb(0,0,0)">    </span><span style="color: rgb(0,0,255)">return</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,0)">0</span><span style="color: rgb(0,0,0)">;<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="color: rgb(0,0,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /></span><span style="color: rgb(0,0,255)">void</span><span style="color: rgb(0,0,0)"> test() <br /><img id="_227_906_Open_Image" style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" onclick="this.style.display='none'; document.getElementById('_227_906_Open_Text').style.display='none'; document.getElementById('_227_906_Closed_Image').style.display='inline'; document.getElementById('_227_906_Closed_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" align="top"></span><span id="_227_906_Open_Text"><span style="color: rgb(0,0,0)">{<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="color: rgb(0,128,0)">//</span><span style="color: rgb(0,128,0)">Create state</span><span style="color: rgb(0,128,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: rgb(0,0,0)">    LuaStateOwner state;<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="color: rgb(0,128,0)">//</span><span style="color: rgb(0,128,0)">With this the script can access our own C++ functions:</span><span style="color: rgb(0,128,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: rgb(0,0,0)">    state</span><span style="color: rgb(0,0,0)">-></span><span style="color: rgb(0,0,0)">GetGlobals().Register(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">PrintNumber</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, PrintLSNumber);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="color: rgb(0,128,0)">//</span><span style="color: rgb(0,128,0)">Open test file:</span><span style="color: rgb(0,128,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: rgb(0,0,0)">    </span><span style="color: rgb(0,0,255)">int</span><span style="color: rgb(0,0,0)"> iret </span><span style="color: rgb(0,0,0)">=</span><span style="color: rgb(0,0,0)"> state</span><span style="color: rgb(0,0,0)">-></span><span style="color: rgb(0,0,0)">DoFile(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">test.lua</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />     </span><span style="color: rgb(0,128,0)">//</span><span style="color: rgb(0,128,0)">Get a global variable:</span><span style="color: rgb(0,128,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: rgb(0,0,0)">    LuaObject sObj </span><span style="color: rgb(0,0,0)">=</span><span style="color: rgb(0,0,0)"> state</span><span style="color: rgb(0,0,0)">-></span><span style="color: rgb(0,0,0)">GetGlobal(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">health</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="color: rgb(0,0,255)">int</span><span style="color: rgb(0,0,0)"> mytest </span><span style="color: rgb(0,0,0)">=</span><span style="color: rgb(0,0,0)"> sObj.GetInteger();<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    printf(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">init value in luascript:%d<span id="r9t7dnn" class="Apple-converted-space"> </span></span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, mytest);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="color: rgb(0,128,0)">//</span><span style="color: rgb(0,128,0)">Update the value:</span><span style="color: rgb(0,128,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: rgb(0,0,0)">    sObj.AssignInteger(state, </span><span style="color: rgb(0,0,0)">50</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="color: rgb(0,128,0)">//</span><span style="color: rgb(0,128,0)">Get value again:</span><span style="color: rgb(0,128,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: rgb(0,0,0)">    mytest </span><span style="color: rgb(0,0,0)">=</span><span style="color: rgb(0,0,0)"> sObj.GetInteger();<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    printf(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">after changed by c++:%d<span id="xhjj1zp" class="Apple-converted-space"> </span></span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, mytest);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="color: rgb(0,128,0)">//</span><span style="color: rgb(0,128,0)">Call a function in lua:</span><span style="color: rgb(0,128,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: rgb(0,0,0)">    LuaFunction</span><span style="color: rgb(0,0,0)"><</span><span style="color: rgb(0,0,255)">int</span><span style="color: rgb(0,0,0)">></span><span style="color: rgb(0,0,0)"> Add </span><span style="color: rgb(0,0,0)">=</span><span style="color: rgb(0,0,0)">  state</span><span style="color: rgb(0,0,0)">-></span><span style="color: rgb(0,0,0)">GetGlobal(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">Add</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="color: rgb(0,0,255)">int</span><span style="color: rgb(0,0,0)"> myret </span><span style="color: rgb(0,0,0)">=</span><span style="color: rgb(0,0,0)"> Add(</span><span style="color: rgb(0,0,0)">3</span><span style="color: rgb(0,0,0)">, </span><span style="color: rgb(0,0,0)">4</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    printf(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">Call add() in luascript,ret=%d<span id="dldlf97" class="Apple-converted-space"> </span></span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, myret);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="color: rgb(0,0,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /></span></div></div><br />    main鍑芥暟錛?br /> <div style="border-right: windowtext 0.5pt solid; padding-right: 5.4pt; background-position: 0% 50%; border-top: windowtext 0.5pt solid; padding-left: 5.4pt; background-attachment: scroll;background-image: none; padding-bottom: 4px; border-left: windowtext 0.5pt solid; width: 659px; padding-top: 4px; border-bottom: windowtext 0.5pt solid; background-color: rgb(230,230,230); background-origin: initial; background-clip: initial"> <div><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><span style="color: rgb(0,0,255)">int</span><span style="color: rgb(0,0,0)"> _tmain(</span><span style="color: rgb(0,0,255)">int</span><span style="color: rgb(0,0,0)"> argc, _TCHAR</span><span style="color: rgb(0,0,0)">*</span><span style="color: rgb(0,0,0)"> argv[])<br /><img id="_37_59_Open_Image" style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" onclick="this.style.display='none'; document.getElementById('_37_59_Open_Text').style.display='none'; document.getElementById('_37_59_Closed_Image').style.display='inline'; document.getElementById('_37_59_Closed_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" align="top"></span><span id="_37_59_Open_Text"><span style="color: rgb(0,0,0)">{<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    test();<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="color: rgb(0,0,255)">return</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,0)">0</span><span style="color: rgb(0,0,0)">;<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span></div></div></div> <div> <br />    鐜板湪鍙互緙栬瘧浜嗭紝緙栬瘧瀹屾垚涔嬪悗榪愯錛屽彲浠ュ湪鎺у埗鍙扮獥鍙d腑鐪嬪埌緇撴灉銆?br />    闇瑕佹敞鎰忕殑鏄墽琛岃剼鏈鍦ㄦ敞鍐孋++鍑芥暟鍒癓ua妯″潡涔嬪悗榪涜銆?br />    鍩烘湰涓婃槸鎸夌収http://gpwiki.org/index.php/Scripting_with_LuaPlus_and_Cpp鏉ュ仛鐨勶紝鍔犲叆浜嗗伐紼嬭緗儴鍒嗐傝閾炬帴鐨勪唬鐮侊紙test鍑芥暟錛変細鎶ラ敊錛堣皟鐢ㄤ簡math搴撲腑鐨刢os鍑芥暟錛屼絾鏄病鏈夎皟鐢∣penLibs()鍑芥暟錛夛紝鎴戜慨鏀逛簡涓涓嬶紝鍘繪帀浜嗗math搴撶殑寮曠敤銆?br /><br /> <h3 style="padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">   鐩稿叧璧勬簮閾炬帴錛?/h3>    1>LuaPlus鐨勬枃妗o細http://www.gamedev.net/reference/programming/features/lua/<br />    2>LuaPlus鍒濈駭鏁欑▼錛歨ttp://wwhiz.com/LuaPlus/LuaPlus.html</div></span><img src ="http://www.shnenglu.com/wc250en007/aggbug/151282.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/wc250en007/" target="_blank">Let me see see</a> 2011-07-18 10:07 <a href="http://www.shnenglu.com/wc250en007/archive/2011/07/18/151282.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://www.shnenglu.com/" title="精品视频久久久久">精品视频久久久久</a> <div class="friend-links"> </div> </div> </footer> <a href="http://www.z5u5.cn" target="_blank">久久综合九色欧美综合狠狠</a>| <a href="http://www.bltt.net.cn" target="_blank">久久精品蜜芽亚洲国产AV</a>| <a href="http://www.taibeitengxun.cn" target="_blank">久久久久99精品成人片三人毛片</a>| <a href="http://www.xkart.cn" target="_blank">久久人人爽人爽人人爽av</a>| <a href="http://www.leathvx.cn" target="_blank">伊人久久大香线蕉av一区</a>| <a href="http://www.u6768.cn" target="_blank">久久精品嫩草影院</a>| <a href="http://www.expo2006sy.com.cn" target="_blank">性做久久久久久免费观看</a>| <a href="http://www.jsfkf.cn" target="_blank">久久国产精品久久</a>| <a href="http://www.panxl.cn" target="_blank">国内精品久久国产</a>| <a href="http://www.zhoucheng888.cn" target="_blank">久久精品国产免费</a>| <a href="http://www.ccssoo.com.cn" target="_blank">亚洲综合熟女久久久30p</a>| <a href="http://www.lttao.cn" target="_blank">久久久久无码专区亚洲av</a>| <a href="http://www.qimenglw.cn" target="_blank">久久久久免费看成人影片</a>| <a href="http://www.haoxiaoli.cn" target="_blank">蜜臀久久99精品久久久久久 </a>| <a href="http://www.kouziye.cn" target="_blank">日本加勒比久久精品</a>| <a href="http://www.gzsaikou.cn" target="_blank">性做久久久久久久</a>| <a href="http://www.hzmgdj.com.cn" target="_blank">欧美久久天天综合香蕉伊</a>| <a href="http://www.xuzhou86.cn" target="_blank">久久99国产精一区二区三区</a>| <a href="http://www.ytcp.com.cn" target="_blank">久久综合亚洲色HEZYO社区</a>| <a href="http://www.huangjiabbs.cn" target="_blank">国内精品久久久久影院网站</a>| <a href="http://www.gdfw.org.cn" target="_blank">精品熟女少妇a∨免费久久</a>| <a href="http://www.vzrg.cn" target="_blank">久久人人爽人人爽人人片AV麻烦 </a>| <a href="http://www.4008881898.com.cn" target="_blank">亚洲精品综合久久</a>| <a href="http://www.mxcqsf.cn" target="_blank">97精品伊人久久久大香线蕉</a>| <a href="http://www.minghuzisha.cn" target="_blank">人人狠狠综合久久88成人</a>| <a href="http://www.yeziseo.cn" target="_blank">中文国产成人精品久久亚洲精品AⅤ无码精品 </a>| <a href="http://www.yahooproxy.cn" target="_blank">久久精品中文字幕无码绿巨人</a>| <a href="http://www.5o42i9.cn" target="_blank">久久久久亚洲av毛片大</a>| <a href="http://www.jbeq.cn" target="_blank">国产真实乱对白精彩久久</a>| <a href="http://www.jisuvpn.cn" target="_blank">精品久久一区二区</a>| <a href="http://www.mogodo.cn" target="_blank">99久久精品国产高清一区二区</a>| <a href="http://www.51uhq.cn" target="_blank">国产激情久久久久久熟女老人 </a>| <a href="http://www.dyzwar.cn" target="_blank">亚洲va久久久噜噜噜久久狠狠</a>| <a href="http://www.abovefq.cn" target="_blank">一本色综合久久</a>| <a href="http://www.ampv.cn" target="_blank">亚洲欧美日韩精品久久亚洲区 </a>| <a href="http://www.9746.com.cn" target="_blank">久久久久久久久久免免费精品</a>| <a href="http://www.gn-online.com.cn" target="_blank">久久久久久狠狠丁香</a>| <a href="http://www.xzxms.cn" target="_blank">国产一区二区三区久久精品</a>| <a href="http://www.bleg.cn" target="_blank">91久久精品91久久性色</a>| <a href="http://www.spiralstar.com.cn" target="_blank">久久夜色精品国产噜噜噜亚洲AV </a>| <a href="http://www.btalhb.cn" target="_blank">国产精品久久久久久搜索</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>