德国开元华人社区 开元周游

标题: EZT [打印本页]

作者: hubinjisu    时间: 23.10.2006 08:25
c++   Beispiele<br /><br />// test01.cpp : Definiert den Einstiegspunkt für die Anwendung.<br />//<br /><br />#include &quot;stdafx.h&quot;<br />#include &quot;test01.h&quot;<br />#define MAX_LOADSTRING 100<br /><br />#include &lt;Vision.hpp&gt;<br />#include &lt;VisSampleApp.hpp&gt;<br /><br />// Declare a module to put all our actions into<br />DECLARE_THIS_MODULE(g_sampleModule, MAKE_VERSION(1,0),&quot;Console Sample&quot;, &quot;Trinigy&quot;, &quot;This module contains some sample actions&quot;);<br /><br />int APIENTRY WinMain(HINSTANCE hInstance,<br />                     HINSTANCE hPrevInstance,<br />                     LPTSTR    lpCmdLine,<br />                     int       nCmdShow)<br />{<br />        // create and init our application<br />        VisSampleAppPtr spApp = new VisSampleApp();<br />        if (&#33;spApp-&gt;InitSample(&quot;landscape&quot;))<br />                return -1;<br /><br />        <br /><br />        // limit debug messages to 15 on screen<br />        Vision::Message.SetMaxNum(15);<br /><br />        // resources directory<br />        Vision::File.AddDataDirectory(&quot;..\\res&quot;);<br />        Vision::File.AddDataDirectory(&quot;..\\res\\basedata&quot;);<br /><br />        // load some example map<br />        Vision:oadWorld(&quot;landscape_simple&quot;);<br /><br />        //Enables the Mouse camara<br />        spApp-&gt;EnableMouseCamera(true);<br /><br />        // register the action module with the vision engine action manager<br />        // only after that the action becomes available in the console<br />        VActionManager * pManager = Vision::GetActionManager();<br />        pManager-&gt;RegisterModule (&g_sampleModule);<br /><br />        // game loop<br />        while (spApp-&gt;Run())<br />        {        <br />                // Klick the button Q to save a Screenshot<br />                if(Vision::Key.IsPressed(VGLK_Q))<br />                        Vision::Game.SaveScreenShot();<br />        }<br /><br />        // deinit our application<br />        spApp-&gt;DeInitSample();<br />        return 0;<br />}

Aufgabe 1 EZT.zip

89.85 KB, 下载次数: 95






欢迎光临 德国开元华人社区 开元周游 (https://www.kaiyuan.info/) Powered by Discuz! X3.2