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