<?xml version="1.0" encoding="UTF-8" ?><rdf:RDF 
  xmlns="http://purl.org/rss/1.0/"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:atom="http://www.w3.org/2005/Atom"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xml:lang="ja">
  <channel rdf:about="http://w.atwiki.jp/makemygamelib/">
    <title>自分用ゲームライブラリ作成記録</title>
    <link>http://w.atwiki.jp/makemygamelib/</link>
    <atom:link href="https://w.atwiki.jp/makemygamelib/rss10.xml" rel="self" type="application/rss+xml" />
    <atom:link rel="hub" href="https://pubsubhubbub.appspot.com" />
    <description>自分用ゲームライブラリ作成記録</description>

    <dc:language>ja</dc:language>
    <dc:date>2013-11-18T13:44:24+09:00</dc:date>
    <utime>1384749864</utime>

    <items>
      <rdf:Seq>
                <rdf:li rdf:resource="https://w.atwiki.jp/makemygamelib/pages/1.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/makemygamelib/pages/17.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/makemygamelib/pages/2.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/makemygamelib/pages/16.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/makemygamelib/pages/15.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/makemygamelib/pages/3.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/makemygamelib/pages/4.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/makemygamelib/pages/5.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/makemygamelib/pages/6.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/makemygamelib/pages/7.html" />
              </rdf:Seq>
    </items>
	
		
    
  </channel>
    <item rdf:about="https://w.atwiki.jp/makemygamelib/pages/1.html">
    <title>トップページ</title>
    <link>https://w.atwiki.jp/makemygamelib/pages/1.html</link>
    <description>
      **はじめに
-ここは都内某所のゲーム専門学校に通うしがないゲームプログラマーの活動記録です。
-自作のゲームライブラリを作成するためのプログラミングメモを載せていく予定です。


----
**予定
01.ウィンドウの表示
02.DirectXの初期化
03.2D画像の表示
04.キー入力の取得
05.画像の変形
06.メッシュの表示
07.(未定)


----
**開発環境
-Windows7
-C/C++
-VisualStudio2012
-DirectX9


----
|アクセス数|今日|昨日|
|&amp;counter()|&amp;counter(today)|&amp;counter(yesterday)|    </description>
    <dc:date>2013-11-18T13:44:24+09:00</dc:date>
    <utime>1384749864</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/makemygamelib/pages/17.html">
    <title>DirectXの初期化</title>
    <link>https://w.atwiki.jp/makemygamelib/pages/17.html</link>
    <description>
      まず、プロジェクトにDirectX SDKのインクルードパスを通します。

インクルードディレクトリ：$(DXSDK_DIR)Include
ライブラリディレクトリ：$(DXSDK_DIR)Lib\x86

main.cppを次のようにします。

*main.cpp
----
 /***********************************************************
     DirectXの初期化
 **********************************************************/
 
 #pragma comment( lib, &quot;d3d9.lib&quot; )
 #include &lt;d3d9.h&gt;
 
 #include &lt;cstdlib&gt;
 #include &lt;iostream&gt;
 #include &lt;string&gt;
 
 #include &quot;lib\Window.h&quot;
 
 #define SAFE_DELETE(o) {if(o)delete o;o=nullptr;}
 #define SAFE_RELEASE(o) {if(o)o-&gt;Release();o=nullptr;}
 
 /* フレームワーク用 */
 Window* window = nullptr;           // ウィンドウ
 
 IDirect3D9* direct3d = nullptr;     // DirectX9オブジェクト
 IDirect3DDevice9* device = nullptr; // DirectX9描画デバイス
 
 // エントリーポイント
 void main()
 {
     // メモリリークの検出を有効化
     _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
 
     try {
 
         // ウィンドウの作成
         if( !(window = Window::Create( TEXT(&quot;DirectXSample&quot;), 640, 480 )) )
             throw std::runtime_error(&quot;ウィンドウの作成に失敗しました。&quot;);
 
         // DirectX9オブジェクトの生成
         if( !(direct3d = Direct3DCreate9( D3D_SDK_VERSION ) ))
             throw std::runtime_error(&quot;DirectX9オブジェクトの生成に失敗しました。&quot;);
 
         // DirectX9描画デバイスの生成
         IDirect3DDevice9* device = nullptr;
         D3DPRESENT_PARAMETERS pp = {0};
         pp.Windowed = TRUE;
         pp.SwapEffect = D3DSWAPEFFECT_DISCARD;
         HRESULT hr = direct3d-&gt;CreateDevice(
             D3DADAPTER_DEFAULT,
             D3DDEVTYPE_HAL,
             window-&gt;GetHwnd(),  // HWND
             D3DCREATE_HARDWARE_VERTEXPROCESSING,
             &amp;pp, &amp;device
             );
         if( FAILED(hr) )
             throw std::runtime_error(&quot;DirectX9描画デバイスの生成に失敗しました。&quot;);
 
         // メインループ
         while( window-&gt;ProcessMessage() )
         {
             device-&gt;Clear( 0, nullptr, D3DCLEAR_TARGET, D3DCOLOR_XRGB( 0x22, 0x22, 0x22 ), 1.0f, 0 );
             if( SUCCEEDED( device-&gt;BeginScene() ) ){
 
                 ; // TODO:1フレームの処理
 
                 device-&gt;EndScene();
             }
             device-&gt;Present( nullptr, nullptr, nullptr, nullptr );
         }
 
     }
     // エラー処理
     catch( std::exception e ){
         MessageBoxA( nullptr, e.what(), &quot;error&quot;, MB_OK );
     }
 
     // DirectXの解放
     SAFE_RELEASE(device);
     SAFE_RELEASE(direct3d);
 
     // ウィンドウの解放
     SAFE_DELETE(window);
 
     // アプリケーション終了
     exit(EXIT_SUCCESS);
 }
----    </description>
    <dc:date>2013-11-18T13:06:48+09:00</dc:date>
    <utime>1384747608</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/makemygamelib/pages/2.html">
    <title>メニュー</title>
    <link>https://w.atwiki.jp/makemygamelib/pages/2.html</link>
    <description>
      **メニュー
+[[ウィンドウの表示]]
+[[ウィンドウの表示(クラス化)]]
+[[DirectXの初期化]]

----

**リンク
-[[@wiki&gt;&gt;http://atwiki.jp]]
-[[@wikiご利用ガイド&gt;&gt;http://atwiki.jp/guide/]]

**他のサービス
-[[無料ホームページ作成&gt;&gt;http://atpages.jp]]
-[[無料ブログ作成&gt;&gt;http://atword.jp]]
-[[2ch型掲示板レンタル&gt;&gt;http://atchs.jp]]
-[[無料掲示板レンタル&gt;&gt;http://atbbs.jp]]
-[[お絵かきレンタル&gt;&gt;http://atpaint.jp/]]
-[[無料ソーシャルプロフ&gt;&gt;http://sns.atfb.jp/]]

// リンクを張るには &quot;[&quot; 2つで文字列を括ります。
// &quot;&gt;&quot; の左側に文字、右側にURLを記述するとリンクになります
-[[ソースを「そのまま表示する為のHTMLソース」に変換&gt;&gt;http://blogtool.flatlabs.net/source.html]]

//**更新履歴
//#recent(20)

&amp;link_editmenu(text=ここを編集)    </description>
    <dc:date>2013-11-18T12:40:21+09:00</dc:date>
    <utime>1384746021</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/makemygamelib/pages/16.html">
    <title>ウィンドウの表示(クラス化)</title>
    <link>https://w.atwiki.jp/makemygamelib/pages/16.html</link>
    <description>
      [[ウインドウの表示(基本編)]]をリファクタリングしていきます。

&quot;lib&quot;ディレクトリを作り、Window.h,Window.cppを作成します。

*Window.h
----
 /***********************************************************
     ウィンドウクラス
     - HWNDのラッパークラス
 ***********************************************************/
 
 #pragma once
 #include &lt;string&gt;
 #include &lt;windows.h&gt;
 
 class Window
 {
 // ---------------------------------------------------------
 // 生成と破棄
 private:
     Window(HWND);
 public:
     static Window* Create( const std::wstring&amp; title, int width, int height );
 
 // ---------------------------------------------------------
 // 基本機能
 public:
     // Windowsメッセージを処理
     bool ProcessMessage() const ;
 
     HWND GetHwnd() const { return hwnd; }
 // ---------------------------------------------------------
 // メンバ変数
 private:
     HWND hwnd;
 };
----

*Window.cpp
----
 /***********************************************************
     ウィンドウクラス
     - HWNDのラッパークラス
 ***********************************************************/
 
 #include &quot;Window.h&quot;
 
 // ---------------------------------------------------------
 // 生成と破棄
 // ---------------------------------------------------------
 // コンストラクタ
 Window::Window(HWND hwnd)
     : hwnd(hwnd)
 {}
 
 // 生成
 Window* Window::Create( const std::wstring&amp; title, int width, int height )
 {
     const std::wstring class_name = TEXT(&quot;GameClass&quot;);
     const DWORD style = WS_OVERLAPPEDWINDOW &amp; ~( WS_MAXIMIZEBOX | WS_THICKFRAME );
     const DWORD exstyle = 0;
 	const HINSTANCE instance = GetModuleHandle( nullptr );
     const int default_dpi = 96;
 
     //ウィンドウクラスの登録
     WNDCLASSEX wc = { sizeof( WNDCLASSEX ) };
     wc.hInstance = instance;
     wc.lpszClassName = class_name.c_str();
     wc.lpfnWndProc = DefWindowProc;
     wc.style = CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS;
     wc.hIcon = static_cast&lt; HICON &gt;(
 		LoadImage( nullptr, IDI_APPLICATION, IMAGE_ICON, 0, 0, LR_DEFAULTSIZE | LR_SHARED )
         );
     wc.hIconSm = wc.hIcon;
     wc.hCursor = static_cast&lt; HCURSOR &gt;(
         LoadImage( nullptr, IDC_ARROW, IMAGE_CURSOR, 0, 0, LR_DEFAULTSIZE | LR_SHARED )
         );
     wc.hbrBackground = static_cast&lt; HBRUSH &gt;(
         GetStockObject( WHITE_BRUSH )
         );
     if( !RegisterClassEx( &amp;wc ) ) return nullptr;
 
     // ウィンドウサイズからクライアント領域を計算
     HDC hdc = GetDC(NULL);
     int client_width = static_cast&lt;int&gt;(width * GetDeviceCaps(hdc, LOGPIXELSX) / default_dpi);
     int client_height = static_cast&lt;int&gt;(height * GetDeviceCaps(hdc, LOGPIXELSY) / default_dpi);
     ReleaseDC(NULL, hdc);
 
     RECT rect = { 0, 0, client_width, client_height };
     AdjustWindowRectEx( &amp;rect, style, FALSE, exstyle );
 
     // ウィンドウ生成
     HWND hwnd = CreateWindowEx(
         exstyle, class_name.c_str(), title.c_str(), style,
         CW_USEDEFAULT, CW_USEDEFAULT,
         rect.right - rect.left, rect.bottom - rect.top,
         nullptr, nullptr, instance, nullptr 
         );
     if( hwnd == nullptr ) return nullptr;
     ShowWindow( hwnd, SW_SHOW );
 
     Window* window = new Window( hwnd );
     return window;
 }
 
 // ---------------------------------------------------------
 // 基本機能
 // ---------------------------------------------------------
 
 // Windowsメッセージを処理する
 bool Window::ProcessMessage() const
 {
     if( IsWindow(hwnd)==FALSE ) return false;
 
     MSG msg;
     ZeroMemory(&amp;msg, sizeof(msg));
 
     if( PeekMessage( &amp;msg, NULL, 0, 0, PM_REMOVE ) )
     {
         // ウィンドウが閉じられた
         if( msg.message == WM_QUIT ) return false;
 
         TranslateMessage( &amp;msg );       // キーボード関連のイベント
         DispatchMessage( &amp;msg );        // ウィンドウプロシージャの呼び出し
     }
 
     return true;
 }
----

*main.cpp
----
 /***********************************************************
     [[ウィンドウの表示]](クラス化)
 ***********************************************************/
 
 #include &lt;cstdlib&gt;
 #include &lt;iostream&gt;
 #include &lt;string&gt;
 #include &quot;lib\Window.h&quot;
 
 #define SAFE_DELETE(o) {if(o)delete o;o=nullptr;}
 
 // ウィンドウ
 Window* window;
 
 // エントリーポイント
 void main()
 {
     // メモリリークの検出を有効化
     _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
 
     try {
 
         // ウィンドウの作成
         if( !(window = Window::Create( TEXT(&quot;Sample&quot;), 640, 480 )) )
             throw std::runtime_error(&quot;ウィンドウの作成に失敗しました。&quot;);
 
         // メインループ
         while( window-&gt;ProcessMessage() )
         {
             ; // TODO:1フレームの処理
         }
 
     }
     // エラー処理
     catch( std::exception e ){
         MessageBoxA( nullptr, e.what(), &quot;error&quot;, MB_OK );
     }
 
     // ウィンドウの解放
     SAFE_DELETE(window);
 
     // アプリケーション終了
     exit(EXIT_SUCCESS);
 }
----    </description>
    <dc:date>2013-11-18T12:26:45+09:00</dc:date>
    <utime>1384745205</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/makemygamelib/pages/15.html">
    <title>ウィンドウの表示</title>
    <link>https://w.atwiki.jp/makemygamelib/pages/15.html</link>
    <description>
      何はともあれ、Windowを表示するところから始めます。

*main.cpp
----
 /***********************************************************
     空のウインドウの表示(基本編)
 ***********************************************************/
 
 #include &lt;cstdlib&gt;
 #include &lt;string&gt;
 #include &lt;windows.h&gt;
 
 // ウィンドウタイトル
 static const std::wstring title = TEXT(&quot;Sample&quot;);
 // ウィンドウ幅
 static const int width = 640;
 // ウィンドウ高さ
 static const int height = 480;
 
 // エントリーポイント
 void main()
 {
     // メモリリークの検出を有効化
     _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
 
     /*
      *  ウィンドウの作成
      */
 
     // 変数設定
     const std::wstring class_name = TEXT(&quot;GameClass&quot;);
     const DWORD style = WS_OVERLAPPEDWINDOW &amp; ~( WS_MAXIMIZEBOX | WS_THICKFRAME );
     const DWORD exstyle = 0;
     const HINSTANCE instance = GetModuleHandle( nullptr );
     const int default_dpi = 96;
 
     //ウィンドウクラスの登録
     WNDCLASSEX wc = { sizeof( WNDCLASSEX ) };
     wc.hInstance = instance;
     wc.lpszClassName = class_name.c_str();
     wc.lpfnWndProc = DefWindowProc;
     wc.style = CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS;
     wc.hIcon = static_cast&lt; HICON &gt;(
 		LoadImage( nullptr, IDI_APPLICATION, IMAGE_ICON, 0, 0, LR_DEFAULTSIZE | LR_SHARED )
         );
     wc.hIconSm = wc.hIcon;
     wc.hCursor = static_cast&lt; HCURSOR &gt;(
         LoadImage( nullptr, IDC_ARROW, IMAGE_CURSOR, 0, 0, LR_DEFAULTSIZE | LR_SHARED )
         );
     wc.hbrBackground = static_cast&lt; HBRUSH &gt;(
         GetStockObject( WHITE_BRUSH )
         );
     if( !RegisterClassEx( &amp;wc ) ) exit(EXIT_FAILURE);
 
     // ウィンドウサイズからクライアント領域を計算
     HDC hdc = GetDC(NULL);
     int client_width = static_cast&lt;int&gt;(width * GetDeviceCaps(hdc, LOGPIXELSX) / default_dpi);
     int client_height = static_cast&lt;int&gt;(height * GetDeviceCaps(hdc, LOGPIXELSY) / default_dpi);
     ReleaseDC(NULL, hdc);
 
     RECT rect = { 0, 0, client_width, client_height };
     AdjustWindowRectEx( &amp;rect, style, FALSE, exstyle );
 
     // ウィンドウ生成
     HWND hwnd = CreateWindowEx(
         exstyle, class_name.c_str(), title.c_str(), style,
         CW_USEDEFAULT, CW_USEDEFAULT,
         rect.right - rect.left, rect.bottom - rect.top,
         nullptr, nullptr, instance, nullptr 
         );
     if( hwnd == nullptr ) exit(EXIT_FAILURE);
     ShowWindow( hwnd, SW_SHOW );
 
     /*
      *  メインループ
      */
 
     // ウィンドウが閉じるまでループ
     MSG msg;
     while( IsWindow( hwnd ) )
     {
         ; // TODO:1フレームの処理
 
         // windowsイベントの処理
         if( PeekMessage( &amp;msg, hwnd, 0, 0, PM_REMOVE ) )
         {
             // ウィンドウが閉じられたらループ終了
             if( msg.message == WM_QUIT ) break;
 
             TranslateMessage( &amp;msg );       // キーボード関連のイベント
             DispatchMessage( &amp;msg );        // ウィンドウプロシージャの呼び出し
         }
     }
 
     exit(EXIT_SUCCESS);
 }
----    </description>
    <dc:date>2013-11-18T12:15:15+09:00</dc:date>
    <utime>1384744515</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/makemygamelib/pages/3.html">
    <title>右メニュー</title>
    <link>https://w.atwiki.jp/makemygamelib/pages/3.html</link>
    <description>
      **更新履歴
#recent(20)


&amp;link_editmenu2(text=ここを編集)
    </description>
    <dc:date>2013-11-14T23:18:24+09:00</dc:date>
    <utime>1384438704</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/makemygamelib/pages/4.html">
    <title>プラグイン/ニュース</title>
    <link>https://w.atwiki.jp/makemygamelib/pages/4.html</link>
    <description>
      * ニュース
@wikiのwikiモードでは
 #news(興味のある単語)
と入力することで、あるキーワードに関連するニュース一覧を表示することができます
詳しくはこちらをご覧ください。
＝＞http://atwiki.jp/guide/17_174_ja.html


-----


たとえば、#news(wiki)と入力すると以下のように表示されます。


#news(wiki)
    </description>
    <dc:date>2013-11-14T23:18:24+09:00</dc:date>
    <utime>1384438704</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/makemygamelib/pages/5.html">
    <title>まとめサイト作成支援ツール</title>
    <link>https://w.atwiki.jp/makemygamelib/pages/5.html</link>
    <description>
      * まとめサイト作成支援ツールについて
@wikiには[[まとめサイト作成を支援するツール&gt;&gt;http://atwiki.jp/matome/]]があります。
また、
 #matome_list
と入力することで、注目の掲示板が一覧表示されます。

利用例）#matome_listと入力すると下記のように表示されます
#matome_list
    </description>
    <dc:date>2013-11-14T23:18:24+09:00</dc:date>
    <utime>1384438704</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/makemygamelib/pages/6.html">
    <title>プラグイン/編集履歴</title>
    <link>https://w.atwiki.jp/makemygamelib/pages/6.html</link>
    <description>
      * 更新履歴
@wikiのwikiモードでは
 #recent(数字)
と入力することで、wikiのページ更新履歴を表示することができます。
詳しくはこちらをご覧ください。
＝＞http://atwiki.jp/guide/17_117_ja.html


-----


たとえば、#recent(20)と入力すると以下のように表示されます。


#recent(20)
    </description>
    <dc:date>2013-11-14T23:18:24+09:00</dc:date>
    <utime>1384438704</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/makemygamelib/pages/7.html">
    <title>プラグイン/アーカイブ</title>
    <link>https://w.atwiki.jp/makemygamelib/pages/7.html</link>
    <description>
      * アーカイブ
@wikiのwikiモードでは
 #archive_log()
と入力することで、特定のウェブページを保存しておくことができます。
詳しくはこちらをご覧ください。
＝＞http://atwiki.jp/guide/25_171_ja.html


-----


たとえば、#archive_log()と入力すると以下のように表示されます。
保存したいURLとサイト名を入力して&quot;アーカイブログ&quot;をクリックしてみよう


#archive_log()
    </description>
    <dc:date>2013-11-14T23:18:24+09:00</dc:date>
    <utime>1384438704</utime>
  </item>
  </rdf:RDF>
