Border & BackGround Gellin's Base

Posts 1–14 of 14 · Page 1 of 1
Border & BackGround Gellin's Base
Hi to all can tou explain me how do a background and a border in gellin's base?
I use the code of acid but i hae some errors on compile
Globals
LPD3DXFONT pFont;
LPDIRECT3DDEVICE9 pDevice;
void FillRGB( int x, int y, int w, int h, D3DCOLOR color, IDirect3DDevice9* pDevice )
{
if( w < 0 )w = 1;
if( h < 0 )h = 1;
if( x < 0 )x = 1;
if( y < 0 )y = 1;

D3DRECT rec = { x, y, x + w, y + h };
pDevice->Clear( 1, &rec, D3DCLEAR_TARGET, color, 0, 0 );
}

void DrawBorder( int x, int y, int w, int h, int px, D3DCOLOR BorderColor, IDirect3DDevice9* pDevice )
{
FillRGB( x, (y + h - px), w, px, BorderColor, pDevice );
FillRGB( x, y, px, h, BorderColor, pDevice );
FillRGB( x, y, w, px, BorderColor, pDevice );
FillRGB( (x + w - px), y, px, h, BorderColor, pDevice );
}

void DrawBox( int x, int y, int w, int h, D3DCOLOR BoxColor, D3DCOLOR BorderColor, IDirect3DDevice9* pDevice )
{
FillRGB( x, y, w, h, BoxColor, pDevice );
DrawBorder( x, y, w, h, 1, BorderColor, pDevice );
}

DrawBox (X,Y,W,H,Back Color,Border Color,pDevice);

1>.\Base.cpp(70) : error C2065: 'X' : undeclared identifier
1>.\Base.cpp(70) : error C2065: 'Y' : undeclared identifier
1>.\Base.cpp(70) : error C2065: 'W' : undeclared identifier
1>.\Base.cpp(70) : error C2065: 'H' : undeclared identifier
1>.\Base.cpp(70) : error C2065: 'Back' : undeclared identifier
1>.\Base.cpp(70) : error C2146: syntax error : missing ')' before identifier 'Color'
1>.\Base.cpp(70) : error C2059: syntax error : ')'
dude this is simple all you do is DECLARE H,Y,W, and X then add a curly brace at the end. But that's prolly not all of it. Just a 2 second check!
Quote Originally Posted by NOOBJr View Post
add a curly brace at the end
A curly Brace? /
Quote Originally Posted by markoj View Post
A curly Brace? /
[php]
}// I R A CURLY BRACE. DELETE ME AND YOU DIEEEEE
[/php]

/
Quote Originally Posted by ac1d_buRn View Post


[php]
}// I R A CURLY BRACE. DELETE ME AND YOU DIEEEEE
[/php]

/
I know lol but isn't it called a called a bracket, not a curly brace >.>
Quote Originally Posted by markoj View Post
I know lol but isn't it called a called a bracket, not a curly brace >.>
what acid says goes hes ma pimp
Quote Originally Posted by markoj View Post
I know lol but isn't it called a called a bracket, not a curly brace >.>
[php]
")" // <--- This is a bracket
"}" // <--- This is a curly brace
[/php]
Lol it's a direct copy + paste.
Really from who crash?
Its a C+P from ac1d's list of functions. He didnt even set the variables when calling the function >.>
I fix it close
change what i highlight in red to what u want and what

DrawBox(X, Y, W, H, D3DCOLOR_XRGB(0, 0, 0),D3DCOLOR_ARGB(255, 255, 0, 0),pDevice);

that if you do it porperly will give you a black bg with a red border i think.

i use a picture gui. so yea.
DrawBox (0,0,1000,1000,D3DCOLOR_ARGB(255,255,255,255),D3DC OLOR_ARGB(255,255,0),&pDevice);
]
^typed on my mobile, excuse spellling mistakes.
Posts 1–14 of 14 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us