Показать сообщение отдельно

  #2  
Старый 16.07.2014, 12:47
pabloko
Новичок
Регистрация: 03.03.2014
Сообщений: 6
С нами: 6418306

Репутация: 0
По умолчанию

Hi, you should handle a frame by frame drawing, just take a look into proxyIDirect3D9.cpp, you may user render-> to draw your stuff, since only DrawBox and DrawBoxi is defined in d3drender.cpp you should add DrawCircle method, that should look like this:

PHP:





Код:
void
DrawCircle
(
float mx
,
float my
,
float r
,
D3DCOLOR
colour
)
{
static
const
int
CIRCLE_RESOLUTION
=
10
;
D3DVertex verts
[
CIRCLE_RESOLUTION
]
;
for
(
int i
=
0
;
i

SetFVF
(
VERTEX_FVF
)
;
d3ddevice
-
>
DrawPrimitiveUP
(
D3DPT_TRIANGLEFAN
,
CIRCLE_RESOLUTION
-
2
,
verts
,
sizeof
(
D3DVertex
)
)
;
}




Then you should get the main actor camera CVector and the game Camera CVector, match them and draw what you want. As example for this you may want to look into clickwarp() method

PHP:





Код:
vecOrigin
=
*
pGame
-
>
GetCamera
(
)
-
>
GetCam
(
pGame
-
>
GetCamera
(
)
-
>
GetActiveCam
(
)
)
-
>
GetSource
(
)
;
.
.
.
.




You can do this drawing stuff at the end of renderHandler() method... skype: djmorpheox
 
Ответить с цитированием