- Fixed: The C code in AltSoundRenderer::CopyAndClip() did not shift the sample
data enough (2 bits instead of 8), so it was super loud and aliased. - Fixes for GCC 4.1: Several type-punned pointer warnings, but more importantly, declaring a friend function inside a class body is no longer enough to declare that function globally; you must declare it again outside the class. - Upgraded FArchive::SerializePointer so that it can store 32-bit indices. - ACS printing pcodes now build their string in an FSttring instead of a fixed sized buffer on the stack. SVN r145 (trunk)
This commit is contained in:
parent
43abfba723
commit
90b5130db0
29 changed files with 327 additions and 269 deletions
|
|
@ -969,31 +969,30 @@ FArchive &FArchive::operator<< (FName &n)
|
|||
|
||||
FArchive &FArchive::SerializePointer (void *ptrbase, BYTE **ptr, DWORD elemSize)
|
||||
{
|
||||
WORD w;
|
||||
DWORD w;
|
||||
|
||||
if (m_Storing)
|
||||
{
|
||||
if (*ptr)
|
||||
if (*(void **)ptr)
|
||||
{
|
||||
w = SWAP_WORD((*ptr - (byte *)ptrbase) / elemSize);
|
||||
w = DWORD(((size_t)*ptr - (size_t)ptrbase) / elemSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
w = 0xffff;
|
||||
w = ~0u;
|
||||
}
|
||||
Write (&w, sizeof(WORD));
|
||||
WriteCount (w);
|
||||
}
|
||||
else
|
||||
{
|
||||
Read (&w, sizeof(WORD));
|
||||
w = SWAP_WORD (w);
|
||||
if (w != 0xffff)
|
||||
w = ReadCount ();
|
||||
if (w != ~0u)
|
||||
{
|
||||
*ptr = (byte *)ptrbase + w * elemSize;
|
||||
*(void **)ptr = (byte *)ptrbase + w * elemSize;
|
||||
}
|
||||
else
|
||||
{
|
||||
*ptr = NULL;
|
||||
*(void **)ptr = NULL;
|
||||
}
|
||||
}
|
||||
return *this;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue