New DSP debugger: step one. (not ready yet, but try loading zelda WW and look at the dsp debugger..).

Had to shuffle around quite a lot of code to be able to extract the CodeView into a library nicely so it can be used from both the main dolphin and the LLE plugin...  also extracted the symboldb code.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3517 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard 2009-06-21 08:39:21 +00:00
parent 80217a6ed7
commit aecaf271f1
76 changed files with 1895 additions and 794 deletions

View file

@ -460,3 +460,32 @@ void NormalizeDirSep(std::string* str)
}
#endif
}
std::string TabsToSpaces(int tab_size, const std::string &in)
{
std::string out;
int len = 0;
// First, compute the size of the new string.
for (int i = 0; i < in.size(); i++)
{
if (in[i] == '\t')
len += tab_size;
else
len += 1;
}
out.resize(len);
int out_ctr = 0;
for (int i = 0; i < in.size(); i++)
{
if (in[i] == '\t')
{
for (int j = 0; j < tab_size; j++)
out[out_ctr++] = ' ';
}
else
{
out[out_ctr++] = in[i];
}
}
return out;
}