Creating game on fle game engine - DirectX 9c Draw Line - This can be helpful/ fle game engine - - .
read paper in english
- directx 9c .
. Scene Editor (grid),
.

directx 9c
ID3DXLine, , .
.
, .
- , directx 9c ( ),
, directx 9c.
:
start.h CD3DGameApp :
//draw line
ID3DXLine* m_pLine;
void CreateLine(IDirect3DDevice9* pd3dDevice);
void LineOnLostDevice();
void LineOnResetDevice();
void FillPixel(int x, int y, int w, int h, DWORD color);
void FreeLine();
void DrawPoint(float x, float y, DWORD color);
void DrawLine(float x, float y, float x2, float y2, float width, DWORD color);
start.cpp .
CD3DGameApp::CD3DGameApp()
{
//...
m_pLine = NULL;
void CD3DGameApp::CreateDeviceObjects(IDirect3DDevice9* pd3dDevice)
{
CreateLine(pd3dDevice);
}
HRESULT CD3DGameApp::RestoreDisplayObjects(IDirect3DDevice9* pd3dDevice)
{
//...
LineOnResetDevice();
}
HRESULT CD3DGameApp::DestroyDisplayObjects()
{
//...
FreeLine();
}
HRESULT CD3DGameApp::InvalidateDisplayObjects()
{
//...
LineOnLostDevice();
}
//draw line
void CD3DGameApp::CreateLine(IDirect3DDevice9* pd3dDevice)
{
D3DXCreateLine(pd3dDevice, &m_pLine);
}
void CD3DGameApp::LineOnLostDevice()
{
if ( m_pLine != NULL )
{
m_pLine->OnLostDevice();
}
}
void CD3DGameApp::LineOnResetDevice()
{
if ( m_pLine != NULL )
{
m_pLine->OnResetDevice();
}
}
void CD3DGameApp::FillPixel(int x, int y, int w, int h, DWORD color)
{
D3DXVECTOR2 vLine[2];
if ( m_pLine != NULL )
{
m_pLine->SetWidth( (float)w );
m_pLine->SetAntialias( false );
m_pLine->SetGLLines( true );
vLine[0].x = (float)(x + w/2);
vLine[0].y = (float)y;
vLine[1].x = (float)(x + w/2);
vLine[1].y = (float)(y + h);
m_pLine->Begin();
m_pLine->Draw( vLine, 2, color );
m_pLine->End();
}
}
void CD3DGameApp::FreeLine()
{
SAFE_RELEASE( m_pLine );
}
void CD3DGameApp::DrawPoint(float x, float y, DWORD color)
{
FillPixel((int)x, (int)y, 1, 1, color);
}
void CD3DGameApp::DrawLine(float x, float y, float x2, float y2, float width, DWORD color)
{
D3DXVECTOR2 vLine[2];
if ( m_pLine != NULL )
{
m_pLine->SetWidth( width );
m_pLine->SetAntialias( false );
m_pLine->SetGLLines( true );
vLine[0].x = x;
vLine[0].y = y;
vLine[1].x = x2;
vLine[1].y = y2;
m_pLine->Begin();
m_pLine->Draw( vLine, 2, color );
m_pLine->End();
}
}
void CD3DGameApp::DrawGameView()
{
//draw line
DrawPoint(30.0f, 30.0f, 0xFFFF0000);
DrawLine(10.0f, 50.0f, 300.0f, 50.0f, 1.0f, 0xFFFFFF00);
DrawLine(80.0f, 210.0f, 400.0f, 120.0f, 2.0f, 0xFF00FF00);
DrawLine(500.0f, 310.0f, 200.0f, 80.0f, 1.0f, 0xFFFFC017);
}
! . - , . 0xFFFFC017 - FF - , . . 255.
- m_pLine , directx 9c : CreateLine, LineOnResetDevice, LineOnLostDevice, FreeLine, DrawLine. , , AnimLine, CD3DGameApp::FrameMove .
Draw Line (524 Kb).
DX SDK Aug 2008 MSVS 2005
readme.txt
:
0

0

|
|
|
|
,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
,
|
|
|
|
|
|
|
|
|
|
|
|
|
, , 2020 - ,
|
|
|
|
|
|
|
|
|
|
, , , .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(3), (1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(3), (1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
,
|
 anova
|
 A Knots Story |
 sabotage |
|
|
|
|
|
|
|
,
|
|
|
|
|
|
|
,
|
|
|
|
|
|
|
, ,
|
|
|
|
|
|
|
, ,
|
|
|
|
|
|
|
, , cms,
|
|
|
|
|
|
|
,
|
|
|
|
|
|
|
, , ria xxl , fly snow 3d , . -
|
|
|
|
|
|
fle game engine -
|
|
|
|
|
|
- / megainformatic cms express files -
|
|
|
|
|
|
Flash, Flash - .
|
|
|
|
|
|
(multi lang), , . - (megainformatic cms social), megainformatic cms groupon, keywords gen + , .
megainformatic.ru/webjob/ -
- |
|
|
megainformatic.ru/webjob/
megainformatic.ru/webjob/ -
- |
|
|
|
|
|
,
megainformatic cms admin -
|
|
|
|
|
|
350 . |
5800 . |
3000 . |
500 . |
|
|
|
|
|
|
|
|
|
|
|
|
megainformatic cms free - Photoshop
,
Adobe Photoshop. ,
- GIMP, Corel Photo Paint .
|
|
|
|
|
|
2d 3d, , !
. ,
,
!!! ( , ! ). |
|
|
|
|
|
|
|
|
|
|
|
,
: -
350 . |
510 . |
fle game engine |
|
- , ,
, .
- - :
- |
|
|
|
|
|
|
|
|
|
|
|
, 3ds max, photoshop, c++,
directx, delphi php.
,
.
. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Photoshop free,
delphi directx - , !,
mp3 - ,
megainformatic cms express -
php + my sql. |
|
|
|
|
|
|
|
|
|
|
|
,
, delphi directx 8.1 (
3d ), 3d studio max, -
Fruity Loops Studio |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|