Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    dean-wingess's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Posts
    409
    Reputation
    29
    Thanks
    213
    My Mood
    Stressed

    Reset Sprites the Easiest Basic way !

    ..::Information::..
    This "snipped" is very basic, i've tested it and it worked,
    but sometimes the menu is just getting recreated ingame.
    You can easily fix it, if you know how to work with reset and sprites.
    :/
    Out of my view, i wouldn't give a fuck xD, since hack-users should be thankful to me because of creating a hack for them, isn't that so? :P


    Hello guys,
    i decided to show you a method to reset your sprites, because a lot of people were asking me how, but when i tried to help them they were like "wtf r u talkin 'bout??" yep, that's the most spread desease here, isn't it?

    It's very basic, easy and there are alot of ways.

    The way i like the best is this one:
    (Easy for beginners)

    First of all collect the names of your Textures you've created.
    [In order to do this you may need to use a drawtexture function, it makes no sense if it's loaded from bytes or file]
    In globals:
    Code:
    bool recreate = false;
    In Present or Endscene Put this (I recommended to make it easy to find for me -> above hacking stuff)
    Code:
    if(recreate){
    D3DXCreateTextureFromFileInMemory(pDevice, &_Page1, sizeof(_Page1), &Page1);// Your Texture. Do not Put a If Zero infront of the creation.
    // Do the stuff above with all your Textures!
    D3DXCreateSprite(pDevice, &SpriteMenu);// Your Sprite SpriteMenu = Your //LPD3DXSPRITE
    recreate = false;
    }
    After you finished doing this, add this into your Reset
    [Recommended you have a working reset in your Base|Source|C&P'ed thingy what ever.]
    For example:
    Code:
    HRESULT WINAPI hkReset(PREMETERS = Example){
    SpriteMenu->OnLostDevice();
    recreate =! recreate ;
    }
    // This is an example reset!
    This is the easiest method i could find.
    I tested it and it worked for me..
    Give me Feedback.
    Last edited by dean-wingess; 11-23-2010 at 10:58 AM.
    [YOUTUBE]e89lqiE0wi0[/YOUTUBE]

  2. The Following 3 Users Say Thank You to dean-wingess For This Useful Post:

    Dead 4 Real (01-30-2011),qwerty01 (11-24-2010),Sydney (11-23-2010)

  3. #2
    o-o's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    who reading that ? T_T
    Posts
    682
    Reputation
    10
    Thanks
    307
    My Mood
    Cold
    Nice . /
    [IMG]https://i423.photobucke*****m/albums/pp312/LizMLsinatra/hh-1.png[/IMG]
    Happy Hanukkah For All Of MPGH !


    The Real Life Are Better Then A Game !


    Song :[YOUTUBE]vgKBOkvO5N0&feature=player_embedded[/YOUTUBE]
    Best Friends :

    Hax4Life!

    Solify

    [MPGH]Drake`

    Respect Them Or I'll Kill You ...



  4. The Following User Says Thank You to o-o For This Useful Post:

    dean-wingess (11-23-2010)

  5. #3
    MrSkafighter's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    410
    Reputation
    23
    Thanks
    2,238
    My Mood
    Cool
    Recreation I Think This Too Is Needed. Don't Flame.

    Code:
    LPDIRECT3DDEVICE9 g_pDevice = 0;
    Code:
    HRESULT WINAPI gellPresent(LPDIRECT3DDEVICE9 pDevice, CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion)
    {
        if (g_pDevice != pDevice)
    {
        g_pDevice = pDevice;
        try
        {
            if (SpriteMenu != 0)
                SpriteMenu->Release();
        } catch (...) {}
        SpriteMenu = 0;
        D3DXCreateTextureFromFileInMemory(pDevice,&_Page1,sizeof(&_Page1),&Page1);
        D3DXCreateSprite(pDevice,&SpriteMenu);
        }

  6. The Following User Says Thank You to MrSkafighter For This Useful Post:

    dean-wingess (11-23-2010)

  7. #4
    markoj's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    s
    Posts
    1,064
    Reputation
    60
    Thanks
    407
    My Mood
    Bored
    ------ rep
    Dont ban me

  8. #5
    dean-wingess's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Posts
    409
    Reputation
    29
    Thanks
    213
    My Mood
    Stressed
    Quote Originally Posted by MrSkafighter View Post
    Recreation I Think This Too Is Needed. Don't Flame.

    Code:
    LPDIRECT3DDEVICE9 g_pDevice = 0;
    Code:
    HRESULT WINAPI gellPresent(LPDIRECT3DDEVICE9 pDevice, CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion)
    {
        if (g_pDevice != pDevice)
    {
        g_pDevice = pDevice;
        try
        {
            if (SpriteMenu != 0)
                SpriteMenu->Release();
        } catch (...) {}
        SpriteMenu = 0;
        D3DXCreateTextureFromFileInMemory(pDevice,&_Page1,sizeof(&_Page1),&Page1);
        D3DXCreateSprite(pDevice,&SpriteMenu);
        }
    Am i looking like a flamer ^-^, thanked for that one.
    [YOUTUBE]e89lqiE0wi0[/YOUTUBE]

  9. #6
    MrSkafighter's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    410
    Reputation
    23
    Thanks
    2,238
    My Mood
    Cool
    Quote Originally Posted by dean-wingess View Post
    Am i looking like a flamer ^-^, thanked for that one.
    I'm Just Saying If Any Coder Comes In And Suddenly Start Flaming Me That If The Code is Wrong Lol Anyway This Works Tested As You Can See I Released My Hack You Can Try And See That It Will Not Disappear.

  10. #7
    dean-wingess's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Posts
    409
    Reputation
    29
    Thanks
    213
    My Mood
    Stressed
    Quote Originally Posted by MrSkafighter View Post

    I'm Just Saying If Any Coder Comes In And Suddenly Start Flaming Me That If The Code is Wrong Lol Anyway This Works Tested As You Can See I Released My Hack You Can Try And See That It Will Not Disappear.
    ahh dude Nice sprite.

    Why didn't you use a simple renderstate to not get it being overdrawn?
    Code:
    DEVICENAME->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
    //Sprites and Tex Drawing here
    DEVICENAME->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
    [YOUTUBE]e89lqiE0wi0[/YOUTUBE]

  11. #8
    GodHack2's Avatar
    Join Date
    May 2010
    Gender
    male
    Posts
    644
    Reputation
    38
    Thanks
    762
    My Mood
    Amused
    Quote Originally Posted by MrSkafighter View Post
    Recreation I Think This Too Is Needed. Don't Flame.

    Code:
    LPDIRECT3DDEVICE9 g_pDevice = 0;
    Code:
    HRESULT WINAPI gellPresent(LPDIRECT3DDEVICE9 pDevice, CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion)
    {
        if (g_pDevice != pDevice)
    {
        g_pDevice = pDevice;
        try
        {
            if (SpriteMenu != 0)
                SpriteMenu->Release();
        } catch (...) {}
        SpriteMenu = 0;
        D3DXCreateTextureFromFileInMemory(pDevice,&_Page1,sizeof(&_Page1),&Page1);
        D3DXCreateSprite(pDevice,&SpriteMenu);
        }
    give credits to mmbob

    Quote Originally Posted by dean-wingess View Post
    ahh dude Nice sprite.

    Why didn't you use a simple renderstate to not get it being overdrawn?
    Code:
    DEVICENAME->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
    //Sprites and Tex Drawing here
    DEVICENAME->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
    you can use the SetRenderState only if your menu is being covered by the game GUI it won't fix the text or sprite from being disappeared





    beat this bitches ^^^^^^^

    Current Stats : Bored :/


    Respect list :
    Crash !
    Gordon'
    Markoj

  12. #9
    dean-wingess's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Posts
    409
    Reputation
    29
    Thanks
    213
    My Mood
    Stressed
    Quote Originally Posted by GodHack2 View Post
    give credits to mmbob



    you can use the SetRenderState only if your menu is being covered by the game GUI it won't fix the text or sprite from being disappeared
    Could you tell me why mine isn't disappearing then?
    [YOUTUBE]e89lqiE0wi0[/YOUTUBE]

  13. #10
    GodHack2's Avatar
    Join Date
    May 2010
    Gender
    male
    Posts
    644
    Reputation
    38
    Thanks
    762
    My Mood
    Amused
    Quote Originally Posted by dean-wingess View Post
    Could you tell me why mine isn't disappearing then?
    ok umm
    if you exit a match and enter another with the SetRenderState ZENABLE off then on
    or if you minimize the game and go back on it with the same thing
    your text or sprite should disappear

    if not well then that means am wrong :/





    beat this bitches ^^^^^^^

    Current Stats : Bored :/


    Respect list :
    Crash !
    Gordon'
    Markoj

  14. #11
    NOOB's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    3,843
    Reputation
    425
    Thanks
    8,616
    Quote Originally Posted by MrSkafighter View Post
    Recreation I Think This Too Is Needed. Don't Flame.
    Why Do You Type Like This? /

  15. #12
    whit's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    7,159
    Reputation
    490
    Thanks
    2,253
    Quote Originally Posted by MrSkafighter View Post
    Recreation I Think This Too Is Needed. Don't Flame.

    Code:
    LPDIRECT3DDEVICE9 g_pDevice = 0;
    Code:
    HRESULT WINAPI gellPresent(LPDIRECT3DDEVICE9 pDevice, CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion)
    {
        if (g_pDevice != pDevice)
    {
        g_pDevice = pDevice;
        try
        {
            if (SpriteMenu != 0)
                SpriteMenu->Release();
        } catch (...) {}
        SpriteMenu = 0;
        D3DXCreateTextureFromFileInMemory(pDevice,&_Page1,sizeof(&_Page1),&Page1);
        D3DXCreateSprite(pDevice,&SpriteMenu);
        }
    Give creds to mmbob for the recreate source

  16. #13
    AVGN's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Kekistan
    Posts
    15,566
    Reputation
    1817
    Thanks
    6,678
    Quote Originally Posted by ᴺᴼᴼᴮ View Post


    Why Do You Type Like This? /

    maybe that's how they write in singapore?




  17. #14
    RagedYet's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    California
    Posts
    220
    Reputation
    -3
    Thanks
    34
    My Mood
    Devilish
    Recreate your Sprite with your font -.- i see many wasted lines on this method :O even tho C++ is allreadt 10-20 times slower than assembly + wasted lines ur hack is laggy



  18. #15
    MrSkafighter's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    410
    Reputation
    23
    Thanks
    2,238
    My Mood
    Cool
    Quote Originally Posted by whit View Post


    Give creds to mmbob for the recreate source
    He Didn't Help Me For The Recreate Source I Do It My Own.

Page 1 of 2 12 LastLast