diff --git a/xbox1/frontend/RetroLaunch/Global.h b/xbox1/frontend/RetroLaunch/Global.h deleted file mode 100644 index 4e16968715..0000000000 --- a/xbox1/frontend/RetroLaunch/Global.h +++ /dev/null @@ -1,41 +0,0 @@ -/** - * RetroLaunch 2012 - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. To contact the - * authors: Surreal64 CE Team (http://www.emuxtras.net) - */ - -#pragma once - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace std; - -#define XBUILD "Launcher CE" - -typedef unsigned __int8 byte; -typedef unsigned __int16 word; -typedef unsigned __int32 dword; -typedef unsigned __int64 qword; - - diff --git a/xbox1/frontend/RetroLaunch/IoSupport.h b/xbox1/frontend/RetroLaunch/IoSupport.h index 32224397e2..eb3caf5ec9 100644 --- a/xbox1/frontend/RetroLaunch/IoSupport.h +++ b/xbox1/frontend/RetroLaunch/IoSupport.h @@ -10,7 +10,6 @@ #endif // _MSC_VER > 1000 #ifdef _XBOX #include -#include "global.h" #define TRAY_OPEN 16 #define TRAY_CLOSED_NO_MEDIA 64 diff --git a/xbox1/frontend/RetroLaunch/MenuMain.cpp b/xbox1/frontend/RetroLaunch/MenuMain.cpp index 8c66cc2482..ab5f36363b 100644 --- a/xbox1/frontend/RetroLaunch/MenuMain.cpp +++ b/xbox1/frontend/RetroLaunch/MenuMain.cpp @@ -126,7 +126,7 @@ void CMenuMain::Render() //FIXME: Width/Height needs to be current Rom texture width/height (or should we just leave it at a fixed size?) m_menuMainRomSelectPanel.Render(m_menuMainRomSelectPanel_x, m_menuMainRomSelectPanel_y, m_menuMainRomSelectPanel_w, m_menuMainRomSelectPanel_h); - dword dwSpacing = 0; + int32_t dwSpacing = 0; for (int i = m_romListBeginRender; i <= m_romListEndRender; i++) { diff --git a/xbox1/frontend/RetroLaunch/MenuMain.h b/xbox1/frontend/RetroLaunch/MenuMain.h index 72d64e5233..76d947392e 100644 --- a/xbox1/frontend/RetroLaunch/MenuMain.h +++ b/xbox1/frontend/RetroLaunch/MenuMain.h @@ -14,7 +14,6 @@ */ #pragma once -#include "Global.h" #include "Surface.h" class CMenuMain @@ -43,20 +42,20 @@ _c = color, CSurface m_menuMainBG; int m_menuMainBG_x; int m_menuMainBG_y; -dword m_menuMainBG_w; -dword m_menuMainBG_h; +int32_t m_menuMainBG_w; +int32_t m_menuMainBG_h; // Rom selector panel with coords CSurface m_menuMainRomSelectPanel; int m_menuMainRomSelectPanel_x; int m_menuMainRomSelectPanel_y; -dword m_menuMainRomSelectPanel_w; -dword m_menuMainRomSelectPanel_h; +int32_t m_menuMainRomSelectPanel_w; +int32_t m_menuMainRomSelectPanel_h; // Title coords with color int m_menuMainTitle_x; int m_menuMainTitle_y; -dword m_menuMainTitle_c; +int32_t m_menuMainTitle_c; // Rom list coords int m_menuMainRomListPos_x; diff --git a/xbox1/frontend/RetroLaunch/MenuManager.h b/xbox1/frontend/RetroLaunch/MenuManager.h index 6f287b5c55..680139e7bb 100644 --- a/xbox1/frontend/RetroLaunch/MenuManager.h +++ b/xbox1/frontend/RetroLaunch/MenuManager.h @@ -15,8 +15,6 @@ #pragma once -#include "Global.h" - enum eMenuState { MENU_MAIN = 0, diff --git a/xbox1/frontend/RetroLaunch/Rom.h b/xbox1/frontend/RetroLaunch/Rom.h index a93a2901be..0fb56ee8b6 100644 --- a/xbox1/frontend/RetroLaunch/Rom.h +++ b/xbox1/frontend/RetroLaunch/Rom.h @@ -15,8 +15,6 @@ #pragma once -#include "Global.h" - class Rom { public: diff --git a/xbox1/frontend/RetroLaunch/RomList.cpp b/xbox1/frontend/RetroLaunch/RomList.cpp index 399a820896..f8f684b225 100644 --- a/xbox1/frontend/RetroLaunch/RomList.cpp +++ b/xbox1/frontend/RetroLaunch/RomList.cpp @@ -12,7 +12,7 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. To contact the * authors: Surreal64 CE Team (http://www.emuxtras.net) */ - +#include #include "RomList.h" RomList g_romList; @@ -46,7 +46,7 @@ bool RomList::IsLoaded() void RomList::AddRomToList(Rom *rom, int mode) { - vector *pList; + std::vector *pList; pList = &m_romList; @@ -58,17 +58,16 @@ void RomList::AddRomToList(Rom *rom, int mode) } pList->push_back(rom); - sort(pList->begin(), pList->end(), RLessThan); + std::sort(pList->begin(), pList->end(), RLessThan); } void RomList::RemoveRomFromList(Rom *rom, int mode) { - vector *pList; + std::vector *pList; + std::vector::iterator i; pList = &m_romList; - vector::iterator i; - // look to see if the rom is already in the list, we dont want duplicates for (i = pList->begin(); i != pList->end(); i++) { @@ -152,7 +151,7 @@ void RomList::Destroy() m_bLoaded = false; m_iBaseIndex = 0; - vector::iterator i; + std::vector::iterator i; for (i = m_romList.begin(); i != m_romList.end(); i++) delete *i; diff --git a/xbox1/frontend/RetroLaunch/RomList.h b/xbox1/frontend/RetroLaunch/RomList.h index 729a578036..eac7fac294 100644 --- a/xbox1/frontend/RetroLaunch/RomList.h +++ b/xbox1/frontend/RetroLaunch/RomList.h @@ -15,7 +15,7 @@ #pragma once -#include "Global.h" +#include #include "Rom.h" class RomList @@ -41,14 +41,14 @@ public: int m_iBaseIndex; - vector m_romList; + std::vector m_romList; private: void Destroy(); private: bool m_bLoaded; - string m_szRomPath; + std::string m_szRomPath; }; extern RomList g_romList; \ No newline at end of file diff --git a/xbox1/frontend/RetroLaunch/Surface.cpp b/xbox1/frontend/RetroLaunch/Surface.cpp index d4be34b64f..de7e41a12c 100644 --- a/xbox1/frontend/RetroLaunch/Surface.cpp +++ b/xbox1/frontend/RetroLaunch/Surface.cpp @@ -81,7 +81,7 @@ bool CSurface::Create(const char *szFilename) return true; } -bool CSurface::Create(dword width, dword height) +bool CSurface::Create(int32_t width, int32_t height) { xdk_d3d_video_t *d3d = (xdk_d3d_video_t*)driver.video_data; if (m_bLoaded) @@ -152,7 +152,7 @@ bool CSurface::Render(int x, int y) return Render(x, y, m_imageInfo.Width, m_imageInfo.Height); } -bool CSurface::Render(int x, int y, dword w, dword h) +bool CSurface::Render(int x, int y, int32_t w, int32_t h) { xdk_d3d_video_t *d3d = (xdk_d3d_video_t*)driver.video_data; if (m_pTexture == NULL || m_pVertexBuffer == NULL || m_bLoaded == false) @@ -215,7 +215,7 @@ void CSurface::MoveTo(int x, int y) m_y = y; } -dword CSurface::GetWidth() +int32_t CSurface::GetWidth() { if (m_pTexture == NULL || m_pVertexBuffer == NULL) return 0; @@ -223,7 +223,7 @@ dword CSurface::GetWidth() return m_imageInfo.Width; } -dword CSurface::GetHeight() +int32_t CSurface::GetHeight() { if (m_pTexture == NULL || m_pVertexBuffer == NULL) return 0; @@ -231,7 +231,7 @@ dword CSurface::GetHeight() return m_imageInfo.Height; } -byte CSurface::GetOpacity() +int8_t CSurface::GetOpacity() { return m_byOpacity; } diff --git a/xbox1/frontend/RetroLaunch/Surface.h b/xbox1/frontend/RetroLaunch/Surface.h index 13766af62f..f253de92ec 100644 --- a/xbox1/frontend/RetroLaunch/Surface.h +++ b/xbox1/frontend/RetroLaunch/Surface.h @@ -17,8 +17,6 @@ #pragma once -#include "Global.h" - class CSurface { public: @@ -29,14 +27,14 @@ public: * Do functions */ bool Create(const char *szFilename); - bool Create(dword width, dword height); + bool Create(int32_t width, int32_t height); void Destroy(); bool IsLoaded(); bool Render(); bool Render(int x, int y); - bool Render(int x, int y, dword w, dword h); + bool Render(int x, int y, int32_t w, int32_t h); /** * Set functions @@ -48,10 +46,10 @@ public: /** * Get functions */ - dword GetWidth(); - dword GetHeight(); + int32_t GetWidth(); + int32_t GetHeight(); - byte GetOpacity(); + int8_t GetOpacity(); IDirect3DTexture8 *GetTexture(); diff --git a/xbox1/frontend/menu.cpp b/xbox1/frontend/menu.cpp index e11ec1129c..9af964e4ee 100644 --- a/xbox1/frontend/menu.cpp +++ b/xbox1/frontend/menu.cpp @@ -14,7 +14,6 @@ * If not, see . */ -#include "RetroLaunch/Global.h" #include "RetroLaunch/IoSupport.h" #include "RetroLaunch/MenuManager.h" #include "RetroLaunch/RomList.h"