mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-07 23:45:12 +00:00
RSX: Create a rsx namespace.
Put get_address inside.
This commit is contained in:
parent
e3e5b46cbf
commit
3de47c201c
13 changed files with 781 additions and 745 deletions
|
|
@ -316,13 +316,13 @@ void RSXDebugger::OnClickBuffer(wxMouseEvent& event)
|
|||
if (event.GetId() == p_buffer_colorD->GetId()) SHOW_BUFFER(3);
|
||||
if (event.GetId() == p_buffer_tex->GetId())
|
||||
{
|
||||
u8 location = render.m_textures[m_cur_texture].GetLocation();
|
||||
if(location <= 1 && vm::check_addr(GetAddress(render.m_textures[m_cur_texture].GetOffset(), location))
|
||||
&& render.m_textures[m_cur_texture].GetWidth() && render.m_textures[m_cur_texture].GetHeight())
|
||||
u8 location = render.m_textures[m_cur_texture].location();
|
||||
if(location <= 1 && vm::check_addr(rsx::get_address(render.m_textures[m_cur_texture].offset(), location))
|
||||
&& render.m_textures[m_cur_texture].width() && render.m_textures[m_cur_texture].height())
|
||||
MemoryViewerPanel::ShowImage(this,
|
||||
GetAddress(render.m_textures[m_cur_texture].GetOffset(), location), 1,
|
||||
render.m_textures[m_cur_texture].GetWidth(),
|
||||
render.m_textures[m_cur_texture].GetHeight(), false);
|
||||
rsx::get_address(render.m_textures[m_cur_texture].offset(), location), 1,
|
||||
render.m_textures[m_cur_texture].width(),
|
||||
render.m_textures[m_cur_texture].height(), false);
|
||||
}
|
||||
|
||||
#undef SHOW_BUFFER
|
||||
|
|
@ -453,28 +453,28 @@ void RSXDebugger::GetBuffers()
|
|||
}
|
||||
|
||||
// Draw Texture
|
||||
if(!render.m_textures[m_cur_texture].IsEnabled())
|
||||
if(!render.m_textures[m_cur_texture].enabled())
|
||||
return;
|
||||
|
||||
u32 offset = render.m_textures[m_cur_texture].GetOffset();
|
||||
u32 offset = render.m_textures[m_cur_texture].offset();
|
||||
|
||||
if(!offset)
|
||||
return;
|
||||
|
||||
u8 location = render.m_textures[m_cur_texture].GetLocation();
|
||||
u8 location = render.m_textures[m_cur_texture].location();
|
||||
|
||||
if(location > 1)
|
||||
return;
|
||||
|
||||
u32 TexBuffer_addr = GetAddress(offset, location);
|
||||
u32 TexBuffer_addr = rsx::get_address(offset, location);
|
||||
|
||||
if(!vm::check_addr(TexBuffer_addr))
|
||||
return;
|
||||
|
||||
unsigned char* TexBuffer = vm::get_ptr<unsigned char>(TexBuffer_addr);
|
||||
|
||||
u32 width = render.m_textures[m_cur_texture].GetWidth();
|
||||
u32 height = render.m_textures[m_cur_texture].GetHeight();
|
||||
u32 width = render.m_textures[m_cur_texture].width();
|
||||
u32 height = render.m_textures[m_cur_texture].height();
|
||||
unsigned char* buffer = (unsigned char*)malloc(width * height * 3);
|
||||
memcpy(buffer, TexBuffer, width * height * 3);
|
||||
|
||||
|
|
@ -553,29 +553,29 @@ void RSXDebugger::GetTexture()
|
|||
|
||||
for(uint i=0; i<RSXThread::m_textures_count; ++i)
|
||||
{
|
||||
if(render.m_textures[i].IsEnabled())
|
||||
if(render.m_textures[i].enabled())
|
||||
{
|
||||
m_list_texture->InsertItem(i, wxString::Format("%d", i));
|
||||
u8 location = render.m_textures[i].GetLocation();
|
||||
u8 location = render.m_textures[i].location();
|
||||
if(location > 1)
|
||||
{
|
||||
m_list_texture->SetItem(i, 1,
|
||||
wxString::Format("Bad address (offset=0x%x, location=%d)", render.m_textures[i].GetOffset(), location));
|
||||
wxString::Format("Bad address (offset=0x%x, location=%d)", render.m_textures[i].offset(), location));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_list_texture->SetItem(i, 1, wxString::Format("0x%x", GetAddress(render.m_textures[i].GetOffset(), location)));
|
||||
m_list_texture->SetItem(i, 1, wxString::Format("0x%x", rsx::get_address(render.m_textures[i].offset(), location)));
|
||||
}
|
||||
|
||||
m_list_texture->SetItem(i, 2, render.m_textures[i].isCubemap() ? "True" : "False");
|
||||
m_list_texture->SetItem(i, 3, wxString::Format("%dD", render.m_textures[i].GetDimension()));
|
||||
m_list_texture->SetItem(i, 4, render.m_textures[i].IsEnabled() ? "True" : "False");
|
||||
m_list_texture->SetItem(i, 5, wxString::Format("0x%x", render.m_textures[i].GetFormat()));
|
||||
m_list_texture->SetItem(i, 6, wxString::Format("0x%x", render.m_textures[i].GetMipmap()));
|
||||
m_list_texture->SetItem(i, 7, wxString::Format("0x%x", render.m_textures[i].m_pitch));
|
||||
m_list_texture->SetItem(i, 2, render.m_textures[i].cubemap() ? "True" : "False");
|
||||
m_list_texture->SetItem(i, 3, wxString::Format("%dD", render.m_textures[i].dimension()));
|
||||
m_list_texture->SetItem(i, 4, render.m_textures[i].enabled() ? "True" : "False");
|
||||
m_list_texture->SetItem(i, 5, wxString::Format("0x%x", render.m_textures[i].format()));
|
||||
m_list_texture->SetItem(i, 6, wxString::Format("0x%x", render.m_textures[i].mipmap()));
|
||||
m_list_texture->SetItem(i, 7, wxString::Format("0x%x", render.m_textures[i].pitch()));
|
||||
m_list_texture->SetItem(i, 8, wxString::Format("%dx%d",
|
||||
render.m_textures[i].GetWidth(),
|
||||
render.m_textures[i].GetHeight()));
|
||||
render.m_textures[i].width(),
|
||||
render.m_textures[i].height()));
|
||||
|
||||
m_list_texture->SetItemBackgroundColour(i, wxColour(m_cur_texture == i ? "Wheat" : "White"));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue