Results 1 to 2 of 2
  1. #1
    DeadCode's Avatar
    Join Date
    Apr 2012
    Gender
    male
    Posts
    16
    Reputation
    10
    Thanks
    8
    My Mood
    Amazed

    GWEN Library - Edited to Accept D3D Sprites

    Hey guys! Not sure if this has been released in the past, but I just edited the source of GWEN to accept D3D Sprites and I felt like sharing.

    Example of a Sprite Byte:
    Code:
    BYTE menu[] = {0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x08, 0x02, 0x00, 0x00, 0x00, 0x90, 0x77, 0x53, 0xDE, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xAE, 0xCE, 0x1C, 0xE9, 0x00, 0x00, 0x00, 0x04, 0x67, 0x41, 0x4D, 0x41, 0x00, 0x00, 0xB1, 0x8F, 0x0B, 0xFC, 0x61, 0x05, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0E, 0xC3, 0x00, 0x00, 0x0E, 0xC3, 0x01, 0xC7, 0x6F, 0xA8, 0x64, 0x00, 0x00, 0x00, 0x0C, 0x49, 0x44, 0x41, 0x54, 0x18, 0x57, 0x63, 0xF8, 0xFF, 0xFF, 0x3F, 0x00, 0x05, 0xFE, 0x02, 0xFE, 0xA7, 0x35, 0x81, 0x84, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82};
    How to init Gwen:

    Code:
    #pragma comment( lib, "gwen_static.lib")
    #pragma comment( lib, "GWEN-Renderer-DirectX9.lib")
    
    Gwen::Controls::Canvas* canv;
    Gwen::Input::Windows GwenInput;
    Gwen::Renderer::DirectX9* pRenderer = new Gwen::Renderer::DirectX9( pDevice );
    Gwen::Skin::TexturedBase* pSkin = new Gwen::Skin::TexturedBase( pRenderer );
    IDirect3DTexture9* ptr = NULL;
    D3DXIMAGE_INFO ImageInfo;
    
    HRESULT hr = D3DXCreateTextureFromFileInMemoryEx( pDevice, &menu, sizeof(menu), 0, 0, D3DX_DEFAULT, 0, D3DFMT_UNKNOWN, D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_DEFAULT, 0, &ImageInfo, NULL, &ptr );
    Gwen::Controls::Canvas* pCanvas = new Gwen::Controls::Canvas( pSkin );
    pCanvas->SetSize(1920,1080);
    pCanvas->SetPos( 0,0 );
    pSkin->Init( ptr, ImageInfo );
    
    auto menu = new Menu(pCanvas);
    GwenInput.Initialize( pCanvas );

    I added Source and Libs in attachement.

    VIRUS SCANS:
    https://www.virustotal.com/en/file/d...is/1365899972/
    https://www.virustotal.com/en/file/a...is/1365900439/
    <b>Downloadable Files</b> Downloadable Files
    Last edited by DeadCode; 04-13-2013 at 06:45 PM.

  2. The Following 3 Users Say Thank You to DeadCode For This Useful Post:

    nova0001 (06-13-2013),PREEMNET (05-15-2013),Raden's Narayan Tamvan (05-03-2015)

  3. #2
    Psychotic's Avatar
    Join Date
    May 2012
    Gender
    male
    Posts
    13,825
    Reputation
    4234
    Thanks
    6,055
    /approved .






    Super User since 02.02.2020
    Global Moderator since 09.23.2017
    Moderator since 09.01.2016
    Minion+ since 07.22.2016

    Marketplace Minion since 06.09.2016
    Trove Minion since 06.06.2016
    Middleman since 04.21.2016
    Social Engineering Minion since 02.03.2016
    News FO Freelancer From 11.08.2015 to 07.23.2016
    News FO Head Editor From 08.23.2015 to 11.08.2015
    News FO Head Editor From 07.19.2012 to 08.11.2014
    MPGH News and News FO Founder
    Programming Minion From Unknown to 04.23.2013
    Minecraft Minion From 09.19.2012 to 04.23.2013
    Member since 05.13.2012



Similar Threads

  1. Looking for HEX editer D3D 10-18-10
    By TV15 in forum WarRock Discussions
    Replies: 19
    Last Post: 10-18-2010, 09:23 PM
  2. D3d Sprites Streched
    By coogle007 in forum Combat Arms Coding Help & Discussion
    Replies: 18
    Last Post: 10-14-2010, 02:01 AM
  3. can rez files be edited with D3D or directx?
    By dddrrr in forum CrossFire Mods & Rez Modding
    Replies: 6
    Last Post: 07-02-2010, 08:55 PM
  4. How do I get the D3D library for C++?
    By zhaoyun333 in forum C++/C Programming
    Replies: 2
    Last Post: 06-27-2009, 11:38 AM
  5. D3D Sprite Class
    By radnomguywfq3 in forum C++/C Programming
    Replies: 0
    Last Post: 03-01-2009, 12:37 PM