Page 1 of 4 123 ... LastLast
Results 1 to 15 of 58
  1. #1
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,611
    Reputation
    149
    Thanks
    4,951
    My Mood
    Cool

    DrawSquare() Function [by Topblast]

    Draw Square Function

    I promise u a Function that will have a little more effect to it instead of just Old dead boxes of color. even MPGH's GUI uses something like it. DrawSquare() is simple.


    CREDIT : TOPBLAST!


    [php]
    void DrawSquare(
    __in LPDIRECT3DDEVICE9 pDevice,
    __in int x,
    __in int y,
    __in int w,
    __in int h,
    __in DWORD color1);


    Parameters

    pDevice [in]
    LPDIRECT3DDEVICE9
    Pointer to an IDirect3DDevice9 interface, the device to be associated with the drawing of the object.

    X [in]
    INT
    Specifies the x-coordinate of the rectangle''s upper-left corner.

    Y [in]
    INT
    Specifies the y-coordinate of the rectangle''s upper-left corner.

    W (Weight) [in]
    INT
    The width of the Square in logical units.

    H (Height) [in]
    INT
    The height of the Square in logical units.

    Color1 [in]
    DWORD
    The General color of the Square.
    [/php]



    [php]
    //-----------------------------------------------------------------------------
    // Name: sVertex
    // Desc: This is a structure a Point/Vertex.
    //-----------------------------------------------------------------------------
    struct sVertex
    {
    float x, y, z, ht;
    DWORD color;

    enum FVF
    {
    FVF_Flags = (D3DFVF_XYZRHW | D3DFVF_DIFFUSE)
    };
    };

    //-----------------------------------------------------------------------------
    // Name: DrawSquare()
    // Desc: Draws a Square with an EFFECT.
    //-----------------------------------------------------------------------------
    void DrawSquare(LPDIRECT3DDEVICE9 pDevice,
    int x,
    int y,
    int w,
    int h,
    DWORD color1)
    {
    sVertex Veri[6] =
    {
    {(float)x ,(float)y , 0.0f, 0.0f, (color1-0x00888888)},
    {(float)(x+w) ,(float)y , 0.0f, 0.0f, (color1-0x00888888)},
    {(float)x ,(float)(y+(h/2)) , 0.0f, 0.0f, (color1)},
    {(float)(x+w) ,(float)(y+(h/2)) , 0.0f, 0.0f, (color1)},
    {(float)x ,(float)(y+h) , 0.0f, 0.0f, (color1+0x00555555)},
    {(float)(x+w) ,(float)(y+h) , 0.0f, 0.0f, (color1+0x00555555)},
    };


    pDevice->SetTexture( 0, NULL );

    pDevice->SetRenderState( D3DRS_LIGHTING, FALSE);
    pDevice->SetRenderState( D3DRS_CULLMODE, D3DCULL_CCW);
    pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE );
    pDevice->SetRenderState( D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA );
    pDevice->SetRenderState( D3DRS_ZENABLE, D3DZB_FALSE );
    pDevice->SetRenderState( D3DRS_FOGENABLE, false );

    pDevice->SetFVF( sVertex::FVF_Flags );
    pDevice->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP,4,Veri,sizeof (sVertex));
    }
    [/php]
    Last edited by topblast; 01-19-2011 at 02:27 PM.
    I just like programming, that is all.

    Current Stuff:

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

  2. The Following 6 Users Say Thank You to topblast For This Useful Post:

    -xGhost- (01-24-2011),[MPGH]AVGN (01-22-2011),GodHack2 (01-19-2011),msulaimain (01-19-2011),Tony Stark` (01-27-2011),zatchbell3 (01-24-2011)

  3. #2
    flameswor10's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    12,528
    Reputation
    981
    Thanks
    10,406
    My Mood
    In Love
    Looks nice?
    No I do not make game hacks anymore, please stop asking.

  4. #3
    seaplusplus's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Posts
    107
    Reputation
    4
    Thanks
    50
    My Mood
    Drunk
    Why the need for Vertex?

  5. #4
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,611
    Reputation
    149
    Thanks
    4,951
    My Mood
    Cool
    Quote Originally Posted by seaplusplus View Post
    Why the need for Vertex?
    This from the guy who Told me he KNOW D3D

    It was ok if u didnt kno D3D but lying to be kool is just WRONG.
    Last edited by topblast; 01-19-2011 at 02:43 PM.
    I just like programming, that is all.

    Current Stuff:

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

  6. #5
    Nubzgetkillz's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    hacktown
    Posts
    838
    Reputation
    13
    Thanks
    411
    My Mood
    Amazed
    More like a rectangle

    Member since September 25, 2010

    Current Objectives:
    • Graduate college with a degree in Computer Science
    • Find a decent job in the Computer Science Field
    • Learn more programming languages

    Looking for Elo Boosting Job - League of Legends
    Looking for Bronze -> Gold Jobs


    Skype: whatthedream

  7. #6
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,611
    Reputation
    149
    Thanks
    4,951
    My Mood
    Cool
    Quote Originally Posted by Nubzgetkillz View Post
    More like a rectangle
    yea
    I just like programming, that is all.

    Current Stuff:

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

  8. #7
    Nubzgetkillz's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    hacktown
    Posts
    838
    Reputation
    13
    Thanks
    411
    My Mood
    Amazed
    Quote Originally Posted by topblast View Post


    yea
    wats your msn? I? NEVER GOTS IT! lol.. bad engliesh

    Member since September 25, 2010

    Current Objectives:
    • Graduate college with a degree in Computer Science
    • Find a decent job in the Computer Science Field
    • Learn more programming languages

    Looking for Elo Boosting Job - League of Legends
    Looking for Bronze -> Gold Jobs


    Skype: whatthedream

  9. #8
    AVGN's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Kekistan
    Posts
    15,498
    Reputation
    1710
    Thanks
    6,363
    looks like a french fry



    ^Thanks to RJ^




  10. #9
    flameswor10's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    12,528
    Reputation
    981
    Thanks
    10,406
    My Mood
    In Love
    I'm sorry to say but this doesn't match my menu base
    No I do not make game hacks anymore, please stop asking.

  11. #10
    ac1d_buRn's Avatar
    Join Date
    Aug 2009
    Gender
    female
    Location
    CA Source Section
    Posts
    3,406
    Reputation
    157
    Thanks
    3,999
    My Mood
    Flirty
    it looks good, but ya, dont think it will match menus like flames said.

  12. The Following User Says Thank You to ac1d_buRn For This Useful Post:

    flameswor10 (01-19-2011)

  13. #11
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,611
    Reputation
    149
    Thanks
    4,951
    My Mood
    Cool
    I didnt see his menu base 0.0

    Wait.. ahh fuck it. Ur base need GUI Editions everyone got the same blue.
    I just like programming, that is all.

    Current Stuff:

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

  14. #12
    ac1d_buRn's Avatar
    Join Date
    Aug 2009
    Gender
    female
    Location
    CA Source Section
    Posts
    3,406
    Reputation
    157
    Thanks
    3,999
    My Mood
    Flirty
    Quote Originally Posted by topblast View Post
    I didnt see his menu base 0.0

    Wait.. ahh fuck it. Ur base need GUI Editions everyone got the same blue.
    i was the first one to use that color scheme, It took me a wile actually to get good matching colors
    Then like every noob, start copying it and ripping it.

    eg; Zane



    Im in the process of making a new menu, but not really good with classes/structs D:

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


    i was the first one to use that color scheme, It took me a wile actually to get good matching colors
    Then like every noob, start copying it and ripping it.

    eg; Zane



    Im in the process of making a new menu, but not really good with classes/structs D:
    I can help u, not really good with GUI
    I just like programming, that is all.

    Current Stuff:

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

  16. #14
    NOOB's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    3,863
    Reputation
    425
    Thanks
    8,611
    best menu.


  17. #15
    flameswor10's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    12,528
    Reputation
    981
    Thanks
    10,406
    My Mood
    In Love
    Quote Originally Posted by ᴺᴼᴼᴮ View Post
    best menu.

    I'm loving it XD
    No I do not make game hacks anymore, please stop asking.

Page 1 of 4 123 ... LastLast