<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1092877930408053093</id><updated>2024-10-25T09:08:15.008+09:00</updated><category term="Android"/><category term="OpenGLES"/><category term="Metasequoia"/><category term="Squirrel"/><category term="本"/><category term="ゲーム開発"/><category term="雑記"/><category term="Blender"/><category term="JNI"/><category term="NDK"/><category term="XNA"/><category term="cocos2d-x"/><category term="texture"/><category term="音"/><title type='text'>work</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://minmin-work.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://minmin-work.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03201767703948521361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>28</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1092877930408053093.post-4324332221203036656</id><published>2013-03-24T05:09:00.000+09:00</published><updated>2013-03-24T05:28:34.384+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Metasequoia"/><title type='text'>顔のモデリング【女性３】</title><content type='html'>頬の凸凹をなめらかにしてみた。自分の今のレベルでは輪郭をこれ以上改善できない。もっと色々顔のモデルを見てもっと勉強してからじゃないと、これ以上良い輪郭はできそうにない。なので、次は目と髪を弄くって色々変えてみよう。&lt;a href=&quot;http://1.bp.blogspot.com/-koxYKxzzCBU/UU4LyYXJKiI/AAAAAAAABPo/-yk2p5Ol3TY/s1600/face.jpg&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-koxYKxzzCBU/UU4LyYXJKiI/AAAAAAAABPo/-yk2p5Ol3TY/s320/face.jpg&quot; /&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://minmin-work.blogspot.com/feeds/4324332221203036656/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://minmin-work.blogspot.com/2013/03/blog-post.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/4324332221203036656'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/4324332221203036656'/><link rel='alternate' type='text/html' href='http://minmin-work.blogspot.com/2013/03/blog-post.html' title='顔のモデリング【女性３】'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03201767703948521361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-koxYKxzzCBU/UU4LyYXJKiI/AAAAAAAABPo/-yk2p5Ol3TY/s72-c/face.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1092877930408053093.post-7291895963997490341</id><published>2012-09-07T16:07:00.000+09:00</published><updated>2012-09-07T16:09:06.982+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Metasequoia"/><title type='text'>顔のモデリング【女性２】</title><content type='html'>以前作った女性の顔の目と髪を少し変えてみた。
口元も少し笑顔っぽくしてみた。
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVt9ayaCTLlxuA-diafDBUEJcyXDO0iS5e35c4YBEU9EU9r92oElNoMl2_6QkoIQkKPybWmXGz6bBL3_B18BwVNcmHSR1jpgNQ8VrOD1yWZQG2DnQH00cA6oIt1UaPwD498TcNY_do5UXg/s1600/women2-2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; width=&quot;241&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVt9ayaCTLlxuA-diafDBUEJcyXDO0iS5e35c4YBEU9EU9r92oElNoMl2_6QkoIQkKPybWmXGz6bBL3_B18BwVNcmHSR1jpgNQ8VrOD1yWZQG2DnQH00cA6oIt1UaPwD498TcNY_do5UXg/s320/women2-2.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo1bCMc6XvHqG5rrNKja98sQSggbyd4BuIOqepfhv1FNSPAHcFgZ0LOqkq2mz4JCuNNMCBFjl_RVZ99q6WJXYvdT-oZCKW6gDM1H2jHx_UDdF0hKJ-TIplhlXjpuvkvoDEsl-AlR7ocgcc/s1600/women2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; width=&quot;268&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo1bCMc6XvHqG5rrNKja98sQSggbyd4BuIOqepfhv1FNSPAHcFgZ0LOqkq2mz4JCuNNMCBFjl_RVZ99q6WJXYvdT-oZCKW6gDM1H2jHx_UDdF0hKJ-TIplhlXjpuvkvoDEsl-AlR7ocgcc/s320/women2.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

</content><link rel='replies' type='application/atom+xml' href='http://minmin-work.blogspot.com/feeds/7291895963997490341/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://minmin-work.blogspot.com/2012/09/blog-post.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/7291895963997490341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/7291895963997490341'/><link rel='alternate' type='text/html' href='http://minmin-work.blogspot.com/2012/09/blog-post.html' title='顔のモデリング【女性２】'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03201767703948521361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVt9ayaCTLlxuA-diafDBUEJcyXDO0iS5e35c4YBEU9EU9r92oElNoMl2_6QkoIQkKPybWmXGz6bBL3_B18BwVNcmHSR1jpgNQ8VrOD1yWZQG2DnQH00cA6oIt1UaPwD498TcNY_do5UXg/s72-c/women2-2.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1092877930408053093.post-7001833415635913151</id><published>2012-03-11T04:21:00.000+09:00</published><updated>2012-03-11T04:21:31.115+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Metasequoia"/><title type='text'>顔モデリング【女性】</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://4.bp.blogspot.com/-S4bp-X_euYs/T1unzcOmkoI/AAAAAAAAAYI/zwVY4J5pgfI/s1600/woman.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://4.bp.blogspot.com/-S4bp-X_euYs/T1unzcOmkoI/AAAAAAAAAYI/zwVY4J5pgfI/s320/woman.png&quot; width=&quot;218&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
女性の顔のモデリングに挑戦してみました。</content><link rel='replies' type='application/atom+xml' href='http://minmin-work.blogspot.com/feeds/7001833415635913151/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://minmin-work.blogspot.com/2012/03/blog-post.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/7001833415635913151'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/7001833415635913151'/><link rel='alternate' type='text/html' href='http://minmin-work.blogspot.com/2012/03/blog-post.html' title='顔モデリング【女性】'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03201767703948521361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-S4bp-X_euYs/T1unzcOmkoI/AAAAAAAAAYI/zwVY4J5pgfI/s72-c/woman.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1092877930408053093.post-8952525616908879658</id><published>2012-02-20T08:39:00.000+09:00</published><updated>2012-04-18T21:26:54.937+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>インテントの使用</title><content type='html'>&lt;br /&gt;
インテントの使用例です。&lt;br /&gt;
&lt;br /&gt;
下記はTestIntentActivity.javaです。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: java;&quot;&gt;
import android.app.Activity;&lt;br /&gt;
import android.content.Intent;&lt;br /&gt;
import android.os.Bundle;&lt;br /&gt;
import android.view.View;&lt;br /&gt;
import android.view.View.OnClickListener;&lt;br /&gt;
import android.widget.Button;&lt;br /&gt;
import android.widget.LinearLayout;&lt;br /&gt;
import android.widget.TextView;&lt;br /&gt;
&lt;br /&gt;
public class TestIntentActivity extends Activity implements OnClickListener {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public void onCreate(Bundle savedInstanceState) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; super.onCreate(savedInstanceState);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LinearLayout linearLayout = new LinearLayout(this);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TextView textView = new TextView(this);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; textView.setText(&quot;トップアクティビティ&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Button button = new Button(this);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; button.setWidth(200);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; button.setHeight(200);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; button.setText(&quot;2つ目のアクティビティへ&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; button.setOnClickListener(this);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; linearLayout.addView(textView);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; linearLayout.addView(button);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; setContentView(linearLayout);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
@Override&lt;br /&gt;
public void onClick(View v) {&lt;br /&gt;
Intent intent = new Intent(this, Activity01.class);&lt;br /&gt;
startActivity(intent);&lt;br /&gt;
}&lt;br /&gt;
}
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
下記はActivity01.javaです。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;import&lt;/span&gt; android.app.Activity;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;import&lt;/span&gt; android.content.Intent;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;import&lt;/span&gt; android.os.Bundle;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;import&lt;/span&gt; android.view.View;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;import&lt;/span&gt; android.view.View.OnClickListener;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;import&lt;/span&gt; android.widget.Button;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;import&lt;/span&gt; android.widget.LinearLayout;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;import&lt;/span&gt; android.widget.TextView;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;class&lt;/span&gt; Activity01 &lt;span class=&quot;s1&quot;&gt;extends&lt;/span&gt; Activity &lt;span class=&quot;s1&quot;&gt;implements&lt;/span&gt; OnClickListener{&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s2&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;/span&gt;@Override&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;void&lt;/span&gt; onCreate(Bundle savedInstanceState) {&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;super&lt;/span&gt;.onCreate(savedInstanceState);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;LinearLayout linearLayout = &lt;span class=&quot;s1&quot;&gt;new&lt;/span&gt; LinearLayout(&lt;span class=&quot;s1&quot;&gt;this&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TextView textView = &lt;span class=&quot;s1&quot;&gt;new&lt;/span&gt; TextView(&lt;span class=&quot;s1&quot;&gt;this&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; textView.setText(&lt;span class=&quot;s3&quot;&gt;&quot;2つ目のアクティビティ&quot;&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Button button = &lt;span class=&quot;s1&quot;&gt;new&lt;/span&gt; Button(&lt;span class=&quot;s1&quot;&gt;this&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; button.setWidth(200);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; button.setHeight(200);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; button.setText(&lt;span class=&quot;s3&quot;&gt;&quot;トップアクティビティへ&quot;&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; button.setOnClickListener(&lt;span class=&quot;s1&quot;&gt;this&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; linearLayout.addView(textView);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; linearLayout.addView(button);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; setContentView(linearLayout);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;}&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s2&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;/span&gt;@Override&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;void&lt;/span&gt; onClick(View v) {&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;Intent intent = &lt;span class=&quot;s1&quot;&gt;new&lt;/span&gt; Intent(&lt;span class=&quot;s1&quot;&gt;this&lt;/span&gt;, TestIntentActivity.&lt;span class=&quot;s1&quot;&gt;class&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;startActivity(intent);&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;}&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
}&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
下記はAndroidManifest.xmlです。&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&amp;lt;?xml&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt; &lt;/span&gt;version&lt;span class=&quot;s3&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;&quot;1.0&quot;&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt; &lt;/span&gt;encoding&lt;span class=&quot;s3&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;&quot;utf-8&quot;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;manifest&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s5&quot;&gt;xmlns:android&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;=&lt;/span&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s3&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s5&quot;&gt;package&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;=&lt;/span&gt;&quot;com.sample.intent&quot;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s3&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;android:versionCode&lt;span class=&quot;s3&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;&quot;1&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s3&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;android:versionName&lt;span class=&quot;s3&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;&quot;1.0&quot;&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s3&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;uses-sdk&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt; &lt;/span&gt;android:minSdkVersion&lt;span class=&quot;s3&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;&quot;7&quot;&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;span class=&quot;s3&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;application&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s3&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s5&quot;&gt;android:icon&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;=&lt;/span&gt;&quot;@drawable/icon&quot;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s3&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s5&quot;&gt;android:label&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;=&lt;/span&gt;&quot;@string/app_name&quot;&lt;span class=&quot;s3&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p5&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;activity&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s3&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s5&quot;&gt;android:label&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;=&lt;/span&gt;&quot;@string/app_name&quot;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s3&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s5&quot;&gt;android:name&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;=&lt;/span&gt;&quot;.TestIntentActivity&quot;&lt;br /&gt;
&lt;span class=&quot;s3&quot;&gt;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;android:launchMode&lt;span class=&quot;s1&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;singleInstance&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;s1&quot;&gt;







&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;p5&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;intent-filter&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s3&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;action&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s5&quot;&gt;android:name&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;=&lt;/span&gt;&quot;android.intent.action.MAIN&quot;&lt;span class=&quot;s3&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s3&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;category&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s5&quot;&gt;android:name&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;=&lt;/span&gt;&quot;android.intent.category.LAUNCHER&quot;&lt;span class=&quot;s3&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;span class=&quot;s3&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&amp;lt;/intent-filter&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;s3&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p5&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;/&lt;span class=&quot;s2&quot;&gt;activity&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;span class=&quot;s3&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;activity&lt;span class=&quot;s3&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s5&quot;&gt;android:name&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;&quot;Activity01&quot;&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;android:launchMode&lt;span class=&quot;s1&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;singleInstance&quot;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;&amp;nbsp;&lt;/span&gt;&amp;lt;/activity&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;s1&quot;&gt;







&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;span class=&quot;s1&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;span class=&quot;s3&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&amp;lt;/application&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&amp;lt;/manifest&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://minmin-work.blogspot.com/feeds/8952525616908879658/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://minmin-work.blogspot.com/2012/02/blog-post.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/8952525616908879658'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/8952525616908879658'/><link rel='alternate' type='text/html' href='http://minmin-work.blogspot.com/2012/02/blog-post.html' title='インテントの使用'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03201767703948521361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1092877930408053093.post-6509559375844112952</id><published>2012-02-16T11:23:00.001+09:00</published><updated>2012-02-16T11:23:11.252+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>SurfaceViewを使ったアニメーション</title><content type='html'>&lt;br /&gt;
package com.sample.surface.test;&lt;br /&gt;
&lt;br /&gt;
import android.app.Activity;&lt;br /&gt;
import android.content.Context;&lt;br /&gt;
import android.graphics.Canvas;&lt;br /&gt;
import android.graphics.Color;&lt;br /&gt;
import android.graphics.Paint;&lt;br /&gt;
import android.graphics.Paint.Style;&lt;br /&gt;
import android.os.Bundle;&lt;br /&gt;
import android.view.SurfaceHolder;&lt;br /&gt;
import android.view.SurfaceView;&lt;br /&gt;
&lt;br /&gt;
public class SurfaceViewTest01Activity extends Activity {&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Override&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public void onCreate(Bundle savedInstanceState) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;super.onCreate(savedInstanceState);&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;AnimationSurfaceView surfaceView;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;surfaceView = new AnimationSurfaceView(this);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;setContentView(surfaceView);&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;/**&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; *&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; * SurfaceViewクラス&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; * アニメーションを実行する。&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; */&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public class AnimationSurfaceView extends SurfaceView&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;implements Runnable, SurfaceHolder.Callback {&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;static final int SIZE_X = 30;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;static final int SIZE_Y = 30;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;int positionX = 0;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;int positionY = 0;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;int screenWidth;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;int screenHeight;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;SurfaceHolder surfaceHolder;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;Thread thread;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;public AnimationSurfaceView(Context context) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;super(context);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;surfaceHolder = getHolder();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;surfaceHolder.addCallback(this);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;@Override&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;public void run() {&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;Canvas canvas = null;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;Paint paintBlue &amp;nbsp;= new Paint();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;Paint paintWhite = new Paint();&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;paintWhite.setStyle(Style.FILL);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;paintWhite.setColor(Color.WHITE);&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;paintBlue.setStyle(Style.FILL);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;paintBlue.setColor(Color.BLUE);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;while(thread != null){&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;try{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;canvas = surfaceHolder.lockCanvas();&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;canvas.drawRect(//背景&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;0,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;0,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;screenWidth, screenHeight,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;paintWhite);&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;canvas.drawRect(//平行移動する四角形&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;positionX,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;positionY,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;positionX + SIZE_X,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;positionY + SIZE_Y,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;paintBlue);&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;positionX += 1;//x移動&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;positionY += 1;//y移動&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;surfaceHolder.unlockCanvasAndPost(canvas);&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;catch(Exception e){}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;@Override&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;public void surfaceChanged(&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;SurfaceHolder holder,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;int format,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;int width,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;int height) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;screenWidth = width;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;screenHeight = height;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;@Override&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;public void surfaceCreated(SurfaceHolder holder) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;thread = new Thread(this);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;thread.start();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;@Override&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;public void surfaceDestroyed(SurfaceHolder holder) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;thread = null;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
}&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://minmin-work.blogspot.com/feeds/6509559375844112952/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://minmin-work.blogspot.com/2012/02/surfaceview.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/6509559375844112952'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/6509559375844112952'/><link rel='alternate' type='text/html' href='http://minmin-work.blogspot.com/2012/02/surfaceview.html' title='SurfaceViewを使ったアニメーション'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03201767703948521361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1092877930408053093.post-1875687300504873479</id><published>2012-02-16T03:18:00.001+09:00</published><updated>2012-02-16T03:25:28.587+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>Androidで簡易アニメーション</title><content type='html'>&lt;br /&gt;
OpenGLやSurfaceViewを使わずに、簡単にアニメーションさせるにはTranslateAnimationやRotateAnimationを使います。&lt;br /&gt;
ここから下はサンプルソースです。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
package com.sample.animation;//ここは各自変更して下さい&lt;br /&gt;
&lt;br /&gt;
import android.app.Activity;&lt;br /&gt;
import android.graphics.Color;&lt;br /&gt;
import android.os.Bundle;&lt;br /&gt;
import android.view.animation.RotateAnimation;&lt;br /&gt;
import android.view.animation.TranslateAnimation;&lt;br /&gt;
import android.widget.LinearLayout;&lt;br /&gt;
import android.widget.LinearLayout.LayoutParams;&lt;br /&gt;
import android.widget.TextView;&lt;br /&gt;
&lt;br /&gt;
public class AnimationTestActivity extends Activity {//ここも各自変更して下さい&lt;br /&gt;
&amp;nbsp; &amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public void onCreate(Bundle savedInstanceState) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; super.onCreate(savedInstanceState);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //背景になる緑色のレイアウト&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LinearLayout greenLinearLayout = new LinearLayout(this);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;//緑色に設定&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; greenLinearLayout.setBackgroundColor(Color.GREEN);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;//平行移動するレイアウト&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LinearLayout redLinearLayout = new LinearLayout(this);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;//赤色に設定&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; redLinearLayout.setBackgroundColor(Color.RED);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;//横幅、縦幅&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; redLinearLayout.setLayoutParams(new LayoutParams(300, 300));&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //アニメーションを設定&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;TranslateAnimation redAnimation =&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new TranslateAnimation(100, 100, 0, 330);//x始点、x終点、y始点、y終点&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;//アニメーションする時間 4000ミリ秒 ＝ ４秒間アニメーションする&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; redAnimation.setDuration(4000);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;//レイアウトにアニメーションを設定&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; redLinearLayout.setAnimation(redAnimation);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;//回転するビュー&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TextView blueView = new TextView(this);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;//横幅、縦幅&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; blueView.setLayoutParams(new LayoutParams(150, 150));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;//青色に設定&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; blueView.setBackgroundColor(Color.BLUE);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; blueView.setText(&quot;回転移動&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;//開始角度、終了角度、中心点x、中心点y&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RotateAnimation blueAnimation = new RotateAnimation(0, 360, 150, 150);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;//アニメーションする時間 4000ミリ秒 ＝ ４秒間アニメーションする&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; blueAnimation.setDuration(4000);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;//ビューにアニメーションを設定&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; blueView.setAnimation(blueAnimation);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //ビューの親子関係を設定。&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;//アクティビティに親の緑色レイアウトを設定&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; setContentView(greenLinearLayout);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;//緑色レイアウトに子の赤色レイアウトを設定&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; greenLinearLayout.addView(redLinearLayout);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;//赤色レイアウトに孫青色ビューを設定&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; redLinearLayout.addView(blueView);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTLq7CACxLCWqIPW0gVhSjbr68z25HuLQR9JYQAP1uamq_CxcLVNwR_FNgGyBWaKuB89fn25PYnoAOyhSj7IRjDu1fp_mhGVM7fuamqpqLyxRX86Qexkqg6BprotXwunKDp-xTZOJloNDu/s1600/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88%EF%BC%92.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTLq7CACxLCWqIPW0gVhSjbr68z25HuLQR9JYQAP1uamq_CxcLVNwR_FNgGyBWaKuB89fn25PYnoAOyhSj7IRjDu1fp_mhGVM7fuamqpqLyxRX86Qexkqg6BprotXwunKDp-xTZOJloNDu/s320/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88%EF%BC%92.png&quot; width=&quot;201&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1QpwX-52C6d9zH8KG-iJgxzjEjZkwTWrseGLcUVwz-jgwSkL9aQxM2Dg6Bd8DD4803cZahb-0xI8LCxRAsGRRSUW0ObG6uU8dYLQUFsp19XAW9L_MMKbwijeI30zclod0iWxjUJYgkIE8/s1600/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88%EF%BC%91.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1QpwX-52C6d9zH8KG-iJgxzjEjZkwTWrseGLcUVwz-jgwSkL9aQxM2Dg6Bd8DD4803cZahb-0xI8LCxRAsGRRSUW0ObG6uU8dYLQUFsp19XAW9L_MMKbwijeI30zclod0iWxjUJYgkIE8/s320/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88%EF%BC%91.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://minmin-work.blogspot.com/feeds/1875687300504873479/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://minmin-work.blogspot.com/2012/02/android.html#comment-form' title='2 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/1875687300504873479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/1875687300504873479'/><link rel='alternate' type='text/html' href='http://minmin-work.blogspot.com/2012/02/android.html' title='Androidで簡易アニメーション'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03201767703948521361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTLq7CACxLCWqIPW0gVhSjbr68z25HuLQR9JYQAP1uamq_CxcLVNwR_FNgGyBWaKuB89fn25PYnoAOyhSj7IRjDu1fp_mhGVM7fuamqpqLyxRX86Qexkqg6BprotXwunKDp-xTZOJloNDu/s72-c/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88%EF%BC%92.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1092877930408053093.post-3186656930900963771</id><published>2012-02-12T13:27:00.001+09:00</published><updated>2012-02-12T13:27:21.164+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Squirrel"/><title type='text'>Squirrelの組み込み　Mac編　その２</title><content type='html'>Squirrelの計算結果をCに渡すのを試します。&lt;br /&gt;
Squirrel側では、returnではなくprint()を使って渡します。&lt;br /&gt;
他のやり方があって、returnでも渡せるかもしれないが、今回はprint()で渡します。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
その１で使った test.nut の中身を下記のように変えます。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function foo(i, f, s)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; print(123);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; print(0.987);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; print(&quot;abc&quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
その１で使った minimal.c の&amp;nbsp;printfunc 関数の中身を下記のように変えます。&lt;br /&gt;
&lt;br /&gt;








&lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;s1&quot;&gt;switch&lt;/span&gt; (sq_gettype(v, -&lt;span class=&quot;s2&quot;&gt;2&lt;/span&gt;)) {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;case&lt;/span&gt; OT_INTEGER:&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SQInteger&amp;nbsp; ret;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sq_getinteger(v, -&lt;span class=&quot;s2&quot;&gt;2&lt;/span&gt;, &amp;amp;ret);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sq_pop(v, &lt;span class=&quot;s2&quot;&gt;1&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf(&lt;span class=&quot;s3&quot;&gt;&quot; int = %d &quot;&lt;/span&gt;, (&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt;)ret);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;break&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;case&lt;/span&gt; OT_FLOAT:&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SQFloat&amp;nbsp; fret;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sq_getfloat(v, -&lt;span class=&quot;s2&quot;&gt;2&lt;/span&gt;, &amp;amp;fret);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sq_pop(v, &lt;span class=&quot;s2&quot;&gt;1&lt;/span&gt;); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf(&lt;span class=&quot;s3&quot;&gt;&quot; float = %f &quot;&lt;/span&gt;, fret);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;break&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;case&lt;/span&gt; OT_STRING:&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;const&lt;/span&gt; SQChar&amp;nbsp; *cret;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sq_getstring(v, -&lt;span class=&quot;s2&quot;&gt;2&lt;/span&gt;, &amp;amp;cret);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sq_pop(v, &lt;span class=&quot;s2&quot;&gt;1&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf(&lt;span class=&quot;s3&quot;&gt;&quot; string = %s &quot;&lt;/span&gt;, cret);&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;break&lt;/span&gt;; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
これで実行してやると&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;int = 123 &amp;nbsp;float = 0.987000 &amp;nbsp;string = abc&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
と表示されると思います。&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
Squirrel側でprint()した値がC側に渡されたことになります。&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://minmin-work.blogspot.com/feeds/3186656930900963771/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://minmin-work.blogspot.com/2012/02/squirrelmac_12.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/3186656930900963771'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/3186656930900963771'/><link rel='alternate' type='text/html' href='http://minmin-work.blogspot.com/2012/02/squirrelmac_12.html' title='Squirrelの組み込み　Mac編　その２'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03201767703948521361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1092877930408053093.post-6415336711965961569</id><published>2012-02-11T00:25:00.001+09:00</published><updated>2012-02-11T01:13:32.098+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Squirrel"/><title type='text'>Squirrelの組み込み　Mac編　その１</title><content type='html'>&lt;div&gt;
MacでSquirrelを試してみました。&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
Squirrel 3.0.2 をダウンロード&amp;nbsp;&lt;a href=&quot;http://squirrel-lang.org/#download&quot;&gt;http://squirrel-lang.org/#download&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
コンパイルして、libフォルダの中にできた libsqstdlib.a と libsquirrel.a を使います。&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
試すのはSQUIRRELフォルダの中のetcフォルダの中にあるminimal.c と test.nut です。&lt;br /&gt;
SQWorkという作業フォルダを作ります。その中にlibフォルダを作り、さっきのライブラリを２つ入れておきます。minimal.c をコンパイルするには、ターミナルで&lt;/div&gt;
&lt;span style=&quot;background-color: lime;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: lime;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;g++ minimal.c -L/SQWork/lib -lsqstdlib -L/SQWork/lib -lsquirrel -o sample

&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;と入力します。&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;sampleができあがれば、ターミナルから実行してやると&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #6aa84f;&quot;&gt;Called foo(), i=1, f=2.5, s=&#39;teststring&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;という文字列が表示されると思います。&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;これでSquirrelの組み込みのHelloWorldは終了です。&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: lime;&quot;&gt;
&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://minmin-work.blogspot.com/feeds/6415336711965961569/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://minmin-work.blogspot.com/2012/02/squirrelmac.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/6415336711965961569'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/6415336711965961569'/><link rel='alternate' type='text/html' href='http://minmin-work.blogspot.com/2012/02/squirrelmac.html' title='Squirrelの組み込み　Mac編　その１'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03201767703948521361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1092877930408053093.post-6299155784615733306</id><published>2012-02-01T22:27:00.001+09:00</published><updated>2012-02-01T22:46:20.098+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Squirrel"/><category scheme="http://www.blogger.com/atom/ns#" term="ゲーム開発"/><category scheme="http://www.blogger.com/atom/ns#" term="本"/><title type='text'>Squirrel</title><content type='html'>やっと２月２４日に待ちに待ったSquirrelの本が出版されるようです。&lt;a href=&quot;http://www.amazon.co.jp/Squirrel%E3%82%B2%E3%83%BC%E3%83%A0%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0-%E7%B5%84%E3%81%BF%E8%BE%BC%E3%81%BF%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%E8%A8%80%E8%AA%9E%E3%81%AB%E3%82%88%E3%82%8B%E5%AE%9F%E8%B7%B5%E3%83%86%E3%82%AF%E3%83%8B%E3%83%83%E3%82%AF-TAKASHIN/dp/4844331558&quot;&gt;Squirrelゲームプログラミング 組み込みスクリプト言語による実践テクニック&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://minmin-work.blogspot.com/feeds/6299155784615733306/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://minmin-work.blogspot.com/2012/02/squirrel.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/6299155784615733306'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/6299155784615733306'/><link rel='alternate' type='text/html' href='http://minmin-work.blogspot.com/2012/02/squirrel.html' title='Squirrel'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03201767703948521361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1092877930408053093.post-2035775058687096821</id><published>2012-01-23T03:16:00.003+09:00</published><updated>2012-01-23T03:22:39.570+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="雑記"/><title type='text'>デザイン変更</title><content type='html'>blogのデザインをシンプルなものに変更しました。あと、カテゴリを見れるようにしました。</content><link rel='replies' type='application/atom+xml' href='http://minmin-work.blogspot.com/feeds/2035775058687096821/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://minmin-work.blogspot.com/2012/01/blog.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/2035775058687096821'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/2035775058687096821'/><link rel='alternate' type='text/html' href='http://minmin-work.blogspot.com/2012/01/blog.html' title='デザイン変更'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03201767703948521361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1092877930408053093.post-6002323256947709396</id><published>2011-12-14T04:20:00.003+09:00</published><updated>2011-12-14T04:20:32.488+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="雑記"/><title type='text'>最近</title><content type='html'>Javaでxファイルのパーサー制作しているんですが、正直キツい！</content><link rel='replies' type='application/atom+xml' href='http://minmin-work.blogspot.com/feeds/6002323256947709396/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://minmin-work.blogspot.com/2011/12/blog-post_14.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/6002323256947709396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/6002323256947709396'/><link rel='alternate' type='text/html' href='http://minmin-work.blogspot.com/2011/12/blog-post_14.html' title='最近'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03201767703948521361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1092877930408053093.post-2562532577913974989</id><published>2011-11-06T13:49:00.001+09:00</published><updated>2011-11-24T02:48:16.343+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="本"/><title type='text'>Steve Jobs スティーブジョブズの伝記買いました</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://ec2.images-amazon.com/images/I/51a71v8dC9L._AA300_.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; width=&quot;300&quot; src=&quot;http://ec2.images-amazon.com/images/I/51a71v8dC9L._AA300_.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href=&quot;http://www.amazon.co.jp/gp/product/4062171260/ref=s9_simh_gw_p14_d3_g14_i2?pf_rd_m=AN1VRQENFRJN5&amp;pf_rd_s=center-7&amp;pf_rd_r=1P02ZTJW5CCN70C4YP5K&amp;pf_rd_t=101&amp;pf_rd_p=463485636&amp;pf_rd_i=489986&quot;&gt;&lt;font color=&quot;red&quot;&gt;スティーブ・ジョブズ Ⅰ&lt;/font&gt;&lt;/a&gt;と&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://ec2.images-amazon.com/images/I/51KVZ1Lb9GL._AA300_.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; width=&quot;300&quot; src=&quot;http://ec2.images-amazon.com/images/I/51KVZ1Lb9GL._AA300_.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href=&quot;http://www.amazon.co.jp/gp/product/4062171279/ref=s9_simh_gw_p14_d3_g14_i1?pf_rd_m=AN1VRQENFRJN5&amp;pf_rd_s=center-7&amp;pf_rd_r=1P02ZTJW5CCN70C4YP5K&amp;pf_rd_t=101&amp;pf_rd_p=463485636&amp;pf_rd_i=489986&quot;&gt;&lt;font color=&quot;red&quot;&gt;スティーブ・ジョブズ Ⅱ&lt;/font&gt;&lt;/a&gt;を買いました。&lt;br /&gt;
&lt;br /&gt;
まだ１冊目を100ページぐらいしか読んでないんですが、ジョブズは小さい頃から特別な子だったようです。&lt;br /&gt;
親の影響や、シリコンバレーに住んでいたことなどが影響していて、エレクロニクスに長けた子と知り合うことができたみたいです。</content><link rel='replies' type='application/atom+xml' href='http://minmin-work.blogspot.com/feeds/2562532577913974989/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://minmin-work.blogspot.com/2011/11/steve-jovs.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/2562532577913974989'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/2562532577913974989'/><link rel='alternate' type='text/html' href='http://minmin-work.blogspot.com/2011/11/steve-jovs.html' title='Steve Jobs スティーブジョブズの伝記買いました'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03201767703948521361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1092877930408053093.post-1132295604159310763</id><published>2011-08-17T01:47:00.003+09:00</published><updated>2011-08-17T01:53:06.398+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="本"/><title type='text'>本</title><content type='html'>本を２冊買いました。&lt;br /&gt;
6年前と11年前に出版された本です。&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.amazon.co.jp/%E3%83%87%E3%82%B6%E3%82%A4%E3%83%B3%E3%83%91%E3%82%BF%E3%83%BC%E3%83%B3%E3%81%A8%E3%81%A8%E3%82%82%E3%81%AB%E5%AD%A6%E3%81%B6%E3%82%AA%E3%83%96%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E6%8C%87%E5%90%91%E3%81%AE%E3%81%93%E3%81%93%E3%82%8D-Software-patterns-%E3%82%A2%E3%83%A9%E3%83%B3%E3%83%BB%E3%82%B7%E3%83%A3%E3%83%AD%E3%82%A6%E3%82%A7%E3%82%A4/dp/4894716844&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;144&quot; width=&quot;113&quot; src=&quot;http://img.bk1.jp/bibimg/0259/02594852.jpg&quot; /&gt;&lt;font color=&quot;red&quot;&gt;ーデザインパターンとともに学ぶー　オブジェクト指向のこころ&lt;/font&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.amazon.co.jp/%E3%83%AA%E3%83%95%E3%82%A1%E3%82%AF%E3%82%BF%E3%83%AA%E3%83%B3%E3%82%B0%E2%80%95%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%A0%E3%81%AE%E4%BD%93%E8%B3%AA%E6%94%B9%E5%96%84%E3%83%86%E3%82%AF%E3%83%8B%E3%83%83%E3%82%AF-Object-Technology-%E3%83%9E%E3%83%BC%E3%83%81%E3%83%B3-%E3%83%95%E3%82%A1%E3%82%A6%E3%83%A9%E3%83%BC/dp/4894712288/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1313513476&amp;sr=1-1&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;144&quot; width=&quot;110&quot; src=&quot;http://img.bk1.jp/bibimg/0002/00022435.jpg&quot; /&gt;&lt;font color=&quot;red&quot;&gt;リファクタリング　プログラミングの体質改善テクニック&lt;/font&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
これらを読み終える頃には、ソースを書く意識が変わっていますように。</content><link rel='replies' type='application/atom+xml' href='http://minmin-work.blogspot.com/feeds/1132295604159310763/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://minmin-work.blogspot.com/2011/08/blog-post_17.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/1132295604159310763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/1132295604159310763'/><link rel='alternate' type='text/html' href='http://minmin-work.blogspot.com/2011/08/blog-post_17.html' title='本'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03201767703948521361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1092877930408053093.post-6450921441286675526</id><published>2011-08-13T20:24:00.001+09:00</published><updated>2011-08-13T20:44:26.512+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Blender"/><title type='text'>ノーマルマップ</title><content type='html'>３Dで凸凹を表現するのにバンプマップとノーマルマップというのがあります。&lt;br /&gt;
バンプマップはグレーを基準の色にして、白に近ければ凸に、黒に近ければ凹になるようにレンダリングされます。&lt;br /&gt;
ノーマルマップはRGBで凸凹の情報を持たせているので、バンプマップより詳細な凸凹をレンダリングできるということです。&lt;br /&gt;
&lt;br /&gt;
リンク：&lt;br /&gt;
&lt;a href=&quot;http://wbs.nsf.tc/articles/article11.html&quot;&gt;&lt;font color=&quot;red&quot;&gt;WBS+&lt;/font&gt;&lt;/a&gt;のサイトで紹介されています。&lt;br /&gt;
ノーマルマップのBlenderでの作り方が&lt;a href=&quot;http://wiki.blender.org/index.php/Doc:Manual/Textures/Maps/Bump_and_Normal_Maps&quot;&gt;&lt;font color=&quot;red&quot;&gt;こちら&lt;/font&gt;&lt;/a&gt;で紹介されています。&lt;br /&gt;
&lt;a href=&quot;http://marupeke296.com/DXPS_S_No5_NormalMap.html&quot;&gt;&lt;font color=&quot;red&quot;&gt;○×つくろーどっとコム&lt;/font&gt;&lt;/a&gt;のサイトで原理が詳しく解説されています。</content><link rel='replies' type='application/atom+xml' href='http://minmin-work.blogspot.com/feeds/6450921441286675526/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://minmin-work.blogspot.com/2011/08/blog-post.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/6450921441286675526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/6450921441286675526'/><link rel='alternate' type='text/html' href='http://minmin-work.blogspot.com/2011/08/blog-post.html' title='ノーマルマップ'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03201767703948521361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1092877930408053093.post-4706533526054933480</id><published>2011-07-19T01:32:00.000+09:00</published><updated>2012-04-18T21:37:49.709+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="XNA"/><category scheme="http://www.blogger.com/atom/ns#" term="ゲーム開発"/><title type='text'>アクションゲームの当たり判定</title><content type='html'>アクションゲームの当たり判定を教えてくれと頼まれたので、久しぶりに当たり判定のソースを書いてみました。&lt;br /&gt;
C#でXNA用に書いてます。&lt;br /&gt;
&lt;br /&gt;
３段階に分けて書いてみました。&lt;br /&gt;
最初は四角と四角の当たり判定。&lt;br /&gt;
２つ目は四角と複数の四角の当たり判定。&lt;br /&gt;
３つ目はジャンプができる四角と複数の四角の当たり判定。&lt;br /&gt;
もっとシンプルにできそうな気もしますが、一応書きたてのものを載せてみました。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
四角と四角の当たり判定&lt;br /&gt;
&lt;pre class=&quot;brush: csharp;&quot;&gt;
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace Hit_Test_01
{
    /// &lt;summary&gt;
    /// This is the main type for your game
    /// &lt;/summary&gt;
    public class Game1 : Microsoft.Xna.Framework.Game
    {
        GraphicsDeviceManager graphics;
        SpriteBatch spriteBatch;

        Texture2D player;
        Texture2D map;

        Vector2 playerPosition;
        Vector2 mapPosition;

        const int PLAYER_WIDTH = 60;
        const int PLAYER_HEITHT = 90;

        const int MAP_WIDTH = 100;
        const int MAP_HEIGHT = 100;

        KeyboardState keyboardState;
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = &quot;Content&quot;;
        }

        /// &lt;summary&gt;
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// &lt;/summary&gt;
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here
            playerPosition = new Vector2(0, 0);
            mapPosition = new Vector2(100, 100);
            base.Initialize();
        }

        /// &lt;summary&gt;
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// &lt;/summary&gt;
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            player = Content.Load&lt;Texture2D&gt;(&quot;players16&quot;);
            map = Content.Load&lt;Texture2D&gt;(&quot;map&quot;);
            // TODO: use this.Content to load your game content here
        }

        /// &lt;summary&gt;
        /// UnloadContent will be called once per game and is the place to unload
        /// all content.
        /// &lt;/summary&gt;
        protected override void UnloadContent()
        {
            // TODO: Unload any non ContentManager content here
        }

        /// &lt;summary&gt;
        /// Allows the game to run logic such as updating the world,
        /// checking for collisions, gathering input, and playing audio.
        /// &lt;/summary&gt;
        /// &lt;param name=&quot;gameTime&quot;&gt;Provides a snapshot of timing values.&lt;/param&gt;        protected override void Update(GameTime gameTime)
        {
            keyboardState = Keyboard.GetState();

            // Allows the game to exit
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
                this.Exit();
            if (keyboardState.IsKeyDown(Keys.Escape))
            {
                this.Exit();
            }

            if (keyboardState.IsKeyDown(Keys.Left))
            {
                playerPosition.X -= 1.0f;
                if (Hit())
                {
                    playerPosition.X = mapPosition.X + MAP_WIDTH;
                }
            }
            if (keyboardState.IsKeyDown(Keys.Right))
            {
                playerPosition.X += 1.0f;
                if (Hit())
                {
                    playerPosition.X = mapPosition.X - PLAYER_WIDTH;
                }
            }
            if (keyboardState.IsKeyDown(Keys.Up))
            {
                playerPosition.Y -= 1.0f;
                if (Hit())
                {
                    playerPosition.Y = mapPosition.Y + MAP_HEIGHT;
                }
            }
            if (keyboardState.IsKeyDown(Keys.Down))
            {
                playerPosition.Y += 1.0f;
                if (Hit())
                {
                    playerPosition.Y = mapPosition.Y - PLAYER_HEITHT;
                }
            }

            // TODO: Add your update logic here

            base.Update(gameTime);
        }

        private bool Hit()
        {
            if (playerPosition.X + PLAYER_WIDTH &gt; mapPosition.X &amp;&amp;
                playerPosition.X &lt; mapPosition.X + MAP_WIDTH &amp;&amp;
                playerPosition.Y + PLAYER_HEITHT &gt; mapPosition.Y &amp;&amp;
                playerPosition.Y &lt; mapPosition.Y + MAP_HEIGHT)
            {
                return true;
            }
            return false;
        }
        /// &lt;summary&gt;
        /// This is called when the game should draw itself.
        /// &lt;/summary&gt;
        /// &lt;param name=&quot;gameTime&quot;&gt;Provides a snapshot of timing values.&lt;/param&gt;        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.CornflowerBlue);

            // TODO: Add your drawing code here
            spriteBatch.Begin();
            spriteBatch.Draw(
                map,
                new Rectangle((int)mapPosition.X, (int)mapPosition.Y, MAP_WIDTH, MAP_HEIGHT),
                new Rectangle(0, 0, MAP_WIDTH, MAP_HEIGHT),
                Color.White);
            spriteBatch.Draw(
                player,
                new Rectangle((int)playerPosition.X, (int)playerPosition.Y, PLAYER_WIDTH, PLAYER_HEITHT),
                new Rectangle(0, 0, PLAYER_WIDTH, PLAYER_HEITHT),
                Color.White);
            spriteBatch.End();
            base.Draw(gameTime);
        }
    }
}
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
四角と複数の四角の当たり判定。&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace Hit_Test_02
{
    /// &lt;summary&gt;
    /// This is the main type for your game
    /// &lt;/summary&gt;
    public class Game1 : Microsoft.Xna.Framework.Game
    {
        GraphicsDeviceManager graphics;
        SpriteBatch spriteBatch;

        Texture2D player;
        Texture2D map;

        const int MAP_DIVISION_MAX_X = 8;
        const int MAP_DIVISION_MAX_Y = 5;

        Vector2 playerPosition;
        Vector2 playerSpeed;

        Vector2[,] mapPosition = new Vector2[MAP_DIVISION_MAX_X, MAP_DIVISION_MAX_Y];
        Boolean[,] mapActivity = new Boolean[MAP_DIVISION_MAX_X, MAP_DIVISION_MAX_Y];

        const int PLAYER_WIDTH = 60;
        const int PLAYER_HEITHT = 90;

        const int MAP_WIDTH = 100;
        const int MAP_HEIGHT = 100;

        const int MAP_OFFSET_X = 0;
        const int MAP_OFFSET_Y = 0;

        const float HIT_ADJUST_LENGTH = 1.01f;
        KeyboardState keyboardState;

        enum DIRECTION
        {
            LEFT,
            TOP,
            BOTTOM,
            RIGHT
        }
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = &quot;Content&quot;;
        }

        /// &lt;summary&gt;
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// &lt;/summary&gt;
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here
            playerPosition = new Vector2(MAP_WIDTH * 3, MAP_HEIGHT * 1);
            playerSpeed = new Vector2(0.0f, 0.0f);

            for (int x = 0; x &lt; MAP_DIVISION_MAX_X; ++x)
            {
                for (int y = 0; y &lt; MAP_DIVISION_MAX_Y; ++y)
                {
                    mapPosition[x, y] = new Vector2(x * MAP_WIDTH + MAP_OFFSET_X, y * MAP_HEIGHT + MAP_OFFSET_Y);
                    mapActivity[x, y] = true;
                }
//                mapActivity[x, 0] = false;
            }
            mapActivity[3, 1] = false;
            mapActivity[3, 2] = false;
            mapActivity[4, 1] = false;
            mapActivity[4, 2] = false;

            base.Initialize();
        }

        /// &lt;summary&gt;
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// &lt;/summary&gt;
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            player = Content.Load&lt;Texture2D&gt;(&quot;players16&quot;);
            map = Content.Load&lt;Texture2D&gt;(&quot;map&quot;);
            // TODO: use this.Content to load your game content here
        }

        /// &lt;summary&gt;
        /// UnloadContent will be called once per game and is the place to unload
        /// all content.
        /// &lt;/summary&gt;
        protected override void UnloadContent()
        {
            // TODO: Unload any non ContentManager content here
        }

        /// &lt;summary&gt;
        /// Allows the game to run logic such as updating the world,
        /// checking for collisions, gathering input, and playing audio.
        /// &lt;/summary&gt;
        /// &lt;param name=&quot;gameTime&quot;&gt;Provides a snapshot of timing values.&lt;/param&gt;        protected override void Update(GameTime gameTime)
        {
            keyboardState = Keyboard.GetState();

            // Allows the game to exit
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
                this.Exit();
            if (keyboardState.IsKeyDown(Keys.Escape))
            {
                this.Exit();
            }

            if (keyboardState.IsKeyDown(Keys.Left))
            {
                playerSpeed.X = -1.0f;
            }
            if (keyboardState.IsKeyDown(Keys.Right))
            {
                playerSpeed.X = 1.0f;
            }
            if (keyboardState.IsKeyDown(Keys.Up))
            {
                playerSpeed.Y = -1.0f;
            }
            if (keyboardState.IsKeyDown(Keys.Down))
            {
                playerSpeed.Y = 1.0f;
            }

            playerPosition += playerSpeed;
            Hit();
            playerSpeed.X = 0.0f;
            playerSpeed.Y = 0.0f;

            // TODO: Add your update logic here

            base.Update(gameTime);
        }

        private void Hit()
        {
            if (playerSpeed.X &lt; 0.0f)
            {
                int x = (int)(playerPosition.X) / MAP_WIDTH;
                int y = (int)(playerPosition.Y + PLAYER_HEITHT - HIT_ADJUST_LENGTH) / MAP_HEIGHT;

                if (mapActivity[x, y] &amp;&amp;
                    playerPosition.X + PLAYER_WIDTH &gt; mapPosition[x, y].X &amp;&amp;
                    playerPosition.X &lt; mapPosition[x, y].X + MAP_WIDTH &amp;&amp;
                    playerPosition.Y + PLAYER_HEITHT &gt; mapPosition[x, y].Y &amp;&amp;
                    playerPosition.Y &lt; mapPosition[x, y].Y + MAP_HEIGHT)
                {
                    playerPosition.X = mapPosition[x, y].X + MAP_WIDTH;
                    playerSpeed.X = 0.0f;
                }
            }
            if (playerSpeed.X &gt; 0.0f)
            {
                int x = (int)(playerPosition.X + PLAYER_WIDTH) / MAP_WIDTH;
                int y = (int)(playerPosition.Y + PLAYER_HEITHT - HIT_ADJUST_LENGTH) / MAP_HEIGHT;

                if (mapActivity[x, y] &amp;&amp; 
                    playerPosition.X + PLAYER_WIDTH &gt; mapPosition[x, y].X &amp;&amp;
                    playerPosition.X &lt; mapPosition[x, y].X + MAP_WIDTH &amp;&amp;
                    playerPosition.Y + PLAYER_HEITHT &gt; mapPosition[x, y].Y &amp;&amp;
                    playerPosition.Y &lt; mapPosition[x, y].Y + MAP_HEIGHT)
                {
                    playerPosition.X = mapPosition[x, y].X - PLAYER_WIDTH;
                    playerSpeed.X = 0.0f;
                }
            }
            if (playerSpeed.Y &lt; 0.0f)
            {
                int x = (int)(playerPosition.X) / MAP_WIDTH;
                int y = (int)(playerPosition.Y) / MAP_HEIGHT;

                if (mapActivity[x, y] &amp;&amp; 
                    playerPosition.X + PLAYER_WIDTH &gt; mapPosition[x, y].X &amp;&amp;
                    playerPosition.X &lt; mapPosition[x, y].X + MAP_WIDTH &amp;&amp;
                    playerPosition.Y + PLAYER_HEITHT &gt; mapPosition[x, y].Y &amp;&amp;
                    playerPosition.Y &lt; mapPosition[x, y].Y + MAP_HEIGHT)
                {
                    playerPosition.Y = mapPosition[x, y].Y + MAP_HEIGHT;
                    playerSpeed.Y = 0.0f;
                }
            }
            if (playerSpeed.Y &gt; 0.0f)
            {
                int x = (int)(playerPosition.X) / MAP_WIDTH;
                int y = (int)(playerPosition.Y + PLAYER_HEITHT) / MAP_HEIGHT;

                if (mapActivity[x, y] &amp;&amp; 
                    playerPosition.X + PLAYER_WIDTH &gt; mapPosition[x, y].X &amp;&amp;
                    playerPosition.X &lt; mapPosition[x, y].X + MAP_WIDTH &amp;&amp;
                    playerPosition.Y + PLAYER_HEITHT &gt; mapPosition[x, y].Y &amp;&amp;
                    playerPosition.Y &lt; mapPosition[x, y].Y + MAP_HEIGHT)
                {
                    playerPosition.Y = mapPosition[x, y].Y - PLAYER_HEITHT;
                    playerSpeed.Y = 0.0f;
                }
            }
        }
        /// &lt;summary&gt;
        /// This is called when the game should draw itself.
        /// &lt;/summary&gt;
        /// &lt;param name=&quot;gameTime&quot;&gt;Provides a snapshot of timing values.&lt;/param&gt;        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.CornflowerBlue);

            // TODO: Add your drawing code here
            spriteBatch.Begin();
            for (int x = 0; x &lt; MAP_DIVISION_MAX_X; ++x)
            {
                for (int y = 0; y &lt; MAP_DIVISION_MAX_Y; ++y)
                {
                    if (mapActivity[x, y])
                    {
                        spriteBatch.Draw(
                            map,
                            new Rectangle((int)mapPosition[x, y].X, (int)mapPosition[x, y].Y, MAP_WIDTH, MAP_HEIGHT),
                            new Rectangle(0, 0, MAP_WIDTH, MAP_HEIGHT),
                            Color.White);
                    }
                }
            }
            spriteBatch.Draw(
                player,
                new Rectangle((int)playerPosition.X, (int)playerPosition.Y, PLAYER_WIDTH, PLAYER_HEITHT),
                new Rectangle(0, 0, PLAYER_WIDTH, PLAYER_HEITHT),
                Color.White);
            spriteBatch.End();
            base.Draw(gameTime);
        }
    }
}
&lt;/pre&gt;



ジャンプができる四角と複数の四角の当たり判定。
&lt;pre class=&quot;prettyprint&quot;&gt;
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace Hit_Test_03
{
    /// &lt;summary&gt;
    /// This is the main type for your game
    /// &lt;/summary&gt;
    public class Game1 : Microsoft.Xna.Framework.Game
    {
        GraphicsDeviceManager graphics;
        SpriteBatch spriteBatch;

        Texture2D player;
        Texture2D map;

        const int MAP_DIVISION_MAX_X = 8;
        const int MAP_DIVISION_MAX_Y = 5;

        Vector2 playerPosition;
        Vector2 playerSpeed;

        const float GRAVITY = 1.0f;

        Vector2[,] mapPosition = new Vector2[MAP_DIVISION_MAX_X, MAP_DIVISION_MAX_Y];
        Boolean[,] mapActivity = new Boolean[MAP_DIVISION_MAX_X, MAP_DIVISION_MAX_Y];

        const int PLAYER_WIDTH = 60;
        const int PLAYER_HEITHT = 90;

        const int MAP_WIDTH = 100;
        const int MAP_HEIGHT = 100;

        const int MAP_OFFSET_X = 0;
        const int MAP_OFFSET_Y = 0;

        const float HIT_ADJUST_LENGTH = 1.01f;
        KeyboardState keyboardState;

        enum DIRECTION
        {
            LEFT,
            TOP,
            BOTTOM,
            RIGHT
        }
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = &quot;Content&quot;;
        }

        /// &lt;summary&gt;
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// &lt;/summary&gt;
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here
            playerPosition = new Vector2(MAP_WIDTH * 3, MAP_HEIGHT * 1);
            playerSpeed = new Vector2(0.0f, 0.0f);

            for (int x = 0; x &lt; MAP_DIVISION_MAX_X; ++x)
            {
                for (int y = 0; y &lt; MAP_DIVISION_MAX_Y; ++y)
                {
                    mapPosition[x, y] = new Vector2(x * MAP_WIDTH + MAP_OFFSET_X, y * MAP_HEIGHT + MAP_OFFSET_Y);
                    mapActivity[x, y] = true;
                }
                //                mapActivity[x, 0] = false;
            }
            mapActivity[2, 1] = false;
            mapActivity[2, 2] = false;
            mapActivity[2, 3] = false;
            mapActivity[3, 1] = false;
           // mapActivity[3, 2] = false;
            mapActivity[3, 3] = false;
            mapActivity[4, 1] = false;
            mapActivity[4, 2] = false;
            mapActivity[4, 3] = false;
            mapActivity[5, 1] = false;
          //  mapActivity[5, 2] = false;
            mapActivity[5, 3] = false;
            mapActivity[6, 1] = false;
            mapActivity[6, 2] = false;
            mapActivity[6, 3] = false;
            base.Initialize();
        }

        /// &lt;summary&gt;
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// &lt;/summary&gt;
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            player = Content.Load&lt;Texture2D&gt;(&quot;players16&quot;);
            map = Content.Load&lt;Texture2D&gt;(&quot;map&quot;);
            // TODO: use this.Content to load your game content here
        }

        /// &lt;summary&gt;
        /// UnloadContent will be called once per game and is the place to unload
        /// all content.
        /// &lt;/summary&gt;
        protected override void UnloadContent()
        {
            // TODO: Unload any non ContentManager content here
        }

        /// &lt;summary&gt;
        /// Allows the game to run logic such as updating the world,
        /// checking for collisions, gathering input, and playing audio.
        /// &lt;/summary&gt;
        /// &lt;param name=&quot;gameTime&quot;&gt;Provides a snapshot of timing values.&lt;/param&gt;        protected override void Update(GameTime gameTime)
        {
            keyboardState = Keyboard.GetState();

            // Allows the game to exit
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
                this.Exit();
            if (keyboardState.IsKeyDown(Keys.Escape))
            {
                this.Exit();
            }

            if (keyboardState.IsKeyDown(Keys.Left))
            {
                playerSpeed.X = -1.0f;
            }
            if (keyboardState.IsKeyDown(Keys.Right))
            {
                playerSpeed.X = 1.0f;
            }
            if (keyboardState.IsKeyDown(Keys.Up))
            {
                playerSpeed.Y = -10.0f;
            }
            if (keyboardState.IsKeyDown(Keys.Down))
            {
                playerSpeed.Y = 1.0f;
            }

            playerPosition += playerSpeed;
            Hit();
            playerSpeed.X = 0.0f;
            playerSpeed.Y += GRAVITY;

            // TODO: Add your update logic here

            base.Update(gameTime);
        }

        private void Hit()
        {
            if (playerSpeed.X &lt; 0.0f)
            {
                int x = (int)(playerPosition.X) / MAP_WIDTH;
                int y = (int)(playerPosition.Y + PLAYER_HEITHT - HIT_ADJUST_LENGTH - playerSpeed.Y) / MAP_HEIGHT;

                if (mapActivity[x, y] &amp;&amp;
                    playerPosition.X + PLAYER_WIDTH &gt; mapPosition[x, y].X &amp;&amp;
                    playerPosition.X &lt; mapPosition[x, y].X + MAP_WIDTH &amp;&amp;
                    playerPosition.Y + PLAYER_HEITHT &gt; mapPosition[x, y].Y &amp;&amp;
                    playerPosition.Y &lt; mapPosition[x, y].Y + MAP_HEIGHT)
                {
                    playerPosition.X = mapPosition[x, y].X + MAP_WIDTH;
                    playerSpeed.X = 0.0f;
                }
            }
            if (playerSpeed.X &gt; 0.0f)
            {
                int x = (int)(playerPosition.X + PLAYER_WIDTH) / MAP_WIDTH;
                int y = (int)(playerPosition.Y + PLAYER_HEITHT - HIT_ADJUST_LENGTH - playerSpeed.Y) / MAP_HEIGHT;

                if (mapActivity[x, y] &amp;&amp;
                    playerPosition.X + PLAYER_WIDTH &gt; mapPosition[x, y].X &amp;&amp;
                    playerPosition.X &lt; mapPosition[x, y].X + MAP_WIDTH &amp;&amp;
                    playerPosition.Y + PLAYER_HEITHT &gt; mapPosition[x, y].Y &amp;&amp;
                    playerPosition.Y &lt; mapPosition[x, y].Y + MAP_HEIGHT)
                {
                    playerPosition.X = mapPosition[x, y].X - PLAYER_WIDTH;
                    playerSpeed.X = 0.0f;
                }
            }
            if (playerSpeed.Y &lt; 0.0f)
            {
                int x = (int)(playerPosition.X - playerSpeed.X) / MAP_WIDTH;
                int y = (int)(playerPosition.Y) / MAP_HEIGHT;
                if (!mapActivity[x, y] &amp;&amp; mapActivity[x + 1, y] &amp;&amp; playerPosition.X &lt;= mapPosition[x + 1, y].X)
                {
                    x += 1;
                }
                if (mapActivity[x, y] &amp;&amp;
                    playerPosition.X - HIT_ADJUST_LENGTH + PLAYER_WIDTH &gt; mapPosition[x, y].X &amp;&amp;
                    playerPosition.X - HIT_ADJUST_LENGTH &lt; mapPosition[x, y].X + MAP_WIDTH &amp;&amp;
                    playerPosition.Y + PLAYER_HEITHT &gt; mapPosition[x, y].Y &amp;&amp;
                    playerPosition.Y &lt; mapPosition[x, y].Y + MAP_HEIGHT)
                {
                    playerPosition.Y = mapPosition[x, y].Y + MAP_HEIGHT;
                    playerSpeed.Y = 0.0f;
                }
            }
            if (playerSpeed.Y &gt; 0.0f)
            {
                int x = (int)(playerPosition.X) / MAP_WIDTH;
                int y = (int)(playerPosition.Y + PLAYER_HEITHT) / MAP_HEIGHT;
                if (!mapActivity[x, y] &amp;&amp; mapActivity[x + 1, y] &amp;&amp; playerPosition.X &lt;= mapPosition[x + 1, y].X)
                {
                    x += 1;
                }
                if (mapActivity[x, y] &amp;&amp;
                    playerPosition.X + PLAYER_WIDTH &gt; mapPosition[x, y].X &amp;&amp;
                    playerPosition.X &lt; mapPosition[x, y].X + MAP_WIDTH &amp;&amp;
                    playerPosition.Y + PLAYER_HEITHT &gt; mapPosition[x, y].Y &amp;&amp;
                    playerPosition.Y &lt; mapPosition[x, y].Y + MAP_HEIGHT)
                {
                    playerPosition.Y = mapPosition[x, y].Y - PLAYER_HEITHT;
                    playerSpeed.Y = 0.0f;
                }
            }
        }
        /// &lt;summary&gt;
        /// This is called when the game should draw itself.
        /// &lt;/summary&gt;
        /// &lt;param name=&quot;gameTime&quot;&gt;Provides a snapshot of timing values.&lt;/param&gt;        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.CornflowerBlue);

            // TODO: Add your drawing code here
            spriteBatch.Begin();
            for (int x = 0; x &lt; MAP_DIVISION_MAX_X; ++x)
            {
                for (int y = 0; y &lt; MAP_DIVISION_MAX_Y; ++y)
                {
                    if (mapActivity[x, y])
                    {
                        spriteBatch.Draw(
                            map,
                            new Rectangle((int)mapPosition[x, y].X, (int)mapPosition[x, y].Y, MAP_WIDTH, MAP_HEIGHT),
                            new Rectangle(0, 0, MAP_WIDTH, MAP_HEIGHT),
                            Color.White);
                    }
                }
            }
            spriteBatch.Draw(
                player,
                new Rectangle((int)playerPosition.X, (int)playerPosition.Y, PLAYER_WIDTH, PLAYER_HEITHT),
                new Rectangle(0, 0, PLAYER_WIDTH, PLAYER_HEITHT),
                Color.White);
            spriteBatch.End();
            base.Draw(gameTime);
        }
    }
}
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://minmin-work.blogspot.com/feeds/4706533526054933480/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://minmin-work.blogspot.com/2011/07/blog-post.html#comment-form' title='2 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/4706533526054933480'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/4706533526054933480'/><link rel='alternate' type='text/html' href='http://minmin-work.blogspot.com/2011/07/blog-post.html' title='アクションゲームの当たり判定'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03201767703948521361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1092877930408053093.post-7516270096642861415</id><published>2011-06-17T05:32:00.000+09:00</published><updated>2011-06-17T05:32:02.443+09:00</updated><title type='text'>PSVita</title><content type='html'>PSVitaの開発環境はどうなるんだろう？&lt;br /&gt;
開発機材があるのかな。もしPSVita実機だけでデバッグできたら、個人の開発者が増えるんではなかろうか。&lt;br /&gt;
統合開発環境とかもeclipseとかが使えたら、ぐっと開発者が増えると思う。&lt;br /&gt;
SCEにできるだけオープンな開発環境を整えてもらいたいと願ってます。</content><link rel='replies' type='application/atom+xml' href='http://minmin-work.blogspot.com/feeds/7516270096642861415/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://minmin-work.blogspot.com/2011/06/psvita.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/7516270096642861415'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/7516270096642861415'/><link rel='alternate' type='text/html' href='http://minmin-work.blogspot.com/2011/06/psvita.html' title='PSVita'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03201767703948521361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1092877930408053093.post-9035278435596514804</id><published>2011-05-18T18:03:00.001+09:00</published><updated>2011-05-18T18:10:18.725+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="OpenGLES"/><category scheme="http://www.blogger.com/atom/ns#" term="texture"/><title type='text'>OpenGLES入門　その３　テクスチャの表示</title><content type='html'>今回はテクスチャを表示させます。&lt;br /&gt;
今回は表示させる画像にこのimage.pngを使用します。&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDqsSyQHROPotbY9UeXRCnL1dcQfgjMdLWdfnUxqkju87I6SQrZVZo-We82-XtmJHIBxMnGYQcSyHwhlSgGM4bxGg19ONPvepq1xK-JfCguw2VZwrStq5yh51WydqxNYC8hkzi35JiNNzO/s1600/image.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;256&quot; width=&quot;256&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDqsSyQHROPotbY9UeXRCnL1dcQfgjMdLWdfnUxqkju87I6SQrZVZo-We82-XtmJHIBxMnGYQcSyHwhlSgGM4bxGg19ONPvepq1xK-JfCguw2VZwrStq5yh51WydqxNYC8hkzi35JiNNzO/s320/image.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
そして&lt;a href=&quot;http://minmin-work.blogspot.com/2011/03/opengles_28.html&quot;&gt;&lt;i&gt;&lt;b&gt;OpenGL入門その２&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;で使用したソースコードを流用します。&lt;br /&gt;
&lt;br /&gt;
MyApplication.javaはそのままで、Renderer.javaとScene.javaの中身を少し変更します。&lt;br /&gt;
&lt;br /&gt;
■Renderer.java■&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;package test.sample;

import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;

import android.app.Activity;
import android.opengl.GLSurfaceView;
import android.view.Display;

public class GLRenderer implements GLSurfaceView.Renderer {

 private Scene mScene;
 private boolean mOnce = true;
 private Activity mActivity;
 public GLRenderer(Activity activity, Display display) {
  mScene = new Scene(display);
  mActivity = activity;
 }

 @Override
 public void onDrawFrame(GL10 gl) {//毎フレーム呼ばれるメインループ

  if (mOnce) {
   mScene.setTexture(gl, mActivity.getResources().openRawResource(R.drawable.image));
   mOnce = false;
  }
  mScene.draw(gl);
 }

 @Override
 public void onSurfaceChanged(GL10 arg0, int arg1, int arg2) {
 }

 @Override
 public void onSurfaceCreated(GL10 gl, EGLConfig config) {
 }
}
&lt;/pre&gt;&lt;br /&gt;
■Scene.java■&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;package test.sample;

import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.FloatBuffer;

import javax.microedition.khronos.opengles.GL10;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.opengl.GLU;
import android.opengl.GLUtils;
import android.view.Display;
import android.view.MotionEvent;
import android.view.View;

public class Scene implements View.OnTouchListener{

 private FloatBuffer vertexBuffer;
 private FloatBuffer textureBuffer;


 private int mTextureNumber;
 private int mWidth;
 private int mHeight;

 public Scene(Display display) {
  mWidth = display.getWidth();
  mHeight = display.getHeight();

  float x = 0.0f;
  float y = 0.0f;
  float z = 0.0f;
  float sizeX = 10.0f;
  float sizeY = 10.0f;
  float sizeZ = 0.0f;
  float[] vertex = {
    //左側の三角形
    x + sizeX, y + sizeY, z + sizeZ,//右下
    x - sizeX, y - sizeY, z + sizeZ,//左上
    x - sizeX, y + sizeY, z + sizeZ,//左下
    //右側の三角形
    x + sizeX, y + sizeY, z + sizeZ,//右下
    x + sizeX, y - sizeY, z + sizeZ,//右上
    x - sizeX, y - sizeY, z + sizeZ,//左上
  };
  ByteBuffer vb = ByteBuffer.allocateDirect(6 * 3 * 4);
  vb.order(ByteOrder.nativeOrder()); //ビッグエンディアンかリトルエンディアンにあわせてくれる
  vertexBuffer = vb.asFloatBuffer();
  vertexBuffer.put(vertex);
  vertexBuffer.position(0);

  float[] texture = {
    1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, //左側の三角形に貼る
    1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f //右側の三角形に貼る
  };
  ByteBuffer tb = ByteBuffer.allocateDirect(2 * 3 * 2 * 4);
  tb.order(ByteOrder.nativeOrder()); //ビッグエンディアンかリトルエンディアンにあわせてくれる
  textureBuffer = tb.asFloatBuffer();
  textureBuffer.put(texture);
  textureBuffer.position(0);

 }


    public void setTexture(GL10 gl, InputStream is)
    {
     Bitmap bitmap;
     try {
      bitmap = BitmapFactory.decodeStream(is);
     } finally {
      try {
       is.close();
      } catch(IOException e) {}
     }
     int[] textureNumber = new int[1];
     gl.glGenTextures(1, textureNumber, 0);
     mTextureNumber = textureNumber[0];
     gl.glBindTexture(GL10.GL_TEXTURE_2D, mTextureNumber);
     GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0);

     gl.glTexParameterx( GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S, GL10.GL_REPEAT );
     gl.glTexParameterx( GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T, GL10.GL_REPEAT );
     gl.glTexParameterx( GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_LINEAR );
     gl.glTexParameterx( GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_LINEAR );

    }

 public void draw(GL10 gl) {
  gl.glClearColor(1.0f, 0.0f, 0.0f, 1.0f);

     gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);

  //ビューポート行列(ウィンドウへの出力領域)設定
  gl.glViewport(0,0,mWidth,mHeight);

  //射影行列設定
  gl.glMatrixMode(GL10.GL_PROJECTION);
  gl.glLoadIdentity();
  //視界(視野角、画面のアスペクト、比近視点、遠視点)の設定
  float aspect = (float)mWidth / (float)mHeight;
  GLU.gluPerspective(gl, 45.0f, aspect, 0.1f, 3000.0f);

     GLU.gluLookAt(
              gl,
        0.0f, 0.0f, 100.0f,  //位置(視点)
       0.0f, 0.0f, 0.0f,  //見つめているところ
       0.0f, 1.0f, 0.0f //水平
     );
     gl.glMatrixMode(GL10.GL_MODELVIEW);
     gl.glLoadIdentity();

  gl.glEnable(GL10.GL_TEXTURE_2D);
  gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
  gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);

  gl.glVertexPointer(3, GL10.GL_FLOAT, 0, vertexBuffer);
  gl.glTexCoordPointer(2, GL10.GL_FLOAT, 0, textureBuffer);

  int triangleNum = 2;
  gl.glDrawArrays(GL10.GL_TRIANGLES, 0, triangleNum * 3);
 }

 @Override
 public boolean onTouch(View arg0, MotionEvent arg1) {
  // TODO 自動生成されたメソッド・スタブ
  return false;
 }

}

&lt;/pre&gt;&lt;br /&gt;
画像をdrawable-hdpiに登録してから実行すると下のように表示されます。&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheVeniZxqMEzYnlZPldrCvCsTGrUFkbRuZX946F2_ZWDSxx6jtG7iyfgaPp3Qf5RRBMJXAdGw3l1W7CAZABjVW9S7aRvJ85mXQdKHfmowwbqJv5UgSEt40JTa2H6KOFgASBtBPhBo1JzcK/s1600/test.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;227&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheVeniZxqMEzYnlZPldrCvCsTGrUFkbRuZX946F2_ZWDSxx6jtG7iyfgaPp3Qf5RRBMJXAdGw3l1W7CAZABjVW9S7aRvJ85mXQdKHfmowwbqJv5UgSEt40JTa2H6KOFgASBtBPhBo1JzcK/s320/test.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://m2t.jp/m2t.php&quot; charset=&quot;Shift_JIS&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.bparts.jp/parts/js/lib.js&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.bparts.jp/parts/index.php?id=09494c0ee6b6c06eea8739ab97c2ddfbce3a1b64&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;div id=&quot;bp_parts_11&quot;&gt;&lt;/div&gt;&lt;div class=&quot;bp_parts_links&quot; style=&#39;font-size:10px;margin-top:2px&#39;&gt;PR&amp;nbsp;&amp;raquo;&amp;nbsp;&lt;a target=&#39;_blank&#39; href=&#39;http://www.led-kanban.com/&#39; style=&#39;color: #39C; text-decoration:none;&#39;&gt;看板&lt;/a&gt;&lt;br /&gt;
PR&amp;nbsp;&amp;raquo;&amp;nbsp;&lt;a target=&#39;_blank&#39; href=&#39;http://www.meishi-direct.com/&#39; style=&#39;color: #39C; text-decoration:none;&#39;&gt;名刺 作成&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://minmin-work.blogspot.com/feeds/9035278435596514804/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://minmin-work.blogspot.com/2011/05/opengles.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/9035278435596514804'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/9035278435596514804'/><link rel='alternate' type='text/html' href='http://minmin-work.blogspot.com/2011/05/opengles.html' title='OpenGLES入門　その３　テクスチャの表示'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03201767703948521361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDqsSyQHROPotbY9UeXRCnL1dcQfgjMdLWdfnUxqkju87I6SQrZVZo-We82-XtmJHIBxMnGYQcSyHwhlSgGM4bxGg19ONPvepq1xK-JfCguw2VZwrStq5yh51WydqxNYC8hkzi35JiNNzO/s72-c/image.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1092877930408053093.post-2114903284629131793</id><published>2011-03-28T01:47:00.016+09:00</published><updated>2011-03-28T04:10:22.081+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="OpenGLES"/><title type='text'>OpenGLES入門　その２</title><content type='html'>今回は三角ポリゴンを２枚表示させます。&lt;br /&gt;
下のような青と緑のポリゴンが表示できると思います。&lt;br /&gt;
&lt;br /&gt;
■MyApplication.java■&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d3535; font-family: &#39;Courier New&#39;, &#39;ＭＳ ゴシック&#39;, monospace; font-size: 12px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&lt;blockquote&gt;import android.app.Activity;
import android.opengl.GLSurfaceView;
import android.os.Bundle;
import android.view.WindowManager;&amp;nbsp;&lt;/blockquote&gt;&lt;blockquote&gt;public class MyApplication extends Activity {


&lt;blockquote&gt;private GLSurfaceView mGLSurfaceView;
private GLRenderer mGLRenderer;

@Override
public void onCreate(Bundle savedInstanceState) {


&lt;blockquote&gt;super.onCreate(savedInstanceState);
mGLSurfaceView = new GLSurfaceView(this);
setContentView(mGLSurfaceView);
WindowManager windowmanager = (WindowManager)getSystemService(WINDOW_SERVICE);
mGLRenderer = new GLRenderer(this, windowmanager.getDefaultDisplay());
mGLSurfaceView.setRenderer(mGLRenderer);&lt;/blockquote&gt;}&lt;/blockquote&gt;&lt;blockquote&gt;/**
*
*/
public void onPause() {

&lt;blockquote&gt;mGLSurfaceView.onPause();
super.onPause();&lt;/blockquote&gt;}&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;blockquote&gt;/**
*
*/
public void onResume() {


&lt;blockquote&gt;super.onResume();
mGLSurfaceView.onResume();&lt;/blockquote&gt;}&lt;/blockquote&gt;}&lt;/blockquote&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;■GLRenderer.java■&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&lt;blockquote&gt;import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;
import android.app.Activity;
import android.opengl.GLSurfaceView;
import android.opengl.GLU;
import android.view.Display;&amp;nbsp;&lt;/blockquote&gt;&lt;blockquote&gt;public class GLRenderer implements GLSurfaceView.Renderer {
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;private Scene mScene;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public GLRenderer(Activity activity, Display display) {
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mScene = new Scene(display);
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Override
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public void onDrawFrame(GL10 gl) {//毎フレーム呼ばれるメインループ
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mScene.draw(gl);
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Override
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public void onSurfaceChanged(GL10 arg0, int arg1, int arg2) {
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Override
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public void onSurfaceCreated(GL10 gl, EGLConfig config) {
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}
}&lt;/blockquote&gt;&lt;/pre&gt;&amp;nbsp;■Scene.java■&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&lt;blockquote&gt;import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.FloatBuffer;
import javax.microedition.khronos.opengles.GL10;
import android.opengl.GLU;
import android.view.Display;
import android.view.MotionEvent;
import android.view.View;
public class Scene implements View.OnTouchListener{
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;private FloatBuffer vertexBuffer;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;private FloatBuffer colorBuffer;

&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;private int mWidth;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;private int mHeight;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public Scene(Display display) {
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mWidth = display.getWidth();
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mHeight = display.getHeight();
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;float x = 0.0f;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;float y = 0.0f;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;float z = 0.0f;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;float sizeX = 10.0f;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;float sizeY = 10.0f;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;float sizeZ = 0.0f;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;float[] vertex = {
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;//左側の三角形
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;x + sizeX, y - sizeY, z + sizeZ,
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;x - sizeX, y - sizeY, z + sizeZ,
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;x - sizeX, y + sizeY, z + sizeZ,
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;//右側の三角形
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;x - sizeX, y + sizeY, z + sizeZ,
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;x + sizeX, y + sizeY, z + sizeZ,
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;x + sizeX, y - sizeY, z + sizeZ,
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;};
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;ByteBuffer vb = ByteBuffer.allocateDirect(6 * 3 * 4);
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;vb.order(ByteOrder.nativeOrder());&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//ビッグエンディアンかリトルエンディアンにあわせてくれる
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;vertexBuffer = vb.asFloatBuffer();
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;vertexBuffer.put(vertex);
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;vertexBuffer.position(0);
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;float[] color = {
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;//左側の三角形（青）
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;0.0f, 0.0f, 1.0f, 1.0f,
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;0.0f, 0.0f, 1.0f, 1.0f,
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;0.0f, 0.0f, 1.0f, 1.0f,
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;//右側の三角形（緑）
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;0.0f, 1.0f, 0.0f, 1.0f,
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;0.0f, 1.0f, 0.0f, 1.0f,
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;0.0f, 1.0f, 0.0f, 1.0f
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;};
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;ByteBuffer vbc = ByteBuffer.allocateDirect(6 * 4 * 4);
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;vbc.order(ByteOrder.nativeOrder());&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//ビッグエンディアンかリトルエンディアンにあわせてくれる
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;colorBuffer = vbc.asFloatBuffer();
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;colorBuffer.put(color);
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;colorBuffer.position(0);
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public void draw(GL10 gl) {
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;gl.glClearColor(1.0f, 0.0f, 0.0f, 1.0f);
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;//ビューポート行列(ウィンドウへの出力領域)設定
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;gl.glViewport(0,0,mWidth,mHeight);
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;//射影行列設定
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;gl.glMatrixMode(GL10.GL_PROJECTION);
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;gl.glLoadIdentity();
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;//視界(視野角、画面のアスペクト、比近視点、遠視点)の設定
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;float aspect = (float)mWidth / (float)mHeight;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;GLU.gluPerspective(gl, 45.0f, aspect, 0.1f, 3000.0f);
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;GLU.gluLookAt(&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gl,
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;0.0f, 0.0f, 100.0f, &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//位置(視点)
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;0.0f, 0.0f, 0.0f, &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//見つめているところ
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.0f, 1.0f, 0.0f&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//水平
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;);&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;gl.glMatrixMode(GL10.GL_MODELVIEW);&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;gl.glLoadIdentity();&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;gl.glEnableClientState(GL10.GL_COLOR_ARRAY);
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;gl.glVertexPointer(3, GL10.GL_FLOAT, 0, vertexBuffer);
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;gl.glColorPointer(4, GL10.GL_FLOAT, 0, colorBuffer);
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;int triangleNum = 2;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;gl.glDrawArrays(GL10.GL_TRIANGLES, 0, triangleNum * 3);
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Override
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public boolean onTouch(View arg0, MotionEvent arg1) {
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;return false;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}
}&lt;/blockquote&gt;&lt;/pre&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEzD86apHK6Alea3uvYchrRx1mT64VVWWtOS5wlcSQertdBMhKF_kWVKSbMVHDcoGUXcduWXBUHqVElJh60Wamaco28Kvo9oPz7HBEBQ7U9-1ERXQToI2V-vuxP-FStcBeQkW2l1nXTKXP/s1600/OpenGL_1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;227&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEzD86apHK6Alea3uvYchrRx1mT64VVWWtOS5wlcSQertdBMhKF_kWVKSbMVHDcoGUXcduWXBUHqVElJh60Wamaco28Kvo9oPz7HBEBQ7U9-1ERXQToI2V-vuxP-FStcBeQkW2l1nXTKXP/s320/OpenGL_1.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;script charset=&quot;Shift_JIS&quot; src=&quot;http://m2t.jp/m2t.php&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;script charset=&quot;utf-8&quot; src=&quot;http://www.bparts.jp/parts/js/lib.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;&lt;/div&gt;&lt;div&gt;&lt;script charset=&quot;utf-8&quot; src=&quot;http://www.bparts.jp/parts/index.php?id=09494c0ee6b6c06eea8739ab97c2ddfbce3a1b64&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;&lt;/div&gt;&lt;div&gt;&lt;div id=&quot;bp_parts_11&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;bp_parts_links&quot; style=&quot;font-size: 10px; margin-top: 2px;&quot;&gt;&lt;/div&gt;&lt;div&gt;PR&amp;nbsp;»&amp;nbsp;&lt;a href=&quot;http://www.led-kanban.com/&quot; style=&quot;color: #3399cc; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;看板&lt;/a&gt;&lt;br /&gt;
PR&amp;nbsp;»&amp;nbsp;&lt;a href=&quot;http://www.meishi-direct.com/&quot; style=&quot;color: #3399cc; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;名刺 作成&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://minmin-work.blogspot.com/feeds/2114903284629131793/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://minmin-work.blogspot.com/2011/03/opengles_28.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/2114903284629131793'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/2114903284629131793'/><link rel='alternate' type='text/html' href='http://minmin-work.blogspot.com/2011/03/opengles_28.html' title='OpenGLES入門　その２'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03201767703948521361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEzD86apHK6Alea3uvYchrRx1mT64VVWWtOS5wlcSQertdBMhKF_kWVKSbMVHDcoGUXcduWXBUHqVElJh60Wamaco28Kvo9oPz7HBEBQ7U9-1ERXQToI2V-vuxP-FStcBeQkW2l1nXTKXP/s72-c/OpenGL_1.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1092877930408053093.post-476193770660255902</id><published>2011-03-23T19:53:00.002+09:00</published><updated>2011-03-23T19:58:03.160+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>Androidアプリ公開</title><content type='html'>「ポリゴンワールド」をマーケットに公開しました。&lt;br /&gt;
無料です。&lt;br /&gt;
&lt;a href=&quot;https://market.android.com/developer?pub=minmin0530&quot;&gt;https://market.android.com/developer?pub=minmin0530&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
初めて作ったAndroidアプリです。&lt;br /&gt;
Android持ってる方は是非ダウンロードしてみて下さい。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://m2t.jp/m2t.php&quot; charset=&quot;Shift_JIS&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.bparts.jp/parts/js/lib.js&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.bparts.jp/parts/index.php?id=09494c0ee6b6c06eea8739ab97c2ddfbce3a1b64&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;div id=&quot;bp_parts_11&quot;&gt;&lt;/div&gt;&lt;div class=&quot;bp_parts_links&quot; style=&#39;font-size:10px;margin-top:2px&#39;&gt;PR&amp;nbsp;&amp;raquo;&amp;nbsp;&lt;a target=&#39;_blank&#39; href=&#39;http://www.led-kanban.com/&#39; style=&#39;color: #39C; text-decoration:none;&#39;&gt;看板&lt;/a&gt;&lt;br /&gt;
PR&amp;nbsp;&amp;raquo;&amp;nbsp;&lt;a target=&#39;_blank&#39; href=&#39;http://www.meishi-direct.com/&#39; style=&#39;color: #39C; text-decoration:none;&#39;&gt;名刺 作成&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://minmin-work.blogspot.com/feeds/476193770660255902/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://minmin-work.blogspot.com/2011/03/android.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/476193770660255902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/476193770660255902'/><link rel='alternate' type='text/html' href='http://minmin-work.blogspot.com/2011/03/android.html' title='Androidアプリ公開'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03201767703948521361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1092877930408053093.post-3375395424371897628</id><published>2011-03-01T04:25:00.001+09:00</published><updated>2011-03-01T04:30:01.401+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="OpenGLES"/><title type='text'>OpenGLES入門　その１</title><content type='html'>AndroidでのOpenGLESの使い方をおおまかに書いておきます。&lt;br /&gt;
&lt;br /&gt;
■１&lt;br /&gt;
MyApplicationを作る。まずActivityを継承する&lt;br /&gt;
&lt;br /&gt;
class MyApplication extends Activity {&lt;br /&gt;
　　public void onCreate(Bundle savedInstanceState) {&lt;br /&gt;
　　　　super.onCreate(savedInstanceState);&lt;br /&gt;
&lt;br /&gt;
　　　　//AbsoluteLayoutを使うのは、後でボタンやテキストを表示させるため。&lt;br /&gt;
　　　　AbsoluteLayout layout=new AbsoluteLayout(this);&lt;br /&gt;
　　　　setContentView(layout);&lt;br /&gt;
&lt;br /&gt;
　　　　//GLサーフェイスビューを生成して設定&lt;br /&gt;
　　　　GLSurfaceView mGLSurfaceView = new GLSurfaceView(this);&lt;br /&gt;
　　　　GLRenderer glRenderer = new GLRenderer(this);&lt;br /&gt;
　　　　mGLSurfaceView.setRenderer(glRenderer);&lt;br /&gt;
　　　　layout.addView(mGLSurfaceView);&lt;br /&gt;
　　}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
■２&lt;br /&gt;
GLRendererクラスはGLSurfaceView.Rendererを継承する&lt;br /&gt;
&lt;br /&gt;
public class GLRenderer implements GLSurfaceView.Renderer {&lt;br /&gt;
　　private Scene mScene;&lt;br /&gt;
　　private Resources mResource;&lt;br /&gt;
&lt;br /&gt;
　　public GLRenderer(Activity activity) {&lt;br /&gt;
　　　　mResource = activity.getResources();//これは後でテクスチャを読み込むときに使う。&lt;br /&gt;
　　　　mScene = new Scene();&lt;br /&gt;
　　}&lt;br /&gt;
&lt;br /&gt;
　　//このonDrawFrameメソッドが毎フレーム呼ばれるので、ここで描画処理、更新処理を行う。&lt;br /&gt;
　　public void onDrawFrame(GL10 gl) {&lt;br /&gt;
　　　　mScene.draw(gl);&lt;br /&gt;
　　　　mScene.update();&lt;br /&gt;
　　}&lt;br /&gt;
&lt;br /&gt;
　　public void onSurfaceCreated(GL10 gl, EGLConfig config) {&lt;br /&gt;
　　　　//ここにOpenGLの初期化処理を書いておく&lt;br /&gt;
　　}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
■３&lt;br /&gt;
SceneクラスはView.OnTouchListenerを継承する&lt;br /&gt;
&lt;br /&gt;
public class Scene implements View.OnTouchListener{&lt;br /&gt;
　　public void draw(GL10 gl) {&lt;br /&gt;
　　　　//ここにポリゴンの描画処理を書く&lt;br /&gt;
　　}&lt;br /&gt;
　　public void update() {&lt;br /&gt;
　　　　//ここに物体の移動処理などを書く&lt;br /&gt;
　　}&lt;br /&gt;
　　public boolean onTouch(View v, MotionEvent event) {&lt;br /&gt;
　　　　//ここにタッチ操作処理を書く&lt;br /&gt;
　　　　return false;&lt;br /&gt;
　　}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
これをコピペしても動きません。すみません。&lt;br /&gt;
これで大体の流れをつかんで下さい。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://m2t.jp/m2t.php&quot; charset=&quot;Shift_JIS&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.bparts.jp/parts/js/lib.js&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.bparts.jp/parts/index.php?id=09494c0ee6b6c06eea8739ab97c2ddfbce3a1b64&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;div id=&quot;bp_parts_11&quot;&gt;&lt;/div&gt;&lt;div class=&quot;bp_parts_links&quot; style=&#39;font-size:10px;margin-top:2px&#39;&gt;PR&amp;nbsp;&amp;raquo;&amp;nbsp;&lt;a target=&#39;_blank&#39; href=&#39;http://www.led-kanban.com/&#39; style=&#39;color: #39C; text-decoration:none;&#39;&gt;看板&lt;/a&gt;&lt;br /&gt;PR&amp;nbsp;&amp;raquo;&amp;nbsp;&lt;a target=&#39;_blank&#39; href=&#39;http://www.meishi-direct.com/&#39; style=&#39;color: #39C; text-decoration:none;&#39;&gt;名刺 作成&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://minmin-work.blogspot.com/feeds/3375395424371897628/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://minmin-work.blogspot.com/2011/03/opengles.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/3375395424371897628'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/3375395424371897628'/><link rel='alternate' type='text/html' href='http://minmin-work.blogspot.com/2011/03/opengles.html' title='OpenGLES入門　その１'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03201767703948521361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1092877930408053093.post-405529081488484010</id><published>2011-01-26T02:24:00.000+09:00</published><updated>2011-01-26T02:24:43.914+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="音"/><title type='text'>Androidで音を鳴らす</title><content type='html'>resフォルダの中にrawフォルダを作って、その中に音声ファイルを保存。&lt;br /&gt;
&lt;blockquote&gt;mediaPlayer=MediaPlayer.create(getContext(),R.raw.test_bgm);&lt;br /&gt;
&lt;/blockquote&gt;javaファイルの中にこんな感じで音声ファイルを登録処理を書くが、eclipseはエラーを出しています。しかしそのまま保存。&lt;br /&gt;
そしてR.javaファイルにrawクラスとtest_bgm定数が自動で書き込まれるのを待つ。ここの自動的に書き込まれるっていう部分がまだよくわからないが、とにかくR.javaに自動的に書き込まれるようにする。自分で書き込むとビルドできなかったりした。&lt;br /&gt;
あとは簡単。&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;private MediaPlayer mediaPlayer;  //プレーヤー&lt;br /&gt;
&lt;br /&gt;
//サウンドの再生&lt;br /&gt;
public void playSound() {&lt;br /&gt;
　　try {&lt;br /&gt;
　　　　mediaPlayer=MediaPlayer.create(getContext(),R.raw.test_bgm3);&lt;br /&gt;
　　　　mediaPlayer.start();&lt;br /&gt;
　　　　mediaPlayer.setOnCompletionListener(this);&lt;br /&gt;
　　} catch (Exception e) {&lt;br /&gt;
　　}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//サウンドの停止&lt;br /&gt;
public void stopSound() {&lt;br /&gt;
　　try {&lt;br /&gt;
　　　　mediaPlayer.stop();&lt;br /&gt;
　　　　mediaPlayer.setOnCompletionListener(null);&lt;br /&gt;
　　　　mediaPlayer.release();&lt;br /&gt;
　　　　mediaPlayer=null;&lt;br /&gt;
　　} catch (Exception e) {&lt;br /&gt;
　　}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
@Override//サウンド再生終了時に呼ばれる&lt;br /&gt;
public void onCompletion(MediaPlayer arg0) {}&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
ViewとMediaPlayer.OnCompletionListenerを継承する。&lt;br /&gt;
コンストラクタの中で&lt;br /&gt;
super(context);&lt;br /&gt;
を書いておいて、後は音を鳴らしたいところでplaySound()を呼んでやる。stopSound()で音の終了。&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://m2t.jp/m2t.php&quot; charset=&quot;Shift_JIS&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.bparts.jp/parts/js/lib.js&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.bparts.jp/parts/index.php?id=09494c0ee6b6c06eea8739ab97c2ddfbce3a1b64&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;div id=&quot;bp_parts_11&quot;&gt;&lt;/div&gt;&lt;div class=&quot;bp_parts_links&quot; style=&#39;font-size:10px;margin-top:2px&#39;&gt;PR&amp;nbsp;&amp;raquo;&amp;nbsp;&lt;a target=&#39;_blank&#39; href=&#39;http://www.led-kanban.com/&#39; style=&#39;color: #39C; text-decoration:none;&#39;&gt;看板&lt;/a&gt;&lt;br /&gt;PR&amp;nbsp;&amp;raquo;&amp;nbsp;&lt;a target=&#39;_blank&#39; href=&#39;http://www.meishi-direct.com/&#39; style=&#39;color: #39C; text-decoration:none;&#39;&gt;名刺 作成&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://minmin-work.blogspot.com/feeds/405529081488484010/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://minmin-work.blogspot.com/2011/01/android_26.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/405529081488484010'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/405529081488484010'/><link rel='alternate' type='text/html' href='http://minmin-work.blogspot.com/2011/01/android_26.html' title='Androidで音を鳴らす'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03201767703948521361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1092877930408053093.post-7996469765540722817</id><published>2011-01-25T02:16:00.000+09:00</published><updated>2011-01-25T02:16:20.302+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>Androidでキーリピート</title><content type='html'>アンドロイドでボタンを押しているあいだ（タッチしているあいだ）毎回呼ばれる処理を実装する話です。&lt;br /&gt;
ゲーム作るときには必須の処理だと思います。&lt;br /&gt;
&lt;br /&gt;
onTouch(View v, MotionEvent me)の中でボタンが押されたら(DOWN)リピートフラグをtrueにする。ボタンが離されたら（UP）リピートフラグをfalseにする。&lt;br /&gt;
メインループであるonDrawFrame(GL10 gl)の中でキーリピートしているときにコールバックされるオブジェクトを登録する。&lt;br /&gt;
&lt;blockquote&gt;private Runnable mLongPressAction = new Runnable() {&lt;br /&gt;
　　public void run() {//コールバックされる&lt;br /&gt;
　　//ここにキーリピートされたときの処理を書く&lt;br /&gt;
　　}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
private boolean repeat = false;&lt;br /&gt;
public boolean onTouch(View v, MotionEvent me) {&lt;br /&gt;
　　if(me.getAction() == me.ACTION_DOWN) {&lt;br /&gt;
　　　　repeat = true;&lt;br /&gt;
　　}&lt;br /&gt;
　　if(me.getAction() == me.ACTION_UP) {&lt;br /&gt;
　　　　repeat = false;&lt;br /&gt;
　　}&lt;br /&gt;
　　return false;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
private int LONG_PRESS_DELAY = 1;//ミリ秒&lt;br /&gt;
private Handler mHandler = new Handler();&lt;br /&gt;
public void onDrawFrame(GL10 gl) {//毎回呼ばれる&lt;br /&gt;
　　if(repeat)&lt;br /&gt;
　　{//キーリピートされているあいだは毎回コールバックされるオブジェクトを登録&lt;br /&gt;
　　　　mHandler.postDelayed(mLongPressAction, LONG_PRESS_DELAY);&lt;br /&gt;
　　}&lt;br /&gt;
}&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://m2t.jp/m2t.php&quot; charset=&quot;Shift_JIS&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.bparts.jp/parts/js/lib.js&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.bparts.jp/parts/index.php?id=09494c0ee6b6c06eea8739ab97c2ddfbce3a1b64&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;div id=&quot;bp_parts_11&quot;&gt;&lt;/div&gt;&lt;div class=&quot;bp_parts_links&quot; style=&#39;font-size:10px;margin-top:2px&#39;&gt;PR&amp;nbsp;&amp;raquo;&amp;nbsp;&lt;a target=&#39;_blank&#39; href=&#39;http://www.led-kanban.com/&#39; style=&#39;color: #39C; text-decoration:none;&#39;&gt;看板&lt;/a&gt;&lt;br /&gt;PR&amp;nbsp;&amp;raquo;&amp;nbsp;&lt;a target=&#39;_blank&#39; href=&#39;http://www.meishi-direct.com/&#39; style=&#39;color: #39C; text-decoration:none;&#39;&gt;名刺 作成&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://minmin-work.blogspot.com/feeds/7996469765540722817/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://minmin-work.blogspot.com/2011/01/android_25.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/7996469765540722817'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/7996469765540722817'/><link rel='alternate' type='text/html' href='http://minmin-work.blogspot.com/2011/01/android_25.html' title='Androidでキーリピート'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03201767703948521361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1092877930408053093.post-2394352232880779016</id><published>2011-01-22T00:18:00.000+09:00</published><updated>2011-01-22T00:18:43.322+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="cocos2d-x"/><title type='text'>cocos2d-x　Android　C++</title><content type='html'>C++でAndroidとiPhoneのアプリが開発できるものがあるというのを&lt;a href=&quot;http://stachibana.biz/&quot;&gt;stachibanaさん&lt;/a&gt;に紹介してもらいました。&lt;a href=&quot;http://www.cocos2d-x.org/wiki/cocos2d-x/Chapter_1_-_Create_a_New_cocos2d-x_project_with_multi-platforms#4-Start-with-Android&quot;&gt;cocos2d-x&lt;/a&gt;というものです。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://m2t.jp/m2t.php&quot; charset=&quot;Shift_JIS&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.bparts.jp/parts/js/lib.js&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.bparts.jp/parts/index.php?id=09494c0ee6b6c06eea8739ab97c2ddfbce3a1b64&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;div id=&quot;bp_parts_11&quot;&gt;&lt;/div&gt;&lt;div class=&quot;bp_parts_links&quot; style=&#39;font-size:10px;margin-top:2px&#39;&gt;PR&amp;nbsp;&amp;raquo;&amp;nbsp;&lt;a target=&#39;_blank&#39; href=&#39;http://www.led-kanban.com/&#39; style=&#39;color: #39C; text-decoration:none;&#39;&gt;看板&lt;/a&gt;&lt;br /&gt;PR&amp;nbsp;&amp;raquo;&amp;nbsp;&lt;a target=&#39;_blank&#39; href=&#39;http://www.meishi-direct.com/&#39; style=&#39;color: #39C; text-decoration:none;&#39;&gt;名刺 作成&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://minmin-work.blogspot.com/feeds/2394352232880779016/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://minmin-work.blogspot.com/2011/01/cocos2d-xandroidc.html#comment-form' title='2 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/2394352232880779016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/2394352232880779016'/><link rel='alternate' type='text/html' href='http://minmin-work.blogspot.com/2011/01/cocos2d-xandroidc.html' title='cocos2d-x　Android　C++'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03201767703948521361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1092877930408053093.post-4318341441870899352</id><published>2011-01-20T02:46:00.000+09:00</published><updated>2011-01-20T02:46:38.468+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>Android 画面サイズ取得</title><content type='html'>&lt;a href=&quot;http://something-memo.blogspot.com/2010/06/android.html&quot;&gt;yossi&#39;sさんの記事&lt;/a&gt;で紹介されてましたが、画面サイズを取得するには&lt;br /&gt;
&lt;br /&gt;
Activity継承クラスの場合&lt;br /&gt;
WindowManager windowmanager = (WindowManager)getSystemService(WINDOW_SERVICE);&lt;br /&gt;
Display disp = windowmanager.getDefaultDisplay();&lt;br /&gt;
int width = disp.getWidth();&lt;br /&gt;
int height = disp.getHeight();&lt;br /&gt;
というふうにします。&lt;br /&gt;
&lt;br /&gt;
このサイズから好きな割合でボタンやテキストの大きさを作ると、どのAndroidでも統一したレイアウトが作れるんじゃないかと思います。&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://m2t.jp/m2t.php&quot; charset=&quot;Shift_JIS&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.bparts.jp/parts/js/lib.js&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.bparts.jp/parts/index.php?id=09494c0ee6b6c06eea8739ab97c2ddfbce3a1b64&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;div id=&quot;bp_parts_11&quot;&gt;&lt;/div&gt;&lt;div class=&quot;bp_parts_links&quot; style=&#39;font-size:10px;margin-top:2px&#39;&gt;PR&amp;nbsp;&amp;raquo;&amp;nbsp;&lt;a target=&#39;_blank&#39; href=&#39;http://www.led-kanban.com/&#39; style=&#39;color: #39C; text-decoration:none;&#39;&gt;看板&lt;/a&gt;&lt;br /&gt;PR&amp;nbsp;&amp;raquo;&amp;nbsp;&lt;a target=&#39;_blank&#39; href=&#39;http://www.meishi-direct.com/&#39; style=&#39;color: #39C; text-decoration:none;&#39;&gt;名刺 作成&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://minmin-work.blogspot.com/feeds/4318341441870899352/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://minmin-work.blogspot.com/2011/01/android.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/4318341441870899352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/4318341441870899352'/><link rel='alternate' type='text/html' href='http://minmin-work.blogspot.com/2011/01/android.html' title='Android 画面サイズ取得'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03201767703948521361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1092877930408053093.post-8512362235974017149</id><published>2011-01-18T00:32:00.001+09:00</published><updated>2011-01-18T00:35:23.053+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="OpenGLES"/><title type='text'>Android OpenGLES テクスチャ</title><content type='html'>Androidでテクスチャが表示できない状態になっちゃって、おっかしーなー、コード間違ってないような気がするのになー、と思っていたら.gif画像がダメだったみたいです。.jpgとか.pngの画像なら表示されました。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://m2t.jp/m2t.php&quot; charset=&quot;Shift_JIS&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.bparts.jp/parts/js/lib.js&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.bparts.jp/parts/index.php?id=09494c0ee6b6c06eea8739ab97c2ddfbce3a1b64&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;div id=&quot;bp_parts_11&quot;&gt;&lt;/div&gt;&lt;div class=&quot;bp_parts_links&quot; style=&#39;font-size:10px;margin-top:2px&#39;&gt;PR&amp;nbsp;&amp;raquo;&amp;nbsp;&lt;a target=&#39;_blank&#39; href=&#39;http://www.led-kanban.com/&#39; style=&#39;color: #39C; text-decoration:none;&#39;&gt;看板&lt;/a&gt;&lt;br /&gt;
PR&amp;nbsp;&amp;raquo;&amp;nbsp;&lt;a target=&#39;_blank&#39; href=&#39;http://www.meishi-direct.com/&#39; style=&#39;color: #39C; text-decoration:none;&#39;&gt;名刺 作成&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://minmin-work.blogspot.com/feeds/8512362235974017149/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://minmin-work.blogspot.com/2011/01/android-opengles.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/8512362235974017149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1092877930408053093/posts/default/8512362235974017149'/><link rel='alternate' type='text/html' href='http://minmin-work.blogspot.com/2011/01/android-opengles.html' title='Android OpenGLES テクスチャ'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03201767703948521361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>