mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 05:51:27 +12:00
Fixed compilation errors
Minor improvements
This commit is contained in:
parent
0ff38bc8ce
commit
c7ca4b996a
6 changed files with 23 additions and 25 deletions
|
@ -3269,7 +3269,7 @@ private:
|
||||||
{
|
{
|
||||||
double res;
|
double res;
|
||||||
|
|
||||||
#ifdef _MSVC_VER
|
#ifdef _MSC_VER
|
||||||
if(_fpclass(CPU.FPR[frb]) >= _FPCLASS_NZ)
|
if(_fpclass(CPU.FPR[frb]) >= _FPCLASS_NZ)
|
||||||
#else
|
#else
|
||||||
if(_fpclass(CPU.FPR[frb]) == FP_ZERO || signbit(CPU.FPR[frb]) == 0)
|
if(_fpclass(CPU.FPR[frb]) == FP_ZERO || signbit(CPU.FPR[frb]) == 0)
|
||||||
|
|
|
@ -470,9 +470,3 @@ u32 Module::GetNewId(void* data, u8 flags)
|
||||||
{
|
{
|
||||||
return Emu.GetIdManager().GetNewID(GetName(), data, flags);
|
return Emu.GetIdManager().GetNewID(GetName(), data, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
|
||||||
__forceinline void Module::AddFunc(u32 id, T func)
|
|
||||||
{
|
|
||||||
m_funcs_list.Move(new ModuleFunc(id, bind_func(func)));
|
|
||||||
}
|
|
||||||
|
|
|
@ -70,6 +70,12 @@ public:
|
||||||
template<typename T> __forceinline void AddFunc(u32 id, T func);
|
template<typename T> __forceinline void AddFunc(u32 id, T func);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
__forceinline void Module::AddFunc(u32 id, T func)
|
||||||
|
{
|
||||||
|
m_funcs_list.Move(new ModuleFunc(id, bind_func(func)));
|
||||||
|
}
|
||||||
|
|
||||||
bool IsLoadedFunc(u32 id);
|
bool IsLoadedFunc(u32 id);
|
||||||
bool CallFunc(u32 num);
|
bool CallFunc(u32 num);
|
||||||
bool UnloadFunc(u32 id);
|
bool UnloadFunc(u32 id);
|
||||||
|
|
|
@ -110,14 +110,13 @@ int cellGameGetParamInt(u32 id, mem32_t value)
|
||||||
return CELL_GAME_ERROR_PARAM;
|
return CELL_GAME_ERROR_PARAM;
|
||||||
|
|
||||||
// TODO: Locate the PARAM.SFO. The following path is in most cases wrong.
|
// TODO: Locate the PARAM.SFO. The following path is in most cases wrong.
|
||||||
vfsStream* f = Emu.GetVFS().Open("/app_home/PARAM.SFO", vfsRead);
|
vfsFile f("/app_home/PARAM.SFO");
|
||||||
PSFLoader psf(*f);
|
PSFLoader psf(f);
|
||||||
if(!psf.Load(false))
|
if(!psf.Load(false))
|
||||||
return CELL_GAME_ERROR_FAILURE;
|
return CELL_GAME_ERROR_FAILURE;
|
||||||
psf.Close();
|
|
||||||
|
|
||||||
switch(id)
|
switch(id)
|
||||||
{ // TODO: Is the endianness right?
|
{
|
||||||
case CELL_GAME_PARAMID_PARENTAL_LEVEL: value = psf.m_info.parental_lvl; break;
|
case CELL_GAME_PARAMID_PARENTAL_LEVEL: value = psf.m_info.parental_lvl; break;
|
||||||
case CELL_GAME_PARAMID_RESOLUTION: value = psf.m_info.resolution; break;
|
case CELL_GAME_PARAMID_RESOLUTION: value = psf.m_info.resolution; break;
|
||||||
case CELL_GAME_PARAMID_SOUND_FORMAT: value = psf.m_info.sound_format; break;
|
case CELL_GAME_PARAMID_SOUND_FORMAT: value = psf.m_info.sound_format; break;
|
||||||
|
@ -137,11 +136,10 @@ int cellGameGetParamString(u32 id, mem_list_ptr_t<u8> buf, u32 bufsize)
|
||||||
return CELL_GAME_ERROR_PARAM;
|
return CELL_GAME_ERROR_PARAM;
|
||||||
|
|
||||||
// TODO: Locate the PARAM.SFO. The following path is in most cases wrong.
|
// TODO: Locate the PARAM.SFO. The following path is in most cases wrong.
|
||||||
vfsStream* f = Emu.GetVFS().Open("/app_home/PARAM.SFO", vfsRead);
|
vfsFile f("/app_home/PARAM.SFO");
|
||||||
PSFLoader psf(*f);
|
PSFLoader psf(f);
|
||||||
if(!psf.Load(false))
|
if(!psf.Load(false))
|
||||||
return CELL_GAME_ERROR_FAILURE;
|
return CELL_GAME_ERROR_FAILURE;
|
||||||
psf.Close();
|
|
||||||
|
|
||||||
switch(id)
|
switch(id)
|
||||||
{
|
{
|
||||||
|
|
|
@ -225,7 +225,7 @@ void MemoryViewerPanel::ShowImage(wxCommandEvent& WXUNUSED(event))
|
||||||
f_image_viewer->SetClientSize(wxSize(sizex,sizey));
|
f_image_viewer->SetClientSize(wxSize(sizex,sizey));
|
||||||
f_image_viewer->Show();
|
f_image_viewer->Show();
|
||||||
|
|
||||||
wxClientDC* dc_canvas = new wxClientDC(f_image_viewer);
|
wxClientDC dc_canvas(f_image_viewer);
|
||||||
u32 addr = m_addr;
|
u32 addr = m_addr;
|
||||||
for(int y = 0; y < sizex; y++)
|
for(int y = 0; y < sizex; y++)
|
||||||
{
|
{
|
||||||
|
@ -238,8 +238,8 @@ void MemoryViewerPanel::ShowImage(wxCommandEvent& WXUNUSED(event))
|
||||||
R = Memory.IsGoodAddr(addr+0) ? Memory.Read8(addr+0) : 0;
|
R = Memory.IsGoodAddr(addr+0) ? Memory.Read8(addr+0) : 0;
|
||||||
G = Memory.IsGoodAddr(addr+1) ? Memory.Read8(addr+1) : 0;
|
G = Memory.IsGoodAddr(addr+1) ? Memory.Read8(addr+1) : 0;
|
||||||
B = Memory.IsGoodAddr(addr+2) ? Memory.Read8(addr+2) : 0;
|
B = Memory.IsGoodAddr(addr+2) ? Memory.Read8(addr+2) : 0;
|
||||||
dc_canvas->SetPen(wxPen(wxColour(R,G,B), 3));
|
dc_canvas.SetPen(wxPen(wxColour(R,G,B), 3));
|
||||||
dc_canvas->DrawPoint(x,y);
|
dc_canvas.DrawPoint(x,y);
|
||||||
addr += 3;
|
addr += 3;
|
||||||
break;
|
break;
|
||||||
case(1): //ARGB
|
case(1): //ARGB
|
||||||
|
@ -247,8 +247,8 @@ void MemoryViewerPanel::ShowImage(wxCommandEvent& WXUNUSED(event))
|
||||||
R = Memory.IsGoodAddr(addr+1) ? Memory.Read8(addr+1) : 0;
|
R = Memory.IsGoodAddr(addr+1) ? Memory.Read8(addr+1) : 0;
|
||||||
G = Memory.IsGoodAddr(addr+2) ? Memory.Read8(addr+2) : 0;
|
G = Memory.IsGoodAddr(addr+2) ? Memory.Read8(addr+2) : 0;
|
||||||
B = Memory.IsGoodAddr(addr+3) ? Memory.Read8(addr+3) : 0;
|
B = Memory.IsGoodAddr(addr+3) ? Memory.Read8(addr+3) : 0;
|
||||||
dc_canvas->SetPen(wxPen(wxColour(R,G,B), 3));
|
dc_canvas.SetPen(wxPen(wxColour(R,G,B), 3));
|
||||||
dc_canvas->DrawPoint(x,y);
|
dc_canvas.DrawPoint(x,y);
|
||||||
addr += 4;
|
addr += 4;
|
||||||
break;
|
break;
|
||||||
case(2): //RGBA
|
case(2): //RGBA
|
||||||
|
@ -256,8 +256,8 @@ void MemoryViewerPanel::ShowImage(wxCommandEvent& WXUNUSED(event))
|
||||||
G = Memory.IsGoodAddr(addr+1) ? Memory.Read8(addr+1) : 0;
|
G = Memory.IsGoodAddr(addr+1) ? Memory.Read8(addr+1) : 0;
|
||||||
B = Memory.IsGoodAddr(addr+2) ? Memory.Read8(addr+2) : 0;
|
B = Memory.IsGoodAddr(addr+2) ? Memory.Read8(addr+2) : 0;
|
||||||
//A = Memory.IsGoodAddr(addr+3) ? Memory.Read8(addr+3) : 0;
|
//A = Memory.IsGoodAddr(addr+3) ? Memory.Read8(addr+3) : 0;
|
||||||
dc_canvas->SetPen(wxPen(wxColour(R,G,B), 3));
|
dc_canvas.SetPen(wxPen(wxColour(R,G,B), 3));
|
||||||
dc_canvas->DrawPoint(x,y);
|
dc_canvas.DrawPoint(x,y);
|
||||||
addr += 4;
|
addr += 4;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue