| QUOTE (Troll123 @ Feb 11 2003, 05:04 PM) |
| Can anyone paste some sample code or help me with this question: I would like to know how to read the game thumbnail that nexgen + the xbox dashboard uses for the games to incorporate into another program. We would like to have My Apps be able to auto-generate a thumbnail based on the embedded picture in the XBE. Please PM me or reply to this thread. |
| QUOTE (DevSpook @ Feb 11 2003, 05:47 PM) |
| The routines in BenJeremys source are a great starting point. One tip with regards to performance, use one function to read both title & id, it will shave some time of your init-routine. Especially if you have a lot of icons to load. When you get to the next step, alpha-blending the icon against a spheremask, remember to use two sets of texture coordinates for the face(s) you are mapping the texture to. That one stumped me for a while. As for loading the image once you have the game id, use something like this: CStdString sImagefile; sImagefile.Format("e:udata%Stitleimage.xbx", wcID); // Note: ID already converted to wchar if (FileExists(sImagefile.c_str())) { if( !FAILED( m_xprResource2.Create( m_pd3dDevice, sImagefile.c_str(), 1, NULL ) ) ) { m_pIconTexture = m_xprResource2.GetTexture( (DWORD) 0 ); } } FileExists is another nice function courtesy of BenJeremy. |