Page 4 of 4 FirstFirst ... 234
Results 46 to 58 of 58
  1. #46
    CAFlames's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Where ever my imagination takes me
    Posts
    3,014
    Reputation
    202
    Thanks
    2,934
    My Mood
    Twisted
    Hmm for the Solid Square, it would be much easier using FillRGB.

    this way you can use same function for xhair as you would for square.

    example:


    Globals:
    Code:
    int CenterX = GetSystemMetrics( 0 ) / 2;//Gets screen X resolution then cutting it in half to get the center.
    int CenterY = GetSystemMetrics( 1 ) / 2;//Gets screen Y resolution then cutting it in half to get the center.

    Void:
    Code:
    void cBase::FillRGB( int x, int y, int w, int h, D3DCOLOR color, IDirect3DDevice9* pDevice )
    {
    	D3DRECT rec = { x, y, x + w, y + h };
    	pDevice->Clear( 1, &rec, D3DCLEAR_TARGET, color, 0, 0 );
    }

    Then for the xhair:
    Code:
    FillRGB(CenterX-15, CenterY, 30, 1,Red,pDevice);FillRGB(CenterX, CenterY-15, 1, 30,Red,pDevice);
    Or for the Box (Left Side for Menu):
    Code:
    FillRGB(20, 200, 150, 400,Red,pDevice);

    Current Works:
    ---Horror Game






    Special thanks to drgnforce9 for my sig picture

    Quote Originally Posted by m_t_h View Post

    CAflames is one epic coder.

    Rep and thanks him.. or you're perma banned.

  2. #47
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    4,922
    My Mood
    Cool
    Quote Originally Posted by CAFlames View Post
    Hmm for the Solid Square, it would be much easier using FillRGB.

    this way you can use same function for xhair as you would for square.

    example:


    Globals:
    Code:
    int CenterX = GetSystemMetrics( 0 ) / 2;//Gets screen X resolution then cutting it in half to get the center.
    int CenterY = GetSystemMetrics( 1 ) / 2;//Gets screen Y resolution then cutting it in half to get the center.

    Void:
    Code:
    void cBase::FillRGB( int x, int y, int w, int h, D3DCOLOR color, IDirect3DDevice9* pDevice )
    {
    	D3DRECT rec = { x, y, x + w, y + h };
    	pDevice->Clear( 1, &rec, D3DCLEAR_TARGET, color, 0, 0 );
    }

    Then for the xhair:
    Code:
    FillRGB(CenterX-15, CenterY, 30, 1,Red,pDevice);FillRGB(CenterX, CenterY-15, 1, 30,Red,pDevice);
    Or for the Box (Left Side for Menu):
    Code:
    FillRGB(20, 200, 150, 400,Red,pDevice);

    My friend do u understand what Clear() Really does?

    That will not do Transparency.
    Last edited by topblast; 01-25-2011 at 10:50 PM.
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

  3. #48
    freedompeace's Avatar
    Join Date
    Jul 2010
    Gender
    female
    Posts
    3,035
    Reputation
    340
    Thanks
    2,784
    My Mood
    Sad
    Quote Originally Posted by topblast View Post



    My friend do u understand what Clear() Really does?

    That will not do Transparency.
    he said a solid square. He does not need transparency.

  4. #49
    CAFlames's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Where ever my imagination takes me
    Posts
    3,014
    Reputation
    202
    Thanks
    2,934
    My Mood
    Twisted
    Quote Originally Posted by topblast View Post



    My friend do u understand what Clear() Really does?

    That will not do Transparency.
    Where did I say it was transparent? if i wanted transparent I would add an alpha blend.... this is for a solid box / line anywhere on screen for a box, random line, or xhair.

    Current Works:
    ---Horror Game






    Special thanks to drgnforce9 for my sig picture

    Quote Originally Posted by m_t_h View Post

    CAflames is one epic coder.

    Rep and thanks him.. or you're perma banned.

  5. #50
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    4,922
    My Mood
    Cool
    Quote Originally Posted by CAFlames View Post


    Where did I say it was transparent? if i wanted transparent I would add an alpha blend.... this is for a solid box / line anywhere on screen for a box, random line, or xhair.
    Do u kno the real reason for Clear?

    Both of you.
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

  6. #51
    freedompeace's Avatar
    Join Date
    Jul 2010
    Gender
    female
    Posts
    3,035
    Reputation
    340
    Thanks
    2,784
    My Mood
    Sad
    Quote Originally Posted by topblast View Post


    Do u have to be so technical about things.
    I wasn't being technical, but a clearly misleading post had been posted (by yourself).

    Quote Originally Posted by topblast View Post


    Do u kno the real reason for Clear?

    Both of you.
    I believe I know more than you. Bloody annoying me << That's just my honest belief right now, not being stuck up or anything.. which might change very soon

    The IDIRECT3DDDEVICE::Clear() method clears a specified area of one or more surfaces to a specified color.
    Last edited by freedompeace; 01-26-2011 at 05:54 PM. Reason: spelling mistake.

  7. #52
    CAFlames's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Where ever my imagination takes me
    Posts
    3,014
    Reputation
    202
    Thanks
    2,934
    My Mood
    Twisted
    Quote Originally Posted by topblast View Post


    Do u kno the real reason for Clear?

    Both of you.
    Honestly I used thatfillrgb method but i named some stuff different and never used the clear... but I saw on a thread about d3d xhairs that he used it so i just included it and used his. So no I dont.

    Current Works:
    ---Horror Game






    Special thanks to drgnforce9 for my sig picture

    Quote Originally Posted by m_t_h View Post

    CAflames is one epic coder.

    Rep and thanks him.. or you're perma banned.

  8. #53
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    4,922
    My Mood
    Cool
    Quote Originally Posted by freedompeace View Post
    I wasn't being technical, but a clearly misleading post had been posted (by yourself).



    I believe I know more than you. Bloody annoying me << That's just my honest belief right now, not being stuck up or anything.. which might change very soon

    The IDIRECT3DDDEVICE::Clear() method clears a specified area of one or more surfaces to a specified color.
    And in the cast of speed?
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

  9. #54
    freedompeace's Avatar
    Join Date
    Jul 2010
    Gender
    female
    Posts
    3,035
    Reputation
    340
    Thanks
    2,784
    My Mood
    Sad
    Quote Originally Posted by topblast View Post


    And in the cast of speed?
    cast or case of speed?

    If it is case then Clear() is much faster than the publxly released FillRGB functions.

  10. #55
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    4,922
    My Mood
    Cool
    Quote Originally Posted by freedompeace View Post
    cast or case of speed?

    If it is case then Clear() is much faster than the publxly released FillRGB functions.
    Vs DrawPrimitive
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

  11. #56
    justiniscool5's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    idk
    Posts
    884
    Reputation
    -12
    Thanks
    182
    My Mood
    Bitchy
    Thanks for sharing this this will go great with my next hack

  12. #57
    freedompeace's Avatar
    Join Date
    Jul 2010
    Gender
    female
    Posts
    3,035
    Reputation
    340
    Thanks
    2,784
    My Mood
    Sad
    Quote Originally Posted by topblast View Post


    Vs DrawPrimitive
    Clear is faster, duh <<

  13. #58
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    4,922
    My Mood
    Cool
    Quote Originally Posted by freedompeace View Post
    Clear is faster, duh <<
    I give up trying to get things in your head.
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

Page 4 of 4 FirstFirst ... 234