<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Font draw code</title><link>https://sourceforge.net/p/wizapply/home/Font%2520draw%2520code/</link><description>Recent changes to Font draw code</description><atom:link href="https://sourceforge.net/p/wizapply/home/Font%20draw%20code/feed" rel="self"/><language>en</language><lastBuildDate>Thu, 14 Jun 2012 11:37:23 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/wizapply/home/Font%20draw%20code/feed" rel="self" type="application/rss+xml"/><item><title>WikiPage Font draw code modified by smilytics</title><link>https://sourceforge.net/p/wizapply/home/Font%2520draw%2520code/</link><description>&lt;pre&gt;--- v2
+++ v3
@@ -6,42 +6,39 @@
 
 ####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_tex;    //Texture
+wzTexture g_tex;    //Texture
 
 int Initialize()
 {   //!App initialize Process
-    shInitCreateSherry("smatcha sample",320,480,0,Direct3D9);
-    shSetClearColor(0.1f,0.1f,0.1f);
-    shSetSpriteScSize(320, 480);
+    wzInitCreateWizapply("wizapply",320,480,0);
+    wzSetClearColor(0.1f,0.1f,0.1f);
+    wzSetSpriteScSize(320, 480);
 
     //Create font.
-    shCreateFontTexBuffer(&amp;g_tex,1024);
+    wzCreateFontTexBuffer(&amp;g_tex,1024);
 
-    shSetFontFile(shDCP("font.ttf"));    //Setting
-    shSetCharcode(SH_FONTCHARCODE_SJIS);
-    shSetFontDrawType(SH_FONTDRAWTYPE_AA);
-    shSetFontDrawSize(50);
+    wzSetFontFile(shDCP("font.ttf"));    //Setting
+    wzSetCharcode(SH_FONTCHARCODE_SJIS);
+    wzSetFontDrawType(SH_FONTDRAWTYPE_AA);
+    wzSetFontDrawSize(50);
 
-    shSetFontDrawColor(1.0f,1.0f,1.0f);
-    shSetFontDrawPosition(0,0);
-    shFontDrawString("Wizapply:English,日本語");
-    shFontDraw();//Writing
+    wzSetFontDrawColor(1.0f,1.0f,1.0f);
+    wzSetFontDrawPosition(0,0);
+    wzFontDrawString("Wizapply:English,日本語");
+    wzFontDraw();//Writing
 
-    shSetUpdateThread(60,UpdateFunc);
-    shSetDrawThread(DrawFunc);
+    wzSetUpdateThread(60,UpdateFunc);
     return 0;
 }
 
 int Terminate()
 {   //!App exit process
-    shDeleteTexture(&amp;g_tex);
-    shExitSherry();
+    wzDeleteTexture(&amp;g_tex);
+    wzExitWizapply();
     return 0;
 }
 
@@ -50,17 +47,17 @@
     
 }
 
-void DrawFunc(void)
+void DrawLoop(void)
 {   //!Draw
-    shClear();
+    wzClear();
 
-    shSetSpritePosition(80.0f,180.0f,0.0f);
-    shSetSpriteColor(1.0f, 1.0f, 1.0f, 1.0f);
-    shSetSpriteTexCoord(0.0f,0.0f,(float)APPSCREEN_WIDTH/1024.0f,
+    wzSetSpritePosition(80.0f,180.0f,0.0f);
+    wzSetSpriteColor(1.0f, 1.0f, 1.0f, 1.0f);
+    wzSetSpriteTexCoord(0.0f,0.0f,(float)APPSCREEN_WIDTH/1024.0f,
                         (float)APPSCREEN_HEIGHT/1024.0f);
-    shSetSpriteSizeLeftUp(APPSCREEN_WIDTH,APPSCREEN_HEIGHT);
-    shSetSpriteTexture(&amp;g_tex);
-    shSpriteDraw(); //View
+    wzSetSpriteSizeLeftUp(APPSCREEN_WIDTH,APPSCREEN_HEIGHT);
+    wzSetSpriteTexture(&amp;g_tex);
+    wzSpriteDraw(); //View
 }
 ~~~~~
 
@@ -74,34 +71,32 @@
 
 ####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);
 
 int Initialize()
 {   //!App initialize Process
-    shInitCreateSherry("smatcha sample",320,480,0,Direct3D9);
-    shSetClearColor(0.1f,0.1f,0.1f);
-    shSetSpriteScSize(320, 480);
+    wzInitCreateWizapply("wizapply",320,480,0);
+    wzSetClearColor(0.1f,0.1f,0.1f);
+    wzSetSpriteScSize(320, 480);
 
     //Create font.
-    shCreateFontScBuffer(320, 480);
+    wzCreateFontScBuffer(320, 480);
 
-    shSetFontFile(shDCP("font.ttf"));    //Setting
-    shSetCharcode(SH_FONTCHARCODE_SJIS);
-    shSetFontDrawType(SH_FONTDRAWTYPE_AA);
-    shSetFontDrawSize(50);
+    wzSetFontFile(shDCP("font.ttf"));    //Setting
+    wzSetCharcode(SH_FONTCHARCODE_SJIS);
+    wzSetFontDrawType(SH_FONTDRAWTYPE_AA);
+    wzSetFontDrawSize(50);
 
-    shSetUpdateThread(60,UpdateFunc);
-    shSetDrawThread(DrawFunc);
+    wzSetUpdateThread(60,UpdateFunc);
+
     return 0;
 }
 
 int Terminate()
 {   //!App exit process
-    shExitSherry();
+    wzExitWizapply();
     return 0;
 }
 
@@ -110,16 +105,16 @@
     
 }
 
-void DrawFunc(void)
+void DrawLoop(void)
 {   //!Draw
-    shClear();
+    wzClear();
 
-    shFontDrawClear();
+    wzFontDrawClear();
 
-    shSetFontDrawColor(1.0f,1.0f,1.0f);
-    shSetFontDrawPosition(120,140);
-    shFontDrawString("Wizapply:English,日本語");
+    wzSetFontDrawColor(1.0f,1.0f,1.0f);
+    wzSetFontDrawPosition(120,140);
+    wzFontDrawString("Wizapply:English,日本語");
 
-    shFontDraw();
+    wzFontDraw();
 }
 ~~~~~
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">smilytics</dc:creator><pubDate>Thu, 14 Jun 2012 11:37:23 -0000</pubDate><guid>https://sourceforge.netf4966ce7bc8994d6e01f8ca38c64f8e51bc6c419</guid></item><item><title>WikiPage Font draw code modified by smilytics</title><link>https://sourceforge.net/p/wizapply/home/Font%2520draw%2520code/</link><description>&lt;pre&gt;--- v1 
+++ v2 
@@ -21,72 +21,73 @@
     shSetSpriteScSize(320, 480);
 
     //Create font.
-    shCreateFontScBuffer(320, 480);
-
+    shCreateFontTexBuffer(&amp;g_tex,1024);
+
     shSetFontFile(shDCP("font.ttf"));    //Setting
     shSetCharcode(SH_FONTCHARCODE_SJIS);
     shSetFontDrawType(SH_FONTDRAWTYPE_AA);
     shSetFontDrawSize(50);
 
     shSetFontDrawColor(1.0f,1.0f,1.0f);
     shSetFontDrawPosition(0,0);
     shFontDrawString("Wizapply:English,日本語");
     shFontDraw();//Writing
 
     shSetUpdateThread(60,UpdateFunc);
     shSetDrawThread(DrawFunc);
     return 0;
 }
 
 int Terminate()
 {   //!App exit process
+    shDeleteTexture(&amp;g_tex);
     shExitSherry();
     return 0;
 }
 
 void UpdateFunc(void)
 {   //!Update
     
 }
 
 void DrawFunc(void)
 {   //!Draw
     shClear();
 
     shSetSpritePosition(80.0f,180.0f,0.0f);
     shSetSpriteColor(1.0f, 1.0f, 1.0f, 1.0f);
     shSetSpriteTexCoord(0.0f,0.0f,(float)APPSCREEN_WIDTH/1024.0f,
                         (float)APPSCREEN_HEIGHT/1024.0f);
     shSetSpriteSizeLeftUp(APPSCREEN_WIDTH,APPSCREEN_HEIGHT);
     shSetSpriteTexture(&amp;g_tex);
     shSpriteDraw(); //View
 }
 ~~~~~
 
 
 #Font draw code (Realtime)
 
 ![sample](http://wizapply.com/sf_image/fontdraw.png)
 
 *The mobile has a weak performance may be slow.
 &lt;hr&gt;
 
 ####Code####
 ~~~~~
 #include &lt;use_sherry.h&gt;
 #include &lt;shEntryPoint.h&gt;
 
 static void UpdateFunc(void);
 static void DrawFunc(void);
 
 int Initialize()
 {   //!App initialize Process
     shInitCreateSherry("smatcha sample",320,480,0,Direct3D9);
     shSetClearColor(0.1f,0.1f,0.1f);
     shSetSpriteScSize(320, 480);
 
     //Create font.
-    shCreateFontTexBuffer(&amp;g_tex,1024);
+    shCreateFontScBuffer(320, 480);
 
     shSetFontFile(shDCP("font.ttf"));    //Setting
     shSetCharcode(SH_FONTCHARCODE_SJIS);
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">smilytics</dc:creator><pubDate>Mon, 30 Jan 2012 05:55:53 -0000</pubDate><guid>https://sourceforge.net99de107bbae48002a8839eb1cdc499a46c44b939</guid></item><item><title>WikiPage Font draw code modified by smilytics</title><link>https://sourceforge.net/p/wizapply/home/Font%2520draw%2520code/</link><description>#Font draw code (Texture)

![sample](http://wizapply.com/sf_image/fontdraw.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_tex;    //Texture

int Initialize()
{   //!App initialize Process
    shInitCreateSherry("smatcha sample",320,480,0,Direct3D9);
    shSetClearColor(0.1f,0.1f,0.1f);
    shSetSpriteScSize(320, 480);

    //Create font.
    shCreateFontScBuffer(320, 480);

    shSetFontFile(shDCP("font.ttf"));    //Setting
    shSetCharcode(SH_FONTCHARCODE_SJIS);
    shSetFontDrawType(SH_FONTDRAWTYPE_AA);
    shSetFontDrawSize(50);

    shSetFontDrawColor(1.0f,1.0f,1.0f);
    shSetFontDrawPosition(0,0);
    shFontDrawString("Wizapply:English,日本語");
    shFontDraw();//Writing

    shSetUpdateThread(60,UpdateFunc);
    shSetDrawThread(DrawFunc);
    return 0;
}

int Terminate()
{   //!App exit process
    shExitSherry();
    return 0;
}

void UpdateFunc(void)
{   //!Update
    
}

void DrawFunc(void)
{   //!Draw
    shClear();

    shSetSpritePosition(80.0f,180.0f,0.0f);
    shSetSpriteColor(1.0f, 1.0f, 1.0f, 1.0f);
    shSetSpriteTexCoord(0.0f,0.0f,(float)APPSCREEN_WIDTH/1024.0f,
                        (float)APPSCREEN_HEIGHT/1024.0f);
    shSetSpriteSizeLeftUp(APPSCREEN_WIDTH,APPSCREEN_HEIGHT);
    shSetSpriteTexture(&amp;g_tex);
    shSpriteDraw(); //View
}
~~~~~


#Font draw code (Realtime)

![sample](http://wizapply.com/sf_image/fontdraw.png)

*The mobile has a weak performance may be slow.
&lt;hr&gt;

####Code####
~~~~~
#include &lt;use_sherry.h&gt;
#include &lt;shEntryPoint.h&gt;

static void UpdateFunc(void);
static void DrawFunc(void);

int Initialize()
{   //!App initialize Process
    shInitCreateSherry("smatcha sample",320,480,0,Direct3D9);
    shSetClearColor(0.1f,0.1f,0.1f);
    shSetSpriteScSize(320, 480);

    //Create font.
    shCreateFontTexBuffer(&amp;g_tex,1024);

    shSetFontFile(shDCP("font.ttf"));    //Setting
    shSetCharcode(SH_FONTCHARCODE_SJIS);
    shSetFontDrawType(SH_FONTDRAWTYPE_AA);
    shSetFontDrawSize(50);

    shSetUpdateThread(60,UpdateFunc);
    shSetDrawThread(DrawFunc);
    return 0;
}

int Terminate()
{   //!App exit process
    shExitSherry();
    return 0;
}

void UpdateFunc(void)
{   //!Update
    
}

void DrawFunc(void)
{   //!Draw
    shClear();

    shFontDrawClear();

    shSetFontDrawColor(1.0f,1.0f,1.0f);
    shSetFontDrawPosition(120,140);
    shFontDrawString("Wizapply:English,日本語");

    shFontDraw();
}
~~~~~</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">smilytics</dc:creator><pubDate>Mon, 30 Jan 2012 05:06:43 -0000</pubDate><guid>https://sourceforge.netfa463fb17e6ec952e2b80dec8d95d7a6e4c0cddb</guid></item></channel></rss>