Thread: Color Type

Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    kotentopf's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Posts
    602
    Reputation
    26
    Thanks
    251

    Color Type

    Hey.
    Not much to say.
    Code:
    struct _COLOR
    {
    	int 
    		Alpha,
    		Red,
    		Green,
    		Blue;
    
    	DWORD ConvertToDWORDWithAlpha()
    	{
    		return D3DCOLOR_ARGB(Alpha,Red,Green,Blue);
    	};
    	DWORD ConvertToDWORD()
    	{
    		return D3DCOLOR_XRGB(Red,Green,Blue);
    	};
    };
    
    typedef struct COLOR : public _COLOR
    {
    public:
    	COLOR (){};
    	COLOR ( int r, int g, int b ){Red = r;Green = g; Blue = b;};
        COLOR ( int a, int r, int g,int b ){Alpha = a; Red = r;Green = g; Blue = b;};
    	COLOR ( COLOR& ){};
    }COLOR, *PCOLOR;
    How to use:
    Code:
    Oh Common, thats simple C++
    Have Fun with it

    Creditz: me (but its very simple)
    The Internet SHOULD Be Illegal

    When you say
    "Java is a great programming language because it works on all platforms"
    it is just like
    "anal sex is great because it works on all genders"

    Are YOU a Troll?

  2. #2
    CAFlames's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Where ever my imagination takes me
    Posts
    3,006
    Reputation
    202
    Thanks
    2,944
    My Mood
    Twisted
    Very simple lol....

    Emphasis on Very :P

    Should help choobs. Good Job.

    Current Works:
    ---Horror Game





    [IMG]https://i645.photobucke*****m/albums/uu180/drgnforce9/Siggys/signature3.jpg[/IMG]
    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.

  3. #3
    Fabolous's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    192.168.1.01
    Posts
    2,704
    Reputation
    261
    Thanks
    682
    My Mood
    Paranoid
    Thanks. Useful for chams and anything usable by shifting colors.

  4. #4
    GodHack2's Avatar
    Join Date
    May 2010
    Gender
    male
    Posts
    644
    Reputation
    38
    Thanks
    762
    My Mood
    Amused
    this has nothing to do with ca but thanks for sharing





    beat this bitches ^^^^^^^

    Current Stats : Bored :/


    Respect list :
    Crash !
    Gordon'
    Markoj

  5. #5
    justiniscool5's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    idk
    Posts
    884
    Reputation
    -12
    Thanks
    182
    My Mood
    Bitchy
    hey u could use this for real chams

  6. #6
    Crash's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    JAville
    Posts
    2,881
    Reputation
    163
    Thanks
    3,291
    My Mood
    Sleepy
    What's wrong with D3DCOLOR ?

  7. #7
    kotentopf's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Posts
    602
    Reputation
    26
    Thanks
    251
    Quote Originally Posted by Crash View Post
    What's wrong with D3DCOLOR ?
    D3DCOLOR = DWORD

    with it u can use it customizer^^
    The Internet SHOULD Be Illegal

    When you say
    "Java is a great programming language because it works on all platforms"
    it is just like
    "anal sex is great because it works on all genders"

    Are YOU a Troll?

  8. #8
    CAFlames's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Where ever my imagination takes me
    Posts
    3,006
    Reputation
    202
    Thanks
    2,944
    My Mood
    Twisted
    Quote Originally Posted by kotentopf View Post
    D3DCOLOR = DWORD

    with it u can use it customizer^^
    Yup. But you can use D3DCOLOR + DIP for chams so you no need this, A.I.R?


    Edit: Mind sharing the general code for the Color Map in Menu? I can add myself.. just need basic code.
    Last edited by CAFlames; 03-02-2011 at 06:08 PM.

    Current Works:
    ---Horror Game





    [IMG]https://i645.photobucke*****m/albums/uu180/drgnforce9/Siggys/signature3.jpg[/IMG]
    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.

  9. #9
    flameswor10's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    12,528
    Reputation
    981
    Thanks
    10,409
    My Mood
    In Love
    Nice struct there
    No I do not make game hacks anymore, please stop asking.

  10. #10
    kotentopf's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Posts
    602
    Reputation
    26
    Thanks
    251
    Quote Originally Posted by CAFlames View Post


    Yup. But you can use D3DCOLOR + DIP for chams so you no need this, A.I.R?


    Edit: Mind sharing the general code for the Color Map in Menu? I can add myself.. just need basic code.
    D3D.Misc.GenerateTexture(DIPDev,&D3D.Chams.TexB,D3 D.Chams.CBack.ConvertToDWORD());//Create the ZBuffer Off Texture

    Snippet of my Colorpicker(Thanks acid)
    Code:
    void cGUI::DrawColorPicker(LPDIRECT3DDEVICE9 pDevice,cButton &Button,COLOR &Col)
    {
    	if(Button.Return && GUI.show){
    
    		if(SPRCR == true){
    			D3DXCreateTextureFromFileInMemory(pDevice,&Color,sizeof(Color),&D3D.Settings.MenuTexture);
    			D3DXCreateSprite(pDevice,&D3D.Settings.Sprite);
    			SPRCR = false;
    		}
    
    		D3D.Draw.Box(29,438,264,163,1,0x8D04A0A0,0xFF030303,pDevice,true,false);
    		D3D.Draw.GameTextPixel(33,440,0xFF3DFFFF,"Color:");
    		D3D.Draw.FillRGB(62,442,135,11,Col.ConvertToDWORD(),pDevice,false);
    		D3D.Draw.GameTextPixel(60,585,LightAvacado,"Thx ac1d_buRn for the Idea. Its not copied!");
    
    		D3DXVECTOR3 POS; 
    		POS.x = 33; 
    		POS.y = 457; 
    		POS.z = 0;
    		
    		D3D.Settings.Sprite->Begin(D3DXSPRITE_ALPHABLEND); 
    		D3D.Settings.Sprite->Draw(D3D.Settings.MenuTexture,NULL,NULL,&POS,0xFFFFFFFF);
    		D3D.Settings.Sprite->End();
    
    		if(Hack.Readys.MouseIsIn(33,457,288,584))
    		{
    			if(GetAsyncKeyState(1)<0)
    			{
    				HDC TheHDC = GetDC (NULL);
    				DWORD Colors = GetPixel (TheHDC, Hack.Values.MousePos.x, Hack.Values.MousePos.y);
    				ReleaseDC (NULL, TheHDC);
    
    				Col.Alpha = 255;
    				Col.Red = GetRValue (Colors);
    				Col.Green = GetGValue (Colors);
    				Col.Blue = GetBValue (Colors);
    			}
    		}
    		RandomC.Draw(pDevice);
    		if(RandomC.Return)
    		{
    			Col.Alpha = 255;
    			Col.Red = Hack.Misc.GetRandomNumber(0,255);
    			Col.Green = Hack.Misc.GetRandomNumber(0,255);
    			Col.Blue = Hack.Misc.GetRandomNumber(0,255);
    
    			RandomC.Return = false;
    		}
    
    		CloseC.Draw(pDevice);
    		if(CloseC.Return){
    			Button.Return = false;
    			CloseC.Return = false;
    		}
    	}
    	else
    		SPRCR = true;
    }
    for the original thread: https://www.mpgh.net/forum/207-combat...or-picker.html
    The Internet SHOULD Be Illegal

    When you say
    "Java is a great programming language because it works on all platforms"
    it is just like
    "anal sex is great because it works on all genders"

    Are YOU a Troll?

  11. The Following 3 Users Say Thank You to kotentopf For This Useful Post:

    ac1d_buRn (03-03-2011),CAFlames (03-02-2011),S0aD (03-03-2011)

  12. #11
    CAFlames's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Where ever my imagination takes me
    Posts
    3,006
    Reputation
    202
    Thanks
    2,944
    My Mood
    Twisted
    Quote Originally Posted by kotentopf View Post
    D3D.Misc.GenerateTexture(DIPDev,&D3D.Chams.TexB,D3 D.Chams.CBack.ConvertToDWORD());//Create the ZBuffer Off Texture

    Snippet of my Colorpicker(Thanks acid)
    Code:
    void cGUI::DrawColorPicker(LPDIRECT3DDEVICE9 pDevice,cButton &Button,COLOR &Col)
    {
    	if(Button.Return && GUI.show){
    
    		if(SPRCR == true){
    			D3DXCreateTextureFromFileInMemory(pDevice,&Color,sizeof(Color),&D3D.Settings.MenuTexture);
    			D3DXCreateSprite(pDevice,&D3D.Settings.Sprite);
    			SPRCR = false;
    		}
    
    		D3D.Draw.Box(29,438,264,163,1,0x8D04A0A0,0xFF030303,pDevice,true,false);
    		D3D.Draw.GameTextPixel(33,440,0xFF3DFFFF,"Color:");
    		D3D.Draw.FillRGB(62,442,135,11,Col.ConvertToDWORD(),pDevice,false);
    		D3D.Draw.GameTextPixel(60,585,LightAvacado,"Thx ac1d_buRn for the Idea. Its not copied!");
    
    		D3DXVECTOR3 POS; 
    		POS.x = 33; 
    		POS.y = 457; 
    		POS.z = 0;
    		
    		D3D.Settings.Sprite->Begin(D3DXSPRITE_ALPHABLEND); 
    		D3D.Settings.Sprite->Draw(D3D.Settings.MenuTexture,NULL,NULL,&POS,0xFFFFFFFF);
    		D3D.Settings.Sprite->End();
    
    		if(Hack.Readys.MouseIsIn(33,457,288,584))
    		{
    			if(GetAsyncKeyState(1)<0)
    			{
    				HDC TheHDC = GetDC (NULL);
    				DWORD Colors = GetPixel (TheHDC, Hack.Values.MousePos.x, Hack.Values.MousePos.y);
    				ReleaseDC (NULL, TheHDC);
    
    				Col.Alpha = 255;
    				Col.Red = GetRValue (Colors);
    				Col.Green = GetGValue (Colors);
    				Col.Blue = GetBValue (Colors);
    			}
    		}
    		RandomC.Draw(pDevice);
    		if(RandomC.Return)
    		{
    			Col.Alpha = 255;
    			Col.Red = Hack.Misc.GetRandomNumber(0,255);
    			Col.Green = Hack.Misc.GetRandomNumber(0,255);
    			Col.Blue = Hack.Misc.GetRandomNumber(0,255);
    
    			RandomC.Return = false;
    		}
    
    		CloseC.Draw(pDevice);
    		if(CloseC.Return){
    			Button.Return = false;
    			CloseC.Return = false;
    		}
    	}
    	else
    		SPRCR = true;
    }
    for the original thread: https://www.mpgh.net/forum/207-combat...or-picker.html
    ooo Das Gooood.

    Thanks for sharing w/ link.

    +thanked

    Current Works:
    ---Horror Game





    [IMG]https://i645.photobucke*****m/albums/uu180/drgnforce9/Siggys/signature3.jpg[/IMG]
    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.

  13. #12
    Alessandro10's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    MPGH.NET
    Posts
    6,140
    Reputation
    215
    Thanks
    4,607
    My Mood
    Busy
    Edit by Alessandro10

    Work!
    Last edited by Alessandro10; 03-02-2011 at 06:37 PM.

  14. #13
    kotentopf's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Posts
    602
    Reputation
    26
    Thanks
    251
    Quote Originally Posted by Alessandro10 View Post
    Simples is my Big Dick.
    why u not try to post usefull comments
    if u try to be funny, where u can not be funny its more than spam or flame
    The Internet SHOULD Be Illegal

    When you say
    "Java is a great programming language because it works on all platforms"
    it is just like
    "anal sex is great because it works on all genders"

    Are YOU a Troll?

  15. The Following 2 Users Say Thank You to kotentopf For This Useful Post:

    S0aD (05-03-2011),Sydney (03-03-2011)

  16. #14
    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
    5,052
    My Mood
    Cool
    You want to kno what would of been useful..... If it got the 4 Color types A, r, g, b for you from a DWORD... That is help
    I just like programming, that is all.

    Current Stuff:

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

  17. #15
    kotentopf's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Posts
    602
    Reputation
    26
    Thanks
    251
    Quote Originally Posted by topblast View Post
    You want to kno what would of been useful..... If it got the 4 Color types A, r, g, b for you from a DWORD... That is help
    have it, same way like D3DCOLOR_ARGB, just reversed^^
    The Internet SHOULD Be Illegal

    When you say
    "Java is a great programming language because it works on all platforms"
    it is just like
    "anal sex is great because it works on all genders"

    Are YOU a Troll?

Page 1 of 2 12 LastLast