X operations(XOPS)に非常に近いFPSゲームを制作・リメイクし、成果物をオープンソースとして公開することを目的としたプロジェクトです。
修订版 | 12 (tree) |
---|---|
时间 | 2015-01-22 00:36:26 |
作者 | xops-mikan |
D3DGraphicsクラスの未使用関数を削除、2Dの線描画時のバグ修正。
@@ -119,7 +119,6 @@ | ||
119 | 119 | void CleanupModel(int id); |
120 | 120 | int LoadTexture(char* filename, bool texturefont, bool BlackTransparent); |
121 | 121 | int GetTextureSize(int id, int *width, int *height); |
122 | - int CheckAlphaTexture(int id); | |
123 | 122 | void CleanupTexture(int id); |
124 | 123 | int StartRender(); |
125 | 124 | void EndRender(); |
@@ -454,46 +454,6 @@ | ||
454 | 454 | return 0; |
455 | 455 | } |
456 | 456 | |
457 | -//! テクスチャがアルファ値を含んでいるかチェック | |
458 | -//! @param id テクスチャ認識番号 | |
459 | -//! @return アルファ値を含む:1 含まない・エラー:0 | |
460 | -int D3DGraphics::CheckAlphaTexture(int id) | |
461 | -{ | |
462 | - //無効な認識番号が指定されていたら、処理せず返す。 | |
463 | - if( id == -1 ){ return 0; } | |
464 | - if( ptextures[id] == NULL ){ return 0; } | |
465 | - | |
466 | - IDirect3DSurface9 *surface; | |
467 | - D3DSURFACE_DESC desc; | |
468 | - int Format; | |
469 | - | |
470 | - //サーフェイスを取得 | |
471 | - ptextures[id]->GetSurfaceLevel(0, &surface); | |
472 | - | |
473 | - //幅と高さを取得 | |
474 | - surface->GetDesc(&desc); | |
475 | - Format = desc.Format; | |
476 | - | |
477 | - //サーフェイスを開放 | |
478 | - surface->Release(); | |
479 | - | |
480 | - //http://msdn.microsoft.com/ja-jp/library/cc324320.aspx | |
481 | - if( Format == D3DFMT_A8R8G8B8 ){ return 1; } | |
482 | - if( Format == D3DFMT_A1R5G5B5 ){ return 1; } | |
483 | - if( Format == D3DFMT_A4R4G4B4 ){ return 1; } | |
484 | - if( Format == D3DFMT_A8 ){ return 1; } | |
485 | - if( Format == D3DFMT_A8R3G3B2 ){ return 1; } | |
486 | - if( Format == D3DFMT_A2B10G10R10 ){ return 1; } | |
487 | - if( Format == D3DFMT_A8B8G8R8 ){ return 1; } | |
488 | - if( Format == D3DFMT_A2R10G10B10 ){ return 1; } | |
489 | - if( Format == D3DFMT_A16B16G16R16 ){ return 1; } | |
490 | - if( Format == D3DFMT_A8P8 ){ return 1; } | |
491 | - if( Format == D3DFMT_A8L8 ){ return 1; } | |
492 | - if( Format == D3DFMT_A4L4 ){ return 1; } | |
493 | - | |
494 | - return 0; | |
495 | -} | |
496 | - | |
497 | 457 | //! テクスチャを解放 |
498 | 458 | //! @param id テクスチャ認識番号 |
499 | 459 | void D3DGraphics::CleanupTexture(int id) |
@@ -1286,7 +1246,7 @@ | ||
1286 | 1246 | |
1287 | 1247 | //データ形式を設定し、描画。 |
1288 | 1248 | pd3dDevice->SetFVF(D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1); |
1289 | - pd3dDevice->DrawPrimitiveUP(D3DPT_LINELIST, 2, pLineVertices, sizeof(TLVERTX)); | |
1249 | + pd3dDevice->DrawPrimitiveUP(D3DPT_LINELIST, 1, pLineVertices, sizeof(TLVERTX)); | |
1290 | 1250 | |
1291 | 1251 | //2D描画用設定を解除 |
1292 | 1252 | End2DRender(); |