mirror of
https://github.com/libretro/RetroArch
synced 2025-02-21 18:40:09 +00:00
(Xbox 1) Slimming down of RetroLaunch
This commit is contained in:
parent
a82d0c7a9e
commit
5d22842f75
@ -42,7 +42,7 @@ bool CMenuMain::Create()
|
||||
m_menuMainTitle_c = 0xFFFFFFFF;
|
||||
|
||||
// Load background image
|
||||
m_menuMainBG.Create("Media\\menuMainBG.png");
|
||||
m_menuMainBG.Create("D:\\Media\\menuMainBG.png");
|
||||
m_menuMainBG_x = 0;
|
||||
m_menuMainBG_y = 0;
|
||||
m_menuMainBG_w = 640;
|
||||
@ -54,7 +54,7 @@ bool CMenuMain::Create()
|
||||
m_menuMainRomListSpacing = 20;
|
||||
|
||||
// Load rom selector panel
|
||||
m_menuMainRomSelectPanel.Create("Media\\menuMainRomSelectPanel.png");
|
||||
m_menuMainRomSelectPanel.Create("D:\\Media\\menuMainRomSelectPanel.png");
|
||||
m_menuMainRomSelectPanel_x = m_menuMainRomListPos_x - 5;
|
||||
m_menuMainRomSelectPanel_y = m_menuMainRomListPos_y - 2;
|
||||
m_menuMainRomSelectPanel_w = 440;
|
||||
|
@ -34,13 +34,6 @@ RomList::~RomList(void)
|
||||
Destroy();
|
||||
}
|
||||
|
||||
void RomList::Load()
|
||||
{
|
||||
Build();
|
||||
|
||||
m_bLoaded = true;
|
||||
}
|
||||
|
||||
void RomList::Refresh()
|
||||
{
|
||||
Destroy();
|
||||
@ -117,21 +110,6 @@ Rom *RomList::GetRomAt(int index)
|
||||
return m_romList[index];
|
||||
}
|
||||
|
||||
int RomList::FindRom(Rom *rom, int mode)
|
||||
{
|
||||
vector<Rom *> *pList;
|
||||
|
||||
pList = &m_romList;
|
||||
|
||||
for (int i = 0; i < static_cast<int>(pList->size()); i++)
|
||||
{
|
||||
if (rom == (*pList)[i])
|
||||
return i;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
void RomList::CleanUpTextures()
|
||||
{
|
||||
if (!IsLoaded())
|
||||
@ -139,15 +117,11 @@ void RomList::CleanUpTextures()
|
||||
|
||||
// keep the 25 textures above and below the base index
|
||||
for (int i = 0; i < m_iBaseIndex - 25; i++)
|
||||
{
|
||||
m_romList[i]->GetTexture().Destroy();
|
||||
}
|
||||
|
||||
for (int i = m_iBaseIndex + 25; i < GetRomListSize(); i++)
|
||||
{
|
||||
m_romList[i]->GetTexture().Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
void RomList::DestroyAllTextures()
|
||||
{
|
||||
@ -205,9 +179,7 @@ void RomList::Destroy()
|
||||
vector<Rom *>::iterator i;
|
||||
|
||||
for (i = m_romList.begin(); i != m_romList.end(); i++)
|
||||
{
|
||||
delete *i;
|
||||
}
|
||||
|
||||
m_romList.clear();
|
||||
}
|
||||
|
@ -24,8 +24,8 @@ public:
|
||||
RomList(void);
|
||||
~RomList(void);
|
||||
|
||||
void Load();
|
||||
void Refresh();
|
||||
void Build();
|
||||
|
||||
bool IsLoaded();
|
||||
|
||||
@ -38,7 +38,6 @@ public:
|
||||
int GetRomListSize();
|
||||
|
||||
Rom *GetRomAt(int index);
|
||||
int FindRom(Rom *rom, int mode);
|
||||
|
||||
void CleanUpTextures();
|
||||
void DestroyAllTextures();
|
||||
@ -48,7 +47,6 @@ public:
|
||||
vector<Rom *> m_romList;
|
||||
|
||||
private:
|
||||
void Build();
|
||||
void Destroy();
|
||||
|
||||
private:
|
||||
|
@ -33,25 +33,19 @@ CSurface::CSurface()
|
||||
m_y = 0;
|
||||
}
|
||||
|
||||
CSurface::CSurface(const string &szFilename)
|
||||
{
|
||||
CSurface();
|
||||
Create(szFilename);
|
||||
}
|
||||
|
||||
CSurface::~CSurface()
|
||||
{
|
||||
Destroy();
|
||||
}
|
||||
|
||||
bool CSurface::Create(const string &szFilename)
|
||||
bool CSurface::Create(const char *szFilename)
|
||||
{
|
||||
xdk_d3d_video_t *d3d = (xdk_d3d_video_t*)driver.video_data;
|
||||
if (m_bLoaded)
|
||||
Destroy();
|
||||
|
||||
HRESULT g_hResult = D3DXCreateTextureFromFileExA(d3d->d3d_render_device, // d3d device
|
||||
("D:\\" + szFilename).c_str(), // filename
|
||||
szFilename, // filename
|
||||
D3DX_DEFAULT, D3DX_DEFAULT, // width/height
|
||||
D3DX_DEFAULT, // mipmaps
|
||||
0, // usage
|
||||
|
@ -23,13 +23,12 @@ class CSurface
|
||||
{
|
||||
public:
|
||||
CSurface();
|
||||
CSurface(const string &szFilename);
|
||||
~CSurface();
|
||||
|
||||
/**
|
||||
* Do functions
|
||||
*/
|
||||
bool Create(const string &szFilename);
|
||||
bool Create(const char *szFilename);
|
||||
bool Create(dword width, dword height);
|
||||
void Destroy();
|
||||
|
||||
|
@ -36,7 +36,7 @@ int menu_init(void)
|
||||
|
||||
// Load the rom list if it isn't already loaded
|
||||
if (!g_romList.IsLoaded())
|
||||
g_romList.Load();
|
||||
g_romList.Build();
|
||||
|
||||
// Load the font here
|
||||
g_font.Create();
|
||||
|
Loading…
x
Reference in New Issue
Block a user