<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Touch event code</title><link>https://sourceforge.net/p/wizapply/home/Touch%2520event%2520code/</link><description>Recent changes to Touch event code</description><atom:link href="https://sourceforge.net/p/wizapply/home/Touch%20event%20code/feed" rel="self"/><language>en</language><lastBuildDate>Thu, 14 Jun 2012 11:33:23 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/wizapply/home/Touch%20event%20code/feed" rel="self" type="application/rss+xml"/><item><title>WikiPage Touch event code modified by smilytics</title><link>https://sourceforge.net/p/wizapply/home/Touch%2520event%2520code/</link><description>&lt;pre&gt;--- v4
+++ v5
@@ -6,38 +6,58 @@
 
 ####Code####
 ~~~~~
-#include &lt;use_sherry.h&gt;
-#include &lt;shEntryPoint.h&gt;
+#include &lt;EntryPoint.h&gt;
 
 static void UpdateFunc(void);
-static void DrawFunc(void);
 
-shTexture g_gazou1;        //image
-shVector2 g_ringPos[3];    //cursor pos
+wzTexture g_gazou1;        //image
+wzVector2 g_ringPos[3];    //cursor pos
 
 int Initialize()
 {   //!App initialize Process
-    shInitCreateSherry("smatcha sample",320,480,0,Direct3D9);
-    shSetClearColor(0.1f,0.1f,0.1f);
-    shSetSpriteScSize(320, 480);
+    wzInitCreateWizapply("smatcha sample",320,480,0);
+    wzSetClearColor(0.1f,0.1f,0.1f);
+    wzSetSpriteScSize(320, 480);
 
     //file path to correspond to the various platforms that give shDCP.
     //For Windows "./contents" folder into the image.
-    if(shCreateTextureFromPNG(&amp;g_gazou1, shDCP("mover.png"))) {
+    if(wzCreateTextureFromPNG(&amp;g_gazou1, wzDCP("mover.png"))) {
         printf("Failed to load the image.\n");
         return 1;
     }
 
-    shSetUpdateThread(60,UpdateFunc);
-    shSetDrawThread(DrawFunc);
+    wzSetUpdateThread(60,UpdateFunc);
+
     return 0;
 }
 
 int Terminate()
 {   //!App exit process
-    shDeleteTexture(&amp;g_gazou1);
-    shExitSherry();
+    wzDeleteTexture(&amp;g_gazou1);
+    wzExitSherry();
     return 0;
+}
+
+void DrawLoop(void)
+{   //!Draw
+    int i;
+    wzVector2 texcoord[3] = {{0.0f,0.5f},{0.5f,0.0f},{0.5f,0.5f}};
+
+    // Screen Clear
+    wzClear();
+
+    // Desable depth
+    wzSetDepthTest(SH_FALSE);
+
+    // Draw
+    for(i = 0; i &lt; 3; i++) {
+        wzSetSpriteColor(1.0f, 1.0f, 1.0f, 1.0f);
+        wzSetSpritePosition(g_ringPos[i].x,g_ringPos[i].y,0.0f);
+        wzSetSpriteSize(64,64);
+        wzSetSpriteTexCoord(texcoord[i].x, texcoord[i].y, 0.5f, 0.5f);
+        wzSetSpriteTexture(&amp;g_gazou);
+        wzSpriteDraw();
+    }
 }
 
 void UpdateFunc(void)
@@ -45,11 +65,11 @@
     int i;
 
     int isTouch[3] = {0};
-    shVector2 mousePos[3];
+    wzVector2 mousePos[3];
 
     // Windows, for Mac, PC, enter only one of the mouse cursor.
     for(i = 0; i &lt; 3; i++)
-        isTouch[i] = shGetCursorSrPos(i, &amp;mousePos[i].x, &amp;mousePos[i].y);
+        isTouch[i] = wzGetCursorSrPos(i, &amp;mousePos[i].x, &amp;mousePos[i].y);
 
     for(i = 0; i &lt; 3; i++) {
         g_ringPos[i].x = g_ringPos[i].y = (-256.0f);    //Out screen
@@ -60,27 +80,6 @@
     }
 }
 
-void DrawFunc(void)
-{   //!Draw
-    int i;
-    shVector2 texcoord[3] = {{0.0f,0.5f},{0.5f,0.0f},{0.5f,0.5f}};
-
-    // Screen Clear
-    shClear();
-
-    // Desable depth
-    shSetDepthTest(SH_FALSE);
-
-    // Draw
-    for(i = 0; i &lt; 3; i++) {
-        shSetSpriteColor(1.0f, 1.0f, 1.0f, 1.0f);
-        shSetSpritePosition(g_ringPos[i].x,g_ringPos[i].y,0.0f);
-        shSetSpriteSize(64,64);
-        shSetSpriteTexCoord(texcoord[i].x, texcoord[i].y, 0.5f, 0.5f);
-        shSetSpriteTexture(&amp;g_gazou);
-        shSpriteDraw();
-    }
-}
 ~~~~~
 
 &lt;hr&gt;
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">smilytics</dc:creator><pubDate>Thu, 14 Jun 2012 11:33:23 -0000</pubDate><guid>https://sourceforge.net37a517f36a585dede3cf6df7e2823e2dbd75e93d</guid></item><item><title>WikiPage Touch event code modified by smilytics</title><link>https://sourceforge.net/p/wizapply/home/Touch%2520event%2520code/</link><description>&lt;pre&gt;--- v3 
+++ v4 
@@ -23,67 +23,68 @@
 
     //file path to correspond to the various platforms that give shDCP.
     //For Windows "./contents" folder into the image.
-    if(shCreateTextureFromPNG(&amp;g_gazou1, shDCP("gazou1.png"))) {
+    if(shCreateTextureFromPNG(&amp;g_gazou1, shDCP("mover.png"))) {
         printf("Failed to load the image.\n");
         return 1;
     }
 
     shSetUpdateThread(60,UpdateFunc);
     shSetDrawThread(DrawFunc);
     return 0;
 }
 
 int Terminate()
 {   //!App exit process
     shDeleteTexture(&amp;g_gazou1);
     shExitSherry();
     return 0;
 }
 
 void UpdateFunc(void)
 {   //!Update
     int i;
 
     int isTouch[3] = {0};
     shVector2 mousePos[3];
 
     // Windows, for Mac, PC, enter only one of the mouse cursor.
     for(i = 0; i &lt; 3; i++)
         isTouch[i] = shGetCursorSrPos(i, &amp;mousePos[i].x, &amp;mousePos[i].y);
 
     for(i = 0; i &lt; 3; i++) {
         g_ringPos[i].x = g_ringPos[i].y = (-256.0f);    //Out screen
         if(isTouch[i]) {
             g_ringPos[i].x = mousePos[i].x;
             g_ringPos[i].y = mousePos[i].y;
         }
     }
 }
 
 void DrawFunc(void)
 {   //!Draw
     int i;
     shVector2 texcoord[3] = {{0.0f,0.5f},{0.5f,0.0f},{0.5f,0.5f}};
 
     // Screen Clear
     shClear();
 
     // Desable depth
     shSetDepthTest(SH_FALSE);
 
     // Draw
     for(i = 0; i &lt; 3; i++) {
         shSetSpriteColor(1.0f, 1.0f, 1.0f, 1.0f);
         shSetSpritePosition(g_ringPos[i].x,g_ringPos[i].y,0.0f);
         shSetSpriteSize(64,64);
         shSetSpriteTexCoord(texcoord[i].x, texcoord[i].y, 0.5f, 0.5f);
         shSetSpriteTexture(&amp;g_gazou);
         shSpriteDraw();
     }
 }
 ~~~~~
 
 &lt;hr&gt;
 ####Contents####
-gazou1.png
-![sample](http://wizapply.com/sf_image/gazou1.png)
+mover.png
+
+![sample](http://wizapply.com/sf_image/mover.png)
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">smilytics</dc:creator><pubDate>Mon, 30 Jan 2012 08:34:32 -0000</pubDate><guid>https://sourceforge.net24ae200dbaf380b831772f86058b98ccb0b3ebec</guid></item><item><title>WikiPage Touch event code modified by smilytics</title><link>https://sourceforge.net/p/wizapply/home/Touch%2520event%2520code/</link><description>&lt;pre&gt;--- v2 
+++ v3 
@@ -82,3 +82,8 @@
     }
 }
 ~~~~~
+
+&lt;hr&gt;
+####Contents####
+gazou1.png
+![sample](http://wizapply.com/sf_image/gazou1.png)
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">smilytics</dc:creator><pubDate>Mon, 30 Jan 2012 08:33:38 -0000</pubDate><guid>https://sourceforge.net59f661ebc6259b5c128c0c0edf3bac8e31bcb0c9</guid></item><item><title>WikiPage Touch event code modified by smilytics</title><link>https://sourceforge.net/p/wizapply/home/Touch%2520event%2520code/</link><description>&lt;pre&gt;--- v1 
+++ v2 
@@ -12,7 +12,8 @@
 static void UpdateFunc(void);
 static void DrawFunc(void);
 
-shTexture g_gazou1;    //image
+shTexture g_gazou1;        //image
+shVector2 g_ringPos[3];    //cursor pos
 
 int Initialize()
 {   //!App initialize Process
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">smilytics</dc:creator><pubDate>Mon, 30 Jan 2012 08:32:44 -0000</pubDate><guid>https://sourceforge.net1457407862c98e53af2e1faf608322be5f290226</guid></item><item><title>WikiPage Touch event code modified by smilytics</title><link>https://sourceforge.net/p/wizapply/home/Touch%2520event%2520code/</link><description>#Touch event code

![sample](http://wizapply.com/sf_image/input_sample.png)

&lt;hr&gt;

####Code####
~~~~~
#include &lt;use_sherry.h&gt;
#include &lt;shEntryPoint.h&gt;

static void UpdateFunc(void);
static void DrawFunc(void);

shTexture g_gazou1;    //image

int Initialize()
{   //!App initialize Process
    shInitCreateSherry("smatcha sample",320,480,0,Direct3D9);
    shSetClearColor(0.1f,0.1f,0.1f);
    shSetSpriteScSize(320, 480);

    //file path to correspond to the various platforms that give shDCP.
    //For Windows "./contents" folder into the image.
    if(shCreateTextureFromPNG(&amp;g_gazou1, shDCP("gazou1.png"))) {
        printf("Failed to load the image.\n");
        return 1;
    }

    shSetUpdateThread(60,UpdateFunc);
    shSetDrawThread(DrawFunc);
    return 0;
}

int Terminate()
{   //!App exit process
    shDeleteTexture(&amp;g_gazou1);
    shExitSherry();
    return 0;
}

void UpdateFunc(void)
{   //!Update
    int i;

    int isTouch[3] = {0};
    shVector2 mousePos[3];

    // Windows, for Mac, PC, enter only one of the mouse cursor.
    for(i = 0; i &lt; 3; i++)
        isTouch[i] = shGetCursorSrPos(i, &amp;mousePos[i].x, &amp;mousePos[i].y);

    for(i = 0; i &lt; 3; i++) {
        g_ringPos[i].x = g_ringPos[i].y = (-256.0f);    //Out screen
        if(isTouch[i]) {
            g_ringPos[i].x = mousePos[i].x;
            g_ringPos[i].y = mousePos[i].y;
        }
    }
}

void DrawFunc(void)
{   //!Draw
    int i;
    shVector2 texcoord[3] = {{0.0f,0.5f},{0.5f,0.0f},{0.5f,0.5f}};

    // Screen Clear
    shClear();

    // Desable depth
    shSetDepthTest(SH_FALSE);

    // Draw
    for(i = 0; i &lt; 3; i++) {
        shSetSpriteColor(1.0f, 1.0f, 1.0f, 1.0f);
        shSetSpritePosition(g_ringPos[i].x,g_ringPos[i].y,0.0f);
        shSetSpriteSize(64,64);
        shSetSpriteTexCoord(texcoord[i].x, texcoord[i].y, 0.5f, 0.5f);
        shSetSpriteTexture(&amp;g_gazou);
        shSpriteDraw();
    }
}
~~~~~</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">smilytics</dc:creator><pubDate>Mon, 30 Jan 2012 08:31:43 -0000</pubDate><guid>https://sourceforge.netb9004bb0a05a1b8843ee7b4bc7de513d44bd3088</guid></item></channel></rss>